[go: up one dir, main page]

CN114356369A - SSD firmware consistency loading method and device, computer equipment and storage medium - Google Patents

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

Info

Publication number
CN114356369A
CN114356369A CN202111613544.1A CN202111613544A CN114356369A CN 114356369 A CN114356369 A CN 114356369A CN 202111613544 A CN202111613544 A CN 202111613544A CN 114356369 A CN114356369 A CN 114356369A
Authority
CN
China
Prior art keywords
firmware
ssd
loading
bootloader
consistency
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111613544.1A
Other languages
Chinese (zh)
Inventor
洪浩
李建
邱一霄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Union Memory Information System Co Ltd
Original Assignee
Shenzhen Union Memory Information System Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Union Memory Information System Co Ltd filed Critical Shenzhen Union Memory Information System Co Ltd
Priority to CN202111613544.1A priority Critical patent/CN114356369A/en
Publication of CN114356369A publication Critical patent/CN114356369A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

The application relates to a method and a device for loading SSD firmware in a consistent manner, computer equipment and a storage medium, wherein the method comprises the following steps: acquiring an SSD firmware consistency loading request; merging and storing Bootloader and Firmware of the Firmware according to the SSD Firmware consistency loading request, and updating the Bootloader and the Firmware together; checking the consistency of the firmware by comparing the write timestamps of the SSD firmware backup; if the write timestamps are not consistent, reloading the Bootloader and loading the starting firmware from the firmware backup corresponding to the Bootloader; and if the writing time stamps are consistent, directly loading the boot firmware from the multiple firmware in parallel. According to the invention, Bootloader and Firmware are merged and stored, and under the condition that the Bootloader is allowed to be updated, the SSD Firmware can be ensured to be started safely through Firmware consistency check.

Description

SSD固件一致性加载方法、装置、计算机设备及存储介质SSD firmware consistent loading method, device, computer equipment and storage medium

技术领域technical field

本发明涉及存储系统技术领域,特别是涉及一种SSD固件一致性加载方法、装置、计算机设备及存储介质。The present invention relates to the technical field of storage systems, and in particular, to a method, device, computer device and storage medium for consistent loading of SSD firmware.

背景技术Background technique

随着固态硬盘技术的发展,SSD(Solid State Disk,固态硬盘)已经被广泛应用于各种场合,在PC市场已经逐步替代传统的HDD(Hard Disk Drive,硬盘驱动器),从可靠性和性能方面为用户提供较好的体验。With the development of solid-state drive technology, SSD (Solid State Disk, solid-state drive) has been widely used in various occasions, and has gradually replaced traditional HDD (Hard Disk Drive, hard disk drive) in the PC market, in terms of reliability and performance. Provide users with a better experience.

目前,SSD固件通常分为Boot Loader(BL)和User Firmware(FW)两个部分进行存储与加载,SSD需要保证所加载BL和FW属于一个版本,因此版本更新通常选择只更新FW。在BL与FW一同更新的情况下,这种固件存储与加载方案不能保证所加载BL和FW属于一个版本,可能会导致固件版本不一致的问题。At present, the SSD firmware is usually divided into two parts: Boot Loader (BL) and User Firmware (FW) for storage and loading. The SSD needs to ensure that the loaded BL and FW belong to the same version, so the version update usually chooses to update only the FW. In the case where the BL and FW are updated together, this firmware storage and loading scheme cannot guarantee that the loaded BL and FW belong to the same version, which may lead to the problem of inconsistent firmware versions.

发明内容SUMMARY OF THE INVENTION

基于此,有必要针对上述技术问题,提供一种SSD固件一致性加载方法、装置、计算机设备及存储介质。Based on this, it is necessary to provide a method, apparatus, computer device and storage medium for consistent loading of SSD firmware in order to address the above technical problems.

一种SSD固件一致性加载方法,所述方法包括:A method for consistent loading of SSD firmware, the method comprising:

获取SSD固件一致性加载请求;Get the SSD firmware consistent load request;

根据所述SSD固件一致性加载请求将固件的Bootloader和Firmware合并存储并一同进行更新;According to the SSD firmware consistency loading request, the Bootloader and Firmware of the firmware are combined and stored and updated together;

通过比较SSD固件备份的写入时间戳检查固件的一致性;Check firmware consistency by comparing write timestamps of SSD firmware backups;

若写入时间戳不一致,则重加载Bootloader并从所述Bootloader对应固件备份中加载启动固件;If the writing time stamps are inconsistent, then reload the Bootloader and load the boot firmware from the corresponding firmware backup of the Bootloader;

若写入时间戳一致,则直接从多份固件中并行加载启动固件。If the writing time stamps are consistent, the boot firmware is directly loaded from multiple copies of firmware in parallel.

在其中一个实施例中,所述通过比较SSD固件备份的写入时间戳检查固件的一致性的步骤还包括:In one of the embodiments, the step of checking the consistency of the firmware by comparing the write timestamps of the SSD firmware backups further includes:

SSD上电后并行读取所有固件备份的最后写入位置,获取并对比固件备份的写入时间戳。After the SSD is powered on, the last write position of all firmware backups is read in parallel, and the write timestamps of the firmware backups are obtained and compared.

在其中一个实施例中,在所述SSD上电后并行读取所有固件备份的最后写入位置,获取并对比固件备份的写入时间戳的步骤还包括:In one embodiment, after the SSD is powered on, the last write positions of all firmware backups are read in parallel, and the step of acquiring and comparing the write timestamps of the firmware backups further includes:

若写入时间戳一致,则跳过重加载Bootloader的过程,直接从多份固件中并行加载启动固件。If the writing time stamps are the same, skip the process of reloading the Bootloader, and directly load the boot firmware from multiple firmware copies in parallel.

在其中一个实施例中,在所述SSD上电后并行读取所有固件备份的最后写入位置,获取并对比固件备份的写入时间戳的步骤之后还包括:In one embodiment, after the SSD is powered on, the last write positions of all firmware backups are read in parallel, and after the step of acquiring and comparing the write timestamps of the firmware backups, the step further includes:

若写入时间戳不一致,则从第一份备份开始查找Bootloader与Firmware都完好的备份;If the writing time stamp is inconsistent, start from the first backup to find the backup with both Bootloader and Firmware intact;

如果查找所有备份后都无法获得完好备份,则固件启动失败,否则依次从获取的备份依次加载Bootloader与Firmware。If a complete backup cannot be obtained after searching all the backups, the firmware startup fails; otherwise, the Bootloader and Firmware are loaded in turn from the obtained backups.

一种SSD固件一致性加载装置,所述装置包括:A device for loading SSD firmware consistency, the device includes:

获取模块,所述获取模块用于获取SSD固件一致性加载请求;an acquisition module, the acquisition module is used to acquire the SSD firmware consistency loading request;

合并模块,所述合并模块用于根据所述SSD固件一致性加载请求将固件的Bootloader和Firmware合并存储并一同进行更新;a merging module, which is used for merging and storing the Bootloader and Firmware of the firmware and updating together according to the SSD firmware consistency loading request;

比较模块,所述比较模块用于通过比较SSD固件备份的写入时间戳检查固件的一致性;a comparison module, which is used to check the consistency of the firmware by comparing the write timestamps of the SSD firmware backups;

第一加载模块,所述第一加载模块用于若写入时间戳不一致,则重加载Bootloader并从所述Bootloader对应固件备份中加载启动固件;a first loading module, which is used for reloading the Bootloader and loading the boot firmware from the corresponding firmware backup of the Bootloader if the writing time stamps are inconsistent;

第二加载模块,所述第二加载模块用于若写入时间戳一致,则直接从多份固件中并行加载启动固件。A second loading module, the second loading module is configured to directly load the boot firmware from multiple copies of firmware in parallel if the writing time stamps are consistent.

在其中一个实施例中,所述装置还包括读取模块,所述读取模块用于:In one of the embodiments, the device further includes a reading module, the reading module is used for:

SSD上电后并行读取所有固件备份的最后写入位置,获取并对比固件备份的写入时间戳。After the SSD is powered on, the last write position of all firmware backups is read in parallel, and the write timestamps of the firmware backups are obtained and compared.

在其中一个实施例中,所述第二加载模块还用于:In one of the embodiments, the second loading module is further used for:

若写入时间戳一致,则跳过重加载Bootloader的过程,直接从多份固件中并行加载启动固件。If the writing time stamps are the same, skip the process of reloading the Bootloader, and directly load the boot firmware from multiple firmware copies in parallel.

在其中一个实施例中,所述第一加载模块还用于:In one of the embodiments, the first loading module is further used for:

若写入时间戳不一致,则从第一份备份开始查找Bootloader与Firmware都完好的备份;If the writing time stamp is inconsistent, start from the first backup to find the backup with both Bootloader and Firmware intact;

如果查找所有备份后都无法获得完好备份,则固件启动失败,否则依次从获取的备份依次加载Bootloader与Firmware。If a complete backup cannot be obtained after searching all the backups, the firmware startup fails; otherwise, the Bootloader and Firmware are loaded in turn from the obtained backups.

一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,所述处理器执行所述计算机程序时实现上述任意一项方法的步骤。A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of any one of the above methods when the processor executes the computer program.

一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现上述任意一项方法的步骤。A computer-readable storage medium on which a computer program is stored, and when the computer program is executed by a processor, implements the steps of any one of the above-mentioned methods.

上述SSD固件一致性加载方法、装置、计算机设备及存储介质通过获取SSD固件一致性加载请求;根据所述SSD固件一致性加载请求将固件的Bootloader和Firmware合并存储并一同进行更新;通过比较SSD固件备份的写入时间戳检查固件的一致性;若写入时间戳不一致,则重加载Bootloader并从所述Bootloader对应固件备份中加载启动固件;若写入时间戳一致,则直接从多份固件中并行加载启动固件。本发明将Bootloader与Firmware合并存储,在允许更新Bootloader的情况下,也可以通过固件一致性检查保障SSD固件启动安全。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 Bootloader and Firmware of the firmware are merged and stored and updated together; by comparing the SSD firmware The backup write time stamp checks the consistency of the firmware; if the write time stamps are inconsistent, reload the Bootloader and load the boot firmware from the corresponding firmware backup of the Bootloader; if the write time stamps are consistent, directly from multiple copies of the firmware Load boot firmware in parallel. In the present invention, the Bootloader and the Firmware are combined and stored, and under the condition that the Bootloader is allowed to be updated, the firmware consistency check can also ensure the boot safety of the SSD firmware.

附图说明Description of drawings

图1为一个实施例中SSD固件一致性加载方法的流程示意图;1 is a schematic flowchart of a method for consistent loading of SSD firmware in one embodiment;

图2为另一个实施例中SSD固件一致性加载方法的流程示意图;2 is a schematic flowchart of a method for consistent loading of SSD firmware in another embodiment;

图3为一个实施例中SSD固件将Bootloader与Firmware合并存储的示意图;Fig. 3 is the schematic diagram that SSD firmware merges and stores Bootloader and Firmware in one embodiment;

图4为一个实施例中SSD固件备份一致性检查流程的示意图;4 is a schematic diagram of an SSD firmware backup consistency check process in one embodiment;

图5为一个实施例中SSD固件备份不一致时加载流程的示意图;5 is a schematic diagram of a loading process when SSD firmware backups are inconsistent in one embodiment;

图6为一个实施例中SSD固件一致性加载装置的结构框图;6 is a structural block diagram of an SSD firmware consistency loading device in one embodiment;

图7为另一个实施例中SSD固件一致性加载装置的结构框图;7 is a structural block diagram of an SSD firmware consistent loading device in another embodiment;

图8为一个实施例中计算机设备的内部结构图。FIG. 8 is a diagram of the internal structure of a computer device in one embodiment.

具体实施方式Detailed ways

为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处所描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.

目前,SSD固件通常分为Boot Loader(BL)和User Firmware(FW)两个部分进行存储与加载,SSD需要保证所加载BL和FW属于一个版本,因此版本更新通常选择只更新FW。在BL与FW一同更新的情况下,这种固件存储与加载方案不能保证所加载BL和FW属于一个版本,可能会导致固件版本不一致的问题。At present, the SSD firmware is usually divided into two parts: Boot Loader (BL) and User Firmware (FW) for storage and loading. The SSD needs to ensure that the loaded BL and FW belong to the same version, so the version update usually chooses to update only the FW. In the case where the BL and FW are updated together, this firmware storage and loading scheme cannot guarantee that the loaded BL and FW belong to the same version, which may lead to the problem of inconsistent firmware versions.

基于此,本发明提出一种SSD固件一致性加载方法,旨在能够在BL与FW一同更新的情况下,也可以保证SSD固件启动安全。Based on this, the present invention proposes a method for consistent loading of SSD firmware, which aims to ensure the boot security of SSD firmware even when BL and FW are updated together.

在一个实施例中,如图1所示,提供了一种SSD固件一致性加载方法,该方法包括:In one embodiment, as shown in FIG. 1 , a method for consistent loading of SSD firmware is provided, and the method includes:

步骤102,获取SSD固件一致性加载请求;Step 102, obtaining the SSD firmware consistency loading request;

步骤104,根据SSD固件一致性加载请求将固件的Bootloader和Firmware合并存储并一同进行更新;Step 104, merge and store the Bootloader and Firmware of the firmware and update them together according to the SSD firmware consistency loading request;

步骤106,通过比较SSD固件备份的写入时间戳检查固件的一致性;Step 106, checking the consistency of the firmware by comparing the write timestamps of the SSD firmware backup;

步骤108,若写入时间戳不一致,则重加载Bootloader并从所述Bootloader对应固件备份中加载启动固件;Step 108, if the writing time stamps are inconsistent, then reload the Bootloader and load the boot firmware from the corresponding firmware backup of the Bootloader;

步骤110,若写入时间戳一致,则直接从多份固件中并行加载启动固件。Step 110, if the writing time stamps are consistent, the boot firmware is directly loaded from multiple copies of firmware in parallel.

在本实施例中,提出一种保护固态硬盘固件加载一致性的方法,该方法将BL与FW合并存储,在允许更新BL的情况下,也可以通过固件一致性检查保障SSD固件启动安全,其具体的实现步骤如下:In this embodiment, a method for protecting the loading consistency of SSD firmware is proposed. The method combines BL and FW for storage. In the case where BL is allowed to be updated, the firmware consistency check can also ensure the boot security of SSD firmware. The specific implementation steps are as follows:

首先,获取SSD固件一致性加载请求,根据SSD固件一致性加载请求将固件的Bootloader和Firmware合并存储并一同进行更新。First, obtain the SSD firmware consistency loading request, and combine and store the firmware Bootloader and Firmware according to the SSD firmware consistency loading request and update them together.

具体地,参考图3所示的SSD固件将Bootloader与Firmware合并存储的示意图,描述了SSD固件BL与FW合并存储方式:共有三份备份,每份备份内从第一个写入单元开始依次存储了BL与FW。Specifically, referring to the schematic diagram of the combined storage of Bootloader and Firmware in SSD firmware shown in FIG. 3 , the combined storage method of SSD firmware BL and FW is described: there are three backups in total, and each backup is stored sequentially from the first writing unit. BL and FW.

SSD固件的BL和FW有多份备份且一同更新。接着,固件一致性检查比较SSD固件备份的写入时间戳,如时间戳不一致,则重加载BL并从该BL对应固件备份中加载启动固件。如时间戳一致,则跳过BL重加载,直接从多份固件中并行加载启动固件。The BL and FW of the SSD firmware are backed up and updated together. Next, the firmware consistency check compares the write timestamps of the SSD firmware backup. 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 time stamps are the same, skip the BL reloading and directly load the boot firmware from multiple firmware copies in parallel.

在本实施例中,通过获取SSD固件一致性加载请求;根据所述SSD固件一致性加载请求将固件的Bootloader和Firmware合并存储并一同进行更新;通过比较SSD固件备份的写入时间戳检查固件的一致性;若写入时间戳不一致,则重加载Bootloader并从所述Bootloader对应固件备份中加载启动固件;若写入时间戳一致,则直接从多份固件中并行加载启动固件。本方案将Bootloader与Firmware合并存储,在允许更新Bootloader的情况下,也可以通过固件一致性检查保障SSD固件启动安全。In this embodiment, by obtaining the SSD firmware consistency loading request; according to the SSD firmware consistency loading request, the Bootloader and Firmware of the firmware are combined and stored and updated together; Consistency; if the writing time stamps are inconsistent, the Bootloader is reloaded and the booting firmware is loaded from the corresponding firmware backup of the Bootloader; if the writing time stamps are consistent, the booting firmware is directly loaded from multiple copies of firmware in parallel. In this solution, the Bootloader and Firmware are combined and stored. In the case of allowing the Bootloader to be updated, the firmware consistency check can also be used to ensure the boot safety of the SSD firmware.

在一个实施例中,如图2所示,提供了一种SSD固件一致性加载方法,该方法还包括:In one embodiment, as shown in FIG. 2, a method for consistent loading of SSD firmware is provided, and the method further includes:

步骤202,SSD上电后并行读取所有固件备份的最后写入位置,获取并对比固件备份的写入时间戳;Step 202, after the SSD is powered on, read the last write positions of all firmware backups in parallel, and obtain and compare the write timestamps of the firmware backups;

步骤204,若写入时间戳一致,则跳过重加载Bootloader的过程,直接从多份固件中并行加载启动固件;Step 204, if the writing time stamps are consistent, skip the process of reloading the Bootloader, and directly load the boot firmware from multiple copies of firmware in parallel;

步骤206,若写入时间戳不一致,则从第一份备份开始查找Bootloader与Firmware都完好的备份;Step 206, if the writing time stamps are inconsistent, start from the first backup to search for a backup with both Bootloader and Firmware intact;

步骤208,如果查找所有备份后都无法获得完好备份,则固件启动失败,否则依次从获取的备份依次加载Bootloader与Firmware。Step 208 , if a complete backup cannot be obtained after searching for all the backups, the firmware startup fails; otherwise, the Bootloader and the Firmware are sequentially loaded from the obtained backups.

