CN114546518A - Method and device for realizing retention of BIOS (basic input output System) upgrading and downgrading configuration options - Google Patents

Method and device for realizing retention of BIOS (basic input output System) upgrading and downgrading configuration options Download PDF

Info

Publication number
CN114546518A
CN114546518A CN202210086970.2A CN202210086970A CN114546518A CN 114546518 A CN114546518 A CN 114546518A CN 202210086970 A CN202210086970 A CN 202210086970A CN 114546518 A CN114546518 A CN 114546518A
Authority
CN
China
Prior art keywords
data
data structure
bios
bmc
configuration option
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.)
Granted
Application number
CN202210086970.2A
Other languages
Chinese (zh)
Other versions
CN114546518B (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.)
Suzhou Inspur Intelligent Technology Co Ltd
Original Assignee
Suzhou Inspur Intelligent 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 Suzhou Inspur Intelligent Technology Co Ltd filed Critical Suzhou Inspur Intelligent Technology Co Ltd
Priority to CN202210086970.2A priority Critical patent/CN114546518B/en
Publication of CN114546518A publication Critical patent/CN114546518A/en
Application granted granted Critical
Publication of CN114546518B publication Critical patent/CN114546518B/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/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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention provides a method and a device for realizing BIOS upgrading and downgrading configuration option reservation, belonging to the technical field of BIOS firmware update, wherein the method comprises the following steps: presetting a first data structure and a second data structure in the BMC; the BMC stores the configuration option modification data into a first data structure body and sets the flag bit of the first data structure body; the BIOS reads the configuration option data from the first data structure body, sets the configuration option modification data into the BIOS, cancels the flag bit of the first data structure body and executes restart; the BIOS acquires the current configuration option data of the BIOS and sends the current configuration option data to the BMC to be stored in a second data structure; and executing BIOS firmware refreshing for reserving the configuration option data through the BMC inside and outside the band, and verifying the correctness of a refreshing result. The invention can realize that the configuration options can be reserved after refreshing the BIOS in-band and out-of-band refreshing, and ensure the correctness of the configuration options of the BIOS after refreshing.

Description

Method and device for realizing retention of BIOS (basic input output System) upgrading and downgrading configuration options
Technical Field
The invention belongs to the technical field of BIOS firmware updating, and particularly relates to a method and a device for realizing retention of BIOS upgrading and downgrading configuration options.
Background
With the continuous popularization and development of server technology, the performance, function and usability of a server are continuously enhanced, BIOS Setup in the server has more and more configuration options, and different clients can configure different option combinations according to their business requirements, but often face the following problems in the setting process: after the options of a plurality of nodes on an on-line or production line are set, the BIOS needs to be updated and refreshed, the original setting operation of the options needs to be carried out again, and the configuration efficiency is influenced by manpower. And secondly, after the configuration is finished, whether the setting state of the option is correct needs to be checked.
The retention of BIOS options is currently done by two schemes. The first is to use AFU tool to reserve BIOS option when in-band refresh, in this scheme, because option variable is located in NVRAM of BIOS, the refresh of this area can be skipped according to the refresh command, to realize the reservation of BIOS option, but when the option layout of the two versions before and after BIOS changes, the function of reserving parameter can not be realized, and the whole BIOS area must be refreshed forcibly. The second is to reserve BIOS options based on redfish technology, in the scheme, a BMC can store an option set json file generated after the options are set, after the BIOS is updated, the BIOS can synchronize the json file according to a condition for refreshing reserved parameters in the boot process, and update option variables in a BIOS NVRAM (random access memory), so that the BIOS options can be reserved.
Therefore, it is desirable to provide a method and an apparatus for implementing BIOS upgrade configuration option retention to overcome the above-mentioned shortcomings in the prior art.
Disclosure of Invention
Aiming at the application scene of partial configuration option modification in the prior art, the prior mode of using an AFU tool cannot reserve option parameters when the layout changes before and after BIOS refreshing, and the prior scheme of adopting a redfish technology has the defect that the stability of a product is reduced by a module needing to be introduced.
In a first aspect, the present invention provides a method for implementing BIOS upgrade configuration option reservation, including the following steps:
s1, presetting a first data structure body and a second data structure body in a BMC;
s2, when the BMC receives configuration option modification data sent by a user, the configuration option modification data are stored in a first data structure body, and a flag bit of the first data structure body is set;
s3, after learning the flag bit position of the first data structure body, the BIOS reads configuration option data from the first data structure body, sets configuration option modification data into the BIOS, cancels the flag bit position of the first data structure body, and executes restarting;
s4, the BIOS acquires the current configuration option data of the BIOS and sends the current configuration option data to the BMC to be stored in a second data structure;
s5, carrying out BIOS firmware refreshing for reserving the configuration option data through the AFU tool in the band and the BMC in the out-of-band, verifying the correctness of a refreshing result, copying the data in the second data structure of the BMC into the first data structure, and setting the flag bit of the first data structure.
Further, the step S1 specifically includes the following steps:
s11, presetting a first data structure body and a second data structure body for storing configuration option data in the BMC, and respectively setting flag bits in headers of the first data structure body and the second data structure body;
s12, setting a reserved parameter selectable item in the BMC webpage;
s13, presetting an option combination structure in the BIOS, and setting an offset and a numerical value in the option combination structure. The first data structure is used for storing the BIOS configuration options needing to be modified, and the second data structure is used for storing the current BIOS configuration options; the reserved parameters in the BMC web page may be used to select to reserve the original BIOS configuration options.
Further, the step S2 specifically includes the following steps:
s21, sending a configuration option to be modified and modified data to the BMC by the user through the IPMI write command;
and S22, the BMC stores the configuration options and the modification data which need to be modified into the first data structure body, and sets the flag bit of the first data structure body. A flag bit in the first data structure is used to indicate whether a BIOS configuration option needs to be modified.
Further, the step S3 specifically includes the following steps:
s31, after the BIOS is started, reading a zone bit from a first data structure of the BMC through an IPMI reading command, and judging whether the zone bit is set;
if yes, go to step S32;
if not, go to step S4;
s32, reading configuration options and modification data needing to be modified from the first BMC data structure body by the BIOS, and modifying the configuration options;
s33, the BIOS cancels the flag position bit of the first data structure body through the IPMI write command and executes restarting;
s34, the BMC checks whether the flag bit in the first data structure body is set;
if yes, go to step S4;
if not, the data in the first data structure body is cleared. After the BIOS is started, whether the configuration option modification is needed or not is judged through the flag bit of the first data structure body, when the modification is needed, the configuration option modification data is obtained to modify the BIOS configuration option, and after the modification is finished, the setting of the flag bit is cancelled, so that the follow-up misjudgment is prevented.
Further, the step S4 includes the following steps:
s41, the BIOS collects the current configuration option data of the BIOS and sends the current configuration option data to the BMC through an IPMI setting command;
s42, the BMC stores the current configuration option data of the BIOS into a second data structure body;
s43, setting a configuration option query interface at the BMC, and enabling a user to query the current configuration option of the BIOS from the second data structure through an IPMI acquisition command. The BIOS stores the current configuration options through a second data structure body for reserving the configuration options.
Further, the step S41 specifically includes the following steps:
s411, the BIOS acquires the current configuration option data of the BIOS and stores the current configuration option data in an option combination structure body, wherein the current configuration option data is stored in a data value, and an option combination structure body address is stored in an offset;
s412, the BIOS sends the data in the option combination structure body to the BMC through an IPMI command;
and S413, creating a temporary structural body by the BMC, storing the data in the option combination structural body, and acquiring a data value in the option combination structural body through the offset, so as to obtain the current configuration option data of the BIOS. The option combination structure body and the temporary structure body realize the butt joint of the BIOS and the data in the data structure body in the BMC.
Further, the step S5 specifically includes the following steps:
s51, judging whether in-band refreshing or out-of-band refreshing is performed on the BIOS;
if so, go to step S52;
if no, go to step S54;
s52, under an operating system, a user sends an IPMI command to the BMC in a band;
s53, copying the data in the second data structure body into the first data structure body by the BMC, setting the flag bit of the first data structure body, executing a strong-brushing BIOS instruction by the AFU tool, and entering the step S56;
s54, under an operating system, an IPMI command is sent to the BMC through out-of-band, or a parameter reservation selectable item is selected from a BMC webpage;
s55, copying the data in the second data structure body into the first data structure body by the BMC, setting the flag bit of the first data structure body, and informing the BIOS to execute firmware refreshing;
and S56, verifying the correctness of the refreshing result by the BMC. Whether the out-of-band refreshing or the in-band refreshing is carried out, the current configuration data in the second structural body is stored in the first data structural body, the zone bit of the first data structural body is located, and the BIOS configuration option is considered to be modified, so that the BIOS keeps the original configuration option to be effective, and the stability is improved.
Further, the step S56 specifically includes the following steps:
s561, after the BIOS firmware is refreshed, entering an operating system;
s562, the BMC acquires configuration option data in the second data structure, performs CRC calculation and generates first check data;
s563, the BMC acquires the current BIOS configuration option data through an IPMI command, and performs CRC calculation to generate second check data;
s564, comparing whether the first check data and the second check data are consistent;
if yes, the BIOS firmware refreshing result is correct;
if not, the BIOS firmware refreshing result is wrong. And verifying the refreshing result to ensure that the BIOS firmware is effectively refreshed.
In a second aspect, the present invention provides an apparatus for implementing BIOS upgrade configuration option preservation, including:
the data structure setting module is used for presetting a first data structure and a second data structure in the BMC;
the configuration option modification data modification module is used for storing the configuration option modification data into a first data structure body and setting a flag bit of the first data structure body when the BMC receives the configuration option modification data sent by a user;
the configuration option modification module is used for reading configuration option data from the first data structure body after the BIOS learns the flag bit position of the first data structure body, setting the configuration option modification data into the BIOS, canceling the flag bit position of the first data structure body and executing restart;
the current configuration option data acquisition module is used for acquiring current configuration option data of the BIOS and sending the current configuration option data to the BMC to be stored in the second data structure;
and the configuration option retention and refresh module is used for executing BIOS firmware refresh of retention configuration option data through the AFU tool in band and the BMC in band, verifying the correctness of a refresh result, copying data in the second data structure of the BMC into the first data structure, and setting the flag bit of the first data structure.
Further, the data structure body setting module includes:
the BMC in-structure setting unit is used for presetting a first data structure body and a second data structure body for storing configuration option data in the BMC, and respectively setting flag bits in headers of the first data structure body and the second data structure body;
the BMC web page selectable item setting unit is used for setting a reserved parameter selectable item in the BMC web page;
the BIOS structure setting unit is used for presetting an option combination structure in the BIOS and setting offset and a numerical value in the option combination structure;
the configuration option modification data modification module comprises:
the configuration option modification data writing unit is used for sending the configuration option to be modified and the modification data to the BMC by a user through an IPMI writing command;
the configuration option modification marking unit is used for storing the configuration options and the modification data which need to be modified into the first data structure body by the BMC and setting the flag bit of the first data structure body;
the configuration option modification module comprises:
the flag bit judging unit is used for reading the flag bit from the first data structure of the BMC through the IPMI reading command after the BIOS is started and judging whether the flag bit is set or not;
the configuration option modification unit is used for reading configuration options and modification data to be modified from the first data structure body of the BMC by the BIOS when the mark is set, and modifying the configuration options;
a configuration option modification mark canceling unit, configured to cancel the flag bit of the first data structure by the BIOS through the IPMI write command, and perform a restart;
the flag bit checking unit is used for checking whether the flag bit in the first data structure body is set or not by the BMC;
the configuration option modification data clearing unit is used for clearing data in the first data structure body when the flag bit in the first data structure body is not set;
the current configuration option data acquisition module comprises:
the current configuration option sending unit is used for collecting the current configuration option data of the BIOS and sending the current configuration option data to the BMC through an IPMI setting command;
the current configuration option storage unit is used for storing the BIOS current configuration option data into the second data structure body by the BMC;
the current configuration option query unit is used for setting a configuration option query interface at the BMC, and a user can query the BIOS current configuration option from the second data structure body through an IPMI acquisition command;
the configuration option retention refresh module comprises:
a refresh mode determination unit for determining whether to perform in-band refresh or out-of-band refresh on the BIOS;
the in-band command sending unit is used for sending an IPMI command to the BMC in-band by a user under an operating system when in-band refreshing;
the first refreshing unit is used for copying the data in the second data structure body into the first data structure body by the BMC, setting the flag bit of the first data structure body and executing a strong-refreshing BIOS instruction by the AFU tool;
the system comprises an out-of-band command sending unit, a BMC and a parameter selection unit, wherein the out-of-band command sending unit is used for sending an IPMI command to the BMC in an out-of-band mode under an operating system or selecting a parameter reservation option in a BMC webpage when in out-of-band refreshing;
the second refreshing unit is used for copying the data in the second data structure body into the first data structure body by the BMC, setting the flag bit of the first data structure body and informing the BIOS to execute firmware refreshing;
and the refreshing result correctness verifying unit is used for verifying the correctness of the refreshing result by the BMC.
The invention has the beneficial effects that:
according to the method and the device for realizing the retention of the BIOS upgrading and downgrading configuration options, the retention of the refreshed configuration options can be realized for the application scene of the BIOS configuration options needing to be modified, whether the BIOS is refreshed in-band or out-of-band, the correctness of the refreshed BIOS configuration options is ensured, and the usability and the stability of products are improved.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
Therefore, compared with the prior art, the invention has prominent substantive features and remarkable progress, and the beneficial effects of the implementation are also obvious.
Drawings
In order to more clearly illustrate the embodiments or prior art solutions of the present invention, the drawings used in the description of the embodiments or prior art will be briefly described below, and it is obvious for those skilled in the art to obtain other drawings without creative efforts.
Fig. 1 is a flowchart illustrating an embodiment 1 of a method for implementing BIOS upgrade configuration option retention according to the present invention.
Fig. 2 is a flow chart of embodiment 2 of the method for implementing BIOS upgrade configuration option preservation according to the present invention.
FIG. 3 is a schematic diagram of an apparatus for implementing BIOS upgrade configuration option preservation according to the present invention.
In the figure, 1-data structure body setting module; 1.1-a structure setting unit in BMC; 1.2-BMC web page selectable item setting unit; 1.3-structural body setting unit in BIOS; 2-configuration option modification data modification module; 2.1-configuration options modify data write units; 2.2-configuration options modify flag cells; 3-configuration option modification module; 3.1-flag bit judging unit; 3.2-configuration options modification unit; 3.3-configuration options modify flag cancel unit; 3.4-flag bit checking unit; 3.5-configuration options modify data purge units; 4-current configuration option data acquisition module; 4.1 — current configuration option sending unit; 4.2 — current configuration option save unit; 4.3 — current configuration option query unit; 5-configuration option retention refresh module; 5.1-a refresh mode judgment unit; 5.2-in-band command sending unit; 5.3 — a first refresh unit; 5.4-out-of-band command sending unit; 5.5-a second refresh unit; 5.6-Refresh result correctness verification Unit.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiment of the present invention will be clearly and completely described below with reference to the drawings in the embodiment of the present invention, and it is obvious that the described embodiment is only a part of the embodiment of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The AFU tool is called AMI Aptio AFU in its entirety, and is a BIOS refreshing toolkit.
redfish is an open industry standard specification, and provides simple, modern and safe management functions for extensible platform hardware; is a hypermedia API so it can represent various implementations through a consistent interface.
Example 1:
as shown in fig. 1, the present invention provides a method for implementing BIOS upgrade configuration option retention, including the following steps:
s1, presetting a first data structure body and a second data structure body in a BMC;
s2, when the BMC receives configuration option modification data sent by a user, the configuration option modification data are stored in a first data structure body, and a flag bit of the first data structure body is set;
s3, after learning the flag bit position of the first data structure body, the BIOS reads configuration option data from the first data structure body, sets configuration option modification data into the BIOS, cancels the flag bit position of the first data structure body, and executes restarting;
s4, the BIOS acquires the current configuration option data of the BIOS and sends the current configuration option data to the BMC to be stored in a second data structure;
s5, carrying out BIOS firmware refreshing for reserving the configuration option data through the AFU tool in the band and the BMC in the out-of-band, verifying the correctness of a refreshing result, copying the data in the second data structure of the BMC into the first data structure, and setting the flag bit of the first data structure.
Example 2:
as shown in fig. 2, the present invention provides a method for implementing BIOS upgrade configuration option retention, which includes the following steps:
s1, presetting a first data structure body and a second data structure body in a BMC; the method comprises the following specific steps:
s11, presetting a first data structure body and a second data structure body for storing configuration option data in the BMC, and respectively setting flag bits in headers of the first data structure body and the second data structure body;
s12, setting a reserved parameter selectable item in the BMC webpage;
s13, presetting an option combination structure in the BIOS, and setting an offset and a numerical value in the option combination structure;
s2, when the BMC receives configuration option modification data sent by a user, the configuration option modification data are stored in a first data structure body, and a flag bit of the first data structure body is set; the method comprises the following specific steps:
s21, sending a configuration option to be modified and modified data to the BMC by the user through the IPMI write command;
s22, the BMC stores the configuration options and the modification data to be modified into a first data structure body, and sets the flag bit of the first data structure body;
s3, after learning the flag bit position of the first data structure body, the BIOS reads configuration option data from the first data structure body, sets configuration option modification data into the BIOS, cancels the flag bit position of the first data structure body, and executes restarting; the method comprises the following specific steps:
s31, after the BIOS is started, reading a zone bit from a first data structure of the BMC through an IPMI reading command, and judging whether the zone bit is set;
if yes, go to step S32;
if not, go to step S4;
s32, reading configuration options and modification data which need to be modified from the first data structure body of the BMC by the BIOS, and modifying the configuration options;
s33, the BIOS cancels the flag position bit of the first data structure through the IPMI write command and executes restarting;
s34, the BMC checks whether the flag bit in the first data structure body is set;
if yes, go to step S4;
if not, clearing the data in the first data structure body;
s4, the BIOS acquires the current configuration option data of the BIOS and sends the current configuration option data to the BMC to be stored in a second data structure; the method comprises the following specific steps:
s41, the BIOS collects the current configuration option data of the BIOS and sends the current configuration option data to the BMC through an IPMI setting command; the method comprises the following specific steps:
s411, the BIOS acquires the current configuration option data of the BIOS and stores the current configuration option data in an option combination structure body, wherein the current configuration option data is stored in a data value, and an option combination structure body address is stored in an offset;
s412, the BIOS sends the data in the option combination structure body to the BMC through an IPMI command;
s413, establishing a temporary structure by the BMC, storing data in the option combination structure, and acquiring a data value in the option combination structure through the offset, so as to obtain current configuration option data of the BIOS;
s42, the BMC stores the current configuration option data of the BIOS into a second data structure body;
s43, setting a configuration option query interface in the BMC, and enabling a user to query the current configuration option of the BIOS from the second data structure through an IPMI acquisition command;
s5, carrying out BIOS firmware refreshing for reserving the configuration option data through the AFU tool in the band and the BMC in the out-of-band, verifying the correctness of a refreshing result, copying data in a second data structure of the BMC into a first data structure, and setting a flag bit of the first data structure; the method comprises the following specific steps:
s51, judging whether in-band refreshing or out-of-band refreshing is performed on the BIOS;
if so, go to step S52;
if no, go to step S54;
s52, under an operating system, a user sends an IPMI command to the BMC in a band;
s53, copying the data in the second data structure body into the first data structure body by the BMC, setting the flag bit of the first data structure body, executing a strong-brushing BIOS instruction by the AFU tool, and entering the step S56;
s54, under an operating system, an IPMI command is sent to the BMC through out-of-band, or a parameter reservation selectable item is selected from a BMC webpage;
s55, copying the data in the second data structure body into the first data structure body by the BMC, setting the flag bit of the first data structure body, and informing the BIOS to execute firmware refreshing;
s56, verifying the correctness of the refreshing result by the BMC; the method comprises the following specific steps:
s561, after the BIOS firmware is refreshed, entering an operating system;
s562, the BMC acquires configuration option data in the second data structure, performs CRC calculation and generates first check data;
s563, the BMC acquires the current BIOS configuration option data through an IPMI command, and performs CRC calculation to generate second check data;
s564, comparing whether the first check data and the second check data are consistent;
if yes, the BIOS firmware refreshing result is correct;
if not, the BIOS firmware refreshing result is wrong.
Example 3:
as shown in fig. 3, the present invention provides an apparatus for implementing BIOS upgrade configuration option preservation, including:
the data structure setting module 1 is used for presetting a first data structure and a second data structure in the BMC; the data structure body setting module 1 includes:
a structure setting unit 1.1 in the BMC, configured to preset a first data structure and a second data structure for storing configuration option data in the BMC, and set flag bits in headers of the first data structure and the second data structure, respectively;
a BMC web page selectable item setting unit 1.2, configured to set a retention parameter selectable item in a BMC web page;
the BIOS structure setting unit 1.3 is used for presetting an option combination structure in the BIOS and setting offset and a numerical value in the option combination structure;
the configuration option modification data modification module 2 is used for saving the configuration option modification data into a first data structure body and setting a flag bit of the first data structure body when the BMC receives the configuration option modification data sent by a user; the configuration option modification data modification module 2 comprises:
the configuration option modification data writing unit 2.1 is used for sending the configuration option to be modified and the modification data to the BMC by the user through the IPMI writing command;
the configuration option modification marking unit 2.2 is used for storing the configuration options and the modification data which need to be modified into the first data structure body by the BMC and setting the flag bit of the first data structure body;
the configuration option modification module 3 is used for reading configuration option data from the first data structure body after the BIOS learns the flag bit position of the first data structure body, setting the configuration option modification data into the BIOS, canceling the flag bit position of the first data structure body and restarting; the configuration option modification module 3 includes:
the zone bit judging unit 3.1 is used for reading the zone bit from the first data structure of the BMC through an IPMI reading command after the BIOS is started and judging whether the zone bit is set;
the configuration option modification unit 3.2 is used for reading configuration options and modification data to be modified from the first data structure body of the BMC by the BIOS when the flag is set, and modifying the configuration options;
a configuration option modification mark canceling unit 3.3, configured to cancel the flag bit of the first data structure by the BIOS through the IPMI write command, and perform a restart;
a flag bit checking unit 3.4 for BMC checking whether the flag bit in the first data structure is set;
a configuration option modification data clearing unit 3.5, configured to clear data in the first data structure when the flag bit in the first data structure is not set;
the current configuration option data acquisition module 4 is used for the BIOS to acquire the current configuration option data of the BIOS and send the current configuration option data to the BMC to be stored in the second data structure; the current configuration option data acquisition module 4 includes:
the current configuration option sending unit 4.1 is used for collecting the current configuration option data of the BIOS and sending the current configuration option data to the BMC through the IPMI setting command;
a current configuration option storage unit 4.2, which is used for the BMC to store the BIOS current configuration option data into the second data structure;
a current configuration option query unit 4.3, configured to set a configuration option query interface at the BMC, and a user may query the BIOS current configuration option from the second data structure through an IPMI acquisition command;
the configuration option retention and refresh module 5 is used for executing BIOS firmware refresh of retention configuration option data through the AFU tool in band and the BMC in band, verifying the correctness of a refresh result, copying data in a second data structure of the BMC into a first data structure, and setting a flag bit of the first data structure; the configuration option retention refresh module 5 includes:
a refresh mode judgment unit 5.1 for judging whether to execute in-band refresh or out-of-band refresh on the BIOS;
the in-band command sending unit 5.2 is used for sending the IPMI command to the BMC in-band by a user under an operating system when in-band refreshing;
the first refreshing unit 5.3 is used for copying the data in the second data structure body into the first data structure body by the BMC, setting the flag bit of the first data structure body and executing a strong-refreshing BIOS instruction by the AFU tool;
the out-of-band command sending unit 5.4 is used for sending an IPMI command to the BMC in an out-of-band mode under an operating system or selecting a reserved parameter selectable item in a BMC webpage when the out-of-band refreshing is carried out;
the second refreshing unit 5.5 is used for copying the data in the second data structure body into the first data structure body by the BMC, setting the flag bit of the first data structure body and informing the BIOS to execute firmware refreshing;
and the refreshing result correctness verifying unit 5.6 is used for verifying the correctness of the refreshing result by the BMC.
Although the present invention has been described in detail by referring to the drawings in connection with the preferred embodiments, the present invention is not limited thereto. Various equivalent modifications or substitutions can be made on the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and these modifications or substitutions are within the scope of the present invention/any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (10)

1. A method for realizing BIOS upgrading and downgrading configuration option retention is characterized by comprising the following steps:
s1, presetting a first data structure body and a second data structure body in a BMC;
s2, when the BMC receives configuration option modification data sent by a user, the configuration option modification data are stored in a first data structure body, and a flag bit of the first data structure body is set;
s3, after learning the flag bit position of the first data structure body, the BIOS reads configuration option data from the first data structure body, sets configuration option modification data into the BIOS, cancels the flag bit position of the first data structure body, and executes restarting;
s4, the BIOS acquires the current configuration option data of the BIOS and sends the current configuration option data to the BMC to be stored in a second data structure;
s5, carrying out BIOS firmware refreshing for reserving the configuration option data through the AFU tool in the band and the BMC in the out-of-band, verifying the correctness of a refreshing result, copying the data in the second data structure of the BMC into the first data structure, and setting the flag bit of the first data structure.
2. The method for implementing BIOS upgrade configuration option preservation according to claim 1, wherein step S1 specifically includes the following steps:
s11, presetting a first data structure body and a second data structure body for storing configuration option data in the BMC, and respectively setting flag bits in headers of the first data structure body and the second data structure body;
s12, setting a reserved parameter selectable item in the BMC webpage;
s13, presetting an option combination structure in the BIOS, and setting an offset and a numerical value in the option combination structure.
3. The method for implementing BIOS upgrade configuration option preservation according to claim 2, wherein step S2 includes the following steps:
s21, sending a configuration option to be modified and modified data to the BMC by the user through the IPMI write command;
and S22, the BMC stores the configuration options and the modification data which need to be modified into the first data structure body, and sets the flag bit of the first data structure body.
4. The method of claim 3, wherein step S3 is as follows:
s31, after the BIOS is started, reading a zone bit from a first data structure of the BMC through an IPMI reading command, and judging whether the zone bit is set;
if yes, go to step S32;
if not, go to step S4;
s32, reading configuration options and modification data needing to be modified from the first BMC data structure body by the BIOS, and modifying the configuration options;
s33, the BIOS cancels the flag position bit of the first data structure body through the IPMI write command and executes restarting;
s34, the BMC checks whether the flag bit in the first data structure body is set;
if yes, go to step S4;
if not, the data in the first data structure body is cleared.
5. The method of claim 4, wherein step S4 is as follows:
s41, the BIOS collects the current configuration option data of the BIOS and sends the current configuration option data to the BMC through an IPMI setting command;
s42, the BMC stores the current configuration option data of the BIOS into a second data structure body;
s43, setting a configuration option query interface at the BMC, and enabling a user to query the current configuration option of the BIOS from the second data structure through an IPMI acquisition command.
6. The method of claim 5, wherein step S41 is as follows:
s411, the BIOS acquires the current configuration option data of the BIOS and stores the current configuration option data in an option combination structure body, wherein the current configuration option data is stored in a data value, and an option combination structure body address is stored in an offset;
s412, the BIOS sends the data in the option combination structure body to the BMC through an IPMI command;
and S413, creating a temporary structural body by the BMC, storing the data in the option combination structural body, and acquiring a data value in the option combination structural body through the offset, so as to obtain the current configuration option data of the BIOS.
7. The method of claim 5, wherein step S5 is as follows:
s51, judging whether in-band refreshing or out-of-band refreshing is performed on the BIOS;
if so, go to step S52;
if no, go to step S54;
s52, under an operating system, a user sends an IPMI command to the BMC in a band;
s53, copying the data in the second data structure body into the first data structure body by the BMC, setting the flag bit of the first data structure body, executing a strong-brushing BIOS instruction by the AFU tool, and entering the step S56;
s54, under an operating system, an IPMI command is sent to the BMC through out-of-band, or a parameter reservation selectable item is selected from a BMC webpage;
s55, copying the data in the second data structure body into the first data structure body by the BMC, setting the flag bit of the first data structure body, and informing the BIOS to execute firmware refreshing;
and S56, verifying the correctness of the refreshing result by the BMC.
8. The method of claim 7, wherein step S56 is specifically performed as follows:
s561, after the BIOS firmware is refreshed, entering an operating system;
s562, the BMC acquires configuration option data in the second data structure, performs CRC calculation and generates first check data;
s563, the BMC acquires the current BIOS configuration option data through an IPMI command, and performs CRC calculation to generate second check data;
s564, comparing whether the first check data is consistent with the second check data;
if yes, the BIOS firmware refreshing result is correct;
if not, the BIOS firmware refreshing result is wrong.
9. An apparatus for implementing BIOS upgrade configuration option preservation, comprising:
the data structure setting module (1) is used for presetting a first data structure and a second data structure in the BMC;
the configuration option modification data modification module (2) is used for storing the configuration option modification data into a first data structure body and setting a flag bit of the first data structure body when the BMC receives the configuration option modification data sent by a user;
the configuration option modification module (3) is used for reading configuration option data from the first data structure body after the BIOS learns the flag bit position of the first data structure body, setting the configuration option modification data into the BIOS, canceling the flag bit position of the first data structure body and restarting;
the current configuration option data acquisition module (4) is used for acquiring the current configuration option data of the BIOS and sending the current configuration option data to the BMC to be stored in the second data structure body;
and the configuration option retention and refresh module (5) is used for executing BIOS firmware refresh of retention configuration option data through the AFU tool in band and the BMC in band, verifying the correctness of a refresh result, copying data in the second data structure of the BMC into the first data structure, and setting a flag bit of the first data structure.
10. The apparatus for implementing BIOS step-up configuration option retention of claim 9, wherein the data structure body setup module (1) comprises:
the BMC in-structure setting unit (1.1) is used for presetting a first data structure body and a second data structure body used for storing configuration option data in the BMC, and respectively setting flag bits in headers of the first data structure body and the second data structure body;
a BMC web page selectable item setting unit (1.2) for setting a retention parameter selectable item in the BMC web page;
the BIOS structure setting unit (1.3) is used for presetting an option combination structure in the BIOS and setting offset and a numerical value in the option combination structure;
the configuration option modification data modification module (2) comprises:
the configuration option modification data writing unit (2.1) is used for sending the configuration option needing to be modified and the modification data to the BMC by the user through the IPMI writing command;
the configuration option modification marking unit (2.2) is used for storing the configuration options and the modification data which need to be modified into the first data structure body by the BMC and setting the flag bit of the first data structure body;
the configuration option modification module (3) comprises:
the zone bit judging unit (3.1) is used for reading the zone bit from the first data structure body of the BMC through an IPMI reading command after the BIOS is started and judging whether the zone bit is set;
the configuration option modification unit (3.2) is used for reading the configuration options and the modification data which need to be modified from the first data structure body of the BMC by the BIOS when the mark is set, and modifying the configuration options;
a configuration option modification flag canceling unit (3.3) for canceling the flag bit of the first data structure by the BIOS through the IPMI write command and performing a restart;
a flag bit checking unit (3.4) for checking whether the flag bit in the first data structure is set by the BMC;
a configuration option modification data clearing unit (3.5) for clearing data in the first data structure when the flag bit in the first data structure is not set;
the current configuration option data acquisition module (4) comprises:
the current configuration option sending unit (4.1) is used for collecting the current configuration option data of the BIOS and sending the current configuration option data to the BMC through the IPMI setting command;
the current configuration option storage unit (4.2) is used for storing the BIOS current configuration option data into a second data structure body by the BMC;
the current configuration option query unit (4.3) is used for setting a configuration option query interface at the BMC, and a user can query the BIOS current configuration option from the second data structure body through an IPMI acquisition command;
the configuration option retention refresh module (5) comprises:
a refresh mode judgment unit (5.1) for judging whether to perform in-band refresh or out-of-band refresh on the BIOS;
the in-band command sending unit (5.2) is used for sending an IPMI command to the BMC in the in-band by a user under an operating system when in-band refreshing;
the first refreshing unit (5.3) is used for copying the data in the second data structure body into the first data structure body by the BMC, setting the flag bit of the first data structure body and executing a strong-refreshing BIOS instruction by the AFU tool;
the out-of-band command sending unit (5.4) is used for sending an IPMI command to the BMC in an out-of-band mode under an operating system or selecting a reserved parameter selectable item from a BMC webpage when the out-of-band refreshing is carried out;
the second refreshing unit (5.5) is used for copying the data in the second data structure body into the first data structure body by the BMC, setting the flag bit of the first data structure body and informing the BIOS to execute firmware refreshing;
and the refreshing result correctness verifying unit (5.6) is used for verifying the correctness of the refreshing result by the BMC.
CN202210086970.2A 2022-01-25 2022-01-25 Method and device for realizing BIOS promotion and degradation configuration option reservation Active CN114546518B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210086970.2A CN114546518B (en) 2022-01-25 2022-01-25 Method and device for realizing BIOS promotion and degradation configuration option reservation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210086970.2A CN114546518B (en) 2022-01-25 2022-01-25 Method and device for realizing BIOS promotion and degradation configuration option reservation

Publications (2)

Publication Number Publication Date
CN114546518A true CN114546518A (en) 2022-05-27
CN114546518B CN114546518B (en) 2023-08-08

Family

ID=81672613

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210086970.2A Active CN114546518B (en) 2022-01-25 2022-01-25 Method and device for realizing BIOS promotion and degradation configuration option reservation

Country Status (1)

Country Link
CN (1) CN114546518B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107145359A (en) * 2017-05-12 2017-09-08 郑州云海信息技术有限公司 A kind of BMC changes the optimization method of BIOS option
CN108170495A (en) * 2018-01-29 2018-06-15 郑州云海信息技术有限公司 A kind of BIOS upgrade methods, system, equipment and computer readable storage medium
US20200097299A1 (en) * 2018-09-20 2020-03-26 Mitac Computing Technology Corporation Synchronization method for bios data
CN113867806A (en) * 2021-08-20 2021-12-31 苏州浪潮智能科技有限公司 Synchronization method and system for in-band modification of BIOS option

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107145359A (en) * 2017-05-12 2017-09-08 郑州云海信息技术有限公司 A kind of BMC changes the optimization method of BIOS option
CN108170495A (en) * 2018-01-29 2018-06-15 郑州云海信息技术有限公司 A kind of BIOS upgrade methods, system, equipment and computer readable storage medium
US20200097299A1 (en) * 2018-09-20 2020-03-26 Mitac Computing Technology Corporation Synchronization method for bios data
CN113867806A (en) * 2021-08-20 2021-12-31 苏州浪潮智能科技有限公司 Synchronization method and system for in-band modification of BIOS option

Also Published As

Publication number Publication date
CN114546518B (en) 2023-08-08

Similar Documents

Publication Publication Date Title
CN105893850B (en) Leak restorative procedure and device
CN110442473B (en) Nonvolatile data storage method and device, electronic equipment and medium
CN111478796B (en) Cluster capacity expansion exception handling method for AI platform
US20160170735A1 (en) Operating system updating method by using a checklist
CN111176884B (en) SEC (SEC) verification method and device for FPGA (field programmable Gate array) configuration memory
CN112817527A (en) Power failure data storage method, single chip microcomputer and computer readable storage medium
CN107819808A (en) Communicate to connect method for building up and device
JP5167936B2 (en) Information processing device
CN114265613B (en) Method and system for differentially upgrading firmware of all electric control units of whole vehicle
CN105721203A (en) Upgrade processing method and device
CN107133056A (en) The method and apparatus of smart machine upgrading restoring subregion
CN111475188A (en) Power module firmware updating method, device, equipment and storage medium
CN107733974A (en) A kind of upgrade method of mobile terminal
CN112650624B (en) Cluster upgrading method, device, equipment and computer readable storage medium
CN114546518A (en) Method and device for realizing retention of BIOS (basic input output System) upgrading and downgrading configuration options
CN104184614B (en) A kind of configuration rollback method and device
CN111143181A (en) Server maintenance method, system, equipment and computer readable storage medium
CN107908500B (en) Bad block identification method and device
WO2021254244A1 (en) Alarm mining model determination method and apparatus, device and storage medium
CN111130856A (en) Server configuration method, system, equipment and computer readable storage medium
CN114741339B (en) PCIE bandwidth retraining method, device, equipment and storage medium
CN114584261B (en) Data processing method, device and storage medium
CN109725945A (en) A kind of mould group starting method, apparatus, equipment and storage medium
CN111935337B (en) MAC address keep-alive method, equipment and storage medium of aggregation link
CN109978678B (en) Parameter management method and related 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