A method and apparatus for handling a power failure during a BIOS update process
By combining hardware design with CPLD and BMC, the system records the progress of power outages during BIOS updates and continues updating after power is restored. This solves the problem of system failure to boot due to power outages during BIOS updates, and achieves system reliability and fault log recording.
Patent Information
- Application Number
- CN202210376769.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-11
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2042-04-11
AI Technical Summary
During a BIOS update, a sudden power failure can cause the update to fail, potentially resulting in corrupted BIOS firmware or an inability to boot the computer normally. There is a lack of effective solutions for this problem.
Through hardware design and the collaboration between CPLD and BMC, the update progress before power failure is recorded, and the update process continues after power is restored or the system boots with the old BIOS, recording and reporting failure logs.
Even if a power outage occurs during the BIOS update process, the BIOS update can still be attempted, ensuring that the system can boot normally and recording failure logs, thus solving the problem of the machine being completely unable to boot due to a power outage.
Smart Images

Figure CN114911641B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the technical field of computers and discloses a processing method and device for power failure in a BIOS updating process. BACKGROUND
[0002] BIOS is widely used in the computer industry and is an indispensable part of a computer. In the production and debugging process of a computer motherboard, the BIOS program often needs to be updated to continuously debug the motherboard, so that the motherboard gradually becomes optimal. It is very common to update BIOS using BMC on a server platform, but there is a lack of measures for sudden conditions. Common errors are as follows:
[0003] Network reasons: Since the BIOS is updated via the network, the network environment is relied on to transmit data and instructions. If a network failure occurs, the BMC will not receive the relevant data and instructions, and the update will fail.
[0004] Power failure: In the process of updating the BIOS, the motherboard is powered off due to some reason (human error or power failure), resulting in a failed update. There are two results of this failure: one case is that the motherboard is powered off during the BIOS firmware uploading stage, and since the old data in the BIOS ROM has not been rewritten at this time, the motherboard will still be connected to the PCH SPI controller after power-on again (because the default switch is to prioritize the PCH, and only after the BMC transmits information to the switch will the control right be temporarily given to the BMC), so the motherboard will boot with the old BIOS firmware. The other case is that the motherboard is powered off during the BIOS updating process. At this time, the old data in the BIOS ROM has been destroyed, but the new data has not been completely written, causing the BIOS firmware to be damaged, and the motherboard cannot boot normally after power-on again due to abnormal BIOS data.
[0005] Therefore, there is an urgent need for a processing method and device for power failure in a BIOS updating process, which, through the cooperation of hardware design, CPLD and BMC, will continue to attempt to update the BIOS after power restoration even if a power failure occurs during the BMC BIOS updating process, and if the BIOS cannot be updated, the old BIOS will be used to complete the boot, and the update failure log will be recorded and reported, thereby solving the above problems. SUMMARY
[0006] The application aims to provide a processing method and device for power failure in a BIOS updating process to solve the problems proposed in the background.
[0007] To achieve the above-mentioned purpose, the application provides the following technical solutions:
[0008] In one aspect, the embodiments of the present application provide a method for handling power failure in BIOS updating process, comprising:
[0009] sending an updating BIOS command by the client and uploading BIOS firmware information through network;
[0010] receiving the updating BIOS command and executing updating process;
[0011] recording updating progress before power failure when power failure occurs in the updating process;
[0012] restarting the device after power recovery, continuing the updating process or starting with old BIOS firmware and reporting updating failure log to the client.
[0013] In some embodiments, the receiving the updating BIOS command and executing updating process comprises:
[0014] acquiring the updating BIOS command and pulling up GPIO1 to acquire read-only memory control;
[0015] sending an updating BIOS start signal to CPLD;
[0016] downloading the BIOS firmware information and storing the downloaded BIOS firmware information in storage medium.
[0017] In some embodiments, the sending an updating BIOS start signal to CPLD comprises:
[0018] pulling up GPIO2 to make CPLD enter updating state;
[0019] after CPLD enters updating state, lighting red light emitting diode, shielding PCH on start pin and restart pin, and pulling up GPIO3;
[0020] saving the state to storage area of CPLD.
[0021] In some embodiments, after storing the downloaded BIOS firmware information in storage medium, comprising:
[0022] erasing all data in read-only memory;
[0023] acquiring the BIOS firmware information existing in storage medium and writing into read-only memory;
[0024] deleting BIOS firmware file saved in storage medium;
[0025] sending an updating BIOS end signal to CPLD;
[0026] updating is completed, and signal state is restored.
[0027] In some embodiments, after the sending the update BIOS end signal to the CPLD, the method comprises:
[0028] The CPLD exits the update state by pulling up the GPIO4, and after the CPLD obtains the update BIOS end signal, the red diode is turned off, the power-on pin and the restart pin on the PCH are unlocked, and the GPIO3 is pulled down;
[0029] The update state is removed from the CPLD storage area.
[0030] In some embodiments, after the update is completed, the signal state is restored, and the method comprises:
[0031] The read-only memory control is returned to the PCH by pulling down the GPIO1;
[0032] The GPIO2 and the GPIO4 are pulled down.
[0033] In some embodiments, after the power supply is restored, the device is restarted, the update process is continued, or the old BIOS firmware is started, and the update failure log is reported to the client, and the method comprises:
[0034] It is detected whether the GPIO3 is in a high state;
[0035] If not, the device is directly started;
[0036] If yes, it is detected whether there is BIOS firmware information in the storage medium.
[0037] In some embodiments, the detection of whether there is BIOS firmware information in the storage medium comprises:
[0038] It is detected whether there is BIOS firmware information in the storage medium;
[0039] If yes, the read-only memory control is obtained by pulling up the GPIO1 again, the update BIOS start signal is sent to the CPLD;
[0040] If not, the old BIOS firmware is started, and the update BIOS failure log is recorded and reported to the client.
[0041] In another aspect, the embodiments of the present application also provide a processing device for power failure in a BIOS update process, comprising:
[0042] A receiving unit is configured to receive the update BIOS command and the BIOS firmware information;
[0043] An execution unit is configured to execute an update process.
[0044] An information recording unit is configured to record the update progress before power failure when the power supply fails during the BIOS updating process.
[0045] An information reporting unit is configured to restart the device after the power supply is restored, continue the updating process or start up with the old BIOS firmware, and report the updating failure log to the client.
[0046] In another aspect, the embodiment of the application further provides a processing device for power failure during a BIOS updating process, comprising:
[0047] A sending unit is configured to send an updating BIOS command and upload BIOS firmware information.
[0048] A receiving unit is configured to receive an updating BIOS failure log.
[0049] A display unit is configured to display the updating BIOS failure log.
[0050] The embodiment of the application further provides a storage medium having a computer program stored thereon, and when the computer program runs on a computer, the computer is caused to execute the processing method for power failure during a BIOS updating process according to any one of claims 1 to 9.
[0051] In summary, compared with the prior art, the application has the following beneficial effects: the processing method and device for power failure during a BIOS updating process, comprising: sending an updating BIOS command on a client and uploading BIOS firmware information through a network; receiving the updating BIOS command and executing an updating process; recording the update progress before power failure when the power supply fails during the updating process; restarting the device after the power supply is restored, continuing the updating process or starting up with the old BIOS firmware, and reporting the updating failure log to the client. Through the cooperation of hardware design, CPLD and BMC, even if power failure occurs during the BMC updating BIOS process, the BMC will continue to attempt to update the BIOS after the power supply is restored. If the BIOS cannot be updated, the BMC will complete startup with the old BIOS, then record the updating failure log and report it. The technical problem that the machine cannot start up completely due to power failure during the updating BIOS firmware is solved. BRIEF DESCRIPTION OF DRAWINGS
[0052] Figure 1 is a flowchart of the processing method for power failure during a BIOS updating process provided by the embodiment;
[0053] Figure 2 is a structural schematic diagram of the SPI Switch switch of the embodiment;
[0054] Figure 3 is a structural schematic diagram of the CPLD (complex programmable logic device) of the embodiment;
[0055] Figure 4 is a structural schematic diagram of a CPLD (Complex Programmable Logic Device) of the embodiment;
[0056] Figure 5 is a flowchart of BIOS updating of the embodiment;
[0057] Figure 6 is a structural schematic diagram of a processing device for handling power failure in a BIOS updating process provided by the embodiment;
[0058] Figure 7 is a flowchart of BIOS updating of the embodiment;
[0059] Figure 8 is a structural schematic diagram of a processing device for handling power failure in a BIOS updating process provided by the embodiment;
[0060] Figure 9 is a structural schematic diagram of a processing device for handling power failure in a BIOS updating process provided by the embodiment. DETAILED DESCRIPTION
[0061] The technical solutions in the embodiments of the present application will be described clearly and completely below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work fall within the scope of protection of the present application.
[0062] The present application provides a processing method and device for handling power failure in a BIOS updating process, and a computer readable storage medium. In addition, the technical features involved in different embodiments of the present application can be combined with each other as long as they do not conflict with each other.
[0063] Platform management represents a series of monitoring and control functions, and the object of operation is system hardware. For example, by monitoring the temperature, voltage, fan, power supply and the like of the system, and making corresponding adjustment work, the system is ensured to be in a healthy state. Of course, if the system is really abnormal, the system can also be restarted through the reset mode. At the same time, the platform management is also responsible for recording the information and log records of various hardware, for prompting the user and subsequent problem positioning. The above functions can be integrated into a controller to achieve, and this controller is called a baseboard management controller (BMC).
[0064] It should be noted that the BMC is a separate system, which does not depend on other hardware (such as CPU, memory, etc.) on the system, and does not depend on BIOS, OS, etc. (but the BMC can interact with the BIOS and OS, so that better platform management can be achieved, and the system management software under the OS can work with the BMC to achieve better management effect).
[0065] For devices with high system requirements, such as servers, BMC will be used. Of course, because BMC is a separate system, for some embedded devices, other processors may not be needed, and only a BMC can complete the work. Generally, our computer does not have a BMC, because it is not useful, and the management of some temperature, power, etc. The CPU can control it.
[0066] After all, the BMC itself is also an out-of-band processor (generally an ARM processor) small system, and it is completely possible to use it alone to handle some work. However, since it is called BMC here, the focus is still on platform management in general. The object of the processing method provided in the embodiments of the present application for the power failure in the BIOS update process is the BMC in the server described above.
[0067] The following will be described in detail. It should be noted that the order of the following embodiments is not limited as the preferred order of the embodiments.
[0068] The embodiments of the present application provide a processing method for power failure in a BIOS update process (such as Figure 1 ), comprising:
[0069] The client sends an update BIOS command and uploads BIOS firmware information through the network; after receiving the update BIOS command, the update process is executed; when power failure occurs, the update progress before power failure is recorded; after power recovery, the device is restarted, and the update process is continued or the old BIOS firmware is started, and the update failure log is reported to the client.
[0070] In some embodiments, the receiving of the update BIOS command and the execution of the update process comprises: obtaining the update BIOS command, pulling up the state of GPIO1 to obtain the control right of the read-only memory; sending an update BIOS start signal to the CPLD; downloading the BIOS firmware information and storing the downloaded BIOS firmware information in the storage medium.
[0071] It should be noted that (reference Figure 2 ) the principle of BMC updating BIOS is to use the SPI controller of the BMC to take over the read-only memory (BIOS ROM) and then update the BIOS. There will be related switch design on the motherboard:
[0072] From the hardware layout, the SPI controller of PCH (South Bridge) and the SPI controller of BMC are connected to a SPISwitch switch, and the Switch decides which controller is connected to the read-only memory (BIOS ROM). The BMC has a special GPIO for controlling the Switch. The normal workflow is as follows:
[0073] By default, the BMC does not control the Switch, and the PCH SPI controller controls the read-only memory (BIOS ROM) through the Switch for normal read and write data. When the BIOS needs to be updated, the BMC changes the state of the GPIO (such as pulling the GPIO high), the Switch detects the change of the GPIO state, disconnects the PCH SPI from the read-only memory (BIOS ROM), and then connects the BMC SPI to the read-only memory (BIOS ROM) to allow the BMC to control the read-only memory (BIOS ROM). After the BMC updates the read-only memory (BIOS ROM), the GPIO state is changed (the GPIO is pulled low) to make the Switch return the control of the read-only memory (BIOS ROM) to the PCH SPI. Then the BMC restarts the motherboard once, and the PCH completes the boot with the new data in the read-only memory (BIOS ROM), and thus the BIOS update is completed.
[0074] In some embodiments, the sending of the update BIOS start signal to the CPLD includes: pulling the GPIO2 high to make the CPLD enter the update state; after the CPLD enters the update state, the red light-emitting diode is lit, the PCH on the boot pin and the restart pin are shielded, and the GPIO3 is pulled high; and the state is saved to the storage area of the CPLD.
[0075] In some embodiments, after the BIOS firmware information is stored in the storage medium, the method further includes: erasing all data in the read-only memory; obtaining the BIOS firmware information in the storage medium and writing it into the read-only memory; deleting the BIOS firmware file saved in the storage medium; sending an update BIOS end signal to the CPLD; and after the update is completed, the signal state is restored.
[0076] In some embodiments, after the update BIOS end signal is sent to the CPLD, the method further includes: pulling the GPIO4 high to make the CPLD exit the update state, the CPLD turns off the red light-emitting diode, the PCH on the boot pin and the restart pin are unlocked, and the GPIO3 is pulled low; and the update state is removed from the storage area of the CPLD.
[0077] In some embodiments, the updating is completed, and the signal state is restored, including: pulling down GPIO1 to return the read-only memory control to the PCH; and pulling down GPIO2 and GPIO4.
[0078] It should be noted that: (refer to Figure 3 ) the design scheme for preventing power-off and restart of the motherboard caused by operation errors during the updating process. First, on the server platform, the power-on button and the restart button are not directly connected to the PCH related pins, because the BMC also needs to use these pins to realize the functions of power-on, power-off, restart, etc. The PCH pins related to restart and power-on are connected to the CPLD (CPLD: Complex Programmable logic device) on the motherboard. The power-on button, the restart button, the power-on, power-off, and restart commands of the BMC are directly transmitted to the CPLD, and then the CPLD transmits the signals to the related pins on the PCH after processing to complete the power-on, power-off, and restart operations.
[0079] (refer to Figure 4 ) The CPLD can be reprogrammed by using the programmable characteristics of the CPLD. When updating the BIOS, the BMC gives a signal (such as pulling up a certain GPIO) to the CPLD. After receiving the signal, the CPLD directly locks the signals related to the power-on and restart of the PCH. Even if the power-on button and the restart button are pressed during the updating process, the signals will only be transmitted to the CPLD, and the CPLD will not perform related operations. Until the BMC completes the BIOS updating, the CPLD will unlock the signals related to the power-on and restart of the PCH, and the related buttons can work normally.
[0080] The existing BMC updating BIOS roughly includes the following steps: first, uploading the BIOS firmware to the BMC memory (RAM: random access memory, which will lose data when power-off); then, the BMC erases the old data in the read-only memory (BIOS ROM); then, the BMC writes the new BIOS firmware from the memory to the read-only memory (BIOS ROM) to complete the BIOS updating.
[0081] In some embodiments, after the power supply is restored, the device is restarted, and the updating process is continued or the device is started with the old BIOS firmware, and the updating failure log is reported to the client, including: detecting whether GPIO3 is in a high state; if not, directly starting the device; if yes, detecting whether there is BIOS firmware information in the storage medium.
[0082] In some embodiments, the detecting whether there is BIOS firmware information in the storage medium comprises: detecting whether there is BIOS firmware information in the storage medium; if there is, reasserting the state of GPIO1 to obtain control of the read-only memory, sending a start BIOS update signal to the CPLD; and if there is not, starting the system with the old BIOS and recording a BIOS update failure log to report to the client.
[0083] It needs to be emphasized that: (reference Figure 5 ) Assuming that the power failure of the motherboard occurs in the first second process, because the data in the memory will be emptied after power failure, the BIOS data inside will be completely lost after power failure. However, because the process has not reached the stage of updating the BIOS, the original data in the read-only memory (BIOS ROM) is not modified, and the system will start with the old BIOS after power recovery.
[0084] Assuming that the power failure of the motherboard occurs in the third fourth process in the above figure, the memory data is completely emptied. The power failure causes the process of erasing or writing data in the read-only memory (BIOS ROM) to be interrupted, and the data in the read-only memory (BIOS ROM) is abnormal. After power recovery, the system cannot start with the abnormal BIOS.
[0085] The design scheme for the above problems is as follows:
[0086] The BMC on the server platform is responsible for handling a lot of things, and there are also a lot of information and logs recorded. Generally, there will be a storage medium on the motherboard to store these information, commonly there is a storage ROM specially for BMC storage, or a SD card slot is designed to match the SD card for BMC to store information, or a storage grain is specially carried to play the role of hard disk for BMC. When a fault occurs, the information in the storage medium can be read to help the R&D personnel analyze and diagnose the fault.
[0087] The design modifies the BMC code to save the BIOS firmware uploaded through the network to the storage medium instead of the memory (RAM), switches the spi switch to obtain control of the read-only memory (BIOS ROM) to erase the original old data in the ROM, then obtains the new BIOS firmware from the storage medium and flashes it to the read-only memory (BIOS ROM), and after the update is completed, deletes the saved BIOS firmware in the storage medium. When a power failure occurs during the update, the BMC can detect the abnormal power failure of the BIOS update through some signals, then try to update the BIOS again, and start the system after the update is completed. If the system cannot be updated, the system is started with the old BIOS and a log is recorded and then reported. The detailed scheme is as follows:
[0088] 1st stage. User sends the command of updating BIOS on the client and starts uploading BIOS. After the BMC on the motherboard receives the command of updating BIOS, it tells the SPI switch by pulling up the state of GPIO1 to get the control right of the read-only memory (BIOS ROM). Then it tells the CPLD by pulling up the state of GPIO2, and the CPLD will set itself to the updating state after receiving the signal: 1. turn on the red light-emitting diode, 2. pull up GPIO3 connected with the BMC, 3. lock the signals related to the boot and restart of the PCH, and save the above states to the internal storage area of the CPLD, even if the power is off, the state information will not be lost.
[0089] 2nd stage. The BMC receives the new BIOS firmware information uploaded by the user through network transmission, and saves it to the storage medium after checking the information.
[0090] 3rd stage. Erase all data in the read-only memory (BIOS ROM).
[0091] 4th stage. According to the file saved in the storage medium, write new BIOS firmware information into the read-only memory (BIOS ROM).
[0092] 5th stage. After the update is completed, the BMC deletes the BIOS firmware file saved in the storage medium, and pulls up GPIO4 to notify the CPLD that the BIOS update has been successfully completed.
[0093] 6th stage. The CPLD knows that the update has been completed through GPIO4, and exits the updating state of itself: 1. turn off the red diode, 2. pull down GPIO3 connected with the BMC, 3. unlock the signals related to the boot and restart of the PCH, and remove the above states from the internal storage area of the CPLD.
[0094] 7th stage. The BMC restores all GPIO states: pull down GPIO1 (return the control right of the read-only memory (BIOS ROM) to the PCH), GPIO2 (update completed, restore the signal state), GPIO4 (update completed, restore the signal state).
[0095] (Reference Figure 6 ) There are three groups of GPIO communication (GPIO2, GPIO3, GPIO4) between the BMC and the CPLD for telling the current state. The BMC uses GPIO1 to control the SPI switch. The CPLD controls the signals related to the boot and restart of the PCH.
[0096] Assume power-off happens in stage 2: BMC is receiving BIOS firmware via network transmission, and the power-off behavior happens, so the data cannot be saved, and the information about the uploaded BIOS firmware is lost. After the power system is restored, because the CPLD has stored the relevant state information, the state is that the red diode is on, the GPIO3 state is high, and the PCH boot and restart signals are locked.
[0097] (Reference Figure 7 )The BMC program can be adjusted: first, a function is added to enable the BMC to detect the state of GPIO3 after power-on startup is completed. When the BMC detects that GPIO3 is in a high state, it indicates that the BIOS firmware update behavior has occurred but was interrupted. Then the BMC detects whether there is BIOS firmware information in the self-contained storage medium. If there is, it continues the BIOS update operation. If there is not, it uses the original old BIOS to boot and records the update failure log and reports it. Because the power-off happens in stage 2, there is no BIOS firmware information in the storage medium, so the BMC boots with the old BIOS information in this case, records the update failure log and reports it, and the machine state is that the red diode is on, and the restart and boot buttons lose their functions, which are used to remind the on-site staff that the machine has failed, so that the maintenance personnel can quickly locate the machine.
[0098] Assume power-off happens in stages 3 and 4: BMC is erasing or writing firmware at this time, and power-off in either stage will cause ROM information errors, and the machine cannot boot. Referring to the above, the BMC will detect the state of GPIO3 after booting. When the BMC detects a high level, it indicates that the BIOS firmware update has occurred but was interrupted. Then the BMC detects whether there is BIOS firmware information in the self-contained storage medium. Because the power-off happens in stages 3 and 4 (the firmware information is saved in stage 2), the BMC will detect that there is BIOS firmware in the storage medium, and then the BMC will re-update the read-only memory (BIOS ROM). First, the BMC will inform the SPI switch to obtain the control right of the ROM through GPIO1 (because of power-off, after the power is restored, the spi switch defaults to PCH control read-only memory (BIOS ROM)), then erase all data in the ROM, and then write the new BIOS firmware information from the storage medium to the ROM to complete the BIOS update. After that, it is the same as the normal process: delete the BIOS firmware information in the storage medium, notify the CPLD to exit the update state through GPIO4, control the motherboard to boot, restore the states of GPIO1, GPIO2, and GPIO4 (the state of GPIO3 is restored by the CPLD), and so on.
[0099] From the above, the embodiment provides a processing method for power failure in a BIOS updating process, comprising: sending an update BIOS command by a client and uploading BIOS firmware information through a network; receiving the update BIOS command and executing an updating process; recording an updating progress before power failure when power failure occurs to interrupt the updating process; restarting the device after power recovery, continuing the updating process or starting with old BIOS firmware, and reporting an updating failure log to the client. Through cooperation of hardware design, CPLD and BMC, even if power failure occurs in the BIOS updating process of BMC, the BIOS updating will be continued after power recovery, and if the BIOS cannot be updated, the old BIOS will be used to complete startup, and then the updating failure log will be recorded and reported. The technical problem that the device cannot be started completely due to power failure in the BIOS firmware updating process is solved.
[0100] In order to better implement the above method, the embodiment of the application further provides a processing device 200 for power failure in a BIOS updating process, which can be integrated in an electronic device, such as a terminal, a server, a personal computer and the like. For example, in the embodiment, the device can comprise a receiving unit 201, an executing unit 202, an information recording unit 203 and an information reporting unit 204, and the details are as follows (with reference to Figure 8 ):
[0101] (1) The receiving unit 201 is configured to receive the update BIOS command and the BIOS firmware information.
[0102] In some embodiments, the client sends an update BIOS command and uploads BIOS firmware information through a network; the update BIOS command is received, and an updating process is executed; when power failure occurs to interrupt the updating process, an updating progress before power failure is recorded; the device is restarted after power recovery, and the updating process is continued or starts with old BIOS firmware, and an updating failure log is reported to the client.
[0103] In some embodiments, the receiving of the update BIOS command and the execution of the updating process comprise: obtaining the update BIOS command, pulling up the state of GPIO1 to obtain the control right of read-only memory; sending an update BIOS start signal to CPLD; downloading the BIOS firmware information and storing the downloaded BIOS firmware information in a storage medium.
[0104] (2) The executing unit 202 is configured to execute the updating process.
[0105] In some embodiments, the client sends an update BIOS command and uploads BIOS firmware information through a network; upon receiving the update BIOS command, an update process is performed; when a power failure occurs, interrupting the update process, the update progress before the power failure is recorded; after the power is restored, the device is restarted, the update process is continued or the old BIOS firmware is booted, and an update failure log is reported to the client.
[0106] In some embodiments, upon receiving the update BIOS command, the update process is performed, including: obtaining the update BIOS command, pulling up GPIO1 to obtain the control right of a read-only memory; sending an update BIOS start signal to a CPLD; downloading the BIOS firmware information and storing the downloaded BIOS firmware information in a storage medium.
[0107] In some embodiments, the update BIOS start signal is sent to the CPLD, including: making the CPLD enter an update state by pulling up GPIO2; after the CPLD enters the update state, a red light-emitting diode is lit, the PCH on the boot pin and the restart pin are shielded, and GPIO3 is pulled up; the state is saved to a storage area of the CPLD.
[0108] In some embodiments, after the downloaded BIOS firmware information is stored in the storage medium, including: erasing all data in the read-only memory; obtaining the BIOS firmware information existing in the storage medium and writing it into the read-only memory; deleting the BIOS firmware file saved in the storage medium; sending an update BIOS end signal to the CPLD; and restoring the signal state after the update is completed.
[0109] In some embodiments, after the update BIOS end signal is sent to the CPLD, including: making the CPLD exit the update state by pulling up GPIO4, the CPLD extinguishes the red light-emitting diode after obtaining the update BIOS end signal, the PCH on the boot pin and the restart pin are unlocked, and GPIO3 is pulled down; the update state is removed from the storage area of the CPLD.
[0110] In some embodiments, after the update is completed, the signal state is restored, including: pulling down GPIO1 to return the control right of the read-only memory to the PCH; and pulling down GPIO2 and GPIO4.
[0111] In some embodiments, after the power is restored, the device is restarted, the update process is continued or the old BIOS firmware is booted, and an update failure log is reported to the client, including: detecting whether GPIO3 is in a high state; if not, the device is directly started; if yes, it is detected whether there is BIOS firmware information in the storage medium.
[0112] In some embodiments, the detecting whether the BIOS firmware information exists in the storage medium comprises: detecting whether the BIOS firmware information exists in the storage medium; if yes, re-pulling up the state of GPIO1 to acquire the control right of the read-only memory, sending an update BIOS start signal to the CPLD; and if no, booting with the old BIOS firmware and recording an update BIOS failure log to report to the client.
[0113] (3) An information recording unit 203, configured to record an update progress before power failure in an update BIOS process.
[0114] In some embodiments, the client sends an update BIOS command and uploads the BIOS firmware information through a network; upon receiving the update BIOS command, the device executes an update process; when power failure occurs and interrupts the update process, the device records an update progress before power failure; after power recovery, the device restarts and continues the update process or boots with the old BIOS firmware and reports an update failure log to the client.
[0115] In some embodiments, upon receiving the update BIOS command, the device executes an update process, which comprises: acquiring the update BIOS command, pulling up the state of GPIO1 to acquire the control right of the read-only memory; sending an update BIOS start signal to the CPLD; and downloading the BIOS firmware information and storing the downloaded BIOS firmware information in the storage medium.
[0116] In some embodiments, the sending of the update BIOS start signal to the CPLD comprises: pulling up GPIO2 to make the CPLD enter an update state; after the CPLD enters the update state, the CPLD will light up a red light-emitting diode, shield the power-on pin and the restart pin on the PCH, and pull up GPIO3; and the state is saved to the storage area of the CPLD.
[0117] In some embodiments, after the storing of the downloaded BIOS firmware information in the storage medium, the device comprises: erasing all data in the read-only memory; acquiring the BIOS firmware information existing in the storage medium and writing it into the read-only memory; deleting the BIOS firmware file saved in the storage medium; sending an update BIOS end signal to the CPLD; and after the update is completed, restoring the signal state.
[0118] In some embodiments, after the sending of the update BIOS end signal to the CPLD, the device comprises: pulling up GPIO4 to make the CPLD exit the update state; after the CPLD acquires the update BIOS end signal, the CPLD extinguishes the red light-emitting diode, unblocks the power-on pin and the restart pin on the PCH, and pulls down GPIO3; and the update state is removed from the storage area of the CPLD.
[0119] In some embodiments, the power supply restarts the device, continues to execute the updating process or starts with the old BIOS firmware, and reports the updating failure log to the client, including: detecting whether GPIO3 is in a high state; if not, directly starting the device; if yes, detecting whether there is BIOS firmware information in the storage medium.
[0120] In some embodiments, the detecting whether there is BIOS firmware information in the storage medium includes: detecting whether there is BIOS firmware information in the storage medium; if yes, re-pulling the state of GPIO1 to obtain the control right of the read-only memory, sending an updating BIOS start signal to the CPLD; if not, starting with the old BIOS firmware, and recording the updating BIOS failure log and reporting to the client.
[0121] (4) An information reporting unit 204, configured to restart the device after the power supply is restored, continue to execute the updating process or start with the old BIOS firmware, and report the updating failure log to the client.
[0122] In some embodiments, the client sends an updating BIOS command and uploads the BIOS firmware information through the network; after receiving the updating BIOS command, the updating process is executed; when the power failure occurs and the updating process is interrupted, the updating progress before the power failure is recorded; after the power supply is restored, the device is restarted, the updating process is continued or the old BIOS firmware is started, and the updating failure log is reported to the client.
[0123] In some embodiments, the detecting whether there is BIOS firmware information in the storage medium includes: detecting whether there is BIOS firmware information in the storage medium; if yes, re-pulling the state of GPIO1 to obtain the control right of the read-only memory, sending an updating BIOS start signal to the CPLD; if not, starting with the old BIOS firmware, and recording the updating BIOS failure log and reporting to the client.
[0124] As can be seen from the above, the embodiment provides a processing device 200 for power failure in a BIOS updating process, including a receiving unit 201, an executing unit 202, an information recording unit 203, and an information reporting unit 204. Through the mutual cooperation of the above units, even if the power failure occurs in the BMC updating BIOS process, the BIOS will be continued to be updated after the power supply is restored, and if the updating cannot be completed, the old BIOS will be started, and then the updating failure log is recorded and reported. The technical problem of completely unable to start the machine due to power failure in the updating BIOS firmware is solved.
[0125] To better implement the above method, the embodiment of the application further provides a processing device 300 for power failure in a BIOS updating process, which can be integrated in an electronic device, such as a terminal, a server, a personal computer or the like. For example, in the embodiment, the device can include a sending unit 301, a receiving unit 302 and a display unit 303, and the details are as follows (for reference Figure 9 ):
[0126] (1) The sending unit 301 is configured to send an update BIOS command and upload BIOS firmware information.
[0127] In some embodiments, the client sends an update BIOS command and uploads BIOS firmware information through a network; the update BIOS command is received, and an updating process is performed; when power failure occurs to interrupt the updating process, the updating progress before the power failure is recorded; after the power is restored, the device is restarted, and the updating process is continued or the device is started with old BIOS firmware, and an update failure log is reported to the client.
[0128] (2) The receiving unit 302 is configured to receive an update BIOS failure log.
[0129] In some embodiments, the client sends an update BIOS command and uploads BIOS firmware information through a network; the update BIOS command is received, and an updating process is performed; when power failure occurs to interrupt the updating process, the updating progress before the power failure is recorded; after the power is restored, the device is restarted, and the updating process is continued or the device is started with old BIOS firmware, and an update failure log is reported to the client.
[0130] (3) The display unit 303 is configured to display an update BIOS failure log.
[0131] In some embodiments, the client sends an update BIOS command and uploads BIOS firmware information through a network; the update BIOS command is received, and an updating process is performed; when power failure occurs to interrupt the updating process, the updating progress before the power failure is recorded; after the power is restored, the device is restarted, and the updating process is continued or the device is started with old BIOS firmware, and an update failure log is reported to the client.
[0132] In implementation, each of the above units can be implemented as an independent entity, or can be combined as the same or several entities, and the specific implementation of each of the above units can be referred to the method embodiment described above, which will not be described here.
[0133] Those skilled in the art can understand that all or part of the steps in the various methods of the above embodiments can be completed by instructions or by controlling relevant hardware by instructions, which can be stored in a computer readable storage medium and loaded and executed by a processor.
[0134] To this end, the embodiments of the present application provide a storage medium, in which a plurality of instructions are stored, which can be loaded by a processor to execute the steps in the processing method for power failure in any BIOS updating process provided by the embodiments of the present application. For example, the instructions can execute the following steps:
[0135] In some embodiments, the client sends an update BIOS command and uploads BIOS firmware information through a network; upon receiving the update BIOS command, an update process is executed; when a power failure occurs to interrupt the update process, the update progress before the power failure is recorded; after the power is restored, the device is restarted to continue the update process or starts with the old BIOS firmware and reports an update failure log to the client.
[0136] In some embodiments, the sending of the update BIOS start signal to the CPLD includes: making the CPLD enter an update state by pulling up GPIO2; after the CPLD enters the update state, a red light-emitting diode is lit, the PCH on the boot pin and the restart pin are shielded, and GPIO3 is pulled up; and the state is saved to the storage area of the CPLD.
[0137] In some embodiments, the receiving of the update BIOS command and the execution of the update process include: obtaining the update BIOS command, pulling up GPIO1 to obtain the control right of the read-only memory; sending an update BIOS start signal to the CPLD; and downloading the BIOS firmware information and storing the downloaded BIOS firmware information in a storage medium.
[0138] In some embodiments, the sending of the update BIOS start signal to the CPLD includes: making the CPLD enter an update state by pulling up GPIO2; after the CPLD enters the update state, a red light-emitting diode is lit, the PCH on the boot pin and the restart pin are shielded, and GPIO3 is pulled up; and the state is saved to the storage area of the CPLD.
[0139] In some embodiments, after the storing of the downloaded BIOS firmware information in the storage medium, it includes: erasing all data in the read-only memory; obtaining the BIOS firmware information existing in the storage medium and writing it into the read-only memory; deleting the BIOS firmware file saved in the storage medium; sending an update BIOS end signal to the CPLD; and restoring the signal state after the update is completed.
[0140] In some embodiments, after the sending the update BIOS end signal to the CPLD, the method comprises: making the CPLD exit the update state by pulling up the GPIO4, the CPLD turning off the red diode, unlocking the power-on pin and the restart pin on the PCH, and pulling down the GPIO3 after obtaining the update BIOS end signal; and removing the update state from the storage area of the CPLD.
[0141] In some embodiments, after the power supply is restored, the device is restarted, the update process is continued, or the old BIOS firmware is started, and the update failure log is reported to the client, which comprises: detecting whether the GPIO3 is in a high state; if not, the device is directly started; if yes, it is detected whether there is BIOS firmware information in the storage medium.
[0142] In some embodiments, the detection of whether there is BIOS firmware information in the storage medium comprises: detecting whether there is BIOS firmware information in the storage medium; if yes, the read-only memory is controlled by pulling up the GPIO1 again, the update BIOS start signal is sent to the CPLD; if not, the old BIOS firmware is started, and the update BIOS failure log is recorded and reported to the client.
[0143] The storage medium can comprise a read-only memory (ROM), a disk, an SD card, or the like.
[0144] Compared with the prior art, the application has the following beneficial effects: a processing method and device for power failure in a BIOS update process, which comprises: sending an update BIOS command by a client, and uploading BIOS firmware information through a network; receiving the update BIOS command, and executing an update process; recording the update progress before power failure when the power failure occurs in the update process; restarting the device after the power supply is restored, continuing the update process, or starting with the old BIOS firmware, and reporting the update failure log to the client. Through the cooperation of hardware design, CPLD, and BMC, even if power failure occurs during the BMC update BIOS process, the BMC will continue to attempt to update the BIOS after the power supply is restored. If the BIOS cannot be updated, the old BIOS will be used to complete the startup, and then the update failure log will be recorded and reported. The technical problem of complete machine shutdown caused by power failure during BIOS firmware update is solved.
[0145] Obviously, the above embodiments are merely examples for clear illustration, and are not intended to limit the implementation modes. Based on the above description, other different forms of changes or variations can be made by those skilled in the art. Here, all the implementation modes are not required or can not be exhausted. The obvious changes or variations derived therefrom are still within the protection scope of the application.
Claims
1. A method for handling a power failure during a BIOS update process, the method comprising: receiving a BIOS update; receiving a request to update the BIOS; and updating the BIOS in response to the request to update the BIOS. The application relates to a method for updating BIOS (Basic Input / Output System) of a client, comprising the following steps: sending an update BIOS command to the client and uploading BIOS firmware information through a network; receiving the update BIOS command and executing an update process; when a power failure occurs and interrupts the update process, recording the update progress before the power failure; after the power is restored, restarting the device, continuing the update process or starting with old BIOS firmware, and reporting an update failure log to the client; receiving the update BIOS command and executing the update process, comprising the following steps: obtaining the update BIOS command, pulling up a GPIO1 state to obtain control of a read-only memory; sending an update BIOS start signal to a CPLD (Complex Programmable Logic Device); downloading the BIOS firmware information and storing the BIOS firmware information in a storage medium; the step of sending the update BIOS start signal to the CPLD, comprising the following steps: pulling up a GPIO2 to make the CPLD enter an update state; after the CPLD enters the update state, a red light-emitting diode is lit, PCH (Platform Controller Hub) start-up pins and restart pins are shielded, and a GPIO3 is pulled up; the step of saving the state to a storage area of the CPLD; after the step of storing the downloaded BIOS firmware information in the storage medium, comprising the following steps: erasing all data in the read-only memory; obtaining the BIOS firmware information existing in the storage medium and writing the BIOS firmware information into the read-only memory; deleting the BIOS firmware file saved in the storage medium; sending an update BIOS end signal to the CPLD; after the update is completed, restoring the signal state; after the step of sending the update BIOS end signal to the CPLD, comprising the following steps: pulling up a GPIO4 to make the CPLD exit the update state, the CPLD extinguishes the red light-emitting diode after obtaining the update BIOS end signal, the PCH start-up pins and the restart pins are unlocked, and the GPIO3 is pulled down; removing the update state from the storage area of the CPLD; the step of restoring the signal state after the update is completed, comprising the following steps: pulling down the GPIO1 to return the control of the read-only memory to the PCH; pulling down the GPIO2 and the GPIO4.
2. The method of claim 1, wherein the BIOS update process is interrupted by a power failure. the step of restarting the device after the power is restored, continuing the update process or starting with the old BIOS firmware, and reporting the update failure log to the client, comprising the following steps: detecting whether the GPIO3 is in a high state; if not, directly starting the device; if yes, detecting whether there is BIOS firmware information in the storage medium.
3. The method for handling power outages during a BIOS update process according to claim 2, characterized in that, the step of detecting whether there is BIOS firmware information in the storage medium, comprising the following steps: detecting whether there is BIOS firmware information in the storage medium; if yes, pulling up the GPIO1 state to obtain the control of the read-only memory again, and sending the update BIOS start signal to the CPLD; if not, starting with the old BIOS firmware and recording the update BIOS failure log to report to the client.
4. A BIOS update process power failure handling apparatus for implementing the BIOS update process power failure handling method as claimed in claim 1, characterized by comprising: a BIOS update process power failure handling program for implementing the BIOS update process power failure handling method as claimed in claim 1. The application further relates to a device for updating BIOS of a client, comprising the following units: a receiving unit, used for receiving an update BIOS command and receiving BIOS firmware information; an executing unit, used for executing an update process; an information recording unit, used for recording an update progress before a power failure when a power failure occurs and interrupts the update process; An information reporting unit is configured to restart the device after power recovery, continue to execute the updating process or start up with the old BIOS firmware, and report the updating failure log to the client.
5. A BIOS update process power failure handling apparatus for implementing the BIOS update process power failure handling method as claimed in claim 1, characterized by comprising: a BIOS update process power failure handling program for implementing the BIOS update process power failure handling method as claimed in claim 1. The method comprises the following steps: A sending unit is configured to send the updating BIOS command and upload the BIOS firmware information; A receiving unit is configured to receive the updating BIOS failure log; A display unit is configured to display the updating BIOS failure log.
6. A storage medium having stored thereon a computer program, characterized in that When the computer program runs on the computer, the computer is caused to execute the processing method for power failure in the BIOS updating process as claimed in any one of claims 1 to 3.
Citation Information
Patent Citations
Firmware update system, method and building method of firmware of firmware update system
CN101770372A
Method and system for updating touch screen firmware of movable terminal
CN104765628A
Firmware updating method and device, electronic equipment and storage medium
CN113805917A