CN113110891A - Firmware loading method and device for solid state disk, computer equipment and storage medium - Google Patents
Firmware loading method and device for solid state disk, computer equipment and storage medium Download PDFInfo
- Publication number
- CN113110891A CN113110891A CN202110431701.0A CN202110431701A CN113110891A CN 113110891 A CN113110891 A CN 113110891A CN 202110431701 A CN202110431701 A CN 202110431701A CN 113110891 A CN113110891 A CN 113110891A
- Authority
- CN
- China
- Prior art keywords
- program
- bootloader
- full
- firmware
- sram
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44521—Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Stored Programmes (AREA)
Abstract
The application relates to a firmware loading method and device for a solid state disk, computer equipment and a storage medium, wherein the method comprises the following steps: reading the whole system management information in the NandFlash to a first address appointed by the SRAM; finding the position of a BootLoader program in the NandFlash from the full system management information, and loading the BootLoader program to a second address appointed by the SRAM; jumping to a second address appointed by the SRAM by the BootRom program and operating a BootLoader program; the BootLoader program finds the storage position of a system data full-system firmware program in the NandFlash from the full-system management information at the first address specified by the SRAM, and loads the full-system firmware program to the third address specified by the SRAM; and jumping to a third address appointed by the SRAM by the BootLoader program, and operating the full-system firmware program. The method avoids the risk that the SSD becomes a waste disk due to failure of loading the BootLoader.
Description
Technical Field
The invention relates to the technical field of solid state disks, in particular to a firmware loading method and device of a solid state disk, computer equipment and a storage medium.
Background
Computer equipment has become the most powerful practical tool for people to generate, Solid State disks are more and more popular with the price drop of the Solid State disks, NVMe SSD (Solid State Disk or Solid State Drive) is developed rapidly with the superior performance, and all computer manufacturers make the hard disks in the computer equipment into the SSD.
Currently, the process for implementing SSD firmware loading in the conventional technology is: and powering on the SSD to run a BootRom program, reading a BootLoader program from a NandFlash fixed block/page address by BootRom, running the BootLoader program, and loading the whole system firmware after the BootLoader program is run, thereby realizing the loading of the whole system firmware. In the implementation process, the fixed block/page for storing the BootLoader in the NandFlash is required to have good stability, and in addition, the BootRom program is fixed in the ROM and is not modifiable, so that once the BootLoader is read and fails, the SSD is easily turned into a waste disk due to failure of loading the firmware. Meanwhile, since blocks with better stability of the NandFlash particles with different protocols and different models are not generally uniform, SSD manufacturers are required to select blocks with better stability for different particles as much as possible to store BootLoader programs, so as to ensure that BootRom can correctly read the BootLoader programs from the fixed blocks, that is, the BootRom programs of the current SSD have poor compatibility with the NandFlash particles.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a firmware loading method and apparatus for a solid state disk, a computer device, and a storage medium.
A firmware loading method of a solid state disk comprises the following steps:
after the solid state disk is powered on and started, a BootRom program is operated, and a NandFlash controller is initialized through the BootRom program;
reading the whole system management information in the NandFlash to a first address appointed by the SRAM;
finding the position of a BootLoader program in the NandFlash from the full system management information, and loading the BootLoader program to a second address appointed by the SRAM;
performing CRC on the BootLoader program;
if the BootLoader program is verified successfully, the BootRom program jumps to a second address appointed by the SRAM and runs the BootLoader program;
the BootLoader program finds the storage position of a system data full-system firmware program in the NandFlash from the full-system management information at the first address specified by the SRAM, and loads the full-system firmware program to the third address specified by the SRAM;
performing CRC on the full-system firmware program;
and if the full-system firmware program is successfully verified, jumping to a third address appointed by the SRAM by the BootLoader program, and operating the full-system firmware program.
In one embodiment, after the step of reading the system-wide management information in the NandFlash to the first address specified by the SRAM, the method further comprises:
judging whether the read of the whole system management information in the NandFlash is successful or not;
if the reading fails, the BootRom program outputs first error information to an internal designated register and enters a BootRom downloading mode;
and if the reading is successful, finding the position of the BootLoader program in the NandFlash from the full system management information and loading the BootLoader program to a second address appointed by the SRAM.
In one embodiment, after the step of performing CRC check on the BootLoader program, the method further includes:
and if the BootLoader program fails to be read or the check fails, the BootRom program outputs second error information to an internal designated register and enters a BootRom downloading mode.
In one embodiment, after the step of performing CRC check on the system-wide firmware program, the method further includes:
if the process of reading the whole system firmware fails or the verification fails, the BootLoader program outputs third error information to an internal designated register and enters a BootLoader downloading mode.
In one embodiment, the method further comprises:
after the solid state disk is powered on and started, the BootRom program is operated, and a downloading mode is waited to enter;
downloading a mass production program to an appointed address of an SRAM (static random access memory), and jumping to the appointed address to enable the mass production program to run;
the mass production program executes a low-level command and initializes the management information of the whole system;
the mass production program executes a command of downloading a BootLoader program, applies a storage position in the NandFlash to store the BootLoader program, and updates the position information stored by the BootLoader program into the management information of the whole system;
and the mass production program executes a command of downloading the whole system firmware, applies for a storage position in the NandFlash to store the whole system firmware, and updates the position information stored in the whole system firmware into the whole system management information.
An apparatus for loading firmware of a solid state disk, the apparatus comprising:
the initialization module is used for running a BootRom program after the solid state disk is powered on and started, and initializing the NandFlash controller through the BootRom program;
the information reading module is used for reading the full system management information in the NandFlash to a first address appointed by the SRAM;
the first loading module is used for finding the position of a BootLoader program in NandFlash from the full-system management information and loading the BootLoader program to a second address appointed by the SRAM;
the first checking module is used for carrying out CRC (cyclic redundancy check) on the BootLoader program; if the BootLoader program is verified successfully, the BootRom program jumps to a second address appointed by the SRAM and runs the BootLoader program;
the second loading module is used for the BootLoader program to find the storage position of the system data full-system firmware program in the NandFlash from the full-system management information at the first address specified by the SRAM and load the full-system firmware program to the third address specified by the SRAM;
the second check module is used for performing CRC check on the full-system firmware program; and if the full-system firmware program is successfully verified, jumping to a third address appointed by the SRAM by the BootLoader program, and operating the full-system firmware program.
In one embodiment, the apparatus further includes a determining module, configured to:
judging whether the read of the whole system management information in the NandFlash is successful or not;
if the reading fails, the BootRom program outputs first error information to an internal designated register and enters a BootRom downloading mode;
and if the reading is successful, finding the position of the BootLoader program in the NandFlash from the full system management information and loading the BootLoader program to a second address appointed by the SRAM.
In one embodiment, the first check module is further configured to:
and if the BootLoader program fails to be read or the check fails, the BootRom program outputs second error information to an internal designated register and enters a BootRom downloading mode.
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.
In the firmware loading method, the firmware loading device, the computer equipment and the storage medium of the solid state disk, in the SSD mass production stage, as the block/page address of the BootLoader program is stored and dynamically applied and the address information is updated into the system management information, after the BootRom program runs, the BootLoader program is not read from the NandFlash fixed block/page address, but the block/page address information of the BootLoader stored in the system management information is read first, and then the BootLoader is read from the block/page of the NandFlash and runs. Therefore, once the SSD fails to read the BootLoader, the SSD can return to the mass production stage to re-download the BootLoader program to other block/page addresses of the NandFlash, and the risk that the SSD becomes a waste disk due to the failure of loading the BootLoader is effectively avoided. Meanwhile, as the download address is not fixed any more, the BootRom has good compatibility with different NandFlash particles with different protocols.
Drawings
Fig. 1 is a flowchart illustrating a firmware loading method for a solid state disk according to an embodiment;
FIG. 2 is a flowchart illustrating a firmware loading method for a solid state drive according to another embodiment;
FIG. 3 is a flowchart illustrating a firmware loading method for a solid state drive according to yet another embodiment;
FIG. 4 is a flowchart illustrating a method for implementing firmware loading on a solid state disk according to an embodiment;
fig. 5 is a schematic flowchart illustrating a method for downloading BootLoader programs and loading full-system firmware in a mass production phase in one embodiment;
FIG. 6 is a block diagram illustrating an embodiment of a firmware loading apparatus for a solid state drive;
FIG. 7 is a block diagram of a firmware loading apparatus of a solid state disk in another embodiment;
FIG. 8 is a block diagram showing a firmware loading apparatus for a solid state disk according to still another embodiment;
FIG. 9 is a diagram illustrating 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.
Currently, the method for implementing firmware loading by SSD is as follows: and powering on the SSD to run a BootRom program, reading a BootLoader program from a NandFlash fixed block/page address by BootRom, running the BootLoader program, and loading the whole system firmware after the BootLoader program is run, thereby realizing the loading of the whole system firmware. This requires that the fixed block/page in NandFlash for storing the BootLoader has good stability, and in addition, the BootRom program is fixed in the ROM and is not changeable, so that once the BootLoader fails to be read, the SSD becomes a waste disk due to failure of loading the firmware. Meanwhile, since blocks with better stability of the NandFlash particles with different protocols and different models are not generally uniform, SSD manufacturers are required to select blocks with better stability for different particles as much as possible to store BootLoader programs, so as to ensure that BootRom can correctly read the BootLoader programs from the fixed blocks, that is, the BootRom programs of the current SSD have poor compatibility with the NandFlash particles. .
Based on the above, the invention provides a firmware loading method for a solid state disk, in the method, after an SSD system is powered on and operated, a BootRom program firstly reads system management information to an SRAM1 address, obtains the address information of a BootLoader stored in NandFlash from the system management information, reads the BootLoader program stored in the NandFlash to an SRAM2 address, and then a CPU jumps to an SRAM2 address to start operating the BootLoader program. And the BootLoader program stores address information in NandFlash according to the full-system firmware in the management information of the SRAM1, reads the full-system firmware to the SRAM3 address, and then the CPU jumps to the SRAM3 address to start executing the full-system firmware, thereby completing the loading process of the full-system firmware.
In the mass production stage, the initialization of system management information is completed through a low-level command when a mass production program is operated, in the process of executing a command of downloading BootLoader and full-system firmware, firstly, storage address information is dynamically applied in a block of system data stored in NandFlash, then the BootLoader and the full-system firmware are stored in corresponding NandFlash, and finally, the storage address information is updated to the system management information.
In one embodiment, as shown in fig. 1, there is provided a firmware loading method for a solid state disk, the method including:
step 102, operating a BootRom program after the solid state disk is powered on and started, and initializing a NandFlash controller through the BootRom program;
step 104, reading the whole system management information in the NandFlash to a first address appointed by the SRAM;
106, finding the position of the BootLoader program in the NandFlash from the full system management information, and loading the BootLoader program to a second address appointed by the SRAM;
step 108, performing CRC check on the BootLoader program;
step 110, if the BootLoader program is verified successfully, the BootRom program jumps to a second address appointed by the SRAM and runs the BootLoader program;
step 112, the BootLoader program finds the storage position of the system data full-system firmware program in the NandFlash from the full-system management information at the first address specified by the SRAM, and loads the full-system firmware program to the third address specified by the SRAM;
step 114, performing CRC check on the whole system firmware program;
and step 116, if the full-system firmware program is successfully verified, jumping to a third address specified by the SRAM by the BootLoader program, and operating the full-system firmware program.
In this embodiment, a method for loading firmware of a solid state disk is provided, and a specific implementation process of the method is as follows:
firstly, a BootRom program is operated after the solid state disk is powered on and started, and a NandFlash controller is initialized through the BootRom program. BootRom is a small block of mask ROM or write-protected flash memory embedded within the processor chip. It contains the first code that the processor executes upon power-up or reset. Depending on the configuration of certain tape pins or internal fuses, it may decide where to load the next portion of code to be executed from and how to verify its correctness or validity.
And then, reading the full-system management information in the NandFlash to a first address appointed by the SRAM through a BootRom program. If the reading is successful, the position of the BootLoader program in the NandFlash is directly found from the management information of the whole system, and the BootLoader program is loaded to a second address appointed by an SRAM (Static Random-Access Memory). The Bootloader program is responsible for finding and loading the final operating system or firmware that should run on the chip.
Then, CRC check is performed on the BootLoader program. Cyclic Redundancy Check (CRC), which is a commonly used check code with error detection and correction capabilities, can be used for data check of synchronous communication between an external memory and a computer.
And if the BootLoader program is successfully verified, jumping to a second address specified by the SRAM by the BootRom program and operating the BootLoader program. And the BootLoader program finds the storage position of the system data full-system firmware program in the NandFlash from the full-system management information at the first address specified by the SRAM, and loads the full-system firmware program to the third address specified by the SRAM.
And finally, performing CRC on the whole system firmware program. And if the whole system firmware program is successfully verified, jumping to a third address appointed by the SRAM by the BootLoader program, and operating the whole system firmware program.
In this embodiment, in the SSD mass production phase, since the block/page address of the BootLoader program is stored and dynamically applied, and the address information is updated to the system management information, after the BootRom program runs, the BootLoader program is no longer read from the NandFlash fixed block/page address, but the block/page address information of the BootLoader stored in the system management information is read first, and then the BootLoader is read from the block/page of the NandFlash and run. Therefore, once the SSD fails to read the BootLoader, the SSD can return to the mass production stage to re-download the BootLoader program to other block/page addresses of the NandFlash, and the risk that the SSD becomes a waste disk due to the failure of loading the BootLoader is effectively avoided. Meanwhile, as the download address is not fixed any more, the BootRom has good compatibility with different NandFlash particles with different protocols.
In one embodiment, as shown in fig. 2, there is provided a firmware loading method for a solid state disk, the method further includes, after the step of reading the system-wide management information in NandFlash to the first address specified by the SRAM:
step 202, judging whether the reading of the whole system management information in the NandFlash is successful;
step 204, if the reading fails, the BootRom program outputs a first error message to an internal designated register and enters a BootRom download mode;
and step 206, if the reading is successful, finding the position of the BootLoader program in the NandFlash from the full system management information and loading the BootLoader program to a second address appointed by the SRAM.
In this embodiment, before performing the check on the BootLoader program, it is necessary to first determine whether reading the full system management information in NandFlash is successful. If the reading fails, the BootRom program is required to output first error information to an internal designated register and enter a BootRom downloading mode. If the read is successful, the subsequent steps can continue.
In an embodiment, a firmware loading method for a solid state disk is provided, where the method further includes, after the step of performing CRC check on the BootLoader program: and if the BootLoader program fails to be read or the check fails, the BootRom program outputs second error information to an internal designated register and enters a BootRom downloading mode.
In one embodiment, a firmware loading method for a solid state disk is provided, where the method further includes, after the step of performing CRC check on the system-wide firmware program: if the process of reading the whole system firmware fails or the verification fails, the BootLoader program outputs third error information to an internal designated register and enters a BootLoader downloading mode.
In one embodiment, referring to fig. 4, a method for specifically implementing firmware loading on a solid state disk is provided, including:
1. and powering up the solid state disk to restart, and operating a BootRom program.
2. And the BootRom program initializes the NandFlash controller.
3. And reading the full system management information stored in the NandFlash to the designated address 1 of the SRAM by the BootRom program, and jumping to the step 4 if the reading fails. If the read is successful, jump to step 5.
4. The BootRom program outputs error information 1 to an internal designated register and enters a BootRom download mode.
5. And the BootRom program finds the storage position of the system data BootLoader in NandFlash from the full system management information.
6. And the BootRom program loads the BootLoader program to the specified address 2 of the SRAM, performs CRC (cyclic redundancy check) on the BootLoader program, and jumps to the step 7 if reading the BootLoader program fails or checking fails. If successful, jump to step 8.
7. BootRom program outputs error information 2 to internal designated register, and enters BootRom download mode
8. And jumping the BootRom program to the SRAM designated address 2 to enable the BootLoader program to run.
9. And the BootLoader program finds the storage position of the system data full-system firmware in the NandFlash from the full-system management information at the designated address 1 of the SRAM.
10. And the BootLoader program loads the full-system firmware program to the SRAM designated address 3, performs CRC (cyclic redundancy check) on the full-system firmware program, and jumps to the step 11 if the process of reading the full-system firmware fails or the check fails. Otherwise step 12 is entered.
11. And the BootLoader program outputs error information 3 to an internal designated register and enters a BootLoader downloading mode.
12. And jumping to the SRAM designated address 3 by the BootLoader program to ensure that the whole system firmware program normally runs, thereby completing the loading process of the whole system firmware.
In this embodiment, after the system is powered on and operated, the BootRom program first reads system management information to an SRAM1 address, obtains BootLoader storage address information from the system management information, reads a BootLoader program stored in NandFlash to an SRAM2 address, and then the CPU jumps to an SRAM2 address to start operating the BootLoader program. And the BootLoader program stores address information in NandFlash according to the full-system firmware in the management information of the SRAM1, reads the full-system firmware to the SRAM3 address, and then the CPU jumps to the SRAM3 address to start executing the full-system firmware, thereby completing the loading process of the full-system firmware.
In one embodiment, as shown in fig. 3, there is provided a firmware loading of a solid state disk, and the method further includes:
step 302, after the solid state disk is powered on and started, operating a BootRom program, and waiting for entering a downloading mode;
step 304, downloading a mass production program to an appointed address of an SRAM, and jumping to the appointed address to enable the mass production program to run;
308, the mass production program executes a command of downloading the BootLoader program, applies for a storage position in the NandFlash to store the BootLoader program, and updates the position information stored by the BootLoader program into the management information of the whole system;
and 310, executing a command of downloading the whole system firmware by the mass production program, applying for a storage position in the NandFlash to store the whole system firmware, and updating the position information stored by the whole system firmware into the whole system management information.
In an embodiment, referring to fig. 5, a method for downloading BootLoader programs and loading full-system firmware in a mass production phase is provided, including:
1. and powering up the solid state disk for restarting, operating a BootRom program, and waiting for BootRom to enter a downloading mode.
2. And the BootRom program downloads the mass production program to the appointed address and skips to the address, so that the mass production program runs.
3. The mass production program executes the low level command to initialize the management information of the whole system.
4. And the mass production program executes a BootLoader downloading command, and applies for the storage position of the BootLoader program in a space for storing system data in the NandFlash. And after saving the BootLoader program, updating the position information into the system-wide management information.
5. And the mass production program executes a command of downloading the whole system firmware and applies for the storage position of the whole system firmware in a space for storing system data in the NandFlash. After the system-wide firmware is saved, the position information is updated to the system-wide management information.
In the present embodiment, the system management information is generated by a low command when the mass production program is executed in the mass production stage. And after the BootLoader and the full-system firmware are downloaded, the address information of the BootLoader and the full-system firmware stored in the NandFlash is updated to the system management information. The BootLoader and the full system firmware are not fixed in address information stored in the NandFlash, but randomly selected from blocks used for storing system data in the NandFlash in each downloading process, so that the BootRom has good compatibility with different NandFlash particles with different protocols.
It should be understood that although the various steps in the flow charts of fig. 1-5 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. 1-5 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. 6, there is provided a firmware loading apparatus 600 for a solid state disk, the apparatus including:
the initialization module 601 is used for running a BootRom program after the solid state disk is powered on and started, and initializing the NandFlash controller through the BootRom program;
the information reading module 602 is used for reading the full system management information in the NandFlash to a first address specified by the SRAM;
a first loading module 603, configured to find a location of a BootLoader program in NandFlash from the full system management information, and load the BootLoader program to a second address specified by the SRAM;
a first checking module 604, configured to perform CRC checking on the BootLoader program; if the BootLoader program is verified successfully, the BootRom program jumps to a second address appointed by the SRAM and runs the BootLoader program;
a second loading module 605, configured to find a storage location of a system data full-system firmware program in the NandFlash from the full-system management information at the first address specified by the SRAM by the BootLoader program, and load the full-system firmware program to a third address specified by the SRAM;
a second check module 606, configured to perform CRC check on the full-system firmware program; and if the full-system firmware program is successfully verified, jumping to a third address appointed by the SRAM by the BootLoader program, and operating the full-system firmware program.
In one embodiment, as shown in fig. 7, there is provided a firmware loading apparatus 600 for a solid state disk, the apparatus further includes a determining module 607 for:
judging whether the read of the whole system management information in the NandFlash is successful or not;
if the reading fails, the BootRom program outputs first error information to an internal designated register and enters a BootRom downloading mode;
and if the reading is successful, finding the position of the BootLoader program in the NandFlash from the full system management information and loading the BootLoader program to a second address appointed by the SRAM.
In one embodiment, the first check module 604 is further configured to:
and if the BootLoader program fails to be read or the check fails, the BootRom program outputs second error information to an internal designated register and enters a BootRom downloading mode.
In one embodiment, the second check module 606 is further configured to:
if the process of reading the whole system firmware fails or the verification fails, the BootLoader program outputs third error information to an internal designated register and enters a BootLoader downloading mode.
In one embodiment, as shown in fig. 8, there is provided a firmware loading apparatus 600 for a solid state disk, the apparatus further includes a mass production execution module 608 for:
after the solid state disk is powered on and started, the BootRom program is operated, and a downloading mode is waited to enter;
downloading a mass production program to an appointed address of an SRAM (static random access memory), and jumping to the appointed address to enable the mass production program to run;
the mass production program executes a low-level command and initializes the management information of the whole system;
the mass production program executes a command of downloading a BootLoader program, applies a storage position in the NandFlash to store the BootLoader program, and updates the position information stored by the BootLoader program into the management information of the whole system;
and the mass production program executes a command of downloading the whole system firmware, applies for a storage position in the NandFlash to store the whole system firmware, and updates the position information stored in the whole system firmware into the whole system management information.
For specific limitations of the firmware loading apparatus of the solid state disk, reference may be made to the above limitations of the firmware loading method of the solid state disk, and details are not described herein again.
In one embodiment, a computer device is provided, the internal structure of which may be as shown in FIG. 9. 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 firmware loading method of a solid state disk.
Those skilled in the art will appreciate that the architecture shown in fig. 9 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 firmware loading method of a solid state disk is characterized by comprising the following steps:
after the solid state disk is powered on and started, a BootRom program is operated, and a NandFlash controller is initialized through the BootRom program;
reading the whole system management information in the NandFlash to a first address appointed by the SRAM;
finding the position of a BootLoader program in the NandFlash from the full system management information, and loading the BootLoader program to a second address appointed by the SRAM;
performing CRC on the BootLoader program;
if the BootLoader program is verified successfully, the BootRom program jumps to a second address appointed by the SRAM and runs the BootLoader program;
the BootLoader program finds the storage position of a system data full-system firmware program in the NandFlash from the full-system management information at the first address specified by the SRAM, and loads the full-system firmware program to the third address specified by the SRAM;
performing CRC on the full-system firmware program;
and if the full-system firmware program is successfully verified, jumping to a third address appointed by the SRAM by the BootLoader program, and operating the full-system firmware program.
2. The firmware loading method of the solid state disk according to claim 1, further comprising after the step of reading the full system management information in the NandFlash to the first address specified by the SRAM:
judging whether the read of the whole system management information in the NandFlash is successful or not;
if the reading fails, the BootRom program outputs first error information to an internal designated register and enters a BootRom downloading mode;
and if the reading is successful, finding the position of the BootLoader program in the NandFlash from the full system management information and loading the BootLoader program to a second address appointed by the SRAM.
3. The firmware loading method of the solid state disk according to claim 2, further comprising, after the step of performing CRC check on the BootLoader program:
and if the BootLoader program fails to be read or the check fails, the BootRom program outputs second error information to an internal designated register and enters a BootRom downloading mode.
4. The firmware loading method of the solid state disk according to claim 3, further comprising, after the step of performing CRC check on the system-wide firmware program:
if the process of reading the whole system firmware fails or the verification fails, the BootLoader program outputs third error information to an internal designated register and enters a BootLoader downloading mode.
5. The firmware loading method for the solid state disk according to any one of claims 1 to 4, wherein the method further comprises:
after the solid state disk is powered on and started, the BootRom program is operated, and a downloading mode is waited to enter;
downloading a mass production program to an appointed address of an SRAM (static random access memory), and jumping to the appointed address to enable the mass production program to run;
the mass production program executes a low-level command and initializes the management information of the whole system;
the mass production program executes a command of downloading a BootLoader program, applies a storage position in the NandFlash to store the BootLoader program, and updates the position information stored by the BootLoader program into the management information of the whole system;
and the mass production program executes a command of downloading the whole system firmware, applies for a storage position in the NandFlash to store the whole system firmware, and updates the position information stored in the whole system firmware into the whole system management information.
6. An apparatus for loading firmware of a solid state disk, the apparatus comprising:
the initialization module is used for running a BootRom program after the solid state disk is powered on and started, and initializing the NandFlash controller through the BootRom program;
the information reading module is used for reading the full system management information in the NandFlash to a first address appointed by the SRAM;
the first loading module is used for finding the position of a BootLoader program in NandFlash from the full-system management information and loading the BootLoader program to a second address appointed by the SRAM;
the first checking module is used for carrying out CRC (cyclic redundancy check) on the BootLoader program; if the BootLoader program is verified successfully, the BootRom program jumps to a second address appointed by the SRAM and runs the BootLoader program;
the second loading module is used for the BootLoader program to find the storage position of the system data full-system firmware program in the NandFlash from the full-system management information at the first address specified by the SRAM and load the full-system firmware program to the third address specified by the SRAM;
the second check module is used for performing CRC check on the full-system firmware program; and if the full-system firmware program is successfully verified, jumping to a third address appointed by the SRAM by the BootLoader program, and operating the full-system firmware program.
7. The apparatus for loading firmware onto a solid state disk of claim 6, wherein the apparatus further comprises a determining module, and the determining module is configured to:
judging whether the read of the whole system management information in the NandFlash is successful or not;
if the reading fails, the BootRom program outputs first error information to an internal designated register and enters a BootRom downloading mode;
and if the reading is successful, finding the position of the BootLoader program in the NandFlash from the full system management information and loading the BootLoader program to a second address appointed by the SRAM.
8. The firmware loading apparatus of the solid state disk of claim 7, wherein the first checking module is further configured to:
and if the BootLoader program fails to be read or the check fails, the BootRom program outputs second error information to an internal designated register and enters a BootRom downloading mode.
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 5 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 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110431701.0A CN113110891B (en) | 2021-04-21 | 2021-04-21 | Firmware loading method and device for solid state disk, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110431701.0A CN113110891B (en) | 2021-04-21 | 2021-04-21 | Firmware loading method and device for solid state disk, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN113110891A true CN113110891A (en) | 2021-07-13 |
CN113110891B CN113110891B (en) | 2022-03-29 |
Family
ID=76719148
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110431701.0A Active CN113110891B (en) | 2021-04-21 | 2021-04-21 | Firmware loading method and device for solid state disk, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113110891B (en) |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114253619A (en) * | 2021-12-21 | 2022-03-29 | 苏州忆联信息系统有限公司 | SSD multi-level Boot method and device, computer equipment and storage medium |
CN114356455A (en) * | 2022-01-06 | 2022-04-15 | 深圳忆联信息系统有限公司 | Method and device for improving chip starting reliability |
CN116628767A (en) * | 2023-07-20 | 2023-08-22 | 常州楠菲微电子有限公司 | Method for preventing flash system firmware attack after system start and flash controller |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102122531A (en) * | 2011-01-27 | 2011-07-13 | 浪潮电子信息产业股份有限公司 | Method for improving stability in use of large-capacity solid state disk |
US20140331033A1 (en) * | 2013-05-06 | 2014-11-06 | Phison Electronics Corp. | Firmware code loading method, memory controller and memory storage apparatus |
CN109901890A (en) * | 2019-03-07 | 2019-06-18 | 深圳忆联信息系统有限公司 | A kind of method, apparatus, computer equipment and the storage medium of controller loading multi-core firmware |
CN111428233A (en) * | 2020-03-18 | 2020-07-17 | 西安电子科技大学 | Security analysis method for embedded equipment firmware |
CN111625199A (en) * | 2020-05-28 | 2020-09-04 | 深圳忆联信息系统有限公司 | Method and device for improving reliability of data path of solid state disk, computer equipment and storage medium |
-
2021
- 2021-04-21 CN CN202110431701.0A patent/CN113110891B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102122531A (en) * | 2011-01-27 | 2011-07-13 | 浪潮电子信息产业股份有限公司 | Method for improving stability in use of large-capacity solid state disk |
US20140331033A1 (en) * | 2013-05-06 | 2014-11-06 | Phison Electronics Corp. | Firmware code loading method, memory controller and memory storage apparatus |
CN109901890A (en) * | 2019-03-07 | 2019-06-18 | 深圳忆联信息系统有限公司 | A kind of method, apparatus, computer equipment and the storage medium of controller loading multi-core firmware |
CN111428233A (en) * | 2020-03-18 | 2020-07-17 | 西安电子科技大学 | Security analysis method for embedded equipment firmware |
CN111625199A (en) * | 2020-05-28 | 2020-09-04 | 深圳忆联信息系统有限公司 | Method and device for improving reliability of data path of solid state disk, computer equipment and storage medium |
Non-Patent Citations (1)
Title |
---|
刘兆庆 等: "LXI仪器固件远程升级设计与实现", 《测控技术》 * |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114253619A (en) * | 2021-12-21 | 2022-03-29 | 苏州忆联信息系统有限公司 | SSD multi-level Boot method and device, computer equipment and storage medium |
CN114356455A (en) * | 2022-01-06 | 2022-04-15 | 深圳忆联信息系统有限公司 | Method and device for improving chip starting reliability |
CN114356455B (en) * | 2022-01-06 | 2023-12-05 | 深圳忆联信息系统有限公司 | Method and device for improving starting reliability of chip |
CN116628767A (en) * | 2023-07-20 | 2023-08-22 | 常州楠菲微电子有限公司 | Method for preventing flash system firmware attack after system start and flash controller |
CN116628767B (en) * | 2023-07-20 | 2023-10-17 | 常州楠菲微电子有限公司 | Method for preventing flash system firmware attack after system start and flash controller |
Also Published As
Publication number | Publication date |
---|---|
CN113110891B (en) | 2022-03-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN113110891B (en) | Firmware loading method and device for solid state disk, computer equipment and storage medium | |
US7275153B2 (en) | Booting and boot code update system using boot strapper code to select between a loader and a duplicate backup loader | |
KR101375992B1 (en) | Handling errors during device bootup from a non-volatile memory | |
US7908469B2 (en) | Method for executing power on self test on a computer system and updating SMBIOS information partially | |
CN113114730B (en) | Upgrading method and device, terminal equipment and storage medium | |
CN111813428A (en) | Method and device for upgrading terminal firmware, electronic equipment and storage medium | |
CN110737481A (en) | Starting method of embedded LINUX operating system based on multiple backup bootstrap programs | |
CN112433769A (en) | BMC starting method and device, computer equipment and storage medium | |
CN117130672A (en) | Server start flow control method, system, terminal and storage medium | |
CN109634781A (en) | One kind is based on embedded program two-region Backup Images system and starting method | |
CN105183580A (en) | Storage method and fault recovery method for bootstrap program, and devices | |
CN115061844A (en) | Method, device and medium for starting PLC embedded software | |
CN114265603A (en) | System upgrading method and device based on asymmetric partition and electronic equipment | |
CN111857882B (en) | Extensible SSD card opening firmware loading method and device, computer equipment and storage medium | |
US7490321B2 (en) | Method for updating firmware via determining program code | |
CN116700765A (en) | Firmware upgrading method and device of servo driver and servo driver | |
CN114741091A (en) | Firmware loading method and device, electronic equipment and computer readable storage medium | |
US7490232B2 (en) | Disk device using disk to rewrite firmware and firmware determination method | |
US11768669B2 (en) | Installing application program code on a vehicle control system | |
CN112667444A (en) | System upgrading method, storage medium and terminal equipment | |
CN113760623A (en) | Method and device for testing TCG (trusted computing group) protocol function of solid state disk and computer equipment | |
CN118276985B (en) | RISC-V chip starting method, equipment and medium | |
CN118092989B (en) | Firmware upgrading method, system, equipment and medium of memory | |
CN116719567A (en) | Chip program updating method, device, computer equipment and storage medium | |
CN117453239A (en) | Double-redundancy design method based on bottom layer mirror image file |
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 |