In one embodiment of the invention, an embedded controller receives an interrupt command and a query number from a system management interrupt (smi) handler. The embedded controller generates a system control interrupt (sci) in response to the interrupt command. A driver that receives the sci issues a query command to the embedded controller. A routine associated with the query number is invoked in response to the query command.
|
6. A method comprises:
receiving a method number from a system management interrupt (smi) handler by a chipset; latching a system control interrupt (sci) event in response to a polarity action by the smi handler at a thermal control input to the chipset; and invoking a routine associated with the method number in response to the sci event.
1. A method comprising:
receiving an interrupt command and a query number from a system management interrupt (smi) handler by an embedded controller; generating a system control interrupt (sci) in response to the interrupt command; and invoking a routine associated with the query number in response to a query command issued by a driver that receives the sci.
16. A computer program product comprises:
a machine useable medium having computer program code embedded therein, the computer program product having: computer readable program code to receive a method number from a system management interrupt (smi) handler by a chipset; computer readable program code to latch a system control interrupt (sci) event in response to a polarity action by the smi handler at a thermal control input to the chipset; and computer readable program code to invoke a routine associated with the computer program product number in response to the sci event. 11. A computer program product comprises:
a machine useable medium having computer program code embedded therein, the computer program product having: computer readable program code to receive an interrupt command and a query number from a system management interrupt (smi) handler by an embedded controller; computer readable program code to generate a system control interrupt (sci) in response to the interrupt command; and computer readable program code to invoke a routine associated with the query number in response to a query command issued by a driver that receives the sci. 26. A system comprising:
a host processor; a system memory coupled to the host to store advanced configuration and power interface (ACPI) operating system (OS), the ACPI OS interfacing to a system management interrupt (smi) handler to respond to a smi and a system control interrupt (sci) handler to respond to a sci event; and a chipset coupled to the host processor to store parameters and a method number provided by the smi handler, the chipset having a thermal control input, the chipset generating a sci event in response to a polarity action by the smi handler at the thermal control input; wherein the sci handler, when executed, causes the host processor to invoke a routine associated with the method number in response to the sci event. 21. A system comprising:
a host processor; a system memory coupled to the host to store advanced configuration and power interface (ACPI) operating system (OS), the ACPI OS interfacing to a system management interrupt to (smi) handler respond to a smi and a system control interrupt (sci) handler to respond to a sci; a chipset coupled to the host processor to store parameters provided by the smi handler; and an embedded controller (ec) coupled to the host processor, the ec having an ec memory, the ec memory containing ec program code, the ec program code, when executed by the ec, causing the ec to: receive an interrupt command and a query number from the smi handler, generate a system control interrupt (sci) in response to the interrupt command, and generate the query number to the sci handler in response to a query command provided by the sci handler; and wherein the sci handler, when executed, causes the host processor to invoke a routine associated with the query number. 2. The method of
executing the routine, the executed routine generating a smi to be serviced by the smi handler; and writing parameters to a chipset by the smi handler.
3. The method of
invoking a configuration and power interface source language code.
4. The method of
reading the parameters from the chipset; performing an operation corresponding to the query number, the operation providing values; and returning the values to the chipset.
5. The method of
reading the returned values from the chipset by the smi handler.
7. The method of
receiving parameters by the chipset, the parameters being provided by the smi handler; and executing the routine, the executed routine generating a smi to be serviced by the smi handler.
8. The method of
invoking a configuration and power interface source language code by the sci handler in response to the sci event.
9. The method of
reading the parameters from the chipset; performing an operation corresponding to the method number, the operation providing values; and returning the values to the chipset.
10. The method of
reading the returned values from the chipset by the smi handler.
12. The computer program product of
computer readable program code to execute the routine, the executed routine generating a smi to be serviced by the smi handler; and computer readable program code to write parameters to a chipset by the smi handler.
13. The computer program product of
computer readable program code to invoke a configuration and power interface source language code.
14. The computer program product of
computer readable program code to read the parameters from the chipset; computer readable program code to perform an operation corresponding to the query number, the operation providing values; and computer readable program code to return the values to the chipset.
15. The computer program product of
computer readable program code to read the returned values from the chipset by the smi handler.
17. The computer program product of
computer readable program code to receive parameters by the chipset, the parameters being provided by the smi handler; and computer readable program code to execute the routine, the executed routine generating a smi to be serviced by the smi handler.
18. The computer program product of
computer readable program code to invoke a configuration and power interface source language code by the sci handler in response to the sci event.
19. The computer program product of
computer readable program code to read the parameters from the chipset; computer readable program code to perform an operation corresponding to the method number, the operation providing values; and computer readable program code to return the values to the chipset.
20. The computer program product of
computer readable program code to read the returned values from the chipset by the smi handler.
22. The system of
23. The system of
24. The system of
read the parameters from the chipset; perform an operation corresponding to the query number, the operation providing values; and return the values to the chipset.
25. The system of
27. The system of
28. The system of
29. The system of
read the parameters from the chipset; perform an operation corresponding to the method number, the operation providing values; and return the values to the chipset.
30. The system of
|
1. Field of the Invention
This invention relates to microprocessors. In particular, the invention relates to power management.
2. Description of Related Art
The Advanced Configuration and Power Interface (ACPI) specification introduces a new method for performing platform power management and enumeration. The architecture is table-based and has the capability to execute control methods written in ACPI Source Language (ASL) code. The ASL code is interpreted by the Operating System (OS) and allows the platform to execute actions and notify the OS of certain events. Certain operations in ASL code are prohibited by the OS interpreter. Therefore, in many cases, it is required that the ASL code communicate with the platform System Management Interrupt (SMI) handler to perform actions that would otherwise be blocked by the OS. It is possible for the ASL code to generate SMI's by writing specific values to the SMI command port in the chipset, which then results in a SMI being generated that can perform specific actions. Arguments and return parameters can then be passed to and from the ASL code in scratchpad registers located in the chipset.
Recently, advances in microprocessor technology offer mobile users two performance modes: Maximum Performance mode and Battery Optimized mode. Maximum Performance mode takes advantage of the additional power provided by an alternating current (AC) power source to provide a new level of mobile personal computer (PC) performance, while Battery Optimized mode provides optimal performance while running on battery. An OS may operate in either of the two modes. In order to force the OS out of the Maximum Performance mode, it is necessary to invoke an ASL method from within a SMI handler.
Therefore, there is a need to have a technique to invoke an ASL method from an interrupt handler.
The features and advantages of the present invention will become apparent from the following detailed description of the present invention in which:
The present invention is a technique to invoke an ASL method from a SMI. There are two embodiments. In the first embodiment, the SMI handler issues an interrupt command and a query number to an embedded controller. The embedded controller generates a system control interrupt (SCI) in response to the interrupt command. An ACPI driver then generates a query command to the embedded controller in response to the SCI. The embedded controller returns the query number and the ACPI interpreter invokes an ASL method associated with the query number. The parameters and return values are exchanged between the ASL method and the SMI handler via the scratchpad registers in a chipset. In the second embodiment, the SMI handler writes a method number to the chipset and performs a polarity action on the thermal control input of the chipset. The chipset generates a SCI event in response to the polarity action. The ACPI driver then invokes the ACPI interpreter which in turn invokes a SCI handler for the thermal control input. The SCI handler then reads the method number from the chipset and calls the ASL method associated with the method number. The parameters and return values are exchanged between the ASL method and the SMI handler via the scratchpad registers in the chipset.
The technique allows for a SMI handler to selectively invoke ASL methods in order to communicate effectively with the operating system (OS). The first embodiment is suitable for systems that already have an embedded controller. The embedded controller provides flexibility and requires only a minor change in the firmware. The second embodiment is suitable for systems that do not have an embedded controller.
In the following description, for purposes of explanation, numerous details are set forth in order to provide a thorough understanding of the present invention. However, it will be apparent to one skilled in the art that these specific details are not required in order to practice the present invention. In other instances, well-known structures are shown in block diagram form in order not to obscure the present invention.
The present invention may be implemented by hardware, software, firmware, microcode, or any combination thereof. When implemented in software, firmware, or microcode, the elements of the present invention are the program code or code segments to perform the necessary tasks. A code segment may represent a procedure, a function, a subprogram, a program, a routine, a subroutine, a module, a software package, a class, or any combination of instructions, data structures, or program statements. A code segment may be coupled to another code segment or a hardware circuit by passing and/or receiving information, data, arguments, parameters, or memory contents. Information, arguments, parameters, data, etc. may be passed, forwarded, or transmitted via any suitable means including memory sharing, message passing, token passing, network transmission, etc. The program or code segments may be stored in a processor readable medium or transmitted by a computer data signal embodied in a carrier wave, or a signal modulated by a carrier, over a transmission medium. The "processor readable medium" may include any medium that can store or transfer information. Examples of the processor readable medium include an electronic circuit, a semiconductor memory device, a ROM, a flash memory, an erasable programmable ROM (EPROM), a floppy diskette, a compact disk (CD-ROM), an optical disk, a hard disk, a fiber optic medium, a radio frequency (RF) link, etc. The computer data signal may include any signal that can propagate over a transmission medium such as electronic network channels, optical fibers, air, electromagnetic, RF links, etc. The code segments may be downloaded via computer networks such as the Internet, Intranet, etc.
It is noted that the invention may be described as a process which is usually depicted as a flowchart, a flow diagram, a structure diagram, or a block diagram. Although a flowchart may describe the operations as a sequential process, many of the operations can be performed in parallel or concurrently. In addition, the order of the operations may be re-arranged. A process is terminated when its operations are completed. A process may correspond to a method, a function, a procedure, a subroutine, a subprogram, etc. When a process corresponds to a function, its termination corresponds to a return of the function to the calling function or the main function.
The host processor 110 represents a central processing unit of any type of architecture, such as embedded processors, mobile processors, micro-controllers, digital signal processors, superscalar computers, vector processors, single instruction multiple data (SIMD) computers, complex instruction set computers (CISC), reduced instruction set computers (RISC), very long instruction word (VLIW), or hybrid architecture.
The host bus 120 provides interface signals to allow the processor 110 to communicate with other processors or devices, e.g., the MCH 130. The host bus 120 may support a uni-processor or multiprocessor configuration. The host bus 120 may be parallel, sequential, pipelined, asynchronous, synchronous, or any combination thereof.
The MCH 130 provides control and configuration of memory and input/output devices such as the system memory 140 and the ICH 150. The MCH 130 may be integrated into a chipset that integrates multiple functionalities such as the isolated execution mode, host-to-peripheral bus interface, memory control. The MCH 130 interfaces to the peripheral bus 155. For clarity, not all the peripheral buses are shown. It is contemplated that the system 100 may also include peripheral buses such as Peripheral Component Interconnect (PCI), accelerated graphics port (AGP), Industry Standard Architecture (ISA) bus, and Universal Serial Bus (USB), etc.
The system memory 140 stores system code and data. The system memory 140 is typically implemented with dynamic random access memory (DRAM) or static random access memory (SRAM). The system memory may include program code or code segments implementing one embodiment of the invention. The system memory includes a system and power management module 145 which may include separate elements. Any one of the elements of the system and power management module 145 may be implemented by hardware, software, firmware, microcode, or any combination thereof. The system memory 140 may also include other programs or data which are not shown, such as an operating system.
The ICH 150 has a number of functionalities that are designed to support I/O functions. The ICH 150 may also be integrated into a chipset together or separate from the MCH 130 to perform I/O functions. The ICH 150 may include a number of interface and I/O functions such as PCI bus interface to interface to the peripheral bus 155, processor interface, interrupt controller, direct memory access (DMA) controller, power management logic, timer, system management bus (SMBus), universal serial bus (USB) interface, mass storage interface, low pin count (LPC) interface, etc. In one embodiment, the ICH 150 has support for ACPI operations including system management interrupt (SMI), system control interrupt (SCI), and control input such as thermal alarm (THRM#). The control input is used as a means to generate a SCI. Any type of control input that provides a SCI can be used. When the control input is the THRM# pin, inverting THRM# generates a SCI. The ICH 150 includes scratchpad registers 152 to store parameters, query number, or method number that are associated with the invocation of an ASL method from the SMI handler.
The mass storage device 170 stores archive information such as code, programs, files, data, applications, and operating systems. The mass storage device 170 may include compact disk (CD) ROM 172, floppy diskettes 174, and hard drive 176, and any other magnetic or optic storage devices. The mass storage device 170 provides a mechanism to read machine-readable media. The machine-readable media may contain computer readable program code to perform tasks as described in the following. These tasks may include writing parameters, query number, and interrupt command, receiving an interrupt command and a query number, generating a system control interrupt (SCI), invoking a routine, inverting polarity of the thermal control input, etc.
The I/O devices 180l to 180K may include any I/O devices to perform I/O functions. Examples of I/O devices 180l to 180K include controller for input devices (e.g., keyboard, mouse, trackball, pointing device), media card (e.g., audio, video, graphics), and any other peripheral controllers.
The embedded controller (EC) 190 is any controller such as micro-controller, digital signal processor, or any programmable device that can execute its own programs. The embedded controller 190 contains EC program code 195. The EC program code contains instructions that cause the EC 190 to perform specified operations.
The SMI 210 includes a SMI handler 215. The SMI handler 215 is a routine that is invoked when the SMI is asserted. The SMI handler 215 may perform a number of tasks associated with responses to the SMI. To invoke an ASL method from the SMI, the SMI handler 215 communicates with the chipset 150 and the embedded controller 190 in accordance to a communication protocol or a sequence of operations. In particular, the SMI handler 215 writes the parameters needed by the ASL method to the scratchpad registers in the chipset 150. The SMI handler 215 also write an interrupt command to the embedded controller 190 to instruct the embedded controller 190 to inject a system control interrupt (SCI) to the host processor 10. In addition, the SMI handler 215 writes a query number to the embedded controller 190 that specifies the method to be invoked. When the invoked method completes its operation and return values to the chipset 150, the SMI handler 215 reads the return values from the chipset 150.
The ACPI OS 220 is part of the overall operating system which is designed to conform to a power management policy. In one embodiment, the power management policy follows the Advanced Configuration and Power Interface (ACPI) specification by Compaq Computer Corporation, Intel Corporation, Microsoft Corporation, Phoenix Technologies Ltd., Toshiba corporation, Revision 2.0, published Jul. 27, 2000. The ACPI OS 220 includes an ACPI driver 230, a SCI handler 240, an ACPI interpreter 250, and an ASL method 260.
The ACPI driver 230 and the EC driver 225 each is a routine that is designed to control the embedded controller 190. The ACPI driver 230 receives a SCI from the embedded controller 190 and invokes the SCI handler 240 to handle the SCI. EC driver 225 writes a query command to the embedded controller 190 in response to the SCI. The EC driver 225 also reads the method number from the embedded controller 190. The ACPI interpreter 250 interprets the ASL code. When the SCI handler 240 receives the method number, it invokes the ACPI interpreter 250 which in turns invokes the ASL method 260 corresponding to the specified method number. The ASL method 260 is the routine to be invoked from within the SMI. When invoked, the ASL method 260 is executed. It reads the parameters stored in the chipset 150, performs an operation using these parameters, and then return values as results of the method to the scratchpad registers inside the chipset 150. The ASL method 260 may also generate a SMI to the SMI which is serviced by the SMI handler 215. The order of these steps is shown by a number from 1 through 11 at each step in FIG. 2. The sequence of the steps will be described in details in FIG. 4.
The SMI 210 includes the SMI handler 215. In this embodiment, the SMI handler 215 performs the following tasks: write parameters and a method number to the scratchpad registers in the chipset 150, activate the control input (e.g. invert the polarity of the thermal control input) to the chipset, and read the return values from a storage location (e.g. the scratchpad registers in the chipset 150, a memory location, a memory-mapped device).
The ACPI OS 220 includes an ACPI driver 235, the ACPI interpreter 250, a SCI handler 245, and the ASL method 260. The ACPI driver 235 is a routine designed to control the chipset 150 for this invocation task. The ACPI driver 235 receives a SCI event from the chipset 150 and invokes the ACPI interpreter 250. The ACPI interpreter 250 invokes the SCI handler 245. The SCI handler 245 is a general purpose SCI handler that reads the method number in the scratchpad register in the chipset 150. The SCI handler 245 invokes the ASL method 260 associated with the method number. The ASL method 260 is executed, reads the parameters from the scratchpad registers in the chipset 150, perform the specified operation using these parameters, and return values to the scratchpad registers in the chipset 150. The ASL method 260 also generates a SMI to be serviced by the SMI handler 215. The order of these steps is shown by a number from 1 through 11 at each step in FIG. 3. The details of the sequence of steps for this embodiment are shown in FIG. 5.
Upon START, the SMI handler writes the passing parameters to the scratchpad registers in the chipset (Block 410). These parameters are those parameters that will be used by the ASL method to perform the specified operation. Next, the SMI handler writes an interrupt command to the embedded controller (Block 415). The interrupt command may be any command that instructs the embedded controller to generate or inject an interrupt to the host processor. In one embodiment, this interrupt is a SCI.
Then, the SMI handler writes a query number xy to the embedded controller (Block 420). The query number xy corresponds to the ASL method to be invoked. Thereafter, the SMI handler exits the SMI (Block 425). The embedded controller receives the passing parameters and the interrupt command. It stores the parameters in the scratchpad registers and generates a SCI in response to the interrupt command (Block 430).
Next, the ACPI driver or the SCI handler issues a query command to the embedded controller in response to the SCI (Block 435). The purpose of the query command is to inquire the method number. In response, the embedded controller returns the method number xy, where xy is an 8-bit hexadecimal number, as received from the SMI handler earlier (Block 440). Then, the ACPI interpreter invokes the ASL method_Qxy associated with the method number xy (Block 445). The ASL method_Qxy is then executed and reads the parameters from the scratchpad registers in the chipset (Block 450). Next, the ASL method_Qxy perform an operation using these parameters and return values as results of the operation to the scratchpad registers in the chipset (Block 455). Then, the ASL method_Qxy generates a SMI to be serviced by the SMI handler (Block 460). The SMI handler is invoked to respond to the SMI. It reads the return values from the scratchpad registers in the chipset and continues execution (Block 465). The process 400 is then terminated.
Upon START, the SMI handler writes the passing parameters to the scratchpad registers in the chipset (Block 510). Next, the SMI handler writes the method number to the scratchpad registers in the chipset (Block 515). The method number corresponds to the ASL method to be invoked later. Then, the SMI handler activates a control function on the control input to the chipset (e.g. inverts the polarity of the thermal control input) (Block 520). In one embodiment, this control input is the THRM# input of the chipset.
In response to the polarity action on the thermal control input, the chipset latches or generates a general purpose SCI thermal event (Block 525). Then, the SMI handler exits the SMI (Block 530). Next, the ACPI driver receives the general purpose SCI event from the control input (Block 535). The ACPI driver then invokes the ACPI interpreter which in turns invokes the general purpose SCI handler for the control input (Block 540). Next, the general purpose SCI handler reads the method number from the chipset registers and call the requested method associated with the method number (Block 545).
The ASL method is then executed and reads the parameters from the scratchpad registers in the chips et (Block 550). The method performs an operation using the parameters and writes the return values as results of the operation to the scratchpad registers in the chipset (Block 555). Then, the method may generate a SMI to the host processor (Block 560). In response to the SMI, the SMI handler reads the return values from the scratchpad registers in the chipset and continues execution (Block 565). The process 500 is then terminated.
While this invention has been described with reference to illustrative embodiments, this description is not intended to be construed in a limiting sense. Various modifications of the illustrative embodiments, as well as other embodiments of the invention, which are apparent to persons skilled in the art to which the invention pertains are deemed to lie within the spirit and scope of the invention.
Patent | Priority | Assignee | Title |
7325146, | Dec 31 2001 | Intel Corporation | Method and apparatus for generating SMI from ACPI ASL control code to execute complex tasks |
7418714, | Feb 26 2002 | Microsoft Technology Licensing, LLC | Employing three parameter buffer access in connection with SMBus notifications |
Patent | Priority | Assignee | Title |
5021679, | Jun 30 1989 | FUJITSU PERSONAL SYSTEMS, INC | Power supply and oscillator for a computer system providing automatic selection of supply voltage and frequency |
5153535, | Jun 30 1989 | FUJITSU PERSONAL SYSTEMS, INC | Power supply and oscillator for a computer system providing automatic selection of supply voltage and frequency |
5307003, | Oct 19 1990 | Poqet Computer Corporation | Varying the supply voltage in response to the current supplied to a computer system |
5627412, | Mar 08 1995 | AVAGO TECHNOLOGIES GENERAL IP SINGAPORE PTE LTD | Dynamically switchable power supply |
5752011, | Jun 20 1994 | IpVenture, Inc | Method and system for controlling a processor's clock frequency in accordance with the processor's temperature |
5974557, | Jun 20 1994 | Method and system for performing thermal and power management for a computer | |
6065121, | Mar 31 1998 | HEWLETT-PACKARD DEVELOPMENT COMPANY, L P | Control of computer system wake/sleep transitions |
6216235, | Jun 20 1994 | Thermal and power management for computer systems | |
6219742, | Apr 29 1998 | HEWLETT-PACKARD DEVELOPMENT COMPANY, L P | Method and apparatus for artificially generating general purpose events in an ACPI environment |
6438701, | Jul 21 1999 | HEWLETT-PACKARD DEVELOPMENT COMPANY, L P | Method and apparatus for externally generating system control interrupts as resume events from power-on suspend mode |
6487668, | Jun 20 1994 | Thermal and power management to computer systems |
Executed on | Assignor | Assignee | Conveyance | Frame | Reel | Doc |
Dec 20 2001 | COOPER, BARNES | Intel Corporation | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 012415 | /0273 | |
Dec 21 2001 | Intel Corporation | (assignment on the face of the patent) | / | |||
Jul 18 2022 | Intel Corporation | TAHOE RESEARCH, LTD | ASSIGNMENT OF ASSIGNORS INTEREST SEE DOCUMENT FOR DETAILS | 061175 | /0176 |
Date | Maintenance Fee Events |
Sep 15 2005 | ASPN: Payor Number Assigned. |
Mar 13 2008 | M1551: Payment of Maintenance Fee, 4th Year, Large Entity. |
Sep 22 2011 | M1552: Payment of Maintenance Fee, 8th Year, Large Entity. |
Mar 02 2016 | M1553: Payment of Maintenance Fee, 12th Year, Large Entity. |
Date | Maintenance Schedule |
Sep 14 2007 | 4 years fee payment window open |
Mar 14 2008 | 6 months grace period start (w surcharge) |
Sep 14 2008 | patent expiry (for year 4) |
Sep 14 2010 | 2 years to revive unintentionally abandoned end. (for year 4) |
Sep 14 2011 | 8 years fee payment window open |
Mar 14 2012 | 6 months grace period start (w surcharge) |
Sep 14 2012 | patent expiry (for year 8) |
Sep 14 2014 | 2 years to revive unintentionally abandoned end. (for year 8) |
Sep 14 2015 | 12 years fee payment window open |
Mar 14 2016 | 6 months grace period start (w surcharge) |
Sep 14 2016 | patent expiry (for year 12) |
Sep 14 2018 | 2 years to revive unintentionally abandoned end. (for year 12) |