Firmware updating method and device, electronic equipment and storage medium

By storing the firmware to be upgraded in the on-chip backup storage area of ​​the processor and exchanging the address, the problem of resetting the firmware upgrade in the prior art is solved, and efficient firmware upgrade is achieved without power loss.

CN119493586APending Publication Date: 2025-02-21北京中科昊芯科技有限公司
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202411565380.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-05
Publication Date
2025-02-21

AI Technical Summary

Technical Problem

The existing firmware upgrade method requires resetting the load boot program during the upgrade process, and cannot meet the processing system with high requirements for high-speed operation or real-time performance.

Method used

Store firmware to be upgraded in the processor's on-chip backup storage area, and pause the execution of the current program under normal working state, and exchange the address between the backup storage area and the on-chip firmware operation area to ensure that the program will jump to backup after upgrading Firmware to be upgraded in the storage area.

Benefits of technology

It realizes firmware upgrade without power loss, simplifies operation steps, improves upgrade efficiency, and meets the requirements of high-speed operation and real-time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119493586A_ABST
    Figure CN119493586A_ABST
Patent Text Reader

Abstract

The invention provides a firmware updating method and device, electronic equipment and a storage medium, and the method comprises the steps: responding to a to-be-upgraded firmware configuration operation, and storing a to-be-upgraded firmware in an on-chip backup storage area of a processor; in the normal working state, pausing the execution process of the current program; wherein the current program is initial firmware in an on-chip firmware running area; and performing address exchange on the backup storage area and the on-chip firmware running area to enable the current program to jump to the to-be-upgraded firmware in the on-chip backup storage area when the current program is recovered and executed. According to the method, the mode that the to-be-upgraded firmware is pre-stored in the processor is adopted, firmware upgrading can be achieved under the condition of no power failure, operation steps are simplified, and upgrading efficiency is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of firmware update, and in particular to a method, device, electronic device and storage medium for firmware update. Background Art

[0002] Firmware is generally stored in the EEPROM (Electrically Erasable Programmable ROM) or FLASH chip in the device, and can generally be upgraded by the user through a specific refresh program. Generally speaking, the software that performs the most basic and lowest-level work of a digital product can be called firmware, such as the Basic Input / Output System (BIOS) on the computer motherboard.

[0003] At present, most firmware upgrades are performed by detecting preset flags: when the boot flag is a preset enumeration flag, the firmware upgrade action corresponding to the boot flag is executed. When the boot flag is a non-preset enumeration flag, the firmware status of the on-chip firmware running area, the off-chip firmware update area, and the off-chip firmware backup area is detected. According to the detection results, the boot flag is modified, and the boot loader is reset and re-run to achieve efficient and reliable firmware upgrade operations. This upgrade method requires resetting the boot loader during the firmware upgrade process, which cannot meet the requirements of high-speed operation or processing systems with high real-time requirements. Summary of the invention

[0004] In view of this, the purpose of the present application is to provide a method, device, electronic device and storage medium for updating firmware to overcome the problems in the prior art.

[0005] In a first aspect, an embodiment of the present application provides a method for updating firmware, the method comprising:

[0006] In response to the configuration operation of the firmware to be upgraded, storing the firmware to be upgraded in an on-chip backup storage area of ​​the processor;

[0007] Under normal working conditions, suspend the execution process of the current program; wherein the current program is the initial firmware in the on-chip firmware running area;

[0008] The addresses of the backup storage area and the on-chip firmware running area are exchanged so that when the current program is resumed, the current program jumps to the firmware to be upgraded in the on-chip backup storage area.

[0009] In some technical solutions of the present application, the processor includes a plurality of storage areas to be selected, and the method determines the on-chip backup storage area in the following manner:

[0010] From the candidate storage areas outside the firmware running area, a candidate storage area matching the firmware to be upgraded is selected as the internal backup storage area.

[0011] In some technical solutions of the present application, the above method further includes:

[0012] The backup storage area and the on-chip firmware running area are detected, and when a preset exchange condition is met, the addresses of the backup storage area and the on-chip firmware running area are exchanged.

[0013] In some technical solutions of the present application, the above-mentioned detecting the backup storage area and the on-chip firmware running area, and exchanging the addresses of the backup storage area and the on-chip firmware running area when a preset exchange condition is met, includes:

[0014] After the backup storage area and the on-chip firmware running area are initialized and are in a non-self-test process, the addresses of the backup storage area and the on-chip firmware running area are swapped.

[0015] In some technical solutions of the present application, the above method further includes:

[0016] A security check is performed on the backup storage area and the on-chip firmware running area, and when a preset security condition is met, the addresses of the backup storage area and the on-chip firmware running area are swapped.

[0017] In some technical solutions of the present application, the security detection of the backup storage area and the on-chip firmware running area is performed, and when a preset security condition is met, the addresses of the backup storage area and the on-chip firmware running area are swapped, including:

[0018] When the backup storage area and the on-chip firmware running area have the same security setting, the addresses of the backup storage area and the on-chip firmware running area are swapped.

[0019] In some technical solutions of the present application, when the backup storage area and the on-chip firmware running area have the same security settings, the backup storage area and the on-chip firmware running area perform address swapping, including:

[0020] When the backup storage area and the on-chip firmware running area are in the same security area and in an open state, the addresses of the backup storage area and the on-chip firmware running area are exchanged.

[0021] In a second aspect, an embodiment of the present application provides a device for updating firmware, the device comprising:

[0022] A response module, configured to store the firmware to be upgraded in an on-chip backup storage area of ​​the processor in response to a configuration operation of the firmware to be upgraded;

[0023] A pause module, used to pause the execution process of the current program under normal working conditions; wherein the current program is the initial firmware in the on-chip firmware running area;

[0024] The exchange module is used to exchange addresses of the backup storage area and the on-chip firmware running area, so that when the current program is restored to be executed, the current program jumps to the firmware to be upgraded in the on-chip backup storage area.

[0025] In a third aspect, an embodiment of the present application provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned firmware update method when executing the computer program.

[0026] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned firmware update method are executed.

[0027] The technical solution provided by the embodiments of the present application may have the following beneficial effects:

[0028] The method of the present application includes, in response to the configuration operation of the firmware to be upgraded, storing the firmware to be upgraded in the on-chip backup storage area of ​​the processor; pausing the execution process of the current program under normal working conditions; wherein the current program is the initial firmware in the on-chip firmware running area; exchanging the addresses of the backup storage area and the on-chip firmware running area, so that when the current program is resumed, the current program jumps to the firmware to be upgraded in the on-chip backup storage area. The present application adopts the method of pre-storing the firmware to be upgraded inside the processor, so that the firmware upgrade can be realized without power failure, which simplifies the operation steps and improves the upgrade efficiency.

[0029] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, preferred embodiments are specifically cited below and described in detail with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0031] Figure 1 A schematic diagram showing a flow chart of a firmware update method provided in an embodiment of the present application is shown;

[0032] Figure 2 A schematic diagram of a processor provided in an embodiment of the present application is shown;

[0033] Figure 3 A schematic diagram of address exchange provided by an embodiment of the present application is shown;

[0034] Figure 4 A schematic diagram of a firmware update device provided in an embodiment of the present application is shown;

[0035] Figure 5 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0036] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. It should be understood that the drawings in the present application only serve the purpose of explanation and description and are not used to limit the scope of protection of the present application. In addition, it should be understood that the schematic drawings are not drawn in real proportion. The flowchart used in this application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented out of sequence, and the steps without logical context can be reversed in order or implemented simultaneously. In addition, those skilled in the art can add one or more other operations to the flowchart under the guidance of the content of the present application, or remove one or more operations from the flowchart.

[0037] In addition, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. The components of the embodiments of the present application described and shown in the drawings here can be arranged and designed in various configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.

[0038] It should be noted that the term "comprising" will be used in the embodiments of the present application to indicate the existence of the features declared thereafter, but does not exclude the addition of other features.

[0039] Firmware is generally stored in the EEPROM (Electrically Erasable Programmable ROM) or FLASH chip in the device, and can generally be upgraded by the user through a specific refresh program. Generally speaking, the software that performs the most basic and lowest-level work of a digital product can be called firmware, such as the Basic Input / Output System (BIOS) on the computer motherboard.

[0040] At present, most firmware upgrades are performed by detecting preset flags: when the boot flag is a preset enumeration flag, the firmware upgrade action corresponding to the boot flag is executed. When the boot flag is a non-preset enumeration flag, the firmware status of the on-chip firmware running area, the off-chip firmware update area, and the off-chip firmware backup area is detected. According to the detection results, the boot flag is modified, and the boot loader is reset and re-run to achieve efficient and reliable firmware upgrade operations. This upgrade method requires resetting the boot loader during the firmware upgrade process, which cannot meet the requirements of high-speed operation or processing systems with high real-time requirements.

[0041] Based on this, the embodiments of the present application provide a method, device, electronic device and storage medium for firmware update, which are described below through embodiments.

[0042] Figure 1 A flowchart of a firmware update method provided in an embodiment of the present application is shown, wherein the method includes steps S101-S103; specifically:

[0043] S101, in response to a configuration operation of a firmware to be upgraded, storing the firmware to be upgraded in an on-chip backup storage area of ​​a processor;

[0044] S102, in a normal working state, suspending the execution process of the current program; wherein the current program is the initial firmware in the on-chip firmware running area;

[0045] S103: swapping addresses of the backup storage area and the on-chip firmware running area, so that when resuming execution of the current program, the current program jumps to the firmware to be upgraded in the on-chip backup storage area.

[0046] The present application adopts a method of pre-storing the firmware to be upgraded inside the processor, so that the firmware upgrade can be achieved without power failure, which simplifies the operation steps and improves the upgrade efficiency.

[0047] Some embodiments of the present application are described in detail below. In the absence of conflict, the following embodiments and features in the embodiments can be combined with each other.

[0048] like Figure 2 As shown, the firmware upgrade method in the prior art needs to store the firmware to be upgraded in the off-chip firmware update area 210, while the present application stores the firmware to be upgraded in the on-chip backup storage area through configuration operation, and the on-chip backup storage area can be the first on-chip storage area 1222, the second on-chip storage area 1224, etc. The specific configuration process can be to store the firmware to be upgraded in the first on-chip storage area 1222 or the second on-chip storage area 1224 through the cooperation of the external input device and the processing unit.

[0049] In an actual processor, there are generally multiple storage areas to be selected, such as Figure 2 There are also a third on-chip storage area, a fourth on-chip storage area, a fifth on-chip storage area, etc., which are not shown. When storing the firmware to be upgraded, it is necessary to select a backup storage area from multiple storage areas to be selected. When selecting, in order to ensure the normal working state of the processor, the firmware to be upgraded needs to be stored in a storage area other than the firmware running area. The firmware running area here is the storage area where the current program of the processor is executed. In order to distinguish, it is called the firmware running area.

[0050] When selecting a backup storage area from the storage areas to be selected other than the firmware running area, it is necessary to consider whether each storage area to be selected matches the firmware to be upgraded. Whether it matches here is mainly reflected in whether the capacity of the storage area to be selected can accommodate the firmware to be upgraded. Specifically, it can be represented by the difference between the actual capacity of the access area to be selected and the required capacity of the firmware to be upgraded. When the difference is greater than or equal to the preset capacity threshold, it means that the storage area to be selected matches the firmware to be upgraded. When the difference is less than the preset capacity threshold, it means that the storage area to be selected does not match the firmware to be upgraded. Whether it matches here is also reflected in the impact of the firmware to be upgraded on the storage area to be selected. If the storage of the firmware to be upgraded has a greater impact on the storage area to be selected, it indicates that the matching degree between the two is low. If the storage of the firmware to be upgraded has a smaller impact on the storage area to be selected, it indicates that the matching degree between the two is high. The size of the impact here can be reflected in the degree of data affected in the storage area to be selected.

[0051] In the prior art, when the firmware to be upgraded is stored in the off-chip firmware update area, the firmware upgrade needs to be performed in a shutdown state (power off), and when the processor is restored to a normal working state, a reset and program loading are performed. However, the present application is performed when the processor is in a normal working state (power on).

[0052] When the processor is in a normal working state, the execution process of the current program is suspended. The current program here is the initial firmware in the on-chip firmware running area, that is, the purpose of the embodiment of the present application is to upgrade the initial firmware and let the processor run the firmware to be upgraded. After pausing the execution of the current program, the backup storage area and the on-chip firmware running area are exchanged for address, and then the current program execution process is continued. At this time, the current program is upgraded from the original initial firmware to the firmware to be upgraded, completing the firmware upgrade process.

[0053] In an optional embodiment, if Figure 3 As shown, for the memory unit in the processor, by default, the physical block 1 is allocated to the address 0x1_0000~0x1_1FFF, and the physical block 2 is allocated to the address 0x1_2000~0x1_3FFF. By configuring the internal registers, the user application code can perform the swap, where the physical block 2 is now allocated to 0x1_0000~0x1_1FFF and the physical block 1 is allocated to 0x1_2000~0x1_3FFF.

[0054] Assume that the old firmware program is stored in LS0 and the user execution program is stored in LS0. During the operation of the user program, the new firmware program can be stored in LS1, and by performing LFU real-time swap, the execution program jumps to LS1. This ensures that the new firmware upgrade is completed without power failure.

[0055] In this application, LFU real-time firmware update helps to update the firmware while the application is running, thus eliminating downtime. After configuring LFU swap enable, the hardware itself completes the update of the logical address, and the program automatically jumps to the swapped storage unit to execute the new firmware program. There is no need to load the program again through a reset.

[0056] In an optional implementation, before performing the address exchange, the backup storage area and the on-chip firmware running area need to be detected to determine whether the two satisfy the preset exchange condition. Only when the two satisfy the preset exchange condition, the addresses of the two are exchanged.

[0057] The exchange condition here is that the backup storage area and the on-chip firmware running area are initialized and in a non-self-test process. That is, only when the backup storage area and the on-chip firmware running area are initialized and in a non-self-test process, the backup storage area and the on-chip firmware running area are exchanged. Specifically, the LS0 / LS1 RAM memory exchange can only be performed after the LS0 / LS1 RAM is initialized. LFU switching cannot be performed during L0 / L1 bist. At the same time, bist operation cannot be performed when LFU is switched.

[0058] On the other hand, in order to ensure the accuracy of the data, before performing the address exchange and before starting the LS0 / LS1 exchange, all service memory-related errors are suspended (access violation, ECC, parity check) (user software implementation, check the relevant registers and suspend the errors).

[0059] In an optional implementation, before the address exchange, the backup storage area and the on-chip firmware running area are also subjected to security detection. The backup storage area and the on-chip firmware running area are exchanged only when the backup storage area and the on-chip firmware running area meet the preset security conditions.

[0060] Further, the preset security condition here is that the backup storage area and the on-chip firmware running area need to have the same security settings. The security settings here include the security area and the state where the backup storage area and the on-chip firmware running area are located. Specifically, when the backup storage area and the on-chip firmware running area need to be in the same security area and are in an open state, the backup storage area and the on-chip firmware running area are exchanged for address.

[0061] During the specific implementation, in addition to the backup storage area and the on-chip firmware running area, the code for starting the exchange also needs to be considered. Specifically, when there is DCSM security on the processor, the LS0 / LS1 RAN blocks can usually be assigned to different security areas. However, through LS0 / LS1 RAM memory swapping, different physical RAM blocks can be mapped to the same address space. Therefore, if LS0 / LS1 RAM memory swapping is desired, the application software should ensure that LS0 / LS1 has the same security settings (zone, EXE protection). If there are different security configurations, hardware logic is implemented on the device to prevent the swapping of LS0 / LS1.

[0062] To prevent security breaches, if LS0 / LS1 RAM memory swap is initiated by code from a different zone, memory swapping is not allowed. If LS0 and LS1 are part of zone1, swapping is not allowed if the code that initiated the swap is in zone2 or not in the secure zone. If LS0 and LS1 are part of zone2, swapping is not allowed if the code that initiated the swap is in zone1 or not in the secure zone. If LS0 / LS1 are part of the non-secure zone, swapping is allowed in all cases, regardless of where the code that initiated the swap is. If LS0 / LS1 are part of the same zone and it is unlocked, swapping is allowed in all cases, regardless of where the code that initiated the swap is.

[0063] Figure 4A schematic diagram of the structure of a firmware update device provided in an embodiment of the present application is shown, wherein the device comprises:

[0064] A response module, configured to store the firmware to be upgraded in an on-chip backup storage area of ​​the processor in response to a configuration operation of the firmware to be upgraded;

[0065] A pause module, used to pause the execution process of the current program under normal working conditions; wherein the current program is the initial firmware in the on-chip firmware running area;

[0066] The exchange module is used to exchange addresses of the backup storage area and the on-chip firmware running area, so that when the current program is restored to be executed, the current program jumps to the firmware to be upgraded in the on-chip backup storage area.

[0067] The processor includes a plurality of storage areas to be selected, and the method determines the on-chip backup storage area in the following manner:

[0068] From the candidate storage areas outside the firmware running area, a candidate storage area matching the firmware to be upgraded is selected as the internal backup storage area.

[0069] The device also includes a detection module, which is used to detect the backup storage area and the on-chip firmware running area, and when a preset exchange condition is met, the backup storage area and the on-chip firmware running area are exchanged for address.

[0070] The detecting the backup storage area and the on-chip firmware running area, and exchanging addresses of the backup storage area and the on-chip firmware running area when a preset exchange condition is met, comprises:

[0071] After the backup storage area and the on-chip firmware running area are initialized and are in a non-self-test process, the addresses of the backup storage area and the on-chip firmware running area are swapped.

[0072] A security check is performed on the backup storage area and the on-chip firmware running area, and when a preset security condition is met, the addresses of the backup storage area and the on-chip firmware running area are swapped.

[0073] The performing of security detection on the backup storage area and the on-chip firmware running area, and exchanging addresses of the backup storage area and the on-chip firmware running area when a preset security condition is met, comprises:

[0074] When the backup storage area and the on-chip firmware running area have the same security setting, the addresses of the backup storage area and the on-chip firmware running area are swapped.

[0075] When the backup storage area and the on-chip firmware running area have the same security setting, the backup storage area and the on-chip firmware running area perform address swapping, including:

[0076] When the backup storage area and the on-chip firmware running area are in the same security area and in an open state, the addresses of the backup storage area and the on-chip firmware running area are exchanged.

[0077] like Figure 5 As shown, an embodiment of the present application provides an electronic device for executing the firmware update method in the present application, the device includes a memory, a processor, a bus, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the firmware update method when executing the computer program.

[0078] Specifically, the above-mentioned memory and processor may be general-purpose memory and processor, which are not specifically limited here. When the processor runs the computer program stored in the memory, the above-mentioned firmware update method can be executed.

[0079] Corresponding to the firmware update method in the present application, an embodiment of the present application also provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the above-mentioned firmware update method are executed.

[0080] Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, etc. When the computer program on the storage medium is executed, the above-mentioned firmware update method can be executed.

[0081] In the embodiments provided in the present application, it should be understood that the disclosed systems and methods can be implemented in other ways. The system embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of systems or units, which can be electrical, mechanical or other forms.

[0082] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, and may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0083] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processor, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0084] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0085] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.

[0086] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

Claims

1. A method for updating firmware, characterized in that: The method comprises: In response to the configuration operation of the firmware to be upgraded, storing the firmware to be upgraded in an on-chip backup storage area of ​​the processor; Under normal working conditions, suspend the execution process of the current program; wherein the current program is the initial firmware in the on-chip firmware running area; The addresses of the backup storage area and the on-chip firmware running area are exchanged so that when the current program is resumed, the current program jumps to the firmware to be upgraded in the on-chip backup storage area.

2. The method according to claim 1, characterized in that The processor includes a plurality of storage areas to be selected, and the method determines the on-chip backup storage area in the following manner: From the candidate storage areas outside the firmware running area, a candidate storage area matching the firmware to be upgraded is selected as the internal backup storage area.

3. The method according to claim 1, characterized in that: The method further comprises: The backup storage area and the on-chip firmware running area are detected, and when a preset exchange condition is met, the addresses of the backup storage area and the on-chip firmware running area are exchanged.

4. The method according to claim 3, characterized in that: The detecting the backup storage area and the on-chip firmware running area, and exchanging addresses of the backup storage area and the on-chip firmware running area when a preset exchange condition is met, comprises: After the backup storage area and the on-chip firmware running area are initialized and are in a non-self-test process, the addresses of the backup storage area and the on-chip firmware running area are swapped.

5. The method according to claim 1, characterized in that The method further comprises: A security check is performed on the backup storage area and the on-chip firmware running area, and when a preset security condition is met, the addresses of the backup storage area and the on-chip firmware running area are swapped.

6. The method according to claim 5, characterized in that The performing of security detection on the backup storage area and the on-chip firmware running area, and exchanging addresses of the backup storage area and the on-chip firmware running area when a preset security condition is met, comprises: When the backup storage area and the on-chip firmware running area have the same security setting, the addresses of the backup storage area and the on-chip firmware running area are swapped.

7. The method according to claim 6, characterized in that When the backup storage area and the on-chip firmware running area have the same security setting, the backup storage area and the on-chip firmware running area perform address swapping, including: When the backup storage area and the on-chip firmware running area are in the same security area and in an open state, the addresses of the backup storage area and the on-chip firmware running area are exchanged.

8. A device for updating firmware, characterized in that: The device comprises: A response module, configured to store the firmware to be upgraded in an on-chip backup storage area of ​​the processor in response to a configuration operation of the firmware to be upgraded; A pause module, used to pause the execution process of the current program under normal working conditions; wherein the current program is the initial firmware in the on-chip firmware running area; The exchange module is used to exchange addresses of the backup storage area and the on-chip firmware running area, so that when the current program is restored to be executed, the current program jumps to the firmware to be upgraded in the on-chip backup storage area.

9. An electronic device, characterized in that: include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor and the memory communicate via the bus, and when the machine-readable instructions are executed by the processor, the steps of the firmware update method as described in any one of claims 1 to 7 are performed.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the firmware updating method according to any one of claims 1 to 7 are executed.

Citation Information

Cited By

  • Method and device for quickly updating controller bus and storage medium

    CN120144500A

  • Firmware switching method and device, equipment and storage medium

    CN120276790A

  • Firmware upgrading system and method supporting real-time state monitoring and resisting power failure

    CN120848928A

  • A firmware upgrade system and method that supports real-time status monitoring and is resistant to power outages.

    CN120848928B