A BIOS dynamic debugging method, system, storage medium and device
By setting a preset debugging level when compiling BIOS image files and storing them in CMOS, the problem of frequent switching debugging modes and recompiling BIOS image files in the existing technology is solved, and a more efficient and flexible BIOS debugging process is achieved.
Patent Information
- Application Number
- CN202210748348.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-29
- Publication Date
- 2025-04-29
- Estimated Expiration
- 2042-06-29
AI Technical Summary
When logs of different debugging levels are required in the prior art, it is necessary to frequently switch debugging modes, and the BIOS image file needs to be recompiled each time, resulting in cumbersome and inefficient operations.
When compiling the BIOS image file, the default debugging level is set to the first preset debugging level and the second preset debugging level is added, stored in CMOS, the value of the control data is obtained and confirmed through the log printing function, and the log corresponding to the preset debugging level is printed based on the numerical value.
The debugging mode can be turned on or off without recompiling and burning the BIOS image file every time, which improves the convenience and efficiency of the BIOS debugging process, increases the flexibility of debug level configuration, and saves human resources and costs.
Smart Images

Figure CN115129526B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a BIOS dynamic debugging method, system, storage medium and device. Background Art
[0002] BIOS (Basic Input / Output System) is a basic input / output system. Its main function is to initialize computer hardware and boot the operating system. It plays a very important role in the computer system. However, with the rapid development of the computer industry, the CPU (central processing unit) and other hardware devices are constantly updated, and BIOS has gradually become a bottleneck in system development. It is mainly manifested in low development efficiency, poor performance, poor functional scalability and slow upgrades, security issues, and does not support booting from addresses above 2TB on the hard disk.
[0003] Based on the above limitations, UEFI (Unified Extensible Firmware Interface) was born. It is a new standard that defines the interface between the operating system and platform firmware. The birth of UEFI has greatly promoted the application and development of BIOS. The BIOS currently used is based on the UEFI standard. If there is no special explanation, BIOS will refer to UEFI BIOS.
[0004] During the POST (power-on self-test) phase, the BIOS will print a large number of startup logs through the serial port to display the current startup phase and the initialization status of each stage of the platform. The BIOS code can control whether these logs are compiled into the Image (image file). If the BIOS turns on the Debug function, the Debug Log will be compiled and printed through the serial port during POST; if the BIOS turns off the Debug function, the Debug Log will not be compiled and no Log will be printed during POST.
[0005] In the prior art, if different debugging levels of logs are needed, the debug mode needs to be frequently turned on or off, and the BIOS image needs to be recompiled and the BIOS needs to be burned and updated each time, which is cumbersome and time-consuming. Summary of the invention
[0006] In view of this, the purpose of the present invention is to propose a BIOS dynamic debugging method, system, storage medium and device to solve the problem in the prior art that when logs of different debugging levels are required, the debugging mode needs to be frequently switched and the BIOS image file needs to be recompiled each time, resulting in cumbersome operation and low efficiency.
[0007] Based on the above purpose, the present invention provides a BIOS dynamic debugging method, comprising the following steps:
[0008] In response to compiling the BIOS image file, setting a default debugging level in the image file to be a first preset debugging level, adding a second preset debugging level in the image file, and setting a default debugging mode to be enabled;
[0009] Storing control data of the debugging mode in the CMOS, the control data including a first value corresponding to a first preset debugging level and a second value corresponding to a second preset debugging level;
[0010] Obtain the control data in CMOS through the log printing function and confirm the value of the control data;
[0011] Prints a log corresponding to the preset debug level based on the value of the control data.
[0012] In some embodiments, printing a log corresponding to a preset debugging level based on the value of the control data includes:
[0013] In response to the control data being a first value, printing a log of a first preset debugging level; or
[0014] In response to the control data being a second value, printing a log of a second preset debugging level.
[0015] In some embodiments, the method further comprises:
[0016] Add a debug mode control option in the BIOS setup interface to control whether the debug mode is turned on or off.
[0017] In some embodiments, the on state of the debug mode corresponds to a first preset debug level, and the off state of the debug mode corresponds to a second preset debug level.
[0018] Another aspect of the present invention further provides a BIOS dynamic debugging system, comprising:
[0019] A setting module configured to, in response to compiling a BIOS image file, set a default debugging level in the image file to be a first preset debugging level, add a second preset debugging level in the image file, and set a default debugging mode to be enabled;
[0020] A control data module configured to store control data of the debugging mode in the CMOS, the control data comprising a first value corresponding to a first preset debugging level and a second value corresponding to a second preset debugging level;
[0021] A value confirmation module, configured to obtain control data in the CMOS through a log printing function and confirm the value of the control data; and
[0022] The log printing module is configured to print a log corresponding to a preset debugging level based on the value of the control data.
[0023] In some embodiments, the log printing module is further configured to print a log of a first preset debugging level in response to the control data being a first value; or to print a log of a second preset debugging level in response to the control data being a second value.
[0024] In some embodiments, a debugging mode control module is also included, which is configured to add a debugging mode control option in the BIOS setting interface to control the opening or closing of the debugging mode.
[0025] In some embodiments, the on state of the debug mode corresponds to a first preset debug level, and the off state of the debug mode corresponds to a second preset debug level.
[0026] According to another aspect of the present invention, a computer-readable storage medium is provided, which stores computer program instructions, and the computer program instructions implement the above method when executed by a processor.
[0027] According to another aspect of the present invention, a computer device is provided, comprising a memory and a processor, wherein a computer program is stored in the memory, and the computer program executes the above method when executed by the processor.
[0028] The present invention has at least the following beneficial technical effects:
[0029] The present invention sets a default debugging level as a first preset debugging level in the image file when compiling a BIOS image file, adds a second preset debugging level in the image file, sets a default debugging mode, stores control data corresponding to the first preset debugging level and the second preset debugging level in CMOS, obtains the control data in CMOS through a log printing function, confirms the specific value of the control data, and prints a log corresponding to the preset debugging level based on the value of the control data, so that the debugging mode can be turned on or off without recompiling and burning the BIOS image file each time, thereby improving the convenience of the BIOS debugging process and the debugging work efficiency, while increasing the flexibility of the debugging level configuration, thereby saving related human resources and costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these drawings without paying creative work.
[0031] Figure 1 A schematic diagram of a BIOS dynamic debugging method provided according to an embodiment of the present invention;
[0032] Figure 2 A schematic diagram of a BIOS dynamic debugging system provided according to an embodiment of the present invention;
[0033] Figure 3 A schematic diagram of a computer-readable storage medium for implementing a BIOS dynamic debugging method according to an embodiment of the present invention;
[0034] Figure 4 The present invention is a schematic diagram of the hardware structure of a computer device for executing a BIOS dynamic debugging method according to an embodiment of the present invention. DETAILED DESCRIPTION
[0035] In order to make the objectives, technical solutions and advantages of the present invention more clearly understood, the embodiments of the present invention are further described in detail below in combination with specific embodiments and with reference to the accompanying drawings.
[0036] It should be noted that all expressions using "first" and "second" in the embodiments of the present invention are intended to distinguish two non-identical entities or non-identical parameters with the same name. It can be seen that "first" and "second" are only for the convenience of expression and should not be understood as limitations on the embodiments of the present invention. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, other steps or units inherent to a process, method, system, product or device that includes a series of steps or units.
[0037] Based on the above objectives, a first aspect of an embodiment of the present invention provides an embodiment of a BIOS dynamic debugging method. Figure 1 FIG. 1 is a schematic diagram of an embodiment of a BIOS dynamic debugging method provided by the present invention. Figure 1 As shown, the embodiment of the present invention includes the following steps:
[0038] Step S10, in response to compiling the BIOS image file, setting the default debugging level in the image file to be the first preset debugging level, adding the second preset debugging level in the image file, and setting the default debugging mode to be enabled;
[0039] Step S20, storing control data of the debugging mode in the CMOS, the control data including a first value corresponding to a first preset debugging level, and a second value corresponding to a second preset debugging level;
[0040] Step S30, obtaining the control data in CMOS through the log printing function, and confirming the value of the control data;
[0041] Step S40: Print a log corresponding to a preset debugging level based on the value of the control data.
[0042] BIOS (Basic Input Output System) stands for Basic Input Output System. It is an industry-standard firmware interface on IBM PC (personal computer) compatible systems. BIOS is the first software loaded when a personal computer starts up. In fact, it is a set of programs fixed to a ROM chip on the motherboard of the computer. It stores the most important basic input and output programs of the computer, the self-test program after power-on, and the system self-starting program. It can read and write specific information of system settings from CMOS. Its main function is to provide the lowest-level and most direct hardware settings and control for the computer.
[0043] CMOS, also known as complementary metal oxide semiconductor, is a voltage-controlled amplifier device and the basic unit of CMOS digital integrated circuits. In the computer field, CMOS often refers to a chip that stores basic computer startup information (such as date, time, startup settings, etc.). Sometimes people confuse CMOS with BIOS. In fact, CMOS is a readable and writable parallel or serial FLASH (flash memory) chip on the motherboard, which is used to store the hardware configuration of BIOS and the user's settings for certain parameters. Today, CMOS manufacturing technology is also used to make photosensitive elements for digital imaging equipment, especially SLR digital cameras with larger film specifications.
[0044] BIOS is software and program; CMOS is chip and hardware; CMOS parameters can be set through BIOS program; CMOS is a chip on the motherboard that stores important startup parameters and uses CMOS button battery to maintain power; CMOS stores parameters and the set parameters are written into CMOS through program to set it. The system setup program in BIOS is the means to complete CMOS parameter setting; CMOS RAM is both the storage place for BIOS to set system parameters and the result of BIOS setting system parameters.
[0045] The embodiment of the present invention sets the default debugging level as the first preset debugging level in the image file when compiling the BIOS image file, adds the second preset debugging level in the image file, sets the default debugging mode to be turned on, stores control data corresponding to the first preset debugging level and the second preset debugging level in the CMOS, obtains the control data in the CMOS through a log printing function, confirms the specific value of the control data, and prints the log corresponding to the preset debugging level based on the value of the control data, so that the debugging mode can be turned on or off without recompiling and burning the BIOS image file each time, thereby improving the convenience of the BIOS debugging process and the debugging work efficiency, while increasing the flexibility of the debugging level configuration, thereby saving related human resources and costs.
[0046] In some embodiments, printing a log corresponding to a preset debugging level based on the value of the control data includes: in response to the control data being a first value, printing a log of a first preset debugging level; or in response to the control data being a second value, printing a log of a second preset debugging level.
[0047] In some embodiments, the method further includes: adding a debugging mode control option in the BIOS setting interface to control the turning on or off of the debugging mode.
[0048] In some embodiments, the on state of the debug mode corresponds to a first preset debug level, and the off state of the debug mode corresponds to a second preset debug level.
[0049] The specific embodiment of the BIOS dynamic debugging method of the present invention is as follows:
[0050] a) When compiling the BIOS Image, Enable Debug Mode is enabled by default.
[0051] b) Set the default Debug Error Level (i.e., the first preset debug level) to 0x8100014F, which is used to control the debug level when Debug Mode is turned on.
[0052] c) Add a Debug Error Level of 0x01000000 (the second default debug level), named DEBUG_OEM, which is used to output logs when Debug Mode is turned off.
[0053] d) Added a new option Debug_Mode_Ctrl in the Setup interface to control the on / off of Debug Mode, and the default setting is Disable, which means that Debug Mode is turned off by default.
[0054] f) Select offset 0x4A in CMOS to store Debug Mode control data, and initialize the control data to 0x1 at the initial stage of BIOS POST (BIOS self-test).
[0055] g) In the PEI stage of BIOS initialization, BIOS obtains the value of Debug_Mode_Ctrl under Setup. If Debug_Mode_Ctrl is Disable, the control data in CMOS is set to 0x1 through IO Port (data input / output port) 0x70 / 71; if Debug_Mode_Ctrl is Enable, the control data in CMOS is set to 0x0 through IO Port 0x70 / 71.
[0056] h) In the PrintLog function in DebugLib (debug library), obtain the control data in CMOS.
[0057] i) If the control data is 0x1, DEBUG_OME is returned as the current Debug Error Level; if the control data is 0x0, the default Debug Error Level (0x8100014F) is returned as the current Debug Error Level. The corresponding log is output based on the current debug level.
[0058] A second aspect of the embodiments of the present invention further provides a BIOS dynamic debugging system. Figure 2 FIG. 1 is a schematic diagram of an embodiment of a BIOS dynamic debugging system provided by the present invention. Figure 2As shown, a BIOS dynamic debugging system includes: a setting module 10, configured to respond to compiling a BIOS image file, set the default debugging level in the image file to a first preset debugging level, add a second preset debugging level in the image file, and set the default debugging mode to be turned on; a control data module 20, configured to store control data of the debugging mode in CMOS, the control data including a first value corresponding to the first preset debugging level, and a second value corresponding to the second preset debugging level; a value confirmation module 30, configured to obtain the control data in the CMOS through a log printing function, and confirm the value of the control data; and a log printing module 40, configured to print a log corresponding to the preset debugging level based on the value of the control data.
[0059] BIOS (Basic Input Output System) stands for Basic Input Output System. It is an industry-standard firmware interface on IBM PC (personal computer) compatible systems. BIOS is the first software loaded when a personal computer starts up. In fact, it is a set of programs fixed to a ROM chip on the motherboard of the computer. It stores the most important basic input and output programs of the computer, the self-test program after power-on, and the system self-starting program. It can read and write specific information of system settings from CMOS. Its main function is to provide the lowest-level and most direct hardware settings and control for the computer.
[0060] CMOS, also known as complementary metal oxide semiconductor, is a voltage-controlled amplifier device and the basic unit of CMOS digital integrated circuits. In the computer field, CMOS often refers to a chip that stores basic computer startup information (such as date, time, startup settings, etc.). Sometimes people confuse CMOS with BIOS. In fact, CMOS is a readable and writable parallel or serial FLASH (flash memory) chip on the motherboard, which is used to store the hardware configuration of BIOS and the user's settings for certain parameters. Today, CMOS manufacturing technology is also used to make photosensitive elements for digital imaging equipment, especially SLR digital cameras with larger film specifications.
[0061] BIOS is software and program; CMOS is chip and hardware; CMOS parameters can be set through BIOS program; CMOS is a chip on the motherboard that stores important startup parameters and uses CMOS button battery to maintain power; CMOS stores parameters and the set parameters are written into CMOS through program to set it. The system setup program in BIOS is the means to complete CMOS parameter setting; CMOS RAM is both the storage place for BIOS to set system parameters and the result of BIOS setting system parameters.
[0062] The BIOS dynamic debugging system of the embodiment of the present invention sets the default debugging level as the first preset debugging level in the image file when compiling the BIOS image file, adds the second preset debugging level in the image file, sets the default debugging mode to be turned on, stores control data corresponding to the first preset debugging level and the second preset debugging level in the CMOS, obtains the control data in the CMOS through a log printing function, confirms the specific value of the control data, and prints the log corresponding to the preset debugging level based on the value of the control data, so that the debugging mode can be turned on or off without recompiling and burning the BIOS image file each time, thereby improving the convenience of the BIOS debugging process and the debugging work efficiency, while increasing the flexibility of the debugging level configuration, thereby saving related human resources and costs.
[0063] In some embodiments, the log printing module 40 is further configured to print a log of a first preset debugging level in response to the control data being a first value; or to print a log of a second preset debugging level in response to the control data being a second value.
[0064] In some embodiments, a debugging mode control module is also included, which is configured to add a debugging mode control option in the BIOS setting interface to control the opening or closing of the debugging mode.
[0065] In some embodiments, the on state of the debug mode corresponds to a first preset debug level, and the off state of the debug mode corresponds to a second preset debug level.
[0066] The BIOS dynamic debugging system of the embodiment of the present invention is specifically implemented as follows:
[0067] a) When compiling the BIOS Image, Enable Debug Mode is enabled by default.
[0068] b) Set the default Debug Error Level (i.e., the first preset debug level) to 0x8100014F, which is used to control the debug level when Debug Mode is turned on.
[0069] c) Add a Debug Error Level of 0x01000000 (the second default debug level), named DEBUG_OEM, which is used to output logs when Debug Mode is turned off.
[0070] d) Added a new option Debug_Mode_Ctrl in the Setup interface to control the on / off of Debug Mode, and the default setting is Disable, which means that Debug Mode is turned off by default.
[0071] f) Select offset 0x4A in CMOS to store Debug Mode control data, and initialize the control data to 0x1 at the initial stage of BIOS POST (BIOS self-test).
[0072] g) In the PEI stage of BIOS initialization, BIOS obtains the value of Debug_Mode_Ctrl under Setup. If Debug_Mode_Ctrl is Disable, the control data in CMOS is set to 0x1 through IO Port (data input / output port) 0x70 / 71; if Debug_Mode_Ctrl is Enable, the control data in CMOS is set to 0x0 through IO Port 0x70 / 71.
[0073] h) In the PrintLog function in DebugLib (debug library), obtain the control data in CMOS.
[0074] i) If the control data is 0x1, DEBUG_OME is returned as the current Debug Error Level; if the control data is 0x0, the default Debug Error Level (0x8100014F) is returned as the current Debug Error Level. The corresponding log is output based on the current debug level.
[0075] A third aspect of the embodiments of the present invention further provides a computer-readable storage medium. Figure 3 FIG. 1 is a schematic diagram showing a computer-readable storage medium for implementing a BIOS dynamic debugging method according to an embodiment of the present invention. Figure 3 As shown, the computer readable storage medium 3 stores computer program instructions 31. When the computer program instructions 31 are executed by the processor, the following steps are implemented:
[0076] In response to compiling the BIOS image file, setting a default debugging level in the image file to be a first preset debugging level, adding a second preset debugging level in the image file, and setting a default debugging mode to be enabled;
[0077] Storing control data of the debugging mode in the CMOS, the control data including a first value corresponding to a first preset debugging level and a second value corresponding to a second preset debugging level;
[0078] Obtain the control data in CMOS through the log printing function and confirm the value of the control data;
[0079] Prints a log corresponding to the preset debug level based on the value of the control data.
[0080] In some embodiments, printing a log corresponding to a preset debugging level based on the value of the control data includes: in response to the control data being a first value, printing a log of a first preset debugging level; or in response to the control data being a second value, printing a log of a second preset debugging level.
[0081] In some embodiments, the steps further include: adding a debugging mode control option in the BIOS setting interface to control the turning on or off of the debugging mode.
[0082] In some embodiments, the on state of the debug mode corresponds to a first preset debug level, and the off state of the debug mode corresponds to a second preset debug level.
[0083] It should be understood that, in the absence of mutual conflicts, all the embodiments, features and advantages described above for the BIOS dynamic debugging method according to the present invention are also applicable to the BIOS dynamic debugging system and storage medium according to the present invention.
[0084] A fourth aspect of the embodiments of the present invention further provides a computer device, including: Figure 4 The memory 402 and the processor 401 are shown, and the memory 402 stores a computer program, and when the computer program is executed by the processor 401, the method of any one of the above embodiments is implemented.
[0085] like Figure 4 FIG. 1 is a schematic diagram of the hardware structure of a computer device for executing a BIOS dynamic debugging method according to an embodiment of the present invention. Figure 4 Taking the computer device shown in FIG. 4 as an example, the computer device includes a processor 401 and a memory 402, and may also include: an input device 403 and an output device 404. The processor 401, the memory 402, the input device 403 and the output device 404 may be connected via a bus or other means. Figure 4 The example of the bus connection is taken as an example. The input device 403 can receive input digital or character information, and generate key signal input related to user settings and function control of the BIOS dynamic debugging system. The output device 404 can include display devices such as display screens.
[0086] The memory 402, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer executable programs and modules, such as the program instructions / modules corresponding to the BIOS dynamic debugging method in the embodiment of the present application. The memory 402 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of the BIOS dynamic debugging method, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some embodiments, the memory 402 may optionally include a memory remotely arranged relative to the processor 401, and these remote memories may be connected to the local module via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0087] The processor 401 executes various functional applications and data processing of the server by running the non-volatile software programs, instructions and modules stored in the memory 402, that is, implements the BIOS dynamic debugging method of the above method embodiment.
[0088] Finally, it should be noted that the computer-readable storage medium (e.g., memory) herein may be a volatile memory or a nonvolatile memory, or may include both a volatile memory and a nonvolatile memory. As an example and not by way of limitation, a nonvolatile memory may include a read-only memory (ROM), a programmable ROM (PROM), an electrically programmable ROM (EPROM), an electrically erasable programmable ROM (EEPROM), or a flash memory. A volatile memory may include a random access memory (RAM), which may act as an external cache memory. As an example and not by way of limitation, RAM may be obtained in a variety of forms, such as synchronous RAM (DRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), and direct Rambus RAM (DRRAM). The storage devices of the disclosed aspects are intended to include, but are not limited to, these and other suitable types of memory.
[0089] It will also be appreciated by those skilled in the art that various exemplary logic blocks, modules, circuits and algorithm steps described in conjunction with the disclosure herein can be implemented as electronic hardware, computer software or a combination of the two. In order to clearly illustrate this interchangeability of hardware and software, a general description has been given to the functions of various schematic components, blocks, modules, circuits and steps. Whether this function is implemented as software or hardware depends on specific applications and the design constraints imposed on the entire system. Those skilled in the art can implement the function in various ways for each specific application, but this implementation decision should not be interpreted as causing a departure from the disclosed scope of the embodiments of the present invention.
[0090] The various exemplary logic blocks, modules, and circuits described in conjunction with the disclosure herein may be implemented or executed using the following components designed to perform the functions herein: a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components, or any combination of these components. A general purpose processor may be a microprocessor, but alternatively, the processor may be any conventional processor, controller, microcontroller, or state machine. The processor may also be implemented as a combination of computing devices, for example, a combination of a DSP and a microprocessor, a plurality of microprocessors, one or more microprocessors in conjunction with a DSP, and / or any other such configuration.
[0091] The above are exemplary embodiments disclosed in the present invention, but it should be noted that various changes and modifications may be made without departing from the scope disclosed in the embodiments of the present invention as defined in the claims. The functions, steps and / or actions of the method claims according to the disclosed embodiments described herein do not need to be performed in any particular order. In addition, although the elements disclosed in the embodiments of the present invention may be described or required in individual form, they may also be understood as multiple unless explicitly limited to the singular.
[0092] It should be understood that, as used herein, the singular form "a" or "an" is intended to include the plural form as well, unless the context clearly supports an exception. It should also be understood that, as used herein, "and / or" refers to any and all possible combinations of one or more of the items listed in association. The serial numbers of the embodiments disclosed in the above embodiments of the present invention are for description only and do not represent the advantages and disadvantages of the embodiments.
[0093] A person skilled in the art should understand that the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the disclosure of the embodiments of the present invention (including the claims) is limited to these examples; under the concept of the embodiments of the present invention, the technical features in the above embodiments or different embodiments can also be combined, and there are many other changes in different aspects of the embodiments of the present invention as above, which are not provided in detail for the sake of simplicity. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present invention should be included in the protection scope of the embodiments of the present invention.
Claims
1. A BIOS dynamic debugging method, characterized in that: The following steps are involved: In response to compiling a BIOS image file, setting a default debugging level in the image file to be a first preset debugging level, adding a second preset debugging level in the image file, and setting a default debugging mode to be enabled; Storing control data of the debugging mode in the CMOS, the control data comprising a first value corresponding to the first preset debugging level and a second value corresponding to the second preset debugging level; Obtain the control data in the CMOS through a log printing function, and confirm the value of the control data; Printing a log corresponding to a preset debugging level based on the value of the control data; Wherein, printing a log corresponding to a preset debugging level based on the value of the control data comprises: in response to the control data being the first value, printing a log of the first preset debugging level; or in response to the control data being the second value, printing a log of the second preset debugging level; Adding a debugging mode control option in the BIOS setting interface to control the opening or closing of the debugging mode; The on state of the debugging mode corresponds to the first preset debugging level, and the off state of the debugging mode corresponds to the second preset debugging level.
2. A BIOS dynamic debugging system, characterized in that: include: A setting module configured to, in response to compiling a BIOS image file, set a default debugging level in the image file to be a first preset debugging level, add a second preset debugging level in the image file, and set a default debugging mode to be enabled; a control data module configured to store control data of the debugging mode in the CMOS, the control data comprising a first value corresponding to the first preset debugging level and a second value corresponding to the second preset debugging level; A value confirmation module, configured to obtain the control data in the CMOS through a log printing function and confirm the value of the control data; as well as A log printing module, configured to print a log corresponding to a preset debugging level based on the value of the control data; Wherein, the log printing module is further configured to print the log of the first preset debugging level in response to the control data being the first value; or to print the log of the second preset debugging level in response to the control data being the second value; A debugging mode control module, configured to add a debugging mode control option in the setting interface of the BIOS to control the opening or closing of the debugging mode; The on state of the debugging mode corresponds to the first preset debugging level, and the off state of the debugging mode corresponds to the second preset debugging level.
3. A computer-readable storage medium, characterized in that: Computer program instructions are stored, and when the computer program instructions are executed by a processor, the method according to claim 1 is implemented.
4. A computer device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and when the computer program is executed by the processor, the method according to claim 1 is performed.
Citation Information
Patent Citations
Log output method and system of server and related device
CN113254286A