Method for automatically providing debugging information of basic input and output system

By executing the driver program in the server system to generate and store debugging information, and automatically output it when an error is determined, it solves the problem of difficulty in determining problems in traditional server system self-tests, achieves real-time and accurate debugging information, and improves user experience. Judgment efficiency.

CN113672477BActive Publication Date: 2024-10-01MITAC COMP (SHUN DE) LTD +1
View PDF 9 Cites 0 Cited by

Patent Information

Application Number
CN202010412921.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-15
Publication Date
2024-10-01
Estimated Expiration
2040-05-15

AI Technical Summary

Technical Problem

If a problem occurs during the self-test of a traditional server system at startup, it is difficult for users to immediately determine the problem. In the absence of a BIOS POSTCODE TABLE, users can only guess based on buzz codes or experience, which leads to misjudgment and is time-consuming.

Method used

By executing multiple driver programs in a computer device, each program contains debugging instructions, generates and stores debugging information for related hardware, and automatically outputs it when a driver error is determined, so that users can accurately determine the problem point.

Benefits of technology

Real-time debugging information is automatically provided during self-testing of the server system. Users can immediately and accurately determine the problem point, avoiding misjudgment and saving time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113672477B_ABST
    Figure CN113672477B_ABST
Patent Text Reader

Abstract

A method for automatically providing debugging information of a basic input / output system is performed by a computer device. The computer device executes multiple driver programs respectively related to multiple hardware to be driven, and each driver program includes multiple first debugging instructions. The method includes the following steps: (A) when a first debugging instruction of a driver program is executed, a first debugging message corresponding to the hardware to be driven corresponding to the driver program and including a first state description is generated according to the first debugging instruction; (B) the first debugging message is stored; and (C) whether a driver error that meets a driver default condition occurs occurs, and when it is determined that the driver error occurs, all the stored first debugging messages are output.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a method for providing debugging information, and more particularly to a method for automatically providing debugging information of a basic input / output system. Background Art

[0002] When a traditional server system is started, it will perform a self-test (Power-On Self-Test, POST) and initialization through the Basic Input / Output System (BIOS). If a system problem occurs, the server will record it in the form of a code. Users can often only determine which hardware the server system tested during the POST phase and caused the problem by manually checking the BIOS POST CODE TABLE in the Basic Input / Output System Specification based on the code recorded by the server.

[0003] However, this method cannot immediately identify the problem of the server system. If there is no BIOS POSTCODE TABLE to view, the user can only guess which hardware has a problem through the beep code or based on experience, which is very time-consuming and cannot accurately identify the problem point, resulting in misjudgment. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a method for automatically providing debugging information of a basic input / output system which can provide debugging information in real time.

[0005] To solve the above technical problems, the method for automatically providing debugging information of a basic input / output system of the present invention is executed by a computer device, the computer device includes a memory and a processing unit electrically connected to the memory, the processing unit executes a plurality of driver programs respectively related to a plurality of hardware to be driven, each driver program includes a plurality of first debugging instructions, the method includes a step (A), a step (B), and a step (C).

[0006] In the step (A), when the processing unit executes a first debugging instruction of a driver, a first debugging message corresponding to the to-be-driven hardware corresponding to the driver and including a first state description is generated according to the first debugging instruction.

[0007] In the step (B), the processing unit stores the first debugging information in the memory.

[0008] In the step (C), the processing unit determines whether a driving error that satisfies a driving default condition occurs. When the processing unit determines that the driving error occurs, the processing unit outputs all first debugging information stored in the memory.

[0009] Compared to the prior art, the processing unit of the present invention stores the first debugging information in the memory, and automatically outputs all the first debugging information stored in the memory when determining that the drive error occurs, so that the user can immediately and accurately determine the problem point based on the first debugging information. BRIEF DESCRIPTION OF THE DRAWINGS

[0010] Other features and effects of the present invention will be clearly presented in the embodiments with reference to the accompanying drawings, in which:

[0011] Figure 1 is a block diagram illustrating a computer device for implementing an embodiment of the method for automatically providing debugging information of a basic input and output system of the present invention;

[0012] Figure 2 is a flow chart illustrating the steps performed in the PEI stage of the embodiment; and

[0013] Figure 3 is a flow chart illustrating the steps performed in the DXE stage of this embodiment. DETAILED DESCRIPTION

[0014] See also Figure 1 , a computer device 1 for implementing a method for automatically providing debugging information of a basic input / output system according to an embodiment of the present invention is described. For example, the computer device 1 includes a display unit 11, a memory 12, a baseboard management controller (Baseboard Management Controller, BMC) 13, a processing unit 14, and a platform path controller (Platform Controller Hub, PCH) 15 electrically connected to the display unit 11, the memory 12, the baseboard management controller 13, and the processing unit 14. It is worth noting that in other embodiments, the processing unit 14 and the platform path controller 15 can also be integrated into a system on a chip (System on a Chip, SoC), which is electrically connected to the display unit 11, the memory 12, and the baseboard management controller 13. In addition, in other embodiments, the display unit 11 can also be connected to the computer device 1 in an external manner.

[0015] The memory 12 is, for example, a non-volatile memory (NVM), but is not limited thereto.

[0016] The baseboard management controller 13 includes a serial port 131 that is connected to a user terminal 2 for communication. The baseboard management controller 13 stores a default connection parameter for setting the serial port 131. It is worth noting that the serial port 131 can be an output port of the baseboard management controller 13. The baseboard management controller 13 is electrically connected to a connector reserved on the mainboard for electrically connecting to a debug tool board and externally connected to an external computer, or an external communication port; the serial port 131 can also be set outside the baseboard management controller 13 and be a connector reserved on the mainboard or a communication port for external connection.

[0017] The processing unit 14 includes a cache 141. The processing unit 14 executes a unified extensible firmware interface (UEFI) system, and in a pre-extensible firmware interface initialization (PEI) environment stage, when the computer device 1 just enters the pre-extensible firmware interface initialization environment stage, the memory 12 has not yet completed initialization and cannot be used, and executes multiple PEI initialization programs respectively related to multiple hardware to be initialized, and in a driver execution environment (DXE) stage, and multiple DXE driver programs respectively related to multiple hardware to be driven, each PEI initialization program includes multiple PEI debugging instructions, and each DXE driver program includes multiple DXE debugging instructions, to perform the UEFI system boot procedure. It is worth noting that the cache 141 is, for example, a static random access memory (SRAM). When the cache 141 remains powered on, the data stored therein is permanently maintained; when the power supply is stopped, the data stored in the cache 141 will disappear (i.e., volatile memory). The waiting initial hardware is, for example, a central processing unit, a platform path controller, a memory, and a motherboard. The waiting driver hardware is, for example, a universal serial bus (USB), a keyboard, a PCI bus, a PCI SCSI host controller (hostcontroller), a boot integrity service (BIS), and a PCI host bridge (PCI HostBridge).

[0018] See also Figure 1 , Figure 2 ,and Figure 3 , an example is given to illustrate how the computer device 1 implements a method for automatically providing debugging information of a basic input / output system according to an embodiment of the present invention during the process of executing the boot procedure of the UEFI system, and the embodiment includes steps 201-212 executed in the PEI stage, and steps 301-309 executed in the DXE stage. In this embodiment, for example, there are a total of M PEI debugging instructions and N DXE debugging instructions, where M>1, N>1, and the processing unit 14 will sequentially execute the PEI initialization programs in the PEI stage, and sequentially execute the PEI debugging instructions of the PEI initialization program during the execution of each PEI initialization program; and the processing unit 14 will sequentially execute the DXE drivers in the DXE stage, and sequentially execute the DXE debugging instructions of the DXE drivers during the execution of each DXE driver.

[0019] In step 201, initially, the processing unit 14 executes the first PEI debugging instruction, ie, i=1.

[0020] In step 202, the processing unit 14 generates an i-th PEI debugging message corresponding to the hardware to be initialized corresponding to the PEI initialization program according to the i-th PEI debugging instruction. It should be noted that in the present embodiment, each PEI debugging message includes a PEI debugging code, and in other embodiments, each PEI debugging message includes a PEI state description, and the PEI state indicates, for example, the initialization state of the corresponding hardware to be initialized.

[0021] In step 203, the processing unit 14 stores the i-th PEI debugging message in the cache 141. It should be noted that in this embodiment, the processing unit 14 stores the PEI debugging message in the cache 141 via Hand-off blocks (HOB), but the present invention is not limited thereto.

[0022] In step 204, the processing unit 14 determines whether an initialization error that satisfies an initialization preset condition occurs. When the processing unit 14 determines that the initialization error occurs, the process proceeds to step 205; when the processing unit 14 determines that the initialization error does not occur, the process proceeds to step 208. It is worth noting that the initialization preset condition is, for example, CpuInstance is NULL, StackTop is NULL, and GdtBuffer is NULL, but is not limited thereto.

[0023] In step 205 , the processing unit 14 outputs all PEI debugging messages stored in the cache 141 to the baseboard management controller 13 via the platform path controller 15 .

[0024] In step 206 , the processing unit 14 transmits a first updated connection parameter to the baseboard management controller 13 .

[0025] In step 207, after receiving all PEI debugging messages output by the processing unit 14, the baseboard management controller 13 updates the preset connection parameters according to the first updated connection parameters, and transmits the PEI debugging messages to the user end 2 via the serial port 131. It should be noted that, in other embodiments, the preset connection parameters can also be used to set the local area network serial port (Serial Over LAN, SOL) of the baseboard management controller 13, and the baseboard management controller 13 can also transmit the PEI debugging messages to the user end 2 via the SOL.

[0026] In step 208, the processing unit 14 determines whether the i-th PEI debugging instruction is the M-th PEI debugging instruction, that is, whether i = M. When it is determined that the i-th PEI debugging instruction is the M-th PEI debugging instruction, the process ends; when it is determined that the i-th PEI debugging instruction is not the M-th PEI debugging instruction, the process proceeds to step 209.

[0027] In step 209, the processing unit 14 executes the (i+1)th PEI debugging instruction, that is, i is set to i+1. Thereafter, steps 202 to 204 are repeated until i=M.

[0028] In step 210, when the processing unit 14 receives an interrupt signal, the processing unit 14 stops executing the PEI initialization programs and automatically outputs all PEI debugging messages stored in the cache 141 to the baseboard management controller 13. It should be noted that the interrupt signal can be generated by the processing unit 14 or by other hardware, and is not limited thereto.

[0029] In step 211 , the processing unit 14 transmits a second updated connection parameter to the baseboard management controller 13 via the platform path controller 15 .

[0030] In step 212 , after receiving all PEI debugging messages outputted by the processing unit 14 , the baseboard management controller 13 updates the preset connection parameter according to the second updated connection parameter, and transmits the received PEI debugging messages to the user end 2 via the serial port 131 .

[0031] It should be noted that, in the present embodiment, step 206 is performed after step 205, and step 212 is performed after step 211. In other implementations, step 206 may be performed before or at the same time as step 205, and step 212 may be performed before or at the same time as step 211, and the present invention is not limited thereto.

[0032] It should be noted that steps 210-212 can be executed after one of steps 201-209. During the process of executing the boot procedure of the UEFI BIOS system, when an abnormal error occurs in the UEFI BIOS system and the UEFI system cannot continue to be executed, the processing unit 14 will receive the interrupt signal to perform steps 210-212, i.e., perform exception handling. It should be noted that since the feature of the present invention is not how the processing unit 14 determines whether an error occurs in the UEFI system, which is known to those skilled in the art, their details are omitted here for simplicity.

