Default value recovery method, device and equipment of basic input and output system and computer program product
By generating test identifiers during server testing and writing configuration modification information to the variable storage area, the problem of incomplete recovery of BIOS Setup options is solved, and efficient default value recovery is achieved.
Patent Information
- Application Number
- CN202510477061.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-16
- Publication Date
- 2025-08-01
AI Technical Summary
After the server is factory tested, the BIOS Setup option is restored incompletely, causing the product to fail to meet customer usage needs.
By generating a test identifier, the configuration modification information is written to the variable storage area based on the test identifier, and the test identifier and configuration modification information are cleared after the test is completed, so as to restore the default value of the server.
Improves the efficiency and integrity of server-side default value recovery, ensuring that the BIOS Setup menu can be fully restored to the default state after testing.
Smart Images

Figure CN120407284A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of computer systems, and in particular to a method, apparatus, device, and computer program product for restoring default values of a basic input / output system. Background Art
[0002] The BIOS (Basic Input / Output System) is a set of programs embedded in a read-only memory (ROM) chip on the computer's motherboard. It stores the computer's most important basic input / output (BIO) programs, the post-boot self-test program, and the system startup program. It can also read and write detailed system configuration information. Its primary function is to provide the lowest-level, most direct hardware configuration and control for the computer. BIOS Setup is a text-based tool that allows users to configure the system and view current device settings and environmental information.
[0003] During factory testing, the factory burns the official BIOS version of the release into the BIOS Flash area of the basic input / output system (BIOS). This BIOS firmware contains a set of default BIOS Setup option configuration values. During actual testing, production line testers modify the BIOS Setup configuration information according to the test process. After verification testing is complete, the modified configuration information is manually restored to the default values. If too many BIOS Setup options need to be modified, an incomplete BIOS Setup restoration may occur.
[0004] The above content is only used to assist in understanding the technical solution of this application and does not constitute an admission that the above content is prior art. Summary of the Invention
[0005] The main purpose of this application is to provide a method, device, equipment and computer program product for restoring the default values of a basic input and output system, aiming to solve the technical problem of incomplete restoration of default values after testing the BIOS firmware.
[0006] To achieve the above objectives, the present application proposes a method for restoring the default values of a basic input / output system, which is applied to a server and includes:
[0007] generating a test identifier of the server in response to a test start request sent by the test client;
[0008] Receive the configuration modification information sent by the user, retrieve the test identifier based on the configuration modification information, write the configuration modification information into the variable storage area based on the retrieval result of the test identifier, and reset the server through the configuration modification information in the variable storage area;
[0009] In response to the test end request sent by the test end, clear the test identifier and the configuration modification information.
[0010] In one embodiment, the variable storage area includes a new variable area and an original variable area. The step of writing the configuration modification information into the variable storage area based on the retrieval result of the test identifier and resetting the server through the configuration modification information in the variable storage area includes:
[0011] If the retrieval result of the test identifier is that the test identifier exists, write the configuration modification information into the new variable area, and reset the server based on the configuration modification information in the new variable area;
[0012] If the retrieval result of the test identifier is that the test identifier does not exist, write the configuration modification information into the original variable area, and reset the server based on the configuration modification information in the original variable area.
[0013] In one embodiment, the step of writing the configuration modification information into the new variable area includes:
[0014] Perform path analysis on the configuration modification information to obtain the configuration modification path in the configuration modification information;
[0015] Generate a configuration storage key value based on the configuration modification path, and write the configuration storage key value into the new variable area in the variable storage area.
[0016] In one embodiment, the step of generating a configuration storage key value based on the configuration modification path includes:
[0017] Determine the first key value of the configuration storage key value based on the position and status of the first configuration menu in the configuration modification path;
[0018] Determine the second key value of the configuration storage key value based on the position and status of the second configuration menu in the configuration modification path;
[0019] Based on the first key value and the second key value, form the configuration storage key value of the configuration modification path.
[0020] In one embodiment, the step of resetting the server based on the configuration modification information in the new variable area includes:
[0021] Retrieve the test identifier when the server restarts, and obtain the retrieval result of the test identifier;
[0022] If the retrieval result of the test identifier is that the test identifier exists, obtain the default configuration information of the server from the original variable area in the variable storage area, and apply the default configuration information to the server;
[0023] Traverse the new variable area in the variable storage area, obtain the configuration modification information from the new variable area, overwrite the default configuration information with the configuration modification information and apply it to the server.
[0024] In one embodiment, after the step of writing the configuration modification information into the new variable area if the retrieval result of the test identifier is that the test identifier exists, the following is further included:
[0025] When the server is powered off, clear the test identifier;
[0026] When the server is powered on, traverse the original variable area to obtain the default configuration information of the server, and apply the default configuration information to the server.
[0027] In one embodiment, the method is applied to a test end, and the method includes:
[0028] Send a test start request to the server, and the server generates a test identifier based on the test start request, so that after the server obtains the configuration modification information sent by the user, retrieve the test identifier, and write the configuration modification information into the variable storage area according to the retrieval result of the test identifier, so as to reset the server through the configuration modification information in the variable storage area;
[0029] Send a test end request to the server, and the server clears the test identifier and the configuration modification information in response to the test end request.
[0030] In addition, to achieve the above object, the present application also proposes a default value recovery device for a basic input / output system, and the default value recovery device for the basic input / output system includes:
[0031] An identifier generation module, configured to generate a test identifier for the server in response to a test start request sent by the test end;
[0032] An information writing module, configured to receive the configuration modification information sent by the user, retrieve the test identifier based on the configuration modification information, write the configuration modification information into the variable storage area based on the retrieval result of the test identifier, and reset the server through the configuration modification information in the variable storage area;
[0033] A default recovery module, configured to clear the test identifier and the configuration modification information in response to a test end request sent by the test end.
[0034] In addition, to achieve the above object, the present application further provides a default value recovery device for a basic input / output system, the device including: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the default value recovery method for the basic input / output system as described above.
[0035] In addition, to achieve the above object, the present application further provides a storage medium, the storage medium being a computer-readable storage medium, on which a computer program is stored, and the computer program, when executed by a processor, implements the steps of the default value recovery method for the basic input / output system as described above.
[0036] In addition, to achieve the above object, the present application further provides a computer program product, the computer program product including a computer program, and the computer program, when executed by a processor, implements the steps of the default value recovery method for the basic input / output system as described above.
[0037] One or more technical solutions proposed by the present application have at least the following technical effects:
[0038] A default value recovery method, device, device, and computer program product for a basic input / output system proposed in an embodiment of the present application generate a test identifier of the server in response to a test start request sent by a test end; receive configuration modification information sent by a user, retrieve the test identifier based on the configuration modification information, write the configuration modification information into a variable storage area based on a retrieval result of the test identifier, reset the server through the configuration modification information in the variable storage area; and clear the test identifier and the configuration modification information in response to a test end request sent by the test end. Writing the configuration modification information into the variable storage area based on the test identifier and resetting the server through the configuration modification information can solve the problem of incomplete default value recovery after testing the BIOS firmware, and improve the efficiency and integrity of default value recovery of the server. Description of the Drawings
[0039] The drawings here are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present application, and are used together with the specification to explain the principles of the present application.
[0040] To more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the accompanying drawings required for the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.
[0041] Figure 1 It is a schematic flowchart provided for the first embodiment of the method for restoring the default value of the basic input / output system of the present application;
[0042] Figure 2 It is an example diagram of the BIOS Setup menu distribution provided for the method for restoring the default value of the basic input / output system of the present application;
[0043] Figure 3 It is an example diagram of the selection of the menu interface of the first-level menu provided for the specific embodiment of the present application;
[0044] Figure 4 It is an example diagram of the selection of the sub-menu of the first-level interface provided for the specific embodiment of the present application;
[0045] Figure 5 It is an example diagram of the selection of the sub-menu of the second-level interface provided for the specific embodiment of the present application;
[0046] Figure 6 It is an example diagram of the selection of the sub-menu of the third-level interface provided for the specific embodiment of the present application;
[0047] Figure 7 It is a schematic diagram of the data format of the configuration storage key value provided for the method for restoring the default value of the basic input / output system of the present application;
[0048] Figure 8 It is a brief flowchart of the specific implementation of the method for restoring the default value of the basic input / output system of the present application;
[0049] Figure 9 It is a schematic diagram of the module structure of the device for restoring the default value of the basic input / output system in the embodiment of the present application;
[0050] Figure 10 It is a schematic diagram of the device structure of the hardware operating environment involved in the method for restoring the default value of the basic input / output system in the embodiment of the present application.
[0051] The implementation, functional features, and advantages of the purpose of the present application will be further described with reference to the embodiments and the accompanying drawings. Detailed implementation manners
[0052] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0053] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0054] The main solution of the embodiment of the present application is: applied to the server: in response to a test start request sent by the test end, generate a test identifier of the server; receive configuration modification information sent by the user, retrieve the test identifier based on the configuration modification information, and write the configuration modification information into a variable storage area based on the retrieval result of the test identifier; in response to a test end request sent by the test end, clear the test identifier and configuration modification information.
[0055] In this embodiment, for ease of description, the following description is made by taking the basic input / output system default value restoration device as the execution subject.
[0056] The BIOS (Basic Input / Output System) is a set of programs embedded in a read-only memory (ROM) chip on the computer's motherboard. It stores the computer's most important basic input / output (BIO) programs, the post-boot self-test program, and the system startup program. It can also read and write detailed system configuration information. Its primary function is to provide the lowest-level, most direct hardware configuration and control for the computer. BIOS Setup is a text-based tool that allows users to configure the system and view current device settings and environmental information.
[0057] During factory testing, the factory burns the official BIOS version of the release into the BIOS Flash area of the basic input / output system (BIOS). This BIOS firmware contains a set of default BIOS Setup option configuration values. During actual testing, production line testers modify the BIOS Setup configuration information according to the test process and manually restore the modified configuration information to the default values after verification testing is complete. If too many BIOS Setup options require modification or due to negligence on the part of the tester, the BIOS Setup restoration may be incomplete, resulting in the product provided to the customer not meeting their needs.
[0058] The present application provides a solution that writes configuration modification information into a variable storage area based on a test identifier, and clears the test identifier and configuration modification information after the test is completed to quickly restore the default values of the server, thereby improving the efficiency and accuracy of restoring the default values of the server.
[0059] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication, and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of implementing the above functions, a default value recovery device of a basic input / output system, etc. Hereinafter, taking the default value recovery device of the basic input / output system as an example, this embodiment and the following embodiments will be described.
[0060] Based on this, an embodiment of the present application provides a method for recovering the default value of the basic input / output system. Refer to Figure 1 , Figure 1 which is a schematic flowchart of the first embodiment of the method for recovering the default value of the basic input / output system of the present application.
[0061] In this embodiment, the method for recovering the default value of the basic input / output system is applied to the server side, and the method includes steps S11 to S13:
[0062] Step S11, in response to a test start request sent by the test side, generate a test identifier of the server side.
[0063] It should be noted that the server side is the server, a high-performance computer hardware system, which is designed to provide services for multiple users or devices. The server can handle a large amount of workloads, such as storing data, running application programs, managing network resources, etc. A BIOS (Basic InputOutput System) program is solidified on a ROM chip on the main board in the server's computer.
[0064] More specifically, the BIOS is a "bridge" connecting software and hardware, and is the first program to run when the computer is turned on. It stores the most important basic input / output programs, system setting information, power-on self-test programs, and system self-start programs of the computer. It can read and write the specific information of the system settings from the CMOS. Its main function is to provide the most basic and direct hardware settings and controls for the computer. BIOS Setup is a text-based tool that allows users to configure the system and view the current settings and environmental information of the platform devices.
[0065] Additionally, it should be noted that the test terminal is a device or system used to assist factory testers in server testing. On the production line, the test terminal is the accompanying test machine used by production testers to assist in BIOS testing. It can send test instructions to the server through the network to control the server to start or end the test. In the embodiments of the present application, the test terminal can be a specific dedicated test server; it can also be an operable button on the BMC (Baseboard Manager Controller) web page, which is not limited in the present application. Among them, BMC is an embedded management subsystem, usually integrated on the server motherboard, used to monitor, manage, and maintain the hardware status of the server; through the BMC web interface, testers can remotely access and control the server side, including starting the test process.
[0066] Additionally, it should be noted that the test start request is a signal or command sent from the test terminal to the server to trigger the factory test process of the server. It is usually generated when the factory tester clicks the "Start Test" switch on the test terminal and is transmitted to the server side through the network. After receiving this instruction, the server will correspondingly adjust its state to cooperate with the test.
[0067] Additionally, it should be noted that the test identifier is a mark or status recorded by the BIOS during the startup process to indicate that the current server is in the factory test stage. The identification information is generated by the BIOS after receiving the test start request from the test terminal and acts globally. This identification information can be accessed and used throughout the BIOS startup process. Through this identification information, the BIOS and other system components can identify that it is currently in a test environment. After the test is completed, the test identifier is cleared to ensure that the server will not be affected by the settings in the test stage during subsequent normal use.
[0068] Specifically, when the tester is preparing to conduct the test, ensure that the network connection between the tester and the accompanying test machine is normal. Click the "Start Test" button on the accompanying test machine, and the accompanying test machine sends a test start request to the server through the network. After the server is powered on and starts, after receiving the test start request sent by the test terminal, it then starts the BIOS of the server. During the BIOS startup process, it checks whether it has received the test start request from the accompanying test machine. If the instruction is received, the BIOS generates a test identifier to indicate that the current server is in the factory test stage. The test identifier acts globally, and the BIOS can retrieve and use it throughout the entire test process.
[0069] Step S12: Receive the configuration modification information sent by the user, retrieve the test identifier based on the configuration modification information, write the configuration modification information into the variable storage area according to the retrieval result of the test identifier, and reset the server through the configuration modification information in the variable storage area.
[0070] It should be noted that the configuration modification information refers to the new configuration data formed after the tester modifies the relevant options in the Basic Input / Output System Setup (BIOS Setup) menu interface. It includes various setting items and their corresponding modified values. For example, it includes any BIOS setting items adjusted by the tester, such as the boot order, hardware settings, performance parameters, etc. Once these settings are modified and saved, they will constitute the "modified configuration information". The user refers to the tester.
[0071] Figure 2 FIG. [FIGURE NUMBER] is an example diagram of the BIOS Setup menu distribution provided in an embodiment of the present application. In Figure 2 it includes first-level menu interfaces such as Main, Advanced, Socket Configuration, Platform Configuration, Server Mgmt, Security, Boot, Save&Exit, etc. Each first-level menu interface contains second-level or multi-level menu interfaces, that is, Figure 2 the 2~n-level directories in , where n represents the number of the last-level menu in this first-level menu. In the BIOS, the number of sub-menus contained in each first-level menu usually does not exceed 4. The BIOS Setup menu contains display information and configuration information. The display information is to display some main parameter information such as CPU, memory, etc. This type of information is only for display, cannot be configured, and does not need to be saved in the BIOS variable area. The BIOS variable area is the variable storage area; the configuration information is the information that can be manually configured. When the information is manually changed and saved, the modified configuration information will be saved in the BIOS variable area.
[0072] In addition, it should be noted that the variable storage area refers to the BIOS variable area. In the server, the firmware program of the BIOS is stored in the flash chip on the server motherboard. A section of the BIOS variable area, also called the NVRAM variable area, is divided in the BIOS Flash chip to store the configuration information in the BIOS Setup menu. The content in this section of the BIOS variable area can ensure that the data is not lost when the server loses power. The NVRAM variable area is a specific area in the non-volatile random access memory (NVRAM) used to store variables.
[0073] Furthermore, the present application divides the variable storage area into an original variable area and a newly added variable area.
[0074] Specifically, the tester modifies the configuration of the server's BIOS through the BIOS Setup menu to generate configuration modification information. When saving the modification, the BIOS calls the Setvariable function to store the configuration modification information in the variable storage area. Before calling the Setvariable function to save the modification, the test identifier is retrieved in the server to obtain the retrieval result of the test identifier. If the retrieval result of the test identifier indicates the existence of the test identifier, the configuration modification information is written into the new variable area in the variable storage area, and the server is reset based on the configuration modification information in the new variable area; if the retrieval result of the test identifier indicates the non-existence of the test identifier, the configuration modification information is written into the original variable area in the variable storage area, and the server is reset based on the configuration modification information in the original variable area.
[0075] Among them, the Setvariable function is a function used to store configuration information in the NVRAM variable area. This function is part of the UEFI (Unified Extensible Firmware Interface) specification, which allows the firmware (such as BIOS) and the operating system to store and retrieve configuration data during the startup process and at runtime.
[0076] Step S13, in response to the test end request sent by the test terminal, clear the test identifier and the configuration modification information.
[0077] It should be noted that the test end request is a signal or command sent by the test terminal to the server to end the factory test process of the server. Usually, it is generated when the factory tester clicks the "End Test" switch on the test terminal and is transmitted to the server side through the network. After receiving this instruction, the server will end the test accordingly.
[0078] Specifically, when the tester wants to end the test process, click the "End Test" button on the accompanying test machine. The accompanying test machine sends a test end request to the server through the network. After the server receives the test end request, it clears the test identifier in the server and at the same time clears the configuration modification information stored in the new variable area of the variable storage area, and restores the default value of the BIOS.
[0079] Through the above solution in this embodiment, the configuration modification information is written into the variable storage area based on the test identifier, and the server is reset correspondingly through the configuration modification information, which can solve the problem of incomplete restoration of the default value after testing the BIOS firmware, and improve the efficiency and integrity of the restoration of the server default value.
[0080] Based on the above implementation, in a feasible implementation, the variable storage area includes a new variable area and an original variable area. The step of writing the configuration modification information into the variable storage area based on the retrieval result of the test identifier and resetting the server through the configuration modification information in the variable storage area includes S21 to S22:
[0081] Step S21, if the retrieval result of the test identifier is that the test identifier exists, write the configuration modification information into the new variable area, and reset the server based on the configuration modification information in the new variable area.
[0082] It should be noted that the variable storage area of this application includes a new variable area and an original variable area. The original variable area is the same as the original NVRAM variable area in size and function, and is used to store the default configuration information of the BIOS Setup menu interface; the new variable area is used to store the configuration modification information made by the tester to the BIOS Setup menu interface, and the data is stored in the form of key-value pairs in the new variable area.
[0083] Specifically, when the tester modifies the configuration of the BIOS through the BIOS Setup menu and generates configuration modification information, it is necessary to retrieve the test identifier in the server to determine whether it is in the test mode currently before saving the modification information. When retrieving the test identifier in the server, if the test identifier is retrieved, it means that it is in the test mode at this time, then write the configuration modification information into the new variable area in the variable storage area.
[0084] Furthermore, when the server restarts, retrieve the test identifier. When it is detected that the test identifier exists, it indicates that the current server is in the test mode. Obtain the default configuration information of the server from the original variable area in the variable storage area, and apply the default configuration information to the server; then traverse the new variable area in the variable storage area, obtain the configuration modification information from the new variable area, and overwrite the default configuration information with the configuration modification information and apply it to the server.
[0085] Step S22, if the retrieval result of the test identifier is that the test identifier does not exist, write the configuration modification information into the original variable area, and reset the server based on the configuration modification information in the original variable area.
[0086] Specifically, when retrieving the test identifier in the server, if the test identifier is not retrieved, it means that it is not in the test mode at this time, then store the configuration modification information in the original variable area in the variable storage area.
[0087] Further, when the server restarts, retrieve the test identifier. When it is detected that the test identifier does not exist, it indicates that the current server is not in the test mode. Obtain the stored configuration information from the original variable area in the variable storage area, and apply the configuration information to the server to reset the server. Optionally, the configuration information stored in the original variable area may only include default configuration information, or may include default configuration information and written configuration modification information.
[0088] Through the above solution in this embodiment, by dividing the variable storage area into an original variable area and a new variable area, determining whether it is in the test mode by retrieving the test identifier, and storing the configuration modification information correspondingly in different modes, the flexibility of information management is improved, and the efficiency and accuracy of the server default value recovery are also enhanced.
[0089] Based on the above implementation solution, in a feasible implementation manner, the step of writing the configuration modification information into the new variable area includes S31 - S32:
[0090] Step S31, perform path analysis on the configuration modification information to obtain the configuration modification path in the configuration modification information.
[0091] It should be noted that the configuration modification path refers to the path from the first-level menu to the modified position where the tester makes a modification to a certain configuration.
[0092] Specifically, analyze the configuration items included in the configuration modification information, and obtain the path of the configuration item according to the position of the modified configuration item, that is, the configuration modification path.
[0093] Step S32, generate a configuration storage key value based on the configuration modification path, and write the configuration storage key value into the new variable area in the variable storage area.
[0094] It should be noted that the configuration storage key value refers to the storage form of the configuration modification information in the new variable area. The data in the new variable area is stored in the form of key-value pairs. A key-value pair is a common data storage and representation method, which consists of two main parts: a key (Key) and a value (Value).
[0095] Further, the data format of the configuration storage key value is {Key, Value}, where Key occupies 16 bytes and stores the path information of the 2 - 5th level menus of the configuration modification information; Value also occupies 16 bytes and stores the path information of the 1st level menu of the configuration modification information, as well as the actual data value of the corresponding final menu.
[0096] Specifically, based on the position and status of the first configuration menu in the configuration modification path, determine the first key value of the configuration storage key value; based on the position and status of the second configuration menu in the configuration modification path, determine the second key value of the configuration storage key value; based on the first key value and the second key value, constitute the configuration storage key value of the configuration modification path.
[0097] Based on the above implementation, in a feasible implementation, the step of generating the configuration storage key value based on the configuration modification path includes S41 to S43:
[0098] Step S41, based on the position and status of the first configuration menu in the configuration modification path, determine the first key value of the configuration storage key value.
[0099] It should be noted that the first configuration menu refers to the first-level menu of the path where the configuration item to be modified is located.
[0100] In addition, it should be noted that the first key value of the configuration storage key value refers to the Value of the key-value pair.
[0101] Specifically, according to the first configuration menu in the configuration modification path, that is, the option position of the first-level menu in the interface, and the configuration value of the configuration item to be modified, determine the first key value Value of the configuration storage key value.
[0102] Step S42, based on the position and status of the second configuration menu in the configuration modification path, determine the second key value of the configuration storage key value.
[0103] It should be noted that the second configuration menu refers to all sub-menus under the first-level menu of the path where the configuration item to be modified is located.
[0104] In addition, it should be noted that the second key value of the configuration storage key value refers to the Key of the key-value pair.
[0105] Specifically, according to the second configuration menu in the configuration modification path, that is, the option position in the interface where all sub-menus are located under the first-level menu interface, determine the second key value Key of the configuration storage key value.
[0106] Step S43, based on the first key value and the second key value, constitute the configuration storage key value of the configuration modification path.
[0107] Specifically, the data format of the configuration storage key value is {Key, Value}, and the configuration modification key value is constituted by the first key value and the second key value.
[0108] For example, taking the modification of the configuration item "Speed Step (Pstate)" as an example, the configuration item path of the configuration item is "SocketConfiguration->Advanced Power Management Configuration–>CPU P State Control–>Speed Step (Pstate)", and this path has 4 levels of menus.
[0109] For better understanding, please refer to Figure 3 Figure 0000238 shows an example of the selection of the menu interface belonging to the first-level menu "Socket Configuration". In Figure 3 "Socket Configuration" is the fourth in the first-level interface menu, so it is 1-level interface 4; Figure 4 Figure 0000240 shows an example of the selection of the menu interface belonging to the sub-menu "Advanced Power Management Configuration" of the first-level interface. In Figure 4 "Advanced Power Management Configuration" is the sixth in the sub-menu of the first-level interface, so it is 2-level interface 6; Figure 5 Figure 0000242 shows an example of the selection of the menu interface belonging to the sub-menu "CPU P State Control" of the second-level interface. In Figure 5 "CPU P State Control" is the second in the sub-menu of the second-level interface, that is, 3-level interface 2; Figure 6 Figure 0000244 shows an example of the selection of the menu interface belonging to the sub-menu "Speed Step (Pstate)" of the third-level interface. In Figure 6 "Speed Step (Pstate)" is the fourth in the sub-menu of the third-level interface, that is, 4-level interface 4.
[0110] Please refer to Figure 7 Figure 0000248 shows a schematic diagram of the data format for storing key values of the configuration. In Figure 7 the sub-menu of the 1-level interface is the second-level menu, the sub-menu of the 2-level interface is the third-level menu, the sub-menu of the 3-level interface is the fourth-level menu, and the sub-menu of the 4-level interface is the fifth-level menu. In Figure 7 in Figure 0000250, the second key value Key occupies 16 bytes and stores the path information of the 2nd to 5th level menus of the configuration modification information; the first key value Value also occupies 16 bytes and stores the path information of the 1st level menu of the configuration modification information and the actual data value of the corresponding final menu.
[0111] Furthermore, Key occupies 16 bytes. Among them, bit12 - bit15 are the position information of the first-level interface sub-menus. For example, "Advanced Power Management Configuration" in the example is located in the sixth menu, that is, the value 6; bit8 - bit11 are the position information of the second-level interface sub-menus. For example, "CPU P State Control" in the example is located in the second menu, that is, the value 2; bit4 - bit7 are the position information of the third-level interface sub-menus. For example, "Speed Step(Pstate)" in the example is located in the fourth menu, that is, the value 4; bits0 - bit3 do not correspond to a menu, so the value is 0.
[0112] Value occupies 16 bytes. Among them, bit13 - bit15 are the position information of the first-level interface. For example, "Socket Configuration" in the example is located in the fourth menu of the first level, that is, the value 4; bits0 - bit12 are the specific data values for modification. The default value of Speed Step(Pstate) in the example is Enable. If the tester modifies the default value to Disable; if the default Enable is 0 and the modified value is 1, the value of the corresponding bits0 - bit12 is 1.
[0113] In summary, after modifying the configuration item "Speed Step(Pstate)", the configuration storage key value saved in the newly added variable area is {0x62, 0x40, 0x40, 0x01}.
[0114] Based on the above implementation solutions, in a feasible implementation manner, the step of resetting the server based on the configuration modification information in the newly added variable area further includes S51 - S53:
[0115] Step S51, retrieve the test identifier when the server restarts to obtain the retrieval result of the test identifier.
[0116] Specifically, when the BIOS of the server restarts, it is uncertain whether it is in the test mode at this time. Then, retrieve the test identifier while restarting to obtain the retrieval result of the test identifier. If the retrieval result of the test identifier is that there is a test identifier, it indicates that it is in the test mode at this time; if the retrieval result of the test identifier is that there is no test identifier, it indicates that it is not in the test mode at this time. Obtain the default configuration information of the server from the original variable area in the variable storage area and apply the default configuration information to the server to restore the default configuration of the BIOS.
[0117] Step S52, if the retrieval result of the test identifier indicates the existence of the test identifier, obtain the default configuration information of the server from the original variable area in the variable storage area, and apply the default configuration information to the server.
[0118] It should be noted that the default configuration information of the server refers to the default BIOS Setup option configuration values that the BIOS firmware had before the test.
[0119] Specifically, if the test identifier is retrieved, it indicates that the current is the test mode. The BIOS will first default to obtain the stored default configuration information of the BIOS Setup menu from the original variable area, and apply the default value information to the configuration items of the BIOS Setup menu.
[0120] Step S53, traverse the new variable area in the variable storage area, obtain the configuration modification information from the new variable area, and overwrite the default configuration information with the configuration modification information and apply it to the server.
[0121] Specifically, traverse the new variable area, obtain all the configuration modification information stored in the new variable area, parse the paths and modification statuses of the configuration items corresponding to each configuration modification information, replace the corresponding default configuration information in the BIOS Setup menu with the modification values in the configuration modification information, overwrite the corresponding default configuration information, and assign and apply it to the BIOS of the server.
[0122] Based on the above implementation solutions, in a feasible implementation manner, after the step of writing the configuration modification information into the new variable area if the retrieval result of the test identifier indicates the existence of the test identifier, steps S61 - S62 are further included:
[0123] Step S61, when the server is powered off, clear the test identifier.
[0124] It should be noted that the test identifier is single - use information, that is, after the server is powered on, the test identifier generated by the BIOS is single - use information. The server being powered off means turning off the power of the server.
[0125] Specifically, when the power of the server is turned off, clear the test identifier of the server.
[0126] Step S62, when the server is powered on, traverse the original variable area to obtain the default configuration information of the server, and apply the default configuration information to the server.
[0127] It should be noted that the server being powered on means turning on the power of the server.
[0128] Specifically, after the server is powered on again, it reads the default configuration information from the original variable area and applies the default configuration information to the server.
[0129] For example, even if the tester forgets to end the test operation, the test flag will be cleared after the server is powered off. After the server is powered on again, it reads the default configuration information from the original variable area and applies the default configuration information to the server, so that the BIOS Setup menu after power-on will not be different from the default value.
[0130] Through the above solution, in this embodiment, based on the fact that the test flag is single-use information, even if the tester forgets to end the test operation, the server can clear the test flag after the server is powered off, and will read the default configuration information after power-on again, solving the problem that the BIOS Setup menu after the test is different from the default value.
[0131] Based on the above implementation solution, in a feasible implementation manner, the method is applied to the test end, and the method includes S71 to S72:
[0132] Step S71, send a test start request to the server, and the server generates a test flag based on the test start request, so that after the server obtains the configuration modification information sent by the user, it retrieves the test flag, and writes the configuration modification information into the variable storage area according to the retrieval result of the test flag, so as to reset the server through the configuration modification information in the variable storage area.
[0133] Specifically, when the tester is about to start the test, a test start request is sent to the server. For example, click the "Start Test" button on the test end, and the test end sends the test start request to the server through the network. After the server receives the test start request, it starts the BIOS of the server. During the BIOS startup process, it checks whether it has received a test start request from the co-testing machine. If it receives the instruction, the BIOS generates a test flag, indicating that the current server is in the factory test stage. The tester modifies the configuration of the server's BIOS through the BIOS Setup menu to generate configuration modification information. When saving the modification, the BIOS calls the Setvariable function to store the configuration modification information in the variable storage area. Before calling the Setvariable function to save the modification, the test flag is retrieved in the server to obtain the retrieval result of the test flag. If the retrieval result of the test flag is that the test flag exists, the configuration modification information is written into the new variable area in the variable storage area; if the retrieval result of the test flag is that the test flag does not exist, the configuration modification information is written into the original variable area in the variable storage area. The server is reset through the configuration modification information in the variable storage area.
[0134] Step S72: Send a test end request to the server, and the server clears the test identifier and the configuration modification information in response to the test end request.
[0135] Specifically, when the tester wants to end the test process, a test end request is sent to the server. For example, by clicking the "End Test" button on the test terminal, the test terminal sends a test end request to the server through the network. After receiving the test end request, the server clears the test identifier in the server, and at the same time clears the configuration modification information stored in the new variable area of the variable storage area and restores the default value of the BIOS.
[0136] For better understanding, please refer to Figure 8 , Figure 8 which is a specific implementation brief flowchart of the default value recovery method for the basic input / output system of this application:
[0137] First, the co-testing machine (the test terminal in this application) sends an instruction of "Start Test" (the test start request in this application) to the server. After the server powers on, the BIOS starts to boot. The server receives the "Start Test" instruction sent by the co-testing machine and retrieves whether there is a test identifier in the BIOS. If there is a test identifier, the Setvariable function is called to obtain the configuration value from the new variable area; if there is no test identifier, the Setvariable function is called to obtain the configuration value from the original variable area, and the obtained configuration value is applied to the BIOS to configure the BIOS Setup menu.
[0138] Then, when the tester modifies the BIOS Setup menu options, it is retrieved whether there is a test identifier in the BIOS to determine whether the current is the test mode. If it is the test mode, the Setvariable function is called to write the modified configuration option into the new variable area; if it is not the test mode, the Setvariable function is called to write the modified configuration option into the original variable area. When the test ends, the server resets.
[0139] It should be noted that the above examples are only for understanding this application and do not constitute a limitation to the default value recovery method for the basic input / output system of this application. Based on this technical concept, more forms of simple transformations are within the protection scope of this application.
[0140] This application also provides a default value recovery device for the basic input / output system. Please refer to Figure 9 , the default value recovery device for the basic input / output system includes:
[0141] An identifier generation module 901, configured to generate a test identifier for the server in response to a test start request sent by the test terminal;
[0142] An information writing module 902, configured to receive configuration modification information sent by a user, retrieve the test identifier based on the configuration modification information, write the configuration modification information into a variable storage area based on a retrieval result of the test identifier, and reset the server through the configuration modification information in the variable storage area;
[0143] A default recovery module 903, configured to clear the test identifier and the configuration modification information in response to a test end request sent by the test end.
[0144] The default value recovery device of the basic input / output system provided in this application adopts the default value recovery method of the basic input / output system in the above embodiment, and can solve the technical problem of incomplete recovery of the default value after testing the BIOS firmware. Compared with the prior art, the beneficial effects of the default value recovery device of the basic input / output system provided in this application are the same as those of the default value recovery method of the basic input / output system provided in the above embodiment, and other technical features in the default value recovery device of the basic input / output system are the same as the features disclosed in the method of the above embodiment, and will not be elaborated here.
[0145] This application provides a default value recovery device for a basic input / output system. The default value recovery device for a basic input / output system includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the default value recovery method of the basic input / output system in the first embodiment above.
[0146] Next, refer to Figure 10 , which shows a schematic structural diagram of a default value recovery device for a basic input / output system suitable for implementing the embodiments of this application. The default value recovery device for a basic input / output system in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle terminals (such as vehicle navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 10 The shown default value recovery device for a basic input / output system is only an example, and should not bring any limitation to the functions and usage scopes of the embodiments of this application.
[0147] As Figure 10As shown, the default value recovery device of the basic input / output system may include a processing device 1001 (such as a central processing unit, a graphics processing unit, etc.), which may perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access memory (RAM) 1004. In the RAM 1004, various programs and data required for the operation of the default value recovery device of the basic input / output system are also stored. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems may be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 may allow the default value recovery device of the basic input / output system to communicate with other devices wirelessly or wiredly to exchange data. Although the figure shows a default value recovery device of the basic input / output system having various systems, it should be understood that it is not required to implement or have all the shown systems. Instead, more or fewer systems may be implemented or had.
[0148] In particular, according to the embodiments disclosed in the present application, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program codes for performing the methods shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network through the communication device, or installed from the storage device 1003, or installed from the ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the methods of the embodiments disclosed in the present application are executed.
[0149] The default value recovery device of the basic input / output system provided by this application adopts the default value recovery method of the basic input / output system in the above embodiment, and can solve the technical problem that the default values are not completely restored after testing the BIOS firmware. Compared with the prior art, the beneficial effects of the default value recovery device of the basic input / output system provided by this application are the same as those of the default value recovery method of the basic input / output system provided by the above embodiment, and other technical features in the default value recovery device of the basic input / output system are the same as the features disclosed in the method of the previous embodiment, which will not be elaborated here.
[0150] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in a suitable manner in any one or more embodiments or examples.
[0151] As mentioned above, only the specific implementation manners of this application are described, but the protection scope of this application is not limited thereto. Any person skilled in the art within the technical scope disclosed in this application can easily think of changes or substitutions, which should be covered by the protection scope of this application. Therefore, the protection scope of this application should be subject to the protection scope of the claims.
[0152] This application provides a computer-readable storage medium with computer-readable program instructions (i.e., computer programs) stored thereon, and the computer-readable program instructions are used to execute the default value recovery method of the basic input / output system in the above embodiment.
[0153] The computer-readable storage medium provided by the present application can be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or components, or any combination of the above. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM) or a flash memory, an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, device, or component. The program code contained on the computer-readable storage medium can be transmitted by any appropriate medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0154] The above computer-readable storage medium can be included in the default value recovery device of the basic input / output system; or it can exist separately without being assembled into the default value recovery device of the basic input / output system.
[0155] The above computer-readable storage medium carries one or more programs. When the one or more programs are executed by the default value recovery device of the basic input / output system, the default value recovery device of the basic input / output system is caused to: generate a test identifier of the server in response to a test start request sent by the test terminal; receive configuration modification information sent by the user, retrieve the test identifier based on the configuration modification information, write the configuration modification information into the variable storage area based on the retrieval result of the test identifier, and reset the server through the configuration modification information in the variable storage area; clear the test identifier and the configuration modification information in response to a test end request sent by the test terminal.
[0156] Computer program code for performing the operations of this application can be written in one or more programming languages or combinations thereof. The above-mentioned programming languages include object-oriented programming languages such as Java, Smalltalk, C++, and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, executed as an independent software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN: Local Area Network) or a wide area network (WAN: Wide Area Network), or it can be connected to an external computer (for example, by using an Internet service provider to connect through the Internet).
[0157] The flowcharts and block diagrams in the accompanying drawings illustrate the possible architectures, functions, and operations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in the flowchart or block diagram can represent a module, a program segment, or a part of the code, and this module, program segment, or part of the code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order from that marked in the accompanying drawings. For example, two consecutively represented blocks can actually be executed substantially in parallel, and they can sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or operations, or can be implemented by a combination of dedicated hardware and computer instructions.
[0158] The modules described in the embodiments of this application can be implemented in software or in hardware. Among them, the name of the module does not constitute a limitation to the unit itself in some cases.
[0159] The readable storage medium provided by this application is a computer-readable storage medium. The computer-readable storage medium stores computer-readable program instructions (i.e., computer programs) for performing the above-mentioned default value recovery method of the basic input / output system, and can solve the technical problem of incomplete recovery of default values after testing the BIOS firmware. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by this application are the same as those of the default value recovery method of the basic input / output system provided in the above embodiments, and will not be elaborated here.
[0160] The present application also provides a computer program product, including a computer program, and when the computer program is executed by a processor, the steps of the default value recovery method of the basic input / output system as described above are implemented.
[0161] The computer program product provided by the present application can solve the technical problem that the default value recovery after testing the BIOS firmware is incomplete. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as those of the default value recovery method of the basic input / output system provided by the above embodiments, and will not be elaborated here.
[0162] The above are only partial embodiments of the present application, and thus do not limit the patent scope of the present application. Any equivalent structural transformation made under the technical concept of the present application by using the content of the specification and drawings of the present application, or direct / indirect application in other related technical fields, is included in the patent protection scope of the present application.
Claims
1. A method for restoring the default values of a basic input / output system, characterized in that, The method is applied to a server, and the method includes: Responding to a test start request sent by a test terminal, generating a test identifier of the server; Receiving configuration modification information sent by a user, retrieving the test identifier based on the configuration modification information, writing the configuration modification information into a variable storage area based on the retrieval result of the test identifier, and resetting the server through the configuration modification information in the variable storage area; Responding to a test end request sent by the test terminal, clearing the test identifier and the configuration modification information.
2. The method according to claim 1, wherein The variable storage area includes a new variable area and an original variable area. The step of writing the configuration modification information into the variable storage area based on the retrieval result of the test identifier and resetting the server through the configuration modification information in the variable storage area includes: If the retrieval result of the test identifier is that the test identifier exists, writing the configuration modification information into the new variable area and resetting the server based on the configuration modification information in the new variable area; If the retrieval result of the test identifier is that the test identifier does not exist, writing the configuration modification information into the original variable area and resetting the server based on the configuration modification information in the original variable area.
3. The method according to claim 2, wherein The step of writing the configuration modification information into the new variable area includes: Performing path analysis on the configuration modification information to obtain a configuration modification path in the configuration modification information; Generating a configuration storage key value based on the configuration modification path and writing the configuration storage key value into the new variable area in the variable storage area.
4. The method according to claim 3, wherein The step of generating the configuration storage key value based on the configuration modification path includes: Determining a first key value of the configuration storage key value based on the position and status of a first configuration menu in the configuration modification path; Determining a second key value of the configuration storage key value based on the position and status of a second configuration menu in the configuration modification path; Constituting the configuration storage key value of the configuration modification path based on the first key value and the second key value.
5. The method according to claim 2, wherein The step of resetting the server based on the configuration modification information in the new variable area includes: Retrieving the test identifier when the server restarts to obtain a retrieval result of the test identifier; If the retrieval result of the test identifier is that the test identifier exists, obtaining default configuration information of the server from the original variable area in the variable storage area and applying the default configuration information to the server; Traversing the new variable area in the variable storage area, obtaining configuration modification information from the new variable area, and overriding the default configuration information with the configuration modification information and applying it to the server.
6. The method according to claim 2, wherein After the step of if the retrieval result of the test identifier is that the test identifier exists, writing the configuration modification information into the new variable area, further includes: Clearing the test identifier when the server powers off; When the server powers on, traversing the original variable area to obtain default configuration information of the server and applying the default configuration information to the server.
7. A method for restoring default values of a basic input / output system, characterized in that, The method is applied to a test terminal, and the method includes: Send a test start request to the server, and the server generates a test identifier based on the test start request, so that after the server obtains the configuration modification information sent by the user, it retrieves the test identifier, and writes the configuration modification information into the variable storage area according to the retrieval result of the test identifier, so as to reset the server through the configuration modification information in the variable storage area; Send a test end request to the server, and the server clears the test identifier and the configuration modification information in response to the test end request.
8. A default value restoration device for a basic input / output system, characterized in that, The device includes: An identifier generation module, configured to generate a test identifier of the server in response to a test start request sent by the test end; An information writing module, configured to receive the configuration modification information sent by the user, retrieve the test identifier based on the configuration modification information, write the configuration modification information into the variable storage area based on the retrieval result of the test identifier, and reset the server through the configuration modification information in the variable storage area; A default recovery module, configured to clear the test identifier and the configuration modification information in response to the test end request sent by the test end.
9. A default value restoration device for a basic input / output system, characterized in that, The device includes: a memory, a processor, and a computer program stored on the memory and executable on the processor, and the computer program is configured to implement the steps of the default value recovery method of the basic input / output system according to any one of claims 1 to 7.
10. A computer program product, characterized in that, The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the steps of the default value recovery method of the basic input / output system according to any one of claims 1 to 6.