CN113010217B - BIOS parameter setting method and device, electronic equipment and storage medium - Google Patents

BIOS parameter setting method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN113010217B
CN113010217B CN202110290966.3A CN202110290966A CN113010217B CN 113010217 B CN113010217 B CN 113010217B CN 202110290966 A CN202110290966 A CN 202110290966A CN 113010217 B CN113010217 B CN 113010217B
Authority
CN
China
Prior art keywords
bios
band
parameter
parameters
historical
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202110290966.3A
Other languages
Chinese (zh)
Other versions
CN113010217A (en
Inventor
陈思彤
罗鹏芳
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shandong Yingxin Computer Technology Co Ltd
Original Assignee
Shandong Yingxin Computer Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shandong Yingxin Computer Technology Co Ltd filed Critical Shandong Yingxin Computer Technology Co Ltd
Priority to CN202110290966.3A priority Critical patent/CN113010217B/en
Publication of CN113010217A publication Critical patent/CN113010217A/en
Application granted granted Critical
Publication of CN113010217B publication Critical patent/CN113010217B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4406Loading of operating system
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The invention discloses a BIOS parameter setting method, which comprises the following steps: when the BIOS is in a PEI stage, acquiring out-of-band BIOS starting parameters from a substrate management controller; acquiring historical BIOS starting parameters, and updating the historical BIOS starting parameters by using the out-of-band BIOS starting parameters; and initializing the BIOS starting parameters of the PEI stage by using the updated historical BIOS starting parameters. The BIOS in the method can acquire the out-of-band BIOS starting parameters from the substrate management controller and set the out-of-band BIOS starting parameters to be effective at the PEI stage of the BIOS initial starting parameters, the out-of-band BIOS starting parameters can be ensured to be effective at the PEI stage, and the problem of restarting in the BIOS parameter setting link in the related technology can be effectively solved. The invention also provides a BIOS parameter setting device, electronic equipment and a computer readable storage medium, which have the beneficial effects.

Description

BIOS parameter setting method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of servers, and in particular, to a BIOS parameter setting method and apparatus, an electronic device, and a computer-readable storage medium.
Background
The BIOS (basic input output system) is an important component in the server system, stores core parameters and programs for the server to run, and can guide the server to start. In order to improve the efficiency of managing the BIOS of the server, many manufacturers have introduced a Baseboard Management Controller (BMC) into the server. The baseboard management controller can carry out remote management on the BIOS, and work efficiency in server management personnel can be improved.
In the related art, the BIOS may obtain an out-of-band BIOS start parameter from a Baseboard Management Controller (BMC) during a start-up process and update the memory, but in order to enable the out-of-band BIOS start parameter in the memory to take effect, the BIOS needs to perform an additional restart operation, which may reduce a setting efficiency of the BIOS start parameter, and also reduce a working efficiency of a server administrator due to the restart.
Disclosure of Invention
The invention aims to provide a BIOS parameter setting method, a device, electronic equipment and a computer readable storage medium, which can enable BIOS to acquire out-of-band BIOS starting parameters from a substrate management controller and set the out-of-band BIOS starting parameters to be effective at the PEI stage of BIOS initial starting parameters, can ensure that the out-of-band BIOS starting parameters are effective at the PEI stage, and can effectively avoid the problem of restarting related technologies in the BIOS parameter setting link.
In order to solve the above technical problem, the present invention provides a BIOS parameter setting method, including:
when the BIOS is in a PEI stage, acquiring out-of-band BIOS starting parameters from a substrate management controller;
acquiring historical BIOS starting parameters, and updating the historical BIOS starting parameters by using the out-of-band BIOS starting parameters;
and initializing the BIOS starting parameters of the PEI stage by using the updated historical BIOS starting parameters.
Optionally, after initializing the BIOS start parameter of the PEI phase by using the updated historical BIOS start parameter, the method further includes:
when the BIOS is in a BDS stage, updating the historical BIOS starting parameters in the memory by using the out-of-band BIOS starting parameters;
and sending the updated historical BIOS starting parameters in the memory to the baseboard management controller.
Optionally, the obtaining the out-of-band BIOS start parameter from the baseboard management controller includes:
acquiring the out-of-band BIOS starting parameter from the baseboard management controller;
and creating a handover data block list, and storing the out-of-band BIOS starting parameter into the handover data block list.
Optionally, the updating the historical BIOS startup parameters in the memory by using the out-of-band BIOS startup parameters includes:
extracting the out-of-band BIOS boot parameters from the handoff data block list;
and updating the historical BIOS starting parameters in the memory by using the out-of-band BIOS starting parameters.
Optionally, the updating the historical BIOS startup parameters in the memory by using the out-of-band BIOS startup parameters includes:
updating the historical BIOS starting parameters in the memory by using the out-of-band BIOS starting parameters;
when the out-of-band BIOS starting parameter has an update error, storing the out-of-band BIOS starting parameter with the update error into failure log data;
and sending the failure log data to the baseboard management controller.
Optionally, before saving the out-of-band BIOS start parameter with the update error into the failure log data, the method further includes:
and re-executing the operation of updating the historical BIOS starting parameters in the memory by using the out-of-band BIOS starting parameters until the error times of the out-of-band BIOS starting parameters with the errors are up to the preset times, and executing the operation of recording the out-of-band BIOS starting parameters with the errors into failure log data.
Optionally, the obtaining the out-of-band BIOS start parameter from the baseboard management controller includes:
sending an IPMI command to the baseboard management manager indicating that the out-of-band BIOS start-up parameter is requested;
and receiving the out-of-band BIOS starting parameters sent by the baseboard management controller.
The invention also provides a BIOS parameter setting device, comprising:
the parameter acquisition module is used for acquiring out-of-band BIOS starting parameters from the substrate management controller when the BIOS is in a PEI stage;
the updating module is used for acquiring historical BIOS starting parameters and updating the historical BIOS starting parameters by using the out-of-band BIOS starting parameters;
and the initialization module is used for initializing the BIOS starting parameters of the PEI stage by using the updated historical BIOS starting parameters.
The present invention also provides an electronic device, comprising:
a memory for storing a computer program;
and the processor is used for realizing the BIOS parameter setting method when executing the computer program.
The invention also provides a computer-readable storage medium, wherein computer-executable instructions are stored in the computer-readable storage medium, and when the computer-executable instructions are loaded and executed by a processor, the BIOS parameter setting method is realized.
The invention provides a BIOS parameter setting method, which comprises the following steps: when the BIOS is in a PEI stage, acquiring out-of-band BIOS starting parameters from a substrate management controller; acquiring historical BIOS starting parameters, and updating the historical BIOS starting parameters by using the out-of-band BIOS starting parameters; and initializing the BIOS starting parameters of the PEI phase by using the updated historical BIOS starting parameters.
Therefore, the BIOS in the method can acquire the out-of-band BIOS starting parameters from the substrate management controller at the PEI stage (Pre-EFI Initialization, wake-up CPU and memory Initialization stage), and since the PEI stage is the stage of BIOS Initialization starting parameters, the BIOS of the invention can directly update the historical BIOS starting parameters by using the out-of-band BIOS starting parameters acquired from the substrate management controller at the BIOS starting parameter Initialization stage, and complete the BIOS starting parameter Initialization at the PEI stage by using the updated BIOS starting parameters, so that the out-of-band BIOS starting parameters can be ensured to be effective at the PEI stage of the BIOS, the memory does not need to be read again, the problem of restarting of related technologies at the BIOS parameter setting link can be effectively avoided, the setting efficiency of the BIOS starting parameters can be effectively improved, and the working efficiency of server managers can be finally improved. The invention also provides a BIOS parameter setting device, electronic equipment and a computer readable storage medium, and has the beneficial effects.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a flowchart of a BIOS parameter setting method according to an embodiment of the present invention;
FIG. 2 is a flowchart of another BIOS parameter setting method according to an embodiment of the present invention;
fig. 3 is a block diagram of a BIOS parameter setting apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without making any creative effort based on the embodiments in the present invention, belong to the protection scope of the present invention.
The BIOS (basic input output system) is an important component in the server system, stores core parameters and programs for the server to run, and can guide the server to start. In order to improve the efficiency of managing the BIOS of the server, many manufacturers have introduced a Baseboard Management Controller (BMC) into the server. The baseboard management controller can remotely manage the BIOS, and work efficiency in a server manager can be improved.
In the related art, the BIOS acquires the out-of-band BIOS start parameter from a Baseboard Management Controller (BMC) during the start-up process and updates the memory, but in order to enable the out-of-band BIOS start parameter in the memory to take effect, the BIOS needs to perform an additional restart operation, which reduces the setting efficiency of the BIOS start parameter, and also reduces the work efficiency of the server administrator due to the restart. In view of the above, the present invention provides a BIOS parameter setting method, which enables a BIOS to obtain an out-of-band BIOS start parameter from a baseboard management controller and set the out-of-band BIOS start parameter to be valid at a PEI (Pre-EFI Initialization) stage of the BIOS Initialization start parameter, so as to ensure that the out-of-band BIOS start parameter is valid at the PEI stage, and effectively avoid the restart problem in the BIOS parameter setting process in the related art. Referring to fig. 1, fig. 1 is a method for setting BIOS parameters according to an embodiment of the present invention, where the method includes:
s101, when the BIOS is in a PEI stage, obtaining out-of-band BIOS starting parameters from a baseboard management controller.
In the related art, when the BIOS is started, the BIOS start parameter is initialized by using the historical BIOS start parameter stored in the memory, and when the initialization is finished, the out-of-band BIOS start parameter is acquired from the baseboard management controller, and the historical BIOS start parameter in the memory is updated by using the out-of-band BIOS start parameter. The historical BIOS starting parameters are variables and corresponding variable values required by BIOS starting, and the out-of-band BIOS starting parameters are BIOS starting variables and corresponding variable values which are stored in the substrate management controller and are updated and set by server management personnel. Because the BIOS has completed initialization of the start parameter, if the updated historical BIOS start parameter in the memory needs to be validated, the BIOS needs to be restarted to re-read and initialize the updated historical BIOS start parameter in the memory, so in the related art, there is an additional restart operation for setting the BIOS start parameter, and the restart operation not only reduces the setting efficiency of the BIOS start parameter, but also reduces the work efficiency of the server administrator, and brings inconvenience to the work of the administrator.
In the embodiment of the present invention, the BIOS may obtain the out-of-band BIOS start parameter from the bmc at a PEI (Pre-EFI Initialization) stage of the BIOS start-up procedure, and the PEI is the BIOS start-up parameter Initialization procedure in the BIOS start-up procedure. That is to say, the BIOS of the present invention can obtain the out-of-band BIOS start parameter from the bmc in the BIOS start parameter initialization step and set the out-of-band BIOS start parameter, so as to ensure that the out-of-band BIOS start parameter becomes valid in the BIOS start parameter initialization step, and it is not necessary to read the memory again, thereby avoiding an additional restart problem in the setting of the BIOS start parameter in the related art, effectively improving the efficiency of setting the BIOS start parameter, and finally improving the work efficiency of the server administrator.
It should be noted that, the embodiment of the present invention does not limit specific historical BIOS startup parameters and out-of-band BIOS startup parameters, and a user may refer to a related technique of the BIOS startup parameters. It can be understood that, in order to accurately initialize by using the historical BIOS startup parameters, the historical BIOS startup parameters may have MapID of a unique identification variable; similarly, in order to accurately update the historical BIOS startup parameters by using the out-of-band BIOS startup parameters, the out-of-band BIOS startup parameters may also have MapID with a unique identification variable, so that the historical BIOS startup parameters may be accurately searched and updated. It should be noted that, the invention does not limit whether the out-of-band BIOS startup parameter needs to include all the historical BIOS startup parameters or only needs to include part of the historical BIOS startup parameters, and when each historical BIOS startup parameter needs to be updated, the out-of-band BIOS startup parameter may include all the historical BIOS startup parameters; when only a portion of the historical BIOS start-up parameters need to be updated, the out-of-band BIOS start-up parameters may also only include a portion of the historical BIOS start-up parameters. In the embodiment of the invention, considering that the number of the historical BIOS starting parameters is large, a large amount of time is consumed for updating all the historical BIOS starting parameters, so that the out-of-band BIOS starting parameters only need to contain part of the historical BIOS starting parameters. It should be noted that, the embodiment of the present invention also does not limit the specific memory for storing the historical BIOS start parameters, and the user can set the historical BIOS start parameters according to the actual application requirements. In one case, the Memory may be an NVRAM (Non-Volatile Random Access Memory), a type of Memory that retains data after power is removed.
Further, the embodiment of the present invention does not limit the specific process of the BIOS obtaining the out-of-band BIOS start parameter from the bmc, and the user may refer to the related technology of IPMI (Intelligent Platform Management Interface), which is an industrial standard for monitoring the physical health characteristics of the server. In a possible case, since the bmc cannot actively communicate with the BIOS, the BIOS sends an IPMI command to the bmc, and the bmc responds the IPMI command, so that the process of obtaining the out-of-band BIOS start parameter from the bmc may include:
step 11: sending an IPMI command indicating that an out-of-band BIOS starting parameter is requested to a baseboard management manager;
step 12: and receiving the out-of-band BIOS starting parameters sent by the baseboard management controller.
It should be noted that, the embodiment of the present invention does not limit the specific IPMI command for requesting the out-of-band BIOS start parameter, as long as the command adopts the data form of the IPMI command, and the command may accurately carry the request for the out-of-band BIOS start parameter, and the user may set the command by combining the related technologies. The embodiment of the invention also does not limit the mode that the baseboard manager sends the out-of-band BIOS starting parameter, and the user can refer to the IPMI technology. The embodiment of the present invention also does not limit the form in which the baseboard management controller sends the out-of-band BIOS start-up parameters, for example, the baseboard management controller can send the out-of-band BIOS start-up parameters one by one, and can also encapsulate the BIOS start-up parameters to be sent into a JSON file to send them uniformly, where JSON (JavaScript Object notification) is a lightweight data exchange format. In consideration of the fact that sending out-of-band BIOS boot parameters one by one is not only low in transmission efficiency, but also more prone to cause a sending failure compared with unified sending due to a large number of sending times, in the embodiment of the present invention, the baseboard management controller may encapsulate the out-of-band BIOS boot parameters to be sent into the JSON file for unified sending.
Further, it should be noted that, the embodiment of the present invention does not limit whether a handover data block list needs to be created, and stores the out-of-band BIOS start parameter into the handover data block list, and starts a handover data block (HOB, hand-off Blocks) for transferring data information required by the BIOS from a PEI phase to a DXE (Driver Execution Environment) phase, and may temporarily store the out-of-band BIOS start parameter; when the out-of-band BIOS start-up parameters are received by the BIOS and can be used for updating the historical BIOS start-up parameters, the out-of-band BIOS start-up parameters do not need to be stored in the handover data block list; when the out-of-band BIOS startup parameter needs to be analyzed and extracted and then can be used to update the historical BIOS startup parameter, the out-of-band BIOS startup parameter may also be stored in the handover data block list. The substrate management controller of the embodiment of the invention adopts the JSON format to uniformly send the out-of-band BIOS starting parameters, and further analyzes the JSON file, so that the out-of-band BIOS starting parameters can be stored in the handover data block list.
In one possible case, the process of obtaining the out-of-band BIOS boot parameters from the baseboard management controller may include:
step 21: acquiring out-of-band BIOS starting parameters from a substrate management controller;
step 22: and creating a handover data block list, and saving the out-of-band BIOS starting parameters into the handover data block list.
It should be noted that the embodiment of the present invention does not limit the specific way to create the handover data block list, and the user may refer to the related art of handover data block HOB.
S102, obtaining historical BIOS starting parameters, and updating the historical BIOS starting parameters by using the out-of-band BIOS starting parameters.
It is understood that the historical BIOS startup parameters obtained in this step are all the BIOS startup parameters required for initializing the BIOS startup parameters, and the historical BIOS startup parameters are obtained by the BIOS from the memory. It should be noted that, because the BIOS can only execute an operation of reading the memory at the PEI stage, and cannot perform a write operation on the memory, in this step, the out-of-band BIOS startup parameter is used to update the historical BIOS startup parameter as follows: and updating the historical BIOS starting parameters obtained from the memory by using the out-of-band BIOS starting parameters. That is, in this step, the historical BIOS start parameters stored in the memory are not updated and modified.
It should be noted that the embodiment of the present invention does not limit the specific manner and process of updating the historical BIOS start-up parameters by using the out-of-band BIOS start-up parameters, for example, the GetVariable () function for obtaining the historical BIOS start-up parameters, which obtains the historical BIOS start-up parameters, may be repackaged, and in the repackaged obtained function, the historical BIOS start-up parameters corresponding to the out-of-band BIOS start-up parameters are searched, and the values of the historical BIOS start-up parameters corresponding to the out-of-band BIOS start-up parameters are compared, if the two are the same, the historical BIOS start-up parameters are retained, and if the two are different, the corresponding historical BIOS start-up parameters are replaced by the out-of-band BIOS start-up parameters; certainly, the update function can also be customized, the history BIOS start parameters returned by the function are extracted and obtained by using the customized update function, the update process is performed by using the out-of-band BIOS start parameters as the corresponding history BIOS start parameters, and the user can set the update function according to the actual application requirements. Considering that the GetVariable () for obtaining the BIOS startup parameters is a native function of the BIOS system, repackaging the function, and updating the historical BIOS startup parameters by using the repackaged function and the out-of-band BIOS startup parameters, which does not disturb the original functions of the BIOS and can also update the historical BIOS startup parameters more efficiently.
And S103, initializing BIOS starting parameters of a PEI stage by using the updated historical BIOS starting parameters.
After the update is completed, the variable value of the out-of-band BIOS starting parameter is written into the updated historical BIOS starting parameter, and the updated historical BIOS starting parameter is utilized to carry out BIOS starting parameter initialization in the PEI stage, so that the out-of-band BIOS starting parameter can be ensured to be effective in the PEI stage without reading the memory again, the problem that the out-of-band BIOS starting parameter can be effective only by additionally restarting in the related art can be effectively solved, the setting efficiency of the BIOS starting parameter is effectively improved, and the working efficiency of a server administrator can be improved. It should be noted that, in the embodiment of the present invention, a specific process of initializing the BIOS start parameter in the PEI phase is not limited, and a user may refer to a related technology of PEI.
Furthermore, the embodiment of the invention does not limit whether the historical BIOS starting parameters in the memory need to be updated by using the out-of-band BIOS starting parameters at other stages of the BIOS starting link, and when the BIOS does not store the latest BIOS starting parameters, the latest out-of-band BIOS starting parameters are acquired from the substrate management controller every time, and meanwhile, when the BIOS can also ensure higher starting efficiency, the historical BIOS starting parameters in the memory can not be updated; when the update frequency of the out-of-band BIOS start-up parameter is low, or the start-up efficiency of the BIOS needs to be improved, or the BIOS start-up parameter used for initialization needs to be ensured to be consistent with the historical BIOS start-up parameter in the memory, the historical BIOS start-up parameter in the memory can be updated by using the out-of-band BIOS start-up parameter at the BDS stage of the BIOS start-up link. In view of the fact that it is required to ensure that the BIOS startup parameters used for initialization are consistent with the historical BIOS startup parameters in the memory, and the update frequency of the out-of-band BIOS startup parameters is low, the BIOS updates the out-of-band BIOS startup parameters into the memory, and it is also possible to avoid the need for updating the historical BIOS startup parameters with the out-of-band BIOS startup parameters during each BIOS startup. The present invention does not limit at which other phase in the BIOS Boot link the operation of updating the historical BIOS Boot parameters in the memory is located, for example, the DXE phase and the BDS phase after the PEI phase, where the DXE (Driver Execution Environment) phase is a hardware Driver initialization phase on the server, and the BDS (Boot Device Selection) is a Selection phase of the Boot Device, and all initialization of the BIOS Boot parameters and initialization of the hardware drivers are completed in the BDS phase. In consideration of the fact that the BDS stage has completed initialization of all BIOS startup parameters and hardware drivers, that is, the out-of-band BIOS startup parameters can take effect completely, the embodiment of the present invention may update the historical BIOS startup parameters in the memory by using the out-of-band BIOS startup parameters in the BDS stage.
Based on the above embodiments, the BIOS in the method acquires the out-of-band BIOS start-up parameter from the board management controller at a PEI phase (Pre-EFI Initialization, wake-up CPU and memory Initialization phase), and since the PEI phase is a phase at which the BIOS initializes the start-up parameter, the BIOS of the present invention can directly update the history BIOS start-up parameter at the BIOS start-up parameter Initialization phase by using the out-of-band BIOS start-up parameter acquired from the board management controller, and complete the BIOS start-up parameter Initialization at the PEI phase by using the updated BIOS start-up parameter, so that the out-of-band BIOS start-up parameter can be validated at the PEI phase of the BIOS without re-reading the memory, thereby effectively avoiding the restart problem of the related art at the BIOS parameter setting step, effectively improving the setting efficiency of the BIOS start-up parameter, and finally improving the work efficiency of the server administrator.
Based on the above embodiments, another BIOS parameter setting method provided in the embodiments of the present invention is described below. Referring to fig. 2, fig. 2 is a flowchart of another BIOS parameter setting method according to an embodiment of the present invention, where the method includes:
s201, when the BIOS is in a PEI stage, obtaining out-of-band BIOS starting parameters from the baseboard management controller.
S202, obtaining historical BIOS starting parameters, and updating the historical BIOS starting parameters by using the out-of-band BIOS starting parameters.
And S203, initializing BIOS starting parameters of a PEI stage by using the updated historical BIOS starting parameters.
The definition of steps S201 to S203 is the same as that of the above embodiment, and is not described again here.
And S204, when the BIOS is in the BDS stage, updating the historical BIOS starting parameters in the memory by using the out-of-band BIOS starting parameters.
Because the initialization of all the BIOS starting parameters and the hardware drive is completed in the BDS stage, namely the out-of-band BIOS starting parameters can be completely effective, the embodiment of the invention can update the historical BIOS starting parameters in the memory by using the out-of-band BIOS starting parameters in the BDS stage so as to ensure that the historical BIOS starting parameters in the memory are consistent with the BIOS starting parameters which are actually initialized.
It should be noted that, the embodiment of the present invention does not limit the obtaining location of the out-of-band BIOS start parameter in step 204, for example, the out-of-band BIOS start parameter may be obtained from the bmc again, or the out-of-band BIOS start parameter may be extracted from the handover data block list when the BIOS stores the out-of-band BIOS start parameter to the handover data block list in the PEI phase. Since the out-of-band BIOS start parameter in the handover data block list directly participates in the initialization of the BIOS start parameter, in order to ensure that the initialized BIOS start parameter is consistent with the historical BIOS start parameter in the memory, in the embodiment of the present invention, the out-of-band BIOS start parameter is extracted from the handover data block list.
In a possible case, the updating the historical BIOS startup parameters in the memory using the out-of-band BIOS startup parameters may include:
step 31: extracting out-of-band BIOS starting parameters from the handover data block list;
step 32: and updating the historical BIOS starting parameters in the memory by using the out-of-band BIOS starting parameters.
It should be noted that, the embodiment of the present invention does not limit the specific method and process for extracting the out-of-band BIOS startup parameter from the handover data block list and updating the historical BIOS startup parameter in the memory by using the out-of-band BIOS startup parameter, for example, a callback function for setting a variable value at the BDS stage may be registered, the out-of-band BIOS startup parameter in the handover data block list is read by using the callback function, the historical BIOS startup parameter in the memory is updated by using the historical BIOS startup parameter setting function SetVariable () of the BIOS, the historical BIOS startup parameter setting function SetVariable () of the BIOS may be repackaged, the out-of-band BIOS startup parameter in the out-of-band handover data block list is extracted by using the repackaged historical BIOS startup parameter setting function, and finally the historical BIOS startup parameter in the memory is updated by using the historical BIOS startup parameter.
And S205, sending the updated historical BIOS starting parameters in the memory to the baseboard management controller.
The step aims to synchronize the historical BIOS starting parameters which are initialized and updated in the BIOS into the baseboard management controller so as to ensure that the historical BIOS starting parameters in the memory are consistent with records in the baseboard management controller.
It should be noted that the embodiment of the present invention does not limit a specific sending manner for sending the updated historical BIOS startup parameter in the memory to the baseboard management controller, for example, the updated historical BIOS startup parameter in the memory may be sent to the baseboard management controller in the form of an IPMI command, or the updated historical BIOS startup parameter in the memory may be sent to the baseboard management controller by using a USB LAN wired network card of Redfish, where Redfish is a management standard based on HTTPs service, and may perform fast file transfer. Because the file transmission rate of Redfish is high, the updated historical BIOS starting parameters in the memory can be sent to the baseboard management controller by using the USB LAN of Redfish.
Further, it is considered that an update error may occur in the process of updating the historical BIOS start-up parameter in the memory by using the out-of-band BIOS start-up parameter, and at this time, the out-of-band BIOS start-up parameter is not written into the memory, so that inconsistency between the historical BIOS start-up parameter in the memory and the actually initialized BIOS start-up parameter may be generated. In order to prompt the server administrator to reset the BIOS parameter, in the process of updating the historical BIOS startup parameter in the memory by using the out-of-band BIOS startup parameter, the out-of-band BIOS startup parameter with the update error may be recorded, so as to provide the server administrator with failure recording information.
In one possible case, the process of updating the historical BIOS start parameters in the memory using the out-of-band BIOS start parameters may include:
step 41: updating the historical BIOS starting parameters in the memory by using the out-of-band BIOS starting parameters;
step 42: when the out-of-band BIOS starting parameter has an update error, storing the out-of-band BIOS starting parameter with the update error into failure log data;
step 43: and sending the failure log data to a baseboard management controller.
It should be noted that, in the embodiment of the present invention, specific data content included in the failure log data is not limited, for example, the data content may include an out-of-band BIOS start parameter with an update error and a corresponding numerical value, may also include a unique variable identifier MapID corresponding to the out-of-band BIOS start parameter with an update error, and may also include a failure identifier of the out-of-band BIOS start parameter with an update error, and a user may set the failure identifier according to actual application requirements. It should be noted that the limited description of the sending method for sending the failure log data to the baseboard management controller is consistent with the limited description of the sending method for sending the updated historical BIOS startup parameters in the memory to the baseboard management controller, and details are not described here.
Of course, when the update error occurs in the out-of-band BIOS start parameter, the memory update operation may be executed again by using the out-of-band BIOS start parameter, so as to eliminate the interference of the accidental situation on the memory update operation. When the same out-of-band BIOS starting parameter has an update error repeatedly, because the out-of-band BIOS starting parameter has an abnormal condition, in order to not affect the update of other out-of-band BIOS starting parameters, when the failure times of the same out-of-band BIOS starting parameter reach the preset times, the memory update operation of the out-of-band BIOS starting parameter is stopped, and the out-of-band BIOS starting parameter is recorded into the failure log data.
In one possible case, before saving the out-of-band BIOS start parameter of the update error into the failure log data, the method may further include:
step 51: and re-executing the operation of updating the historical BIOS starting parameters in the memory by using the out-of-band BIOS starting parameters until the error times of the out-of-band BIOS starting parameters with the errors are up to the preset times, and recording the out-of-band BIOS starting parameters with the errors to the failure log data.
It should be noted that, the embodiment of the present invention does not limit the specific value of the preset times, and the user may set the preset times according to the actual application requirement.
Based on the embodiment, after the BIOS completes initialization of the BIOS starting parameters in the PEI stage, the BIOS updates historical BIOS starting parameters in the memory by using the out-of-band BIOS starting parameters in the BDS stage, and the memory updating operation can ensure that the historical BIOS starting parameters in the memory are consistent with the BIOS starting parameters initialized actually so as to ensure that the BIOS starting parameters used by the BIOS are consistent; meanwhile, after the updating is finished, the method also sends the updated historical BIOS starting parameters in the memory to the substrate management controller, so that the historical BIOS starting parameters in the memory can be ensured to be consistent with records in the substrate management controller.
The procedure of setting the BIOS parameters described above is explained below with reference to a specific example. In one possible case, the process of setting the BIOS parameter may include:
1. the method comprises the steps that the BIOS sends an IPMI command requesting out-of-band BIOS starting parameters to a Baseboard Management Controller (BMC) at a PEI stage of a starting link, and receives an out-of-band BIOS starting parameter BIOS _ future _ settings.json file sent by the BMC;
2. analyzing a Bios _ future _ settings.json file, creating a handover data block list HOB, and storing the analyzed out-of-band Bios start-up parameters;
3. repackaging a historical BIOS starting parameter acquisition function GetVariable () of a BIOS native function, acquiring historical BIOS starting parameters and out-of-band BIOS starting parameters in the HOB by utilizing the repackaged GetVariable (), and updating the historical BIOS starting parameters by utilizing the out-of-band BIOS starting parameters;
4. the updated historical BIOS starting parameters are used for completing initialization of the BIOS starting parameters of the PEI stage;
5. setting a callback function by using a preset variable in the BDS, acquiring an out-of-band BIOS starting parameter stored in the HOB, and updating the historical BIOS starting parameter in the NVRAM memory by using the out-of-band BIOS starting parameter through a setting function SetVariable () function of the historical BIOS starting parameter of a BIOS native function;
6. when the out-of-band BIOS starting parameter has an update error, storing the out-of-band BIOS starting parameter with the update error into the failure log data Setting _ result.json, and sending the Setting _ result.json to the substrate management controller after the update is finished;
7. and after the updating is finished, sending the updated historical BIOS starting parameter CurrentSetting.
The following describes a BIOS parameter setting apparatus, an electronic device, and a computer-readable storage medium according to embodiments of the present invention, and the BIOS parameter setting apparatus, the electronic device, and the computer-readable storage medium described below may be referred to in correspondence with the above-described BIOS parameter setting method.
Referring to fig. 3, fig. 3 is a block diagram illustrating a BIOS parameter setting apparatus according to an embodiment of the present invention, where the apparatus may include:
the parameter obtaining module 301 is configured to obtain an out-of-band BIOS start parameter from the bmc when the BIOS is in the PEI stage;
an updating module 302, configured to obtain historical BIOS start parameters, and update the historical BIOS start parameters by using the out-of-band BIOS start parameters;
the initialization module 303 is configured to initialize the BIOS start parameter in the PEI phase by using the updated historical BIOS start parameter.
Optionally, the apparatus may further include:
the memory updating module is used for updating the historical BIOS starting parameters in the memory by using the out-of-band BIOS starting parameters when the BIOS is in the BDS stage;
and the sending module is used for sending the updated historical BIOS starting parameters in the memory to the substrate management controller.
Optionally, the parameter obtaining module 301 may include:
the parameter acquisition submodule is used for acquiring out-of-band BIOS starting parameters from the substrate management controller;
and the storage submodule is used for creating a handover data block list and storing the out-of-band BIOS starting parameter into the handover data block list.
Optionally, the updating module 302 may include:
the extraction submodule is used for extracting out-of-band BIOS starting parameters from the handover data block list;
and the updating submodule is used for updating the historical BIOS starting parameters in the memory by using the out-of-band BIOS starting parameters.
Optionally, the updating sub-module may include:
the updating unit is used for updating the historical BIOS starting parameters in the memory by using the out-of-band BIOS starting parameters;
the error recording unit is used for storing the out-of-band BIOS starting parameter with the update error into the failure log data when the out-of-band BIOS starting parameter has the update error;
and the sending unit is used for sending the failure log data to the substrate management controller.
Optionally, the updating the sub-module may further include:
and the repeated updating sub-module is used for re-executing the memory updating operation on the out-of-band BIOS starting parameter with the error update until the error times of the out-of-band BIOS starting parameter with the error update reach the preset times, and executing the operation of recording the out-of-band BIOS starting parameter with the error update into the failure log data.
Optionally, the parameter obtaining module 301 includes:
the command sending submodule is used for sending an IPMI command which indicates that the out-of-band BIOS starting parameters are requested to the baseboard management manager;
and the receiving module is used for receiving the out-of-band BIOS starting parameters sent by the substrate management controller.
An embodiment of the present invention further provides an electronic device, including:
a memory for storing a computer program;
the processor is used for implementing the steps of the above-mentioned BIOS parameter setting method when executing the computer program.
Since the embodiment of the electronic device portion corresponds to the embodiment of the BIOS parameter setting method portion, please refer to the description of the embodiment of the BIOS parameter setting method portion for the embodiment of the electronic device portion, which is not repeated here.
The embodiment of the present invention further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the BIOS parameter setting method according to any of the above embodiments are implemented. If the computer program is executed by the processor, the out-of-band BIOS starting parameter is obtained from the baseboard management controller when the BIOS is in a PEI stage; acquiring historical BIOS starting parameters, and updating the historical BIOS starting parameters by using the out-of-band BIOS starting parameters; and initializing the BIOS starting parameters of the PEI phase by using the updated historical BIOS starting parameters.
The computer-readable storage medium may include: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
The embodiments are described in a progressive manner in the specification, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. The device disclosed by the embodiment corresponds to the method disclosed by the embodiment, so that the description is simple, and the relevant points can be referred to the method part for description.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the technical solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. A software module may reside in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The method, the apparatus, the electronic device and the computer-readable storage medium for setting BIOS parameters provided by the present invention are described in detail above. The principles and embodiments of the present invention are explained herein using specific examples, which are presented only to assist in understanding the method and its core concepts. It should be noted that, for those skilled in the art, it is possible to make various improvements and modifications to the present invention without departing from the principle of the present invention, and those improvements and modifications also fall within the scope of the claims of the present invention.

Claims (7)

1. A BIOS parameter setting method is characterized by comprising the following steps:
when the BIOS is in a PEI stage, acquiring out-of-band BIOS starting parameters from a substrate management controller;
acquiring historical BIOS starting parameters, and updating the historical BIOS starting parameters by using the out-of-band BIOS starting parameters;
initializing the BIOS starting parameters of the PEI stage by using the updated historical BIOS starting parameters;
after initializing the BIOS starting parameters of the PEI phase by using the updated historical BIOS starting parameters, the method further comprises the following steps:
when the BIOS is in a BDS stage, updating the historical BIOS starting parameters in the memory by using the out-of-band BIOS starting parameters;
sending the updated historical BIOS starting parameters in the memory to the baseboard management controller;
the obtaining the out-of-band BIOS startup parameter from the baseboard management controller includes:
acquiring the out-of-band BIOS starting parameter from the baseboard management controller;
creating a handover data block list and storing the out-of-band BIOS starting parameter into the handover data block list;
wherein the updating the historical BIOS start-up parameter in the memory by using the out-of-band BIOS start-up parameter comprises:
extracting the out-of-band BIOS boot parameters from the handoff data block list;
and updating the historical BIOS starting parameters in the memory by using the out-of-band BIOS starting parameters.
2. The method of claim 1, wherein the updating the historical BIOS boot parameters in memory using the out-of-band BIOS boot parameters comprises:
updating the historical BIOS starting parameters in the memory by using the out-of-band BIOS starting parameters;
when the out-of-band BIOS starting parameter has an update error, storing the out-of-band BIOS starting parameter with the update error into failure log data;
and sending the failure log data to the baseboard management controller.
3. The BIOS parameter setting method of claim 2, before saving the out-of-band BIOS boot parameter of the update error to failure log data, further comprising:
and re-executing the operation of updating the historical BIOS starting parameters in the memory by using the out-of-band BIOS starting parameters until the error times of the out-of-band BIOS starting parameters with the errors are up to the preset times, and executing the operation of recording the out-of-band BIOS starting parameters with the errors into failure log data.
4. The BIOS parameter setting method of any of claims 1 to 3, wherein the obtaining the out-of-band BIOS start-up parameter from the baseboard management controller comprises:
sending an IPMI command to the baseboard management manager indicating that the out-of-band BIOS start-up parameter is requested;
and receiving the out-of-band BIOS starting parameters sent by the baseboard management controller.
5. A BIOS parameter setting apparatus, comprising:
the parameter acquisition module is used for acquiring out-of-band BIOS starting parameters from the substrate management controller when the BIOS is in a PEI stage;
the updating module is used for acquiring historical BIOS starting parameters and updating the historical BIOS starting parameters by using the out-of-band BIOS starting parameters;
the initialization module is used for initializing the BIOS starting parameters of the PEI stage by using the updated historical BIOS starting parameters;
wherein, the device still includes:
the memory updating module is used for updating the historical BIOS starting parameters in the memory by using the out-of-band BIOS starting parameters when the BIOS is in the BDS stage;
the sending module is used for sending the updated historical BIOS starting parameters in the memory to the substrate management controller;
wherein, the parameter acquisition module includes:
the parameter acquisition sub-module is used for acquiring the out-of-band BIOS starting parameter from the baseboard management controller;
the storage submodule is used for creating a handover data block list and storing the out-of-band BIOS starting parameter into the handover data block list;
wherein the update module comprises:
an extraction submodule, configured to extract the out-of-band BIOS boot parameter from the handover data block list;
and the updating submodule is used for updating the historical BIOS starting parameters in the memory by using the out-of-band BIOS starting parameters.
6. An electronic device, comprising:
a memory for storing a computer program;
a processor for implementing the BIOS parameter setting method of any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium having stored thereon computer-executable instructions which, when loaded and executed by a processor, implement the BIOS parameter setting method of any one of claims 1 to 4.
CN202110290966.3A 2021-03-18 2021-03-18 BIOS parameter setting method and device, electronic equipment and storage medium Active CN113010217B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110290966.3A CN113010217B (en) 2021-03-18 2021-03-18 BIOS parameter setting method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110290966.3A CN113010217B (en) 2021-03-18 2021-03-18 BIOS parameter setting method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN113010217A CN113010217A (en) 2021-06-22
CN113010217B true CN113010217B (en) 2023-04-07

Family

ID=76409686

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110290966.3A Active CN113010217B (en) 2021-03-18 2021-03-18 BIOS parameter setting method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113010217B (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113672263B (en) * 2021-08-23 2024-04-23 联想(北京)有限公司 Firmware parameter updating control method and device and electronic equipment
CN114003295B (en) * 2021-10-15 2023-08-25 苏州浪潮智能科技有限公司 Method, system and device for setting memory parameters
CN113986361B (en) * 2021-10-21 2024-02-09 山东云海国创云计算装备产业创新中心有限公司 Out-of-band setting method, system and related device for BIOS options
CN114116031A (en) * 2021-11-22 2022-03-01 曙光信息产业股份有限公司 Method and device for synchronizing option parameters, computer equipment and storage medium
CN114327650B (en) * 2021-12-17 2023-08-18 苏州浪潮智能科技有限公司 SetVariable service implementation method, device and medium
US11934838B2 (en) 2022-02-09 2024-03-19 Quanta Computer Inc. Storing EFI variables in a BMC using an API

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109002330A (en) * 2018-07-27 2018-12-14 郑州云海信息技术有限公司 A kind of method, device and equipment identifying UEFI OS startup item
CN109117195A (en) * 2018-07-27 2019-01-01 郑州云海信息技术有限公司 A kind of method, device and equipment of UEFI mode adjustment boot sequence
CN110032399A (en) * 2019-04-15 2019-07-19 苏州浪潮智能科技有限公司 A kind of TPM initial method and relevant apparatus
CN111338698A (en) * 2020-02-23 2020-06-26 苏州浪潮智能科技有限公司 Method and system for accurately booting server by BIOS (basic input output System)
CN112306581A (en) * 2020-11-13 2021-02-02 苏州浪潮智能科技有限公司 Method and medium for managing Basic Input Output System (BIOS) configuration by baseboard management controller
CN112463222A (en) * 2020-11-11 2021-03-09 苏州浪潮智能科技有限公司 Data interaction method, device and equipment between server BIOS and BMC

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103412769B (en) * 2013-07-25 2017-11-21 华为技术有限公司 External card parameter configuration, equipment and system
CN103473141A (en) * 2013-09-13 2013-12-25 浪潮电子信息产业股份有限公司 Method for out-of-band check and modification of BIOS (basic input/output system) setting options
JP6404708B2 (en) * 2014-12-24 2018-10-10 Necプラットフォームズ株式会社 Information processing apparatus, BIOS setting information changing method, and computer program
CN104601373A (en) * 2015-01-05 2015-05-06 浪潮电子信息产业股份有限公司 Method for setting and synchronizing Basic Input/Output System (BIOS) configuration parameters through out-of-band mode
CN106557340B (en) * 2015-09-29 2022-11-15 中兴通讯股份有限公司 Configuration method and device
CN110187922B (en) * 2019-04-24 2023-01-10 苏州浪潮智能科技有限公司 Method, device, equipment and storage medium for setting and verifying BIOS (basic input output System) parameters

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109002330A (en) * 2018-07-27 2018-12-14 郑州云海信息技术有限公司 A kind of method, device and equipment identifying UEFI OS startup item
CN109117195A (en) * 2018-07-27 2019-01-01 郑州云海信息技术有限公司 A kind of method, device and equipment of UEFI mode adjustment boot sequence
CN110032399A (en) * 2019-04-15 2019-07-19 苏州浪潮智能科技有限公司 A kind of TPM initial method and relevant apparatus
CN111338698A (en) * 2020-02-23 2020-06-26 苏州浪潮智能科技有限公司 Method and system for accurately booting server by BIOS (basic input output System)
CN112463222A (en) * 2020-11-11 2021-03-09 苏州浪潮智能科技有限公司 Data interaction method, device and equipment between server BIOS and BMC
CN112306581A (en) * 2020-11-13 2021-02-02 苏州浪潮智能科技有限公司 Method and medium for managing Basic Input Output System (BIOS) configuration by baseboard management controller

Also Published As

Publication number Publication date
CN113010217A (en) 2021-06-22

Similar Documents

Publication Publication Date Title
CN113010217B (en) BIOS parameter setting method and device, electronic equipment and storage medium
US10002054B2 (en) Method and system for performing automatic system recovery
CN107066300B (en) Firmware upgrading method of storage device and storage device
CN110333876A (en) A kind of data clearing method and control equipment
CN112953983A (en) SFTP transmission method and device
CN106547645B (en) Method for automatically restoring image file and server system
CN115658113A (en) Server self-starting method and device, readable storage medium and electronic equipment
CN111124509B (en) Server starting method and device
CN112099825A (en) Method, device and equipment for upgrading component and storage medium
CN114205208A (en) Method, device, equipment and medium for starting servers in batches based on remote end
CN113254045A (en) Software initialization method, system and computer readable storage medium
CN108595292B (en) System optimization method, mobile terminal and computer storage medium
KR101461319B1 (en) Methods and device for upgrading firmware of set-top box
CN113553110A (en) Automatic correction method, device and system for hardware baseline of server
CN114553859A (en) BMC configuration management method and device, electronic equipment and storage medium
CN114327536A (en) Server operation and maintenance method, device, equipment and storage medium
CN109684134B (en) Method and server for rapidly deploying firmware settings among multiple devices
CN112559155A (en) Batch job processing method, system, computer device and readable storage medium
CN112667444A (en) System upgrading method, storage medium and terminal equipment
CN112241141A (en) Hardware configuration method, system, device and medium of PLC control system
CN115495161B (en) BIOS option modification validation method and device and storage medium
CN113886218B (en) Method, device, equipment and readable medium for verifying BIOS refreshing
CN116107603B (en) Firmware upgrading method and device, storage medium and electronic equipment
CN113992739B (en) Local area network OTA firmware upgrading device, method and system
CN116737513B (en) Computer hardware information acquisition method, system and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant