Memory system, firmware updating method, and program

By storing firmware in multiple slots within a single block and efficiently managing active slots, the memory system optimizes block usage and reduces write operations, enhancing efficiency and extending lifespan.

JP2024126252AInactive Publication Date: 2024-09-20KIOXIA CORP
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
JP2023034522
Authority / Receiving Office
JP · JP
Patent Type
Applications
Current Assignee / Owner
Filing Date
2023-03-07
Publication Date
2024-09-20
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

Existing memory systems inefficiently use memory blocks during firmware updates, leading to an increased number of write operations and reduced efficiency due to the fixed allocation of active slots in NAND flash memory.

Method used

A memory system design where firmware is stored in multiple slots within a single block, allowing for efficient updating by changing active slots without altering the firmware content, thus reducing the number of blocks required for storage and write operations.

Benefits of technology

This approach reduces the number of blocks needed for firmware storage by approximately 67%, enhances block usage efficiency, and shortens write time by about 67% while extending the memory system's lifespan.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure 2024126252000001
    Figure 2024126252000001
Patent Text Reader

Abstract

To make it possible to efficiently use a memory block when updating firmware, and to shorten a writing time by reducing the number of writing blocks.SOLUTION: A memory system according to an embodiment includes a semiconductor memory, and a memory controller which is electrically connected with the semiconductor memory. The semiconductor memory includes at least one block being a unit of data erasing operation. A first block of the at least one block includes a plurality of slots where a plurality of pieces of firmware are respectively stored. The semiconductor memory stores active slot information indicating active slots among the plurality of slots. In response to the reception of a command instructing update of at least one of the plurality of pieces of firmware from a host device, the memory controller alters at least either one of firmware stored in any one among the plurality of slots of the first block, and active slot information stored in the first block.SELECTED DRAWING: Figure 5
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] An embodiment of the present invention relates to a memory system, a firmware updating method, and a program. [Background technology]

[0002] Memory systems including semiconductor memories such as NAND flash memories (hereinafter also referred to as NAND flash memories) are used in various electronic devices. Such memory systems are, for example, solid state drives (SSDs).

[0003] For example, a memory controller included in the memory system can instruct (or command) various processes and operations on the NAND flash memory. The memory controller controls various processes and operations on the NAND flash memory based on firmware stored in the memory system (e.g., in the NAND flash memory). [Prior art documents] [Patent documents]

[0004] [Patent Document 1] US Patent Application Publication No. 2016 / 0275011 [Patent Document 2] U.S. Pat. No. 8,463,986 [Patent Document 3] U.S. Pat. No. 10,884,947 Summary of the Invention [Problem to be solved by the invention]

[0005] One embodiment of the present invention provides a memory system, a firmware update method, and a program that can efficiently use memory blocks of a NAND flash memory during firmware update, and can reduce the number of write blocks during firmware update and shorten the write time. [Means for solving the problem]

[0006] A memory system according to an embodiment includes a semiconductor memory and a memory controller electrically connected to the semiconductor memory. The semiconductor memory includes at least one block that is a unit of a data erase operation, and a first block of the at least one block includes a plurality of slots in which a plurality of firmware are respectively stored, and stores active slot information indicating an active slot among the plurality of slots. In response to receiving a command from a host device instructing to update at least one of the plurality of firmware, the memory controller changes at least one of the firmware stored in any one of the plurality of slots of the first block and the active slot information stored in the first block. [Brief description of the drawings]

[0007] [Figure 1] FIG. 2 is a diagram illustrating an example of the schematic configuration of a memory block in a NAND flash memory of a comparative example. [Figure 2A] FIG. 1 is a diagram illustrating an example of a memory block provided with active slots in a NAND flash memory of a comparative example. [Figure 2B] 11A and 11B are diagrams illustrating examples of changes to active slots in a NAND flash memory of a comparative example. [Diagram 3] FIG. 1 is a block diagram showing an example of a schematic configuration of a memory system and a host device according to an embodiment. [Figure 4] FIG. 2 is a block diagram illustrating an example of the internal configuration of a memory controller according to the embodiment. [Diagram 5]2 is a diagram showing a schematic configuration example of a memory block in a NAND flash memory according to an embodiment; [Figure 6] 2 is a diagram illustrating an example of the internal configuration of a memory block provided with a slot for storing firmware, among memory blocks according to the embodiment; FIG. [Figure 7] 11A and 11B are diagrams illustrating an example of changing firmware stored in a slot in a memory block according to the embodiment. [Figure 8] 1A and 1B are diagrams illustrating an example of changing an active slot in a memory block according to an embodiment. [Figure 9] 10 is a flowchart showing an outline example of a procedure of a firmware update process according to the embodiment. [Figure 10] 10 is a flowchart showing an outline example of a firmware update process according to the embodiment. [Figure 11] 11 is a flowchart illustrating an example of a schematic procedure of an active slot change process according to the embodiment. [Figure 12A] FIG. 1 is a diagram illustrating an example of a schematic configuration of a memory block group in a comparative example. [Figure 12B] FIG. 2 is a diagram illustrating an example of a schematic configuration of a memory block group according to the embodiment. [Figure 13A] FIG. 11 is a diagram illustrating an example of a usage state of a memory block in a comparative example. [Figure 13B] FIG. 2 is a diagram illustrating an example of a usage state of a memory block according to the embodiment. DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS

[0008] Next, an embodiment will be described with reference to the drawings. In the following description of the specification and drawings, similar components are given the same reference numerals and the description will be omitted. The drawings are schematic. The following embodiments are illustrative of devices and methods for embodying the technical ideas. Various modifications can be made to the embodiments within the scope of the claims.

[0009] (Embodiment) A memory system including a semiconductor memory such as a NAND flash memory (hereinafter also referred to as a NAND flash memory) executes various processes in response to commands from a host device. A memory controller provided in the memory system controls various processes and operations on the NAND flash memory based on firmware stored in the memory system (e.g., in the NAND flash memory). The firmware is stored, for example, in a firmware slot (hereinafter also referred to as a slot) provided in a specific memory block (hereinafter also referred to as a block) of the NAND flash memory. In the NAND flash memory, a block is a unit of data erase operation.

[0010] A memory controller generally uses multiple types of firmware depending on the various operations it performs.

[0011] Furthermore, in order to improve robustness, the same firmware is stored in multiple locations within the memory system. Hereinafter, storing the same firmware in multiple locations in this manner will be referred to as "multiplexing firmware." For example, storing the same firmware in four locations will also be referred to as "setting the firmware multiplicity to four."

[0012] The firmware update is executed by the memory controller in response to an update request received from the host device, for example. When the firmware is updated, the operation contents controlled by the memory controller are changed according to the firmware. In this specification, the firmware update includes two aspects: a firmware update in the narrow sense of changing the firmware in a slot, and a firmware update in the broad sense of changing an active slot (hereinafter also referred to as an active slot) while leaving the firmware contents in the slot unchanged. Here, an active slot is a slot in which the currently executed firmware is stored.

[0013] 1 is a schematic diagram showing an example of the general configuration of a memory block of a NAND flash memory 20C in a comparative example. In the example shown in FIG. 1, 12 slots are provided to make the multiplicity of each of the three types of firmware 4. That is, one slot is provided per block to make the multiplicity of each of the three slots of firmware 4, and a total of 12 blocks are reserved for storing firmware. In other words, it is necessary to reserve at least a number of blocks equal to the multiplicity x the number of slots.

[0014] More specifically, one slot 1 for storing the first type of firmware among the three types is provided in each of the four blocks 1_1 to 1_4. Similarly, one slot 2 for storing the second type of firmware among the three types is provided in each of the four blocks 2_1 to 2_4, and one slot 3 for storing the third type of firmware is provided in each of the four blocks 3_1 to 3_4. All four firmwares stored in the four slots 1 are the same firmware. All four firmwares stored in the four slots 2 are the same firmware. All four firmwares stored in the four slots 3 are the same firmware. In addition, the firmware stored in the slot 1 may be different from the firmware stored in the slot 2 and the firmware stored in the slot 3, or may be the same firmware. The firmware stored in the slot 2 may be different from the firmware stored in the slot 3, or may be the same firmware.

[0015] Note that blocks 1_5 to 1_n, blocks 2_5 to 2_n, and blocks 3_5 to 3_n (where n is a natural number equal to or greater than 7) are blocks for user data. Here, the blocks for user data are, for example, blocks for data read and written by a host device.

[0016] Fig. 2A shows an example of blocks 1_1 to 1_4 in which a slot 1, which is an active slot, is provided in the NAND flash memory 20C shown in Fig. 1. Fig. 2B shows an example of a modification of the active slot in the NAND flash memory 20C shown in Fig. 2A.

[0017] In the example shown in FIG. 2A and FIG. 2B, it is determined in advance (for example, at the time of design) that active slots are provided in specific blocks 1_1 to 1_4. That is, in the example of FIG. 2A, the slots provided in blocks 1_1 to 1_4 are fixedly recognized as active slots. The reason why active slots are provided in specific blocks 1_1 to 1_4 in this way is that it is difficult to determine a storage destination of information indicating which block has an active slot. If information indicating active slots is stored in 12 blocks 1_1 to 1_4, 2_1 to 2_4, and 3_1 to 3_4, respectively, it becomes necessary to perform a write process in all 12 blocks even if, for example, only changing the active slot. In addition, if one block is reserved exclusively for storing information indicating active slots, it becomes necessary to perform a write process in the exclusive block, which leads to an increase in the number of write processes.

[0018] In the comparative example shown in FIG. 2B, in order to change the active slot from slot 1 to slot 2, it is necessary to swap the data stored in each of blocks 1_1 to 1_4 with the data stored in each of blocks 2_1 to 2_4. To do this, it is necessary to perform update processing (write processing) for a total of eight blocks 1_1 to 1_4 and 2_1 to 2_4. When performing such update processing on a NAND flash memory, it is necessary to back up the data stored in each block to another block, execute a data erase operation on the original block, and then perform a process of writing the backed up data back to the original block.

[0019] In addition, the size of the firmware is, for example, less than one-third the block size of a NAND flash memory. Therefore, if one slot is provided per block, the memory area of ​​the block cannot be used effectively. As the block size tends to increase, there is a demand for more effective use of the blocks.

[0020] (Memory system according to an embodiment) Fig. 3 is a schematic diagram showing an example of the general configuration of a memory system 1 according to an embodiment and a host device 5. Fig. 4 is a schematic diagram showing an example of the internal configuration of a memory controller 10 included in the memory system 1 shown in Fig. 3.

[0021] The memory system 1 according to the embodiment writes data, reads data, erases data, and so on in the memory system 1 in response to a request from a host device 5.

[0022] The host device 5 includes a processor 50, a storage device 51, a RAM (Random Access Memory) 52, and an interface circuit (I / F) 53. The host device 5 is, for example, a server, a personal computer, a smartphone, a feature phone, a mobile terminal (for example, a tablet terminal), a game device, an information appliance, an in-vehicle device, a router, a base station, or the like.

[0023] The processor 50 controls various processes and operations of the host device 5. The processor 50 issues commands CMD to request (for example, instruct, instruct) the memory system 1 to perform various processes and operations.

[0024] The storage device 51 is a storage device such as a hard disk drive (HDD). The RAM 52 functions as a working area for the processor 50 to perform various data processing operations.

[0025] The interface circuit 53 communicates with the memory system 1 based on a predetermined interface standard and / or communication protocol. Incidentally, the command CMD from the host device 5 to the memory system 1 is based on the interface standard to which the interface circuit 53 conforms. For example, the interface standard (or communication protocol) to which the interface circuit 53 conforms is the SAS (Serial Attached SCSI) standard, the SATA (Serial ATA) standard, the PCIexpress (registered trademark) standard, the NVM Express (registered trademark) standard, the Universal Flash Storage standard, etc. Incidentally, the interface circuit 53 may conform to an interface standard other than the interface standards exemplified here.

[0026] The memory system 1 according to the embodiment includes a memory controller 10 and a NAND flash memory 20.

[0027] In response to a command CMD from the host device 5, the memory controller 10 instructs the NAND flash memory 20 to perform various processes and operations such as writing data to the NAND flash memory 20, reading data from the NAND flash memory 20, and erasing data from the NAND flash memory 20. The memory controller 10 may be configured as a system LSI (Large-Scale Integrated Circuit) or a SoC (System-on-a-Chip). The functions of each part of the memory controller 10 may be realized by dedicated hardware, a processor that executes a program, or a combination of these.

[0028] The memory controller 10 includes a processor 100, a RAM 110, a buffer unit 120, and interface circuits (I / F) 130 and 140.

[0029] The processor 100 instructs and commands various processes and operations for the NAND flash memory 20. For example, the processor 100 generates commands indicating instructions for the NAND flash memory 20. The processor 100 controls various processes and operations for the NAND flash memory 20 according to firmware stored in the memory system 1 (for example, in the memory area of ​​the NAND flash memory 20), for example.

[0030] 4, the processor 100 includes a CPU 101, an analysis unit 102, an execution unit 103, and a memory 104. With these components, the processor 100 realizes a function for executing a command CMD from the host device 5, a function for updating firmware, and the like.

[0031] The CPU 101 controls various processes executed in the processor 100 and various operations in the processor 100. The analysis unit 102 analyzes the command CMD from the host device 5. The execution unit 103 executes an operation based on the analysis result of the command CMD. The functions of the analysis unit 102 and the execution unit 103 may be realized by dedicated hardware (circuitry), or may be realized by the CPU 101 executing software (program).

