CN114546518B - Method and device for realizing BIOS promotion and degradation configuration option reservation - Google Patents

Method and device for realizing BIOS promotion and degradation configuration option reservation Download PDF

Info

Publication number
CN114546518B
CN114546518B CN202210086970.2A CN202210086970A CN114546518B CN 114546518 B CN114546518 B CN 114546518B CN 202210086970 A CN202210086970 A CN 202210086970A CN 114546518 B CN114546518 B CN 114546518B
Authority
CN
China
Prior art keywords
data
bios
data structure
structure body
bmc
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
CN202210086970.2A
Other languages
Chinese (zh)
Other versions
CN114546518A (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

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 updating, wherein the method comprises the following steps: presetting a first data structure body and a second data structure body in the BMC; the BMC stores configuration option modification data into the first data structure body and sets a flag bit 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 of the first data structure body, and executes restarting; 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 the second data structure body; and executing BIOS firmware refreshing which reserves configuration option data through the BMC in-band and out-of-band, and verifying the correctness of the refreshing result. The invention can ensure that the BIOS is refreshed in-band and out-of-band, can keep the configuration options after refreshing, and ensures the correctness of the configuration options of the BIOS after refreshing.

Description

Method and device for realizing BIOS promotion and degradation configuration option reservation
Technical Field
The invention belongs to the technical field of BIOS firmware updating, and particularly relates to a method and a device for realizing BIOS upgrading and downgrading configuration option reservation.
Background
With the continuous popularization and development of server technology, the performance, the function and the usability of the server are continuously enhanced, BIOS Setup configuration options in the server are more and more, and different clients can configure different option combinations according to the service requirements of themselves, but the following problems are often faced in the setting process: 1. after the setting of a plurality of node options on the line or the production line is completed, the BIOS needs to update and refresh the operation, and the operation of the original option setting is needed, so that the manpower is wasted and the configuration efficiency is affected. 2. After the configuration is completed, it is necessary to check whether the setting state of the option is correct.
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 refreshing, wherein the scheme is that option variable is located in NVRAM of BIOS, refreshing of the area can be skipped according to refreshing instruction to realize reserving BIOS option, but when option layout of front and back versions of BIOS is changed, function of reserving parameter can not be realized, and whole BIOS area must be forcedly refreshed. The second is to reserve BIOS options based on the redfish technology, the scheme BMC stores option set json files generated after options are set, after BIOS updating is completed, BIOS synchronizes json files according to conditions of reserved parameter refreshing in the starting process, option variables in BIOS are updated, and reserving of BIOS options is achieved.
This is a deficiency of the prior art, and therefore, it is necessary to provide a method and apparatus for implementing BIOS promotion and degradation configuration option reservation in order to address the above-mentioned drawbacks of the prior art.
Disclosure of Invention
Aiming at the defects that the prior art has application scenes modified by the configuration options partially, 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 adopting the redfish technology needs to lead in modules to reduce the product stability, the invention provides a method and a device for realizing the reservation of BIOS upgrading and downgrading configuration options, and aims to solve the technical problems.
In a first aspect, the present invention provides a method for implementing BIOS promotion and degradation configuration option reservation, including the steps of:
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 the first data structure body, and the flag bit of the first data structure body is set;
s3, after the BIOS acquires the position of the flag bit of the first data structure body, reading configuration option data from the first data structure body, setting configuration option modification data into the BIOS, canceling the position of the flag bit of the first data structure body, and executing restarting;
s4, the BIOS acquires own current configuration option data and sends the current configuration option data to the BMC to be stored in the second data structure body;
s5, refreshing BIOS firmware which reserves configuration option data through the AFU tool in the band and the BMC in the out-of-band, verifying the correctness of the refreshing result, copying data in the BMC second data structure body into the first data structure body, and setting the flag bit of the first data structure body.
Further, the specific steps of step S1 are as follows:
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 the headers of the first data structure body and the second data structure body;
s12, setting selectable options of reserved parameters in the BMC webpage;
s13, presetting an option combination structure in the BIOS, and setting offset and numerical value in the option combination structure. The first data structure is used for storing BIOS configuration options needing modification, and the second data structure is used for storing current BIOS configuration options; the retention parameters in the BMC webpage may be used to make a selection to retain the original BIOS configuration options.
Further, the specific steps of step S2 are as follows:
s21, the user sends configuration options needing to be modified and modified data to the BMC through an IPMI write command;
and S22, the BMC stores configuration options and modification data which need to be modified into the first data structure body, and sets the flag bit of the first data structure body. The flag bit in the first data structure is used to indicate whether a modification to the BIOS configuration option is required.
Further, the specific steps of step S3 are as follows:
s31, after the BIOS is started, reading a flag bit from a first data structure body of the BMC through an IPMI read command, and judging whether the flag bit is set or not;
if yes, go to step S32;
if not, entering step S4;
s32, the BIOS reads configuration options and modification data which need to be modified from the BMC first data structure body, and modifies the configuration options;
s33, the BIOS cancels the setting of the flag bit of the first data structure body through the IPMI writing command and executes restarting;
s34, checking whether a flag bit in the first data structure body is set by the BMC;
if yes, go to step S4;
if not, the data in the first data structure body is cleared. Judging whether configuration option modification is needed or not through the first data structure body zone bit after the BIOS is started, acquiring configuration option modification data to modify the BIOS configuration option when modification is needed, and canceling setting of the zone bit after modification is finished to prevent subsequent misjudgment.
Further, the specific steps of step S4 are 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 BIOS current configuration option data into a second data structure body;
s43, setting a configuration option query interface in the BMC, wherein a user can query the BIOS current configuration option from the second data structure body through an IPMI acquisition command. The BIOS saves the current configuration options through the second data structure for configuration option reservation.
Further, the specific steps of step S41 are 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, wherein the current configuration option data is stored in a data value, and the address of the option combination structure is stored in an offset;
s412, the BIOS sends the data in the option combination structure to the BMC through the IPMI command;
and S413, the BMC creates a temporary structure body, stores data in the option combination structure body, and acquires data values in the option combination structure body through the offset, so that the current configuration option data of the BIOS is obtained. The option combination structure and the temporary structure realize the butt joint of the BIOS and the data in the BMC.
Further, the specific steps of step S5 are as follows:
s51, judging whether in-band refreshing or out-of-band refreshing is carried out on the BIOS;
if the in-band refresh is performed, the process proceeds to step S52;
if yes, go to step S54;
s52, under the operating system, the user sends an IPMI command to the BMC in-band;
s53, the BMC copies the data in the second data structure body into the first data structure body, sets the flag bit of the first data structure body, executes a forced brushing BIOS instruction through the AFU tool, and then enters step S56;
s54, under an operating system, sending an IPMI command to the BMC through an out-of-band, or selecting a selectable option of reserving parameters in a BMC webpage;
s55, the BMC copies the data in the second data structure body into the first data structure body, sets the flag bit of the first data structure body and informs the BIOS to execute firmware refreshing;
and S56, the BMC verifies the correctness of the refreshing result. Whether the out-of-band refreshing or the in-band refreshing is carried out, the current configuration data in the second structure body is stored in the first data structure body, the flag bit of the first data structure body is positioned, and the BIOS configuration options are regarded as modified, so that the BIOS keeps the original configuration options to take effect, and the stability is improved.
Further, the specific steps of step S56 are as follows:
s561, finishing the refreshing of the BIOS firmware, and entering an operating system;
s562, BMC acquires configuration option data in the second data structure body, performs CRC calculation, and generates first check data;
s563. the bmc obtains the current BIOS configuration option data through the 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. Verification of the refresh result ensures that BIOS firmware refresh is effectively performed.
In a second aspect, the present invention provides an apparatus for implementing BIOS promotion and degradation configuration option reservation, including:
a data structure setting module 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 the first data structure body and setting the flag bit of the first data structure body when the BMC receives the configuration option modification data sent by the user;
the configuration option modification module is used for reading configuration option data from the first data structure body after the BIOS acquires the flag bit of the first data structure body, setting the configuration option modification data into the BIOS, canceling the flag bit of the first data structure body and executing restarting;
the current configuration option data acquisition module 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;
the configuration option reservation refreshing module is used for executing BIOS firmware refreshing of reserved configuration option data through the AFU tool in the band and the BMC in the out-of-band, verifying the correctness of the refreshing result, copying the data in the BMC second data structure body into the first data structure body, and setting the flag bit of the first data structure body.
Further, the data structure setting module includes:
a structure body setting unit in the BMC, which is used for presetting a first data structure body and a second data structure body for storing configuration option data in the BMC and setting flag bits in the headers of the first data structure body and the second data structure body respectively;
the BMC webpage selectable item setting unit is used for setting reserved parameter selectable items in the BMC webpage;
a structure body setting unit in BIOS for presetting an option combination structure body in BIOS and setting offset and numerical value in the option combination structure body;
the configuration option modification data modification module includes:
the configuration option modification data writing unit is used for sending configuration options needing modification and modification data to the BMC through the IPMI writing command to the BMC by a user;
the configuration option modification marking unit is used for saving configuration options and modification data 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 body of the BMC through the IPMI read command after the BIOS is started, and judging whether the flag bit is set or not;
the configuration option modifying unit is used for reading configuration options and modification data which need to be modified from the BMC first data structure body by the BIOS when the mark is set, and modifying the configuration options;
the configuration option modification mark cancellation unit is used for canceling the flag bit of the first data structure body through the IPMI write command by the BIOS and executing restarting;
a flag bit checking unit for checking whether the flag bit is set in the first data structure by the BMC;
a configuration option modification data clearing unit, configured to clear data in the first data structure when the flag bit is not set in the first data structure;
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 the 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 in the BMC, and a user can query the BIOS current configuration option from the second data structure body through the IPMI acquisition command;
the configuration option reservation refreshing module comprises:
a refresh mode judging unit for judging whether to perform in-band refresh or out-of-band refresh on the BIOS;
the in-band command sending unit 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 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-brushing BIOS instruction by the AFU tool;
the out-of-band command sending unit is used for sending an IPMI command to the BMC through out-of-band under an operating system when out-of-band refreshing is performed, or selecting a parameter reservation selectable item in a BMC webpage;
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 verification unit is used for the BMC to verify the correctness of the refreshing result.
The invention has the beneficial effects that:
the method and the device for realizing the configuration option reservation of BIOS upgrading and downgrading can realize the configuration option reservation after refreshing no matter in-band or out-of-band refreshing BIOS for the application scene of the BIOS configuration option needing to be modified, ensure the correctness of the BIOS configuration option after refreshing and improve the usability and the stability of products.
In addition, the invention has reliable design principle, simple structure and very wide application prospect.
It can be seen that the present invention has outstanding substantial features and significant advances over the prior art, as well as the benefits of its implementation.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the description of the embodiments or the prior art will be briefly described below, and it will be obvious to those skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a flow chart of an embodiment 1 of a method for implementing BIOS promotion and demotion configuration option reservation according to the present invention.
FIG. 2 is a flow chart of embodiment 2 of a method for implementing BIOS promotion and demotion configuration option reservation according to the present invention.
FIG. 3 is a schematic diagram of an apparatus for implementing BIOS promotion and demotion configuration option reservation in accordance with the present invention.
In the figure, a 1-data structure body setting module; 1.1-a structure setting unit in BMC; 1.2-BMC webpage selectable item setting unit; 1.3-a structure setting unit in BIOS; 2-a configuration option modification data modification module; 2.1-configuration options modification data write unit; 2.2-configuration options modification tagging unit; 3-a configuration option modification module; 3.1-a flag bit judging unit; 3.2-configuration option modification unit; 3.3-configuration option modification flag cancellation unit; 3.4-a flag bit checking unit; 3.5-configuration option modification data purge unit; 4, a current configuration option data acquisition module; 4.1-a current configuration option transmitting unit; 4.2-a current configuration option saving unit; 4.3-a current configuration option query unit; 5-configuration option reservation refresh module; 5.1-a refresh mode judgment unit; 5.2-an in-band command transmitting unit; 5.3-a first refresh unit; 5.4-out-of-band command sending unit; 5.5-a second refresh unit; 5.6-refreshing the result correctness verification unit.
Detailed Description
In order to make the technical solution of the present invention better understood by those skilled in the art, the technical solution of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments. All other embodiments, which can be made by those skilled in the art based on the embodiments of the present invention without making any inventive effort, shall fall within the scope of the present invention.
The AFU tool, which is called AMI Aptio AFU in full, is a BIOS refreshing tool kit.
redfish is an open industry standard specification, and provides simple, modern and safe management functions for the expandable 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 promotion and degradation 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 the first data structure body, and the flag bit of the first data structure body is set;
s3, after the BIOS acquires the position of the flag bit of the first data structure body, reading configuration option data from the first data structure body, setting configuration option modification data into the BIOS, canceling the position of the flag bit of the first data structure body, and executing restarting;
s4, the BIOS acquires own current configuration option data and sends the current configuration option data to the BMC to be stored in the second data structure body;
s5, refreshing BIOS firmware which reserves configuration option data through the AFU tool in the band and the BMC in the out-of-band, verifying the correctness of the refreshing result, copying data in the BMC second data structure body into the first data structure body, and setting the flag bit of the first data structure body.
Example 2:
as shown in fig. 2, the present invention provides a method for implementing BIOS promotion and degradation configuration option reservation, including 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 the headers of the first data structure body and the second data structure body;
s12, setting selectable options of reserved parameters in the BMC webpage;
s13, presetting an option combination structure in the BIOS, and setting offset and 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 the first data structure body, and the flag bit of the first data structure body is set; the method comprises the following specific steps:
s21, the user sends configuration options needing to be modified and modified data to the BMC through an IPMI write command;
s22, the BMC stores configuration options and modification data to be modified into the first data structure body, and sets a flag bit of the first data structure body;
s3, after the BIOS acquires the position of the flag bit of the first data structure body, reading configuration option data from the first data structure body, setting configuration option modification data into the BIOS, canceling the position of the flag bit of the first data structure body, and executing restarting; the method comprises the following specific steps:
s31, after the BIOS is started, reading a flag bit from a first data structure body of the BMC through an IPMI read command, and judging whether the flag bit is set or not;
if yes, go to step S32;
if not, entering step S4;
s32, the BIOS reads configuration options and modification data which need to be modified from the BMC first data structure body, and modifies the configuration options;
s33, the BIOS cancels the setting of the flag bit of the first data structure body through the IPMI writing command and executes restarting;
s34, checking whether a flag bit in the first data structure body is set by the BMC;
if yes, go to step S4;
if not, clearing the data in the first data structure body;
s4, the BIOS acquires own current configuration option data and sends the current configuration option data to the BMC to be stored in the second data structure body; 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, wherein the current configuration option data is stored in a data value, and the address of the option combination structure is stored in an offset;
s412, the BIOS sends the data in the option combination structure to the BMC through the IPMI command;
s413, the BMC creates a temporary structure body, stores data in the option combination structure body, and acquires data values in the option combination structure body through the offset, so that the current configuration option data of the BIOS is obtained;
s42, the BMC stores the BIOS current configuration option data into a second data structure body;
s43, setting a configuration option query interface in the BMC, wherein a user can query the BIOS current configuration option from the second data structure body through an IPMI acquisition command;
s5, refreshing BIOS firmware which reserves configuration option data through an AFU tool in a band and a BMC outside the band, verifying the correctness of a refreshing result, copying data in a BMC second data structure body into a first data structure body, and setting a flag bit of the first data structure body; the method comprises the following specific steps:
s51, judging whether in-band refreshing or out-of-band refreshing is carried out on the BIOS;
if the in-band refresh is performed, the process proceeds to step S52;
if yes, go to step S54;
s52, under the operating system, the user sends an IPMI command to the BMC in-band;
s53, the BMC copies the data in the second data structure body into the first data structure body, sets the flag bit of the first data structure body, executes a forced brushing BIOS instruction through the AFU tool, and then enters step S56;
s54, under an operating system, sending an IPMI command to the BMC through an out-of-band, or selecting a selectable option of reserving parameters in a BMC webpage;
s55, the BMC copies the data in the second data structure body into the first data structure body, sets the flag bit of the first data structure body and informs the BIOS to execute firmware refreshing;
s56, the BMC verifies the correctness of the refreshing result; the method comprises the following specific steps:
s561, finishing the refreshing of the BIOS firmware, and entering an operating system;
s562, BMC acquires configuration option data in the second data structure body, performs CRC calculation, and generates first check data;
s563. the bmc obtains the current BIOS configuration option data through the 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.
Example 3:
as shown in FIG. 3, the present invention provides an apparatus for implementing BIOS promotion and degradation configuration option reservation, comprising:
a data structure setting module 1 for presetting a first data structure and a second data structure in the BMC; the data structure setting module 1 includes:
a structure body setting unit 1.1 in the BMC, configured to preset a first data structure body and a second data structure body for storing configuration option data in the BMC, and set flag bits in the headers of the first data structure body and the second data structure body respectively;
the BMC webpage selectable item setting unit 1.2 is used for setting reserved parameter selectable items in the BMC webpage;
a structure body setting unit 1.3 in BIOS, which is used for presetting an option combination structure body in BIOS and setting offset and numerical value in the option combination structure body;
the configuration option modification data modification module 2 is used for storing the configuration option modification data into the first data structure body and setting the flag bit of the first data structure body when the BMC receives the configuration option modification data sent by the user; the configuration option modification data modification module 2 includes:
the configuration option modification data writing unit 2.1 is used for sending configuration options needing modification and modification data to the BMC through an IPMI writing command by a user;
the configuration option modification marking unit 2.2 is used for saving configuration options and modification data to be modified in 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 configured to read configuration option data from the first data structure after the BIOS acquires the flag bit of the first data structure, set the configuration option modification data into the BIOS, cancel the flag bit of the first data structure, and execute restarting; the configuration option modification module 3 includes:
the flag bit judging unit 3.1 is used for reading the flag bit from the first data structure body of the BMC through the IPMI read command after the BIOS is started, and judging whether the flag bit is set or not;
the configuration option modifying unit 3.2 is used for reading configuration options and modification data which need to be modified from the BMC first data structure body by the BIOS when the mark is set, and modifying the configuration options;
a configuration option modification mark cancellation unit 3.3, configured to cancel the flag bit of the first data structure through the IPMI write command by the BIOS, and execute a restart;
a flag bit checking unit 3.4 for checking whether the flag bit is set in the first data structure by the BMC;
a configuration option modification data clearing unit 3.5 for clearing data in the first data structure when the flag bit is not set in the first data structure;
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 for storage in the second data structure body; 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 an IPMI setting command;
a current configuration option storing unit 4.2, configured to store the current configuration option data of the BIOS into the second data structure body by the BMC;
the current configuration option query unit 4.3 is configured to set a configuration option query interface in 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 reservation refreshing module 5 is used for executing BIOS firmware refreshing of reservation configuration option data through the AFU tool in the band and the BMC in the band, verifying the correctness of the refreshing result, copying the data in the BMC second data structure body into the first data structure body, and setting the flag bit of the first data structure body; the configuration option reservation refresh module 5 includes:
a refresh mode judging unit 5.1 for judging whether to perform in-band refresh or out-of-band refresh on the BIOS;
an in-band command sending unit 5.2, configured to send an IPMI command to the BMC in-band by a user under an operating system during in-band refresh;
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 forced brushing BIOS instruction by the AFU tool;
the out-of-band command sending unit 5.4 is used for sending the IPMI command to the BMC through out-of-band under the operating system when in out-of-band refreshing, or selecting a reserved parameter selectable item in the BMC webpage;
the second refreshing unit 5.5 is configured to copy the data in the second data structure body into the first data structure body by the BMC, set the flag bit of the first data structure body, and notify the BIOS to execute firmware refreshing;
and the refreshing result correctness verification unit 5.6 is used for the BMC to verify the correctness of the refreshing result.
Although the present invention has been described in detail by way of preferred embodiments with reference to the accompanying drawings, the present invention is not limited thereto. Various equivalent modifications and substitutions may be made in the embodiments of the present invention by those skilled in the art without departing from the spirit and scope of the present invention, and it is intended that all such modifications and substitutions be within the scope of the present invention/be within the scope of the present invention as defined by the appended claims. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (10)

1. A method for implementing BIOS promotion and demotion configuration option reservation, comprising the steps of:
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 the first data structure body, and the flag bit of the first data structure body is set;
s3, after the BIOS acquires the position of the flag bit of the first data structure body, reading configuration option data from the first data structure body, setting configuration option modification data into the BIOS, canceling the position of the flag bit of the first data structure body, and executing restarting;
s4, the BIOS acquires own current configuration option data and sends the current configuration option data to the BMC to be stored in the second data structure body;
s5, refreshing BIOS firmware which reserves configuration option data through the AFU tool in the band and the BMC in the out-of-band, verifying the correctness of the refreshing result, copying data in the BMC second data structure body into the first data structure body, and setting the flag bit of the first data structure body.
2. The method for implementing BIOS promotion and degradation configuration option reservation according to claim 1, wherein step S1 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 the headers of the first data structure body and the second data structure body;
s12, setting selectable options of reserved parameters in the BMC webpage;
s13, presetting an option combination structure in the BIOS, and setting offset and numerical value in the option combination structure.
3. The method for implementing BIOS promotion and degradation configuration option reservation according to claim 2, wherein step S2 comprises the following specific steps:
s21, the user sends configuration options needing to be modified and modified data to the BMC through an IPMI write command;
and S22, the BMC stores configuration options and 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 for implementing BIOS promotion and degradation configuration option reservation according to claim 3, wherein step S3 comprises the specific steps of:
s31, after the BIOS is started, reading a flag bit from a first data structure body of the BMC through an IPMI read command, and judging whether the flag bit is set or not;
if yes, go to step S32;
if not, entering step S4;
s32, the BIOS reads configuration options and modification data which need to be modified from the BMC first data structure body, and modifies the configuration options;
s33, the BIOS cancels the setting of the flag bit of the first data structure body through the IPMI writing command and executes restarting;
s34, checking whether a flag bit in the first data structure body is set by the BMC;
if yes, go to step S4;
if not, the data in the first data structure body is cleared.
5. The method for implementing BIOS promotion and degradation configuration option reservation according to claim 4, wherein step S4 comprises the specific steps of:
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 BIOS current configuration option data into a second data structure body;
s43, setting a configuration option query interface in the BMC, wherein a user can query the BIOS current configuration option from the second data structure body through an IPMI acquisition command.
6. The method for implementing BIOS promotion and degradation configuration option reservation according to claim 5, wherein step S41 comprises the specific steps of:
s411. The BIOS acquires the current configuration option data of the BIOS and stores the current configuration option data in an option combination structure, wherein the current configuration option data is stored in a data value, and the address of the option combination structure is stored in an offset;
s412, the BIOS sends the data in the option combination structure to the BMC through the IPMI command;
and S413, the BMC creates a temporary structure body, stores data in the option combination structure body, and acquires data values in the option combination structure body through the offset, so that the current configuration option data of the BIOS is obtained.
7. The method for implementing BIOS promotion and demotion configuration option reservation according to claim 5, wherein step S5 comprises the following specific steps:
s51, judging whether in-band refreshing or out-of-band refreshing is carried out on the BIOS;
if the in-band refresh is performed, the process proceeds to step S52;
if yes, go to step S54;
s52, under the operating system, the user sends an IPMI command to the BMC in-band;
s53, the BMC copies the data in the second data structure body into the first data structure body, sets the flag bit of the first data structure body, executes a forced brushing BIOS instruction through the AFU tool, and then enters step S56;
s54, under an operating system, sending an IPMI command to the BMC through an out-of-band, or selecting a selectable option of reserving parameters in a BMC webpage;
s55, the BMC copies the data in the second data structure body into the first data structure body, sets the flag bit of the first data structure body and informs the BIOS to execute firmware refreshing;
and S56, the BMC verifies the correctness of the refreshing result.
8. The method for implementing BIOS promotion and demotion configuration option reservation according to claim 7, wherein step S56 comprises the specific steps of:
s561, finishing the refreshing of the BIOS firmware, and entering an operating system;
s562, BMC acquires configuration option data in the second data structure body, performs CRC calculation, and generates first check data;
s563. the bmc obtains the current BIOS configuration option data through the 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 promotion and demotion configuration option reservation, comprising:
a data structure setting module (1) 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 the first data structure body and setting the flag bit of the first data structure body when the BMC receives the configuration option modification data sent by the user;
the configuration option modification module (3) is used for reading configuration option data from the first data structure body after the BIOS acquires the flag bit of the first data structure body, setting the configuration option modification data into the BIOS, canceling the flag bit of the first data structure body and executing 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 for storage in the second data structure body;
and the configuration option reservation refreshing module (5) is used for executing BIOS firmware refreshing of reserved configuration option data through the AFU tool in the band and the BMC in the band, verifying the correctness of the refreshing result, copying the data in the BMC second data structure body into the first data structure body, and setting the flag bit of the first data structure body.
10. The apparatus for implementing BIOS promotion and demotion configuration option reservation of claim 9, wherein the data structure body setup module (1) comprises:
a structure setting unit (1.1) in the BMC, which is used for presetting a first data structure body and a second data structure body for storing configuration option data in the BMC and setting flag bits in the headers of the first data structure body and the second data structure body respectively;
the BMC webpage selectable item setting unit (1.2) is used for setting reserved parameter selectable items in the BMC webpage;
a structure setting unit (1.3) in BIOS for presetting an option combination structure in BIOS and setting an offset and a numerical value in the option combination structure;
the configuration option modification data modification module (2) includes:
the configuration option modification data writing unit (2.1) is used for sending configuration options needing modification and modification data to the BMC through the IPMI writing command by a user;
the configuration option modification marking unit (2.2) is used for saving configuration options and 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) includes:
the zone bit judging unit (3.1) is used for reading the zone bit from the first data structure body of the BMC through the IPMI read command after the BIOS is started and judging whether the zone bit is set or not;
the configuration option modifying unit (3.2) is used for reading configuration options and modification data which need to be modified from the BMC first data structure body by the BIOS when the mark is set, and modifying the configuration options;
a configuration option modification mark cancellation 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 is set in the first data structure by the BMC;
a configuration option modification data clearing unit (3.5) for clearing data in the first data structure when the flag bit is not set in the first data structure;
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;
a current configuration option storing unit (4.2) for the BMC to store the BIOS current configuration option data into the second data structure;
a current configuration option query unit (4.3) for setting a configuration option query interface in the BMC, wherein a user can query the BIOS current configuration option from the second data structure body through an IPMI acquisition command;
the configuration option reservation refresh module (5) comprises:
a refresh mode judgment unit (5.1) for judging whether in-band refresh or out-of-band refresh is performed on the BIOS;
an in-band command sending unit (5.2) for sending an IPMI command to the BMC in-band by a user under an operating system when in-band refreshing is performed;
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-brushing BIOS instruction by the AFU tool;
an out-of-band command sending unit (5.4) for sending an IPMI command to the BMC through out-of-band under the operating system or selecting a reserved parameter selectable item in the BMC webpage when refreshing out-of-band;
a second refreshing unit (5.5) for the BMC to copy the data in the second data structure into the first data structure and set the flag bit of the first data structure to inform the BIOS to execute firmware refreshing;
and the refreshing result correctness verification unit (5.6) is used for the BMC to verify the correctness of the refreshing result.
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 CN114546518A (en) 2022-05-27
CN114546518B true 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 (3)

