SSD firmware consistency loading method, device, computer equipment and storage medium

By combining the Bootloader and Firmware of the SSD firmware and updating it together, and checking consistency by writing timestamps, the problem of inconsistent SSD firmware versions is solved, ensuring that the firmware is consistent and boot-safe when updating.

CN114356369BActive Publication Date: 2025-04-29SHENZHEN YILIAN INFORMATION SYST CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202111613544.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-27
Publication Date
2025-04-29
Estimated Expiration
2041-12-27

AI Technical Summary

Technical Problem

When existing SSD firmware is updated together with Boot Loader (BL) and User Firmware (FW), it is not guaranteed that the loaded BL and FW belong to the same version, which may cause inconsistent firmware versions.

Method used

By obtaining the SSD firmware consistency loading request, merge the Bootloader and Firmware storage and update it together, and check its consistency by comparing the write timestamps of firmware backups. If it is inconsistent, reload the Bootloader and load the boot firmware from the backup; if it is consistent, load the boot firmware directly in parallel from multiple firmware.

Benefits of technology

When BL and FW are updated together, ensure the version consistency of the SSD firmware and ensure the security of firmware startup.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114356369B_ABST
    Figure CN114356369B_ABST
Patent Text Reader

Abstract

The present application relates to a method, device, computer equipment and storage medium for loading SSD firmware consistently, wherein the method comprises: obtaining an SSD firmware consistent loading request; merging and storing the firmware's Bootloader and Firmware according to the SSD firmware consistent loading request and updating them together; checking the firmware's consistency by comparing the write timestamps of the SSD firmware backup; if the write timestamps are inconsistent, reloading the Bootloader and loading the startup firmware from the firmware backup corresponding to the Bootloader; if the write timestamps are consistent, directly loading the startup firmware in parallel from multiple copies of the firmware. The present invention stores the Bootloader and Firmware together, and can also ensure the SSD firmware startup security through firmware consistency checks when the Bootloader is allowed to be updated.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of storage systems, and in particular to a method, device, computer equipment and storage medium for loading SSD firmware consistency. Background Art

[0002] With the development of solid state drive technology, SSD (Solid State Disk) has been widely used in various occasions and has gradually replaced traditional HDD (Hard Disk Drive) in the PC market, providing users with a better experience in terms of reliability and performance.

[0003] Currently, SSD firmware is usually divided into two parts: Boot Loader (BL) and User Firmware (FW) for storage and loading. SSD needs to ensure that the loaded BL and FW belong to the same version, so the version update usually chooses to update only FW. In the case of updating BL and FW together, this firmware storage and loading solution cannot ensure that the loaded BL and FW belong to the same version, which may cause the problem of inconsistent firmware versions. Summary of the invention

[0004] Based on this, it is necessary to provide a method, device, computer equipment and storage medium for SSD firmware consistency loading in response to the above technical problems.

[0005] A method for loading SSD firmware consistency, the method comprising:

[0006] Get SSD firmware consistency loading request;

[0007] Merge and store the Bootloader and Firmware of the firmware according to the SSD firmware consistency loading request and update them together;

[0008] Check the consistency of the firmware by comparing the write timestamps of the SSD firmware backup;

[0009] If the written timestamps are inconsistent, reload the Bootloader and load the startup firmware from the firmware backup corresponding to the Bootloader;

[0010] If the write timestamps are consistent, the startup firmware is loaded directly from multiple firmwares in parallel.

[0011] In one embodiment, the step of checking the consistency of the firmware by comparing the write timestamp of the SSD firmware backup further includes:

[0012] After the SSD is powered on, the last written positions of all firmware backups are read in parallel to obtain and compare the write timestamps of the firmware backups.

[0013] In one embodiment, after the SSD is powered on, the step of reading the last written positions of all firmware backups in parallel, and obtaining and comparing the write timestamps of the firmware backups further includes:

[0014] If the written timestamps are consistent, the process of reloading the Bootloader is skipped, and the boot firmware is directly loaded in parallel from multiple firmwares.

[0015] In one embodiment, after the SSD is powered on, the last written positions of all firmware backups are read in parallel, and the step of obtaining and comparing the writing timestamps of the firmware backups further includes:

[0016] If the write timestamps are inconsistent, search for a backup with both the Bootloader and Firmware intact starting from the first backup;

[0017] If no intact backup can be obtained after searching all backups, the firmware startup fails. Otherwise, the Bootloader and Firmware are loaded in sequence from the obtained backups.

[0018] A SSD firmware consistency loading device, the device comprising:

[0019] An acquisition module, the acquisition module is used to obtain an SSD firmware consistency loading request;

[0020] A merging module, the merging module is used to merge and store the Bootloader and Firmware of the firmware according to the SSD firmware consistency loading request and update them together;

[0021] A comparison module, the comparison module is used to check the consistency of the firmware by comparing the write timestamp of the SSD firmware backup;

[0022] A first loading module, wherein the first loading module is used to reload the Bootloader and load the startup firmware from the firmware backup corresponding to the Bootloader if the write timestamp is inconsistent;

[0023] The second loading module is used to directly load the startup firmware in parallel from multiple firmwares if the write timestamps are consistent.

[0024] In one embodiment, the device further comprises a reading module, wherein the reading module is configured to:

[0025] After the SSD is powered on, the last written positions of all firmware backups are read in parallel to obtain and compare the write timestamps of the firmware backups.

[0026] In one embodiment, the second loading module is further used for:

[0027] If the written timestamps are consistent, the process of reloading the Bootloader is skipped, and the boot firmware is directly loaded in parallel from multiple firmwares.

[0028] In one embodiment, the first loading module is further used for:

[0029] If the write timestamps are inconsistent, search for a backup with both the Bootloader and Firmware intact starting from the first backup;

[0030] If no intact backup can be obtained after searching all backups, the firmware startup fails. Otherwise, the Bootloader and Firmware are loaded in sequence from the obtained backups.

[0031] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of any one of the above methods when executing the computer program.

[0032] A computer-readable storage medium stores a computer program, wherein the computer program implements the steps of any one of the above methods when executed by a processor.

[0033] The above-mentioned SSD firmware consistency loading method, device, computer equipment and storage medium obtain the SSD firmware consistency loading request; according to the SSD firmware consistency loading request, the firmware's Bootloader and Firmware are merged and stored and updated together; the firmware consistency is checked by comparing the write timestamp of the SSD firmware backup; if the write timestamps are inconsistent, the Bootloader is reloaded and the startup firmware is loaded from the firmware backup corresponding to the Bootloader; if the write timestamps are consistent, the startup firmware is directly loaded in parallel from multiple firmwares. The present invention merges the Bootloader and the Firmware for storage, and when the Bootloader is allowed to be updated, the SSD firmware startup security can also be guaranteed by the firmware consistency check. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] Figure 1 A schematic diagram of a flow chart of a method for loading SSD firmware consistency in one embodiment;

[0035] Figure 2 A schematic diagram of a flow chart of a method for loading SSD firmware consistency in another embodiment;

[0036] Figure 3 A schematic diagram of an SSD firmware merging Bootloader and Firmware for storage in an embodiment;

[0037] Figure 4 A schematic diagram of an SSD firmware backup consistency check process in one embodiment;

[0038] Figure 5 A schematic diagram of a loading process when an SSD firmware backup is inconsistent in one embodiment;

[0039] Figure 6 A structural block diagram of an SSD firmware consistency loading device in one embodiment;

[0040] Figure 7 It is a structural block diagram of an SSD firmware consistency loading device in another embodiment;

[0041] Figure 8 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0042] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0043] Currently, SSD firmware is usually divided into two parts: Boot Loader (BL) and User Firmware (FW) for storage and loading. SSD needs to ensure that the loaded BL and FW belong to the same version, so the version update usually chooses to update only FW. In the case of updating BL and FW together, this firmware storage and loading solution cannot ensure that the loaded BL and FW belong to the same version, which may cause the problem of inconsistent firmware versions.

[0044] Based on this, the present invention proposes a method for consistent loading of SSD firmware, aiming to ensure the security of SSD firmware startup when BL and FW are updated together.

[0045] In one embodiment, Figure 1 As shown, a method for loading SSD firmware consistency is provided, the method comprising:

[0046] Step 102, obtaining an SSD firmware consistency loading request;

[0047] Step 104: Merge and store the Bootloader and Firmware of the firmware according to the SSD firmware consistency loading request and update them together;

[0048] Step 106, checking the consistency of the firmware by comparing the write timestamp of the SSD firmware backup;

[0049] Step 108, if the written timestamps are inconsistent, reload the Bootloader and load the startup firmware from the firmware backup corresponding to the Bootloader;

[0050] Step 110: If the write timestamps are consistent, the startup firmware is directly loaded in parallel from the multiple firmwares.

[0051] In this embodiment, a method for protecting the consistency of SSD firmware loading is proposed. This method stores BL and FW together. When BL update is allowed, the SSD firmware startup security can also be guaranteed through firmware consistency check. The specific implementation steps are as follows:

[0052] First, obtain the SSD firmware consistency loading request, and merge the firmware Bootloader and Firmware into a single storage and update them together according to the SSD firmware consistency loading request.

[0053] Specifically, refer to Figure 3 The schematic diagram of the SSD firmware merging the Bootloader and the Firmware for storage shows that the SSD firmware BL and the FW are stored together: there are three backups in total, and each backup stores the BL and the FW in sequence starting from the first write unit.

[0054] The BL and FW of the SSD firmware have multiple backups and are updated together. Next, the firmware consistency check compares the write timestamps of the SSD firmware backups. If the timestamps are inconsistent, the BL is reloaded and the boot firmware is loaded from the firmware backup corresponding to the BL. If the timestamps are consistent, the BL reload is skipped and the boot firmware is directly loaded from multiple firmwares in parallel.

[0055] In this embodiment, the SSD firmware consistency loading request is obtained; the Bootloader and Firmware of the firmware are merged and stored according to the SSD firmware consistency loading request and updated together; the consistency of the firmware is checked by comparing the write timestamp of the SSD firmware backup; if the write timestamps are inconsistent, the Bootloader is reloaded and the startup firmware is loaded from the firmware backup corresponding to the Bootloader; if the write timestamps are consistent, the startup firmware is directly loaded in parallel from multiple firmwares. This solution merges the Bootloader and the Firmware for storage, and when the Bootloader is allowed to be updated, the firmware consistency check can also be used to ensure the security of the SSD firmware startup.

[0056] In one embodiment, Figure 2 As shown, a method for loading SSD firmware consistency is provided, and the method also includes:

[0057] Step 202, after the SSD is powered on, the last written positions of all firmware backups are read in parallel, and the writing timestamps of the firmware backups are obtained and compared;

[0058] Step 204: If the written timestamps are consistent, skip the process of reloading the Bootloader and directly load the boot firmware from multiple firmwares in parallel;

[0059] Step 206, if the write timestamps are inconsistent, search for a backup with both the Bootloader and the Firmware intact starting from the first backup;

[0060] Step 208: If no intact backup can be obtained after searching all backups, the firmware startup fails. Otherwise, the Bootloader and Firmware are loaded in sequence from the obtained backups.

[0061] In this embodiment, reference Figure 4 The schematic diagram of the SSD firmware backup consistency check process shown specifically includes: after the SSD is powered on, the last written position of all firmware backups is read in parallel, and the firmware backup write timestamps are obtained and compared. If the timestamps are inconsistent, the BL is reloaded and the startup firmware is loaded from the firmware backup corresponding to the BL. If the timestamps are consistent, the startup firmware is selected to be loaded in parallel from multiple firmwares.

[0062] refer to Figure 5 The schematic diagram of the loading process when the SSD firmware backup is inconsistent is shown, specifically including: SSD firmware loading, starting from the first backup, searching for a backup with both BL and FW intact. If no intact backup can be obtained after searching all backups, the firmware startup fails; otherwise, BL and FW are loaded in sequence from the obtained backups.

[0063] In this embodiment, by performing a firmware consistency check and selecting a corresponding correct firmware loading method according to the check result, the startup security of the SSD firmware can be effectively guaranteed.

[0064] It should be understood that although Figure 1-5 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1-5 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0065] In one embodiment, Figure 6 As shown, a SSD firmware consistency loading device 600 is provided, the device comprising:

[0066] An acquisition module 601 is used to acquire a SSD firmware consistency loading request;

[0067] A merging module 602, the merging module is used to merge and store the Bootloader and Firmware of the firmware according to the SSD firmware consistency loading request and update them together;

[0068] A comparison module 603, the comparison module is used to check the consistency of the firmware by comparing the write timestamp of the SSD firmware backup;

[0069] A first loading module 604, the first loading module is used to reload the Bootloader and load the startup firmware from the firmware backup corresponding to the Bootloader if the written timestamps are inconsistent;

[0070] The second loading module 605 is used to directly load the startup firmware in parallel from multiple firmwares if the write timestamps are consistent.

[0071] In one embodiment, Figure 7 As shown, a SSD firmware consistency loading device 600 is provided, and the device also includes a reading module 606 for:

[0072] After the SSD is powered on, the last written positions of all firmware backups are read in parallel to obtain and compare the write timestamps of the firmware backups.

[0073] In one embodiment, the second loading module 605 is further used for:

[0074] If the written timestamps are consistent, the process of reloading the Bootloader is skipped, and the boot firmware is directly loaded in parallel from multiple firmwares.

[0075] In one embodiment, the first loading module 604 is further used for:

[0076] If the write timestamps are inconsistent, search for a backup with both the Bootloader and Firmware intact starting from the first backup;

[0077] If no intact backup can be obtained after searching all backups, the firmware startup fails. Otherwise, the Bootloader and Firmware are loaded in sequence from the obtained backups.

[0078] For specific limitations on the SSD firmware consistency loading device, please refer to the limitations on the SSD firmware consistency loading method above, which will not be repeated here.

[0079] In one embodiment, a computer device is provided, whose internal structure diagram can be as follows: Figure 8 As shown. The computer device includes a processor, a memory and a network interface connected through a device bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating device, a computer program and a database. The internal memory provides an environment for the operation of the operating device and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for loading SSD firmware consistency is implemented.

[0080] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0081] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps in the above method embodiments when executing the computer program.

[0082] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0083] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0084] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0085] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. A method for loading SSD firmware consistency, characterized in that: The method comprises: Get SSD firmware consistency loading request; Merge and store the Bootloader and Firmware of the firmware according to the SSD firmware consistency loading request and update them together; Check the consistency of the firmware by comparing the write timestamps of the SSD firmware backup; If the written timestamps are inconsistent, reload the Bootloader and load the startup firmware from the firmware backup corresponding to the Bootloader; If the write timestamps are consistent, the boot firmware is loaded directly from multiple firmwares in parallel; After the SSD is powered on, the step of reading the last written positions of all firmware backups in parallel, and obtaining and comparing the write timestamps of the firmware backups further includes: If the written timestamps are consistent, the process of reloading the Bootloader is skipped, and the boot firmware is directly loaded in parallel from multiple firmwares; After the SSD is powered on, the last written positions of all firmware backups are read in parallel, and the writing timestamps of the firmware backups are obtained and compared, and the following steps are further included: If the write timestamps are inconsistent, search for a backup with both the Bootloader and the Firmware intact starting from the first backup; If no intact backup can be obtained after searching all backups, the firmware startup fails. Otherwise, the Bootloader and Firmware are loaded in sequence from the obtained backups.

2. The SSD firmware consistency loading method according to claim 1, characterized in that: The step of checking the consistency of the firmware by comparing the write timestamp of the SSD firmware backup also includes: After the SSD is powered on, the last written positions of all firmware backups are read in parallel to obtain and compare the write timestamps of the firmware backups.

3. A SSD firmware consistency loading device, characterized in that: The device comprises: An acquisition module, the acquisition module is used to obtain an SSD firmware consistency loading request; A merging module, the merging module is used to merge and store the Bootloader and Firmware of the firmware according to the SSD firmware consistency loading request and update them together; A comparison module, the comparison module is used to check the consistency of the firmware by comparing the write timestamp of the SSD firmware backup; A first loading module, wherein the first loading module is used to reload the Bootloader and load the startup firmware from the firmware backup corresponding to the Bootloader if the write timestamp is inconsistent; A second loading module, the second loading module is used to directly load the startup firmware in parallel from multiple firmwares if the write timestamps are consistent; The second loading module is also used for: If the written timestamps are consistent, the process of reloading the Bootloader is skipped, and the boot firmware is directly loaded in parallel from multiple firmwares; The first loading module is also used for: If the write timestamps are inconsistent, search for a backup with both the Bootloader and the Firmware intact starting from the first backup; If no intact backup can be obtained after searching all backups, the firmware startup fails. Otherwise, the Bootloader and Firmware are loaded in sequence from the obtained backups.

4. The SSD firmware consistency loading device according to claim 3, characterized in that: The device further comprises a reading module, wherein the reading module is configured to: After the SSD is powered on, the last written positions of all firmware backups are read in parallel to obtain and compare the write timestamps of the firmware backups.

5. A computer 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 computer program, the steps of the method according to any one of claims 1 to 2 are implemented.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 2 are implemented.

Citation Information

Patent Citations

  • Loading method and loading device of firmware

    CN103106083A

  • SSD startup control device and method

    CN107861775A

  • Computer system upgrading method, system and device

    CN111045713A