CN111625265A - Method and device for reducing DRAM space consumption in firmware upgrade - Google Patents

Method and device for reducing DRAM space consumption in firmware upgrade Download PDF

Info

Publication number
CN111625265A
CN111625265A CN202010455997.5A CN202010455997A CN111625265A CN 111625265 A CN111625265 A CN 111625265A CN 202010455997 A CN202010455997 A CN 202010455997A CN 111625265 A CN111625265 A CN 111625265A
Authority
CN
China
Prior art keywords
firmware
img
information
command
complete
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.)
Granted
Application number
CN202010455997.5A
Other languages
Chinese (zh)
Other versions
CN111625265B (en
Inventor
汪汉国
冯元元
臧鑫
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Union Memory Information System Co Ltd
Original Assignee
Shenzhen Union Memory Information System Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Union Memory Information System Co Ltd filed Critical Shenzhen Union Memory Information System Co Ltd
Priority to CN202010455997.5A priority Critical patent/CN111625265B/en
Publication of CN111625265A publication Critical patent/CN111625265A/en
Application granted granted Critical
Publication of CN111625265B publication Critical patent/CN111625265B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • 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
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Memory System (AREA)
  • Stored Programmes (AREA)

Abstract

The application relates to a method, a device, a computer device and a storage medium for reducing DRAM space consumption in firmware upgrading, wherein the method comprises the following steps: before a host computer issues a firmware upgrading command, dividing the complete firmware into a plurality of pieces of IMG information; the host computer sequentially issues a plurality of firmware downloading commands, and each firmware downloading command carries one piece of IMG information; carrying the IMG information from the host memory to a Local _ buf in the DRAM, and writing the IMG information into a cache region of the NAND; repeatedly executing the steps of carrying and writing until all IMG information contained in the complete firmware is downloaded; reading IMG information from the buffer area in sequence, and copying the read IMG information to FW _ ROOT _ BUF applied by the FTL in sequence; and repeating the step of reading the copy until all IMG information contained in the complete firmware is read. The invention reduces DRAM space consumption in the firmware upgrading process.

Description

Method and device for reducing DRAM space consumption in firmware upgrade
Technical Field
The invention relates to the technical field of solid state disks, in particular to a method and a device for reducing DRAM space consumption in firmware upgrading, computer equipment and a storage medium.
Background
With the price drop of the solid state disk, the solid state disk is more and more popular, the NVMe SSD is called SSD for short, the development is more rapid due to the superior performance of the SSD, and various computer manufacturers make the NVMe SSD into the hard disk, so that better experience is provided for users from the aspects of reliability and performance.
At present, in the conventional technology, two buffer spaces (larger than the size of firmware) need to be allocated in the DRAM when the firmware is upgraded. One is Local _ BUF for caching the entire firmware information of the firmware download command, and the other is ROOT _ FW _ BUF managed by the FTL. The firmware is copied from Local _ BUF to ROOT _ FW _ BUF when the firmware is activated, and the NFC module finally writes the firmware into NAND from this buffer. Obviously, the firmware upgrading method in the conventional technology has the disadvantage that the larger the firmware is, the larger the required DRAM space is, however, the space of the DRAM is limited and precious, so that the traditional firmware upgrading method wastes precious DRAM space.
Disclosure of Invention
In view of the above, it is necessary to provide a method, an apparatus, a computer device and a storage medium for reducing DRAM space consumption in firmware upgrade.
A method of enabling reduced DRAM space consumption in a firmware upgrade, the method comprising:
before a host computer issues a firmware upgrading command, dividing the complete firmware into a plurality of pieces of IMG information;
the host computer sequentially issues a plurality of firmware downloading commands, and each firmware downloading command carries one piece of IMG information;
acquiring a firmware downloading command issued by the host, carrying the carried IMG information from the memory of the host to a Local _ buf in a DRAM (dynamic random access memory), and writing the IMG information as user data into a cache area of the NAND by an NFC (near field communication) module;
repeatedly executing the steps of carrying and writing until all IMG information contained in the complete firmware is downloaded;
acquiring a firmware activation command issued by the host, reading IMG information from the cache region by the NFC module in sequence, and copying the read IMG information to FW _ ROOT _ BUF applied by the FTL in sequence;
and repeating the step of reading the copy until all IMG information contained in the complete firmware is read, and forming the IMG information into the complete firmware in the FW _ ROOT _ BUF.
In one embodiment, the step of dividing the complete firmware into multiple pieces of IMG information before the host issues the firmware upgrade command further includes:
the method comprises the steps that a host computer prepares to issue a firmware upgrading command, wherein the firmware upgrading command comprises a firmware downloading command and a firmware activating command;
partitioning the complete firmware into multiple pieces of IMG information according to 128KB size;
and issuing a plurality of firmware downloading commands in sequence, wherein each firmware downloading command carries one copy of the IMG information.
In one embodiment, after the step of writing the IMG information as user data into the buffer area of the NAND by the NFC module, the method further includes:
judging whether all IMG information contained in the complete firmware is completely downloaded;
if all the downloading is finished, the host computer issues a firmware activation command;
and if not, continuing to execute the step of carrying and writing until the IMG information contained in the complete firmware is completely downloaded.
In one embodiment, after the step of repeatedly executing the step of reading the copy until all IMG information included in the complete firmware is read, and forming the IMG information into the complete firmware in the FW _ ROOT _ BUF, the method further includes:
and the NFC module writes the complete firmware into a fixed address stored by the firmware in the NAND.
An apparatus to enable reducing DRAM space consumption in a firmware upgrade, the apparatus comprising:
the firmware segmentation module is used for segmenting the complete firmware into a plurality of pieces of IMG information before the host computer issues a firmware upgrading command;
the command issuing module is used for the host to issue a plurality of firmware downloading commands in sequence, and each firmware downloading command carries one piece of IMG information;
the system comprises a carrying and writing module, an NFC module and a NAND cache area, wherein the carrying and writing module is used for acquiring a firmware downloading command issued by the host and carrying the IMG information from the memory of the host to a Local _ buf in the DRAM, and the NFC module takes the IMG information as user data to be written into the NAND cache area;
the first repeating module is used for repeatedly executing the steps of carrying and writing until all IMG information contained in the complete firmware is downloaded;
the NFC module reads IMG information from the cache region in sequence and copies the read IMG information to FW _ ROOT _ BUF applied by the FTL in sequence;
and the second repeating module is used for repeatedly executing the step of reading the copy until all IMG information contained in the complete firmware is read, and forming the IMG information into the complete firmware in the FW _ ROOT _ BUF.
In one embodiment, the firmware partitioning module is further configured to:
the method comprises the steps that a host computer prepares to issue a firmware upgrading command, wherein the firmware upgrading command comprises a firmware downloading command and a firmware activating command;
partitioning the complete firmware into multiple pieces of IMG information according to 128KB size;
and issuing a plurality of firmware downloading commands in sequence, wherein each firmware downloading command carries one copy of the IMG information.
In one embodiment, the apparatus further includes a determining module, configured to:
judging whether all IMG information contained in the complete firmware is completely downloaded;
if all the downloading is finished, the host computer issues a firmware activation command;
and if not, continuing to execute the step of carrying and writing until the IMG information contained in the complete firmware is completely downloaded.
In one embodiment, the apparatus further comprises a firmware writing module configured to:
and the NFC module writes the complete firmware into a fixed address stored by the firmware in the NAND.
A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of any of the above methods when executing the computer program.
A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of any of the methods described above.
Before the host issues a firmware upgrading command, the method, the device, the computer equipment and the storage medium for reducing DRAM space consumption in firmware upgrading divide the complete firmware into a plurality of pieces of IMG information; the host computer sequentially issues a plurality of firmware downloading commands, and each firmware downloading command carries one piece of IMG information; carrying the IMG information from the memory of the host to a Local _ buf in the DRAM, and writing the IMG information as user data into a cache area of the NAND by the NFC module; repeatedly executing the steps of carrying and writing until all IMG information contained in the complete firmware is downloaded; the NFC module reads IMG information from the buffer area in sequence and copies the read IMG information to FW _ ROOT _ BUF applied by the FTL in sequence; and repeating the step of reading the copy until all IMG information contained in the complete firmware is read, and forming the IMG information into the complete firmware in the FW _ ROOT _ BUF. The invention cuts the complete firmware into a plurality of IMG information which is not cached in Local _ BUF uniformly, but is written into NAND as user data after each downloading, and then read into ROOT _ FW _ BUF from NAND when the firmware is activated. The distributed Local _ buf space only needs to be capable of buffering data carried by a single download command, so that the whole DRAM space consumption is reduced by nearly 50%.
Drawings
Fig. 1 is a block diagram illustrating an upgrade process for upgrading firmware in the conventional art;
FIG. 2 is a block diagram of an upgrade process for upgrading firmware according to the present invention;
FIG. 3 is a flow diagram illustrating a method for reducing DRAM space consumption in a firmware upgrade, according to one embodiment;
FIG. 4 is a flow chart illustrating a method for reducing DRAM space consumption during firmware upgrade according to another embodiment;
FIG. 5 is a flow chart illustrating a method for reducing DRAM space consumption in a firmware upgrade according to yet another embodiment;
FIG. 6 is a flow chart illustrating a method for reducing DRAM space consumption in a firmware upgrade according to another embodiment;
FIG. 7 is a block diagram of an apparatus to implement reduced DRAM space consumption in a firmware upgrade in one embodiment;
FIG. 8 is a block diagram of an apparatus for reducing DRAM space consumption in a firmware upgrade in another embodiment;
FIG. 9 is a block diagram of an apparatus for implementing reduced DRAM space consumption in a firmware upgrade in yet another embodiment;
FIG. 10 is a diagram showing an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
As shown in fig. 1, it is a block diagram of an upgrade process for upgrading firmware in the conventional technology, and during the conventional firmware upgrade, two buffer spaces (larger than the size of the firmware) need to be allocated in the DRAM. One is Local _ BUF for caching the entire firmware information of the firmware download command, the other is ROOT _ FW _ BUF managed by the FTL, and the firmware is copied from the Local _ BUF to the ROOT _ FW _ BUF when the firmware is activated. The NFC module finally writes the firmware into the NAND from this buffer. The disadvantage of this approach is that the larger the firmware, the more DRAM space is required, which is, however, limited and valuable.
For a more clear description of the context of the invention, the relevant terms are explained as follows:
DRAM is dynamic random access memory.
Local _ buf: one end of the allocated continuous buffer space in the DRAM is used for receiving data sent by the host.
ROOT _ FW _ BUF: the FTL manages the contiguous memory space allocated in the DRAM to store the firmware information.
FTL (Flash translation layer) Flash translation layer.
Based on this, the present invention optimizes the traditional firmware upgrading method, referring to the upgrading process shown in fig. 2. The plurality of pieces of IMG information after the firmware cutting are not cached in Local _ buf uniformly, but the IMG information is written into the NAND as user data every time a command is downloaded. When the firmware is activated, the firmware is read from the NAND to the ROOT _ FW _ BUF. The distributed local _ buf space only needs to cache data carried by a single download command, and the space consumption of the DRAM is saved.
In one embodiment, as shown in fig. 3, there is provided a method for reducing DRAM space consumption in firmware upgrade, the method comprising:
step 302, before the host computer issues a firmware upgrading command, dividing the complete firmware into a plurality of pieces of IMG information;
step 304, the host computer sequentially issues a plurality of firmware downloading commands, and each firmware downloading command carries one piece of IMG information;
step 306, acquiring a firmware downloading command issued by the host, carrying the IMG information from the memory of the host to a Local _ buf in the DRAM, and writing the IMG information as user data into a cache area of the NAND by the NFC module;
step 308, repeating the above steps of carrying and writing until all the IMG information contained in the complete firmware is downloaded;
step 310, acquiring a firmware activation command issued by a host, reading, by the NFC module, IMG information from the cache region in sequence, and copying the read IMG information to FW _ ROOT _ BUF applied by the FTL in sequence;
step 312, the above-mentioned step of reading copy is repeatedly executed until all IMG information contained in the complete firmware is read, and the IMG information is composed into the complete firmware in FW _ ROOT _ BUF.
In this embodiment, a method for reducing DRAM space consumption in firmware upgrade is provided, where the method may be applied to the block diagram shown in fig. 2, and specifically includes the following implementation processes:
first, before the host issues a firmware upgrade command, the complete firmware is divided into multiple pieces of IMG information. Specifically, for example, the complete firmware may be split into multi-component IMG information in a fixed size. And then, the host computer sequentially issues a plurality of firmware downloading commands, each firmware downloading command carries a piece of different IMG information, and the IMG information carried by all the firmware downloading commands can be completely assembled into the original complete firmware.
And then, acquiring a firmware downloading command issued by the host, and transferring the carried IMG information from the memory of the host to a Local _ buf in the DRAM. And then, the FTL issues an internal write command, and the IMG information is written into a cache area of the NAND as user data through the NFC module. And repeating the steps of carrying and writing until all the IMG information contained in the complete firmware is downloaded.
The host then issues a firmware activation command. When a firmware activation command issued by a host is acquired, an FTL issues an internal read command, IMG information is sequentially read from a cache region through an NFC module, and the read IMG information is sequentially copied to FW _ ROOT _ BUF applied by the FTL. And repeating the step of reading the copy until all IMG information contained in the complete firmware is read.
Finally, the IMG information is composed into complete firmware in FW _ ROOT _ BUF.
In an embodiment, after the step of repeatedly executing the step of reading the copy until all IMG information contained in the complete firmware is read, and the step of combining the IMG information into the complete firmware in the FW _ ROOT _ BUF further includes: and the NFC module writes the complete firmware into a fixed address stored in the NAND firmware.
In this embodiment, after the complete Firmware is assembled, the NFC module writes the complete Firmware in FW _ ROOT _ BUF into a Block fixedly stored in Firmware in the NAND.
In the above embodiment, before the host issues the firmware upgrade command, the complete firmware is divided into multiple pieces of IMG information; the host computer sequentially issues a plurality of firmware downloading commands, and each firmware downloading command carries one piece of IMG information; carrying the IMG information from the memory of the host to a Local _ buf in the DRAM, and writing the IMG information as user data into a cache area of the NAND by the NFC module; repeatedly executing the steps of carrying and writing until all IMG information contained in the complete firmware is downloaded; the NFC module reads IMG information from the buffer area in sequence and copies the read IMG information to FW _ ROOT _ BUF applied by the FTL in sequence; and repeating the step of reading the copy until all IMG information contained in the complete firmware is read, and forming the IMG information into the complete firmware in the FW _ ROOT _ BUF. According to the scheme, the IMG information obtained by cutting the complete firmware is not uniformly cached in the Local _ BUF, but is written into the NAND as user data after being downloaded every time, and is read into the ROOT _ FW _ BUF from the NAND when the firmware is activated. The distributed Local _ buf space only needs to be capable of buffering data carried by a single download command, so that the whole DRAM space consumption is reduced by nearly 50%.
In one embodiment, as shown in fig. 4, a method for reducing DRAM space consumption in firmware upgrade is provided, in which before issuing a firmware upgrade command by a host, the step of dividing the complete firmware into multiple pieces of IMG information further includes:
step 402, a host prepares to issue a firmware upgrading command, wherein the firmware upgrading command comprises a firmware downloading command and a firmware activating command;
step 404, dividing the complete firmware into multiple pieces of IMG information according to the size of 128 KB;
and 406, issuing a plurality of firmware downloading commands in sequence, wherein each firmware downloading command carries one piece of IMG information.
In this embodiment, a method for reducing DRAM space consumption in firmware upgrade is provided, where the method further includes an implementation step of splitting firmware before a host issues an upgrade command, and specifically includes:
first, the host prepares to issue a firmware upgrade command, wherein the firmware upgrade command is divided into a firmware download and a firmware activation command. At the same time, the host slices the full firmware into multiple copies of IMG information in 128KB size. The host then issues firmware download commands, each carrying a 128KB copy of IMG information, all of which can be assembled together into the original complete firmware. This has the advantage that only 128KB of IMG information needs to be subsequently moved from the host memory to the local _ buf space in the DRAM, and then written directly into the NAND as user data. Therefore, the local _ buf space only needs to be capable of caching the data carried by a single download command, and the space saving of the DRAM is realized.
In one embodiment, as shown in fig. 5, a method for reducing DRAM space consumption in firmware upgrade is provided, which further includes, after the step of writing the IMG information as user data in the buffer area of the NAND by the NFC module:
step 502, judging whether all IMG information contained in the complete firmware is completely downloaded;
step 504, if all the downloads are finished, the host issues a firmware activation command;
step 506, if not all the IMG information has been downloaded, the above-mentioned step of carrying and writing is continuously executed until all the IMG information included in the complete firmware is downloaded.
In this embodiment, a method for reducing DRAM space consumption in firmware upgrade is provided, and a complete implementation process is shown in fig. 6, and includes the following steps:
1. the host computer prepares to issue firmware upgrading commands, which are divided into firmware downloading and firmware activating commands.
2. The host slices the complete firmware into multiple copies of IMG information in 128KB size.
3. The host issues firmware download commands, each carrying a 128KB copy of IMG information.
4. The Device handles 128KB of IMG information from the host memory to local _ buf in the DRAM.
5. And the FTL issues an internal write command, and the NFC module writes the IMG information into the NAND for caching as user data.
6. And repeating the processes 3-5 until the firmware is completely downloaded and writing the firmware into the temporary cache area in the NAND.
7. The host issues a firmware activation command.
8. And the FTL issues an internal read command, and the NFC module reads the IMG information from the NAND cache area.
9. And copying the read IMG information into FW _ ROOT _ BUF applied by the FTL in sequence.
10. And repeating the processes 8-9 until all IMG information is read, and forming continuous complete firmware in the FW _ ROOT _ BUF.
11. And the NFC module writes the complete Firmware in the FW _ ROOT _ BUF into a Block fixedly stored by Firmware in the NAND.
It should be understood that although the various steps in the flow charts of fig. 3-6 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 3-6 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternating with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in fig. 7, there is provided an apparatus 700 for reducing DRAM space consumption in firmware upgrade, the apparatus comprising:
a firmware dividing module 701, configured to divide the complete firmware into multiple pieces of IMG information before the host issues the firmware upgrade command;
a command issuing module 702, configured to issue, by a host, a plurality of firmware downloading commands in sequence, where each firmware downloading command carries one piece of IMG information;
a carrying and writing module 703, configured to acquire a firmware downloading command issued by the host, carry the IMG information from the host memory to a Local _ buf in the DRAM, and write the IMG information as user data into a NAND cache region by the NFC module;
a first repeating module 704, configured to repeat the step of carrying and writing until all IMG information included in the complete firmware is downloaded;
the read copy module 705 is configured to acquire a firmware activation command issued by the host, and the NFC module sequentially reads the IMG information from the cache region and sequentially copies the read IMG information to the FW _ ROOT _ BUF applied by the FTL;
a second repeating module 706, configured to repeatedly execute the step of reading the copy until all IMG information included in the complete firmware is read, and form the IMG information into the complete firmware in FW _ ROOT _ BUF.
In one embodiment, the firmware partitioning module 701 is further configured to:
the method comprises the steps that a host computer prepares to issue a firmware upgrading command, wherein the firmware upgrading command comprises a firmware downloading command and a firmware activating command;
partitioning the complete firmware into multiple pieces of IMG information according to 128KB size;
and issuing a plurality of firmware downloading commands in sequence, wherein each firmware downloading command carries one copy of the IMG information.
In one embodiment, as shown in fig. 8, an apparatus 700 for reducing DRAM space consumption in firmware upgrade is provided, the apparatus further comprising a determining module 707 for:
judging whether all IMG information contained in the complete firmware is completely downloaded;
if all the downloading is finished, the host computer issues a firmware activation command;
and if not, continuing to execute the step of carrying and writing until the IMG information contained in the complete firmware is completely downloaded.
In one embodiment, as shown in fig. 9, an apparatus 700 for reducing DRAM space consumption in firmware upgrade is provided, the apparatus further comprising a firmware writing module 708 for:
and the NFC module writes the complete firmware into a fixed address stored by the firmware in the NAND.
For specific limitations of the apparatus for reducing DRAM space consumption in firmware upgrade, reference may be made to the above limitations of the method for reducing DRAM space consumption in firmware upgrade, and details thereof are not repeated here.
In one embodiment, a computer device is provided, the internal structure of which may be as shown in FIG. 10. The computer apparatus includes a processor, a memory, and a network interface connected by a device bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The nonvolatile storage medium stores an operating device, a computer program, and a database. The internal memory provides an environment for the operation device in the nonvolatile storage medium and the execution of the computer program. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a method of reducing DRAM space consumption in a firmware upgrade.
Those skilled in the art will appreciate that the architecture shown in fig. 10 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor implementing the steps of the above method embodiments when executing the computer program.
In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the above respective method embodiments.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for implementing reduced DRAM space consumption in a firmware upgrade, the method comprising:
before a host computer issues a firmware upgrading command, dividing the complete firmware into a plurality of pieces of IMG information;
the host computer sequentially issues a plurality of firmware downloading commands, and each firmware downloading command carries one piece of IMG information;
acquiring a firmware downloading command issued by the host, carrying the carried IMG information from the memory of the host to a Local _ buf in a DRAM (dynamic random access memory), and writing the IMG information as user data into a cache area of the NAND by an NFC (near field communication) module;
repeatedly executing the steps of carrying and writing until all IMG information contained in the complete firmware is downloaded;
acquiring a firmware activation command issued by the host, reading IMG information from the cache region by the NFC module in sequence, and copying the read IMG information to FW _ ROOT _ BUF applied by the FTL in sequence;
and repeating the step of reading the copy until all IMG information contained in the complete firmware is read, and forming the IMG information into the complete firmware in the FW _ ROOT _ BUF.
2. The method of claim 1, wherein the step of dividing the complete firmware into multiple pieces of IMG information before the host issues the firmware upgrade command further comprises:
the method comprises the steps that a host computer prepares to issue a firmware upgrading command, wherein the firmware upgrading command comprises a firmware downloading command and a firmware activating command;
partitioning the complete firmware into multiple pieces of IMG information according to 128KB size;
and issuing a plurality of firmware downloading commands in sequence, wherein each firmware downloading command carries one copy of the IMG information.
3. The method for reducing the space consumption of the DRAM in the firmware upgrade as claimed in claim 2, further comprising after the step of writing the IMG information as user data into the cache area of the NAND by the NFC module:
judging whether all IMG information contained in the complete firmware is completely downloaded;
if all the downloading is finished, the host computer issues a firmware activation command;
and if not, continuing to execute the step of carrying and writing until the IMG information contained in the complete firmware is completely downloaded.
4. The method of any of claims 1-3, wherein after the step of repeatedly performing the step of reading the copy until all IMG information contained in the complete firmware is read, and composing the IMG information into the complete firmware in FW _ ROOT _ BUF, the method further comprises:
and the NFC module writes the complete firmware into a fixed address stored by the firmware in the NAND.
5. An apparatus for implementing reduced DRAM space consumption in a firmware upgrade, the apparatus comprising:
the firmware segmentation module is used for segmenting the complete firmware into a plurality of pieces of IMG information before the host computer issues a firmware upgrading command;
the command issuing module is used for the host to issue a plurality of firmware downloading commands in sequence, and each firmware downloading command carries one piece of IMG information;
the system comprises a carrying and writing module, an NFC module and a NAND cache area, wherein the carrying and writing module is used for acquiring a firmware downloading command issued by the host and carrying the IMG information from the memory of the host to a Local _ buf in the DRAM, and the NFC module takes the IMG information as user data to be written into the NAND cache area;
the first repeating module is used for repeatedly executing the steps of carrying and writing until all IMG information contained in the complete firmware is downloaded;
the NFC module reads IMG information from the cache region in sequence and copies the read IMG information to FW _ ROOT _ BUF applied by the FTL in sequence;
and the second repeating module is used for repeatedly executing the step of reading the copy until all IMG information contained in the complete firmware is read, and forming the IMG information into the complete firmware in the FW _ ROOT _ BUF.
6. The apparatus for implementing reduced DRAM space consumption in firmware upgrade according to claim 5, wherein the firmware partitioning module is further configured to:
the method comprises the steps that a host computer prepares to issue a firmware upgrading command, wherein the firmware upgrading command comprises a firmware downloading command and a firmware activating command;
partitioning the complete firmware into multiple pieces of IMG information according to 128KB size;
and issuing a plurality of firmware downloading commands in sequence, wherein each firmware downloading command carries one copy of the IMG information.
7. The apparatus for implementing reduction of DRAM space consumption in firmware upgrade according to claim 6, further comprising a determining module for:
judging whether all IMG information contained in the complete firmware is completely downloaded;
if all the downloading is finished, the host computer issues a firmware activation command;
and if not, continuing to execute the step of carrying and writing until the IMG information contained in the complete firmware is completely downloaded.
8. The apparatus for implementing reduction of DRAM space consumption in firmware upgrade according to any of claims 5-7, wherein the apparatus further comprises a firmware writing module for:
and the NFC module writes the complete firmware into a fixed address stored by the firmware in the NAND.
9. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the steps of the method of any of claims 1 to 4 are implemented when the computer program is executed by the processor.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 4.
CN202010455997.5A 2020-05-26 2020-05-26 Method and device for reducing DRAM space consumption in firmware upgrade Active CN111625265B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010455997.5A CN111625265B (en) 2020-05-26 2020-05-26 Method and device for reducing DRAM space consumption in firmware upgrade

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010455997.5A CN111625265B (en) 2020-05-26 2020-05-26 Method and device for reducing DRAM space consumption in firmware upgrade

Publications (2)

Publication Number Publication Date
CN111625265A true CN111625265A (en) 2020-09-04
CN111625265B CN111625265B (en) 2023-07-04

Family

ID=72271116

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010455997.5A Active CN111625265B (en) 2020-05-26 2020-05-26 Method and device for reducing DRAM space consumption in firmware upgrade

Country Status (1)

Country Link
CN (1) CN111625265B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090249320A1 (en) * 2008-04-01 2009-10-01 Mstar Semiconductor, Inc. Display Control Device Capable of Automatically Updating Firmware and Method Thereof
CN103064692A (en) * 2011-10-19 2013-04-24 北京市三希电子科技开发公司 Firmware update method and firmware update device
WO2014059613A1 (en) * 2012-10-17 2014-04-24 华为技术有限公司 Method for reducing consumption of memory system and memory controller
CN103810126A (en) * 2014-01-27 2014-05-21 上海新储集成电路有限公司 Mixed DRAM storage and method of reducing refresh power consumption of DRAM storage
US20150242202A1 (en) * 2014-02-24 2015-08-27 Samsung Electronics Co., Ltd. Method of updating firmware of memory device including memory and controller
US9176671B1 (en) * 2011-04-06 2015-11-03 P4tents1, LLC Fetching data between thread execution in a flash/DRAM/embedded DRAM-equipped system
US20180067800A1 (en) * 2016-09-07 2018-03-08 Sandisk Technologies Llc System and method for protecting firmware integrity in a multi-processor non-volatile memory system
CN110704084A (en) * 2019-09-27 2020-01-17 深圳忆联信息系统有限公司 Method and device for dynamically allocating memory in firmware upgrade, computer equipment and storage medium
CN110704091A (en) * 2019-09-20 2020-01-17 苏州浪潮智能科技有限公司 Firmware upgrading method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090249320A1 (en) * 2008-04-01 2009-10-01 Mstar Semiconductor, Inc. Display Control Device Capable of Automatically Updating Firmware and Method Thereof
US9176671B1 (en) * 2011-04-06 2015-11-03 P4tents1, LLC Fetching data between thread execution in a flash/DRAM/embedded DRAM-equipped system
CN103064692A (en) * 2011-10-19 2013-04-24 北京市三希电子科技开发公司 Firmware update method and firmware update device
WO2014059613A1 (en) * 2012-10-17 2014-04-24 华为技术有限公司 Method for reducing consumption of memory system and memory controller
CN103810126A (en) * 2014-01-27 2014-05-21 上海新储集成电路有限公司 Mixed DRAM storage and method of reducing refresh power consumption of DRAM storage
US20150242202A1 (en) * 2014-02-24 2015-08-27 Samsung Electronics Co., Ltd. Method of updating firmware of memory device including memory and controller
US20180067800A1 (en) * 2016-09-07 2018-03-08 Sandisk Technologies Llc System and method for protecting firmware integrity in a multi-processor non-volatile memory system
CN110704091A (en) * 2019-09-20 2020-01-17 苏州浪潮智能科技有限公司 Firmware upgrading method and device
CN110704084A (en) * 2019-09-27 2020-01-17 深圳忆联信息系统有限公司 Method and device for dynamically allocating memory in firmware upgrade, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
于振生等: ""LZMA 压缩算法在固件下载升级中的应用"", vol. 29, no. 29, pages 135 - 137 *

Also Published As

Publication number Publication date
CN111625265B (en) 2023-07-04

Similar Documents

Publication Publication Date Title
US20210132942A1 (en) Software updating
CN108170460B (en) Method and device for upgrading increment of embedded system
US8418167B2 (en) Methods and systems for updating content including a compressed version
CN106354615B (en) Solid state disk log generation method and device
US9563375B2 (en) Method for storing metadata of log-structured file system for flash memory
US20100174853A1 (en) User device including flash and random write cache and method writing data
CN110297603B (en) Method and device for improving random writing performance based on solid state disk and computer equipment
US20170336992A1 (en) Method, device, and program for managing a flash memory for mass storage
US20090037648A1 (en) Input/output control method and apparatus optimized for flash memory
US20110093437A1 (en) Method and system for generating a space-efficient snapshot or snapclone of logical disks
CN110568998A (en) trim command implementation method and device based on solid state disk and computer equipment
CN104636414A (en) Method of providing access to an updated file and computer performing the same
KR100746198B1 (en) Apparatus and method for storing data, and readable recording medium thereof
US20190220272A1 (en) Binary image differential patching
CN111241791A (en) Editing method and device of webpage text, computer equipment and storage medium
US20070162707A1 (en) Information recording medium data processing apparatus and data recording method
CN111090701B (en) Service request processing method, device, readable storage medium and computer equipment
CN111625265B (en) Method and device for reducing DRAM space consumption in firmware upgrade
KR20090053487A (en) Method of demand paging for codes which requires real time response and terminal
CN109634875A (en) Order data method for caching and processing, device, computer equipment and storage medium
CN112860287A (en) System program upgrading method and device, computer equipment and storage medium
CN110286995B (en) Data reading and writing method and device
CN112579004A (en) Method, system, computer equipment and storage medium for quickly deleting flash data
CN113986318A (en) Firmware upgrading method and device based on solid state disk, computer equipment and storage medium
CN113986126B (en) TCG data deleting method and device based on solid state disk and computer equipment

Legal Events

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