Dual-BIOS system, system switching method and apparatus, device, and storage medium
Through the dual BIOS system design and automatic switching mechanism, the server system failure caused by BIOS chip failure is solved, and the stable operation and efficient switching of the system are achieved.
Patent Information
- Application Number
- PCT/CN2024/095662
- Authority / Receiving Office
- WO · WO
- Patent Type
- Applications
- Current Assignee / Owner
- Priority Date
- 2023-12-27
- Filing Date
- 2024-05-28
- Publication Date
- 2025-07-03
AI Technical Summary
In the server system, the BIOS chip failure causes the system to fail to start normally, affecting work efficiency and causing losses.
The dual BIOS system design is adopted, and the BMC control chip and platform controller chipset are used to realize automatic switching of the BIOS subsystem and data synchronization to ensure stable operation of the system.
In the event of a BIOS chip failure, it can quickly switch to another BIOS subsystem to ensure the stable operation of the operating system, reduce the cost of architecture and improve the system switching efficiency.
Smart Images

Figure CN2024095662_03072025_PF_FP_ABST
Abstract
Description
Dual BIOS system, system switching method, device, equipment and storage medium
[0001] CROSS-REFERENCE TO RELATED APPLICATIONS
[0002] This application claims priority to the Chinese patent application filed with the China Patent Office on December 27, 2023, with application number 202311824634.4, and application name “A dual BIOS system, system switching method, device, equipment and storage medium”, all contents of which are incorporated by reference into this application. Technical Field
[0003] Embodiments of the present application relate to the field of operating system technology, and more specifically, to a dual BIOS system, a system switching method, an apparatus, a device, and a non-volatile readable storage medium. Background Art
[0004] In a server system, the Basic Input Output System (BIOS) chip is responsible for booting the entire system, initializing the hardware, and loading the operating system. It also provides some necessary underlying services during system operation, playing a vital role in the entire server system.
[0005] When the BIOS chip fails, the server system cannot start normally and needs to repair the BIOS chip before starting again, which will delay the work efficiency of the entire system and cause losses to the user.
[0006] Summary of the Invention
[0007] Some embodiments of the present application provide a dual BIOS system, a system switching method, an apparatus, a device, and a non-volatile readable storage medium, aiming to ensure the stable operation of the BIOS system.
[0008] According to a first aspect of some embodiments of the present application, a dual BIOS system is provided, the system comprising:
[0009] A first BIOS chip, used for running a first BIOS subsystem;
[0010] A second BIOS chip, used for running a second BIOS subsystem;
[0011] BMC (Baseboard Management Controller) chip, used to run BMC programs;
[0012] A BMC control chip, used to control the BMC chip and the second BIOS chip, the BMC control chip being connected to the BMC chip and the second BIOS chip;
[0013] The platform controller chipset is used to control the first BIOS chip and the BMC control chip. The platform controller chipset is connected to the first BIOS chip via a first bus, and is connected to the BMC control chip via a second bus. The first bus is connected to the second bus, and the platform controller chipset is connected to the CPU.
[0014] Optionally, the access subjects of the dual BIOS system include a host and a BMC control chip, and the host and the BMC control chip perform interactive access by sending instructions.
[0015] Optionally, after the BMC control chip performs a subsystem refresh on the first BIOS chip, it sends a subsystem switching request instruction to the host;
[0016] When the host receives the subsystem switching request instruction, the host switches the first BIOS subsystem to the second BIOS subsystem;
[0017] When the first BIOS subsystem switches to the second BIOS subsystem, the BMC control chip refreshes the second BIOS subsystem on the second BIOS chip;
[0018] When the second BIOS subsystem on the second BIOS chip is refreshed, the BMC control chip sends a subsystem switching request instruction to the host;
[0019] When the host receives the subsystem switching request instruction, it switches the second BIOS subsystem to the first BIOS subsystem.
[0020] Optionally, after performing a subsystem refresh on the first BIOS subsystem on the first BIOS chip, the host switches the first BIOS subsystem to the second BIOS subsystem;
[0021] When the first BIOS subsystem is switched to the second BIOS subsystem, the host refreshes the second BIOS subsystem on the second BIOS chip;
[0022] When the second BIOS subsystem on the second BIOS chip is refreshed, the host switches the second BIOS subsystem to the first BIOS subsystem.
[0023] Optionally, upon receiving the subsystem switching instruction, the BMC control chip sends a subsystem switching request instruction to the host;
[0024] When the host receives the subsystem switching request instruction, it switches the first BIOS subsystem to the second BIOS subsystem.
[0025] Optionally, when the host actively performs subsystem switching, the host switches the first BIOS subsystem to the second BIOS subsystem.
[0026] Optionally, the BMC control chip sends a subsystem switching request instruction to the host when detecting an operating system startup failure;
[0027] When the host receives the subsystem switching request instruction, it switches the first BIOS subsystem to the second BIOS subsystem.
[0028] Optionally, the host reads data in the first BIOS chip during normal operation;
[0029] The host sends a data read instruction to the BMC control chip;
[0030] When the BMC control chip receives the data read instruction, it sends the data in the second BIOS chip to the host;
[0031] The host performs data verification on the data in the first BIOS chip and the data in the second BIOS chip;
[0032] The host synchronizes data between the first BIOS chip and the second BIOS chip based on the data verification result.
[0033] According to a second aspect of some embodiments of the present application, a system switching method is provided. The method is applied to a dual BIOS system, including:
[0034] When the first BIOS subsystem is running, determining whether subsystem switching is required;
[0035] When subsystem switching is required, determine whether the dual BIOS system satisfies the switching trigger conditions, which include: refreshing the dual BIOS trigger, automatic switching trigger, and manual switching trigger;
[0036] According to the switching trigger condition, the currently running first BIOS subsystem is switched to the second BIOS subsystem using the corresponding switching method;
[0037] When the first BIOS subsystem is switched to the second BIOS subsystem, obtaining a value of the flag register;
[0038] According to the value of the flag register, the BIOS subsystem used for data access is determined;
[0039] Use the BIOS subsystem for data access.
[0040] Optionally, according to the switching triggering condition, switching the currently running first BIOS subsystem to the second BIOS subsystem using a corresponding switching method includes:
[0041] When the switching trigger condition is a dual BIOS refresh trigger, determining an execution subject for refreshing the first BIOS subsystem;
[0042] In the case where the execution subject is a BMC control chip, the first switching request is sent to the host through the BMC control chip;
[0043] The host switches the first BIOS subsystem to the second BIOS subsystem according to the first switching request.
[0044] Optionally, before sending the first switching request to the host through the BMC control chip, the method further includes:
[0045] Refresh the first BIOS subsystem through the BMC control chip;
[0046] The value of the flag register is set to a second preset value.
[0047] Optionally, the method further comprises:
[0048] In the case where the execution subject is the host, the first BIOS subsystem is switched to the second BIOS subsystem through the host.
[0049] Optionally, before switching the first BIOS subsystem to the second BIOS subsystem through the host, the method further includes:
[0050] Refresh the first BIOS subsystem through the host;
[0051] The value of the flag register is set to a third preset value.
[0052] Optionally, the method further comprises:
[0053] When the switching trigger condition is a manual switching trigger, the subsystem switching instruction is received through the BMC control chip;
[0054] The second switching request is sent to the host through the BMC control chip;
[0055] The host switches the first BIOS subsystem to the second BIOS subsystem according to the second switching request.
[0056] Optionally, the method further comprises:
[0057] In the case where the switching trigger condition is an automatic switching trigger, determining an execution subject corresponding to the automatic switching trigger;
[0058] In the case where the execution subject is the BMC control chip, the third switching request is sent to the host through the BMC control chip;
[0059] The host switches the first BIOS subsystem to the second BIOS subsystem according to the third switching request.
[0060] Optionally, the method further comprises:
[0061] In the case where the execution subject is the host, the first BIOS subsystem is switched to the second BIOS subsystem through the host.
[0062] Optionally, determining a BIOS subsystem to be used for data access according to a value of a flag register includes:
[0063] When the value of the flag register is the first preset value, determining that the BIOS subsystem used for data access is the second BIOS subsystem;
[0064] When the value of the flag register is the second preset value, determining that the BIOS subsystem used for data access is the first BIOS subsystem;
[0065] When the value of the flag register is the third preset value, it is determined that the BIOS subsystem used for data access is the first BIOS subsystem.
[0066] Optionally, the method further comprises:
[0067] When the value of the flag register is the second preset value, refreshing the second BIOS subsystem through the BMC control chip;
[0068] When the second BIOS subsystem is refreshed, a fourth switching request is sent to the host;
[0069] The host switches the second BIOS subsystem to the first BIOS subsystem according to the fourth switching request.
[0070] Optionally, the method further comprises:
[0071] When the value of the flag register is a third preset value, refreshing the second BIOS subsystem through the host;
[0072] When the second BIOS subsystem is refreshed, the host switches the second BIOS subsystem to the first BIOS subsystem;
[0073] The value of the flag register is modified to a first preset value.
[0074] Optionally, the method further comprises:
[0075] When the host is operating normally, read the system data of the first BIOS subsystem;
[0076] Read the system data of the second BIOS subsystem;
[0077] Performing data verification on system data of the first BIOS subsystem and system data of the second BIOS subsystem;
[0078] According to the data verification result, the system data of the first BIOS subsystem and the system data of the second BIOS subsystem are synchronized.
[0079] Optionally, synchronizing the system data of the first BIOS subsystem and the system data of the second BIOS subsystem according to the data verification result includes:
[0080] When the parameters of the first BIOS subsystem are modified, the modified parameters are synchronously backed up to the second BIOS subsystem;
[0081] When the first BIOS subsystem performs a reserved configuration refresh, writing the reserved configuration into the first BIOS subsystem;
[0082] Backing up system data of the first BIOS subsystem to the second BIOS subsystem;
[0083] When the first BIOS subsystem performs data rollback synchronization, reading system data of the second BIOS subsystem;
[0084] Synchronize the system data of the second BIOS subsystem to the first BIOS subsystem.
[0085] Optionally, the method further comprises:
[0086] When the host runs abnormally, the first BIOS subsystem is switched to the second BIOS subsystem.
[0087] According to a third aspect of some embodiments of the present application, a dual BIOS system is provided, characterized in that the system includes:
[0088] A first BIOS chip, used for running a first BIOS subsystem;
[0089] A second BIOS chip, used for running a second BIOS subsystem;
[0090] BMC chip, used to run BMC programs;
[0091] A switching chip, used to control the connection between the first BIOS chip and the second BIOS chip, the switching chip being connected to the first BIOS chip and the second BIOS chip;
[0092] A complex programmable logic device is used to control the switch chip to perform link switching, and the complex programmable logic device is connected to the switch chip;
[0093] BMC control chip, used to control the BMC chip, the BMC control chip is connected to the BMC chip, the BMC control chip is connected to the complex programmable logic device, and the BMC control chip is connected to the switch chip;
[0094] The platform controller chipset is connected to the switch chip via a first bus, is connected to the BMC control chip via a second bus, is connected to the CPU, and the first bus is connected to the second bus.
[0095] Optionally, the access subjects of the dual BIOS system include a host and a BMC control chip.
[0096] Optionally, upon receiving the subsystem switching instruction, the BMC control chip sends a subsystem switching request instruction to the complex programmable logic device;
[0097] The BMC control chip controls the dual BIOS system to perform shutdown operations;
[0098] When the complex programmable logic device receives the subsystem switching request instruction, it sends a line switching instruction to the switching chip;
[0099] When the switch chip receives the line switching instruction, it switches the connected chip from the first BIOS chip to the second BIOS chip;
[0100] A dual BIOS system uses the second BIOS subsystem for startup.
[0101] Optionally, the BMC control chip sends a subsystem switching request instruction to the complex programmable logic device in the event of an operating system startup failure;
[0102] The BMC control chip controls the dual BIOS system to perform shutdown operations;
[0103] When the complex programmable logic device receives the subsystem switching request instruction, it sends a line switching instruction to the switching chip;
[0104] When the switch chip receives the line switching instruction, it switches the connected chip from the first BIOS chip to the second BIOS chip;
[0105] A dual BIOS system uses the second BIOS subsystem for startup.
[0106] Optionally, the BMC control chip sends a subsystem switching request instruction to the complex programmable logic device when a subsystem refresh of the dual BIOS system is required;
[0107] The BMC control chip controls the dual BIOS system to perform shutdown operations;
[0108] The complex programmable logic device sends a first line switching instruction to the switching chip when receiving the subsystem switching request instruction;
[0109] When receiving the first line switching instruction, the switching chip switches the connected chip from the first BIOS chip to the second BIOS chip;
[0110] The complex programmable logic chip sends a second line switching instruction to the switching chip;
[0111] When the switch chip receives the second line switching instruction, it switches the access subject from the host to the BMC control chip;
[0112] The BMC control chip refreshes the second BIOS subsystem on the second BIOS chip;
[0113] When the second BIOS subsystem on the second BIOS chip is refreshed, the BMC control chip sends a subsystem switching request instruction to the complex programmable logic device;
[0114] The programmable logic device sends a third line switching instruction to the switching chip when receiving the subsystem switching request instruction;
[0115] When the switching chip receives the third line switching instruction, it switches the connected chip from the second BIOS chip to the first BIOS chip;
[0116] The BMC control chip refreshes the first BIOS subsystem on the first BIOS chip;
[0117] When the first BIOS subsystem on the first BIOS chip is refreshed, the complex programmable logic chip sends a fourth line switching instruction to the switching chip;
[0118] When the switch chip receives the fourth line switching instruction, it switches the access subject from the BMC control chip to the host;
[0119] The dual BIOS system uses the first BIOS subsystem for startup.
[0120] A fourth aspect of some embodiments of the present invention provides a system switching method, which is applied to a dual BIOS system and includes:
[0121] When the first BIOS subsystem is running, determining whether the dual BIOS system satisfies a switching trigger condition, wherein the switching trigger condition includes: manual switching trigger, automatic switching trigger, and dual BIOS refresh trigger;
[0122] According to the switching trigger conditions, the corresponding subsystem switching process is executed.
[0123] Optionally, according to the switching triggering condition, a corresponding subsystem switching process is executed, including:
[0124] When the switching trigger condition is a manual switching trigger, the switching chip is controlled by a complex programmable logic device to switch the first BIOS subsystem to the second BIOS subsystem;
[0125] The BMC control chip controls the dual BIOS system to perform shutdown operations;
[0126] Determine the value in the flag register;
[0127] When the value in the flag register is not the first preset value, the second BIOS subsystem is used to start the computer.
[0128] Optionally, the method further comprises:
[0129] When the switching trigger condition is an automatic switching trigger, the BMC control chip sends a subsystem switching request instruction to the complex programmable logic device;
[0130] The BMC control chip controls the dual BIOS system to perform shutdown operations;
[0131] When the complex programmable logic device receives the subsystem switching request instruction, it controls the switching chip to switch the first BIOS subsystem to the second BIOS subsystem;
[0132] Determine the value in the flag register;
[0133] When the value in the flag register is not the first preset value, the second BIOS subsystem is used to start the computer.
[0134] Optionally, the method further comprises:
[0135] When the switching trigger condition is a refresh dual BIOS trigger, setting the value in the flag register to a first preset value;
[0136] The BMC control chip sends a subsystem switching request instruction to the complex programmable logic device;
[0137] The BMC control chip controls the dual BIOS system to perform shutdown operations;
[0138] The complex programmable logic device controls the switch chip to switch the first BIOS subsystem to the second BIOS subsystem;
[0139] Get the value in the flag register;
[0140] When the value in the flag register is the first preset value, the complex programmable logic device controls the switch chip to switch the access subject of the dual BIOS system from the host to the BMC control chip;
[0141] The BMC control chip refreshes the second BIOS subsystem;
[0142] When the second BIOS subsystem is refreshed, the BMC control chip sends a subsystem switching request instruction to the complex programmable logic device;
[0143] When the complex programmable logic device receives the subsystem switching request instruction, it controls the switching chip to switch the second BIOS subsystem to the first BIOS subsystem;
[0144] The BMC control chip refreshes the first BIOS subsystem;
[0145] When the first BIOS subsystem is refreshed, clear the value in the flag register;
[0146] The complex programmable logic device controls the switch chip, switching the access subject of the dual BIOS system from the BMC control chip to the host;
[0147] The dual BIOS system uses the first BIOS subsystem for startup.
[0148] According to a fifth aspect of some embodiments of the present application, a system switching device is provided, the device comprising:
[0149] A switching judgment module is used to determine whether a subsystem switching is required when the first BIOS subsystem is running;
[0150] A switching trigger condition judgment module is used to judge whether the dual BIOS system satisfies the switching trigger conditions when a subsystem switching is required. The switching trigger conditions include: refreshing the dual BIOS trigger, automatic switching trigger, and manual switching trigger.
[0151] A subsystem switching module is used to switch the currently running first BIOS subsystem to the second BIOS subsystem using a corresponding switching method according to a switching trigger condition;
[0152] A value acquisition module, configured to acquire a value of a flag register when the first BIOS subsystem is switched to the second BIOS subsystem;
[0153] A subsystem determination module, configured to determine the BIOS subsystem to be used for data access based on the value of the flag register;
[0154] The data access module is used to access data using the BIOS subsystem.
[0155] Optionally, the subsystem switching module includes:
[0156] A first execution subject confirmation submodule is used to determine an execution subject for refreshing the first BIOS subsystem when the switching trigger condition is a trigger for refreshing the dual BIOS;
[0157] A first sending submodule is configured to send the first switching request to the host via the BMC control chip when the execution subject is the BMC control chip;
[0158] The first switching submodule is used for the host to switch the first BIOS subsystem to the second BIOS subsystem according to the first switching request.
[0159] Optionally, the device further comprises:
[0160] A first data refresh submodule, configured to refresh the first BIOS subsystem via a BMC control chip;
[0161] The first register value setting submodule is used to set the value of the flag register to a second preset value.
[0162] Optionally, the device further comprises:
[0163] The second switching submodule is configured to switch the first BIOS subsystem to the second BIOS subsystem via the host when the execution subject is the host.
[0164] Optionally, the device further comprises:
[0165] A second data refresh submodule, configured to refresh the first BIOS subsystem via the host;
[0166] The second register value setting submodule is used to set the value of the flag register to a third preset value.
[0167] Optionally, the device further comprises:
[0168] The first receiving submodule is configured to receive a subsystem switching instruction through the BMC control chip when the switching trigger condition is a manual switching trigger;
[0169] The second sending submodule is used to send the second switching request to the host through the BMC control chip;
[0170] The third subsystem switching submodule is used for the host to switch the first BIOS subsystem to the second BIOS subsystem according to the second switching request.
[0171] Optionally, the device further comprises:
[0172] The second execution subject confirmation submodule is used to determine the execution subject corresponding to the automatic switching trigger when the switching trigger condition is an automatic switching trigger;
[0173] A third sending submodule is configured to send the third switching request to the host via the BMC control chip when the execution subject is the BMC control chip;
[0174] The third switching submodule is used for the host to switch the first BIOS subsystem to the second BIOS subsystem according to the third switching request.
[0175] Optionally, the device further comprises:
[0176] The fourth switching submodule is configured to switch the first BIOS subsystem to the second BIOS subsystem via the host when the execution subject is the host.
[0177] Optionally, the subsystem determination module includes:
[0178] The first subsystem confirmation submodule is configured to determine that the BIOS subsystem used for data access is the second BIOS subsystem when the value of the flag register is a first preset value;
[0179] A second subsystem confirmation submodule is configured to determine that the BIOS subsystem used for data access is the first BIOS subsystem when the value of the flag register is a second preset value;
[0180] The third subsystem confirmation submodule is configured to determine that the BIOS subsystem used for data access is the first BIOS subsystem when the value of the flag register is a third preset value.
[0181] Optionally, the device further comprises:
[0182] A third data refresh submodule is configured to refresh the second BIOS subsystem through the BMC control chip when the value of the flag register is a second preset value;
[0183] A fourth sending submodule is configured to send a fourth switching request to the host through the BMC control chip when the second BIOS subsystem is refreshed;
[0184] The fourth switching submodule is used for the host to switch the second BIOS subsystem to the first BIOS subsystem according to a fourth switching request.
[0185] Optionally, the device further comprises:
[0186] a fourth data refresh submodule, configured to refresh the second BIOS subsystem via the host when the value of the flag register is a third preset value;
[0187] A fifth switching submodule, configured to switch the second BIOS subsystem to the first BIOS subsystem via the host when the second BIOS subsystem has been refreshed;
[0188] The third register value setting submodule is used to modify the value of the flag register to a first preset value.
[0189] Optionally, the device further comprises:
[0190] A first data reading module is used to read the system data of the first BIOS subsystem when the host is operating normally;
[0191] A second data reading module, used for reading system data of the second BIOS subsystem;
[0192] A data verification module, configured to perform data verification on system data of the first BIOS subsystem and system data of the second BIOS subsystem;
[0193] The data synchronization module is used to synchronize the system data of the first BIOS subsystem and the system data of the second BIOS subsystem according to the data verification result.
[0194] Optionally, the data synchronization module includes:
[0195] A first data synchronization submodule is used to synchronize and back up the modified parameters to the second BIOS subsystem when the parameters of the first BIOS subsystem are modified;
[0196] a data writing submodule, configured to write the reserved configuration into the first BIOS subsystem when the first BIOS subsystem performs a reserved configuration refresh;
[0197] A second data synchronization submodule, configured to back up system data of the first BIOS subsystem to the second BIOS subsystem;
[0198] A third data synchronization submodule is used to read the system data of the second BIOS subsystem when the first BIOS subsystem performs data rollback synchronization;
[0199] The fourth data synchronization submodule is used to synchronize system data of the second BIOS subsystem to the first BIOS subsystem.
[0200] Optionally, the device further comprises:
[0201] The second subsystem switching module is used to switch the first BIOS subsystem to the second BIOS subsystem when the host runs abnormally.
[0202] According to a sixth aspect of some embodiments of the present application, a system switching device is provided, characterized in that the device includes:
[0203] A switch trigger condition judgment module is used to judge whether the dual BIOS system satisfies the switch trigger condition when the first BIOS subsystem is running. The switch trigger conditions include: manual switch trigger, automatic switch trigger, and refresh dual BIOS trigger;
[0204] The system switching process execution module is used to execute the corresponding subsystem switching process according to the switching triggering conditions.
[0205] Optionally, the system switching process execution module includes:
[0206] The manual switching submodule is used to control the switching chip through the complex programmable logic device to switch the first BIOS subsystem to the second BIOS subsystem when the switching trigger condition is a manual switching trigger;
[0207] The first shutdown operation submodule is used for the BMC control chip to control the dual BIOS system to perform a shutdown operation;
[0208] A first data determination submodule, configured to determine a value in a flag register;
[0209] The first boot submodule is used to use the second BIOS subsystem to boot the computer when the value in the flag register is not the first preset value.
[0210] Optionally, the system switching process execution module further includes:
[0211] The automatic switching submodule is used for, when the switching trigger condition is an automatic switching trigger, the BMC control chip sends a subsystem switching request instruction to the complex programmable logic device;
[0212] The second shutdown operation submodule is used for the BMC control chip to control the dual BIOS system to perform a shutdown operation;
[0213] The automatic switching execution submodule is used to control the switching chip to switch the first BIOS subsystem to the second BIOS subsystem when the complex programmable logic device receives a subsystem switching request instruction;
[0214] A second value determination submodule, configured to determine a value in a flag register;
[0215] The second boot submodule is used to use the second BIOS subsystem to boot the computer when the value in the flag register is not the first preset value.
[0216] Optionally, the system switching process execution module further includes:
[0217] The value setting submodule is used to set the value in the flag register to a first preset value when the switching trigger condition is a refresh dual BIOS trigger;
[0218] The first instruction sending submodule is used for the BMC control chip to send a subsystem switching request instruction to the complex programmable logic device;
[0219] The third shutdown operation submodule is used for the BMC control chip to control the dual BIOS system to perform a shutdown operation;
[0220] A first refresh switching execution submodule is used for a complex programmable logic device to control a switching chip to switch the first BIOS subsystem to a second BIOS subsystem;
[0221] A third value determination submodule is used to obtain the value in the flag register;
[0222] The access subject switching submodule is used to control the switching chip by the complex programmable logic device to switch the access subject of the dual BIOS system from the host to the BMC control chip when the value in the flag register is a first preset value;
[0223] The first subsystem refresh submodule is used for the BMC control chip to refresh the second BIOS subsystem;
[0224] The second instruction sending submodule is used for, when the second BIOS subsystem is refreshed, the BMC control chip sends a subsystem switching request instruction to the complex programmable logic device;
[0225] The second refresh switching execution submodule is used for the complex programmable logic device to control the switching chip to switch the second BIOS subsystem to the first BIOS subsystem when receiving the subsystem switching signal;
[0226] The second subsystem refresh submodule is used for the BMC control chip to refresh the first BIOS subsystem;
[0227] The value clearing submodule is used to clear the value in the flag register when the first BIOS subsystem is refreshed;
[0228] The second access subject switching submodule is used for complex programmable logic device control switching chip to switch the access subject of the dual BIOS system from BMC control chip to host;
[0229] The third boot submodule is used for the dual BIOS system to use the first BIOS subsystem to boot.
[0230] A seventh aspect of some embodiments of the present application provides a non-volatile readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in the method of the first aspect of the present application are implemented.
[0231] An eighth aspect of some embodiments of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the steps of the method of the first aspect of the present application are implemented.
[0232] The dual BIOS system provided by the present application includes: a first BIOS chip for running a first BIOS subsystem;
[0233] A second BIOS chip, used for running a second BIOS subsystem;
[0234] The BMC chip is used to run the BMC program; the BMC control chip is used to control the BMC chip and the second BIOS chip, and the BMC control chip is connected to the BMC chip and the second BIOS chip; the platform controller chipset is used to control the first BIOS chip and the BMC control chip, and the platform controller chipset is connected to the first BIOS chip via a first bus, and the platform controller chipset is connected to the BMC control chip via a second bus, the first bus is connected to the second bus, and the platform controller chipset is connected to the CPU (Central Processing Unit). In this system, the platform controller chipset is connected to the first BIOS chip via the first bus, namely SPI, and is connected to the second BIOS chip via the second bus, namely ESPI (Enhanced Serial Peripheral Interface). ESPI is connected to the SPI (Serial Peripheral Interface). The host controls the first BIOS chip connected to the SPI, and the BMC control chip controls the second BIOS chip. The host side can access the second BIOS chip under the BMC control chip through ESPI instructions, and the BMC control chip can access the first BIOS chip on the host side through ESPI requests. According to the needs of the host and BMC to access the first and second BIOS chips, the flash (flash memory) access channel and sharing function of ESPI are used to enable the host and BMC to enable the flash access link in each direction when conditions are met, and data synchronization can also be performed. The system does not rely on CPLD (Complex Programmable Logic Device) and switch chips, which reduces the cost of the architecture and improves the efficiency of the switching subsystem of the dual BIOS system.
[0235] The system switching method provided in the present application determines whether a subsystem switch is required when the first BIOS subsystem is running; if a subsystem switch is required, determines the switch trigger conditions satisfied by the dual BIOS system, which include: a refresh dual BIOS trigger, an automatic switch trigger, and a manual switch trigger; based on the switch trigger conditions, uses a corresponding switch method to switch the currently running first BIOS subsystem to the second BIOS subsystem; obtains the value of a flag register when the first BIOS subsystem is switched to the second BIOS subsystem; determines the BIOS subsystem to use for data access based on the value of the flag register; and uses the BIOS subsystem for data access. In this method, if the currently running first BIOS subsystem needs to be switched, determines the switch trigger conditions satisfied by the dual BIOS system, and uses a corresponding method to switch the first BIOS subsystem to the second BIOS subsystem based on the switch trigger conditions. This method takes into account various situations in which a dual BIOS system requires subsystem switching, ensures that the operating system can quickly switch to another BIOS subsystem if a failure occurs during startup, and ensures stable operation of the operating system. BRIEF DESCRIPTION OF THE DRAWINGS
[0236] In order to more clearly illustrate the technical solutions of some embodiments of the present application, the following briefly introduces the drawings required for use in the description of some embodiments of the present application. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0237] FIG1 is a schematic structural diagram of a dual BIOS system proposed in some embodiments of the present application;
[0238] FIG2 is a flow chart of a system switching method proposed in some embodiments of the present application;
[0239] FIG3 is a schematic diagram of a dual BIOS system switching process proposed in some embodiments of the present application;
[0240] FIG4 is a schematic diagram of a data synchronization process of a dual BIOS system proposed in some embodiments of the present application;
[0241] FIG5 is a schematic diagram of the dual BIOS system structure proposed in some embodiments of the present application;
[0242] FIG6 is a flow chart of a system switching flow method proposed in some embodiments of the present application;
[0243] FIG7 is a schematic diagram of a dual BIOS system switching process proposed in some embodiments of the present application;
[0244] FIG8 is a schematic diagram of a system switching device proposed in some embodiments of the present application;
[0245] FIG9 is a schematic diagram of a system switching device proposed in some embodiments of the present application;
[0246] FIG10 is a schematic diagram of an electronic device according to some embodiments of the present application. DETAILED DESCRIPTION
[0247] The following will be combined with the accompanying drawings of some embodiments of the present application to clearly and completely describe the technical solutions in some embodiments of the present application. Obviously, some of the embodiments described are part of the embodiments of the present application, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on some embodiments of the present application without creative work are within the scope of protection of this application.
[0248] In some embodiments, for ease of understanding, the following nouns are explained:
[0249] ESPI (Enhanced Serial Peripheral Interface)
[0250] CPU (Central Processing Unit)
[0251] BIOS (Basic Input Output System)
[0252] BMC (Baseboard Management Controller)
[0253] SPI (Serial Peripheral Interface)
[0254] PCH (Platform Controller Hub, platform controller chipset)
[0255] CPLD (Complex Programmable Logic Device)
[0256] switch (switch chip)
[0257] Referring to FIG. 1 , FIG. 1 is a schematic diagram of the structure of a dual BIOS system proposed in some embodiments of the present application. As shown in FIG. 1 , the system includes:
[0258] The first BIOS chip is used to run the first BIOS subsystem.
[0259] In some embodiments of the present application, a first BIOS subsystem runs on a BIOS chip. The BIOS system is a set of programs that runs when the operating system starts up. It stores the computer's most important basic input and output programs and the system's startup program. Its primary function is to provide the computer with the lowest-level, most direct hardware settings and control. The first BIOS chip is one BIOS chip in a dual BIOS system, and the first BIOS subsystem is a BIOS system running on the first BIOS chip.
[0260] The second BIOS chip is used to run the second BIOS subsystem.
[0261] In some embodiments of the present application, the second BIOS chip is another BIOS chip in a dual BIOS system, and the second BIOS subsystem is another BIOS system running on the second BIOS chip.
[0262] In some embodiments of the present application, the first BIOS subsystem and the second BIOS subsystem operate independently of each other, and the data stored on the first BIOS chip and the second BIOS chip are the same and are updated synchronously and in real time.
[0263] BMC chip, used to run BMC programs.
[0264] In some embodiments of the present application, the BMC chip is used to run the BMC program. The BMC is a device independent of the server and can manage server information, such as the server model, manufacturing date, etc., monitor and manage the server status, such as the server status, the server hard disk status, etc., remotely control and manage the server, such as powering on, shutting down, and restarting the server, and perform maintenance management on the server, such as log management, user management, BIOS management, alarm management, etc.
[0265] The BMC control chip is used to control the BMC chip and the second BIOS chip, and the BMC control chip is connected to the BMC chip and the second BIOS chip.
[0266] In some embodiments of the present application, the BMC control chip is used to control the operation of the BMC chip, issue instructions to the BMC chip, send requests to the host side, etc. The BMC control chip is connected to the BMC chip and the second BIOS chip.
[0267] The platform controller chipset is used to control the first BIOS chip and the BMC control chip. The platform controller chipset is connected to the first BIOS chip via a first bus, and is connected to the BMC control chip via a second bus. The first bus is connected to the second bus, and the platform controller chipset is connected to the CPU.
[0268] In some embodiments of the present application, a platform controller chipset (PCH) is used to control a first BIOS chip and a baseboard management (BMC) control chip. The platform controller chipset is configured with a first bus, namely the SPI, and a second bus, namely the ESPI. These two interfaces are managed and controlled by SPI and ESPI control programs. The platform controller chipset is connected to the first BIOS chip via the SPI and to the BMC control chip via the ESPI. The other end of the platform controller chipset is also connected to the CPU. On the platform controller chipset, the ESPI is connected to the SPI, a high-speed serial bus interface. The ESPI is another high-speed serial bus interface based on the SPI extension. During operation, the ESPI calls certain SPI functions. The connection between the SPI and ESPI allows for data transmission and access between them.
[0269] In some embodiments of the present application, the access subjects of the dual BIOS system include the host and the BMC control chip. The host and the BMC control chip use the ESPI data transmission protocol to send instructions for interactive access:
[0270] In some embodiments of the present application, the host is composed of a CPU-SPI-first BIOS chip link, which can be called the host of a dual BIOS system. The BMC control chip and the host are two independent access entities. The host and the BMC control chip use the ESPI data transmission protocol to send instructions for interactive access.
[0271] In some embodiments of the present application, two entities can access the BIOS chips connected to them at any time. When the host needs to access the second BIOS chip under the BMC, it uses the ESPI data transmission protocol to send ESPI instructions to the BMC for interaction, enabling the BMC's chip access function. Subsequently, the host can use the SPI data transmission protocol compatible with ESPI to read and write the firmware content in the second BIOS chip. When the BMC wants to access the first BIOS chip under the host, the BMC sends an ESPI request to the host, and the host then sends an ESPI instruction to the BMC for interaction, enabling the host's chip access function. Subsequently, the BMC can use the SPI data transmission protocol compatible with ESPI to read and write the firmware content in the first BIOS chip.
[0272] In some embodiments of the present application, an ESPI-based dual BIOS system is proposed, in which a first BIOS chip is directly connected to the SPI of the server system platform controller chipset, and a second BIOS chip is connected to the BMC control chip, and then connected to the ESPI on the platform controller chipset through the BMC control chip. Then, the ESPI data transmission protocol and a data transmission protocol compatible with SPI and ESPI are used to interactively access and read and write the contents of the two BIOS chips. Based on this physical architecture, the functional logic and implementation scheme of the dual BIOS system and its subsystems are established. Through this scheme, subsystem switching in the dual BIOS system is optimized and improved, the architecture cost is reduced, and the subsystem switching efficiency is improved.
[0273] The access subjects of the dual BIOS system include the host and the BMC control chip, and the host and the BMC control chip exchange access by sending commands.
[0274] After the BMC control chip performs system refresh on the first BIOS chip, it sends a subsystem switching request instruction to the host.
[0275] In some embodiments of the present application, the subsystem switching request instruction is an instruction sent by the BMC control chip to the host, which is used to request the host to perform subsystem switching.
[0276] When the host receives the subsystem switching request instruction, it executes the subsystem switching operation to switch the first BIOS subsystem to the second BIOS subsystem.
[0277] When the subsystem switching is completed, the BMC control chip performs subsystem refresh on the second BIOS chip.
[0278] When the second BIOS subsystem on the second BIOS chip is refreshed, the BMC control chip sends a subsystem switching request instruction to the host.
[0279] When the host receives the subsystem switching request instruction, it executes the subsystem switching operation to switch the second BIOS subsystem to the first BIOS subsystem.
[0280] After refreshing the first BIOS subsystem on the first BIOS chip, the host performs a subsystem switching operation to switch the first BIOS subsystem to the second BIOS subsystem.
[0281] When the subsystem switching is completed, the host performs subsystem refresh on the second BIOS chip.
[0282] When the second BIOS subsystem is refreshed, the host performs a subsystem switching operation to switch the second BIOS subsystem to the first BIOS subsystem.
[0283] When the BMC control chip receives the subsystem switching request instruction, it sends the subsystem switching request instruction to the host.
[0284] When the host receives the subsystem switching request instruction, it executes the subsystem switching operation to switch the first BIOS subsystem to the second BIOS subsystem.
[0285] When the host needs to actively switch the subsystem, it executes the subsystem switching operation to switch the first BIOS subsystem to the second BIOS subsystem.
[0286] When the BMC detects a system startup failure, it sends a subsystem switching request command to the host;
[0287] When the host receives the subsystem switching request instruction, it executes the subsystem switching operation to switch the first BIOS subsystem to the second BIOS subsystem.
[0288] When the host is operating normally, it reads the data in the first BIOS chip.
[0289] The host sends a data read instruction to the BMC control chip.
[0290] When the BMC control chip receives the data read instruction, it sends the data in the second BIOS chip to the host.
[0291] The host performs data verification on the data in the first BIOS chip and the data in the second BIOS chip.
[0292] According to the data verification result, data synchronization is performed on the first BIOS chip and the second BIOS chip.
[0293] Referring to Figure 2, Figure 2 is a flow chart of a system switching method proposed in some embodiments of the present application, which is applied to a dual BIOS system. As shown in Figure 2, the method includes the following steps:
[0294] S11: When the first BIOS subsystem is running, determine whether subsystem switching is required.
[0295] In some embodiments of the present application, refer to Figure 3, which is a schematic diagram of the dual BIOS system switching process proposed in some embodiments of the present application. When the dual BIOS system is running in the first BIOS subsystem, it is determined whether the dual BIOS system needs to perform subsystem switching. When the system receives a switching request from the outside, the host actively sends a switching instruction, or the BMC requests a switch, it is necessary to perform subsystem switching. When the system is running normally and neither the outside world nor the execution subject sends a switching instruction or switching request, no subsystem switching is required.
[0296] S12: When subsystem switching is required, determining whether the dual BIOS system satisfies a switching triggering condition, where the switching triggering condition includes: refreshing the dual BIOS trigger, automatic switching trigger, and manual switching trigger.
[0297] In some embodiments of the present application, the switching trigger condition is a condition for triggering subsystem switching in a dual BIOS system, including a refresh dual BIOS trigger, an automatic switching trigger, and a manual switching trigger. The refresh dual BIOS trigger means that during the operation of the BIOS, after refreshing one of the BIOS subsystems, the other BIOS subsystem needs to be refreshed synchronously. At this time, it is necessary to switch to the other BIOS subsystem and then refresh it, which satisfies the switching trigger condition of the refresh dual BIOS trigger. Automatic switching means that the BMC or host detects that a system failure requires a BIOS subsystem switch, and the host initiates the switch or the BMC requests the host to switch the system. At this time, the trigger condition of the automatic switching trigger is met. The manual switching trigger is when the user needs to switch the BIOS subsystem and manually sends a subsystem switching instruction to the BMC. At this time, the switching trigger condition met is the manual switching trigger.
[0298] In some embodiments of the present application, as shown in FIG3 , assuming that the currently running BIOS system is the first BIOS subsystem, when the currently running first BIOS subsystem needs to be switched, it is first necessary to determine whether the dual BIOS system satisfies the switching triggering conditions.
[0299] For example, when a subsystem switching instruction is received manually by an administrator, the switching trigger condition is determined to be a manual switching trigger. When the host detects a system failure and actively initiates a subsystem switch, the trigger condition is determined to be an automatic switching trigger. When the host or BMC refreshes the BIOS subsystem, the trigger condition is determined to be a dual BIOS refresh trigger.
[0300] S13: According to the triggering condition, the currently running first BIOS subsystem is switched to the second BIOS subsystem using a corresponding switching method.
[0301] In some embodiments of the present application, under each trigger condition, a different system switching method is used. After the trigger condition is determined, the corresponding switching method is used to switch the currently running first BIOS subsystem to the second BIOS subsystem.
[0302] In some embodiments of the present application, according to a trigger condition, the specific steps of switching the currently running first BIOS subsystem to the second BIOS subsystem using a corresponding switching method include:
[0303] S13-1: When the switching trigger condition is a dual BIOS refresh trigger, determine an execution subject for refreshing the first BIOS subsystem.
[0304] In some embodiments of the present application, as shown in FIG3 , when the trigger condition is a dual BIOS refresh trigger, the execution subject of refreshing the first BIOS subsystem is first determined.
[0305] In some embodiments of the present application, the system switching method when the execution subject is the host is different from the system switching method when the execution subject is the BMC control chip. Therefore, it is necessary to first determine the execution subject of refreshing the BIOS subsystem. After the execution subject refreshes the first BIOS subsystem, it switches to the second BIOS subsystem and refreshes the second BIOS subsystem.
[0306] S13 - 2 : When the execution subject is the BMC control chip, the first switching request is sent to the host through the BMC control chip.
[0307] In some embodiments of the present application, the first switching request is an ESPI request instruction based on the ESPI protocol, which is sent by the BMC control chip to the host.
[0308] In some embodiments of the present application, when the execution subject is a BMC control chip, after the BMC control chip refreshes the first BIOS subsystem, the second BIOS subsystem needs to be refreshed synchronously to ensure that the data in the second BIOS subsystem is the same as the current first BIOS subsystem. At this time, an ESPI request instruction is sent to the host through the BMC control chip to apply for BIOS subsystem switching.
[0309] S13 - 3 : The host switches the first BIOS subsystem to the second BIOS subsystem according to the first switching request.
[0310] In some embodiments of the present application, after receiving the first switching request, the host responds to the request sent by the BMC, executes the operation of switching the BIOS subsystem, sends an ESPI instruction to the BMC, and switches the subsystem currently used for data access of the dual BIOS system from the first BIOS subsystem to the second BIOS subsystem.
[0311] In some embodiments of the present application, after the first BIOS subsystem is switched to the second BIOS subsystem, both the host and the BMC access data through the second BIOS subsystem.
[0312] In some embodiments of the present application, the method further comprises:
[0313] S13 - 4 : When the execution subject is the host, the first BIOS subsystem is switched to the second BIOS subsystem through the host.
[0314] In some embodiments of the present application, when the execution subject is the host, the ESPI instruction is directly sent to the BMC through the host to perform the operation of switching BIOS access. After the operation is completed, both the host and the BMC access data through the second BIOS subsystem.
[0315] In some embodiments of the present application, the method further comprises:
[0316] S13-5: When the switching trigger condition is a manual switching trigger, a subsystem switching instruction is received through the BMC control chip.
[0317] In some embodiments of the present application, the subsystem switching instruction is an instruction issued by an administrator to the BMC control chip, and is used to instruct the BMC control chip to perform subsystem switching.
[0318] In some embodiments of the present application, when the trigger condition is a manual switching trigger, the subsystem switching instruction is received by the BMC control chip, and the administrator can control the entire system through the BMC.
[0319] S13-6: Send the second switching request to the host through the BMC control chip.
[0320] In some embodiments of the present application, the second switching request is sent by the BMC control chip to the host, and is a corresponding request generated by the BMC control chip after receiving the first switching instruction.
[0321] In some embodiments of the present application, upon receiving the subsystem switching instruction, the BMC control chip sends a second switching request to the host.
[0322] S13-7: The host switches the first BIOS subsystem to the second BIOS subsystem according to the second switching request.
[0323] In some embodiments of the present application, after receiving the second switching request, the host responds to the second switching request by issuing an ESPI instruction to the BMC control chip, executing the operation of switching the BIOS chip, and switching the subsystem in which the host and BMC access data from the first BIOS subsystem to the second BIOS subsystem.
[0324] In some embodiments of the present application, the method further comprises:
[0325] S13-8: When the switching trigger condition is an automatic switching trigger, determine an execution subject corresponding to the automatic switching trigger.
[0326] In some embodiments of the present application, when the trigger condition is an automatic switching trigger, an execution subject for performing the automatic switching trigger operation is determined.
[0327] S13-9: When the execution subject is the BMC control chip, the BMC control chip sends the third switching request to the host.
[0328] In some embodiments of the present application, the third switching request is sent by the BMC control chip to the host, and is a switching request automatically issued by the BMC control chip when detecting a server failure.
[0329] In some embodiments of the present application, when the execution subject is a BMC control chip, the BMC subject will automatically initiate switching access to the BIOS chip after detecting problems such as server downtime, and send a third switching request to the host through the BMC control chip.
[0330] S13 - 10 : The host switches the first BIOS subsystem to the second BIOS subsystem according to the third switching request.
[0331] In some embodiments of the present application, after receiving the third switching request, the host sends an ESPI instruction to the BMC control chip in response to the request, executes a BIOS switching operation, and switches the first BIOS subsystem currently running in the system to the second BIOS subsystem.
[0332] In some embodiments of the present application, the method further comprises:
[0333] S13-11: When the execution subject is the host, the first BIOS subsystem is switched to the second BIOS subsystem through the host.
[0334] In some embodiments of the present application, when the execution subject is the host, the host subject actively wants to switch the BIOS chip for data access. At this time, the host directly sends an ESPI instruction to the BMC control chip to execute the BIOS subsystem switching operation, switching the subsystem for data access from the first BIOS subsystem to the second BIOS subsystem.
[0335] S14: Get the current value of the flag register.
[0336] In some embodiments of the present application, as shown in FIG3 , after the dual BIOS system completes subsystem switching, that is, after the first BIOS subsystem switches to the second BIOS subsystem, the current flag register value is obtained.
[0337] S15: Determine the BIOS subsystem used for data access according to the value of the flag register.
[0338] In some embodiments of the present application, the BIOS subsystem used for data access is determined based on the value of the flag register. The specific steps include:
[0339] S15 - 1 : When the value of the flag register is the first preset value, determine that the BIOS subsystem used for data access is the second BIOS subsystem.
[0340] In some embodiments of the present application, the first preset value is a default value of the flag register.
[0341] In some embodiments of the present application, when the value of the flag register is the first preset value, it indicates that the value of the flag register has not been modified, that is, the subsystem switch is not triggered by refreshing the dual BIOS system. Therefore, the BIOS subsystem used for data access is determined to be the second BIOS subsystem, and the second BIOS subsystem is directly used for data access.
[0342] For example, the first preset value is 0.
[0343] S15 - 2 : When the value of the flag register is the second preset value, determine that the BIOS subsystem used for data access is the first BIOS subsystem.
[0344] In some embodiments of the present application, when the value of the flag register is the second preset value, it indicates that the subsystem switch is performed when the BMC refreshes the first BIOS subsystem. At this time, the BIOS subsystem used for data access is determined to be the first BIOS subsystem.
[0345] S15 - 3 : When the value of the flag register is the third preset value, determine that the BIOS subsystem used for data access is the first BIOS subsystem.
[0346] In some embodiments of the present application, when the value of the flag register is the third preset value, it indicates that the host is refreshing the first BIOS subsystem and performing subsystem switching. At this time, the BIOS subsystem used for data access is determined to be the first BIOS subsystem.
[0347] In some other embodiments of the present application, the method further includes:
[0348] S15-4: When the value of the flag register is the second preset value, the second BIOS subsystem is refreshed through the BMC control chip.
[0349] In some embodiments of the present application, as shown in FIG3 , when the value of the flag register is the second preset value, the second BIOS subsystem is refreshed through the BMC control chip.
[0350] S15-5: When the second BIOS subsystem is refreshed, a fourth switching request is sent to the host via the BMC control chip.
[0351] In some embodiments of the present application, the fourth switching request is a request sent by the BMC control chip to the host, and the fourth switching request is a request generated after the second BIOS subsystem is refreshed.
[0352] In some embodiments of the present application, after the second BIOS subsystem is refreshed, the BMC control chip sends a fourth switching request to the host.
[0353] S15-6: The host switches the second BIOS subsystem to the first BIOS subsystem according to the fourth switching request.
[0354] In some embodiments of the present application, when the host receives the fourth switching request, it sends an ESPI instruction to the BMC control chip to execute a BIOS subsystem switching operation to switch the second BIOS subsystem to the first BIOS subsystem.
[0355] In some other embodiments of the present application, the method further includes:
[0356] S15-7: When the value of the flag register is the third preset value, the second BIOS subsystem is refreshed through the host.
[0357] In some embodiments of the present application, as shown in FIG3 , when the value of the flag register is a third preset value, the second BIOS subsystem is refreshed through the host.
[0358] S15-8: When the second BIOS subsystem is refreshed, the host switches the second BIOS subsystem to the first BIOS subsystem.
[0359] In some embodiments of the present application, after the host finishes refreshing the second BIOS subsystem, the host performs an operation of switching the BIOS subsystem to switch the second BIOS subsystem to the first BIOS subsystem.
[0360] S15-9: Modify the value of the flag register to a first preset value.
[0361] In some embodiments of the present application, after the dual BIOS system is refreshed and switched to the original BIOS subsystem, the value of the flag register is modified to the first preset value, that is, the value of the flag register is restored to the default value.
[0362] S16: Use the BIOS subsystem for data access.
[0363] In some embodiments of the present application, after determining the BIOS subsystem to be used for data access, the subsystem is used to access the data.
[0364] In some other embodiments of the present application, when the execution subject is a BMC control chip, before sending the first switching request to the host through the BMC control chip, the method further includes:
[0365] S21: Refresh the first BIOS subsystem through the BMC control chip.
[0366] In some embodiments of the present application, as shown in FIG3 , when it is determined that the execution subject is the BMC control chip, the data in the first BIOS subsystem is refreshed by the BMC control chip.
[0367] S22: Set the value of the flag register to a second preset value.
[0368] In some embodiments of the present application, the flag register (FlashFlag) is used to mark the refresh subject of the first BIOS subsystem. When the value of the flag register is a second preset value, it indicates that the refresh subject of the first BIOS subsystem is the BMC control chip.
[0369] In some embodiments of the present application, after the first BIOS subsystem is refreshed by the BMC control chip, the value of the flag register is set to a second preset value.
[0370] For example, the second preset value is 1.
[0371] In some other embodiments of the present application, when the execution subject is a host, before switching the first BIOS subsystem to the second BIOS subsystem through the host, the method further includes:
[0372] S41: Refresh the first BIOS subsystem through the host.
[0373] In some embodiments of the present application, when it is determined that the execution subject is the host, the data in the first BIOS subsystem is refreshed through the host.
[0374] S42: Setting the value of the flag register to a third preset value.
[0375] In some embodiments of the present application, the third preset value indicates that the execution entity for refreshing the first BIOS subsystem is the host.
[0376] In some embodiments of the present application, after the host is used to refresh the data in the first BIOS subsystem, the value of the flag register is set to a third preset value.
[0377] In some other embodiments of the present application, the method further includes:
[0378] S51: When the host operates normally, system data of the first BIOS subsystem is read.
[0379] In some embodiments of the present application, as shown in FIG4 , FIG4 is a schematic diagram of a dual BIOS system data synchronization process proposed in some embodiments of the present application, in which the system data of the first BIOS subsystem is read when the host is operating normally.
[0380] In some embodiments of the present application, when the host reads system data of the first BIOS subsystem, it directly reads the data from the connected first BIOS chip.
[0381] S52: Read system data of the second BIOS subsystem.
[0382] In some embodiments of the present application, after reading the data of the first BIOS subsystem, the system data of the second BIOS subsystem is read.
[0383] In some embodiments of the present application, when reading system data of the second BIOS subsystem, the host sends an ESPI data access instruction to the BMC to access the system data of the second BIOS subsystem connected to the BMC control chip.
[0384] S53: Perform data verification on the system data of the first BIOS subsystem and the system data of the second BIOS subsystem.
[0385] In some embodiments of the present application, data verification is performed on the data of the first BIOS subsystem and the system data of the second BIOS subsystem, and the system data of the two subsystems are compared to determine the difference between the system data of the two subsystems.
[0386] S54: Synchronize the system data of the first BIOS subsystem and the system data of the second BIOS subsystem according to the data verification result.
[0387] In some embodiments of the present application, data synchronization is performed on the system data of the first BIOS subsystem and the system data of the second BIOS subsystem according to the verification result. The specific steps include:
[0388] S54-1: When the parameters of the first BIOS subsystem are modified, the modified parameters are synchronously backed up to the second BIOS subsystem.
[0389] In some embodiments of the present application, as shown in Figure 4, when the parameters of the first BIOS subsystem are modified, the modified parameters are written to the chip where the current BIOS subsystem is located, and the differences, that is, the modified parameters, are synchronously backed up to the second BIOS subsystem, that is, written to the chip where the second BIOS subsystem is located.
[0390] S54 - 2 : When the first BIOS subsystem performs a reserved configuration refresh, the reserved configuration is written into the first BIOS subsystem.
[0391] In some embodiments of the present application, the configuration retention refresh is performed while retaining certain existing parameters, and the retained configuration will not change.
[0392] In some embodiments of the present application, when refreshing the reserved configuration, the reserved configuration is written into the current BIOS subsystem, that is, the first BIOS chip of the first BIOS subsystem.
[0393] S54-3: Back up the system data of the first BIOS subsystem to the second BIOS subsystem.
[0394] In some embodiments of the present application, after refreshing the first BIOS subsystem with a retained configuration, the refreshed data of the first BIOS subsystem is backed up to the second BIOS subsystem, that is, saved to the second BIOS chip.
[0395] S54 - 4 : When the first BIOS subsystem performs data rollback synchronization, system data of the second BIOS subsystem is read.
[0396] In some embodiments of the present application, data rollback synchronization is to roll back the data in the first BIOS subsystem to the same as the system data in the second BIOS subsystem. When the first BIOS subsystem fails, this method is used to delete abnormal data and perform data recovery.
[0397] In some embodiments of the present application, when the first BIOS subsystem performs data rollback synchronization, system data of the second BIOS subsystem is read and the data is obtained from the second BIOS chip.
[0398] S54-5: Synchronize the system data of the second BIOS subsystem to the first BIOS subsystem.
[0399] In some embodiments of the present application, after the system data of the second BIOS subsystem in the second BIOS chip is read, the system data of the second BIOS subsystem is synchronized to the first BIOS subsystem.
[0400] In some other embodiments of the present application, the method further includes:
[0401] S61: When the host runs abnormally, the first BIOS subsystem is switched to the second BIOS subsystem.
[0402] In some embodiments of the present application, as shown in FIG4 , when the host runs abnormally, it is determined that a subsystem switch of the dual BIOS system is required, and the subsystem switch process is executed at this time, and data synchronization is performed after the switch process is completed.
[0403] In some embodiments of the present application, real-time dual BIOS system data access and synchronization subsystems can be implemented, and dual BIOS firmware data content can be accessed and verified simultaneously in real time. It supports synchronization of the running BIOS configuration to the backup BIOS chip after modification, supports synchronization of configuration content to the backup BIOS chip after refreshing the BIOS retention configuration, and supports synchronization of the backup BIOS subsystem data to the abnormal BIOS subsystem after the running BIOS abnormally switches to the backup BIOS and successfully boots up, thereby further improving the reliability of the server system.
[0404] Some embodiments of this application fully utilize the standard SPI and ESPI protocol specifications. Based on this, leveraging ESPI's chip access channel and sharing capabilities, the host and BMC control chips enable chip access links in their respective directions when conditions are met. BIOS subsystem switching and data synchronization can also be performed freely, significantly reducing architecture costs and improving the efficiency of subsystem switching and data synchronization. Based on a new physical architecture, the system optimizes subsystem switching in dual BIOS systems, enabling manual switching of BIOS subsystems during both abnormal and normal server startup conditions, automatic switching of BIOS subsystems during operating system startup crashes or other anomalies, and support for switching BIOS subsystems when refreshing the BIOS via out-of-band systems or tools such as the BMC. A new feature is also added for switching BIOS chips when refreshing the BIOS under the operating system. All corresponding switching controls and actions are performed by the host and BMC using ESPI and SPI command interactions, without involving third-party chip control devices. Furthermore, data synchronization and updates can be performed in real time on demand, supporting data updates in both BIOS chips under various circumstances.
[0405] Referring to FIG5 , FIG5 is a schematic diagram of a dual BIOS system structure proposed in some embodiments of the present application, the system comprising:
[0406] The first BIOS chip is used to run the first BIOS subsystem.
[0407] The second BIOS chip is used to run the second BIOS subsystem.
[0408] BMC chip, used to run BMC programs.
[0409] The switching chip is used to control the connection between the first BIOS chip and the second BIOS chip, and the switching chip is connected to the first BIOS chip and the second BIOS chip; the complex programmable logic device is used to control the switching chip to perform link switching, and the complex programmable logic device is connected to the switch.
[0410] In some embodiments of the present application, a switch chip can control the execution entity of the dual BIOS system to connect to the first BIOS chip or the second BIOS chip, and the connection link can be freely switched according to actual conditions.
[0411] BMC control chip, used to control the BMC chip, the BMC control chip is connected to the BMC chip, the BMC control chip is connected to the complex programmable logic device, and the BMC control chip is connected to the switching chip; platform controller chipset, the platform controller chipset is connected to the switching chip through a first bus, the platform controller chipset is connected to the BMC control chip through a second bus, the platform controller chipset is connected to the CPU, and the first bus is connected to the second bus.
[0412] In some embodiments of the present application, the first bus is SPI and the second bus is ESPI.
[0413] In some embodiments of the present application, the access entities of the dual BIOS system include a host and a BMC control chip.
[0414] In some embodiments of the present application, upon receiving a subsystem switching instruction, the BMC control chip sends a subsystem switching request instruction to the complex programmable logic device.
[0415] In some embodiments of the present application, a subsystem switching instruction is an instruction issued by an operator to the BMC control chip to switch the currently running BIOS subsystem. A subsystem switching request instruction is an instruction sent by the BMC control chip to request switching the currently running BIOS subsystem.
[0416] In some embodiments of the present application, the BMC control chip controls the dual BIOS system to perform a shutdown operation.
[0417] In some embodiments of the present application, upon receiving a subsystem switching request instruction, the complex programmable logic device sends a line switching instruction to the switching chip.
[0418] In some embodiments of the present application, the line switching instruction is an instruction generated by a complex programmable logic device when it receives a subsystem switching request instruction, and is used to control the switching chip to switch the currently connected BIOS chip.
[0419] In some embodiments of the present application, upon receiving a line switching instruction, the switching chip switches the connected chip from the first BIOS chip to the second BIOS chip.
[0420] In some embodiments of the present application, the dual BIOS system uses the second BIOS subsystem for booting.
[0421] In some embodiments of the present application, the BMC control chip sends a subsystem switching request instruction to the complex programmable logic device when an operating system startup failure occurs.
[0422] In some embodiments of the present application, the BMC control chip controls the dual BIOS system to perform a shutdown operation.
[0423] In some embodiments of the present application, upon receiving a subsystem switching request instruction, the complex programmable logic device sends a line switching instruction to the switching chip.
[0424] In some embodiments of the present application, upon receiving a line switching instruction, the switching chip switches the connected chip from the first BIOS chip to the second BIOS chip.
[0425] In some embodiments of the present application, the dual BIOS system uses the second BIOS subsystem for booting.
[0426] In some embodiments of the present application, when a subsystem refresh of the dual BIOS system is required, the BMC control chip sends a subsystem switching request instruction to the complex programmable logic device.
[0427] In some embodiments of the present application, the BMC control chip controls the dual BIOS system to perform a shutdown operation.
[0428] In some embodiments of the present application, upon receiving a subsystem switching request instruction, the complex programmable logic device sends a first line switching instruction to the switching chip.
[0429] In some embodiments of the present application, upon receiving the first line switching instruction, the switching chip switches the connected chip from the first BIOS chip to the second BIOS chip.
[0430] In some embodiments of the present application, the complex programmable logic chip sends a second line switching instruction to the switching chip.
[0431] In some embodiments of the present application, upon receiving the second line switching instruction, the switch chip switches the access subject from the host to the BMC control chip.
[0432] In some embodiments of the present application, the BMC control chip performs a subsystem refresh on the second BIOS chip.
[0433] In some embodiments of the present application, when the subsystem of the first BIOS chip is refreshed, the BMC sends a subsystem switching request instruction to the complex programmable logic device.
[0434] In some embodiments of the present application, upon receiving a subsystem switching request instruction, the programmable logic device sends a third line switching instruction to the switching chip.
[0435] In some embodiments of the present application, upon receiving the third line switching instruction, the switching chip switches the connected chip from the second BIOS chip to the first BIOS chip.
[0436] In some embodiments of the present application, the BMC control chip performs a subsystem refresh on the first BIOS chip.
[0437] In some embodiments of the present application, when the subsystem of the second BIOS chip is refreshed, the complex programmable logic chip sends a fourth line switching instruction to the switching chip.
[0438] In some embodiments of the present application, upon receiving the fourth line switching instruction, the switch chip switches the access subject from the BMC control chip to the host.
[0439] In some embodiments of the present application, the dual BIOS system uses the first BIOS subsystem for booting.
[0440] In some embodiments of the present application, as shown in Figure 5, the first BIOS chip, the second BIOS chip and the SPI are connected through a switching chip, and the CPLD is responsible for controlling the switching chip. In this structure, the CPLD controls the communication and data access of any BIOS chip, and only any controller in the platform controller chipset or the BMC control chip has access to the selected BIOS chip.
[0441] 6 , which is a flow chart of a system switching flow method proposed in some embodiments of the present application. As shown in FIG6 , the method includes the following steps:
[0442] S111: When the first BIOS subsystem is running, determining whether a switching trigger condition of the dual BIOS system is satisfied, where the switching trigger condition includes: manual switching trigger, automatic switching trigger, and dual BIOS refresh trigger.
[0443] In some embodiments of the present application, when the first BIOS subsystem is running, the switching trigger conditions satisfied by the dual BIOS system are determined, and the switching trigger conditions include: manual switching trigger, automatic switching trigger, and refresh dual BIOS trigger.
[0444] S112: Execute the corresponding subsystem switching process according to the switching triggering condition.
[0445] In some embodiments of the present application, when subsystem switching is required, a corresponding subsystem switching process is executed according to a switching triggering condition.
[0446] In some embodiments of the present application, according to the switching triggering condition, executing the corresponding subsystem switching process includes:
[0447] S112-1: When the switching trigger condition is a manual switching trigger, the switching chip is controlled by a complex programmable logic device to switch the first BIOS subsystem to the second BIOS subsystem.
[0448] In some embodiments of the present application, when the switching trigger condition is a manual switching trigger, a complex programmable logic device is used to control the switching chip to switch the first BIOS subsystem to the second BIOS subsystem.
[0449] S112-2: The BMC control chip controls the dual BIOS system to perform a shutdown operation.
[0450] In some embodiments of the present application, the BMC control chip controls the dual BIOS system to perform a shutdown operation.
[0451] S112-3: Determine the value in the flag register.
[0452] In some embodiments of the present application, when the BMC controls the dual BIOS system to perform a shutdown operation and then performs a power-on startup, the value in the current flag register is determined.
[0453] S112-4: When the value in the flag register is not the first preset value, the second BIOS subsystem is used to start the computer.
[0454] In some embodiments of the present application, when the value in the flag register is not the first preset value, the second BIOS subsystem is used to boot the computer.
[0455] In some embodiments of the present application, the method further comprises:
[0456] S112-5: When the switching trigger condition is an automatic switching trigger, the BMC control chip sends a subsystem switching request instruction to the complex programmable logic device.
[0457] In some embodiments of the present application, when the switching trigger condition is automatic switching, the BMC control chip sends a subsystem switching request instruction to the complex programmable logic device.
[0458] S112-6: The BMC control chip controls the dual BIOS system to perform a shutdown operation.
[0459] In some embodiments of the present application, the BMC control chip controls the dual BIOS system to perform a shutdown operation.
[0460] S112-7: When the complex programmable logic device receives the subsystem switching request instruction, it controls the switching chip to switch the first BIOS subsystem to the second BIOS subsystem.
[0461] In some embodiments of the present application, upon receiving a subsystem switching request instruction, the complex programmable logic device controls the switching chip to switch the first BIOS subsystem to the second BIOS subsystem.
[0462] S112-8: Determine the value in the flag register.
[0463] In some embodiments of the present application, the value in the current flag register is determined.
[0464] S112-9: When the value in the flag register is not the first preset value, the second BIOS subsystem is used to start the computer.
[0465] In some embodiments of the present application, when the value in the flag register is not the first preset value, the second BIOS subsystem is used to boot the computer.
[0466] In some embodiments of the present application, the method further comprises:
[0467] S112-10: When the switching trigger condition is a refresh dual BIOS trigger, the value in the flag register is set to a first preset value.
[0468] In some embodiments of the present application, when the switching trigger condition is a refresh dual BIOS trigger, the value in the current flag register is set to a first preset value.
[0469] S112-11: The BMC control chip sends a subsystem switching request instruction to the complex programmable logic device.
[0470] In some embodiments of the present application, the BMC control chip sends a subsystem switching request instruction to the complex programmable logic device.
[0471] S112-12: The BMC control chip controls the dual BIOS system to shut down the computer.
[0472] In some embodiments of the present application, the BMC control chip controls the dual BIOS system to perform a shutdown operation.
[0473] S112-13: The complex programmable logic device controls the switching chip to switch the first BIOS subsystem to the second BIOS subsystem.
[0474] In some embodiments of the present application, a complex programmable logic device controls a switching chip to switch the first BIOS subsystem to the second BIOS subsystem.
[0475] S112-14: Get the value in the flag register.
[0476] In some embodiments of the present application, a value in a flag register is obtained.
[0477] S112-15: When the value in the flag register is the first preset value, the complex programmable logic device controls the switch chip to switch the access subject of the dual BIOS system from the host to the BMC control chip.
[0478] In some embodiments of the present application, when the value in the flag register is a first preset value, the complex programmable logic device controls the switch chip to switch the current access subject from the host to the BMC control chip.
[0479] S112-16: The BMC control chip refreshes the second BIOS subsystem.
[0480] In some embodiments of the present application, the BMC control chip performs subsystem refresh on the second BIOS subsystem.
[0481] S112-17: When the second BIOS subsystem is refreshed, the BMC control chip sends a subsystem switching request instruction to the complex programmable logic device.
[0482] In some embodiments of the present application, when the second BIOS subsystem is refreshed, the BMC control chip sends a subsystem switching request instruction to the complex programmable logic device.
[0483] S112-18: Upon receiving the subsystem switching signal, the complex programmable logic device controls the switching chip to switch the second BIOS subsystem to the first BIOS subsystem.
[0484] In some embodiments of the present application, upon receiving a subsystem switching request, the complex programmable logic device controls the switching chip to switch the second BIOS subsystem to the first BIOS subsystem.
[0485] S112-19: The BMC control chip refreshes the first BIOS subsystem.
[0486] In some embodiments of the present application, the BMC control chip performs subsystem refresh on the first BIOS subsystem.
[0487] S112-20: When the first BIOS subsystem is refreshed, the value in the flag register is cleared.
[0488] In some embodiments of the present application, when the first BIOS subsystem is refreshed, the value in the flag register is cleared.
[0489] S112-21: A complex programmable logic device controls the switch chip, switching the access subject of the dual BIOS system from the BMC control chip to the host.
[0490] In some embodiments of the present application, a complex programmable logic device controls a switching chip to switch the current access subject from the BMC control chip to the host.
[0491] S112-22: The dual BIOS system uses the first BIOS subsystem to boot.
[0492] In some embodiments of the present application, the dual BIOS system uses the first BIOS subsystem for booting.
[0493] In some embodiments of the present application, the process of switching the BIOS subsystem is shown in Figure 7, which is a schematic diagram of the dual BIOS system switching process proposed in some embodiments of the present application. The switching steps are as follows:
[0494] S000: Switching subsystem starts;
[0495] S001: Assume that the first BIOS chip is used to boot the system by default (if it is the second BIOS chip, replace the second BIOS chip with the first BIOS chip in the subsequent steps);
[0496] S002: Determine the triggering condition for the BIOS subsystem to switch to the second BIOS subsystem. If it is a manual switch trigger, execute S003; if it is an out-of-band flash dual BIOS trigger, execute S004; if it is an automatic switch trigger, execute S005;
[0497] S003: manually use a tool to send an instruction to switch to the second BIOS chip, that is, a subsystem switching instruction, and then execute S006;
[0498] S004: The BIOS sets the flag register value (FlashFlag) indicating that the dual BIOS is being refreshed to 1. Subsequent steps will perform corresponding actions based on the flag register value.
[0499] S005: The BMC control chip automatically sends a command to switch to the second BIOS subsystem to the CPLD, informing the CPLD to prepare for switching to the second BIOS subsystem.
[0500] S006: The BMC control chip executes the shutdown command to shut down the system;
[0501] S007: The CPLD controls the path of the SPI switch chip and switches the switch chip to the second BIOS chip connection;
[0502] S008: Determine whether the flag register value is 1. If so, execute step S009; otherwise, execute step S015;
[0503] S009: CPLD controls the access to the SPI switch chip, switching the SPI access of the switch chip to the BMC system;
[0504] S010: BMC starts accessing the second BIOS subsystem and updating the BIOS version;
[0505] S011: The BMC control chip automatically sends a command to switch to the first BIOS subsystem to the CPLD, informing the CPLD to prepare for switching to the first BIOS subsystem.
[0506] S012: The CPLD controls the path of the SPI switch chip and switches the switch chip to the first BIOS chip connection;
[0507] S013: The BMC starts accessing the first BIOS subsystem and updates the BIOS version, clearing the flag register to 0.
[0508] S014: CPLD controls the SPI exchange path and switches the exchanged SPI access to the host;
[0509] S015: The dual BIOS system starts up using the first BIOS subsystem, and then executes step S017;
[0510] S016: The dual BIOS system uses the second BIOS subsystem to start up;
[0511] S017: Subsystem switching ends.
[0512] In some embodiments of the present application, when the first BIOS subsystem is running, the switch trigger conditions satisfied by the dual BIOS system are determined. When a subsystem switch is required, the corresponding subsystem switch process is executed according to the switch trigger conditions. This ensures that the BIOS system can operate normally when the server's operating system starts, thereby ensuring stable startup and operation of the operating system.
[0513] Based on the same inventive concept, some embodiments of the present application provide a system switching device. Referring to FIG8 , FIG8 is a schematic diagram of a system switching device 800 proposed in some embodiments of the present application. As shown in FIG8 , the device includes:
[0514] A switching determination module 801 is configured to determine whether a subsystem switch is required when the first BIOS subsystem is running;
[0515] The switching trigger condition judgment module 802 is used to judge whether the dual BIOS system satisfies the switching trigger condition when a subsystem switching is required. The switching trigger condition includes: refreshing the dual BIOS trigger, automatic switching trigger, and manual switching trigger.
[0516] The subsystem switching module 803 is configured to switch the currently running first BIOS subsystem to the second BIOS subsystem using a corresponding switching method according to a trigger condition;
[0517] The value acquisition module 804 is used to obtain the value of the flag register when the subsystem switching is completed;
[0518] A subsystem determination module 805 is used to determine the BIOS subsystem used for data access according to the value of the flag register;
[0519] The data access module 806 is used to access data using the BIOS subsystem.
[0520] Optionally, the subsystem switching module includes:
[0521] A first execution subject confirmation submodule is used to determine an execution subject for refreshing the first BIOS subsystem when the switching trigger condition is a trigger for refreshing the dual BIOS;
[0522] A first sending submodule is configured to send the first switching request to the host via the BMC control chip when the execution subject is the BMC control chip;
[0523] The first switching submodule is used for the host to switch the first BIOS subsystem to the second BIOS subsystem according to the first switching request.
[0524] Optionally, the device further comprises:
[0525] A first data refresh submodule, configured to refresh the first BIOS subsystem via a BMC control chip;
[0526] The first register value setting submodule is used to set the value of the flag register to a second preset value.
[0527] Optionally, the device further comprises:
[0528] The second switching submodule is configured to switch the first BIOS subsystem to the second BIOS subsystem via the host when the execution subject is the host.
[0529] Optionally, the device further comprises:
[0530] A second data refresh submodule, configured to refresh the first BIOS subsystem via the host;
[0531] The second register value setting submodule is used to set the value of the flag register to a third preset value.
[0532] Optionally, the device further comprises:
[0533] The first receiving submodule is configured to receive a subsystem switching instruction through the BMC control chip when the switching trigger condition is a manual switching trigger;
[0534] The second sending submodule is used to send the second switching request to the host through the BMC control chip;
[0535] The third subsystem switching submodule is used for the host to switch the first BIOS subsystem to the second BIOS subsystem according to the second switching request.
[0536] Optionally, the device further comprises:
[0537] The second execution subject confirmation submodule is used to determine the execution subject corresponding to the automatic switching trigger when the switching trigger condition is an automatic switching trigger;
[0538] A third sending submodule is configured to send the third switching request to the host via the BMC control chip when the execution subject is the BMC control chip;
[0539] The third switching submodule is used for the host to switch the first BIOS subsystem to the second BIOS subsystem according to the third switching request.
[0540] Optionally, the device further comprises:
[0541] The fourth switching submodule is configured to switch the first BIOS subsystem to the second BIOS subsystem via the host when the execution subject is the host.
[0542] Optionally, the subsystem determination module includes:
[0543] The first subsystem confirmation submodule is configured to determine that the BIOS subsystem used for data access is the second BIOS subsystem when the value of the flag register is a first preset value;
[0544] A second subsystem confirmation submodule is configured to determine that the BIOS subsystem used for data access is the first BIOS subsystem when the value of the flag register is a second preset value;
[0545] The third subsystem confirmation submodule is configured to determine that the BIOS subsystem used for data access is the first BIOS subsystem when the value of the flag register is a third preset value.
[0546] Optionally, the device further comprises:
[0547] A third data refresh submodule is configured to refresh the second BIOS subsystem through the BMC control chip when the value of the flag register is a second preset value;
[0548] A fourth sending submodule is configured to send a fourth switching request to the host through the BMC control chip when the second BIOS subsystem is refreshed;
[0549] The fourth switching submodule is used for the host to switch the second BIOS subsystem to the first BIOS subsystem according to a fourth switching request.
[0550] Optionally, the device further comprises:
[0551] a fourth data refresh submodule, configured to refresh the second BIOS subsystem via the host when the value of the flag register is a third preset value;
[0552] A fifth switching submodule, configured to switch the second BIOS subsystem to the first BIOS subsystem via the host when the second BIOS subsystem has been refreshed;
[0553] The third register value setting submodule is used to modify the value of the flag register to a first preset value.
[0554] Optionally, the device further comprises:
[0555] A first data reading module is used to read the system data of the first BIOS subsystem when the host is operating normally;
[0556] A second data reading module, used for reading system data of the second BIOS subsystem;
[0557] A data verification module, configured to perform data verification on system data of the first BIOS subsystem and system data of the second BIOS subsystem;
[0558] The data synchronization module is used to synchronize the system data of the first BIOS subsystem and the system data of the second BIOS subsystem according to the data verification result.
[0559] Optionally, the data synchronization module includes:
[0560] A first data synchronization submodule is used to synchronize and back up the modified parameters to the second BIOS subsystem when the parameters of the first BIOS subsystem are modified;
[0561] a data writing submodule, configured to write the reserved configuration into the first BIOS subsystem when the first BIOS subsystem performs a reserved configuration refresh;
[0562] A second data synchronization submodule, configured to back up system data of the first BIOS subsystem to the second BIOS subsystem;
[0563] A third data synchronization submodule is used to read the system data of the second BIOS subsystem when the first BIOS subsystem performs data rollback synchronization;
[0564] The fourth data synchronization submodule is used to synchronize system data of the second BIOS subsystem to the first BIOS subsystem.
[0565] Optionally, the device further comprises:
[0566] The second subsystem switching module is used to switch the first BIOS subsystem to the second BIOS subsystem when the host runs abnormally.
[0567] Based on the same inventive concept, some embodiments of the present application provide a system switching device. Referring to FIG9 , FIG9 is a schematic diagram of a system switching device 900 proposed in some embodiments of the present application. As shown in FIG9 , the device includes:
[0568] The switching trigger condition judgment module 901 is used to judge whether the dual BIOS system meets the switching trigger condition when the first BIOS subsystem is running. The switching trigger condition includes: manual switching trigger, automatic switching trigger, and dual BIOS refresh trigger;
[0569] The system switching process execution module 902 is used to execute the corresponding subsystem switching process according to the switching triggering condition.
[0570] Optionally, the system switching process execution module includes:
[0571] The manual switching submodule is used to control the switching chip through the complex programmable logic device to switch the first BIOS subsystem to the second BIOS subsystem when the switching trigger condition is a manual switching trigger;
[0572] The first shutdown operation submodule is used for the BMC control chip to control the dual BIOS system to perform a shutdown operation;
[0573] A first data determination submodule, configured to determine a value in a current flag register;
[0574] The first boot submodule is used to use the second BIOS subsystem to boot the computer when the value in the flag register is not the first preset value.
[0575] Optionally, the system switching process execution module further includes:
[0576] The automatic switching submodule is used for, when the switching trigger condition is an automatic switching trigger, the BMC control chip sends a subsystem switching request instruction to the complex programmable logic device;
[0577] The second shutdown operation submodule is used for the BMC control chip to control the dual BIOS system to perform a shutdown operation;
[0578] The automatic switching execution submodule is used to control the switching chip to switch the first BIOS subsystem to the second BIOS subsystem when the complex programmable logic device receives a subsystem switching request instruction;
[0579] A second value determination submodule is used to determine the value in the current flag register;
[0580] When the value in the flag register is not the first preset value, the second BIOS subsystem is used to start the computer.
[0581] Optionally, the system switching process execution module further includes:
[0582] The value setting submodule is used to set the value in the flag register to a first preset value when the switching trigger condition is a refresh dual BIOS trigger;
[0583] The first instruction sending submodule is used for the BMC control chip to send a subsystem switching request instruction to the complex programmable logic device;
[0584] The third shutdown operation submodule is used for the BMC control chip to control the dual BIOS system to perform a shutdown operation;
[0585] A first refresh switching execution submodule is used for a complex programmable logic device to control a switching chip to switch the first BIOS subsystem to a second BIOS subsystem;
[0586] A third value determination submodule is used to obtain the value in the flag register;
[0587] The access subject switching submodule is used to control the switching chip by the complex programmable logic device to switch the access subject of the dual BIOS system from the host to the BMC control chip when the value in the flag register is a first preset value;
[0588] The first subsystem refresh submodule is used for the BMC control chip to refresh the second BIOS subsystem;
[0589] The second instruction sending submodule is used for, when the second BIOS subsystem is refreshed, the BMC control chip sends a subsystem switching request instruction to the complex programmable logic device;
[0590] The second refresh switching execution submodule is used for the complex programmable logic device to control the switching chip to switch the second BIOS subsystem to the first BIOS subsystem when receiving the subsystem switching signal;
[0591] The second subsystem refresh submodule is used for the BMC control chip to refresh the first BIOS subsystem;
[0592] The value clearing submodule is used to clear the value in the flag register when the first BIOS subsystem is refreshed;
[0593] The second access subject switching submodule is used for complex programmable logic device control switching chip to switch the access subject of the dual BIOS system from BMC control chip to host;
[0594] The third boot submodule is used for the dual BIOS system to use the first BIOS subsystem to boot.
[0595] Based on the same inventive concept, some other embodiments of the present application provide a non-volatile readable storage medium on which a computer program is stored. When the program is executed by a processor, the steps in the system switching method of some embodiments of the present application are implemented.
[0596] Based on the same inventive concept, some other embodiments of the present application provide an electronic device, as shown in Figure 10. Figure 10 is a schematic diagram of an electronic device 1000 proposed in some embodiments of the present application, including a memory 1002, a processor 1001, and a computer program stored in the memory and executable on the processor. When executed by the processor, the steps in the system switching method of some embodiments of the present application are implemented.
[0597] For some embodiments of the device, since they are basically similar to some embodiments of the method, the description is relatively simple, and the relevant parts can be referred to the partial description of some embodiments of the method.
[0598] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0599] Those skilled in the art will appreciate that some embodiments of the present application may be provided as methods, devices, or computer program products. Therefore, some embodiments of the present application may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Furthermore, some embodiments of the present application may take the form of a computer program product implemented on one or more computer-usable non-volatile readable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0600] Some embodiments of the present application are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to some embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device produce a device for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0601] These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce a manufactured product including an instruction device that implements the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0602] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce computer-implemented processing, so that the instructions executed on the computer or other programmable terminal device provide steps for implementing the functions specified in one or more processes in the flowchart and / or one or more boxes in the block diagram.
[0603] Although preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic inventive concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0604] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.
[0605] The above is a detailed introduction to the system switching method, device, equipment and non-volatile readable storage medium provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, based on the ideas of the present application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A dual-BIOS system, characterized in that, The system includes: A first BIOS chip for running a first BIOS subsystem; A second BIOS chip for running a second BIOS subsystem; A BMC chip for running a BMC program; A BMC control chip for controlling the BMC chip and the second BIOS chip, and the BMC control chip is connected to the BMC chip and the second BIOS chip; A platform controller chipset for controlling the first BIOS chip and the BMC control chip. The platform controller chipset is connected to the first BIOS chip through a first bus, the platform controller chipset is connected to the BMC control chip through a second bus, the first bus is connected to the second bus, and the platform controller chipset is connected to the CPU.
2. The dual-BIOS system according to claim 1, wherein The access subjects of the dual-BIOS system include the host and the BMC control chip, and the host and the BMC control chip interact and access by sending instructions.
3. The dual-BIOS system according to claim 2, wherein, After the BMC control chip refreshes the subsystem of the first BIOS chip, it sends a subsystem switching request instruction to the host; When the host receives the subsystem switching request instruction, it switches the first BIOS subsystem to the second BIOS subsystem; When the first BIOS subsystem is switched to the second BIOS subsystem, the BMC control chip refreshes the second BIOS subsystem on the second BIOS chip; When the refresh of the second BIOS subsystem on the second BIOS chip is completed, the BMC control chip sends the subsystem switching request instruction to the host; When the host receives the subsystem switching request instruction, it switches the second BIOS subsystem to the first BIOS subsystem.
4. The dual-BIOS system according to claim 2, wherein After the host refreshes the first BIOS subsystem on the first BIOS chip, it switches the first BIOS subsystem to the second BIOS subsystem; When the first BIOS subsystem is switched to the second BIOS subsystem, the host refreshes the second BIOS subsystem on the second BIOS chip; When the refresh of the second BIOS subsystem on the second BIOS chip is completed, the host switches the second BIOS subsystem to the first BIOS subsystem.
5. The dual-BIOS system according to claim 2, wherein, When the BMC control chip receives a subsystem switching instruction, it sends a subsystem switching request instruction to the host; When the host receives the subsystem switching request instruction, it switches the first BIOS subsystem to the second BIOS subsystem.
6. The dual-BIOS system according to claim 2, characterized in that, When the host actively switches the subsystem, it switches the first BIOS subsystem to the second BIOS subsystem.
7. The dual BIOS system according to claim 2, wherein When the BMC control chip detects an operating system startup failure, it sends a subsystem switching request instruction to the host; When the host receives the subsystem switching request instruction, it switches the first BIOS subsystem to the second BIOS subsystem.
8. The dual-BIOS system according to claim 2, wherein, When the host is running normally, it reads the data in the first BIOS chip; The host sends a data reading instruction to the BMC control chip; When the BMC control chip receives the data reading instruction, it sends the data in the second BIOS chip to the host; The host performs data verification on the data in the first BIOS chip and the data in the second BIOS chip; The host synchronizes the data between the first BIOS chip and the second BIOS chip according to the data verification result.
9. A system switching method, characterized in that, The method is applied to the dual BIOS system described in claims 1 to 8, and includes: When the first BIOS subsystem is running, determine whether a subsystem switch is required; When a subsystem switch is required, determine the switch trigger condition satisfied by the dual BIOS system. The switch trigger condition includes: dual BIOS refresh trigger, automatic switch trigger, and manual switch trigger; According to the switch trigger condition, use the corresponding switching method to switch the currently running first BIOS subsystem to the second BIOS subsystem; When the first BIOS subsystem is switched to the second BIOS subsystem, obtain the value of the flag register; According to the value of the flag register, determine the BIOS subsystem used for data access; Use the BIOS subsystem for data access.
10. The method according to claim 9, wherein The step of using the corresponding switching method to switch the currently running first BIOS subsystem to the second BIOS subsystem according to the switch trigger condition includes: When the switch trigger condition is the dual BIOS refresh trigger, determine the execution entity for refreshing the first BIOS subsystem; When the execution entity is the BMC control chip, send a first switching request to the host through the BMC control chip; The host switches the first BIOS subsystem to the second BIOS subsystem according to the first switching request.
11. The method according to claim 10, characterized in that, Before sending the first switching request to the host through the BMC control chip, the method further includes: Refreshing the first BIOS subsystem through the BMC control chip; Setting the value of the flag register to a second preset value.
12. The method according to claim 10, wherein The method further includes: When the execution entity is the host, switch the first BIOS subsystem to the second BIOS subsystem through the host.
13. The method according to claim 12, wherein Before switching the first BIOS subsystem to the second BIOS subsystem through the host, the method further includes: Refreshing the first BIOS subsystem through the host; Setting the value of the flag register to a third preset value.
14. The method according to claim 9, characterized in that, The method further includes: When the switch trigger condition is the manual switch trigger, receive a subsystem switching instruction through the BMC control chip; Send the second switching request to the host through the BMC control chip; Based on the second switching request, the host switches the first BIOS subsystem to the second BIOS subsystem.
15. The method according to claim 9, wherein The method further includes: When the switching trigger condition is the automatic switching trigger, determine the execution entity corresponding to the automatic switching trigger; When the execution entity is the BMC control chip, send a third switching request to the host through the BMC control chip; Based on the third switching request, the host switches the first BIOS subsystem to the second BIOS subsystem.
16. The method according to claim 15, wherein The method further includes: When the execution entity is the host, switch the first BIOS subsystem to the second BIOS subsystem through the host.
17. The method according to claim 9, characterized in that, Determining the BIOS subsystem used for data access according to the value of the flag register includes: When the value of the flag register is the first preset value, determine that the BIOS subsystem used for data access is the second BIOS subsystem; When the value of the flag register is the second preset value, determine that the BIOS subsystem used for data access is the first BIOS subsystem; When the value of the flag register is the third preset value, determine that the BIOS subsystem used for data access is the first BIOS subsystem.
18. The method according to claim 17, wherein The method further includes: When the value of the flag register is the second preset value, refresh the second BIOS subsystem through the BMC control chip; When the refresh of the second BIOS subsystem is completed, send a fourth switching request to the host through the BMC control chip; Based on the fourth switching request, the host switches the second BIOS subsystem to the first BIOS subsystem.
19. The method according to claim 17, wherein The method further includes: When the value of the flag register is the third preset value, refresh the second BIOS subsystem through the host; When the refresh of the second BIOS subsystem is completed, switch the second BIOS subsystem to the first BIOS subsystem through the host; Modify the value of the flag register to the first preset value.
20. The method according to claim 9, wherein The method further includes: When the host is running normally, read the system data of the first BIOS subsystem; Read the system data of the second BIOS subsystem; Perform data verification on the system data of the first BIOS subsystem and the system data of the second BIOS subsystem; Based on the data verification result, perform data synchronization on the system data of the first BIOS subsystem and the system data of the second BIOS subsystem.
21. The method according to claim 20, wherein Performing data synchronization on the system data of the first BIOS subsystem and the system data of the second BIOS subsystem according to the data verification result includes: When the parameters of the first BIOS subsystem are modified, synchronously back up the modified parameters to the second BIOS subsystem; When the reserved configuration of the first BIOS subsystem is refreshed, write the reserved configuration into the first BIOS subsystem; Back up the system data of the first BIOS subsystem to the second BIOS subsystem; When data rollback synchronization is performed on the first BIOS subsystem, read the system data of the second BIOS subsystem; Synchronize the system data of the second BIOS subsystem to the first BIOS subsystem.
22. The method according to claim 21, wherein The method further includes: When the host runs abnormally, switch the first BIOS subsystem to the second BIOS subsystem.
23. A dual-BIOS system, characterized in that, The system includes: A first BIOS chip for running the first BIOS subsystem; A second BIOS chip for running the second BIOS subsystem; A BMC chip for running the BMC program; A switching chip for controlling the connection between the first BIOS chip and the second BIOS chip, and the switching chip is connected to the first BIOS chip and the second BIOS chip; A complex programmable logic device for controlling the switching chip to perform link switching, and the complex programmable logic device is connected to the switching chip; A BMC control chip for controlling the BMC chip, the BMC control chip is connected to the BMC chip, the BMC control chip is connected to the complex programmable logic device, and the BMC control chip is connected to the switching chip; A platform controller chipset, the platform controller chipset is connected to the switching chip through a first bus, the platform controller chipset is connected to the BMC control chip through a second bus, the platform controller chipset is connected to the CPU, and the first bus is connected to the second bus.
24. The dual-BIOS system according to claim 23, wherein, The access subjects of the dual BIOS system include the host and the BMC control chip.
25. The dual-BIOS system according to claim 24, wherein, When the BMC control chip receives a subsystem switching instruction, it sends a subsystem switching request instruction to the complex programmable logic device; The BMC control chip controls the dual BIOS system to perform a shutdown operation; When the complex programmable logic device receives the subsystem switching request instruction, it sends a line switching instruction to the switching chip; When the switching chip receives the line switching instruction, it switches the connected chip from the first BIOS chip to the second BIOS chip; The dual BIOS system uses the second BIOS subsystem for power-on startup.
26. The dual BIOS system according to claim 24, wherein When the operating system fails to start, the BMC control chip sends a subsystem switching request instruction to the complex programmable logic device; The BMC control chip controls the dual BIOS system to perform a shutdown operation; When the complex programmable logic device receives the subsystem switching request instruction, it sends a line switching instruction to the switching chip; When the switching chip receives the line switching instruction, it switches the connected chip from the first BIOS chip to the second BIOS chip; The dual BIOS system uses the second BIOS subsystem to start up.
27. The dual-BIOS system according to claim 24, characterized in that, When the BMC control chip needs to refresh the subsystem of the dual BIOS system, it sends a subsystem switching request instruction to the complex programmable logic device; The BMC control chip controls the dual BIOS system to perform a shutdown operation; When the complex programmable logic device receives the subsystem switching request instruction, it sends a first line switching instruction to the switching chip; When the switching chip receives the first line switching instruction, it switches the connected chip from the first BIOS chip to the second BIOS chip; The complex programmable logic chip sends a second line switching instruction to the switching chip; When the switching chip receives the second line switching instruction, it switches the access subject from the host to the BMC control chip; The BMC control chip refreshes the second BIOS subsystem on the second BIOS chip; When the refresh of the second BIOS subsystem on the second BIOS chip is completed, the BMC control chip sends a subsystem switching request instruction to the complex programmable logic device; When the programmable logic device receives the subsystem switching request instruction, it sends a third line switching instruction to the switching chip; When the switching chip receives the third line switching instruction, it switches the connected chip from the second BIOS chip to the first BIOS chip; The BMC control chip refreshes the first BIOS subsystem on the first BIOS chip; When the refresh of the first BIOS subsystem on the first BIOS chip is completed, the complex programmable logic chip sends a fourth line switching instruction to the switching chip; When the switching chip receives the fourth line switching instruction, it switches the access subject from the BMC control chip to the host; The dual BIOS system uses the first BIOS subsystem to start up.
28. A system switching method, characterized in that, The method is applied to the dual BIOS system according to claims 23 to 27, and includes: When the first BIOS subsystem is running, judge the switching trigger conditions satisfied by the dual BIOS system, and the switching trigger conditions include: manual switching trigger, automatic switching trigger, refreshing dual BIOS trigger; According to the switching trigger conditions, execute the corresponding subsystem switching process.
29. The method according to claim 28, wherein The executing the corresponding subsystem switching process according to the switching trigger conditions includes: When the switching trigger condition is the manual switching trigger, control the switching chip through the complex programmable logic device to switch the first BIOS subsystem to the second BIOS subsystem; The BMC control chip controls the dual BIOS system to perform a shutdown operation; Determine the value in the flag register; When the value in the flag register is not the first preset value, use the second BIOS subsystem to start up.
30. The method according to claim 29, wherein, The method further includes: When the switching trigger condition is the automatic switching trigger, the BMC control chip sends a subsystem switching request instruction to the complex programmable logic device; The BMC control chip controls the dual BIOS system to perform a shutdown operation; When receiving the subsystem switching request instruction, the complex programmable logic device controls the switching chip to switch the first BIOS subsystem to the second BIOS subsystem; Determine the value in the flag register; When the value in the flag register is not the first preset value, use the second BIOS subsystem to start up.
31. The method according to claim 30, characterized in that, The method further includes: When the switching trigger condition is the dual BIOS refresh trigger, set the value in the flag register to the first preset value; The BMC control chip sends the subsystem switching request instruction to the complex programmable logic device; The BMC control chip controls the dual BIOS system to perform a shutdown operation; The complex programmable logic device controls the switching chip to switch the first BIOS subsystem to the second BIOS subsystem; Obtain the value in the flag register; When the value in the flag register is the first preset value, the complex programmable logic device controls the switching chip to switch the access subject of the dual BIOS system from the host to the BMC control chip; The BMC control chip refreshes the second BIOS subsystem; When the refresh of the second BIOS subsystem is completed, the BMC control chip sends the subsystem switching request instruction to the complex programmable logic device; When receiving the subsystem switching request instruction, the complex programmable logic device controls the switching chip to switch the second BIOS subsystem to the first BIOS subsystem; The BMC control chip refreshes the first BIOS subsystem; When the refresh of the first BIOS subsystem is completed, clear the value in the flag register; The complex programmable logic device controls the switching chip to switch the access subject of the dual BIOS system from the BMC control chip to the host; The dual BIOS system uses the first BIOS subsystem to start up.
32. A system switching device, characterized in that, The device includes: A switching judgment module, configured to determine whether a subsystem switch is required when the first BIOS subsystem is running; A switching trigger condition judgment module, configured to judge the switching trigger condition satisfied by the dual BIOS system when a subsystem switch is required, where the switching trigger condition includes: dual BIOS refresh trigger, automatic switching trigger, and manual switching trigger; A subsystem switching module, configured to switch the currently running first BIOS subsystem to the second BIOS subsystem using a corresponding switching method according to the switching trigger condition; A numerical value acquisition module, configured to acquire the value of a flag register when the first BIOS subsystem is switched to the second BIOS subsystem; A subsystem determination module, configured to determine the BIOS subsystem used for data access according to the value of the flag register; A data access module, configured to perform data access using the BIOS subsystem.
33. A system switching device, characterized in that, The device includes: A switching trigger condition judgment module, configured to judge the switching trigger conditions satisfied by the dual BIOS system when the first BIOS subsystem is running, where the switching trigger conditions include: manual switching trigger, automatic switching trigger, and dual BIOS refresh trigger; A subsystem switching module, configured to execute a corresponding subsystem switching process according to the switching trigger conditions.
34. A computer non-volatile readable storage medium, on which a computer program is stored, characterized in that, When the computer program is executed by a processor, the steps in the method according to any one of claims 9 to 22, or 28 to 31 are implemented.
35. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, the steps of the method according to any one of claims 9 to 22, or 28 to 31 are implemented.
Citation Information
Patent Citations
Computer system with double basic input / output systems and its operation method
CN101499044A
Virtual BIOS (basic input / output system) booting system and virtual BIOS booting method
CN104142870A
An extension component, an electronic apparatus and a start method
CN106990958A
Dual-BIOS Flash control system and method of server
CN108228394A
Update method and device for basic input-output system
CN108427885A