CN120469707A - Firmware upgrade method, device, equipment and medium - Google Patents
Firmware upgrade method, device, equipment and mediumInfo
- Publication number
- CN120469707A CN120469707A CN202510617782.1A CN202510617782A CN120469707A CN 120469707 A CN120469707 A CN 120469707A CN 202510617782 A CN202510617782 A CN 202510617782A CN 120469707 A CN120469707 A CN 120469707A
- Authority
- CN
- China
- Prior art keywords
- host
- firmware upgrade
- memory
- firmware
- capacity
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Stored Programmes (AREA)
Abstract
The invention discloses a firmware upgrading method, a device, equipment and a medium, which relate to the field of firmware upgrading and comprise that when a host utilizes a host memory as a buffer, a disk array card can acquire a starting address and a capacity of the host memory buffer issued by the host, and after the host stores a firmware upgrading packet into the host memory buffer, the disk array card can acquire and execute a firmware upgrading command issued by the host so as to directly read the firmware upgrading packet from the host memory buffer by calling a direct memory access interface and based on the starting address and the capacity of the host memory buffer, thereby carrying out firmware upgrading. The invention uses the host memory as the buffer area, so that the disk array card can read the firmware upgrade package from the host memory buffer area only through the firmware upgrade command issued by the host, to upgrade the firmware, and the speed of firmware upgrade is improved while using less system resources by reducing command interaction between the host and the disk array card.
Description
Technical Field
The present invention relates to the field of firmware upgrade, and in particular, to a method, apparatus, device, and medium for firmware upgrade.
Background
In embedded systems and data storage devices, firmware upgrades are an important step in ensuring device functionality and security, and as the importance of firmware in embedded systems continues to increase, the need for fast and reliable firmware upgrades becomes particularly critical. Existing NVMe (Non-Volatile Memory Express, nonvolatile memory host controller interface specification) devices, such as RAID (Redundant Array of INDEPENDENT DISKS, redundant array of independent disks card) card upgrades, generally require the completion of the firmware upgrade process by PCIe (PERIPHERAL COMPONENT INTERCONNECT EXPRESS , a high speed serial computer expansion bus standard), bus and using two independent standard NVME ADMIN commands issued by the host, fw-download commands (by which the array of disks card is controlled to download firmware data from the host) and fw-commit commands (by which the downloaded firmware data of the array of disks card is activated for firmware upgrade).
However, firmware upgrade is performed through two independent standard NVME ADMIN commands, and because multiple command interactions are needed, not only is the communication burden between the host and the disk array card increased and the consumption of system resources increased, but also the execution of each command needs a certain time, which easily results in overlong time consumption for firmware upgrade and more serious possibility of affecting the normal operation of the system.
It can be seen that how to increase the speed of firmware upgrade while using less system resources is a technical problem that needs to be solved by those skilled in the art.
Disclosure of Invention
The embodiment of the invention aims to provide a firmware upgrading method, device, equipment and medium, which can improve the speed of firmware upgrading while using fewer system resources. The specific scheme is as follows:
in a first aspect, the present invention provides a firmware upgrade method, applied to a disk array card, including:
Setting memory allocation capacity through initialization so that a host applies for a memory space with a corresponding size from a host memory based on the memory allocation capacity after inquiring the memory allocation capacity from a disk array card to serve as a host memory buffer area, wherein the disk array card adopts a nonvolatile memory protocol;
Acquiring a starting address and capacity of a host memory buffer area issued by a host;
after the host stores the firmware upgrade package into the host memory buffer, the firmware upgrade command issued by the host is acquired and executed, so that the firmware upgrade package is directly read from the host memory buffer by calling the direct memory access interface and based on the starting address and capacity of the host memory buffer, and the original firmware stored in the local nonvolatile memory is upgraded by utilizing the read firmware upgrade package.
Optionally, the firmware upgrade package stored in the host memory buffer is a data package formed based on the firmware upgrade file and a target signature value, the target signature value is a signature value obtained by digitally signing target abstract information by using a private key, and the target abstract information is information obtained by abstracting the firmware upgrade file by the host.
Optionally, by calling the direct memory access interface and based on the starting address and the capacity of the host memory buffer, directly reading the firmware upgrade package from the host memory buffer, and upgrading the original firmware stored in the local nonvolatile memory by using the read firmware upgrade package, including:
Directly reading a firmware upgrade package from a host memory buffer area by calling a direct memory access interface and based on the initial address and the capacity of the host memory buffer area;
Storing the read firmware upgrade package into a local storage unit, and performing signature verification on the read firmware upgrade package;
If the read firmware upgrade package passes the verification, the read firmware upgrade package is migrated from the local storage unit to the local nonvolatile memory so as to upgrade the original firmware stored in the nonvolatile memory.
Optionally, signature verification is performed on the read firmware upgrade package, including:
Extracting a firmware upgrade file and a target signature value from the read firmware upgrade package;
performing abstract extraction on the extracted firmware upgrade file to obtain abstract information to be checked;
digital signature verification is carried out on the extracted target signature value by utilizing the public key so as to obtain target abstract information;
if the abstract information to be checked is the same as the target abstract information, determining that the read firmware upgrade package passes the check.
Optionally, directly reading the firmware upgrade package from the host memory buffer by calling the direct memory access interface and based on the starting address and the capacity size of the host memory buffer, including:
Analyzing the firmware upgrading command to determine the data size of the firmware upgrading packet;
judging whether the residual capacity in the local storage unit is not smaller than the data size of the firmware upgrade package or not so as to determine a data reading mode based on a judging result;
Determining a host memory buffer from the host by invoking the direct memory access interface and based on the starting address and the capacity size of the host memory buffer;
according to the data reading mode, directly reading a firmware upgrade package from a host memory buffer area;
The data reading mode is a whole package reading mode if the residual capacity in the local storage unit is not smaller than the data size of the firmware upgrading package, and is a sub-package reading mode if the residual capacity in the local storage unit is smaller than the data size of the firmware upgrading package.
Optionally, according to the data reading mode, the firmware upgrade package is directly read from the host memory buffer area, including:
When the data reading mode is a whole-package reading mode, directly reading a complete firmware upgrade package from a host memory buffer area according to the whole-package reading mode;
When the data reading mode is a sub-packet reading mode, determining the sub-packet size corresponding to the sub-packet reading mode, and sequentially reading sub-data packets with corresponding sizes from a host memory buffer area according to the sub-packet size, wherein the sub-data packets are data packets split from a firmware upgrading packet.
Optionally, the memory allocation capacity is set by initializing, so that after the host queries the memory allocation capacity from the disk array card, based on the memory allocation capacity, the host applies for a memory space with a corresponding size from the host memory, so as to be used as a host memory buffer area, and the method includes:
The memory allocation capacity is set through initialization, so that after the host queries the memory allocation capacity from the disk array card, the residual capacity of the host memory is determined, and based on the memory allocation capacity and the residual capacity of the host memory, a memory space with a corresponding size is applied from the host memory to be used as a host memory buffer area;
The memory allocation capacity comprises a minimum memory allocation capacity and/or an expected memory allocation capacity.
In a second aspect, the present invention provides a firmware upgrade apparatus, applied to a disk array card, including:
The system comprises an initialization module, a memory allocation module and a memory allocation module, wherein the initialization module is used for setting memory allocation capacity through initialization, so that a host applies for a memory space with a corresponding size from a host memory based on the memory allocation capacity after inquiring the memory allocation capacity from a disk array card to be used as a host memory buffer area;
The acquisition module is used for acquiring the initial address and the capacity of the host memory buffer area issued by the host;
The firmware upgrading module is used for acquiring and executing a firmware upgrading command issued by the host after the host stores the firmware upgrading packet in the host memory buffer, directly reading the firmware upgrading packet from the host memory buffer by calling the direct memory access interface and based on the starting address and the capacity of the host memory buffer, and upgrading the original firmware stored in the local nonvolatile memory by utilizing the read firmware upgrading packet.
In a third aspect, the present invention provides an electronic device, comprising:
A memory for storing a computer program;
And a processor for executing a computer program to implement the steps of the firmware upgrade method described above.
In a fourth aspect, the present invention provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the aforementioned firmware upgrade method.
The method comprises the steps of setting memory allocation capacity through initialization, enabling a disk array card to apply for a memory space with corresponding size from a host memory based on the memory allocation capacity after the host queries the memory allocation capacity from the disk array card to serve as a host memory buffer zone, enabling the disk array card to adopt a nonvolatile memory protocol, enabling the host and the disk array card to communicate through a high-speed serial bus, obtaining a starting address and capacity of the host memory buffer zone issued by the host, obtaining and executing a firmware upgrading command issued by the host after the host stores a firmware upgrading packet into the host memory buffer zone, directly reading the firmware upgrading packet from the host memory buffer zone by calling a direct memory access interface and based on the starting address and the capacity of the host memory buffer zone, and upgrading original firmware stored in a local nonvolatile memory by utilizing the read firmware upgrading packet.
The method has the advantages that the host memory is used as the buffer area, and the firmware upgrading package is stored in the host memory buffer area, so that when the disk array card receives a firmware upgrading command issued by the host, the firmware upgrading package can be directly obtained from the host memory buffer area through the direct memory access interface and based on the high-speed serial bus to carry out firmware upgrading, the speed of transmitting the firmware upgrading package from the host to the disk array card is greatly improved, compared with two independent standard NVME ADMIN commands, the method can realize the downloading of the firmware upgrading package and the upgrading of the firmware only through one firmware upgrading command, reduces command interaction between the host and the disk array card, reduces communication burden between the host and the disk array card, correspondingly reduces consumption of system resources, and finally ensures that the method can improve the speed of firmware upgrading while using fewer system resources.
Drawings
For a clearer description of embodiments of the present invention, the drawings that are required to be used in the embodiments will be briefly described, it being apparent that the drawings in the following description are only some embodiments of the present invention, and other drawings may be obtained according to the drawings without inventive effort for those skilled in the art.
FIG. 1 is a flowchart of a firmware upgrade method according to an embodiment of the present invention;
FIG. 2 is a flow chart of a firmware upgrade package signature provided by an embodiment of the present invention;
FIG. 3 is a flowchart of a firmware upgrade package label verification provided in an embodiment of the present invention;
FIG. 4 is a firmware upgrade architecture diagram provided in an embodiment of the present invention;
FIG. 5 is a firmware upgrade flowchart provided by an embodiment of the present invention;
Fig. 6 is a schematic structural diagram of a firmware upgrading device according to an embodiment of the present invention;
Fig. 7 is a block diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and completely with reference to the accompanying drawings, in which it is apparent that the embodiments described are only some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by a person of ordinary skill in the art without making any inventive effort are within the scope of the present invention.
The firmware is upgraded by two independent standard NVME ADMIN commands, and because of the need of multiple command interactions, the communication burden between the host and the disk array card is increased, the consumption of system resources is increased, and the execution of each command needs a certain time, so that the firmware is easy to upgrade, the time consumption is too long, and the normal operation of the system is more seriously influenced. Therefore, the invention provides a firmware upgrading method, which uses the host memory as a buffer area, so that the disk array card can read the firmware upgrading packet from the host memory buffer area only through the firmware upgrading command issued by the host, and can upgrade the firmware, and the speed of firmware upgrading is improved while using less system resources by reducing command interaction between the host and the disk array card.
Referring to fig. 1, an embodiment of the present invention provides a firmware upgrade method, which is applied to a disk array card, including:
Step S11, setting memory allocation capacity through initialization so that a host applies for a memory space with a corresponding size from a host memory based on the memory allocation capacity after inquiring the memory allocation capacity from the disk array card as a host memory buffer area, wherein the disk array card adopts a nonvolatile memory protocol, and the host and the disk array card communicate through a high-speed serial bus.
In the embodiment of the present invention, for the function of the disk array card to use the host memory buffer (Host Memory Buffer, HMB), a nonvolatile memory protocol is required and the protocol version is 1.2 and above, that is, NVMe 1.2 and above.
Specifically, in the power-on initialization stage, the disk array card sets the memory allocation capacity through initialization, so that after the host queries the memory allocation capacity from the disk array card based on the identification of the disk array card, the host applies for a memory space with a corresponding size from the host memory based on the memory allocation capacity to serve as a host memory buffer area. It should be noted that, the host memory may use DRAM (Dynamic Random Access Memory ), and the host and the disk array card communicate through a high-speed serial bus, for example, a PCIe bus may be used as the high-speed serial bus, so as to increase the communication speed between the host and the disk array card.
Further, the disk array card sets the memory allocation capacity by initializing, so that the host determines the remaining capacity of the host memory after the host queries the memory allocation capacity from the disk array card, and then applies for a memory space with a corresponding size from the host memory based on the memory allocation capacity and the remaining capacity of the host memory as a host memory buffer.
The memory allocation capacity comprises a minimum memory allocation capacity and/or an expected memory allocation capacity, wherein the minimum memory allocation capacity is the minimum memory allocation capacity for ensuring that the disk array card normally executes firmware upgrading operation, and if the capacity of the memory buffer of the host is lower than the minimum memory allocation capacity, the firmware upgrading performance of the disk array card can be affected, and the minimum memory allocation capacity can be set to be 4KB. The desired memory allocation capacity is a memory capacity desired to be allocated to the host memory buffer for use, and may provide optimal firmware upgrade performance for the disk array card, and may be set to 10MB, for example.
It should be noted that, if the memory allocation capacity includes the minimum memory allocation capacity, the capacity of the host memory buffer should be not less than the minimum memory allocation capacity and less than the remaining capacity of the host memory. If the memory allocation capacity includes a minimum memory allocation capacity and an expected memory allocation capacity, the capacity of the host memory buffer may be equal to the expected memory allocation capacity when the remaining capacity of the host memory is not less than the expected memory allocation capacity, and the capacity of the host memory buffer should be less than the remaining capacity of the host memory and not less than the minimum memory allocation capacity when the remaining capacity of the host memory is less than the expected memory allocation capacity.
Step S12, the initial address and the capacity of a host memory buffer area issued by the host are obtained.
In the embodiment of the invention, after the host applies for the host memory buffer area from the host memory, the host issues the initial address and the capacity of the host memory buffer area to the disk array card, and correspondingly, the disk array card receives the initial address and the capacity of the host memory buffer area issued by the host and stores the initial address and the capacity of the host memory buffer area so as to access the host memory buffer area based on the initial address and the capacity of the host memory buffer area.
Step S13, after the host stores the firmware upgrade package in the host memory buffer, acquiring and executing a firmware upgrade command issued by the host, so as to directly read the firmware upgrade package from the host memory buffer by calling the direct memory access interface and based on the starting address and the capacity of the host memory buffer, and upgrading the original firmware stored in the local nonvolatile memory by utilizing the read firmware upgrade package.
In the embodiment of the invention, the host stores the firmware upgrade package in the host memory buffer area, and issues a firmware upgrade command for the firmware upgrade package to the disk array card. Correspondingly, the disk array card correspondingly acquires a firmware upgrading command issued by the host and executes the firmware upgrading command so as to directly read a firmware upgrading packet from the host memory buffer by calling a direct memory access (Direct Memory Access, DMA) interface and based on the initial address and the capacity of the host memory buffer, and then upgrade the original firmware stored in the local nonvolatile memory by utilizing the read firmware upgrading packet. The nonvolatile memory may be a FLASH memory.
It should be noted that, the firmware upgrade package stored in the host memory buffer area by the host may be an image file of the original firmware upgrade package, that is, the host performs image processing on the original firmware upgrade package to obtain an image firmware upgrade package, and then stores the image firmware upgrade package in the host memory buffer area. Therefore, the invention can recover the image firmware upgrade package by utilizing the original firmware upgrade package when the image firmware upgrade package stored in the host memory buffer is in error by carrying out the image processing on the original firmware upgrade package, thereby improving the safety of firmware upgrade.
Further, considering that the problems of loss, tampering, dislocation and the like may occur in the process of transmitting the firmware upgrade package from the host to the disk array card, in order to ensure the correctness of the firmware upgrade package, the invention performs abstract extraction and digital signature on the firmware upgrade package by adopting an SM3 algorithm (hash algorithm) and an SM2 algorithm (elliptic curve public key cryptographic algorithm) so as to ensure the correctness of the firmware upgrade package, thereby improving the safety and reliability of firmware upgrade.
Specifically, as shown in fig. 2, before storing the firmware upgrade package in the host memory buffer, the host firstly uses SM3 algorithm to abstract the firmware upgrade file to obtain target abstract information, then uses SM2 algorithm to sign the target abstract information with private key to obtain target signature value, and finally attaches the target signature value to the back of the firmware upgrade file to form the firmware upgrade package based on the firmware upgrade file and the target signature value, and then stores the firmware upgrade package in the host memory buffer.
The method comprises the steps that a firmware upgrading packet stored in a host memory buffer area is a data packet formed based on a firmware upgrading file and a target signature value, the target signature value is a signature value obtained by digitally signing target abstract information by using a private key, and the target abstract information is information obtained by abstracting the firmware upgrading file by a host.
Correspondingly, the disk array card directly reads the firmware upgrade package from the host memory buffer area by calling the direct memory access interface and based on the starting address and the capacity of the host memory buffer area by executing the firmware upgrade command issued by the host, then stores the read firmware upgrade package into a local memory unit (LMU, local Memory Unit), and performs signature verification on the read firmware upgrade package. If the read firmware upgrade package passes the verification, the read firmware upgrade package is characterized as a correct legal data package, and the read firmware upgrade package is migrated from the local storage unit to the local nonvolatile memory at the moment so as to upgrade the original firmware stored in the nonvolatile memory, thereby completing the whole firmware upgrade process. If the verification of the read firmware upgrading packet fails, the read firmware upgrading packet is characterized as an illegal data packet with errors, at the moment, the firmware upgrading packet stored in the local storage unit is deleted, prompt information of the firmware upgrading errors is sent to the user terminal, and the firmware upgrading packet can be read from the memory buffer area of the host again so as to try to upgrade the firmware again.
The process of signature verification of the read firmware upgrade package by the disk array card, as shown in fig. 3, specifically may include extracting a firmware upgrade file and a target signature value from the read firmware upgrade package by the disk array card, performing abstract extraction on the extracted firmware upgrade file by using an SM3 algorithm to obtain abstract information to be verified, performing public key signature verification on the extracted target signature value by using an SM2 algorithm to obtain target abstract information, then judging whether the abstract information to be verified is identical to the target abstract information, if the abstract information to be verified is identical to the target abstract information, determining that the read firmware upgrade package passes the verification, and that the read firmware upgrade package is a correct legal data package, and if the abstract information to be verified is not identical to the target abstract information, determining that the verification of the read firmware upgrade package fails, and that the read firmware upgrade package is an incorrect illegal data package.
It should be noted that, the disk array card needs to store the read firmware upgrade package to the local storage unit first, and then migrate the firmware upgrade package from the local storage unit to the nonvolatile memory after the firmware upgrade package passes the verification. Because the capacity of the nonvolatile memory is generally larger and the capacity of the local storage unit is generally smaller, the present invention needs to further consider the actual situation of the residual capacity of the local storage unit, so as to read the firmware upgrade package from the host memory buffer by adopting different data reading modes.
The method comprises the steps of acquiring a firmware upgrading command issued by a host, analyzing the firmware upgrading command by a disk array card to determine the data size of a firmware upgrading packet, judging whether the residual capacity in a local storage unit is not smaller than the data size of the firmware upgrading packet or not to determine a data reading mode based on a judging result, wherein the data reading mode is a whole packet reading mode if the residual capacity in the local storage unit is not smaller than the data size of the firmware upgrading packet, and the data reading mode is a sub-packet reading mode if the residual capacity in the local storage unit is smaller than the data size of the firmware upgrading packet. Further, after determining the data reading mode, the disk array card determines the host memory buffer area from the host by calling the direct memory access interface and based on the starting address and the capacity of the host memory buffer area, and then directly reads the firmware upgrade package from the host memory buffer area according to the data reading mode.
When the data reading mode is a whole-package reading mode, the disk array card directly reads a complete firmware upgrade package from a host memory buffer area according to the whole-package reading mode. When the data reading mode is a sub-packet reading mode, the disk array card needs to determine the sub-packet size corresponding to the sub-packet reading mode, and then sequentially reads sub-data packets with corresponding sizes from the host memory buffer according to the sub-packet size, wherein the sub-data packets are data packets split from the firmware upgrading packet.
Taking the firmware upgrade package as an example, if the data reading mode is a whole package reading mode, the disk array card needs to directly read the firmware upgrade package of 8MB from the host memory buffer according to the whole package reading mode. If the data reading mode is a sub-packet reading mode, the disk array card needs to determine the sub-packet size corresponding to the sub-packet reading mode, for example, 4MB, then split the sub-packet of 4MB from the firmware upgrade packet stored in the host memory buffer according to the sequence of the data, and read the sub-packet split this time to the local storage unit.
It should be noted that, for signature verification of each sub-packet read by the sub-packet, specifically, the whole packet signature and the thought of sub-packet verification are adopted to perform operation, specifically, after the disk array card reads the sub-packet read this time to the local storage unit, the sub-packet read this time is subjected to digest extraction by using the SM3 algorithm to obtain partial digest information, then the sub-packet read this time is migrated to the nonvolatile memory, so that the local storage unit can continuously store the sub-packet read next time, and so on, until the target signature value is read from the firmware upgrade packet, the read target signature value is subjected to public key verification by using the SM2 algorithm to obtain target digest information, then the digest information to be verified is determined based on the partial digest information corresponding to each sub-packet read before, and the identity of the digest information to be verified and the target digest information is judged, so that when the digest information to be verified and the target digest information are identical, the original firmware stored in the nonvolatile memory is upgraded based on each sub-packet. Therefore, the invention can still realize firmware upgrade when the residual capacity of the local storage unit is insufficient through the thought of whole package signature and sub-package verification, and can also ensure the correctness and the safety of the firmware upgrade package.
The method has the advantages that the host memory is used as the buffer area, and the firmware upgrading package is stored in the host memory buffer area, so that when the disk array card receives a firmware upgrading command issued by the host, the firmware upgrading package can be directly obtained from the host memory buffer area through the direct memory access interface and based on the high-speed serial bus to carry out firmware upgrading, the speed of transmitting the firmware upgrading package from the host to the disk array card is greatly improved, compared with two independent standard NVME ADMIN commands, the method can realize the downloading of the firmware upgrading package and the upgrading of the firmware only through one firmware upgrading command, reduces command interaction between the host and the disk array card, reduces communication burden between the host and the disk array card, correspondingly reduces consumption of system resources, and finally ensures that the method can improve the speed of firmware upgrading while using fewer system resources.
Referring to fig. 4 and 5, an embodiment of the present invention provides a firmware upgrade method, including:
In the power-on initialization stage, the disk array card performs function initialization on an internal controller, a firmware upgrading module, a local storage unit and a FLASH memory, and sets memory allocation capacity through the controller initialization. After initializing the internal driver, host memory and user configuration tool, the host queries the memory allocation capacity from the controller of the disk array card based on the identification of the disk array card through the driver, applies for a memory space with a corresponding size from the host memory based on the memory allocation capacity to serve as a host memory buffer zone, and then issues the starting address and capacity size of the host memory buffer zone to the controller in the disk array card so that the controller in the disk array card can store the starting address and capacity size of the host memory buffer zone.
After the host computer finishes applying for the host computer memory buffer, the user configuration tool sends the firmware upgrade package after encryption signature to the driver program, so that the driver program stores the firmware upgrade package after encryption signature into the host computer memory buffer. Meanwhile, the host computer can issue a firmware upgrading command to the driver through the user configuration tool, so that the driver can issue the firmware upgrading command to the controller in the disk array card.
The controller in the disk array card analyzes the received firmware upgrading command and informs the firmware upgrading module, so that the firmware upgrading module directly reads a firmware upgrading packet from a host memory buffer zone by calling a direct memory access interface and based on the initial address and the capacity of the host memory buffer zone, stores the read firmware upgrading packet into a local storage unit, and then performs signature verification on the read firmware upgrading packet. If the read firmware upgrading package passes the verification, the read firmware upgrading package is characterized as a correct legal data package, at the moment, the read firmware upgrading package is migrated from a local storage unit to a FLASH memory so as to upgrade the original firmware stored in the FLASH memory, and after the firmware upgrading is finished, the information of successful firmware upgrading is sent to a user configuration tool in the host through the controller so as to inform the host that the firmware upgrading is successful.
The method has the advantages that the host memory is used as the buffer area, and the firmware upgrading package is stored in the host memory buffer area, so that when the disk array card receives a firmware upgrading command issued by the host, the firmware upgrading package can be directly obtained from the host memory buffer area through the direct memory access interface and based on the high-speed serial bus to carry out firmware upgrading, the speed of transmitting the firmware upgrading package from the host to the disk array card is greatly improved, compared with two independent standard NVME ADMIN commands, the method can realize the downloading of the firmware upgrading package and the upgrading of the firmware only through one firmware upgrading command, reduces command interaction between the host and the disk array card, reduces communication burden between the host and the disk array card, correspondingly reduces consumption of system resources, and finally ensures that the method can improve the speed of firmware upgrading while using fewer system resources.
Referring to fig. 6, an embodiment of the present invention provides a firmware upgrade apparatus, which is applied to a disk array card, including:
The initialization module 11 is configured to set a memory allocation capacity by initialization, so that after the host queries the memory allocation capacity from the disk array card, the host applies for a memory space with a corresponding size from the host memory based on the memory allocation capacity as a host memory buffer area;
an obtaining module 12, configured to obtain a starting address and a capacity of a host memory buffer area issued by a host;
The firmware upgrade module 13 is configured to obtain and execute a firmware upgrade command issued by the host after the host stores the firmware upgrade packet in the host memory buffer, so as to directly read the firmware upgrade packet from the host memory buffer by calling the direct memory access interface and based on the starting address and the capacity of the host memory buffer, and upgrade the original firmware stored in the local nonvolatile memory by using the read firmware upgrade packet.
Since the embodiments of the device portion correspond to the above embodiments, the embodiments of the device portion are described with reference to the embodiments of the method portion, and are not described herein.
The method has the advantages that the host memory is used as the buffer area, and the firmware upgrading package is stored in the host memory buffer area, so that when the disk array card receives a firmware upgrading command issued by the host, the firmware upgrading package can be directly obtained from the host memory buffer area through the direct memory access interface and based on the high-speed serial bus to carry out firmware upgrading, the speed of transmitting the firmware upgrading package from the host to the disk array card is greatly improved, compared with two independent standard NVME ADMIN commands, the method can realize the downloading of the firmware upgrading package and the upgrading of the firmware only through one firmware upgrading command, reduces command interaction between the host and the disk array card, reduces communication burden between the host and the disk array card, correspondingly reduces consumption of system resources, and finally ensures that the method can improve the speed of firmware upgrading while using fewer system resources.
Further, the embodiment of the present application further discloses an electronic device, and fig. 7 is a block diagram of an electronic device according to an exemplary embodiment, where the content of the diagram is not to be considered as any limitation on the scope of use of the present application. The electronic device may comprise, in particular, at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input-output interface 25 and a communication bus 26. The memory 22 is used for storing a computer program, which is loaded and executed by the processor 21 to implement relevant steps in the firmware upgrade method disclosed in any of the foregoing embodiments. In addition, the electronic device in the present embodiment may be specifically an electronic computer.
In this embodiment, the power supply 23 is configured to provide working voltages for each hardware device on the electronic device, the communication interface 24 is configured to create a data transmission channel with an external device for the electronic device, and the communication protocol to be followed is any communication protocol applicable to the technical solution of the present application, which is not specifically limited herein, and the input/output interface 25 is configured to obtain external input data or output data to the outside, where the specific interface type may be selected according to the needs of the specific application, which is not specifically limited herein.
The memory 22 may be a carrier for storing resources, such as a read-only memory, a random access memory, a magnetic disk, or an optical disk, and the resources stored thereon may include an operating system 221, a computer program 222, and the like, and the storage may be temporary storage or permanent storage.
The operating system 221 is used for managing and controlling various hardware devices on the electronic device and the computer program 222, which may be Windows Server, netware, unix, linux, etc. The computer program 222 may further include a computer program that can be used to perform other specific tasks in addition to the computer program that can be used to perform the firmware upgrade method performed by the electronic device disclosed in any of the foregoing embodiments.
Furthermore, the application also discloses a computer readable storage medium for storing a computer program, wherein the computer program realizes the firmware upgrading method when being executed by a processor. For specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and no further description is given here.
Furthermore, the application also discloses a computer program product comprising a computer program/instruction, wherein the computer program/instruction realizes the firmware upgrading method when being executed by a processor. For specific steps of the method, reference may be made to the corresponding contents disclosed in the foregoing embodiments, and no further description is given here.
In this specification, each embodiment is described in a progressive manner, and each embodiment is mainly described in a different point from other embodiments, so that the same or similar parts between the embodiments are referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant points refer to the description of the method section.
Those of skill would further appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative elements and steps are described above generally in terms of functionality in order to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied directly in hardware, in a software module executed by a processor, or in a combination of the two. The software modules may be disposed in Random Access Memory (RAM), memory, read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
Finally, it is further noted that relational terms such as first and second, and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises an element.
While the foregoing has described in some detail the principles and embodiments of the present application with reference to specific examples, the foregoing examples are provided to facilitate an understanding of the principles and embodiments of the application and are provided by those skilled in the art to which the application pertains, and these should not be construed as limiting the application.
Claims (10)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202510617782.1A CN120469707A (en) | 2025-05-14 | 2025-05-14 | Firmware upgrade method, device, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202510617782.1A CN120469707A (en) | 2025-05-14 | 2025-05-14 | Firmware upgrade method, device, equipment and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN120469707A true CN120469707A (en) | 2025-08-12 |
Family
ID=96643357
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202510617782.1A Pending CN120469707A (en) | 2025-05-14 | 2025-05-14 | Firmware upgrade method, device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN120469707A (en) |
-
2025
- 2025-05-14 CN CN202510617782.1A patent/CN120469707A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10871953B2 (en) | Application update method and apparatus | |
US7543150B2 (en) | Method and system for setting up hosting environments in safety | |
US10162625B2 (en) | Vehicle control storage methods and systems | |
US7360073B1 (en) | Method and apparatus for providing a secure boot for a computer system | |
US7725701B2 (en) | Portable device comprising a BIOS setting | |
EP2192516A1 (en) | Method for upgrading antivirus software and terminal and system thereof | |
US8561087B2 (en) | Methods for enabling software in storage-capable devices | |
JP7134818B2 (en) | Generating checksums on trusted storage devices for accelerated authentication | |
US10437580B2 (en) | Software updating methods and systems | |
CN101751273A (en) | Safety guide device and method for embedded system | |
WO2008154862A1 (en) | Management method for intelligent terminal system and intelligent terminal | |
TW201106194A (en) | Integrity verification using a peripheral device | |
CN111045713A (en) | A computer system upgrade method, system and device | |
CN112241306B (en) | Firmware data loading method, device, security processor, chip and electronic equipment | |
WO2011088701A1 (en) | Method and device for online upgrading cross-platform version | |
CN108459866A (en) | Upgrade method, device, computer equipment, program product and storage medium | |
WO2018014798A1 (en) | Method and system for dynamically configuring plurality of cas of set-top box | |
US20090026275A1 (en) | Automatically configurable smart card and method of automatically configuring a smart card | |
CN119938106A (en) | A method for firmware upgrade with rollback capability | |
CN115640582A (en) | Method for upgrading signed firmware, electronic device and storage medium | |
CN114721693A (en) | Microprocessor, BIOS firmware update method, computer equipment and storage medium | |
CN113010195B (en) | System upgrading method, storage medium and terminal equipment | |
US20110185353A1 (en) | Mitigating Problems Arising From Incompatible Software | |
CN120469707A (en) | Firmware upgrade method, device, equipment and medium | |
CN108304206A (en) | Upgrade method, device, computer equipment, program product and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination |