Method for running a start-up procedure of an electronic device and electronic device
By dividing the boot program into a primary BIOS and a backup BIOS and storing them in different storage devices, and performing security authentication and version selection before booting, the problem of electronic devices failing to boot due to boot program corruption is solved, thereby improving the boot success rate and boot program integrity without increasing hardware costs.
Patent Information
- Application Number
- CN202110322576.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-25
- Publication Date
- 2026-11-24
- Estimated Expiration
- 2041-03-25
AI Technical Summary
Existing technology prevents electronic devices from booting properly when the startup program is corrupted, and also prevents repair when the repair program block is corrupted, thus causing the device to fail to start normally.
The boot process is divided into two parts: the main BIOS and the backup BIOS are stored in different memories. The main BIOS is stored in the first memory and the backup BIOS is stored in the second memory. Before booting, the processor performs security authentication and selects one of the BIOSes to run. If the BIOS is damaged or incomplete, it switches to the other BIOS and selects the BIOS with better performance based on the version number or integrity.
Without increasing hardware costs, it improves the success rate of electronic devices booting up normally, and ensures the integrity and performance of the boot process through upgrade and repair mechanisms.
Smart Images

Figure CN115129384B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of terminal and communication technology, and in particular to a method for running a startup program for an electronic device and an electronic device. Background Technology
[0002] The bootloader is the first program loaded when an electronic device starts up, acting as a bridge between the device's hardware and software. Typically, this bootloader is a set of programs embedded in a ROM chip on the motherboard. It stores the computer's most important basic input / output programs, the power-on self-test (POST) program, and the system startup program. It can read and write specific system settings from the CMOS. Its main function is to provide the lowest-level, most direct hardware settings and control for the computer. If the bootloader is corrupted, the electronic device may fail to boot properly.
[0003] The bootloader can be a Basic Input Output System (BIOS) that supports the Unified Extensible Firmware Interface (UEFI) specification, also known as UEFI BIOS. In the UEFI BIOS architecture, it will be referred to as BIOS below.
[0004] Currently, to prevent electronic devices from failing to power on due to a corrupted startup program, one approach is to include a repair block within the startup program. In the event of a corrupted startup program, this repair block can be used to initiate a repair process, ensuring that the electronic device can power on normally as much as possible.
[0005] When using this method, if the repair program block is damaged, the damaged startup program cannot be repaired, and the electronic device will not be able to power on normally. Summary of the Invention
[0006] This application provides a method for running a boot program for an electronic device and an electronic device, which can improve the success rate of normal power-on of the electronic device when the boot program is damaged, without increasing hardware costs.
[0007] In a first aspect, this application provides a method for running a boot program of an electronic device. The electronic device includes a processor, a first memory, and a second memory. The first memory is a read-only memory (ROM) that the processor can directly read its data, and the second memory is an auxiliary memory that the processor reads its data through memory. The method includes: the processor retrieving a first program block from the first memory and running the first program block, wherein the first program block belongs to the first part of the boot program and is used to perform security authentication before the boot program runs; the processor selecting one of a second program block and a third program block as the target program block for the next step, wherein the second program block is stored in the first memory, the third program block is stored in the second memory, and both the second program block and the third program block belong to the second part of the boot program and are used to run the boot program; after the first program block has finished running, the processor runs the target program block.
[0008] In the above embodiment, the boot program comprises two parts. The first part performs security authentication before the boot program runs, and the first program block in the first part serves as a shared program block for both the primary BIOS and the backup BIOS. The second part executes the boot program. The second part is stored separately for primary and backup purposes. For example, taking the boot program as a BIOS, it can be divided into a primary BIOS and a backup BIOS. The second program block in the second part is a program block from the primary BIOS, stored in the first memory, while the third program block is a program block from the backup BIOS, stored in the second memory. The second memory has lower costs, and storing a portion of the backup BIOS program block in the second memory can save hardware costs. After the processor completes the security authentication before the boot program runs, it can choose to run either the program block from the primary BIOS or the program block from the backup BIOS until the electronic device powers on normally. Therefore, even if one BIOS is damaged or incomplete, the processor can run the other BIOS. This increases the likelihood of the boot program running normally, thereby improving the success rate of the electronic device powering on normally.
[0009] In conjunction with some embodiments of the first aspect, in some embodiments, the method further includes: the processor checking whether the second program block is damaged or complete; then, if the second program block is damaged or incomplete, selecting the third program block as the target program block for the next step, and if the second program block is not damaged or complete, selecting the second program block as the target program block for the next step.
[0010] In the above embodiments, since the main BIOS is stored in the first memory and can be directly read and executed by the processor, the processor runs the program blocks in the main BIOS much faster. Therefore, when the processor determines that the program blocks in the main BIOS are complete or undamaged, it can decide to run the main BIOS. This also saves the processor time in determining which BIOS to run. In this case, even if the program blocks in the main BIOS are incomplete or damaged, the processor can still quickly determine to run the program blocks in the backup BIOS, allowing the electronic device to boot normally.
[0011] In conjunction with some embodiments of the first aspect, in some embodiments, the method further includes: the processor checking whether the second program block and the third program block are damaged or complete; then, if either the second program block or the third program block is damaged or incomplete, selecting an undamaged or complete program block as the target program block for the next step; if neither the second program block nor the third program block is damaged or both are complete, selecting a program block with a better version number as the target program block for the next step.
[0012] In the above embodiment, the processor selects one of two program blocks based on whether they are complete or undamaged, and the version number of that program block. If one program block is incomplete or damaged, the processor can quickly select an undamaged or complete program block to run, saving boot time for the electronic device. If both program blocks are complete or undamaged, the processor combines the version numbers of the primary BIOS and the backup BIOS, selecting the BIOS with the better version number to run. Thus, if the BIOS with the higher version number is defined as the better BIOS, the processor will select the BIOS with the higher version number to run. A higher version number means better startup performance, better connection between the hardware and software of the electronic device, and a smoother boot process. It is understandable that different methods of defining the better version number can bring different beneficial effects, which will not be elaborated further here.
[0013] In conjunction with some embodiments of the first aspect, in some embodiments, the processor specifically selects the version of the second program block and the third program block that is superior as the target program block for the next step.
[0014] In the above embodiments, if the processor selects one of the program blocks to run based on the version number, it can quickly select the program block with better performance to run, making the electronic device boot up more smoothly.
[0015] In conjunction with some embodiments of the first aspect, in some embodiments, when the processor selects the third program block as the target program block for the next step, the method further includes: the processor obtaining the boot program block of the third program block from the first memory and running the boot program block of the third program block, the boot program block of the third program block being used to determine the storage location of the third program block and loading the third program block into the memory of the electronic device.
[0016] In the above embodiment, because the third program block is stored in the second memory, the processor cannot directly read and run it. Therefore, it is only necessary to store the boot program block of the third program block in the first memory, which can save hardware costs. The processor can directly read and run the boot program block of the third program block, and load the program block of the backup BIOS in the second memory into the memory that the processor can directly read and run, so that the processor can run the program block in the backup BIOS in the second memory.
[0017] In conjunction with some embodiments of the first aspect, in some embodiments, the processor may further include: repairing a damaged or incomplete program block, or the processor issuing a repair notification.
[0018] In the above embodiments, the processor can repair incomplete or damaged program blocks, ensuring the integrity of the startup program.
[0019] In conjunction with some embodiments of the first aspect, in some embodiments, the processor further includes: obtaining an upgrade package of the startup program; the processor selecting one of the second program block and the third program block as the upgrade target, and using the upgrade package to upgrade the selected program block.
[0020] In the above embodiments, the processor can upgrade the boot program, thereby improving the performance of the boot program and enabling it to run better.
[0021] In conjunction with some embodiments of the first aspect, in some embodiments, the bootloader is further comprising: a UEFI BIOS that supports the Unified Extensible Firmware Interface Specification.
[0022] Secondly, this application provides a method for upgrading the boot program of an electronic device. The electronic device includes a processor, a first memory, and a second memory. The first memory is a read-only memory that the processor can directly read its data, and the second memory is an auxiliary memory that the processor can read its data through memory. The method includes: the processor obtaining an upgrade package for the boot program, wherein a first program block corresponding to a first part of the boot program is stored in the first memory, and the first program block is used to perform security authentication before the boot program runs; the processor selecting one of a second program block and a third program block as the target program block to be upgraded, wherein the second program block is stored in the first memory, the third program block is stored in the second memory, and both the second program block and the third program block belong to the second part of the boot program and are used to run the boot program; and the processor upgrading the target program block according to the upgrade package of the boot program.
[0023] In the above embodiment, the processor only selects one of the primary BIOS and the backup BIOS for upgrading, leaving the other unupgraded. This way, even if the upgrade fails, the unupgraded BIOS remains intact or undamaged. The processor can still choose to run this unupgraded BIOS, allowing the electronic device to boot normally. If the upgrade is successful, the unupgraded BIOS can be upgraded in the next iteration, thus ensuring that both BIOSes offer better performance.
[0024] Thirdly, this application provides an electronic device comprising: a processor and a first memory and a second memory; the first memory is a read-only memory that the processor can directly read its data, and the first memory stores a first program block and a second program block, the first program block being a first part of a startup program used to perform security authentication before the startup program runs, and the second program block being a second part of the startup program used to run the startup program; the second memory is an auxiliary memory that the processor reads its data from memory, and the second memory stores a third data block, the third program block being a second part of the startup program used to run the startup program; the processor is used to retrieve the first program from the first memory and run the first program block to perform security authentication before the startup program runs; the processor is also used to select one of the second program block and the third program block as a target program block for the next step; after the first program block has finished running, the processor is used to run the target program block to run the startup program.
[0025] In the above embodiment, the boot program comprises two parts. The first part performs security authentication before the boot program runs, and the first program block in the first part serves as a shared program block for both the primary BIOS and the backup BIOS. The second part executes the boot program. The second part is stored separately for primary and backup purposes. For example, taking the boot program as a BIOS, it can be divided into a primary BIOS and a backup BIOS. The second program block in the second part is a program block from the primary BIOS, stored in the first memory, while the third program block is a program block from the backup BIOS, stored in the second memory. The second memory has lower costs, and storing a portion of the backup BIOS program block in the second memory can save hardware costs. After the processor completes the security authentication before the boot program runs, it can choose to run either the program block from the primary BIOS or the program block from the backup BIOS until the electronic device powers on normally. Therefore, even if one BIOS is damaged or incomplete, the processor can run the other BIOS. This increases the likelihood of the boot program running normally, thereby improving the success rate of the electronic device powering on normally.
[0026] In conjunction with some embodiments of the third aspect, in some embodiments, the processor is further configured to check whether the second program block is damaged or complete; then, if the second program block is damaged or incomplete, the processor selects the third program block as the target program block for the next step, and if the second program block is not damaged or complete, the processor selects the second program block as the target program block for the next step.
[0027] In conjunction with some embodiments of the third aspect, in some embodiments, the processor is further configured to check whether the second program block and the third program block are damaged or complete; then, if either the second program block or the third program block is damaged or incomplete, the processor selects the undamaged or complete program block as the target program block for the next step; if neither the second program block nor the third program block is damaged or both are complete, the processor selects the program block with the better version number as the target program block for the next step.
[0028] In conjunction with some embodiments of the third aspect, in some embodiments, the processor is specifically configured to select the superior version from the second and third program blocks as the target program block for the next step.
[0029] In conjunction with some embodiments of the third aspect, in some embodiments, when the third program block is selected as the target program block for the next step, the processor is further configured to retrieve the boot program block of the third program block from the first memory and run the boot program block of the third program block, wherein the boot program block of the third program block is configured to determine the storage location of the third program block and load the third program block into the memory of the electronic device.
[0030] In conjunction with some embodiments of the third aspect, in some embodiments, the processor is also used to repair damaged or incomplete program blocks, or to issue a repair notification.
[0031] In conjunction with some embodiments of the third aspect, in some embodiments, the processor is further configured to obtain an upgrade package for the startup program; the processor is configured to select one of the second program block and the third program block as the upgrade target, and use the upgrade package to upgrade the selected program block. Attached Figure Description
[0032] Figure 1 This is a schematic structural block diagram of a BIOS provided in an embodiment of this application;
[0033] Figure 2 This is a schematic flowchart of the operation of a BIOS provided in an embodiment of this application;
[0034] Figure 3 This is a schematic block diagram of a primary BIOS and a backup BIOS provided in an embodiment of this application;
[0035] Figure 4 This is a schematic flowchart illustrating the runtime of the startup program provided in the embodiments of this application;
[0036] Figure 5 This is a schematic diagram of the structure of the electronic device 100 provided in the embodiments of this application;
[0037] Figure 6 This is an exemplary flowchart illustrating the operation of another startup program provided in this application embodiment;
[0038] Figure 7 This is a schematic structural block diagram of the startup procedure provided in the embodiments of this application;
[0039] Figure 8 This is an exemplary flowchart of the running method of the startup program provided in the embodiments of this application. Detailed Implementation
[0040] The terminology used in the following embodiments of this application is for the purpose of describing particular embodiments only and is not intended to be limiting of this application. As used in the specification and appended claims of this application, the singular expressions “a,” “an,” “the,” “the,” “the,” and “this” are intended to include the plural expressions as well, unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used in this application refers to and includes any or all possible combinations of one or more of the listed items.
[0041] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.
[0042] To facilitate understanding, the relevant terms and concepts involved in the embodiments of this application will be introduced below.
[0043] (1) First memory
[0044] In this embodiment, the first memory includes a storage chip embedded in the motherboard of the electronic device for storing the BIOS. The data stored in the first memory can be directly and randomly accessed by the central processing unit (CPU). The first memory is non-volatile, meaning that the data stored in the first memory will not be lost in the event of a power outage.
[0045] It is understood that main memory includes not only the first memory, but also other memory that can directly exchange information with the CPU of the electronic device, such as random access memory (RAM). Main memory can be used as RAM. It is understood that the first memory can be directly soldered onto the motherboard. Alternatively, it can be placed on the motherboard in other ways, such as by inserting it into a slot on the motherboard; this application embodiment limits this. The first memory can be used to store some critical programs of the electronic device, such as the boot program and BIOS. The electronic device can read and write the BIOS stored in the first memory. The program stored in the first memory is generally called firmware.
[0046] Specifically, electronic devices can read programs stored in the first memory. For example, an electronic device can read the BIOS, and then the electronic device can complete hardware settings and control by running the BIOS. It can also troubleshoot system faults or diagnose system problems, thereby enabling it to boot up normally.
[0047] Programs or content stored in the primary memory are generally not allowed to be erased or altered by electronic devices. However, under specific circumstances, electronic devices can erase the content stored in the primary memory and then write new content. Therefore, in some cases, when a program block in the BIOS is corrupted, the electronic device can erase the contents of the corrupted program block and then write the correct content, ensuring the BIOS can function normally. In other cases, when the BIOS needs to be updated, the electronic device can erase the original BIOS and then write the updated BIOS to the primary memory.
[0048] The first memory involved in the embodiments of this application can be an erasable and rewritable fast read-only memory (flash ROM) chip, or other types of ROM chips, such as electrically erasable programmable read-only memory (EEP ROM), etc., and is not limited here. The number of first memories in the embodiments of this application is not limited.
[0049] (2) Second memory
[0050] In this embodiment, the second memory may include auxiliary memory that is not embedded in the motherboard of the electronic device. It may be some extended external memory, such as a solid-state disk (SSD), a hard disk drive (HDD), etc.
[0051] This second memory, relative to the first memory fixed on the motherboard of the electronic device, needs to exchange data with some main memory, such as the first memory and random access memory (RAM). That is, other components in the electronic device cannot directly read the data stored in this second memory. For example, the CPU of the electronic device cannot directly access data from this second memory; it must first load the data stored in the second memory into main memory, which can be used as RAM, and then retrieve it from main memory. Therefore, for the electronic device to run the BIOS content stored in this memory, it needs to first read it into main memory, such as RAM.
[0052] The price per unit capacity of this second memory is lower than that of the first memory. Using the first memory to store the contents of the BIOS can save on the development costs of electronic devices.
[0053] (3) BIOS operating environment
[0054] For BIOSes using a UEFI BIOS architecture, the BIOS can be divided into several program blocks, specifically including the following: Security Boot (SEC) block, Pre-EFIInitilization (PEI) block, Driver Execution Environment (DXE) block, Boot Device Selection (BDS) block, Transient System Load (TLS) block, and Run Time (RT) block. Once the electronic device has completed running these program blocks, it can boot normally.
[0055] The SEC block is used to perform security authentication before BIOS execution. Electronic devices first run the SEC block to enter the security authentication phase of the BIOS runtime environment.
[0056] The PEI program block is used to initialize certain hardware components, such as the CPU, chipset, motherboard, and parts of main and secondary memory. When an electronic device runs the PEI program block, it enters the pre-EFI initialization phase, preparing the execution environment for the next stage.
[0057] The DXE block is used to initialize all hardware. When an electronic device runs the DEX block, it enters the driver execution environment stage. At this stage, memory is fully utilized, allowing for complex tasks to be performed.
[0058] The BDS program block is used to boot the operating system. When the electronic device runs the BDS program block, it enters the boot device selection stage. This stage mainly executes the boot strategy, and its main functions include: initializing the console device; loading device drivers; and loading and executing boot items according to system settings.
[0059] Then, the electronic device runs the TLS block, RT block, etc., until the electronic device powers on normally.
[0060] When the boot program is the BIOS, in order to prevent electronic devices from failing to boot normally after the BIOS is damaged, one solution is to build a repair program block in the BIOS. When the BIOS is damaged, the electronic device can use the repair program block to repair the BIOS.
[0061] Figure 1A schematic block diagram of a BIOS based on this scheme is shown. The BIOS includes an SEC program block, a PEI program block, and other program blocks. The BIOS can be stored in flash ROM, and the PEI program block contains a repair program block.
[0062] Figure 2 A schematic flowchart of the BIOS operation is shown. In response to a user's power-on operation on the electronic device, the device first runs the SEC program block in the BIOS. Then, it checks if the PEI program block is corrupted; if not, it runs the PEI program block. Next, it checks if other program blocks in the BIOS are corrupted. If corrupted, the repair program block within the PEI program block is run to repair the BIOS. The repair process involves the electronic device searching for other program blocks in the BIOS from external storage devices such as optical discs, such as the driver execution environment (DXE) program block and the boot device selection (BDS) program block, and then using these external storage blocks to repair the BIOS. If no corruption is found, the other program blocks in the BIOS can be run.
[0063] However, when using this approach, the repair block depends on the PEI block to function; that is, the repair block can only run if the PEI block is intact. If the repair block in the BIOS is corrupted, or if the PEI block it depends on is corrupted, the damaged BIOS cannot be repaired. Furthermore, during a BIOS upgrade, since the PEI block also needs to be upgraded, an upgrade failure might occur, leading to corruption of the boot block. If the BIOS is corrupted in this case, the electronic device may fail to boot properly.
[0064] The boot program operation method provided in this application embodiment still takes the BIOS as an example. The primary and backup BIOS are split and stored on different memories. The entire primary BIOS is stored in the first memory, while some program blocks from the backup BIOS are stored in the second memory. When the primary BIOS is damaged, the electronic device can determine the storage location of the program blocks from the backup BIOS in the second memory, load these program blocks into the electronic device's memory, and then run the program blocks from the backup BIOS, enabling the electronic device to boot normally. This improves the success rate of booting the electronic device without increasing hardware costs. The electronic device can also obtain an upgrade package for the boot program and choose to upgrade either the primary or backup boot program.
[0065] Figure 3A schematic block diagram of the main BIOS and backup BIOS in an embodiment of this application is shown.
[0066] In some embodiments, the SEC block of the primary BIOS and the SEC block of the backup BIOS can be the same SEC block, which is called a shared SEC block.
[0067] like Figure 3 As shown, the electronic device can store the shared SEC program block of the main BIOS and the backup BIOS in a first memory. The first memory is also used to store the PEI program block of the main BIOS, the PEI program block of the backup BIOS, and other program blocks of the main BIOS. The electronic device stores the other program blocks of the backup BIOS in a second memory.
[0068] The PEI program block of the backup BIOS is used to determine the storage location of other block program blocks in the backup BIOS in the second memory and load these program blocks into the memory of the electronic device.
[0069] Figure 4 A schematic flowchart illustrating the operation of the startup program in an embodiment of this application is shown.
[0070] like Figure 4 As shown, the electronic device first runs the shared SEC program block of the main BIOS and backup BIOS in the first memory to determine one of the PEI program blocks of the main BIOS and the backup BIOS as the target PEI program block, and then runs that target PEI program block. If the PEI program block of the main BIOS is the target PEI program block, then the other program blocks of the main BIOS are run to enable the electronic device to boot normally. If the PEI program block of the main BIOS is not the target PEI program block, that is, the PEI program block of the backup BIOS is the target PEI program block, then the electronic device can read the other program blocks of the backup BIOS in the second memory by running the target PEI program block, and then run the other program blocks of the backup BIOS to enable the electronic device to boot normally.
[0071] In this way, without increasing hardware costs, as long as the shared SEC program block is not damaged and the security authentication before the boot program runs is completed, the boot program can begin to run. Even if the PEI program block or other program blocks of the main BIOS in the first memory are damaged, and the electronic device cannot boot successfully by running the main BIOS, the electronic device can still run the PEI program block and other program blocks of the backup BIOS, enabling the electronic device to boot normally and improving the success rate of normal boot.
[0072] Electronic devices can utilize the bootloader's upgrade package to upgrade the shared SEC program block, or select one of the program blocks other than the shared SEC program block in the main BIOS or the other program blocks other than the shared SEC program block in the backup BIOS for upgrade. Thus, if the SEC upgrade is successful, even if the upgrade of other program blocks in one BIOS fails, the other BIOS can still be run, allowing the electronic device to boot normally.
[0073] The exemplary electronic device 100 provided in the embodiments of this application will be introduced first below.
[0074] Figure 5 This is a schematic diagram of the structure of the electronic device 100 provided in the embodiments of this application.
[0075] The following detailed description uses electronic device 100 as an example. It should be understood that electronic device 100 may have more or fewer components than shown in the figures, may combine two or more components, or may have different component configurations. The various components shown in the figures can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0076] Electronic device 100 may include: processor 171, main memory 172, auxiliary memory 173, chipset 174, power switch 175, input / output device 176, USB communication processing module 177, wireless communication processing module 178, and buzzer 179.
[0077] Processor 171 can be used to read and execute computer-readable instructions. In its specific implementation, processor 171 mainly includes a controller, an arithmetic logic unit (ALU), and registers. The controller is primarily responsible for instruction decoding and issuing control signals for the operations corresponding to the instructions. The ALU is primarily responsible for performing fixed-point or floating-point arithmetic operations, shift operations, and logical operations, and can also perform address operations and translations. Registers are primarily responsible for storing register operands and intermediate operation results temporarily stored during instruction execution.
[0078] In this embodiment of the application, the processor 171 can also be used to read and run instructions related to the BIOS, so that the electronic device 100 can be powered on normally.
[0079] Main memory 172 is coupled to processor 171 and is used to store various software programs and / or sets of instructions. The software programs and / or sets of instructions in main memory 172 can be directly read by processor 171. In a specific implementation, main memory 172 may include RAM, such as a RAM chip. Main memory 172 may also include non-volatile memory chips, such as one or more flash memory devices. Main memory 172 may store operating systems, such as embedded operating systems like real-time multi-tasking operating systems (uCOS), Microsoft Windows operating systems, etc.
[0080] In this embodiment, the main memory 172 may further include a first memory, such as a flash ROM chip or other type of ROM chip, such as an EEP ROM chip. This memory can be used to store the shared SEC program block, the PEI program block of the main BIOS and other program blocks, and the PEI program block of the backup BIOS.
[0081] Auxiliary storage 173 is used to store various resources, such as images, audio, and video. In specific implementations, auxiliary storage 173 can be external storage, including large-capacity storage devices such as disk storage devices. Auxiliary storage 173 can exchange information with main memory 172.
[0082] In this embodiment, the auxiliary storage 173 may further include a second storage, such as an SSD or HDD, for storing some program blocks in the backup BIOS.
[0083] Chipset 174 may include one or more of a northbridge chip 174A and a southbridge chip 174B. It is used to connect a microprocessor (not shown) to other parts of the electronic device 100.
[0084] The Northbridge chip 174A can be used to provide an interface between the processor 171 and other parts of the electronic device 100, for example, it can be used to provide an interface to the main memory 172. In addition, the Northbridge chip 174A can also be used to provide network communication functions through a gigabit Ethernet adapter (GEA) (not shown).
[0085] The Southbridge chip 174B can be used to control the input / output functions of electronic device 100. In specific implementations, it can provide one or more Universal Serial Bus (USB) ports, a sound adapter, an Ethernet controller, and one or more general-purpose input / output pins.
[0086] In this embodiment, the southbridge chip 174B may also provide a bus for connecting peripheral devices, such as a SCSI host bus adapter (not shown) that conforms to the BIOS boot specification (BBS) standard.
[0087] In other embodiments, the southbridge chip 174B may also provide one or more interfaces for connecting the auxiliary memory 173 to the electronic device 100, enabling the auxiliary memory 173 to exchange information with the main memory 172. In this way, the electronic device 100 can read some program blocks of the backup BIOS stored in the auxiliary memory 173 into the main memory 172, allowing the processor 171 to read and run these backup BIOS program blocks from the main memory 172.
[0088] The power switch 175 can be used to control the power supply to the electronic device 100. When the power switch is turned on, the electronic device 100 can start running the BIOS, and after the BIOS finishes running normally, the electronic device 100 can be powered on normally.
[0089] Input / output device 176 provides several input / output ports, such as a keyboard port, mouse port, serial interface, parallel port, etc. Input devices include a keyboard, mouse, and camera. Output devices may include a display screen, printer, and plotter.
[0090] In this embodiment of the application, after the electronic device 100 finishes the normal operation of the BIOS, the user interface for powering on can be displayed on the screen of the electronic device 100.
[0091] The USB communication processing module 177 can be used to communicate with other devices via a USB interface (not shown).
[0092] The wireless communication processing module 178 may include one or more of the Bluetooth (BT) communication processing module 178A and the WLAN communication processing module 178B, for establishing wireless communication connections with other electronic devices.
[0093] Buzzer 179 is used as a sound-generating device.
[0094] In this embodiment, when the electronic device is running the BIOS and verifying whether there is a hardware problem, if a hardware problem occurs, the buzzer 179 will emit a BIOS alarm sound. Different sound types indicate different hardware problems. For example, in some electronic devices, a long and a short BIOS alarm sound indicates a problem with the RAM or motherboard.
[0095] It is understood that the electronic device 100 involved in the embodiments of this application can also be a mobile device, and this is not limited here.
[0096] The following is in conjunction with the above. Figure 5 The schematic diagram of the electronic device 100 shown in the figure illustrates the operation method of the startup program in the embodiments of this application:
[0097] Figure 6 This is an exemplary flowchart of the startup procedure in the embodiments of this application.
[0098] The boot program in this embodiment may include two parts: a first part and a second part. The first part can be used to perform security authentication before the boot program runs, i.e., verifying whether the CPU, chipset, motherboard, etc., can work safely and normally. Only after completing the security authentication can the electronic device run the boot program. Optionally, the first part can also be used to check whether the program blocks in the second part are complete or corrupted, and their version numbers. Only after the program blocks in the first part have run normally can the program blocks in the second part run, and the second part can be used to run the boot program. The electronic device can store the second part separately as a primary and backup; for example, taking the boot program as a BIOS, it can be divided into a primary BIOS and a backup BIOS.
[0099] The first part may include a first program block, and the second part may include a second program block and a third program block. The specific execution process of these program blocks can be referred to in steps S601-S603 below.
[0100] S601. The electronic device acquires the first program block and runs the first program block;
[0101] This first program block is stored in the first memory and can be directly read by the processor of the electronic device. This first program block is the first part of the boot program and is used to perform security authentication before the boot program runs. This first program block belongs to both the main BIOS and the backup BIOS; it is a shared program block between the two BIOSes. For example, this first program block may include an SEC program block. In this case, the SEC program block is a shared SEC program block.
[0102] S602. The electronic device selects one of the second program block and the third program block as the target program block for the next step;
[0103] Both the second and third program blocks belong to the second part of the boot program and are used to run the boot program. The second program block is a program block in the main BIOS and is stored in the first memory. The third program block is a program block in the backup BIOS and is stored in the second memory.
[0104] For the second and third program blocks, the electronic device can only select one of them as the target program block for the next step during a single power-on process.
[0105] Optionally, in some embodiments, the electronic device may only check whether the second program block is damaged or complete; if the second program block is not damaged or complete, then the second program block is selected as the target program block for the next step; if the second program block is damaged or incomplete, then the third program block is selected as the target program block for the next step.
[0106] Optionally, in some embodiments, the first electronic device may check whether both the second and third program blocks are damaged or complete. If either the second or third program block is damaged or incomplete, the undamaged or complete program block is selected as the target program block for the next step. If both program blocks are complete, the version numbers of the two program blocks are checked, and the one with the better version number is selected as the target program block. For example, a program block with a higher version number can be defined as having a better version number, or a more stable version number can be defined as having a better version number, or there can be other ways to define a better version number. This application embodiment does not limit this.
[0107] Optionally, in other embodiments, the electronic device may only check the version numbers of the second and third program blocks and select the one with the better version number as the target program block.
[0108] In the above embodiments, for damaged or incomplete program blocks, the electronic device can issue a repair notification to repair the program block. Specifically, based on the repair notification, the electronic device can use an undamaged or intact BIOS to repair the damaged or incomplete BIOS.
[0109] In the above embodiments, the electronic device can use a first program block to check whether the second and third program blocks are complete or damaged, and their version numbers. Specifically, the first program block can use a check program block to check the second and third program blocks. In some embodiments, the check program block can be placed within the first program block. In other embodiments, the check program block can be placed outside the first program block, as long as it can be found through the first program block. For example, the path of the check program block can be placed in the first program block, so that the first program block can find the check program block through that path.
[0110] In the above embodiments, since the third program block is stored in the second memory, a boot program block for the third program block can be added to the first memory to determine the storage location of the third program block and load it into the memory of the electronic device. The electronic device can check the third program block through the check program block, specifically by finding the boot program block of the third program block and then checking the third program block through the boot program block.
[0111] The second program block can include all other program blocks in the main BIOS except for the first program block. For example, if the first program block only includes the SEC program block, then the second program block includes all other program blocks in the main BIOS except for the SEC program block.
[0112] The boot program block of the third program block includes at least the portion of the backup BIOS's PEI program block used to determine the storage location of the third program block and load it into the electronic device's memory. The third program block may include all other program blocks in the backup BIOS except for the boot program block and the first program block. For example, when the boot program block of the third program block only includes the PEI program block, and the first program block includes the SEC block, then the third program block may include the DEX program block, the BDS program block, etc. When the boot program block of the third program block includes the PEI program block and the DEX program block, and the first program block includes the SEC block, then the third program block may include the BDS program block, etc.
[0113] S603. After the first program block has finished running, the electronic device runs the target program block;
[0114] It is understood that the program block involved in the embodiments of this application may be a set of code, a set of functions, hardware including one or more signal processing and / or application-specific integrated circuits, or a combination of one or more of these. The embodiments of this application do not limit this.
[0115] In addition to running the startup program through steps S601-S603, the electronic device can also upgrade the startup program.
[0116] Specifically, the electronic device obtains the upgrade package of the boot program and uses the upgrade package to upgrade the program block. The electronic device obtains the first program block from the first memory and upgrades the first program block.
[0117] The electronic device selects one of the second and third program blocks as the target program block for the next upgrade.
[0118] After the first program block is upgraded, the electronic device upgrades the target program block.
[0119] The following is in conjunction with the above. Figure 6 The description of the running method of the startup program in the embodiments of this application provides a detailed exemplary description.
[0120] Figure 7 This is a schematic structural block diagram of the startup program provided in the embodiments of this application.
[0121] It should be understood that, Figure 7 The BIOS in a given system can have more program blocks than those shown in the diagram, and two or more program blocks can be combined. The individual program blocks shown in the diagram can be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and / or application-specific integrated circuits.
[0122] The first program block is the shared SEC program block; the second program block is the other program blocks in the main BIOS besides the SEC program block; the third program block is the boot program block in the backup BIOS, which is the PEI program block; the third program block is the other program blocks in the backup BIOS besides the PEI program block and the shared SEC program block.
[0123] The following is in conjunction with the above. Figure 6 The schematic diagram of the structure of the electronic device 100 shown in the figure Figure 7 The diagram below shows a schematic structural block diagram of the startup procedure, and the method in the embodiments of this application is described in detail below:
[0124] Figure 8 This is an exemplary flowchart of the running method of the startup program in the embodiments of this application.
[0125] Two PEI program blocks are stored in the first memory: the PEI program block for the main BIOS and the PEI program block for the backup BIOS. However, during the startup process, only one of these two PEI program blocks needs to be executed. Therefore, the electronic device can determine one of the PEI program blocks as the target PEI program block and execute that target PEI program block. If the electronic device selects the second program block as the target program block, the PEI program block for the main BIOS is executed. If the electronic device selects the third program block as the target program block, the PEI program block for the backup BIOS is executed.
[0126] The process of selecting a target PEI program block for an electronic device can be referred to in the following description of steps S901-S904.
[0127] S901. The electronic device determines whether the PEI program block of the main BIOS and the PEI program block of the backup BIOS are complete.
[0128] Electronic devices can determine the integrity of the PEI program block of the main BIOS and the PEI program block of the backup BIOS by running a check program block.
[0129] In some embodiments, the inspection block may be placed within a shared SEC block.
[0130] In other embodiments, the inspection block may not be placed within the shared SEC block, but may be located in another location that the electronic device can read when the shared SEC block is running. No limitation is made here.
[0131] In some embodiments, if the electronic device determines that both the PEI program block of the main BIOS and the PEI program block of the backup BIOS are complete, then steps S902-S903 are executed.
[0132] If the electronic device determines that the PEI program block of the main BIOS is complete, but the PEI program block of the backup BIOS is incomplete, or if the electronic device determines that the PEI program block of the main BIOS is incomplete, but the PEI program block of the backup BIOS is complete, then step S904 is executed.
[0133] Understandably, if the electronic device determines that neither the PEI program block of the main BIOS nor the PEI program block of the backup BIOS is complete, the electronic device will terminate the BIOS operation.
[0134] S902. The electronic device determines the version number of the PEI program block of the main BIOS and the PEI program block of the backup BIOS.
[0135] Electronic devices can determine the version numbers of the PEI program block of the main BIOS and the PEI program block of the backup BIOS by running the check program block.
[0136] S903. The electronic device determines and runs the PEI program block of the main BIOS or the PEI program block of the backup BIOS according to the version number.
[0137] The electronic device determines the target PEI block by running the SEC block and then runs the target PEI block.
[0138] In some embodiments, the electronic device can determine the target PEI program block as the PEI program block with the higher version number between the PEI program block of the primary BIOS and the PEI program block of the backup BIOS. For example, if the version number of the PEI program block of the primary BIOS is higher than the version number of the PEI program block of the backup BIOS, the electronic device determines the PEI program block of the primary BIOS as the target PEI program block.
[0139] In some embodiments, the electronic device can determine the more stable PEI program block of its own version number as the target PEI program block based on the version numbers of the two PEI program blocks. For example, the electronic device can determine that the backup BIOS corresponding to the version number of the backup BIOS's PEI program block is a test version, and that the main BIOS corresponding to the version number of the main BIOS's PEI program block is a stable version, based on the version number of the backup BIOS's PEI program block. In this case, the electronic device determines the main BIOS's PEI program block as the target PEI program block.
[0140] In other embodiments, because the electronic device runs the PEI program block on the main BIOS faster, if two PEI program blocks have the same version number, the electronic device can determine that the PEI program block on the main BIOS is the target PEI program block.
[0141] S904. The electronic device determines the complete PEI program block in the PEI program block of the main BIOS and the PEI program block of the backup BIOS as the target PEI program block, and runs the target PEI program block.
[0142] If the PEI program block of the primary BIOS is incomplete, but the PEI program block of the backup BIOS is complete, the electronic device can determine that the PEI program block of the backup BIOS is the target PEI program block and run the target PEI program block.
[0143] If the PEI program block of the main BIOS is complete, but the PEI program block of the backup BIOS is incomplete, the electronic device can determine that the PEI program block of the main BIOS is the target PEI program block and run the target PEI program block.
[0144] After the electronic device executes steps S901-S904 and determines and runs the target PEI program block, it can determine whether the other program blocks of the BIOS corresponding to the target PEI program block are stored in the first memory or the second memory. If it is in the first memory, the electronic device uses the second program block as the target program block; if it is in the second memory, the electronic device uses the third program block as the target program block.
[0145] The process can be referred to in the following description of step S905.
[0146] S905, the electronic device determines whether other program blocks of the BIOS corresponding to the target PEI program block are stored in the first memory.
[0147] If the electronic device is running the PEI program block of the main BIOS, it can be determined that other program blocks of the BIOS corresponding to the target PEI program block are stored in the first memory. Then, steps S911-S913 are executed.
[0148] If the electronic device is running a backup BIOS PEI program block, it can be determined that other BIOS program blocks corresponding to the target PEI program block are stored in the second memory. Then, steps S906-S909 are executed.
[0149] It is understood that in some embodiments, when the electronic device determines that the PEI program block of the main BIOS is the target PEI program block, step S905 can be skipped, and steps S911-S912 can be executed directly.
[0150] When the electronic device determines that the PEI program block of the backup BIOS is the target PEI program block, step S905 can be skipped, and steps S906-S910 can be executed directly.
[0151] In the embodiments of this application, the electronic device reads the BIOS program blocks stored in the second memory and the first memory in different ways.
[0152] Specifically, the processor of an electronic device can directly read the BIOS program block from the primary memory.
[0153] The processor of an electronic device cannot directly read the backup BIOS program block from the secondary memory.
[0154] Since all program blocks of the backup BIOS, except for the shared SEC program block and the PEI program block, are stored in the secondary memory, electronic devices need to first read these program blocks into the main memory before they can run them.
[0155] The process by which the electronic device reads and runs other program blocks of the backup BIOS stored in the second memory can be referred to the following description of steps S906-S909.
[0156] S906: Load the storage driver and file system driver of the second memory, and determine the storage addresses of other program blocks of the backup BIOS in the second memory.
[0157] In this step, the electronic device can determine the storage location of other program blocks of the backup BIOS in the second memory by running the PEI program block of the backup BIOS, that is, find the other program blocks of the backup BIOS. The PEI program block of the backup BIOS contains the storage addresses of the other program blocks of the backup BIOS in the second memory.
[0158] S907. According to the storage address, read the other program blocks of the backup BIOS stored in the second memory.
[0159] Electronic devices can read other program blocks of the BIOS stored in the secondary memory.
[0160] Specifically, the electronic device can load the other program blocks of the backup BIOS stored in the second memory into the main memory by running the PEI program block of the backup BIOS, according to the storage address of the other program blocks of the backup BIOS in the second memory. Then the electronic device can read the other program blocks of the backup BIOS from the main memory.
[0161] S908, Electronic device checks whether other program blocks of the backup BIOS are complete.
[0162] Before running other program blocks of the backup BIOS, electronic devices must check the integrity of these program blocks; only if they are complete can they run.
[0163] Specifically, the other program blocks of the backup BIOS may include the backup BIOS's DXE program block, BDS program block, etc. Before running the next program block, the electronic device uses the currently running program block to check the integrity of the next program block. For example, when the electronic device runs the backup BIOS's PEI program block, it can use the PEI program block to check the integrity of the backup BIOS's DXE program block. When running the DXE program block, it can use the DXE program block to check the integrity of the backup BIOS's BDS program block.
[0164] If the other program blocks of the backup BIOS are complete, then proceed to step S909.
[0165] If the other program blocks of the backup BIOS are not complete, then proceed to step S910.
[0166] S909, Electronic devices run other program blocks of the backup BIOS.
[0167] The electronic device runs other program blocks of the backup BIOS until the process is complete, and then boots up normally.
[0168] S910, the electronic device repairs and runs other program blocks of the backup BIOS.
[0169] Optionally, in some embodiments, when other program blocks of the backup BIOS are incomplete, the electronic device can repair the other program blocks of the backup BIOS, and then continue to run the other program blocks of the backup BIOS so that the electronic device can boot normally.
[0170] S911, Electronic devices check whether other program blocks of the main BIOS are complete.
[0171] The process by which the electronic device checks whether other program blocks of the main BIOS are complete can be referred to in the aforementioned step S908, which describes the electronic device checking whether other program blocks of the backup BIOS are complete. It will not be repeated here.
[0172] If the other program blocks of the main BIOS are complete, then step S912 is executed.
[0173] If the other program blocks of the main BIOS are not complete, then step S913 is executed.
[0174] S912, Electronic devices run other program blocks of the main BIOS.
[0175] The electronic device runs other program blocks of the main BIOS until the process is complete and the device boots up normally.
[0176] S913, the electronic device repairs and runs other program blocks of the main BIOS.
[0177] The process of the electronic device repairing and running other program blocks of the main BIOS can be referred to in the aforementioned step S910, which describes the electronic device repairing and running other program blocks of the backup BIOS. It will not be repeated here.
[0178] In some embodiments, when the electronic device determines that the PEI program block of the main BIOS is complete, it can directly determine the PEI program block of the main BIOS as the target PEI program block without determining the integrity of the PEI program block of the backup BIOS. Then, steps S911-S913 are executed directly. When the electronic device determines that the PEI program block of the main BIOS is incomplete, it can directly determine the PEI program block of the backup BIOS as the target PEI program block without determining the integrity of the PEI program block of the backup BIOS. Then, steps S906-S9010 are executed directly.
[0179] In other embodiments, the electronic device can determine the target PEI program block simply by its version number. If the electronic device determines that the version number of the PEI program block of the main BIOS is better, it can directly determine the PEI program block of the main BIOS as the target PEI program block without needing to determine the version number of the PEI program block of the backup BIOS. Then, steps S911-S913 are executed directly. If the electronic device determines that the version number of the PEI program block of the backup BIOS is better, it can directly determine the PEI program block of the backup BIOS as the target PEI program block without needing to determine the version number of the PEI program block of the backup BIOS. Then, steps S906-S9010 are executed directly.
[0180] Therefore, the boot program operation method provided in this application embodiment can be used. The electronic device can determine whether the PEI program block of the main BIOS or the PEI program block of the backup BIOS is the target PEI program block by running the shared SEC program block. Then, the target PEI program block and other program blocks in the BIOS corresponding to the target PEI program block are run, enabling the electronic device to boot normally.
[0181] Therefore, when the shared SEC program block is not damaged, even if either the main BIOS or the backup BIOS is damaged, the electronic device can still run the PEI program block and other program blocks of the other BIOS, which can improve the success rate of the electronic device booting normally.
[0182] It is understood that the steps performed by the electronic device involved in the embodiments of this application can also be understood as the steps performed by the processor of the electronic device.
[0183] The above-described embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.
[0184] As used in the above embodiments, depending on the context, the term "when..." can be interpreted as meaning "if...", "after...", "in response to determining...", or "in response to detecting...". Similarly, depending on the context, the phrase "when determining..." or "if (the stated condition or event) is interpreted as meaning "if determining...", "in response to determining...", "when (the stated condition or event) is detected", or "in response to detecting (the stated condition or event)".
[0185] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid-state drive), etc.
[0186] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.
[0187] In summary, the above description is merely an embodiment of the technical solution of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made based on the disclosure of this application should be included within the scope of protection of this application.
Claims
1. A method for running a startup program of an electronic device, characterized in that, The electronic device includes a processor, a first memory, and a second memory. The first memory is a read-only memory that the processor can directly read its data, and the second memory is an auxiliary memory that the processor reads its data through main memory. The method includes: The processor retrieves a first program block from the first memory and runs the first program block, wherein the first program block is a first part of the startup program and is used to implement security authentication before the startup program runs. The processor selects one of a second program block and a third program block as the target program block for the next step. The second program block is stored in the first memory, and the third program block is stored in the second memory. Both the second program block and the third program block belong to the second part of the startup program and are used to run the startup program. The second program block includes the PEI program in the startup program. The PEI program is used to repair the startup program. After the first program block has finished running, the processor runs the target program block; If the processor selects the third program block as the target program block for the next step, the method further includes: The processor retrieves the bootloader block of the third program block from the first memory and runs the bootloader block of the third program block. The bootloader block of the third program block is used to determine the storage location of the third program block and load the third program block into the memory of the electronic device. The third program block includes program blocks in the startup program other than the bootloader block of the third program and the first program block.
2. The method according to claim 1, characterized in that, Also includes: The processor checks whether the second program block is corrupted or intact; If the second program block is damaged or incomplete, the third program block is selected as the target program block for the next step; if the second program block is not damaged or incomplete, the second program block is selected as the target program block for the next step.
3. The method according to claim 1, characterized in that, Also includes: The processor checks whether the second program block and the third program block are damaged or intact; If either the second program block or the third program block is damaged or incomplete, select the undamaged or complete program block as the target program block for the next step. If neither the second program block nor the third program block is damaged or both are intact, the program block with the better version number is selected as the target program block for the next step.
4. The method according to claim 1, characterized in that, The processor specifically selects the version with the better version from the second program block and the third program block as the target program block for the next step.
5. The method according to claim 2 or 3, characterized in that, Also includes: The processor repairs damaged or incomplete program blocks, or the processor issues a repair notification.
6. The method according to any one of claims 1-4, characterized in that, Also includes: The processor obtains the upgrade package for the startup program; The processor selects one of the second program block and the third program block as the upgrade target, and uses the upgrade package to upgrade the selected program block.
7. The method according to any one of claims 1-6, characterized in that, Also includes: The bootloader is UEFIBIOS, which supports the Unified Extensible Firmware Interface Specification.
8. An electronic device, characterized in that, The electronic device includes: a processor, a first memory, and a second memory; The first memory is a read-only memory that the processor can directly read its data. The first memory stores a first program block and a second program block. The first program block belongs to the first part of the startup program and is used to implement security authentication before the startup program runs. The second program block includes the PEI program in the startup program. The PEI program is used to repair the startup program. The second program block belongs to the second part of the startup program and is used to run the startup program. The second memory is an auxiliary memory for the processor to read its data through the main memory. The second memory stores a third program block, which includes program blocks in the startup program other than the boot program block of the third program and the first program block. The third program block belongs to the second part of the startup program and is used to run the startup program. The processor is used to retrieve the first program from the first memory and run the first program block to perform security authentication before the startup program runs; The processor is also configured to select one of the second program block and the third program block as the target program block for the next step; After the first program block has finished running, the processor is used to run the target program block to run the startup program; The processor is further configured to, when the processor selects the third program block as the target program block for the next step, retrieve the boot program block of the third program block from the first memory and run the boot program block of the third program block, wherein the boot program block of the third program block is configured to determine the storage location of the third program block and load the third program block into the memory of the electronic device.
9. The electronic device according to claim 8, characterized in that, The processor is also used to check whether the second program block is damaged or intact; If the second program block is damaged or incomplete, the processor selects the third program block as the next target program block; if the second program block is not damaged or incomplete, the processor selects the second program block as the next target program block.
10. The electronic device according to claim 8, characterized in that, The processor is also used to check whether the second program block and the third program block are damaged or intact; If either the second program block or the third program block is damaged or incomplete, the processor selects an undamaged or complete program block as the target program block for the next step. If neither the second program block nor the third program block is damaged or both are intact, the processor selects the program block with the better version number as the target program block for the next step.
11. The electronic device according to claim 8, characterized in that, Specifically, the processor is used to select the version with the better version from the second and third program blocks as the target program block for the next step.
12. The electronic device according to claim 9 or 10, characterized in that, The processor is also used to repair damaged or incomplete program blocks, or to issue a repair notification.
13. The electronic device according to any one of claims 8-11, characterized in that, The processor is further configured to obtain an upgrade package for the startup program, select one of the second program block and the third program block as the upgrade target, and use the upgrade package to upgrade the selected program block.
Citation Information
Patent Citations
BIOS firmware dividing and updating method and system
CN104573529A
Dual BIOS startup and BIOS version comparison processing system
CN109117196A
Data processing method and data processing equipment
CN111078469A
