A command configuration method and device, a storage medium and an electronic device

By working collaboratively between the BMC and BIOS and dynamically generating OEM IPMI commands using configuration files, the problems of high code coupling and poor flexibility in existing technologies are solved. This enables flexible configuration and efficient management of OEM IPMI commands, simplifying the fault diagnosis process.

CN121597293BActive Publication Date: 2026-04-14INSPUR (SHANDONG) COMPUTER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-29
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

In existing technologies, the OEM IPMI command format is hard-coded into the BIOS code, resulting in high code coupling, low collaboration efficiency, poor flexibility, and high maintenance complexity, making it difficult to meet the personalized management needs of server manufacturers.

Method used

By obtaining the configuration file from the BMC and saving it to the target storage area, the BIOS reads the configuration file during the boot process to generate IPMI commands. The OEM IPMI commands are dynamically configured using configuration files in JSON, XML, or binary format, reducing the need to modify the BIOS firmware. The BIOS also achieves flexible configuration of command formats through the collaborative work between the BMC and the BIOS.

Benefits of technology

It reduces code coupling, improves development and maintenance efficiency, simplifies the fault diagnosis process, reduces communication costs and debugging cycles, and enhances the flexibility and configurability of server management functions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121597293B_ABST
    Figure CN121597293B_ABST
Patent Text Reader

Abstract

The embodiment of the present disclosure provides a command configuration method and device, a storage medium and an electronic device, relates to the technical field of computers, and the method is applied to a server, the server comprises a baseboard management controller (BMC) and a host, and the host is used for running a basic input / output system (BIOS); the method comprises the following steps: the BMC acquires a configuration file and saves the configuration file to a target storage area; the BIOS reads the configuration file from the target storage area in a booting process; the BIOS obtains intelligent platform management interface (IPMI) command data according to the configuration file, and generates at least one IPMI command according to the IPMI command data; wherein the at least one IPMI command is used for executing a target function required by the server. In this way, without the intervention of a BIOS engineer to modify code, compile and burn firmware, the implementation and / or modification of the IPMI command (namely, an OEM IPMI command) of the target function are realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a command configuration method, apparatus, storage medium, and electronic device. Background Technology

[0002] In modern data centers and cloud computing infrastructure, servers, as the core computing power carriers, are crucial for their manageability, reliability, and maintainability. The IPMI (Intelligent Platform Management Interface) standard has become the de facto standard for server hardware management, and the BMC (Baseboard Manager Controller), as a coprocessor independent of the main system (such as the CPU (Central Processing Unit) and OS (Operating System)), is the core hardware for implementing IPMI functionality. The BMC is responsible for comprehensive monitoring, management, and control of the server, including but not limited to fan speed control, temperature monitoring, voltage detection, remote power on / off, firmware updates, and event logging.

[0003] To ensure independent and real-time management, the BMC chip typically incorporates a built-in SRAM (Static Random-Access Memory). This SRAM (usually 1MB in capacity) plays a crucial role in the server system: during the server's Power-On Self-Test (POST) phase, the BIOS (Basic Input Output System) writes a series of critical hardware asset information (such as motherboard serial number, CPU model, and memory configuration), firmware version information, and specific configuration parameters into this SRAM area. After completing the data writing, the BIOS notifies the BMC by triggering a specific GPIO (General Purpose Input / Output) signal. Upon receiving this signal, the BMC reads this data from the SRAM and persistently stores it in a path specified by its own file system. Since the BMC itself runs a streamlined Linux operating system, technical support personnel or system administrators can log in to the BMC securely via SSH (Secure Shell) to directly access and view this hardware information stored in the specified path, greatly facilitating remote fault diagnosis and asset management.

[0004] However, the standard IPMI command set cannot fully cover the personalized management needs of all server manufacturers. Therefore, in practice, a set of proprietary OEM (Original Equipment Manufacturer) IPMI commands is usually defined to achieve specific functions, such as reading data from custom sensors, controlling specific power state sequences, and executing manufacturer-specific diagnostic programs. These OEM commands primarily use NEFN (IPMI Network Function Codes) and CMD (IPMI Command Codes) formats, requiring mutual support from both the BMC firmware and BIOS firmware for correct execution.

[0005] Currently, the traditional methods commonly used in the industry to implement these OEM IPMI commands have the following significant drawbacks and limitations:

[0006] 1. High code coupling: The OEM IPMI command format is hard-coded in the BIOS code. Every change requires recompiling and flashing the firmware, which is cumbersome and prone to errors.

[0007] 2. Low collaboration efficiency: The BIOS and BMC development teams need to communicate frequently to confirm command formats, resulting in high coordination costs;

[0008] 3. Poor flexibility: If the command format needs to be adjusted for different projects or different stages of the same project, the code must be modified repeatedly, lacking a unified and flexible configuration mechanism.

[0009] 4. Complexity of maintenance and diagnosis: When an OEM IPMI command communication failure occurs, the diagnosis process is very complex, requiring confirmation of the BIOS version, checking the BIOS source code to verify the format definition, etc., which is time-consuming and labor-intensive.

[0010] Therefore, there is an urgent need for a technical solution that can enable flexible configuration of OEM IPMI command formats, reduce code coupling, and improve development and maintenance efficiency. Summary of the Invention

[0011] This disclosure provides a command configuration method, apparatus, storage medium, and electronic device to at least solve the above-mentioned technical problems existing in the prior art.

[0012] The technical solution of this disclosure embodiment is implemented as follows:

[0013] In a first aspect, embodiments of this disclosure provide a command configuration method, the method being applied to a server, the server comprising: a baseboard management controller (BMC) and a host, the host being used to run a basic input / output system (BIOS); the method comprising:

[0014] BMC obtains the configuration file and saves the configuration file to the target storage area;

[0015] During the boot process, the BIOS reads the configuration file from the target storage area;

[0016] The BIOS obtains the Intelligent Platform Management Interface (IPMI) command data based on the configuration file, and generates at least one IPMI command based on the IPMI command data.

[0017] The at least one IPMI command is used to perform the target functions required by the server.

[0018] In the above scheme, before saving the configuration file to the target storage area, the method further includes:

[0019] The BMC performs content logic verification on the configuration file, and the content logic verification includes at least one of the following: signature verification and content rationality verification;

[0020] If the verification passes, determine whether the server meets the write conditions. If the server meets the write conditions, save the configuration file to the target storage area.

[0021] The server meets the write conditions, including: the server is currently in a powered-off state or in the operating system (OS) state.

[0022] In the above scheme, saving the configuration file to the target storage area includes:

[0023] The configuration file is written into the preset address area of ​​the SRAM of the BMC chip, and the flag bit of the beginning content of the preset address area is set to 1.

[0024] In the above scheme, the BIOS reads the configuration file from the target storage area during the boot process, including:

[0025] During the boot process, the BIOS accesses the preset address area of ​​the SRAM of the BMC chip and uses flag bits to determine whether the contents of the SRAM have been updated.

[0026] If the flag bit is 1, then the configuration file in the SRAM is read.

[0027] In the above scheme, generating at least one IPMI command based on IPMI command data includes:

[0028] The BIOS generates at least one IPMI command based on preset IPMI function and IPMI command data;

[0029] The IPMI function has reserved variable bits, which are used to match and fill in the IPMI command data.

[0030] The method in the above scheme further includes:

[0031] After generating all IMPI commands based on the IPMI command data, the flag of the beginning of the preset address region of the SRAM of the BMC chip is set to 0.

[0032] The method in the above scheme further includes:

[0033] The BMC performs format detection on the IPMI command data in the configuration file;

[0034] If the format is not the preset format, the IPMI command data is converted to conform to the preset format; the preset format is the command format agreed upon in advance by the BIOS and the BMC.

[0035] In the above scheme, the BMC obtaining the configuration file includes:

[0036] The BMC receives a configuration file uploaded via a webpage, the configuration file being used to record instruction data required to achieve the target functions of the server;

[0037] The instruction data includes at least one of the following fields: command name, command code CMD, network function code NEFN, and data length.

[0038] The method in the above scheme further includes:

[0039] When the host is in the running phase, if the BMC receives a new configuration file, it saves the new configuration file to the target storage area;

[0040] The BMC sends a notification message to the host, the notification message being used to inform the host that a new configuration file exists;

[0041] The host displays a command update prompt, detects the operation in response to the command update prompt, and restarts the server according to the operation to update the IPMI command.

[0042] The method in the above scheme further includes:

[0043] The BMC records the write status and feeds back the write status to the webpage; the webpage is used to display the write status.

[0044] The method in the above scheme further includes:

[0045] The BIOS sends the generated at least one IPMI command to the BMC via the target interface;

[0046] The BMC executes the desired target function according to the at least one IPMI command.

[0047] In the above scheme, the configuration file adopts at least one of the following formats: JSON format, XML format, and binary format.

[0048] Secondly, embodiments of this disclosure provide a command configuration apparatus for use on a server, the apparatus comprising: a BMC and a host, the host being used to run the BIOS;

[0049] The BMC is used to obtain the configuration file and save the configuration file to the target storage area;

[0050] The BIOS is used to read the configuration file from the target storage area during the boot process;

[0051] The BIOS obtains the Intelligent Platform Management Interface (IPMI) command data based on the configuration file, and generates at least one IPMI command based on the IPMI command data.

[0052] The at least one IPMI command is used to perform the target functions required by the server.

[0053] In the above scheme, the BMC is used to perform content logic verification on the configuration file before saving the configuration file to the target storage area. The content logic verification includes at least one of the following: signature verification and content rationality verification.

[0054] If the verification passes, determine whether the server meets the write conditions. If the server meets the write conditions, save the configuration file to the target storage area.

[0055] The server meets the write conditions, including: the server is currently in a powered-off state or in the operating system (OS) state.

[0056] In the above scheme, the BMC is used to write the configuration file into a preset address area of ​​the SRAM of the BMC chip, and set the flag bit of the beginning content of the preset address area to 1.

[0057] In the above scheme, the BIOS is used to access the preset address area of ​​the SRAM of the BMC chip during the boot process, and determine whether the contents of the SRAM have been updated by using a flag bit;

[0058] If the flag bit is 1, then the configuration file in the SRAM is read.

[0059] In the above scheme, the BIOS is used to generate at least one IPMI command based on preset IPMI function and IPMI command data;

[0060] The IPMI function has reserved variable bits, which are used to match and fill in the IPMI command data.

[0061] In the above scheme, the BIOS is further configured to set the flag of the beginning of the preset address region of the SRAM of the BMC chip to 0 after generating all IMPI commands according to the IPMI command data.

[0062] In the above scheme, the BMC is used to perform format detection on the IPMI command data in the configuration file;

[0063] If the format is not the preset format, the IPMI command data is converted to conform to the preset format; the preset format is the command format agreed upon in advance by the BIOS and the BMC.

[0064] In the above scheme, the BMC is used to receive a configuration file uploaded via a webpage, and the configuration file is used to record instruction data required to achieve the target function of the server;

[0065] The instruction data includes at least one of the following fields: command name, command code CMD, network function code NEFN, and data length.

[0066] In the above scheme, the BMC is also used to save the new configuration file to the target storage area if the BMC receives a new configuration file when the host is in the running phase.

[0067] Send a notification message to the host, the notification message being used to inform the host that a new configuration file exists;

[0068] The host is also used to present instruction update prompts, detect operations in response to the instruction update prompts, and restart the server to update the IPMI commands based on the operations.

[0069] In the above scheme, the BMC is used to record the write status and feed the write status back to the webpage; the webpage is used to display the write status.

[0070] In the above scheme, the BIOS is used to send the generated at least one IPMI command to the BMC through the target interface;

[0071] The BMC is used to execute the desired target function according to the at least one IPMI command.

[0072] In the above scheme, the configuration file adopts at least one of the following formats: JSON format, XML format, and binary format.

[0073] Thirdly, embodiments of this disclosure provide an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform any of the command configuration methods described above.

[0074] Fourthly, embodiments of this disclosure provide a non-transitory computer-readable storage medium storing computer instructions for causing a computer to execute a command configuration method according to any one of the claims.

[0075] The embodiments disclosed herein have the following beneficial effects:

[0076] The command configuration method, apparatus, storage medium, and electronic device provided in this disclosure are applied to a server, the server including a Baseboard Management Controller (BMC) and a host, the host running a Basic Input / Output System (BIOS); the method includes: the BMC acquiring a configuration file and saving the configuration file to a target storage area; the BIOS reading the configuration file from the target storage area during the boot process; the BIOS obtaining Intelligent Platform Management Interface (IPMI) command data based on the configuration file, and generating at least one IPMI command based on the IPMI command data; wherein the at least one IPMI command is used to execute the target function required by the server. Thus, without the intervention of BIOS engineers to modify code, compile, and flash firmware, the implementation and / or modification of the IPMI commands (i.e., OEM IPMI commands) for the target function are achieved. This frees the generation of OEM IPMI commands from cumbersome code modification, compilation, and firmware flashing, transforming it into a simple configuration file operation, greatly shortening the development and debugging cycle and saving development costs.

[0077] It should be understood that the description in this section is not intended to identify key or essential features of the embodiments of this disclosure, nor is it intended to limit the scope of this disclosure. Other features of this disclosure will become readily apparent from the following description. Attached Figure Description

[0078] Figure 1 A flowchart illustrating a command configuration method provided in an embodiment of this disclosure;

[0079] Figure 2 A flowchart illustrating a BMC and BIOS co-configuration method for server OEM IPMI commands provided in this embodiment of the disclosure;

[0080] Figure 3 This is a schematic diagram of the structure of a command configuration device provided in an embodiment of the present disclosure;

[0081] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure. Detailed Implementation

[0082] To make the objectives, features, and advantages of this disclosure more apparent and understandable, the technical solutions in the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without creative effort are within the scope of protection of this disclosure.

[0083] In the following description, references are made to “some embodiments,” which describe a subset of all possible embodiments. However, it is understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0084] If the application documents contain similar descriptions such as "first / second", the following explanation shall be added: In the following description, the terms "first / second / third" are used only to distinguish similar objects and do not represent a specific order of objects. It is understood that "first / second / third" may be interchanged in a specific order or sequence where permitted, so that the embodiments of this application described herein can be implemented in an order other than that illustrated or described herein.

[0085] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs. The terminology used herein is for the purpose of describing embodiments of this application only and is not intended to limit this application.

[0086] Figure 1 This is a flowchart illustrating a command configuration method provided in an embodiment of the present disclosure, such as... Figure 2 As shown, the method is applied to a server, the server including: a BMC and a host, the host being used to run the BIOS; the method includes:

[0087] Step 101: BMC obtains the configuration file and saves the configuration file to the target storage area;

[0088] Step 102: During the boot process, the BIOS reads the configuration file from the target storage area;

[0089] Step 103: The BIOS obtains IPMI command data based on the configuration file and generates at least one IPMI command based on the IPMI command data;

[0090] The at least one IPMI command is used to perform the target functions required by the server.

[0091] Here, generating at least one IPMI command specifically refers to an OEM IPMI command. In addition to standard IPMI commands, some server manufacturers may define proprietary OEM IPMI commands to implement specific functions. These OEM IPMI commands are typically not part of the standard IPMI specification and may include reading data from custom sensors, controlling specific power state sequences, executing specific diagnostic procedures, etc. Therefore, the generated IPMI commands can include server manufacturer-defined IPMI commands that are not part of the standard IPMI specification and are used to implement specific functions.

[0092] Accordingly, IPMI commands are used to perform the target functions required by the server. Characterization commands are IPMI commands that are extended and customized by specific hardware manufacturers (OEMs, original equipment manufacturers) according to their own hardware characteristics or needs.

[0093] For example, the target functionality could be an extension of the temperature sensor; specifically, some server vendors may provide additional sensor monitoring commands to monitor unique hardware or environmental factors.

[0094] Specialized hardware controls, specifically, some manufacturers may provide commands to manage LED indicators inside the server chassis, manage fan control, or perform custom hardware initialization tasks.

[0095] Diagnostic tools, specifically, some manufacturers may provide commands to run their specific hardware diagnostic programs to help detect hardware problems.

[0096] Of course, the target functions can also include reading data from custom sensors, controlling specific power state sequences, and executing specific diagnostic programs, as mentioned above. These will not be elaborated on here.

[0097] The method provided in this disclosure, on the one hand, stores the configuration file (containing parameters of OEM IPMI commands) in the target storage area of ​​the server. The command parameters are no longer hard-coded into the BIOS, allowing for dynamic reading and updating, which greatly reduces the coupling between code and the need to modify the BIOS firmware. Furthermore, modifications only require updating the configuration file, without recompiling or flashing the firmware, enabling adaptation to changes in project requirements and making the server's management functions more flexible and configurable.

[0098] On the other hand, the BMC and BIOS interact through configuration files, and commands can be updated or generated based on the configuration files without frequent modifications to the firmware code. This makes the collaboration between the BMC and BIOS more independent, reduces the burden of communication and coordination, and improves work efficiency.

[0099] On the other hand, if a problem occurs, it can be resolved by checking the configuration file, without having to delve into the BIOS source code, which greatly simplifies the fault diagnosis process and improves the efficiency of troubleshooting.

[0100] In some embodiments, the BMC acquires the configuration file, including:

[0101] The BMC receives a configuration file uploaded via a webpage, the configuration file being used to record instruction parameters required to achieve the target functions of the server;

[0102] The instruction parameters include at least one of the following fields: command name, CMD, NEFN, and data length.

[0103] Here, the configuration file is a file that records command parameters. These command parameters are used to construct OEMIPMI commands.

[0104] The command name indicates the type or function of the command, such as "power switch" or "sensor read".

[0105] CMD (Command Code): The specific code of an IPMI command, identifying the specific operation performed by that command.

[0106] NETFN (Network Function): A network function code that indicates which type of network function the command belongs to.

[0107] Data length: The length of data required by the command to determine the amount of data to be sent.

[0108] Here, users (such as server manufacturers) can prepare configuration files in IPMI command format according to their own needs in order to generate the IPMI commands required for the target function, and then perform the corresponding function operation through the generated IPMI commands.

[0109] Before developing this feature, the BIOS and BMC can negotiate the format and related details of this configuration file in advance to ensure that the format and parameters of the configuration file can be correctly understood and used.

[0110] In addition, the BIOS and BMC can pre-negotiate specific signature verification methods. The signature verification function primarily targets the BMC. Specifically, the signature verification function refers to verifying the signature of the configuration file during upload and execution to ensure that the configuration file has not been tampered with. Signature verification uses encryption algorithms to ensure that the configuration file has not been modified during transmission, thus preventing malicious modification of the configuration file content and ensuring that the BMC executes only legitimate commands. The BMC's signature verification function is mainly to ensure the integrity and security of the configuration file, preventing malicious software or unauthorized users from modifying the configuration file and executing insecure commands.

[0111] Here, the BMC is the core control unit for server hardware management, and it is independent of the server's operating system. The BMC can perform remote management tasks even when the operating system is not running or the server is completely powered off. For example, it can monitor hardware health, control power, and perform remote restarts.

[0112] Each server's BMC can be configured with an IP address, which allows remote access to the BMC web page for server management and monitoring. Users can upload configuration files to the BMC through the BMC web interface. The BMC web page provides a clear overview of the current server status, allows viewing BMC logs, and enables various BMC functions. Logging into the BMC web page requires a username and password with the appropriate permissions. Users can send configuration files to the BMC via the BMC web page, and the BMC receives configuration files uploaded through the webpage (BMC web page).

[0113] In one example, to prepare the configuration file for IPMI command data, the user can upload the configuration file to BMC via the BMC web interface. The IPMI command data configuration file can use a fixed format, including fields such as command name, CMD, NEFN, and data length. The user edits the configuration file according to project requirements, filling in the corresponding IPMI command data. The configuration file is then saved as a file in a specific format (such as JSON, XML, or binary format). After obtaining the configuration file in the specified format, the user logs into the BMC web interface; goes to the "IPMI Command Configuration" page; selects the local configuration file and uploads it; BMC receives the file and verifies its format validity.

[0114] In some embodiments, before saving the configuration file to the target storage area, the method further includes:

[0115] The BMC performs content logic verification on the configuration file, and the content logic verification includes at least one of the following: signature verification and content rationality verification;

[0116] If the verification passes, determine whether the server meets the write conditions. If the server meets the write conditions, save the configuration file to the target storage area.

[0117] The server satisfies the write conditions, including: the server is currently in a powered-off state or in an OS state.

[0118] Here, before saving the configuration file, BMC can check the contents of the configuration file to ensure the validity of the file. Specifically, it can perform signature verification, which means verifying the integrity and source of the configuration file to ensure that the file has not been tampered with and comes from a trusted source. Signature verification can generally be achieved through cryptographic signature technology. Any signature verification method can be used here without limitation.

[0119] Furthermore, it can perform content validity verification, which means checking whether the content of the configuration file conforms to predetermined rules or logic. For example, certain fields may require specific formats, ranges, or other constraints, and BMC can verify whether the data in the file meets these requirements.

[0120] After successful verification, it is necessary to determine whether the write conditions are met. The write conditions include one of the following:

[0121] The server is currently powered off. If the server is powered off, BMC can safely write the configuration file to the target storage area without interfering with the server's operation.

[0122] The server is in an operating system (OS) state. If the server has been started and entered the operating system, BMC can also perform write operations in the system OS state.

[0123] Whether the device is powered off can be determined by the motherboard power status, and whether it has entered the OS state can be determined by the boot self-test code sent by the BIOS.

[0124] In this way, BMC can ensure the security and integrity of the configuration file, while avoiding write operations at inappropriate times (such as when the server is running), thus preventing interference with the normal operation of the server.

[0125] In some embodiments, saving the configuration file to a target storage area includes:

[0126] The configuration file is written to a preset address region of the SRAM (Static Random Access Memory) of the BMC chip, and the flag bit of the beginning content of the preset address region is set to 1.

[0127] Here, the target storage area refers to the preset address area of ​​the SRAM of the BMC chip.

[0128] The flag bit is used to identify a certain operation or state. Specifically, the flag bit is used to mark whether the content of the preset address area in the SRAM has been updated (i.e. whether new IPMI command data has been stored). If it has been updated, it is set to 1; if it has not been updated, it is set to 0.

[0129] Here, after the BMC parses the configuration file and writes it to a designated area of ​​SRAM, the BIOS reads the configuration file from SRAM during the boot process, parses it, and configures the IPMI command variables. Specifically, the BMC checks the configuration file and determines whether the current server status allows writing to SRAM. If the write conditions are met, the BMC writes the parsed command format data to a preset address area of ​​the BMC chip's SRAM and sets the flag at the beginning of the preset address area of ​​SRAM to 1. Furthermore, the BMC can record the write status and provide feedback on the upload result through the web interface.

[0130] Thus, after parsing the configuration file and extracting the IPMI command data, the BMC writes these command parameters to a designated storage area in SRAM and sets the flag of that area to 1, indicating that the data has been successfully written and is ready for subsequent operations. This ensures that the contents of the configuration file are correctly stored and marked as valid, so that the BIOS can perform subsequent management and control operations based on these commands.

[0131] In some embodiments, the BIOS reads the configuration file from the target storage area during the boot process, including:

[0132] During the boot process, the BIOS accesses the preset address area of ​​the SRAM of the BMC chip and uses flag bits to determine whether the contents of the SRAM have been updated.

[0133] If the flag bit is 1, then read the IPMI command data from the SRAM.

[0134] Here, after the server is powered on, the BIOS starts running. After the BIOS initialization is complete, it accesses the preset address area of ​​the SRAM of the BMC chip and uses the flag bit to determine whether the contents of the SRAM have been updated. If the flag bit is 1, it reads the IPMI command data from the configuration file in the SRAM.

[0135] Specifically, when the server starts up, the BIOS (Basic Input / Output System) is the first software to run. It is responsible for initializing the hardware, ensuring that hardware components (such as CPU, memory, hard drive, etc.) can work properly, and preparing for the operating system to start.

[0136] After the BIOS completes hardware initialization and is ready, it can access the SRAM in the BMC chip to obtain IPMI command data related to OEM IPMI commands, in order to generate the specific commands required by the manufacturer, namely OEM IPMI commands.

[0137] Thus, the above method solves the problems of high code coupling and poor flexibility: by defining OEM IPMI commands, the command format can be decoupled from hard-coded configuration, allowing for a more flexible configuration approach. This eliminates the need to modify and recompile the BIOS code with each change, making command updates more flexible and efficient. Furthermore, defining and adjusting the command format using configuration files or dynamic updates means that when commands need adjustment in different projects or at different stages, only the configuration file needs to be modified or a dynamic update performed, without directly modifying the code, greatly improving flexibility.

[0138] In addition, OEM IPMI commands, through standardized command formats and parameters, can reduce the need for communication between the BIOS and BMC development teams, thus solving the problem of low collaboration efficiency.

[0139] By adopting the standardized OEM IPMI command protocol, the format and behavior of commands become more transparent and traceable; through mechanisms such as logging and command execution tracing, troubleshooting becomes more convenient. For example, BMC can provide detailed execution logs when executing OEM IPMI commands, recording information such as command format, parameters, and execution status, making it easier for development and operations teams to quickly locate problems and reduce the complexity of fault diagnosis.

[0140] In some embodiments, generating at least one IPMI command based on IPMI command data includes:

[0141] The BIOS generates at least one IPMI command based on preset IPMI function and IPMI command data;

[0142] The IPMI function has reserved variable bits, which are used to match and fill in the IPMI command data.

[0143] Here, the BIOS can use preset IPMI function names to generate actual IPMI commands based on the received IPMI command data. These preset IPMI function names are predefined codes within the BIOS that describe how to communicate with hardware and perform specific operations (such as rebooting, acquiring sensor data, etc.). These functions are predefined in the BIOS code and reserve variable bits to receive and populate specific command data. That is, these variable bits are used to receive command parameters obtained from the configuration file.

[0144] The BIOS generates commands by matching the variable bits in the function with the corresponding content in the configuration data and filling in these variable bits.

[0145] In some embodiments, the method further includes:

[0146] After generating all IMPI commands based on the IPMI command data, the flag of the beginning of the preset address region of the SRAM of the BMC chip is set to 0.

[0147] Here, the BIOS can perform write operations on the SRAM, such as setting the flag in the SRAM to 0. This clears the write flag in the IPMI configuration file and prevents subsequent repeated read operations on the SRAM.

[0148] In one example, the BIOS parses and reads data from a configuration file, sets internal IPMI command variables (such as CMD, NEFN, etc.) according to the file content, and stores the configuration variables (i.e., IPMI command data) in NVRAM or memory for subsequent IPMI interactions. Then, the BIOS can write to SRAM, setting the flag in SRAM to 0; the BIOS controls the server to restart, using the read IPMI command variables after booting.

[0149] In some embodiments, the method further includes:

[0150] The BMC performs format detection on the IPMI command data in the configuration file;

[0151] If the format is not the preset format, the IPMI command data is converted to conform to the preset format; the preset format is the command format agreed upon in advance by the BIOS and the BMC.

[0152] Here, if the BMC detects that the format of the command data does not match the preset format, it can perform format conversion, that is, convert the data into a form that conforms to the preset format.

[0153] The format conversion process may include changing the data structure, modifying the data type, and reorganizing the data to ensure that the data can be understood and used correctly by the BIOS and BMC, thereby ensuring that the system can process commands correctly.

[0154] In some embodiments, the method further includes:

[0155] When the host is in the running phase, if the BMC receives a new configuration file, it saves the new configuration file to the target storage area;

[0156] The BMC sends a notification message to the host, the notification message being used to inform the host that a new configuration file exists;

[0157] The host displays a command update prompt, detects the operation in response to the command update prompt, and restarts the server according to the operation to update the IPMI command.

[0158] Here, considering that configuration files may be uploaded while the server is running, a runtime configuration method is provided. Specifically, when the BMC receives a new configuration file, it saves the file to a predefined storage area. After saving the file, the BMC sends a notification message to the host, informing it that a new configuration file exists. Upon receiving the notification, the host displays an update prompt; for example, the host displays a message on the screen indicating that "a new configuration file is pending update." Simultaneously, the host detects the user's action on the prompt—whether the user chooses to accept the update, skip the update, or perform other actions. If the user or the system decides to update, the host restarts the server to apply the new configuration file to the system.

[0159] In some embodiments, the method further includes:

[0160] The BMC records the write status and feeds back the write status to the webpage; the webpage is used to display the write status.

[0161] In some embodiments, the method further includes:

[0162] The BIOS sends the generated at least one IPMI command to the BMC via the target interface;

[0163] The BMC executes the desired target function according to the at least one IPMI command.

[0164] Here, the BIOS sends the generated OEM IPMI command to the BMC through a specific interface (which can be a hardware interface or a communication protocol); after receiving the IPMI command, the BMC will execute the corresponding function according to the command content, such as reading data from custom sensors, controlling specific power state sequences, and executing manufacturer-specific diagnostic programs.

[0165] In some embodiments, the configuration file is in at least one of the following formats: JSON format, XML format, or binary format.

[0166] This disclosure provides a command configuration method, specifically for configuring server OEM IPMI commands. The configuration is handled collaboratively by the BMC and BIOS. This method defines OEM IPMI command data through a standardized configuration file, uploads and parses it to a designated area of ​​SRAM via the BMC's web interface, and then the BIOS reads the SRAM content during startup, dynamically configures its internal command variables, and stores them in NVRAM. This achieves software configuration of the command format, completely eliminating the reliance on hard-coded BIOS code. This shortens development and debugging time, reduces communication costs, facilitates rapid problem location, and the entire process logic is hidden within the firmware code. All related display interfaces require account and password login, ensuring security and reliability.

[0167] Figure 2 This is a flowchart illustrating a BMC and BIOS co-configuration method for server OEM IPMI commands provided in an embodiment of this disclosure, as shown below. Figure 2 As shown, the method includes:

[0168] Step S10: Obtain the configuration file for IPMI command data.

[0169] Before developing this function, the BIOS and BMC can agree on the format of the configuration file, related details, and specific signature verification methods. The signature verification function is mainly for the BMC.

[0170] Specifically, step S10 may include:

[0171] Step S11 defines the fixed format of the IPMI command data configuration file, including fields such as command name, CMD, NEFN, and data length. IPMI commands are typically divided into get commands and set commands.

[0172] Here is an example.

[0173] Assuming it's a command to enable or disable BIOS white box options, the get command is: ipmitool raw 0x3c0x05 0x0b (netfn is 0x3c, cmd is 0x05, data length is 1, and data field is 0x0b). After sending this command to the BMC, the BMC will return 0 or 1, corresponding to disable or enable.

[0174] The `set` command is: `ipmitool raw 0x3c 0x04 0x0b 0x00 / 0x01` (where `netfn` is 0x3c, `cmd` is 0x04, the data length is 2, the data field is 0x0b, and the variable field is 0x00 or 0x01). Using this command, the BMC will write the result of `set` (either 0 or 1) to its own EEPROM for storage, so that it can return a status when it receives a `get` command.

[0175] Therefore, when setting the configuration file format, you need to define the data length, variable fields, and function name of the get and set commands of a fixed function command. The remaining NEFN, CMD, and data fields can be used as IPMI command parameters.

[0176] Accordingly, the format for modifying the white card option in the configuration file can be referenced as follows:

[0177] "name": "Logo_option", "type": "get", "netfn": "0x3c", "cmd": "0x05", "len": "0x01", "date0": "0xb";

[0178] "name": "Logo_option", "type": "set", "netfn": "0x3c", "cmd": "0x04", "len": "0x02", "date0": "0xb", "var0": "0x00 / 0x01".

[0179] Step S12: Edit the configuration file according to project requirements and fill in the corresponding IPMI command data. For example, referring to the specific example in S11, improve the relevant content of each command in the configuration file according to the actual situation of the project.

[0180] Step S13: Save the file as a specific format (such as JSON, XML, or binary format). Here, JSON and XML are text formats, which are easy for engineers to read directly; and if parameters need to be added to this format, only fields need to be added, without modifying the entire text structure; whether it is the Linux system on the BMC side (usually using Python, C++, etc.) or the C environment on the BIOS side, there are a large number of mature and stable open source libraries to parse JSON and XML, reducing implementation costs and technical risks.

[0181] Step S20: Upload the configuration file to BMC via the BMC WEB interface.

[0182] Here, BMC, as a management subsystem independent of the server, can be accessed via BMC IP to log in to the BMC WEB page. This page provides a clear overview of the current server status, allows viewing of BMC logs, and access to BMC-related functions. Logging into the BMC WEB requires entering an account and password with the appropriate BMC permissions to use the relevant functions.

[0183] Specifically, step S20 may include:

[0184] Step S21: The user logs into the BMC WEB interface. By entering the corresponding BMC IP address in a browser, the user can access the BMC WEB page and log in with the appropriate username and password.

[0185] Step S22, access the "IPMI Command Configuration" page. The BMC WEB has numerous functions; the webpage's options and help information allow users to easily find the corresponding functions. The IPMI command configuration page can be placed under the sub-functions of BMC management for easier function categorization and user convenience.

[0186] Step S23: Select the local configuration file and upload it. Similar to uploading a webpage file, after clicking the upload button, a file directory will pop up. After selecting the configuration file to be uploaded, the browser will transfer the file to the BMC chip via the HTTP protocol.

[0187] Step S24: BMC receives the file and verifies the signature. This signature verification may include: first, checking the file's existence to confirm whether the configuration file was successfully uploaded and not lost during transmission; then checking the file size to ensure it is within a preset reasonable range; and finally, checking the file extension to initially verify that the file extension is in the expected format (e.g., .json or .xml).

[0188] Step S30: BMC parses the configuration file and writes it to the specified area of ​​SRAM.

[0189] Here, BMC needs to verify the signature and content rationality of the configuration file, process the content logic, determine whether the current server state has the conditions for writing to SRAM, and finally perform the SRAM writing operation.

[0190] Specifically, step S30 may include:

[0191] Step S31: BMC parses the configuration file content. BMC first checks the file syntax for errors, such as missing quotation marks. After passing the syntax check, BMC can iterate through the parsed data objects, verifying whether each field meets the requirements.

[0192] Step S32: The BMC determines whether the current server state allows writing to SRAM. To avoid simultaneous SRAM read / write operations by the BIOS and BMC, it is proposed to avoid writing to SRAM during the BIOS startup process. The BMC can perform SRAM write operations when the server is powered off or after entering the OS. The BMC can determine whether the server is powered off by the motherboard power status, and whether it has entered the OS state can be determined by the postcode sent by the BIOS.

[0193] In step S33, after the write conditions are met, the BMC writes the parsed command format data into the preset address area of ​​the BMC chip's SRAM, and sets the flag at the beginning of the preset address area of ​​the SRAM to 1. The flag at the beginning is used to mark the write status, preventing the BIOS from repeatedly processing the configuration file content every time the computer boots up, which would affect the boot time.

[0194] In step S34, BMC records the write status and displays the upload result on the web interface. After the write is complete, the BMC program notifies the web frontend via HTTP protocol, and the web interface displays the status to inform the user that the write is complete.

[0195] Step S40: The BIOS reads the configuration file in SRAM during the boot process.

[0196] Here, after powering on, the BIOS first performs CPU initialization, then memory setup, and initialization of peripheral hard drives and PCIe components, as well as loading of relevant drivers. After completing these necessary tasks, it can run the program code for reading and writing to SRAM without affecting the necessary functions of the boot process.

[0197] Specifically, step S40 may include:

[0198] Step S41: The server is powered on, and the BIOS starts running.

[0199] Step S42: After BIOS initialization is complete, access the preset area of ​​the BMC chip SRAM and use the flag to determine whether the content in the SRAM has been updated.

[0200] Since the contents of SRAM are cleared after the BMC chip is powered off, but servers are often restarted or DC restarted afterward, and generally no power-off operation is performed after racking, the contents of SRAM will persist after being written. In order to prevent the BIOS from processing the contents of SRAM every time it boots up and affecting the boot time, a flag is added to indicate the write status.

[0201] Step S43: If flag is set to 1, then read the IPMI command configuration file data in SRAM.

[0202] Step S50: The BIOS parses the configuration file and configures the IPMI command variables.

[0203] Here, the BIOS's processing logic for IPMI command variables is consistent with the options in traditional BIOS SETUP. It reads the variable area uniformly during startup and writes it uniformly when configuring IPMI command variables, without needing to add additional logic to process IPMI command variables separately.

[0204] Further, step S50 may specifically include:

[0205] Step S51: The BIOS parses the read configuration file data. Because the variables were pre-reserved in the corresponding IPMI function during the BIOS code design, including the interactive netfn, cmd, length of the interactive array, and the contents of the interactive array, it is only necessary to match the content corresponding to "name" in SRAM with the pre-reserved function in the code to configure the various variables defined in the BIOS under this function according to the parameters under this "name" in the configuration file.

