WO2022104530A1 - Method for upgrading firmware of storage apparatus, control device, and storage apparatus - Google Patents

Method for upgrading firmware of storage apparatus, control device, and storage apparatus Download PDF

Info

Publication number
WO2022104530A1
WO2022104530A1 PCT/CN2020/129411 CN2020129411W WO2022104530A1 WO 2022104530 A1 WO2022104530 A1 WO 2022104530A1 CN 2020129411 W CN2020129411 W CN 2020129411W WO 2022104530 A1 WO2022104530 A1 WO 2022104530A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage device
firmware
reset
control device
field
Prior art date
Application number
PCT/CN2020/129411
Other languages
French (fr)
Chinese (zh)
Inventor
谭荣
Original Assignee
中山市江波龙电子有限公司
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 中山市江波龙电子有限公司 filed Critical 中山市江波龙电子有限公司
Priority to PCT/CN2020/129411 priority Critical patent/WO2022104530A1/en
Publication of WO2022104530A1 publication Critical patent/WO2022104530A1/en

Links

Images

Classifications

    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/65Updates
    • G06F8/654Updates using techniques specially adapted for alterable solid state memories, e.g. for EEPROM or flash memories

Definitions

  • the present application relates to the field of mobile storage hard disks, and in particular, to a firmware upgrade method for a storage device, a control device, and a storage device.
  • SSD Solid State Drives
  • the firmware upgrade of the solid-state drive needs to stop the current business, download the firmware to the designated location of the solid-state drive through the upgrade tool on the host side, and further need to restart the host or hot-swap to make the solid-state hard drive. Power off and then power on again to load the newly upgraded firmware, and the power off of the solid-state drive will lead to the interruption of the current business, which is not allowed in many special occasions such as servers, and it is also very troublesome to operate, which will bring serious problems to business processing. inconvenience.
  • the present application provides a firmware upgrade method for a storage device, a control device and a storage device, which can complete the firmware upgrade of the storage device online without powering on and off again.
  • a technical solution adopted in the present application is to provide a firmware upgrade method for a storage device, the method comprising: sending a firmware activation instruction to the storage device, so that the storage device is prepared before activation, and after the preparation is completed Feedback response information to the control device, the response information is used to indicate that the storage device will activate the new firmware in the next reset; after receiving the response information, send a reset command to the storage device to reset the storage device; Upon completion, establish a communication connection with the storage device.
  • the method before sending the firmware activation instruction to the storage device, the method further includes: sending new firmware to the storage device, so that the storage device stores the new firmware.
  • sending a reset command to the storage device to reset the storage device includes: after receiving the response information, clearing the enable field of the controller configuration register of the storage device to 0, so that the storage device Reset and clear the preparation field of the controller status register of the storage device to 0; wherein, the response information is fed back in the status field of the completion command queue; set the enable field of the controller configuration register of the storage device to 1, so that the storage device Load new firmware.
  • the method further includes: suspending communication with the storage device.
  • establishing a communication connection with the storage device includes: when detecting that the preparation field of the controller status register of the storage device is set to 1, establishing a communication connection with the storage device; wherein, the storage device is in The readiness field of the storage device's controller status register is set to 1 after the new firmware initialization operation is complete.
  • establishing a communication connection with the storage device includes: sending a management command to recreate a read-write communication queue, and establishing a communication connection with the storage device.
  • the number of initialization operations is less than two times.
  • control device includes a control unit and a storage unit, the storage unit is used for storing a computer program, and when the computer program is executed by the control unit, The firmware upgrade method for realizing the above-mentioned storage device.
  • another technical solution adopted in the present application is to provide a firmware upgrade method of a storage device, the method comprising: receiving a firmware activation instruction to prepare before activation, and feeding back to the control device after the preparation is completed Response information, the response information is used to indicate that the storage device will activate the new firmware in the next reset; receive a reset command to reset the storage device; after the firmware upgrade of the storage device is completed, establish a communication connection with the control device.
  • the method before receiving the firmware activation instruction, the method further includes: receiving and storing new firmware.
  • receiving the reset command to reset the storage device includes: receiving the reset command, clearing the enable field of the controller configuration register to 0 to reset the storage device, and clearing the ready field of the controller status register to 0; configuring the controller The enable field of the register is set to 1 to load new firmware.
  • establishing a communication connection with the control device includes: setting the preparation field of the controller status register to 1, and establishing a communication connection with the control device; wherein, the storage device is initialized after the new firmware is completed. Then set the ready field of the controller status register to 1.
  • the time difference between clearing the ready field of the controller status register to 0 and setting the ready field of the controller status register to 1 is smaller than the timeout time reported by the controller function register.
  • the response information is fed back in the status field of the completion queue command.
  • control device includes a control unit and a storage unit
  • storage unit is used for storing a computer program, and when the computer program is executed by the control unit, it uses The firmware upgrade method for realizing the above-mentioned storage device.
  • the beneficial effects of the embodiments of the present application are: different from the prior art, a method for upgrading firmware of a storage device provided by the present application, by sending a firmware activation instruction to the storage device, so that the storage device is prepared before activation, and is prepared before the storage device is activated. After completion, a response message is fed back to the control device. The response message is used to indicate that the storage device will activate the new firmware at the next reset. After receiving the response message, the control device sends a reset instruction to the storage device to make the storage device The device is reset, and finally, after the upgrade of the storage device is completed, a communication connection with the storage device is established. In this way, the response message fed back by the storage device can be used, so that after the control device sends a reset command to the storage device, the firmware upgrade of the storage device can be completed online without powering on and off again, which improves work efficiency.
  • FIG. 1 is a schematic flowchart of an embodiment of a firmware upgrade method for a storage device provided by the present application
  • FIG. 2 is a schematic flowchart of another embodiment of a firmware upgrade method for a storage device provided by the present application
  • FIG. 3 is a schematic flowchart of another embodiment of a firmware upgrade method for a storage device provided by the present application.
  • FIG. 4 is a schematic flowchart of still another embodiment of a firmware upgrade method for a storage device provided by the present application.
  • FIG. 5 is a schematic structural diagram of an embodiment of a control device provided by the present application.
  • FIG. 6 is a schematic structural diagram of an embodiment of a storage device provided by the present application.
  • FIG. 7 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided by the present application.
  • Solid-state drive is a computer external storage device made of solid-state electronic storage chip array. Compared with conventional hard drives, solid-state drives are characterized by fast read and write speed, low operating noise, wide operating temperature range, good shock resistance and light weight. As well as low power consumption, it is widely used in portable and embedded computers, especially in industrial control computers, and has a tendency to gradually replace conventional hard disks.
  • the inventors of the present application have found through long-term research that although solid-state drives have many features, there are still some deficiencies in upgrading and use. Based on this, the inventor of the present application proposes the following multiple embodiments:
  • FIG. 1 is a schematic flowchart of an embodiment of a firmware upgrade method for a storage device provided by the present application.
  • the method of this embodiment is applied to a control device, and the method specifically includes:
  • Step 11 Send a firmware activation instruction to the storage device to prepare the storage device before activation, and feed back response information to the control device after the preparation is completed.
  • the response information is used to indicate that the storage device will activate the new firmware in the next reset.
  • control device and the storage device can be coupled in various ways, including but not limited to, for example, SATA (Serial Advanced Technology Attachment, Serial Advanced Technology Attachment), SCSI (Small Computer System Interface, Small Computer System Interface) ), SAS (Serial Attached SCSI, Serial Attached SCSI), IDE (Integrated Drive Electronics, integrated drive electronics), USB (Universal Serial Bus, Universal Serial Bus), PCIE (Peripheral Component Interconnect Express, PCIe, high-speed peripheral component interconnection), NVMe (NVM Express, high-speed non-volatile storage), Ethernet, Fibre Channel, wireless communication networks, etc.
  • the communication between the control device and the storage device is mainly based on the NVME protocol, so as to implement a method for subsequent firmware upgrade of the storage device.
  • the control device may be an information processing device capable of communicating with the storage device in the above manner, such as a personal computer, a tablet computer, a server, a portable computer, a network switch, a router, a cellular phone, a personal digital assistant, and the like.
  • the storage device is composed of a storage unit and a control unit, and the control unit is composed of multiple CPUs (Central Processing Unit, central processing unit) and auxiliary hardware units.
  • CPUs Central Processing Unit, central processing unit
  • auxiliary hardware units are not specifically limited here, and those skilled in the art should make corresponding settings according to actual conditions.
  • the firmware activation instruction is to send a standard management command (admin command) Firmware Active by the control device, thereby triggering the storage device to activate the new firmware, that is, to send the firmware activation instruction.
  • the storage device will respond to the firmware activation command, and close some idle processing (such as wear balance, garbage collection, etc.) to prepare for activating the firmware. After the preparation is completed, a response message can be fed back to the control device.
  • the response message is the state field of the CQ (CompletionQueue, completion command queue) that the storage device responds to Firmware Active. Feedback to the control device through a standard protocol is used to indicate the storage device. The unit will activate the new firmware on the next reset.
  • Step 12 After receiving the response information, send a reset instruction to the storage device to reset the storage device.
  • the action of firmware upgrade by the storage device usually needs to be executed after power-on, power-off, restart and reset.
  • the new firmware will be loaded after the next reset.
  • the control device will suspend all commands and only send a reset command to the storage device, so that the storage device can be reset directly in the online state without the need to perform the reset action of power on and off again, which can realize the storage device.
  • the upgrade operation of the device under the condition of uninterrupted power supply ensures the continuity of transaction processing.
  • Step 13 After the storage device is upgraded, the control device establishes a communication connection with the storage device.
  • control device can re-initialize the communication to restart the establishment of a communication connection with the storage device for normal interaction.
  • the present application provides a firmware upgrade method for a storage device, by sending a firmware activation instruction to the storage device, so that the storage device is prepared before activation, and after the preparation is completed, a response message is fed back to the control device, The response message is used to indicate that the storage device will activate the new firmware at the next reset, and after receiving the response message, the control device sends a reset instruction to the storage device to reset the storage device, and finally the storage device upgrade is completed. After that, establish a communication connection with the storage device. In this way, the response message fed back by the storage device can be used, so that after the control device sends a reset command to the storage device, the firmware upgrade of the storage device can be completed online without powering on and off again, which improves work efficiency.
  • Fig. 2 is a schematic flowchart of another embodiment of a firmware upgrade method for a storage device provided by the present application.
  • the present embodiment is applied to a control device, and the method specifically includes:
  • Step 21 Send the new firmware to the storage device, so that the storage device stores the new firmware.
  • the new firmware is sent by the control device using the upgrade tool through the standard management command (admin command) Firmware Image Download, and the upgrade tool is used to download the new firmware to the storage device in sequence, and the storage device then writes the new firmware into the power-down protection. stored in the chip.
  • the Firmware Image Download sub-packet size cannot exceed the maximum reported value, and requires 4-byte alignment, otherwise the download data packet will be abnormal.
  • firmware slot 1 firmware slot 2
  • firmware slot 3 firmware slot 4
  • the storage device receives the new firmware, it can store the new firmware in the specified firmware slot according to the instruction of the control device.
  • the corresponding firmware slot can be loaded according to the instruction. new firmware inside.
  • the same new firmware can be saved and written into multiple firmware slots at the same time, so that when a failure occurs in one or more firmware slots, it can still be obtained from other firmware slots. Running valid new firmware.
  • the storage device can also judge the integrity of the new firmware, and can utilize a CRC check (Cyclic Redundancy Check, cyclic redundancy check code), a parity check method and a cumulative sum.
  • CRC check Cyclic Redundancy Check, cyclic redundancy check code
  • the verification method, etc. executes the algorithm calculation on the new firmware to obtain a result, and then compares the result with the result obtained by the calculation when the control device is downloaded. If the results are consistent, it indicates that the new firmware is complete, and the storable device can store it.
  • step 21 it is also possible to compare the firmware version of the current firmware of the storage device with the new firmware stored in the upgrade server corresponding to the control device, so as to determine whether the storage device needs to be upgraded. If the two are different, it means that the storage device needs to perform firmware upgrade, and then sends new firmware to the storage device; if the two are the same, it means that the storage device does not need to perform firmware upgrade.
  • Step 22 Send a firmware activation instruction to the storage device, so that the storage device prepares before activation, and feeds back response information to the control device after the preparation is completed, and the response information is used to indicate that the storage device will activate the new firmware at the next reset.
  • the firmware activation instruction is used by the control device to instruct the firmware slot to be used when the storage device is reset next time, that is, which new firmware is specifically activated for firmware upgrade.
  • firmware slot 1 and firmware slot 2 store different new firmware, and through the instruction of the firmware activation command, the storage device can select the new firmware corresponding to the firmware slot to be used for subsequent firmware upgrade.
  • the storage device after receiving the firmware activation instruction sent by the control device, the storage device will prepare for new firmware activation, by closing some of its own idle processing (such as balancing wear, garbage collection, etc.), so that the storage device can The device is in an idle state, after which, the storage device provides feedback through a standard protocol in the status field of the completion command queue responding to Firmware Active, indicating that the storage device will activate the new firmware at the next reset.
  • some of its own idle processing such as balancing wear, garbage collection, etc.
  • Step 23 After receiving the response information, clear the enable field of the controller configuration register of the storage device to 0 to reset the storage device and clear the ready field of the controller status register of the storage device to 0.
  • the control device When the control device receives the response information fed back by the storage device through the status field of the completion command queue, it immediately issues an instruction to clear the enable field of the controller configuration (CC) register of the storage device to 0, that is, CC.
  • EN Controller Configuration Enable
  • the control device suspends all command communications with the storage device, and only issues an instruction to reset the storage device, so that the storage device can directly perform firmware operations in the online state.
  • the upgrade operation does not need to perform the reset action of power-on and power-off again, which can realize the upgrade operation of the storage device under the condition of power-off, and ensure the continuity of transaction processing.
  • the storage device needs to clear the CSTS.RDY register to 0 immediately, because the control device will soon enable the CC.EN register, and query The status of the CSTS.RDY register, if the CSTS.RDY register is not cleared to 0 in time, the storage device will not be fully prepared, but the control device has already started a new queue creation, which will eventually cause the upgrade to fail.
  • Step 24 Set the enable field of the controller configuration register of the storage device to 1, so that the storage device is loaded with new firmware.
  • the storage device will generate an interrupt. It is assumed that the interrupt occurs in the blind area of the new firmware loading (the blind area of the code reboot), that is, the interrupt is not turned on. At this time, an exception will occur in the storage device. Based on this, in this embodiment, the action of loading the storage device with new firmware, that is, the action of the reboot code, requires the control device to set the controller configuration register of the storage device. It can only be performed after the energy field is set to 1, otherwise the upgrade process will be affected.
  • the storage device can prepare to communicate with the control device, and immediately perform a firmware jump, that is, load the new firmware, and Perform initialization operations associated with new firmware and communication, including initialization operations such as PCIE and NVME, such as determining the communication properties of the PCIE layer through messages, and the mapping relationship of registers between storage devices and control devices, etc., and initializing NVME-related registers ASQ (Admin submission Queue Base Address, management command queue base address), ACQ (Admin Completion Queue Base Address, completion management command queue base address), AQA (Admin Queue Attributes, management command queue attributes) and so on.
  • initialization operations such as PCIE and NVME, such as determining the communication properties of the PCIE layer through messages, and the mapping relationship of registers between storage devices and control devices, etc.
  • initializing NVME-related registers ASQ (Admin submission Queue Base Address, management command queue base address), ACQ (Admin Completion Queue Base Address, completion management command queue base address), AQA (Admin Queue Attribu
  • the storage device can set the ready field of the controller status register to 1 to inform the control device that the new firmware has been fully loaded and is ready for communication.
  • the number of the above initialization operations is less than twice, that is, it cannot be performed again. Specifically, the number of times of initialization of the physical layer of PCIE cannot exceed two times. Otherwise, PCIE will appear link down and link disconnection will occur, so the new firmware will be loaded.
  • the storage device in the initialization operation stage, the storage device must distinguish whether it is rebooted or powered on normally, otherwise communication will fail.
  • some specific registers can be used to distinguish reboots. If there are no such registers, the characteristic memory can be used for status identification to distinguish whether it is a normal power-on or a reboot.
  • Step 25 When it is detected that the ready field of the controller status register of the storage device is set to 1, establish a communication connection with the storage device.
  • the control device identifies whether the firmware upgrade action is completed by querying whether the state of the controller state register is ready, or whether the storage device is working. When the control device detects that the ready field of the controller state register of the storage device is set to 1, it means that the storage device is stored After the new firmware of the device is activated and the firmware upgrade is completed, the control device can send a management command to recreate the read-write communication queue, thereby establishing a communication connection with the storage device.
  • control device reconfigures the NVME registers, such as resetting the admin queue, so that the admin command can re-synchronize the addressing communication, and then through the create I/Q CQ(Create I/O Completion Queue command, the creation of data read and write is completed.
  • command queue) and create I/O SQ Create I/O submission Queue command, create a data read and write command queue are used to create an IO command queue to provide a synchronous fetch base address for subsequent IO read and write commands.
  • control device resets the admin queue and recreates the IO queue, it can re-communicate with the storage device.
  • the time difference between the time when the storage device clears the preparation field of the controller status register to 0 and the time when the preparation field of the controller status register is set to 1 is less than the timeout reported by the CAP (Controller Capabilities, controller function) register. Time, that is, can not exceed CAP.TO (Controller Capabilities Timeout), when the control device queries the controller status register for too long, it will give up the query, and it will be considered that the storage device is abnormally dropped.
  • CAP Controller Capabilities, controller function
  • the present embodiment provides a firmware upgrade method for a storage device.
  • the control device downloads new firmware to the storage device through a tool and sends a firmware activation command
  • the storage device responds to the corresponding state field of the firmware activation command to update the firmware. Inform the control device that the new firmware will be loaded after the next reset, so the driver of the control device will suspend all commands to reset the storage device, and then re-handshake with the storage device to create a new communication queue, which can solve the problem.
  • there was a problem in the firmware upgrade of the storage device that needed to be powered off again or forced to jump.
  • FIG. 3 is a schematic flowchart of another embodiment of a firmware upgrade method for a storage device provided by the present application.
  • the method of this embodiment is applied to a storage device, and the method specifically includes:
  • Step 31 Receive a firmware activation instruction to prepare before activation, and feed back response information to the control device after the preparation is completed.
  • the response information is used to indicate that the storage device will activate the new firmware in the next reset.
  • the storage device After receiving the firmware activation command, the storage device responds to the command and prepares for activating the firmware by closing some idle processing. After the idle processing preparation is completed, it can send the control device to the control device through a standard protocol in the status field of the CQ responding to Firmware Active. One end feeds back the response information, which is used to indicate that the storage device will activate the new firmware in the next reset.
  • Step 32 Receive a reset instruction to reset the storage device.
  • the control device After the control device receives the response information, since the control device already knows the next action of the storage device, the control device will suspend all command communications at this time, and only send a reset command to the storage device. Therefore, under the reset instruction of the control device, the storage device can perform firmware upgrade under the condition of uninterrupted power supply, which ensures the continuity of transaction processing.
  • Step 33 After the firmware upgrade of the storage device is completed, establish a communication connection with the control device.
  • control device can re-initialize the communication to restart the establishment of a communication connection with the storage device for normal interaction.
  • FIG. 4 is a schematic flowchart of another embodiment of a firmware upgrade method for a storage device provided by the present application.
  • the method of this embodiment is applied to a storage device, and the method specifically includes:
  • Step 41 Receive and store the new firmware.
  • the new firmware is sent by the control device using the upgrade tool through the standard management command (admin command) Firmware Image Download, and the upgrade tool is used to download the new firmware to the storage device in sequence, and the storage device then writes the new firmware into the power-down protection. stored in the chip.
  • the Firmware Image Download sub-packet size cannot exceed the maximum reported value, and requires 4-byte alignment, otherwise the download data packet will be abnormal.
  • Step 42 Receive a firmware activation instruction to prepare before activation, and feed back response information to the control device after the preparation is completed.
  • the response information is used to indicate that the storage device will activate the new firmware in the next reset.
  • the storage device after receiving the firmware activation instruction sent by the control device, the storage device will prepare for new firmware activation, by closing some of its own idle processing (such as balancing wear, garbage collection, etc.), so as to make itself In the idle state, after that, the storage device sends feedback through a standard protocol in the status field of the completion command queue in response to Firmware Active, which is used to indicate that the storage device will activate the new firmware in the next reset.
  • some of its own idle processing such as balancing wear, garbage collection, etc.
  • Step 43 Receive the reset instruction, clear the enable field of the controller configuration register to 0 to reset the storage device, and clear the ready field of the controller status register to 0.
  • the storage device can clear the enable field of the controller configuration register to 0 to trigger a reset. At this time, the control device will suspend all command communication with the storage device; the storage device further Clears the ready field of the controller status register to indicate whether the state of the memory is ready.
  • the storage device since the control device suspends all command communication with the storage device after receiving the response message, the storage device can only receive the reset instruction at this time, and the storage device can directly connect to the online under the instruction of the reset instruction.
  • the state is reset without the need to perform the reset action of power-on and power-off again, which can realize the upgrade operation of the storage device under the condition of power-off, and ensure the continuity of transaction processing.
  • the storage device needs to clear the CSTS.RDY register to 0 immediately, because the control device will soon enable the CC.EN register, and query The status of the CSTS.RDY register, if the CSTS.RDY register is not cleared to 0 in time, the storage device will not be fully prepared, but the control device has already started a new queue creation, which will eventually cause the upgrade to fail.
  • Step 44 Set the enable field of the controller configuration register to 1 to load the new firmware.
  • the storage device will generate an interrupt. It is assumed that the interrupt occurs in the blind area of the new firmware loading (the blind area of the code reboot), that is, the interrupt is not turned on. At this time, an exception will occur in the storage device. Based on this, in this embodiment, the action of loading the new firmware in the storage device, that is, the action of the reboot code, can only be performed after the enable field of the controller configuration register is set to 1. , otherwise it will affect the upgrade process.
  • the number of times of the above initialization operations is less than twice, that is, the number of times of initialization of the physical layer of PCIE cannot be more than twice, otherwise the PCIE will appear link down, that is, the link will be disconnected, so
  • the storage device must distinguish whether it is rebooted or powered on normally, otherwise, communication will fail.
  • some specific registers can be used to distinguish reboots. If there are no such registers, the characteristic memory can be used for status identification to distinguish whether it is a normal power-on or a reboot.
  • Step 45 Set the ready field of the controller status register to 1, and establish a communication connection with the control device.
  • the query of the controller status register by the control device is usually intermittent, as long as the preparation field of the controller status register of the storage device is changed. If the value is 1, the upgrade of the storage device is confirmed. Further, a communication connection is established with the control device end through the re-created read-write communication queue through the management command sent by the control device end.
  • the time difference between the time when the storage device clears the preparation field of the controller status register to 0 and the time when the preparation field of the controller status register is set to 1 is less than the timeout reported by the CAP (Controller Capabilities, controller function) register. Time, that is, can not exceed CAP.TO (Controller Capabilities Timeout), when the control device queries the controller status register for too long, it will give up the query, and it will be considered that the storage device is abnormally dropped.
  • CAP Controller Capabilities, controller function
  • this embodiment provides a firmware upgrade method for a storage device.
  • the storage device receives the new firmware and the firmware activation command sent by the control device, it informs the control device of the new firmware by responding to the corresponding state field of the firmware activation command. It will be loaded after the next reset, and then the storage device and the control device will shake hands again to create a new communication queue, which can solve the problem of power-on and power-off or forced jump in the previous firmware upgrade of the storage device. .
  • FIG. 5 is a schematic structural diagram of an embodiment of a control device provided by the present application.
  • the control device 50 in this embodiment includes a control unit 51 and a storage unit 52, and the control unit 51 is coupled to the storage unit 52, wherein the storage unit 52 is used to store the computer program executed by the control unit 51, and the control unit 51 is used to execute the computer program to realize the following method steps:
  • control device 50 in this embodiment is an entity terminal based on any of the above method embodiments, and its implementation principles and steps are similar, which will not be repeated here. Therefore, when the computer program is executed by the control unit 51, other method steps in any of the foregoing embodiments can also be implemented, which will not be repeated here.
  • FIG. 6 is a schematic structural diagram of an embodiment of a storage device provided by the present application.
  • the storage device 60 in this embodiment includes a control unit 61 and a storage unit 62, and the control unit 61 is coupled to the storage unit 62, wherein the storage unit 62 is used to store the computer program executed by the control unit 61, and the control unit 61 is used to execute the computer program to realize the following method steps:
  • the storage device 60 in this embodiment is a physical terminal based on any of the above method embodiments, and its implementation principles and steps are similar, which will not be repeated here. Therefore, when the computer program is executed by the control unit 61, other method steps in any of the above-mentioned embodiments can also be implemented, which will not be repeated here.
  • FIG. 7 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided by the present application.
  • the computer-readable storage medium 70 of this embodiment is used to store a computer program 71.
  • the computer program 71 is executed by the control unit, To implement the following method steps:
  • the embodiments of the present application When the embodiments of the present application are implemented in the form of software functional units and are sold or used as independent products, they may be stored in a computer-readable storage medium.
  • the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .

Abstract

Disclosed in the present application are a method for upgrading a firmware of a storage apparatus, a control device, and a storage apparatus. Said method comprising: sending a firmware activation instruction to a storage apparatus, so that the storage apparatus makes preparations before activation, and feeding response information back to the control device after the preparation is completed, wherein the response information is used for indicating that the storage apparatus is about to activate new firmware at next reset; upon receipt of the response information, sending a reset instruction to the storage apparatus, so that the storage apparatus is reset; and after the firmware of the storage apparatus is upgraded, establishing a communication connection with the storage apparatus. In this way, firmware upgrade of a storage apparatus can be completed online, without the need of performing power-on or power-off again.

Description

一种存储装置的固件升级方法、控制设备及存储装置A firmware upgrade method for a storage device, a control device, and a storage device 【技术领域】【Technical field】
本申请涉及移动存储硬盘领域,特别涉及一种存储装置的固件升级方法、控制设备及存储装置。The present application relates to the field of mobile storage hard disks, and in particular, to a firmware upgrade method for a storage device, a control device, and a storage device.
【背景技术】【Background technique】
随着计算机技术的发展,市场上出现了固态硬盘(Solid State Drives,SSD),固态硬盘在出厂时,其内部芯片默认搭载着厂商开发的固件程序,以满足客户端相关驱动程序对固态硬盘的读写访问。但是,在实际使用过程中,有时需要对固态硬盘的固件程序进行升级操作,将固态硬盘的固件程序升级到新版本,以修复旧版本固件中存在的相关bug、优化固件性能或满足新的功能新需求等,能够为固态硬盘带来性能上的提升或是添加新的功能,因此固件升级是很有必要的。With the development of computer technology, Solid State Drives (SSD) have appeared in the market. When the solid state drive leaves the factory, its internal chip is equipped with the firmware program developed by the manufacturer by default, so as to meet the requirements of the relevant client drivers for the solid state drive. Read and write access. However, in the actual use process, it is sometimes necessary to upgrade the firmware program of the solid-state hard disk, and upgrade the firmware program of the solid-state hard disk to a new version, so as to fix the relevant bugs in the old version of the firmware, optimize the firmware performance or meet the new functions. New requirements, etc., can bring performance improvements or add new functions to solid-state drives, so firmware upgrades are necessary.
在传统的升级方法中,固态硬盘的固件升级需要停止当前业务,在主机一端通过升级工具将固件下载到固态硬盘的指定位置,进一步需要通过重启主机的方式或者是热插拔等方式使得固态硬盘断电并重新上电,以加载新升级的固件,而固态硬盘的断电会导致当前业务的中断,这在很多服务器等特殊场合是不允许的,同时操作起来也很麻烦,给业务处理带来不便。In the traditional upgrade method, the firmware upgrade of the solid-state drive needs to stop the current business, download the firmware to the designated location of the solid-state drive through the upgrade tool on the host side, and further need to restart the host or hot-swap to make the solid-state hard drive. Power off and then power on again to load the newly upgraded firmware, and the power off of the solid-state drive will lead to the interruption of the current business, which is not allowed in many special occasions such as servers, and it is also very troublesome to operate, which will bring serious problems to business processing. inconvenience.
【发明内容】[Content of the invention]
为了解决上述问题,本申请提供一种存储装置的固件升级方法、控制设备及存储装置,能够在线完成存储装置的固件升级,而无需重新上断电。In order to solve the above problems, the present application provides a firmware upgrade method for a storage device, a control device and a storage device, which can complete the firmware upgrade of the storage device online without powering on and off again.
为解决上述技术问题,本申请采用的一个技术方案是提供一种存储装置的固件升级方法,该方法包括:向存储装置发送固件激活指令,以使存储装置进行激活前准备,并在准备完成后向控制设备反馈应答信息,应答信息用于表示存储装置将在下一次复位时对新固件进行激活;在接收到应答信息后,向存储装置发送复位指令,以使存储装置复位;在存 储装置固件升级完成后,建立与存储装置的通信连接。In order to solve the above-mentioned technical problems, a technical solution adopted in the present application is to provide a firmware upgrade method for a storage device, the method comprising: sending a firmware activation instruction to the storage device, so that the storage device is prepared before activation, and after the preparation is completed Feedback response information to the control device, the response information is used to indicate that the storage device will activate the new firmware in the next reset; after receiving the response information, send a reset command to the storage device to reset the storage device; Upon completion, establish a communication connection with the storage device.
其中,向存储装置发送固件激活指令之前,还包括:向存储装置发送新固件,以使存储装置存储新固件。Wherein, before sending the firmware activation instruction to the storage device, the method further includes: sending new firmware to the storage device, so that the storage device stores the new firmware.
其中,在接收到应答信息后,向存储装置发送复位指令,以使存储装置复位,包括:在接收到应答信息后,将存储装置的控制器配置寄存器的使能字段清0,以使存储装置复位并将存储装置的控制器状态寄存器的准备字段清0;其中,应答信息在完成命令队列的状态域中进行反馈;将存储装置的控制器配置寄存器的使能字段置1,以使存储装置加载新固件。Wherein, after receiving the response information, sending a reset command to the storage device to reset the storage device includes: after receiving the response information, clearing the enable field of the controller configuration register of the storage device to 0, so that the storage device Reset and clear the preparation field of the controller status register of the storage device to 0; wherein, the response information is fed back in the status field of the completion command queue; set the enable field of the controller configuration register of the storage device to 1, so that the storage device Load new firmware.
其中,将存储装置的控制器配置寄存器的使能字段清0,以使存储装置复位并将存储装置的控制器状态寄存器的准备字段清0之后,还包括:暂停与存储装置的通信。After clearing the enable field of the controller configuration register of the storage device to 0 to reset the storage device and clearing the ready field of the controller status register of the storage device to 0, the method further includes: suspending communication with the storage device.
其中,在存储装置固件升级完成后,建立与存储装置的通信连接,包括:在检测到存储装置的控制器状态寄存器的准备字段置1时,建立与存储装置的通信连接;其中,存储装置在新固件初始化操作完成后将存储装置的控制器状态寄存器的准备字段置1。Wherein, after the firmware upgrade of the storage device is completed, establishing a communication connection with the storage device includes: when detecting that the preparation field of the controller status register of the storage device is set to 1, establishing a communication connection with the storage device; wherein, the storage device is in The readiness field of the storage device's controller status register is set to 1 after the new firmware initialization operation is complete.
其中,建立与存储装置的通信连接,包括:发送管理命令以重新创建读写通信队列,建立与存储装置的通信连接。Wherein, establishing a communication connection with the storage device includes: sending a management command to recreate a read-write communication queue, and establishing a communication connection with the storage device.
其中,初始化操作的次数小于两次。Among them, the number of initialization operations is less than two times.
为解决上述技术问题,本申请采用的另一个技术方案是:提供一种控制设备,该控制设备包括控制单元以及存储单元,存储单元用于存储计算机程序,计算机程序在被控制单元执行时,用于实现上述的存储装置的固件升级方法。In order to solve the above-mentioned technical problems, another technical solution adopted in the present application is to provide a control device, the control device includes a control unit and a storage unit, the storage unit is used for storing a computer program, and when the computer program is executed by the control unit, The firmware upgrade method for realizing the above-mentioned storage device.
为解决上述技术问题,本申请采用的又一个技术方案是:提供一种存储装置的固件升级方法,该方法包括:接收固件激活指令,以进行激活前准备,并在准备完成后向控制设备反馈应答信息,应答信息用于表示存储装置将在下一次复位时对新固件进行激活;接收复位指令以进行存储装置复位;在存储装置固件升级完成后,建立与控制设备的通信连接。In order to solve the above-mentioned technical problem, another technical solution adopted in the present application is to provide a firmware upgrade method of a storage device, the method comprising: receiving a firmware activation instruction to prepare before activation, and feeding back to the control device after the preparation is completed Response information, the response information is used to indicate that the storage device will activate the new firmware in the next reset; receive a reset command to reset the storage device; after the firmware upgrade of the storage device is completed, establish a communication connection with the control device.
其中,接收固件激活指令之前,还包括:接收并存储新固件。Wherein, before receiving the firmware activation instruction, the method further includes: receiving and storing new firmware.
其中,接收复位指令以进行存储装置复位,包括:接收复位指令,将控制器配置寄存器的使能字段清0以进行存储装置复位,并将控制器状态寄存器的准备字段清0;将控制器配置寄存器的使能字段置1,以加载新固件。Wherein, receiving the reset command to reset the storage device includes: receiving the reset command, clearing the enable field of the controller configuration register to 0 to reset the storage device, and clearing the ready field of the controller status register to 0; configuring the controller The enable field of the register is set to 1 to load new firmware.
其中,在存储装置固件升级完成后,建立与控制设备的通信连接,包括:将控制器状态寄存器的准备字段置1,并建立与控制设备的通信连接;其中,存储装置在新固件初始化操作完成后将控制器状态寄存器的准备字段置1。Wherein, after the firmware upgrade of the storage device is completed, establishing a communication connection with the control device includes: setting the preparation field of the controller status register to 1, and establishing a communication connection with the control device; wherein, the storage device is initialized after the new firmware is completed. Then set the ready field of the controller status register to 1.
其中,将控制器状态寄存器的准备字段清0与将控制器状态寄存器的准备字段置1之间的时间差,小于控制器功能寄存器上报的超时时间。The time difference between clearing the ready field of the controller status register to 0 and setting the ready field of the controller status register to 1 is smaller than the timeout time reported by the controller function register.
其中,应答信息在完成队列命令的状态域中进行反馈。The response information is fed back in the status field of the completion queue command.
为解决上述技术问题,本申请采用的再一个技术方案是:提供一种存储装置,该控制设备包括控制单元以及存储单元,存储单元用于存储计算机程序,计算机程序在被控制单元执行时,用于实现上述的存储装置的固件升级方法。In order to solve the above-mentioned technical problems, another technical solution adopted in the present application is to provide a storage device, the control device includes a control unit and a storage unit, and the storage unit is used for storing a computer program, and when the computer program is executed by the control unit, it uses The firmware upgrade method for realizing the above-mentioned storage device.
本申请实施例的有益效果是:区别于现有技术,本申请提供的一种存储装置的固件升级方法,通过向存储装置发送固件激活指令,以使存储装置进行激活前的准备,并在准备完成后向控制设备反馈应答消息,该应答消息则用于表示存储装置将在下一次复位时对新固件进行激活,而控制设备在接收到应答消息后,则向存储装置发送复位指令,以使存储装置复位,最后在存储装置升级完成后,建立与存储装置的通信连接。通过这样的方式,能够利用存储装置反馈的应答消息,使得控制设备在向存储装置发送复位指令后,能够在线完成存储装置的固件升级,而无需重新上断电,提高了工作效率。The beneficial effects of the embodiments of the present application are: different from the prior art, a method for upgrading firmware of a storage device provided by the present application, by sending a firmware activation instruction to the storage device, so that the storage device is prepared before activation, and is prepared before the storage device is activated. After completion, a response message is fed back to the control device. The response message is used to indicate that the storage device will activate the new firmware at the next reset. After receiving the response message, the control device sends a reset instruction to the storage device to make the storage device The device is reset, and finally, after the upgrade of the storage device is completed, a communication connection with the storage device is established. In this way, the response message fed back by the storage device can be used, so that after the control device sends a reset command to the storage device, the firmware upgrade of the storage device can be completed online without powering on and off again, which improves work efficiency.
【附图说明】【Description of drawings】
为了更清楚地说明本申请实施例中的技术方案,下面将对实施例描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图 仅仅是本申请的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。其中:In order to illustrate the technical solutions in the embodiments of the present application more clearly, the following briefly introduces the drawings that are used in the description of the embodiments. Obviously, the drawings in the following description are only some embodiments of the present application. For those of ordinary skill in the art, other drawings can also be obtained from these drawings without creative effort. in:
图1是本申请提供的存储装置的固件升级方法一实施例的流程示意图;1 is a schematic flowchart of an embodiment of a firmware upgrade method for a storage device provided by the present application;
图2是本申请提供的存储装置的固件升级方法另一实施例的流程示意图;2 is a schematic flowchart of another embodiment of a firmware upgrade method for a storage device provided by the present application;
图3是本申请提供的存储装置的固件升级方法又一实施例的流程示意图;3 is a schematic flowchart of another embodiment of a firmware upgrade method for a storage device provided by the present application;
图4是本申请提供的存储装置的固件升级方法再一实施例的流程示意图;4 is a schematic flowchart of still another embodiment of a firmware upgrade method for a storage device provided by the present application;
图5是本申请提供的控制设备一实施例的结构示意图;5 is a schematic structural diagram of an embodiment of a control device provided by the present application;
图6是本申请提供的存储装置一实施例的结构示意图;6 is a schematic structural diagram of an embodiment of a storage device provided by the present application;
图7是本申请提供的计算机可读存储介质一实施例的结构示意图。FIG. 7 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided by the present application.
【具体实施方式】【Detailed ways】
下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述。可以理解的是,此处所描述的具体实施例仅用于解释本申请,而非对本申请的限定。另外还需要说明的是,为了便于描述,附图中仅示出了与本申请相关的部分而非全部结构。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. 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. In addition, it should be noted that, for the convenience of description, the drawings only show some but not all the structures related to the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present application.
在本文中提及“实施例”意味着,结合实施例描述的特定特征、结构或特性可以包含在本申请的至少一个实施例中。在说明书中的各个位置出现该短语并不一定均是指相同的实施例,也不是与其它实施例互斥的独立的或备选的实施例。本领域技术人员显式地和隐式地理解的是,本文所描述的实施例可以与其它实施例相结合。Reference herein to an "embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor a separate or alternative embodiment that is mutually exclusive of other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
固态硬盘是一种由固态电子存储芯片阵列而制成的计算机外部存储设备,与常规硬盘相比,固态硬盘以其读写速度快、工作噪音低、工作温度范围广、防震性能好、重量轻以及功耗低等特点,广泛应用于便 携式及嵌入式计算机,特别是工业控制计算机中,并有逐渐取代常规硬盘的趋势。本申请发明人经长期研究发现,固态硬盘虽然存在诸多特点,但是在升级使用中仍存在些许不足,例如固态硬盘在固件升级时需要重新上断电的问题仍未得到很好解决。基于此,本申请发明人提出以下多个实施例:Solid-state drive is a computer external storage device made of solid-state electronic storage chip array. Compared with conventional hard drives, solid-state drives are characterized by fast read and write speed, low operating noise, wide operating temperature range, good shock resistance and light weight. As well as low power consumption, it is widely used in portable and embedded computers, especially in industrial control computers, and has a tendency to gradually replace conventional hard disks. The inventors of the present application have found through long-term research that although solid-state drives have many features, there are still some deficiencies in upgrading and use. Based on this, the inventor of the present application proposes the following multiple embodiments:
参阅图1,图1是本申请提供的存储装置的固件升级方法一实施例的流程示意图,本实施例的方法应用于控制设备,方法具体包括:Referring to FIG. 1, FIG. 1 is a schematic flowchart of an embodiment of a firmware upgrade method for a storage device provided by the present application. The method of this embodiment is applied to a control device, and the method specifically includes:
步骤11:向存储装置发送固件激活指令,以使存储装置进行激活前准备,并在准备完成后向控制设备反馈应答信息,应答信息用于表示存储装置将在下一次复位时对新固件进行激活。Step 11: Send a firmware activation instruction to the storage device to prepare the storage device before activation, and feed back response information to the control device after the preparation is completed. The response information is used to indicate that the storage device will activate the new firmware in the next reset.
可以理解的,控制设备与存储装置之间可以通过多种方式相耦合,包括但不限于通过例如SATA(Serial Advanced Technology Attachment,串行高级技术附件)、SCSI(Small Computer System Interface,小型计算机系统接口)、SAS(Serial AttachedSCSI,串行连接SCSI)、IDE(Integrated Drive Electronics,集成驱动器电子)、USB(Universal Serial Bus,通用串行总线)、PCIE(Peripheral Component InterconnectExpress,PCIe,高速外围组件互联)、NVMe(NVM Express,高速非易失存储)、以太网、光纤通道、无线通信网络等。本实施例中,控制设备和存储装置之间则主要是基于NVME协议进行通信,以实现后续存储装置固件升级的方法。It can be understood that the control device and the storage device can be coupled in various ways, including but not limited to, for example, SATA (Serial Advanced Technology Attachment, Serial Advanced Technology Attachment), SCSI (Small Computer System Interface, Small Computer System Interface) ), SAS (Serial Attached SCSI, Serial Attached SCSI), IDE (Integrated Drive Electronics, integrated drive electronics), USB (Universal Serial Bus, Universal Serial Bus), PCIE (Peripheral Component Interconnect Express, PCIe, high-speed peripheral component interconnection), NVMe (NVM Express, high-speed non-volatile storage), Ethernet, Fibre Channel, wireless communication networks, etc. In this embodiment, the communication between the control device and the storage device is mainly based on the NVME protocol, so as to implement a method for subsequent firmware upgrade of the storage device.
其中,控制设备可以是能够通过上述方式与存储装置进行通信的信息处理设备,例如个人计算机、平板电脑、服务器、便携式计算机、网络交换机、路由器、蜂窝电话、个人数字助理等。The control device may be an information processing device capable of communicating with the storage device in the above manner, such as a personal computer, a tablet computer, a server, a portable computer, a network switch, a router, a cellular phone, a personal digital assistant, and the like.
其中,存储装置由存储单元和控制单元组成,控制单元又由多个CPU(CentralProcessing Unit,中央处理器)和辅助硬件单元组成。在此对CPU和辅助硬件单元的数量均不作具体限定,应由本领域技术人员根据实际情况作出相应的设定。The storage device is composed of a storage unit and a control unit, and the control unit is composed of multiple CPUs (Central Processing Unit, central processing unit) and auxiliary hardware units. The numbers of CPUs and auxiliary hardware units are not specifically limited here, and those skilled in the art should make corresponding settings according to actual conditions.
其中,固件激活指令是由控制设备发送标准管理命令(admin命令)Firmware Active,以此来触发存储装置激活新固件,也即是发送固件激活指令。The firmware activation instruction is to send a standard management command (admin command) Firmware Active by the control device, thereby triggering the storage device to activate the new firmware, that is, to send the firmware activation instruction.
在本实施例中,控制设备在发送固件激活指令后,存储装置则会响应该固件激活指令,关闭一些空闲处理(如平衡磨损、垃圾回收等)为激活固件做准备,在存储装置的空闲处理准备完成后即可向控制设备一端反馈应答消息,该应答消息则是存储装置在应答Firmware Active的CQ(CompletionQueue,完成命令队列)的状态域中通过标准协议对控制设备进行反馈,用于表示存储装置将在下一次复位时对新固件进行激活。In this embodiment, after the control device sends the firmware activation command, the storage device will respond to the firmware activation command, and close some idle processing (such as wear balance, garbage collection, etc.) to prepare for activating the firmware. After the preparation is completed, a response message can be fed back to the control device. The response message is the state field of the CQ (CompletionQueue, completion command queue) that the storage device responds to Firmware Active. Feedback to the control device through a standard protocol is used to indicate the storage device. The unit will activate the new firmware on the next reset.
步骤12:在接收到应答信息后,向存储装置发送复位指令,以使存储装置复位。Step 12: After receiving the response information, send a reset instruction to the storage device to reset the storage device.
可以理解,存储装置进行固件升级的动作通常需要在上断电重启复位之后开始执行,而在本实施例中,由于存储装置在复位升级前已经告知控制设备,新固件将在下一次复位后被加载/激活,此时,控制设备便会暂停下发所有命令而唯一向存储装置发送复位指令,以使存储装置可以直接于在线状态进行复位,而无需重新进行上断电的复位动作,能够实现存储装置在不断电情况下的升级操作,保证了事项处理的连续性。It can be understood that the action of firmware upgrade by the storage device usually needs to be executed after power-on, power-off, restart and reset. In this embodiment, since the storage device has informed the control device before reset and upgrade, the new firmware will be loaded after the next reset. /Activate, at this time, the control device will suspend all commands and only send a reset command to the storage device, so that the storage device can be reset directly in the online state without the need to perform the reset action of power on and off again, which can realize the storage device. The upgrade operation of the device under the condition of uninterrupted power supply ensures the continuity of transaction processing.
步骤13:控制设备在存储装置升级完成后,建立与存储装置的通信连接。Step 13: After the storage device is upgraded, the control device establishes a communication connection with the storage device.
在存储装置升级完成后,控制设备即可重新进行通信初始化,以重新开始与存储装置建立通信连接,进行正常交互。After the upgrade of the storage device is completed, the control device can re-initialize the communication to restart the establishment of a communication connection with the storage device for normal interaction.
区别于现有技术,本申请提供的一种存储装置的固件升级方法,通过向存储装置发送固件激活指令,以使存储装置进行激活前的准备,并在准备完成后向控制设备反馈应答消息,该应答消息则用于表示存储装置将在下一次复位时对新固件进行激活,而控制设备在接收到应答消息后,则向存储装置发送复位指令,以使存储装置复位,最后在存储装置升级完成后,建立与存储装置的通信连接。通过这样的方式,能够利用存储装置反馈的应答消息,使得控制设备在向存储装置发送复位指令后,能够在线完成存储装置的固件升级,而无需重新上断电,提高了工作效率。Different from the prior art, the present application provides a firmware upgrade method for a storage device, by sending a firmware activation instruction to the storage device, so that the storage device is prepared before activation, and after the preparation is completed, a response message is fed back to the control device, The response message is used to indicate that the storage device will activate the new firmware at the next reset, and after receiving the response message, the control device sends a reset instruction to the storage device to reset the storage device, and finally the storage device upgrade is completed. After that, establish a communication connection with the storage device. In this way, the response message fed back by the storage device can be used, so that after the control device sends a reset command to the storage device, the firmware upgrade of the storage device can be completed online without powering on and off again, which improves work efficiency.
参阅图2,图2是本申请提供的存储装置的固件升级方法另一实施 例的流程示意图,本实施例应用于控制设备,方法具体包括:Referring to Fig. 2, Fig. 2 is a schematic flowchart of another embodiment of a firmware upgrade method for a storage device provided by the present application. The present embodiment is applied to a control device, and the method specifically includes:
步骤21:向存储装置发送新固件,以使存储装置存储新固件。Step 21: Send the new firmware to the storage device, so that the storage device stores the new firmware.
其中,新固件是由控制设备使用升级工具通过标准管理命令(admin命令)Firmware Image Download实现发送,利用升级工具将新固件依次分包下载至存储装置,存储装置再将新固件写进掉电保护芯片中进行存储。Among them, the new firmware is sent by the control device using the upgrade tool through the standard management command (admin command) Firmware Image Download, and the upgrade tool is used to download the new firmware to the storage device in sequence, and the storage device then writes the new firmware into the power-down protection. stored in the chip.
其中,Firmware Image Download分包大小不能超过最大上报值,且需要4字节对齐,否则下载数据包会出现异常。Among them, the Firmware Image Download sub-packet size cannot exceed the maximum reported value, and requires 4-byte alignment, otherwise the download data packet will be abnormal.
在一种实际场景中,芯片内提供了多个固件槽,例如固件槽1、固件槽2、固件槽3、固件槽4等,分别用来存储相同或不同的固件。当存储装置接收到新固件时,可以根据控制设备的指令将新固件存储到指定的固件槽中,当存储装置的固件槽中存储有多个固件时,可以根据指令指定固件槽加载对应固件槽内的新固件。可选地,为了提高可靠性,可以将同一份新固件同时保存写入多个固件槽内,以使得当出现一个或多个固件槽的发生故障情况时,依然能够从其他固件槽中获得需要运行的有效新固件。In an actual scenario, multiple firmware slots are provided in the chip, such as firmware slot 1, firmware slot 2, firmware slot 3, firmware slot 4, etc., which are respectively used to store the same or different firmware. When the storage device receives the new firmware, it can store the new firmware in the specified firmware slot according to the instruction of the control device. When there are multiple firmwares stored in the firmware slot of the storage device, the corresponding firmware slot can be loaded according to the instruction. new firmware inside. Optionally, in order to improve reliability, the same new firmware can be saved and written into multiple firmware slots at the same time, so that when a failure occurs in one or more firmware slots, it can still be obtained from other firmware slots. Running valid new firmware.
进一步地,向存储装置发送新固件后,存储装置还可以对新固件的完整性进行判断,可以利用包括CRC校验(Cyclic Redundancy Check,循环冗余校验码)、奇偶校验法以及累加和校验法等对新固件执行算法计算得到一个结果,再将该结果与控制设备下载时进行计算得到的结果进行比较,若结果一致则表明新固件完整,可存储装置可以将其进行存储。Further, after the new firmware is sent to the storage device, the storage device can also judge the integrity of the new firmware, and can utilize a CRC check (Cyclic Redundancy Check, cyclic redundancy check code), a parity check method and a cumulative sum. The verification method, etc. executes the algorithm calculation on the new firmware to obtain a result, and then compares the result with the result obtained by the calculation when the control device is downloaded. If the results are consistent, it indicates that the new firmware is complete, and the storable device can store it.
在步骤21之前,还可以通过将存储装置的当前固件的固件版本,与存储于控制设备所对应的升级服务器中的新固件进行版本比对,从而确定是否需要对存储装置进行固件升级,如果两者不同,则说明该存储装置需要进行固件升级,进而向存储装置发送新固件;如果两者相同,则说明该存储装置无需进行固件升级。Before step 21, it is also possible to compare the firmware version of the current firmware of the storage device with the new firmware stored in the upgrade server corresponding to the control device, so as to determine whether the storage device needs to be upgraded. If the two are different, it means that the storage device needs to perform firmware upgrade, and then sends new firmware to the storage device; if the two are the same, it means that the storage device does not need to perform firmware upgrade.
步骤22:向存储装置发送固件激活指令,以使存储装置进行激活前准备,并在准备完成后向控制设备反馈应答信息,应答信息用于表示存 储装置将在下一次复位时对新固件进行激活。Step 22: Send a firmware activation instruction to the storage device, so that the storage device prepares before activation, and feeds back response information to the control device after the preparation is completed, and the response information is used to indicate that the storage device will activate the new firmware at the next reset.
其中,固件激活指令是控制设备用于指示存储装置下一次复位时所使用的固件槽,也即是具体激活哪一个新固件以进行固件升级。例如固件槽1和固件槽2中存储了不同的新固件,通过固件激活指令的指示,存储装置即可选择需要使用的固件槽所对应的新固件,以用于在后续进行固件升级。The firmware activation instruction is used by the control device to instruct the firmware slot to be used when the storage device is reset next time, that is, which new firmware is specifically activated for firmware upgrade. For example, firmware slot 1 and firmware slot 2 store different new firmware, and through the instruction of the firmware activation command, the storage device can select the new firmware corresponding to the firmware slot to be used for subsequent firmware upgrade.
在本实施例中,存储装置在接收到控制设备发送的固件激活指令后,会为进行新固件激活做准备,通过关闭其本身的一些空闲处理(如平衡磨损、垃圾回收等),以使存储装置处于空闲状态,在此之后,存储装置在应答Firmware Active的完成命令队列的状态域中通过标准协议进行反馈,用于表示存储装置将在下一次复位时对新固件进行激活。In this embodiment, after receiving the firmware activation instruction sent by the control device, the storage device will prepare for new firmware activation, by closing some of its own idle processing (such as balancing wear, garbage collection, etc.), so that the storage device can The device is in an idle state, after which, the storage device provides feedback through a standard protocol in the status field of the completion command queue responding to Firmware Active, indicating that the storage device will activate the new firmware at the next reset.
需要说明的是,不是所有NVME存储驱动都支持该应答方式,目前只发现windows 10自带驱动支持该握手协议,其他开源驱动(例如marvel)提供的驱动就不支持此方式(当存储装置在完成命令队列的状态域置上对应的激活方式时,控制设备一端无法产生复位行为)。It should be noted that not all NVME storage drivers support this response method. At present, only the Windows 10 built-in driver supports this handshake protocol, and the drivers provided by other open source drivers (such as marvel) do not support this method (when the storage device is in the When the state field of the command queue is set to the corresponding activation mode, the control device cannot generate a reset behavior).
步骤23:在接收到应答信息后,将存储装置的控制器配置寄存器的使能字段清0,以使存储装置复位并将存储装置的控制器状态寄存器的准备字段清0。Step 23: After receiving the response information, clear the enable field of the controller configuration register of the storage device to 0 to reset the storage device and clear the ready field of the controller status register of the storage device to 0.
当控制设备通过完成命令队列的状态域接收到存储装置反馈的应答信息后,立刻发出指令以将存储装置的控制器配置(Controller Configuration,CC)寄存器的使能字段清0,也即是CC.EN(Controller Configuration Enable)=0,指的是把CC寄存器里的EN段清零,表示控制设备暂停与存储装置的所有命令通信,以使存储装置产生复位,进一步,使得存储装置将自己的控制器状态(Controller Status,CSTS)寄存器的准备字段清0,也即是CSTS.RDY(Controller Status Ready)=0,指的是把CSTS寄存器里的RDY段清0,用于表示存储装置的状态是否就绪。When the control device receives the response information fed back by the storage device through the status field of the completion command queue, it immediately issues an instruction to clear the enable field of the controller configuration (CC) register of the storage device to 0, that is, CC. EN (Controller Configuration Enable)=0, which means clearing the EN segment in the CC register, indicating that the control device suspends all command communication with the storage device, so that the storage device can be reset, and further, the storage device can control its own The ready field of the controller status (Controller Status, CSTS) register is cleared to 0, that is, CSTS.RDY (Controller Status Ready) = 0, which means that the RDY segment in the CSTS register is cleared to 0, which is used to indicate whether the status of the storage device is ready.
在本实施例中,控制设备在存储装置反馈的应答消息的指示下,暂停与存储装置之间所有的命令通信,而唯一下发指令复位存储装置,以 使得存储装置可以直接于在线状态进行固件升级,而无需重新进行上断电的复位动作,能够实现存储装置在不断电情况下的升级操作,保证了事项处理的连续性。In this embodiment, under the instruction of the response message fed back by the storage device, the control device suspends all command communications with the storage device, and only issues an instruction to reset the storage device, so that the storage device can directly perform firmware operations in the online state. The upgrade operation does not need to perform the reset action of power-on and power-off again, which can realize the upgrade operation of the storage device under the condition of power-off, and ensure the continuity of transaction processing.
其中,在控制设备将存储装置的CC.EN寄存器清0以触发存储装置产生复位时,存储装置需要立即将CSTS.RDY寄存器清0,由于控制设备会很快使能CC.EN寄存器,并且查询CSTS.RDY寄存器的状态,如果CSTS.RDY寄存器清0不及时则会导致存储装置尚未准备充分,而控制设备一端却已经开启了新的队列创建,而最终导致升级失败。Among them, when the control device clears the CC.EN register of the storage device to 0 to trigger the storage device to generate a reset, the storage device needs to clear the CSTS.RDY register to 0 immediately, because the control device will soon enable the CC.EN register, and query The status of the CSTS.RDY register, if the CSTS.RDY register is not cleared to 0 in time, the storage device will not be fully prepared, but the control device has already started a new queue creation, which will eventually cause the upgrade to fail.
步骤24:将存储装置的控制器配置寄存器的使能字段置1,以使存储装置加载新固件。Step 24: Set the enable field of the controller configuration register of the storage device to 1, so that the storage device is loaded with new firmware.
其中,由于存储装置的控制器配置寄存器的使能字段由0变1之后,存储装置会产生一个中断,假设该中断发生在新固件加载的盲区(代码reboot的盲区),也即是中断没开启的时候,此时存储装置将会出现异常,基于此,本实施例中使存储装置加载新固件的动作,也即是reboot代码的动作,需要在控制设备将存储装置的控制器配置寄存器的使能字段置1之后才能进行,否则会影响升级过程。Among them, after the enable field of the controller configuration register of the storage device is changed from 0 to 1, the storage device will generate an interrupt. It is assumed that the interrupt occurs in the blind area of the new firmware loading (the blind area of the code reboot), that is, the interrupt is not turned on. At this time, an exception will occur in the storage device. Based on this, in this embodiment, the action of loading the storage device with new firmware, that is, the action of the reboot code, requires the control device to set the controller configuration register of the storage device. It can only be performed after the energy field is set to 1, otherwise the upgrade process will be affected.
进一步地,将存储装置的控制器配置寄存器的使能字段置1后,存储装置即可做与控制设备能够进行通信的准备,并立刻进行固件跳转,也即是对新固件进行加载,并进行新固件与通信关联的初始化操作,包括PCIE和NVME等初始化操作,例如通过报文确定PCIE层通讯属性,以及存储装置和控制设备之间寄存器的映射关系等,又例如初始化NVME相关的寄存器ASQ(Admin Submission Queue Base Address,管理命令队列基地址)、ACQ(Admin Completion Queue Base Address,完成管理命令队列基地址)、AQA(Admin Queue Attributes,管理命令队列属性)等。Further, after the enable field of the controller configuration register of the storage device is set to 1, the storage device can prepare to communicate with the control device, and immediately perform a firmware jump, that is, load the new firmware, and Perform initialization operations associated with new firmware and communication, including initialization operations such as PCIE and NVME, such as determining the communication properties of the PCIE layer through messages, and the mapping relationship of registers between storage devices and control devices, etc., and initializing NVME-related registers ASQ (Admin Submission Queue Base Address, management command queue base address), ACQ (Admin Completion Queue Base Address, completion management command queue base address), AQA (Admin Queue Attributes, management command queue attributes) and so on.
其中,在上述存储装置的新固件初始化操作完成后,存储装置即可将控制器状态寄存器的准备字段置1,用于告知控制设备新固件已经完全加载并且已准备就绪,可以进行通信。Wherein, after the new firmware initialization operation of the storage device is completed, the storage device can set the ready field of the controller status register to 1 to inform the control device that the new firmware has been fully loaded and is ready for communication.
其中,上述初始化操作的次数小于两次,也即是不能再次进行,具体 为PCIE的物理层初始化的次数不能超过两次,否则PCIE会出现link down,会发生链路断开,所以新固件加载时,在初始化操作阶段,存储装置一定要区分是reboot还是正常上电,否则将导致无法通信。对于区分的方式,可以使用部分特定寄存器用于区分reboot,如果没有此类寄存器,则可以使用特点内存进行状态标识,以区分是正常上电还是reboot。Among them, the number of the above initialization operations is less than twice, that is, it cannot be performed again. Specifically, the number of times of initialization of the physical layer of PCIE cannot exceed two times. Otherwise, PCIE will appear link down and link disconnection will occur, so the new firmware will be loaded. , in the initialization operation stage, the storage device must distinguish whether it is rebooted or powered on normally, otherwise communication will fail. For the way of distinction, some specific registers can be used to distinguish reboots. If there are no such registers, the characteristic memory can be used for status identification to distinguish whether it is a normal power-on or a reboot.
步骤25:在检测到存储装置的控制器状态寄存器的准备字段置1时,建立与存储装置的通信连接。Step 25: When it is detected that the ready field of the controller status register of the storage device is set to 1, establish a communication connection with the storage device.
控制设备通过查询控制器状态寄存器的状态是否就绪来识别固件升级动作是否完成,或者识别存储装置是否在工作,当控制设备检测到存储装置的控制器状态寄存器的准备字段置1时,即表明存储装置的新固件激活完毕,已完成固件升级,此时控制设备一端可以通过发送管理命令以重新创建读写通信队列,从而建立与存储装置的通信连接。The control device identifies whether the firmware upgrade action is completed by querying whether the state of the controller state register is ready, or whether the storage device is working. When the control device detects that the ready field of the controller state register of the storage device is set to 1, it means that the storage device is stored After the new firmware of the device is activated and the firmware upgrade is completed, the control device can send a management command to recreate the read-write communication queue, thereby establishing a communication connection with the storage device.
具体地,控制设备重新进行NVME寄存器配置,例如将admin队列复位,如此admin命令便可重新同步进行寻址通信,然后通过create I/Q CQ(Create I/O Completion Queue command,创建数据读写完成命令队列)和create I/O SQ(Create I/O Submission Queue command,创建数据读写命令队列)用来创建IO命令队列,以为后续的IO读写命令提供同步取指基地址。Specifically, the control device reconfigures the NVME registers, such as resetting the admin queue, so that the admin command can re-synchronize the addressing communication, and then through the create I/Q CQ(Create I/O Completion Queue command, the creation of data read and write is completed. command queue) and create I/O SQ (Create I/O Submission Queue command, create a data read and write command queue) are used to create an IO command queue to provide a synchronous fetch base address for subsequent IO read and write commands.
进一步,当控制设备对admin队列复位完成,以及重新创建IO队列之后,即可与存储装置重新进行通信。Further, after the control device resets the admin queue and recreates the IO queue, it can re-communicate with the storage device.
需要说明的是,存储装置将控制器状态寄存器的准备字段清0的时间,与将控制器状态寄存器的准备字段置1之间的时间差,小于CAP(Controller Capabilities,控制器功能)寄存器上报的超时时间,也即不能超过CAP.TO(Controller Capabilities Timeout),当控制设备查询控制器状态寄存器的时间过长后会放弃查询,此时将认为存储装置发生异常掉盘。It should be noted that the time difference between the time when the storage device clears the preparation field of the controller status register to 0 and the time when the preparation field of the controller status register is set to 1 is less than the timeout reported by the CAP (Controller Capabilities, controller function) register. Time, that is, can not exceed CAP.TO (Controller Capabilities Timeout), when the control device queries the controller status register for too long, it will give up the query, and it will be considered that the storage device is abnormally dropped.
通过这样的方式,本实施例提供一种存储装置的固件升级方法,当控制设备通过工具下载完新固件至存储装置并发送固件激活指令后,存储装置通过响应固件激活指令的相应状态域,以告知控制设备新固件将 会在下一次复位后被加载,如此控制设备的驱动便会暂停下发所有命令而去复位存储装置,之后重新和存储装置进行握手创建新的通信队列,以此便可以解决以往存储装置固件升级中所存在的需要重新上断电或强制跳转的问题。In this way, the present embodiment provides a firmware upgrade method for a storage device. After the control device downloads new firmware to the storage device through a tool and sends a firmware activation command, the storage device responds to the corresponding state field of the firmware activation command to update the firmware. Inform the control device that the new firmware will be loaded after the next reset, so the driver of the control device will suspend all commands to reset the storage device, and then re-handshake with the storage device to create a new communication queue, which can solve the problem. In the past, there was a problem in the firmware upgrade of the storage device that needed to be powered off again or forced to jump.
参阅图3,图3是本申请提供的存储装置的固件升级方法又一实施例的流程示意图,本实施例的方法应用于存储装置,方法具体包括:Referring to FIG. 3, FIG. 3 is a schematic flowchart of another embodiment of a firmware upgrade method for a storage device provided by the present application. The method of this embodiment is applied to a storage device, and the method specifically includes:
步骤31:接收固件激活指令,以进行激活前准备,并在准备完成后向控制设备反馈应答信息,应答信息用于表示存储装置将在下一次复位时对新固件进行激活。Step 31: Receive a firmware activation instruction to prepare before activation, and feed back response information to the control device after the preparation is completed. The response information is used to indicate that the storage device will activate the new firmware in the next reset.
存储装置在接收固件激活指令后,对该指令进行响应,通过关闭一些空闲处理为激活固件做准备,在空闲处理准备完成后即可在应答Firmware Active的CQ的状态域中通过标准协议向控制设备一端反馈应答信息,用于表示存储装置将在下一次复位时对新固件进行激活。After receiving the firmware activation command, the storage device responds to the command and prepares for activating the firmware by closing some idle processing. After the idle processing preparation is completed, it can send the control device to the control device through a standard protocol in the status field of the CQ responding to Firmware Active. One end feeds back the response information, which is used to indicate that the storage device will activate the new firmware in the next reset.
步骤32:接收复位指令以进行存储装置复位。Step 32: Receive a reset instruction to reset the storage device.
控制设备在接收到应答信息后,由于控制设备已经知晓存储装置的下一步动作,此时控制设备将暂停下发所有命令通信,而唯一向存储装置发送复位指令,存储装置可以在复位指令的指示下直接于在线状态进行复位,因此,在控制设备的复位指令下,存储装置能够在不断电情况下进行固件升级,保证了事项处理的连续性。After the control device receives the response information, since the control device already knows the next action of the storage device, the control device will suspend all command communications at this time, and only send a reset command to the storage device. Therefore, under the reset instruction of the control device, the storage device can perform firmware upgrade under the condition of uninterrupted power supply, which ensures the continuity of transaction processing.
步骤33:在存储装置固件升级完成后,建立与控制设备的通信连接。Step 33: After the firmware upgrade of the storage device is completed, establish a communication connection with the control device.
在存储装置升级完成后,控制设备即可重新进行通信初始化,以重新开始与存储装置建立通信连接,进行正常交互。After the upgrade of the storage device is completed, the control device can re-initialize the communication to restart the establishment of a communication connection with the storage device for normal interaction.
参阅图4,图4是本申请提供的存储装置的固件升级方法再一实施例的流程示意图,本实施例的方法应用于存储装置,方法具体包括:Referring to FIG. 4, FIG. 4 is a schematic flowchart of another embodiment of a firmware upgrade method for a storage device provided by the present application. The method of this embodiment is applied to a storage device, and the method specifically includes:
步骤41:接收并存储新固件。Step 41: Receive and store the new firmware.
其中,新固件是由控制设备使用升级工具通过标准管理命令(admin命令)Firmware Image Download实现发送,利用升级工具将新固件依次分包下载至存储装置,存储装置再将新固件写进掉电保护芯片中进行存储。Among them, the new firmware is sent by the control device using the upgrade tool through the standard management command (admin command) Firmware Image Download, and the upgrade tool is used to download the new firmware to the storage device in sequence, and the storage device then writes the new firmware into the power-down protection. stored in the chip.
其中,Firmware Image Download分包大小不能超过最大上报值,且需要4字节对齐,否则下载数据包会出现异常。Among them, the Firmware Image Download sub-packet size cannot exceed the maximum reported value, and requires 4-byte alignment, otherwise the download data packet will be abnormal.
步骤42:接收固件激活指令,以进行激活前准备,并在准备完成后向控制设备反馈应答信息,应答信息用于表示存储装置将在下一次复位时对新固件进行激活。Step 42: Receive a firmware activation instruction to prepare before activation, and feed back response information to the control device after the preparation is completed. The response information is used to indicate that the storage device will activate the new firmware in the next reset.
在本实施例中,存储装置在接收到控制设备发送的固件激活指令后,会为进行新固件激活做准备,通过关闭其本身的一些空闲处理(如平衡磨损、垃圾回收等),以使得自身处于空闲状态,在此之后,存储装置在应答Firmware Active的完成命令队列的状态域中通过标准协议进行反馈,用于表示存储装置将在下一次复位时对新固件进行激活。In this embodiment, after receiving the firmware activation instruction sent by the control device, the storage device will prepare for new firmware activation, by closing some of its own idle processing (such as balancing wear, garbage collection, etc.), so as to make itself In the idle state, after that, the storage device sends feedback through a standard protocol in the status field of the completion command queue in response to Firmware Active, which is used to indicate that the storage device will activate the new firmware in the next reset.
需要说明的是,不是所有NVME存储驱动都支持该应答方式,目前只发现windows 10自带驱动支持该握手协议,其他开源驱动(例如marvel)提供的驱动就不支持此方式(当存储装置在完成命令队列的状态域置上对应的激活方式时,控制设备一端无法产生复位行为)。It should be noted that not all NVME storage drivers support this response method. At present, only the Windows 10 built-in driver supports this handshake protocol, and the drivers provided by other open source drivers (such as marvel) do not support this method (when the storage device is in the When the state field of the command queue is set to the corresponding activation mode, the control device cannot generate a reset behavior).
步骤43:接收复位指令,将控制器配置寄存器的使能字段清0以进行存储装置复位,并将控制器状态寄存器的准备字段清0。Step 43: Receive the reset instruction, clear the enable field of the controller configuration register to 0 to reset the storage device, and clear the ready field of the controller status register to 0.
接收到控制设备发送的复位指令后,存储装置即可将控制器配置寄存器的使能字段清0以触发复位,此时控制设备将会被暂停与存储装置之间的所有命令通信;存储装置进一步将控制器状态寄存器的准备字段清零,用于表示存储器的状态是否就绪。After receiving the reset command sent by the control device, the storage device can clear the enable field of the controller configuration register to 0 to trigger a reset. At this time, the control device will suspend all command communication with the storage device; the storage device further Clears the ready field of the controller status register to indicate whether the state of the memory is ready.
在本实施例中,由于控制设备在接收到应答消息后,暂停了与存储装置之间的所有命令通信,此时存储装置唯一能够接收复位指令,存储装置可以在复位指令的指示下直接于在线状态进行复位,而无需重新进行上断电的复位动作,能够实现存储装置在不断电情况下的升级操作,保证了事项处理的连续性。In this embodiment, since the control device suspends all command communication with the storage device after receiving the response message, the storage device can only receive the reset instruction at this time, and the storage device can directly connect to the online under the instruction of the reset instruction. The state is reset without the need to perform the reset action of power-on and power-off again, which can realize the upgrade operation of the storage device under the condition of power-off, and ensure the continuity of transaction processing.
其中,在控制设备将存储装置的CC.EN寄存器清0以触发存储装置产生复位时,存储装置需要立即将CSTS.RDY寄存器清0,由于控制设备会很快使能CC.EN寄存器,并且查询CSTS.RDY寄存器的状态,如果CSTS.RDY寄存器清0不及时则会导致存储装置尚未准备充分,而控 制设备一端却已经开启了新的队列创建,而最终导致升级失败。Among them, when the control device clears the CC.EN register of the storage device to 0 to trigger the storage device to generate a reset, the storage device needs to clear the CSTS.RDY register to 0 immediately, because the control device will soon enable the CC.EN register, and query The status of the CSTS.RDY register, if the CSTS.RDY register is not cleared to 0 in time, the storage device will not be fully prepared, but the control device has already started a new queue creation, which will eventually cause the upgrade to fail.
步骤44:将控制器配置寄存器的使能字段置1,以加载新固件。Step 44: Set the enable field of the controller configuration register to 1 to load the new firmware.
其中,由于存储装置的控制器配置寄存器的使能字段由0变1之后,存储装置会产生一个中断,假设该中断发生在新固件加载的盲区(代码reboot的盲区),也即是中断没开启的时候,此时存储装置将会出现异常,基于此,本实施例中存储装置加载新固件的动作,也即是reboot代码的动作,需要在控制器配置寄存器的使能字段置1之后才能进行,否则会影响升级过程。Among them, after the enable field of the controller configuration register of the storage device is changed from 0 to 1, the storage device will generate an interrupt. It is assumed that the interrupt occurs in the blind area of the new firmware loading (the blind area of the code reboot), that is, the interrupt is not turned on. At this time, an exception will occur in the storage device. Based on this, in this embodiment, the action of loading the new firmware in the storage device, that is, the action of the reboot code, can only be performed after the enable field of the controller configuration register is set to 1. , otherwise it will affect the upgrade process.
其中,上述初始化操作的次数小于两次,也即是不能再次进行初始化具体为PCIE的物理层初始化的次数不能超过两次,否则PCIE会出现link down,也即是会发生链路断开,所以新固件加载时,在初始化操作阶段,存储装置一定要区分是reboot还是正常上电,否则将导致无法通信。对于区分的方式,可以使用部分特定寄存器用于区分reboot,如果没有此类寄存器,则可以使用特点内存进行状态标识,以区分是正常上电还是reboot。Among them, the number of times of the above initialization operations is less than twice, that is, the number of times of initialization of the physical layer of PCIE cannot be more than twice, otherwise the PCIE will appear link down, that is, the link will be disconnected, so When the new firmware is loaded, in the initialization operation stage, the storage device must distinguish whether it is rebooted or powered on normally, otherwise, communication will fail. For the way of distinction, some specific registers can be used to distinguish reboots. If there are no such registers, the characteristic memory can be used for status identification to distinguish whether it is a normal power-on or a reboot.
步骤45:将控制器状态寄存器的准备字段置1,并建立与控制设备的通信连接。Step 45: Set the ready field of the controller status register to 1, and establish a communication connection with the control device.
其中,CSTS.RDY=1即表示存储装置的新固件激活完毕,已完成固件升级,控制设备对控制器状态寄存器的查询通常是间断的,只要查询到存储装置的控制器状态寄存器的准备字段变化为1,即可确认存储装置升级完成。进一步通过控制设备一端发送的管理命令以重新创建的读写通信队列,与控制设备一端建立通信连接。Among them, CSTS.RDY=1 means that the new firmware of the storage device has been activated and the firmware upgrade has been completed. The query of the controller status register by the control device is usually intermittent, as long as the preparation field of the controller status register of the storage device is changed. If the value is 1, the upgrade of the storage device is confirmed. Further, a communication connection is established with the control device end through the re-created read-write communication queue through the management command sent by the control device end.
需要说明的是,存储装置将控制器状态寄存器的准备字段清0的时间,与将控制器状态寄存器的准备字段置1之间的时间差,小于CAP(Controller Capabilities,控制器功能)寄存器上报的超时时间,也即不能超过CAP.TO(Controller Capabilities Timeout),当控制设备查询控制器状态寄存器的时间过长后会放弃查询,此时将认为存储装置发生异常掉盘。It should be noted that the time difference between the time when the storage device clears the preparation field of the controller status register to 0 and the time when the preparation field of the controller status register is set to 1 is less than the timeout reported by the CAP (Controller Capabilities, controller function) register. Time, that is, can not exceed CAP.TO (Controller Capabilities Timeout), when the control device queries the controller status register for too long, it will give up the query, and it will be considered that the storage device is abnormally dropped.
通过这样的方式,本实施例提供一种存储装置的固件升级方法,当 存储装置接收到控制设备发送的新固件以及固件激活指令后,通过响应固件激活指令的相应状态域,告知控制设备新固件将会在下一次复位后被加载,之后存储装置和控制设备重新进行握手而创建新的通讯队列,以此便可以解决以往存储装置固件升级中所存在的需要重新上断电或强制跳转的问题。In this way, this embodiment provides a firmware upgrade method for a storage device. After the storage device receives the new firmware and the firmware activation command sent by the control device, it informs the control device of the new firmware by responding to the corresponding state field of the firmware activation command. It will be loaded after the next reset, and then the storage device and the control device will shake hands again to create a new communication queue, which can solve the problem of power-on and power-off or forced jump in the previous firmware upgrade of the storage device. .
参阅图5,图5是本申请提供的控制设备一实施例的结构示意图,本实施例的控制设备50包括控制单元51和存储单元52,控制单元51与存储单元52耦接,其中,存储单元52用于存储控制单元51执行的计算机程序,控制单元51用于执行计算机程序以实现如下方法步骤:Referring to FIG. 5, FIG. 5 is a schematic structural diagram of an embodiment of a control device provided by the present application. The control device 50 in this embodiment includes a control unit 51 and a storage unit 52, and the control unit 51 is coupled to the storage unit 52, wherein the storage unit 52 is used to store the computer program executed by the control unit 51, and the control unit 51 is used to execute the computer program to realize the following method steps:
向存储装置发送固件激活指令,以使存储装置进行激活前准备,并在准备完成后向控制设备反馈应答信息,应答信息用于表示存储装置将在下一次复位时对新固件进行激活;在接收到应答信息后,向存储装置发送复位指令,以使存储装置复位;在存储装置固件升级完成后,建立与存储装置的通信连接。Send a firmware activation instruction to the storage device to prepare the storage device before activation, and feed back response information to the control device after the preparation is completed. The response information is used to indicate that the storage device will activate the new firmware in the next reset; After the response information, a reset instruction is sent to the storage device to reset the storage device; after the firmware upgrade of the storage device is completed, a communication connection with the storage device is established.
需要说明的是,本实施例的控制设备50是基于上述任一方法实施例的一实体终端,其实施原理和步骤类似,在此不再赘述。因此,计算机程序在被控制单元51执行时,还可以实现上述任一实施例中的其他方法步骤,在此不再赘述。It should be noted that the control device 50 in this embodiment is an entity terminal based on any of the above method embodiments, and its implementation principles and steps are similar, which will not be repeated here. Therefore, when the computer program is executed by the control unit 51, other method steps in any of the foregoing embodiments can also be implemented, which will not be repeated here.
参阅图6,图6是本申请提供的存储装置一实施例的结构示意图,本实施例的存储装置60包括控制单元61和存储单元62,控制单元61与存储单元62耦接,其中,存储单元62用于存储控制单元61执行的计算机程序,控制单元61用于执行计算机程序以实现如下方法步骤:Referring to FIG. 6, FIG. 6 is a schematic structural diagram of an embodiment of a storage device provided by the present application. The storage device 60 in this embodiment includes a control unit 61 and a storage unit 62, and the control unit 61 is coupled to the storage unit 62, wherein the storage unit 62 is used to store the computer program executed by the control unit 61, and the control unit 61 is used to execute the computer program to realize the following method steps:
接收固件激活指令,以进行激活前准备,并在准备完成后向控制设备反馈应答信息,应答信息用于表示存储装置将在下一次复位时对新固件进行激活;接收复位指令以进行存储装置复位;在存储装置固件升级完成后,建立与控制设备的通信连接。Receive the firmware activation instruction to prepare before activation, and feed back response information to the control device after the preparation is completed, the response information is used to indicate that the storage device will activate the new firmware in the next reset; Receive the reset command to reset the storage device; After the firmware upgrade of the storage device is completed, a communication connection with the control device is established.
需要说明的是,本实施例的存储装置60是基于上述任一方法实施例的一实体终端,其实施原理和步骤类似,在此不再赘述。因此,计算机程序在被控制单元61执行时,还可以实现上述任一实施例中的其他 方法步骤,在此不再赘述。It should be noted that the storage device 60 in this embodiment is a physical terminal based on any of the above method embodiments, and its implementation principles and steps are similar, which will not be repeated here. Therefore, when the computer program is executed by the control unit 61, other method steps in any of the above-mentioned embodiments can also be implemented, which will not be repeated here.
参阅图7,图7是本申请提供的计算机可读存储介质一实施例的结构示意图,本实施例的计算机可读存储介质70用于存储计算机程序71,计算机程序71在被控制单元执行时,用以实现如下方法步骤:Referring to FIG. 7, FIG. 7 is a schematic structural diagram of an embodiment of a computer-readable storage medium provided by the present application. The computer-readable storage medium 70 of this embodiment is used to store a computer program 71. When the computer program 71 is executed by the control unit, To implement the following method steps:
向存储装置发送固件激活指令,以使存储装置进行激活前准备,并在准备完成后向控制设备反馈应答信息,应答信息用于表示存储装置将在下一次复位时对新固件进行激活;在接收到应答信息后,向存储装置发送复位指令,以使存储装置复位;在存储装置固件升级完成后,建立与存储装置的通信连接。Send a firmware activation instruction to the storage device to prepare the storage device before activation, and feed back response information to the control device after the preparation is completed. The response information is used to indicate that the storage device will activate the new firmware in the next reset; After the response information, a reset instruction is sent to the storage device to reset the storage device; after the firmware upgrade of the storage device is completed, a communication connection with the storage device is established.
需要说明的是,本实施例的计算机程序71所执行的方法步骤是基于上述方法实施例的,其实施原理和步骤类似。因此,计算机程序71在被控制单元执行时,还可以实现上述任一实施例中的其他方法步骤,在此不再赘述。It should be noted that, the method steps executed by the computer program 71 in this embodiment are based on the foregoing method embodiments, and the implementation principles and steps are similar. Therefore, when the computer program 71 is executed by the control unit, other method steps in any of the foregoing embodiments can also be implemented, which will not be repeated here.
本申请的实施例以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本申请各个实施方式所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。When the embodiments of the present application are implemented in the form of software functional units and are sold or used as independent products, they may be stored in a computer-readable storage medium. Based on this understanding, the technical solutions of the present application can be embodied in the form of software products in essence, or the parts that contribute to the prior art, or all or part of the technical solutions, and the computer software products are stored in a storage medium , including several instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to execute all or part of the steps of the methods described in the various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .
以上所述仅为本申请的实施方式,并非因此限制本申请的专利范围,凡是根据本申请说明书及附图内容所作的等效结构或等效流程变换,或直接或间接运用在其他相关的技术领域,均同理包括在本申请的专利保护范围内。The above description is only an embodiment of the present application, and is not intended to limit the scope of the patent of the present application. Any equivalent structure or equivalent process transformation made according to the contents of the description and drawings of the present application, or directly or indirectly applied to other related technologies Fields are similarly included within the scope of patent protection of this application.

Claims (15)

  1. 一种存储装置的固件升级方法,其特征在于,所述方法应用于控制设备,所述方法包括:A method for upgrading firmware of a storage device, wherein the method is applied to a control device, and the method includes:
    向存储装置发送固件激活指令,以使所述存储装置进行激活前准备,并在准备完成后向所述控制设备反馈应答信息,所述应答信息用于表示所述存储装置将在下一次复位时对新固件进行激活;Send a firmware activation instruction to the storage device, so that the storage device is prepared before activation, and after the preparation is completed, feedback information to the control device, the response information is used to indicate that the storage device will be reset next time. Activate the new firmware;
    在接收到所述应答信息后,向所述存储装置发送复位指令,以使所述存储装置复位;After receiving the response information, send a reset instruction to the storage device to reset the storage device;
    在所述存储装置固件升级完成后,建立与所述存储装置的通信连接。After the firmware upgrade of the storage device is completed, a communication connection with the storage device is established.
  2. 根据权利要求1所述的方法,其特征在于,The method of claim 1, wherein:
    所述向存储装置发送固件激活指令之前,还包括:Before the sending the firmware activation instruction to the storage device, the method further includes:
    向所述存储装置发送所述新固件,以使所述存储装置存储所述新固件。The new firmware is sent to the storage device to cause the storage device to store the new firmware.
  3. 根据权利要求1所述的方法,其特征在于,The method of claim 1, wherein:
    所述在接收到所述应答信息后,向所述存储装置发送复位指令,以使所述存储装置复位,包括:After receiving the response information, sending a reset instruction to the storage device to reset the storage device includes:
    在接收到所述应答信息后,将所述存储装置的控制器配置寄存器的使能字段清0,以使所述存储装置复位并将所述存储装置的控制器状态寄存器的准备字段清0;其中,所述应答信息在完成命令队列的状态域中进行反馈;After receiving the response information, clear the enable field of the controller configuration register of the storage device to 0, so as to reset the storage device and clear the ready field of the controller status register of the storage device to 0; Wherein, the response information is fed back in the status field of the completion command queue;
    将所述存储装置的控制器配置寄存器的使能字段置1,以使所述存储装置加载所述新固件。The enable field of the controller configuration register of the storage device is set to 1 to cause the storage device to load the new firmware.
  4. 根据权利要求3所述的方法,其特征在于,The method of claim 3, wherein:
    所述将所述存储装置的控制器配置寄存器的使能字段清0,以使所述存储装置复位并将所述存储装置的控制器状态寄存器的准备字段清0之后,还包括:After clearing the enable field of the controller configuration register of the storage device to 0 to reset the storage device and clearing the preparation field of the controller status register of the storage device to 0, the method further includes:
    暂停与所述存储装置的通信。Communication with the storage device is suspended.
  5. 根据权利要求1所述的方法,其特征在于,The method of claim 1, wherein:
    所述在所述存储装置固件升级完成后,建立与所述存储装置的通信连接,包括:After the firmware upgrade of the storage device is completed, establishing a communication connection with the storage device includes:
    在检测到所述存储装置的控制器状态寄存器的准备字段置1时,建立与所述存储装置的通信连接;其中,所述存储装置在所述新固件初始化操作完成后将所述存储装置的控制器状态寄存器的准备字段置1。When it is detected that the preparation field of the controller status register of the storage device is set to 1, a communication connection with the storage device is established; wherein the storage device resets the storage device to the storage device after the new firmware initialization operation is completed. The Ready field of the Controller Status Register is set.
  6. 根据权利要求5所述的方法,其特征在于,The method of claim 5, wherein:
    所述建立与所述存储装置的通信连接,包括:The establishing a communication connection with the storage device includes:
    发送管理命令以重新创建读写通信队列,建立与所述存储装置的通信连接。A management command is sent to recreate the read and write communication queues to establish a communication connection with the storage device.
  7. 根据权利要求5所述的方法,其特征在于,The method of claim 5, wherein:
    所述初始化操作的次数小于两次。The number of times of the initialization operation is less than two times.
  8. 一种控制设备,其特征在于,包括控制单元以及存储单元,其中,所述存储单元用于存储计算机程序,所述计算机程序在被所述控制单元执行时,用于实现如权利要求1-7任一项所述的存储装置的固件升级方法。A control device, characterized in that it includes a control unit and a storage unit, wherein the storage unit is used to store a computer program, and when the computer program is executed by the control unit, it is used to realize the method according to claims 1-7 The firmware upgrade method of any one of the storage devices.
  9. 一种存储装置的固件升级方法,其特征在于,所述方法应用于存储装置,所述方法包括:A method for upgrading firmware of a storage device, wherein the method is applied to a storage device, and the method includes:
    接收固件激活指令,以进行激活前准备,并在准备完成后向控制设备反馈应答信息,所述应答信息用于表示所述存储装置将在下一次复位时对新固件进行激活;Receive a firmware activation instruction to prepare before activation, and feed back response information to the control device after the preparation is completed, where the response information is used to indicate that the storage device will activate the new firmware at the next reset;
    接收复位指令以进行所述存储装置复位;receiving a reset instruction to reset the storage device;
    在所述存储装置固件升级完成后,建立与所述控制设备的通信连接。After the firmware upgrade of the storage device is completed, a communication connection with the control device is established.
  10. 根据权利要求9所述的方法,其特征在于,The method of claim 9, wherein:
    所述接收固件激活指令之前,还包括:Before the receiving the firmware activation instruction, the method further includes:
    接收并存储所述新固件。The new firmware is received and stored.
  11. 根据权利要求9所述的方法,其特征在于,The method of claim 9, wherein:
    所述接收复位指令以进行所述存储装置复位,包括:The receiving a reset instruction to reset the storage device includes:
    接收复位指令,将控制器配置寄存器的使能字段清0以进行所述存储装置复位,并将控制器状态寄存器的准备字段清0;Receive the reset instruction, clear the enable field of the controller configuration register to 0 to reset the storage device, and clear the preparation field of the controller status register to 0;
    将所述控制器配置寄存器的使能字段置1,以加载所述新固件。Set the enable field of the controller configuration register to load the new firmware.
  12. 根据权利要求9所述的方法,其特征在于,The method of claim 9, wherein:
    所述在所述存储装置固件升级完成后,建立与所述控制设备的通信连接,包括:After the firmware upgrade of the storage device is completed, establishing a communication connection with the control device includes:
    将所述控制器状态寄存器的准备字段置1,并建立与所述控制设备的通信连接;其中,所述存储装置在所述新固件初始化操作完成后将所述控制器状态寄存器的准备字段置1。Set the preparation field of the controller status register to 1, and establish a communication connection with the control device; wherein, the storage device sets the preparation field of the controller status register after the new firmware initialization operation is completed. 1.
  13. 根据权利要求12所述的方法,其特征在于,The method of claim 12, wherein:
    将所述控制器状态寄存器的准备字段清0与将所述控制器状态寄存器的准备字段置1之间的时间差,小于控制器功能寄存器上报的超时时间。The time difference between clearing the ready field of the controller status register to 0 and setting the ready field of the controller status register to 1 is less than the timeout time reported by the controller function register.
  14. 根据权利要求9所述的方法,其特征在于,The method of claim 9, wherein:
    所述应答信息在完成队列命令的状态域中进行反馈。The response information is fed back in the status field of the completion queue command.
  15. 一种存储装置,其特征在于,包括控制单元以及存储单元,其中,所述存储单元用于存储计算机程序,所述计算机程序在被所述控制单元执行时,用于实现如权利要求9-14任一项所述的存储装置的固件升级方法。A storage device, characterized in that it includes a control unit and a storage unit, wherein the storage unit is used to store a computer program, and when the computer program is executed by the control unit, the computer program is used to realize the method according to claims 9-14. The firmware upgrade method of any one of the storage devices.
PCT/CN2020/129411 2020-11-17 2020-11-17 Method for upgrading firmware of storage apparatus, control device, and storage apparatus WO2022104530A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/129411 WO2022104530A1 (en) 2020-11-17 2020-11-17 Method for upgrading firmware of storage apparatus, control device, and storage apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2020/129411 WO2022104530A1 (en) 2020-11-17 2020-11-17 Method for upgrading firmware of storage apparatus, control device, and storage apparatus

Publications (1)

Publication Number Publication Date
WO2022104530A1 true WO2022104530A1 (en) 2022-05-27

Family

ID=81707916

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2020/129411 WO2022104530A1 (en) 2020-11-17 2020-11-17 Method for upgrading firmware of storage apparatus, control device, and storage apparatus

Country Status (1)

Country Link
WO (1) WO2022104530A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116932009A (en) * 2023-09-13 2023-10-24 合肥康芯威存储技术有限公司 Method, device and medium for upgrading field firmware of storage device

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100281474A1 (en) * 2009-04-30 2010-11-04 Eason Patrick C Firmware updating
US20130198730A1 (en) * 2012-01-26 2013-08-01 Lsi Corporation Update systems responsive to ongoing processing at a storage system
CN103955381A (en) * 2014-04-04 2014-07-30 京信通信系统(中国)有限公司 Method and system for management server to perform batch software update on terminal equipment
US20160210132A1 (en) * 2015-01-21 2016-07-21 HGST Netherlands B.V. Managing wear of system areas of storage devices
CN107066300A (en) * 2017-04-21 2017-08-18 杭州宏杉科技股份有限公司 The firmware upgrade method and storage device of a kind of storage device
CN108170368A (en) * 2016-12-07 2018-06-15 北京忆恒创源科技有限公司 The method and system of online upgrading firmware
US20190243637A1 (en) * 2019-03-29 2019-08-08 Intel Corporation Runtime firmware activation for memory devices

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100281474A1 (en) * 2009-04-30 2010-11-04 Eason Patrick C Firmware updating
US20130198730A1 (en) * 2012-01-26 2013-08-01 Lsi Corporation Update systems responsive to ongoing processing at a storage system
CN103955381A (en) * 2014-04-04 2014-07-30 京信通信系统(中国)有限公司 Method and system for management server to perform batch software update on terminal equipment
US20160210132A1 (en) * 2015-01-21 2016-07-21 HGST Netherlands B.V. Managing wear of system areas of storage devices
CN108170368A (en) * 2016-12-07 2018-06-15 北京忆恒创源科技有限公司 The method and system of online upgrading firmware
CN107066300A (en) * 2017-04-21 2017-08-18 杭州宏杉科技股份有限公司 The firmware upgrade method and storage device of a kind of storage device
US20190243637A1 (en) * 2019-03-29 2019-08-08 Intel Corporation Runtime firmware activation for memory devices

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116932009A (en) * 2023-09-13 2023-10-24 合肥康芯威存储技术有限公司 Method, device and medium for upgrading field firmware of storage device
CN116932009B (en) * 2023-09-13 2024-01-23 合肥康芯威存储技术有限公司 Method, device and medium for upgrading field firmware of storage device

Similar Documents

Publication Publication Date Title
US10845868B2 (en) Methods and apparatus for running and booting an inter-processor communication link between independently operable processors
JP4205560B2 (en) Reliability improvement using non-volatile memory cache in diskless network bootable computers
US6314455B1 (en) Data processing system and method for permitting a server to remotely initiate a client's boot block recovery
CN112540785A (en) Firmware upgrading method of storage device, control equipment and storage device
EP3255527B1 (en) Remote keyboard-video-mouse technologies
US7840736B2 (en) Bus communication enumeration
JP4688821B2 (en) Method and apparatus for remote correction of system configuration
US8185759B1 (en) Methods and systems for interfacing bus powered devices with host devices providing limited power levels
US7051236B2 (en) Wirelessly network-connected, battery-powered information handling system featuring prevention of data corruption after wake-up by a network event
US9063816B2 (en) Method and apparatus for updating firmware on a storage device
WO2015100878A1 (en) Chip starting method, multi-core processor chip and storage medium
US8880747B2 (en) Endpoint device discovery system
US20190079558A1 (en) Docking device, electrical device, and mac address cloning method
US8996730B1 (en) System and method to restore maximum payload size in a network adapter
WO2022104530A1 (en) Method for upgrading firmware of storage apparatus, control device, and storage apparatus
US11436020B2 (en) Systems and methods to bifurcate at least one peripheral component interconnect express (PCIE) port in accordance with a user-selectable PCIE bifurcation setting
US6275851B1 (en) Data processing system and method for remotely controlling modification of a client's initialization settings
US20060149859A1 (en) Configuration data management
WO2007076644A1 (en) A mobile computing system and the method for receiving data packagea
US7117353B2 (en) Methods and apparatus to enable console redirection in a multiple execution environment
US10996942B1 (en) System and method for graphics processing unit firmware updates
CN115794153A (en) Firmware upgrading method and related equipment
CN113722147A (en) Method for keeping service connection and related equipment
KR20000035025A (en) Data processing system and method for remotely accessing a client computer system's indivisual initialization settings while the client is powered off
US11755518B2 (en) Control of Thunderbolt/DisplayPort multiplexor for discrete USB-C graphics processor

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 20961822

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 20961822

Country of ref document: EP

Kind code of ref document: A1