BIOS recovery method, system and equipment and storage medium

By storing the first BIOS and the second BIOS in a single Flash chip and using the address conversion module to switch mode for BIOS recovery, the problem of increasing cost and complexity in the prior art is solved, and effective recovery and maintenance of BIOS is achieved.

CN119668940APending Publication Date: 2025-03-21EVOC INTELLIGENT TECH +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411762841.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-03
Publication Date
2025-03-21

AI Technical Summary

Technical Problem

The existing BIOS recovery method requires additional Flash chips and complex hardware circuits, which increases cost and design complexity, and can only switch to the backup BIOS under the abnormal situation of the main BIOS, and the main BIOS cannot be restored.

Method used

By storing the first BIOS and the second BIOS in a single Flash chip, and using the address translation module to switch to the address redirect mode when the first BIOS is damaged, performing the second BIOS startup, and then switching back to the transparent transmission mode to access the first BIOS area for updates, the recovery of the first BIOS is completed.

Benefits of technology

It is realized that while reducing costs and hardware design complexity, the damaged BIOS can be restored, and the damaged first BIOS can be started and started when the first BIOS is abnormal, and the damaged first BIOS can be repaired.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119668940A_ABST
    Figure CN119668940A_ABST
Patent Text Reader

Abstract

The invention discloses a BIOS recovery method, system and device and a storage medium, and relates to the technical field of computers.The method comprises the steps that when a damage signal of a first BIOS is detected, an address conversion module is switched from a transparent transmission mode to an address redirection mode, and starting of one or more second BIOSs is executed; after the second BIOS is started, the address conversion module is switched from an address redirection mode to a transparent transmission mode, and a corresponding area of the first BIOS is accessed in the transparent transmission mode; and updating the first BIOS in the corresponding region of the first BIOS to complete the recovery of the first BIOS. According to the scheme, the first BIOS and the second BIOS are stored in the Flash chip, when the first BIOS is abnormal and cannot be started, the BIOS recovery mode is triggered, the second BIOS is started, the damaged first BIOS is further repaired, cost is saved, hardware design complexity is reduced, and BIOS maintenance and upgrading are facilitated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer technology, and in particular to a BIOS recovery method, system, device, and storage medium. Background Art

[0002] When a computer motherboard is powered on, it is necessary to execute the BIOS (Basic Input Output System), load the operating system boot program through the BIOS, and then further load and enter the operating system through the boot program. The BIOS is mainly stored in flash memory. If the BIOS stored in the flash chip is damaged due to an unexpected power outage or other various reasons during the BIOS update process, the motherboard will no longer be able to boot.

[0003] The existing BIOS recovery method is a dual Flash backup BIOS method, which places two Flash chips on the motherboard. When the BIOS of the main Flash chip is damaged, the BIOS of another Flash chip is switched to start the computer through hardware circuits and chip selection. This method adds an extra Flash chip and switching circuit, which increases the extra cost. In addition, the BIOS switching of this solution requires complex hardware circuit support. It can only switch to the backup BIOS to start when the main BIOS is abnormal, but there is no method to restore the main BIOS. Summary of the invention

[0004] The main purpose of this application is to provide a BIOS recovery method, system, device and storage medium, aiming to solve the technical problem of how to recover a damaged BIOS while reducing costs and hardware design complexity.

[0005] To achieve the above object, the present application proposes a BIOS recovery method, which is applied to a BIOS recovery system, wherein the BIOS recovery system includes a basic input / output system BIOS and an address translation module, wherein the BIOS includes a first BIOS and at least one second BIOS stored in different areas of a single Flash, and the method includes:

[0006] When a damage signal of the first BIOS is detected, the address conversion module is switched from a transparent transmission mode to an address redirection mode to execute the startup of one or more of the second BIOS;

[0007] After starting from the second BIOS, switching the address conversion module from the address redirection mode to the transparent transmission mode, and accessing the corresponding area of ​​the first BIOS in the transparent transmission mode;

[0008] The first BIOS is updated in a corresponding area of ​​the first BIOS to complete recovery of the first BIOS.

[0009] In one embodiment, the step of switching the address conversion module from the transparent transmission mode to the address redirection mode and executing one or more startups of the second BIOS includes:

[0010] Switching the address conversion module from the transparent transmission mode to the address redirection mode;

[0011] In the address redirection mode, parsing and redirecting the corresponding area of ​​the first BIOS to access one or more corresponding areas of the second BIOS;

[0012] The one or more second BIOS boots are executed by accessing corresponding areas of the one or more second BIOS.

[0013] In one embodiment, the step of switching the address conversion module from the transparent transmission mode to the address redirection mode includes:

[0014] Detecting whether a timer on the address conversion module exceeds a preset time;

[0015] If so, the operation unit of the address conversion module switches the working mode of the address conversion module from the transparent transmission mode to the address redirection mode.

[0016] In one embodiment, the step of parsing and redirecting the corresponding area of ​​the first BIOS in the address redirection mode to access one or more corresponding areas of the second BIOS includes:

[0017] Get read and write instructions and address information;

[0018] Reconstructing the address information based on the read and write instructions through the address conversion module to obtain new address information;

[0019] Based on the new address information, an access area is converted from a corresponding area of ​​the first BIOS to a corresponding area of ​​the one or more second BIOS.

[0020] In one embodiment, before the step of switching the address conversion module from the address redirection mode to the transparent transmission mode, the method further includes:

[0021] Sending a pulse signal to the address conversion module through a preset control instruction;

[0022] An instruction for repairing the damaged first BIOS is obtained according to the pulse signal through the address conversion module.

[0023] In one embodiment, the step of switching the address conversion module from the address redirection mode to the transparent transmission mode and accessing the corresponding area of ​​the first BIOS in the transparent transmission mode includes:

[0024] Based on an instruction to repair the damaged first BIOS, switching the address translation module from the address redirection mode to the transparent transmission mode;

[0025] In the transparent transmission mode, the access area is converted from the corresponding area of ​​the second BIOS to the corresponding area of ​​the first BIOS.

[0026] In one embodiment, the step of updating the first BIOS in the corresponding area of ​​the first BIOS to complete the recovery of the first BIOS includes:

[0027] Use the BIOS update tool to obtain the new BIOS image file;

[0028] A new BIOS image file is written into the corresponding area of ​​the first BIOS to overwrite the damaged image file of the first BIOS, thereby completing the recovery of the first BIOS.

[0029] In addition, to achieve the above purpose, the present application also proposes a BIOS recovery system, the BIOS recovery system comprising:

[0030] A switching module, the switching module comprising a first switching unit and a second switching unit;

[0031] The first switching unit is used to switch the address conversion module from the transparent transmission mode to the address redirection mode to execute the startup of one or more second BIOS when a damage signal of the first BIOS is detected;

[0032] The second switching unit is used to switch the address conversion module from the address redirection mode to the transparent transmission mode after starting from the second BIOS, and access the corresponding area of ​​the first BIOS in the transparent transmission mode;

[0033] An update module is used to update the first BIOS in a corresponding area of ​​the first BIOS to complete the recovery of the first BIOS.

[0034] In addition, to achieve the above objectives, the present application also proposes a BIOS recovery device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the BIOS recovery method described above.

[0035] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the BIOS recovery method described above are implemented.

[0036] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, wherein the computer program product includes a computer program, and when the computer program is executed by a processor, the steps of the BIOS recovery method described above are implemented.

[0037] The embodiment of the present application provides a BIOS recovery method, system, device and storage medium. The BIOS includes a first BIOS and a second BIOS. The method includes, when a damage signal of the first BIOS is detected, switching the address conversion module from the transparent transmission mode to the address redirection mode, and executing one or more of the second BIOS startups; after starting from the second BIOS, switching the address conversion module from the address redirection mode to the transparent transmission mode, and accessing the corresponding area of ​​the first BIOS in the transparent transmission mode; updating the first BIOS in the corresponding area of ​​the first BIOS to complete the recovery of the first BIOS. The method stores the first BIOS and the second BIOS in a Flash chip. When the first BIOS cannot be started due to abnormality, the BIOS recovery mode is triggered, and the second BIOS starts to start, and the damaged first BIOS is further repaired, thereby reducing costs and hardware design complexity. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.

[0039] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0040] Figure 1 A flowchart of the first embodiment of the BIOS recovery method of the present application is provided;

[0041] Figure 2A BIOS recovery system architecture diagram of the BIOS recovery method provided in Embodiment 1 of the present application;

[0042] Figure 3 A working principle diagram of a trigger device of a BIOS recovery method provided in Embodiment 1 of the present application;

[0043] Figure 4 A working principle diagram of the address conversion module provided in Example 1 of the present application;

[0044] Figure 5 This is a schematic diagram of the module structure of the BIOS recovery system according to an embodiment of the present application;

[0045] Figure 6 This is a schematic diagram of the device structure of the hardware operating environment involved in the BIOS recovery method in the embodiment of the present application.

[0046] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0047] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.

[0048] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.

[0049] The main solution of the embodiment of the present application is: when a damage signal of the first BIOS is detected, the address conversion module is switched from the transparent transmission mode to the address redirection mode, and one or more second BIOS startups are executed; after starting from the second BIOS, the address conversion module is switched from the address redirection mode to the transparent transmission mode, and in the transparent transmission mode, the corresponding area of ​​the first BIOS is accessed; the first BIOS is updated in the corresponding area of ​​the first BIOS to complete the recovery of the first BIOS.

