WO2012140710A1 - Boot control device, boot system, and boot control method - Google Patents

Boot control device, boot system, and boot control method Download PDF

Info

Publication number
WO2012140710A1
WO2012140710A1 PCT/JP2011/007135 JP2011007135W WO2012140710A1 WO 2012140710 A1 WO2012140710 A1 WO 2012140710A1 JP 2011007135 W JP2011007135 W JP 2011007135W WO 2012140710 A1 WO2012140710 A1 WO 2012140710A1
Authority
WO
WIPO (PCT)
Prior art keywords
boot
area
control device
normal
nonvolatile memory
Prior art date
Application number
PCT/JP2011/007135
Other languages
French (fr)
Japanese (ja)
Inventor
高橋 司
宣洋 坪井
三野 吉輝
秀憲 南木
朋久 瀬崎
Original Assignee
パナソニック株式会社
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by パナソニック株式会社 filed Critical パナソニック株式会社
Publication of WO2012140710A1 publication Critical patent/WO2012140710A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements 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/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4403Processor initialisation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/1666Error detection or correction of the data by redundancy in hardware where the redundant component is memory or memory area
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1417Boot up procedures

Definitions

  • the present invention relates to a boot control device, a boot system, and a boot control method, and more particularly to a boot control device that manages a plurality of identical boot programs stored in a nonvolatile memory.
  • NAND flash a NAND flash memory
  • this NAND flash has the advantage of being inexpensive, it has the disadvantage of being fragile. For this reason, in a boot system using a NAND flash, it is difficult to always read a program stably and start the system.
  • wear leveling technology that generally distributes so that access is not concentrated on a specific block.
  • a table or file system that stores the number of accesses to each block, or an arbitration circuit that determines an access block is required.
  • Patent Document 1 For such a problem, the technique of Patent Document 1 is known.
  • Patent Document 1 stores the same program in each of a plurality of blocks in preparation for generation of a defective block. Then, when an uncorrectable ECC error occurs, this technique enables stable program reading by reading the corresponding page of the next block.
  • Patent Document 2 is known.
  • Patent Document 1 stores a plurality of identical programs in advance.
  • Patent Document 1 has a problem that it is difficult to set an optimum condition in the trade-off between the reliability of the system and the required storage area.
  • Patent Document 2 is a technique for improving the reliability of a general program, and the program is copied when an abnormality starts to occur in the program. Therefore, in this technique, when a program is broken in a state that cannot be repaired at the time of boot activation, the program cannot be copied and the activation itself cannot be performed.
  • an object of the present invention is to provide a boot control device, a boot system, and a boot control method capable of improving the reliability of system startup and suppressing an increase in a storage area for storing a boot program.
  • a boot control device is a boot control device that manages a plurality of identical boot programs stored in a nonvolatile memory for starting up a system.
  • the normal boot programs are copied to another area of the nonvolatile memory.
  • a copying unit is provided.
  • the boot control apparatus can always secure a plurality of boot programs, and thus can improve the reliability of system startup.
  • the boot control device copies the boot program, thereby storing a boot program according to the state of the nonvolatile memory Can be adaptively changed. Thereby, the boot control device can suppress an increase in the storage area for storing the boot program.
  • the boot control device further determines a storage unit that stores a copy flag indicating whether or not a copy process needs to be performed, and whether or not the number of the normal boot programs is below the threshold.
  • a copy determination unit that sets the copy flag when the number of normal boot programs is lower than the threshold, the copy unit refers to the copy flag after the system is started, When the copy flag is set, the boot program may be copied to another area of the nonvolatile memory.
  • the boot control device since the boot control device according to one aspect of the present invention does not need to perform a copy operation at the time of activation, an increase in activation time due to the copy operation can be suppressed.
  • the non-volatile memory includes a boot-dedicated area that is used exclusively for storing the plurality of boot programs, and a normal area other than the boot-dedicated area, and the boot control device further includes the non-volatile memory An area management unit that manages a boot use area used for storing the plurality of boot programs in the memory area, wherein the area management unit sets the boot dedicated area as the boot use area; If there is no free area, a part of the normal area may be added to the boot use area, and the copy unit may copy the boot program to the boot use area.
  • the boot control device expands the boot use area even when all the areas prepared in advance for the boot program are used up, thereby Reliability can be maintained.
  • the boot control device does not have to secure a boot use area from the beginning, a similar system can be constructed for non-volatile memories with different reliability.
  • the normal area includes a system use area used by the system and a spare area other than the system use area, and the area management unit, when there is no free area in the boot use area, May be added to the boot use area.
  • the boot control device further includes a wear leveling processing unit that performs a wear leveling process on the nonvolatile memory using the system use area after the system is started, and the area management unit includes: When there is no free area in the boot use area and there is no free area in the spare area, an unused area that is not currently used among the system use areas is added to the boot use area, and the unused area May be excluded from the system use area.
  • the boot control device can realize a flexible boot system according to the reliability of the nonvolatile memory in the memory system that performs the wear leveling process.
  • the present invention can be realized not only as such a boot control device but also as a boot control method using characteristic means included in the boot control device as a step, or such a characteristic step in a computer. It can also be realized as a program to be executed. Needless to say, such a program can be distributed via a non-transitory computer-readable recording medium such as a CD-ROM and a transmission medium such as the Internet.
  • the present invention can be realized as a semiconductor integrated circuit (LSI) that realizes part or all of the functions of such a boot control device, or can be realized as a boot system including such a boot control device.
  • LSI semiconductor integrated circuit
  • the present invention can provide a boot control device, a boot system, and a boot control method capable of improving the reliability of system startup and suppressing an increase in the storage area for storing the boot program.
  • FIG. 1 is a block diagram showing a configuration of a boot system according to an embodiment of the present invention.
  • FIG. 2 is a diagram showing a configuration of the nonvolatile memory according to the embodiment of the present invention.
  • FIG. 3 is a diagram showing an example of data stored in the nonvolatile memory according to the embodiment of the present invention.
  • FIG. 4 is a diagram showing the configuration of the storage area of the nonvolatile memory according to the embodiment of the present invention.
  • FIG. 5 is a diagram showing a configuration of boot management information according to the embodiment of the present invention.
  • FIG. 6 is a flowchart of the startup process according to the embodiment of the present invention.
  • FIG. 7 is a flowchart of the copy process according to the embodiment of the present invention.
  • FIG. 1 is a block diagram showing a configuration of a boot system according to an embodiment of the present invention.
  • FIG. 2 is a diagram showing a configuration of the nonvolatile memory according to the embodiment of the present invention.
  • FIG. 3
  • FIG. 8 is a diagram showing an operation example in the boot system according to the embodiment of the present invention.
  • FIG. 9 is a diagram showing an operation example in the boot system according to the embodiment of the present invention.
  • FIG. 10 is a diagram showing an operation example in the boot system according to the embodiment of the present invention.
  • FIG. 11 is a diagram illustrating an application example of the boot system according to the embodiment of the present invention.
  • the boot control device copies a normal boot program to another area of the nonvolatile memory when the number of normal boot programs stored in the nonvolatile memory falls below a threshold value. .
  • the boot control device can always secure a plurality of boot programs, so that the reliability of system startup can be improved. Further, the boot control device can adaptively change the storage area for storing the boot program according to the state of the nonvolatile memory. Thereby, the boot control device can suppress an increase in the storage area for storing the boot program.
  • FIG. 1 is a block diagram showing a configuration of a boot system 100 according to an embodiment of the present invention.
  • the boot system 100 includes a boot control device 110 and a nonvolatile memory 120.
  • the non-volatile memory 120 is a non-reliable non-volatile memory, for example, a NAND flash memory.
  • FIG. 2 is a diagram showing a configuration of the nonvolatile memory 120.
  • the non-volatile memory 120 includes a plurality of blocks 201 which are erase units.
  • Each block 201 includes a plurality of pages 202 that are units of writing and reading.
  • Each page 202 includes a data area 203 and a redundant area 204 in which ECC (Error Correcting Code) is stored.
  • ECC Error Correcting Code
  • a defect mark 205 (BadBlock mark) indicating that the block is not a normal block is stored. This defect mark is given to a block determined to be defective in the inspection at the time of shipment.
  • FIG. 3 is a diagram illustrating an example of data stored in the non-volatile memory 120.
  • the nonvolatile memory 120 stores a plurality of boot programs 121.
  • the plurality of boot programs 121 are the same program (code), and are programs for starting the system. In the following, it is assumed that each boot program 121 is stored in one block 201. Note that each boot program 121 may be stored across two or more blocks 201.
  • the boot control device 110 manages a plurality of boot programs 121 stored in the nonvolatile memory 120.
  • the boot control device 110 includes a boot control circuit 130, a system control unit 140, a flash memory controller 150, a bus controller 160, a storage unit 170, and a RAM 180.
  • the flash memory controller 150 controls access to the nonvolatile memory 120 from the boot control circuit 130 and the system control unit 140. Further, the flash memory controller 150 includes an error determination circuit 151 that performs ECC processing.
  • the bus controller 160 controls access to the nonvolatile memory 120, the storage unit 170, and the RAM 180 from the boot control circuit 130 and the system control unit 140.
  • the storage unit 170 stores boot management information 171.
  • the storage unit 170 is a nonvolatile memory having higher reliability than the nonvolatile memory 120, and is, for example, an EEPROM.
  • the boot control circuit 130 manages a plurality of boot programs 121 stored in the nonvolatile memory 120 using the boot management information 171.
  • the boot control circuit 130 includes a copy unit 131, a copy determination unit 132, an area management unit 133, and a boot processing unit 134.
  • the function of the boot control circuit 130 is realized by a dedicated circuit (hardware).
  • the copy determination unit 132 determines whether or not the number of normal boot programs 121 stored in the nonvolatile memory 120 is below a predetermined threshold. Then, the copy determination unit 132 determines to perform the copy process when the number of normal boot programs 121 falls below the threshold.
  • the area management unit 133 manages the boot use area used for storing the boot program 121 among the storage areas of the nonvolatile memory 120.
  • the copy unit 131 copies the normal boot program 121 to another area of the nonvolatile memory 120 when the number of normal boot programs 121 stored in the nonvolatile memory 120 falls below the threshold value. Specifically, the copy unit 131 copies the normal boot program 121 to the boot use area.
  • the boot processing unit 134 reads a normal boot program 121 out of a plurality of boot programs 121 stored in the nonvolatile memory 120 and stores it in the RAM 180.
  • the system control unit 140 starts up the system using the boot program 121 stored in the RAM 180. Further, the system control unit 140 controls the system after startup.
  • the function of the system control unit 140 is realized by the CPU executing a program.
  • the system control unit 140 includes a wear leveling processing unit 141.
  • the wear leveling processing unit 141 performs a wear leveling process that performs decentralization so that accesses are not concentrated on a specific block of the nonvolatile memory 120.
  • FIG. 4 is a diagram showing the configuration of the storage area of the nonvolatile memory 120.
  • the nonvolatile memory 120 includes a boot dedicated area 211 and a normal area 212.
  • the boot dedicated area 211 is an area used exclusively for storing a plurality of boot programs 121.
  • the normal area 212 is an area other than the boot dedicated area 211.
  • the normal area 212 includes a wear leveling area 213 used for wear leveling processing and a spare area 214.
  • the wear leveling area 213 is an example of a system use area used by the system (system control unit 140), and other areas used by the system can be used instead of the wear leveling area 213. .
  • the wear leveling area 213 includes an in-use area 215 that is currently used for the wear leveling process and an unused area 216 that is not used for the wear leveling process but is reserved for the wear leveling process.
  • the spare area 214 is an area other than the wear leveling area 213, and is an area not assigned to a specific application. In other words, the spare area 214 is an area that can be freely used by the system designer.
  • the area management unit 133 sets the boot dedicated area 211 as a boot use area in the initial state. Further, the area management unit 133 adds a part of the normal area 212 to the boot use area when there is no empty area in the boot use area. Specifically, the area management unit 133 adds a part of the spare area 214 to the boot use area when there is no free area in the boot use area.
  • the area management unit 133 adds the unused area 216 to the boot use area and wear leveling the unused area 216 when the boot use area has no free area and the spare area 214 has no free area. Exclude from region 213.
  • FIG. 5 is a diagram showing the configuration of the boot management information 171.
  • the boot management information 171 includes a normal block number 310, a spare block number 320, a used block number 330, a normal block number 340, a spare block number 350, and a copy flag 360.
  • the normal block number 310 indicates the block number in which the normal boot program 121 is stored.
  • the normal block number 310 is assigned an area in which a plurality of numbers can be stored.
  • the normal boot program 121 is a boot program that can be normally executed.
  • the abnormal boot program 121 is a boot program that cannot be executed normally.
  • the boot program 121 that is not normal is a boot program in which an abnormality has occurred from the time of shipment and a boot program in which data is destroyed due to aging.
  • ECC ECC
  • a boot program whose data is destroyed to the extent that error recovery is possible is recognized as a normal boot program. Note that such a boot program capable of error recovery may be handled as an abnormal boot program.
  • the spare block number 320 indicates the number of an unused block included in the boot use area.
  • the spare block number 320 includes spare block numbers 321 to 323.
  • the spare block number 321 indicates the number of an unused block in the boot dedicated area 211.
  • the spare block number 322 indicates the number of an unused block in the spare area 214 included in the boot use area.
  • the spare block number 323 indicates the number of an unused block in the unused area 216 included in the boot use area.
  • the used block number 330 indicates the number of the block in which the boot program 121 read at the time of startup is stored. In other words, the used block number 330 indicates the number of the block in which the boot program 121 read at the previous activation is stored.
  • the spare block number 350 indicates the number of unused blocks in the boot use area.
  • the spare block number 350 includes spare block numbers 351 to 353.
  • the number of spare blocks 351 indicates the number of unused blocks in the boot dedicated area 211.
  • the spare block number 352 indicates the number of unused blocks in the spare area 214 included in the boot use area.
  • the spare block number 353 indicates the number of unused blocks in the unused area 216 included in the boot use area.
  • the copy flag 360 indicates whether or not a boot program copy process is necessary.
  • the copy flag 360 is set by the copy determination unit 132. Specifically, the copy determination unit 132 sets the copy flag 360 to valid “1” when the number of normal boot programs 121 is below the threshold.
  • FIG. 6 is a flowchart of the startup process by the boot control device 110.
  • the boot processing unit 134 selects a block indicated by the used block number 330 as a block to be read (hereinafter referred to as a target block) (S101). Since the used block number 330 is not set at the first activation, the boot processing unit 134 sets one of the block numbers indicated by the normal block number 310 to the used block number 330 and sets the set number. This block is selected as the target block.
  • the boot processing unit 134 reads the defect mark 205 included in the redundant area 204 of the first page of the target block, and determines whether the target block is a normal block based on the read defect mark 205. (S102).
  • the boot processing unit 134 reads the data of the first page of the target block (S103).
  • the error determination circuit 151 determines whether or not an error is included in the data by performing an ECC check on the read data (S104). Specifically, the error determination circuit 151 calculates ECC from the read data. Then, the error determination circuit 151 determines whether or not the calculated ECC matches the ECC stored in the redundant area 204. The error determination circuit 151 determines that the read data is normal when the calculated ECC and the ECC stored in the redundant area 204 match, and determines that the data includes an error when they do not match. To do.
  • the read data is stored in the RAM 180.
  • the boot processing unit 134 reads the data of the next page of the target block (S103), and performs the processing after step S104.
  • the error determination circuit 151 restores the read data to correct data, and restores the restored data. Store in the RAM 180.
  • the system control unit 140 starts the system by executing the boot program 121 stored in the RAM 180 (S109).
  • the copy determination unit 132 determines that the number of normal blocks 340 is predetermined. It is determined whether it is smaller than the threshold value (S110).
  • the copy determination unit 132 sets the copy flag 360 to valid “1” (S111).
  • the boot processing unit 134 uses the block number 330, the normal block number 310, and the number of normal blocks. 340 is updated (S112). Specifically, the boot processing unit 134 excludes the number of the current target block in which an abnormality is found from the normal block number 310 and reduces the number of normal blocks 340 by “1”. Further, the boot processing unit 134 sets one of the block numbers indicated by the updated normal block number 310 as the used block number 330.
  • the boot control device 110 executes the processing from step S101 onward again. If there is an uncorrectable error in the read data (Yes in S105), the boot control device 110 may start reading data from the first page of the block, or an uncorrectable error occurs. Data reading may be started from the page that has been processed.
  • the normal boot program 121 is transferred to the RAM 180. Then, the system control unit 140 executes the boot program 121 to start the system.
  • the copy flag 360 is set to be valid. Also, another normal boot program 121 stored in the nonvolatile memory 120 is read, and the system is normally started.
  • FIG. 7 is a flowchart of copy processing by the boot control apparatus 110. This copy process is executed after the system is started.
  • the copy unit 131 confirms whether or not the copy flag 360 is set when the system processing amount is low or the like (S201). When the copy flag 360 is not set (No in S201), the copy unit 131 does not perform the copy process.
  • the area management unit 133 checks whether there is an empty block in the boot use area (S202). Specifically, the area management unit 133 refers to the spare block number 350 and determines that there is an empty block in the boot use area when any one of the spare block numbers 351 to 353 indicates “1” or more. If all the spare block numbers 351 to 353 are “0”, it is determined that there is no empty block in the boot use area.
  • the copy unit 131 selects one of the empty blocks in the boot use area as the copy destination block (S203). Specifically, the copy unit 131 selects a block having a number indicated by any of the spare block numbers 321 to 323 as a copy destination block.
  • the copy unit 131 updates the spare block number 320 (S204) and updates the spare block number 350 (S205). Specifically, the copy unit 131 excludes the number of the copy destination block from the spare block number 320 and reduces the spare block number 350 by “1”.
  • the copy unit 131 copies the normal boot program 121 to the copy destination block (S206).
  • the copy unit 131 updates the normal block number 310 and the normal block number 340 (S207 and S208). Specifically, the copy unit 131 adds the number of the copy destination block to the normal block number 310 and increases the number of normal blocks 340 by “1”.
  • the copy unit 131 updates the used block number 330 to the number of the new copy destination block (S209).
  • the area management unit 133 checks whether there is an empty block in the spare area 214 (S210).
  • the area management unit 133 adds the empty block in the spare area 214 to the boot use area (S211). Further, the area management unit 133 notifies the system control unit 140 that the spare area 214 is used. Then, the copy unit 131 selects the empty block as a copy destination block (S203), and the processing after step S204 is performed.
  • the area management unit 133 checks whether there is an empty block in the unused area 216 (S212).
  • the area management unit 133 adds the empty block in the unused area 216 to the boot use area (S213). Further, the area management unit 133 notifies the wear leveling processing unit 141 to exclude the unused area 216 from the wear leveling area 213 (S214). Then, the copy unit 131 selects the empty block as a copy destination block (S203), and the processes after step S204 are performed.
  • FIG. 8 is a diagram illustrating an operation example of the boot control device 110 when there is an empty area in the boot dedicated area 211.
  • FIG. 9 is a diagram illustrating an operation example of the boot control device 110 when there is no empty area in the boot dedicated area 211 and there is an empty area in the spare area 214.
  • FIG. 10 is a diagram illustrating an operation example of the boot control device 110 when there is no empty area in the boot dedicated area 211 and the spare area 214 and there is an empty area in the unused area 216.
  • the boot control device 110 when the number of normal boot programs 121 stored in the nonvolatile memory 120 falls below the threshold, the boot control device 110 according to the embodiment of the present invention stores the normal boot programs 121 in the nonvolatile memory. Copy to another area of 120. As a result, the boot control device 110 can always secure a plurality of boot programs 121, so that the reliability of system startup can be improved.
  • the boot control device 110 stores the boot program 121 according to the state of the nonvolatile memory 120 by copying the boot program 121 when the number of normal boot programs 121 is equal to or less than the threshold.
  • the storage area can be adaptively changed. Thereby, the boot control apparatus 110 can suppress an increase in the storage area for storing the boot program 121.
  • the boot control apparatus 110 only determines whether or not copy processing is necessary at the time of startup, and copies the boot program 121 after the system is started. Thereby, the boot control apparatus 110 can suppress an increase in startup time due to the copy operation.
  • the boot control device 110 uses another area as a boot use area when there is no more free area in the boot dedicated area 211. Thereby, even when the boot control device 110 has used up all the areas prepared in advance for the boot program, the boot control area can be expanded to maintain the reliability of the boot program. Further, since the boot control device 110 does not need to secure a boot use area from the beginning, a similar system can be constructed for non-volatile memories with different reliability.
  • the boot control device 110 uses an area used for wear leveling processing as a boot use area when there is no free area in the boot dedicated area 211. Thereby, the boot control apparatus 110 can realize a flexible boot system according to the reliability of the nonvolatile memory in the memory system that performs the wear leveling process.
  • FIG. 11 is a diagram illustrating an application example of the boot control device 110.
  • the boot control circuit 130 the system control unit 140 (CPU), and the flash memory controller 150 are realized as a one-chip system LSI 501.
  • the system LSI 501, the storage unit 170, and the nonvolatile memory 120 are mounted on the circuit board 502.
  • the circuit board 502 is used for a digital television 503, a digital recorder 504, or the like.
  • each processing unit included in the boot control device 110 described above may be individually made into one chip, or may be made into one chip so as to include some or all of them.
  • each processing unit is configured using hardware and / or software.
  • the configuration using hardware can also be configured using software
  • the configuration using software is hardware. It is also possible to configure using
  • circuits are not limited to LSI, and may be realized by a dedicated circuit or a general processor.
  • An FPGA Field Programmable Gate Array
  • a reconfigurable processor that can reconfigure the connection and setting of circuit cells inside the LSI may be used.
  • part or all of the functions of the boot control device according to the embodiment of the present invention may be realized by a processor such as a CPU executing a program.
  • the present invention may be the above program or a non-transitory computer-readable recording medium on which the above program is recorded.
  • the program can be distributed via a transmission medium such as the Internet.
  • division of functional blocks in the block diagram is an example, and a plurality of functional blocks can be realized as one functional block, a single functional block can be divided into a plurality of functions, or some functions can be transferred to other functional blocks. May be.
  • functions of a plurality of functional blocks having similar functions may be processed in parallel or time-division by a single hardware or software.
  • the configuration of the boot control device is for illustration in order to specifically describe the present invention, and the boot control device according to the present invention does not necessarily have all of the above configurations. In other words, the boot control device according to the present invention only needs to have a minimum configuration capable of realizing the effects of the present invention.
  • FIGS. 6 and 7 are for illustrating the present invention specifically, and the boot control method according to the present invention does not necessarily include all of the above steps. .
  • the boot control method according to the present invention needs to include only the minimum steps that can realize the effects of the present invention.
  • the order in which the above steps are executed is for illustration in order to specifically describe the present invention, and may be in an order other than the above.
  • a part of the above steps may be executed simultaneously (in parallel) with other steps.
  • the copy process shown in FIG. 7 is executed after the system is started, but may be executed before the system is started.
  • the process for determining whether copying is necessary may be performed after the system is activated.
  • steps S204 to S209 shown in FIG. 7 may be other than the order shown in FIG. Some processes may be executed simultaneously.
  • the present invention can be applied to a boot control device and a boot system. Further, the present invention can be applied to various devices such as a digital television and a digital recorder using a boot control device and a boot system.
  • Boot Management Information 180 RAM 201 block 202 page 203 data area 204 redundant area 205 defective mark 211 boot dedicated area 212 normal area 213 wear leveling area 214 spare area 215 busy area 216 unused area 310 normal block numbers 320, 321, 322, 323 spare block number 330 Block number used 340 Number of normal blocks 350, 351, 352, 353 Number of spare blocks 360 Copy flag 501 System LSI 502 circuit board 503 digital television 504 digital recorder

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)
  • Stored Programmes (AREA)

Abstract

This boot control device (110) manages multiple instances of the same boot program (121) which are stored in a nonvolatile memory (120) and are for starting a system. The boot control device (110) is equipped with a copy unit (131) which, when the number of normal boot programs (121) stored in the nonvolatile memory (120) falls below a predetermined threshold value of two or more, copies the normal boot program (121) to another region of the nonvolatile memory (120).

Description

ブート制御装置、ブートシステム及びブート制御方法Boot control device, boot system, and boot control method
 本発明は、ブート制御装置、ブートシステム及びブート制御方法に関し、特に、不揮発性メモリに記憶されている、同一の複数のブートプログラムを管理するブート制御装置に関する。 The present invention relates to a boot control device, a boot system, and a boot control method, and more particularly to a boot control device that manages a plurality of identical boot programs stored in a nonvolatile memory.
 近年、データの書換えが可能な不揮発性メモリからプログラムを読み出してシステムを起動するブートシステムにおいて、不揮発性メモリとしてNAND型フラッシュメモリ(以下、「NANDフラッシュ」とも記す)が用いられている。このNANDフラッシュは、安価であるという長所を有する一方で、壊れやすいという短所を有する。このため、NANDフラッシュを用いたブートシステムでは、常に安定してプログラムを読み出し、システムを起動させることが困難である。 Recently, a NAND flash memory (hereinafter also referred to as “NAND flash”) is used as a nonvolatile memory in a boot system that starts a system by reading a program from a nonvolatile memory capable of rewriting data. While this NAND flash has the advantage of being inexpensive, it has the disadvantage of being fragile. For this reason, in a boot system using a NAND flash, it is difficult to always read a program stably and start the system.
 これに対して、一般的に特定のブロックにアクセスが集中しないように分散化を図るウェアレベリング技術がある。一般的なウェアレベリングでは、各ブロックに対するアクセス回数などを記憶したテーブル或いはファイルシステム、又は、アクセスブロックを決める調停回路が必要である。 On the other hand, there is a wear leveling technology that generally distributes so that access is not concentrated on a specific block. In general wear leveling, a table or file system that stores the number of accesses to each block, or an arbitration circuit that determines an access block is required.
 このため、NANDフラッシュを用いるブートシステムでは、上記のようなウェアレベリングの手法を導入することは適さない。なぜなら、システムの起動時に使用可能な資源(LSI内蔵のROM及びRAM容量)は限られる。これにより、ファイルシステムの利用はできず、また、テーブルに情報を記憶させることも困難である。さらに、システムの起動は速さも求められるが、複雑なウェアレベリングを行うと、起動時間が長くなってしまう課題がある。 For this reason, in a boot system using a NAND flash, it is not suitable to introduce the above wear leveling technique. This is because resources (ROM and RAM capacities built in the LSI) that can be used when the system is started are limited. As a result, the file system cannot be used, and it is difficult to store information in the table. Furthermore, the system is required to be started up quickly, but there is a problem that the start-up time becomes long if complex wear leveling is performed.
 このような課題に対して、特許文献1の技術が知られている。 For such a problem, the technique of Patent Document 1 is known.
 特許文献1記載の技術は、不良ブロック発生に備えて、複数のブロックにそれぞれ同一のプログラムを記憶しておく。そして、当該技術は、訂正不可能なECCエラーが発生した場合には、次のブロックの該当ページの読出しを行うことにより、安定したプログラム読み出しを可能にする。 The technique described in Patent Document 1 stores the same program in each of a plurality of blocks in preparation for generation of a defective block. Then, when an uncorrectable ECC error occurs, this technique enables stable program reading by reading the corresponding page of the next block.
 また、別の技術として、特許文献2の技術が知られている。 Also, as another technique, the technique of Patent Document 2 is known.
 特許文献2記載の技術は、選択されたブロックで読み出されたデータにエラーがあり、かつエラーを訂正可能な場合は、予め確保しておいた未使用ブロックにプログラムをコピーする。そして、当該技術は、新たにコピーしたプログラムを読み出す。これにより、当該技術は、プログラムの信頼性を向上できる。 In the technique described in Patent Document 2, if there is an error in the data read in the selected block and the error can be corrected, the program is copied to a reserved unused block. Then, the technology reads the newly copied program. Thereby, the technique can improve the reliability of the program.
特開2007-304781号公報JP 2007-304781 A 特開2006-134310号公報JP 2006-134310 A
 上述したように特許文献1記載の技術では、予め複数の同一のプログラムを記憶している。 As described above, the technique disclosed in Patent Document 1 stores a plurality of identical programs in advance.
 しかしながら、NANDフラッシュの信頼性はデバイスによって異なる。よって、十分な信頼性を満たすために必要となる同一のプログラムの個数を見積もることは困難である。 However, the reliability of NAND flash varies from device to device. Therefore, it is difficult to estimate the number of identical programs required to satisfy sufficient reliability.
 つまり、多くの同一のプログラムを予め記憶しておくことで、信頼性は向上できるが、一方で、プログラムを格納するために常に大きな記憶領域が必要となってしまうという問題が生じる。また、予め記憶しておくプログラムの数を減らすと、信頼性が低下する。つまり、ある段階で全てのプログラムが壊れ、システムの起動が行えなくなる可能性が高まる。 That is, by storing many identical programs in advance, the reliability can be improved, but on the other hand, a problem arises that a large storage area is always required to store the programs. Further, when the number of programs stored in advance is reduced, the reliability is lowered. In other words, there is a high possibility that all programs are broken at a certain stage and the system cannot be started.
 このように、特許文献1記載の技術は、システムの信頼性と必要となる記憶領域とのトレードオフにおいて、最適な条件を設定することが困難であるという課題がある。 As described above, the technique described in Patent Document 1 has a problem that it is difficult to set an optimum condition in the trade-off between the reliability of the system and the required storage area.
 また、特許文献2記載の技術では、一般的なプログラムの信頼性を向上させるための技術であり、プログラムに異常が発生しはじめた時点で、当該プログラムをコピーする。よって、当該技術では、ブート起動時において、修復不可能な状態にプログラムが壊れている場合には、当該プログラムをコピーできないとともに、起動自体が行えなくなる。 Further, the technique described in Patent Document 2 is a technique for improving the reliability of a general program, and the program is copied when an abnormality starts to occur in the program. Therefore, in this technique, when a program is broken in a state that cannot be repaired at the time of boot activation, the program cannot be copied and the activation itself cannot be performed.
 そこで、本発明は、システム起動の信頼を向上できるとともに、ブートプログラムを記憶するための記憶領域の増加を抑制できるブート制御装置、ブートシステム及びブート制御方法を提供することを目的とする。 Therefore, an object of the present invention is to provide a boot control device, a boot system, and a boot control method capable of improving the reliability of system startup and suppressing an increase in a storage area for storing a boot program.
 上記目的を達成するために、本発明の一形態に係るブート制御装置は、不揮発性メモリに記憶されている、システムを起動するための、同一の複数のブートプログラムを管理するブート制御装置であって、前記不揮発性メモリに記憶されている正常な前記ブートプログラムの数が、2以上の予め定められた閾値を下回ったときに、正常な前記ブートプログラムを前記不揮発性メモリの他の領域にコピーするコピー部を備える。 In order to achieve the above object, a boot control device according to an aspect of the present invention is a boot control device that manages a plurality of identical boot programs stored in a nonvolatile memory for starting up a system. When the number of normal boot programs stored in the nonvolatile memory falls below a predetermined threshold value of 2 or more, the normal boot programs are copied to another area of the nonvolatile memory. A copying unit is provided.
 この構成によれば、本発明の一形態に係るブート制御装置は、複数のブートプログラムを常に確保しておくことができるので、システム起動の信頼を向上できる。また、当該ブート制御装置は、正常なブートプログラムの数が閾値以下になった場合に、当該ブートプログラムをコピーすることで、不揮発性メモリの状態に応じて、ブートプログラムを記憶するための記憶領域を適応的に変化させることができる。これにより、当該ブート制御装置は、ブートプログラムを記憶するための記憶領域の増加を抑制できる。 According to this configuration, the boot control apparatus according to an aspect of the present invention can always secure a plurality of boot programs, and thus can improve the reliability of system startup. In addition, when the number of normal boot programs falls below the threshold, the boot control device copies the boot program, thereby storing a boot program according to the state of the nonvolatile memory Can be adaptively changed. Thereby, the boot control device can suppress an increase in the storage area for storing the boot program.
 また、前記ブート制御装置は、さらに、コピー処理を行う必要があるか否かを示すコピーフラグを格納する記憶部と、前記正常なブートプログラムの数が前記閾値を下回っているか否かを判定し、前記正常なブートプログラムの数が前記閾値を下回っている場合に、前記コピーフラグを設定するコピー判定部とを備え、前記コピー部は、前記システムが起動した後に、前記コピーフラグを参照し、当該コピーフラグが設定されている場合に、前記ブートプログラムを前記不揮発性メモリの他の領域にコピーしてもよい。 The boot control device further determines a storage unit that stores a copy flag indicating whether or not a copy process needs to be performed, and whether or not the number of the normal boot programs is below the threshold. A copy determination unit that sets the copy flag when the number of normal boot programs is lower than the threshold, the copy unit refers to the copy flag after the system is started, When the copy flag is set, the boot program may be copied to another area of the nonvolatile memory.
 この構成によれば、本発明の一形態に係るブート制御装置は、起動時にコピー動作を行なわなくてもよいので、当該コピー動作を行うことによる起動時間の増加を抑制できる。 According to this configuration, since the boot control device according to one aspect of the present invention does not need to perform a copy operation at the time of activation, an increase in activation time due to the copy operation can be suppressed.
 また、前記不揮発性メモリは、前記複数のブートプログラムを記憶するために専用に用いられるブート専用領域と、前記ブート専用領域以外の通常領域とを含み、前記ブート制御装置は、さらに、前記不揮発性メモリの領域のうち、前記複数のブートプログラムの記憶に用いるブート使用領域を管理する領域管理部を備え、前記領域管理部は、前記ブート専用領域を前記ブート使用領域に設定し、前記ブート使用領域に空き領域がない場合に、前記通常領域の一部を前記ブート使用領域に加え、前記コピー部は、前記ブート使用領域に、前記ブートプログラムをコピーしてもよい。 The non-volatile memory includes a boot-dedicated area that is used exclusively for storing the plurality of boot programs, and a normal area other than the boot-dedicated area, and the boot control device further includes the non-volatile memory An area management unit that manages a boot use area used for storing the plurality of boot programs in the memory area, wherein the area management unit sets the boot dedicated area as the boot use area; If there is no free area, a part of the normal area may be added to the boot use area, and the copy unit may copy the boot program to the boot use area.
 この構成によれば、本発明の一形態に係るブート制御装置は、ブートプログラムのために予め準備しておいた領域を全て使い尽くした場合でも、ブート使用領域を拡張することで、ブートプログラムの信頼性を維持できる。また、当該ブート制御装置は、最初から固定的にブート使用領域を確保しなくてもよいので、信頼性の異なる不揮発性メモリに対して同様のシステムを構築できる。 According to this configuration, the boot control device according to an aspect of the present invention expands the boot use area even when all the areas prepared in advance for the boot program are used up, thereby Reliability can be maintained. In addition, since the boot control device does not have to secure a boot use area from the beginning, a similar system can be constructed for non-volatile memories with different reliability.
 また、前記通常領域は、前記システムが使用するシステム使用領域と、前記システム使用領域以外の予備領域とを含み、前記領域管理部は、前記ブート使用領域に空き領域がない場合に、前記予備領域の一部を前記ブート使用領域に加えてもよい。 In addition, the normal area includes a system use area used by the system and a spare area other than the system use area, and the area management unit, when there is no free area in the boot use area, May be added to the boot use area.
 また、前記ブート制御装置は、さらに、前記システムの起動後に、前記システム使用領域を使用して、前記不揮発性メモリに対してウェアレベリング処理を行うウェアレベリング処理部を備え、前記領域管理部は、前記ブート使用領域に空き領域がなく、かつ、前記予備領域に空き領域がない場合に、前記システム使用領域のうち現在使用されていない未使用領域を前記ブート使用領域に加えるとともに、当該未使用領域を前記システム使用領域から除外してもよい。 Further, the boot control device further includes a wear leveling processing unit that performs a wear leveling process on the nonvolatile memory using the system use area after the system is started, and the area management unit includes: When there is no free area in the boot use area and there is no free area in the spare area, an unused area that is not currently used among the system use areas is added to the boot use area, and the unused area May be excluded from the system use area.
 この構成によれば、本発明の一形態に係るブート制御装置は、ウェアレベリング処理を行うメモリシステムにおいて、不揮発性メモリの信頼性に応じた柔軟なブートシステムを実現できる。 According to this configuration, the boot control device according to an aspect of the present invention can realize a flexible boot system according to the reliability of the nonvolatile memory in the memory system that performs the wear leveling process.
 なお、本発明は、このようなブート制御装置として実現できるだけでなく、ブート制御装置に含まれる特徴的な手段をステップとするブート制御方法として実現したり、そのような特徴的なステップをコンピュータに実行させるプログラムとして実現したりすることもできる。そして、そのようなプログラムは、CD-ROM等の非一時的なコンピュータ読み取り可能な記録媒体、及びインターネット等の伝送媒体を介して流通させることができるのは言うまでもない。 Note that the present invention can be realized not only as such a boot control device but also as a boot control method using characteristic means included in the boot control device as a step, or such a characteristic step in a computer. It can also be realized as a program to be executed. Needless to say, such a program can be distributed via a non-transitory computer-readable recording medium such as a CD-ROM and a transmission medium such as the Internet.
 さらに、本発明は、このようなブート制御装置の機能の一部又は全てを実現する半導体集積回路(LSI)として実現したり、このようなブート制御装置を含むブートシステムとして実現したりできる。 Furthermore, the present invention can be realized as a semiconductor integrated circuit (LSI) that realizes part or all of the functions of such a boot control device, or can be realized as a boot system including such a boot control device.
 以上より、本発明は、システム起動の信頼を向上できるとともに、ブートプログラムを記憶するための記憶領域の増加を抑制できるブート制御装置、ブートシステム及びブート制御方法を提供できる。 As described above, the present invention can provide a boot control device, a boot system, and a boot control method capable of improving the reliability of system startup and suppressing an increase in the storage area for storing the boot program.
図1は、本発明の実施の形態に係るブートシステムの構成を示すブロック図である。FIG. 1 is a block diagram showing a configuration of a boot system according to an embodiment of the present invention. 図2は、本発明の実施の形態に係る不揮発性メモリの構成を示す図である。FIG. 2 is a diagram showing a configuration of the nonvolatile memory according to the embodiment of the present invention. 図3は、本発明の実施の形態に係る不揮発性メモリに格納されているデータ例を示す図である。FIG. 3 is a diagram showing an example of data stored in the nonvolatile memory according to the embodiment of the present invention. 図4は、本発明の実施の形態に係る不揮発性メモリの記憶領域の構成を示す図である。FIG. 4 is a diagram showing the configuration of the storage area of the nonvolatile memory according to the embodiment of the present invention. 図5は、本発明の実施の形態に係るブート管理情報の構成を示す図である。FIG. 5 is a diagram showing a configuration of boot management information according to the embodiment of the present invention. 図6は、本発明の実施の形態に係る起動処理のフローチャートである。FIG. 6 is a flowchart of the startup process according to the embodiment of the present invention. 図7は、本発明の実施の形態に係るコピー処理のフローチャートである。FIG. 7 is a flowchart of the copy process according to the embodiment of the present invention. 図8は、本発明の実施の形態に係るブートシステムにおける動作例を示す図である。FIG. 8 is a diagram showing an operation example in the boot system according to the embodiment of the present invention. 図9は、本発明の実施の形態に係るブートシステムにおける動作例を示す図である。FIG. 9 is a diagram showing an operation example in the boot system according to the embodiment of the present invention. 図10は、本発明の実施の形態に係るブートシステムにおける動作例を示す図である。FIG. 10 is a diagram showing an operation example in the boot system according to the embodiment of the present invention. 図11は、本発明の実施の形態に係るブートシステムの適用例を示す図である。FIG. 11 is a diagram illustrating an application example of the boot system according to the embodiment of the present invention.
 以下、本発明に係るブート制御装置の実施の形態について、図面を参照しながら詳細に説明する。なお、以下で説明する実施の形態は、いずれも本発明の好ましい一具体例を示すものである。以下の実施の形態で示される数値、形状、材料、構成要素、構成要素の配置位置及び接続形態、ステップ、ステップの順序などは、一例であり、本発明を限定する主旨ではない。本発明は、請求の範囲だけによって限定される。よって、以下の実施の形態における構成要素のうち、本発明の最上位概念を示す独立請求項に記載されていない構成要素については、本発明の課題を達成するのに必ずしも必要ではないが、より好ましい形態を構成するものとして説明される。 Hereinafter, an embodiment of a boot control device according to the present invention will be described in detail with reference to the drawings. Each of the embodiments described below shows a preferred specific example of the present invention. The numerical values, shapes, materials, constituent elements, arrangement positions and connecting forms of the constituent elements, steps, order of steps, and the like shown in the following embodiments are merely examples, and are not intended to limit the present invention. The present invention is limited only by the claims. Therefore, among the constituent elements in the following embodiments, constituent elements that are not described in the independent claims indicating the highest concept of the present invention are not necessarily required to achieve the object of the present invention. It will be described as constituting a preferred form.
 本発明の実施の形態に係るブート制御装置は、不揮発性メモリに記憶されている正常なブートプログラムの数が閾値を下回ったときに、正常なブートプログラムを不揮発性メモリの他の領域にコピーする。 The boot control device according to the embodiment of the present invention copies a normal boot program to another area of the nonvolatile memory when the number of normal boot programs stored in the nonvolatile memory falls below a threshold value. .
 これにより、当該ブート制御装置は、複数のブートプログラムを常に確保しておくことができるので、システム起動の信頼を向上できる。また、当該ブート制御装置は、不揮発性メモリの状態に応じて、ブートプログラムを記憶するための記憶領域を適応的に変化させることができる。これにより、当該ブート制御装置は、ブートプログラムを記憶するための記憶領域の増加を抑制できる。 Thereby, the boot control device can always secure a plurality of boot programs, so that the reliability of system startup can be improved. Further, the boot control device can adaptively change the storage area for storing the boot program according to the state of the nonvolatile memory. Thereby, the boot control device can suppress an increase in the storage area for storing the boot program.
 まず、本発明の実施の形態に係るブート制御装置の構成を説明する。 First, the configuration of the boot control device according to the embodiment of the present invention will be described.
 図1は、本発明の実施の形態に係るブートシステム100の構成を示すブロック図である。このブートシステム100は、ブート制御装置110と、不揮発性メモリ120とを含む。 FIG. 1 is a block diagram showing a configuration of a boot system 100 according to an embodiment of the present invention. The boot system 100 includes a boot control device 110 and a nonvolatile memory 120.
 不揮発性メモリ120は、信頼性の低い不揮発性のメモリであり、例えば、NAND型フラッシュメモリである。 The non-volatile memory 120 is a non-reliable non-volatile memory, for example, a NAND flash memory.
 図2は、不揮発性メモリ120の構成を示す図である。 FIG. 2 is a diagram showing a configuration of the nonvolatile memory 120.
 図2に示すように不揮発性メモリ120は、消去単位である複数のブロック201を含む。各ブロック201は書き込み及び読み出しの単位である複数のページ202を含む。また、各ページ202は、データ領域203と、ECC(Error Correcting Code)が格納される冗長領域204とを含む。また、各ブロック201の先頭ページP0に含まれる冗長領域204には、当該ブロックが正常なブロックでないことを示す不良マーク205(BadBlockマーク)が格納されている。この不良マークは出荷時の検査において不良と判定されたブロックに付与される。 As shown in FIG. 2, the non-volatile memory 120 includes a plurality of blocks 201 which are erase units. Each block 201 includes a plurality of pages 202 that are units of writing and reading. Each page 202 includes a data area 203 and a redundant area 204 in which ECC (Error Correcting Code) is stored. Further, in the redundant area 204 included in the first page P0 of each block 201, a defect mark 205 (BadBlock mark) indicating that the block is not a normal block is stored. This defect mark is given to a block determined to be defective in the inspection at the time of shipment.
 図3は、不揮発性メモリ120に格納されるデータ例を示す図である。 FIG. 3 is a diagram illustrating an example of data stored in the non-volatile memory 120.
 図3に示すように、不揮発性メモリ120は、複数のブートプログラム121を記憶している。複数のブートプログラム121は同一のプログラム(コード)であり、システムを起動するためのプログラムである。また、以下は、各ブートプログラム121は1つのブロック201に格納されているとする。なお、各ブートプログラム121は、2つ以上のブロック201に跨って記憶されていてもよい。 As shown in FIG. 3, the nonvolatile memory 120 stores a plurality of boot programs 121. The plurality of boot programs 121 are the same program (code), and are programs for starting the system. In the following, it is assumed that each boot program 121 is stored in one block 201. Note that each boot program 121 may be stored across two or more blocks 201.
 ブート制御装置110は、不揮発性メモリ120に記憶されている複数のブートプログラム121を管理する。このブート制御装置110は、ブート制御回路130と、システム制御部140と、フラッシュメモリコントローラ150と、バスコントローラ160と、記憶部170と、RAM180とを備える。 The boot control device 110 manages a plurality of boot programs 121 stored in the nonvolatile memory 120. The boot control device 110 includes a boot control circuit 130, a system control unit 140, a flash memory controller 150, a bus controller 160, a storage unit 170, and a RAM 180.
 フラッシュメモリコントローラ150は、ブート制御回路130及びシステム制御部140からの不揮発性メモリ120へのアクセスを制御する。また、フラッシュメモリコントローラ150は、ECC処理を行うエラー判定回路151を備える。 The flash memory controller 150 controls access to the nonvolatile memory 120 from the boot control circuit 130 and the system control unit 140. Further, the flash memory controller 150 includes an error determination circuit 151 that performs ECC processing.
 バスコントローラ160は、ブート制御回路130及びシステム制御部140からの不揮発性メモリ120、記憶部170及びRAM180へのアクセスを制御する。 The bus controller 160 controls access to the nonvolatile memory 120, the storage unit 170, and the RAM 180 from the boot control circuit 130 and the system control unit 140.
 記憶部170は、ブート管理情報171を記憶する。この記憶部170は、不揮発性メモリ120より信頼性の高い不揮発性メモリであり、例えば、EEPROMである。 The storage unit 170 stores boot management information 171. The storage unit 170 is a nonvolatile memory having higher reliability than the nonvolatile memory 120, and is, for example, an EEPROM.
 ブート制御回路130は、ブート管理情報171を用いて、不揮発性メモリ120に記憶されている複数のブートプログラム121を管理する。このブート制御回路130は、コピー部131と、コピー判定部132と、領域管理部133と、ブート処理部134とを備える。また、典型的には、ブート制御回路130の機能は専用回路(ハードウェア)により実現される。 The boot control circuit 130 manages a plurality of boot programs 121 stored in the nonvolatile memory 120 using the boot management information 171. The boot control circuit 130 includes a copy unit 131, a copy determination unit 132, an area management unit 133, and a boot processing unit 134. Typically, the function of the boot control circuit 130 is realized by a dedicated circuit (hardware).
 コピー判定部132は、不揮発性メモリ120に記憶されている正常なブートプログラム121の数が、予め定められた閾値を下回ったか否かを判定する。そして、コピー判定部132は、正常なブートプログラム121の数が、上記閾値を下回った場合に、コピー処理を行うと判定する。 The copy determination unit 132 determines whether or not the number of normal boot programs 121 stored in the nonvolatile memory 120 is below a predetermined threshold. Then, the copy determination unit 132 determines to perform the copy process when the number of normal boot programs 121 falls below the threshold.
 領域管理部133は、不揮発性メモリ120の格納領域のうち、ブートプログラム121の格納に使用するブート使用領域を管理する。 The area management unit 133 manages the boot use area used for storing the boot program 121 among the storage areas of the nonvolatile memory 120.
 コピー部131は、不揮発性メモリ120に記憶されている正常なブートプログラム121の数が閾値を下回ったときに、正常なブートプログラム121を不揮発性メモリ120の他の領域にコピーする。具体的には、コピー部131は、正常なブートプログラム121をブート使用領域にコピーする。 The copy unit 131 copies the normal boot program 121 to another area of the nonvolatile memory 120 when the number of normal boot programs 121 stored in the nonvolatile memory 120 falls below the threshold value. Specifically, the copy unit 131 copies the normal boot program 121 to the boot use area.
 ブート処理部134は、不揮発性メモリ120に格納されている複数のブートプログラム121のうち、正常なブートプログラム121を読み出し、RAM180に格納する。 The boot processing unit 134 reads a normal boot program 121 out of a plurality of boot programs 121 stored in the nonvolatile memory 120 and stores it in the RAM 180.
 システム制御部140は、RAM180に格納されたブートプログラム121を用いてシステムを起動する。また、システム制御部140は、起動後のシステムを制御する。このシステム制御部140の機能は、CPUがプログラムを実行することにより実現される。 The system control unit 140 starts up the system using the boot program 121 stored in the RAM 180. Further, the system control unit 140 controls the system after startup. The function of the system control unit 140 is realized by the CPU executing a program.
 また、システム制御部140はウェアレベリング処理部141を備える。ウェアレベリング処理部141は、不揮発性メモリ120の特定のブロックにアクセスが集中しないように分散化を図るウェアレベリング処理を行う。 In addition, the system control unit 140 includes a wear leveling processing unit 141. The wear leveling processing unit 141 performs a wear leveling process that performs decentralization so that accesses are not concentrated on a specific block of the nonvolatile memory 120.
 次に、不揮発性メモリ120の記憶領域の構成を説明する。図4は、不揮発性メモリ120の記憶領域の構成を示す図である。 Next, the configuration of the storage area of the nonvolatile memory 120 will be described. FIG. 4 is a diagram showing the configuration of the storage area of the nonvolatile memory 120.
 図4に示すように不揮発性メモリ120は、ブート専用領域211と通常領域212とを含む。ブート専用領域211は、複数のブートプログラム121を記憶するために専用に用いられる領域である。 As shown in FIG. 4, the nonvolatile memory 120 includes a boot dedicated area 211 and a normal area 212. The boot dedicated area 211 is an area used exclusively for storing a plurality of boot programs 121.
 通常領域212は、ブート専用領域211以外の領域である。この通常領域212は、ウェアレベリング処理に使用されるウェアレベリング領域213と、予備領域214とを含む。なお、ウェアレベリング領域213は、システム(システム制御部140)が使用するシステム使用領域の一例であり、当該ウェアレベリング領域213の代わりに、システムにより使用される他の領域を用いることも可能である。 The normal area 212 is an area other than the boot dedicated area 211. The normal area 212 includes a wear leveling area 213 used for wear leveling processing and a spare area 214. The wear leveling area 213 is an example of a system use area used by the system (system control unit 140), and other areas used by the system can be used instead of the wear leveling area 213. .
 また、ウェアレベリング領域213は、現在ウェアレベリング処理に使用されている使用中領域215と、ウェアレベリング処理に使用されていないが、ウェアレベリング処理用に確保されている未使用領域216とを含む。 Also, the wear leveling area 213 includes an in-use area 215 that is currently used for the wear leveling process and an unused area 216 that is not used for the wear leveling process but is reserved for the wear leveling process.
 予備領域214は、ウェアレベリング領域213以外の領域であり、特定の用途には割り当てられていない領域である。言い換えると、予備領域214は、システムの設計者が自由に使用可能な領域である。 The spare area 214 is an area other than the wear leveling area 213, and is an area not assigned to a specific application. In other words, the spare area 214 is an area that can be freely used by the system designer.
 領域管理部133は、初期状態において、ブート専用領域211をブート使用領域に設定する。また、領域管理部133は、ブート使用領域に空き領域がない場合に、通常領域212の一部をブート使用領域に加える。具体的には、領域管理部133は、ブート使用領域に空き領域がない場合に、予備領域214の一部をブート使用領域に加える。 The area management unit 133 sets the boot dedicated area 211 as a boot use area in the initial state. Further, the area management unit 133 adds a part of the normal area 212 to the boot use area when there is no empty area in the boot use area. Specifically, the area management unit 133 adds a part of the spare area 214 to the boot use area when there is no free area in the boot use area.
 さらに、領域管理部133は、ブート使用領域に空き領域がなく、かつ、予備領域214に空き領域がない場合に、未使用領域216をブート使用領域に加えるとともに、当該未使用領域216をウェアレベリング領域213から除外する。 Further, the area management unit 133 adds the unused area 216 to the boot use area and wear leveling the unused area 216 when the boot use area has no free area and the spare area 214 has no free area. Exclude from region 213.
 次に、記憶部170に記憶されているブート管理情報171の構成を説明する。図5は、ブート管理情報171の構成を示す図である。 Next, the configuration of the boot management information 171 stored in the storage unit 170 will be described. FIG. 5 is a diagram showing the configuration of the boot management information 171.
 図5に示すようにブート管理情報171は、正常ブロック番号310と、予備ブロック番号320と、使用ブロック番号330と、正常ブロック数340と、予備ブロック数350と、コピーフラグ360とを含む。 As shown in FIG. 5, the boot management information 171 includes a normal block number 310, a spare block number 320, a used block number 330, a normal block number 340, a spare block number 350, and a copy flag 360.
 正常ブロック番号310は、正常なブートプログラム121が格納されているブロックの番号を示す。また、この正常ブロック番号310には、複数の番号を格納できる領域が割り当てられている。 The normal block number 310 indicates the block number in which the normal boot program 121 is stored. The normal block number 310 is assigned an area in which a plurality of numbers can be stored.
 ここで、正常なブートプログラム121とは、正常に実行可能なブートプログラムである。また、正常でないブートプログラム121とは、正常に実行できないブートプログラムである。具体的には、正常でないブートプログラム121とは、出荷時から異常が発生しているブートプログラム、及び、経年劣化によりデータが破壊されたブートプログラムである。なお、本発明の実施の形態のように、ECCを用いる場合には、エラー修復が可能な範囲でデータが破壊されたブートプログラムは、正常なブートプログラムと認識される。なお、このようなエラー修復が可能なブートプログラムを正常でないブートプログラムとして扱ってもよい。 Here, the normal boot program 121 is a boot program that can be normally executed. The abnormal boot program 121 is a boot program that cannot be executed normally. Specifically, the boot program 121 that is not normal is a boot program in which an abnormality has occurred from the time of shipment and a boot program in which data is destroyed due to aging. Note that when ECC is used as in the embodiment of the present invention, a boot program whose data is destroyed to the extent that error recovery is possible is recognized as a normal boot program. Note that such a boot program capable of error recovery may be handled as an abnormal boot program.
 予備ブロック番号320は、ブート使用領域に含まれる未使用のブロックの番号を示す。この予備ブロック番号320は、予備ブロック番号321~323を含む。予備ブロック番号321は、ブート専用領域211の未使用のブロックの番号を示す。予備ブロック番号322は、ブート使用領域に含まれる予備領域214の未使用のブロックの番号を示す。予備ブロック番号323は、ブート使用領域に含まれる未使用領域216の未使用のブロックの番号を示す。 The spare block number 320 indicates the number of an unused block included in the boot use area. The spare block number 320 includes spare block numbers 321 to 323. The spare block number 321 indicates the number of an unused block in the boot dedicated area 211. The spare block number 322 indicates the number of an unused block in the spare area 214 included in the boot use area. The spare block number 323 indicates the number of an unused block in the unused area 216 included in the boot use area.
 使用ブロック番号330は、起動時に読み出すブートプログラム121が格納されているブロックの番号を示す。言い換えると、この使用ブロック番号330は、前回の起動時に読み出されたブートプログラム121が格納されているブロックの番号を示す。 The used block number 330 indicates the number of the block in which the boot program 121 read at the time of startup is stored. In other words, the used block number 330 indicates the number of the block in which the boot program 121 read at the previous activation is stored.
 予備ブロック数350は、ブート使用領域のうち未使用のブロックの数を示す。この予備ブロック数350は、予備ブロック数351~353を含む。予備ブロック数351は、ブート専用領域211の未使用のブロックの数を示す。予備ブロック数352は、ブート使用領域に含まれる予備領域214の未使用のブロックの数を示す。予備ブロック数353は、ブート使用領域に含まれる未使用領域216の未使用のブロックの数を示す。 The spare block number 350 indicates the number of unused blocks in the boot use area. The spare block number 350 includes spare block numbers 351 to 353. The number of spare blocks 351 indicates the number of unused blocks in the boot dedicated area 211. The spare block number 352 indicates the number of unused blocks in the spare area 214 included in the boot use area. The spare block number 353 indicates the number of unused blocks in the unused area 216 included in the boot use area.
 コピーフラグ360は、ブートプログラムのコピー処理が必要であるか否かを示す。このコピーフラグ360は、コピー判定部132により設定される。具体的には、コピー判定部132は、正常なブートプログラム121の数が閾値を下回っている場合に、コピーフラグ360を有効「1」に設定する。 The copy flag 360 indicates whether or not a boot program copy process is necessary. The copy flag 360 is set by the copy determination unit 132. Specifically, the copy determination unit 132 sets the copy flag 360 to valid “1” when the number of normal boot programs 121 is below the threshold.
 次に、本発明の実施の形態に係るブート制御装置110の動作を説明する。 Next, the operation of the boot control device 110 according to the embodiment of the present invention will be described.
 まず、起動時の処理について説明する。図6は、ブート制御装置110による起動処理のフローチャートである。 First, the process at startup will be described. FIG. 6 is a flowchart of the startup process by the boot control device 110.
 まず、ブート処理部134は、使用ブロック番号330で示されるブロックを読み出し対象のブロック(以下、対象ブロック)として選択する(S101)。なお、初回の起動時には、使用ブロック番号330が設定されていないので、ブート処理部134は、正常ブロック番号310で示されるブロックの番号のうちいずれかを使用ブロック番号330に設定し、設定した番号のブロックを対象ブロックとして選択する。 First, the boot processing unit 134 selects a block indicated by the used block number 330 as a block to be read (hereinafter referred to as a target block) (S101). Since the used block number 330 is not set at the first activation, the boot processing unit 134 sets one of the block numbers indicated by the normal block number 310 to the used block number 330 and sets the set number. This block is selected as the target block.
 次に、ブート処理部134は、対象ブロックの先頭ページの冗長領域204に含まれる不良マーク205を読み出し、読み出した不良マーク205に基づいて当該対象ブロックが正常なブロックであるか否かを判定する(S102)。 Next, the boot processing unit 134 reads the defect mark 205 included in the redundant area 204 of the first page of the target block, and determines whether the target block is a normal block based on the read defect mark 205. (S102).
 対象ブロックが正常なブロックである場合(S102でYes)、次に、ブート処理部134は、対象ブロックの先頭ページのデータを読み出す(S103)。 If the target block is a normal block (Yes in S102), then the boot processing unit 134 reads the data of the first page of the target block (S103).
 次に、エラー判定回路151は、読み出されたデータに対してECCチェックを行うことにより、当該データにエラーが含まれるか否かを判定する(S104)。具体的には、エラー判定回路151は、読み出したデータからECCを算出する。そして、エラー判定回路151は、算出したECCと、冗長領域204に格納されているECCとが一致するか否かを判定する。エラー判定回路151は、算出したECCと、冗長領域204に格納されているECCとが一致する場合、読み出したデータが正常であると判定し、一致しない場合、当該データにエラーが含まれると判定する。 Next, the error determination circuit 151 determines whether or not an error is included in the data by performing an ECC check on the read data (S104). Specifically, the error determination circuit 151 calculates ECC from the read data. Then, the error determination circuit 151 determines whether or not the calculated ECC matches the ECC stored in the redundant area 204. The error determination circuit 151 determines that the read data is normal when the calculated ECC and the ECC stored in the redundant area 204 match, and determines that the data includes an error when they do not match. To do.
 当該データにエラーが含まれない場合(S105でNo、かつ、S106でNo)、読み出されたデータはRAM180に格納される。 If the data does not contain an error (No in S105 and No in S106), the read data is stored in the RAM 180.
 次に、ブート処理部134は、対象ブロックの次のページのデータが読み出し(S103)、ステップS104以降の処理を行う。 Next, the boot processing unit 134 reads the data of the next page of the target block (S103), and performs the processing after step S104.
 また、ECCチェックにおいて、読み出したデータに訂正可能なエラーが含まれる場合(S105でNo、かつ、S106でYes)、エラー判定回路151は、読み出したデータを正しいデータに修復し、修復したデータをRAM180に格納する。 In addition, in the ECC check, when the read data includes a correctable error (No in S105 and Yes in S106), the error determination circuit 151 restores the read data to correct data, and restores the restored data. Store in the RAM 180.
 そして対象ブロックの全てのページのデータの読み出しが完了すると(S108でYes)、システム制御部140は、RAM180に格納されたブートプログラム121を実行することで、システムを起動する(S109)。 Then, when reading of the data of all pages of the target block is completed (Yes in S108), the system control unit 140 starts the system by executing the boot program 121 stored in the RAM 180 (S109).
 一方、対象ブロックが不良ブロックである場合(S102でNo)、又は、読み出したデータに訂正不可能なエラーがある場合(S105でYes)、コピー判定部132は、正常ブロック数340が、予め定められた閾値より小さいか否かを判定する(S110)。 On the other hand, when the target block is a bad block (No in S102), or when there is an uncorrectable error in the read data (Yes in S105), the copy determination unit 132 determines that the number of normal blocks 340 is predetermined. It is determined whether it is smaller than the threshold value (S110).
 正常ブロック数340が、予め定められた閾値より小さい場合(S110でYes)、コピー判定部132は、コピーフラグ360を有効「1」に設定する(S111)。 When the number of normal blocks 340 is smaller than a predetermined threshold (Yes in S110), the copy determination unit 132 sets the copy flag 360 to valid “1” (S111).
 ステップS111の後、又は、正常ブロック数340が、予め定められた閾値以上の場合(S110でNo)、次に、ブート処理部134は、使用ブロック番号330、正常ブロック番号310、及び正常ブロック数340を更新する(S112)。具体的には、ブート処理部134は、正常ブロック番号310から、異常が見つかった、現在の対象ブロックの番号を除外するとともに、正常ブロック数340を「1」減らす。また、ブート処理部134は、更新後の正常ブロック番号310で示されるブロックの番号のうちいずれかを使用ブロック番号330に設定する。 After step S111 or when the number of normal blocks 340 is equal to or greater than a predetermined threshold (No in S110), the boot processing unit 134 then uses the block number 330, the normal block number 310, and the number of normal blocks. 340 is updated (S112). Specifically, the boot processing unit 134 excludes the number of the current target block in which an abnormality is found from the normal block number 310 and reduces the number of normal blocks 340 by “1”. Further, the boot processing unit 134 sets one of the block numbers indicated by the updated normal block number 310 as the used block number 330.
 その後、ブート制御装置110は、再度、ステップS101以降の処理を実行する。なお、読み出したデータに訂正不可能なエラーがあった場合(S105でYes)、ブート制御装置110は、ブロックの先頭ページからデータの読み出しを開始してもよいし、訂正不可能なエラーが発生したページからデータの読み出しを開始してもよい。 Thereafter, the boot control device 110 executes the processing from step S101 onward again. If there is an uncorrectable error in the read data (Yes in S105), the boot control device 110 may start reading data from the first page of the block, or an uncorrectable error occurs. Data reading may be started from the page that has been processed.
 以上の処理により、正常なブートプログラム121がRAM180へ転送される。そして、システム制御部140により当該ブートプログラム121が実行されることで、システムが起動される。 Through the above processing, the normal boot program 121 is transferred to the RAM 180. Then, the system control unit 140 executes the boot program 121 to start the system.
 また、読み出し対象のブートプログラム121に異常が発生した場合には、コピーフラグ360が有効に設定される。また、不揮発性メモリ120に格納されている他の正常なブートプログラム121が読み出され、正常にシステムの起動が行われる。 Further, when an abnormality occurs in the boot program 121 to be read, the copy flag 360 is set to be valid. Also, another normal boot program 121 stored in the nonvolatile memory 120 is read, and the system is normally started.
 次に、ブートプログラム121をコピーする処理について説明する。図7は、ブート制御装置110によるコピー処理のフローチャートである。このコピー処理は、システムの起動後に実行される。 Next, a process for copying the boot program 121 will be described. FIG. 7 is a flowchart of copy processing by the boot control apparatus 110. This copy process is executed after the system is started.
 まず、システムの処理量が少ない待機時等に、コピー部131は、コピーフラグ360が設定されているか否かを確認する(S201)。コピーフラグ360が設定されていない場合(S201でNo)、コピー部131はコピー処理を行わない。 First, the copy unit 131 confirms whether or not the copy flag 360 is set when the system processing amount is low or the like (S201). When the copy flag 360 is not set (No in S201), the copy unit 131 does not perform the copy process.
 一方、コピーフラグ360が設定されている場合(S201でYes)、領域管理部133は、ブート使用領域に空きブロックが存在するか否かを確認する(S202)。具体的には、領域管理部133は、予備ブロック数350を参照し、予備ブロック数351~353のいずれか1つ以上が「1」以上を示す場合、ブート使用領域に空きブロックが存在すると判定し、予備ブロック数351~353の全てが「0」の場合、ブート使用領域に空きブロックが存在しないと判定する。 On the other hand, if the copy flag 360 is set (Yes in S201), the area management unit 133 checks whether there is an empty block in the boot use area (S202). Specifically, the area management unit 133 refers to the spare block number 350 and determines that there is an empty block in the boot use area when any one of the spare block numbers 351 to 353 indicates “1” or more. If all the spare block numbers 351 to 353 are “0”, it is determined that there is no empty block in the boot use area.
 ブート使用領域に空きブロックが存在する場合(S202でYes)、コピー部131は、ブート使用領域の空きブロックのいずれかをコピー先ブロックとして選択する(S203)。具体的には、コピー部131は、予備ブロック番号321~323のいずれかで示される番号のブロックをコピー先ブロックとして選択する。 If there is an empty block in the boot use area (Yes in S202), the copy unit 131 selects one of the empty blocks in the boot use area as the copy destination block (S203). Specifically, the copy unit 131 selects a block having a number indicated by any of the spare block numbers 321 to 323 as a copy destination block.
 次に、コピー部131は、予備ブロック番号320を更新し(S204)、予備ブロック数350を更新する(S205)。具体的には、コピー部131は、コピー先ブロックの番号を予備ブロック番号320から除外し、予備ブロック数350を「1」減らす。 Next, the copy unit 131 updates the spare block number 320 (S204) and updates the spare block number 350 (S205). Specifically, the copy unit 131 excludes the number of the copy destination block from the spare block number 320 and reduces the spare block number 350 by “1”.
 次に、コピー部131は、正常なブートプログラム121を、コピー先ブロックにコピーする(S206)。 Next, the copy unit 131 copies the normal boot program 121 to the copy destination block (S206).
 次に、コピー部131は、正常ブロック番号310及び正常ブロック数340を更新する(S207及びS208)。具体的には、コピー部131は、コピー先ブロックの番号を正常ブロック番号310に加え、正常ブロック数340を「1」増やす。 Next, the copy unit 131 updates the normal block number 310 and the normal block number 340 (S207 and S208). Specifically, the copy unit 131 adds the number of the copy destination block to the normal block number 310 and increases the number of normal blocks 340 by “1”.
 次に、コピー部131は、使用ブロック番号330を新たなコピー先ブロックの番号に更新する(S209)。 Next, the copy unit 131 updates the used block number 330 to the number of the new copy destination block (S209).
 以上の処理により、正常なブートプログラム121がコピーされる。 Through the above processing, the normal boot program 121 is copied.
 一方、ブート使用領域に未使用ブロックがない場合(S202でNo)、領域管理部133は、予備領域214に空きブロックが存在するか否かを確認する(S210)。 On the other hand, if there is no unused block in the boot use area (No in S202), the area management unit 133 checks whether there is an empty block in the spare area 214 (S210).
 予備領域214に空きブロックがある場合(S210でYes)、領域管理部133は、当該予備領域214の空きブロックをブート使用領域に加える(S211)。また、領域管理部133は、予備領域214を使用する旨をシステム制御部140に通知する。そして、コピー部131により、当該空きブロックがコピー先ブロックとして選択され(S203)、ステップS204以降の処理が行われる。 If there is an empty block in the spare area 214 (Yes in S210), the area management unit 133 adds the empty block in the spare area 214 to the boot use area (S211). Further, the area management unit 133 notifies the system control unit 140 that the spare area 214 is used. Then, the copy unit 131 selects the empty block as a copy destination block (S203), and the processing after step S204 is performed.
 また、予備領域214に空きブロックがない場合(S210でNo)、領域管理部133は、未使用領域216に空きブロックが存在するか否かを確認する(S212)。 If there is no empty block in the spare area 214 (No in S210), the area management unit 133 checks whether there is an empty block in the unused area 216 (S212).
 未使用領域216に空きブロックがある場合(S212でYes)、領域管理部133は、当該未使用領域216の空きブロックをブート使用領域に加える(S213)。また、領域管理部133は、未使用領域216をウェアレベリング領域213から除外するように、ウェアレベリング処理部141に通知する(S214)。そして、コピー部131により、当該空きブロックがコピー先ブロックとして選択され(S203)、ステップS204以降の処理が行われる。 If there is an empty block in the unused area 216 (Yes in S212), the area management unit 133 adds the empty block in the unused area 216 to the boot use area (S213). Further, the area management unit 133 notifies the wear leveling processing unit 141 to exclude the unused area 216 from the wear leveling area 213 (S214). Then, the copy unit 131 selects the empty block as a copy destination block (S203), and the processes after step S204 are performed.
 次に、本発明の実施の形態に係るブート制御装置110の具体的な動作例を説明する。また、以下では、コピー処理の判定に用いられる閾値が「2」の場合の例を説明する。 Next, a specific operation example of the boot control apparatus 110 according to the embodiment of the present invention will be described. In the following, an example in which the threshold used for determination of copy processing is “2” will be described.
 図8は、ブート専用領域211に空き領域が存在する場合の、ブート制御装置110の動作例を示す図である。 FIG. 8 is a diagram illustrating an operation example of the boot control device 110 when there is an empty area in the boot dedicated area 211.
 図8に示す例では、初期状態において、正常なブロックはブロックB0、B1及びB3の3つである。その後、経年劣化により、ブロックB0及びブロックB1に順次異常が発生している。この結果、正常ブロック数340は「1」となり、閾値「2」より小さくなる。よって、正常なブロックB3に格納されているブートプログラム121が未使用のブロックB5にコピーされる。 In the example shown in FIG. 8, there are three normal blocks B0, B1, and B3 in the initial state. After that, due to deterioration over time, abnormalities occur sequentially in the block B0 and the block B1. As a result, the number of normal blocks 340 is “1”, which is smaller than the threshold value “2”. Therefore, the boot program 121 stored in the normal block B3 is copied to the unused block B5.
 図9は、ブート専用領域211に空き領域がなく、かつ、予備領域214に空き領域が存在する場合の、ブート制御装置110の動作例を示す図である。 FIG. 9 is a diagram illustrating an operation example of the boot control device 110 when there is no empty area in the boot dedicated area 211 and there is an empty area in the spare area 214.
 図9に示す例では、初期状態において、正常なブロックはブロックB1及びB3の2つである。その後、経年劣化により、ブロックB1に異常が発生している。この結果、正常ブロック数340は「1」となり、閾値「2」より小さくなる。よって、正常なブロックB3に格納されているブートプログラム121が、予備領域214の未使用ブロックB200にコピーされる。 In the example shown in FIG. 9, in the initial state, there are two normal blocks, blocks B1 and B3. Thereafter, an abnormality has occurred in the block B1 due to deterioration over time. As a result, the number of normal blocks 340 is “1”, which is smaller than the threshold value “2”. Therefore, the boot program 121 stored in the normal block B3 is copied to the unused block B200 in the spare area 214.
 図10は、ブート専用領域211及び予備領域214に空き領域がなく、かつ、未使用領域216に空き領域が存在する場合の、ブート制御装置110の動作例を示す図である。 FIG. 10 is a diagram illustrating an operation example of the boot control device 110 when there is no empty area in the boot dedicated area 211 and the spare area 214 and there is an empty area in the unused area 216.
 図10に示す例では、初期状態において、正常なブロックはブロックB200及びB201の2つである。その後、経年劣化により、ブロックB200に異常が発生している。この結果、正常ブロック数340は「1」となり、閾値「2」より小さくなる。よって、正常なブロックB200に格納されているブートプログラム121が、未使用領域216の未使用ブロックB150にコピーされる。 In the example shown in FIG. 10, in the initial state, there are two normal blocks, blocks B200 and B201. Thereafter, an abnormality has occurred in the block B200 due to deterioration over time. As a result, the number of normal blocks 340 is “1”, which is smaller than the threshold value “2”. Therefore, the boot program 121 stored in the normal block B200 is copied to the unused block B150 in the unused area 216.
 以上より、本発明の実施の形態に係るブート制御装置110は、不揮発性メモリ120に記憶されている正常なブートプログラム121の数が閾値を下回ったときに、正常なブートプログラム121を不揮発性メモリ120の他の領域にコピーする。これにより、ブート制御装置110は、複数のブートプログラム121を常に確保しておくことができるので、システム起動の信頼を向上できる。 From the above, when the number of normal boot programs 121 stored in the nonvolatile memory 120 falls below the threshold, the boot control device 110 according to the embodiment of the present invention stores the normal boot programs 121 in the nonvolatile memory. Copy to another area of 120. As a result, the boot control device 110 can always secure a plurality of boot programs 121, so that the reliability of system startup can be improved.
 また、ブート制御装置110は、正常なブートプログラム121の数が閾値以下になった場合に、当該ブートプログラム121をコピーすることで、不揮発性メモリ120の状態に応じて、ブートプログラム121を記憶するための記憶領域を適応的に変化させることができる。これにより、ブート制御装置110は、ブートプログラム121を記憶するための記憶領域の増加を抑制できる。 Further, the boot control device 110 stores the boot program 121 according to the state of the nonvolatile memory 120 by copying the boot program 121 when the number of normal boot programs 121 is equal to or less than the threshold. The storage area can be adaptively changed. Thereby, the boot control apparatus 110 can suppress an increase in the storage area for storing the boot program 121.
 また、本発明の実施の形態に係るブート制御装置110は、起動時には、コピー処理が必要か否かの判定のみを行っておき、システムの起動後に、ブートプログラム121をコピーする。これにより、ブート制御装置110は、コピー動作を行うことによる起動時間の増加を抑制できる。 The boot control apparatus 110 according to the embodiment of the present invention only determines whether or not copy processing is necessary at the time of startup, and copies the boot program 121 after the system is started. Thereby, the boot control apparatus 110 can suppress an increase in startup time due to the copy operation.
 また、本発明の実施の形態に係るブート制御装置110は、ブート専用領域211に空き領域がなくなった場合には、他の領域をブート使用領域として用いる。これにより、ブート制御装置110は、ブートプログラムのために予め準備しておいた領域を全て使い尽くした場合でも、ブート使用領域を拡張することで、ブートプログラムの信頼性を維持できる。また、当該ブート制御装置110は、最初から固定的にブート使用領域を確保しなくてもよいので、信頼性の異なる不揮発性メモリに対して同様のシステムを構築できる。 Also, the boot control device 110 according to the embodiment of the present invention uses another area as a boot use area when there is no more free area in the boot dedicated area 211. Thereby, even when the boot control device 110 has used up all the areas prepared in advance for the boot program, the boot control area can be expanded to maintain the reliability of the boot program. Further, since the boot control device 110 does not need to secure a boot use area from the beginning, a similar system can be constructed for non-volatile memories with different reliability.
 また、本発明の実施の形態に係るブート制御装置110は、ブート専用領域211に空き領域がなくなった場合にウェアレベリング処理に使用される領域をブート使用領域として用いる。これにより、ブート制御装置110は、ウェアレベリング処理を行うメモリシステムにおいて、不揮発性メモリの信頼性に応じた柔軟なブートシステムを実現できる。 Also, the boot control device 110 according to the embodiment of the present invention uses an area used for wear leveling processing as a boot use area when there is no free area in the boot dedicated area 211. Thereby, the boot control apparatus 110 can realize a flexible boot system according to the reliability of the nonvolatile memory in the memory system that performs the wear leveling process.
 以下、本発明の実施の形態に係るブート制御装置110の適用例を説明する。図11は、ブート制御装置110の適用例を示す図である。 Hereinafter, application examples of the boot control apparatus 110 according to the embodiment of the present invention will be described. FIG. 11 is a diagram illustrating an application example of the boot control device 110.
 例えば、図11に示すように、上述したブート制御装置110に含まれる処理部のうち、ブート制御回路130、システム制御部140(CPU)、フラッシュメモリコントローラ150は、1チップのシステムLSI501として実現される。 For example, as shown in FIG. 11, among the processing units included in the above-described boot control device 110, the boot control circuit 130, the system control unit 140 (CPU), and the flash memory controller 150 are realized as a one-chip system LSI 501. The
 また、システムLSI501、記憶部170及び不揮発性メモリ120は、回路基板502に実装される。当該回路基板502は、デジタルテレビ503又はデジタルレコーダ504等に用いられる。 The system LSI 501, the storage unit 170, and the nonvolatile memory 120 are mounted on the circuit board 502. The circuit board 502 is used for a digital television 503, a digital recorder 504, or the like.
 なお、上述したブート制御装置110に含まれる各処理部は、個別に1チップ化されてもよいし、一部又は全てを含むように1チップ化されてもよい。 Note that each processing unit included in the boot control device 110 described above may be individually made into one chip, or may be made into one chip so as to include some or all of them.
 さらに、上記実施の形態では、各処理部は、ハードウェア及び/又はソフトウェアを用いて構成されるが、ハードウェアを用いる構成はソフトウェアを用いても構成可能であり、ソフトウェアを用いる構成はハードウェアを用いても構成可能である。 Furthermore, in the above-described embodiment, each processing unit is configured using hardware and / or software. However, the configuration using hardware can also be configured using software, and the configuration using software is hardware. It is also possible to configure using
 また、集積回路化はLSIに限るものではなく、専用回路又は一般プロセッサで実現してもよい。LSI製造後にプログラムすることが可能なFPGA(Field Programmable Gate Array)、又はLSI内部の回路セルの接続や設定を再構成可能なリコンフィギュラブル・プロセッサを利用してもよい。 Further, the integration of circuits is not limited to LSI, and may be realized by a dedicated circuit or a general processor. An FPGA (Field Programmable Gate Array) that can be programmed after manufacturing the LSI or a reconfigurable processor that can reconfigure the connection and setting of circuit cells inside the LSI may be used.
 また、本発明の実施の形態に係るブート制御装置の機能の一部又は全てを、CPU等のプロセッサがプログラムを実行することにより実現してもよい。 Further, part or all of the functions of the boot control device according to the embodiment of the present invention may be realized by a processor such as a CPU executing a program.
 さらに、本発明は上記プログラムであってもよいし、上記プログラムが記録された非一時的なコンピュータ読み取り可能な記録媒体であってもよい。また、上記プログラムは、インターネット等の伝送媒体を介して流通させることができるのは言うまでもない。 Furthermore, the present invention may be the above program or a non-transitory computer-readable recording medium on which the above program is recorded. Needless to say, the program can be distributed via a transmission medium such as the Internet.
 また、上記実施の形態に係るデータ制御装置、及びその変形例の機能のうち少なくとも一部を組み合わせてもよい。 Further, at least a part of the functions of the data control device according to the above-described embodiment and its modifications may be combined.
 また、上記で用いた数字は、全て本発明を具体的に説明するために例示するものであり、本発明は例示された数字に制限されない。さらに、「0」/「1」により表される論理レベルは、本発明を具体的に説明するために例示するものであり、例示された論理レベルの異なる組み合わせにより、同等な結果を得ることも可能である。 Further, all the numbers used above are illustrated for specifically explaining the present invention, and the present invention is not limited to the illustrated numbers. Furthermore, the logical level represented by “0” / “1” is exemplified to specifically describe the present invention, and an equivalent result can be obtained by different combinations of the illustrated logical levels. Is possible.
 また、ブロック図における機能ブロックの分割は一例であり、複数の機能ブロックを一つの機能ブロックとして実現したり、一つの機能ブロックを複数に分割したり、一部の機能を他の機能ブロックに移してもよい。また、類似する機能を有する複数の機能ブロックの機能を単一のハードウェア又はソフトウェアが並列又は時分割に処理してもよい。 In addition, division of functional blocks in the block diagram is an example, and a plurality of functional blocks can be realized as one functional block, a single functional block can be divided into a plurality of functions, or some functions can be transferred to other functional blocks. May be. In addition, functions of a plurality of functional blocks having similar functions may be processed in parallel or time-division by a single hardware or software.
 また、上記ブート制御装置の構成は、本発明を具体的に説明するために例示するためのものであり、本発明に係るブート制御装置は、上記構成の全てを必ずしも備える必要はない。言い換えると、本発明に係るブート制御装置は、本発明の効果を実現できる最小限の構成のみを備えればよい。 Further, the configuration of the boot control device is for illustration in order to specifically describe the present invention, and the boot control device according to the present invention does not necessarily have all of the above configurations. In other words, the boot control device according to the present invention only needs to have a minimum configuration capable of realizing the effects of the present invention.
 また、図6及び図7に示す処理手順は、本発明を具体的に説明するために例示するためのものであり、本発明に係るブート制御方法は、上記ステップの全てを必ずしも含む必要はない。言い換えると、本発明に係るブート制御方法は、本発明の効果を実現できる最小限のステップのみを含めばよい。また、上記のステップが実行される順序は、本発明を具体的に説明するために例示するためのものであり、上記以外の順序であってもよい。また、上記ステップの一部が、他のステップと同時(並列)に実行されてもよい。 The processing procedures shown in FIGS. 6 and 7 are for illustrating the present invention specifically, and the boot control method according to the present invention does not necessarily include all of the above steps. . In other words, the boot control method according to the present invention needs to include only the minimum steps that can realize the effects of the present invention. In addition, the order in which the above steps are executed is for illustration in order to specifically describe the present invention, and may be in an order other than the above. Moreover, a part of the above steps may be executed simultaneously (in parallel) with other steps.
 例えば、上記説明では、図7に示すコピー処理は、システム起動後に実行されるとしたが、システム起動前に実行されてもよい。 For example, in the above description, the copy process shown in FIG. 7 is executed after the system is started, but may be executed before the system is started.
 また、図6に示す処理のうち、コピーの要否を判定する処理(S110~S112)をシステム起動後に行なってもよい。 Of the processes shown in FIG. 6, the process for determining whether copying is necessary (S110 to S112) may be performed after the system is activated.
 また、図6に示す処理のうち、不良マーク205を用いて正常ブロックであるか否かを判定する処理(S102)を行なわなくてもよい。 Further, among the processes shown in FIG. 6, it is not necessary to perform the process (S102) for determining whether or not the block is a normal block using the defect mark 205.
 また、図7に示すステップS204~S209の処理の順序は、図7に示す順序以外であってもよい。また、一部の処理が同時に実行されてもよい。 Further, the order of the processing in steps S204 to S209 shown in FIG. 7 may be other than the order shown in FIG. Some processes may be executed simultaneously.
 また、図7に示す使用ブロック番号を更新する処理(S209)は行なわなくてもよい。 Further, the process of updating the used block number (S209) shown in FIG. 7 may not be performed.
 また、上記説明では、ECCを用いる例を説明したが、ECCを用いなくてもよい。 In the above description, an example using ECC has been described, but ECC may not be used.
 更に、本発明の主旨を逸脱しない限り、本実施の形態に対して当業者が思いつく範囲内の変更を施した各種変形例も本発明に含まれる。 Furthermore, various modifications in which the present embodiment is modified within the scope conceived by those skilled in the art are also included in the present invention without departing from the gist of the present invention.
 本発明は、ブート制御装置及びブートシステムに適用できる。また、ブート制御装置及びブートシステムを用いるデジタルテレビ及びデジタルレコーダ等の各種機器に適用できる。 The present invention can be applied to a boot control device and a boot system. Further, the present invention can be applied to various devices such as a digital television and a digital recorder using a boot control device and a boot system.
 100 ブートシステム
 110 ブート制御装置
 120 不揮発性メモリ
 121 ブートプログラム
 130 ブート制御回路
 131 コピー部
 132 コピー判定部
 133 領域管理部
 134 ブート処理部
 140 システム制御部
 141 ウェアレベリング処理部
 150 フラッシュメモリコントローラ
 151 エラー判定回路
 160 バスコントローラ
 170 記憶部
 171 ブート管理情報
 180 RAM
 201 ブロック
 202 ページ
 203 データ領域
 204 冗長領域
 205 不良マーク
 211 ブート専用領域
 212 通常領域
 213 ウェアレベリング領域
 214 予備領域
 215 使用中領域
 216 未使用領域
 310 正常ブロック番号
 320、321、322、323 予備ブロック番号
 330 使用ブロック番号
 340 正常ブロック数
 350、351、352、353 予備ブロック数
 360 コピーフラグ
 501 システムLSI
 502 回路基板
 503 デジタルテレビ
 504 デジタルレコーダ
DESCRIPTION OF SYMBOLS 100 Boot system 110 Boot control apparatus 120 Non-volatile memory 121 Boot program 130 Boot control circuit 131 Copy part 132 Copy determination part 133 Area management part 134 Boot processing part 140 System control part 141 Wear leveling process part 150 Flash memory controller 151 Error determination circuit 160 Bus Controller 170 Storage Unit 171 Boot Management Information 180 RAM
201 block 202 page 203 data area 204 redundant area 205 defective mark 211 boot dedicated area 212 normal area 213 wear leveling area 214 spare area 215 busy area 216 unused area 310 normal block numbers 320, 321, 322, 323 spare block number 330 Block number used 340 Number of normal blocks 350, 351, 352, 353 Number of spare blocks 360 Copy flag 501 System LSI
502 circuit board 503 digital television 504 digital recorder

Claims (7)

  1.  不揮発性メモリに記憶されている、システムを起動するための、同一の複数のブートプログラムを管理するブート制御装置であって、
     前記不揮発性メモリに記憶されている正常な前記ブートプログラムの数が、2以上の予め定められた閾値を下回ったときに、正常な前記ブートプログラムを前記不揮発性メモリの他の領域にコピーするコピー部を備える
     ブート制御装置。
    A boot control device that manages a plurality of identical boot programs for starting a system, stored in a nonvolatile memory,
    A copy for copying the normal boot program to another area of the non-volatile memory when the number of normal boot programs stored in the non-volatile memory falls below a predetermined threshold value of 2 or more A boot control device comprising a unit.
  2.  前記ブート制御装置は、さらに、
     コピー処理を行う必要があるか否かを示すコピーフラグを格納する記憶部と、
     前記正常なブートプログラムの数が前記閾値を下回っているか否かを判定し、前記正常なブートプログラムの数が前記閾値を下回っている場合に、前記コピーフラグを設定するコピー判定部とを備え、
     前記コピー部は、前記システムが起動した後に、前記コピーフラグを参照し、当該コピーフラグが設定されている場合に、前記ブートプログラムを前記不揮発性メモリの他の領域にコピーする
     請求項1記載のブート制御装置。
    The boot control device further includes:
    A storage unit for storing a copy flag indicating whether or not copy processing needs to be performed;
    Determining whether or not the number of normal boot programs is below the threshold, and a copy determination unit that sets the copy flag when the number of normal boot programs is below the threshold; and
    The copy unit refers to the copy flag after the system is started, and copies the boot program to another area of the nonvolatile memory when the copy flag is set. Boot controller.
  3.  前記不揮発性メモリは、
     前記複数のブートプログラムを記憶するために専用に用いられるブート専用領域と、
     前記ブート専用領域以外の通常領域とを含み、
     前記ブート制御装置は、さらに、
     前記不揮発性メモリの領域のうち、前記複数のブートプログラムの記憶に用いるブート使用領域を管理する領域管理部を備え、
     前記領域管理部は、
     前記ブート専用領域を前記ブート使用領域に設定し、
     前記ブート使用領域に空き領域がない場合に、前記通常領域の一部を前記ブート使用領域に加え、
     前記コピー部は、前記ブート使用領域に、前記ブートプログラムをコピーする
     請求項1又は2記載のブート制御装置。
    The nonvolatile memory is
    A boot dedicated area used exclusively for storing the plurality of boot programs;
    Including a normal area other than the boot dedicated area,
    The boot control device further includes:
    An area management unit for managing a boot use area used for storing the plurality of boot programs among the areas of the nonvolatile memory;
    The area management unit
    Set the boot dedicated area as the boot use area,
    If there is no free space in the boot use area, add a part of the normal area to the boot use area,
    The boot control device according to claim 1, wherein the copy unit copies the boot program to the boot use area.
  4.  前記通常領域は、
     前記システムが使用するシステム使用領域と、
     前記システム使用領域以外の予備領域とを含み、
     前記領域管理部は、前記ブート使用領域に空き領域がない場合に、前記予備領域の一部を前記ブート使用領域に加える
     請求項3記載のブート制御装置。
    The normal region is
    A system usage area used by the system;
    Including a spare area other than the system use area,
    The boot control device according to claim 3, wherein the area management unit adds a part of the spare area to the boot use area when there is no empty area in the boot use area.
  5.  前記ブート制御装置は、さらに、
     前記システムの起動後に、前記システム使用領域を使用して、前記不揮発性メモリに対してウェアレベリング処理を行うウェアレベリング処理部を備え、
     前記領域管理部は、前記ブート使用領域に空き領域がなく、かつ、前記予備領域に空き領域がない場合に、前記システム使用領域のうち現在使用されていない未使用領域を前記ブート使用領域に加えるとともに、当該未使用領域を前記システム使用領域から除外する
     請求項4記載のブート制御装置。
    The boot control device further includes:
    A wear leveling processing unit that performs wear leveling processing on the nonvolatile memory using the system use area after the system is started,
    The area management unit adds, to the boot use area, an unused area that is not currently used in the system use area when the boot use area has no free area and the spare area has no free area. The boot control device according to claim 4, wherein the unused area is excluded from the system use area.
  6.  請求項1~5のいずれか1項に記載の、ブート制御装置と不揮発性メモリとを備える
     ブートシステム。
    A boot system comprising the boot control device and the nonvolatile memory according to any one of claims 1 to 5.
  7.  不揮発性メモリに記憶されている、システムを起動するための、同一の複数のブートプログラムを管理するブート制御方法であって、
     前記不揮発性メモリに記憶されている正常な前記ブートプログラムの数が、2以上の予め定められた閾値を下回ったときに、正常な前記ブートプログラムを前記不揮発性メモリの他の領域にコピーする
     ブート制御方法。
    A boot control method for managing a plurality of identical boot programs for starting a system, stored in a nonvolatile memory,
    When the number of normal boot programs stored in the nonvolatile memory falls below a predetermined threshold value of 2 or more, the normal boot program is copied to another area of the nonvolatile memory. Control method.
PCT/JP2011/007135 2011-04-14 2011-12-20 Boot control device, boot system, and boot control method WO2012140710A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2011-090462 2011-04-14
JP2011090462 2011-04-14

Publications (1)

Publication Number Publication Date
WO2012140710A1 true WO2012140710A1 (en) 2012-10-18

Family

ID=47008921

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2011/007135 WO2012140710A1 (en) 2011-04-14 2011-12-20 Boot control device, boot system, and boot control method

Country Status (1)

Country Link
WO (1) WO2012140710A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017037501A (en) * 2015-08-11 2017-02-16 富士通株式会社 Storage control device and storage control program

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005215824A (en) * 2004-01-28 2005-08-11 Sony Corp Semiconductor device and its start processing method
JP2007304781A (en) * 2006-05-10 2007-11-22 Nec Electronics Corp Semiconductor device and start-up method
JP2009157632A (en) * 2007-12-26 2009-07-16 Toshiba Corp Information processing unit
WO2011001486A1 (en) * 2009-06-30 2011-01-06 パナソニック株式会社 Data processing method and semiconductor integrated circuit

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005215824A (en) * 2004-01-28 2005-08-11 Sony Corp Semiconductor device and its start processing method
JP2007304781A (en) * 2006-05-10 2007-11-22 Nec Electronics Corp Semiconductor device and start-up method
JP2009157632A (en) * 2007-12-26 2009-07-16 Toshiba Corp Information processing unit
WO2011001486A1 (en) * 2009-06-30 2011-01-06 パナソニック株式会社 Data processing method and semiconductor integrated circuit

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017037501A (en) * 2015-08-11 2017-02-16 富士通株式会社 Storage control device and storage control program

Similar Documents

Publication Publication Date Title
US20190340080A1 (en) Hybrid memory system with configurable error thresholds and failure analysis capability
JP4844639B2 (en) MEMORY CONTROLLER, FLASH MEMORY SYSTEM HAVING MEMORY CONTROLLER, AND FLASH MEMORY CONTROL METHOD
US8671330B2 (en) Storage device, electronic device, and data error correction method
JP5831271B2 (en) Method and system for starting refresh operation of semiconductor nonvolatile memory device
JP2009230407A (en) Data update method, memory system and memory device
US20110283058A1 (en) Storage apparatus and method of managing data storage area
US8812910B2 (en) Pilot process method for system boot and associated apparatus
US20100185804A1 (en) Information processing device that accesses memory, processor and memory management method
TWI501252B (en) Solid state storage system for controlling reserved area and method of controlling the same
US8402204B2 (en) Methods for measuring usable lifespan and replacing an in-system programming code of a memory device, and data storage system using the same
US11042310B2 (en) Reading of start-up information from different memory regions of a memory system
JP2006285600A (en) Storage, memory management device, memory management method, and program
JP7020989B2 (en) Non-volatile storage device, memory control device, and memory control method
JP2011507066A (en) Error correction in memory arrays
JP2009245163A (en) Memory controller, flash memory system having memory controller and control method for flash memory
JP4956230B2 (en) Memory controller
KR101548452B1 (en) Method and apparatus for recovering metadata in electronic device based on non-volatile memeory
WO2012140710A1 (en) Boot control device, boot system, and boot control method
JP2008191701A (en) Method of recovery from error and information processor
US20140075094A1 (en) Method to implement a binary flag in flash memory
JP5363460B2 (en) Controller with error correction function, storage device with error correction function, and system with error correction function
JP2008117299A (en) Storage medium control apparatus
JP2005196658A (en) External memory unit
JP6707939B2 (en) Control device, storage device, control method, and program
JP6237202B2 (en) Semiconductor memory device and control method thereof

Legal Events

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

Ref document number: 11863389

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 11863389

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP