Firmware upgrading method, device and equipment and readable storage medium

By storing read-only firmware in Norflash media and upgrade firmware in Nand media, the problem of slow firmware upgrade speed is solved, achieving a balance between fast upgrade and factory offline programming.

CN116301973BActive Publication Date: 2026-05-08INSPUR SUZHOU INTELLIGENT TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
INSPUR SUZHOU INTELLIGENT TECH CO LTD
Filing Date
2023-02-17
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

In existing technologies, firmware upgrades are slow, resulting in excessively long upgrade times for solid-state drives, which affects storage services and cannot guarantee the requirements for factory-standard offline flashing.

Method used

The firmware is divided into read-only slot areas and upgrade slot areas. The read-only firmware is stored in Norflash media, and the upgrade firmware is stored in Nand media. The boot program obtains the startup information to determine the target upgrade slot area, and performs data reading and upgrade in the power-on running state.

Benefits of technology

This improved firmware upgrade speed, reduced the impact on user services, and ensured the efficiency of factory-based offline flashing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116301973B_ABST
    Figure CN116301973B_ABST
Patent Text Reader

Abstract

The application provides a firmware upgrading method, device and equipment and a readable storage medium, and relates to the field of firmware upgrading.The method comprises the following steps: in response to a firmware upgrading instruction, obtaining starting information in a key starting area of a first medium; determining a target upgrading slot area from all upgrading slot areas of a second medium according to the starting information; obtaining a firmware to be upgraded from the target upgrading slot area, and upgrading the firmware to be upgraded according to the firmware upgrading instruction; the starting information is obtained by calling a firmware boot loader (FBL) from a read-only slot area of the first medium; the read-only slot area also stores a read-only function firmware used for offline burning; the capacity of the first medium is smaller than that of the second medium; and the firmware upgrading speed of the first medium is smaller than that of the second medium.The application can not only ensure the factory offline burning of the solid state disk, but also improve the upgrading efficiency of the firmware, thereby reducing the influence of firmware upgrading on user operation business.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of firmware upgrades, and more particularly to a firmware upgrade method, apparatus, device, and readable storage medium. Background Technology

[0002] Currently, firmware to be upgraded is usually stored in Norflash media. However, this approach not only reduces the speed at which solid-state drives erase redundant files after firmware upgrades, but also reduces the speed at which corresponding upgrade files are written. This not only leads to excessively long firmware upgrade times, but also causes storage service anomalies. Summary of the Invention

[0003] This invention provides a firmware upgrade method, apparatus, device, and readable storage medium to address the technical deficiencies in existing technologies that fail to achieve rapid firmware upgrades while ensuring offline factory programming. It provides a technical solution that divides the firmware into slot areas, stores the factory-produced firmware on Norflash media, and stores the upgrade firmware on the non-volatile Nand medium of a solid-state drive, thereby improving the firmware upgrade speed.

[0004] In a first aspect, the present invention provides a firmware upgrade method, comprising:

[0005] In response to a firmware upgrade command, obtain boot information from the critical boot area of ​​the first medium;

[0006] Based on the startup information, the target upgrade slot area is determined from all upgrade slot areas of the second medium;

[0007] Obtain the firmware to be upgraded from the target upgrade slot area, and upgrade the firmware to be upgraded according to the firmware upgrade instruction;

[0008] The boot information is obtained by calling the firmware bootloader FBL from the read-only slot area of ​​the first medium;

[0009] The read-only slot area also stores read-only firmware for offline programming.

[0010] The capacity of the first medium is less than the capacity of the second medium;

[0011] The firmware upgrade speed of the first medium is less than that of the second medium.

[0012] According to the firmware upgrade method provided by the present invention, after determining the target upgrade slot region from all upgrade slot regions of the second medium, the method further includes:

[0013] When the target upgrade slot area is in a powered-on operating state, the FCC microcode area of ​​the first medium is invoked to establish a message channel for data reading with the target upgrade slot area based on the FCC microcode area.

[0014] According to the firmware upgrade method provided by the present invention, the step of obtaining the firmware to be upgraded from the target upgrade slot area and upgrading the firmware to be upgraded according to the firmware upgrade instruction includes:

[0015] According to the message channel, the firmware to be upgraded is obtained from the primary backup or from the backup of the target upgrade slot area;

[0016] According to the firmware upgrade instruction, obtain the version upgrade parameters that match the version information carried in the firmware upgrade instruction from the preset server;

[0017] Upgrade the firmware to be upgraded according to the version upgrade parameters.

[0018] According to the firmware upgrade method provided by the present invention, before upgrading the firmware to be upgraded according to the version upgrade parameters, the method further includes:

[0019] If the firmware to be upgraded cannot be obtained from the primary backup of the target upgrade slot area or from the backup, the read-only firmware is obtained to load and run the solid-state drive according to the read-only firmware.

[0020] According to the firmware upgrade method provided by the present invention, after upgrading the firmware to be upgraded according to the firmware upgrade instruction, the method further includes:

[0021] When the firmware upgrade is complete, upgrade completion information is generated, which includes at least the upgrade slot area information where the upgraded firmware is located.

[0022] Update the startup information based on the upgrade completion information and generate a restart command;

[0023] In response to the reboot command, the upgraded firmware is retrieved from the upgrade slot area where the upgraded firmware is located based on the updated boot information, so as to load and run the solid-state drive according to the upgraded firmware.

[0024] According to the firmware upgrade method provided by the present invention, determining the target upgrade slot region from all upgrade slot regions of the second medium based on the boot information includes:

[0025] If an upgrade slot area matching the startup information exists in all upgrade slot areas, the target upgrade slot area is determined from all upgrade slot areas of the second medium;

[0026] If no upgrade slot area matching the startup information is found in all upgrade slot areas, the target upgrade slot area is determined from all upgrade slot areas of the second medium according to the firmware upgrade characteristics in the firmware upgrade instruction.

[0027] The firmware upgrade features include the firmware protocol version and the target upgrade power consumption.

[0028] According to the firmware upgrade method provided by the present invention, determining the target upgrade slot region from all upgrade slot regions of the second medium based on the firmware upgrade features in the firmware upgrade instruction includes:

[0029] Determine the preset protocol version and preset power consumption range corresponding to each upgrade slot area.

[0030] If the firmware protocol version of the firmware upgrade feature matches the preset protocol version corresponding to any upgrade slot area, the upgrade slot area is determined as the target upgrade slot area.

[0031] If the firmware protocol version of the firmware upgrade feature does not match the preset protocol version corresponding to all upgrade slot areas, the target upgrade power consumption of the firmware upgrade feature is determined.

[0032] If the target upgrade power consumption falls within the preset power consumption range corresponding to any upgrade slot area, the upgrade slot area is determined as the target upgrade slot area.

[0033] According to the firmware upgrade method provided by the present invention, after responding to the firmware upgrade command, the method further includes:

[0034] The read-only slot area of ​​the first medium is determined based on the bootloader BOOTROM.

[0035] Secondly, a firmware upgrade device is provided, comprising:

[0036] Acquisition Unit: Used to acquire boot information from the critical boot area of ​​the first medium in response to a firmware upgrade command;

[0037] Determining unit: used to determine the target upgrade slot area from all upgrade slot areas of the second medium based on the startup information;

[0038] Upgrade unit: used to obtain the firmware to be upgraded from the target upgrade slot area, and upgrade the firmware to be upgraded according to the firmware upgrade instruction;

[0039] The boot information is obtained by calling the firmware bootloader FBL from the read-only slot area of ​​the first medium;

[0040] The read-only slot area also stores read-only firmware for offline programming.

[0041] The capacity of the first medium is less than the capacity of the second medium;

[0042] The firmware upgrade speed of the first medium is less than that of the second medium.

[0043] Thirdly, the present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the firmware upgrade method.

[0044] Fourthly, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the firmware upgrade method as described above.

[0045] This invention provides a firmware upgrade method, apparatus, device, and readable storage medium. By storing read-only firmware for offline burning in a read-only slot area of ​​a first medium and storing the firmware to be upgraded in a second medium, this invention enables the firmware to be upgraded to be retrieved from the second medium and upgraded according to the firmware upgrade instruction during firmware upgrade. This invention not only ensures factory-standard offline burning of solid-state drives but also improves firmware upgrade efficiency, thereby reducing the impact of firmware upgrades on user operations. Attached Figure Description

[0046] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0047] Figure 1 This is one of the flowcharts illustrating the firmware upgrade method provided by the present invention;

[0048] Figure 2 This is a schematic diagram of the process for upgrading the firmware to be upgraded provided by the present invention;

[0049] Figure 3 This is the second flowchart illustrating the firmware upgrade method provided by the present invention;

[0050] Figure 4 This is a flowchart illustrating the process of determining the target upgrade slot area based on startup information provided by the present invention.

[0051] Figure 5This is a schematic diagram of the process for determining the target upgrade slot area based on firmware upgrade features provided by the present invention;

[0052] Figure 6 This is the third flowchart of the firmware upgrade method provided by the present invention;

[0053] Figure 7 This is a schematic diagram of the firmware upgrade device provided by the present invention;

[0054] Figure 8 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation

[0055] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.

[0056] In storage applications, especially in actual factory production, solid state drives (SSDs) require firmware flashing and subsequent assembly before undergoing factory aging tests. External offline flashing can effectively improve enterprise production efficiency and simplify processes. Therefore, it is necessary to flash the firmware offline to the non-volatile medium Norflash. After leaving the factory, SSD products may require continuous online upgrades due to firmware bugs or new product features. It is necessary to ensure online upgrades within a very short time to minimize the impact on user business.

[0057] However, when saving the upgrade firmware to the non-volatile medium Norflash, the slow erase and write speeds of the upgrade firmware will cause the entire firmware upgrade time to be too long, leading to anomalies in enterprise storage operations. If the entire firmware is written to the secondary medium of the SSD, the offline burning process, typical of factory processes, cannot be guaranteed. To solve the above technical problems, this invention provides a firmware upgrade method, apparatus, device, and readable storage medium. Figure 1 This is one of the flowcharts illustrating the firmware upgrade method provided by the present invention, which includes:

[0058] Step 101: In response to the firmware upgrade command, obtain the boot information in the critical boot area of ​​the first medium;

[0059] Step 102: Based on the startup information, determine the target upgrade slot area from all upgrade slot areas of the second medium;

[0060] Step 103: Obtain the firmware to be upgraded from the target upgrade slot area, and upgrade the firmware to be upgraded according to the firmware upgrade instruction;

[0061] The boot information is obtained by calling the firmware bootloader FBL from the read-only slot area of ​​the first medium;

[0062] The read-only slot area also stores read-only firmware for offline programming.

[0063] The capacity of the first medium is less than the capacity of the second medium;

[0064] The firmware upgrade speed of the first medium is less than that of the second medium.

[0065] In step 101, the first medium is a Norflash medium, and the second medium is a Nand medium. This invention can execute firmware running instructions and firmware upgrade instructions. This invention divides the firmware into slot areas. In the read-only slot area, only firmware read-only is supported, and firmware upgrade is not supported. In the upgrade slot area, it is used for firmware upgrade. Specifically, since the read-only slot area does not need to be used for firmware upgrade, in order to save costs, the capacity of the first medium is less than the capacity of the second medium. Considering that the capacity of the first medium does not need to be too large, the first medium corresponding to the read-only slot area can be a chip with a capacity less than or equal to a preset capacity. Optionally, the preset capacity is 8MB.

[0066] Optionally, the firmware upgrade speed of the first medium is lower than that of the second medium. Since the second medium, which is used for firmware upgrade, can ensure a faster upgrade speed and a shorter storage time, storing the upgrade firmware in the second medium can achieve rapid firmware upgrade.

[0067] Furthermore, Figure 6 This is the third flowchart of the firmware upgrade method provided by the present invention. The first medium includes a read-only slot area, a critical boot area, a controller (Flash Channel Controller, FCC) microcode area, and an address mapping of the first medium. After receiving and responding to the firmware upgrade instruction, the boot information in the critical boot area of ​​the first medium is obtained. The boot information is used to obtain the location of the firmware to be upgraded in all upgrade slot areas of the second medium.

[0068] Those skilled in the art will understand that, in the case of the first firmware upgrade, since there is no corresponding firmware to be upgraded in the second medium, the target upgrade slot area can be determined according to the firmware upgrade characteristics or the form of specifying the upgrade slot area, and the firmware upgrade can be completed in the target upgrade slot area. After the firmware upgrade is completed, corresponding upgrade completion information will be generated. The upgrade completion information corresponds to the startup information and indicates the upgrade slot area where the upgraded firmware is stored, so that when performing the next firmware upgrade operation, the upgrade slot area where the current firmware to be upgraded is located can be obtained according to the startup information.

[0069] Optionally, in response to a firmware upgrade command, the following may be included:

[0070] The read-only slot area of ​​the first medium is determined based on the bootloader BOOTROM.

[0071] In response to the firmware upgrade command, the solid-state drive, upon startup, reads the fixed address of the read-only slot area of ​​the first medium according to the bootloader BOOTROM, that is, through... Figure 6 The address mapping of the first medium is used to achieve this. Furthermore, the boot information is obtained by calling the firmware boot loader (FBL) from the read-only slot area of ​​the first medium. More specifically, during the boot process, the firmware is read from the read-only slot area of ​​the first medium according to a preset strategy. After reading, the firmware boot loader FBL image program is run. The firmware boot loader FBL reads the boot information in the key boot area of ​​the first medium.

