With all subtleties of the Plug and Play notification codes, changes in Notify codes, and definitions spread throughout the ACPI 1.0b specification, it is often difficult to decide what the correct code is to pass to the ACPI Source Language (ASL) Notify() command. This article provides information about the ACPI Notify codes, when to use them, how to use them, and what they do.
| Notify Codes for Docking Stations | |
| Notify Codes for Device Eject | |
| Other General Notify Codes |
0 - Bus Re-enumerate
When to use: Use Notify(,0) to inform the operating system that the laptop has been docked, or use it in the _WAK control method to inform the operating system that there was a surprise removal from the docking station while the machine was in a sleeping state.
Device to notify: The docking station device object itself; the device with _DCK.
What it does: Causes the parent bus of the given device to be re-enumerated. In addition to finding other changes on this bus, this will cause the docking station to be found either by finding the bridge device in PCI configuration space or by evaluating the _STA.
Note: When Notify(,0) is used to inform the operating system of a surprise removal, Microsoft Windows 2000 will display a dialog box warning the user against surprise removal.
1 - Request Eject
When to use: Use Notify(,1) to inform the operating system that the user has pressed the eject button on the docking station.
Device to notify: The docking station device object itself; the device with _DCK.
What it does: Causes the operating system to query and remove that device object, all of its children, and all eject-related devices (those devices with _EJDs that point to the docking station). Then the operating system will run the appropriate _Ejx control method to eject the machine.
0 - Bus Re-enumerate
When to use: Use Notify(,0) when a bus should be re-enumerated. This is often used in a _WAK method to request the operating system to re-enumerate devices or buses when the hardware cannot detect changes while the computer is asleep. An example would be an expansion bay that cannot set removal status bits while the machine is in a sleep state.
Device to notify: The device object representing the bus to re-enumerate.
What it does: Causes the operating system to ask a given device to have its device driver re-enumerate its children. These children will in turn be asked to enumerate their children, and so on until the entire tree is re-enumerated.
1 - Device Check
When to use: Use Notify(,1) to inform the operating system of the arrival or surprise removal of a new device.
Device to notify: The device object for the affected device.
What it does: Causes the operating system to evaluate the given device's _STA, and to load or unload drivers accordingly. Specifically, if the device previously was not present, the operating system will re-enumerate its parent bus. If the device previously was present, the operating system will remove the specific device.
Note: Notify(,1) can be used to inform the operating system of a device that has been removed. However, because this means that the device has already been removed, this appears to the operating system as a surprise removal. Windows 2000 will display a dialog box warning the user against surprise removals.
3 - Request Device Eject
When to use: Use formatting>Notify(,3) to inform the operating system that the user has pressed the button to eject a device.
Device to notify: The device object for the device attempting to be ejected.
What it does: Causes the operating system to query and remove the given device. This operation is the same as selecting the device in the Unplug/Eject application in Windows 2000. Notify(,3) does nothing if the given device is not already present.
Note: Windows 98 does not support this Notify code.
2 - Device Is Asserting Wake
When to use: Use Notify(,2) to inform the operating system that a given device is asserting its Wake signal.
Device to notify: The device object for the device asserting wake.
What it does: Causes the ACPI driver to complete the WAIT_WAKE interrupt request packet (IRP) for the given device. This informs the device driver to service the wake event.
Battery Notify Codes
| • | 0x80 - Status Changed |
| • | 0x81 - Information Changed |
| • | 0x80 - Power Source Status Changed |
| • | 0x80 - Status Changed |
| • | 0x81 - Trip Points Changed |
| • | 0x80 - Button Pressed |
| • | 0x80 - Lid Changed |
| • | Use these codes to correctly pass information to the ASL Notify() function. |
| • | For more information, see the ACPI 1.0b specification and the Implementers' Guide at http://www.acpi.info/ |