CN114911641A - Method and device for processing power failure in BIOS updating process - Google Patents

Method and device for processing power failure in BIOS updating process Download PDF

Info

Publication number
CN114911641A
CN114911641A CN202210376769.8A CN202210376769A CN114911641A CN 114911641 A CN114911641 A CN 114911641A CN 202210376769 A CN202210376769 A CN 202210376769A CN 114911641 A CN114911641 A CN 114911641A
Authority
CN
China
Prior art keywords
bios
updating
cpld
state
update
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210376769.8A
Other languages
Chinese (zh)
Inventor
李启明
唐斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Tong Tai Yi Information Technology Co ltd
Original Assignee
Shenzhen Tong Tai Yi Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Tong Tai Yi Information Technology Co ltd filed Critical Shenzhen Tong Tai Yi Information Technology Co ltd
Priority to CN202210376769.8A priority Critical patent/CN114911641A/en
Publication of CN114911641A publication Critical patent/CN114911641A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0766Error or fault reporting or storing
    • G06F11/0787Storage of error reports, e.g. persistent data storage, storage using memory protection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/0703Error or fault processing not based on redundancy, i.e. by taking additional measures to deal with the error or fault not making use of redundancy in operation, in hardware, or in data representation
    • G06F11/0793Remedial or corrective actions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Quality & Reliability (AREA)
  • Software Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Retry When Errors Occur (AREA)

Abstract

The invention belongs to the technical field of computers, and discloses a method and a device for processing power failure in a BIOS updating process, wherein the method comprises the following steps: sending a command for updating the BIOS at the client, and uploading BIOS firmware information through a network; receiving the BIOS updating command and executing an updating process; when the power failure causes the interruption of the updating process, recording the updating progress before the power failure; and restarting the equipment after the power supply is recovered, continuing to execute an updating process or starting up the equipment by using the old BIOS firmware, and reporting an updating failure log to the client. Through the mutual cooperation of hardware design, the CPLD and the BMC, even if the BIOS is powered off in the updating process of the BMC, the updating of the BIOS can be continuously attempted after the power supply is recovered, the BIOS can be started up by the old BIOS if the BIOS cannot be updated, and then the updating failure log is recorded and reported. The technical problem that the machine cannot be completely started due to the fact that power is cut off midway during updating of the BIOS firmware is solved.

Description

