Abstract:
A method and apparatus provides hardware-configured wake-up events for a computer operating system compliant with an advanced configuration and power interface (ACPI) protocol without requiring additional hardware. The method and apparatus includes generation of a system management interrupt (SMI) during normal ACPI working-to-sleep transition allowing a basic input-output system (BIOS) circuit to enable additional wake-up events independent of the computer operating system.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates generally to computer system management. It particularly relates to a method and apparatus for configuring wake-up events independent of a computer operating system that is running an advanced configuration and power interface protocol. 
     2. Background Art 
     Most computer system power management techniques, such as the advanced power management system (APM), are implemented using the basic input-output system (BIOS) instructions stored in read-only memory (ROM). In an exemplary scenario, a wake-up event (e.g., transitioning from an “off” or “sleep” state to an “on” state) triggers a system management interrupt (SMI) notifying the BIOS of the event. The BIOS then performs all state restoration actions needed before relinquishing control over to the operating system (OS) to complete the system wake-up. 
     Under the newer ACPI (advanced configuration and power interface), a wake-up event triggers a system control interrupt (SCI) that notifies the OS, and the OS itself directs all system and device power state transitions. An exemplary ACPI-compliant OS is the Windows 98 operating system. The ACPI specification, version 1.0b, published by Intel Corporation, Microsoft Corporation, and Toshiba K.K. in February 1999, includes tables, BIOS, and hardware registers. ACPI tables are used to describe system information (e.g., supported power states, power sources, clock sources), features (e.g., available hardware devices), and methods for controlling those features (e.g., ACPI control methods). Particularly, a fixed ACPI (FACP) table holds the I/O addresses used by the OS to describe the different hardware devices for power management events. The ACPI BIOS, part of the computer system firmware, implements the ACPI specified interfaces for sleep, wake, and some restart operations. It also provides permanent storage of ACPI table information. ACPI registers are used to store and pass event information between the hardware/firmware and an ACPI driver, an OS level program that directs all transitions between working and sleeping states. 
     Typically, enabling of wake-up events from an ACPI sleeping state (S 1 -S 4 ) is controlled by the OS. However, the ACPI specification only allows for a power button (e.g., connected through hardware) wake-up event from a S 5  soft-off state (not a sleep state) as indicated in the ACPI register. Thus, additional wake-up events from the S 5  state can be configured only through additional hardware which can be costly and inflexible. Therefore, there is a need to enable new wake-up events from the S 5  state, recognizable by an ACPI-compliant OS, using existing hardware which facilitates remote computer management. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     FIG. 1 shows the ACPI sleep-to-wake transitions in accordance with an embodiment of the present invention. 
     FIG. 2 shows the ACPI registers in accordance with an embodiment of the present invention. 
     FIG. 3 shows the control bit descriptions for the ACPI event registers in accordance with an embodiment of the present invention. 
     FIG. 4 shows additional control bit descriptions for the ACPI event registers in accordance with an embodiment of the present invention. 
     FIG. 5 shows the control bit description for the ACPI control registers in accordance with an embodiment of the present invention. 
     FIG. 6 shows the Fixed ACPI tables in accordance with an embodiment of the present invention. 
     FIG. 7 shows flow diagram for enabling an additional wake-up event in accordance with embodiments of the present invention. 
     FIG. 8 shows a block diagram of a representative computer system in accordance with an embodiment of the present invention. 
    
    
     DETAILED DESCRIPTION 
     FIG. 1 illustrates the ACPI sleep-to-wake transitions  100  for a computer system in accordance with an embodiment of the present invention. Generally, there exists three different system states (G 2 )  110 , (GO)  120 , (G 1 )  130  for an ACPI-compliant computer system. In the G 0  state  120 , work is being performed by the operating system (OS) or computer hardware which may be in any of the ACPI defined power states. In the G 1  state  130 , the system is assumed to be doing no work as the sleeping states (S 1 -S 4 ) are entered for the hardware devices. As illustrated in FIG. 1, the OS may program, as directed by an ACPI driver, the sleep type field (SLP_TYPx) and sets the sleep enable bit (SLP_EN) to start the sleeping sequence for each sleeping state. 
     Prior to entering the G 1  state, the OS may also execute, as directed by the ACPI driver, a Prepare to Sleep (_PTS) control method (for S 1 -S 4  states) which provides the BIOS a mechanism for performing some system operations before entering the sleeping state. The _PTS control method may be an OEM-specific ACPI Machine Language (AML)/ACPI Source Language (ASL) code executed by the ACPI driver. The _PTS control method may be executed prior to entering the sleeping state and is not synchronized with a write to the control register (PM 1 _CNT) which is the control register for fixed features (e.g., hardware devices). The PM 1  control register has a set of bits that can be distributed between two different registers (PM 1   a , PM 1   b ) allowing these registers to be partitioned between two chips, or all placed on a single chip. 
     A wake-up event must be enabled before the sleeping state is entered. The OS enables the wake-up feature on particular devices by setting that device&#39;s enable bit which is located in the device&#39;s entry in the Fixed ACPI (FACP) description table. In AtCPI, each control register has a 32-bit pointer in the FACP. Similarly, ACPI includes PM 1  event registers (PM 1   a _EVT_BLK, PM 1   b _EVT_BLK) wherein each event register has a 32-bit pointer in the FACP table. Also, ACPI includes general-purpose event registers (GPE 0 _BLK, GPE 1 _BLK) that contain the root level events for all generic features, each general register block containing a pointer in the FACP table. For all sleeping states (S 1 -S 4 ), system context is saved to memory. Particularly, for sleeping state S 4 , system context is advantageously saved to a back-up media, an example being a hard disk drive. 
     For the G 2  state  110  (soft-off S 5  state), the OS turns the computer off. S 5  is not a sleeping state as no system context is saved by the OS or the hardware. The S 4  state, the lowest power sleeping state, has either a BIOS-initiated transition or an OS-initiated transition to the sleeping state, dependent on the OS and FACP table entries. The BIOS-initiated transition is identical in terms of hardware actions (e.g., BIOS control) to the S 5  state except that system context is saved to memory for the S 4  state. The computer system in the S 5  state requires a complete boot to awaken and the ACPI specifications allows only a power button as an enabled wake-up event. Exemplary embodiments of the present invention may advantageously support the OS-initiated S 4  sleeping state. 
     In accordance with embodiments of the present invention, BIOS control is used to advantageously provide at least one additional wake-up event to be enabled for the computer system. Advantageously, the additional wake-up event may be a remote access attempt allowing remote computer management. 
     As shown in FIG. 2, ACPI has a plurality of register blocks  200  including event register blocks  210  (PM 1   a _EVT_BLK, PM 1   b _EVT_BLK), control register blocks (PM 1   a _CNT_BLK, PM 1   b _CNT_BLK)  220 , and general-purpose event register blocks (GPE 0 _BLK, GPE 1 _BLK)  230  that are used for power management events, and other registers  240 . FIGS. 3 and 4 provide a table description  300 ,  400  of the bits contained in the PM 1  event register. FIG. 5 provides a table description  500  of the bits contained in the PM 1  control register The first control register (PM 1   a _CNT) is required while the other (PM 1   b _CNT) is optional. Similarly, the first event register block (PM 1   a _EVT) is required while the other (PM 1   b _EVT) is optional. In common practice, only the PM 1   a  control register is functional while the PM 1   b  register contains a value of zero in the FACP table. FIG. 6 shows the register block entries  600  for the control register  610 , event register  620 , and general-purpose register  630  in the FACP table. In accordance with embodiments of the present invention, the event register block or the general-purpose event register block may be used to enable additional wake-up events without using additional hardware making this configuration transparent (independent) to the OS. 
     In normal ACPI operation, prior to entering a sleeping state (G 1 ), the OS writes to the PM 1   a  control register by programming the SLP_TYPa (sleep type) field and then writing to the PM 1   b  control register by programming the SLP_TYPb (sleep type) field. Then, the OS sets the sleep enable bit for each register (SLP_ENa, SLP_ENb). Also, the enable bit for enabling system wake-up is set for the device entry in the FACP table. Finally, the system enters the specified sleeping state. The OS performs similar actions when entering the S 5  state (soft-off state), but only the power button is enabled for system wake-up during this normal operation. 
     In accordance with embodiments of the present invention, the PM 1  event register, the general-purpose event register, or both may be modified after the OS writes to the PM 1   a  control register, but before the system enters any of the sleeping states or soft-off state to enable additional wake-up events. As illustrated in FIG. 7, embodiments of the present invention advantageously follow process  700  to enable additional wake-up events. At  710 , the OS begins the working-to-sleep transition by writing to the PM 1   a  control register which includes programming the 3-bit sleep type field (SLP_TYP). At  720 , a system management interrupt (SMI) is generated from this write procedure via the GBL_RLS feature control bit  510  in the control register (see FIG.  5 ). At  730 , from the SMI, the BIOS is enabled to modify (configure) the PM 1  event register (PM 1   a _EVT or PM 1   b _EVT), the GPE event register (GPE 0 _BLK or GPE 1 _BLK), or both. By following this process, the PM 1   a  control register may be advantageously configured (used) as a hardware control register, enabling BIOS, via the SMI, to configure additional wake-up events via modification of the event registers. Advantageously, existing hardware uses the OS to generate an I/O trap, via the SMI, allowing BIOS to enable additional wake-up events by modifying the event registers, an exemplary additional wake-up event being a remote access attempt. At  740 , BIOS exits the SMI mode which returns control to the OS. The OS continues the normal working-to-sleep transition by writing to the PM 1   b  control register which includes programming the sleep type field (SLP_TYP). At  750 , the OS writes to the PM 1   a  control register with the sleep enable bit (SLP_EN). An SMI is generated from this write procedure enabling BIOS, which then returns control back to the OS. At  760 , the OS writes to the PM 1   b  control register with the sleep enable bit (SLP_EN). Finally, at  770 , the system enters the specified sleeping state (S 1 -S 4 ) or soft-off state (S 5 ). Advantageously, embodiments of the present invention may be implemented in any section of the computer system (e.g., power management section) with access to hardware that enables control to pass over to the BIOS. In accordance with embodiments of the present invention, this process may be used to enable particular wake-up events that may be customized dependent on the specific needs of the computer system. 
     Although preferably used for enabling additional wake-up events, the configured hardware control register (e.g., PM 1  control register) can be advantageously used for other functions. These other functions include, but are not limited to design-around solutions to hardware/OS errors, debugging code for operations performed before or after working-to-sleep transition, and other functions. Generally, embodiments of the present invention may be use to advantageously modify any system operation that is performed before or after going to the sleeping or the soft-off state. To perform fixing operations upon waking, the values indicating the fixing operations may be preserved in volatile or non-volatile memory by the BIOS. 
     FIG. 8 shows a representative computer system  800  in accordance with embodiments of the present invention. The components of the system  800  advantageously include OS  810 , I/O memory  815  which includes register block A  820  and register block B  825 , and BIOS circuit  830  which may be included in the system ROM. Each register block  820 ,  825  may advantageously include PM 1  control registers, PM 1  event registers, and GPE event registers and each register block  820 ,  825  may have an entry in a device table (not shown). OS  810  is operatively coupled to I/O memory  815  which is operatively coupled to BIOS circuit  830 . In operation, after the OS writes to a control register included within register block A  820 , an SMI is generated which enables the BIOS circuit  830  to modify an event register (e.g., PM 1  and/or GPE) included within register block A or B ( 820 ,  825 ) to enable additional wake-up events. Remote access attempts are solely described herein as an exemplary additional wake-up event, and any plurality of additional wake-up events may be enabled by the BIOS. These additional wake-up events include, but are not limited to, modem event, CD-ROM event, keyboard event, and other wake-up events including other peripherals. 
     Additionally, embodiments of the present invention may include a computer-readable medium having stored thereon instructions adapted to be executed by a circuit, the instructions which, when executed, cause the circuit to perform the method described herein to enable additional wake-up events for a computer system. 
     Although the invention is described herein using an ACPI system example, it will be appreciated by those skilled in the art that modifications and changes may be made without departing from the spirit and scope of the present invention. As such, the method and apparatus described herein may be equally applied to any computer system power management technique that enables new wake-up events independent of the computer operating system.