在本实施例中,参考图4所示的SSD固件备份一致性检查流程的示意图,具体包括:在SSD上电后,并行读取所有固件备份的最后写入位置,获取并对比固件备份写入时间戳,如时间戳不一致,则重加载BL并从该BL对应固件备份中加载启动固件,如时间戳一致,则选择从多份固件中并行加载启动固件。In this embodiment, referring to the schematic diagram of the consistency check flow of the SSD firmware backup shown in FIG. 4 , it specifically includes: after the SSD is powered on, reading the last write positions of all firmware backups in parallel, obtaining and comparing the firmware backups and writing Timestamps. If the timestamps are inconsistent, reload the BL and load the boot firmware from the corresponding firmware backup of the BL. If the timestamps are consistent, choose to load the boot firmware from multiple copies of firmware in parallel.

参考图5所示的SSD固件备份不一致时加载流程的示意图,具体包括:SSD固件加载,从第一份备份开始查找BL与FW都完好的备份,如查找所有备份后都无法获得完好备份,则固件启动失败;否则依次从获取的备份依次加载BL与FW。Refer to the schematic diagram of the loading process when the SSD firmware backups are inconsistent as shown in Figure 5, which includes: loading the SSD firmware, starting from the first backup to search for a backup with both BL and FW intact. The firmware fails to start; otherwise, BL and FW are loaded in sequence from the obtained backup.

在本实施例中,通过固件一致性检查,根据检查结果选择对应正确的固件加载方式,可以有效地保障SSD固件的启动安全。In this embodiment, the firmware consistency check is performed, and a corresponding correct firmware loading method is selected according to the check result, which can effectively ensure the boot security of the SSD firmware.

应该理解的是,虽然图1-5的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图1-5中的至少一部分步骤可以包括多个子步骤或者多个阶段,这些子步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些子步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤的子步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the steps in the flowcharts of FIGS. 1-5 are shown in sequence according to the arrows, these steps are not necessarily executed in the sequence shown by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in FIGS. 1-5 may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed and completed at the same time, but may be executed at different times. These sub-steps or stages are not necessarily completed at the same time. The order of execution of the steps is not necessarily sequential, but may be performed alternately or alternately with other steps or at least a part of sub-steps or stages of other steps.

在一个实施例中,如图6所示,提供了一种SSD固件一致性加载装置600,该装置包括:In one embodiment, as shown in FIG. 6, an SSD firmware consistent loading device 600 is provided, and the device includes:

获取模块601,所述获取模块用于获取SSD固件一致性加载请求;Obtaining module 601, the obtaining module is used to obtain the SSD firmware consistency loading request;

合并模块602,所述合并模块用于根据所述SSD固件一致性加载请求将固件的Bootloader和Firmware合并存储并一同进行更新;Merging module 602, the merging module is configured to merge and store the Bootloader and Firmware of the firmware and update them together according to the SSD firmware consistency loading request;

比较模块603,所述比较模块用于通过比较SSD固件备份的写入时间戳检查固件的一致性;A comparison module 603, the comparison module is configured to check the consistency of the firmware by comparing the write timestamps of the SSD firmware backup;

第一加载模块604,所述第一加载模块用于若写入时间戳不一致,则重加载Bootloader并从所述Bootloader对应固件备份中加载启动固件;The first loading module 604, the first loading module is used for reloading the Bootloader and loading the boot firmware from the corresponding firmware backup of the Bootloader if the writing time stamps are inconsistent;

第二加载模块605,所述第二加载模块用于若写入时间戳一致,则直接从多份固件中并行加载启动固件。The second loading module 605, the second loading module is configured to directly load the boot firmware from multiple copies of firmware in parallel if the writing time stamps are consistent.

在一个实施例中,如图7所示,提供了一种SSD固件一致性加载装置600,该装置还包括读取模块606,用于:In one embodiment, as shown in FIG. 7, an SSD firmware consistency loading device 600 is provided, and the device further includes a reading module 606 for:

SSD上电后并行读取所有固件备份的最后写入位置,获取并对比固件备份的写入时间戳。After the SSD is powered on, the last write position of all firmware backups is read in parallel, and the write timestamps of the firmware backups are obtained and compared.

在一个实施例中,第二加载模块605还用于:In one embodiment, the second loading module 605 is also used to:

若写入时间戳一致,则跳过重加载Bootloader的过程,直接从多份固件中并行加载启动固件。If the writing time stamps are the same, skip the process of reloading the Bootloader, and directly load the boot firmware from multiple firmware copies in parallel.

在一个实施例中,第一加载模块604还用于:In one embodiment, the first loading module 604 is also used to:

若写入时间戳不一致,则从第一份备份开始查找Bootloader与Firmware都完好的备份;If the writing time stamp is inconsistent, start from the first backup to find the backup with both Bootloader and Firmware intact;

如果查找所有备份后都无法获得完好备份,则固件启动失败,否则依次从获取的备份依次加载Bootloader与Firmware。If a complete backup cannot be obtained after searching all the backups, the firmware startup fails; otherwise, the Bootloader and Firmware are loaded in turn from the obtained backups.

关于SSD固件一致性加载装置的具体限定可以参见上文中对于SSD固件一致性加载方法的限定,在此不再赘述。For the specific limitation of the SSD firmware consistent loading device, reference may be made to the above limitation on the SSD firmware consistent loading method, which will not be repeated here.

在一个实施例中,提供了一种计算机设备,其内部结构图可以如图8所示。该计算机设备包括通过装置总线连接的处理器、存储器以及网络接口。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作装置、计算机程序和数据库。该内存储器为非易失性存储介质中的操作装置和计算机程序的运行提供环境。该计算机设备的网络接口用于与外部的终端通过网络连接通信。该计算机程序被处理器执行时以实现一种SSD固件一致性加载方法。In one embodiment, a computer device is provided, the internal structure of which can be shown in FIG. 8 . The computer equipment includes a processor, memory, and a network interface connected by 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, an internal memory. The nonvolatile storage medium stores an operating device, a computer program, and a database. The internal memory provides an environment for the execution of operating devices and computer programs 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. The computer program implements a method for consistent loading of SSD firmware when executed by the processor.

本领域技术人员可以理解,图8中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 8 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 equipment to which the solution of the present application is applied. Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.

在一个实施例中,提供了一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,处理器执行计算机程序时实现以上各个方法实施例中的步骤。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 the processor executes the computer program.

在一个实施例中,提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现以上各个方法实施例中的步骤。In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, implements the steps in each of the above method embodiments.

本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和/或易失性存储器。非易失性存储器可包括只读存储器(ROM)、可编程ROM(PROM)、电可编程ROM(EPROM)、电可擦除可编程ROM(EEPROM)或闪存。易失性存储器可包括随机存取存储器(RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,诸如静态RAM(SRAM)、动态RAM(DRAM)、同步DRAM(SDRAM)、双数据率SDRAM(DDRSDRAM)、增强型SDRAM(ESDRAM)、同步链路(Synchlink)DRAM(SLDRAM)、存储器总线(Rambus)直接RAM(RDRAM)、直接存储器总线动态RAM(DRDRAM)、以及存储器总线动态RAM(RDRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other medium used in the various embodiments provided in this application may include non-volatile and/or volatile memory. Nonvolatile memory may include read only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous chain Road (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.

以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. For the sake of brevity, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, all It is considered to be the range described in this specification.

以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only represent several embodiments of the present application, and the descriptions thereof are specific and detailed, but should not be construed as a limitation on the scope of the invention patent. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the scope of protection of the patent of the present application shall be subject to the appended claims.

Claims (10)

1.一种SSD固件一致性加载方法,其特征在于,所述方法包括:1. A method for consistent loading of SSD firmware, wherein the method comprises: 获取SSD固件一致性加载请求;Get the SSD firmware consistent load request; 根据所述SSD固件一致性加载请求将固件的Bootloader和Firmware合并存储并一同进行更新;According to the SSD firmware consistency loading request, the Bootloader and Firmware of the firmware are combined and stored and updated together; 通过比较SSD固件备份的写入时间戳检查固件的一致性;Check firmware consistency by comparing write timestamps of SSD firmware backups; 若写入时间戳不一致,则重加载Bootloader并从所述Bootloader对应固件备份中加载启动固件;If the writing time stamps are inconsistent, then reload the Bootloader and load the boot firmware from the corresponding firmware backup of the Bootloader; 若写入时间戳一致,则直接从多份固件中并行加载启动固件。If the writing time stamps are consistent, the boot firmware is directly loaded from multiple copies of firmware in parallel. 2.根据权利要求1所述的SSD固件一致性加载方法,其特征在于,所述通过比较SSD固件备份的写入时间戳检查固件的一致性的步骤还包括:2. The SSD firmware consistency loading method according to claim 1, wherein the step of checking the consistency of the firmware by comparing the write time stamp of the SSD firmware backup further comprises: SSD上电后并行读取所有固件备份的最后写入位置,获取并对比固件备份的写入时间戳。After the SSD is powered on, the last write position of all firmware backups is read in parallel, and the write timestamps of the firmware backups are obtained and compared. 3.根据权利要求2所述的SSD固件一致性加载方法,其特征在于,在所述SSD上电后并行读取所有固件备份的最后写入位置,获取并对比固件备份的写入时间戳的步骤还包括:3. The method for consistent loading of SSD firmware according to claim 2, wherein after the SSD is powered on, the last write positions of all firmware backups are read in parallel, and the data of the write timestamps of the firmware backups are obtained and compared. Steps also include: 若写入时间戳一致,则跳过重加载Bootloader的过程,直接从多份固件中并行加载启动固件。If the writing time stamps are the same, skip the process of reloading the Bootloader, and directly load the boot firmware from multiple firmware copies in parallel. 4.根据权利要求3所述的SSD固件一致性加载方法,其特征在于,在所述SSD上电后并行读取所有固件备份的最后写入位置,获取并对比固件备份的写入时间戳的步骤之后还包括:4. The method for consistent loading of SSD firmware according to claim 3, characterized in that, after the SSD is powered on, the last write positions of all firmware backups are read in parallel, and the values of the write timestamps of the firmware backups are obtained and compared. The steps also include: 若写入时间戳不一致,则从第一份备份开始查找Bootloader与Firmware都完好的备份;If the writing time stamp is inconsistent, start from the first backup to find the backup with both Bootloader and Firmware intact; 如果查找所有备份后都无法获得完好备份,则固件启动失败,否则依次从获取的备份依次加载Bootloader与Firmware。If a complete backup cannot be obtained after searching all the backups, the firmware startup fails; otherwise, the Bootloader and Firmware are loaded in turn from the obtained backups. 5.一种SSD固件一致性加载装置,其特征在于,所述装置包括:5. An SSD firmware consistency loading device, wherein the device comprises: 获取模块,所述获取模块用于获取SSD固件一致性加载请求;an acquisition module, the acquisition module is used to acquire the SSD firmware consistency loading request; 合并模块,所述合并模块用于根据所述SSD固件一致性加载请求将固件的Bootloader和Firmware合并存储并一同进行更新;a merging module, which is used for merging and storing the Bootloader and Firmware of the firmware and updating together according to the SSD firmware consistency loading request; 比较模块,所述比较模块用于通过比较SSD固件备份的写入时间戳检查固件的一致性;a comparison module, which is used to check the consistency of the firmware by comparing the write timestamps of the SSD firmware backups; 第一加载模块,所述第一加载模块用于若写入时间戳不一致,则重加载Bootloader并从所述Bootloader对应固件备份中加载启动固件;a first loading module, which is used for reloading the Bootloader and loading the boot firmware from the corresponding firmware backup of the Bootloader if the writing time stamps are inconsistent; 第二加载模块,所述第二加载模块用于若写入时间戳一致,则直接从多份固件中并行加载启动固件。A second loading module, the second loading module is configured to directly load the boot firmware from multiple copies of firmware in parallel if the writing time stamps are consistent. 6.根据权利要求5所述的SSD固件一致性加载装置,其特征在于,所述装置还包括读取模块,所述读取模块用于:6. The SSD firmware consistency loading device according to claim 5, wherein the device further comprises a reading module, and the reading module is used for: SSD上电后并行读取所有固件备份的最后写入位置,获取并对比固件备份的写入时间戳。After the SSD is powered on, the last write position of all firmware backups is read in parallel, and the write timestamps of the firmware backups are obtained and compared. 7.根据权利要求6所述的SSD固件一致性加载装置,其特征在于,所述第二加载模块还用于:7. The SSD firmware consistency loading device according to claim 6, wherein the second loading module is further used for: 若写入时间戳一致,则跳过重加载Bootloader的过程,直接从多份固件中并行加载启动固件。If the writing time stamps are the same, skip the process of reloading the Bootloader, and directly load the boot firmware from multiple firmware copies in parallel. 8.根据权利要求7所述的SSD固件一致性加载装置,其特征在于,所述第一加载模块还用于:8. The SSD firmware consistency loading device according to claim 7, wherein the first loading module is further used for: 若写入时间戳不一致,则从第一份备份开始查找Bootloader与Firmware都完好的备份;If the writing time stamp is inconsistent, start from the first backup to find the backup with both Bootloader and Firmware intact; 如果查找所有备份后都无法获得完好备份,则固件启动失败,否则依次从获取的备份依次加载Bootloader与Firmware。If a complete backup cannot be obtained after searching all the backups, the firmware startup fails; otherwise, the Bootloader and Firmware are loaded in turn from the obtained backups. 9.一种计算机设备,包括存储器、处理器及存储在存储器上并可在处理器上运行的计算机程序,其特征在于,所述处理器执行所述计算机程序时实现权利要求1至4中任一项所述方法的步骤。9. A computer device comprising a memory, a processor and a computer program stored on the memory and running on the processor, wherein the processor implements any one of claims 1 to 4 when the processor executes the computer program. A step of the method. 10.一种计算机可读存储介质,其上存储有计算机程序,其特征在于,所述计算机程序被处理器执行时实现权利要求1至4中任一项所述的方法的步骤。10. A computer-readable storage medium on which a computer program is stored, wherein when the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
CN202111613544.1A 2021-12-27 2021-12-27 SSD firmware consistency loading method and device, computer equipment and storage medium Pending CN114356369A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111613544.1A CN114356369A (en) 2021-12-27 2021-12-27 SSD firmware consistency loading method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111613544.1A CN114356369A (en) 2021-12-27 2021-12-27 SSD firmware consistency loading method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114356369A true CN114356369A (en) 2022-04-15

Family

ID=81102295

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111613544.1A Pending CN114356369A (en) 2021-12-27 2021-12-27 SSD firmware consistency loading method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114356369A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115113949A (en) * 2022-06-29 2022-09-27 苏州忆联信息系统有限公司 Method for improving chip starting reliability and solid state disk thereof

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1083481A2 (en) * 1999-09-08 2001-03-14 Nec Corporation Computer and firmware writing method and apparatus thereof
CN103106083A (en) * 2011-11-09 2013-05-15 北京市三希电子科技开发公司 Loading method and loading device of firmware
CN107861775A (en) * 2017-12-04 2018-03-30 郑州云海信息技术有限公司 A kind of SSD starts control device and method
CN108733517A (en) * 2018-06-05 2018-11-02 深圳忆联信息系统有限公司 SSD firmware upgrades guard method and device
CN111045713A (en) * 2019-12-19 2020-04-21 浪潮(北京)电子信息产业有限公司 A computer system upgrade method, system and device

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1083481A2 (en) * 1999-09-08 2001-03-14 Nec Corporation Computer and firmware writing method and apparatus thereof
CN103106083A (en) * 2011-11-09 2013-05-15 北京市三希电子科技开发公司 Loading method and loading device of firmware
CN107861775A (en) * 2017-12-04 2018-03-30 郑州云海信息技术有限公司 A kind of SSD starts control device and method
CN108733517A (en) * 2018-06-05 2018-11-02 深圳忆联信息系统有限公司 SSD firmware upgrades guard method and device
CN111045713A (en) * 2019-12-19 2020-04-21 浪潮(北京)电子信息产业有限公司 A computer system upgrade method, system and device

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115113949A (en) * 2022-06-29 2022-09-27 苏州忆联信息系统有限公司 Method for improving chip starting reliability and solid state disk thereof

Similar Documents

Publication Publication Date Title
US8694766B2 (en) Device bootup from a NAND-type non-volatile memory
US8589730B2 (en) Handling errors during device bootup from a non-volatile memory
JP2010152514A (en) Memory system
US8788800B2 (en) OS processing method, system and non-transitory computer readable storage medium thereof
CN102298545A (en) System startup boot processing method and device
US11182245B2 (en) Operating method of memory controller, memory controller, and storage device
CN118656036B (en) Mirror image processing method, computer program product, apparatus, and storage medium
CN113157303A (en) Upgrading method, embedded system, terminal and computer storage medium
CN114356369A (en) SSD firmware consistency loading method and device, computer equipment and storage medium
TWI743480B (en) Computer system and a booting method for the same
CN113050887B (en) Flash memory partition data processing method, device, computer equipment and storage medium
CN114185620B (en) Method and device for realizing acceleration of SSD firmware loading, computer equipment and storage medium
CN115629811A (en) System stability control method and device
GB2540179A (en) An integrated system for the transactional management of main memory and data storage
CN115981694A (en) OTA (over the air) upgrading method and device of terminal equipment, readable storage medium and terminal equipment
CN110275596B (en) Solid state disk-based power-on initialization acceleration method and device and computer equipment
CN114356653A (en) Power-down protection method and device for industrial control firewall
CN110826114B (en) User data testing method and device based on SSD after safe erasure
CN112256475A (en) Failure memory recovery method and device, computer equipment and storage medium
CN101359300B (en) Management method of special data of computer device and starting method suitable for management method
CN112596679B (en) RAID implementation method and device of solid state disk, computer equipment and storage medium
CN116483412A (en) UEFI firmware maintenance method, device, equipment and medium
CN113900683B (en) BIOS refresh method, device, equipment and storage medium
CN113986126B (en) TCG data deleting method and device based on solid state disk and computer equipment
CN112817611B (en) System testing abnormal environment interception method, device, computer equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination