JP2013174976A - Memory system and update method for control program - Google Patents
Memory system and update method for control program Download PDFInfo
- 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
Links
Images
Landscapes
- Techniques For Improving Reliability Of Storages (AREA)
Abstract
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.
本発明の一つの実施形態は、メモリシステム内部でシステム管理処理とブロック管理処理との間で複雑な処理手順を生じさせずにファームウェアの更新を行うことができるメモリシステムおよび制御プログラムの更新方法を提供することを目的とする。 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.
以下に添付図面を参照して、実施形態にかかるメモリシステムおよび制御プログラムの更新方法を詳細に説明する。なお、これらの実施形態により本発明が限定されるものではない。また、以下では、一般的なメモリシステムにおける問題点を説明した後、その問題点を解決する実施形態について説明する。 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
このメモリシステム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
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
固定領域110は、書き換えや書き込みがほとんど発生しない更新頻度の低い、メモリシステム10を稼働させるのに必要な情報が格納される領域である。固定領域110では、たとえば、ブロック内の情報を更新したい場合には、固定領域110内の他のブロックに情報(ファームウェア51)を書き込むのではなく、現在使用しているブロックの情報を消去した後に同じブロックの先頭ページから情報を書き込むように設定された領域である。また、NANDメモリ11が多値メモリで構成される場合には、記憶されている情報(ファームウェア51)の信頼性を高めるために、2値モードで使用することが望ましい。
The
なお、NANDメモリ11には、固定領域110のほかに図示しない可変領域を有する。可変領域では、現在書き込み中のブロックがすべて満たされた場合には、可変領域中の書き込み可能なフリーブロックとなっている他のブロックにつぎの情報を書き込むように設定される領域である。なお、この可変領域は、NANDメモリ11中の固定領域110を除いた領域であり、管理情報保存領域やデータ格納領域を含むものである。
The NAND memory 11 has a variable area (not shown) in addition to the fixed
ファームウェア51は、上記したようにコントローラ13の制御プログラムであり、メモリシステム10の起動時に最初に実行されるプログラムである。このファームウェア51は、コントローラ13の仕様変更やバグの修正を行う場合に更新される。
The
また、ファームウェア51は、複数のブロックに同一のファームウェア51を保持するように多重化されている。これは、NANDメモリ11の故障やファームウェア51の更新処理の失敗によってファームウェア51の読み出しに失敗した場合に、システムが起動できなくなってしまうことを防ぐためである。多重化によって、1つのファームウェアブロック111−1〜111−4が故障した場合でも他のファームウェアブロック111−1〜111−4からファームウェア51を読み出すことができ、システムの起動を行うことができる。この図2の例では、ファームウェア51を4重化している場合を示しているが、2重化以上していればよい。
The
この第1の実施形態では、ファームウェア51の更新が正常に終了したことを示す完了ログ52が、ファームウェアブロック111−1〜111−4のファームウェア51の最終ページのつぎのページに記録される。つまり、ファームウェア51の更新処理に関する完了ログ52は、可変領域に確保されたログブロックに記録されるのではなく、多重化されたそれぞれのファームウェアブロック111−1〜111−4に格納するようにしている。なお、完了ログ52としては、所定の位置(たとえば上記したようにファームウェア51の最終ページのつぎのページ)に特定のパターンが書き込まれたものとすることができる。
In the first embodiment, a
このような構成の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
RAM12は、ホスト1とNANDメモリ11との間でのデータ転送用キャッシュおよび作業領域用メモリなどの一時記憶用の記憶部として使用される。RAM12の作業領域用メモリに記憶されるものとしては、管理テーブルなどがある。管理テーブルは、NANDメモリ11に記憶されている管理情報が起動時などに展開されたテーブルである。この管理テーブルは、ホスト1から指定された論理アドレスとNANDメモリ11内での物理的なデータの記憶位置とを対応付ける管理情報を管理する情報テーブルであり、最新の情報となるように維持される。ユーザデータの書き込みや、管理テーブルへのデータの読み書きを行う際には、RAM12上に管理テーブルが展開される。
The
なお、RAM12として、DRAM(Dynamic RAM)、SRAM(Static RAM)、FeRAM(Ferroelectric RAM)、MRAM(Magnetoresistive RAM)、PRAM(Phase change RAM)などを用いることができる。
As the
コントローラ13は、ホスト1との間のコマンドインタフェースを行うATAコマンド処理部131と、RAM12を介してNANDメモリ11とホスト1との間のデータインタフェース(データ転送)を行うデータ転送部132と、NANDメモリ11内の各ブロックを管理するブロック管理部133と、ファームウェア51の読み込み処理、更新処理およびリカバリ処理を行うシステム管理部134と、を有する。
The
システム管理部134は、メモリシステム10が起動されると、ファームウェアブロック111−1〜111−4からファームウェア51を読み込み、システムを起動させる。また、ファームウェア51の更新が指示された場合には、ファームウェア51の更新処理を行う。このファームウェア51の更新処理では、更新前に、各ファームウェアブロック111−1〜111−4の最終ページに開始ログを追加記録し、更新完了後にファームウェアブロック111−1〜111−4のファームウェア51の最終ページのつぎのページに完了ログ52を記録する。
When the
システム管理部134は、起動時にファームウェア51の更新処理が正しく行われたか開始ログと完了ログ52とを用いて判定し、更新処理が正しく行われなかった場合に、あるいはファームウェア51の読み出しエラーが発生した場合にリカバリ処理を行う機能を有する。さらに、システム管理部134は、ブロックを構成するメモリセル自体の劣化によってブロックを使用することができない場合に、そのファームウェアブロックのバッドブロック化処理を行う機能を有する。
The system management unit 134 determines whether the update process of the
以上のように、ファームウェアブロック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
ここで、システム管理部134によるファームウェア51の更新処理と読み出し処理について説明する。なお、ここでは、ファームウェア51の読み出し順序として、図2に示されるように、ファームウェアブロック111−1→ファームウェアブロック111−2→ファームウェアブロック111−3→ファームウェアブロック111−4となっているものとする。
Here, an update process and a read process of the
<ファームウェアの更新処理>
図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
その後、選択したファームウェアブロックを消去した後、新しいファームウェアの書き込みを行い(ステップ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
一方、ステップ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
また、ステップ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
<ファームウェアの読み出し処理>
図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
正常に読み出せた場合(ステップ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
また、完了ログがない場合(ステップ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
また、ステップ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
一方、ステップ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
一方、ステップ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
たとえば、図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
以上説明してきたように、第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
ここで、ファームウェア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
これに対して、第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
(第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
その後、最初のファームウェアブロック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
第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
本体1201は、筐体1205と、キーボード1206と、ポインティングデバイスであるタッチパッド1207とを備えている。筐体1205内部には、メイン回路基板、ODD(optical disk device)ユニット、カードスロット、およびSSD10A等が収容されている。このSSDは、第1および第2の実施形態で説明したメモリシステムに相当している。
The
カードスロットは、筐体1205の周壁に隣接して設けられている。周壁には、カードスロットに対向する開口部1208が設けられている。ユーザは、この開口部1208を通じて筐体1205の外部から追加デバイスをカードスロットに挿抜することが可能である。
The card slot is provided adjacent to the peripheral wall of the
SSD10Aは、従来のHDDの置き換えとして、パーソナルコンピュータ1200内部に実装された状態として使用してもよいし、パーソナルコンピュータ1200が備えるカードスロットに挿入した状態で、追加デバイスとして使用してもよい。
The
図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
CPU1301は、パーソナルコンピュータ1200の動作を制御するために設けられたプロセッサであり、SSD10Aから主メモリ1303にロードされるオペレーティングシステム(OS)を実行する。さらに、ODDユニット1311が、装填された光ディスクに対して読み出し処理および書き込み処理の少なくとも1つの処理の実行を可能にした場合に、CPU1301は、それらの処理の実行をする。
The
また、CPU1301は、BIOS−ROM1310に格納されたシステムBIOS(Basic Input Output System)も実行する。なお、システムBIOSは、パーソナルコンピュータ1200内のハードウェア制御のためのプログラムである。
The
ノースブリッジ1302は、CPU1301のローカルバスとサウスブリッジ1309との間を接続するブリッジデバイスである。ノースブリッジ1302には、主メモリ1303をアクセス制御するメモリコントローラも内蔵されている。
The
また、ノースブリッジ1302は、AGP(Accelerated Graphics Port)バス等を介してビデオコントローラ1304との通信、およびオーディオコントローラ1305との通信を実行する機能も有している。
The
主メモリ1303は、プログラムやデータを一時的に記憶し、CPU1301のワークエリアとして機能する。主メモリ1303は、たとえばDRAMから構成される。
The
ビデオコントローラ1304は、パーソナルコンピュータ1200のディスプレイモニタとして使用される表示ユニット1202を制御するビデオ再生コントローラである。
A
オーディオコントローラ1305は、パーソナルコンピュータ1200のスピーカ1306を制御するオーディオ再生コントローラである。
The
サウスブリッジ1309は、LPC(Low Pin Count)バス1314上の各デバイス、およびPCI(Peripheral Component Interconnect)バス1315上の各デバイスを制御する。また、サウスブリッジ1309は、各種ソフトウェアおよびデータを格納する記憶装置であるSSD10Aを、ATAインタフェースを介して制御する。
The
パーソナルコンピュータ1200は、セクタ単位でSSD10Aへのアクセスを行う。ATAインタフェース(I/F)を介して、書き込みコマンド、読み出しコマンド、フラッシュコマンド等がSSD10Aに入力される。
The
また、サウスブリッジ1309は、BIOS−ROM1310、およびODDユニット1311をアクセス制御するための機能も有している。
The
EC/KBC1312は、電力管理のためのエンベデッドコントローラと、キーボード(KB)1206およびタッチパッド1207を制御するためのキーボードコントローラとが集積された1チップマイクロコンピュータである。
The EC /
このEC/KBC1312は、ユーザによるパワーボタンの操作に応じてパーソナルコンピュータ1200の電源をON/OFFする機能を有している。ネットワークコントローラ1313は、たとえばインターネット等の外部ネットワークとの通信を実行する通信装置である。
The EC /
パーソナルコンピュータ1200は、SSD10Aに電源供給を行い、また、SSD10Aに停止要求(Standby要求)を発行する。仮にパーソナルコンピュータ1200からSSD10Aへの電源供給が不正に断たれた場合であっても、書き込みエラーの発生を未然に防ぐことができる。
The
本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、特許請求の範囲に記載された発明とその均等の範囲に含まれる。 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 ...
Claims (22)
起動時に前記不揮発性記憶手段に記憶された前記制御プログラムを読み出し、ホスト装置と前記不揮発性記憶手段との間のデータ転送を行うとともに、前記不揮発性記憶手段でのデータ管理を行う制御手段と、
を備え、
前記制御手段は、前記制御プログラムを更新する場合に、全ての前記制御プログラムブロックの所定の位置に更新開始を示す第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.
起動時に前記不揮発性記憶手段に記憶された前記制御プログラムを読み出し、ホスト装置と前記不揮発性記憶手段との間のデータ転送を行うとともに、前記不揮発性記憶手段でのデータ管理を行う制御手段と、
を備える制御プログラムの更新方法であって、
前記制御プログラムを更新する場合に、全ての前記制御プログラムブロックの所定の位置に更新開始を示す第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:
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)
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 |
-
2012
- 2012-02-23 JP JP2012038020A patent/JP2013174976A/en active Pending
Cited By (4)
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 |