[0033] In step 301, the processing unit 14 stores all the second debugging information stored in the cache 141 to the memory 12. It should be noted that the memory 12 performs step 301 after initialization in the PEI stage (steps 201-212).

[0034] In step 302, initially, the processing unit 14 executes the first DXE debugging instruction, ie, j=1.

[0035] In step 303, the processing unit 14 generates a j-th DXE debugging message corresponding to the to-be-driven hardware corresponding to the DXE driver and including a DXE status description according to the j-th DXE debugging instruction. It should be noted that in the present embodiment, each DXE debugging message includes a DXE debugging code, and in other embodiments, each DXE debugging message includes a DXE status description, and the DXE status description, for example, describes the firmware status of the corresponding to-be-driven hardware.

[0036] In step 304 , the processing unit 14 stores the j-th DXE debugging message in the memory 12 .

[0037] In step 305, the processing unit 14 determines whether a driver error that satisfies a driver default condition occurs. When the processing unit 14 determines that the driver error occurs, the process proceeds to step 306; when the processing unit 14 determines that the driver error does not occur, the process proceeds to step 307. It is worth noting that the driver default condition is, for example, TempString is a null value, NewString is a null value, and GuidHob is a null value, but is not limited thereto.

[0038] In step 306 , the processing unit 14 outputs all PEI debugging messages and all DXE debugging messages stored in the memory 12 to the display unit 11 via the platform path controller 15 .

[0039] In step 307, the processing unit 14 determines whether the i-th DXE debug instruction is the N-th DXE debug instruction, that is, whether j = N. When it is determined that the j-th DXE debug instruction is the N-th DXE debug instruction, the process ends; when it is determined that the j-th DXE debug instruction is not the N-th DXE debug instruction, the process proceeds to step 308.

[0040] In step 308, the processing unit 14 executes the (j+1)th PEI debugging instruction, that is, i is set to j+1. Then, steps 303 to 305 are repeated until j=N.

[0041] In step 309 , when the processing unit 14 receives an interrupt signal, the processing unit 14 stops executing the DXE drivers and outputs all PEI debugging messages and all DXE debugging messages stored in the memory 12 to the display unit 11 .

[0042] It should be noted that step 309 can be executed after one of steps 301 to 308. When an abnormal error occurs in the UEFI BIOS system and the UEFI system cannot continue to be executed, the processing unit 14 will receive the interrupt signal to perform step 309, that is, perform exception processing.

[0043] In summary, the method for automatically providing debugging information of the basic input / output system of the present invention is that in the PEI stage, since the memory 12 cannot be used yet, the processing unit 14 stores the PEI debugging information in the cache 141, and when the processing unit 14 determines that the initialization error occurs, all the PEI debugging information stored in the cache 141 is automatically output to the baseboard management controller 13, so that the baseboard management controller 13 transmits the PEI debugging information to the user terminal 2, so that the user can be in the PEI stage according to the PEI debugging information. The problem point can be accurately determined by the PEI debugging messages; in the DXE stage, the PEI debugging messages and the DXE debugging messages are stored in the memory 12 by the processing unit 14, and when the processing unit 14 determines that the drive error has occurred, the processing unit 14 automatically outputs all the PEI debugging messages and all the DXE debugging messages stored in the memory 12 to the display unit 11, so that the user can immediately and accurately determine the problem point according to the PEI debugging messages and the DXE debugging messages, so the purpose of the present invention can be achieved.

[0044] However, the above is only an embodiment of the present invention and should not be used to limit the scope of the present invention. All simple equivalent changes and modifications made according to the claims and the patent specification of the present invention are still within the scope of the present invention.

Claims

1. A method for automatically providing debugging information of a basic input / output system, executed by a computer device, the computer device comprising a memory and a processing unit electrically connected to the memory, the processing unit executing a plurality of initialization programs respectively related to a plurality of hardware to be initialized and a plurality of driver programs respectively related to a plurality of hardware to be driven, each initialization program comprising a plurality of second debugging instructions, each driver program comprising a plurality of first debugging instructions, characterized in that: The method comprises the following steps: (A) when the processing unit executes a first debugging instruction of a driver, generating a first debugging message corresponding to the to-be-driven hardware corresponding to the driver and including a first state description according to the first debugging instruction; (B) the processing unit stores the first debugging information in the memory; and (C) the processing unit determines whether a driver error that satisfies a driver default condition occurs, and when the processing unit determines that the driver error occurs, the processing unit outputs all first debugging information stored in the memory; when the processing unit determines that the driver error does not occur, repeating step (A) to execute another first debugging instruction of the driver program until all first debugging instructions are executed; Wherein, before step (A), the following steps are also included: (D) when the processing unit executes a second debugging instruction of an initialization program, generating a second debugging message corresponding to the hardware to be initialized corresponding to the initialization program according to the second debugging instruction; (E) the processing unit stores the second debugging message; and (F) The processing unit determines whether an initialization error that satisfies an initialization preset condition has occurred. When the processing unit determines that the initialization error has occurred, the processing unit outputs all stored second debugging messages. When the processing unit determines that the initialization error has not occurred, the processing unit repeats step (D) to execute another second debugging instruction of the initialization program until all second debugging instructions are executed.

2. The method for automatically providing debugging information of a basic input / output system as claimed in claim 1, characterized in that: Prior to step (A), the method further comprises the following steps: (G) When the processing unit receives an interrupt signal, the processing unit stops executing the initialization program and outputs all the stored second debugging messages.

3. The method for automatically providing debugging information of a basic input / output system as claimed in claim 1, characterized in that: The following steps are further included between step (F) and step (A): (H) the processing unit stores all the stored second debugging information in the memory; Wherein, in step (C), the processing unit further outputs all second debugging information stored in the memory.

4. The method for automatically providing debugging information of a basic input / output system as claimed in claim 3, characterized in that: After step (A), the method further comprises the following steps: (I) When the processing unit receives an interrupt signal, the processing unit stops executing the driver and outputs all the first debugging messages and all the second debugging messages stored in the memory.

5. The method for automatically providing debugging information of a basic input / output system as claimed in claim 1, wherein the processing unit comprises a cache, wherein: In step (E), the processing unit stores the second debugging information in the cache via Hand-off blocks (HOB).

6. The method for automatically providing debugging information of a basic input / output system as claimed in claim 1, characterized in that: Step (F) comprises the following sub-steps: (F-1) the processing unit determines whether the initialization error occurs; and (F-2) When the processing unit determines that the initialization error occurs, the processing unit outputs all stored second debugging messages to a baseboard management controller.

7. The method for automatically providing debugging information of a basic input / output system as claimed in claim 6, wherein the computer device further comprises a baseboard management controller electrically connected to the processing unit, the baseboard management controller comprises a serial port for communication with a user terminal, and stores a preset connection parameter for setting the serial port, wherein: The step (F-2) includes the following steps: When the processing unit determines that the initialization error occurs, the processing unit transmits an updated connection parameter, so that the baseboard management controller transmits the second debugging message to the user end via the serial port after receiving all second debugging messages output by the processing unit and updating the preset connection parameter according to the updated connection parameter.

8. The method for automatically providing debugging information of a basic input / output system as claimed in claim 1, wherein the computer device further comprises a display unit electrically connected to the processing unit, wherein: Step (C) comprises the following sub-steps: (C-1) the processing unit determines whether the drive error occurs; and (C-2) When the processing unit determines that the driving error occurs, the processing unit outputs all first debugging messages stored in the memory to the display unit.

Citation Information

Patent Citations

  • Starting up test method of automatic verification system

    CN104346271A

  • Method for outputting debugging messages of basic input-output system

    CN107203460A

  • System and method for sharing serial ports

    TW201224781A

  • Debug message automatically providing method of BIOS

    TW202111533A

  • A system and a method for decoding port data

    TWI259358B