[0206] Step S52: Set internal IPMI command variables (such as CMD, NEFN, etc.) according to the file content. As described in step S51, as long as the function is matched, the reserved variables in the corresponding function can be made equal to the parameters in the configuration file.

[0207] Step S53: Store the configuration variables in NVRAM or memory for subsequent IPMI interaction. After processing the SRAM contents, the BIOS can store the variables in NVRAM by running a unified variable set function.

[0208] In step S54, the BIOS writes to the SRAM and sets the flag in the SRAM to 0. To prevent subsequent repeated read operations on the SRAM, the write flag in the IPMI configuration file is cleared.

[0209] Step S55: The BIOS control server restarts and uses the read IPMI command variables after power-on. Because the BIOS performs some IPMI-related interactions during the initial power-on process, a restart is performed to ensure that all IPMI interactions meet the configuration file requirements without affecting these interactions.

[0210] The method provided in this disclosure allows for the implementation and modification of OME IPMI commands without the need for BIOS engineers to modify code, compile, or flash firmware. By utilizing BMC SRAM as a configuration transfer area and combining standardized configuration files with the BMC WEB upload mechanism, dynamic and flexible configuration of command formats is achieved. Command format adjustments are freed from cumbersome code modification, compilation, and firmware flashing, transforming into a simple configuration file upload operation, significantly shortening the development and debugging cycle. The standardized configuration file acts as a "contract," effectively decoupling the development work of the BIOS and BMC teams, enabling parallel development, reducing frequent coordination and communication, and improving overall collaboration efficiency. When command communication anomalies occur, maintenance personnel can directly check or update the configuration file through the BMC WEB interface to quickly locate the problem, reducing reliance on senior developers and making maintenance work more intuitive and efficient. The entire configuration process requires authorization through the BMC WEB, and the configuration is ultimately fixed in NVRAM by the BIOS, effectively preventing unauthorized access and runtime tampering, ensuring the security and stability of the management channel.

[0211] Figure 3 This is a schematic diagram of the structure of a command configuration device provided in an embodiment of this disclosure; as shown below. Figure 3 As shown, the device is applied to a server, and the device includes: a BMC and a host, the host being used to run the BIOS;

[0212] The BMC is used to obtain the configuration file and save the configuration file to the target storage area;

[0213] The BIOS is used to read the configuration file from the target storage area during the boot process;

[0214] The BIOS obtains the Intelligent Platform Management Interface (IPMI) command data based on the configuration file, and generates at least one IPMI command based on the IPMI command data.

[0215] The at least one IPMI command is used to perform the target functions required by the server.

[0216] In some embodiments, the BMC is used to perform content logic verification on the configuration file before saving the configuration file to the target storage area. The content logic verification includes at least one of the following: signature verification and content rationality verification.

[0217] If the verification passes, determine whether the server meets the write conditions. If the server meets the write conditions, save the configuration file to the target storage area.

[0218] The server meets the write conditions, including: the server is currently in a powered-off state or in the operating system (OS) state.

[0219] In some embodiments, the BMC is used to write the configuration file into a preset address region of the SRAM of the BMC chip, and set the flag bit of the beginning content of the preset address region to 1.

[0220] In some embodiments, the BIOS is used to access a preset address region of the SRAM of the BMC chip during the boot process and determine whether the contents of the SRAM have been updated by using a flag bit;

[0221] If the flag bit is 1, then the configuration file in the SRAM is read.

[0222] In some embodiments, the BIOS is configured to generate at least one IPMI command based on preset IPMI function and IPMI command data;

[0223] The IPMI function has reserved variable bits, which are used to match and fill in the IPMI command data.

[0224] In some embodiments, the BIOS is further configured to set the flag of the beginning of a preset address region of the SRAM of the BMC chip to 0 after generating all IMPI commands based on the IPMI command data.

[0225] In some embodiments, the BMC is used to perform format detection on the IPMI command data in the configuration file;

[0226] If the format is not the preset format, the IPMI command data is converted to conform to the preset format; the preset format is the command format agreed upon in advance by the BIOS and the BMC.

[0227] In some embodiments, the BMC is configured to receive a configuration file uploaded via a webpage, the configuration file being used to record instruction data required to implement the target functions of the server;

[0228] The instruction data includes at least one of the following fields: command name, command code CMD, network function code NEFN, and data length.

[0229] In some embodiments, the BMC is further configured to save the new configuration file to a target storage area if the BMC receives a new configuration file while the host is in operation.

[0230] Send a notification message to the host, the notification message being used to inform the host that a new configuration file exists;

[0231] The host is also used to present instruction update prompts, detect operations in response to the instruction update prompts, and restart the server to update the IPMI commands based on the operations.

[0232] In some embodiments, the BMC is used to record the write status and feed the write status back to the webpage; the webpage is used to display the write status.

[0233] In some embodiments, the BIOS is configured to send the generated at least one IPMI command to the BMC via a target interface;

[0234] The BMC is used to execute the desired target function according to the at least one IPMI command.

[0235] In some embodiments, the configuration file is in at least one of the following formats: JSON format, XML format, or binary format.

[0236] It is understood that, when implementing the corresponding command configuration method, the command configuration device provided in the above embodiments can allocate the above processing to different modules as needed to complete all or part of the processing described above. Furthermore, the device and the corresponding method embodiments provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiments, which will not be repeated here.

[0237] This application provides a computer program product or computer program that includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform a command configuration method.

[0238] This application provides a computer-readable storage medium storing executable instructions, wherein the executable instructions are stored and, when executed by a processor, will cause the processor to execute the command configuration method provided in this application.

[0239] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface memory, optical disk, or CD-ROM; or it may be a variety of devices including one or any combination of the above-mentioned memories.

[0240] In some embodiments, executable instructions may take the form of a program, software, software module, script, or code, written in any form of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as a standalone program or as a module, component, subroutine, or other unit suitable for use in a computing environment.

[0241] As an example, executable instructions may, but do not necessarily, correspond to files in a file system. They may be stored as part of a file that holds other programs or data, for example, in one or more scripts in a Hyper Text Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple collaborating files (e.g., a file that stores one or more modules, subroutines, or code sections).

[0242] As an example, executable instructions can be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.

[0243] Figure 4 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this disclosure; as shown below. Figure 4 As shown, the electronic device 40 includes a processor 401 and a memory 402 communicatively connected to the processor 401; the memory 402 stores instructions executable by the processor 401. The instructions are executed by the processor 401 to enable the processor 401 to execute a command configuration method.

[0244] In practical applications, the electronic device 40 may further include at least one network interface 403. The various components of the electronic device 40 are coupled together via a bus system 404. It is understood that the bus system 404 is used to implement communication between these components. In addition to a data bus, the bus system 404 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 4 All buses are labeled as bus system 404. The number of processors 401 can be at least one, and the number of memories 402 can be at least one. Network interface 403 is used for wired or wireless communication between electronic device 40 and other devices.

[0245] The memory 402 in this embodiment is used to store various types of data to support the operation of the electronic device 40.

[0246] The methods disclosed in the above embodiments of this disclosure can be applied to processor 401, or implemented by processor 401. Processor 401 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 401 or by instructions in the form of software. The processor 401 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 401 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. A general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this disclosure can be directly manifested as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in memory 402. Processor 401 reads the information in memory 402 and, in conjunction with its hardware, completes the steps of the aforementioned command configuration method.

[0247] In some embodiments, the electronic device 40 may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned methods.

[0248] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this disclosure can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution disclosed in this disclosure can be achieved, and this is not limited herein.

[0249] In the above description, the term "some embodiments" refers to a subset of all possible embodiments. However, it is understood that "some embodiments" may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.

[0250] Unless otherwise defined, all technical and scientific terms used in this disclosure have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terminology used in this disclosure is for the purpose of describing embodiments of this disclosure only and is not intended to be limiting of this disclosure.

[0251] It should be understood that in the various embodiments of this disclosure, the sequence number of each implementation process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this disclosure.

[0252] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one of that feature. In the description of this disclosure, "a plurality of" means two or more, unless otherwise explicitly specified.

[0253] The above description is merely a specific embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.

Claims

1. A command configuration method, characterized in that, The method is applied to a server, the server comprising: a baseboard management controller (BMC) and a host, the host being used to run a basic input / output system (BIOS); the method includes: BMC obtains the configuration file and saves the configuration file to the target storage area; During the boot process, the BIOS reads the configuration file from the target storage area; The BIOS obtains the Intelligent Platform Management Interface (IPMI) command data based on the configuration file, and generates at least one IPMI command based on the IPMI command data. The at least one IPMI command is used to perform the target functions required by the server; The step of generating at least one IPMI command based on IPMI command data includes: The BIOS generates at least one IPMI command based on preset IPMI function and IPMI command data; The IPMI function has reserved variable bits, which are used to match and fill in the IPMI command data.

2. The method according to claim 1, characterized in that, Before saving the configuration file to the target storage area, the method further includes: The BMC performs content logic verification on the configuration file, and the content logic verification includes at least one of the following: signature verification and content rationality verification; If the verification passes, determine whether the server meets the write conditions. If the server meets the write conditions, save the configuration file to the target storage area. The server meets the write conditions, including: the server is currently in a powered-off state or in the operating system (OS) state.

3. The method according to claim 2, characterized in that, Saving the configuration file to the target storage area includes: The configuration file is written into the preset address area of ​​the SRAM of the BMC chip, and the flag bit of the beginning content of the preset address area is set to 1.

4. The method according to claim 3, characterized in that, During the boot process, the BIOS reads the configuration file from the target storage area, including: During the boot process, the BIOS accesses the preset address area of ​​the SRAM of the BMC chip and uses flag bits to determine whether the contents of the SRAM have been updated. If the flag bit is 1, then the configuration file in the SRAM is read.

5. The method according to claim 1, characterized in that, The method further includes: After generating all IMPI commands based on the IPMI command data, the flag of the beginning of the preset address region of the SRAM of the BMC chip is set to 0.

6. The method according to claim 2, characterized in that, The method further includes: The BMC performs format detection on the IPMI command data in the configuration file; If the format is not the preset format, the IPMI command data is converted to conform to the preset format; the preset format is the command format agreed upon in advance by the BIOS and the BMC.

7. The method according to claim 1, characterized in that, The BMC obtains the configuration file, including: The BMC receives a configuration file uploaded via a webpage, the configuration file being used to record instruction data required to achieve the target functions of the server; The instruction data includes at least one of the following fields: command name, command code CMD, network function code NEFN, and data length.

8. The method according to claim 1, characterized in that, The method further includes: When the host is in operation, if the BMC receives a new configuration file, it saves the new configuration file to the target storage area. The BMC sends a notification message to the host, the notification message being used to inform the host that a new configuration file exists; The host displays an instruction update prompt, detects the operation in response to the instruction update prompt, and restarts the server according to the operation to update the IPMI command.

9. The method according to claim 3, characterized in that, The method further includes: The BMC records the write status and feeds back the write status to the webpage; the webpage is used to display the write status.

10. The method according to claim 1, characterized in that, The method further includes: The BIOS sends the generated at least one IPMI command to the BMC through the target interface; The BMC executes the desired target function according to the at least one IPMI command.

11. The method according to claim 1, characterized in that, The configuration file shall be in at least one of the following formats: JSON, XML, or binary.

12. A command configuration device, characterized in that, Applied to a server, the device includes: a BMC and a host, the host being used to run the BIOS; The BMC is used to obtain the configuration file and save the configuration file to the target storage area; The BIOS is used to read the configuration file from the target storage area during the boot process; The BIOS obtains the Intelligent Platform Management Interface (IPMI) command data based on the configuration file, and generates at least one IPMI command based on the IPMI command data. The at least one IPMI command is used to perform the target functions required by the server; The step of generating at least one IPMI command based on IPMI command data includes: The BIOS generates at least one IPMI command based on preset IPMI function and IPMI command data; The IPMI function has reserved variable bits, which are used to match and fill in the IPMI command data.

13. An electronic device, characterized in that, include: At least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the method of any one of claims 1 to 11.

14. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 11.

Citation Information

Patent Citations

  • IPMI command management method, system and device and computer storage medium

    CN113961561A

  • Configuration management method, device and equipment and machine readable storage medium

    CN115437677A