CN113672477B - Debug message automatic providing method for basic input/output system - Google Patents
Debug message automatic providing method for basic input/output system Download PDFInfo
- Publication number
- CN113672477B CN113672477B CN202010412921.4A CN202010412921A CN113672477B CN 113672477 B CN113672477 B CN 113672477B CN 202010412921 A CN202010412921 A CN 202010412921A CN 113672477 B CN113672477 B CN 113672477B
- Authority
- CN
- China
- Prior art keywords
- processing unit
- debug
- initialization
- memory
- driving
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 32
- 238000012545 processing Methods 0.000 claims description 86
- 238000004891 communication Methods 0.000 description 3
- 230000002159 abnormal effect Effects 0.000 description 2
- 230000003068 static effect Effects 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- 238000010586 diagram Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F11/00—Error detection; Error correction; Monitoring
- G06F11/30—Monitoring
- G06F11/32—Monitoring with visual or acoustical indication of the functioning of the machine
- G06F11/321—Display for diagnostics, e.g. diagnostic result display, self-test user interface
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Human Computer Interaction (AREA)
- Quality & Reliability (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Debugging And Monitoring (AREA)
Abstract
A debug message automatic providing method of a basic input output system is executed by a computer device, wherein the computer device executes a plurality of drivers respectively related to a plurality of hardware to be driven, each driver comprises a plurality of first debug instructions, and the method comprises the following steps: (A) When a first debug instruction of a driver is executed, generating a first debug message which corresponds to hardware to be driven corresponding to the driver and comprises a first state description according to the first debug instruction; (B) storing the first debug message; and (C) judging whether a driving error meeting a driving default condition occurs, and outputting all the stored first debug messages when judging that the driving error occurs.
Description
Technical Field
The present invention relates to a debug message providing method, and more particularly to a debug message automatic providing method for a basic input/output system.
Background
When a conventional server system is started, a Power-On Self-Test (POST) is performed through a basic input/output system (BIOS), if a problem occurs in the system, the server will record in the form of codes, and a user often can only judge which hardware the server system has tested in the POST stage according to the codes recorded by the server and by manually checking a BIOS start-up Self-Test code table (BIOS POST CODE TABLE) in a basic input/output system specification (BIOS Specification).
However, this method cannot immediately determine the problem occurring in the server system, and if no BIOS POST CODE TABLE can check, the user simply uses the BEEP CODE (BEEP CODE) or guesses which hardware is out of question according to experience, which is very time-consuming and cannot accurately determine the problem point, thus causing erroneous determination.
Disclosure of Invention
The technical problem to be solved by the invention is to provide an automatic debug message providing method of a basic input/output system capable of providing debug messages in real time.
In order to solve the above-mentioned problems, the present invention provides a method for automatically providing debug information of a basic input/output system, which is executed by a computer device, wherein the computer device comprises a memory and a processing unit electrically connected with the memory, the processing unit executes a plurality of drivers respectively related to a plurality of hardware to be driven, each driver comprises a plurality of first debug instructions, and the method comprises a step (A), a step (B) and a step (C).
In the step (a), when the processing unit executes a first debug instruction to a driver, a first debug message corresponding to hardware to be driven corresponding to the driver and including a first state description is generated according to the first debug instruction.
In the step (B), the processing unit stores the first debug message to the memory.
In the step (C), the processing unit determines whether a driving error satisfying a driving default condition occurs, and when the processing unit determines that the driving error occurs, the processing unit outputs all the first debug messages stored in the memory.
Compared with the prior art, the processing unit stores the first debug messages into the memory, and automatically outputs all the first debug messages stored in the memory when the driving errors are determined to occur, so that a user can accurately determine the problem point according to the first debug messages immediately.
Drawings
Other features and advantages of the present invention will become apparent from the following description of the embodiments with reference to the drawings, in which:
FIG. 1 is a block diagram illustrating a computer device for implementing one embodiment of a debug message auto-provision method for a BIOS according to the present invention;
FIG. 2 is a flow chart illustrating the steps performed by the embodiment in the PEI phase; and
Fig. 3 is a flow chart illustrating the steps performed by this embodiment during the DXE phase.
Detailed Description
Referring to FIG. 1, a computer apparatus 1 for implementing a method for automatically providing debug messages of a BIOS according to an embodiment of the present invention is illustrated. 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 should be noted that, in other embodiments, the processing unit 14 and the platform path controller 15 may be integrated into a System on a Chip (SoC) electrically connected to the display unit 11, the memory 12, and the baseboard management controller 13, and in other embodiments, the display unit 11 may be connected to the computer device 1 in an external manner.
The Memory 12 is, for example, but not limited to, a Non-Volatile Memory (NVM).
The baseboard management controller 13 includes a Serial port (Serial port) 131 communicatively connected to a user terminal 2, and the baseboard management controller 13 stores a default connection parameter for setting the Serial port 131. It should be noted that the serial port 131 may be an output port of the baseboard management controller 13, and the baseboard management controller 13 is electrically connected to a connector (connector) reserved on a motherboard for electrically connecting to a debug tool board (debug tool board), and is externally connected to an external computer, or is externally connected to a communication port (communication port); the serial port 131 may also be disposed outside the baseboard management controller 13 as a reserved connector on the motherboard or as a communication port for external connection.
The processing unit 14 includes a cache 141, and the processing unit 14 executes a unified Extensible firmware interface (Unified Extensible FIRMWARE INTERFACE, UEFI) system, and in a Pre-Extensible FIRMWARE INTERFACE Initialization (PEI) environment phase, when the computer apparatus 1 has just entered the Pre-Extensible firmware interface Initialization environment phase, the memory 12 is not yet initialized and cannot be used, executes a plurality of PEI Initialization programs respectively related to a plurality of hardware to be initialized, and in a driver execution environment (Driver Execution Environment, DXE) phase, executes a plurality of DXE drivers respectively related to a plurality of hardware to be driven, each PEI Initialization program includes a plurality of PEI debug instructions, and each DXE driver includes a plurality of DXE debug instructions to perform a boot process of the UEFI system. It is noted that the cache 141 is, for example, a static random access memory (Static Random Access Memory, SRAM), and the data stored therein is always kept while the cache 141 is kept powered on; when the power supply is stopped, the data stored in the cache 141 is lost (i.e., volatile memory), and the initial hardware is such as a cpu, a platform path controller, a memory, and a motherboard, and the driving hardware is such as a universal serial bus (Universal Serial Bus, USB), a keyboard, a PCI bus, a PCI SCSI Host controller (Host controller), a Boot INTEGRITY SERVICE, BIS, and a PCI Host Bridge (PCI Host Bridge).
Referring to fig. 1, 2 and 3, an example of how the computer apparatus 1 implements a debug message auto-providing method of a bios according to an embodiment of the present invention during a boot process of a UEFI system is shown, where the embodiment includes steps 201 to 212 executed in a PEI phase and steps 301 to 309 executed in a DXE phase. In this embodiment, there are, for example, a total of M PEI debug instructions, N DXE debug instructions, where M >1, N >1, and the processing unit 14 will execute the PEI initialization procedures sequentially during the PEI phase and execute the PEI debug instructions of the PEI initialization procedure sequentially during the execution of each PEI initialization procedure; the processing unit 14 will execute the DXE drivers sequentially during the DXE phase and execute the DXE debug instructions of the DXE drivers sequentially during execution of each DXE driver.
In step 201, initially, the processing unit 14 executes the 1 st PEI debug instruction, i.e. i=1.
In step 202, the processing unit 14 generates an i-th PEI debug message corresponding to the hardware to be initialized corresponding to the PEI initialization program according to the i-th PEI debug instruction. It should be noted that in this embodiment, each PEI debug message includes a PEI debug code, and in other embodiments, each PEI debug message includes a PEI status description indicating, for example, an initialization status of the corresponding hardware to be initialized.
At 203, the processing unit 14 stores the ith PEI debug message to the cache 141. It is noted that in this embodiment, the processing unit 14 stores the PEI debug message to the cache 141 via Hand-off blocks (HOB), but is not limited thereto.
In step 204, the processing unit 14 determines whether an initialization error satisfying an initialization preset condition occurs, and when the processing unit 14 determines that the initialization error occurs, the flow proceeds to step 205; when the processing unit 14 determines that the initialization error has not occurred, the flow proceeds to step 208. It should be noted that the initialization preset condition is, but not limited to, cpuInstance being NULL (NULL), stackTop being NULL, gdtBuffer being NULL, etc.
In step 205, the processing unit 14 outputs all PEI debug messages stored in the cache 141 to the BMC 13 via the platform path controller 15.
In step 206, the processing unit 14 transmits a first updated connection parameter to the baseboard management controller 13.
In step 207, after receiving all PEI debug messages outputted from 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 debug messages to the ue 2 through the serial port 131. It is noted that, in other embodiments, the preset connection parameter may also be used to set a Serial Over LAN (SOL) port of the baseboard management controller 13, and the baseboard management controller 13 may also transmit the PEI debug messages to the user terminal 2 via the SOL.
In step 208, the processing unit 14 determines whether the i-th PEI debug instruction is an M-th PEI debug instruction, i.e. whether i=m. When the ith PEI debug instruction is judged to be the Mth PEI debug instruction, ending the flow; when it is determined that the ith PEI debug instruction is not an Mth PEI debug instruction, the flow proceeds to step 209.
In step 209, the processing unit 14 executes the (i+1) th PEI debug instruction, i.e. sets i to i+1. Thereafter, repeating steps 202-204 until i=m.
In step 210, when the processing unit 14 receives an interrupt signal, the processing unit 14 stops executing the PEI initialization processes and automatically outputs all PEI debug messages stored in the cache 141 to the baseboard management controller 13. It should be noted that the interrupt signal may be generated by the processing unit 14 or other hardware, but is not limited thereto.
In step 211, the processing unit 14 transmits a second updated connection parameter to the baseboard management controller 13 via the platen path controller 15.
In step 212, the bmc 13 updates the preset connection parameters according to the second updated connection parameters after receiving all PEI debug messages outputted from the processing unit 14, and transmits the received PEI debug messages to the ue 2 via the serial port 131.
It is noted that, in the present embodiment, step 206 follows step 205, step 212 follows step 211, and in other embodiments, step 206 may be performed before or simultaneously with step 205, and step 212 may be performed before or simultaneously with step 211, which is not limited thereto.
It is further noted that steps 210-212 may be performed after one of steps 201-209, and the processing unit 14 may receive the interrupt signal to perform steps 210-212 when the UEFI BIOS system fails to continue to execute due to an abnormal error occurring in the UEFI BIOS system during the execution of the boot-up procedure of the UEFI BIOS system (Exception Handling). It is noted that since the present invention is not characterized by how the processing unit 14 determines whether the UEFI system is in error or not, which is known to those skilled in the art, details thereof are omitted herein for brevity.
At step 301, the processing unit 14 stores all of the second debug messages stored by the cache 141 to the memory 12. It should be noted that step 301 is performed after the memory 12 is initialized in the PEI phase (steps 201-212).
In step 302, initially, the processing unit 14 executes the 1 st DXE debug instruction, i.e. j=1.
In step 303, the processing unit 14 generates a j-th DXE debug message corresponding to the hardware to be driven corresponding to the DXE driver according to the j-th DXE debug instruction, and including a DXE status description. It should be noted that in this embodiment, each DXE debug message includes a DXE debug code, and in other embodiments, each DXE debug message includes a DXE state description, such as a firmware state describing the corresponding hardware to be driven.
In step 304, the processing unit 14 stores the jth DXE debug message to the memory 12.
In step 305, the processing unit 14 determines whether a driving error satisfying a driving default condition occurs, and when the processing unit 14 determines that the driving error occurs, the flow proceeds to step 306; when the processing unit 14 determines that the driving error does not occur, the flow proceeds to step 307. It should be noted that the default driving conditions are, but not limited to, TEMPSTRING being null, NEWSTRING being null, guidHob being null, etc.
In step 306, the processing unit 14 outputs all PEI debug messages and all DXE debug messages stored in the memory 12 to the display unit 11 via the platform path controller 15.
In step 307, the processing unit 14 determines whether the i-th DXE debug instruction is an N-th DXE debug instruction, i.e. whether j=n. When the j-th DXE debug instruction is judged to be the N-th DXE debug instruction, ending the flow; when it is determined that the jth DXE debug instruction is not an nth DXE debug instruction, flow proceeds to step 308.
In step 308, the processing unit 14 executes the (j+1) th PEI debug instruction, i.e. sets i to j+1. Thereafter, steps 303-305 are repeated until j=n.
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 debug messages and all DXE debug messages stored in the memory 12 to the display unit 11.
It is noted that step 309 may be performed after one of steps 301-308, and when an abnormal error occurs in the UEFI BIOS system and the UEFI system cannot be executed, the processing unit 14 receives the interrupt signal to perform step 309, i.e. perform exception processing.
In summary, in the method for automatically providing debug messages of a basic input/output system according to the present invention, in the PEI phase, since the memory 12 is not available, the processing unit 14 stores the PEI debug messages into the cache 141, and when the processing unit 14 determines that the initialization error occurs, all the PEI debug messages stored in the cache 141 are automatically output to the bmc 13, so that the bmc 13 transmits the PEI debug messages to the user terminal 2, and a user can accurately determine a problem point according to the PEI debug messages in the PEI phase; in the DXE phase, the processing unit 14 stores the PEI debug messages and the DXE debug messages in the memory 12, and when the processing unit 14 determines that the driving error occurs, the processing unit 14 automatically outputs all PEI debug messages and all DXE debug messages stored in the memory 12 to the display unit 11, so that a user can accurately determine a problem point according to the PEI debug messages and the DXE debug messages immediately, thereby truly achieving the purpose of the present invention.
However, the foregoing is merely illustrative of the present invention and, as such, it is not intended to limit the scope of the invention, but rather to cover all modifications and variations within the scope of the present invention as defined by the appended claims and their equivalents.
Claims (8)
1. The automatic debugging message providing method for basic input/output system is executed by a computer device comprising a memory and a processing unit electrically connected with the memory, wherein the processing unit executes a plurality of initializing programs respectively related to a plurality of hardware to be initialized and a plurality of driving programs respectively related to a plurality of hardware to be driven, each initializing program comprises a plurality of second debugging instructions, and each driving program comprises a plurality of first debugging instructions, and the method is characterized by comprising the following steps:
(A) When the processing unit executes a first debug instruction of a driver, generating a first debug message which corresponds to hardware to be driven corresponding to the driver and comprises a first state description according to the first debug instruction;
(B) The processing unit stores the first debug message into the memory; and
(C) The processing unit judges whether a driving error meeting a driving default condition occurs, and when the processing unit judges that the driving error occurs, the processing unit outputs all first debug messages stored in the memory; when the processing unit determines that the driving error does not occur, repeating the step (a) to execute another first debug instruction of the driving program until all the first debug instructions are executed;
wherein, the method further comprises the following steps before the step (A),
(D) When the processing unit executes a second debug instruction of an initialization program, generating a second debug message corresponding to hardware to be initialized corresponding to the initialization program according to the second debug instruction;
(E) The processing unit stores the second debug message; and
(F) The processing unit judges whether an initialization error meeting an initialization preset condition occurs, and when the processing unit judges that the initialization error occurs, the processing unit outputs all the stored second debug messages; when the processing unit determines that the initialization error does not occur, repeating the step (D) to execute another second debug instruction of the initialization program until all second debug instructions are executed.
2. The method for automatically providing debug messages of a basic input/output system according to claim 1, further comprising the steps of, before the step (a):
(G) When the processing unit receives an interrupt signal, the processing unit stops executing the initialization program and outputs all the stored second debug messages.
3. The method for automatically providing debug messages of a basic input/output system according to claim 1, further comprising the steps of:
(H) The processing unit stores all the stored second debug messages to the memory;
in step (C), the processing unit further outputs all the second debug messages stored in the memory.
4. The method for automatically providing debug messages of a basic input/output system according to claim 3, further comprising the steps of, after the step (a):
(I) When the processing unit receives an interrupt signal, the processing unit stops executing the driving program and outputs all the first debug messages and all the second debug messages stored in the memory.
5. The method of claim 1, wherein the processing unit includes a cache, and wherein in step (E) the processing unit stores the second debug message into the cache via Hand-off blocks (HOB).
6. The automated debug message providing method of a basic input/output system according to claim 1, wherein the step (F) comprises the following sub-steps:
(F-1) the processing unit determining whether the initialization error occurs; and
(F-2) when the processing unit determines that the initialization error occurs, the processing unit outputting all the second debug messages stored therein to a baseboard management controller.
7. The method of claim 6, wherein the computer device further comprises a baseboard management controller electrically connected to the processing unit, the baseboard management controller including a serial port communicatively connected to a user terminal and storing a predetermined connection parameter for setting the serial port, and the method further comprises the steps of:
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 debug message to the user terminal through the serial port after receiving all the second debug messages output by the processing unit and updating the preset connection parameter according to the updated connection parameter.
8. The automated debug message providing method for a bios as claimed in claim 1, wherein the computer device further comprises a display unit electrically connected to the processing unit, and step (C) comprises the sub-steps of:
(C-1) the processing unit determining whether the driving error occurs; and
(C-2) when the processing unit determines that the driving error occurs, the processing unit outputting all the first debug messages stored in the memory to the display unit.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010412921.4A CN113672477B (en) | 2020-05-15 | 2020-05-15 | Debug message automatic providing method for basic input/output system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010412921.4A CN113672477B (en) | 2020-05-15 | 2020-05-15 | Debug message automatic providing method for basic input/output system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113672477A CN113672477A (en) | 2021-11-19 |
CN113672477B true CN113672477B (en) | 2024-10-01 |
Family
ID=78537799
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010412921.4A Active CN113672477B (en) | 2020-05-15 | 2020-05-15 | Debug message automatic providing method for basic input/output system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113672477B (en) |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI601072B (en) * | 2017-02-21 | 2017-10-01 | Thundersoft Taiwan Co Ltd | A New Way to Create Unified Extensible Firmware Interfaces |
TWI611289B (en) * | 2015-10-23 | 2018-01-11 | 神雲科技股份有限公司 | Server and error detecting method thereof |
TWI685735B (en) * | 2018-08-28 | 2020-02-21 | 神雲科技股份有限公司 | Method of displaying bios messages in the early stages of power-on self-test of computer system |
TW202111533A (en) * | 2019-09-12 | 2021-03-16 | 神雲科技股份有限公司 | Debug message automatically providing method of bios |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI259358B (en) * | 2004-04-16 | 2006-08-01 | Quanta Comp Inc | A system and a method for decoding port data |
TW201224781A (en) * | 2010-12-02 | 2012-06-16 | Hon Hai Prec Ind Co Ltd | System and method for sharing serial ports |
CN104346271A (en) * | 2013-07-23 | 2015-02-11 | 昆达电脑科技(昆山)有限公司 | Starting up test method of automatic verification system |
CN107203460A (en) * | 2016-03-16 | 2017-09-26 | 佛山市顺德区顺达电脑厂有限公司 | For basic input output system except wrong message output intent |
TWI653528B (en) * | 2016-12-14 | 2019-03-11 | 英業達股份有限公司 | Computer system and detection method |
-
2020
- 2020-05-15 CN CN202010412921.4A patent/CN113672477B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TWI611289B (en) * | 2015-10-23 | 2018-01-11 | 神雲科技股份有限公司 | Server and error detecting method thereof |
TWI601072B (en) * | 2017-02-21 | 2017-10-01 | Thundersoft Taiwan Co Ltd | A New Way to Create Unified Extensible Firmware Interfaces |
TWI685735B (en) * | 2018-08-28 | 2020-02-21 | 神雲科技股份有限公司 | Method of displaying bios messages in the early stages of power-on self-test of computer system |
TW202111533A (en) * | 2019-09-12 | 2021-03-16 | 神雲科技股份有限公司 | Debug message automatically providing method of bios |
Also Published As
Publication number | Publication date |
---|---|
CN113672477A (en) | 2021-11-19 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6959433B1 (en) | Data processing system, method, and program for automatically testing software applications | |
US20170220278A1 (en) | Backing up firmware during initialization of device | |
US8132055B2 (en) | Operating system-firmware interface update recovery | |
US11074148B2 (en) | Method and system for visually displaying a bios message during a power-on self-test | |
CN109426613B (en) | Method for retrieving debugging data in UEFI and computer system thereof | |
CN113377586B (en) | Automatic detection method and device for server and storage medium | |
US9542304B1 (en) | Automated operating system installation | |
TWI755184B (en) | Electronic apparatus and boot method thereof | |
US7293204B2 (en) | Computer peripheral connecting interface system configuration debugging method and system | |
CN112216340A (en) | Hard disk test method and device, storage medium and electronic equipment | |
US11494289B2 (en) | Automatic framework to create QA test pass | |
CN119576420A (en) | Basic input and output system configuration method and device | |
CN109117299B (en) | Error detecting device and method for server | |
CN113672477B (en) | Debug message automatic providing method for basic input/output system | |
CN116543828B (en) | UFS protocol testing method and device, readable storage medium and electronic equipment | |
CN117311755A (en) | Linux operating system upgrading method and device | |
TWI748241B (en) | Debug message automatically providing method of bios | |
US20250173157A1 (en) | Apparatus, Device, Method, and Computer Program for a Computer System | |
US20240176887A1 (en) | Method for Running Startup Program of Electronic Device, and Electronic Device | |
US11354109B1 (en) | Firmware updates using updated firmware files in a dedicated firmware volume | |
US10216525B1 (en) | Virtual disk carousel | |
TWI660267B (en) | Boot testing apparatus, system and method thereof | |
CN111045899A (en) | Method for displaying BIOS information in early stage of computer system power-on self-test | |
TWI775360B (en) | Storage device for recording status of hardware component of computer system and computer implementation method thereof | |
US10691444B1 (en) | Launching updated firmware files stored in a dedicated firmware volume |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |