Automatic switching method for master / backup BIOS, automatic switching device, and computer
Patent Information
- Authority / Receiving Office
- JP · JP
- Patent Type
- Patents
- Current Assignee / Owner
- Filing Date
- 2024-04-25
- Publication Date
- 2026-08-13
AI Technical Summary
【0032】 本願によれば、該マスター·バックアップBIOSの自動切換方法は、マスターBIOSの各起動フェーズにおける起動プロセス情報を取得し、即ち、起動プロセスに伴って変化する情報を取得することにより、起動プロセス情報が予め設定された時間内に変化しない場合、マスターBIOSの起動プロセスが停滞し、コンピュータがダウンしたと決定することができ、マスターBIOS及びバックアップBIOSがマスター·バックアップBIOSの切換を行うように自動的に制御し、コンピュータがダウンしたことを手動で判断してマスター·バックアップBIOSの切換を制御する必要が無く、手動判断の不正確や遅延による安定性低下の問題を克服し、即ち、関連技術においてマスター·バックアップBIOSの切換を手動で制御することで安定性が悪いという問題を解決した。
Smart Images

Figure 0007905003000001 
Figure 0007905003000002 
Figure 0007905003000003
Abstract
Description
Technical Field
[0001] [Cross - reference to Related Applications] This application claims the priority of a Chinese patent application with application number 202311473038.6 and invention title "Automatic Switching Method, Automatic Switching Device and Computer of Master - Backup BIOS", which was filed with the Chinese Patent Office on November 7, 2023, and all of its content is incorporated herein by reference.
[0002] The embodiments of this application relate to the field of computers, and in particular, to an automatic switching method, an automatic switching device and a computer of master - backup BIOS.
Background Art
[0003] In current server designs, as the safe use of servers becomes increasingly important, for BIOS (Basic Input Output System, basic input - output system) and BMC (Baseboard Management Controller, baseboard management controller) alike, more and more requirements for server security are set to protect the safe use of the entire server and protect customer information from infringement.
[0004] During the use of a server, if the BIOS upgrade fails or is damaged by various virus attacks, the BIOS parameters of the motherboard may be lost or damaged, resulting in phenomena such as the server being unable to power on, unable to start, and unstable operation. When such problems occur, there is still room for response on the side of the server motherboard design manufacturer, but general customers cannot solve such phenomena, so BIOS security protection design has emerged.
[0005] At the BIOS level, customer use is generally protected in two ways: CPU (Central Processing Unit) protection and motherboard protection. CPU protection means that CPU manufacturers use various viruses to attack each information library of the CPU and test for insecure points during CPU use, thereby fixing various bugs and ensuring the CPU's security before shipment. If the CPU is already in mass production and supplied to server manufacturers, security protection during CPU use can be achieved by upgrading the BIOS agesa code. Motherboard protection can be achieved through a purely software approach or a combination of software and hardware to ensure the security of the entire server during use. In a purely software approach, the BIOS implements a write-protect function to prevent insecure operations from being written to BIOS information by the OS (operating system) and shell, and this can be combined with the design of hardware jumper caps to achieve more secure write protection. The software and hardware combination typically uses a dual BIOS flash design, where the motherboard has two BIOS chips. If one BIOS becomes corrupted, the other BIOS will be randomly and automatically started, preventing problems such as the computer failing to boot or losing functionality.
[0006] When designing a dual BIOS flash protection system, attention should be paid to how the BIOS determines if the computer is currently down, and how to achieve automatic switching between the master and backup BIOS via the BMC when the computer goes down.
[0007] In the related technical proposal, a method for manually switching the BIOS is designed so that the computer can still operate even if the current BIOS is corrupted or attacked. Specifically, if an operations and maintenance worker detects that the current computer is down or inoperable, they can manually send IPMI (Intelligent Platform Management Interface) commands via the BMC to switch the BIOS and restart, enabling a safe boot of the backup BIOS.
[0008] However, conventional methods for switching between master and backup BIOS have the following problems: 1) First, this plan imposes very strict requirements on the working hours of operation and maintenance personnel. When the computers in the customer's computer room are powered on all at once, or when the stability of the computers is verified by repeatedly starting them up, the personnel must monitor them 24 hours a day. If the personnel are unable to quickly detect a computer failure, the computers will remain down for an extended period, significantly impacting the efficiency of the customer's computer room.
[0009] 2) Next, for the customer, if it is necessary to have dedicated operations and maintenance personnel handle the issue, significant expenses will be incurred. Furthermore, since not all operations and maintenance personnel are familiar with BIOS and BMC, the technical capabilities of the operations and maintenance personnel become an issue, which can greatly reduce the flexible controllability and operability of the computer.
[0010] 3) Finally, whether in a customer's computer room or when computers are produced on a production line, if a large number of computers go down and the BIOS of a large number of computers becomes corrupted, they will not be able to operate normally. In this case, manually switching the master backup BIOS is not practical, and thus the design of this function becomes a hindrance and cannot function as a selling point to attract customers. [Overview of the Initiative] [Problems that the invention aims to solve]
[0011] Embodiments of the present invention provide an automatic switching method, automatic switching device, and computer for master and backup BIOS that at least solve the problem of poor stability caused by manually controlling the switching of master and backup BIOS in related technologies. [Means for solving the problem]
[0012] According to one embodiment of the present invention, an automatic master-backup BIOS switching method is provided for a computer, the computer comprising a BMC, a master BIOS, and a backup BIOS, wherein the backup BIOS is configured to replace the master BIOS when the master BIOS fails to start, the BMC is configured to control the operation of the master BIOS and the backup BIOS, the automatic master-backup BIOS switching method comprising: the BMC obtaining startup process information corresponding to the master BIOS in a plurality of startup phases, the plurality of startup phases including a safe startup phase, a load phase, and an operating system entry phase, the BMC determining that the computer has gone down if the startup process information in any one of the startup phases does not change within a corresponding preset time, the preset time corresponding to the safe startup phase being a first preset time, the preset time corresponding to the load phase being a second preset time, and the preset time corresponding to the operating system entry phase being a third preset time, and the BMC controlling the master BIOS and the backup BIOS to perform master-backup BIOS switching, the master-backup BIOS switching being a switch from the master BIOS to the backup BIOS to perform startup.
[0013] In one exemplary embodiment, the BMC acquiring startup process information corresponding to the master BIOS in multiple startup phases includes, when the master BIOS is in the safe startup phase or load phase, the BMC using first power-on self-test information as startup process information, wherein the first power-on self-test information is detection information output by the BMC monitoring the CPU when the master BIOS starts up and is used to indicate whether or not a startup failure has occurred.
[0014] In one exemplary embodiment, if startup process information does not change within a corresponding preset time in any one startup phase, the BMC determines that the computer has gone down, which includes the BMC determining that the computer has gone down if first power-on self-test information does not change within a first preset time.
[0015] In one exemplary embodiment, before the BMC determines that the computer has gone down, the method further includes determining that the first power-on self-test information has not changed within a first preset time if the BMC detects that the central processing unit CPU has been in the same power-on self-test code for two minutes.
[0016] In one exemplary embodiment, the BMC obtaining boot process information corresponding to a master BIOS in multiple boot phases means that, when the master BIOS is in the load phase, the BMC establishes a communication connection with the master BIOS and uses the timestamp of a first command received by the BMC as boot process information, further comprising the first command being a command that the master BIOS sends to the BMC at second predetermined intervals, and the timestamp being the time the BMC received the first command.
[0017] In one exemplary embodiment, if the startup process information does not change within a corresponding preset time during any one startup phase, the BMC determines that the computer is down; this further includes the BMC determining that the computer is down if the timestamp has not been updated within a second preset time.
[0018] In one exemplary embodiment, the BMC obtaining boot process information corresponding to the master BIOS in multiple boot phases further includes, when the master BIOS is in the phase of entering the operating system, the BMC using the operating system boot success identifier as the boot process information, wherein the boot success identifier is an identifier that records that the operating system has been successfully booted.
[0019] In one exemplary embodiment, if the startup process information does not change within a corresponding preset time in any one startup phase, the BMC determines that the computer is down; further, the BMC determines that the computer is down if the startup success identifier is idle within a period in which the computer's startup time has reached a third preset time.
[0020] In one exemplary embodiment, before the BMC obtains boot process information corresponding to the master BIOS in multiple boot phases, the method further includes, if the function file of the master BIOS has been refreshed, synchronizing the refreshed function file with the backup BIOS, wherein the function file is used to generate instructions that implement the functions of the master BIOS.
[0021] In one exemplary embodiment, the BMC controls the master BIOS and backup BIOS to switch between master and backup BIOS, which includes, when the BMC determines that the computer has gone down, the BMC triggers a switch command to control the master BIOS and backup BIOS to switch between master and backup BIOS, the switch command being used to control the master BIOS to stop performing the boot task and the backup BIOS to start performing the boot task.
[0022] In one exemplary embodiment, after the BMC controls the master BIOS and backup BIOS to switch between master and backup BIOS, the method further includes recording power-on self-test information at the time the switching command was triggered, the power-on self-test information being detection information output by the BMC monitoring the CPU and used to indicate whether or not a startup failure occurred.
[0023] In one exemplary embodiment, after the BMC controls the master BIOS and backup BIOS to perform a master-backup BIOS switch, the method further includes the BMC obtaining a master-backup BIOS switch log, the master-backup BIOS switch log being used to record whether the master-backup BIOS switch was successful or not, if the master-backup BIOS switch log indicates a successful master-backup BIOS switch, the BMC controls the backup BIOS to perform a boot task, and if the master-backup BIOS switch log indicates a failed master-backup BIOS switch, the BMC issues an alarm indicating that the computer is down.
[0024] In one exemplary embodiment, when the switchover log of the master backup BIOS indicates that the switchover of the master backup BIOS has been successful, the BMC controls the backup BIOS to execute the startup task. When the switchover log of the master backup BIOS indicates that the switchover of the master backup BIOS has been successful and the backup BIOS is in the safe startup phase or the load phase, the BMC obtains second power-on self-test information, where the second power-on self-test information is detection information output by the BMC monitoring the CPU when the backup BIOS starts up and is information used to indicate whether a startup failure has occurred. When the second power-on self-test information does not change within a first preset time, the BMC issues alarm information indicating that the computer is in a down state.
[0025] In one exemplary embodiment, for the BMC to obtain the second power-on self-test information, the BMC detects the current power-on self-test code of the central processing unit (CPU). Here, when the BMC detects that the CPU has been in the same power-on self-test code for two minutes, the BMC determines that the second power-on self-test information does not change within a first preset time.
[0026] In one exemplary embodiment, when the switchover log of the master backup BIOS indicates that the switchover of the master backup BIOS has been successful, the BMC controls the backup BIOS to execute the startup task. When the switchover log of the master backup BIOS indicates that the switchover of the master backup BIOS has been successful and the backup BIOS is in the load phase, the BMC establishes a communication connection with the backup BIOS and receives a second command, where the second command is a command that the backup BIOS sends to the BMC every second preset time. When the BMC does not receive the second command within the second preset time, the BMC further issues alarm information indicating that the computer is in a down state.
[0027] In one exemplary embodiment, when the switching log of the master backup BIOS indicates that the switching of the master backup BIOS has been successful, the BMC controls the backup BIOS to execute the startup task. When the switching log of the master backup BIOS indicates that the switching of the master backup BIOS has been successful and the master BIOS is in the phase of entering the operating system, the BMC further includes searching for the startup success identifier of the operating system, and when the startup success identifier does not exist within the period when the startup time of the computer reaches a third preset time, the BMC issues warning information indicating that the computer is in a down state.
[0028] In one exemplary embodiment, when the switching log of the master backup BIOS indicates that the switching of the master backup BIOS has been successful and the master BIOS is in the phase of entering the operating system, the BMC searches for the startup success identifier of the operating system by searching whether the startup success identifier exists in the diagnostic log. Here, the BMC polls whether the state of the general-purpose input / output GPIO has changed and is configured to write the startup success identifier to the diagnostic log when the polling indicates that the state of the GPIO has changed. The state of the GPIO is configured to change after the operating system has been successfully started. When the BMC searches and finds that the startup success identifier exists in the diagnostic log, the BMC determines that it has searched for the startup success identifier of the operating system. When the BMC fails to search for the existence of the startup success identifier in the diagnostic log, the BMC determines that it has failed to search for the startup success identifier of the operating system.
[0029] According to another embodiment of the present invention, an automatic master / backup BIOS switching device is provided, the computer comprising a BMC, a master BIOS, and a backup BIOS, wherein the backup BIOS is configured to take over the master BIOS when the master BIOS fails to start, the BMC is configured to control the operation of the master BIOS and the backup BIOS, and the automatic master / backup BIOS switching device is applied to the BMC and comprises a first acquisition module configured to acquire startup process information corresponding to the master BIOS in multiple startup phases, wherein the multiple startup phases include a safe startup phase, a load phase, and a phase to enter the operating system, and the acquisition module is configured to acquire information in any one of the startup phases A decision module configured to determine that the computer has gone down if the dynamic process information does not change within a corresponding preset time, wherein the preset time corresponding to the safe boot phase is a first preset time, the preset time corresponding to the load phase is a second preset time, and the preset time corresponding to the phase entering the operating system is a third preset time; and a first control module configured to control the master BIOS and backup BIOS to perform a master-backup BIOS switch, wherein the master-backup BIOS switch is a switch from the master BIOS to the backup BIOS to perform a boot.
[0030] Another embodiment of the present application provides a non-volatile readable storage medium in which a computer program is stored, wherein the computer program is configured to perform the steps of any one of the above method embodiments when in operation.
[0031] Another embodiment of the present invention further provides a computer comprising a master BIOS, a backup BIOS, memory, a BMC, and a computer program stored in memory and operable on the BMC, wherein the BMC executes the computer program to perform the steps in any one of the above embodiments. [Effects of the Invention]
[0032] According to this invention, the automatic switching method for the master and backup BIOS acquires startup process information in each startup phase of the master BIOS, that is, information that changes with the startup process. If the startup process information does not change within a preset time, it can be determined that the master BIOS startup process has stalled and the computer has crashed. The master BIOS and backup BIOS are then automatically controlled to switch between the master and backup BIOS. This eliminates the need to manually determine that the computer has crashed and control the switching between the master and backup BIOS, overcoming the problem of reduced stability due to inaccuracies and delays in manual judgment. In other words, it solves the problem of poor stability caused by manually controlling the switching of the master and backup BIOS in related technologies. [Brief explanation of the drawing]
[0033] [Figure 1] The hardware structure block diagram of a mobile terminal that implements the automatic switching method for master and backup BIOS according to the embodiment of this invention is shown. [Figure 2] A block diagram of a computer according to an embodiment of the present invention is shown. [Figure 3] A schematic flowchart of the automatic switching method for master and backup BIOS according to the embodiment of this invention is shown. [Figure 4] A schematic flowchart of another master / backup BIOS automatic switching method according to an embodiment of the present invention is shown. [Figure 5] The structural block diagram of the automatic switching device for master and backup BIOS according to an embodiment of the present invention is shown. [Modes for carrying out the invention]
[0034] Hereinafter, embodiments of the present application will be described in detail with reference to the drawings and based on the examples provided. Furthermore, terms such as "First," "Second," etc., used in the specification, claims, and drawings of this application, are used to distinguish similar objects and do not need to be used to describe a specific order or priority.
[0035] For the sake of clarity, some nouns and terms relating to the embodiments of this application are explained below. BMC stands for Baseboard Management Controller, which is the server's baseboard management controller.
[0036] BIOS, or Basic Output and Input, is a set of programs fixed to a single ROM chip on the motherboard of a computer. It stores the most important basic input / output programs of the computer, a self-check program after startup, and a system startup program, and contains information for reading and writing system settings.
[0037] IPMI, or Intelligent Platform Management Interface, can span different operating systems, firmware, and hardware platforms, enabling smart monitoring, control, and automatic feedback of the operational status of a large number of servers, thereby reducing the cost of server systems.
[0038] IO can be divided into two parts: I / O (Input / Output), which refers to I / O devices and I / O interfaces. SEC: Security Phase, the verification phase during the BIOS startup process. PEI: Pre-EFI Initialization, the pre-EFI initialization phase during the BIOS boot process.
[0039] DXE: Driver Execution Environment, the driver execution environment during the BIOS boot process. BDS: Boot Device Selection, the selection of the boot device during the BIOS startup process. TSL: Transient System Load, the first phase executed by the operating system loader (OS Loader) during the BIOS startup process. PSP: Platform Security Processor, the platform's secure boot core.
[0040] The method embodiments provided in the embodiments of the present application can be executed on a server device or a similar computing device. As an example of operation on a server device, Figure 1 shows a hardware structure block diagram of a mobile terminal that performs the master-backup BIOS automatic switching method according to the embodiments of the present application. As shown in Figure 1, the server device may include one or more (only one is shown in Figure 1) processors 102 (the processors 102 may include, but are not limited to, processing devices such as a microprocessor MCU or a programmable logic device FPGA) and a memory 104 configured to store data, wherein the server device may further include a transmission device 106 and an input / output device 108 configured to have communication functions. As will be understood by those skilled in the art, the structure shown in Figure 1 is merely schematic and does not limit the structure of the server device. For example, the server device may further include more or fewer components than those shown in Figure 1, or may have a different configuration than that shown in Figure 1.
[0041] Memory 104 may be configured to store computer programs, such as software programs and modules of application software, such as a computer program corresponding to the automatic switching method of the master backup BIOS in the embodiment of the present invention, and the processor 102 executes various functional applications and data processing by running the computer programs stored in memory 104, i.e., realizing the above method. Memory 104 may include high-speed random memory and may further include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid memory. In some embodiments, memory 104 may further include memory located remotely from the processor 102, and these remote memories may be connected to server equipment via a network. Embodiments of the network include, but are not limited to, the Internet, intranet, local area network, mobile communication network, and combinations thereof.
[0042] The transmission device 106 is configured to transmit and receive data over a network. A preferred embodiment of the network may include a wireless network provided by the server equipment's telecommunications carrier. In one embodiment, the transmission device 106 includes a network adapter (Network Interface Controller, abbreviated as NIC) that can connect to other network equipment via a base station and communicate with the Internet. In one embodiment, the transmission device 106 may also be a radio frequency (RF) module and is configured to communicate with the Internet wirelessly.
[0043] Figure 2 shows a computer block configuration diagram according to an embodiment of the present invention, and as shown in Figure 2, the computer includes a BMC, a master BIOS, and a backup BIOS, wherein the backup BIOS is configured to take over from the master BIOS when the master BIOS fails to start, and the BMC is configured to control the operation of the master BIOS and the backup BIOS, and Figure 3 shows a schematic flow diagram of an automatic switching method for master and backup BIOS according to an embodiment of the present invention, and as shown in Figure 3, the flow includes the following steps.
[0044] Step S202: The BMC acquires boot process information corresponding to the master BIOS in multiple boot phases, and these multiple boot phases include a safe boot phase, a load phase, and a phase to enter the operating system.
[0045] In a preferred application, when the computer starts up, the master BIOS begins executing the startup task, and proceeds through multiple startup phases in sequence. The BMC acquires startup process information corresponding to the master BIOS in each of the startup phases, and the type of startup process information corresponds one-to-one with the startup phase. The startup process information changes as the startup phases progress. If the master BIOS startup process does not stall, i.e., the computer does not go down, some information in the startup process changes, and corresponding startup process information is acquired in a different startup phase. The startup process information changes as the startup phases progress, and it is possible to determine whether the computer has gone down or not based on the startup process information. Here, the safe startup phase is used to verify that a safe startup is guaranteed, the load phase is used to load the startup configuration, and the phase to enter the operating system is used to start the operating system.
[0046] Step S204: If the startup process information does not change within the corresponding preset time in any one of the startup phases, the BMC determines that the computer has gone down, and the preset time corresponding to the safe startup phase is the first preset time, the preset time corresponding to the load phase is the second preset time, and the preset time corresponding to the phase entering the operating system is the third preset time.
[0047] In a preferred application, different startup process information has different update cycles, and if the startup process information does not change within the corresponding preset time (update cycle), it indicates that the startup process has stalled in the current startup phase, and it can be determined that the computer has gone down.
[0048] Step S206: The BMC controls the master BIOS and backup BIOS to switch between master and backup BIOS modes. Switching between master and backup BIOS modes involves switching from the master BIOS to the backup BIOS and starting up.
[0049] In a preferred application, the computer going down indicates that the master BIOS is currently unable to start. In this case, the master BIOS and the backup BIOS are controlled to perform a master / backup BIOS switchover, switching to the backup BIOS to start up and ensuring the computer starts up normally.
[0050] Through the steps described above, the automatic switching method for the master and backup BIOS acquires startup process information during each startup phase of the master BIOS, that is, information that changes with the startup process. If the startup process information does not change within a preset time, it can be determined that the master BIOS startup process has stalled and the computer has crashed. The master BIOS and backup BIOS are then automatically controlled to switch between master and backup BIOS, eliminating the need to manually determine that the computer has crashed and control the switching between master and backup BIOS. This overcomes the problem of inaccurate or delayed manual judgments that lead to reduced stability, thus resolving the issue of poor stability caused by manually controlling the switching of master and backup BIOS in related technologies.
[0051] Here, the entity that executes the above steps may be a "server, terminal," etc., but is not limited to these. In one exemplary embodiment, step S202 may be implemented by step S2022, in which, when the master BIOS is in the safe startup phase or the load phase, the BMC sets the first power-on self-test information as the startup process information, wherein the first power-on self-test information is detection information output by the BMC monitoring the CPU when the master BIOS is started and is used to indicate whether or not a startup failure has occurred.
[0052] In the above embodiment, as shown in Figure 2, during the computer startup process, the CPU outputs several power-on self-test pieces of information moment by moment via the 80 I / O ports, and the BMC extracts this information via the 80 ports and displays it on the BMC web. Therefore, when the master BIOS is in the safe startup phase or the load phase, the first power-on self-test information from these two phases can be used as startup process information to determine whether the computer has crashed or not. In the phase where the operating system enters, the computer can only be started if the operating system has successfully started, and it is not possible to determine whether the computer has crashed or not based on the power-on self-test information.
[0053] In one exemplary embodiment, step S204 may be implemented by step S2042, in which the BMC determines that the computer has gone down if the first power-on self-test information does not change within a first preset time.
[0054] In the above embodiment, if the first power-on self-test information does not change within a first preset time, that is, if the BMC monitors that the CPU is still in the same power-on self-test code within two minutes, the BMC determines that the current CPU is already in a down state, that is, the BMC automatically determines that the computer has gone down.
[0055] In one exemplary embodiment, step S202 may further be implemented by step S2024, wherein, if the master BIOS is in the load phase, the BMC establishes a communication connection with the master BIOS and uses the timestamp of a first command received by the BMC as the startup process information, the first command being a command that the master BIOS sends to the BMC at second preset time intervals, and the timestamp being the time the BMC received the first command.
[0056] In the above embodiment, when the computer starts up and is in the safe startup phase (PSP phase), this phase is located before the BIOS PEI phase, and normal communication cannot occur between the BMC and the master BIOS. At this time, it is possible to confirm whether the PSP phase is in a normal state by monitoring only the BMC. After the computer completes the initialization of the PSP phase, it enters the BIOS load phase (SEC, PEI, DXE, BDS, etc. phases). As shown in Figure 2, in these load phases, it is possible to determine whether the BIOS has started up normally through interaction between the master BIOS and the BMC. The master BIOS sends an IPMI command to the BMC every 30 seconds during the startup process, and after receiving the command, the BMC sends a reply command to the master BIOS. That is, it receives the first command, and the time at which each first command is received is different, meaning the timestamp is different. As the first command is updated, the timestamp recorded is also constantly updated, so in the load phase, the timestamp of the first command can be used as the startup process information.
[0057] In one exemplary embodiment, step S204 may be further implemented by step S2044, in which the BMC determines that the computer is down if the timestamp has not been updated by the second preset time. In the above embodiment, if the timestamp has not been updated to the second preset time, that is, if the BMC has not received a command sent by the master BIOS within 30 seconds, the BMC assumes that the master BIOS is currently unable to start, and therefore the BMC automatically determines that the computer is down.
[0058] In one exemplary embodiment, step S202 may be further implemented by step S2026, in which, if the master BIOS is in the phase of entering the operating system, the BMC sets the boot success identifier of the operating system as the boot process information, wherein the boot success identifier is an identifier that records that the operating system has been successfully booted.
[0059] In the above embodiment, after verifying the computer's boot time multiple times, it was found that, under full specifications, the computer can boot normally and enter the operating system OS within 15 minutes. After the computer boots and enters the operating system OS, the state of the GPIO (General-Purpose Input / Output) changes to monitor that post has already been completed. When the BMC polls that the state of the GPIO has changed, a boot success identifier (sel) for one Boot Up (Boot Up refers to the system boot process; the process of transitioning from a shut-down or restarted state to the operation of the operating system is called booting) is recorded in the IDL log (Inspur Diagnostics Log). Therefore, in the phase of entering the operating system, the boot success identifier (sel) can be used as the boot process information.
[0060] In one exemplary embodiment, step S204 may be further implemented by step S2046, in which the BMC determines that the computer is down if the startup success identifier is available within a period in which the startup time of the computer has reached a third preset time.
[0061] In the above embodiment, if the computer's startup time is free within the period in which the third preset time has been reached, that is, if the BMC finds that there is no Boot Up sel in the IDL log within 15 minutes, the BMC assumes that the master BIOS is currently unable to start, and that is, the BMC automatically determines that the computer has gone down.
[0062] In one exemplary embodiment, prior to step S202, the method further includes step S302, wherein if the function file of the master BIOS has been refreshed, the master BIOS synchronizes the refreshed function file with the backup BIOS, and the function file is used to generate instructions for realizing the functions of the master BIOS.
[0063] In the above embodiment, the function file may be a bin file. After refreshing the master BIOS flash, the master BIOS actively synchronizes the BIOS bin file with the backup BIOS, achieving synchronization of the master and backup BIOS bin files so that the backup BIOS can take over from the master BIOS at any time and perform the corresponding boot tasks.
[0064] In one exemplary embodiment, step S206 may be, if the BMC determines that the computer has gone down, trigger a switching command to control the master BIOS and the backup BIOS to switch between master and backup BIOS, the switching command being used to control the master BIOS to stop performing the boot task and the backup BIOS to start performing the boot task.
[0065] In the above embodiment, if the BMC determines that the computer has gone down, the BMC triggers a switching command (ipmi command) to control the master BIOS and the backup BIOS to switch between master and backup BIOS. The backup BIOS then begins performing boot tasks on behalf of the master BIOS, thus avoiding an impact on the user experience due to a prolonged computer downtime.
[0066] In one exemplary embodiment, after step S206, the method further includes step S402, which records power-on self-test information at the time the switching command was triggered, wherein the power-on self-test information is detection information output by the BMC monitoring the CPU and is used to indicate whether or not a startup failure has occurred.
[0067] In the above embodiment, power-on self-test information is recorded when the above switching command (ipmi command) is triggered, that is, power-on self-test information at the time of switching between master and backup BIOS is recorded and used for research and development and analysis. For example, in research and development, the CPU can determine at which phase of the PSP an error occurred based on the power-on self-test failure information provided by the computer.
[0068] In one exemplary embodiment, after step S206, the method further includes step S502 in which the BMC obtains a master / backup BIOS switching log, and the master / backup BIOS switching log is used to record whether or not the master / backup BIOS switching was successful; step S504 in which, if the master / backup BIOS switching log indicates that the master / backup BIOS switching was successful, the BMC controls the backup BIOS to perform the boot task; and step S506 in which, if the master / backup BIOS switching log indicates that the master / backup BIOS switching failed, the BMC issues an alarm that the computer is down.
[0069] In the above embodiment, when the master and backup BIOS are switched, a master / backup BIOS switching log is generated indicating whether the switch was successful or not. If the switch is successful, the backup BIOS is controlled to execute the startup task on behalf of the master BIOS. If the switch fails, an alarm is issued indicating that the computer is down, and maintenance personnel are reminded to perform maintenance promptly.
[0070] In one exemplary embodiment, step S504 may be implemented by step S5041, in which, if the master / backup BIOS switching log indicates that the master / backup BIOS switching was successful and the backup BIOS is in the safe startup phase or the load phase, the BMC obtains second power-on self-test information, the second power-on self-test information being detection information output by the BMC monitoring the CPU when the backup BIOS is started and used to indicate whether or not a startup failure has occurred; and step S5042, if the second power-on self-test information does not change within a first preset time, the BMC issues alarm information indicating that the computer is down.
[0071] In the above embodiment, after the master backup BIOS has been successfully switched, if the backup BIOS is in the safe boot phase or the load phase, the BMC can similarly determine whether the computer has gone down based on the second power-on self-test information of the current phase. If the BMC monitors that the CPU is still in the same power-on self-test code for two minutes, the BMC determines that the current CPU is already in a stopped state, i.e., the BMC automatically determines that the computer has gone down, and if there is no second backup BIOS to switch to, it issues the alarm information indicating that the computer is down.
[0072] In one exemplary embodiment, step S504 may further include step S5043, in which, if the master-backup BIOS switching log indicates that the master-backup BIOS has successfully switched and the backup BIOS is in the load phase, the BMC establishes a communication connection with the backup BIOS and receives a second command, the second command being a command that the backup BIOS sends to the BMC at second preset intervals, and step S5044, in which, if the second command is not received within the second preset interval, the BMC issues an alarm indicating that the computer is down.
[0073] In the above embodiment, after the master-backup BIOS has been successfully switched, if the backup BIOS is in the load phase, the BMC can similarly determine whether the BIOS has started up successfully through interaction between the backup BIOS and the BMC. The backup BIOS sends an IPMI command to the BMC every 30 seconds during the startup process. After receiving the command, the BMC sends a reply command to the backup BIOS. If the BMC does not receive a command sent by the master BIOS within 30 seconds, the BMC assumes that the master BIOS is currently unable to start up, meaning the BMC automatically determines that the computer has gone down. If there is no second backup BIOS to switch to, the BMC issues the alarm information indicating that the computer is down.
[0074] In one exemplary embodiment, step S504 may further include step S5045, in which the BMC searches for a startup success identifier for the operating system if the master backup BIOS switching log indicates that the master backup BIOS switching was successful and the master BIOS is in the phase of entering the operating system, and step S5046, in which the BMC issues the alarm information indicating that the computer is down if the startup success identifier is not found within a period in which the computer's startup time reaches a third preset time.
[0075] In the above embodiment, after the master backup BIOS has successfully switched over, the backup BIOS is in the phase of entering the operating system, and similarly, if the BMC finds that there is no Boot Up sel in the IDL log within 15 minutes, the BMC assumes that the master BIOS is currently unable to boot, i.e., the BMC automatically determines that the computer is down, and if there is no second backup BIOS to switch to, it issues the above alarm information indicating that the computer is down.
[0076] This embodiment relates to a method for testing the stability of a device. The computer is an AMD platform device. Figure 4 shows a schematic flowchart of another master-backup BIOS automatic switching method according to an embodiment of the present invention. As shown in Figure 4, after refreshing the master BIOS flash, the master BIOS actively synchronizes the BIOS bin file with the backup BIOS, achieving synchronization of the master-backup BIOS bin files in step S1. When the device is booted up and in the PSP phase, this phase is located before the BIOS PEI phase, and normal communication is not possible between the BMC and the BIOS. At this time, it can be confirmed whether the PSP phase is in a normal state by monitoring only the BMC. During the device boot process, the CPU outputs several power-on self-test information moment by moment via the 80 I / O ports, and the BMC extracts this information via the 80 ports.The BMC monitors the CPU's status on the web, and if it remains in the same power-on self-test code for two minutes, it determines that the current CPU is already in a downtime state and automatically triggers an IPMI command to switch the master / backup BIOS. The power-on self-test information at the time of the master / backup BIOS switch is recorded and used for research and development and analysis. In research and development, step S2 allows the BMC to determine which phase of the PSP the CPU error occurred in, based on the power-on self-test failure information provided by AMD. After the device completes the initialization of the PSP phase, the BIOS phases such as SEC, PEI, DXE, and BDS are loaded, and in these phases, the BMC interacts with the BIOS to determine whether the BIOS has started up successfully. Step S3 allows the BIOS to send an IPMI command to the BMC every 30 seconds during the boot process, and after the BMC receives the command, it sends a reply command to the BIOS. If the BMC does not receive a command sent by the BIOS within 30 seconds, the BMC assumes that the BIOS is currently unable to boot and triggers an IPMI command to switch between the master and backup BIOS. The power-on self-test information at the time of the master / backup BIOS switch is recorded and used for research and development and analysis. After verifying the boot time of AMD platform devices multiple times, in the case of full specifications, the device can boot successfully and enter the OS within 15 minutes. After the device boots and enters the OS, the GPIO state changes to monitor that post has already been completed, and when the BMC polls that the state of said GPIO has changed, one Boot Step S4 includes recording the Up sel in the IDL log, and if the BMC finds no Boot Up sel in the IDL log within 15 minutes, the BMC also assumes the BIOS is currently unable to boot, triggers an ipmi command to switch the master / backup BIOS, and records power-on self-test information at the time of the master / backup BIOS switch for use in research and development and analysis.
[0077] As will be apparent to those skilled in the art from the above description of the embodiments, the methods according to the above embodiments can be implemented by adding a general-purpose hardware platform essential to the software, and of course, they can also be implemented by hardware, but in many cases the former is a more preferred embodiment. With this understanding in mind, the essential or related contributions of the present invention may be expressed in the form of a software product, which is stored in a non-volatile readable storage medium (e.g., ROM / RAM, magnetic disk, optical disk) and contains several instructions for causing a terminal device (which may be a mobile phone, computer, server, or network device, etc.) to perform the methods described in each embodiment of the present invention.
[0078] This embodiment further provides an automatic master / backup BIOS switching device, as shown in Figure 2, in which the computer includes a BMC, a master BIOS, and a backup BIOS, wherein the backup BIOS is configured to replace the master BIOS when the master BIOS fails to start, the BMC is configured to control the operation of the master BIOS and the backup BIOS, and the automatic master / backup BIOS switching device is applied to the BMC, and the device is configured to realize the above embodiment and preferred embodiments, which will not be described further here. The term “module” as used below may refer to a combination of software and / or hardware that realizes a pre-configured function. While it is preferable that the devices described in the following embodiments be realized by software, realization by hardware, or a combination of software and hardware, is possible and conceivable.
[0079] Figure 5 shows a structural block diagram of an automatic master / backup BIOS switching device according to an embodiment of the present invention. As shown in Figure 5, the automatic master / backup BIOS switching device includes a first acquisition module 22, a determination module 24, and a first control module 26.
[0080] The first acquisition module 22 is configured to acquire startup process information corresponding to the master BIOS in the above-mentioned multiple startup phases, the above-mentioned multiple startup phases include a safe startup phase, a load phase, and a phase for entering the operating system.
[0081] In a preferred application, when the computer starts up, the master BIOS begins executing the startup task, and proceeds through multiple startup phases in sequence. The BMC acquires startup process information corresponding to the master BIOS in each of the startup phases, and the type of startup process information corresponds one-to-one with the startup phase. The startup process information changes as the startup phases progress. If the master BIOS startup process does not stall, i.e., the computer does not go down, some information in the startup process changes, and corresponding startup process information is acquired in a different startup phase. The startup process information changes as the startup phases progress, and it is possible to determine whether the computer has gone down or not based on the startup process information. Here, the safe startup phase is used to verify that a safe startup is guaranteed, the load phase is used to load the startup configuration, and the phase to enter the operating system is used to start the operating system.
[0082] The decision module 24 is configured to determine that the computer has gone down if the startup process information does not change within a corresponding preset time during any one of the startup phases, the preset time corresponding to the safe startup phase being the first preset time, the preset time corresponding to the load phase being the second preset time, and the preset time corresponding to the phase entering the operating system being the third preset time.
[0083] In a preferred application, different startup process information has different update cycles, and if the startup process information does not change within the corresponding preset time (update cycle), it indicates that the startup process has stalled in the current startup phase, and it can be determined that the computer has gone down.
[0084] The first control module 26 is configured to control the BMC so that the master BIOS and the backup BIOS switch between the master and backup BIOS, and the master / backup BIOS switching is performed by switching from the master BIOS to the backup BIOS to start up.
[0085] In a preferred application, the computer going down indicates that the master BIOS is currently unable to start. In this case, the master BIOS and the backup BIOS are controlled to perform a master / backup BIOS switchover, switching to the backup BIOS to start up and ensuring the computer starts up normally.
[0086] The above module enables the automatic switching device for the master and backup BIOS to acquire startup process information for each startup phase of the master BIOS, that is, information that changes with the startup process. If the startup process information does not change within a preset time, it can determine that the master BIOS startup process has stalled and the computer has crashed. The master BIOS and backup BIOS then automatically control the switching between master and backup BIOS, eliminating the need to manually determine if the computer has crashed and control the switching between master and backup BIOS. This overcomes the problem of inaccurate or delayed manual judgments that lead to reduced stability, thus resolving the issue of poor stability caused by manually controlling the switching between master and backup BIOS in related technologies.
[0087] In one exemplary embodiment, the first acquisition module includes a first acquisition submodule, the first acquisition submodule is configured such that when the master BIOS is in the safe startup phase or the load phase, the BMC sets the first power-on self-test information to startup process information, the first power-on self-test information is detection information output by the BMC monitoring the CPU when the master BIOS is started and is used to indicate whether or not a startup failure has occurred.
[0088] In the above embodiment, as shown in Figure 2, during the computer startup process, the CPU outputs several power-on self-test pieces of information moment by moment via the 80 I / O ports, and the BMC extracts this information via the 80 ports and displays it on the BMC web. Therefore, when the master BIOS is in the safe startup phase or the load phase, the first power-on self-test information from these two phases can be used as startup process information to determine whether the computer has crashed or not. In the phase where the operating system enters, the computer can only be started if the operating system has successfully started, and it is not possible to determine whether the computer has crashed or not based on the power-on self-test information.
[0089] In one exemplary embodiment, the decision module includes a first decision submodule, the first decision submodule is configured such that the BMC determines the computer is down if the first power-on self-test information does not change within a first preset time.
[0090] In the above embodiment, if the first power-on self-test information does not change within a first preset time, that is, if the BMC monitors that the CPU is still in the same power-on self-test code within two minutes, the BMC determines that the current CPU is already in a down state, that is, the BMC automatically determines that the computer has gone down.
[0091] In one exemplary embodiment, the first acquisition module further includes a second acquisition submodule, the second acquisition submodule configured such that, when the master BIOS is in the load phase, the BMC establishes a communication connection with the master BIOS and sets the timestamp of a first command received by the BMC as the startup process information, the first command being a command that the master BIOS sends to the BMC at second preset intervals, and the timestamp being the time the BMC received the first command.
[0092] In the above embodiment, when the computer starts up and is in the safe startup phase (PSP phase), this phase is located before the BIOS PEI phase, and normal communication cannot occur between the BMC and the master BIOS. At this time, it is possible to confirm whether the PSP phase is in a normal state by monitoring only the BMC. After the computer completes the initialization of the PSP phase, it enters the BIOS load phase (SEC, PEI, DXE, BDS, etc. phases). As shown in Figure 2, in these load phases, it is possible to determine whether the BIOS has started up normally through interaction between the master BIOS and the BMC. The master BIOS sends an IPMI command to the BMC every 30 seconds during the startup process, and after receiving the command, the BMC sends a reply command to the master BIOS. That is, it receives the first command, and the time at which each first command is received is different, meaning the timestamp is different. As the first command is updated, the timestamp recorded is also constantly updated, so in the load phase, the timestamp of the first command can be used as the startup process information.
[0093] In one exemplary embodiment, the decision module further includes a second decision submodule, the second decision submodule configured such that the BMC determines the computer is down if the timestamp has not been updated within a second predetermined time.
[0094] In the above embodiment, if the timestamp has not been updated to the second preset time, that is, if the BMC has not received a command sent by the master BIOS within 30 seconds, the BMC assumes that the master BIOS is currently unable to start, and therefore the BMC automatically determines that the computer is down.
[0095] In one exemplary embodiment, the first acquisition module further includes a third acquisition submodule, the third acquisition submodule configured such that, when the master BIOS is in the phase of entering the operating system, the BMC uses the startup success identifier of the operating system as the startup process information, the startup success identifier is an identifier that records that the operating system has been successfully started.
[0096] In the above embodiment, after verifying the computer's boot time multiple times, it was found that in the full-spec case, the computer can boot up successfully and enter the operating system OS within 15 minutes. After the computer boots up and enters the operating system OS, the state of the GPIO changes to monitor that post has already been completed. When the BMC polls for this change in GPIO state, it records a Boot Up success identifier (sel) in the IDL log. Therefore, in the phase of entering the operating system, the boot success identifier (sel) can be used as the boot process information.
[0097] In one exemplary embodiment, the decision module further includes a third decision submodule, the third decision submodule configured such that the BMC determines the computer is down if the startup success identifier is available within a period in which the computer's startup time has reached a third predetermined time.
[0098] In the above embodiment, if the computer's startup time is idle within the period in which the third preset time has been reached, that is, if the BMC finds that there is no Boot Up sel in the IDL log within 15 minutes, the BMC assumes that the master BIOS is currently unable to start, and that is, the BMC automatically determines that the computer has gone down.
[0099] In one exemplary embodiment, when the computer is started, the device further includes a synchronization module, which is configured such that if the function files of the master BIOS are refreshed before the BMC acquires startup process information corresponding to the master BIOS in any of the startup phases, the master BIOS synchronizes the refreshed function files with the backup BIOS, and the function files are used to generate commands that implement the functions of the master BIOS.
[0100] In the above embodiment, the function file may be a bin file. After refreshing the master BIOS flash, the master BIOS actively synchronizes the BIOS bin file with the backup BIOS, achieving synchronization of the master and backup BIOS bin files, so that the backup BIOS can take over from the master BIOS at any time and perform the corresponding boot tasks.
[0101] In one exemplary embodiment, the first control module includes a control submodule, which is configured such that when the BMC determines that the computer is down, the BMC triggers a switching command to control the master BIOS and the backup BIOS to switch between master and backup BIOS, the switching command being used to control the master BIOS to stop performing the boot task and the backup BIOS to start performing the boot task.
[0102] In the above embodiment, if the BMC determines that the computer has gone down, the BMC triggers a switching command (ipmi command) to control the master BIOS and the backup BIOS to switch between master and backup BIOS. The backup BIOS then starts performing boot tasks on behalf of the master BIOS, thus avoiding an impact on the user experience due to a prolonged computer downtime.
[0103] In one exemplary embodiment, the device further includes a recording module configured to record power-on self-test information when the BMC triggers the switching command after controlling the master BIOS and the backup BIOS to switch between master and backup BIOS, the power-on self-test information being detection information output by the BMC monitoring the CPU and used to indicate whether or not a startup failure has occurred.
[0104] In the above embodiment, power-on self-test information is recorded when the above switching command (ipmi command) is triggered, that is, power-on self-test information at the time of switching between master and backup BIOS is recorded and used for research and development and analysis. For example, in research and development, the CPU can determine at which phase of the PSP mirror occurred based on the power-on self-test failure information provided by the computer.
[0105] In one exemplary embodiment, the device further includes a second acquisition module, a second control module, and an alarm module, wherein the second acquisition module is configured to acquire a master-backup BIOS switching log after the BMC has controlled the master BIOS and the backup BIOS to perform a master-backup BIOS switching, the master-backup BIOS switching log is used to record whether the master-backup BIOS switching was successful or not, the second control module is configured to control the BMC to perform the backup BIOS to execute the startup task if the master-backup BIOS switching log indicates a successful master-backup BIOS switching, and the alarm module is configured to issue an alarm message that the computer is down if the master-backup BIOS switching log indicates a failed master-backup BIOS switching.
[0106] In the above embodiment, when the master and backup BIOS are switched, a master / backup BIOS switching log is generated indicating whether the switch was successful or not. If the switch is successful, the backup BIOS is controlled to execute the startup task on behalf of the master BIOS. If the switch fails, an alarm is issued indicating that the computer is down, and maintenance personnel are reminded to perform maintenance promptly.
[0107] In one exemplary embodiment, the second control module includes a fourth acquisition submodule and a first alarm submodule, wherein the fourth acquisition submodule is configured to acquire second power-on self-test information if the master-backup BIOS switching log indicates that the master-backup BIOS has successfully switched and the backup BIOS is in the safe boot phase or the load phase, the second power-on self-test information being detection information output by the BMC monitoring the CPU during the startup of the backup BIOS and used to indicate whether or not a startup failure has occurred, and the first alarm submodule is configured to issue alarm information indicating that the computer is down if the second power-on self-test information does not change within a first preset time.
[0108] In the above embodiment, after the master backup BIOS has been successfully switched, if the backup BIOS is in the safe boot phase or the load phase, the BMC can similarly determine whether the computer has gone down based on the second power-on self-test information of the current phase. If the BMC monitors that the CPU is still in the same power-on self-test code for two minutes, the BMC determines that the current CPU is already in a stopped state, i.e., the BMC automatically determines that the computer has gone down, and if there is no second backup BIOS to switch to, it issues the alarm information indicating that the computer is down.
[0109] In one exemplary embodiment, the second control module includes a receive submodule and a second alarm submodule, wherein the receive submodule is configured to establish a communication connection with the backup BIOS and receive a second command when the master backup BIOS switching log indicates that the master backup BIOS has successfully switched and the backup BIOS is in the load phase, the second command being a command that the backup BIOS sends to the BMC at second preset intervals, and the second control module includes a fourth acquisition submodule and a first alarm submodule, wherein the second alarm submodule is configured to issue an alarm indicating that the computer is down if it has not received the second command within the second preset interval.
[0110] In the above embodiment, after the master-backup BIOS has been successfully switched, if the backup BIOS is in the load phase, the BMC can similarly determine whether the BIOS has started up successfully through interaction between the backup BIOS and the BMC. The backup BIOS sends an IPMI command to the BMC every 30 seconds during the startup process. After receiving the command, the BMC sends a reply command to the backup BIOS. If the BMC does not receive a command sent by the master BIOS within 30 seconds, the BMC assumes that the master BIOS is currently unable to start up, that is, the BMC automatically determines that the computer has gone down. If there is no second backup BIOS to switch to, the BMC issues the alarm information indicating that the computer is down.
[0111] In one exemplary embodiment, the second control module includes a search submodule and a third alarm submodule, wherein the search submodule is configured to search for a startup success identifier for the operating system when the master backup BIOS switching log indicates that the master backup BIOS has switched successfully and the master BIOS is in the phase of entering the operating system, and the third alarm submodule is configured to issue an alarm indicating that the computer is down if the startup success identifier is not found within a period of time when the computer's startup time reaches a third preset time.
[0112] In the above embodiment, after the master backup BIOS has successfully switched over, the backup BIOS is in the phase of entering the operating system. Similarly, if the BMC finds that there is no Boot Up sel in the IDL log within 15 minutes, the BMC assumes that the master BIOS is currently unable to boot, i.e., the BMC automatically determines that the computer is down, and if there is no second backup BIOS to switch to, it issues the above alarm information indicating that the computer is down.
[0113] Each of the above modules may be implemented by software or hardware, and in the latter case, they may be implemented in a manner in which all of the above modules are located on the same processor, or in a manner in which each of the above modules is located on different processors in any combination, but are not limited to these.
[0114] Embodiments of the present invention further provide a non-volatile readable storage medium in which a computer program configured to perform the steps of any one of the above-described method embodiments during operation is stored.
[0115] In one exemplary embodiment, the non-volatile readable storage medium may include, but is not limited to, various media capable of storing computer programs, such as USB flash disks, read-only memory (ROM), random access memory (RAM), removable hard disks, magnetic disks, or optical disks.
[0116] Embodiments of the present invention further provide a computer comprising a master BIOS, a backup BIOS, memory, a BMC, and a computer program stored in the memory and operable on the BMC, wherein the BMC performs the steps of any one of the above embodiment of the method by executing the computer program.
[0117] In one exemplary embodiment, the computer may further include transmission equipment and input / output equipment, wherein the transmission equipment is connected to the processor and the input / output equipment is connected to the processor.
[0118] Preferred examples in this embodiment can be found by referring to the examples described in the above embodiment and exemplary embodiment, and this embodiment will not be described further here.
[0119] Clearly, as will be apparent to those skilled in the art, each module or step of the present invention may be implemented by a general-purpose computer, centralized on a single computer, distributed across a network of multiple computers, implemented by program code executable by a computer, thereby being stored in a memory device and executed by the computer, and in some cases, steps shown or described in an order different from the order herein may be executed, or they may be implemented by creating each of them as an integrated circuit module, or by creating multiple modules or steps among them as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0120] The foregoing are merely preferred embodiments of the present application and are not intended to limit it, and to those skilled in the art, the present application can be modified and changed in various ways. Any modifications, equivalent substitutions, and improvements made insofar as they do not deviate from the spirit of the present application shall all be within the scope of protection of the present application.
Claims
1. An automatic switching method for master and backup BIOS applied to a computer, wherein the computer includes a baseboard management controller (BMC), a master basic input / output system (master BIOS), and a backup BIOS, wherein the backup BIOS is configured to take over the master BIOS when the master BIOS fails to start, and the BMC is configured to control the operation of the master BIOS and the backup BIOS. The automatic switching method for the master / backup BIOS is as follows: The BMC acquires startup process information corresponding to the master BIOS in multiple startup phases, wherein the multiple startup phases include a safe startup phase, a load phase, and a phase for entering the operating system. If the startup process information does not change within a corresponding preset time in any one of the startup phases, the BMC determines that the computer has gone down, wherein the preset time corresponding to the safe startup phase is the first preset time, the preset time corresponding to the load phase is the second preset time, and the preset time corresponding to the phase entering the operating system is the third preset time. The BMC, when it determines that the computer has gone down, controls the master BIOS and the backup BIOS to switch between master and backup BIOS, and the switching between master and backup BIOS is performed by switching from the master BIOS to the backup BIOS and starting up. The BMC acquires startup process information corresponding to the master BIOS in multiple startup phases. Automatic switching method for master and backup BIOS, characterized in that, when the master BIOS is in the load phase, the BMC establishes a communication connection with the master BIOS and uses the timestamp of a first command received by the BMC as the startup process information, wherein the first command is a command that the master BIOS transmits to the BMC at second preset time intervals, and the timestamp is the time the BMC received the first command.
2. The BMC acquires startup process information corresponding to the master BIOS in multiple startup phases. The method according to claim 1, wherein, when the master BIOS is in the safe startup phase or the load phase, the BMC sets the first power-on self-test information as the startup process information, wherein the first power-on self-test information is detection information output by the BMC monitoring the central processing unit (CPU) when the master BIOS is started, and is used to indicate whether or not a startup failure has occurred.
3. If the startup process information does not change within a corresponding preset time in any one of the startup phases, the BMC will determine that the computer has gone down. The method according to 2, wherein if the first power-on self-test information does not change within a first preset time, the BMC determines that the computer has gone down.
4. Before the BMC determines that the computer has gone down, the method The method according to claim 3, further comprising the BMC determining that the first power-on self-test information does not change within a first preset time if the BMC detects that the central processing unit CPU is in the same power-on self-test code within two minutes.
5. If the startup process information does not change within a corresponding preset time in any one of the startup phases, the BMC will determine that the computer has gone down. The method according to claim 1, further comprising the BMC determining that the computer is down if the timestamp has not been updated at the second predetermined time.
6. The BMC acquires startup process information corresponding to the master BIOS in multiple startup phases. The method according to claim 1, further comprising the following: when the master BIOS is in the phase of entering the operating system, the BMC uses the startup success identifier of the operating system as the startup process information, wherein the startup success identifier is an identifier that records that the operating system has been successfully started.
7. If the startup process information does not change within a corresponding preset time in any one of the startup phases, the BMC will determine that the computer has gone down. The method according to 6, further comprising the BMC determining that the computer is down if the startup success identifier is available within the period in which the startup time of the computer reaches the third predetermined time.
8. Before the BMC acquires the startup process information corresponding to the master BIOS in a plurality of startup phases, the method The method according to claim 1, further comprising the following: when the function file of the master BIOS is refreshed, the master BIOS synchronizes the refreshed function file with the backup BIOS, wherein the function file is used to generate commands that implement the functions of the master BIOS.
9. The BMC controls the master BIOS and the backup BIOS to switch between master and backup BIOS. The method according to claim 1, wherein, if the BMC determines that the computer has gone down, the BMC triggers a switching command to control the master BIOS and the backup BIOS to switch between master and backup BIOS, the switching command being used to control the master BIOS to stop executing the startup task and the backup BIOS to start executing the startup task.
10. After the BMC controls the master BIOS and the backup BIOS to switch between master and backup BIOS, the method then: The method according to claim 9, further comprising recording power-on self-test information at the time the switching command is triggered, wherein the power-on self-test information is detection information output by the BMC monitoring the central processing unit CPU and is used to indicate whether or not a startup failure has occurred.
11. After the BMC controls the master BIOS and the backup BIOS to switch between master and backup BIOS, the method then: The BMC acquires a switchover log of the master / backup BIOS, and the switchover log of the master / backup BIOS is used to record whether or not the switchover of the master / backup BIOS was successful. If the switchover log of the master / backup BIOS indicates that the switchover of the master / backup BIOS was successful, the BMC controls the backup BIOS to execute the startup task. The method according to 9, further comprising the BMC issuing an alarm that the computer is down if the switching log of the master backup BIOS indicates that the switching of the master backup BIOS failed.
12. If the switchover log of the master / backup BIOS indicates that the switchover of the master / backup BIOS was successful, the BMC will control the backup BIOS to execute the startup task. If the switching log of the master / backup BIOS indicates that the switching of the master / backup BIOS was successful and the backup BIOS is in the safe startup phase or the load phase, the BMC acquires second power-on self-test information, the second power-on self-test information being detection information output by the BMC monitoring the central processing unit CPU when the backup BIOS is started and used to indicate whether or not a startup failure has occurred. The method according to 11, wherein if the second power-on self-test information does not change within a first preset time, the BMC issues the alarm information indicating that the computer is down.
13. The BMC can acquire second power-on self-test information. The method according to 12, wherein the BMC detects the current power-on self-test code of the central processing unit CPU, and the BMC determines that the second power-on self-test information does not change within the first preset time if it detects that the central processing unit CPU has been in the same power-on self-test code for two minutes.
14. If the switchover log of the master / backup BIOS indicates that the switchover of the master / backup BIOS was successful, the BMC will control the backup BIOS to execute the startup task. When the switching log of the master / backup BIOS indicates that the switching of the master / backup BIOS was successful and the backup BIOS is in the load phase, the BMC establishes a communication connection with the backup BIOS and receives a second command, the second command being a command that the backup BIOS transmits to the BMC at second predetermined intervals, The method according to 11, further comprising the BMC issuing the alarm information that the computer is down if the second command is not received within the second preset time.
15. If the switchover log of the master / backup BIOS indicates that the switchover of the master / backup BIOS was successful, the BMC will control the backup BIOS to execute the startup task. If the switchover log of the master / backup BIOS indicates that the switchover of the master / backup BIOS was successful and the master BIOS is in the phase of entering the operating system, the BMC searches for the operating system's boot success identifier. The method according to 11, further comprising the BMC issuing the alarm information indicating that the computer is down if the startup success identifier does not exist within a period in which the startup time of the computer reaches a third predetermined time.
16. If the switchover log of the master / backup BIOS indicates that the switchover of the master / backup BIOS was successful and the master BIOS is in the phase of entering the operating system, the BMC will search for the operating system's boot success identifier. The BMC searches the diagnostic log for the existence of the boot success identifier, wherein the BMC is configured to poll whether the state of the general-purpose input / output (GPIO) has changed and to write the boot success identifier to the diagnostic log when it is polled to find that the state of the GPIO has changed, and the state of the GPIO is configured to change after the operating system has successfully booted. When the BMC searches the diagnostic log for the existence of the boot success identifier, it determines that it has searched for the boot success identifier of the operating system. The method according to 15, characterized in that if the BMC is unable to find the existence of the boot success identifier from the diagnostic log, the BMC determines that it was unable to find the boot success identifier for the operating system.
17. An automatic master / backup BIOS switching device, wherein the computer includes a BMC, a master BIOS, and a backup BIOS, the backup BIOS being configured to take over the master BIOS when the master BIOS fails to start, the BMC being configured to control the operation of the master BIOS and the backup BIOS, and the automatic master / backup BIOS switching device being applied to the BMC. A first acquisition module configured to acquire startup process information corresponding to the master BIOS in multiple startup phases, wherein the multiple startup phases include a safe startup phase, a load phase, and a phase to enter the operating system, and the first acquisition module is configured to acquire information in multiple startup phases. A decision module configured to determine that the computer has gone down if the startup process information does not change within a corresponding preset time in any one of the startup phases, wherein the preset time corresponding to the safe startup phase is a first preset time, the preset time corresponding to the load phase is a second preset time, and the preset time corresponding to the phase entering the operating system is a third preset time, A first control module configured to control the master BIOS and the backup BIOS to switch between master and backup BIOS when it is determined that the computer has gone down, the first control module comprising: a first control module which controls the switching between master and backup BIOS to switch from the master BIOS to the backup BIOS and start up; The first acquisition module further includes a second acquisition submodule, the second acquisition submodule is configured such that when the master BIOS is in the load phase, the BMC establishes a communication connection with the master BIOS and sets the timestamp of a first command received by the BMC as the startup process information, the first command is a command that the master BIOS transmits to the BMC at second preset time intervals, and the timestamp is the time the BMC received the first command, characterized in that an automatic switching device for a master / backup BIOS.
18. A non-volatile readable storage medium characterized in that it stores a computer program that, when executed by a processor, performs the steps of the method according to any one of claims 1 to 16.
19. A computer comprising a master BIOS, a backup BIOS, memory, a BMC, and a computer program stored in the memory and operable on the BMC, The BMC is a computer characterized in that, when executing the computer program, it implements the steps of the method according to any one of claims 1 to 16.
Citation Information
Patent Citations
Computer, system management aiding device and management method
JP2001325124A
Information processing device, automatic recovery method from startup fault, and automatic recovery program from startup fault
JP2014170306A