JP2013174976A - Memory system and update method for control program - Google Patents

Memory system and update method for control program Download PDF

Info

Publication number
JP2013174976A
JP2013174976A JP2012038020A JP2012038020A JP2013174976A JP 2013174976 A JP2013174976 A JP 2013174976A JP 2012038020 A JP2012038020 A JP 2012038020A JP 2012038020 A JP2012038020 A JP 2012038020A JP 2013174976 A JP2013174976 A JP 2013174976A
Authority
JP
Japan
Prior art keywords
control program
block
firmware
log
program block
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2012038020A
Other languages
Japanese (ja)
Inventor
Seiji Norimatsu
誠志 乘松
Yasunori Nakamura
安徳 中村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2012038020A priority Critical patent/JP2013174976A/en
Publication of JP2013174976A publication Critical patent/JP2013174976A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a memory system capable of performing update of firmware without causing a complicated processing procedure between system management processing and block management processing inside the memory system.SOLUTION: When updating firmware 51, a controller performs update processing for additionally recording start logs indicating update starts at predetermined locations of all firmware blocks 111-1 through 111-4, subsequently writing new firmware 51 into the same firmware blocks 111-1 through 111-4 subsequent to deletion of the firmware blocks 111-1 through 111-4 and writing completion logs 52 indicating completion of writing at the predetermined locations of the firmware blocks 111-1 through 111-4 subsequent to the completion of writing of the new firmware 51 in first order for each of the firmware blocks 111-1 through 111-4.

Description

本発明の実施形態は、メモリシステムおよび制御プログラムの更新方法に関する。   Embodiments described herein relate generally to a memory system and a control program update method.

従来、NAND型フラッシュメモリ(以下、NANDメモリという)を用いたメモリシステムにおけるコントローラの制御プログラム(以下、ファームウェアという)は、メモリシステムの起動時に固定的に参照される情報であるので、静的に割り当てたブロック(以下、ファームウェアブロックという)に格納される。NANDメモリの故障によってファームウェアの読み出しに失敗した場合には、システムが起動できなくなるため、複数のブロックに同一のファームウェアをコピーして保存しておき、1ブロックが故障した場合でも他ブロックからファームウェアを読み出せるように多重化されている。   Conventionally, a controller control program (hereinafter referred to as firmware) in a memory system using a NAND flash memory (hereinafter referred to as NAND memory) is information that is fixedly referenced when the memory system is started up. It is stored in the allocated block (hereinafter referred to as firmware block). If the reading of the firmware fails due to a failure in the NAND memory, the system will not be able to start up, so copy and save the same firmware in multiple blocks, and even if one block fails, firmware from other blocks Multiplexed so that it can be read.

特開2011−53984号公報JP 2011-53984 A

本発明の一つの実施形態は、メモリシステム内部でシステム管理処理とブロック管理処理との間で複雑な処理手順を生じさせずにファームウェアの更新を行うことができるメモリシステムおよび制御プログラムの更新方法を提供することを目的とする。   One embodiment of the present invention provides a memory system and a control program update method capable of updating firmware without causing a complicated processing procedure between system management processing and block management processing inside the memory system. The purpose is to provide.

本発明の一つの実施形態によれば、不揮発性記憶手段と、制御手段と、を備えるメモリシステムが提供される。前記不揮発性記憶手段は、1つの管理単位としての所定のサイズのブロックを複数有し、当該メモリシステムの起動時に読み出される制御プログラムを記憶する前記ブロックである制御プログラムブロックを多重化して有する。前記制御手段は、起動時に前記不揮発性記憶手段に記憶された前記制御プログラムを読み出し、ホスト装置と前記不揮発性記憶手段との間のデータ転送を行うとともに、前記不揮発性記憶手段でのデータ管理を行う。また、前記制御手段は、前記制御プログラムを更新する場合に、全ての前記制御プログラムブロックの所定の位置に更新開始を示す第1ログを追加記録した後、前記制御プログラムブロックを消去した後に同じ前記制御プログラムブロックに新たな制御プログラムを書き込み、前記新たな制御プログラムの書き込み終了後に書き込み終了を示す第2ログを前記制御プログラムブロックの所定の位置に書き込む更新処理を、第1の順序で前記制御プログラムブロックごとに行う。   According to one embodiment of the present invention, a memory system including a non-volatile storage unit and a control unit is provided. The non-volatile storage means has a plurality of blocks of a predetermined size as one management unit, and multiplexes control program blocks, which are the blocks for storing control programs read when the memory system is activated. The control means reads the control program stored in the non-volatile storage means at the time of start-up, performs data transfer between a host device and the non-volatile storage means, and manages data in the non-volatile storage means Do. In addition, when updating the control program, the control means additionally records a first log indicating update start at a predetermined position of all the control program blocks, and then deletes the control program block and then the same An update process for writing a new control program in the control program block and writing a second log indicating the end of writing in a predetermined position of the control program block after the writing of the new control program is completed in the first order. Do this for each block.

図1は、第1の実施形態によるメモリシステムの構成の一例を示すブロック図である。FIG. 1 is a block diagram showing an example of the configuration of the memory system according to the first embodiment. 図2は、ファームウェア保存領域の構成を模式的に示す図である。FIG. 2 is a diagram schematically showing the configuration of the firmware storage area. 図3は、第1の実施形態によるファームウェアの更新処理の手順の一例を示すフローチャートである。FIG. 3 is a flowchart illustrating an example of the procedure of the firmware update process according to the first embodiment. 図4は、ファームウェアの更新処理の様子を模式的に示す図である。FIG. 4 is a diagram schematically illustrating a firmware update process. 図5は、ファームウェアの更新処理の様子を模式的に示す図である。FIG. 5 is a diagram schematically illustrating a firmware update process. 図6は、ファームウェアの更新処理の様子を模式的に示す図である。FIG. 6 is a diagram schematically illustrating a firmware update process. 図7は、ファームウェアの更新処理の様子を模式的に示す図である。FIG. 7 is a diagram schematically illustrating a firmware update process. 図8は、第1の実施形態によるファームウェアの読み込み処理の手順の一例を示すフローチャートである。FIG. 8 is a flowchart illustrating an example of the procedure of the firmware reading process according to the first embodiment. 図9は、第2の実施形態によるファームウェアの読み出しエラー発生時の処理の手順の一例を示すフローチャートである。FIG. 9 is a flowchart illustrating an example of a processing procedure when a firmware read error occurs according to the second embodiment. 図10は、バッドブロック処理後のファームウェアブロックの状態の一例を示す図である。FIG. 10 is a diagram illustrating an example of the state of the firmware block after the bad block processing. 図11は、SSDを搭載したパーソナルコンピュータの一例を示す斜視図である。FIG. 11 is a perspective view showing an example of a personal computer equipped with an SSD. 図12は、SSDを搭載したパーソナルコンピュータのシステム構成例を示すブロック図である。FIG. 12 is a block diagram illustrating a system configuration example of a personal computer equipped with an SSD.

以下に添付図面を参照して、実施形態にかかるメモリシステムおよび制御プログラムの更新方法を詳細に説明する。なお、これらの実施形態により本発明が限定されるものではない。また、以下では、一般的なメモリシステムにおける問題点を説明した後、その問題点を解決する実施形態について説明する。   Exemplary embodiments of a memory system and a control program update method will be described below in detail with reference to the accompanying drawings. Note that the present invention is not limited to these embodiments. In the following, after describing a problem in a general memory system, an embodiment for solving the problem will be described.

NANDメモリでは、その特性から、データの読み出し・書き込みについてはページと呼ばれる単位で行なわれる。また、書き込みについてはページに上書きはできず、1ページずつ追加記録しなければならない。一方、データの消去については複数ページで構成されるブロックと呼ばれる単位で行なわれる。   In the NAND memory, data reading / writing is performed in units called pages because of its characteristics. In addition, writing cannot be overwritten on a page, and additional recording must be performed page by page. On the other hand, data is erased in units called blocks each composed of a plurality of pages.

上記したようにファームウェアは、メモリシステムの起動時に固定的に参照される情報であるので、静的に割り当てたファームウェアブロックに格納され、このファームウェアブロックは多重化されている。このファームウェアは、コントローラの仕様変更やバグ修正を行う場合に更新される。更新の際は、上記したNANDメモリの特性から、多重化されたファームウェアブロックのうちの1つのファームウェアブロックが選択され、このファームウェアブロックについて、消去を行ってから新たなファームウェアを書き込むことになる。そして、これを全てのファームウェアブロックについて順に行う。また、更新途中のシステム電源遮断やNANDメモリのページ書き込み失敗によって更新処理が正常に完了しない場合が有り得るため、更新の際には同時にログ情報も記録し、更新処理が正常に行なわれたかどうかを後で判断できるようにしている。ファームウェアの更新処理が正しく行なわれていなかった場合には、ログ情報を参考に、多重化が行なわれていないブロックに再度書き込みを行い、多重化を維持するリカバリ処理を行う。   As described above, the firmware is information that is fixedly referred to when the memory system is started up, so that it is stored in a statically assigned firmware block, and this firmware block is multiplexed. This firmware is updated when the controller specification is changed or a bug is corrected. At the time of updating, one firmware block of the multiplexed firmware blocks is selected from the above-mentioned characteristics of the NAND memory, and new firmware is written after erasing the firmware block. This is sequentially performed for all firmware blocks. In addition, there is a possibility that the update process may not be completed normally due to a system power shutdown during the update or a page write failure in the NAND memory. Therefore, log information is also recorded at the time of update, and whether the update process has been performed normally. You can judge later. If the firmware update process has not been performed correctly, referring to the log information, writing is performed again on a block that has not been multiplexed, and a recovery process for maintaining the multiplexing is performed.

このログ情報は、一般的にNANDメモリ内のファームウェアブロックとは別に用意され、動的に割り当てられたログブロックに保存される。ここで、動的に割り当てられたブロックとは、メモリシステムにおけるブロック管理部が、使用可能なブロックのリストから、ブロック消去回数等を平準化するよう考慮して(ウエアレベリング)、書き込み対象として選択したブロックのことをいう。   This log information is generally prepared separately from the firmware block in the NAND memory and stored in a dynamically allocated log block. Here, the dynamically allocated block is selected as a write target by the block management unit in the memory system in consideration of leveling the number of block erasures from the list of usable blocks (wear leveling). Refers to the block.

このように動的に割り当てられたログブロックにログ情報を保存することによって、同一ブロックへのログ情報の書き込みによるブロックの疲弊を軽減するメリットがある一方、ログ情報を保存するために別途ブロックが必要になるという問題点があった。また、メモリシステムを制御するコントローラには、ブロックを管理するブロック管理部と、ファームウェアの更新を行うシステム管理部が含まれるが、ブロック管理部が起動され、動的なブロック割り当てが行えるようになるまでの間、ログ情報の保存ができないため、メモリシステム内部でシステム管理部とブロック管理部の立ち上げの動作順に依存関係が発生し、コントローラのファームウェア内部の処理手順が複雑になってしまうという問題点もあった。そこで、以下の実施形態では、これらの問題点を解決することができるメモリシステムおよび制御プログラムの更新方法について説明する。   Saving log information in log blocks dynamically allocated in this way has the advantage of reducing block exhaustion due to writing log information to the same block, while a separate block is required to save log information. There was a problem that it was necessary. The controller that controls the memory system includes a block management unit that manages blocks and a system management unit that updates firmware. The block management unit is activated to enable dynamic block allocation. The log information cannot be saved until this time, so there is a dependency in the order in which the system management unit and block management unit are started up in the memory system, which complicates the processing procedure inside the controller firmware. There was also a point. Therefore, in the following embodiments, a memory system and a control program update method that can solve these problems will be described.

(第1の実施形態)
図1は、第1の実施形態によるメモリシステムの構成の一例を示すブロック図である。このメモリシステム10は、不揮発性記憶手段であるNANDメモリ11と、一時記憶手段であるRAM(Random Access Memory)12と、制御手段であるコントローラ13と、を備える。
(First embodiment)
FIG. 1 is a block diagram showing an example of the configuration of the memory system according to the first embodiment. The memory system 10 includes a NAND memory 11 that is a nonvolatile storage unit, a RAM (Random Access Memory) 12 that is a temporary storage unit, and a controller 13 that is a control unit.

このメモリシステム10は、不揮発性半導体記憶装置を含み、ATA(Advanced Technology Attachment)インタフェース(ATA I/F)などのメモリ接続インタフェースである図示しないホストI/Fを介してパーソナルコンピュータまたはCPU(Central Processing Unit)コアなどのホスト装置(以下、ホストという)1と接続され、ホスト1の外部メモリとして機能する。メモリシステム10は、ホストの2次記憶装置(Solid State Drive:SSD)として使用され、ホスト1から書き込み要求が出されたデータを記憶し、またホスト1から読み出し要求のあったデータを読み出してホスト1に出力する機能を有する。   The memory system 10 includes a non-volatile semiconductor memory device, and a personal computer or CPU (Central Processing) via a host I / F (not shown) which is a memory connection interface such as an ATA (Advanced Technology Attachment) interface (ATA I / F). Unit) is connected to a host device (hereinafter referred to as a host) 1 such as a core and functions as an external memory of the host 1. The memory system 10 is used as a host secondary storage device (Solid State Drive: SSD), stores data for which a write request is issued from the host 1, and reads data requested for read from the host 1 to 1 to output.

NANDメモリ11は、データやプログラム保存用の記憶部として使用される。具体的には、ホスト1側によって指定されたデータを記憶したり、NANDメモリ11でのデータ格納位置を管理する管理情報やファームウェアプログラムなどの不揮発に保存したい重要なデータを記憶したりする。ホスト1側によって指定されたデータは、NANDメモリ11内のデータ格納領域に保存され、不揮発に保存したい重要なデータは、NANDメモリ11内の管理情報保存領域に記憶され、不揮発に保存したい重要なプログラムは、ファームウェア保存領域に記憶される。   The NAND memory 11 is used as a storage unit for storing data and programs. Specifically, data designated by the host 1 side is stored, or important data to be stored in a nonvolatile manner such as management information for managing the data storage position in the NAND memory 11 or a firmware program is stored. Data designated by the host 1 side is stored in a data storage area in the NAND memory 11 and important data desired to be stored in a nonvolatile manner is stored in a management information storage area in the NAND memory 11 and important data to be stored in a nonvolatile manner. The program is stored in the firmware storage area.

図2は、ファームウェア保存領域の構成を模式的に示す図である。図2に示されるように、ファームウェア51は、ファームウェアブロック111−1〜111−4に格納される。ファームウェアブロック111−1〜111−4は、NANDメモリ11内で静的に確保されたブロックで構成される固定領域110に割り当てられる。ファームウェアブロック111−1〜111−4の大きさは、たとえば消去単位である物理ブロックと同じ大きさとすることができる。   FIG. 2 is a diagram schematically showing the configuration of the firmware storage area. As shown in FIG. 2, the firmware 51 is stored in the firmware blocks 111-1 to 111-4. The firmware blocks 111-1 to 111-4 are allocated to the fixed area 110 configured by blocks that are statically secured in the NAND memory 11. The size of the firmware blocks 111-1 to 111-4 can be the same as that of a physical block that is an erase unit, for example.

固定領域110は、書き換えや書き込みがほとんど発生しない更新頻度の低い、メモリシステム10を稼働させるのに必要な情報が格納される領域である。固定領域110では、たとえば、ブロック内の情報を更新したい場合には、固定領域110内の他のブロックに情報(ファームウェア51)を書き込むのではなく、現在使用しているブロックの情報を消去した後に同じブロックの先頭ページから情報を書き込むように設定された領域である。また、NANDメモリ11が多値メモリで構成される場合には、記憶されている情報(ファームウェア51)の信頼性を高めるために、2値モードで使用することが望ましい。   The fixed area 110 is an area in which information necessary for operating the memory system 10 is stored. In the fixed area 110, for example, when it is desired to update the information in the block, the information (firmware 51) is not written to the other blocks in the fixed area 110, but after the information on the currently used block is erased. This is an area set to write information from the first page of the same block. When the NAND memory 11 is composed of a multi-value memory, it is desirable to use it in a binary mode in order to improve the reliability of stored information (firmware 51).

なお、NANDメモリ11には、固定領域110のほかに図示しない可変領域を有する。可変領域では、現在書き込み中のブロックがすべて満たされた場合には、可変領域中の書き込み可能なフリーブロックとなっている他のブロックにつぎの情報を書き込むように設定される領域である。なお、この可変領域は、NANDメモリ11中の固定領域110を除いた領域であり、管理情報保存領域やデータ格納領域を含むものである。   The NAND memory 11 has a variable area (not shown) in addition to the fixed area 110. The variable area is an area that is set to write the next information in another block that is a writable free block in the variable area when all the blocks that are currently being written are filled. This variable area is an area excluding the fixed area 110 in the NAND memory 11 and includes a management information storage area and a data storage area.

ファームウェア51は、上記したようにコントローラ13の制御プログラムであり、メモリシステム10の起動時に最初に実行されるプログラムである。このファームウェア51は、コントローラ13の仕様変更やバグの修正を行う場合に更新される。   The firmware 51 is a control program for the controller 13 as described above, and is a program that is executed first when the memory system 10 is activated. The firmware 51 is updated when the specification of the controller 13 is changed or a bug is corrected.

また、ファームウェア51は、複数のブロックに同一のファームウェア51を保持するように多重化されている。これは、NANDメモリ11の故障やファームウェア51の更新処理の失敗によってファームウェア51の読み出しに失敗した場合に、システムが起動できなくなってしまうことを防ぐためである。多重化によって、1つのファームウェアブロック111−1〜111−4が故障した場合でも他のファームウェアブロック111−1〜111−4からファームウェア51を読み出すことができ、システムの起動を行うことができる。この図2の例では、ファームウェア51を4重化している場合を示しているが、2重化以上していればよい。   The firmware 51 is multiplexed so that the same firmware 51 is held in a plurality of blocks. This is to prevent the system from becoming unbootable when the reading of the firmware 51 fails due to the failure of the NAND memory 11 or the failure of the update process of the firmware 51. By multiplexing, even if one firmware block 111-1 to 111-4 fails, the firmware 51 can be read from the other firmware blocks 111-1 to 111-4, and the system can be activated. In the example of FIG. 2, the firmware 51 is quadrupled, but it is sufficient that the firmware 51 is duplexed or more.

この第1の実施形態では、ファームウェア51の更新が正常に終了したことを示す完了ログ52が、ファームウェアブロック111−1〜111−4のファームウェア51の最終ページのつぎのページに記録される。つまり、ファームウェア51の更新処理に関する完了ログ52は、可変領域に確保されたログブロックに記録されるのではなく、多重化されたそれぞれのファームウェアブロック111−1〜111−4に格納するようにしている。なお、完了ログ52としては、所定の位置(たとえば上記したようにファームウェア51の最終ページのつぎのページ)に特定のパターンが書き込まれたものとすることができる。   In the first embodiment, a completion log 52 indicating that the update of the firmware 51 has been normally completed is recorded on the page following the last page of the firmware 51 of the firmware blocks 111-1 to 111-4. That is, the completion log 52 relating to the update process of the firmware 51 is not recorded in the log block secured in the variable area, but is stored in each of the multiplexed firmware blocks 111-1 to 111-4. Yes. As the completion log 52, a specific pattern can be written at a predetermined position (for example, the next page of the last page of the firmware 51 as described above).

このような構成のNANDメモリ11は、一般的に複数のNANDメモリチップを有する。個々のNANDメモリチップは、複数のブロックを有する。また、各NANDメモリチップは、チャネルを介してそれぞれ並列にコントローラ13に接続されている。1つのチャネルに接続されるNANDメモリ11の数は1個に限らず、複数のNANDメモリ11が入出力線を共有した状態で接続されていてもよい。また、NANDメモリ11の各NANDメモリチップは、たとえば、複数のチャネルによる並列動作を可能とするように構成されていてもよいし、複数のバンク(Bank)によるインターリーブ動作を可能とするように構成されていてもよい。NANDメモリ11は、消去はブロック単位で行い、書き込みと読み込みはページ単位で行われる。   The NAND memory 11 having such a configuration generally has a plurality of NAND memory chips. Each NAND memory chip has a plurality of blocks. Each NAND memory chip is connected to the controller 13 in parallel via a channel. The number of NAND memories 11 connected to one channel is not limited to one, and a plurality of NAND memories 11 may be connected in a state where input / output lines are shared. In addition, each NAND memory chip of the NAND memory 11 may be configured to enable a parallel operation by a plurality of channels, for example, or may be configured to enable an interleave operation by a plurality of banks (Bank). May be. In the NAND memory 11, erasing is performed in units of blocks, and writing and reading are performed in units of pages.

RAM12は、ホスト1とNANDメモリ11との間でのデータ転送用キャッシュおよび作業領域用メモリなどの一時記憶用の記憶部として使用される。RAM12の作業領域用メモリに記憶されるものとしては、管理テーブルなどがある。管理テーブルは、NANDメモリ11に記憶されている管理情報が起動時などに展開されたテーブルである。この管理テーブルは、ホスト1から指定された論理アドレスとNANDメモリ11内での物理的なデータの記憶位置とを対応付ける管理情報を管理する情報テーブルであり、最新の情報となるように維持される。ユーザデータの書き込みや、管理テーブルへのデータの読み書きを行う際には、RAM12上に管理テーブルが展開される。   The RAM 12 is used as a storage unit for temporary storage, such as a data transfer cache and a work area memory between the host 1 and the NAND memory 11. Examples of what is stored in the work area memory of the RAM 12 include a management table. The management table is a table in which management information stored in the NAND memory 11 is expanded at the time of startup. This management table is an information table for managing management information that associates a logical address designated by the host 1 with a storage location of physical data in the NAND memory 11, and is maintained so as to be the latest information. . When writing user data or reading / writing data to / from the management table, the management table is expanded on the RAM 12.

なお、RAM12として、DRAM(Dynamic RAM)、SRAM(Static RAM)、FeRAM(Ferroelectric RAM)、MRAM(Magnetoresistive RAM)、PRAM(Phase change RAM)などを用いることができる。   As the RAM 12, DRAM (Dynamic RAM), SRAM (Static RAM), FeRAM (Ferroelectric RAM), MRAM (Magnetoresistive RAM), PRAM (Phase change RAM), or the like can be used.

コントローラ13は、ホスト1との間のコマンドインタフェースを行うATAコマンド処理部131と、RAM12を介してNANDメモリ11とホスト1との間のデータインタフェース(データ転送)を行うデータ転送部132と、NANDメモリ11内の各ブロックを管理するブロック管理部133と、ファームウェア51の読み込み処理、更新処理およびリカバリ処理を行うシステム管理部134と、を有する。   The controller 13 includes an ATA command processing unit 131 that performs a command interface with the host 1, a data transfer unit 132 that performs a data interface (data transfer) between the NAND memory 11 and the host 1 via the RAM 12, and a NAND. A block management unit 133 that manages each block in the memory 11 and a system management unit 134 that performs a read process, an update process, and a recovery process of the firmware 51 are included.

システム管理部134は、メモリシステム10が起動されると、ファームウェアブロック111−1〜111−4からファームウェア51を読み込み、システムを起動させる。また、ファームウェア51の更新が指示された場合には、ファームウェア51の更新処理を行う。このファームウェア51の更新処理では、更新前に、各ファームウェアブロック111−1〜111−4の最終ページに開始ログを追加記録し、更新完了後にファームウェアブロック111−1〜111−4のファームウェア51の最終ページのつぎのページに完了ログ52を記録する。   When the memory system 10 is activated, the system management unit 134 reads the firmware 51 from the firmware blocks 111-1 to 111-4 and activates the system. When an instruction to update the firmware 51 is given, the firmware 51 is updated. In the update process of the firmware 51, a start log is additionally recorded on the final page of each firmware block 111-1 to 111-4 before the update, and the final firmware 51 of the firmware block 111-1 to 111-4 is completed after the update is completed. The completion log 52 is recorded on the next page of the page.