[0032] The RAM 110 functions as a working area for various processes and operations by the processor 100 in the memory controller 10. The RAM 110 temporarily stores the firmware FW, the program UDP, data, and the like used in various processes by the processor 100. For example, the RAM 110 is accessed by the CPU 101 or the execution unit 103. A memory 104 having the same function and configuration as the RAM 110 may be provided in the processor 100. The program UDP is a program for firmware update according to this embodiment. The program UDP is stored in the NAND flash memory 20, and when the memory controller 10 executes the update of the firmware FW, the program UDP is loaded from the NAND flash memory 20 to the RAM 110 or the memory 104. The memory controller 10 executes the program UDP loaded to the RAM 110 or the memory 104 to update the firmware FW. The program UDP may be a part of the firmware FW.

[0033] The buffer unit 120 temporarily stores data transferred between the memory controller 10 and the host device 5, and data transferred between the memory controller 10 and the flash memory 20. For example, the buffer unit 120 includes a command buffer 121 and a data buffer 122.

[0034] The command buffer 121 temporarily stores the command CMD from the host device 5. The data buffer 122 temporarily stores the data DAT transferred between the memory controller 10 and the host device 5, and the data DAT transferred between the memory controller 10 and the flash memory 20.

[0035] The interface (I / F) circuit 130 transfers data between the host device 5 and the memory controller 10 based on a predetermined interface standard. The interface standard (and communication protocol) to which the interface circuit 130 conforms is the same as the interface standard to which the interface circuit 53 of the host device 5 conforms.

[0036] The interface (I / F) circuit 140 performs communication (eg, data transfer) between the memory controller 10 and the NAND flash memory 20 based on the NAND interface standard.

[0037] When the memory controller 10 commands the NAND flash memory 20 to perform a certain operation, the memory controller 10 sends data DAT including command and address information to the NAND flash memory 20. When the memory controller 10 commands the NAND flash memory 20 to write data, the data DAT further includes write data. In addition to the above configuration, the memory controller 10 may include other configurations such as an ECC circuit (not shown).

[0038] The NAND flash memory 20 is a non-volatile semiconductor memory device that can store data and firmware in a substantially non-volatile manner.

[0039] (Block configuration of NAND flash memory) 5 is a schematic diagram showing an example of a general configuration of a memory block in the NAND flash memory 20 according to the embodiment. In the NAND flash memory 20 according to the embodiment, a plurality of slots for storing a plurality of types of firmware and an area for storing information on active slots (hereinafter, also referred to as active slot information) are provided in one block.

[0040] 5, three slots 1 to 3 for storing three types of firmware and an area for storing active slot information are provided in one block. Then, in order to set the multiplicity of each of the three slots of firmware to four, four blocks 1_1 to 1_4 are reserved for storing firmware. That is, in this embodiment, a number of blocks equal to the number of multiplicities (four blocks in this case) are reserved.

[0041] More specifically, the first block 1_1 of the multiplicity 4 is provided with slots 1-3 for storing three types of firmware, and further stores active slot information 1_1. Similarly, the second block 1_2 of the multiplicity 4 is provided with slots 1-3 for storing three types of firmware, and further stores active slot information 1_2. The third block 1_3 of the multiplicity 4 is provided with slots 1-3 for storing three types of firmware, and further stores active slot information 1_3. The fourth block 1_4 of the multiplicity 4 is provided with slots 1-3 for storing three types of firmware, and further stores active slot information 1_4. All four firmwares stored in the four slots 1 of the blocks 1_1-1_4 are the same firmware. Similarly, all four firmwares stored in the four slots 2 are the same firmware. All four firmwares stored in the four slots 3 are the same firmware. Moreover, the firmware stored in the slot 1 may be different from the firmware stored in the slot 2 and the firmware stored in the slot 3, or may be the same firmware. The firmware stored in slot 2 may be different from the firmware stored in slot 3, or may be the same firmware.

[0042] Note that blocks 1_5 to 1_n, blocks 2_1 to 2_n, and blocks 3_1 to 3_n (where n is a natural number equal to or greater than 7) are blocks for user data. Here, the blocks for user data are, for example, blocks for data that the host device 5 reads and writes.

[0043] Fig. 6 shows an example of the internal configuration of a block 1_1 provided with slots for storing firmware among the memory blocks shown in Fig. 5. The block 1_1 stores active slot information 1_1, and further includes slots 1 to 3.

[0044] The active slot information 1_1 includes the degree of multiplicity, the number of slots, the active slot number, the start order information in case of start failure, firmware version information, etc. For example, when the current active slot is slot 1, the degree of multiplicity of the active slot information 1_1 is set to "4", the number of slots is set to "3", the active slot number is set to "1", and the start order information in case of start failure is set to "2→3". Here, the "start order in case of start failure" indicates the number of the slot of the firmware to be started next when the start of the firmware in the currently active slot 1 fails. When the currently active slot is slot 1, the slot of the firmware to be started next is slot 2, and when the start of the firmware in slot 2 also fails, the slot of the firmware to be started next is slot 3. Note that information in the active slot information other than the active slot number is optional information.

[0045] (Firmware Update) FIG. 7 shows a schematic example of changing the firmware stored in the slot 1 in the memory blocks 1_1 to 1_4 shown in FIG.

[0046] 7, when the firmware stored in slot 1 is changed (i.e., in the case of firmware update in the narrow sense), the firmware stored in slot 1 in each of blocks 1_1 to 1_4 and the active slot information are changed. That is, the blocks that need to be rewritten are only four blocks, 1_1 to 1_4. When rewriting the four blocks 1_1 to 1_4, the memory controller 10 backs up the data stored in each block in another block, executes a data erase operation on blocks 1_1 to 1_4, and then writes the backed up data back to blocks 1_1 to 1_4.

[0047] In addition, in Fig. 7, the numbers in parentheses "()" of the active slot information indicate the active slot number and the startup order in case of startup failure. In Fig. 7, "(slot 1 (→ 2 → 3))" indicates that the active slot is slot 1, and the startup order in case of startup failure is slot 2, then slot 3.

[0048] In this way, in the memory system 1 according to the embodiment, when firmware is changed, it is only necessary to rewrite the same number of blocks as the number of multiplicities.

[0049] Fig. 8 shows a schematic example of changing an active slot from slot 1 to slot 2 in the memory blocks 1_1 to 1_4 shown in Fig. 5. In the example of Fig. 8, the active slot is merely changed from slot 1 to slot 2 (i.e., firmware update in a broad sense), and the firmware itself is not changed.

[0050] 8, when changing the active slot from slot 1 to slot 2, the memory controller 10 changes the active slot numbers of the active slot information 1_1 to 1_4 in each of the blocks 1_1 to 1_4 from "1" to "2" and rewrites the four blocks 1_1 to 1_4. In this case, the memory controller 10 performs the rewrite process of each of the blocks 1_1 to 1_4 in the same manner as in the narrow firmware update described with reference to FIG.

[0051] In this way, in the memory system 1 according to the embodiment, when changing the active slot, it is only necessary to rewrite the blocks in the number equal to the number of multiplicities.

[0052] In the memory system 1 according to the embodiment, even when a narrow-sense firmware update and a broad-sense firmware update are performed simultaneously, it is sufficient to rewrite the same number of blocks as the number of multiplicities.

[0053] As described above, the memory system 1 according to the embodiment includes a semiconductor memory (NAND flash memory) 20 and a memory controller 10 electrically connected to the semiconductor memory 20. The semiconductor memory 20 includes at least one block that is a unit of a data erase operation, and a first block (e.g., block 1_1 in FIG. 5) of the at least one block includes a plurality of slots (e.g., slots 1 to 3 in FIG. 5) in which a plurality of firmware are respectively stored, and stores active slot information (e.g., active slot information 1_1 in FIG. 5) indicating an active slot among the plurality of slots. The memory controller 10 is configured to change at least one of the firmware stored in any one of the plurality of slots of the first block and the active slot information stored in the first block in response to receiving a command CMD from the host device 5 instructing to update at least one of the plurality of firmware.

[0054] The multiple pieces of firmware may be different from each other.

[0055] Moreover, the multiple different firmwares include at least a first firmware (e.g., firmware stored in slot 1 of FIG. 5) and a second firmware (e.g., firmware stored in slot 2 of FIG. 5). The multiple slots include at least a first slot (e.g., slot 1 of FIG. 5) that stores the first firmware and a second slot (e.g., slot 2 of FIG. 5) that stores the second firmware. In response to receiving a command CMD from the host device 5, the memory controller 10 is configured to read the first firmware stored in the first slot of the first block, execute a data erase operation on the first block, modify the read first firmware, and write the modified first firmware to the first block on which the data erase operation was executed.

[0056] Moreover, the multiple different firmwares include at least a first firmware (e.g., firmware stored in slot 1 of FIG. 5) and a second firmware (e.g., firmware stored in slot 2 of FIG. 5). The multiple slots include at least a first slot (e.g., slot 1 of FIG. 5) that stores the first firmware and a second slot (e.g., slot 2 of FIG. 5) that stores the second firmware. In response to receiving a command CMD from the host device 5, the memory controller 10 is configured to read active slot information stored in the first block, execute a data erase operation on the first block, change an active slot indicated by the read active slot information from the first slot to the second slot, and write the changed active slot information to the first block in which the data erase operation has been executed.

