In a computer system, power management control is performed to manage the amount of power consumption in the computer system. For example, when there is relatively low activity in the computer system, settings can be changed to reduce power consumption, such as by reducing the clock frequency of a processor or other electronic device, or by reducing a power supply voltage provided to the processor or other electronic device.
Existing techniques of power management control, such as techniques based on the Advanced Configuration and Power Interface (ACPI) standard, are usually platform-dependent. The specific power management control may differ for different platforms (e.g., different platforms using different types of processors). Also, existing techniques of power management control may not allow power management features provided by different system components (e.g., operating system and platform firmware) to co-exist in a system.
Some embodiments of the invention are described with respect to the following figures:
In accordance with some embodiments, to perform hardware management control (such as power management or thermal management control), a management communication channel is provided between a software layer and platform firmware within a system. The management communication channel provides an abstract interface between the software layer and platform firmware to enable the software layer to issue hardware management commands to the platform firmware to cause a change in a hardware management setting of system hardware. The abstract interface also allows the software layer to obtain, from the platform firmware, information regarding hardware components. The information can include feedback information regarding the level of performance delivered. The information can also include indications that the performance requested by a request from a software layer cannot be satisfied.
The abstract interface provided by the management communication channel allows commands and other information exchanged between the software layer and the platform firmware to have abstract formats that are the same (or common) for different types of the hardware in the system. In addition, the management communication channel allows collaboration between the software layer and the platform firmware in providing hardware management control in the system.
Performing hardware management control involves performing control of settings and/or tasks performed by hardware components of a system. One type of hardware management control is power management control, where power consumption of one or more hardware components can be varied, such as by changing the clock frequency of input clock(s) to the hardware component(s), or by changing the power supply voltage(s) provided to the hardware component(s). In the ensuing discussion, reference is made to power management control using mechanisms according to some embodiments. Note that the same or similar mechanisms can be applied to other types of hardware management control.
The software layer noted above can be an operating system (OS) of a computer system, for example. The OS can also include a power management driver to perform power management control in the computer system.
Alternatively, the software layer can be a virtual machine monitor (VMM) (also referred as a “hypervisor”), which virtualizes hardware resources of a computer system. The VMM allows for virtual machines to be deployed in the computer system, where a virtual machine refers to an arrangement of components for virtualizing or emulating a physical machine. A virtual machine can include an operating system, software applications, and virtual hardware. The VMM intercepts requests for resources from operating systems in respective virtual machines, and provides access of the hardware resources to the virtual machines. The VMM can also include a module to perform power management control.
More generally, the software layer can be any software power management module in a computer system.
The platform firmware refers to programmable content embedded in hardware components, such as microprocessors, application-specific integrated circuits (ASICs), programmable logic devices, peripheral devices, and so forth. Platform firmware can include basic input/output system (BIOS) code that is loaded and executed for performing initialization and other boot tasks for initializing and booting the computer system. Platform firmware can also include other code, such as code to perform management of the health of the computer system, and so forth. The BIOS code can include a power management engine to perform power management tasks in the computer system. Mechanisms according to some embodiments can also be applied to an implementation that uses the Unified Extensible Firmware Interface (UEFI), which is an interface between an operating system and platform firmware. Also, the platform firmware can in some implementations include baseboard management controller (BMC) firmware.
Conventionally, a computer system customer typically has to choose between platform firmware-based control or OS-based control, to perform power management tasks such as controlling the clock frequency of hardware components (e.g. processors). Conventional techniques do not provide for easy deployment of both the platform firmware-based power management control features and the OS-based power management control features in the same system.
Moreover, existing interfaces, such as interfaces provided by the Advanced Configuration and Power Interface (ACPI) Specification do not provide for adequate abstraction for power management control in the system. Different systems may use different types of processors or other hardware. Power management software that employ ACPI methods for power management control typically has to consult information, such as information stored in tables, to determine how power management control is to be performed for different types of hardware. The power management software, such as the power management driver of the OS, may be made more complicated by having to support different types of hardware.
In accordance with some embodiments, the abstract interface provided by the management communication channel between the software layer and platform firmware allows for platform-independent power management control and also allows for effective collaboration between the software layer and the platform firmware. In some embodiments, the platform firmware remains in control of hardware components. The software layer can compute the target performance of a hardware component (such as a processor) and can request such target performance in a command sent to the platform firmware over the management communication channel. The platform firmware is responsible for managing the hardware controls to deliver the requested performance. The management communication channel also allows the software layer to obtain information regarding the actual performance level delivered, or to receive indications from the platform firmware that the requested performance level could not be obtained.
Note that the term “platform firmware” is intended to cover virtual platform firmware as well, such as firmware emulated by a virtual machine.
In some embodiments, the management communication channel is a shared memory region, which is a region of system memory allocated to store information to allow for the software layer and the platform firmware to exchange power management command and status information for the purpose of power management control. Alternatively, instead of being in system memory, the shared memory region can be memory located in other components of a system, such as memory in I/O (input/output) devices that are mapped into memory space.
Although this discussion refers to providing the management communication channel between a software layer and platform firmware, note that the management communication channel can more generally be provided between a software layer and a platform layer, where “platform layer” can refer to firmware and/or hardware.
The platform firmware 104 includes BIOS code 116. The BIOS code 116 includes a power management engine 118 that is able to perform power management tasks with respect to the hardware 114. The platform firmware 104 also includes other firmware code 120 to perform other tasks, such as system health-related tasks, and so forth.
The hardware 114 of the computer system includes various components, including one or more processors 122, input/output (I/O) devices 124 (e.g., video subsystem, network interface controller, etc.), and storage devices 126. The storage devices 126 can include persistent storage devices such as disk-based storage devices (magnetic or optical disk-based storage devices) and volatile memory devices such as random access memory devices (e.g., dynamic random access memories, static random access memories, and so forth).
In some embodiments, the management communication channel 100 that provides the abstract interface between the software layer 102 and the platform firmware 104 for the purposes of exchanging power management information (commands and status) can be a shared memory region that is an allocated region within a memory device of the storage devices 126. In other embodiments, other types of management communication channels can be employed.
Also shown in
The power management control that can be performed in the computer system using the management communication channel 100 can include control of clock frequency of hardware devices, such as the processor(s) 122. Increasing the clock frequency of the processor 122 increases power consumption by the processor 122 and its performance, while decreasing the clock frequency of a processor reduces its power consumption and its performance. More generally, the power management control is to change a performance characteristic of the processor(s) 122, which is based on one or both of the processor clock frequency or voltage level. In other embodiments, other types of power management control can be performed using the management communication channel 100, such as changing power voltage levels supplied to hardware devices, and other tasks. As yet another alternative, the clock frequency of the processor 122 can be varied for thermal management purposes (e.g. the clock frequency is reduced in response to an elevated temperature in the computer system).
In addition to allowing the software layer 102 to issue commands to the platform firmware 104 to perform power management control, the management communication channel 100 also allows for the software layer 102 to obtain information regarding the hardware 114, such as to obtain a status or setting relating to power management of the hardware 114. In one specific example, a setting of the hardware 114 that can be retrieved by the software layer 102 through the management communication channel 100 is the clock frequency of the processor 122. Other settings can be obtained in other embodiments, including clock frequencies of other hardware devices, power voltage levels of hardware devices, and so forth.
In some implementations, an alert mechanism can be provided by the management communication channel 100 for providing alerts between the software layer 102 and the platform firmware 104. For example, the software layer 102 can send an alert that a command has been sent through the management communication channel 100, or the platform firmware 104 can send an alert that a command has been executed. The alert can be provided by using an interrupt or some other type of event.
In the example of
Another element in the header 202 is a command field 210 in which one of multiple power management commands can be inserted by the software layer 102 to perform a corresponding action. Examples of commands that can be provided in the command field 210 include a command to obtain a processor clock frequency, such as an average clock frequency of the processor. This command is a query to obtain the running frequency of the processor since the last time the command was last completed. The return value of the command to obtain the average frequency is a ratio of the running frequency to a nominal processor frequency (where the nominal processor frequency is a predefined nominal frequency of the processor). In other implementations, other manners of recording the frequency of the processor can be provided.
Another command is a command to set a target clock frequency of a processor. In some implementations, the target clock frequency can be in the form of a ratio (ratio of the target clock frequency to the nominal frequency of the processor).
Another element of the header 202 is a status field 212, which provides an indication of a status of a previously issued command.
The shared memory region 100 also includes additional sub-regions for respective hardware components. For example, in a computer system having multiple processors 122, corresponding sub-regions (e.g., 204 and 206 shown in
The sub-region 204 includes an input buffer 214 and an output buffer 216. The input buffer 214 can be populated with information that corresponds to the command entered in the command field 210 of the header 202. For example, if the command is to set a target processor frequency of the first processor, then the input buffer 214 can be populated with the target processor frequency. Other control information can also be provided in the input buffer 214.
The sub-region 204 also includes an output buffer 216, which contains information populated by the platform firmware 104. For example, if the software layer 102 submitted a command to retrieve the clock frequency of the first processor, then the output buffer 216 is filled with the clock frequency value. Other information can also be provided in the output buffer 216.
The sub-region 206 for the second processor similarly includes an input buffer 218 and output buffer 220.
In response to the received indication, the software layer 102 generates (at 304) a power management command. The power management command can be a command to change a power management setting of the hardware 114 (
The command is then issued (at 306) to the management communication channel 100 (
The power management command issued to the management communication channel 100 is received by the platform firmware 104, which processes (at 308) the command and effects action in response to the command, which can involve accessing the hardware 114.
The platform firmware 104 sends (at 308) a response through the management communication channel 100 to the software layer 102. The software layer 102 can monitor the status field 212 and/or output buffer 216 or 220 of the shared memory region 100 of
In the manner described above, the power management module (power management driver 110 or power management module 112) of the software layer 102 can collaborate with the power management engine 118 of the platform firmware 104 (
The above has described an embodiment in which the software layer 102 performs power management control with respect to hardware 114. In a different embodiment, as shown in
This computer system of
The software layer 102A is able to issue hardware management commands through the management communication channel 100 to the platform firmware 104A to either adjust a setting of the hardware 114 or to obtain information of the hardware 114.
Instructions of software and/or firmware described above (including software layer 102 or 102A and platform firmware 104 or 104A of
Data and instructions (of the software) are stored in respective storage devices, which are implemented as one or more computer-readable or computer-usable storage media. The storage media include different forms of memory including semiconductor memory devices such as dynamic or static random access memories (DRAMs or SRAMs), erasable and programmable read-only memories (EPROMs), electrically erasable and programmable read-only memories (EEPROMs) and flash memories; magnetic disks such as fixed, floppy and removable disks; other magnetic media including tape; and optical media such as compact disks (CDs) or digital video disks (DVDs). Note that the instructions of the software discussed above can be provided on one computer-readable or computer-usable storage medium, or alternatively, can be provided on multiple computer-readable or computer-usable storage media distributed in a large system having possibly plural nodes. Such computer-readable or computer-usable storage medium or media is (are) considered to be part of an article (or article of manufacture). An article or article of manufacture can refer to any manufactured single component or multiple components.
In the foregoing description, numerous details are set forth to provide an understanding of the present invention. However, it will be understood by those skilled in the art that the present invention may be practiced without these details. While the invention has been disclosed with respect to a limited number of embodiments, those skilled in the art will appreciate numerous modifications and variations therefrom. It is intended that the appended claims cover such modifications and variations as fall within the true spirit and scope of the invention.