システム管理部134は、起動時にファームウェア51の更新処理が正しく行われたか開始ログと完了ログ52とを用いて判定し、更新処理が正しく行われなかった場合に、あるいはファームウェア51の読み出しエラーが発生した場合にリカバリ処理を行う機能を有する。さらに、システム管理部134は、ブロックを構成するメモリセル自体の劣化によってブロックを使用することができない場合に、そのファームウェアブロックのバッドブロック化処理を行う機能を有する。   The system management unit 134 determines whether the update process of the firmware 51 has been performed correctly at the start-up using the start log and the completion log 52. If the update process has not been performed correctly, or a read error of the firmware 51 has occurred. In this case, a recovery process is performed. Further, the system management unit 134 has a function of performing a bad block process for the firmware block when the block cannot be used due to deterioration of the memory cell itself constituting the block.

以上のように、ファームウェアブロック111−1〜111−4の内容を更新した際に記録するログ情報を、それぞれのファームウェアブロック111−1〜111−4に格納するようにしたので、可変領域に専用のログブロックを設ける必要がない。また、専用のログブロックを必要としないので、ファームウェア51の更新処理に際してシステム管理部134とブロック管理部133の立ち上げの動作順に依存関係が発生せず、コントローラ13のファームウェア51内部の処理手順を簡略化することができる。   As described above, the log information recorded when the contents of the firmware blocks 111-1 to 111-4 are updated is stored in the respective firmware blocks 111-1 to 111-4. There is no need to provide a log block. In addition, since a dedicated log block is not required, there is no dependency in the order of starting up the system management unit 134 and the block management unit 133 in the update process of the firmware 51, and the processing procedure inside the firmware 51 of the controller 13 is It can be simplified.

ここで、システム管理部134によるファームウェア51の更新処理と読み出し処理について説明する。なお、ここでは、ファームウェア51の読み出し順序として、図2に示されるように、ファームウェアブロック111−1→ファームウェアブロック111−2→ファームウェアブロック111−3→ファームウェアブロック111−4となっているものとする。   Here, an update process and a read process of the firmware 51 by the system management unit 134 will be described. Here, as shown in FIG. 2, the firmware 51 is read out in the order of firmware block 111-1 → firmware block 111-2 → firmware block 111-3 → firmware block 111-4. .

<ファームウェアの更新処理>
図3は、第1の実施形態によるファームウェアの更新処理の手順の一例を示すフローチャートであり、図4〜図7は、ファームウェアの更新処理の様子を模式的に示す図である。まず、システム管理部134は、ファームウェアの更新処理の実行が開始されると、全てのファームウェアブロックの所定のページに開始ログを追加記録する(ステップS11、図4(a))。開始ログは、ファームウェアの更新をこれから行うことを示すものであり、この開始ログがあるブロックはファームウェアの更新処理が行われていないことを示している。追加記録するページは、ファームウェアブロック中のファームウェアが格納されていない任意のページでよいが、たとえばファームウェアブロックの最終ページとすることができる。図4(a)の例では、更新前のファームウェア51−1とそれに対応する完了ログ52−1が書き込まれている各ファームウェアブロック111−1〜111−4の最終ページに開始ログ53が追加記録された状態を示している。
<Firmware update process>
FIG. 3 is a flowchart showing an example of the procedure of the firmware update process according to the first embodiment, and FIGS. 4 to 7 are diagrams schematically showing the state of the firmware update process. First, when the execution of the firmware update process is started, the system management unit 134 additionally records a start log on a predetermined page of all firmware blocks (step S11, FIG. 4A). The start log indicates that the firmware is to be updated from now on, and the block having this start log indicates that the firmware update process is not performed. The page to be additionally recorded may be an arbitrary page in which firmware in the firmware block is not stored, but may be the last page of the firmware block, for example. In the example of FIG. 4A, the start log 53 is additionally recorded on the last page of each firmware block 111-1 to 111-4 in which the firmware 51-1 before update and the corresponding completion log 52-1 are written. It shows the state that was done.

ついで、メモリシステム10の電源断などの障害が発生していない場合(ステップS12でNoの場合)には、ファームウェアの読み出し順序とは逆の更新順序でファームウェアブロックを選択する(ステップS13)。つまり、ファームウェアの更新順序は、ファームウェアブロック111−4→ファームウェアブロック111−3→ファームウェアブロック111−2→ファームウェアブロック111−1となるので、ここでは更新順序の最初のファームウェアブロック111−4が選択される。   Next, when a failure such as power failure of the memory system 10 has not occurred (No in step S12), the firmware block is selected in the update order opposite to the firmware read order (step S13). That is, since the firmware update order is firmware block 111-4 → firmware block 111-3 → firmware block 111-2 → firmware block 111-1, the first firmware block 111-4 in the update order is selected here. The

その後、選択したファームウェアブロックを消去した後、新しいファームウェアの書き込みを行い(ステップS14)、ファームウェアの更新処理を行う。そして、ファームウェアの更新処理が正常に終了したかを判定し(ステップS15)、正常に終了した場合(ステップS15でYesの場合)には、ファームウェアの最終ページのつぎのページに完了ログを書き込む(ステップS16、図4(b))。このとき、ステップS13で選択したファームウェアブロックは、新しいファームウェアの書き込みの前に消去されるので、ステップS11で追加記録された開始ログも消去される。その結果、更新された後のファームウェアブロックには、開始ログはなく、完了ログのみとなる。図4(b)では、最初にファームウェアブロック111−4が選択され、ファームウェア51−1と完了ログ52−1と開始ログ53とが格納されたブロックが消去された後、先頭ページから新たなファームウェア51−2が書き込まれる。そして、新たなファームウェア51−2の書き込みが完了すると、新たなファームウェア51−2のつぎのページに完了ログ52−2が書き込まれる。   Thereafter, after the selected firmware block is erased, new firmware is written (step S14), and firmware update processing is performed. Then, it is determined whether the firmware update process has been completed normally (step S15). If the firmware update process has been completed normally (Yes in step S15), a completion log is written on the next page of the final firmware page (step S15). Step S16, FIG. 4 (b)). At this time, since the firmware block selected in step S13 is erased before writing the new firmware, the start log additionally recorded in step S11 is also erased. As a result, the updated firmware block has no start log and only a completion log. In FIG. 4B, after the firmware block 111-4 is first selected and the block storing the firmware 51-1, the completion log 52-1, and the start log 53 is erased, a new firmware is started from the first page. 51-2 is written. When the writing of the new firmware 51-2 is completed, the completion log 52-2 is written to the next page of the new firmware 51-2.

ついで、メモリシステム10に障害が発生していない場合(ステップS17でNoの場合)には、上記更新順序でつぎのファームウェアブロックを選択する(ステップS18)。その後、メモリシステム10に障害が発生していない場合(ステップS19でNoの場合)には、選択したファームウェアブロックを消去した後、新しいファームウェアの書き込みを行い(ステップS20)、ファームウェアの更新処理を行う。そして、ファームウェアの更新処理が正常に終了したかを判定し(ステップS21)、正常に終了した場合(ステップS21でYesの場合)には、ファームウェアの最終ページの次のページに完了ログを書き込む(ステップS22、図5(a))。図5(a)では、選択されたファームウェアブロック111−3への新たなファームウェア51−2の書き込みが成功し、完了ログ52−2が書き込まれた状態が示されている。   Next, if no failure has occurred in the memory system 10 (No in step S17), the next firmware block is selected in the update order (step S18). Thereafter, if no failure has occurred in the memory system 10 (No in step S19), the selected firmware block is erased, new firmware is written (step S20), and firmware update processing is performed. . Then, it is determined whether the firmware update process has been completed normally (step S21). If the firmware update process has been completed normally (Yes in step S21), a completion log is written to the page following the last page of the firmware ( Step S22, FIG. 5 (a)). FIG. 5A shows a state where the new firmware 51-2 has been successfully written to the selected firmware block 111-3 and the completion log 52-2 has been written.

その後、更新処理を行ったファームウェアブロックが更新順序で最後のブロックであるかを判定し(ステップS23)、最後のブロックでない場合(ステップS23でNoの場合)には、ステップS18へと戻り、更新順序で最後のブロックとなるまで上記した処理が繰り返される。また、最後のブロックである場合(ステップS23でYesの場合)には、ファームウェアの更新処理が終了する。正常にファームウェアの更新処理が終了した状態が、図5(b)に示されている。図5(b)では、全てのファームウェアブロック111−1〜111−4で新たなファームウェア51−2が正常に書き込まれ、完了ログ52が書き込まれた状態となっている。   Thereafter, it is determined whether the firmware block that has undergone the update process is the last block in the update order (step S23). If the firmware block is not the last block (No in step S23), the process returns to step S18 to update. The above processing is repeated until the last block in the order. If it is the last block (Yes in step S23), the firmware update process ends. FIG. 5B shows a state where the firmware update process has been completed normally. In FIG. 5B, the new firmware 51-2 is normally written in all the firmware blocks 111-1 to 111-4, and the completion log 52 is written.

一方、ステップS12,S17,S19でメモリシステム10に障害が発生した場合(ステップS12,S17,S19でYesの場合)には、更新処理の途中で異常終了する(ステップS24)。これらの場合は、選択したファームウェアブロックへの新たなファームウェアの書き込み前、または選択したファームウェアブロックへの新たなファームウェアの書き込み後でつぎに選択されるファームウェアブロックへの新たなファームウェアの書き込み前に障害が発生した場合である。たとえば図6(a)に示されるように、ファームウェアブロック111−3の更新処理完了後でファームウェアブロック111−2の更新処理開始前に障害が発生した場合には、障害発生時よりも前に更新処理が完了したファームウェアブロック111−3,111−4には新たなファームウェア51−2と完了ログ52−2が格納され、障害発生時よりも後に更新処理がされるはずだったファームウェアブロック111−1,111−2には更新前のファームウェア51−1と完了ログ52−1と開始ログ53とが格納されている。   On the other hand, if a failure occurs in the memory system 10 in steps S12, S17, and S19 (Yes in steps S12, S17, and S19), the process ends abnormally during the update process (step S24). In these cases, there is a failure before writing new firmware to the selected firmware block or before writing new firmware to the next selected firmware block after writing new firmware to the selected firmware block. This is the case. For example, as shown in FIG. 6A, if a failure occurs after the update process of the firmware block 111-3 is completed and before the update process of the firmware block 111-2 is started, the update is performed before the time when the failure occurs. Firmware blocks 111-3 and 111-4 for which processing has been completed store new firmware 51-2 and a completion log 52-2, and firmware block 111-1 that should have been updated after the occurrence of a failure. 111-2 store the firmware 51-1 before the update, the completion log 52-1, and the start log 53.

また、ステップS15でファームウェアの更新処理が正常に終了しなかった場合(ステップS15でNoの場合)、すなわち更新順序で最初のファームウェアブロックへのファームウェアの更新処理中に、メモリシステム10の電源断やNANDフラッシュメモリのページ書き込み失敗などの障害発生によって、更新処理が正常に完了しなかった場合にも、更新処理の途中で異常終了する(ステップS24)。たとえば図6(b)に示されるように、ファームウェアブロック111−4で新たなファームウェア51−2を書き込み中に障害が発生した場合には、更新処理の途中であったページは、次回起動時には読み出しは可能であるが消去データとなっており、正確なファームウェア51−2を読み出すことはできない。また、更新処理の途中であったファームウェアブロック111−4には、開始ログ53および完了ログ52−1,52−2がともに記録されていない状態となる。さらに、更新順序で、このファームウェアブロック111−4よりも後のファームウェアブロック111−1〜111−3には、更新処理前のファームウェア51−1とそれに対応する完了ログ52−1が格納されるとともに、開始ログ53も格納されている。   In addition, when the firmware update process does not end normally in step S15 (No in step S15), that is, during the firmware update process to the first firmware block in the update order, Even when the update process is not normally completed due to a failure such as a page write failure in the NAND flash memory, the process ends abnormally during the update process (step S24). For example, as shown in FIG. 6B, if a failure occurs while writing new firmware 51-2 in the firmware block 111-4, the page that was in the middle of the update process is read at the next startup. However, it is erased data, and the correct firmware 51-2 cannot be read. Also, neither the start log 53 nor the completion logs 52-1 and 52-2 are recorded in the firmware block 111-4 that was in the middle of the update process. Further, firmware blocks 111-1 to 111-3 subsequent to this firmware block 111-4 in the update order store the firmware 51-1 before the update process and the corresponding completion log 52-1. A start log 53 is also stored.

また、ステップS21でファームウェアの更新処理が正常に終了しなかった場合(ステップS21でNoの場合)、すなわち更新順序で最初ではない他のファームウェアの更新処理中に、メモリシステム10の電源断やNANDフラッシュメモリのページ書き込み失敗などの障害発生によって、更新処理が正常に完了しなかった場合にも、更新処理の途中で異常終了する(ステップS24)。これらの場合は、図7(a)、(b)に示されている。   In addition, when the firmware update process is not normally completed in step S21 (No in step S21), that is, during the update process of other firmware that is not the first in the update order, Even if the update process does not complete normally due to a failure such as a page write failure in the flash memory, the process ends abnormally in the middle of the update process (step S24). These cases are shown in FIGS. 7A and 7B.

図7(a)は、ファームウェアブロック111−3で新たなファームウェア51−2を書き込み中に障害が発生した場合であり、更新処理の途中であったページは、次回起動時には読み出しは可能であるが消去データとなっており、正確なファームウェア51−2を読み出すことはできない。また、更新処理の途中であったファームウェアブロック111−3には、開始ログ53および完了ログ52−1,52−2がともに記録されていない状態となる。さらに、更新順序で、このファームウェアブロック111−1よりも後のファームウェアブロック111−1〜111−2には、更新処理前のファームウェア51−1とそれに対応する完了ログ52−1が格納されるとともに、開始ログ53も格納されている。   FIG. 7A shows a case where a failure occurs while writing new firmware 51-2 in the firmware block 111-3, and the page that was in the middle of the update process can be read at the next startup. Since it is erased data, the correct firmware 51-2 cannot be read. Also, neither the start log 53 nor the completion logs 52-1 and 52-2 are recorded in the firmware block 111-3 that was in the middle of the update process. Further, firmware blocks 111-1 to 111-2 subsequent to this firmware block 111-1 in the update order store the firmware 51-1 before update processing and the corresponding completion log 52-1. A start log 53 is also stored.

図7(b)は、更新順序で最後のファームウェアブロック111−1で新たなファームウェア51−2を書き込み中に障害が発生した場合であり、更新処理の途中であったページは、次回起動時には読み出しは可能であるが消去データとなっており、正確なファームウェア51−2を読み出すことはできない。また、更新処理の途中であったファームウェアブロック111−1には、開始ログ53および完了ログ52−1,52−2がともに記録されていない状態となる。   FIG. 7B shows a case where a failure occurs while writing the new firmware 51-2 in the last firmware block 111-1 in the update order. The page that was in the middle of the update process is read at the next startup. However, it is erased data, and the correct firmware 51-2 cannot be read. Further, neither the start log 53 nor the completion logs 52-1 and 52-2 are recorded in the firmware block 111-1 that was in the middle of the update process.

ステップS24で更新処理の途中でメモリシステム10が異常終了した場合には、ファームウェアの更新が失敗し、ファームウェアが確実に多重化されていない状態(最大多重度よりも低い多重度の状態)となっているので、後にメモリシステム10が起動された場合にリカバリ処理が実行されることになる。   If the memory system 10 terminates abnormally in the middle of the update process in step S24, the firmware update fails and the firmware is not reliably multiplexed (multiplicity state lower than the maximum multiplicity). Therefore, the recovery process is executed when the memory system 10 is activated later.

<ファームウェアの読み出し処理>
図8は、第1の実施形態によるファームウェアの読み込み処理の手順の一例を示すフローチャートである。
<Firmware read processing>
FIG. 8 is a flowchart illustrating an example of the procedure of the firmware reading process according to the first embodiment.

まず、メモリシステム10が起動されると、システム管理部134は、予め定められた読み出し順序で規定される最初のファームウェアブロックからファームウェアを先頭ページから読み出す(ステップS51)。ついで、システム管理部134は、先頭ページを正常に読み出せたか判定する(ステップS52)。ここで、正常に読み出せない場合として、上述した更新処理の際に障害が発生し、先頭ページ自体は読み出すことができるが、消去データとなっているような場合を挙げることができる。   First, when the memory system 10 is activated, the system management unit 134 reads firmware from the first page from the first firmware block defined in a predetermined reading order (step S51). Next, the system management unit 134 determines whether the top page has been read normally (step S52). Here, as a case where data cannot be read normally, there is a case where a failure occurs during the above-described update processing and the first page itself can be read, but it is erased data.

正常に読み出せた場合(ステップS52でYesの場合)には、つぎのページを読み出し(ステップS53)、同様に正常に読み出せたかを判定する(ステップS54)。正常に読み出せた場合(ステップS54でYesの場合)には、読み出したページは完了ログであるかを判定する(ステップS55)。完了ログでない場合(ステップS55でNoの場合)には、ステップS53へと戻り、ファームウェアを構成するページの読み出しを続ける。そして、ファームウェアを構成するページを全て読み出し、完了ログを読み出した場合(ステップS55でYesの場合)には、読み出したファームウェアを実行する(ステップS56)。   If it can be read normally (Yes in step S52), the next page is read (step S53), and it is determined whether it has been read normally (step S54). If it can be read normally (Yes in step S54), it is determined whether the read page is a completion log (step S55). If it is not a completion log (No in step S55), the process returns to step S53, and reading of pages constituting the firmware is continued. When all the pages constituting the firmware are read and the completion log is read (Yes in step S55), the read firmware is executed (step S56).

その後、システム管理部134は、読み出しを行った最初のファームウェアブロックの所定のページ(たとえば最終ページ)に開始ログがあるかを判定する(ステップS57)。最終ページに開始ログがない場合(ステップS57でNoの場合)、ファームウェアの読み出し処理が終了する。この場合には、読み出し順序が最初のファームウェアブロックからファームウェアを読み出すことができたことを意味している。また、読み出し順序が最初、すなわち更新順序が最後のファームウェアブロックの開始ログがなく、完了ログがあるということは、ファームウェア保存領域中の全てのファームウェアブロックで正常にファームウェアの更新処理が終了していることを意味しているので、リカバリ処理を行わなくてよい。   Thereafter, the system management unit 134 determines whether there is a start log on a predetermined page (for example, the last page) of the first firmware block that has been read (step S57). If there is no start log on the last page (No in step S57), the firmware reading process ends. In this case, it means that the firmware can be read from the first firmware block in the reading order. In addition, the fact that there is no start log of the firmware block with the first read order, that is, the last update order, and there is a completion log means that the firmware update process has been normally completed for all firmware blocks in the firmware storage area. This means that there is no need to perform recovery processing.

一方、ステップS57で開始ログがある場合(ステップS57でYesの場合)には、読み出し順序でつぎのファームウェアブロックに開始ログがあるかを判定する(ステップS58)。つぎのファームウェアブロックに開始ログがない場合(ステップS58でNoの場合)には、そのファームウェアブロックに完了ログがあるかを判定する(ステップS59)。   On the other hand, if there is a start log in step S57 (Yes in step S57), it is determined whether there is a start log in the next firmware block in the reading order (step S58). If there is no start log in the next firmware block (No in step S58), it is determined whether the firmware block has a completion log (step S59).

完了ログがある場合(ステップS59でYesの場合)には、読み出し順序でこのブロックの2つ前のファームウェアブロックの更新処理が終了し、読み出し順序で1つ前のファームウェアブロックの更新処理を開始する前の段階でメモリシステム10の電源断などの障害が発生したような場合であり、図6(a)に示されるような場合である。図6(a)の場合には、ファームウェアブロック111−3には、電源断が発生する直前に更新処理が終了しているので新たなファームウェア51−2と完了ログ52−2が格納されているが、更新順序がつぎのファームウェアブロック111−2には、更新処理を開始する前に電源断が発生しているので更新前のファームウェア51−1と完了ログ52−1と開始ログ53とが格納されている。そのため、ファームウェアブロック111−2から更新順で最後のファームウェアブロック111−1までがリカバリ対象となる。つまり、読み出し順序で前のファームウェアブロック111−1−2までを新たなファームウェア51−2でリカバリ処理する。そして、システム管理部134はファームウェアブロック111−3,111−4の新たなファームウェア51−2を、開始ログ53が格納されているファームウェアブロック111−1,111−2に更新順序に従って書き直す処理を行い(ステップS60)、ファームウェアの読み込み処理が終了する。   If there is a completion log (Yes in step S59), the update process of the firmware block two blocks before this block ends in the read order, and the update process of the previous firmware block starts in the read order. This is a case where a failure such as a power failure of the memory system 10 has occurred in the previous stage, as shown in FIG. In the case of FIG. 6A, the firmware block 111-3 stores the new firmware 51-2 and the completion log 52-2 because the update process is completed immediately before the power interruption occurs. However, in the firmware block 111-2 in the next update order, the power is cut off before the update process is started, so the firmware 51-1, the completion log 52-1, and the start log 53 before the update are stored. Has been. Therefore, the firmware block 111-2 to the last firmware block 111-1 in the update order are targeted for recovery. That is, recovery processing is performed with the new firmware 51-2 up to the previous firmware block 111-1-2 in the reading order. Then, the system management unit 134 performs processing to rewrite the new firmware 51-2 of the firmware blocks 111-3 and 111-4 to the firmware blocks 111-1 and 111-2 in which the start log 53 is stored according to the update order. (Step S60), the firmware reading process ends.

また、完了ログがない場合(ステップS59でNoの場合)には、そのファームウェアブロックが読み出し順序が最後のファームウェアブロックであるかを判定する(ステップS61)。最後のファームウェアブロックでない場合(ステップS61でNoの場合)には、更新順序で最初ではないファームウェアブロックの更新処理中にメモリシステム10の電源断が発生したような場合である。たとえば図7(a)の場合には、ファームウェアブロック111−3の2ページに新たなファームウェア51−2を書き込み中に障害が発生しているため、このファームウェアブロック111−3には、完了ログ52−1,52−2と開始ログ53のいずれも格納されていない。一方、更新順序がその前のファームウェアブロック111−4には、新たなファームウェア51−2と完了ログ52−2とが格納され、更新順序がつぎ以降のファームウェアブロック111−2,111−1には、更新前のファームウェア51−1と完了ログ52−1と開始ログ53が格納されている。そのため、そのファームウェアブロック111−3まで、すなわち更新順序でファームウェアブロック111−3〜111−1までが更新対象となる。この場合には、ファームウェアブロック111−4の新たなファームウェア51−2を、更新処理の途中で失敗したファームウェアブロック111−3と、開始ログ53が格納されているファームウェアブロック111−1,111−2に更新順序に従って書き直す処理を行い(ステップS60)、ファームウェアの読み込み処理が終了する。   If there is no completion log (No in step S59), it is determined whether the firmware block is the last firmware block in the reading order (step S61). If the firmware block is not the last firmware block (No in step S61), the memory system 10 is turned off during the update process of the firmware block that is not the first in the update order. For example, in the case of FIG. 7A, since a failure has occurred while writing new firmware 51-2 to page 2 of firmware block 111-3, this firmware block 111-3 includes a completion log 52. Neither -1, 52-2 nor the start log 53 is stored. On the other hand, a new firmware 51-2 and a completion log 52-2 are stored in the firmware block 111-4 with the previous update order, and the firmware blocks 111-2 and 111-1 with the next update order are stored in the firmware block 111-2. The firmware 51-1 before update, the completion log 52-1, and the start log 53 are stored. Therefore, the firmware block 111-3, that is, the firmware blocks 111-3 to 111-1 in the update order is the update target. In this case, the new firmware 51-2 of the firmware block 111-4 is replaced with the firmware block 111-3 that has failed during the update process, and the firmware blocks 111-1 and 111-2 in which the start log 53 is stored. Is rewritten in accordance with the update order (step S60), and the firmware reading process ends.

また、ステップS61で最後のファームウェアブロックである場合(ステップS61でYesの場合)には、更新順序で最初のファームウェアブロックの更新処理中にメモリシステムの電源断が発生したような場合である。たとえば図6(b)の場合には、ファームウェアブロック111−4の2ページに新たなファームウェア51−2を書き込み中に障害が発生しているため、このファームウェアブロック111−4には、完了ログ52−1,52−2と開始ログ53のいずれも格納されていない。一方、更新順序がつぎ以降のファームウェアブロック111−1〜111−3には、更新前のファームウェア51−1と完了ログ52−1と開始ログ53が格納されている。つまり、どのファームウェアブロック111−1〜111−4にも新たなファームウェア51−2が格納されていないことになる。そのため、すべてのファームウェアブロック111−4が更新対象となる。この場合には、更新処理の途中で失敗したファームウェアブロック111−4以外のファームウェアブロック111−1〜111−3の更新前のファームウェア51−1を、ファームウェアブロック111−4に書き直すリカバリ処理を行い(ステップS65)、ファームウェアの読み込み処理が終了する。   Further, if it is the last firmware block in step S61 (in the case of Yes in step S61), the memory system is powered off during the update process of the first firmware block in the update order. For example, in the case of FIG. 6B, since a failure has occurred while writing new firmware 51-2 to page 2 of firmware block 111-4, this firmware block 111-4 includes a completion log 52. Neither -1, 52-2 nor the start log 53 is stored. On the other hand, the firmware blocks 111-1 to 111-3 whose update order is the next and later store firmware 51-1, completion log 52-1, and start log 53 before update. That is, no new firmware 51-2 is stored in any of the firmware blocks 111-1 to 111-4. Therefore, all firmware blocks 111-4 are to be updated. In this case, a recovery process is performed to rewrite the firmware 51-1 before updating the firmware blocks 111-1 to 111-3 other than the firmware block 111-4 that failed during the update process into the firmware block 111-4 ( Step S65), the firmware reading process ends.

一方、ステップS58でつぎのファームウェアブロックに開始ログがある場合(ステップS58でYesの場合)には、そのファームウェアブロックが読み出し順序で最後のブロックであるかを判定する(ステップS64)。最後のブロックではない場合(ステップS64でNoの場合)にはステップS58へと処理が戻る。   On the other hand, if the next firmware block has a start log in step S58 (Yes in step S58), it is determined whether the firmware block is the last block in the reading order (step S64). If it is not the last block (No in step S64), the process returns to step S58.

また、最後のブロックである場合(ステップS64でYesの場合)には、たとえば図4(a)のように、開始ログ53を書き込んだ後で、更新順序で最初のファームウェアブロック111−4に新たなファームウェア51−2を書き込む前にメモリシステム10の電源断が発生したような場合である。この場合には、全てのファームウェアブロック111−1〜111−4のいずれも更新されておらず、更新前のファームウェア51−1が正常に残されている状態である。そのため、全てのファームウェアブロック111−1〜111−4に新たなファームウェア51−2を書き込むリカバリ処理が行われ(ステップS65)、ファームウェアの読み込み処理が終了する。   If it is the last block (Yes in step S64), for example, as shown in FIG. 4A, after the start log 53 is written, a new firmware block 111-4 is newly added in the update order. This is a case where the power supply of the memory system 10 has occurred before the new firmware 51-2 is written. In this case, none of the firmware blocks 111-1 to 111-4 has been updated, and the firmware 51-1 before update is normally left. Therefore, a recovery process for writing new firmware 51-2 to all firmware blocks 111-1 to 111-4 is performed (step S65), and the firmware reading process ends.

一方、ステップS52またはステップS54で読み出し順序が最初のファームウェアブロックからファームウェアを読み出せなかった場合(ステップS52またはS54でNoの場合)には、読み出し順序でつぎのファームウェアブロックのステップS52またはステップS54で読み出せなかったページ以降を読み出す処理を行う(ステップS66)。これは図7(b)に示されるように、最初のファームウェアブロックで読み出しができない場合には、最初のファームウェアブロックに新たなファームウェアを書き込み中にメモリシステム10の電源断やNANDフラッシュメモリのページ書き込み失敗などの障害が発生したことを意味している。すなわち、読み出し順でつぎのファームウェアブロック以降には、新たなファームウェアが既に格納されており、かつ読み出し失敗となるページが存在しないことを意味していることになる。そのため、上記のように読み出し順で最初のファームウェアブロックから読み出せなかったページがある場合には、つぎのファームウェアブロックの読み出せなかったページから読み込み処理を行っても、同じ新たなファームウェアであるので問題は生じない。また、このように読み出し順で最初のファームウェアブロックで読み出せなかった場合に、つぎのファームウェアブロックの同じページからファームウェアを読み出せるようにするために、第1の実施形態では、図3でのファームウェアブロックの更新順序と、図8でのファームウェアブロックの読み出し順序とを逆にしている。   On the other hand, if the firmware could not be read from the first firmware block in the read order in step S52 or step S54 (No in step S52 or S54), in step S52 or step S54 of the next firmware block in the read order. A process of reading pages after the page that could not be read is performed (step S66). As shown in FIG. 7B, when the first firmware block cannot be read, when the new firmware is being written to the first firmware block, the memory system 10 is turned off or the NAND flash memory is written to the page. It means that a failure or other failure has occurred. That is, this means that after the next firmware block in the reading order, new firmware has already been stored and there is no page that has failed to be read. Therefore, if there is a page that could not be read from the first firmware block in the reading order as described above, even if the reading process is performed from the page that could not be read from the next firmware block, it is the same new firmware. There is no problem. In addition, in the first embodiment, in order to be able to read the firmware from the same page of the next firmware block when it cannot be read by the first firmware block in the reading order, the firmware in FIG. 3 is used in the first embodiment. The block update order and the firmware block read order in FIG. 8 are reversed.

たとえば、図7(b)の場合には、読み出し順序で最初のファームウェアブロック111−1の2ページまでは新たなファームウェア51−2が書き込まれている。この場合には、システム管理部134は、読み出し順序で最初のファームウェアブロック111−1の2ページまでを読み込み、その後読み出し順序でつぎのファームウェアブロック111−2の3ページ以降を読み込み、新たなファームウェア51−2を実行可能としている。また、この場合には、ファームウェアブロック111−1が更新対象となる。   For example, in the case of FIG. 7B, new firmware 51-2 is written up to two pages of the first firmware block 111-1 in the reading order. In this case, the system management unit 134 reads up to the second page of the first firmware block 111-1 in the reading order, and then reads the third and subsequent pages of the next firmware block 111-2 in the reading order, and the new firmware 51 -2 is executable. In this case, the firmware block 111-1 is an update target.

ついで、読み出したファームウェアを実行した後(ステップS67)、システム管理部134は、読み出し順序で最初のファームウェアブロックに、他のファームウェアブロックの新たなファームウェアを書き込むリカバリ処理を行い(ステップS68)、ファームウェア51の読み込み処理が終了する。   Next, after executing the read firmware (step S67), the system management unit 134 performs a recovery process of writing new firmware of another firmware block to the first firmware block in the read order (step S68). The reading process ends.

なお、上述した説明では、ファームウェア51を書き込んだつぎのページに完了ログ52を書き込む場合を例に挙げたが、完了ログ52として、ファームウェア51を正常に書き込むことができたことを示すものであれば、他の形態であってもよい。たとえば、特定のビットにファームウェア51の更新完了の有無を示す役割を持たせ、このビットのシグネチャを確認することで、ファームウェア51の更新完了の有無を判断することができる。また、ファームウェア51の先頭にファームウェア51のサイズ情報を設けておき、各ファームウェアブロック111−1〜111−4に格納されているファームウェアがサイズ情報と同じサイズを持っているか否かを完了ログの代わりとしてもよい。   In the above description, the case where the completion log 52 is written to the next page where the firmware 51 has been written has been described as an example. However, the completion log 52 may indicate that the firmware 51 has been successfully written. For example, other forms may be used. For example, it is possible to determine whether or not the firmware 51 has been updated by giving a specific bit a role indicating whether or not the firmware 51 has been updated and checking the signature of this bit. In addition, the size information of the firmware 51 is provided at the head of the firmware 51, and whether or not the firmware stored in each of the firmware blocks 111-1 to 111-4 has the same size as the size information is used instead of the completion log. It is good.

以上説明してきたように、第1の実施形態では、多重化されたファームウェアブロック111−1〜111−4の各ブロックにファームウェア51と、そのファームウェアの更新が完了したことを示す完了ログ52と、つぎのファームウェアへの更新前に記録する開始ログ53と、を記録するようにしたので、ファームウェア51の更新状態を示すログ用に別途専用のブロックを設ける必要が無くなる。その結果、NANDメモリ11の疲弊を遅らせることが可能となる。また、ファームウェアブロック111−1〜111−4の内容の更新の際には、ブロック管理部133が準備するブロックに開始ログ53や完了ログ52を記録することなく、システム管理部134が行うファームウェア51の更新処理時に障害が発生しても、再起動時にシステム管理部134で対応することができ、システム内部処理でシステム管理部134とブロック管理部133の順序依存関係を排除し、処理の簡素化およびバグの軽減を図ることができる。   As described above, in the first embodiment, the firmware 51 is stored in each of the multiplexed firmware blocks 111-1 to 111-4, and the completion log 52 indicating that the update of the firmware has been completed. Since the start log 53 to be recorded before the next update to the firmware is recorded, it is not necessary to provide a separate dedicated block for the log indicating the update state of the firmware 51. As a result, exhaustion of the NAND memory 11 can be delayed. Further, when updating the contents of the firmware blocks 111-1 to 111-4, the firmware 51 performed by the system management unit 134 without recording the start log 53 and the completion log 52 in the block prepared by the block management unit 133. Even if a failure occurs during the update process, the system management unit 134 can cope with the restart, and the internal dependency of the system management unit 134 and the block management unit 133 is eliminated in the system internal processing, thereby simplifying the process. And mitigation of bugs.

ここで、ファームウェア51を更新する際にファームウェアブロック111−1〜111−4の更新順序を、メモリシステム10の起動時のファームウェア51を読み出すファームウェアブロック111−1〜111−4の読み込み順序と同じになるようにした場合を考える。読み出し順序(更新順序)で最初のファームウェアブロック111−1への新たなファームウェア51の書き込み中に障害が発生した場合には、メモリシステム10が再起動される。そのとき、システム管理部134は、書き込みができたページまでしか読み込むことができない。これは、第1の実施形態のように、読み込み順序で最初のファームウェアブロック111−1に格納されているファームウェア51とつぎのファームウェアブロック111−2のファームウェア51のバージョンの整合性が担保されないために、読み出しができなかったページをつぎのファームウェアブロックから読み出すことができないからである。その結果、新たなファームウェア51の一部のみを読み込んだ状態で動作してしまう危険性がある。   Here, when the firmware 51 is updated, the update order of the firmware blocks 111-1 to 111-4 is the same as the read order of the firmware blocks 111-1 to 111-4 that read the firmware 51 when the memory system 10 is activated. Consider the case where If a failure occurs during the writing of new firmware 51 to the first firmware block 111-1 in the read order (update order), the memory system 10 is restarted. At that time, the system management unit 134 can read only pages that have been written. This is because, as in the first embodiment, the consistency between the versions of the firmware 51 stored in the first firmware block 111-1 in the reading order and the firmware 51 of the next firmware block 111-2 is not ensured. This is because a page that could not be read cannot be read from the next firmware block. As a result, there is a risk of operating while only a part of the new firmware 51 is read.

これに対して、第1の実施形態では、ファームウェア51を更新する際にファームウェアブロック111−1〜111−4の更新順序を、メモリシステム10の起動時のファームウェア51を読み出すファームウェアブロック111−1〜111−4の読み出し順序とは逆順となるようにした。これによって、たとえば更新順序で最後のファームウェアブロック111−1への新たなファームウェア51の書き込み中に障害が発生した場合でも、それより前のファームウェアブロック111−2〜111−4には正常に新たなファームウェア51が書きこまれていることになる。その結果、次回メモリシステム10が起動される際には、読み出し順序で最初のファームウェアブロック111−1を先頭ページから読み出し、読み出しができないページから最終ページまでは読み出し順序でつぎのファームウェアブロック111−2から読み出して、システム管理部134でファームウェア51を完全に読み出して処理を行うことが可能になる。   On the other hand, in the first embodiment, when the firmware 51 is updated, the update order of the firmware blocks 111-1 to 111-4 is changed, and the firmware block 111-1 to 111 for reading the firmware 51 when the memory system 10 is activated is read. The reading order of 111-4 was reversed. As a result, for example, even if a failure occurs during the writing of the new firmware 51 to the last firmware block 111-1 in the update order, the firmware blocks 111-2 to 111-4 before that are normally new. The firmware 51 is written. As a result, when the memory system 10 is started next time, the first firmware block 111-1 is read from the first page in the reading order, and the next firmware block 111-2 in the reading order from the page that cannot be read to the last page. And the system management unit 134 can completely read the firmware 51 and perform processing.

(第2の実施形態)
第1の実施形態では、ファームウェアブロックの更新処理中にシステム電源断やページ書き込み失敗などの障害が発生した後のファームウェアブロックのリカバリ処理について述べた。第2の実施形態では、ファームウェアブロックを構成するメモリセルの劣化によって、ファームウェアブロックの読み出しエラーが発生した場合の処理について説明する。
(Second Embodiment)
In the first embodiment, the recovery process of the firmware block after a failure such as a system power interruption or a page write failure during the firmware block update process has been described. In the second embodiment, a process when a firmware block read error occurs due to deterioration of a memory cell constituting the firmware block will be described.

図9は、第2の実施形態によるファームウェアの読み出しエラー発生時の処理の手順の一例を示すフローチャートである。なお、ここでは、ファームウェア格納領域のファームウェアブロックは、全て同じ世代(バージョン)のファームウェアを有していることを前提とする。   FIG. 9 is a flowchart illustrating an example of a processing procedure when a firmware read error occurs according to the second embodiment. Here, it is assumed that all firmware blocks in the firmware storage area have the same generation (version) of firmware.

まず、システム管理部134は、ファームウェアブロックのいずれかからファームウェアを読み込む(ステップS91)。これは、たとえば図8のステップS51,S53,S66での処理である。そして、読み出しエラーであるかを判定する(ステップS92)。ここで、読み出しエラーは、ブロックを構成するメモリセルの劣化によって記録しているデータが破壊される場合に返される信号である。読み出しエラーでない場合(ステップS92でNoの場合)には、正常に読み込めたことになるので、そのまま処理が終了する。   First, the system management unit 134 reads firmware from one of the firmware blocks (step S91). This is, for example, the processing in steps S51, S53, and S66 of FIG. Then, it is determined whether it is a read error (step S92). Here, the read error is a signal returned when the recorded data is destroyed due to deterioration of the memory cells constituting the block. If it is not a read error (No in step S92), it means that the data has been read normally, and the process ends as it is.

一方、読み出しエラーが発生した場合(ステップS92でYesの場合)には、そのファームウェアブロックについて読み出しエラーが通算して所定の回数発生したかを判定する(ステップS93)。読み出しエラーの発生が所定の回数未満の場合(ステップS93でNoの場合)には、そのファームウェアブロックについてリカバリ処理を行う(ステップS94)。   On the other hand, if a read error has occurred (Yes in step S92), it is determined whether or not a predetermined number of read errors have occurred for the firmware block (step S93). When the occurrence of the read error is less than the predetermined number of times (No in step S93), the recovery process is performed for the firmware block (step S94).

このリカバリ処理では、NANDメモリ11(メモリセル)が原因で読み出しエラーが発生した場合には、他のファームウェアブロックから取得したファームウェアで、そのブロックに書き直して復旧することを目指す。これは、高い確率でメモリセルが劣化していると判断できるまで所定の回数行われる。以上によって、ファームウェアの読み出しエラー発生時の処理が終了する。   In this recovery process, when a read error occurs due to the NAND memory 11 (memory cell), it is aimed to recover by rewriting the block with firmware obtained from another firmware block. This is performed a predetermined number of times until it can be determined that the memory cell has deteriorated with high probability. This completes the processing when a firmware read error occurs.

また、ステップS93で所定の回数の読み出しエラーが発生した場合(ステップS93でYesの場合)には、そのファームウェアブロックをバッドブロックとして登録するバッドブロック処理を行う(ステップS95)。   If a predetermined number of read errors have occurred in step S93 (Yes in step S93), bad block processing for registering the firmware block as a bad block is performed (step S95).

このバッドブロック処理では、リカバリ処理をしても所定の回数の読み出しエラーが発生したファームウェアブロックは、そのファームウェアブロックを構成するNANDメモリ11に問題があるものとして、以後の処理で使用しないようにするものである。そこで、システム管理部134は、所定の回数の読み出しエラーが発生したファームウェアブロックをバッドブロックとして登録する。これによって、システム管理部134は、次回以降このブロックにアクセスしないようにすることができる。また、この処理によってファームウェアの多重度は1減ることになる。以上によって、ファームウェアの読み出しエラー発生時の処理が終了する。   In this bad block process, a firmware block in which a read error has occurred a predetermined number of times even after the recovery process is assumed not to be used in subsequent processes, assuming that there is a problem with the NAND memory 11 constituting the firmware block. Is. Therefore, the system management unit 134 registers the firmware block in which the read error has occurred a predetermined number of times as a bad block. As a result, the system management unit 134 can prevent access to this block from the next time. In addition, this process reduces the multiplicity of firmware by one. This completes the processing when a firmware read error occurs.

図10は、バッドブロック処理後のファームウェアブロックの状態の一例を示す図である。バッドブロック処理前では、ファームウェアブロック111−1→ファームウェアブロック111−2→ファームウェアブロック111−3→ファームウェアブロック111−4の順にファームウェア51の読み込み順が設定されている。   FIG. 10 is a diagram illustrating an example of the state of the firmware block after the bad block processing. Before the bad block processing, the firmware 51 reading order is set in the order of firmware block 111-1 → firmware block 111-2 → firmware block 111-3 → firmware block 111-4.

その後、最初のファームウェアブロック111−1に読み出しエラーが所定の回数発生して、ファームウェアブロック111−1がバッドブロック化される。これによって、ファームウェアブロック111−1がバッドブロック化された後のファームウェア51の読み出し処理では、ファームウェアブロック111−1ははじめからアクセスされず、ファームウェアブロック111−2→ファームウェアブロック111−3→ファームウェアブロック111−4の順にファームウェア51の読み込み順が設定されることになる。   Thereafter, a read error occurs in the first firmware block 111-1 a predetermined number of times, and the firmware block 111-1 is converted into a bad block. As a result, in the process of reading the firmware 51 after the firmware block 111-1 is converted into a bad block, the firmware block 111-1 is not accessed from the beginning, and the firmware block 111-2 → firmware block 111-3 → firmware block 111. The reading order of the firmware 51 is set in the order of -4.

第2の実施形態では、所定の回数の読み出しエラーを起こしたファームウェアブロックをバッドブロックとした。これによって、読み出しエラーが頻発するファームウェアブロックからファームウェアを読み出す場合に比して、ファームウェアの読み込み処理を安定化させ、高速化することができるという効果を有する。   In the second embodiment, a firmware block that has caused a predetermined number of read errors is a bad block. As a result, compared with the case where firmware is read from a firmware block in which read errors frequently occur, the firmware read process can be stabilized and speeded up.

(第3の実施形態)
図11は、SSDを搭載したパーソナルコンピュータの一例を示す斜視図である。パーソナルコンピュータ1200は、本体1201、および表示ユニット1202を備えている。表示ユニット1202は、ディスプレイハウジング1203と、このディスプレイハウジング1203に収容された表示装置1204と、を備えている。
(Third embodiment)
FIG. 11 is a perspective view showing an example of a personal computer equipped with an SSD. The personal computer 1200 includes a main body 1201 and a display unit 1202. The display unit 1202 includes a display housing 1203 and a display device 1204 accommodated in the display housing 1203.

本体1201は、筐体1205と、キーボード1206と、ポインティングデバイスであるタッチパッド1207とを備えている。筐体1205内部には、メイン回路基板、ODD(optical disk device)ユニット、カードスロット、およびSSD10A等が収容されている。このSSDは、第1および第2の実施形態で説明したメモリシステムに相当している。   The main body 1201 includes a housing 1205, a keyboard 1206, and a touch pad 1207 that is a pointing device. A housing 1205 accommodates a main circuit board, an ODD (optical disk device) unit, a card slot, an SSD 10A, and the like. This SSD corresponds to the memory system described in the first and second embodiments.

カードスロットは、筐体1205の周壁に隣接して設けられている。周壁には、カードスロットに対向する開口部1208が設けられている。ユーザは、この開口部1208を通じて筐体1205の外部から追加デバイスをカードスロットに挿抜することが可能である。   The card slot is provided adjacent to the peripheral wall of the housing 1205. An opening 1208 facing the card slot is provided on the peripheral wall. The user can insert / remove an additional device into / from the card slot from the outside of the housing 1205 through the opening 1208.

SSD10Aは、従来のHDDの置き換えとして、パーソナルコンピュータ1200内部に実装された状態として使用してもよいし、パーソナルコンピュータ1200が備えるカードスロットに挿入した状態で、追加デバイスとして使用してもよい。   The SSD 10A may be used as a state of being mounted inside the personal computer 1200 as a replacement for a conventional HDD, or may be used as an additional device while being inserted into a card slot included in the personal computer 1200.

図12は、SSDを搭載したパーソナルコンピュータのシステム構成例を示すブロック図である。パーソナルコンピュータ1200は、CPU1301、ノースブリッジ1302、主メモリ1303、ビデオコントローラ1304、オーディオコントローラ1305、サウスブリッジ1309、BIOS−ROM1310、SSD10A、ODDユニット1311、エンベデッドコントローラ/キーボードコントローラIC(EC/KBC)1312、およびネットワークコントローラ1313等を備えている。   FIG. 12 is a block diagram illustrating a system configuration example of a personal computer equipped with an SSD. The personal computer 1200 includes a CPU 1301, a north bridge 1302, a main memory 1303, a video controller 1304, an audio controller 1305, a south bridge 1309, a BIOS-ROM 1310, an SSD 10A, an ODD unit 1311, an embedded controller / keyboard controller IC (EC / KBC) 1312, And a network controller 1313 and the like.

CPU1301は、パーソナルコンピュータ1200の動作を制御するために設けられたプロセッサであり、SSD10Aから主メモリ1303にロードされるオペレーティングシステム(OS)を実行する。さらに、ODDユニット1311が、装填された光ディスクに対して読み出し処理および書き込み処理の少なくとも1つの処理の実行を可能にした場合に、CPU1301は、それらの処理の実行をする。   The CPU 1301 is a processor provided to control the operation of the personal computer 1200, and executes an operating system (OS) loaded from the SSD 10A to the main memory 1303. Further, when the ODD unit 1311 enables execution of at least one of read processing and write processing on the loaded optical disc, the CPU 1301 executes those processing.

また、CPU1301は、BIOS−ROM1310に格納されたシステムBIOS(Basic Input Output System)も実行する。なお、システムBIOSは、パーソナルコンピュータ1200内のハードウェア制御のためのプログラムである。   The CPU 1301 also executes a system BIOS (Basic Input Output System) stored in the BIOS-ROM 1310. The system BIOS is a program for hardware control in the personal computer 1200.

ノースブリッジ1302は、CPU1301のローカルバスとサウスブリッジ1309との間を接続するブリッジデバイスである。ノースブリッジ1302には、主メモリ1303をアクセス制御するメモリコントローラも内蔵されている。   The north bridge 1302 is a bridge device that connects the local bus of the CPU 1301 and the south bridge 1309. The north bridge 1302 also includes a memory controller that controls access to the main memory 1303.

また、ノースブリッジ1302は、AGP(Accelerated Graphics Port)バス等を介してビデオコントローラ1304との通信、およびオーディオコントローラ1305との通信を実行する機能も有している。   The north bridge 1302 also has a function of executing communication with the video controller 1304 and communication with the audio controller 1305 via an AGP (Accelerated Graphics Port) bus or the like.

主メモリ1303は、プログラムやデータを一時的に記憶し、CPU1301のワークエリアとして機能する。主メモリ1303は、たとえばDRAMから構成される。   The main memory 1303 temporarily stores programs and data and functions as a work area for the CPU 1301. The main memory 1303 is composed of, for example, a DRAM.

ビデオコントローラ1304は、パーソナルコンピュータ1200のディスプレイモニタとして使用される表示ユニット1202を制御するビデオ再生コントローラである。   A video controller 1304 is a video playback controller that controls a display unit 1202 used as a display monitor of the personal computer 1200.

オーディオコントローラ1305は、パーソナルコンピュータ1200のスピーカ1306を制御するオーディオ再生コントローラである。   The audio controller 1305 is an audio playback controller that controls the speaker 1306 of the personal computer 1200.

サウスブリッジ1309は、LPC(Low Pin Count)バス1314上の各デバイス、およびPCI(Peripheral Component Interconnect)バス1315上の各デバイスを制御する。また、サウスブリッジ1309は、各種ソフトウェアおよびデータを格納する記憶装置であるSSD10Aを、ATAインタフェースを介して制御する。   The south bridge 1309 controls each device on an LPC (Low Pin Count) bus 1314 and each device on a PCI (Peripheral Component Interconnect) bus 1315. The south bridge 1309 controls the SSD 10A, which is a storage device for storing various software and data, via the ATA interface.

パーソナルコンピュータ1200は、セクタ単位でSSD10Aへのアクセスを行う。ATAインタフェース(I/F)を介して、書き込みコマンド、読み出しコマンド、フラッシュコマンド等がSSD10Aに入力される。   The personal computer 1200 accesses the SSD 10A in units of sectors. A write command, a read command, a flash command, and the like are input to the SSD 10A via the ATA interface (I / F).

また、サウスブリッジ1309は、BIOS−ROM1310、およびODDユニット1311をアクセス制御するための機能も有している。   The south bridge 1309 also has a function for controlling access to the BIOS-ROM 1310 and the ODD unit 1311.

EC/KBC1312は、電力管理のためのエンベデッドコントローラと、キーボード(KB)1206およびタッチパッド1207を制御するためのキーボードコントローラとが集積された1チップマイクロコンピュータである。   The EC / KBC 1312 is a one-chip microcomputer in which an embedded controller for power management and a keyboard controller for controlling the keyboard (KB) 1206 and the touch pad 1207 are integrated.

このEC/KBC1312は、ユーザによるパワーボタンの操作に応じてパーソナルコンピュータ1200の電源をON/OFFする機能を有している。ネットワークコントローラ1313は、たとえばインターネット等の外部ネットワークとの通信を実行する通信装置である。   The EC / KBC 1312 has a function of turning on / off the power of the personal computer 1200 according to the operation of the power button by the user. The network controller 1313 is a communication device that executes communication with an external network such as the Internet.

パーソナルコンピュータ1200は、SSD10Aに電源供給を行い、また、SSD10Aに停止要求(Standby要求)を発行する。仮にパーソナルコンピュータ1200からSSD10Aへの電源供給が不正に断たれた場合であっても、書き込みエラーの発生を未然に防ぐことができる。   The personal computer 1200 supplies power to the SSD 10A, and issues a stop request (Standby request) to the SSD 10A. Even if the power supply from the personal computer 1200 to the SSD 10A is illegally cut off, a write error can be prevented from occurring.

本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。   Although several embodiments of the present invention have been described, these embodiments are presented by way of example and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.

1…ホスト、10…メモリシステム、11…NANDメモリ、12…RAM、13…コントローラ、51…ファームウェア、52…完了ログ、53…開始ログ、110…固定領域、111…ファームウェアブロック、131…コマンド処理部、132…データ転送部、133…ブロック管理部、134…システム管理部。   DESCRIPTION OF SYMBOLS 1 ... Host, 10 ... Memory system, 11 ... NAND memory, 12 ... RAM, 13 ... Controller, 51 ... Firmware, 52 ... Completion log, 53 ... Start log, 110 ... Fixed area, 111 ... Firmware block, 131 ... Command processing 132, data transfer unit, 133 ... block management unit, 134 ... system management unit.

Claims (22)

1つの管理単位としての所定のサイズのブロックを複数有し、当該メモリシステムの起動時に読み出される制御プログラムを記憶する前記ブロックである制御プログラムブロックを多重化して有する不揮発性記憶手段と、
起動時に前記不揮発性記憶手段に記憶された前記制御プログラムを読み出し、ホスト装置と前記不揮発性記憶手段との間のデータ転送を行うとともに、前記不揮発性記憶手段でのデータ管理を行う制御手段と、
を備え、
前記制御手段は、前記制御プログラムを更新する場合に、全ての前記制御プログラムブロックの所定の位置に更新開始を示す第1ログを追加記録した後、前記制御プログラムブロックを消去した後に同じ前記制御プログラムブロックに新たな制御プログラムを書き込み、前記新たな制御プログラムの書き込み終了後に書き込み終了を示す第2ログを前記制御プログラムブロックの所定の位置に書き込む更新処理を、第1の順序で前記制御プログラムブロックごとに行うことを特徴とするメモリシステム。
Non-volatile storage means having a plurality of blocks of a predetermined size as one management unit, and having multiplexed control program blocks, which are the blocks for storing the control programs read when the memory system is activated,
A control unit that reads the control program stored in the nonvolatile storage unit at the time of startup, performs data transfer between a host device and the nonvolatile storage unit, and manages data in the nonvolatile storage unit;
With
When updating the control program, the control means additionally records a first log indicating update start at a predetermined position of all the control program blocks, and then deletes the control program block and then the same control program An update process for writing a new control program to the block and writing a second log indicating the end of writing to the predetermined position of the control program block after the writing of the new control program is completed for each control program block in the first order. A memory system characterized by the following.
前記制御手段は、
起動時に前記制御プログラムが読み出せなかった場合に規定された前記第1の順序とは逆順の第2の順序にしたがって、前記制御プログラムブロックから前記制御プログラムを読み出すことを特徴とする請求項1に記載のメモリシステム。
The control means includes
2. The control program is read from the control program block according to a second order that is reverse to the first order defined when the control program cannot be read at startup. The described memory system.
前記ブロックは、前記ブロックよりもサイズの小さな管理単位である複数のページからなり、
前記制御手段は、起動時に前記第2の順序の最初の前記制御プログラムブロックの先頭ページから前記制御プログラムを読み出し、前記制御プログラムが読み出せないページがある場合には、前記第2の順序で規定されたつぎの前記制御プログラムブロックの前記読み出せなかったページから前記制御プログラムの読み出しを行うことを特徴とする請求項2に記載のメモリシステム。
The block is composed of a plurality of pages that are management units smaller in size than the block,
The control means reads the control program from the first page of the first control program block in the second order at the time of activation, and if there is a page that cannot be read by the control program, it is defined in the second order. The memory system according to claim 2, wherein the control program is read from the page that could not be read in the next control program block that has been executed.
前記制御手段は、起動時に前記最初の制御プログラムブロックから前記制御プログラムを読み出すことができ、前記第2の順序がつぎ以降で前記第1ログがなく、前記第2ログが記録されている制御プログラムブロックがある場合には、その制御プログラムブロックの前のブロックから前記最初の制御プログラムブロックまでの前記各制御プログラムブロックを、前記第1ログがない他の前記制御プログラムブロックの制御プログラムで書き直すリカバリ処理を行うことを特徴とする請求項2または3に記載のメモリシステム。   The control means can read the control program from the first control program block at the time of startup, and the control program in which the second log is recorded after the second order is recorded and the second log is recorded. When there is a block, the recovery process of rewriting each control program block from the block before the control program block to the first control program block with the control program of the other control program block without the first log The memory system according to claim 2, wherein: 前記制御手段は、起動時に前記最初の制御プログラムブロックから前記制御プログラムを読み出すことができ、前記第2の順序がつぎ以降で最後のプログラムブロックではない、前記第1ログと前記第2ログがない制御プログラムブロックがある場合には、その制御プログラムブロックから前記最初の制御プログラムブロックまでの前記各制御プログラムブロックを、前記第1ログがない他の制御プログラムブロックの制御プログラムで書き直すリカバリ処理を行うことを特徴とする請求項2または3に記載のメモリシステム。   The control means can read the control program from the first control program block at the time of activation, and the second log is not the last program block after the second order, and there is no first log and second log When there is a control program block, a recovery process is performed in which each control program block from the control program block to the first control program block is rewritten with a control program of another control program block without the first log. The memory system according to claim 2, wherein: 前記制御手段は、起動時に前記最初の制御プログラムブロックから前記制御プログラムを読み出すことができ、前記第2の順序が最後の制御プログラムブロックの前記第1ログと前記第2ログがない場合には、他の前記制御プログラムブロックの制御プログラムで前記最後の制御プログラムブロックを書き直すリカバリ処理を行うことを特徴とする請求項2または3に記載のメモリシステム。   The control means can read the control program from the first control program block at the time of activation, and when the second log does not include the first log and the second log of the last control program block, 4. The memory system according to claim 2, wherein recovery processing is performed to rewrite the last control program block with a control program of another control program block. 前記制御手段は、起動時に前記最初の制御プログラムブロックから前記制御プログラムを読み出すことができ、前記第2の順序が最後の制御プログラムブロックに前記第1ログがある場合には、すべての前記制御プログラムブロックを新たな制御プログラムでリカバリ処理することを特徴とする請求項2または3に記載のメモリシステム。   The control means can read out the control program from the first control program block at the time of startup, and when the second log has the first log in the last control program block, all the control programs 4. The memory system according to claim 2, wherein the block is recovered by a new control program. 前記制御手段は、起動時に前記最初の制御プログラムブロックと前記第2の順序でつぎの前記制御プログラムブロックとから読み出された場合には、前記最初の制御プログラムブロックを、他の前記制御プログラムブロックの制御プログラムで書き直すリカバリ処理を行うことを特徴とする請求項2または3に記載のメモリシステム。   When the control means is read from the first control program block and the next control program block in the second order at the time of activation, the first control program block is transferred to another control program block. The memory system according to claim 2, wherein the recovery process is rewritten by the control program. 前記制御手段は、起動時に前記最初の制御プログラムブロックから前記制御プログラムを読み出すことができ、前記最初の制御プログラムブロックに前記第1ログがなく、前記第2ログが記憶されている場合には、多重化された前記制御プログラムブロック中の前記制御プログラムを書き直すリカバリ処理は不要と判断することを特徴とする請求項2または3に記載のメモリシステム。   The control means can read the control program from the first control program block at the time of startup, and when the first log is not stored in the first control program block and the second log is stored, 4. The memory system according to claim 2, wherein a recovery process for rewriting the control program in the multiplexed control program block is determined to be unnecessary. 前記制御手段は、起動時に前記制御プログラムブロックから前記制御プログラムを読み出し中に読み出しエラーが生じた場合に、前記第2の順序で規定されたつぎの前記制御プログラムブロックから前記制御プログラムを読み出すことを特徴とする請求項2または3に記載のメモリシステム。   The control means reads the control program from the next control program block defined in the second order when a read error occurs while reading the control program from the control program block at the time of activation. The memory system according to claim 2, wherein the memory system is a memory system. 前記制御手段は、前記制御プログラムブロックでの前記読み出しエラーの発生回数が所定値よりも小さい場合には、他の前記制御プログラムブロックの前記制御プログラムで前記読み出しエラーが生じた前記制御プログラムブロックを書き直すリカバリ処理を行うことを特徴とする請求項8に記載のメモリシステム。   The control means rewrites the control program block in which the read error has occurred in the control program of another control program block when the number of occurrences of the read error in the control program block is smaller than a predetermined value. The memory system according to claim 8, wherein recovery processing is performed. 前記制御手段は、前記制御プログラムブロックでの前記読み出しエラーの発生回数が所定値となった場合には、前記読み出しエラーが生じた前記制御プログラムブロックを次回以降の起動時に読み出さないバッドブロック処理を行うことを特徴とする請求項8に記載のメモリシステム。   When the number of occurrences of the read error in the control program block reaches a predetermined value, the control means performs a bad block process that does not read the control program block in which the read error has occurred at the next startup. The memory system according to claim 8. 1つの管理単位としての所定のサイズのブロックを複数有し、当該メモリシステムの起動時に読み出される制御プログラムを記憶した前記ブロックである制御プログラムブロックを多重化して有する不揮発性記憶手段と、
起動時に前記不揮発性記憶手段に記憶された前記制御プログラムを読み出し、ホスト装置と前記不揮発性記憶手段との間のデータ転送を行うとともに、前記不揮発性記憶手段でのデータ管理を行う制御手段と、
を備える制御プログラムの更新方法であって、
前記制御プログラムを更新する場合に、全ての前記制御プログラムブロックの所定の位置に更新開始を示す第1ログを追加記録する第1ログ追加記録工程と、
1つの前記制御プログラムブロックについて、前記制御プログラムブロックを消去した後に同じ前記制御プログラムブロックに新たな制御プログラムを書き込み、前記新たな制御プログラムの書き込み終了後に書き込み終了を示す第2ログを前記制御プログラムブロックの所定の位置に書き込む更新工程と、
を含み、
前記更新工程は、第1の順序で前記制御プログラムブロックごとに行うことを特徴とするメモリシステムの制御プログラム更新方法。
Non-volatile storage means having a plurality of blocks of a predetermined size as one management unit, and having multiplexed control program blocks, which are the blocks storing the control program read when the memory system is activated,
A control unit that reads the control program stored in the nonvolatile storage unit at the time of startup, performs data transfer between a host device and the nonvolatile storage unit, and manages data in the nonvolatile storage unit;
A control program update method comprising:
A first log addition recording step of additionally recording a first log indicating update start at a predetermined position of all the control program blocks when updating the control program;
For one control program block, after erasing the control program block, a new control program is written to the same control program block, and a second log indicating the end of writing is written to the control program block after the writing of the new control program is completed. An update process for writing to a predetermined position of
Including
The method of updating a control program for a memory system, wherein the updating step is performed for each control program block in a first order.
当該メモリシステムが再起動される再起動工程と、
起動時に前記制御プログラムが読み出せなかった場合に前記第1の順序とは逆順の第2の順序にしたがった前記制御プログラムブロックから前記制御プログラムを読み出す読み出し工程と、
前記読み出し工程の後に、読み出しに使用した前記制御プログラムブロックと、前記第1ログおよび前記第2ログと、を用いて前記制御プログラムブロックのリカバリ処理が必要かを判定する判定工程と、
前記判定工程でリカバリ処理が必要と判定された前記制御プログラムブロックをリカバリ処理する第1リカバリ工程と、
をさらに含むことを特徴とする請求項11に記載の制御プログラムの更新方法。
A restart process in which the memory system is restarted;
A step of reading out the control program from the control program block according to a second order that is reverse to the first order when the control program cannot be read at startup;
A determination step for determining whether recovery processing of the control program block is necessary using the control program block used for reading, the first log, and the second log after the reading step;
A first recovery step of performing a recovery process on the control program block determined to require a recovery process in the determination step;
The method for updating a control program according to claim 11, further comprising:
前記判定工程では、起動時に前記第2の順序で最初の制御プログラムブロックから前記制御プログラムを読み出し、前記最初の制御プログラムブロックに前記第1ログがあり、前記第2の順序がつぎ以降で前記第1ログがなく、前記第2ログが記録されている制御プログラムブロックがある場合には、その制御プログラムブロックの前のブロックから前記最初の制御プログラムブロックまでの前記各制御プログラムブロックを、前記第1ログがない制御プログラムブロックの制御プログラムで書き直すリカバリ処理を行うと判定することを特徴とする請求項12に記載の制御プログラムの更新方法。   In the determination step, the control program is read from the first control program block in the second order at the time of activation, the first log is in the first control program block, and the second order is the second and subsequent orders. If there is a control program block in which there is no one log and the second log is recorded, each control program block from the block before the control program block to the first control program block is changed to the first control program block. 13. The control program update method according to claim 12, wherein the recovery process is determined to be rewritten by a control program of a control program block having no log. 前記判定工程では、起動時に前記第2の順序で最初の制御プログラムブロックから前記制御プログラムを読み出すことができ、前記最初の制御プログラムブロックに前記第1ログがあり、前記第2の順序がつぎ以降で最後のプログラムブロックではない、前記第1ログと前記第2ログがない制御プログラムブロックがある場合には、その制御プログラムブロックから前記最初の制御プログラムブロックまでの前記各制御プログラムブロックを、前記第1ログがない制御プログラムブロックの制御プログラムで書き直すリカバリ処理を行うと判定することを特徴とする請求項12に記載の制御プログラムの更新方法。   In the determination step, the control program can be read from the first control program block in the second order at the time of activation, the first control program block has the first log, and the second order is subsequent. If there is a control program block that is not the last program block and does not have the first log and the second log, the control program blocks from the control program block to the first control program block are transferred to the first program block. 13. The control program update method according to claim 12, wherein the recovery process is determined to be rewritten by a control program of a control program block having no one log. 前記判定工程では、起動時に前記第2の順序で最初の制御プログラムブロックから前記制御プログラムを読み出すことができ、前記最初の制御プログラムブロックに前記第1ログがあり、前記第2の順序が最後の制御プログラムブロックの前記第1ログと前記第2ログがない場合には、他の前記制御プログラムブロックの制御プログラムで前記最後の制御プログラムブロックを書き直すリカバリ処理を行うと判定することを特徴とする請求項12に記載の制御プログラムの更新方法。   In the determination step, the control program can be read from the first control program block in the second order at the time of startup, the first control program block has the first log, and the second order is the last When the first log and the second log of the control program block do not exist, it is determined that a recovery process for rewriting the last control program block by a control program of another control program block is performed. Item 13. A control program update method according to Item 12. 前記判定工程では、起動時に前記第2の順序で最初の制御プログラムブロックから前記制御プログラムを読み出すことができ、前記最初の制御プログラムブロックに前記第1ログがあり、前記第2の順序が最後の制御プログラムブロックに前記第1ログがある場合には、すべての前記制御プログラムブロックを新たな制御プログラムでリカバリ処理すると判定することを特徴とする請求項12に記載の制御プログラムの更新方法。   In the determination step, the control program can be read from the first control program block in the second order at the time of startup, the first control program block has the first log, and the second order is the last 13. The control program update method according to claim 12, wherein when there is the first log in a control program block, it is determined that recovery processing is performed on all the control program blocks with a new control program. 前記判定工程では、起動時に前記第2の順序で最初とつぎの制御プログラムブロックから前記制御プログラムが読み出された場合には、前記最初の制御プログラムブロックを、他の前記制御プログラムブロックの制御プログラムで書き直すリカバリ処理を行うと判定することを特徴とする請求項12に記載の制御プログラムの更新方法。   In the determination step, when the control program is read from the first and next control program blocks in the second order at the time of activation, the first control program block is changed to a control program of another control program block. 13. The method for updating a control program according to claim 12, wherein the recovery process is determined to be performed by rewriting. 前記読み出し工程で、前記制御プログラムブロックから前記制御プログラムを読み出し中に読み出しエラーが生じた場合に、前記第2の順序で規定されたつぎの前記制御プログラムブロックから前記制御プログラムを読み出すことを特徴とする請求項12に記載の制御プログラムの更新方法。   In the reading step, when a read error occurs while reading the control program from the control program block, the control program is read from the next control program block defined in the second order. The control program update method according to claim 12. 前記読み出し工程で、前記制御プログラムブロックでの前記読み出しエラーの発生回数が所定値よりも小さい場合には、他の前記制御プログラムブロックの前記制御プログラムで前記読み出しエラーが生じた前記制御プログラムブロックを書き直すリカバリ処理を行う第2リカバリ工程をさらに含むことを特徴とする請求項18に記載の制御プログラムの更新方法。   If the number of occurrences of the read error in the control program block is smaller than a predetermined value in the reading step, the control program block in which the read error has occurred in the control program of another control program block is rewritten. 19. The control program update method according to claim 18, further comprising a second recovery step for performing a recovery process. 前記読み出し工程で、前記制御プログラムブロックでの前記読み出しエラーの発生回数が所定値となった場合には、前記読み出しエラーが生じた前記制御プログラムブロックを次回以降の起動時に読み出さないバッドブロック処理を行うバッドブロック処理工程をさらに含むことを特徴とする請求項18に記載の制御プログラムの更新方法。   If the number of occurrences of the read error in the control program block reaches a predetermined value in the read step, a bad block process is performed in which the control program block in which the read error has occurred is not read at the next startup. The control program update method according to claim 18, further comprising a bad block processing step.
JP2012038020A 2012-02-23 2012-02-23 Memory system and update method for control program Pending JP2013174976A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012038020A JP2013174976A (en) 2012-02-23 2012-02-23 Memory system and update method for control program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012038020A JP2013174976A (en) 2012-02-23 2012-02-23 Memory system and update method for control program

Publications (1)

Publication Number Publication Date
JP2013174976A true JP2013174976A (en) 2013-09-05

Family

ID=49267837

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012038020A Pending JP2013174976A (en) 2012-02-23 2012-02-23 Memory system and update method for control program

Country Status (1)

Country Link
JP (1) JP2013174976A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180130740A (en) * 2017-05-30 2018-12-10 에스케이하이닉스 주식회사 Controller and memory system and operating method of memory system
KR20200020645A (en) * 2018-08-16 2020-02-26 주식회사 페스카로 Method, system and computer program for updating firmware of ecu

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180130740A (en) * 2017-05-30 2018-12-10 에스케이하이닉스 주식회사 Controller and memory system and operating method of memory system
KR102234725B1 (en) 2017-05-30 2021-04-02 에스케이하이닉스 주식회사 Controller and memory system and operating method of memory system
KR20200020645A (en) * 2018-08-16 2020-02-26 주식회사 페스카로 Method, system and computer program for updating firmware of ecu
KR102254146B1 (en) * 2018-08-16 2021-05-21 주식회사 페스카로 Method, system and computer program for updating firmware of ecu

Similar Documents

Publication Publication Date Title
US20210232326A1 (en) Memory system storing management information and method of controlling same
JP5376983B2 (en) Memory system
JP4524309B2 (en) Memory controller for flash memory
JP5317690B2 (en) Memory system
US8230161B2 (en) Data backup method for a flash memory and controller and storage system using the same
US9223642B2 (en) Green NAND device (GND) driver with DRAM data persistence for enhanced flash endurance and performance
CN111752487B (en) Data recovery method and device and solid state disk
US8195891B2 (en) Techniques to perform power fail-safe caching without atomic metadata
TWI524183B (en) Data writing method, memory control circuit unit and memory storage apparatus
US10838629B2 (en) Solid state device with fast boot after ungraceful shutdown
US11036421B2 (en) Apparatus and method for retaining firmware in memory system
US8738867B2 (en) Memory system
US8589619B2 (en) Data writing method, memory controller, and memory storage apparatus
US8370587B2 (en) Memory system storing updated status information and updated address translation information and managing method therefor
TWI489466B (en) Memory erasing method, memory controller and memory storage apparatus
JP2012128643A (en) Memory system
TWI459198B (en) Memory storage device, memory controller thereof, and method for identifying valid data
US20170269873A1 (en) Memory management method, memory control circuit unit and memory storage device
US8527733B2 (en) Memory system
JP2006099802A (en) Storage controller, and control method for cache memory
JP2013174976A (en) Memory system and update method for control program
US9128887B2 (en) Using a buffer to replace failed memory cells in a memory component
US20190384872A1 (en) Development system and productization method for data storage device
JP2013174977A (en) Memory system and update method for pointer information
JP2022040856A (en) Memory control device and memory control method