Method and device for processing power failure in BIOS updating process
Technical Field
The invention belongs to the technical field of computers, and discloses a method and a device for processing power failure in a BIOS updating process.
Background
The BIOS is widely used in the computer industry and is an indispensable part of computers. In the production debugging process of the computer mainboard, the BIOS program is often required to be updated to continuously debug the mainboard, so that the mainboard gradually becomes an optimal state. Updating the BIOS using BMC on the server platform is quite common, but there is a lack of measures to take sudden situations. The following errors are common in general:
the network reason is as follows: because the BIOS is updated by the network, the network environment is relied on to transmit data and instructions. If a network failure occurs, the BMC may not receive the related data and instructions, and the update fails.
And (3) power failure: in the process of updating the BIOS, the main board is powered off (misoperation of personnel or power failure) due to some reason, so that the updating fails. This failure has two consequences: one situation is that the motherboard is powered off in the stage of uploading the BIOS firmware, and since the old data in the BIOS ROM is not rewritten at this time and the PCH SPI controller is connected thereto after the power is turned on again (since the default switch is the PCH in priority, the control right is temporarily given to the BMC only after the BMC transmits information to the switch), the motherboard is powered on with the old BIOS firmware. Another situation is when a motherboard power down occurs during a BIOS update. At this time, the old data in the BIOS ROM is already damaged, but the new data is not completely written, so that the BIOS firmware is damaged, and after the motherboard is powered on again, the motherboard cannot be normally powered on due to abnormal BIOS data.
Therefore, there is a need for a method and an apparatus for processing power failure during BIOS update, which, through the cooperation of hardware design and CPLD and BMC, enables the BMC to continue to try to update the BIOS after power supply is restored even if power failure occurs during the BIOS update, and even if the BIOS cannot be updated, the boot will be completed by the old BIOS, and then an update failure log is recorded and reported, so as to solve the above-mentioned problems.
Disclosure of Invention
The present invention is directed to a method and an apparatus for processing power failure during BIOS update, so as to solve the problems in the background art.
In order to achieve the purpose, the invention provides the following technical scheme:
in one aspect, an embodiment of the present application provides a method for processing a power failure during a BIOS update process, including:
sending a command for updating the BIOS at the client, and uploading BIOS firmware information through a network;
receiving the BIOS updating command and executing an updating process;
when the power failure causes the interruption of the updating process, recording the updating progress before the power failure;
and restarting the equipment after the power supply is recovered, continuing to execute an updating process or starting up the equipment by using the old BIOS firmware, and reporting an updating failure log to the client.
In some embodiments, the receiving the update BIOS command, performing an update procedure, including:
acquiring the BIOS updating command, and pulling up the state of the GPIO1 to acquire the control right of the read only memory;
sending a BIOS updating starting signal to the CPLD;
downloading the BIOS firmware information, and storing the downloaded BIOS firmware information in a storage medium.
In some embodiments, said sending an update BIOS start signal to the CPLD includes:
the CPLD enters an updating state by pulling up the GPIO 2;
after the CPLD enters the updating state, the CPLD can light up the red light-emitting diode, shield a starting pin and a restarting pin on the PCH and pull up the GPIO 3;
and saving the state to a storage area of the CPLD.
In some embodiments, said downloading said BIOS firmware information after being stored in the storage medium comprises:
erasing all data in the read-only memory;
acquiring the BIOS firmware information stored in a storage medium, and writing the BIOS firmware information into a read-only memory;
deleting the BIOS firmware file stored in the storage medium;
sending a BIOS updating end signal to the CPLD;
and after the updating is finished, restoring the signal state.
In some embodiments, said sending the update BIOS end signal to the CPLD includes:
the CPLD is quitted from the updating state by pulling up the GPIO4, the CPLD extinguishes the red diode after acquiring the BIOS updating ending signal, unlocks a starting pin and a restarting pin on the PCH, and pulls down the GPIO 3;
and removing the updated state from the CPLD storage area.
In some embodiments, the updating, restoring the signal state, includes:
pulling low the GPIO1 to return the read-only memory control right to the PCH;
the state pulls GPIO2 and GPIO4 low.
In some embodiments, restarting the device after the power is restored, continuing to execute an update process or booting with an old BIOS firmware, and reporting an update failure log to the client includes:
detecting whether the GPIO3 is in a high state;
if not, directly starting the equipment;
if yes, whether the BIOS firmware information exists in the storage medium is detected.
In some embodiments, the detecting whether the storage medium has the BIOS firmware information includes:
detecting whether BIOS firmware information exists in the storage medium;
if yes, the state of the GPIO1 is pulled up again to obtain the control right of the read only memory, and a BIOS starting signal is sent to the CPLD for updating;
if not, the system is started by the old BIOS firmware, records the failure log of updating the BIOS and reports the failure log to the client.
On the other hand, an embodiment of the present application further provides a processing apparatus for power off during a BIOS update process, including:
the receiving unit is used for receiving the BIOS updating command and receiving the BIOS firmware information;
an execution unit configured to execute the update flow;
the information recording unit is used for interrupting an updating process caused by power failure in the process of updating the BIOS and recording the updating progress before power failure;
and the information reporting unit is used for restarting the equipment after the power supply is recovered, continuing to execute the updating process or starting up the equipment by using the old BIOS firmware, and reporting the updating failure log to the client.
On the other hand, an embodiment of the present application further provides a processing apparatus for power off during a BIOS update process, including:
the sending unit is used for sending a command for updating the BIOS and uploading BIOS firmware information;
a receiving unit, configured to receive a failure log for updating a BIOS;
and the display unit is used for displaying the failure log of updating the BIOS.
An embodiment of the present application further provides a storage medium, on which a computer program is stored, and when the computer program runs on a computer, the computer is caused to execute a processing method for power failure during BIOS update according to any one of claims 1 to 9
In summary, compared with the prior art, the invention has the following beneficial effects: a processing method and device for power failure in BIOS updating process includes: sending a command for updating the BIOS at the client, and uploading BIOS firmware information through a network; receiving the BIOS updating command and executing an updating process; when the power failure causes the interruption of the updating process, recording the updating progress before the power failure; and restarting the equipment after the power supply is recovered, continuing to execute an updating process or starting up the equipment by using the old BIOS firmware, and reporting an updating failure log to the client. Through the mutual cooperation of hardware design, the CPLD and the BMC, even if the BIOS is powered off in the updating process of the BMC, the updating of the BIOS can be continuously attempted after the power supply is recovered, the BIOS can be started up by the old BIOS if the BIOS cannot be updated, and then the updating failure log is recorded and reported. The technical problem that the machine cannot be completely started due to the fact that power is cut off midway during updating of the BIOS firmware is solved.
Drawings
Fig. 1 is a flowchart illustrating a processing method for power down during BIOS update according to this embodiment;
fig. 2 is a schematic structural diagram of the SPI Switch of the present embodiment;
fig. 3 is a schematic structural diagram of a CPLD (complex programmable logic device) of the present embodiment;
fig. 4 is a schematic structural diagram of a CPLD (complex programmable logic device) of the present embodiment;
FIG. 5 is a flow chart illustrating BIOS update according to the present embodiment;
FIG. 6 is a schematic structural diagram of a processing device powered off during a BIOS update process according to this embodiment;
FIG. 7 is a flow chart illustrating BIOS update according to the present embodiment;
FIG. 8 is a schematic structural diagram of a processing device powered off during a BIOS update process according to an embodiment of the present invention;
fig. 9 is a schematic structural diagram of a processing device powered off during a BIOS update process according to this embodiment.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
The embodiment of the application provides a processing method and device for power failure in a BIOS updating process and a computer readable storage medium. Furthermore, the technical features mentioned in the different embodiments of the invention can be combined with each other as long as they do not conflict with each other.
Platform management represents a series of monitoring and control functions, and the object of operation is system hardware. Such as by monitoring the temperature, voltage, fan, power supply, etc. of the system and making adjustments to ensure that the system is in a healthy state. Of course, if the system is not normal, the system can be restarted in a reset mode. Meanwhile, the platform management is also responsible for recording information and log records of various hardware and is used for prompting a user and positioning subsequent problems. The above functions can be implemented by integrating the above functions into a Controller, which is called a Baseboard Management Controller (BMC).
It should be noted that the BMC is an independent system, and is independent of other hardware (such as CPU, memory, etc.) on the system, nor the BIOS, OS, etc. (however, the BMC may interact with the BIOS and the OS, which may play a better role in platform management, and system management software under the OS may cooperate with the BMC to achieve a better management effect).
For a device with high system requirements, such as a server, the BMC may be used. Of course, because the BMC is a stand-alone system, for some embedded devices, no other processor may be needed, and one BMC may be able to do the work. Generally, the BMC cannot be carried by the computer, and the CPU is enough for controlling the computer due to little use and management of some temperature, power supply and the like.
It is said that the BMC itself is also a small system of out-of-band processors (typically ARM processors), and it is entirely possible to handle some tasks separately. However, since the BMC is used here, the focus is also on platform management in general, and the BMC in the server is an object acted by the processing method for power failure during BIOS update.
The following are detailed below. The order of the following examples is not intended to limit the preferred order of the examples.
The embodiment of the present application provides a method for processing power failure during BIOS update (as shown in fig. 1), including:
sending a command for updating the BIOS at the client, and uploading BIOS firmware information through a network; receiving the BIOS updating command and executing an updating process; when the power failure causes the interruption of the updating process, recording the updating progress before the power failure; and restarting the equipment after the power supply is recovered, continuing to execute an updating process or starting up the equipment by using the old BIOS firmware, and reporting an updating failure log to the client.
In some embodiments, the receiving the update BIOS command, performing an update procedure, including: acquiring the command for updating the BIOS, and pulling up the state of the GPIO1 to acquire the control right of the read only memory; sending a BIOS updating starting signal to the CPLD; downloading the BIOS firmware information, and storing the downloaded BIOS firmware information in a storage medium.
It should be noted that: (referring to FIG. 2) the principle of BMC to update BIOS is to take over read only memory (BIOS ROM) and then update BIOS using the BMC's own SPI controller. There will be an associated switch design on the motherboard:
from the hardware layout, the SPI controller of the PCH (south bridge) and the SPI controller of the BMC are connected to an SPI Switch, whose controller is determined by the Switch to be connected to a read only memory (BIOS ROM). And BMC has a dedicated GPIO to control the Switch. The normal work flow is as follows:
the BMC cannot control the Switch under default conditions, and the PCH SPI controller controls a read-only memory (BIOS ROM) to read and write data normally through the Switch. When the BIOS needs to be updated, the BMC changes the state of the GPIO (for example, the GPIO is pulled up), and when the Switch detects the change of the state of the GPIO, the connection between the PCH SPI and a read only memory (BIOS ROM) is disconnected, and then the BMC SPI and the read only memory (BIOS ROM) are connected, so that the BMC obtains the control right of the read only memory (BIOS ROM). After the BMC updates the read only memory (BIOS ROM), the state of the GPIO is changed (the GPIO is pulled down) so that the Switch can give the control right of the read only memory (BIOS ROM) to the PCH SPI again. Then BMC will make mainboard restart once, PCH will finish the start-up with the new data in the read-only memory (BIOS ROM), until BIOS finishes updating.
In some embodiments, said sending an update BIOS start signal to the CPLD includes: the CPLD enters an updating state by pulling up the GPIO 2; after the CPLD enters the updating state, the CPLD can light up the red light-emitting diode, shield a starting pin and a restarting pin on the PCH and pull up the GPIO 3; and saving the state to a storage area of the CPLD.
In some embodiments, said downloading said BIOS firmware information after being stored in the storage medium comprises: erasing all data in the read-only memory; acquiring the BIOS firmware information stored in a storage medium, and writing the BIOS firmware information into a read-only memory; deleting the BIOS firmware file stored in the storage medium; sending a BIOS updating end signal to the CPLD; and after the updating is finished, restoring the signal state.
In some embodiments, said sending the update BIOS end signal to the CPLD includes: the CPLD is quitted from the updating state by pulling up the GPIO4, the CPLD extinguishes the red diode after acquiring the BIOS updating ending signal, unlocks a starting pin and a restarting pin on the PCH, and pulls down the GPIO 3; and removing the updated state from the CPLD storage area.
In some embodiments, the updating, restoring the signal state, includes: lowering GPIO1 to return the ROM control right to PCH; the state pulls GPIO2 and GPIO4 low.
It should be noted that: (refer to fig. 3) a design scheme for preventing the power failure and the restart of the mainboard caused by misoperation in the updating process. Firstly, on a server platform, a boot button and a restart button are not directly connected to related pins of a PCH, because the pins are also needed for the BMC to realize the functions of booting, shutting down, restarting and the like. The related reset and start pins of the PCH are connected to a Complex Programmable Logic Device (CPLD) on the motherboard, and the commands of the start button, the reset button, the start, the shutdown, the reset of the BMC and the like are directly transmitted to the CPLD, and then the CPLD processes the signals and transmits the processed signals to the related pins on the PCH to complete the operations of startup, shutdown and the like.
The CPLD (refer to fig. 4) may be reprogrammed by using the CPLD programmable property, so that the BMC may send a signal (for example, a certain GPIO is raised) to the CPLD when updating the BIOS, and the CPLD may directly lock the signal for controlling the PCH to be turned on and restarted, so that even if the power-on button and the restart are pressed during the updating process, the signal is only transmitted to the CPLD, the CPLD may not execute the related operation, and until the BMC completes the update of the BIOS, the CPLD may unlock the signal for controlling the PCH to be turned on and restarted, and the related button may not normally operate.
The conventional BMC update BIOS generally includes uploading a BIOS firmware to a BMC memory (RAM, which loses data when power is off), erasing old data in a read only memory (BIOS ROM) by the BMC, and writing a new BIOS firmware into the read only memory (BIOS ROM) from the memory to complete BIOS update.
In some embodiments, restarting the device after the power is restored, continuing to execute an update process or booting with an old BIOS firmware, and reporting an update failure log to the client includes: detecting whether the GPIO3 is in a high state; if not, directly starting the equipment; if yes, whether the BIOS firmware information exists in the storage medium is detected.
In some embodiments, the detecting whether the storage medium has the BIOS firmware information includes: detecting whether BIOS firmware information exists in the storage medium; if yes, the state of the GPIO1 is pulled up again to obtain the control right of the read only memory, and a BIOS starting signal is sent to the CPLD for updating; if not, the system is started up by the old BIOS firmware, records and updates BIOS failure logs and reports the BIOS failure logs to the client.
The important points to be explained are: (refer to fig. 5) it is assumed that the power-off of the motherboard occurs in the first and second processes, and because the data will be emptied after the power-off of the memory, the BIOS data in the power-off will be lost completely. However, since the process is interrupted due to power failure before the BIOS is updated, the original data in the read only memory (BIOS ROM) is not modified, and the system is booted with the old BIOS after the power is restored.
Suppose that the power-off of the motherboard occurs in the third and fourth processes of the above diagram, and the memory data is completely emptied. The power-off causes the erasing or writing process of the read-only memory (BIOS ROM) data to be interrupted, and the data in the read-only memory (BIOS ROM) is abnormal. The abnormal BIOS can not be used for starting up after the power is recovered.
The design scheme aiming at the problems is as follows:
the BMC on the server platform is responsible for processing a plurality of things, and various recorded information and logs are also numerous. Generally, a storage medium is provided on the motherboard to store the information, and a storage ROM specially used for the BMC is usually provided, or an SD card slot is designed to be matched with an SD card to store the information for the BMC, or a storage particle is specially carried to serve as a hard disk for the BMC. When a fault is encountered, the information in the storage medium can be read to help a research and development personnel analyze and diagnose the fault.
According to the design, BIOS firmware uploaded through a network is not stored in a memory (RAM) but is stored in a storage medium by modifying BMC codes, an spi switch is switched to acquire the control right of a read-only memory (BIOS ROM) to erase original old data in the ROM, new BIOS firmware is acquired from the storage medium and is written into the BIOS ROM, and the BIOS firmware stored in the storage medium is deleted after updating is finished. When power failure occurs in the updating process, the BMC can detect abnormal power failure of BIOS updating through some signals after power recovery, then try to update the BIOS again, and start the system after the updating is finished. If the system can not be updated, the system is started by the old BIOS, and the log is recorded and reported. The detailed scheme is as follows:
and 1, sending a command for updating the BIOS at the client by the user, and starting to upload the BIOS. After receiving the command of updating the BIOS, the BMC on the mainboard informs the SPI Switch by pulling up the state of the GPIO1 so as to acquire the control right of a read only memory (BIOS ROM). Then the state of the GPIO2 is pulled up to inform the CPLD, and the CPLD will set itself to the update state after receiving the signal: 1. and (2) lightening a red light emitting diode, 2, pulling up GPIOs 3 and 3 connected with a BMC, locking related signals of starting and restarting of the PCH, and storing the state into an internal storage area of the CPLD, wherein the state information is not lost even if the power is off.
And 2, the BMC receives new BIOS firmware information uploaded by a user through network transmission, checks the information without errors and stores the information into a self-contained storage medium.
And 3, erasing all data in a read-only memory (BIOS ROM).
And 4, writing new BIOS firmware information into a read-only memory (BIOS ROM) according to the file saved in the storage medium.
And 5, after the update is finished, deleting the BIOS firmware file stored in the storage medium by the BMC, and raising the GPIO4 to inform the CPLD that the BIOS update is successfully finished.
And 6, the CPLD knows that the updating is finished through the GPIO4, and exits the updating state of the CPLD: 1, turning off the red diode, 2, pulling down GPIOs 3 and 3 connected with the BMC, unlocking relevant signals of starting and restarting of the PCH, and removing the state from the internal storage area of the CPLD.
And 7, restoring all GPIO states by the BMC: pulling down GPIO1 (returning the control right of a read only memory (BIOS ROM) to PCH), GPIO2 (restoring signal state after updating), and GPIO4 (restoring signal state after updating).
(refer to fig. 6) there are three sets of GPIO communications (GPIO2, GPIO3, GPIO4) between the BMC and the CPLD for informing of the current state. The BMC uses GPIO1 to control the SPI switch. The CPLD controls the PCH signals regarding power-on and restart.
Suppose that the outage occurs in phase 2: at this time, the BMC is receiving the BIOS firmware transmitted by the network, the data cannot be stored after the power-off action occurs, and all information about the uploaded BIOS firmware is lost. After the power system is recovered, the CPLD stores the relevant state information, so that the red diode is turned on, the GPIO3 is at a high level, and the start-up and restart signals of the PCH are locked.
(see fig. 7) the BMC program can be adjusted: a function is first added to enable the BMC to detect the state of GPIO3 after power-up is complete. When the BMC detects the GPIO3 to be in a high state, the action of updating the BIOS firmware occurs but is interrupted. Then the BMC detects whether BIOS firmware information exists in a self-contained storage medium, if yes, the operation of updating the BIOS is continued, and if not, the original old BIOS is used for starting up, recording an update failure log and reporting the update failure log. Because the power failure occurs in the 2-stage, the storage medium does not have BIOS firmware information, so the BMC can start the machine by using the old BIOS information under the condition, records and reports an update failure log, and the machine state is that a red diode is lightened, and a restart button and a start button are out of function, so that field workers are reminded that the machine fails, and the maintenance personnel can conveniently and quickly position the machine.
Suppose that the outage occurs at 3, 4, phase: at this time, the BMC is erasing or writing the firmware, and no matter which stage the power is off, the ROM information is wrong, and the machine cannot be booted. Referring to the above, the state of the GPIO3 is detected after the BMC is powered on, and when the BMC detects a high level, it indicates that the BIOS firmware has been updated but is interrupted. Then the BMC detects whether BIOS firmware information exists in the self-contained storage medium, and since the power failure occurs in stages 3 and 4 (the firmware information is stored in stage 2), the BMC detects that the BIOS firmware exists in the storage medium, and then the BMC renews a read only memory (BIOS ROM). Firstly, the BMC informs the SPI switch to acquire the control authority of the ROM through the GPIO1 (because of power failure, the SPI switch defaults to a priority PCH control read-only memory (BIOS ROM) after power is restored), then erases all data in the ROM, and writes new BIOS firmware information into the ROM from a storage medium to complete BIOS updating. Then as with the normal procedure: delete BIOS firmware information in the storage medium, notify CPLD to exit the update state through GPIO4, control the motherboard to power on, resume GPIO1, GPIO2, the state of GPIO4 (the state of GPIO3 is resumed by CPLD), and so on.
As can be seen from the above, the present embodiment provides a method for processing a power failure during a BIOS update process, including: sending a BIOS updating command at a client, and uploading BIOS firmware information through a network; receiving the BIOS updating command and executing an updating process; when the power failure causes the interruption of the updating process, recording the updating progress before the power failure; and restarting the equipment after the power supply is recovered, continuing to execute an updating process or starting up the equipment by using the old BIOS firmware, and reporting an updating failure log to the client. Through the mutual cooperation of hardware design, the CPLD and the BMC, even if the BIOS is powered off in the updating process of the BMC, the updating of the BIOS can be continuously attempted after the power supply is recovered, the BIOS can be started up by the old BIOS if the BIOS cannot be updated, and then the updating failure log is recorded and reported. The technical problem that the machine cannot be completely started due to midway power-off of BIOS firmware updating is solved.
In order to better implement the above method, the embodiment of the present application further provides a processing apparatus 200 for power failure during the BIOS update process, which may be specifically integrated in an electronic device, where the electronic device may be a terminal, a server, a personal computer, or the like. For example, in this embodiment, the apparatus may include: the receiving unit 201, the executing unit 202, the information recording unit 203, and the information reporting unit 204 are specifically as follows (refer to fig. 8):
(1) a receiving unit 201, configured to receive the command to update the BIOS and receive the BIOS firmware information.
In some embodiments, a command for updating the BIOS is sent at the client, and the BIOS firmware information is uploaded through the network; receiving the BIOS updating command and executing an updating process; when the power failure causes the interruption of the updating process, recording the updating progress before the power failure; and restarting the equipment after the power supply is recovered, continuing to execute an updating process or starting up the equipment by using the old BIOS firmware, and reporting an updating failure log to the client.
In some embodiments, the receiving the update BIOS command, performing an update procedure, including: acquiring the command for updating the BIOS, and pulling up the state of the GPIO1 to acquire the control right of the read only memory; sending a BIOS updating starting signal to the CPLD; downloading the BIOS firmware information, and storing the downloaded BIOS firmware information in a storage medium.
(2) An execution unit 202, configured to execute the update procedure.
In some embodiments, a command for updating the BIOS is sent at the client, and the BIOS firmware information is uploaded through the network; receiving the BIOS updating command and executing an updating process; when the power failure causes the interruption of the updating process, recording the updating progress before the power failure; and restarting the equipment after the power supply is recovered, continuing to execute an updating process or starting up the equipment by using the old BIOS firmware, and reporting an updating failure log to the client.
In some embodiments, the receiving the update BIOS command, performing an update procedure, including: acquiring the command for updating the BIOS, and pulling up the state of the GPIO1 to acquire the control right of the read only memory; sending a BIOS updating starting signal to the CPLD; downloading the BIOS firmware information, and storing the downloaded BIOS firmware information in a storage medium.
In some embodiments, said sending an update BIOS start signal to the CPLD includes: the CPLD enters an updating state by pulling up the GPIO 2; after the CPLD enters the updating state, the CPLD can light up the red light-emitting diode, shield a starting pin and a restarting pin on the PCH and pull up the GPIO 3; and saving the state to a storage area of the CPLD.
In some embodiments, said downloading said BIOS firmware information after being stored in the storage medium comprises: erasing all data in the read-only memory; acquiring the BIOS firmware information stored in a storage medium, and writing the BIOS firmware information into a read-only memory; deleting the BIOS firmware file stored in the storage medium; sending a BIOS updating end signal to the CPLD; and after the updating is finished, restoring the signal state.
In some embodiments, said sending the update BIOS end signal to the CPLD includes: the CPLD is quitted from the updating state by pulling up the GPIO4, the CPLD extinguishes the red diode after acquiring the BIOS updating ending signal, unlocks a starting pin and a restarting pin on the PCH, and pulls down the GPIO 3; and removing the updated state from the CPLD storage area.
In some embodiments, the updating, restoring the signal state, includes: pulling low the GPIO1 to return the read-only memory control right to the PCH; the state pulls GPIO2 and GPIO4 low.
In some embodiments, restarting the device after the power is restored, continuing to execute an update process or booting with an old BIOS firmware, and reporting an update failure log to the client includes: detecting whether the GPIO3 is in a high state; if not, directly starting the equipment; if yes, whether the BIOS firmware information exists in the storage medium is detected.
In some embodiments, the detecting whether the storage medium has the BIOS firmware information includes: detecting whether BIOS firmware information exists in the storage medium; if yes, the state of the GPIO1 is pulled up again to obtain the control right of the read only memory, and a BIOS starting signal is sent to the CPLD for updating; if not, the system is started by the old BIOS firmware, records the failure log of updating the BIOS and reports the failure log to the client.
(3) And the information recording unit 203 is used for interrupting an updating process caused by power failure in the process of updating the BIOS and recording the updating progress before power failure.
In some embodiments, a command for updating the BIOS is sent at the client, and the BIOS firmware information is uploaded through the network; receiving the BIOS updating command and executing an updating process; when the power failure causes the interruption of the updating process, recording the updating progress before the power failure; and restarting the equipment after the power supply is recovered, continuing to execute an updating process or starting up the equipment by using the old BIOS firmware, and reporting an updating failure log to the client.
In some embodiments, the receiving the update BIOS command, performing an update procedure, including: acquiring the command for updating the BIOS, and pulling up the state of the GPIO1 to acquire the control right of the read only memory; sending a BIOS updating starting signal to the CPLD; downloading the BIOS firmware information, and storing the downloaded BIOS firmware information in a storage medium.
In some embodiments, said sending an update BIOS start signal to the CPLD includes: the CPLD enters an updating state by pulling up the GPIO 2; after the CPLD enters the updating state, the CPLD can light up the red light-emitting diode, shield a starting pin and a restarting pin on the PCH and pull up the GPIO 3; and saving the state to a storage area of the CPLD.
In some embodiments, after storing said downloading said BIOS firmware information in a storage medium, comprises: erasing all data in the read-only memory; acquiring the BIOS firmware information stored in a storage medium, and writing the BIOS firmware information into a read-only memory; deleting the BIOS firmware file stored in the storage medium; sending a BIOS updating end signal to the CPLD; and after the updating is finished, restoring the signal state.
In some embodiments, said sending the update BIOS end signal to the CPLD includes: the CPLD is quitted from the updating state by pulling up the GPIO4, the CPLD extinguishes the red diode after acquiring the BIOS updating ending signal, unlocks a starting pin and a restarting pin on the PCH, and pulls down the GPIO 3; and removing the updated state from the CPLD storage area.
In some embodiments, restarting the device after the power is restored, continuing to execute an update process or booting with an old BIOS firmware, and reporting an update failure log to the client includes: detecting whether the GPIO3 is in a high state; if not, directly starting the equipment; if yes, whether the BIOS firmware information exists in the storage medium is detected.
In some embodiments, the detecting whether the storage medium has the BIOS firmware information includes: detecting whether BIOS firmware information exists in the storage medium; if yes, the state of the GPIO1 is pulled up again to obtain the control right of the read only memory, and a BIOS starting signal is sent to the CPLD for updating; if not, the system is started up by the old BIOS firmware, records and updates BIOS failure logs and reports the BIOS failure logs to the client.
(4) And the information reporting unit 204 is used for restarting the equipment after the power supply is recovered, continuing to execute the updating process or starting up the equipment by using the old BIOS firmware, and reporting an updating failure log to the client.
In some embodiments, a command for updating the BIOS is sent at the client, and the BIOS firmware information is uploaded through the network; receiving the BIOS updating command and executing an updating process; when the power failure causes the interruption of the updating process, recording the updating progress before the power failure; and restarting the equipment after the power supply is recovered, continuing to execute an updating process or starting up the equipment by using the old BIOS firmware, and reporting an updating failure log to the client.
In some embodiments, the detecting whether the storage medium has the BIOS firmware information includes: detecting whether BIOS firmware information exists in the storage medium; if yes, the state of the GPIO1 is pulled up again to obtain the control right of the read only memory, and a BIOS starting signal is sent to the CPLD to update the BIOS; if not, the system is started up by the old BIOS firmware, records and updates BIOS failure logs and reports the BIOS failure logs to the client.
As can be seen from the above, the present embodiment provides a processing apparatus 200 for power down during BIOS update, 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 units, even if the power-off behavior occurs in the process of updating the BIOS by the BMC, the BMC can continuously try to update the BIOS after power supply is recovered, and if the BIOS cannot be updated, the BMC can finish boot by the old BIOS, and then records and reports the update failure log. The technical problem that the machine cannot be completely started due to midway power-off of BIOS firmware updating is solved.
In order to better implement the above method, the embodiment of the present application further provides a processing apparatus 300 for power failure during the BIOS update process, which may be specifically integrated in an electronic device, where the electronic device may be a terminal, a server, a personal computer, or the like. For example, in this embodiment, the apparatus may include: the transmitting unit 301, the receiving unit 302, and the display unit 303 are specifically as follows (refer to fig. 9):
(1) a sending unit 301, configured to send a command to update the BIOS and upload the BIOS firmware information.
In some embodiments, a command for updating the BIOS is sent at the client, and the BIOS firmware information is uploaded through a network; receiving the BIOS updating command and executing an updating process; when the power failure causes interruption of the updating process, recording the updating progress before power failure; and restarting the equipment after the power supply is recovered, continuously executing an updating flow or starting the equipment by using the old BIOS firmware, and reporting an updating failure log to the client.
(2) A receiving unit 302, configured to receive a failure log for updating the BIOS;
in some embodiments, a command for updating the BIOS is sent at the client, and the BIOS firmware information is uploaded through the network; receiving the BIOS updating command and executing an updating process; when the power failure causes the interruption of the updating process, recording the updating progress before the power failure; and restarting the equipment after the power supply is recovered, continuing to execute an updating process or starting up the equipment by using the old BIOS firmware, and reporting an updating failure log to the client.
(3) The display unit 303 is configured to display a failure log for updating the BIOS.
In some embodiments, a command for updating the BIOS is sent at the client, and the BIOS firmware information is uploaded through the network; receiving the BIOS updating command and executing an updating process; when the power failure causes the interruption of the updating process, recording the updating progress before the power failure; and restarting the equipment after the power supply is recovered, continuing to execute an updating process or starting up the equipment by using the old BIOS firmware, and reporting an updating failure log to the client.
In a specific implementation, the above units may be implemented as independent entities, or may be combined arbitrarily to be implemented as the same or several entities, and the specific implementation of the above units may refer to the foregoing method embodiments, which are not described herein again.
It will be understood by those skilled in the art that all or part of the steps of the methods of the above embodiments may be performed by instructions or by associated hardware controlled by the instructions, which may be stored in a computer readable storage medium and loaded and executed by a processor.
To this end, the present application provides a storage medium, in which a plurality of instructions are stored, where the instructions can be loaded by a processor to execute the steps in any processing method for power down during BIOS update provided in the present application. For example, the instructions may perform the steps of:
in some embodiments, a command for updating the BIOS is sent at the client, and the BIOS firmware information is uploaded through the network; receiving the BIOS updating command and executing an updating process; when the power failure causes the interruption of the updating process, recording the updating progress before the power failure; and restarting the equipment after the power supply is recovered, continuing to execute an updating process or starting up the equipment by using the old BIOS firmware, and reporting an updating failure log to the client.
In some embodiments, said sending an update BIOS start signal to the CPLD includes: the CPLD enters an updating state by pulling up the GPIO 2; after the CPLD enters an updating state, the CPLD can light a red light-emitting diode, shield a starting pin and a restarting pin on the PCH, and pull up the GPIO 3; and saving the state to a storage area of the CPLD.
In some embodiments, the receiving the update BIOS command, performing an update procedure, including: acquiring the command for updating the BIOS, and pulling up the state of the GPIO1 to acquire the control right of the read only memory; sending a BIOS updating starting signal to the CPLD; downloading the BIOS firmware information, and storing the downloaded BIOS firmware information in a storage medium.
In some embodiments, said sending an update BIOS start signal to the CPLD includes: the CPLD enters an updating state by pulling up the GPIO 2; after the CPLD enters the updating state, the CPLD can light up the red light-emitting diode, shield a starting pin and a restarting pin on the PCH and pull up the GPIO 3; and saving the state to a storage area of the CPLD.
In some embodiments, after storing said downloading said BIOS firmware information in a storage medium, comprises: erasing all data in the read-only memory; acquiring the BIOS firmware information stored in a storage medium, and writing the BIOS firmware information into a read-only memory; deleting the BIOS firmware file stored in the storage medium; sending a BIOS updating end signal to the CPLD; and after the updating is finished, restoring the signal state.
In some embodiments, said sending the update BIOS end signal to the CPLD includes: the CPLD is quitted from the updating state by pulling up the GPIO4, the CPLD extinguishes the red diode after acquiring the BIOS updating ending signal, unlocks a starting pin and a restarting pin on the PCH, and pulls down the GPIO 3; and removing the updated state from the CPLD storage area.
In some embodiments, restarting the device after the power is restored, continuing to execute an update process or booting with an old BIOS firmware, and reporting an update failure log to the client includes: detecting whether the GPIO3 is in a high state; if not, directly starting the equipment; if yes, detecting whether the BIOS firmware information exists in the storage medium.
In some embodiments, the detecting whether the storage medium has the BIOS firmware information includes: detecting whether BIOS firmware information exists in the storage medium; if yes, the state of the GPIO1 is pulled up again to obtain the control right of the read only memory, and a BIOS starting signal is sent to the CPLD for updating; if not, the system is started by the old BIOS firmware, records the failure log of updating the BIOS and reports the failure log to the client.
Wherein the storage medium may include: a Read Only Memory (ROM), a magnetic disk, an SD card, or the like.
In summary, compared with the prior art, the invention has the following beneficial effects: a processing method and device for power failure in BIOS updating process includes: sending a command for updating the BIOS at the client, and uploading BIOS firmware information through a network; receiving the BIOS updating command and executing an updating process; when the power failure causes the interruption of the updating process, recording the updating progress before the power failure; and restarting the equipment after the power supply is recovered, continuing to execute an updating process or starting up the equipment by using the old BIOS firmware, and reporting an updating failure log to the client. Through the mutual cooperation of hardware design, the CPLD and the BMC, even if the BIOS is powered off in the updating process of the BMC, the updating of the BIOS can be continuously attempted after the power supply is recovered, the BIOS can be started up by the old BIOS if the BIOS cannot be updated, and then the updating failure log is recorded and reported. The technical problem that the machine cannot be completely started due to midway power-off of BIOS firmware updating is solved.
It should be understood that the above examples are only for clarity of illustration and are not intended to limit the embodiments. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. And are neither required nor exhaustive of all embodiments. And obvious variations or modifications therefrom are within the scope of the invention.

Claims (11)

1. A processing method for power failure in BIOS updating process is characterized in that the processing method comprises the following steps:
sending a BIOS updating command at a client, and uploading BIOS firmware information through a network;
receiving the BIOS updating command and executing an updating process;
when the power failure causes the interruption of the updating process, recording the updating progress before the power failure;
and restarting the equipment after the power supply is recovered, continuing to execute an updating process or starting up the equipment by using the old BIOS firmware, and reporting an updating failure log to the client.
2. The method as claimed in claim 1, wherein the step of receiving the command for updating the BIOS and executing the update procedure comprises:
acquiring the command for updating the BIOS, and pulling up the state of the GPIO1 to acquire the control right of the read only memory;
sending a BIOS updating starting signal to the CPLD;
downloading the BIOS firmware information, and storing the downloaded BIOS firmware information in a storage medium.
3. The method of claim 2, wherein said sending a BIOS update start signal to the CPLD comprises:
the CPLD enters an updating state by pulling up the GPIO 2;
after the CPLD enters the updating state, the CPLD can light up the red light-emitting diode, shield a starting pin and a restarting pin on the PCH and pull up the GPIO 3;
and saving the state to a storage area of the CPLD.
4. The method of claim 3, wherein storing the information for downloading the BIOS firmware in the storage medium comprises:
erasing all data in the read-only memory;
acquiring the BIOS firmware information stored in a storage medium, and writing the BIOS firmware information into a read-only memory;
deleting the BIOS firmware file stored in the storage medium;
sending a BIOS updating end signal to the CPLD;
and after the updating is finished, restoring the signal state.
5. The method of claim 4, wherein after sending the BIOS update end signal to the CPLD, the method further comprises:
the CPLD is quitted from the updating state by pulling up the GPIO4, the CPLD extinguishes the red diode after acquiring the BIOS updating ending signal, unlocks a starting pin and a restarting pin on the PCH, and pulls down the GPIO 3;
and removing the updated state from the CPLD storage area.
6. The method of claim 1, wherein restoring the signal state after the update process comprises:
pulling low the GPIO1 to return the read-only memory control right to the PCH;
the state pulls GPIO2 and GPIO4 low.
7. The method as claimed in claim 1, wherein restarting the device after the power is restored to continue executing the update process or booting with the old BIOS firmware, and reporting an update failure log to the client comprises:
detecting whether the GPIO3 is in a high state;
if not, directly starting the equipment;
if yes, whether the BIOS firmware information exists in the storage medium is detected.
8. The method of claim 7, wherein the detecting whether the storage medium has the BIOS firmware information comprises:
detecting whether BIOS firmware information exists in the storage medium;
if yes, the state of the GPIO1 is pulled up again to obtain the control right of the read only memory, and a BIOS starting signal is sent to the CPLD for updating;
if not, the system is started up by the old BIOS firmware, records and updates BIOS failure logs and reports the BIOS failure logs to the client.
9. A processing device for power failure in BIOS updating process is characterized in that the processing device comprises:
the receiving unit is used for receiving the BIOS updating command and receiving the BIOS firmware information;
an execution unit configured to execute the update flow;
the information recording unit is used for interrupting an updating process caused by power failure in the process of updating the BIOS and recording the updating progress before power failure;
and the information reporting unit is used for restarting the equipment after the power supply is recovered, continuing to execute the updating process or starting up the equipment by using the old BIOS firmware, and reporting an updating failure log to the client.
10. A processing device for power failure in BIOS updating process is characterized in that the processing device comprises:
the sending unit is used for sending a command for updating the BIOS and uploading BIOS firmware information;
a receiving unit, configured to receive a failure log for updating a BIOS;
and the display unit is used for displaying the BIOS updating failure log.
11. A storage medium having stored thereon a computer program, characterized in that when the computer program runs on a computer, the computer is caused to execute a processing method for power failure during BIOS update according to any one of claims 1 to 9.
CN202210376769.8A 2022-04-11 2022-04-11 Method and device for processing power failure in BIOS updating process Pending CN114911641A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210376769.8A CN114911641A (en) 2022-04-11 2022-04-11 Method and device for processing power failure in BIOS updating process

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210376769.8A CN114911641A (en) 2022-04-11 2022-04-11 Method and device for processing power failure in BIOS updating process

Publications (1)

Publication Number Publication Date
CN114911641A true CN114911641A (en) 2022-08-16

Family

ID=82764414

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210376769.8A Pending CN114911641A (en) 2022-04-11 2022-04-11 Method and device for processing power failure in BIOS updating process

Country Status (1)

Country Link
CN (1) CN114911641A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024119787A1 (en) * 2022-12-06 2024-06-13 苏州元脑智能科技有限公司 Method and apparatus for amd server system installation power-off processing, device and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2024119787A1 (en) * 2022-12-06 2024-06-13 苏州元脑智能科技有限公司 Method and apparatus for amd server system installation power-off processing, device and medium

Similar Documents

Publication Publication Date Title
KR100389206B1 (en) Apparatus and method for protecting failure of computer operating system
US8713296B2 (en) Apparatus for restoring setting information of a board management controller from a backup memory before loading an OS when a system board is replaced
EP1899814B1 (en) Firmware update for consumer electronic device
US8046575B2 (en) Method for automatically restoring system configuration with a single key
WO2018095107A1 (en) Bios program abnormal processing method and apparatus
TWI633487B (en) Method and computer system for automatically recovering the bios image file
US20190079748A1 (en) Server with double-firmware storage space and firmware update method therefor
KR100952585B1 (en) Method and system for automatic recovery of an embedded operating system
CN111506454A (en) Method and system for recovering and updating basic input/output system
CN108874459B (en) Rapid starting method and device based on virtualization technology
CN106980493B (en) Firmware management method and device
EP2750034B1 (en) Electronic device having updatable bios and bios updating method thereof
US10824517B2 (en) Backup and recovery of configuration files in management device
US20090210690A1 (en) Method of updating basic input output system and module and computer system implementing the same
CN114911641A (en) Method and device for processing power failure in BIOS updating process
CN113641537A (en) Starting system, method and medium for server
CN111078452A (en) BMC firmware image recovery method and device
TW202131170A (en) Firmware corruption recovery
CN113220324B (en) CPLD remote updating method, system and medium
KR100832269B1 (en) Program update method and system for wireless communication terminal
CN115951949A (en) Recovery method and device for configuration parameters of BIOS (basic input output System) and computing equipment
TWI808362B (en) Computer system and method capable of self-monitoring and restoring an operation of operating system
TWI541724B (en) Circuit and method for writing bios code into bios
CN114356062B (en) Power control system of server and related power control method thereof
CN113687842A (en) Server and mainboard module capable of updating firmware without power failure

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination