System, computer-implemented method, and computer program product
By generating and outputting module hash summaries and trace data in the BIOS, the problem of difficulty in providing error detection information during the startup process is solved, enabling fast startup and troubleshooting, and reducing computing system downtime.
Patent Information
- Application Number
- CN202011030464.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Priority Date
- 2020-03-27
- Filing Date
- 2020-09-27
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2040-09-27
AI Technical Summary
It is difficult for existing BIOS to provide detailed error detection information during the startup process without increasing the leakage of secret information, and the startup time is long, resulting in increased downtime of unavailable computing systems.
By introducing multiple modules in the BIOS, each module generates hash summaries and outputs these summaries to facilitate monitoring of the module's execution status. Use the hash map table for comparison to identify modules that have executed successfully or failed, and output when necessary. Trace data to aid troubleshooting and respond and recover quickly through priority interrupts and timer mechanisms.
It achieves providing detailed error detection information during the BIOS startup process without leaking secret information, while maintaining a fast startup time and reducing the downtime of the computing system.
Smart Images

Figure CN113448797B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates generally to the computer-related field, and more particularly to a firmware procedure for monitoring a computing system during startup, such as a Basic Input / Output System (BIOS). Background Art
[0002] Modern computing systems, such as those in server farms or data centers, utilize a Basic Input / Output System (BIOS) to support normal operations. The BIOS is a firmware that assists in the initialization and testing of computing system components, as well as performing other tasks while the computing system is running an operating system (OS). The inner workings of the BIOS can be an important and valuable trade secret for computing companies, but there is also a need to ensure that problems that occur during the boot process can be fully identified. A BIOS is needed that can provide appropriate debugging information without increasing the risk of unintentional disclosure. In addition, since the BIOS runs whenever the computing system is powered on, it is necessary to keep the boot time of the BIOS short to minimize any unavailable downtime of the computing system. Summary of the invention
[0003] The term embodiment and similar terms are intended to broadly refer to all objects of this specification and the following claims. It should be understood that statements containing these terms should not limit the objects described in this specification or limit the meaning or scope of the following claims. The embodiments of this specification covered here are defined by the following claims, not this summary of the invention. This summary of the invention is a high-level overview of various aspects of this specification, and introduces some concepts that will be further described in the following embodiments. This summary of the invention is not intended to identify the key or essential features of the requested target, nor is it intended to be used alone to determine the scope of the requested target. This target should be understood by reference to the entire specification of the present invention, any or all drawings, and the appropriate parts of each claim.
[0004] Embodiments of the present invention include systems, methods, and computer program products for accessing firmware. The firmware includes a plurality of modules, wherein each of the modules includes a code that facilitates operation of a computing system. The method may include: executing each of the modules. Executing one of the modules includes: generating a hash digest using the module; outputting the hash digest; and executing the code of the module.
[0005] The system includes one or more processors and a non-transitory computer-readable storage medium. The non-transitory computer-readable storage medium includes a plurality of instructions, which, when executed on the one or more processors, cause the one or more processors to perform a plurality of the methods. The computer program product may be tangibly embodied in a non-transitory machine-readable storage medium, including a plurality of instructions. The instructions are configured to cause a data processing device to perform the methods.
[0006] In some examples, running one of the plurality of modules further comprises: selecting a protocol from a plurality of protocols of the module, wherein executing the code of the module comprises executing the code of the protocol; accessing a protocol globally unique identifier (GUID) associated with the selected protocol; and outputting the protocol globally unique identifier associated with the selected protocol. In some examples, outputting the hash digest comprises: appending the hash digest to a trace data file. In some examples, the method further comprises: receiving a priority interrupt signal; and in response to receiving the priority interrupt signal, outputting the trace data file. In some examples, the method further comprises: initializing a timer, wherein completion of the timer is associated with non-completion of at least one of the plurality of modules; and in response to completion of the timer, transmitting the priority interrupt signal. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] The description refers to the following drawings, in which like reference numerals are used in different drawings to indicate like or similar components.
[0008] Figure 1 A block diagram illustrating an environment for generating a mapping table for a firmware image file according to some embodiments of the present invention.
[0009] Figure 2 A block diagram showing a firmware sequence and its associated POST code and tracking data according to some embodiments of the present invention.
[0010] Figure 3 A flow chart illustrating a process for preparing a firmware image file and its associated mapping table according to some embodiments of the present invention.
[0011] Figure 4 A flow chart showing a process for using a firmware image file to generate tracing data according to some embodiments of the present invention.
[0012] Figure 5 A flow chart representing a process for decoding tracking data according to some embodiments of the present invention.
[0013] Figure 6 A flow chart illustrating a process for fail-safe export of trace data according to some embodiments of the present invention.
[0014] Figure 7 A flow chart illustrating a process for generating runtime tracing data during operating system runtime according to some embodiments of the invention.
[0015] Figure 8 A block diagram represents an example system architecture for implementing the features and processes of the present invention. DETAILED DESCRIPTION
[0016] Certain aspects and features of the present invention relate to generating and outputting tracing data during firmware execution to aid in debugging firmware problems without significantly slowing down the operation of the firmware and without potentially exposing secret information associated with the firmware. The firmware (e.g., BIOS) can output hash digests of various modules within the firmware, which can be compared to a pre-established mapping table to identify modules that completed successfully or unsuccessfully during firmware execution (e.g., during a boot procedure). The hash digest can be a one-way hash that can be executed quickly during operation of the firmware and hides the module's encoding from unauthorized reverse engineering.
[0017] When a computing system is powered on or otherwise initialized, a Power-On Self-Test (POST) routine is typically executed by the BIOS. The POST routine may involve the execution of multiple modules, each of which may be responsible for initializing and / or testing various components of the computing system. The BIOS may typically output a POST code through a known port (e.g., port 0x80) that may indicate whether the POST routine has passed certain major checkpoints (e.g., stages) in the POST routine. These POST codes may be monitored in real time or recorded for future review. Engineers can use the POST code sequence to understand which stage of the boot process is currently being executed, or the stage at which the boot process failed. The POST code is typically only one byte in size and is associated only with certain major checkpoints in the POST routine. Therefore, since the number of unique POST codes available is still limited, the POST code can only broadly indicate where a failure may occur, but cannot precisely identify in which module the error occurred.
[0018] In official BIOS versions such as those found on end-user devices, a fast boot process is required, so official BIOS versions provide minimal debugging information, such as only providing POST codes. However, Debug BIOS is a special purpose version of BIOS that is built by the engineers who developed the relevant BIOS and can output additional debugging information during the boot process of the BIOS. Debug BIOS can be specially built to output various debugging information during the boot process, so that engineers can accurately track what happened during the boot process and where errors occurred. Although such Debug BIOS may be very useful for internal engineers, it is not suitable for end users and third parties because the output debugging information may reveal confidential (e.g., trade secrets) information about the BIOS firmware, and the process of outputting so much debugging information may significantly slow down the boot process. Therefore, Debug BIOS is not suitable for use in any official version.
[0019] Although described with reference to BIOS during boot and operating system (OS) runtime, the techniques disclosed herein can be used with any suitable firmware. Certain aspects of the invention can be used with any suitable firmware interface (e.g., Unified Extensible Firmware Interface (UEFI)).
[0020] A firmware image file may include multiple modules. Each module may include coding suitable for a specific purpose, for example, to assist in the initialization and / or testing of various hardware associated with the computing system on which the firmware runs. The coding of each module, when executed, may facilitate the operation of the computing system, such as the startup of the computing system. A single module may include any number of functions (e.g., subroutines or methods) that are called or executed to perform various operations. In some cases, the coding from the modules may be organized into protocols. Each protocol may contain coding dedicated to a specific computing environment, which is executed only when the firmware is running in that specific computing environment. Therefore, although a single module may be associated with a specific task, it may contain different protocols, and these protocols may contain slightly different coding to complete the task in different computing environments. For example, a single module of firmware may contain a first protocol that can be used in a first computing environment and a second protocol that can be used in a different second computing environment. Therefore, when executing a specific module, a single firmware image file may execute different coding depending on which protocol is being used for the computing environment in which the firmware image file is executed. A globally unique identifier (GUID) may be assigned to each protocol. Optionally, modules can be organized in various stages. In the POST routine, different POST codes are associated with different stages. Therefore, a POST code can indicate a specific group of modules, rather than indicating any specific module.
[0021] As disclosed herein, the encoding of the firmware image file may include tracking data encoding designed to output tracking data. This tracking data encoding may be included in some or all modules of the firmware, or may exist in a separate module. The tracking data encoding may output a hash digest associated with one or more modules being executed. The hash digest may be output separately, may be stored as a tracking data file, or may be appended to an existing tracking data file. As used herein, the term "output" may refer to output via a port (e.g., a serial port), recording to a file, storing in a memory, or otherwise facilitating the transmission of data (e.g., a hash digest) to a user. Tracking data (e.g., a hash digest and / or a protocol globally unique identifier as described herein) may be stored in any suitable location, such as in a baseboard management controller, system memory, or other built-in flash memory.
[0022] When the firmware disclosed herein is first constructed, it can be constructed to include the tracking data encoding. Before compiling the firmware, for example, before compiling the firmware into a formal version, the firmware can be used to generate a mapping table. The mapping table can map the module information with the hash summary of the module. For each module, the module can be passed through a hash function to generate a hash summary. The hash summary can be associated with the module information of the module in the mapping table. The mapping table can be retained by the builder of the firmware to maintain the confidentiality of the mapping of the hash summary to the module information. The module information can be any desired information associated with the module, including the original encoding, pseudo encoding, description, title, name, module identification, or any other such information.
[0023] In some examples, a hash map may be generated as part of compiling a firmware image file, but this is not limited to this example. When generating a hash digest, any suitable hashing algorithm may be used. In some cases, a hash algorithm selected from a set of hash algorithms may be used. For example, a hash algorithm may be selected from a set of hash algorithms based on the ability to quickly encode a firmware module. In some cases, a hash algorithm may be selected based on a hash algorithm pre-programmed into the firmware encoding.
[0024] Generating a hash digest may include passing an entire module or a portion of a module through a hash function. The hash digest may be based on hashing a portion of a firmware image file associated with the particular module (e.g., post-compilation encoding). In some cases, a hash digest is generated by passing a bitstream associated with a particular module (e.g., a bitstream obtained by compiling the firmware) through a hash function, and then the resulting hash digest is stored in a hash map associated with an indicator of the particular module (e.g., in the same record as the indicator of the particular module). Thus, when the firmware is compiled by a compiler, the output bitstream may be passed through a hash function to generate a hash digest associated with different aspects of the firmware encoding. In some cases, a hash digest will be generated for each module of the firmware. In some cases, a hash digest may be generated for each function of the firmware. In some cases, a hash digest may be generated for each stage of the firmware. In some cases, multiple hash digests may be generated for different units (e.g., modules and / or functions) of the firmware, such as modules and / or function groups.
[0025] In some cases, each module may include one or more protocols. Each protocol may have a GUID. When a mapping table is generated, one or more protocol GUIDs may be stored in the mapping table.
[0026] In use, whenever the firmware is executed, the firmware generates a hash digest in real time for each module being executed. The hash digest can be output (e.g., saved or otherwise transmitted as tracking data). When the system is operating normally, the firmware will operate at almost the same speed as the previous official version, although it will output various hash digests. The output of all hash digests can indicate that the firmware has executed successfully. However, if the system stops outputting hash digests prematurely, or if there are errors in the output of hash digests (e.g., unexpected repetitions or digest errors), it may indicate that an error occurred during the execution of the firmware. More specifically, a mapping table can be used to analyze the output hash digests to accurately determine which modules may have failed.
[0027] In addition to operating during boot, in some cases, certain aspects of the present invention can be used to output tracking data during operating system (OS) runtime. OS runtime is the portion of firmware that is executing while the OS is running. In some cases, a System Management Interrupt (SMI) may be triggered, which may result in the execution of certain firmware code associated with System Management Mode (SMM). The firmware may execute the SMM code and output tracking data associated with the SMM code (e.g., runtime tracking data). If desired, the runtime tracking data may be stored in the same location or in a different location with other tracking data (e.g., boot tracking data).
[0028] In some cases, a priority interrupt may be used to initiate the output of trace data. Using a priority interrupt to initialize the output of trace data is particularly useful for diagnosing and removing errors that cause the system to stall or stop. In some cases, a watchdog timer may be started to monitor the POST code sequence being output, so that if the expected POST code is not output before the timer expires, a priority interrupt command may be sent to initiate the output of trace data. In some cases, if the Baseboard Management Controller (BMC) does not receive the required POST code sequence, the BMC may be used to monitor the POST code sequence being output and output a priority interrupt command to initiate the output of trace data. In some cases, the firmware (e.g., BIOS) may start a timer to monitor the eXecute In Place (XIP) buffer of the Central Processing Unit (CPU). When the CPU executes a different code segment, the XIP buffer will be updated to point to the code segment currently being executed. Therefore, if the XIP buffer fails to update, appears to point to an incorrect code segment, or continues to point to the same set of code segments in a repeating loop, it can be assumed that the system has stalled or is in an endless loop. Therefore, if the timer monitoring the XIP buffer expires without updating the XIP buffer or updating the XIP buffer to a specific code segment (e.g., a new code segment or a specific expected code segment), it can be determined if the system is in a stalled state or in an endless loop, and appropriate measures can be taken, such as sending a priority interrupt command to initiate the output of trace data. When a priority interrupt is received, the execution of the firmware can be reset to a specific code segment, such as the trace data encoding. Executing the specific code segment may result in the output of trace data, optionally including an event record associated with the priority interrupt command. After the trace data is output, the system can be allowed to restart, or the execution of the firmware can be directed to a specific module or code segment (e.g., a module being executed before the error, or a module that follows the module being executed before the error).
[0029] These examples are presented here for illustration to introduce the reader to the general subject matter discussed herein and are not intended to limit the scope of the disclosed concepts. The following sections describe various additional features and examples with reference to the accompanying drawings, in which like numbers indicate similar components, and the embodiments are conceptually described for illustration, but, similar to the embodiments for illustration, should not be used to limit the present invention. The components included in the drawings herein may not be drawn to scale.
[0030] Figure 11 is a block diagram of an environment 100 for generating a mapping table 110 of a firmware image file 102 according to some embodiments of the present invention. The firmware image file 102 can be any suitable firmware image file stored in any suitable location, such as a BIOS stored in a read-only memory chip of a computing system. The firmware image file 102 can include N different modules, such as an A module 104, a B module 106, and up to an N module 108. Any number of modules can be used. Each module can include code that, when executed by one or more processes, facilitates the startup and / or operation of a computing system.
[0031] The firmware image file 102 may be associated with a mapping table 110. The mapping table 110 may be generated when the firmware image file 102 is compiled. The mapping table 110 includes N module information entries associated with a module hash digest. For example, the mapping table 110 may include A module information 114 associated with A module hash digest 124, which is a hash digest of the A module 104 of the firmware image file 102. Similarly, the mapping table 110 may include B module information 116 associated with B module hash digest 126, which is a hash digest of the B module 106 of the firmware image file 102. Similarly, the mapping table 110 may include N module information 118 associated with N module hash digest 128, which is a hash digest of the N module 108 of the firmware image file 102.
[0032] Thus, by receiving a hash digest based on one of the module blocks 104 , 106 , 108 of the firmware image file 102 , the mapping table 110 may be used to identify the module information 114 , 116 , 118 associated with the received hash digest 124 , 126 , 128 .
[0033] Figure 2 Table 2 is a block diagram of a firmware sequence 220 and associated POST codes 222 and tracking data 224 according to some embodiments of the present invention. The firmware sequence 220 can be a sequence of modules for any suitable firmware (e.g., boot BIOS). The firmware sequence 220 can include several stages, such as POST start 226, stage A 228, stage B 230, stage C 232, stage D 234, POST end 236, and OS runtime 238, however, combinations of the aforementioned stages with other stages can be used. Each stage can include any number of modules, each module having a code associated with the stage of the module. During the execution of the firmware sequence 220, one or more processors can execute each module of the sequence 220 in sequence. Whenever certain stages start or complete, the firmware can output the associated POST code, such as the code "0x30" for stage C 232 and the code "0x60" for OS runtime 238.
[0034] like Figure 2 As shown, the firmware sequence 220 includes the following modules, however, other modules may be used: A module 240, B module 241, C module 242, D module 243, E module 244, F module 245, G module 246, H module 247, I module 248, J module 249, K module 250, L module 251, M module 252, N module 253, O module 254, P module 255, Q module 256, R module 257, S module 258, and T module 259. These modules are modules split into in stages 226, 228, 230, 232, 234, 236, 238 of the firmware sequence.
[0035] As described herein, the firmware may be caused to output tracking data associated with each module. For example, A module hash digest 260 is associated with A module 240, B module hash digest 261 is associated with B module 241, C module hash digest 262 is associated with C module 242, D module hash digest 263 is associated with D module 243, E module hash digest 264 is associated with E module 244, F module hash digest 265 is associated with F module 245, G module hash digest 266 is associated with G module 246, H module hash digest 267 is associated with H module 247, I module hash digest 268 is associated with I module 248, and J module hash digest 269 is associated with J module 249. 250, K module hash digest 270 is associated with K module 250, L module hash digest 271 is associated with L module 251, M module hash digest 272 is associated with M module 252, N module hash digest 273 is associated with N module 253, O module hash digest 274 is associated with O module 254, P module hash digest 275 is associated with P module 255, Q module hash digest 276 is associated with Q module 256, R module hash digest 277 is associated with R module 257, S module hash digest 278 is associated with S module 258, and T module hash digest 279 is associated with T module 259. In some examples, tracking data 224 may include other information, such as a GUID associated with one or more protocol conventions accessed in one or more modules.
[0036] Thus, each time a particular module is called, executed, completed, suspended, or otherwise causes trace data to be output, the output trace data can be used to pinpoint the module that caused the problem. For example, in the example where a hash digest is output upon calling a module, if a system running firmware sequence 220 stalls after outputting A module hash digest 260, B module hash digest 261, C module hash digest 262, D module hash digest 263, E module hash digest 264, F module hash digest 265, G module hash digest 266, H module hash digest 267, and I module hash digest 268, it can be assumed that an error occurred while executing I module 248. In the absence of trace data 224, the only error indication may be a POST code 222 associated with stage C 232 or stage B 230 (e.g., "0x30" or "0x20," respectively). Additionally, if a protocol GUID is present in the trace data 224, the protocol GUID may be used to indicate which portion of the code (eg, which functions) in the module was last executed or was attempted to be executed when the problem occurred.
[0037] although Figure 2 A certain number of stages and modules are depicted, but it should be understood that any number of stages and modules may be used. Certain aspects of the invention become increasingly useful when the number of modules per stage exceeds one.
[0038] Figure 3 is a flow chart representing a process 300 for preparing a firmware image file and an associated mapping table according to some embodiments of the present invention. Process 300 may begin at step 302 with preparing firmware (e.g., BIOS) code. Preparing the code may include writing, composing, or otherwise obtaining the code. In some examples, preparing the firmware code at step 302 may include generating a tracking data code designed to output tracking data disclosed by the present invention. In some examples, preparing the firmware code at step 302 may include generating a code for outputting a hash digest of a module. In some examples, preparing the firmware code at step 302 may include selecting a hash algorithm. In some examples, preparing the firmware code at step 302 may include associating (e.g., assigning) a protocol GUID to each protocol.
[0039] At step 310, the firmware code may be compiled into a firmware image file (eg, Figure 1The firmware image file 102 of the firmware image file 102). Any suitable compiler or dedicated compiler can be used to perform the compilation of the firmware code. In some examples, compiling the firmware code at step 310 may include generating a hash map at step 304, but in some examples, generating the hash map at step 304 may be performed separately from compiling the firmware code at step 310. Compiling the firmware code at step 310 may include compiling the code to output a bitstream of the compiled firmware code. The bitstream may be used to generate the hash map at step 304.
[0040] Generating the hash map at step 304 may involve generating a map containing the hash digest and module information associated with the firmware-encoded module prepared at step 302 (eg, Figure 1 The generation of the hash map at step 304 may involve repeating steps 306 and 308 for each module of the firmware. At step 306, a hash digest may be generated from the module. Generating the hash digest at step 306 may include using a hash algorithm (e.g., the hash algorithm selected at step 302) on the bitstream data associated with the module for which the hash digest is being created. At step 308, the hash digest generated at step 306 may be associated with the module information of the module for which the hash digest is being created. The module information may be obtained directly from the firmware encoding prepared at step 302, but is not limited to this example.
[0041] After the firmware code has been compiled at step 310, the compiled firmware (eg, a firmware image file, such as Figure 1 The firmware image file 102) is written to a memory, such as a non-volatile read-only memory, however other memories may be used.
[0042] Figure 4 4 is a flow chart showing a process 400 for using a firmware image file to generate tracking data according to some embodiments of the present invention. The firmware image file may be Figure 1 The firmware image file 102. At step 402, the firmware (eg, BIOS) may be accessed.
[0043] At step 406, each module of the firmware may be run (e.g., executed). Running a module may include performing steps 412, 414, 416, and optionally steps 408, 410. At step 412, a hash digest is generated based on the module. The hash digest may be generated by passing a firmware image file associated with the module or a default portion of the module through a hash algorithm. At step 414, the hash digest may be output, as described herein. In some examples, the output hash digest may include a tracking data file 424 having the hash digest or the hash digest may be appended to the tracking data file 424. The tracking data file 424 may contain tracking data, such as Figure 2 Tracking data 224. At step 416, encoding of the module may be performed. In some examples, performing encoding of the module at step 416 may occur before generating and outputting the hash digest at steps 412 and 414, but is not limited to this example.
[0044] In optional step 408, a protocol GUID may be accessed. The protocol GUID may be output in step 410. In some examples, outputting the protocol GUID may include generating a trace data file 424 with the protocol GUID, or appending the protocol GUID to the trace data file 424.
[0045] In some examples, in optional step 420, a priority interrupt signal may be received. Based on receiving the priority interrupt signal at step 420, coding may be performed to output trace data (e.g., a trace data file) in optional step 422. The priority interrupt signal may be received from any suitable source. In some examples, the priority interrupt signal may be generated at optional step 418 in response to the elapse of a timer in optional step 404. The timer in step 404 may be initialized before running one or more modules of the firmware in step 406, and the timer in step 404 may be designed to be reset and / or canceled when the one or more modules running in step 406 are completed. Therefore, a failure to run one or more modules in step 406 may cause the timer to elapse, thereby starting to generate the priority interrupt signal in step 418.
[0046] In some examples, the protocol GUID may be output in step 410 and / or the hash digest may be output in step 414 (and optionally the hash digest may be generated in step 412) only in response to receiving the priority interrupt signal in step 420. In such examples, the trace data may not be generated until the priority interrupt signal is received. However, without limitation to this example, in some examples, the trace data may be received and / or output without receiving the priority interrupt signal in step 420.
[0047] Although the present invention describes steps 406, 412, 414, and 416 with respect to a specific module (e.g., running the module, generating a hash digest for the module, outputting the hash digest for the module, and executing encoding of the module), in some examples, the same steps (e.g., running the function, generating a hash digest for the function, outputting the hash digest for the function, and executing encoding of the function) may be performed alternatively or additionally with respect to a specific function within the module.
[0048] Figure 5 Flowchart showing a process 500 for decoding tracing data according to some embodiments of the present invention. At step 502, the firmware is executed. The execution of the firmware at step 502 may be successful or unsuccessful and may generate tracing data, such as Figure 2 Tracking data 224. In step 504, the tracking data (e.g., a tracking data file such as Figure 4 In step 506, a hash map is accessed. The hash map is associated with the firmware (e.g., Figure 1 The mapping table 110 and the firmware image file 102 of the received tracing data are shown in FIG504 . In some examples, accessing the hash mapping table in step 506 may include selecting the above-mentioned hash mapping table from multiple hash mapping tables based on information in the received tracing data, but is not limited to this example. For example, the information in the received tracing data may include information about the firmware version, which can be used to identify the hash mapping table to be used. In step 508, the received hash digest may be used to find the module information. Finding the module information may include comparing the received hash digest with multiple hash digests in the mapping table until a match is found, and then identifying the module information associated with the matching hash digest. In some examples, existing protocol information or information in the received tracing data may be used to determine whether the tracing data represents a module group and / or function that has been successfully executed, or represents a module and / or function that is attempted to be executed. In other words, whether the presence of a hash digest indicates whether the execution of the module and / or function associated with the hash digest has started or has been successfully completed can be determined in advance (e.g., by an existing protocol) or in operation (e.g., by information in the received tracing data).
[0049] Figure 6 6 is a flow chart showing a process 600 for fail-safe output of trace data according to some embodiments of the present invention. The process 600 can be implemented as firmware (e.g., Figure 1 Process 600 may be part of a POST routine, such as during startup of a computing system. For purposes of illustration, Figure 6Process 600 is depicted as failing due to a system shutdown or reset, however is not limited to this example.
[0050] In step 602, the POST routine may be started. Once the POST routine is started, the firmware may call protocols, modules, and / or functions in step 604. While calling these protocols, modules, and / or functions, the firmware may also monitor for completion / success in step 610. Before, during, or after executing the code associated with the protocols, modules, and / or functions of step 604, tracking data may be output (e.g., logged) in step 606. For illustrative purposes, Figure 6 The process 600 shown is intended to describe a failure scenario. Therefore, the call to the protocol, module, and / or function in step 604 is depicted as causing the system to shut down or reset in step 608. However, in actual use, successful execution of the process, module, and / or function may result in the call of subsequent processes, modules, and / or functions, and / or any other appropriate operations in the firmware sequence.
[0051] In step 610, completion / success is being monitored. Completion / success may be monitored in any suitable manner, such as by monitoring of the POST code at step 620 or monitoring of the XIP buffer at step 622. In some examples, monitoring completion / success may involve starting a timer (e.g., a BIOS timer or a watchdog timer) that is intended to provide sufficient time to complete one or more protocols, modules, and / or functions called in step 604. Completion of one or more protocols, modules, and / or functions may be identified by an expected termination trigger, such as the output of an expected POST code, the identification of an expected pointer in an XIP buffer, or the presence of any other trigger indicating success or completion of a protocol, module, and / or function. If the protocol, module, and / or function operates as expected, the end trigger will be received before the timer expires. However, if the expected end trigger is not received before the timer expires, a priority interrupt may be sent. Sending a priority interrupt may include setting a priority interrupt. Monitoring of completion / success in step 610 may be performed by a processor, a BMC, or any other suitable component executing firmware. When a priority interrupt is sent, the firmware receives the priority interrupt in step 612.
[0052] In response to receiving the priority interrupt in step 612, interrupt encoding of the firmware can be executed in step 614. The interrupt encoding can be any encoding designed to be executed when the priority interrupt is received, and can include trace data encoding. The trace data encoding can cause trace data to be output. In some examples, performing the trace data encoding can include recording events associated with the received priority interrupt. In some examples, performing the trace data encoding can include recording the trace data (e.g., a trace data file) to a memory, such as a non-volatile memory.
[0053] In some examples, after the interrupt code has been executed in step 614, the firmware may choose to perform a system reset in step 618, after which the POST routine may be restarted in step 602. In some examples, after the interrupt code has been executed in step 614, the firmware may continue by rerouting execution to the current or another protocol, module, and / or function in step 616. Resetting to the current protocol, module, and / or function will cause the firmware to call the protocol, module, and / or function in step 604 when the priority interrupt is received. Resetting to another protocol, module, and / or function will cause the firmware to call a new, optional subsequent protocol, module, and / or function in step 604.
[0054] Figure 7 700 is a flow chart showing a process 700 for generating runtime tracing data during operating system runtime according to some embodiments of the invention. The process 700 may be implemented as firmware (e.g., Figure 1 The process 700 may occur after the POST routine is completed, such as the POST end in step 702.
[0055] After the POST in step 702 ends, OS runtime services may be executed in step 704. The execution of OS runtime services at step 704 may facilitate the execution and ongoing operations of an operating system on the computing system.
[0056] In step 706, a system management interrupt signal may be received. Once the system management interrupt signal is received, system management mode code may be executed in step 708. In step 708, the system will enter system management mode. Before, during, or after executing the system management mode code in step 708, runtime tracking data may be output in step 710. Outputting runtime tracking data may include generating tracking data associated with the system management mode code and storing the runtime tracking data in a suitable location, such as a memory (e.g., a non-volatile memory). In some examples, outputting runtime tracking data in step 710 may include storing the runtime tracking data in a location that is different from non-runtime tracking data (e.g., startup tracking data, such as Figure 4 The location where the tracking data in the tracking data file 424 is typically stored.
[0057] In step 712, system power may be turned off.
[0058] In some examples, the execution of the system management mode code at step 708 may involve the following steps: Figure 6 Monitoring completion / success as described, including utilizing priority interrupts to ensure correct output of trace data.
[0059] Figure 8 800 is a block diagram representing an example system architecture for implementing features and processes of the present invention, such as presented with reference to FIGS. 1-7. Architecture 800 can be implemented on any electronic device running a software application derived from compiled instructions, including but not limited to a personal computer, server, smart phone, media player, electronic tablet computer, game console, email device, etc. In some embodiments, system architecture 800 may include one or more processors 802, one or more input devices 804, one or more display devices 806, one or more network interfaces 808, and one or more computer readable media 810. Each of these components may be coupled by a bus 812.
[0060] In some embodiments, system architecture 800 may correspond to a single server in a server rack. Various rack configurations may be implemented. For example, a rack may contain multiple chassis, and each chassis may contain multiple servers. Each server in a rack may be connected via various hardware components (e.g., a backbone, a midplane, etc.).
[0061] Display device 806 can be any known display technology, including but not limited to a display device using a liquid crystal display (LCD) or a light emitting diode (LED) technology. Processor 802 can use any known processor technology, including but not limited to a graphics processor and a multi-core processor. Input device 804 can be any known input device technology, including but not limited to a keyboard (including a virtual keyboard), a mouse, a trackball, and a touch pad or a display. Bus 812 can be any known internal or external bus technology, including but not limited to ISA, EISA, PCI, PCI Express, NuBus, USB, Serial ATA, or FireWire.
[0062] Computer readable medium 810 may be any medium that participates in providing instructions to processor 802 for execution, including but not limited to non-volatile storage media (e.g., optical disks, magnetic disks, flash drives, etc.) or volatile media (e.g., SDRAM, ROM, etc.). Computer readable media (e.g., storage devices, media, and memory) may include, for example, cables or wireless signals containing bit streams, etc. However, when referred to, non-transitory computer readable storage media explicitly excludes media such as energy, carrier signals, electromagnetic waves, and signals themselves.
[0063] The computer readable medium 810 may include various instructions for implementing an operating system 814 and application programs 820 such as computer programs. The operating system may be multi-user, multi-processing, multi-tasking, multi-threaded, real-time, etc. The operating system 814 performs basic tasks, including but not limited to: identifying input from the input device 804; sending output to the display device 806; tracking files and directories on the computer readable medium 810; controlling peripheral devices (such as hard disks, list machines, etc.) that can be controlled directly or through I / O controllers; and managing communication on the bus 812. The computer readable medium 810 may include various instructions for implementing firmware processes (such as BIOS). The computer readable medium 810 may include instructions for implementing Figure 3 , 4 , 5, 6, 7 respectively show various instructions of any one of the processes 300, 400, 500, 600, 700.
[0064] The memory 818 may include high-speed random access memory and / or non-volatile memory, such as one or more disk storage devices, one or more optical storage devices, and / or flash memory (e.g., NAND, NOR). The memory 818 (e.g., a computer-readable storage device, medium, or memory) may include a cable or wireless signal containing a bit stream, etc. However, when referred to, non-transitory computer-readable storage media explicitly excludes media such as energy, carrier signals, electromagnetic waves, and the signal itself. The memory 818 may store operating systems such as Darwin, RTXC, LINUX, UNIX, OS X, WINDOWS, or embedded operating systems such as VxWorks.
[0065] The system controller 822 may be a service processor that operates independently of the processor 802. In some embodiments, the system controller 822 may be a baseboard management controller (BMC). For example, a BMC is a dedicated service processor that uses sensors to monitor the physical state of a computer, network server, or other hardware device and communicates with a system administrator through an independent connection. The BMC is configured on the motherboard or main circuit board of the device to be monitored. The sensors of the BMC may measure internal physical variables such as temperature, humidity, power supply voltage, fan speed, communication parameters, and operating system (OS) functions.
[0066] In some embodiments, the BMC operates independently of the processor 802, so that in the event of a failure of the processor 802, the memory 818, or any other hardware, the BMC can still provide service and maintain functionality. In some embodiments, the BMC can begin to operate as soon as the server is plugged into a power source (e.g., a power supply unit, a backup power supply unit, a power distribution unit, etc.). For example, a power button on the front of the server blade does not turn the BMC on / off.
[0067] The described features may advantageously be implemented on one or more computer programs executable on a programmable system comprising at least one programmable processor, at least one input device, and at least one output device, the at least one programmable processor coupled to receive data and instructions from a data storage system and to transmit data and instructions to the data storage system. A computer program is a set of instructions that can be used directly or indirectly in a computer to perform a specific activity or bring about a specific result. A computer program may be written in any form of programming language (e.g., Objective-C, Java), including compiled or interpreted languages, and may be deployed in any form, including as a stand-alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.
[0068] Suitable processors for executing instruction programs include, for example, general-purpose and special-purpose microprocessors, and the sole processor or one of multiple processors or cores of any type of computer. Typically, the processor will receive instructions and data from a read-only memory or a random access memory or both. The basic components of a computer are a processor for executing instructions and one or more memories for storing instructions and data. Typically, a computer will also include or communicate with one or more large-capacity storage devices for storing data files, including: disks, such as internal hard disks and removable disks; magneto-optical disks; and optical disks. Storage devices suitable for tangibly embodying computer program instructions and data include all forms of non-volatile memory, including, for example: semiconductor memory devices, such as EPROM, EEPROM, and flash memory devices; disks, such as internal hard disks and removable disks; magneto-optical disks; and CD-ROM and DVD-ROM optical disks. The processor and memory can be supplemented by or incorporated into an Application-Specific Integrated Circuit (ASIC).
[0069] To provide interaction with a user, features may be implemented on a computer having a display device (e.g., a cathode ray tube (CRT) or liquid crystal display (LED) monitor) and a keyboard and pointing device (e.g., a mouse or trackball), wherein the display device is used to display information to the user and the user can provide input to the computer through the keyboard and pointing device.
[0070] These features can be implemented in a computing system that includes a back-end component (e.g., a data server) or includes a middleware component (e.g., an application server or an Internet server) or includes a front-end component (e.g., a client computer with a graphical user interface or an Internet browser), or any combination of the foregoing. The components of the system can be connected by any form or medium of digital data communication such as a communication network. Examples of communication networks include, for example, LANs, WANs, and the computers and networks that form the Internet.
[0071] A computing system may include clients and servers. Clients and servers are generally remote from each other and typically interact through a network. The relationship between client and server is formed by computer programs running on the respective computers and having a client-server relationship to each other.
[0072] One or more features or steps of the disclosed embodiments may be implemented using an application programming interface (API). The API may define one or more parameters passed between a calling application and other software code (e.g., an operating system, a library routine, a function) that provides a service, provides data, or performs an operation or calculation.
[0073] An API can be implemented as one or more calls in program code that sends or receives one or more parameters through a parameter list or other structure based on a calling protocol defined in an API specification file. A parameter can be a constant, key, data structure, object, object class, variable, data type, pointer, array, list, or other call. API calls and parameters can be implemented in any programming language. The programming language can define the vocabulary and calling conventions that programmers will use to access functions that support the API.
[0074] In some embodiments, the API call may report to the application the capabilities of the device on which the application is running, such as input capabilities, output capabilities, processing capabilities, power capabilities, communication capabilities, etc.
[0075] The foregoing description including the illustrated embodiments is presented for purposes of illustration and description only and is not intended to be exhaustive or to limit the precise form disclosed. Various modifications, adaptations, and uses thereof will be apparent to those skilled in the art.
[0076] Although the present invention has been illustrated and described in terms of one or more embodiments, other persons skilled in the art will be able to think of or know equivalent changes and modifications after reading and understanding this specification and the accompanying drawings. In addition, although a particular feature of the present invention may have been disclosed for only one of several embodiments, such a feature may be combined with one or more other features of other embodiments, which is desirable and advantageous for any given or specific application.
[0077] Although various embodiments of the present invention have been described above, it should be understood that they are presented in an exemplary and non-limiting manner only. Without departing from the spirit or scope of the present invention, the disclosed embodiments may be modified in various ways according to the disclosure of this specification. Therefore, the breadth and scope of the present invention should not be limited by any of the above-described embodiments.
[0078] The terms used herein are for the purpose of describing specific embodiments only and are not intended to limit the present invention. As used in this specification, the singular forms "a", "an", and "the" are intended to include plural forms unless the context clearly indicates otherwise. In addition, the terms "including", "having", "having", "with", or variations thereof used in the embodiments and / or claims are intended to be included in a manner similar to the term "comprising".
[0079] Unless otherwise defined, all terms (including technical and scientific terms) used in this specification have the same meaning as commonly understood by those of ordinary skill in the art. In addition, terms such as those defined in commonly used dictionaries should be interpreted as having a meaning consistent with their meaning in the context of the relevant technology, and will not be interpreted in an idealized or overly formal sense unless explicitly defined as such herein.
[0080] [Explanation of symbols]
[0081] 100: Environment
[0082] 102: Firmware image file
[0083] 104:A module
[0084] 106: Module B
[0085] 108:N module
[0086] 110: Mapping table
[0087] 114:A module information
[0088] 116:B module information
[0089] 118:N module information
[0090] 124:A module hash digest
[0091] 126:B module hash digest
[0092] 128:N module hash digest
[0093] 220: Firmware Sequence
[0094] 222: POST encoding
[0095] 224: Tracking Data
[0096] 226:POST starts
[0097] 228: Phase A
[0098] 230: Phase B
[0099] 232: Phase C
[0100] 234: Phase D
[0101] 236: POST ends
[0102] 238:OS running time
[0103] 240:A module
[0104] 241: Module B
[0105] 242:C module
[0106] 243:D Module
[0107] 244:E module
[0108] 245:F module
[0109] 246:G module
[0110] 247:H module
[0111] 248:I module
[0112] 249:J Module
[0113] 250:K module
[0114] 251:L module
[0115] 252:M module
[0116] 253:N module
[0117] 254:O module
[0118] 255:P module
[0119] 256:Q module
[0120] 257:R module
[0121] 258:S module
[0122] 259:T module
[0123] 260:A module hash digest
[0124] 261:B module hash summary
[0125] 262:C module hash summary
[0126] 263:D module hash summary
[0127] 264:E module hash digest
[0128] 265:F module hash digest
[0129] 266:G module hash summary
[0130] 267:H module hash summary
[0131] 268:I Module Hash Digest
[0132] 269:J module hash summary
[0133] 270:K module hash summary
[0134] 271:L module hash summary
[0135] 272:M module hash summary
[0136] 273:N module hash digest
[0137] 274:O Module Hash Digest
[0138] 275:P module hash digest
[0139] 276:Q module hash summary
[0140] 277: R module hash summary
[0141] 278:S module hash summary
[0142] 279:T module hash summary
[0143] 300: Process
[0144] 302~310: Steps
[0145] 400: Process
[0146] 402~422: Steps
[0147] 424:Tracking data file
[0148] 500: Process
[0149] 502~508: Steps
[0150] 600: Process
[0151] 602~618: Steps
[0152] 700: Process
[0153] 702~712: Steps
[0154] 800: System Architecture
[0155] 802: Processor
[0156] 804: Input device
[0157] 806: Display device
[0158] 808: Network interface
[0159] 810: Computer readable medium
[0160] 812: Bus
[0161] 814: Operating System
[0162] 816: Network communication
[0163] 818: Memory
[0164] 820: Application
[0165] 822: System Controller
Claims
1. A computing system, include: one or more processors; as well as A non-transitory computer-readable storage medium comprising a plurality of instructions, which when executed on one or more processors, cause the one or more processors to perform a plurality of operations, wherein the plurality of operations include: accessing a firmware comprising a plurality of modules, wherein each of the plurality of modules comprises a code that facilitates operation of the computing system; and Running each of the plurality of modules, wherein running one of the plurality of modules comprises: Use this module to generate a hash digest; outputting the hash digest; and Execute the code of this module, And wherein running one of the plurality of modules further comprises: selecting a protocol from a plurality of protocols of the module, wherein executing the code of the module comprises executing the code of the protocol; accessing a protocol globally unique identifier (GUID) associated with the selected protocol; and The protocol globally unique identifier associated with the selected protocol is output.
2. The computing system of claim 1, in, The output of this hash digest includes: appending the hash digest to a tracking data file; and The multiple operations further include: Initializing a timer, wherein completion of the timer is associated with non-completion of at least one of the plurality of modules; In response to the completion of the timer, a priority interrupt signal is transmitted receiving the priority interrupt signal; and In response to receiving the priority interrupt signal, the trace data file is output.
3. The computing system of claim 1, in, This firmware is the Basic Input / Output System (BIOS).
4. A computer-implemented method, include: accessing a firmware comprising a plurality of modules, wherein each of the plurality of modules comprises a code that facilitates operation of a computing system; and Running each of the plurality of modules, wherein running one of the plurality of modules comprises: Use this module to generate a hash digest; outputting the hash digest; and Execute the code of this module, And wherein running one of the plurality of modules further comprises: selecting a protocol from a plurality of protocols of the module, wherein executing the code of the module comprises executing the code of the protocol; accessing a protocol globally unique identifier (GUID) associated with the selected protocol; and The protocol globally unique identifier associated with the selected protocol is output.
5. The computer-implemented method of claim 4, in, The output of this hash digest includes: appending the hash digest to a tracking data file; and The multiple operations further include: Initializing a timer, wherein completion of the timer is associated with non-completion of at least one of the plurality of modules; In response to completion of the timer, transmitting a priority interrupt signal; receiving the priority interrupt signal; and In response to receiving the priority interrupt signal, the trace data file is output.
6. A computer program product, tangibly embodied in a non-transitory machine-readable storage medium, comprising a plurality of instructions, the plurality of instructions being configured to cause a data processing device to perform a plurality of operations, the plurality of operations include: accessing a firmware comprising a plurality of modules, wherein each of the plurality of modules comprises a code that facilitates operation of a computing system; and Running each of the plurality of modules, wherein running one of the plurality of modules comprises: Use this module to generate a hash digest; outputting the hash digest; and Execute the code of this module, And wherein running one of the plurality of modules further comprises: selecting a protocol from a plurality of protocols of the module, wherein executing the code of the module comprises executing the code of the protocol; accessing a protocol globally unique identifier (GUID) associated with the selected protocol; and The protocol globally unique identifier associated with the selected protocol is output.
7. The computer program product according to claim 6, in, The output of this hash digest includes: appending the hash digest to a tracking data file; and The multiple operations also include: Initializing a timer, wherein completion of the timer is associated with non-completion of at least one of the plurality of modules; In response to completion of the timer, transmitting a priority interrupt signal; receiving the priority interrupt signal; and In response to receiving the priority interrupt signal, the trace data file is output.
