A method and system for selectively enabling wake events in software of a computer
system to overcome problems arising when hardware devices fail to clear a wake
signal. The operating system manages wake events, and also distinguishes between
events that are exclusively wake events, exclusively run-time events, and shared
wake and run-time events. At boot time, the ACPI driver examines system tables
provided by firmware to determine which GPEs are associated with wake-up events,
either exclusively or shared with run-time events. These wake event associations
are tracked and managed differently from events received on other hardware register
pins. When the operating system receives events in a GPE Status hardware register
that is enabled in a counterpart Enable register, the operating system runs an
associated GPE method. When the GPE method has completed, the operating system
selectively determines whether the event needs to be re-enabled.