The present invention relates generally to computer systems.
A computer system may include one or more central processing units and one or more memory modules. A memory module comprises one or more memory integrated circuits (“chips”). A memory chip may comprise volatile memory (e.g., dynamic random access memory (DRAM)), non-volatile memory (e.g., flash memory), or both. Volatile memory loses its contents when the computer system's power is interrupted. In contrast, non-volatile memory keeps its contents even in the absence of system power. Generally speaking, volatile memory is faster than non-volatile memory and is thus preferred as main memory for processes of the operating system, application programs, etc. Currently-available computer systems typically employ dual in-line memory modules (DIMMs), which comprise volatile memory, for main memory.
Unlike a DIMM, a non-volatile DIMM (NVDIMM) comprises both volatile memory to provide fast access speeds and non-volatile memory as insurance against power failure. More particularly, in an NVDIMM, the contents of the volatile memory is stored in the non-volatile memory in an asynchronous DRAM refresh (ADR) cycle in the event of a power failure but not when the system is gracefully shut down.
In one embodiment, a graceful shutdown of a computer system is initiated by sending a command to an asynchronous dynamic random access memory refresh (ADR) trigger device to assert an ADR trigger. Responsive to the command, the ADR trigger device asserts the ADR trigger to initiate an ADR of a non-volatile dual in-line memory module (NVDIMM) of the computer system. In response to the ADR trigger being asserted by the ADR trigger device, an ADR of the NVDIMM is performed before completing the graceful shutdown of the computer. The ADR trigger device may be a baseboard management controller (BMC) or an original equipment manufacturer (OEM) logic device. The ADR trigger may be activation of a power button. For example, the BMC or OEM logic device may assert a power button signal on a power button pin of a peripheral controller hub (PCH) to initiate the ADR. The BMC or OEM logic device may assert the power button signal in response to receiving an OEM command.
These and other features of the present invention will be readily apparent to persons of ordinary skill in the art upon reading the entirety of this disclosure, which includes the accompanying drawings and claims.
The use of the same reference label in different drawings indicates the same or like components.
In the present disclosure, numerous specific details are provided, such as examples of systems, components, and methods, to provide a thorough understanding of embodiments of the invention. Persons of ordinary skill in the art will recognize, however, that the invention can be practiced without one or more of the specific details. In other instances, well-known details are not shown or described to avoid obscuring aspects of the invention.
In the example of
An original equipment manufacturer (OEM), such as the SUPER MICRO COMPUTER, INC. of San Jose, Calif., employs components from computer chip vendors to design and manufacture a computer system. The OEM may design-in additional functionality that may be unique to the OEM or its customers. In the example of
The PCH 140 is configured to provide peripheral device (e.g., keyboard, mouse, display, disk) interface for the CPU 130. In one embodiment, the PCH 140 comprises an INTEL PCH chip.
The BMC 170 is configured to monitor sensor signals indicative of the environmental condition of the computer system 100 (e.g., fan speed, temperature) and to receive external inputs (e.g., power button, serial port). In one embodiment, the BMC 170 comprises an INTEL BMC chip. In the example of
The computer system 100 includes a basic input/output system (BIOS) 161. The BIOS 161, also referred to as “system firmware,” may include code (i.e., computer instructions) for initializing and booting the computer system 100 to run the operating system 162. The BIOS 161 may also include the Advanced Configuration and Power Interface (ACPI) code, which is also known as the “ACPI ASL code.” The BIOS 161 may be implemented on programmable non-volatile memory, for example. In one embodiment, the BIOS 161 includes code for configuring the computer system 100 to perform an ADR of the NVDIMM 120 in the event of a graceful shutdown.
The computer system 100 includes a power supply unit 160 that provides power to the system. The power supply unit 160 generates a POWER_OK signal to indicate that the power supply unit 160 is able to provide adequate power to support the operation of the computer system 100. The POWER_OK signal is withdrawn in the event of a power failure, e.g., brownout, AC power cord removal, malfunction, etc. (
A power failure is an example of a hard shutdown, which is unplanned and is thus not expected by the computer system 100. Hard shutdowns are generally avoided because they can lead to data loss. In marked contrast, a graceful shutdown is an orderly shutdown, which allows the operating system 162 (e.g., MICROSOFT WINDOWS operating system, LINUX operating system) to prepare the computer system 100 (e.g., save data) before the computer system 100 is shut down.
A graceful shutdown may be initiated by invoking the shutdown procedure of the operating system 162. For example, a user may initiate graceful shutdown by selecting system shutdown from a menu provided by the operating system 162. This results in the operating system 162 (e.g., a driver of the operating system 162) being notified of the graceful shutdown. In response, the operating system 162 may call an ACPI_PTS (Prepare to Sleep) function in accordance with ACPI specification to prepare the computer system 100 to go in sleep state. In response, the BIOS 161, which provides the ACPI ASL code support, runs the ACPI_PTS function to prepare the computer system 100 to go to sleep. Thereafter, the operating system 162 writes to the power management control register (PM1_CNT) to configure the computer system 100 to go in the soft off state, which is state S5 in the ACPI specification (PM1_CNT.SLP_TYP to 5, with “5” indicating state S5). The operating system 162 then writes to the power management control register to put the system in the soft off state (PM1_CNT.SLP_EN). Under the ACPI specification, in the soft off state, the computer system 100 powers off all devices and the operating system 162 does not save any context. The computer system 100 thus needs a complete reboot to wake up. The just-described graceful shutdown procedure places the computer system 100 in the soft off state, but does not perform an ADR to save the contents of the volatile memory 121 to the non-volatile memory 122 before going to the soft off state.
In one embodiment, the method 200 is a computer-implemented method that is performed when the computer system 100 is to perform a graceful shutdown (
In one embodiment, the BIOS 161 includes code that enables IO trapping of power management control, such as by enabling PM1_CNT IO trap, where PM1_CNT is a power management control register of the PCH 140 (
The operating system 162 writes to the power management control register to place the computer system 100 in the soft off state, such as by writing 5 (to indicate state S5) to PM1_CNT.SLP_TYP (
In one embodiment, the OEM command is a unique command that is recognized by the graceful shutdown ADR trigger device to assert the assigned ADR trigger. The graceful shutdown ADR trigger device may be the OEM logic device 150, the BMC 170, or some other device. In response to receiving the OEM command (
In one embodiment, the assigned ADR trigger is power button activation. In that case, in response to receiving the OEM command, the OEM logic device 150 or the BMC 170 triggers an ADR by asserting the power button signal (to simulate power button activation) for a predetermined amount of time to trigger an ADR of the NVDIMM 120. For example, to trigger an ADR, the OEM logic device 150 or the BMC 150 may assert the PWRBTN# pin of the PCH 140 for 4 seconds or longer. In another embodiment, in response to receiving the OEM command, the OEM logic device 150 or the BMC 170 triggers an ADR by asserting the ADR_TRIGGER pin of the PCH 140 and thereafter turn OFF the power to shutdown the computer system 100. Other ways of triggering an ADR may also be performed by the designated graceful shutdown ADR trigger device without detracting from the merits of the present invention.
In response to receiving the ADR trigger, the PCH 140 initiates the ADR to copy the contents of the volatile memory 121 to the non-volatile memory 122 and put the system into ACPI S5 state (
While specific embodiments of the present invention have been provided, it is to be understood that these embodiments are for illustration purposes and not limiting. Many additional embodiments will be apparent to persons of ordinary skill in the art reading this disclosure.
This application claims the benefit of U.S. Provisional Application No. 62/359,934, filed Jul. 8, 2016, which is incorporated herein by reference in its entirety.
Number | Date | Country | |
---|---|---|---|
62359934 | Jul 2016 | US |