A computing device may comprise a processor. The processor may access instructions from memory
The following detailed description references the drawings, wherein:
When a processor is reset, the processor accesses a default address. This default address is referred to as a “reset vector.” The address of the reset vector is stores a fixed (immutable) address in nearly every commercially-available processor. However, with non-volatile memory becoming more prevalent, having multiple, programmable, reset vectors may be advantageous, as a processor may be able to more-quickly boot a system from data (e.g. state data) stored on the non-volatile memory. As another example, being able to select and boot from another reset vector may be imperative if data is stored in battery-backed memory, such as a non-volatile dynamic inline memory module (NVDIMM) to quickly copy data from the battery-backed memory to non-volatile memory.
In some examples, the processor itself may select between the address of the first reset vector and a second address associated with a second reset vector. In some examples, the processor or a baseboard management controller (BMC) may select the proper reset vector, e.g. based on information about the system that is available to the BMC. In some examples, the address of the second reset vector may be located on non-volatile storage, such as re-writeable flash storage. In various examples, the address associated with the second reset vector may refer to network storage, remote storage, or any type of storage accessible to the processor. In various examples, the processor may access the address of a first reset vector upon an initial boot, and responsive to a reset (i.e. as opposed to a power cycle), the processor may access a second address of a second reset vector. A processor that has failed to boot, e.g. from the second reset vector, may revert back to the first reset vector.
Having multiple reset vectors may also be helpful in the event of a hardware failure. In such examples, a baseboard management controller may change the address of the reset vector, e.g. to point to a different address than the address of the default reset vector. The second reset vector may point to an area of memory that has instructions or routines for better handling or diagnosing certain types of errors or failures. In some examples, a user or software may specify whether the second reset vector is to be selected.
Processor 104 is coupled to memory 102. In the example of
Various address ranges of memory 102 may be mapped to different devices and/or memory types. As examples, a first address range may be mapped to an area of basic input output system (BIOS) ROM. The ROM may, for example, be located on a southbridge, or a BMC. The BMC or southbridge may be indirectly coupled to the processor by way of a northbridge. A second address range may be mapped to non-volatile memory, e.g. non-volatile memory of a non-volatile dynamic inline memory module (NVDIMM).
In the example of
In general, upon being reset (either power cycled or soft-reset), a processor, such as processor 104 accesses data from a “reset vector.” A reset vector is the default location from which a processor, such as processor 104, accesses to find the first instruction that processor 104 is to execute after the reset. As an example, for x86 processors from the 386 or later generations, the processor reads from hexadecimal physical memory address # FFFFFFF0h (16 bytes below 4 GB).
The reset vector can be thought of as a pointer that stores a memory address. At boot or reset, the processor accesses instruction stored at the address associated with the reset vector. Typically, the address associated with the reset vector is fixed, and typically points to an address that is mapped to ROM, such as BIOS ROM or the like. The processor cannot change the address associated with the first reset vector.
It may be advantageous however, to have more than one reset vector, and for reset vectors to be programmable. A processor in accordance with this disclosure may have a programmable first reset vector, and may have multiple reset vectors. As examples, if a system component fails, it may be advantageous to boot from a different memory address comprising instructions for dealing with diagnosis, troubleshooting, or repair of the failed components. As another example, if a system is equipped with an NVDIMM comprising battery-backed volatile memory storing data that has yet to be persisted, it may be advantageous or important to quickly execute instructions that cause the stored data to be persisted to non-volatile storage. Additional examples of having multiple reset vectors will be described in greater detail herein.
In the example of
For various reasons, processor 104 may be reset. As examples, processor 104 may be reset in the event of an operating system (OS) crash, a component failure, or the like. In the event that processor 104 is reset, processor 104 may boot system 100 by accessing second address second associated with reset vector 108.
BMC 102 may provide so-called lights-out functionality for a computing device. Lights out functionality allows a user connected to the BMC (typically using a network connection) to perform management operations on the computing device. Such management operations may comprise: power cycling the computing device, mounting media, obtaining log information, and the like.
Thus, system 100 of
In the example of
In the example of
In the example of
Processor 104 may access the instructions at the address associated with first reset vector 106 responsive to a cold boot, and may access second reset vector 108 responsive to a warm boot in various examples. A warm boot may comprise a boot or a reset that occurs without interrupting system power, e.g. responsive to detecting a hardware failure, a system-initiated restart.
In the example of
In various examples, a user may choose wish to cause processor 104 to boot from second reset vector 108. To indicate that processor 104 should boot from second reset vector 108, a user may set a value in software, BIOS, a register, or the like. In some examples, processor 104 may bootstrap from a first address that indicates that processor 104 should boot from the second reset vector.
Processor 104 or BMC 204 may select the address to which second reset vector 108 refers based on the determined cause of the warm boot. As an example, if processor 104 determines that a machine check exception (MCE) was asserted, processor 104 may change second reset vector 108 to refer to an address having instructions for performing error recovery or system diagnostics.
In some other examples, processor 104, BMC 204 may modify the instructions at third address 202, to which second reset vector 108 refers. Processor 104 may modify the instructions at third address 202, e.g. based on the determined reason that processor 104 was rebooted. As examples, third address 202 may refer to a region of non-volatile storage, such as NAND flash, EEPROM, or the like.
In yet other examples, the address referred to by a reset vector may be located on secure storage, for example a memory address that is encrypted or a memory address of a trusted platform module (TPM). By booting from secured storage as opposed to modifiable storage, more secure operation of computing system 200 may be ensured.
In various examples, first reset vector may act as a fail-safe reset vector in the event that there is an issue in booting from second reset vector 108. In some examples, processor 104 may revert from booting based on second reset vector 108 to booting from first reset vector 106. In some examples, processor 104 may revert to booting from first reset vector 106 if, e.g. a cache, such as cache 206, is no longer valid and should not be booted from. In various examples, processor 104 may boot from first reset vector 106 responsive to a selection by a user or software. In some examples, processor 104 may revert to booting based on first reset vector 106 based on the presence of a value, e.g. a set bit in a register. In some examples, processor 104 may determine to revert to booting from first reset vector 106 if processor 104 determines that a boot failure occurred.
As examples, processor 104, BMC 204, or the like may determine that a boot failure occurred if processor 104 encounters an invalid opcode from the instructions fetched from the address associated with second reset vector 108. In other examples, processor 104 or BMC 204 may set at timer. Upon determining that the timer has expired and processor 104 is, for example, not making progress, or processor 104 has failed to fully boot, processor 104 or BMC 204 may determine that there was a boot failure.
In the example of
At some time, processor 104 may be power cycled (e.g. reset). As examples, processor 104 may be reset responsive to a software crash, such as an OS crash, or a hardware fault. Responsive to being reset, processor 104 may access second address 112 associated with second reset vector 108.
In the example of
In various examples, processor 104 may access the instructions from second address 112 responsive to a warm boot. A warm boot may comprise a boot that occurs without interrupting system power, e.g. responsive to detecting a hardware failure, a system-initiated restart. Responsive to a warm boot, processor 104 accesses the instructions stored at second address 112.
In various examples, processor 104 may determine whether data 302 is stored in an area of memory that is not permanently non-volatile, e.g. whether data 302 is stored in a battery-backed NVDIMM, and whether data 302 has been written to non-volatile storage, e.g. non-volatile storage 302. Responsive to determining that data 302 has not been written to non-volatile storage 302, processor 104, a BMC, or another device or logic may cause processor 104 to access second reset vector 108. Second reset vector may cause processor 104 to write data 302 to non-volatile storage 304. In various examples, second reset vector 108 may cause processor 104 to write data 302 to non-volatile storage 304 before booting an operating system.
In various examples, processor 104 may determine that data 302 has been written to non-volatile storage 304. Responsive to determining that data 302 has been written to non-volatile storage 304, processor 304 may still access second reset vector 108. However, reset vector 108 may not cause data 302 to be written to non-volatile storage 304 before booting an operating system.
Alternatively or in addition, method 400 may be implemented in the form of electronic circuitry (e.g., hardware). In alternate examples of the present disclosure, one or more blocks of method 400 may be executed substantially concurrently or in a different order than shown in
Method 400 may start at block 402. Block 402 may comprise receiving, by a baseboard management controller (BMC), a request to modify a service OS, wherein the service OS is stored on non-volatile storage coupled to the BMC, and wherein the request comprises a signature. At block 404, the method may comprise determining, accessing, by a processor, a first reset vector, wherein the first vector is associated with a first fixed address of memory. At block 406, the method may comprise: responsive to the processor being reset, accessing, with the processor, a second reset vector, wherein the second reset vector is associated with a second, different address.
Alternatively or in addition, method 500 may be implemented in the form of electronic circuitry (e.g., hardware). In alternate examples of the present disclosure, one or more blocks of method 500 may be executed substantially concurrently or in a different order than shown in
Method 500 may start at block 502. Block 502 may comprise accessing, by a processor, a first reset vector, wherein the first vector is associated with a first fixed address of memory. At block 504, the method may comprise determining a reason that the processor was reset.
At block 506, the method may comprise determining that data is stored in the memory and the data has not been written to non-volatile storage. At block 508, responsive to the processor being reset the method may comprise accessing, with the processor, a second reset vector, wherein the second reset vector is associated with a second, different address. In various examples, access the second address may be based on the determined reason for resetting the processor.
At block 510, to access the second reset vector, the method comprises: writing the data to the non-volatile storage. At block 512, the method may comprise changing the second address associated with the second reset vector to a third address. In various examples, changing the second address may be performed by the processor or the BMC.
At block 512, the method may comprise: determining, by the processor, that an attempt to boot from the second reset vector failed. Responsive to determining that the attempt to boot from the second reset vector failed, at block 516, processor 104 may attempt to boot from the first reset vector.
Storage medium 620 is non-transitory in various examples. Although the following descriptions refer to a single processor and a single machine-readable storage medium, the descriptions may also apply to a system with multiple processors and multiple machine-readable storage mediums. In such examples, the instructions may be distributed (e.g., stored) across multiple machine-readable storage mediums and the instructions may be distributed (e.g., executed by) across multiple processors.
Processor 610 may be one or more central processing units (CPUs), microprocessors, and/or other hardware devices suitable for retrieval and execution of instructions stored in machine-readable storage medium 620. In the particular examples shown in
Machine-readable storage medium 620 may be any electronic, magnetic, optical, or other physical storage device that stores executable instructions. Thus, machine-readable storage medium 620 may be, for example, Random Access Memory (RAM), an Electrically-Erasable Programmable Read-Only Memory (EEPROM), a storage drive, an optical disc, and the like. Machine-readable storage medium 620 may be disposed within system 600, as shown in
Referring to
Access second vector instructions instructions 624, when executed, may cause processor 610 to, responsive to the processor being reset, access a second reset vector, wherein the second reset vector is associated with a second, different address.
Storage medium 720 is non-transitory in various examples. Although the following descriptions refer to a single processor and a single machine-readable storage medium, the descriptions may also apply to a system with multiple processors and multiple machine-readable storage mediums. In such examples, the instructions may be distributed (e.g., stored) across multiple machine-readable storage mediums and the instructions may be distributed (e.g., executed by) across multiple processors.
Processor 710 may be one or more central processing units (CPUs), microprocessors, and/or other hardware devices suitable for retrieval and execution of instructions stored in machine-readable storage medium 720. In the particular examples shown in
Machine-readable storage medium 720 may be any electronic, magnetic, optical, or other physical storage device that stores executable instructions. Thus, machine-readable storage medium 720 may be, for example, Random Access Memory (RAM), an Electrically-Erasable Programmable Read-Only Memory (EEPROM), a storage drive, an optical disc, and the like. Machine-readable storage medium 720 may be disposed within system 700, as shown in
Referring to
Determine reset reason instructions 724, when executed, may cause processor 710 to determine a reason that the processor was reset. Allow write data to NVM instructions 726, when executed, may cause processor 710 to, write data from the memory to non-volatile storage.
Access second vector instructions 728, when executed, may cause processor 710 to access a second reset vector, wherein the second reset vector is associated with a second, different address. In various examples, access second vector instructions, when executed, may comprise instructions that, when executed, cause processor 710 to access the second address based on the determined reason for resetting the processor.
Change second instructions 730, when executed, may cause at least one of the processor or a baseboard management controller (BMC) to change the second address associated with the second vector.