* 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
CN113867806A (en) * 2021-08-20 2021-12-31 苏州浪潮智能科技有限公司 Synchronization method and system for in-band modification of BIOS option

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
TWI685793B (en) * 2018-09-20 2020-02-21 神雲科技股份有限公司 Synchronization method

Patent Citations (3)

* 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
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
CN114546518A (en) 2022-05-27

Similar Documents

Publication Publication Date Title
CN106095620B (en) A kind of development approach of built-in Linux partition holding
US20170206079A1 (en) Method and Device for Upgrading Software
CN104881333A (en) Storage system and method for using same
CN110347414A (en) Firmware update, device, equipment and computer readable storage medium
CN105930236A (en) Application program version returning method based on BMS Bootloaderupgrade
CN106528005B (en) Disk adding method and device of distributed storage system
CN106537353B (en) A kind of data copy method, device and system
CN109002330A (en) A kind of method, device and equipment identifying UEFI OS startup item
CN111478796B (en) Cluster capacity expansion exception handling method for AI platform
CN108829431A (en) Update method, device, equipment and the storage medium of iOS application program
CN107562386A (en) A kind of method for writing data and device of distributed storage cluster
CN108243102B (en) Method for realizing fast rerouting and PE equipment
CN105930184A (en) System upgrade method and device
CN114546518B (en) Method and device for realizing BIOS promotion and degradation configuration option reservation
CN108984200A (en) A kind of timing updates the method and device of firmware
CN111475188A (en) Power module firmware updating method, device, equipment and storage medium
CN109558209B (en) Monitoring method for virtual machine
CN106293622A (en) A kind of self-healing over-the-air upgrade method of power-off and device
CN104216997A (en) Method and device for repairing terminal equipment
CN108153537A (en) Mobile application update method and device
CN111143181A (en) Server maintenance method, system, equipment and computer readable storage medium
CN107786650A (en) A kind of synchronous method, the apparatus and system of storage medium and management strategy
CN114741339B (en) PCIE bandwidth retraining method, device, equipment and storage medium
CN103714059A (en) Data updating method and device
CN109725945A (en) A kind of mould group starting method, apparatus, equipment and storage medium

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