CN117032818A - A basic input and output system BIOS option configuration method and device - Google Patents
A basic input and output system BIOS option configuration method and device Download PDFInfo
- Publication number
- CN117032818A CN117032818A CN202310854636.1A CN202310854636A CN117032818A CN 117032818 A CN117032818 A CN 117032818A CN 202310854636 A CN202310854636 A CN 202310854636A CN 117032818 A CN117032818 A CN 117032818A
- Authority
- CN
- China
- Prior art keywords
- bios
- configuration
- bmc
- option
- file
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/44—Arrangements for executing specific programs
- G06F9/4401—Bootstrapping
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/54—Interprogram communication
- G06F9/544—Buffers; Shared memory; Pipes
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The embodiment of the invention provides a Basic Input Output System (BIOS) option configuration method, a server, equipment and a medium, wherein the method comprises the following steps: after the BIOS running on the HOST processor writes the first BIOS configuration file into the shared memory, the BMC acquires the first BIOS configuration file from the shared memory; the BMC invokes a method provided by the message bus system Dbus through a redfish process, performs configuration operation of BIOS options on the first BIOS configuration file, wherein the configuration operation comprises operation of inquiring the current BIOS option configuration, operation of modifying the BIOS option configuration, operation of inquiring BIOS unactuated configuration, operation of clearing the unactuated BIOS configuration, operation of inquiring the modification result of the BIOS option configuration, so that a plurality of BIOS options can be modified simultaneously, operation is simplified, and efficiency of BIOS option configuration is greatly improved.
Description
Technical Field
The present invention relates to the field of server configuration technologies, and in particular, to a BIOS option configuration method and a BIOS option configuration device for a BIOS.
Background
BIOS (Basic Input Output System) basic input output system is an indispensable important function for the server, but in normal machine room deployment and maintenance, the option of modifying BIOS is often required to build the service environment.
With the rapid development of server technology, performance, functions and usability are continuously enhanced, more and more options of the BIOS in the server can reach thousands of options, and meanwhile, operations related to the BIOS options are very many, so that the configuration process of the BIOS options in the related technology is complicated and inconvenient to operate.
Disclosure of Invention
In order to solve the above problems, the embodiment of the invention discloses a BIOS option configuration method and a BIOS option configuration device thereof.
In a first aspect, an embodiment of the present invention provides a BIOS option configuration method for a basic input/output system, which is applied to a server, where the server includes a baseboard management controller BMC, a HOST processor of a main central processor, and a shared memory, where the BMC is connected to the HOST processor and the shared memory, respectively, and the method includes:
after the BIOS running on the HOST processor writes a first BIOS configuration file into the shared memory, the BMC acquires the first BIOS configuration file from the shared memory;
The BMC calls a method provided by a message bus system Dbus through a hypermedia application program interface (redfish) process, and performs configuration operation of BIOS options on the first BIOS configuration file, wherein the configuration operation comprises the following steps: querying the operation of the current BIOS option configuration, modifying the operation of the BIOS option configuration, querying the operation of the BIOS unactuated configuration, clearing the operation of the unactuated BIOS configuration, and querying at least one of the operation of the modification result of the BIOS option configuration.
Optionally, the shared memory includes a first shared memory area, and the BMC obtains the first BIOS configuration file from the shared memory, including:
after the BMC detects that the BIOS completes the power-on self-checking POST process and writes the first BIOS configuration file into a first shared memory area, the BMC reads the first BIOS configuration file of the first shared memory area and places the first BIOS configuration file under a BMC file directory.
Optionally, the method provided by the Dbus includes a configuration query method;
the BMC calls a method provided by a workbench communication mechanism Dbus through a hypermedia application program interface redfish process, and performs configuration operation of BIOS options on the first BIOS configuration file, and the method comprises the following steps:
The BMC invokes the configuration query method through a redfish process, and reads the first BIOS configuration file under the BMC file directory through the configuration query method;
if the first BIOS configuration file does not exist or the file format is wrong, generating error information and outputting the error information;
and if the first BIOS configuration file exists and the file format is correct, outputting the content of the first BIOS configuration file.
Optionally, the shared memory includes a second shared memory area, and the method provided by the Dbus includes a configuration modification method;
the BMC calls a method provided by a workbench communication mechanism Dbus through a hypermedia application program interface redfish process, and performs configuration operation of BIOS options on the first BIOS configuration file, and the method comprises the following steps:
the BMC invokes the configuration modification method through a redfish process and transmits at least one target BIOS option to be modified into the configuration modification method;
comparing the at least one target BIOS option with the first BIOS configuration file content in the first shared memory area;
if the target BIOS options are all in the first BIOS configuration file, generating a second BIOS configuration file in a second shared memory area according to the target BIOS options through the configuration modification method;
The BMC reads the second BIOS configuration file of the second shared memory area, places the second BIOS configuration file under the BMC file directory, generates configuration modification information, and outputs the configuration modification information.
Optionally, the method provided by the Dbus includes an unactuated option query method;
the BMC calls a method provided by a workbench communication mechanism Dbus through a hypermedia application program interface redfish process, and performs configuration operation of BIOS options on the first BIOS configuration file, and the method comprises the following steps:
the BMC invokes the unactuated option query method through a redfish process, and reads the content of the second BIOS configuration file under the BMC file directory through the unactuated option query method;
and if the server is not restarted, determining that the modified BIOS options in the second BIOS configuration file are not effective.
Optionally, the method provided by the Dbus includes an inactive option clear method;
the BMC calls a method provided by a workbench communication mechanism Dbus through a hypermedia application program interface redfish process, and performs configuration operation of BIOS options on the first BIOS configuration file, and the method comprises the following steps:
and the BMC calls the method for clearing the non-effective option through a redfish process, clears the second BIOS configuration file of the second shared memory area through the method for clearing the non-effective option, generates file clearing information, and outputs the file clearing information.
Optionally, the shared memory includes a third shared memory area, and the method provided by the Dbus includes modifying a result query method;
the BMC calls a method provided by a workbench communication mechanism Dbus through a hypermedia application program interface redfish process, and performs configuration operation of BIOS options on the first BIOS configuration file, and the method comprises the following steps:
the BMC invokes the modification result query method through a redfish process, obtains modification results of BIOS option configuration in a third shared memory area through the modification result query method, generates modification result information of the BIOS option, and outputs the modification result information;
the modification result information is used for indicating that the modification is successful under the condition that the modified BIOS option in the second BIOS configuration file is effective; and indicating that the modification fails in the case that the modified BIOS option in the second BIOS configuration file is not validated.
In a second aspect, an embodiment of the present invention discloses a server, the server including: the BMC is respectively connected with the HOST processor and the shared memory;
after the BIOS running on the HOST processor writes a first BIOS configuration file into the shared memory, the BMC is configured to obtain the first BIOS configuration file from the shared memory; the method provided by the message bus system Dbus is called through a hypermedia application program interface (redfish) process, the configuration operation of BIOS options is carried out on the first BIOS configuration file, and the configuration operation comprises the following steps: querying the operation of the current BIOS option configuration, modifying the operation of the BIOS option configuration, querying the operation of the BIOS unactuated configuration, clearing the operation of the unactuated BIOS configuration, and querying at least one of the operation of the modification result of the BIOS option configuration.
Optionally, the shared memory includes a first shared memory area;
the BMC is used for detecting that the BIOS completes a power-on self-checking POST process, writing the first BIOS configuration file into a first shared memory area, reading the first BIOS configuration file of the first shared memory area, and placing the first BIOS configuration file under a BMC file directory.
Optionally, the method provided by the Dbus includes a configuration query method;
the BMC is used for calling the configuration query method through a redfish process, and reading the first BIOS configuration file under the BMC file directory through the configuration query method; if the first BIOS configuration file does not exist or the file format is wrong, generating error information and outputting the error information; and if the first BIOS configuration file exists and the file format is correct, outputting the content of the first BIOS configuration file.
Optionally, the shared memory includes a second shared memory area, and the method provided by the Dbus includes a configuration modification method;
the BMC is used for calling the configuration modification method through a redfish process and transmitting at least one target BIOS option to be modified into the configuration modification method; comparing the at least one target BIOS option with the first BIOS configuration file content in the first shared memory area; if the target BIOS options are all in the first BIOS configuration file, generating a second BIOS configuration file in a second shared memory area according to the target BIOS options through the configuration modification method; the BMC reads the second BIOS configuration file of the second shared memory area, places the second BIOS configuration file under the BMC file directory, generates configuration modification information, and outputs the configuration modification information.
Optionally, the method provided by the Dbus includes an unactuated option query method;
the BMC is used for calling the unactuated option query method through a redfish process, and reading the content of the second BIOS configuration file under the BMC file directory through the unactuated option query method; and if the server is not restarted, determining that the modified BIOS options in the second BIOS configuration file are not effective.
Optionally, the method provided by the Dbus includes an inactive option clear method;
the BMC is used for calling the method for clearing the non-effective option through the redfish process, clearing the second BIOS configuration file of the second shared memory area through the method for clearing the non-effective option, generating file clearing information, and outputting the file clearing information.
Optionally, the shared memory includes a third shared memory area, and the method provided by the Dbus includes modifying a result query method;
the BMC is used for calling the modification result query method through a redfish process, acquiring a modification result of BIOS option configuration in a third shared memory area through the modification result query method, generating modification result information of the BIOS option, and outputting the modification result information;
The modification result information is used for indicating that the modification is successful under the condition that the modified BIOS option in the second BIOS configuration file is effective; and indicating that the modification fails in the case that the modified BIOS option in the second BIOS configuration file is not validated.
In a third aspect, the present invention shows an electronic device comprising:
one or more processors; and
one or more machine readable media having instructions stored thereon, which when executed by the one or more processors, cause the apparatus to perform the Basic Input Output System (BIOS) option configuration method as claimed in any one of the above.
In a fourth aspect, the present invention shows a computer-readable storage medium having instructions stored thereon that, when executed by one or more processors, cause the processors to perform a method of basic input output system, BIOS, option configuration as described in any one of the above.
The embodiment of the invention has the following advantages:
according to the embodiment of the invention, interaction between the BMC and the BIOS can be realized through the shared memory, the BMC obtains a first BIOS configuration file of the BIOS running on the HOST processor through the shared memory, and the configuration operation of BIOS options is carried out on the first BIOS configuration file through a method provided by calling Dbus through a redfish process, wherein the configuration operation comprises the following steps: querying the operation of the current BIOS option configuration, modifying the operation of the BIOS option configuration, querying the operation of the BIOS unactuated configuration, clearing the operation of the unactuated BIOS configuration, and querying at least one of the operation of the modification result of the BIOS option configuration. The invention provides a complete design scheme of BIOS option configuration from inquiry, modification, inquiry unoccupied configuration, clearing unoffected BIOS option configuration and inquiry configuration results, can realize the aim of simultaneously modifying a plurality of BIOS options, and solves the problems of complicated BIOS option and inconvenient operation in the configuration process.
Drawings
FIG. 1 is a flowchart illustrating a BIOS option configuration method according to an embodiment of the present invention;
FIG. 2 is a block diagram of a server in an embodiment of the invention;
FIG. 3 is a flowchart illustrating steps of another BIOS option configuration method according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a BMC calling various BIOS configuration options under Dbus in an embodiment of the invention.
Detailed Description
In order that the above-recited objects, features and advantages of the present invention will become more readily apparent, a more particular description of the invention will be rendered by reference to the appended drawings and appended detailed description.
Referring to fig. 1, a flowchart illustrating steps of a BIOS option configuration method of a basic input output system according to an embodiment of the present invention is shown, where the method is applied to a server, and the server includes a baseboard management controller BMC, a main central processor HOST processor, and a shared memory, where the BMC is connected to the HOST processor and the shared memory, respectively, and the method specifically may include the following steps:
step 101, after the BIOS running on the HOST processor writes a first BIOS configuration file into the shared memory, the BMC obtains the first BIOS configuration file from the shared memory;
Referring to fig. 2, a structure diagram of a server in an embodiment of the present invention is shown. The server comprises: the device comprises a baseboard management controller BMC, a main central processing unit HOST processor, a shared memory and an external bus, wherein the baseboard management controller BMC comprises a memory controller, a BMC processor and an internal bus, and the BMC processor is connected with the memory controller through the memory bus. The memory controller can set an arbitration mechanism to perform anti-collision processing on HOST processor data and BMC processor data, avoid conflict generation by arranging a storage queue, and receive data at two ends according to the first-in first-out sequence.
In the embodiment of the invention, the HOST processor can be connected with a built-in memory controller of the BMC through an external bus, and access the memory controller through a driver on the BIOS side. Illustratively, the HOST processor may execute BIOS code to cause the BIOS to access the shared memory. The BMC processor can be connected with the memory controller through the memory bus, so that the BMC accesses the memory controller through a BMC side driver, and the BMC accesses the shared memory.
In the embodiment of the invention, the BMC and the BIOS can interact based on the shared memory. For example, after the BIOS writes the first BIOS configuration file to the shared memory, the BMC may obtain the first BIOS configuration file of the BIOS from the shared memory. The first configuration file may be json format. After the BMC acquires the first BIOS configuration file, the first BIOS configuration file can be placed under a BMC file directory, and the BMC file directory can be/usr/share/BMC-device.
Step 102, the BMC invokes, through a hypermedia application program interface redfish process, a method provided by a message bus system Dbus, and performs a configuration operation of a BIOS option on the first BIOS configuration file, where the configuration operation includes: querying the operation of the current BIOS option configuration, modifying the operation of the BIOS option configuration, querying the operation of the BIOS unactuated configuration, clearing the operation of the unactuated BIOS configuration, and querying at least one of the operation of the modification result of the BIOS option configuration.
In the embodiment of the invention, the BMC can call the method provided by the message bus system Dbus through the redfish process of the hypermedia application program interface, and perform configuration operation of BIOS options on the first BIOS configuration file. The hypermedia application program interface redfish is an open industry standard specification, has a mechanism for managing data center resources, processing events, long-term tasks and finding, can represent various implementations through a consistent interface, and provides simple, modern and safe management functions for extensible platform hardware. The message bus system Dbus is a three-layer architecture inter-process communication system, which includes: an interface layer provided by a library libdbus through which the capabilities of the D-Bus can be used; the Bus layer is provided by a D-Bus daemon, runs when the Linux system is started, and is responsible for message routing and transmission among processes; a Wrapper layer, a series of Wrapper libraries based on a particular application framework.
In the embodiment of the present invention, the BMC may perform a configuration operation of a BIOS option on a first BIOS configuration file by calling a method provided by a Dbus through a redfish process, where the configuration operation may include: querying the operation of the current BIOS option configuration, modifying the operation of the BIOS option configuration, querying the operation of the BIOS unactuated configuration, clearing the operation of the unactuated BIOS configuration, and querying at least one of the operation of the modification result of the BIOS option configuration. Illustratively, by performing an operation of querying the current BIOS option configuration, the BMC may query a first BIOS configuration file under the BMC file directory; by performing the operation of modifying the BIOS option configuration, the BMC may modify the BIOS option within the first BIOS configuration file; by executing the operation of inquiring the BIOS for the unactuated configuration, the BMC can read the modified BIOS options under the BMC file directory, thereby determining whether the modified BIOS options are effective; by executing the operation of clearing the unactuated BIOS configuration, the BMC can clear the file where the unactuated BIOS option is located; by performing the operation of querying the modified result of the BIOS option configuration, the BMC may obtain the result of whether the BIOS option is successfully set.
In the embodiment of the invention, the interaction between the BMC and the BIOS can be realized through the shared memory, the BMC can acquire a first BIOS configuration file of the BIOS running on the HOST processor through the shared memory, and the configuration operation of BIOS options is carried out on the first BIOS configuration file through a method provided by calling Dbus through a redfish process, wherein the configuration operation comprises the following steps: querying the operation of the current BIOS option configuration, modifying the operation of the BIOS option configuration, querying the operation of the BIOS unactuated configuration, clearing the operation of the unactuated BIOS configuration, and querying at least one of the operation of the modification result of the BIOS option configuration. The invention provides a complete design scheme of BIOS option configuration from inquiry, modification, inquiry unoccupied configuration, clearing unoffected BIOS option configuration and inquiry configuration results, can realize the aim of simultaneously modifying a plurality of BIOS options, and solves the problems of complicated BIOS option and inconvenient operation in the configuration process.
Referring to fig. 3, a flowchart illustrating steps of another BIOS option configuration method of a basic input output system according to an embodiment of the present invention is shown, where the method is applied to a server, and the server includes a baseboard management controller BMC, a main central processor HOST processor, and a shared memory, where the BMC is connected to the HOST processor and the shared memory, respectively, and the method specifically may include the following steps:
step 201, after the BIOS running in the HOST processor writes a first BIOS configuration file into the shared memory, the BMC detects that the BIOS completes a power-on self-test POST process, writes the first BIOS configuration file into a first shared memory area, reads the first BIOS configuration file in the first shared memory area, and places the first BIOS configuration file under a BMC file directory.
In the embodiment of the present invention, the shared content area may be divided into three parts, where the first part is a currently set currentsetting area, the second part is a modified setting area, and the third part is a setting result area. The currentsetting area is used for storing the information of the current BIOS configuration options; the futurizing area is used for storing the BIOS option information which is not validated; the non-validation means that the BIOS option setting is modified but the restarting operation is not performed, and the BIOS does not complete the POST process, and the modified BIOS option executed at this time is the non-validation option; the settingresult area is used for storing information whether the modification of the BIOS option is successful.
For example, a POST end indication signal may be set after the BIOS is running, and the BMC determines that the power-on self-test process of the BIOS is finished by accessing the POST end indication signal, and then sets the operatingsystestate attribute under dbus to true. After the power-on self-checking process of the BIOS is finished, the BIOS configuration information may be written into the first shared memory area in a manner of a first BIOS configuration file. The first shared memory area may be a currentsetting area, and the first BIOS configuration file may be a currentsetting. After the BMC detects the change of the currentsetting area data, the Dbus attribute currentSettingUpdateFlag may be set to true. After the currentSettingUpdateFlag attribute and the OperatingSystemState attribute are both true, the BMC may read the currentSettingjson file of the currentSettingregion and place it under the BMC file directory.
Step 202, the BMC invokes, through a hypermedia application program interface redfish process, a method provided by a message bus system Dbus, and performs a configuration operation of a BIOS option on the first BIOS configuration file, where the configuration operation includes: querying the operation of the current BIOS option configuration, modifying the operation of the BIOS option configuration, querying the operation of the BIOS unactuated configuration, clearing the operation of the unactuated BIOS configuration, and querying at least one of the operation of the modification result of the BIOS option configuration.
In one embodiment, the Dbus provided method includes a configuration query method; the BMC calls a method provided by a workbench communication mechanism Dbus through a hypermedia application program interface redfish process, and the configuration operation of BIOS options on the first BIOS configuration file can comprise the following sub-steps:
s11, the BMC calls the configuration query method through a redfish process, and reads the first BIOS configuration file under the BMC file directory through the configuration query method;
in the embodiment of the invention, the BMC can call the method for inquiring the current BIOS option configuration under the Dbus through the redfish process, and reads the first BIOS configuration file under the BMC file directory through the method for inquiring the current BIOS option configuration. The first BIOS configuration file may be a currentsetting.
Step S12, if the first BIOS configuration file does not exist or the file format is wrong, error information is generated and output;
in the embodiment of the present invention, if the first BIOS configuration file, i.e., the currentsetting file, does not exist or the file format is not the json format, the error information is displayed on the terminal. The terminal refers to a terminal in communication with the server.
And S13, outputting the content of the first BIOS configuration file if the first BIOS configuration file exists and the file format is correct.
In the embodiment of the invention, if the currentsetting.json file exists and the file format is json format, the content of the currentsetting.json file is displayed on the terminal.
Illustratively, the BMC may send a redfish request to the Dbus to read the currentsetting.json file under the BMC file directory. If the currentsetting.json file does not exist or the file is not in json format, displaying error information on the terminal; if the currentsetting.json file exists and the file is in json format, the currentsetting.json content is displayed on the PC terminal.
In another embodiment, the shared memory includes a second shared memory region, and the method provided by the Dbus includes a configuration modification method;
the BMC calls a method provided by a workbench communication mechanism Dbus through a hypermedia application program interface redfish process, and the configuration operation of BIOS options on the first BIOS configuration file can comprise the following sub-steps:
s21, the BMC calls the configuration modification method through a redfish process and transmits at least one target BIOS option to be modified into the configuration modification method; the method comprises the steps of carrying out a first treatment on the surface of the
In the embodiment of the invention, the BMC can call a method for modifying the configuration of the BIOS options under the Dbus through a redfish process, namely a SendModifySetupRequest method, and at the same time, at least one target BIOS option to be modified is transmitted into the SendModifySetupRequest method. The target BIOS option to be modified may be a json string.
Step S22, comparing the at least one target BIOS option with the first BIOS configuration file content in the first shared memory area;
in the embodiment of the invention, the BMC can input a plurality of target BIOS options needing to be modified, and the sequence of the input target BIOS options is not required. Illustratively, each option may be comma-separated by a separation function contained within the SendModifySetupRequest method, i.e., compareByone function. The BMC may call the SendModifySetupRequest method to compare each BIOS option to the currentsetting.json file contents in the currentsetting region and check if the incoming string is in json format and if it is a valid BIOS option configuration.
Step S23, if the target BIOS options are all in the first BIOS configuration file, generating a second BIOS configuration file in a second shared memory area according to the target BIOS options through the configuration modification method;
In the embodiment of the present invention, if the target BIOS options are in the currentsetting.json file and the incoming target BIOS options are in json format and are valid BIOS option configurations, the BMC may generate a second BIOS configuration file in the second shared memory area according to the target BIOS options by the SendModifySetupRequest method. The second shared memory area may be a fusing area, and the second BIOS configuration file may be a fusing.
In the substep S24, the BMC reads the second BIOS configuration file of the second shared memory area, places the second BIOS configuration file under the BMC file directory, generates configuration modification information, and outputs the configuration modification information.
In the embodiment of the invention, the BMC can read the futurizing.json file of the futurizing region, and simultaneously put the futurizing.json file under the BMC file directory, and display configuration modification information on the terminal by sending a request for redfish to the Dbus.
In another embodiment, the Dbus provided method includes an unactuated options query method;
the BMC calls a method provided by a workbench communication mechanism Dbus through a hypermedia application program interface redfish process, and the configuration operation of BIOS options on the first BIOS configuration file can comprise the following sub-steps:
Step S31, the BMC calls the non-effective option inquiry method through a redfish process, and reads the content of the second BIOS configuration file under the BMC file directory through the non-effective option inquiry method;
in the embodiment of the invention, the BMC can call a query BIOS non-effective configuration method under Dbus through a redfish process, namely a GetModifySetup method, and reads the file content of the futuring.json file under the BMC file directory through the GetModifySetup method.
In the substep S32, if the server is not restarted, it is determined that the modified BIOS option in the second BIOS configuration file is not validated.
In the embodiment of the invention, the BIOS can execute the power-on self-checking POST process through the restarting process, and execute the option modifying operation through the POST process, so that the modified BIOS option is effective. If the restart process and the POST process are not performed on the futurizing. Json file, the content of the futurizing. Json file is an unactuated BIOS option.
Illustratively, the BMC may call a GetModifySetup method under Dbus, read the futureting. Json file content under the BMC file directory, and determine whether the futureting. Json file is valid by checking whether the futureting. Json file is restarted and a POST process. If the restart process and the POST process are not performed on the futurizing. Json file, the content of the futurizing. Json file is an unactuated BIOS option. If the restart process and the POST process are carried out on the futurizing. Json file, the content of the futurizing. Json file is the effective BIOS option. The BMC displays the contents of the futuring. Json file on the terminal by sending a request for a refish.
In another embodiment, the Dbus provided method includes an inactive option clear method;
the BMC calls a method provided by a workbench communication mechanism Dbus through a hypermedia application program interface redfish process, and the configuration operation of BIOS options on the first BIOS configuration file can comprise the following sub-steps:
in the substep S41, the BMC invokes the method for clearing the non-valid option through the edfish process, clears the second BIOS configuration file of the second shared memory area through the method for clearing the non-valid option, generates file clearing information, and outputs the file clearing information.
In the embodiment of the invention, the BMC can call a BIOS configuration method for clearing ineffective under Dbus through a refish process, namely a DelModifySetup method, and empty a futuring. Json file of a futuring region through the DelModifySetup method. The BMC displays the file clear information on the terminal by sending a request for a redfish.
Illustratively, the BMC may call the delmodifessetup method under the Dbus, and call the memset function through the bottom layer of the delmodifetup method to perform a flushing operation, flush the non-effective futurizing.json file of the futurizing region, delete the futurizing.json file under the BMC file directory, and return a boolean return value. If the return value is true, proving that the clearing is successful; if the return value is false, the clearing failure is proved. The BMC displays the file clear information on the terminal by sending a request for a redfish.
In another embodiment, the shared memory includes a third shared memory region, and the method provided by the Dbus includes modifying a result query method;
the BMC calls a method provided by a workbench communication mechanism Dbus through a hypermedia application program interface redfish process, and the configuration operation of BIOS options on the first BIOS configuration file can comprise the following sub-steps:
step S51, the BMC invokes the modification result query method through a redfish process, obtains modification results of BIOS option configuration in a third shared memory area through the modification result query method, generates modification result information of the BIOS options, and outputs the modification result information;
in the embodiment of the invention, the BMC can call a modification result method for inquiring the BIOS option configuration under the Dbus through a redfish process, namely a GetSetupResult method, and acquire a modification result of the BIOS option configuration in the third shared memory area through the GetSetupResult method. The third shared memory area may be a settingresult area. The BMC displays modification result information of the BIOS option on the terminal by sending a redfish request.
A substep S52, wherein the modification result information is used for indicating that the modification is successful if the modified BIOS option in the second BIOS configuration file is effective; and indicating that the modification fails in the case that the modified BIOS option in the second BIOS configuration file is not validated.
In the embodiment of the invention, the modification result information is used for indicating that the modification is successful under the condition that the modified BIOS option in the futurizing. Json file is effective after the restarting process and the POST process; and indicating that the modification fails in the case that the modified BIOS option in the futuresting. Json file is not validated without the restart process or the POST process.
For example, the BMC may obtain the modification result information of the BIOS option by calling the GetSetupReduce method under Dbus to read the read value of the settingresult area. The read value of the settingresult area can be determined by whether the futurizing. Json file has undergone a restart process and a POST process. If the read value of the settingresult area is true, indicating that the modification is successful; if the read value of the settingresult area is false, indicating that the modification fails.
Referring to fig. 4, a schematic diagram of a method for a BMC to call various BIOS options under a Dbus in an embodiment of the present invention is shown, where the BMC calls, through a refish process, a method related to a BIOS option control process under the Dbus bus, and the method may specifically include: sendModifySetupRequest method, getModifySetup method, delModifySetup method, getsetsettuesult method.
In the embodiment of the invention, the BMC can call different methods under the Dbus by sending different redfish requests. Sending a redfish request for modifying the BIOS option, and calling a SendModifySetupRequest method under the Dbus; sending a edfish request for inquiring the setting information which is not validated by the BIOS, and calling a GetModifySetup method under the Dbus; sending a redfish request for clearing the unactuated BIOS setting, and calling a DelModifySetup method under Dbus; and sending a redfish request for inquiring the modification result of the set BIOS option, and calling a GetSetupReduce method under the Dbus.
It should be noted that, for simplicity of description, the method embodiments are shown as a series of acts, but it should be understood by those skilled in the art that the embodiments are not limited by the order of acts, as some steps may occur in other orders or concurrently in accordance with the embodiments. Further, those skilled in the art will appreciate that the embodiments described in the specification are presently preferred embodiments, and that the acts are not necessarily required by the embodiments of the invention.
The embodiment of the invention also provides a server, which comprises a baseboard management controller BMC, a main central processing unit HOST processor and a shared memory, wherein the BMC is respectively connected with the HOST processor and the shared memory;
After the BIOS running on the HOST processor writes a first BIOS configuration file into the shared memory, the BMC is configured to obtain the first BIOS configuration file from the shared memory; the method provided by the message bus system Dbus is called through a hypermedia application program interface (redfish) process, the configuration operation of BIOS options is carried out on the first BIOS configuration file, and the configuration operation comprises the following steps: querying the operation of the current BIOS option configuration, modifying the operation of the BIOS option configuration, querying the operation of the BIOS unactuated configuration, clearing the operation of the unactuated BIOS configuration, and querying at least one of the operation of the modification result of the BIOS option configuration.
In the embodiment of the invention, the shared memory comprises a first shared memory area;
the BMC is used for detecting that the BIOS completes a power-on self-checking POST process, writing the first BIOS configuration file into a first shared memory area, reading the first BIOS configuration file of the first shared memory area, and placing the first BIOS configuration file under a BMC file directory.
In the embodiment of the invention, the Dbus providing method comprises a configuration query method;
the BMC is used for calling the configuration query method through a redfish process, and reading the first BIOS configuration file under the BMC file directory through the configuration query method; if the first BIOS configuration file does not exist or the file format is wrong, generating error information and outputting the error information; and if the first BIOS configuration file exists and the file format is correct, outputting the content of the first BIOS configuration file.
In the embodiment of the invention, the shared memory includes a second shared memory area, and the method provided by the Dbus includes a configuration modification method;
the BMC is used for calling the configuration modification method through a redfish process and transmitting at least one target BIOS option to be modified into the configuration modification method; comparing the at least one target BIOS option with the first BIOS configuration file content in the first shared memory area; if the target BIOS options are all in the first BIOS configuration file, generating a second BIOS configuration file in a second shared memory area according to the target BIOS options through the configuration modification method; the BMC reads the second BIOS configuration file of the second shared memory area, places the second BIOS configuration file under the BMC file directory, generates configuration modification information, and outputs the configuration modification information.
In the embodiment of the invention, the Dbus providing method comprises an unactuated option inquiring method;
the BMC is used for calling the unactuated option query method through a redfish process, and reading the content of the second BIOS configuration file under the BMC file directory through the unactuated option query method; and if the server is not restarted, determining that the modified BIOS options in the second BIOS configuration file are not effective.
In the embodiment of the invention, the Dbus providing method comprises an unactuated option clearing method;
the BMC is used for calling the method for clearing the non-effective option through the redfish process, clearing the second BIOS configuration file of the second shared memory area through the method for clearing the non-effective option, generating file clearing information, and outputting the file clearing information.
In the embodiment of the invention, the shared memory includes a third shared memory area, and the method provided by the Dbus includes a modification result query method;
the BMC is used for calling the modification result query method through a redfish process, acquiring a modification result of BIOS option configuration in a third shared memory area through the modification result query method, generating modification result information of the BIOS option, and outputting the modification result information;
the modification result information is used for indicating that the modification is successful under the condition that the modified BIOS option in the second BIOS configuration file is effective; and indicating that the modification fails in the case that the modified BIOS option in the second BIOS configuration file is not validated.
For the server embodiment, since it is substantially similar to the method embodiment, the description is relatively simple, and the relevant points are referred to in the description of the method embodiment.
The embodiment of the invention also provides electronic equipment, which comprises:
one or more processors; and
one or more machine readable media having instructions stored thereon, which when executed by the one or more processors, cause the apparatus to perform the Basic Input Output System (BIOS) option configuration method as claimed in any one of the above.
Embodiments of the present invention also provide a computer-readable storage medium having instructions stored thereon that, when executed by one or more processors, cause the processors to perform a method of Basic Input Output System (BIOS) option configuration as described in any one of the above.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described by differences from other embodiments, and identical and similar parts between the embodiments are all enough to be referred to each other.
It will be apparent to those skilled in the art that embodiments of the present invention may be provided as a method, apparatus, or computer program product. Accordingly, embodiments of the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, embodiments of the invention may take the form of a computer program product embodied on one or more machine-readable media (including, but not limited to, magnetic disk storage, CD-ROM, optical storage, etc.) having computer-usable program code embodied therein.
Embodiments of the present invention are described with reference to flowchart illustrations and/or block diagrams of methods, terminal devices (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal device, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiment and all such alterations and modifications as fall within the scope of the embodiments of the invention.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or terminal. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article or terminal device comprising the element.
The basic input/output system (BIOS) option configuration method and a server provided by the present invention are described in detail, and specific examples are applied to illustrate the principles and embodiments of the present invention, where the description of the above examples is only for helping to understand the method and core ideas of the present invention; meanwhile, as those skilled in the art will have variations in the specific embodiments and application scope in accordance with the ideas of the present invention, the present description should not be construed as limiting the present invention in view of the above.
Claims (10)
1. The BIOS option configuration method of the basic input output system is characterized by being applied to a server, wherein the server comprises a baseboard management controller BMC, a main central processing unit HOST processor and a shared memory, the BMC is respectively connected with the HOST processor and the shared memory, and the method comprises the following steps:
after the BIOS running on the HOST processor writes a first BIOS configuration file into the shared memory, the BMC acquires the first BIOS configuration file from the shared memory;
the BMC calls a method provided by a message bus system Dbus through a hypermedia application program interface (redfish) process, and performs configuration operation of BIOS options on the first BIOS configuration file, wherein the configuration operation comprises the following steps: querying the operation of the current BIOS option configuration, modifying the operation of the BIOS option configuration, querying the operation of the BIOS unactuated configuration, clearing the operation of the unactuated BIOS configuration, and querying at least one of the operation of the modification result of the BIOS option configuration.
2. The method of claim 1, wherein the shared memory comprises a first shared memory region, and wherein the BMC obtains the first BIOS configuration file from the shared memory, comprising:
after the BMC detects that the BIOS completes the power-on self-checking POST process and writes the first BIOS configuration file into a first shared memory area, the BMC reads the first BIOS configuration file of the first shared memory area and places the first BIOS configuration file under a BMC file directory.
3. The method of claim 1, wherein the Dbus provided method comprises a configuration query method;
the BMC calls a method provided by a workbench communication mechanism Dbus through a hypermedia application program interface redfish process, and performs configuration operation of BIOS options on the first BIOS configuration file, and the method comprises the following steps:
the BMC invokes the configuration query method through a redfish process, and reads the first BIOS configuration file under the BMC file directory through the configuration query method;
if the first BIOS configuration file does not exist or the file format is wrong, generating error information and outputting the error information;
and if the first BIOS configuration file exists and the file format is correct, outputting the content of the first BIOS configuration file.
4. The method of claim 3, wherein the shared memory includes a second shared memory region, and wherein the Dbus provided method includes a configuration modification method;
the BMC calls a method provided by a workbench communication mechanism Dbus through a hypermedia application program interface redfish process, and performs configuration operation of BIOS options on the first BIOS configuration file, and the method comprises the following steps:
the BMC invokes the configuration modification method through a redfish process and transmits at least one target BIOS option to be modified into the configuration modification method;
comparing the at least one target BIOS option with the first BIOS configuration file content in the first shared memory area;
if the target BIOS options are all in the first BIOS configuration file, generating a second BIOS configuration file in a second shared memory area according to the target BIOS options through the configuration modification method;
the BMC reads the second BIOS configuration file of the second shared memory area, places the second BIOS configuration file under the BMC file directory, generates configuration modification information, and outputs the configuration modification information.
5. The method of claim 4, wherein the Dbus provided method comprises an unachievable option query method;
The BMC calls a method provided by a workbench communication mechanism Dbus through a hypermedia application program interface redfish process, and performs configuration operation of BIOS options on the first BIOS configuration file, and the method comprises the following steps:
the BMC invokes the unactuated option query method through a redfish process, and reads the content of the second BIOS configuration file under the BMC file directory through the unactuated option query method;
and if the server is not restarted, determining that the modified BIOS options in the second BIOS configuration file are not effective.
6. The method of claim 5, wherein the Dbus provided method comprises an inactive option clear method;
the BMC calls a method provided by a workbench communication mechanism Dbus through a hypermedia application program interface redfish process, and performs configuration operation of BIOS options on the first BIOS configuration file, and the method comprises the following steps:
and the BMC calls the method for clearing the non-effective option through a redfish process, clears the second BIOS configuration file of the second shared memory area through the method for clearing the non-effective option, generates file clearing information, and outputs the file clearing information.
7. The method of claim 5, wherein the shared memory includes a third shared memory region, and wherein the Dbus provided method includes modifying a result query method;
The BMC calls a method provided by a workbench communication mechanism Dbus through a hypermedia application program interface redfish process, and performs configuration operation of BIOS options on the first BIOS configuration file, and the method comprises the following steps:
the BMC invokes the modification result query method through a redfish process, obtains modification results of BIOS option configuration in a third shared memory area through the modification result query method, generates modification result information of the BIOS option, and outputs the modification result information;
the modification result information is used for indicating that the modification is successful under the condition that the modified BIOS option in the second BIOS configuration file is effective; and indicating that the modification fails in the case that the modified BIOS option in the second BIOS configuration file is not validated.
8. The server is characterized by comprising a baseboard management controller BMC, a main central processing unit HOST processor and a shared memory, wherein the BMC is respectively connected with the HOST processor and the shared memory;
after the BIOS running on the HOST processor writes a first BIOS configuration file into the shared memory, the BMC is configured to obtain the first BIOS configuration file from the shared memory; the method provided by the message bus system Dbus is called through a hypermedia application program interface (redfish) process, the configuration operation of BIOS options is carried out on the first BIOS configuration file, and the configuration operation comprises the following steps: querying the operation of the current BIOS option configuration, modifying the operation of the BIOS option configuration, querying the operation of the BIOS unactuated configuration, clearing the operation of the unactuated BIOS configuration, and querying at least one of the operation of the modification result of the BIOS option configuration.
9. An electronic device, comprising:
one or more processors; and
one or more machine readable media having instructions stored thereon, which when executed by the one or more processors, cause the apparatus to perform the basic input output system BIOS option configuration method of any one of claims 1-7.
10. One or more machine readable media having instructions stored thereon that, when executed by one or more processors, cause the processors to perform the method of basic input output system BIOS option configuration as claimed in any one of claims 1 to 7.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310854636.1A CN117032818A (en) | 2023-07-12 | 2023-07-12 | A basic input and output system BIOS option configuration method and device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202310854636.1A CN117032818A (en) | 2023-07-12 | 2023-07-12 | A basic input and output system BIOS option configuration method and device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN117032818A true CN117032818A (en) | 2023-11-10 |
Family
ID=88628790
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202310854636.1A Pending CN117032818A (en) | 2023-07-12 | 2023-07-12 | A basic input and output system BIOS option configuration method and device |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN117032818A (en) |
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TWI890625B (en) * | 2024-11-22 | 2025-07-11 | 神雲科技股份有限公司 | Bios default detection method |
-
2023
- 2023-07-12 CN CN202310854636.1A patent/CN117032818A/en active Pending
Cited By (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| TWI890625B (en) * | 2024-11-22 | 2025-07-11 | 神雲科技股份有限公司 | Bios default detection method |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US20210240489A1 (en) | Firmware update patch | |
| CN107861691B (en) | A load balancing method and device for a multi-controller storage system | |
| CN109783345B (en) | Method and system for testing small program performance | |
| CN110659104B (en) | Service monitoring method and related equipment | |
| CN110502357A (en) | A kind of stack retrogressive method, device, medium and equipment | |
| US20190073249A1 (en) | Message oriented middleware with integrated rules engine | |
| JP5652480B2 (en) | Database update notification method | |
| CN119226094B (en) | Database monitoring automated deployment method, device, equipment and medium | |
| CN112579307A (en) | Physical lock resource allocation detection method and device and electronic equipment | |
| CN117992204A (en) | Memory detection method, device, equipment and storage medium | |
| CN108920563B (en) | A kind of database switching method and device | |
| CN115840617B (en) | Debugging method, system and related device | |
| CN117032818A (en) | A basic input and output system BIOS option configuration method and device | |
| CN113760465A (en) | A transaction execution method, apparatus, server, device and storage medium | |
| CN119669357A (en) | Data synchronization method, device, equipment and medium | |
| WO2022021850A1 (en) | Service instance deployment method and apparatus, electronic device, and storage medium | |
| CN113760631A (en) | Page loading duration determination method, device, equipment and storage medium | |
| CN113687915B (en) | Container running method, device, equipment and storage medium | |
| CN105610908B (en) | A kind of samba service implementing method and system based on Android device | |
| CN110727945B (en) | Virus scanning method, device and computer readable medium | |
| WO2021003729A1 (en) | Configuration method, physical device, server and computer readable storage medium | |
| CN111726373B (en) | Communication link construction method, device and equipment | |
| CN115904509B (en) | Method and device for processing restart instruction of network equipment | |
| US20250321734A1 (en) | Flexible integration project deployment model | |
| CN114676018B (en) | Method, device, medium and program product for updating device status |
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 | ||
| CB02 | Change of applicant information |
Country or region after: China Address after: 215000 Building 9, No.1 guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province Applicant after: Suzhou Yuannao Intelligent Technology Co.,Ltd. Address before: 215000 Building 9, No.1 guanpu Road, Guoxiang street, Wuzhong Economic Development Zone, Suzhou City, Jiangsu Province Applicant before: SUZHOU LANGCHAO INTELLIGENT TECHNOLOGY Co.,Ltd. Country or region before: China |
|
| CB02 | Change of applicant information |