27.10.2015 Views

Advanced Configuration and Power Interface Specification

ACPI_6.0

ACPI_6.0

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Processor <strong>Configuration</strong> <strong>and</strong> Control<br />

Step OS View of power states Platform view of<br />

power states<br />

3 Core0 moves into OSPM <strong>and</strong> starts<br />

processing interrupt<br />

4 Core0 goes idle <strong>and</strong> OSPM request Core0<br />

<strong>Power</strong> Down, Cluster0 <strong>Power</strong> Down<br />

5 Core0’s idle request “passes” Core1’s request.<br />

Platform puts Core0 to <strong>Power</strong> Down but<br />

ignores cluster request since Core1 is still<br />

running<br />

6 Core1’s request is observed by the platform.<br />

Platform puts Core1 to <strong>Power</strong> Down <strong>and</strong><br />

Cluster0 to retention.<br />

Core0: Running<br />

Core1: <strong>Power</strong>Down<br />

Cluster0: Running<br />

Core0: <strong>Power</strong>Down<br />

Core1: <strong>Power</strong>Down<br />

Cluster0: <strong>Power</strong>Down<br />

Core0: <strong>Power</strong>Down<br />

Core1: <strong>Power</strong>Down<br />

Cluster0: <strong>Power</strong>Down<br />

Core0: <strong>Power</strong>Down<br />

Core1: <strong>Power</strong>Down<br />

Cluster0: <strong>Power</strong>Down!!<br />

(See Note)<br />

Core0: Running<br />

Core1: Running<br />

Cluster0: Running<br />

Core0: Running<br />

Core1: Running<br />

Cluster0: Running<br />

Core0: <strong>Power</strong>Down<br />

Core1: Running<br />

Cluster0: Running<br />

Core0: <strong>Power</strong>Down<br />

Core1: <strong>Power</strong>Down<br />

Cluster0:<br />

Retention!! (See<br />

Note)<br />

Note: Bold text here indicates mismatched states.<br />

The key issue here is the race condition between the requests from the two cores; there is no<br />

guarantee that they reach the platform in the same order the OS made them. It is not expected to be<br />

common, but Core0’s request could “pass” Core1’s for a variety of potential reasons – lower<br />

frequency, different cache behavior, h<strong>and</strong>ling of some non-OS visible event, etc. This sequence of<br />

events results in the platform incorrectly acting on the stale Cluster0 request from Core1 rather than<br />

the latest request from Core0. The net result is that Cluster0 is left in the wrong state until the next<br />

wakeup.<br />

To address such race conditions <strong>and</strong> ensure that the platform <strong>and</strong> OS have a consistent view of the<br />

request ordering, OS Initiated idle state request semantics are enhanced to include a hierarchical<br />

dependency check. When the platform receives a request, it is responsible for checking whether the<br />

requesting core is really the last core down in the requested domain <strong>and</strong> rejecting the request if not.<br />

Note that even if OSPM <strong>and</strong> the platform are behaving correctly, they may not always agree on the<br />

state of the system due to various races. For example, the platform may see a core waking up before<br />

OSPM, <strong>and</strong> therefore see that core as running, whilst the OSPM still sees it as sleeping. The platform<br />

can start treating a particular core as being in a low power state, for the sake of the dependency<br />

check, once it has seen the core’s request (so that it can be correctly ordered versus other OS<br />

requests). The platform must start treating a core as running before returning control to the OS after<br />

it wakes up from an idle state.<br />

With this dependency check, the above example would change as follows:<br />

Step<br />

OS View of power<br />

states<br />

0-4: Same as above Core0: <strong>Power</strong>Down<br />

Core1: <strong>Power</strong>Down<br />

Cluster0:<br />

<strong>Power</strong>Down<br />

Platform view of<br />

power states<br />

Core0: Running<br />

Core1: Running<br />

Cluster0: Running<br />

Version 6.0 441

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!