CN108170368B - Method and system for upgrading firmware online - Google Patents

Method and system for upgrading firmware online Download PDF

Info

Publication number
CN108170368B
CN108170368B CN201611116320.9A CN201611116320A CN108170368B CN 108170368 B CN108170368 B CN 108170368B CN 201611116320 A CN201611116320 A CN 201611116320A CN 108170368 B CN108170368 B CN 108170368B
Authority
CN
China
Prior art keywords
firmware
storage device
state storage
solid state
host
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.)
Active
Application number
CN201611116320.9A
Other languages
Chinese (zh)
Other versions
CN108170368A (en
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.)
Beijing Memblaze Technology Co Ltd
Original Assignee
Beijing Memblaze Technology 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 Beijing Memblaze Technology Co Ltd filed Critical Beijing Memblaze Technology Co Ltd
Priority to CN201611116320.9A priority Critical patent/CN108170368B/en
Publication of CN108170368A publication Critical patent/CN108170368A/en
Application granted granted Critical
Publication of CN108170368B publication Critical patent/CN108170368B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/0604Improving or facilitating administration, e.g. storage management
    • G06F3/0607Improving or facilitating administration, e.g. storage management by facilitating the process of upgrading existing storage systems, e.g. for improving compatibility between host and storage device
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1433Saving, restoring, recovering or retrying at system level during software upgrading
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • G06F11/1469Backup restoration techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0658Controller construction arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0668Interfaces specially adapted for storage systems adopting a particular infrastructure
    • G06F3/0671In-line storage system
    • G06F3/0673Single storage device
    • G06F3/0679Non-volatile semiconductor memory device, e.g. flash memory, one time programmable memory [OTP]

Abstract

The application provides a method and a system for upgrading firmware online, and relates to the field of solid state disks. The method for upgrading the firmware on line of the solid-state storage device comprises the following steps: downloading firmware in response to receiving a firmware download command; delaying a period of time and initiating a reset process to the solid state storage device in response to receiving a firmware activation or firmware confirmation command; loading the firmware indicated in the firmware activation or firmware confirmation command and resuming operation of the solid state storage device. The method and the device are applied to firmware upgrading in the solid state disk.

Description

Method and system for upgrading firmware online
Technical Field
The application relates to the field of solid state disks, in particular to a solid state storage device, a method for upgrading firmware online and a system thereof.
Background
FIG. 1 is a block diagram of a prior art solid state storage device. The solid state storage device 102 is coupled to a host for providing storage capability for the host. The host and solid state storage device 102 may be coupled by a variety of means including, but not limited to, connecting the host to the solid state storage device 102 via, for example, SATA (Serial Advanced Technology Attachment ), SCSI (Small Computer System Interface, small computer system interface), SAS (Serial Attached SCSI ), IDE (Integrated Drive Electronics, integrated drive electronics), USB (Universal Serial Bus ), PCIE (Peripheral Component Interconnect Express, PCIE, peripheral component interconnect Express), NVMe (NVM Express), ethernet, fibre channel, wireless communications network, and the like. The host may be an information processing device capable of communicating with the solid state storage device in the manner described above, such as a personal computer, tablet, server, portable computer, network switch, router, cellular telephone, personal digital assistant, or the like. The memory device 102 includes an interface 103, a control unit 104, one or more NVM chips 105, and a DRAM (Dynamic Random Access Memory ) 110.
NAND flash memory, phase change memory, feRAM (Ferroelectric RAM, ferroelectric memory), MRAM (Magnetic Random Access Memory, magnetoresistive memory), RRAM (Resistive Random Access Memory, resistive memory), and the like are common NVM.
The interface 103 may be adapted to exchange data with a host by way of, for example, SATA, IDE, USB, PCIE, NVMe, SAS, ethernet, fibre channel, etc.
The control unit 104 is used to control data transfer among the interface 103, NVM chip 105, and firmware memory 110, and also for storage management, host logical address to flash physical address mapping, erase balancing, bad block management, etc. The control component 104 can be implemented in a variety of ways, such as software, hardware, firmware, or a combination thereof, for example, the control component 104 can be in the form of an FPGA (Field-programmable gate array, field programmable gate array), an ASIC (Application Specific Integrated Circuit, application-specific integrated circuit), or a combination thereof; the control component 104 may also include a processor or controller in which software is executed to manipulate the hardware of the control component 104 to process IO (Input/Output) commands; control unit 104 may also be coupled to DRAM 110 and may access data of DRAM 110; FTL tables and/or cached data of IO commands may be stored in the DRAM.
The control section 104 includes a flash interface controller (or referred to as a media interface controller, a flash channel controller) that is coupled to the NVM chip 105 and issues commands to the NVM chip 105 in a manner conforming to an interface protocol of the NVM chip 105 to operate the NVM chip 105 and receive a command execution result output from the NVM chip 105. The interface protocols of NVM chip 105 include well-known interface protocols or standards such as "Toggle", "ONFI".
Software and/or firmware (hereinafter collectively referred to as "firmware") running in control component 104 can be stored in NVM chip 105 or in another firmware memory. At power-up of solid state storage device 102, firmware is loaded from firmware memory into memory internal to DRAM 110 and/or control component 104. Optionally, the firmware is received and loaded through interface 103 or a debug interface.
A firmware slot (firmware slot) is defined in the NVMe specification for storing a firmware image. NVME Specification is found (http:// nvmexpress. Org/wp-content/upload/NVM_express_1_2_1_gold_2016063. Pdf). In solid state storage supporting the NVMe specification, multiple firmware slots are provided to store the same or different firmware. When downloading new firmware to the control unit, the host may describe which firmware image is replaced by indicating the firmware slot. Firmware download, firmware Activate (Activate) or firmware acknowledge (command) commands are also defined in the NVMe specification. The firmware image is stored into the designated firmware slot by a firmware download command, and the firmware to be used next is indicated to the solid state storage device by a firmware activate/firmware confirm command. Thus, firmware upgrades of the solid state storage device may be implemented. Upon indication of a firmware activate/firmware acknowledge command, the solid state storage loads a new firmware image at the next Reset (Reset) or immediately uses the new firmware image without a Reset.
The NVMe specification also defines various levels of reset, including NVM subsystem reset, legacy reset (Conventional Reset, PCIe hot/warm/cold reset), functional level reset (PCIe reset), or controller reset (cc.en changes from "1" to "0"), etc. CSTS (Controller Status ) registers are also defined in the NVMe specification, and the host can know whether the reset is complete by querying the CSTS registers.
Disclosure of Invention
The invention aims to provide a solid-state storage device, and a method and a system for upgrading firmware online.
According to a first aspect of the present invention, there is provided a method of online upgrade of firmware of a first solid state storage device according to the first aspect of the present invention, comprising the steps of: downloading firmware in response to receiving a firmware download command; delaying a period of time and initiating a reset process to the solid state storage device in response to receiving a firmware activation or firmware confirmation command; loading the firmware indicated in the firmware activation or firmware confirmation command and resuming operation of the solid state storage device.
A method of online upgrading firmware of a first solid state storage device according to a first aspect of the present invention provides a method of online upgrading firmware of a second solid state storage device according to the first aspect of the present invention, in response to a command from a host during said period of time.
A method of online upgrading firmware of a first solid state storage device according to a first aspect of the present invention provides a method of online upgrading firmware of a third solid state storage device according to the first aspect of the present invention, responsive to a plurality of commands from a host over the period of time.
According to one of the methods of online firmware upgrade of the first to third solid state storage devices of the first aspect of the present invention, there is provided a method of online firmware upgrade of the fourth solid state storage device of the first aspect of the present invention, further comprising storing the downloaded firmware into a firmware slot of the NVM chip.
According to one of the methods of online updating firmware of the first to fourth solid state storage devices of the first aspect of the present invention, there is provided a method of online updating firmware of the fifth solid state storage device of the first aspect of the present invention, a plurality of copies of the downloaded firmware being stored in a plurality of firmware slots.
According to a method for online firmware upgrade of a fourth or fifth solid state storage device according to the first aspect of the present invention, there is provided a method for online firmware upgrade of a sixth solid state storage device according to the first aspect of the present invention, wherein a control part of the solid state storage device writes the downloaded firmware into a designated firmware slot.
According to one of the methods of online updating firmware of the first to sixth solid-state storage devices of the first aspect of the present invention, there is provided a method of online updating firmware of the seventh solid-state storage device of the first aspect of the present invention, wherein the firmware activation or firmware confirmation command includes information of firmware slots stored in the firmware.
A method of online upgrading firmware of a seventh solid state storage device according to the first aspect of the present invention provides a method of online upgrading firmware of an eighth solid state storage device according to the first aspect of the present invention, the control section of the solid state storage device recording a firmware slot to be used indicated in a firmware activation or confirmation command.
According to a method for online upgrading firmware of an eighth solid-state storage device according to the first aspect of the present invention, there is provided a method for online upgrading firmware of a ninth solid-state storage device according to the first aspect of the present invention, wherein the control unit records a firmware slot number of the indicated firmware slot in the NVM chip.
According to one of the methods of online firmware upgrade of the first to ninth solid state storage devices of the first aspect of the present invention, there is provided a method of online firmware upgrade of the tenth solid state storage device of the first aspect of the present invention, the solid state storage device initiating a reset procedure in response to receiving a reset command.
According to one of the methods of online firmware upgrade of the first to tenth solid state storage devices of the first aspect of the present invention, there is provided a method of online firmware upgrade of the eleventh solid state storage device of the first aspect of the present invention, the solid state storage device initiating a reset process after the period of time in response to receipt of a firmware confirmation command.
According to one of the methods of online firmware upgrade of the first to eleventh solid-state storage devices of the first aspect of the present invention, there is provided the method of online firmware upgrade of the twelfth solid-state storage device of the first aspect of the present invention, wherein the control part of the solid-state storage device stops the operation of the actuator after a delay for a period of time, and responds to a command or access from the host for the delayed period of time.
A method of online upgrade of firmware of a twelfth solid state storage device according to the first aspect of the present invention provides a method of online upgrade of firmware of a thirteenth solid state storage device according to the first aspect of the present invention, the period of time being several milliseconds.
A thirteenth solid state storage device in accordance with the first aspect of the present invention provides a method of online firmware upgrade of a fourteenth solid state storage device in accordance with the first aspect of the present invention, the period of time being a specified time or a time within a specified time when a command to access a CSTS register by a host is received and a response is made to the command to access the CSTS register.
A method for online upgrading firmware of a twelfth solid-state storage device according to the first aspect of the present invention provides the method for online upgrading firmware of a fifteenth solid-state storage device according to the first aspect of the present invention, wherein a condition that is satisfied earlier in a period of time that a control part of the solid-state storage device is delayed and in response to a specified number of host commands is taken as a basis for initiating a reset procedure for the solid-state storage device.
According to a twelfth solid state storage device online firmware upgrade method of the first aspect of the present invention, there is provided a sixteenth solid state storage device online firmware upgrade method of the first aspect of the present invention, wherein the host access request received by the solid state storage device comprises a PCIe transport layer packet and a read request to a CSTS register of the solid state storage device.
According to one of the methods of online firmware upgrade of the twelfth to sixteenth solid-state storage devices of the first aspect of the present invention, there is provided the method of online firmware upgrade of the seventeenth solid-state storage device of the first aspect of the present invention, the control section includes a main actuator and a sub-actuator, and the number of sub-actuators is plural.
According to a seventeenth aspect of the present invention, there is provided a method for online firmware upgrade of an eighteenth solid state storage device according to the first aspect of the present invention, wherein after a delay for a period of time, a main actuator of a control unit stops operation of a sub-actuator and instructs the sub-actuator to reset/restart or instructs the entire control unit including itself to reset/restart.
According to a method for online firmware upgrading of an eighteenth solid state storage device of the first aspect of the present invention, there is provided a method for online firmware upgrading of a nineteenth solid state storage device of the first aspect of the present invention, after firmware loading is completed, setting a state of the solid state storage device to be ready to indicate to a host that the solid state storage device can receive an IO command.
According to an eighteenth or nineteenth method for online firmware upgrade of a solid state storage device according to the first aspect of the present invention, there is provided a method for online firmware upgrade of a twentieth solid state storage device according to the first aspect of the present invention, wherein a main actuator of a control unit shortens a time during which the main actuator of the control unit cannot respond to an IO command of a host and/or other commands for accessing the solid state storage device after stopping operation of a sub-actuator and before a state of the solid state storage device is ready.
According to one of the methods of online firmware upgrade of the eighteenth to twentieth solid-state storage devices of the first aspect of the present invention, there is provided the method of online firmware upgrade of the twenty first solid-state storage device of the first aspect of the present invention, wherein the main executor of the control unit predictively loads the firmware in the designated firmware slot into the DRAM or the internal memory of the control unit before receiving the reset command of the host.
According to one of the methods of online updating firmware of the eighteenth to twentieth solid-state storage devices of the first aspect of the present invention, there is provided the method of online updating firmware of the twenty second solid-state storage device of the first aspect of the present invention, wherein the main executor of the control part loads the firmware in the specified firmware slot into the DRAM or the internal memory of the control part in response to receiving the firmware activation or firmware confirmation command.
According to one of the methods of online updating firmware of the eighteenth to twentieth solid state storage devices of the first aspect of the present invention, there is provided the method of online updating firmware of the twenty third solid state storage device of the first aspect of the present invention, independent of the firmware activation/firmware confirmation command, the main executor of the control unit loads the firmware in the predicted firmware slot or all firmware slots into the DRAM.
According to one of the methods of online firmware upgrade of the eighteenth to twenty-third solid-state storage devices of the first aspect of the present invention, there is provided the method of online firmware upgrade of the twenty-fourth solid-state storage device of the first aspect of the present invention, wherein the primary actuator of the control unit further backs up metadata before stopping the operation of the secondary actuator, and restores the metadata after the firmware upgrade is completed.
A twenty-fourth solid state storage device according to the first aspect of the present invention provides a method of online firmware upgrade for a twenty-fifth solid state storage device according to the first aspect of the present invention, the metadata including one or more of a flash map table, a bad block table, and erasure count information.
A twenty-fourth or twenty-fifth solid state storage device online firmware upgrade method according to the first aspect of the present invention provides the twenty-sixth solid state storage device online firmware upgrade method according to the first aspect of the present invention, the metadata further comprising register data of the NVMe controller and NVMe management queue data.
According to one of the twenty-fourth to twenty-sixth solid-state storage device online firmware upgrade methods of the first aspect of the present invention, there is provided the twenty-seventh solid-state storage device online firmware upgrade method according to the first aspect of the present invention, the metadata further comprising metadata for flash memory management.
According to one of the twenty-fourth to twenty-seventh methods of online upgrading firmware of the solid-state storage device of the first aspect of the present invention, there is provided a method of online upgrading firmware of the twenty-eighth solid-state storage device of the first aspect of the present invention, the metadata further comprising metadata of an underlying protocol.
According to a twenty-eighth solid-state storage device online firmware upgrade method of the first aspect of the present invention, there is provided a twenty-ninth solid-state storage device online firmware upgrade method of the first aspect of the present invention, wherein metadata of the underlying protocol includes PCIe configuration space registers.
According to one of the methods for online firmware upgrade of the twenty fourth to twenty ninth solid state storage devices of the first aspect of the present invention, there is provided the method for online firmware upgrade of the thirty third solid state storage device of the first aspect of the present invention, wherein the secondary executor of the control unit restores all metadata of the backup before the secondary executor resumes operation using the upgraded firmware.
According to one of the eighteenth to thirty-first solid-state storage device online firmware upgrade methods of the first aspect of the present invention, there is provided the thirty-first solid-state storage device online firmware upgrade method of the first aspect of the present invention, wherein the primary actuator of the solid-state storage device provides a preliminary response capability to host access after stopping the operation of the secondary actuator and before the state of the solid-state storage device is ready.
A thirty-first solid state storage device in accordance with a first aspect of the present invention provides a method of online firmware upgrade of a thirty-second solid state storage device in accordance with the first aspect of the present invention, for providing a preliminary response capability to host access, buffering command buffers from a host in the solid state storage device.
A thirty-first solid state storage device online firmware upgrade method according to the first aspect of the present invention provides a thirty-third solid state storage device online firmware upgrade method according to the first aspect of the present invention, for providing a preliminary response capability to host access, a main executor of a control unit responding to a command of a host with a specified value or a default value.
A thirty-first solid state storage device in accordance with a first aspect of the present invention provides a method of online upgrade of firmware in accordance with the thirty-fourth solid state storage device of the first aspect of the present invention, the firmware being divided into a plurality of portions, one or some of the firmware portions being used to process commands of a host, in order to provide a preliminary response capability to host access.
A thirty-fourth solid state storage device in accordance with the first aspect of the present invention provides a method of online firmware upgrade of a thirty-fifth solid state storage device in accordance with the first aspect of the present invention, the firmware portion for processing commands of a host remaining operational during the firmware upgrade in response to an access request of the host.
A thirty-fifth solid state storage device online firmware upgrade method according to the first aspect of the present invention provides a thirty-sixth solid state storage device online firmware upgrade method according to the first aspect of the present invention, providing a dedicated firmware upgrade process to update the firmware portion that handles the underlying access request.
According to one of the methods of online upgrading firmware of the first to thirty-sixth solid-state storage devices of the first aspect of the present invention, there is provided the method of online upgrading firmware of the thirty-seventh solid-state storage device of the first aspect of the present invention, wherein the control unit records a firmware slot for storing firmware indicated by the host through the debug interface.
A thirty-seventh solid state storage device according to the first aspect of the present invention provides a method of online firmware upgrade of a thirty-eighth solid state storage device according to the first aspect of the present invention, the solid state storage device receiving a firmware activation or firmware confirmation command through a debug interface, and receiving a reset command indicating a restart of the solid state storage device.
According to a thirty-eighth solid-state storage device online firmware upgrading method of the first aspect of the present invention, there is provided a thirty-ninth solid-state storage device online firmware upgrading method of the first aspect of the present invention, wherein the solid-state storage device receives a private command sent by a host through a debug interface to conduct firmware upgrading.
According to one of the methods of online firmware upgrade of the first to thirty-ninth solid-state storage devices of the first aspect of the present invention, there is provided a method of online firmware upgrade of the forty-first solid-state storage device according to the first aspect of the present invention, wherein access to the solid-state storage device is avoided for a period of time after a reset command is issued to the solid-state storage device.
A method of online firmware upgrade for a forty-first solid state storage device according to the first aspect of the present invention provides a method of online firmware upgrade for a forty-first solid state storage device according to the first aspect of the present invention, avoiding access to the solid state storage device for a period of time comprising avoiding querying a CSTS register of NVMe for a period of time and avoiding issuing a PCIe access request to the solid state storage device for a period of time.
A method of online upgrade of firmware for a forty-second solid state storage device according to the first aspect of the present invention provides a method of online upgrade of firmware for a forty-second solid state storage device according to the first aspect of the present invention, avoiding access to the solid state storage device for a period of time comprising delaying the period of time before querying the solid state storage device state.
A method of online upgrade of firmware for a forty-third solid state storage device according to the first aspect of the present invention provides a method of online upgrade of firmware for a forty-third solid state storage device according to the first aspect of the present invention, avoiding access to the solid state storage device for a period of time including a status query to the solid state storage device by a host at any time, the period of time being delayed before being sent to the solid state storage device.
The method for upgrading the firmware of the solid-state storage device on line ensures that the firmware of the solid-state storage device can still effectively respond to the access of the host during the upgrading process.
According to a second aspect of the present invention, there is provided a first solid state storage device according to the second aspect of the present invention, comprising a host interface, a control unit, an NVM chip and a DRAM, the control unit being coupled to the host interface, the NVM chip and the DRAM, respectively, wherein the host interface is adapted to exchange commands and data with a host; the control means is for executing the method according to one of the first to forty-third aspects of the first aspect.
The solid-state storage device of the invention can still effectively respond to the access of the host computer during the firmware upgrading of the solid-state storage device by applying the method for upgrading the firmware on line.
According to a third aspect of the present invention, there is provided a system for online upgrade of firmware of a first solid state storage device according to the third aspect of the present invention, comprising: the firmware downloading module is used for downloading the firmware in response to receiving the firmware downloading command; a reset module for delaying a period of time and initiating a reset process to the solid state storage device in response to receiving a firmware activation or firmware confirmation command; and the firmware loading module is used for loading the firmware indicated in the firmware activation or firmware confirmation command and recovering the operation of the solid-state storage device.
The system for upgrading the firmware on line of the solid-state storage device, which is disclosed by the invention, is applied to the method for upgrading the firmware on line, so that the firmware of the solid-state storage device can still effectively respond to the access of a host during the upgrading process.
According to a fourth aspect of the present invention, there is provided a method of online upgrade of firmware of a first solid state storage device according to the fourth aspect of the present invention, comprising the steps of: downloading firmware in response to receiving a firmware download command; responding to a command for accessing a CSTS register from a host after receiving a firmware confirmation command, responding to the command for accessing the CSTS register, and initiating a resetting process for the solid-state storage device; and loading the firmware indicated in the firmware confirmation command, and restoring the operation of the solid-state storage device.
The method for upgrading the firmware of the solid-state storage device on line ensures that the firmware of the solid-state storage device can still effectively respond to the access of the host during the upgrading process.
According to a fifth aspect of the present invention, there is provided a method of online upgrade of firmware of a first solid state storage device according to the fifth aspect of the present invention, comprising the steps of: downloading firmware in response to receiving a firmware download command; in response to receiving a reset command, delaying for a specified time, and after the specified time or after a command for accessing a CSTS register is received and a response is made to the command for accessing the CSTS register, initiating a reset process for the solid state storage device; loading the firmware indicated in the or firmware confirmation command resumes operation of the solid state storage device.
The method for upgrading the firmware of the solid-state storage device on line ensures that the firmware of the solid-state storage device can still effectively respond to the access of the host during the upgrading process.
According to a sixth aspect of the present invention there is provided a program comprising program code which, when loaded into and executed on a solid state storage device, causes the solid state storage device to perform one of the methods of online upgrading firmware according to the first, fourth or fifth aspects of the present invention.
The program of the program code of the solid-state storage device can enable the firmware of the solid-state storage device to still effectively respond to the access of the host during the upgrading.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following description will briefly introduce the drawings that are required to be used in the embodiments or the description of the prior art, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings may also be obtained according to these drawings for a person having ordinary skill in the art.
FIG. 1 is a block diagram of a prior art solid state storage device;
FIG. 2 is a block diagram of a solid state storage device according to an embodiment of the invention;
FIG. 3 is a flow chart of a solid state storage device online upgrade firmware according to an embodiment of the present invention; and
FIG. 4 is a flow chart of a solid state storage device online upgrade firmware according to yet another embodiment of the present invention.
Detailed Description
In order to better understand the technical solutions in the present application, the following description will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the drawings in the embodiments of the present application, and it is obvious that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application shall fall within the scope of protection of the present application.
The specific implementation of the present application is further described below with reference to the drawings of the present application.
FIG. 2 is a block diagram of a solid state storage device according to an embodiment of the invention. As shown in fig. 2, the solid-state storage device includes: control unit 201, host interface 202, DRAM (Dynamic Random Access Memory ) 203, and firmware slot 204. Wherein firmware slots 204 are provided by the NVM chip. Illustratively, firmware slot 204 of the NVM chip is divided into firmware slot 1, firmware slot 2, firmware slot 3, and firmware slot 4. The control component 201 of the solid state storage device is coupled to the host interface 202, DRAM 203, and firmware slot 204, respectively.
The host interface 202 is used to exchange commands and data with a host. The host interface 202 couples the solid state storage device to an external host (not shown). By way of example, the solid state storage device supports the NVMe specification. The host issues commands to the solid state storage device through the host interface 202 according to the NVMe specification and receives command execution results.
The solid state storage device according to embodiments of the present invention provides an online firmware upgrade function. At start-up of the solid state storage device, firmware is loaded from one of the firmware slots. The firmware may be loaded into the DRAM 203 or a memory internal to the control section 201 and executed by an actuator of the control section 201. By way of example, the actuators are implemented as one or more CPUs, processors, controllers, and/or field programmable gate arrays. The host may indicate to control component 201 one of the firmware slots used at the next boot-up, such as firmware slot 3, so that after the next boot-up or reset, control component 201 loads firmware from firmware slot 204.
To perform an online firmware upgrade, the host or other device downloads (writes) one or more new firmware to one or more firmware slots. And the host instructs the control component 204 of the firmware slots that should be used the next time it is started, and instructs the control component 204 or solid state storage device to reset or reboot. In response to the reset indication, control component 204 loads new firmware from the indicated firmware slot to complete the firmware upgrade.
FIG. 3 is a flow chart of a solid state storage device online upgrade firmware according to an embodiment of the present invention. As shown in fig. 3, the host instructs the solid state storage device to perform a firmware upgrade. To upgrade the firmware, the host issues a download firmware command (310) to write the new firmware to one of the firmware slots of the solid state storage device. Optionally, to improve reliability, the host writes multiple copies of firmware to multiple firmware slots 204. Even if one or more of the firmware slots 204 fail, there is still an opportunity to obtain valid firmware from the other firmware slots that is operational. By way of example, the host writes new firmware to firmware slot 3. In response to receiving the firmware download command, the control section 201 writes the firmware provided by the host into a specified firmware slot, such as firmware slot 3. It will be appreciated that the download firmware command and the subsequent firmware activate command/firmware acknowledge command may be discontinuous in time or may be very long in interval. It will be further appreciated that the host may download multiple copies of the same or different firmware into multiple firmware slots via a firmware download command, thereby indicating that the solid state storage device will load firmware from a designated firmware slot after a restart, and choose to load different firmware by designating different firmware slots.
The host, through a firmware activate command/firmware acknowledge command (315), informs the solid state storage device to load firmware from, for example, firmware slot 3 after the next reset to use the new firmware stored in firmware slot 3. A firmware activate and firmware acknowledge command to indicate the next firmware slot 3 to reset for use. The difference is that after the firmware activate command, the host also issues a reset command to the solid state storage device, resetting the solid state storage device. In response to the firmware confirm command, the host does not need to send a reset command, and the solid-state storage device also initiates a reset process. In response to receiving the firmware activation command or the firmware confirmation command, the control section 201 records the firmware slot to be used (340) indicated in the firmware activation command/firmware confirmation command, for example, records the number (e.g., 3) of the indicated firmware slot 3 in the NVM chip, so that the firmware slot 3 to be used can be known after power-up even if power-down occurs in the reset process.
The host may issue IO commands (317) to the solid state storage device as needed to access the solid state storage device between a firmware activate/firmware acknowledge command (315) and an instruct solid state storage device restart command (320).
To instruct the solid state storage device to load new firmware, the host instructs the solid state storage device to restart (320), such as by sending a reset command to the solid state storage device. In response to receiving the reset command, in an embodiment according to the present invention, the control unit 201 does not immediately stop the operation of the processor/controller/programmable gate array to use the new firmware, but delays for a period of time (345), although the solid state storage device does not respond to the host access after receiving the reset command and before the reset is completed according to the NVMe specifications. During the delayed time, the control unit 201 still responds to commands or accesses from the host. The time of the delay may be several milliseconds, for example 1-10ms or 1-20ms. Or the delay time may be determined synthetically by time and/or access requests from the host. For example, after receiving the reset command, a number (e.g., 1-10) of data access requests (e.g., PCIe transport layer packets (TLP, translation Layer Packet)) are processed again, 1 or 2 read requests to CSTS registers defined by the NVMe Specification. Still alternatively, a condition that is satisfied earlier in a specified number of host commands and a specified delay time are used as a basis for ending the wait.
After receiving the reset command, a delay period is aimed at improving compatibility. Unexpected consequences are avoided due to undefined behavior in the NVMe specification, or behavior of the host not conforming to the NVMe specification. For example, some host drivers may attempt to read the CSTS register after a reset command is issued to learn whether the solid state storage device responded to the reset command. In other examples, the link layer packets may be delivered out of order to the host interface 202 or the control component 201, such that after receiving the reset command, the control component 201 also receives other access requests. If the solid state storage device in the reset is not able to efficiently handle such access requests, various unpredictable accidents may occur, such as PCIe drive errors of the host. According to the embodiment of the present invention, the control unit 201 prevents the exception caused by the long-time failure of the response of the host access request by delaying the execution of the processor for a period of time after receiving the reset command, so that the access request from the host can be processed for the delayed time. Next, the host no longer issues IO commands (322).
Next, the control section 201 stops the operation of the processor (350). For example, the control unit 201 and/or its processor may be disabled and restarted by executing firmware or hardware circuitry to generate a hardware reset signal. Alternatively, power to the solid state storage device is stopped to force the processor of the control section 201 to stop functioning. As another example, the control unit 201 includes a plurality of processors, one of which (referred to as a main processor) manages the process of online upgrade. The other secondary processors are instructed by the primary processor to cease operation. And after completion of the upgrade preparation work, the main processor instructs the other sub-processors to restart, or the main processor causes the entire control section 201 including itself to restart.
Next, firmware is loaded from the specified firmware slot 204 (355). The firmware slot is specified by a firmware activate command or firmware acknowledge command issued by the host (315). Loading firmware from firmware slot 204 may be accomplished during a solid state storage device start-up/power-up procedure.
In another example, in response to receiving a reset command, after suspending processor operation, new firmware is loaded from the designated firmware slot to DRAM 203 (344). Alternatively, the firmware is loaded into a memory inside the control section 201, so that the processor of the control section 201 can run the loaded firmware from the DRAM 203 or the internal memory after reset.
After the loading of the new firmware is completed, the operation of the processor of the control section 201 is resumed (360). Since the new firmware has been loaded in the DRAM 203 or the internal memory, the processor that resumes operation will execute the new firmware. And setting the state of the solid state storage device to ready to indicate to the host that the solid state storage device can receive the IO command (365). By way of example, in the NVMe specification, the status of the solid state storage device is indicated as ready by setting a CSTS register.
The host identifies whether the firmware upgrade is complete or whether the solid state storage device is operational by querying whether the state of the solid state storage device is ready (325). And when the state of the solid state storage is a ready state, the host uses the solid state storage device by issuing an IO command (327) to the solid state storage device. The solid state storage device responds to the IO command by running the new firmware (370).
During the firmware upgrade process, during steps 350-365, the solid state storage device cannot respond to host IO commands and/or other commands (e.g., TLPs) to access the solid state storage device, which can affect the user's use of the solid state storage device. Thus, it is desirable to shorten the time during steps 350-365 that the host command cannot be responded to, or to shorten the time from receipt of the reset command in step 345 to step 365. The time of the firmware upgrade process or the time that the solid state storage device cannot respond to host commands is shortened by a variety of means. For example, before receiving a reset/restart command (320) of the host, firmware in the specified firmware slot is predictively loaded into the internal memory of the DRAM203 or the control unit 201. Optionally, in response to receiving the firmware activate/firmware acknowledge command (315), the firmware in the designated firmware slot 204 is loaded into the DRAM203 or the internal memory of the control component 201. Still alternatively, the firmware in the predicted firmware slot 204 or all firmware slots 204 is loaded into the DRAM203 independent of the firmware activate/firmware acknowledge command so that upon receipt of the firmware activate/firmware acknowledge command, the desired firmware is understood to be obtained from the DRAM 203.
In still further examples, it is desirable to ensure that the firmware upgrade process does not result in data loss, which requires further backup and recovery of metadata during the firmware upgrade process. The metadata includes various metadata for NVM storage media management, such as a flash map table, a bad block table, erasure count information, etc. The metadata may also include metadata related to NVMe specifications, such as registers of an NVMe controller, NVMe management Queue (Admin Queue). The metadata may also include metadata of the underlying protocol, e.g., PCIe configuration space registers. And the backed-up metadata is also restored after the processor of the control unit 201 resumes operation using the new firmware. The size of the metadata may be large (e.g., several GB, gigabytes), and the journaling (for recording metadata) methods provided in chinese patent applications No. 201610499397.2, 201610499631.1, 201610500411.6 of 2015, 7, 21, 201510430174.6, and 2016, 6, 29, which are incorporated herein by reference in their entirety, are used to expedite the metadata recovery process.
The kind of metadata that needs to be backed up may vary for different types of resets. For example, for a reset at the NVMe controller level, in addition to backing up metadata related to the NVMe specification, metadata of the underlying protocol (e.g., PCIe configuration space registers) needs to be backed up (348), while for a reset at the PCIe level (e.g., PCIe function or PCIe fundamental), PCIe configuration space registers need not be backed up. Alternatively, it may be specified whether metadata for flash management is backed up.
Still alternatively, the host may query the status of the solid state storage device (e.g., access the CSTS register). Until the firmware upgrade of the solid state storage device (e.g., step 360) is completed, the host's query cannot be responded to, which can have serious consequences. In addition to reducing the time during which a solid state storage device firmware upgrade cannot respond to host commands, a preliminary capability of responding to host accesses may also be provided in host interface 202 and/or control unit 201. Before the firmware upgrade of the solid-state storage device is completed, if the host issues a TLP, when accessing the PCIe register (324), the solid-state storage device may provide a cache, and during the firmware upgrade, temporarily store the access request of the host, so that after the firmware upgrade is completed, the access request to be processed may be quickly obtained from the cache, and provide a response to the host. Alternatively, during a firmware upgrade, the host's access request is responded to with a specified or default value so that the host's access request can be handled by hardware and/or dedicated software/firmware. Still alternatively, the firmware of the solid state storage device is divided into multiple portions, with one or some of the firmware portions being used to process underlying (e.g., PCIe) access requests of the host. During a firmware upgrade, the firmware portion that handles the underlying access request is kept running (not upgraded) in response to the host's access request. And providing a dedicated firmware upgrade process to update the firmware portion that handles the underlying request. Because of the smaller size of the firmware portion that handles the underlying access request, upgrades can be completed in a shorter time, and thus can be completed before the host access request times out, so as not to affect or reduce the impact on the processing of the host access request.
Still alternatively, when firmware is loaded from the firmware slot into the DRAM 203 or the internal memory, the loaded firmware is also checked for integrity and/or correctness.
Still alternatively, the firmware is downloaded to the solid state storage device from an interface other than the host interface 202, such as a debug interface (not shown) of the control unit 201. The downloaded firmware is stored in the DRAM 203. And a firmware slot 204 for storing firmware is indicated through the debug interface. And also sends a firmware activate/firmware confirm command conforming to NVMe specifications to the control part 201 through the debug interface and instructs the solid state storage device to restart. Alternatively, the solid state storage device is instructed to perform the firmware upgrade by a proprietary command or other form of command.
Still alternatively, to improve reliability/compatibility, after the host sends a reset command to the solid-state storage device, access to the solid-state storage device is avoided for a short period of time (to avoid immediately querying the CSTS register of NVMe and also avoid sending PCIe access to the solid-state storage device), so as to avoid an exception of the host caused by the failure of the solid-state storage device to respond to the access request. For example, after the host issues a reset command to the solid state storage device, a delay of a period of time is inserted before querying the solid state storage device state. In an alternative embodiment, any time a host issues a status query to a solid state storage device, a delay is inserted for a period of time before being sent to the solid state storage device. Because the processing performance of the state query operation does not influence the user experience, and compared with IO commands, the occurrence frequency of the state query operation is not high, the delay added to any state query operation does not obviously influence the performance, but the complexity of the system is obviously reduced.
FIG. 4 is a flow chart of a solid state storage device online upgrade firmware according to yet another embodiment of the present invention. As shown in fig. 4, the host instructs the solid state storage device to perform a firmware upgrade. To upgrade the firmware, the host issues a download firmware command (415) to write the new firmware to one of the firmware slots of the solid state storage device. Optionally, to improve reliability, the host writes multiple copies of firmware to multiple firmware slots 204. Even if one or more of the firmware slots 204 fail, there is still an opportunity to obtain valid firmware from the other firmware slots that is operational. By way of example, the host writes new firmware to firmware slot 3. In response to receiving the firmware download command, the control section 201 writes the firmware provided by the host into a specified firmware slot, such as firmware slot 3. It will be further appreciated that the host may download multiple copies of the same or different firmware into multiple firmware slots via a firmware download command, thereby indicating that the solid state storage device will load firmware from a designated firmware slot after a restart, and choose to load different firmware by designating different firmware slots.
The host issues a firmware confirmation command (420) in which the firmware slot 204 to be used is indicated, the firmware is loaded from, for example, firmware slot 3, and the solid state storage device is instructed to immediately perform the firmware upgrade without waiting for a reset command from the host. In response to receiving the firmware confirm command, the solid state storage device records the firmware slot 204 to be used and no longer responds to the host's IO command. For commands that are being processed but have not yet been processed, processing may either continue to complete or may be discarded directly without further processing. For the solid state storage device to record the firmware slot 204 to be used, for example, the number (e.g., 3) of the indicated firmware slot 3 is recorded in the NVM chip, so that even if power down occurs during reset, the firmware slot 3 to be used can be known after power up.
In response to receipt of the firmware confirm command, in an embodiment according to the present invention, although the solid state storage device no longer responds to the host's access after receipt of the firmware confirm command, in accordance with the NVMe specification, before the reset is completed, the control section 201 does not immediately stop the operation of the processor/controller/programmable gate array (described below as a processor for example) that is to use the new firmware, but waits for a specified event to occur (e.g., delays for a period of time) (455). During the delayed time, the control unit 201 still responds to commands or accesses from the host. The time of the delay may be several milliseconds, for example 1-10ms or 1-20ms. Or the delay time may be determined synthetically by time and/or access requests from the host. For example, after receiving the reset command, a number (e.g., 1-10) of data access requests (e.g., PCIe Transport Layer Packets (TLPs)) are processed, 1 or 2 read requests to CSTS registers defined by the NVMe Specification. Still alternatively, a condition that is satisfied earlier in a specified number of host commands and a specified delay time are used as a basis for ending the wait.
The control section 201 delays for a period of time in order to improve compatibility. Unexpected consequences are avoided due to undefined behavior in the NVMe specification, or behavior of the host not conforming to the NVMe specification. For example, some host drivers, after issuing a firmware confirm command, may attempt to read the CSTS register to see if the solid state storage device responded to the firmware confirm command. In other examples, the link layer packets may be delivered out of order to the host interface 202 or the control component 201, such that after receiving the firmware confirm command, the control component 201 also receives other access requests. If the solid state storage device in the reset is not able to efficiently handle such access requests, various unpredictable accidents may occur, such as PCIe drive errors of the host. According to the embodiment of the present invention, the control unit 201 prevents the exception caused by the long-time failure of the response of the host access request by delaying the execution of the processor for a period of time after receiving the firmware confirm command and then stopping the execution of the processor. Next, the host no longer issues IO commands (422).
Next, the control section 201 stops the operation of the processor (460). For example, the control unit 201 and/or its processor may be disabled and restarted by executing firmware or hardware circuitry to generate a hardware reset signal. Alternatively, power to the solid state storage device is stopped to force the processor of the control section 201 to stop functioning. As another example, the control unit 201 includes a plurality of processors, one of which (referred to as a main processor) manages the process of online upgrade. The other secondary processors are instructed by the primary processor to cease operation. And after completion of the upgrade preparation work, the main processor instructs the other sub-processors to restart, or the main processor causes the entire control section 201 including itself to restart.
Next, firmware is loaded (465) from the designated firmware slot 3 (as an example). Firmware slot 3 is specified by a firmware acknowledge command issued by the host (420). Loading firmware from firmware slot 3 may be accomplished during a solid state storage device start-up/power-up procedure.
In another example, in response to receiving a reset command, after suspending processor operation, new firmware is loaded from the designated firmware slot to DRAM 203. Alternatively, the firmware is loaded into a memory inside the control section 201, so that the processor of the control section 201 can run the loaded firmware from the DRAM 203 or the internal memory after reset.
After the loading of the new firmware is completed, the operation of the processor of the control unit 201 is resumed (470). Since the new firmware has been loaded in the DRAM 203 or the internal memory, the processor that resumes operation will execute the new firmware. And setting the state of the solid state storage device to ready to indicate to the host that the solid state storage device can receive the IO command (475). By way of example, in the NVMe specification, the status of the solid state storage device is indicated as ready by setting a CSTS register.
The host identifies whether the firmware upgrade is complete or whether the solid state storage device is operational by querying whether the state of the solid state storage device is ready (425). And when the state of the solid state storage is a ready state, the host uses the solid state storage device by issuing an IO command (430) to the solid state storage device. The solid state storage device responds to the IO command by running new firmware (480).
During the firmware upgrade process, during steps 460-475, the solid state storage device may not be able to respond to host IO commands and/or other commands (e.g., TLPs) to access the solid state storage device, which may affect the user's use of the solid state storage device. Thus, it is desirable to shorten the time during steps 460-475 that the host command cannot be responded to, or to shorten the time from receipt of the firmware confirm command in step 450 to step 475. The time of the firmware upgrade process or the time that the solid state storage device cannot respond to host commands is shortened by a variety of means. For example, before receiving the firmware confirm command (420), firmware in the specified firmware slot is predictively loaded into the internal memory of the DRAM 203 or the control unit 201. Alternatively, in response to receiving the firmware confirm command (420), the firmware in the specified firmware slot 3 is loaded into the internal memory of the DRAM 203 or the control section 201. Still alternatively, the predicted firmware slot 204 or the firmware in all firmware slots 204 is loaded into the DRAM 203 independent of the firmware confirm command so that upon receipt of the firmware confirm command, the desired firmware is understood to be obtained from the DRAM 203.
In still further examples, it is desirable to ensure that the firmware upgrade process does not result in data loss, which requires further backup and recovery of metadata during the firmware upgrade process.
The metadata includes various metadata for NVM storage media management, such as a flash map table, a bad block table, erasure count information, etc. The metadata may also include metadata related to NVMe specifications, such as registers of an NVMe controller, NVMe management Queue (Admin Queue). The metadata may also include metadata of the underlying protocol, e.g., PCIe configuration space registers. And the backed-up metadata is also restored after the processor of the control unit 201 resumes operation using the new firmware.
The kind of metadata that needs to be backed up may vary for different types of resets. For example, for an NVMe controller level reset, in addition to backing up the metadata related to the NVMe specification, the metadata of the underlying protocol (e.g., PCIe configuration space register) needs to be backed up, while for a PCIe level (e.g., PCIe function or PCIe fundamental) reset, the PCIe configuration space register does not need to be backed up. Alternatively, it may be specified whether metadata for flash management is backed up.
After the backup of the metadata is completed, the processor operation of the control section 201 is stopped (460). And after the resume processor is running (470), the backed up metadata is restored to restore the solid state storage device to a state prior to starting the firmware upgrade, including restoring the metadata of the NVMe management queue, etc. Alternatively, the control component 201 may trigger a solid state storage device restart/reset after resuming processor operation.
Further, when the metadata is backed up, all the NVMe command queues and the completion queues are backed up, and when the backed up metadata is restored, the backed up NVMe command queues and the completion queues are restored. After the backup of the metadata is started (until the completion of the reset), the IO command is not processed any more, in other words, the metadata to be backed up is not updated by processing the IO command any more.
Still alternatively, the host may query the status of the solid state storage device (e.g., access the CSTS register). Until the firmware upgrade of the solid state storage device (e.g., step 470) is completed, the host's query cannot be responded to, which can have serious consequences. In addition to reducing the time during which a solid state storage device firmware upgrade cannot respond to host commands, a preliminary capability of responding to host accesses may also be provided in host interface 202 and/or control unit 201. Before the firmware upgrade of the solid-state storage device is completed, if the host issues a TLP, when accessing the PCIe register (424), the solid-state storage device may provide a cache, and during the firmware upgrade, temporarily store the access request of the host, so that after the firmware upgrade is completed, the access request to be processed may be quickly obtained from the cache, and provide a response to the host. Alternatively, during a firmware upgrade, the host's access request is responded to with a specified or default value so that the host's access request can be handled by hardware and/or dedicated software/firmware. Still alternatively, the firmware of the solid state storage device is divided into multiple portions, with one or some of the firmware portions being used to process underlying (e.g., PCIe) access requests of the host. During a firmware upgrade, the firmware portion that handles the underlying access request is kept running (not upgraded) in response to the host's access request. And providing a dedicated firmware upgrade process to update the firmware portion that handles the underlying request. Because of the smaller size of the firmware portion that handles the underlying access request, upgrades can be completed in a shorter time, and thus can be completed before the host access request times out, so as not to affect or reduce the impact on the processing of the host access request.
Still alternatively, when firmware is loaded from the firmware slot into the DRAM 203 or the internal memory, the loaded firmware is also checked for integrity and/or correctness.
Still alternatively, the firmware is downloaded to the solid state storage device from an interface other than the host interface 202, such as a debug interface (not shown) of the control unit 201. The downloaded firmware is stored in the DRAM 203. And indicating a firmware slot 3 for storing firmware through the debug interface. And also sends a firmware confirm command conforming to NVMe specifications to the control part 201 through the debug interface, and instructs the solid state storage device to restart. Alternatively, the solid state storage device is instructed to perform the firmware upgrade by a proprietary command or other form of command.
Still alternatively, to improve reliability/compatibility, after the host sends a firmware confirm command to the solid-state storage device, access to the solid-state storage device is avoided for a short time (to avoid immediately querying the CSTS register of NVMe and also avoid sending PCIe access to the solid-state storage device), so as to avoid an exception of the host caused by the failure of the solid-state storage device to respond to the access request. For example, after the host issues a confirmation command to the solid state storage device, a delay of a period of time is inserted before querying the solid state storage device state. In an alternative embodiment, any time a host issues a status query to a solid state storage device, a delay is inserted for a period of time before being sent to the solid state storage device. Because the processing performance of the state query operation does not influence the user experience, and compared with IO commands, the occurrence frequency of the state query operation is not high, the delay added to any state query operation does not obviously influence the performance, but the complexity of the system is obviously reduced.
The embodiment of the invention provides a method for upgrading online firmware of a solid-state storage device. In addition to being applied to solid state storage devices, embodiments of the present invention may also be applied to other electronic devices that require loading firmware, such as cell phones, set top boxes, media players, and the like.
The methods and apparatus of embodiments of the present application may be implemented in hardware, software, firmware, or any combination of the preceding. The hardware may include digital circuits, analog circuits, digital Signal Processors (DSPs), application specific legacy circuits (ASICs), and the like. The software may include programs stored on a processor-readable storage medium that, when executed by a processor, implement the methods provided by embodiments of the present application.
While preferred embodiments of the present application have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. It is therefore intended that the following claims be interpreted as including the preferred embodiments and all such alterations and modifications as fall within the scope of the application. It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (12)

1. A method for upgrading firmware on-line for a solid state storage device, comprising the steps of:
downloading firmware in response to receiving a firmware download command;
delaying a period of time and initiating a reset process to the solid state storage device in response to receiving a firmware activation or firmware confirmation command;
loading the firmware indicated in the firmware activation or firmware confirmation command, and recovering the operation of the solid-state storage device;
wherein to provide a preliminary responsiveness to host access, the firmware is partitioned into a plurality of firmware portions, wherein one or some of the firmware portions are for processing an underlying access request of the host, and wherein the firmware portions for processing the underlying access request of the host remain operational during a firmware upgrade in response to the access request of the host.
2. The method of online upgrade firmware of a solid state storage device of claim 1, wherein the command or commands from the host are responded to during the period of time.
3. The method for online upgrading firmware of a solid state storage device of claim 1, wherein the period of time is a designated time or a time within which a command from a host to access a CSTS register is received and responded to the command to access the CSTS register.
4. The method of online upgrade of firmware of a solid state storage device of claim 1, wherein a condition that is satisfied earlier in a period of time that a control component of the solid state storage device delays and in response to a specified number of host commands is used as a basis for initiating a reset process to the solid state storage device.
5. A method of upgrading firmware on-line for a solid state storage device as claimed in any of claims 1-4, wherein metadata is backed up before initiating a reset procedure for the solid state storage device and restored after the firmware upgrade is completed.
6. A method of upgrading firmware on-line of a solid state storage device as claimed in any of claims 1-4, wherein the primary actuator of the solid state storage device provides a preliminary response capability to host access after stopping operation of the secondary actuator and before the state of the solid state storage device is ready.
7. The method of online upgrade firmware of a solid state storage device of claim 6, wherein to provide a preliminary response capability to host access, command caches from hosts are cached in the solid state storage device.
8. The method of online upgrade firmware of a solid state storage device of claim 6, wherein to provide a preliminary response capability to host access, a master executor of the control unit responds to commands of the host with specified values or default values.
9. A method of online upgrade of firmware of a solid state storage device as claimed in any one of claims 1-4, wherein access to the solid state storage device is prevented for a period of time after a reset command is issued to the solid state storage device.
10. The method of online upgrade of firmware of a solid state storage device of claim 9, wherein avoiding access to the solid state storage device for a period of time comprises delaying the period of time before querying the solid state storage device state.
11. The solid-state storage device is characterized by comprising a host interface, a control part, an NVM chip and a DRAM, wherein the control part is respectively coupled with the host interface, the NVM chip and the DRAM, and the host interface is used for exchanging commands and data with a host; control means for performing the method according to one of claims 1-10.
12. A method for upgrading firmware on-line for a solid state storage device, comprising the steps of:
downloading firmware in response to receiving a firmware download command;
responding to a command for accessing a CSTS register from a host after receiving a firmware confirmation command, responding to the command for accessing the CSTS register, and initiating a resetting process for the solid-state storage device;
Loading the firmware indicated in the firmware confirmation command, and recovering the operation of the solid-state storage device;
wherein to provide a preliminary responsiveness to host access, the firmware is partitioned into a plurality of firmware portions, wherein one or some of the firmware portions are for processing an underlying access request of the host, and wherein the firmware portions for processing the underlying access request of the host remain operational during a firmware upgrade in response to the access request of the host.
CN201611116320.9A 2016-12-07 2016-12-07 Method and system for upgrading firmware online Active CN108170368B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611116320.9A CN108170368B (en) 2016-12-07 2016-12-07 Method and system for upgrading firmware online

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611116320.9A CN108170368B (en) 2016-12-07 2016-12-07 Method and system for upgrading firmware online

Publications (2)

Publication Number Publication Date
CN108170368A CN108170368A (en) 2018-06-15
CN108170368B true CN108170368B (en) 2024-01-23

Family

ID=62526262

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611116320.9A Active CN108170368B (en) 2016-12-07 2016-12-07 Method and system for upgrading firmware online

Country Status (1)

Country Link
CN (1) CN108170368B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109062600B (en) * 2018-09-19 2021-12-03 郑州云海信息技术有限公司 Method and system for realizing online upgrade of firmware in solid state disk
CN112199238A (en) * 2020-10-16 2021-01-08 深圳佰维存储科技股份有限公司 Memory firmware updating method and device, storage medium and electronic equipment
WO2022104530A1 (en) * 2020-11-17 2022-05-27 中山市江波龙电子有限公司 Method for upgrading firmware of storage apparatus, control device, and storage apparatus
CN114464231B (en) * 2022-01-14 2024-02-13 苏州浪潮智能科技有限公司 Firmware storage method and system
CN115794173B (en) * 2023-01-09 2023-05-05 苏州浪潮智能科技有限公司 Online upgrading method and device for solid state disk, electronic equipment and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008058101A2 (en) * 2006-11-07 2008-05-15 Sandisk Corporation Memory controllers for performing resilient firmware upgrades to a functioning memory
CN101295262A (en) * 2007-03-28 2008-10-29 联想(新加坡)私人有限公司 System and method for securely updating firmware in devices by using a hypervisor
CN104407881A (en) * 2014-10-28 2015-03-11 成都阿艾夫通信有限公司 Active RFID (radio frequency identification) firmware remote upgrading method
CN104536848A (en) * 2014-12-22 2015-04-22 小米科技有限责任公司 Firmware recovery method, device and terminal

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9916087B2 (en) * 2014-10-27 2018-03-13 Sandisk Technologies Llc Method and system for throttling bandwidth based on temperature

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008058101A2 (en) * 2006-11-07 2008-05-15 Sandisk Corporation Memory controllers for performing resilient firmware upgrades to a functioning memory
CN101295262A (en) * 2007-03-28 2008-10-29 联想(新加坡)私人有限公司 System and method for securely updating firmware in devices by using a hypervisor
CN104407881A (en) * 2014-10-28 2015-03-11 成都阿艾夫通信有限公司 Active RFID (radio frequency identification) firmware remote upgrading method
CN104536848A (en) * 2014-12-22 2015-04-22 小米科技有限责任公司 Firmware recovery method, device and terminal

Also Published As

Publication number Publication date
CN108170368A (en) 2018-06-15

Similar Documents

Publication Publication Date Title
CN108170368B (en) Method and system for upgrading firmware online
CN108170446B (en) Firmware confirmation command processing method and system
US10909012B2 (en) System having persistent memory
US9256384B2 (en) Method and system for reducing write latency in a data storage system by using a command-push model
US20150089287A1 (en) Event-triggered storage of data to non-volatile memory
KR102198609B1 (en) Mobile divece and operating method thereof
US9600294B2 (en) Port throttling across an operating system restart during a hot upgrade
US20140173215A1 (en) Methods and systems for provisioning a bootable image on to an external drive
US20190324859A1 (en) Method and Apparatus for Restoring Data after Power Failure for An Open-Channel Solid State Drive
TWI684864B (en) Managing function level reset in an io virtualization-enabled storage device
US9389960B2 (en) Recovering from a defective boot image
US20140281459A1 (en) Live initialization of a boot device
US8782633B1 (en) Upgrading firmware of a power supply
EP3435239A1 (en) Methods and apparatus to manage intermittently connectable storage media
KR20160025292A (en) Data storage device, data processing system including the same and operating method thereof
JP6652647B2 (en) Storage system
CN110647359B (en) Semiconductor device, method of operating the same, and stacked memory device having the same
JP2003345528A (en) Storage system
JP6599725B2 (en) Information processing apparatus, log management method, and computer program
EP3496356A1 (en) Atomic cross-media writes on storage devices
KR20180044095A (en) Electronic systems and methods of operating thereof
US10831684B1 (en) Kernal driver extension system and method
US20140359263A1 (en) Boot from logical volume spanning plurality of pci devices
US11385815B2 (en) Storage system
US11487439B1 (en) Utilizing host memory buffers for storage device recoveries

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
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 100192 room A302, building B-2, Dongsheng Science Park, Zhongguancun, 66 xixiaokou Road, Haidian District, Beijing

Applicant after: Beijing yihengchuangyuan Technology Co.,Ltd.

Address before: 100192 Room 302, 3 / F, building B-2, Dongsheng Science Park, 66 xixiaokou Road, Haidian District, Beijing

Applicant before: BEIJING MEMBLAZE TECHNOLOGY Co.,Ltd.

GR01 Patent grant
GR01 Patent grant