A method and apparatus for BIOS and BMC interoperability

By using the IPMI protocol and UART link for communication between the BIOS and BMC, the problems of slow and unstable transmission speed were solved, enabling the server to start up quickly and stably.

CN117931719BActive Publication Date: 2026-11-17联想长风科技(北京)有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410126051.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-30
Publication Date
2026-11-17
Estimated Expiration
2044-01-30

AI Technical Summary

Technical Problem

In existing technologies, communication between BIOS and BMC suffers from slow transmission speed and instability, which affects the server startup process.

Method used

The IPMI protocol and UART link are used to establish a communication connection between the BIOS and BMC. The BIOS chip sends instructions or settings to the BMC chip and loads the boot file of the corresponding boot partition to ensure accurate and efficient booting of the operating system.

Benefits of technology

It achieves tight interoperability between BIOS and BMC, ensuring a fast and stable boot process for the server in various operating system rollback scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117931719B_ABST
    Figure CN117931719B_ABST
Patent Text Reader

Abstract

This invention discloses a method and apparatus for BIOS and BMC interoperability, relating to the fields of computer hardware and firmware management. The method includes: establishing a communication connection between the BIOS chip and the BMC chip via a UART link using the IPMI protocol; sending instructions or settings from the BIOS chip to the BMC chip; loading the boot file of the corresponding boot partition according to the BMC instructions or settings; and booting the operating system. This solves the technical problems of slow transmission speed and instability in existing BIOS-BMC communication, achieving tight interoperability between the BIOS and BMC, ensuring accurate and efficient booting of the server in various operating system rollback scenarios, and achieving fast and stable transmission.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer hardware and firmware management, and in particular to a method and apparatus for BIOS and BMC interoperability. Background Technology

[0002] During server startup, selecting the correct boot medium and ensuring efficient and stable booting are crucial. With technological advancements, server hardware configurations and operating systems have become increasingly complex, making the boot process more intricate. Therefore, communication between the BIOS and BMC is essential for stable, efficient, and intelligent server startup. Existing solutions primarily employ serial communication or the I2C (SSIF) protocol to achieve communication between the BIOS chip and the BMC chip. However, this solution suffers from slow transmission speeds and instability.

[0003] Currently, the communication between BIOS and BMC suffers from slow transmission speed and instability. Summary of the Invention

[0004] This application provides a method and apparatus for BIOS and BMC interoperability. By using the technical means of establishing a communication connection between BIOS and BMC through IPMI protocol and UART link, it achieves tight interoperability between BIOS and BMC, ensuring accurate and efficient booting of the server in various operating system rollback scenarios, and realizing the technical effect of fast and stable transmission.

[0005] This application provides a method for BIOS and BMC interoperability, including:

[0006] The IPMI protocol is used to establish a communication connection between the BIOS chip and the BMC chip via a UART link;

[0007] The BIOS chip sends instructions or settings to the BMC chip, and loads the boot file of the corresponding boot partition according to the BMC instructions or settings to boot the operating system.

[0008] In possible implementations, the following processing is performed:

[0009] Get startup options;

[0010] Based on the boot options, the BMC chip updates the boot list;

[0011] The BMC chip restarts the BIOS chip;

[0012] Waiting for the BIOS chip to send a boot list query command;

[0013] When the command to query the boot list is received, the boot list is sent to the BIOS chip.

[0014] In possible implementations, the following processing is performed:

[0015] Obtain the boot order command code, which includes the boot activation mode and boot partition information;

[0016] Based on the startup activation mode and startup partition information, perform partition startup.

[0017] In possible implementations, the following processing is performed:

[0018] The activation mode includes permanent activation and activation upon next activation.

[0019] In possible implementations, the following processing is performed:

[0020] The boot partition information includes the recovery system, operating system A, and operating system B.

[0021] In a possible implementation, before performing partition boot based on the boot activation mode and boot partition information, the following processing is performed:

[0022] Determine if the boot device is the hard drive;

[0023] When the boot item is a hard drive, partition boot is performed according to the boot activation mode and boot partition information.

[0024] In possible implementations, the following processing is performed:

[0025] The BIOS chip acquires BMC instructions each time it boots up;

[0026] If the BMC instruction exists, determine whether the activation mode of the BMC instruction is permanently effective;

[0027] Save the BMC instruction with the startup activation mode set to permanent to the FLASH variable area;

[0028] Configure the boot partition for executing the BMC instructions, and boot the system from the boot partition defined by the BMC instructions.

[0029] In a possible implementation, after obtaining the BMC instruction, the following processing is performed:

[0030] If the BMC instruction does not exist, obtain the variable area instruction from the FLASH variable area;

[0031] When the variable area instruction exists, the variable area instruction is executed to start the system from the boot partition defined by the variable area instruction.

[0032] In a possible implementation, after obtaining the variable area instruction from the FLASH variable area, the following processing is performed:

[0033] If the variable area instruction does not exist, set the default instruction to be executed.

[0034] This application also provides a BIOS and BMC interoperability device, including:

[0035] A communication connection establishment module is used to establish a communication connection between the BIOS chip and the BMC chip via a UART link using the IPMI protocol.

[0036] The operating system boot module is used to send instructions or settings to the BMC chip through the BIOS chip, and load the boot file of the corresponding boot partition according to the BMC instructions or settings to boot the operating system.

[0037] The proposed method and apparatus for BIOS and BMC interoperability utilizes the IPMI protocol to establish a communication connection between the BIOS chip and the BMC chip via a UART link. The BIOS chip then sends instructions or settings to the BMC chip, and the corresponding boot file of the boot partition is loaded according to the BMC instructions or settings to boot the operating system. This achieves tight interoperability between the BIOS and BMC, ensuring accurate and efficient booting of the server in various operating system rollback scenarios, and realizing the technical effect of fast and stable transmission. Attached Figure Description

[0038] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings of the embodiments of this disclosure will be briefly described below. Flowcharts are used in this application to illustrate the operations performed by the system according to the embodiments of this application. It should be understood that the preceding or following operations are not necessarily performed precisely in sequence. Instead, various steps can be processed in reverse order or simultaneously as needed. Furthermore, other operations can be added to these processes, or one or more steps can be removed from these processes.

[0039] Figure 1 A flowchart illustrating a BIOS and BMC interoperability method provided in an embodiment of this application;

[0040] Figure 2 A schematic flowchart of an embodiment of a BIOS and BMC interoperability method provided in this application;

[0041] Figure 3 A flowchart illustrating another embodiment of a BIOS and BMC interoperability method provided in this application;

[0042] Figure 4 This is a schematic diagram of a BIOS and BMC interconnection device provided in an embodiment of this application. Detailed Implementation

[0043] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of this application more obvious and understandable, the following are specific embodiments of this application.

[0044] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description of this application will be provided in conjunction with the accompanying drawings. The described embodiments should not be considered as limitations on this application. All other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0045] In the following description, references to "some embodiments" describe a subset of all possible embodiments; however, it is understood that "some embodiments" may be the same or different subsets of all possible embodiments and may be combined with each other without conflict. The terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or server that includes a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or modules not explicitly listed or inherent to such processes, methods, products, or devices. 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.

[0046] This application provides a method for BIOS and BMC interoperability, such as... Figure 1 As shown, the method includes:

[0047] Step S100: Using the IPMI protocol, a communication connection is established between the BIOS chip and the BMC chip via a UART link. The IPMI protocol is an open standard protocol for hardware monitoring and management, defining how firmware running on server hardware communicates with remote management tools (such as IPMItool). The UART (Universal Asynchronous Receiver-Transmitter) link is a universal asynchronous receiver-transmitter used for serial communication between different hardware components. Through the IPMI protocol, the BMC chip configures and starts the UART link, enabling data exchange between the BIOS chip and the BMC chip.

[0048] After the communication connection is established, step S200 is executed, in which the BIOS chip sends instructions or settings to the BMC chip. Based on the BMC instructions or settings, the corresponding boot file of the boot partition is loaded to boot the operating system. The BIOS chip sends specific instructions or settings to the BMC chip via the UART link, including boot order, system configuration, or other management tasks. The BMC chip adjusts the boot list according to the received instructions or settings. When the server restarts, the BIOS chip obtains the latest boot list by querying the BMC chip, and then loads and boots the corresponding operating system partition according to the boot list provided by the BMC. This embodiment of the application uses the technical means of establishing a communication connection between the BIOS and BMC through the IPMI protocol and UART link, realizing close interoperability between the BIOS and BMC, solving the problem of boot media selection, and ensuring accurate and efficient booting of the server in various operating system rollback scenarios, achieving the technical effects of fast transmission speed and stability.

[0049] like Figure 2As shown, in one possible implementation, step S200 further includes step S210, obtaining boot options. The BIOS chip obtains boot options, including boot media (such as hard drive, USB, etc.), boot partition, boot order, etc., by querying system configuration and reading preset settings. Based on the obtained boot options, step S220 is executed, whereby the BMC chip updates the boot list according to the boot options. The BMC chip adjusts its internal boot order or configuration according to the boot options provided by the BIOS chip. To ensure that the BIOS chip restarts according to the new settings or configuration, step S230 is further executed, whereby the BMC chip restarts the BIOS chip. The BMC chip sends a restart command to the BIOS chip via instructions. After receiving the command, the BIOS chip restarts and loads the new boot configuration. Then, step S240 is executed, waiting for the BIOS chip's command to query the boot list. That is, the BMC chip waits for a query command from the BIOS chip. After restarting, the BIOS chip sends a command to the BMC chip to query the boot list to confirm the latest boot configuration. Upon receiving the command, the BMC chip responds and executes step S250. When it receives the command to query the boot list, it sends the boot list to the BIOS chip. The BMC chip prepares and sends the boot list information to the BIOS chip. The boot list is a list containing the current boot configuration, including detailed information such as boot media, boot partition, and boot order. Steps S210 to S250 ensure that the configuration and management strategies between the BMC and BIOS are executed accurately and efficiently during system startup, reducing problems or failures caused by inconsistent configurations, thereby achieving the technical effect of improving system stability and reliability.

[0050] In another possible implementation, step S200 further includes step S260, obtaining the boot sequence command code, which includes the boot activation mode and boot partition information. The BMC chip sends a request command to the BIOS chip via the IPMI protocol, requesting to obtain the boot sequence command code. The BIOS chip responds to the request and sends the boot sequence command code to the BMC chip. The BMC chip obtains detailed instructions on how to boot the server to ensure a correct boot process, and then executes step S270, performing partition boot according to the boot activation mode and boot partition information. The BMC chip analyzes the boot activation mode in the boot sequence command code to determine whether the boot is permanent, only effective for this time, or other specific activation mode. Based on the boot partition information, the BMC chip determines the boot partition to be activated, including hard drives, USB drives, or other boot media, as well as partitions containing multiple operating systems. According to the determined boot partition, the BMC chip loads the corresponding boot files. The BMC chip controls the server hardware to activate the selected boot partition by setting an appropriate boot sequence and boot parameters. Once the partition is activated, the BMC chip begins to boot the operating system, including loading the core components of the operating system and performing the initialization process until the operating system is fully booted. Through steps S260 to S270, the server can automatically and accurately activate and boot the operating system according to the preset activation mode and partition information, thereby achieving the technical effect of ensuring the stability and reliability of the system.

[0051] In one possible implementation, step S270 further includes step S271, whereby the startup activation mode includes permanent activation and activation on the next startup. In permanent activation mode, changes to the boot partition are permanent; once a new operating system or firmware is activated and booted, the changes will remain effective after a reboot unless further changes are made by the administrator. This mode allows administrators to make long-term, persistent changes, ensuring the server can still boot as expected after multiple reboots. In activation on the next startup mode, changes to the boot partition only take effect on the next startup. In other words, if a new boot partition is activated or other boot configuration changes are made, these changes only take effect on the next server reboot. This mode provides flexibility, allowing administrators to test or temporarily change the boot configuration without permanently altering the boot settings. The startup activation modes, including permanent activation and activation on the next startup, provide administrators with flexibility and control. By selecting the appropriate activation mode, administrators can quickly and accurately configure and manage the server's startup process as needed, achieving the technical effect of ensuring server stability and reliability.

[0052] In another possible implementation, step S270 further includes step S272, whereby the boot partition information includes a recovery system, operating system A, and operating system B. The recovery system is a boot partition used for system recovery or repair, containing an operating system or firmware image for system recovery or repair. Through this partition, administrators can quickly restore the server to a normal state when system problems occur. Operating system A is the server's regular operating system partition, containing the server's main operating system and applications for normal operation and service provision. Operating system B is a backup or secondary boot partition, containing another operating system or platform-specific repair and update tools. This partition can be used for recovery or repair when operating system A encounters problems, or for specific maintenance and configuration tasks. This partition structure provides flexibility and reliability. By properly configuring and managing these boot partitions, administrators can perform system recovery, software updates, or other maintenance tasks without affecting the main operating system, achieving the technical effect of ensuring server stability and availability.

[0053] In another possible implementation, before performing partition boot according to the boot activation mode and boot partition information, step S270 further includes step S2731, determining whether the boot item is a hard drive. The BMC chip checks whether the boot item is a hard drive by reading certain hardware registers or communicating with the BIOS chip, thereby determining whether subsequent steps should be executed. When the boot item is determined to be a hard drive, step S2732 is executed. When the boot item is a hard drive, partition boot is performed according to the boot activation mode and boot partition information. That is, if the boot item is indeed a hard drive, the BMC chip performs partition boot according to the boot activation mode and boot partition information, including analyzing the activation mode, determining the boot partition to be activated, loading the boot file, and activating the corresponding partition, ensuring that the server boots correctly according to the preset configuration. Steps S2731 and S2732, by determining the type of boot item, ensure that when specific conditions are met (i.e., the boot item is a hard drive), the server boots correctly according to the preset activation mode and partition information, achieving the technical effect of ensuring the normal, stable, and secure boot of the server.

[0054] like Figure 3As shown, in one possible implementation, step S271 further includes step S2711, whereby the BIOS chip acquires BMC instructions each time it boots; step S2712, if the BMC instructions exist, determining whether the boot activation mode of the BMC instructions is permanently effective. Specifically, the BIOS chip communicates with the BMC to acquire specific boot instructions or configuration information from the BMC. After receiving the BMC instructions, the BIOS chip analyzes the boot activation mode field in the BMC instructions to determine whether it is permanently effective. When the activation mode of the BMC instructions is permanently effective, step S2713 is executed, saving the BMC instructions with permanently effective boot modes to the FLASH variable area; step S2714, setting the boot partition for executing the BMC instructions, and booting the system from the boot partition defined by the BMC instructions. The FLASH variable area is a persistent storage area. The BIOS chip saves BMC instructions that meet the conditions to the server's FLASH storage area to ensure that these instructions are still available after a restart. Next, the BIOS chip sets the server's boot partition according to the partition information in the BMC instructions and boots the system from that partition. When the BMC instruction's effective mode is not permanent, the instruction will no longer be valid after the server restarts. In this case, the BIOS chip will clear the BMC instruction stored in the FLASH variable area to make room for the new instruction. Steps S2711 to S2714, by acquiring, analyzing, and executing the BMC instruction, enable the BIOS chip to perform the correct boot configuration according to the preset mode and partition information, thereby achieving the technical effect of ensuring the server's stable and reliable boot.

[0055] like Figure 3 As shown, in another possible implementation, after obtaining the BMC instruction, step S271 further includes step S2715: if the BMC instruction does not exist, obtain the variable area (NV) instruction from the FLASH variable area. That is, if the BMC does not provide an instruction, the BIOS chip obtains the stored variable area instruction from the FLASH variable area and determines whether the variable area instruction exists. If it exists, proceed to step S2716: when the variable area instruction exists, set the variable area instruction to be executed and start the system from the boot partition defined by the variable area instruction. That is, the BIOS chip analyzes the variable area instruction, sets the corresponding boot partition, and starts the system from that partition. Steps S2715 to S2716 ensure that when the BMC does not provide an instruction, the server can still perform the correct boot configuration according to the instruction stored in the FLASH variable area, achieving the technical effect of ensuring the normal startup of the server.

[0056] like Figure 3As shown, in another possible implementation, after obtaining the variable area instruction from the FLASH variable area, step S271 further includes step S2717, whereby a default instruction is set to be executed when the variable area instruction does not exist. That is, after the BIOS chip checks the BMC instruction and the FLASH variable area instruction, if no instruction is found, a preset default boot configuration is executed. Step S2717 ensures that the server can still boot according to the preset default configuration even when no instruction is available, thereby achieving the technical effect of ensuring the normal boot process of the server.

[0057] In the above text, refer to Figures 1 to 3 A method for BIOS and BMC interoperability according to an embodiment of the present invention is described in detail. Next, reference will be made to... Figure 4 A BIOS and BMC interoperability device according to an embodiment of the present invention is described.

[0058] According to an embodiment of the present invention, a BIOS and BMC interoperability device is used to solve the technical problems of slow transmission speed and instability in BIOS and BMC communication in the prior art, so as to achieve tight interoperability between BIOS and BMC, and ensure accurate and efficient booting of the server in various operating system rollback scenarios, achieving the technical effect of fast and stable transmission. The BIOS and BMC interoperability device includes: a communication connection establishment module 10 and an operating system boot module 20.

[0059] The communication connection establishment module 10 is used to establish a communication connection between the BIOS chip and the BMC chip via a UART link using the IPMI protocol;

[0060] The operating system boot module 20 is used to send instructions or settings to the BMC chip through the BIOS chip, and load the boot file of the corresponding boot partition according to the BMC instructions or settings to boot the operating system.

[0061] The specific configuration of the operating system boot module 20 will be described in detail below. As mentioned above, the BIOS chip sends instructions or settings to the BMC chip, and loads the boot file of the corresponding boot partition according to the BMC instructions or settings to boot the operating system. The operating system boot module 20 may further include: a boot option acquisition unit for acquiring boot options; a boot list update unit for updating the boot list by the BMC chip according to the boot options; a restart unit for the BMC chip to restart the BIOS chip; a command waiting unit for waiting for the BIOS chip's boot list query command; and a boot list sending unit for sending the boot list to the BIOS chip when the boot list query command is received.

[0062] Below, another specific configuration of the operating system boot module 20 will be described in detail. As mentioned above, the BIOS chip sends instructions or settings to the BMC chip, and loads the boot file of the corresponding boot partition according to the BMC instructions or settings to boot the operating system. The operating system boot module 20 may further include: a boot order command code acquisition unit for acquiring boot order command codes, the boot order command codes including boot activation mode and boot partition information; and a partition boot unit for performing partition boot according to the boot activation mode and boot partition information.

[0063] The partition startup unit may further include: an effective mode startup subunit for the startup effective mode including permanent effective and effective on the next startup.

[0064] The partition boot unit may further include: a partition information boot subunit for booting partition information including recovery system, operating system A, and operating system B.

[0065] Before performing partitioned startup based on the startup activation mode and startup partition information, the partitioned startup unit may further include: a judgment sub-unit for determining whether the startup item is a hard disk; and a partitioned startup sub-unit for performing partitioned startup based on the startup activation mode and startup partition information when the startup item is a hard disk.

[0066] The effective mode startup subunit may further include: an acquisition and judgment subunit for acquiring BMC instructions each time the BIOS chip starts, and if the BMC instructions exist, determining whether the startup effective mode of the BMC instructions is permanently effective; and a save and execute subunit for saving the BMC instructions with the permanently effective startup effective mode to the FLASH variable area, setting the startup partition for executing the BMC instructions, and starting the system from the startup partition defined by the BMC instructions.

[0067] The active mode startup subunit after obtaining the BMC instruction may further include: a variable area instruction acquisition subunit for obtaining a variable area instruction from the FLASH variable area if the BMC instruction does not exist; and a system startup subunit for setting the execution of the variable area instruction and starting the system from the startup partition defined by the variable area instruction when the variable area instruction exists.

[0068] The effective mode startup subunit after obtaining the variable area instruction from the FLASH variable area may further include: a default instruction execution subunit for setting the execution of a default instruction when the variable area instruction does not exist.

[0069] The BIOS and BMC interoperability device provided in this embodiment of the invention can execute a BIOS and BMC interoperability method provided in any embodiment of the invention, and has the corresponding functional modules and beneficial effects of the method.

[0070] Although this application makes various references to certain modules in the system according to the embodiments of this application, any number of different modules can be used and run on user terminals and / or servers. The various units and modules included are only divided according to functional logic, but are not limited to the above division, as long as the corresponding functions can be achieved; in addition, the specific names of each functional unit are only for easy distinction between each other and are not used to limit the scope of protection of this invention.

[0071] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for BIOS and BMC interoperability, characterized in that, The method includes: The IPMI protocol is used to establish a communication connection between the BIOS chip and the BMC chip via a UART link; The BIOS chip sends instructions or settings to the BMC chip, and loads the boot file of the corresponding boot partition according to the BMC instructions or settings to boot the operating system. The method further includes: Obtain the boot order command code, which includes the boot activation mode and boot partition information; Based on the startup activation mode and startup partition information, perform partition startup; The activation mode includes permanent activation and activation upon next activation; The BIOS chip acquires BMC instructions each time it boots up; If the BMC instruction exists, determine whether the activation mode of the BMC instruction is permanently effective; Save the BMC instruction with the startup activation mode set to permanent to the FLASH variable area; Set the boot partition for executing the BMC instructions, and boot the system from the boot partition defined by the BMC instructions; The boot partition information includes the recovery system, operating system A, and operating system B; Before performing partition boot based on the boot activation mode and boot partition information, the following steps are included: Determine if the boot device is the hard drive; When the boot item is a hard drive, partition boot is performed according to the boot activation mode and boot partition information; After obtaining the BMC instruction, the following is included: If the BMC instruction does not exist, obtain the variable area instruction from the FLASH variable area; When the variable area instruction exists, the system is set to execute the variable area instruction and start from the boot partition defined by the variable area instruction; After obtaining the variable area instruction from the FLASH variable area, the following steps are included: If the variable area instruction does not exist, set the default instruction to be executed.

2. The BIOS and BMC interoperability method as described in claim 1, characterized in that, The method further includes: Get startup options; Based on the boot options, the BMC chip updates the boot list; The BMC chip restarts the BIOS chip; Waiting for the BIOS chip to send a boot list query command; When the command to query the boot list is received, the boot list is sent to the BIOS chip.

3. A BIOS and BMC interoperability device, characterized in that, The apparatus is used to implement a BIOS and BMC interoperability method according to any one of claims 1-2, the apparatus comprising: A communication connection establishment module is used to establish a communication connection between the BIOS chip and the BMC chip via a UART link using the IPMI protocol. The operating system boot module is used to send instructions or settings to the BMC chip through the BIOS chip, and load the boot file of the corresponding boot partition according to the BMC instructions or settings to boot the operating system.

Citation Information

Patent Citations

  • BMC-based file transmission method and device, equipment and medium

    CN108965382A

  • Data interaction method, device and equipment between server BIOS and BMC

    CN112463222A