[0050] Since the existing BIOS recovery method is a dual Flash backup BIOS method, this method places two Flash chips on the motherboard. When the BIOS of the main Flash chip is damaged, the BIOS of another Flash chip is switched to start the computer through hardware circuits and chip selection. This method adds an extra Flash chip and switching circuit, which increases the extra cost. In addition, the BIOS switching of this solution requires complex hardware circuit support. It can only switch to the backup BIOS to start when the main BIOS is abnormal, but there is no method to restore the main BIOS.

[0051] The present application provides a solution, including, when a damage signal of the first BIOS is detected, switching the address conversion module from the transparent transmission mode to the address redirection mode, and executing one or more second BIOS startups; after starting from the second BIOS, switching the address conversion module from the address redirection mode to the transparent transmission mode, and accessing the corresponding area of ​​the first BIOS in the transparent transmission mode; updating the first BIOS in the corresponding area of ​​the first BIOS to complete the recovery of the first BIOS. The solution stores the first BIOS and the second BIOS in a Flash chip, and when the first BIOS cannot be started due to abnormality, the BIOS recovery mode is triggered, and the second BIOS is started to further repair the damaged first BIOS, saving costs, reducing the complexity of hardware design, and facilitating the maintenance and upgrade of the BIOS.

[0052] The professional terms involved in the embodiments of this application are:

[0053] BIOS: Basic Input Output System, the Chinese name is "Basic Input / Output System". The main functions of BIOS are power-on self-test, hardware detection when starting the computer, hardware device initialization, and creation of BIOS interrupts.

[0054] UEFI Shell: Part of the Unified Extensible Firmware Interface (UEFI) specification, it is a command line interface that allows users to interact with system hardware before the operating system boots. It is similar to the DOS (Disk Operating System) command prompt in the traditional BIOS environment, but more powerful and supports more advanced functions and script execution. UEFI Shell can be used to manage disk partitions, load drivers, boot the operating system, or run various UEFI applications.

[0055] Flash chip: Flash memory chip is a non-volatile memory, which means that it can still save data when the power is off. It is one of the main forms of data storage in electronic devices and is widely used in USB flash drives, solid-state drives (SSDs), BIOS storage, etc.

[0056] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, etc. The following takes a personal computer as an example to illustrate this embodiment and the following embodiments.

[0057] Based on this, the embodiment of the present application provides a BIOS recovery method, referring to Figure 1 , Figure 1 This is a flowchart of the first embodiment of the BIOS recovery method of the present application.

[0058] In this embodiment, the BIOS recovery method includes steps S10 to S40:

[0059] Step S10, when a damage signal of the first BIOS is detected, the address conversion module is switched from the transparent transmission mode to the address redirection mode, and one or more second BIOS startups are executed;

[0060] It should be noted that the method of this embodiment is applied to a BIOS recovery system, which includes but is not limited to a host chip, a trigger device, an address conversion module, and a Flah chip.

[0061] In addition, it should be noted that the address conversion module includes but is not limited to an address redirection mode and a transparent transmission mode.

[0062] The current BIOS recovery method is a dual Flash backup BIOS method, that is, when the main Flash chip BIOS is damaged, the BIOS of another Flash chip is switched to start the computer through hardware circuits and chip selection. Since the existing technology adds extra costs, and the BIOS switching of this solution requires complex hardware circuit support, it can only switch to the backup BIOS to start when the main BIOS is abnormal, but there is no method to restore the main BIOS.

[0063] Therefore, this embodiment proposes a method to divide a single Flash chip into two areas, the corresponding area of ​​the first BIOS stores a first BIOS that can be normally started, hereinafter referred to as the first BIOS, and the corresponding area of ​​the second BIOS stores a backup second BIOS that can be normally started, hereinafter referred to as the second BIOS, wherein there is at least one second BIOS. And the first BIOS and the second BIOS have the same file size. This embodiment is described by taking a first BIOS and a second BIOS stored in a Flash chip as an example.

[0064] Under normal circumstances of BIOS, the address conversion module is in transparent transmission mode by default. When it is detected that the first BIOS is damaged and the host cannot be turned on due to power failure during the BIOS update process, the working mode of the address conversion module is switched from transparent transmission mode to address redirection mode, and the startup of the second BIOS is executed.

[0065] Furthermore, the step of "switching the working mode of the address conversion module from the transparent transmission mode to the address redirection mode and executing the startup of the second BIOS" further includes steps S11 to S13:

[0066] Step S11, switching the address conversion module from the transparent transmission mode to the address redirection mode;

[0067] It should be noted that the address redirection mode is a specific operation mode implemented by software or programmable logic devices in the address translation module, which is used to parse and modify the data transmission between the chip initiating data access and the accessed storage chip to change the access method of the memory or storage device. In this mode, the system will redirect the access request for a specific address range to another different address range.

[0068] The transparent transmission mode is mainly responsible for ensuring that data can reach the destination accurately along the established path without changing the data itself.

[0069] Optionally, when the host is normally started from the first BIOS, the working mode of the address conversion module is in the transparent transmission mode. Once the first BIOS is damaged and the host cannot be started due to power failure during the BIOS update process, the BIOS recovery system detects a damage signal of the first BIOS and sends the damage signal to a trigger device in the BIOS recovery system. After receiving the damage signal, the trigger device sends a signal to the address conversion module, so that the address conversion module switches the transparent transmission mode to the address redirection mode based on the signal. In addition, in the present embodiment, the trigger device is a GPIO (General Purpose Input / Output) pin or an SMBUS (System Management Bus).

[0070] Step S12, in the address redirection mode, parsing and redirecting the corresponding area of ​​the first BIOS to access one or more corresponding areas of the second BIOS;

[0071] It should be noted that, since both the first BIOS and the second BIOS are stored in the Flash chip, the Flash chip is divided into two areas, including an area corresponding to the first BIOS and an area corresponding to the second BIOS.

[0072] In addition, it should be noted that the address conversion module includes but is not limited to programmable devices such as MCU (Microcontroller Unit) or CPLD (Complex Programmable Logic Device).

[0073] Optionally, when the address conversion module is triggered by the trigger device to switch the working mode to the address redirection mode, the address conversion module sends a reset signal to the host chip, so that the host chip re-reads the BIOS image file and obtains the read instruction and the address information of the first BIOS. When the host chip sends a read instruction and specifies the address information of the first BIOS, this information is sent to the address conversion module. The address conversion module recognizes that this is an access request to the first BIOS, and because it is already in the address redirection mode, the address conversion module remaps the access area to the area corresponding to the second BIOS, that is, the address data stored in the address of the first BIOS is constructed to obtain new address data, and the new address data is the address data that allows access to the area corresponding to the second BIOS.

[0074] The constructed read instruction and new address data are forwarded to the Flash chip by the address conversion module. The Flash chip allows the host chip to access the area corresponding to the second BIOS and executes the startup of the second BIOS according to the received instruction and address data.

[0075] Step S13: Execute the startup of one or more second BIOS by accessing the corresponding areas of the one or more second BIOS.

[0076] Optionally, after the Flash chip receives the read instruction and the address data allowing access to the second BIOS area, the data in the second BIOS area is returned to the address conversion module, and the address conversion module then returns the data in the second BIOS area to the host chip, thereby enabling the host chip to start up by executing the second BIOS.

[0077] Through the above steps, after detecting the reset signal, the access can be automatically redirected from the first BIOS to the second BIOS, so that the backup BIOS can be used to complete the system startup when the main BIOS is unavailable, thereby enhancing the reliability and security of the system and saving the design cost of dual FLSAS.

[0078] Step S20, switching the address conversion module from the address redirection mode to the transparent transmission mode, and accessing the corresponding area of ​​the first BIOS in the transparent transmission mode;

[0079] Optionally, when the second BIOS is used to start the system and enter the UEFI shell environment, the host chip uses a specific control instruction to control the GPIO pin of the host chip to send a pulse signal to the address conversion module. After receiving the pulse signal, the address conversion module believes that the host is about to repair the damaged image file of the first BIOS and switches the address conversion module back to the transparent transmission mode. In the transparent transmission mode, the address conversion module no longer redirects any address for the memory access request, but directly accesses the corresponding area of ​​the first BIOS in the Flash chip.

[0080] Among them, it should be particularly noted that, in this embodiment, the specific control instruction used by the host chip refers to the UEFI shell instruction, which is programmed by BIOS and integrated in the UEFI shell operating environment. During the second BIOS startup process, after the host memory is initialized, the BIOS will be copied to the host memory for execution. When starting from the second BIOS and entering the UEFI Shell, the UEFI shell and the operating environment are actually in the host memory, not in the Flash chip. Therefore, the address conversion module is triggered by the specific instructions in the UEFI shell to switch to the transparent transmission mode, and the Flash area accessed by the host chip is changed back to the area corresponding to the first BIOS, which will not destroy the operating environment of the UEFI Shell.

[0081] Step S30: updating the first BIOS in a corresponding area of ​​the first BIOS to complete recovery of the first BIOS.

[0082] Optionally, first load the BIOS update tool from the web platform, and obtain a new BIOS image file from a USB flash drive, hard disk, etc. In the UEFI shell environment, run the pre-downloaded BIOS update tool to verify the integrity of the new BIOS image file, for example, by checking and checking to ensure that the file is not damaged or tampered with. And use the BIOS update tool to write the new BIOS image file to the target area, that is, the corresponding area of ​​the first BIOS. During the writing process, the BIOS update tool gradually overwrites the damaged image file of the first BIOS with the new BIOS image file, thereby completing the recovery of the damaged first BIOS.

[0083] The above-mentioned embodiment method includes switching the address conversion module to the address redirection mode to execute the startup of the second BIOS when a damage signal of the first BIOS is detected; switching the address conversion module to the transparent transmission mode to access the corresponding area of ​​the first BIOS; updating the first BIOS in the corresponding area of ​​the first BIOS to complete the recovery of the damaged BIOS. This solution stores the first BIOS and the second BIOS in a Flash chip. When the first BIOS fails to start due to an abnormality, the recovery mode is triggered by software or hardware, and the second BIOS starts to start, further repairing the damaged first BIOS, saving costs, reducing the complexity of hardware design, and facilitating the maintenance and upgrade of the BIOS.

[0084] For example, in order to help understand the implementation process of the BIOS recovery method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 2 , Figure 2 A BIOS recovery system architecture diagram is provided, specifically:

[0085] This embodiment provides a BIOS recovery system, including a host chipset, a trigger device, an address conversion module and a single Flash chip. The host chip is a host integrated chip, such as a PCH, etc., which reads the BIOS in the Flash for the host to boot up; the address conversion module is connected to the host chipset and the Flash chip, and is used to redirect the address of the host chip to access the Flash chip, thereby controlling the content read from the Flash by the host chipset; the address conversion module has two working modes: transparent transmission and address redirection; the trigger device is used to trigger the address conversion module to switch the working mode; the Flash chip is used to store the host BIOS, and the capacity of the Flash chip used in this embodiment needs to be able to store at least two BIOS programs.

[0086] In this embodiment, a single Flash chip is divided into two areas, and the corresponding area of ​​the first BIOS stores a BIOS that can be normally started, hereinafter referred to as the first BIOS, and the corresponding area of ​​the second BIOS stores the first BIOS that can be normally started, hereinafter referred to as the second BIOS. And the first BIOS and the second BIOS are the same size. Under normal startup conditions, the address conversion mode is in a transparent working mode by default. After forwarding through the address conversion module, the host chipset can access the corresponding area of ​​the first BIOS in the Flash chip and execute the first BIOS startup. When the first BIOS is damaged due to power failure during the BIOS update process and cannot be started, the address conversion module is triggered by a trigger device, and the transparent transmission mode of the address conversion module is switched to the address redirection mode, and the Flash address accessed by the host chip is parsed and redirected, and the access area is changed to the corresponding area of ​​the second BIOS, so that the host chip executes the second BIOS startup.

[0087] After the host is turned on, the first BIOS is further restored. The recovery process is performed under the UEFI shell. It should be noted that during the host startup process, after the host memory is initialized, the BIOS will be copied to the host memory for execution. Therefore, after the second BIOS is turned on to enter the UEFI shell environment, the address conversion module can be triggered again by the trigger device to switch the address redirection mode of the address conversion module to the transparent transmission mode. In this transparent transmission mode, the area where the host chip accesses the Flash is changed from the corresponding area of ​​the second BIOS back to the corresponding area of ​​the first BIOS. Since the second BIOS is executed in the host memory at this time, the address conversion module switches the working mode and does not destroy the UEFI shell operating environment. At this time, the BIOS update tool can be used under the UEFI shell to obtain a new BIOS image file from a U disk, hard disk, etc., and perform an update operation. The updated BIOS image file will be written to the corresponding area of ​​the first BIOS, and the damaged image file of the first BIOS will be overwritten with the new BIOS image file, thereby achieving the purpose of restoring the damaged BIOS.

[0088] For example, in order to help understand the implementation process of the BIOS recovery method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 3 , Figure 3 A working principle diagram of a trigger device of a BIOS recovery method is provided, specifically:

[0089] The trigger device is a signal sending system that can send a signal to the address conversion module, so that the address conversion module switches the working mode according to the received signal, and the trigger device can be a GPIO pin or a bus such as SMBUS.

[0090] Based on the above, in this embodiment, the trigger device uses a GPIO pin of the host chip, and combines the BIOS program and the timer of the address conversion module to form an automatic trigger device. When the automatic trigger device detects a damage signal of the first BIOS, the working mode of the address conversion module is switched from the transparent transmission mode to the address redirection mode, so that the host chip can start from the second BIOS, thereby further repairing the damaged first BIOS stored in the first area.

[0091] Specifically, the GPIO of the host chip is used as a trigger signal. When the machine is powered on and started from the first BIOS, the timer in the address conversion module starts timing, and the timeout period is set to 5 times the normal boot time of the host. If the host chip starts normally from the first BIOS, when the first BIOS is about to run, the GPIO will be controlled to send a pulse signal to the address conversion module. After receiving the pulse signal, the address conversion module considers that the first BIOS has been started normally, and the timer will be turned off. At this time, the address conversion module is in transparent transmission working mode. When the first BIOS is damaged and the host chip starts from the first BIOS, since the first BIOS has been damaged, the host chip cannot control the GPIO to send a signal. At this time, the timer of the address conversion module continues to count. When the timing exceeds the preset time, where the preset time is 5 times longer than the normal boot time, the operation unit of the address conversion module switches the working mode of the address conversion module from the transparent transmission mode to the address redirection mode, and sends a reset signal to the host chip, so that the host chip re-reads the BIOS image file. At this time, the host chip will access the second BIOS area through the address conversion module, start from the second BIOS, and after entering the UEFI shell, use the new BIOS image file through the BIOS update tool to repair the damaged image file of the first BIOS.

[0092] In addition, before using the BIOS update tool, the host chip uses a specific UEFI shell instruction to control the GPIO to send two pulse signals to the address conversion module. After receiving the pulse signals, the address conversion module believes that the host is about to repair the first BIOS. The address conversion module switches the working mode from the address redirection mode back to the transparent transmission mode. At this time, the area accessible to the host chip is the corresponding area of ​​the first BIOS. Further, in the corresponding area of ​​the first BIOS, the BIOS update tool is used to write the new BIOS image file into the corresponding area of ​​the first BIOS to overwrite the damaged image file of the first BIOS until the first BIOS is repaired.

[0093] For example, in order to help understand the implementation process of the BIOS recovery method obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 4 , Figure 4 A working principle diagram of an address translation module of a BIOS recovery method is provided, specifically:

[0094] In this embodiment, the address conversion module can be a programmable device such as MCU or CPLD, which is used to control the host chip to access the Flash chip area, so that when the main BIOS (i.e., the first BIOS) is abnormal, the computer can be started from the backup BIOS (i.e., the second BIOS).

[0095] Based on this, the process of reading and writing Flash by the host chip when the address translation module is in different working modes is explained in detail.

[0096] Assuming that the BIOS size is 8MB, for the Flash chipset, its access address range is 0x000000~0x7FFFFF. To accommodate the main BIOS and the backup BIOS, the Flash chip capacity must be at least twice the BIOS size, that is, the Flash size is 16MB. Divide the Flash into two areas of the same size, namely the corresponding area of ​​the first BIOS and the corresponding area of ​​the second BIOS. The corresponding area of ​​the first BIOS and the corresponding area of ​​the second BIOS store the first BIOS (main BIOS) and the second BIOS (backup BIOS) respectively. Among them, the address range of the first BIOS is 0x000000~0x7FFFFF, and the address range of the second BIOS is 0x800000~0xFFFFFF, both of which are 8MB. For the Flash chipset, the access address range is consistent with the Flash address space range occupied by the BIOS image file, which is 0x000000~0x7FFFFF.

[0097] When the first BIOS is normal, the working mode of the address conversion module is in transparent transmission mode. At this time, if the host chip is ready to read the address 0x000010, the host chip will send a read instruction and the address 0x000010 to the address conversion module. After receiving the read instruction and the address 0x000010, the address conversion module will send these instructions and data to the Flash chip. After receiving the read instruction and the address 0x000010, the Flash chip will send the data stored at the address 0x000010, hereinafter referred to as the first address data, to the address conversion module. After receiving the first address data, the address conversion module sends the first address data to the host chip. At this point, the host chip completes a Flash chip read operation.

[0098] If the host chip is ready to write to the address 0x000010, it will send the write instruction, the address 0x000010 and the first address data to the address conversion module in sequence through the bus. After receiving the address conversion module, the write instruction, the address 0x000010 and the first address data are directly forwarded to the Flash chip. After the Flash chip receives the write instruction, the target address 0x000010 and the first address data, it identifies the write operation for the address 0x000010 by parsing the write instruction. The Flash chip writes the first address data to the specified address 0x000010. When the write operation is completed, the Flash chip returns a confirmation signal or status code to the host chip, indicating that the write operation is successfully completed. This completes the process of the host chip reading and writing the Flash chip when the address conversion module is in transparent transmission mode when the first BIOS is normal.

[0099] When the first BIOS is damaged and the host cannot be turned on, the address conversion module is triggered by the trigger device to switch its working mode from the transparent transmission mode to the address redirection mode. At this time, when the host chip is ready to read the data at the address 0x000010, it will send a read instruction and the address 0x000010 to the address forwarding module. After receiving the address conversion module, the address 0x000010 is reconstructed to obtain 0x800010 (0x800000+0x10), which is within the access address range of the corresponding area of ​​the second BIOS. Subsequently, the address conversion module sends the read instruction and 0x800010 (0x800000+0x10) to the Flash chip. After receiving the instruction, the Flash chip returns the data stored at the address 0x800010 (0x800000+0x10), hereinafter referred to as the second address data, to the address conversion module. The address conversion module then returns the second address data to the host chip, completing the host chip's Flash read operation when the first BIOS is damaged.

[0100] In this process, unlike the transparent transmission mode, the address sent to the Flash is 0x800000 + host chip access address, that is, 8MB + host chip access address. For the host chip, the access address is still 0x000010, but the returned data is the data in the second BIOS. Similarly, the host chip's write enable, read, write, erase and other operations on the corresponding area of ​​the first BIOS in the Flash will be redirected to operations on the corresponding area of ​​the second BIOS, thereby achieving the purpose of the host chip switching to the second BIOS to start the computer.

[0101] When the host chip starts up by executing the second BIOS and enters the UEFI shell, the working mode of the address translation module is switched from the address redirection mode to the transparent transmission mode through the trigger device again, and then a new BIOS image file is obtained through the BIOS update tool, and the new BIOS image file is written from the USB flash drive or hard disk to the corresponding area of ​​the first BIOS, so as to use the new BIOS image file to overwrite the damaged image file of the first BIOS, thereby realizing the function of restoring the damaged BIOS.

[0102] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the BIOS recovery method of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.

[0103] This application also provides a BIOS recovery system, please refer to Figure 5 , the BIOS recovery system comprises:

[0104] A switching module 10, the switching module comprising a first switching unit and a second switching unit;

[0105] The first switching unit is used to switch the address conversion module from the transparent transmission mode to the address redirection mode to execute one or more second BIOS startups when a damage signal of the first BIOS is detected;

[0106] The second switching unit is used to switch the address conversion module to a transparent transmission mode after starting from the second BIOS, so as to access a corresponding area of ​​the first BIOS;

[0107] The updating module 20 is used to update the first BIOS in a corresponding area of ​​the first BIOS to complete the recovery of the damaged first BIOS.

[0108] The BIOS recovery system provided by the present application adopts the BIOS recovery method in the above embodiment, which can solve the technical problem of BIOS recovery. Compared with the prior art, the beneficial effects of the BIOS recovery system provided by the present application are the same as the beneficial effects of the BIOS recovery method provided by the above embodiment, and other technical features of the BIOS recovery system are the same as the features disclosed in the above embodiment method, which will not be repeated here.

[0109] The present application provides a BIOS recovery device, which includes: at least one processor; and a memory that is communicatively connected to the at least one processor; wherein the memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the BIOS recovery method in the above-mentioned embodiment 1.

[0110] Reference below Figure 6 , which shows a schematic diagram of the structure of a BIOS recovery device suitable for implementing an embodiment of the present application. The BIOS recovery device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6 The BIOS recovery device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.

[0111] like Figure 6 As shown, the BIOS recovery device may include a processing system 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage system 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the BIOS recovery device are also stored. The processing system 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input system 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output system 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage system 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication system 1009. Communication system 1009 can allow BIOS recovery device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows a BIOS recovery device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or less systems can be implemented or have alternatively.

[0112] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication system, or installed from a storage system 1003, or installed from a ROM 1002. When the computer program is executed by the processing system 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.

[0113] The BIOS recovery device provided by the present application adopts the BIOS recovery method in the above embodiment, which can solve the technical problem of how to recover the damaged BIOS under the premise of reducing the cost and hardware design complexity. Compared with the prior art, the beneficial effects of the BIOS recovery device provided by the present application are the same as the beneficial effects of the BIOS recovery method provided by the above embodiment, and the other technical features in the BIOS recovery device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.

[0114] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.

[0115] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.

[0116] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the BIOS recovery method in the above-mentioned embodiment.

[0117] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.

[0118] The computer-readable storage medium may be included in the BIOS recovery device; or may exist independently without being assembled into the BIOS recovery device.

[0119] The above-mentioned computer-readable storage medium carries one or more programs. When the above-mentioned one or more programs are executed by the BIOS recovery device, the BIOS recovery device: when a damage signal of the first BIOS is detected, the address conversion module is switched from the transparent transmission mode to the address redirection mode, and one or more second BIOS startups are executed; after starting from the second BIOS, the address conversion module is switched from the address redirection mode to the transparent transmission mode, and in the transparent transmission mode, the corresponding area of ​​the first BIOS is accessed; the first BIOS is updated in the corresponding area of ​​the first BIOS to complete the recovery of the first BIOS.

[0120] Computer program code for performing the operations of the present application may be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0121] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.

[0122] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.

[0123] The readable storage medium provided by the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned BIOS recovery method, and can solve the technical problem of how to recover the damaged BIOS under the premise of reducing costs and hardware design complexity. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided by the present application are the same as the beneficial effects of the BIOS recovery method provided by the above-mentioned embodiment, and will not be repeated here.

[0124] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned BIOS recovery method when executed by a processor.

[0125] The computer program product provided by the present application can solve the technical problem of how to restore a damaged BIOS under the premise of reducing costs and hardware design complexity. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the BIOS recovery method provided by the above embodiment, and will not be repeated here.

[0126] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.

Claims

1. A BIOS recovery method, characterized in that: The method is applied to a BIOS recovery system, the BIOS recovery system includes a basic input / output system BIOS and an address conversion module, the BIOS includes a first BIOS and at least one second BIOS stored in different areas of a single Flash, and the method includes: When a damage signal of the first BIOS is detected, the address conversion module is switched from a transparent transmission mode to an address redirection mode, and one or more second BIOS startups are executed; After starting from the second BIOS, switching the address conversion module from the address redirection mode to the transparent transmission mode, and accessing the corresponding area of ​​the first BIOS in the transparent transmission mode; The first BIOS is updated in a corresponding area of ​​the first BIOS to complete recovery of the first BIOS.

2. The method according to claim 1, characterized in that The step of switching the address conversion module from the transparent transmission mode to the address redirection mode and executing one or more of the second BIOS startups includes: Switching the address conversion module from the transparent transmission mode to the address redirection mode; In the address redirection mode, parsing and redirecting the corresponding area of ​​the first BIOS to access one or more corresponding areas of the second BIOS; One or more second BIOS boots are executed by accessing corresponding areas of the one or more second BIOS.

3. The method according to claim 2, characterized in that The step of switching the address conversion module from the transparent transmission mode to the address redirection mode comprises: Detecting whether a timer on the address conversion module exceeds a preset time; If so, the operation unit of the address conversion module switches the working mode of the address conversion module from the transparent transmission mode to the address redirection mode.

4. The method according to claim 2, characterized in that The step of parsing and redirecting the corresponding area of ​​the first BIOS in the address redirection mode to access one or more corresponding areas of the second BIOS includes: Get read and write instructions and address information; Reconstructing the address information based on the read and write instructions through the address conversion module to obtain new address information; Based on the new address information, an access area is converted from a corresponding area of ​​the first BIOS to a corresponding area of ​​the one or more second BIOS.

5. The method according to claim 1, characterized in that Before the step of switching the address conversion module from the address redirection mode to the transparent transmission mode, the method further includes: Sending a pulse signal to the address conversion module through a preset control instruction; An instruction for repairing the damaged first BIOS is obtained according to the pulse signal through the address conversion module.

6. The method according to any one of claims 4 to 5, characterized in that The step of switching the address conversion module from the address redirection mode to the transparent transmission mode and accessing the corresponding area of ​​the first BIOS in the transparent transmission mode includes: Based on an instruction to repair the damaged first BIOS, switching the address translation module from the address redirection mode to the transparent transmission mode; In the transparent transmission mode, the access area is converted from the corresponding area of ​​the second BIOS to the corresponding area of ​​the first BIOS.

7. The method according to claim 6, characterized in that The step of updating the first BIOS in the corresponding area of ​​the first BIOS to complete the recovery of the first BIOS includes: Use the BIOS update tool to obtain the new BIOS image file; A new BIOS image file is written into the corresponding area of ​​the first BIOS to overwrite the damaged image file of the first BIOS, thereby completing the recovery of the first BIOS.

8. A BIOS recovery system, characterized in that: The system comprises: A switching module, the switching module comprising a first switching unit and a second switching unit; The first switching unit is used to switch the address conversion module from the transparent transmission mode to the address redirection mode to execute one or more second BIOS startups when a damage signal of the first BIOS is detected; The second switching unit is used to switch the address conversion module from the address redirection mode to the transparent transmission mode after starting from the second BIOS, and access the corresponding area of ​​the first BIOS in the transparent transmission mode; An update module is used to update the first BIOS in a corresponding area of ​​the first BIOS to complete the recovery of the first BIOS.

9. A BIOS recovery device, characterized in that: The device comprises: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the BIOS recovery method according to any one of claims 1 to 7.

10. A storage medium, characterized in that: The storage medium is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the BIOS recovery method according to any one of claims 1 to 7 are implemented.