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.

Device <strong>Configuration</strong><br />

are present, which devices are physically in the same device (independent of which bus the devices<br />

live on), <strong>and</strong> methods for controlling ejection or interlock mechanisms.<br />

The system is more stable when removable devices have a software-controlled, VCR-style ejection<br />

mechanism instead of a “surprise-style” ejection mechanism. In this system, the eject button for a<br />

device does not immediately remove the device, but simply signals the operating system. OSPM<br />

then shuts down the device, closes open files, unloads the driver, <strong>and</strong> sends a comm<strong>and</strong> to the<br />

hardware to eject the device.<br />

1. If the device is physically inserted while the computer is in the working state (in other words, hot<br />

insertion), the hardware generates a general-purpose event.<br />

2. The control method servicing the event uses the Notify(device,0) comm<strong>and</strong> to inform OSPM of<br />

the bus that the new device is on or the device object for the new device. If the Notify comm<strong>and</strong><br />

points to the device object for the new device, the control method must have changed the<br />

device’s status returned by _STA to indicate that the device is now present. The performance of<br />

this process can be optimized by having the object of the Notify as close as possible, in the<br />

namespace hierarchy, to where the new device resides. The Notify comm<strong>and</strong> can also be used<br />

from the _WAK control method (for more information about _WAK, see Section 7.4.5 “\_WAK<br />

(System Wake)”) to indicate device changes that may have occurred while the computer was<br />

sleeping. For more information about the Notify comm<strong>and</strong>, see Section 5.6.3 “Device Object<br />

Notification.”<br />

3. OSPM uses the identification <strong>and</strong> configuration objects to identify, configure, <strong>and</strong> load a device<br />

driver for the new device <strong>and</strong> any devices found below the device in the hierarchy.<br />

4. If the device has a _LCK control method, OSPM may later run this control method to lock the<br />

device.<br />

The new device referred to in step 2 need not be a single device, but could be a whole tree of devices.<br />

For example, it could point to the PCI-PCI bridge docking connector. OSPM will then load <strong>and</strong><br />

configure all devices it found below that bridge. The control method can also point to several<br />

different devices in the hierarchy if the new devices do not all live under the same bus. (in other<br />

words, more than one bus goes through the connector).<br />

For removing devices, ACPI supports both hot removal (system is in the S0 state), <strong>and</strong> warm<br />

removal (system is in a sleep state: S1-S4). This is done using the _EJx control methods. Devices<br />

that can be ejected include an _EJx control method for each sleeping state the device supports (a<br />

maximum of 2 _EJx objects can be listed). For example, hot removal devices would supply an _EJ0;<br />

warm removal devices would use one of _EJ1-EJ4. These control methods are used to signal the<br />

hardware when an eject is to occur.<br />

The sequence of events for dynamically removing a device goes as follows:<br />

1. The eject button is pressed <strong>and</strong> generates a general-purpose event. (If the system was in a<br />

sleeping state, it should wake the computer).<br />

2. The control method for the event uses the Notify(device, 3) comm<strong>and</strong> to inform OSPM which<br />

specific device the user has requested to eject. Notify does not need to be called for every device<br />

that may be ejected, but for the top-level device. Any child devices in the hierarchy or any<br />

ejection-dependent devices on this device (as described by _EJD, below) are automatically<br />

removed.<br />

3. The OS shuts down <strong>and</strong> unloads devices that will be removed.<br />

4. If the device has a _LCK control method, OSPM runs this control method to unlock the device.<br />

Version 6.0 331

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

Saved successfully!

Ooh no, something went wrong!