Suspend and resume OFW

From OLPC
Revision as of 00:55, 3 July 2009 by Wad (talk | contribs) (New page: {{OLPC}} This page describes how to test suspend/resume on an XO Laptop, using Open Firmware. ==Introduction== The [[Hardware#XO_Laptop|...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
  This page is monitored by the OLPC team.

This page describes how to test suspend/resume on an XO Laptop, using Open Firmware.

Introduction

The XO Laptop is designed to suspend and resume multiple times a second, to optimize power usage. These are the tests built into Open Firmware, the BIOS used in the XO, to test the basic suspend and resume functionality.

These tests generally apply to Open Firmware running on both the XO-1 and XO-1.5 laptops.

All tests are done at the Open Firmware prompt. This may be obtained by halting the boot operation with the ESC key. All command may be typed either on the keyboard or on a terminal connected to the processor serial port.

These tests start at the most basic, and build up, as needed when first debugging suspend/resume on a laptop. If you are trying to see if suspend/resume works on a laptop, skip right to the random EC wakeup tests, which exercise the system in the worst manner.

Manual Wakeups

The first test is placing a system in suspend mode, then waking it using a manual interaction.

Enter suspend by typing:

s

And resume operation by pressing the power button. You should obtain an ok prompt again.

RTC Wakeups

These are resumes which are triggered in a manner synchronous to the suspend operation. The laptop remains suspended for a small fixed period of time, then is woken up by a real time clock (RTC) timer in the VX855 companion chip. It prints the number of cycles run (in hexadecimal), then immediately suspends again. It may be exited by pressing any key.

Start this test by typing:

rtc-wackup

EC Wakeups

These are resumes which are triggered by a system control interrupt (SCI) from the EC to the processor. Two methods are supported, one which delays a fixed amount of time, and one which delays a random amount of time.

Periodic wakeup

In this test, the laptop is suspended, and is woken a fixed amount of time after entering suspend by an SCI from the EC. It prints the number of cycles run (in decimal), then immediately suspends again. It may be exited by pressing any key.

This test expects the stack to contain the requested delay in microseconds (2 to 65535) Start this test by typing:

<delay_in_microseconds> autowack-test

Random wakeup

In this test, the laptop is suspended, and is woken a random amount of time after entering suspend by an SCI from the EC. It prints the number of cycles run (in decimal), then immediately suspends again. It may be exited by pressing any key.

This test expects the stack to contain the maximum delay value. The minimum delay value (0) is roughly 16 mS before the system enters suspend. We recommend a maximum delay value of roughly 20 - 30. Start this test by typing:

<max_delay_in_microseconds> wackup-test-ec