[0057] Moreover, the at least one block further includes a second block (e.g., block 1_2 in FIG. 5), and the second block includes a plurality of slots in which copies of a plurality of different firmware are respectively stored, and stores a copy of the active slot information. The memory controller 10 is configured to update at least one of the firmware stored in any one of the plurality of slots and the active slot information for each of the first block and the second block in response to receiving a command CMD from the host device 5.

[0058] In addition, the memory controller 10 is configured to, in response to the command CMD instructing a change in the active slot information, change the active slot information stored in the first block without changing any of the multiple firmware stored in each of the multiple slots in the first block.

[0059] The memory controller is also configured to, in response to the command CMD instructing a firmware change, change any one of the multiple firmware stored in each of the multiple slots of the first block, and not change the active slot information stored in the first block.

[0060] The active slot information also includes information regarding the boot order for booting firmware stored in another slot if booting of firmware stored in the active slot fails.

[0061] (Firmware update process) Next, a procedure for updating firmware in the memory system 1 according to this embodiment will be described. In the firmware update process described below, the interface standard between the host device 5 and the memory system 1 is the NVMExpress (registered trademark) standard (NVM Express TM Revision 1.4, [online], June 10, 2019, [searched January 10, 2023], Internet) among the above-mentioned interface standards.<https: / / nvmexpress.org / wp-content / uploads / NVM-Express-1_4-2019.06.10-Ratified.pdf> ) will be used as an example.

[0062] Also, a part or all of the firmware update process described below can be written in a computer program as instructions to be executed by a computer. The computer program is stored in, for example, a non-transitory computer-readable medium and used in the controller 10 of the memory system 1 according to the embodiment. This computer program is stored in, for example, the NAND flash memory 20. Also, this computer program may be included in the firmware stored in each slot.

[0063] Fig. 9 shows an outline of an example of the firmware update process according to this embodiment. Fig. 10 shows an outline of a firmware change process (i.e., firmware update process in the narrow sense) among the firmware update process steps shown in Fig. 9. Fig. 11 shows an outline of an active slot change process (i.e., firmware update process in the broad sense) among the firmware update process steps shown in Fig. 9.

[0064] In step S100 of FIG. 9, processing is started in response to an action (eg, a commit action) from the host device 5 to the memory system 1.

[0065] In step S110, the memory controller 10 receives a firmware commit command CMD transmitted from the host device 5 to the memory system 1. The firmware commit command CMD is temporarily stored in, for example, the command buffer 121 of the buffer unit 120. Furthermore, when the firmware commit command instructs changing the firmware itself, the host device 5 transmits the updated firmware and information for identifying the updated firmware to the memory system 1. The updated firmware and information for identifying the updated firmware are temporarily stored in, for example, the data buffer 122 of the buffer unit 120.

[0066] In step S 115 , the analysis unit 102 analyzes the contents of the firmware commit command CMD stored in the command buffer 121 .

[0067] If the result of the analysis by the analysis unit 102 in step S115 is that the firmware commit command CMD is either "000b", "001b", or "011b" (firmware change instruction), the processing by the memory controller 10 proceeds to step S120, and the execution unit 103 of the processor 100 executes the firmware change processing.

[0068] If the analysis result in step S115 indicates that the firmware commit command CMD is "010b" (active slot change instruction), the process proceeds to step S140, where the execution unit 103 executes active slot change processing.

[0069] When the firmware update process in step S120 or the active slot change process in step S140 is completed, the series of processes ends in step S160.

[0070] (Firmware update) Next, the specific steps of the firmware update process in step S120 will be described with reference to FIG.

[0071] In step S1210, for example, the execution unit 103 in the processor 100 verifies the signature attached to the updated firmware transmitted from the host device 5. This signature is for verifying whether the updated firmware transmitted from the host device 5 is safe and correct. If the signature verification process is performed normally, the process proceeds to step S1220. If the signature verification process is not performed normally, the memory controller 10 skips the subsequent steps S1220 to S1270 and ends the process (step S1280).

[0072] In step S1220, the execution unit 103 performs a read process on the blocks 1_1 to 1_4 in order to change the firmware. The data read from the blocks 1_1 to 1_4 is saved to an empty block of the NAND flash memory 20, or the data buffer 122 or the RAM 110 in the memory controller 10. Since the same data is stored in each of the blocks 1_1 to 1_4, the execution unit 103 may perform a read process on the blocks 1_1 to 1_4 in parallel, reconstruct one block of data using the data read from these four blocks, and save the reconstructed one block of data. Alternatively, the execution unit 103 may perform a read process on only one of the blocks 1_1 to 1_4.

[0073] In step S1230, the execution section 103 executes the erase process on blocks 1_1 to 1_4.

[0074] In step S1240, if the firmware commit command CMD is either "001b" or "011b" based on the analysis result in step S115, the process proceeds to step S1250. If the firmware commit command CMD is "000b", the process proceeds to step S1270.

[0075] In step S1250, the analysis unit 102 determines whether the current firmware change involves a change in the active slot. If the result of the determination in step S1250 is that the active slot is changed, the process proceeds to step S1260. If the result of the determination in step S1250 is that the active slot is not changed, the process proceeds to step S1270.

[0076] In step S1260, the execution unit 103 executes the active slot change process for the blocks 1_1 to 1_4 using the saved data. The active slot change process is, for example, the process described with reference to FIG.

[0077] In step S1270, the execution unit 103 executes the firmware update process for the blocks 1_1 to 1_4 by using the saved data. The firmware update process is, for example, the process described with reference to FIG.

[0078] Then, in step S1280, the process ends.

[0079] The executing unit 103 may perform the processes of steps S1230 to S1270 for one block at a time. That is, the executing unit 103 may perform the processes of steps S1230 to S1270 for block 1_1, then perform the processes of steps S1230 to S1270 for block 1_2, then perform the processes of steps S1230 to S1270 for block 1_3, and then perform the processes of steps S1230 to S1270 for block 1_4.

[0080] (Change active slot) Next, the specific steps of the active slot changing process in step S140 will be described with reference to FIG.

[0081] In step S1410, in order to change the active slot, the execution unit 103 performs a read process on the blocks 1_1 to 1_4 in the same manner as the process in step S1220 described with reference to Fig. 10. The data read from the blocks 1_1 to 1_4 is saved in a free block of the NAND flash memory 20, or in the data buffer 122 or the RAM 110 in the memory controller 10.

[0082] In step S1420, the execution section 103 executes the erase process on blocks 1_1 to 1_4.

[0083] In step S1430, the execution unit 103 executes the active slot change process for the blocks 1_1 to 1_4 by using the saved data. The active slot change process is the process described with reference to FIG.

[0084] Then, in step S1440, the process ends.

[0085] The execution unit 103 may perform the processes of steps S1420 to S1430 for one block at a time.

[0086] (Action and effect) According to this embodiment, the following advantageous effects are obtained. (1) In the memory system 1 according to the present embodiment, firmware for a plurality of slots is stored in one block, so that the number of blocks that need to be reserved for storing firmware can be reduced.

[0087] Fig. 12A shows a schematic configuration example of a memory block group in the comparative example described with reference to Fig. 1 and Fig. 2. Fig. 12B shows a schematic configuration example of a memory block group in this embodiment.

[0088] As shown in FIG. 12A, in the comparative example, it was necessary to secure 12 blocks, ie, blocks 1_1 to 1_4, 2_1 to 2_4, and 3_1 to 3_4, for storing firmware.

[0089] In contrast, in the memory system 1 according to the present embodiment, as shown in Fig. 12B, it is sufficient to secure four blocks, 1_1 to 1_4, for storing firmware. Therefore, in the memory system 1 according to the present embodiment, the memory area to be secured for storing firmware can be reduced by about 67% compared to the comparative example. (2) In the memory system 1 according to the present embodiment, firmware for a plurality of slots is stored in one block, so that it is possible to improve the efficiency of use of the block reserved for storing firmware.

[0090] Fig. 13A is a schematic diagram showing an example of the usage status of memory blocks in a comparative example, and Fig. 13B is a schematic diagram showing an example of the usage status of memory blocks in an embodiment.

[0091] As shown in the figure, it is assumed that the storage capacity of one block is 10 MiB, the size of one slot is 3 MiB, and the size of the active slot information is several B. As shown in Fig. 13A, in the comparative example, the memory block includes an unused area of ​​about 7 MiB. In contrast, in the memory system 1 according to the present embodiment, as shown in Fig. 13B, the unused area can be reduced to about 1 MiB. (3) In the memory system 1 of this embodiment, whether changing the firmware itself, changing the active slot, or both changing the firmware itself and changing the active slot, it is sufficient to rewrite a number of blocks equal to the number of multiplicities.

[0092] Therefore, for example, when changing the firmware itself, writing of 12 blocks is required in the comparative example, whereas writing of 4 blocks is sufficient in the memory system 1 according to this embodiment. In other words, the memory system 1 according to this embodiment can reduce the number of write blocks. As a result, the memory system 1 according to this embodiment is expected to reduce the write time by about 67%.

[0093] Furthermore, in the memory system 1 according to this embodiment, the number of blocks that require writing or erasing during firmware update is reduced, which makes it possible to suppress deterioration of blocks and extend the life of the memory system.

[0094] Although some embodiments of the present invention have been described, these embodiments are presented as examples and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, substitutions, and modifications can be made without departing from the spirit of the invention. These embodiments and their modifications are included in the scope and spirit of the invention, and are included in the scope of the invention and its equivalents described in the claims.

[0095] For example, the number of slots provided in one block is not limited to 3 and can be changed as needed. The number of multiplicities is also not limited to 4 and can be changed as needed. [Explanation of symbols]

[0096] 1. Memory system 5...Host device 10…Memory controller 20...NAND flash memory (semiconductor memory) 20C...NAND flash memory 50…Processor 51...Storage device 52…RAM 53...Interface circuit 100…Processor 101...CPU 102…Analysis department 103…Executive Department 104…Memory 110…RAM 120…Buffer section 121...Command buffer 122...Data buffer 130...Interface circuit 140...Interface circuit

Claims

1. a semiconductor memory including at least one block which is a unit of a data erasure operation, a first block of the at least one block including a plurality of slots in which a plurality of firmware programs are respectively stored, and storing active slot information indicating an active slot among the plurality of slots; a memory controller electrically connected to the semiconductor memory and configured to change at least one of the firmware stored in any one of the plurality of slots of the first block and the active slot information stored in the first block in response to receiving a command from a host device instructing to update at least one of the plurality of firmware. Memory system.

2. The plurality of firmware programs are different from each other.

2. The memory system of claim 1.

3. The plurality of different firmwares include at least a first firmware and a second firmware; the plurality of slots includes at least a first slot that stores the first firmware and a second slot that stores the second firmware; In response to receiving the command from the host device, the memory controller: reading the first firmware stored in the first slot of the first block; performing the data erase operation on the first block; Modifying the read first firmware; and writing the modified first firmware to the first block on which the data erase operation was performed.

3. The memory system of claim 2.

4. The plurality of different firmwares include at least a first firmware and a second firmware; the plurality of slots includes at least a first slot that stores the first firmware and a second slot that stores the second firmware; In response to receiving the command from the host device, the memory controller: Reading the active slot information stored in the first block; performing the data erase operation on the first block; changing the active slot indicated by the read active slot information from the first slot to the second slot; and configured to write the modified active slot information to the first block on which the data erase operation was performed.

3. The memory system of claim 2.

5. The at least one block further includes a second block, the second block including a plurality of slots in which copies of the plurality of different firmware are respectively stored, and storing a copy of the active slot information; the memory controller is configured to update at least one of the firmware stored in any one of the plurality of slots and the active slot information for each of the first block and the second block in response to receiving the command from the host device; 3. The memory system of claim 2.

6. The memory controller is configured to change the active slot information stored in the first block without changing any of the plurality of firmwares stored in the plurality of slots of the first block in response to the command instructing a change of the active slot information.

2. The memory system of claim 1.

7. the memory controller is configured to change any one of the plurality of firmwares stored in the plurality of slots of the first block in response to the command instructing a change of the firmware, and not to change the active slot information stored in the first block.

2. The memory system of claim 1.

8. the active slot information includes information regarding a boot order for booting firmware stored in another slot when booting of the firmware stored in the active slot fails; 2. The memory system of claim 1.

9. A method for updating firmware stored in a semiconductor memory including at least one block that is a unit of a data erasure operation, comprising the steps of: storing a plurality of pieces of firmware in a plurality of slots provided in a first block of the at least one block; storing active slot information indicating active slots among the plurality of slots in the first block; receiving a command from a host device instructing to update at least one of the plurality of firmware; modifying at least one of the firmware stored in any one of the plurality of slots of the first block and the active slot information stored in the first block; How to update firmware.

10. A computer-executable program for updating firmware stored in a semiconductor memory including at least one block that is a unit of a data erasure operation, the computer-executable program comprising: storing a plurality of pieces of firmware in a plurality of slots provided in a first block of the at least one block; storing active slot information indicating active slots among the plurality of slots in the first block; receiving a command from a host device instructing to update at least one of the plurality of firmware; modifying at least one of the firmware stored in any one of the plurality of slots in the first block and the active slot information stored in the first block; program.

Citation Information

Patent Citations

  • US10,884,947

  • Microcomputer with built-in flash memory, method for writing data to built-in flash memory of microcomputer, and program for writing data to flash memory

    US20160275011A1

  • Memory system and method of controlling memory system

    US8463986B2