[0072] Optionally, the read-only slot area also stores read-only firmware for offline programming. By storing the read-only firmware for offline programming in the read-only slot area of ​​the first medium, no firmware upgrade is required. Specifically, in the factory production stage, the present invention can use a programmer to perform offline programming of the first medium. The arrangement of the first medium is stored in a primary / backup manner to prevent the SSD from failing to operate normally due to read errors. This not only ensures offline programming in the factory production stage and places the firmware upgrade process in the second medium, but also ensures the firmware upgrade speed.

[0073] In step 102, based on the startup information, a target upgrade slot area is determined from all upgrade slot areas of the second medium. Optionally, the upgrade slot area of ​​the present invention can be divided into 2 areas, 3 areas, or even more areas. This division can be based on different upgrade characteristics or different upgrade versions. Dividing the upgrade slot area into multiple areas serves two purposes: firstly, it can provide users with personalized upgrade options; secondly, it allows for timely remediation through other upgrade slot areas in case of a failure in one upgrade slot area, and even repair of the faulty upgrade slot area through other upgrade slot areas. Both the upgrade slot area and the read-only slot area are divided into two parts: one part is the firmware bootloader (FBL), and the other part is used to store the user firmware. The user firmware can be read-only firmware or firmware to be upgraded.

[0074] Optionally, based on the startup information, if the position of the firmware to be upgraded in all upgrade slot areas is read from the startup information, it indicates that the firmware to be upgraded is located in the corresponding target upgrade slot area. In this case, the target upgrade slot area can be determined from all upgrade slot areas of the second medium, such as... Figure 6 As shown, in order to further improve the reliability of the firmware to be upgraded in the second medium, the present invention adopts a dual backup mechanism when saving the firmware to be upgraded. That is, there is a primary backup and a secondary backup in each upgrade slot area. Optionally, the firmware to be upgraded is obtained from the primary backup. If the primary backup has a bug or fails to read, the firmware to be upgraded is obtained from the secondary backup.

[0075] In an optional embodiment, after determining the target upgrade slot region from all upgrade slot regions of the second medium, the process includes:

[0076] When the target upgrade slot area is in a powered-on operating state, the FCC microcode area of ​​the first medium is invoked to establish a message channel for data reading with the target upgrade slot area based on the FCC microcode area.

[0077] This invention first requires ensuring that the target upgrade slot area is in a powered-on operating state. Optionally, it requires ensuring that all upgrade slot areas are in a powered-on operating state to ensure the normal and stable progress of the upgrade process. Whether to load the FCC microcode area is determined based on the power-on state and the upgrade slot area of ​​the running firmware. Figure 6 As shown, when the target upgrade slot area is in a powered-on state, the FCC microcode area of ​​the first medium is invoked, and the FCC microcode-related initialization is first performed. Then, a message channel for data reading with the target upgrade slot area is established based on the FCC microcode area.

[0078] In step 103, the firmware to be upgraded is obtained from the target upgrade slot area, and the firmware to be upgraded is upgraded according to the firmware upgrade instruction. The present invention reads data based on the message channel constructed in step 102, and then obtains the firmware to be upgraded corresponding to the startup information. The firmware upgrade instruction may include the version to be upgraded, the feature to be upgraded, the content to be upgraded, etc., so as to obtain the corresponding upgrade parameters according to the firmware upgrade instruction, and finally complete the upgrade of the firmware to be upgraded.

[0079] This invention provides a firmware upgrade method, apparatus, device, and readable storage medium. By storing read-only firmware for offline burning in a read-only slot area of ​​a first medium and storing the firmware to be upgraded in a second medium, this invention enables the firmware to be upgraded to be retrieved from the second medium and upgraded according to the firmware upgrade instruction during firmware upgrade. This invention not only ensures factory-standard offline burning of solid-state drives but also improves firmware upgrade efficiency, thereby reducing the impact of firmware upgrades on user operations.

[0080] Figure 2 This is a schematic diagram of the process for upgrading the firmware to be upgraded provided by the present invention. The step of obtaining the firmware to be upgraded from the target upgrade slot area and upgrading the firmware to be upgraded according to the firmware upgrade instruction includes:

[0081] Step 1031: According to the message channel, obtain the firmware to be upgraded from the primary backup or from the backup of the target upgrade slot area;

[0082] Step 1032: According to the firmware upgrade instruction, obtain the version upgrade parameters that match the version information carried in the firmware upgrade instruction from the preset server;

[0083] Step 1033: Upgrade the firmware to be upgraded according to the version upgrade parameters.

[0084] In step 1031, according to the message channel, the firmware to be upgraded is obtained from the primary backup or the secondary backup of the target upgrade slot area. The firmware to be upgraded in the primary backup is the same as the firmware to be upgraded in the secondary backup. Optionally, after the last upgrade, the target upgrade slot area saves the upgraded firmware in the target upgrade slot area as the firmware to be upgraded for the next upgrade.

[0085] In step 1032, according to the firmware upgrade instruction, version upgrade parameters matching the version information carried by the firmware upgrade instruction are obtained from a preset server. The firmware to be upgraded is the firmware body under the current version. In this invention, it is also necessary to obtain the version upgrade parameters for upgrading the firmware. This invention can obtain them directly from the firmware upgrade instruction or from the preset server, that is, download the corresponding version upgrade parameters from the relevant website.

[0086] In step 1033, the firmware to be upgraded is upgraded according to the version upgrade parameters. Optionally, for example, if the version of the firmware to be upgraded is 1.16, then according to the firmware upgrade instruction, the version upgrade parameters matching the version 1.16 of the firmware upgrade instruction are obtained from a preset server, and the firmware to be upgraded is upgraded according to the version upgrade parameters of version number 1.16.

[0087] Optionally, before upgrading the firmware to be upgraded according to the version upgrade parameters, the method further includes:

[0088] If the firmware to be upgraded cannot be obtained from the primary backup of the target upgrade slot area or from the backup, the read-only firmware is obtained to load and run the solid-state drive according to the read-only firmware.

[0089] To prevent the solid-state drive from becoming unusable due to upgrade failure during the upgrade process, this invention prioritizes the normal operation of the solid-state drive when the firmware to be upgraded cannot be obtained. The read-only firmware is obtained from the read-only slot area of ​​the first medium, and the solid-state drive is loaded and run according to the read-only firmware.

[0090] Optionally, when performing firmware upgrades, the present invention can adopt an online upgrade method of Non-Disruptive Firmware Update (NDFU). By selecting or determining the target upgrade slot area, the firmware upgrade is required to be fast in order to minimize the impact on running services. Therefore, the firmware used for upgrade needs to be stored in a second medium instead of in Norflash. The second medium can be stored in a Single Level Cell (SLC) mode. In such an embodiment, the storage time can be controlled within 42ms, which is thousands of times faster than storing the firmware used for upgrade in Norflash.

[0091] This invention improves the efficiency of SSD manufacturing by using offline programming on a first medium. It also stores the upgrade firmware in a non-volatile NAND medium, enhancing the speed of firmware upgrades and minimizing disruption to user operations. The invention divides the device into multiple upgrade slot areas and a read-only slot area. The read-only firmware in the read-only slot area is used for offline programming during manufacturing and stored on the first medium, allowing modification only during the manufacturing process. Furthermore, the invention includes a critical boot information area and an FCC microcode area in the first medium for firmware loading during SSD device startup, further improving upgrade speed.

[0092] Figure 3 This is a second schematic flowchart of the firmware upgrade method provided by the present invention. After upgrading the firmware to be upgraded according to the firmware upgrade instruction, it further includes:

[0093] Step 201: If the firmware upgrade is completed, generate upgrade completion information, which includes at least the upgrade slot area information where the upgraded firmware is located.

[0094] Step 202: Update the startup information according to the upgrade completion information, and generate a restart command;

[0095] Step 203: In response to the restart command, obtain the upgraded firmware from the upgrade slot area where the upgraded firmware is located according to the updated startup information, so as to load and run the solid-state drive according to the upgraded firmware.

[0096] In step 201, if the firmware upgrade is completed, the upgraded firmware is saved to the upgrade slot area where the upgrade took place, and upgrade completion information is generated. The upgrade completion information includes at least the upgrade slot area information where the upgraded firmware is located.

[0097] In step 202, the startup information is updated according to the upgrade completion information, and a restart command is generated. In order to ensure that the firmware can be used normally after the upgrade is completed, the firmware will be tested after the upgrade is completed. At this time, in order to obtain the upgrade slot area where the upgraded firmware is located from the second medium when the firmware is run again, the startup information is updated according to the upgrade completion information, and a restart command is generated.

[0098] In step 203, in response to the restart command, the upgraded firmware is obtained from the upgrade slot area where the upgraded firmware is located according to the updated startup information, so as to load and run the solid-state drive according to the upgraded firmware. The restart command plays the role of automatic restart in this invention. After the restart command is generated, the system responds to the restart command and instructs to obtain the upgraded firmware from the upgrade slot area where the upgraded firmware is located according to the updated startup information. The upgraded firmware is the firmware after the last upgrade, which is used to test whether the upgrade was successful and can run normally.

[0099] Figure 4 This is a flowchart illustrating the process of determining a target upgrade slot area based on startup information provided by the present invention. The step of determining the target upgrade slot area from all upgrade slot areas of the second medium based on the startup information includes:

[0100] Step 1021: If an upgrade slot area matching the startup information exists in all upgrade slot areas, determine the target upgrade slot area from all upgrade slot areas of the second medium;

[0101] Step 1022: If no upgrade slot area matching the startup information is found in all upgrade slot areas, determine the target upgrade slot area from all upgrade slot areas of the second medium according to the firmware upgrade features in the firmware upgrade instruction.

[0102] The firmware upgrade features include the firmware protocol version and the target upgrade power consumption.

[0103] Step 1021 discloses a scheme for determining the target upgrade slot area, which obtains the target upgrade slot area by matching all upgrade slot areas through startup information. At this time, there is an upgrade slot area that matches the startup information among all upgrade slot areas. For example, the startup information includes SLOT3, and SLOT3 in all upgrade slot areas is in a power-on and normal operating state, then the target upgrade slot area is determined to be SLOT3.

[0104] Step 1022 discloses a situation where there is no upgrade slot area matching the startup information in all upgrade slot areas. This solution is to solve the problem that the upgrade slot area matching the startup information is faulty and therefore cannot be used normally. In this case, the target upgrade slot area will be determined from all upgrade slot areas of the second medium according to the firmware upgrade features in the firmware upgrade instruction. The firmware upgrade features include the firmware protocol version and the target upgrade power consumption. The present invention can determine the target upgrade slot area by either the upgrade protocol version or the firmware upgrade power consumption, or it can combine the upgrade protocol version and the firmware upgrade power consumption to determine the target upgrade slot area.

[0105] Figure 5 This is a flowchart illustrating the process of determining a target upgrade slot region based on firmware upgrade features provided by the present invention. The step of determining the target upgrade slot region from all upgrade slot regions of the second medium based on the firmware upgrade features in the firmware upgrade instruction includes:

[0106] Step 10221: Determine the preset protocol version and the preset power consumption range corresponding to each upgrade slot area.

[0107] Step 10222: If the firmware protocol version of the firmware upgrade feature matches the preset protocol version corresponding to any upgrade slot area, determine the upgrade slot area as the target upgrade slot area.

[0108] Step 10223: If the firmware protocol version of the firmware upgrade feature does not match the preset protocol version corresponding to all upgrade slot areas, determine the target upgrade power consumption of the firmware upgrade feature.

[0109] Step 10224: If the target upgrade power consumption falls within the preset power consumption range corresponding to any upgrade slot area, determine the upgrade slot area as the target upgrade slot area.

[0110] In step 10221, the preset protocol version corresponding to each upgrade slot area and the preset power consumption range corresponding to each upgrade slot area are determined. In this invention, the upgrade slot areas can be switched. Therefore, each time an upgrade is performed, the protocol version for each upgrade will be left in different upgrade slot areas. For example, if an upgrade with version number 1.2 is performed in SLOT2, then the firmware to be upgraded with version number 1.2 will be kept in SLOT2; if an upgrade with version number 1.5 is performed in SLOT3, then the firmware to be upgraded with version number 1.5 will be kept in SLOT3; if an upgrade with version number 1.8 is performed in SLOT4, then the firmware to be upgraded with version number 1.8 will be kept in SLOT4.

[0111] The preset power consumption range refers to the power consumption estimate for each upgrade. Some firmware upgrades may choose higher power consumption to improve upgrade efficiency, while others may choose lower power consumption to achieve energy saving and emission reduction. This invention will divide multiple upgrade slot areas according to the size difference of the functions required by different upgrades to meet the upgrade needs of different users.

[0112] In step 10222, if the firmware protocol version of the firmware upgrade feature matches the preset protocol version corresponding to any upgrade slot area, the upgrade slot area is determined as the target upgrade slot area. In conjunction with the embodiment in step 10221, if the firmware protocol version of the firmware upgrade feature is 1.8, then the firmware to be upgraded in SLOT4 is selected, and the target upgrade slot area is determined to be SLOT4.

[0113] In step 10223, if the firmware protocol version of the firmware upgrade feature does not match the preset protocol version corresponding to any upgrade slot area, the target upgrade power consumption of the firmware upgrade feature is determined. Referring to the embodiment in step 10221, if the firmware protocol version of the firmware upgrade feature is 1.6, then there is no preset protocol version corresponding to the upgrade slot area in SLOT2, SLOT3, and SLOT4 that matches it. At this time, the target upgrade power consumption of the firmware upgrade feature is determined. For example, the target upgrade power consumption is 6W.

[0114] In step 10224, if the target upgrade power consumption falls within the preset power consumption range corresponding to any upgrade slot area, the upgrade slot area is determined as the target upgrade slot area. Those skilled in the art will understand that the preset power consumption range of SLOT2 is 1W to 5W; the preset power consumption range of SLOT3 is 5W to 10W; and the preset power consumption range of SLOT4 is 10W to 15W. Therefore, if the target upgrade power consumption is 6W, SLOT3 is selected as the target upgrade slot area.

[0115] Figure 7 This is a schematic diagram of the firmware upgrade device provided by the present invention. The present invention discloses a firmware upgrade device, including an acquisition unit 1: used to acquire boot information in the key boot area of ​​the first medium in response to a firmware upgrade command. The working principle of the acquisition unit 1 can be referred to the aforementioned step 101, and will not be repeated here.

[0116] The firmware upgrade device further includes a determination unit 2: used to determine the target upgrade slot area from all upgrade slot areas of the second medium according to the startup information. The working principle of the determination unit 2 can be referred to the aforementioned step 102, and will not be repeated here.

[0117] The firmware upgrade device further includes an upgrade unit 3: used to obtain the firmware to be upgraded from the target upgrade slot area and upgrade the firmware to be upgraded according to the firmware upgrade instruction. The working principle of the upgrade unit 3 can be referred to the aforementioned step 103, and will not be repeated here.

[0118] The boot information is obtained by calling the firmware bootloader FBL from the read-only slot area of ​​the first medium;

[0119] The read-only slot area also stores read-only firmware for offline programming.

[0120] The capacity of the first medium is less than the capacity of the second medium;

[0121] The firmware upgrade speed of the first medium is less than that of the second medium.

[0122] This invention provides a firmware upgrade method, apparatus, device, and readable storage medium. By storing read-only firmware for offline burning in a read-only slot area of ​​a first medium and storing the firmware to be upgraded in a second medium, this invention enables the firmware to be upgraded to be retrieved from the second medium and upgraded according to the firmware upgrade instruction during firmware upgrade. This invention not only ensures factory-standard offline burning of solid-state drives but also improves firmware upgrade efficiency, thereby reducing the impact of firmware upgrades on user operations.

[0123] Figure 8 This is a schematic diagram of the structure of the electronic device provided by the present invention. For example... Figure 8 As shown, the electronic device may include a processor 810, a communications interface 820, a memory 830, and a communication bus 840, wherein the processor 810, communications interface 820, and memory 830 communicate with each other via the communication bus 840. The processor 810 can call logical instructions in the memory 830 to execute a firmware upgrade method. This method includes: in response to a firmware upgrade instruction, obtaining boot information from a critical boot area of ​​a first medium; determining a target upgrade slot area from all upgrade slot areas of a second medium based on the boot information; obtaining the firmware to be upgraded from the target upgrade slot area; and upgrading the firmware to be upgraded according to the firmware upgrade instruction. The boot information is obtained by calling a firmware bootloader (FBL) from a read-only slot area of ​​the first medium. The read-only slot area also stores read-only firmware for offline burning. The capacity of the first medium is less than the capacity of the second medium. The firmware upgrade speed of the first medium is less than the firmware upgrade speed of the second medium.

[0124] Furthermore, the logical instructions in the aforementioned memory 830 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0125] On the other hand, the present invention also provides a computer program product, the computer program product including a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute a firmware upgrade method provided by the above methods. The method includes: in response to a firmware upgrade instruction, obtaining boot information in a critical boot area of ​​a first medium; determining a target upgrade slot area from all upgrade slot areas of a second medium according to the boot information; obtaining firmware to be upgraded from the target upgrade slot area; and upgrading the firmware to be upgraded according to the firmware upgrade instruction; the boot information is obtained by calling a firmware bootloader (FBL) from a read-only slot area of ​​the first medium; the read-only slot area also stores read-only firmware for offline burning; the capacity of the first medium is less than the capacity of the second medium; and the firmware upgrade speed of the first medium is less than the firmware upgrade speed of the second medium.

[0126] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, is implemented to perform the firmware upgrade method provided by the methods described above. The method includes: in response to a firmware upgrade instruction, obtaining boot information in a critical boot area of ​​a first medium; determining a target upgrade slot area from all upgrade slot areas of a second medium based on the boot information; obtaining firmware to be upgraded from the target upgrade slot area; and upgrading the firmware to be upgraded according to the firmware upgrade instruction. The boot information is obtained by calling a firmware bootloader (FBL) from a read-only slot area of ​​the first medium. The read-only slot area also stores read-only firmware for offline burning. The capacity of the first medium is less than the capacity of the second medium. The firmware upgrade speed of the first medium is less than the firmware upgrade speed of the second medium.

[0127] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0128] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0129] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention 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; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A firmware upgrade method, characterized in that, include: In response to a firmware upgrade command, obtain boot information from the critical boot area of ​​the first medium; Based on the startup information, the target upgrade slot area is determined from all upgrade slot areas of the second medium; Obtain the firmware to be upgraded from the target upgrade slot area, and upgrade the firmware to be upgraded according to the firmware upgrade instruction; The boot information is obtained by calling the firmware bootloader FBL from the read-only slot area of ​​the first medium; The read-only slot area also stores read-only firmware for offline programming. The capacity of the first medium is less than the capacity of the second medium; The firmware upgrade speed of the first medium is less than that of the second medium.

2. The firmware upgrade method according to claim 1, characterized in that, After determining the target upgrade slot area from all upgrade slot areas of the second medium, the method further includes: When the target upgrade slot area is in a powered-on operating state, the FCC microcode area of ​​the first medium is invoked to establish a message channel for data reading with the target upgrade slot area based on the FCC microcode area.

3. The firmware upgrade method according to claim 2, characterized in that, The step of obtaining the firmware to be upgraded from the target upgrade slot area and upgrading the firmware to be upgraded according to the firmware upgrade instruction includes: According to the message channel, the firmware to be upgraded is obtained from the primary backup or from the backup of the target upgrade slot area; According to the firmware upgrade instruction, obtain the version upgrade parameters that match the version information carried in the firmware upgrade instruction from the preset server; Upgrade the firmware to be upgraded according to the version upgrade parameters.

4. The firmware upgrade method according to claim 3, characterized in that, Before upgrading the firmware according to the version upgrade parameters, the method further includes: If the firmware to be upgraded cannot be obtained from the primary backup of the target upgrade slot area or from the backup, the read-only firmware is obtained to load and run the solid-state drive according to the read-only firmware.

5. The firmware upgrade method according to claim 1, characterized in that, After upgrading the firmware to be upgraded according to the firmware upgrade instruction, the method further includes: When the firmware upgrade is complete, upgrade completion information is generated, which includes at least the upgrade slot area information where the upgraded firmware is located. Update the startup information based on the upgrade completion information and generate a restart command; In response to the reboot command, the upgraded firmware is retrieved from the upgrade slot area where the upgraded firmware is located based on the updated boot information, so as to load and run the solid-state drive according to the upgraded firmware.

6. The firmware upgrade method according to claim 1, characterized in that, The step of determining the target upgrade slot area from all upgrade slot areas of the second medium based on the startup information includes: If an upgrade slot area matching the startup information exists in all upgrade slot areas, the target upgrade slot area is determined from all upgrade slot areas of the second medium; If no upgrade slot area matching the startup information is found in all upgrade slot areas, the target upgrade slot area is determined from all upgrade slot areas of the second medium according to the firmware upgrade characteristics in the firmware upgrade instruction. The firmware upgrade features include the firmware protocol version and the target upgrade power consumption.

7. The firmware upgrade method according to claim 6, characterized in that, The step of determining the target upgrade slot region from all upgrade slot regions of the second medium based on the firmware upgrade features in the firmware upgrade instruction includes: Determine the preset protocol version and preset power consumption range corresponding to each upgrade slot area. If the firmware protocol version of the firmware upgrade feature matches the preset protocol version corresponding to any upgrade slot area, the upgrade slot area is determined as the target upgrade slot area. If the firmware protocol version of the firmware upgrade feature does not match the preset protocol version corresponding to all upgrade slot areas, the target upgrade power consumption of the firmware upgrade feature is determined. If the target upgrade power consumption falls within the preset power consumption range corresponding to any upgrade slot area, the upgrade slot area is determined as the target upgrade slot area.

8. The firmware upgrade method according to claim 1, characterized in that, Following a firmware upgrade command, the method further includes: The read-only slot area of ​​the first medium is determined based on the bootloader BOOTROM.

9. A firmware upgrade device, characterized in that, include: Acquisition Unit: Used to acquire boot information from the critical boot area of ​​the first medium in response to a firmware upgrade command; Determining unit: used to determine the target upgrade slot area from all upgrade slot areas of the second medium based on the startup information; Upgrade unit: used to obtain the firmware to be upgraded from the target upgrade slot area, and upgrade the firmware to be upgraded according to the firmware upgrade instruction; The boot information is obtained by calling the firmware bootloader FBL from the read-only slot area of ​​the first medium; The read-only slot area also stores read-only firmware for offline programming. The capacity of the first medium is less than the capacity of the second medium; The firmware upgrade speed of the first medium is less than that of the second medium.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the firmware upgrade method as described in any one of claims 1-8.

11. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the firmware upgrade method as described in any one of claims 1-8.

Citation Information

Patent Citations

  • Online firmware upgrading method and system

    CN108170368A

  • Method for upgrading data of firmware, mobile terminal and computer storage medium

    CN108228222A