JP2005189907A - Disk device - Google Patents

Disk device Download PDF

Info

Publication number
JP2005189907A
JP2005189907A JP2003426770A JP2003426770A JP2005189907A JP 2005189907 A JP2005189907 A JP 2005189907A JP 2003426770 A JP2003426770 A JP 2003426770A JP 2003426770 A JP2003426770 A JP 2003426770A JP 2005189907 A JP2005189907 A JP 2005189907A
Authority
JP
Japan
Prior art keywords
flash rom
ram
program module
cpu
program
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
JP2003426770A
Other languages
Japanese (ja)
Inventor
Takao Aoki
隆雄 青木
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 JP2003426770A priority Critical patent/JP2005189907A/en
Publication of JP2005189907A publication Critical patent/JP2005189907A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Stored Programmes (AREA)
  • Signal Processing For Digital Recording And Reproducing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a disk device for suppressing the increase of a use RAM region and the frequency of a reading operation from the disk medium of a necessary module, and for executing a command without rotating a spindle motor(SPM) according to the type of a command in response to a request from a host system. <P>SOLUTION: This disk device is provided with a CPU, a CPU bus, a RAM, a flash ROM and a disk medium, and when a program module corresponding to execution contents of a program does not exist in the RAM, and the program module exists in the flash ROM, the program module is read from the flash ROM, and when any program module does not exist, it is read from the disk medium, and developed to the RAM. Then, this disk device is configured by a means which calculates the priority order of the existence of the program module in the flash ROM based on its use frequency to successively replace the program module whose priority order is lower among program modules stored in the flash ROM by the program module whose priority order is higher. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

この発明は、組み込み用ソフトウェアの格納と展開に関し、特にファームウェアの格納及び展開に特徴を有するディスク装置に関する。   The present invention relates to storage and deployment of embedded software, and more particularly to a disk device characterized by storage and deployment of firmware.

従来は、ハードディスク装置などの磁気ディスクにおいては、装置制御のためのファームウェアはフラッシュROMまたは磁気ディスク媒体に格納されるのが一般的である。これらのうち、装置の起動、サーボ制御およびデータの読出し/書き込み用(R/W用)のモジュールなど最低限必要なものはROM上に配置することが必須であるが、それ以外の部分については磁気ディスク上の領域へ配置することが可能であった。   Conventionally, in a magnetic disk such as a hard disk device, firmware for device control is generally stored in a flash ROM or a magnetic disk medium. Of these, it is indispensable to place the minimum required modules such as device startup, servo control and data read / write (R / W) modules on ROM. It was possible to arrange in the area on the magnetic disk.

ここで、磁気ディスクに存在するファームウェアはRAMに読み出されて実行されることになるが、このための領域を節約するために、例えば、ホストからのコマンドを受信時に必要なモジュールを磁気ディスクから共用のRAM領域に読み出すと言うような、RAMの共通化を実施することが容易に想像される。   Here, the firmware existing in the magnetic disk is read out and executed in the RAM. In order to save the area for this, for example, a module required when receiving a command from the host is read from the magnetic disk. It is easily imagined that the RAM is shared, such as reading to the shared RAM area.

例えば、先行技術文献である特開平9−231084には、コンピュータシステムの立上げ時にディスクから読み出され、各処理装置に展開されるファームウェアをフラッシュROMに記録し、次回以降はここを読み出すことで起動を拘束にする手法が知られている。すなわち、先行技術文献では、システムの起動時に限ってディスクからの読み出しを省略するための手段が提供されることが開示されている。   For example, in Japanese Patent Application Laid-Open No. 9-231084, which is a prior art document, firmware that is read from a disk at the time of startup of a computer system and developed in each processing apparatus is recorded in a flash ROM, and this is read from the next time onward. A method for restraining activation is known. That is, the prior art document discloses that means for omitting reading from the disk is provided only when the system is started.

特開平9−231084号公報(概要)Japanese Patent Laid-Open No. 9-231084 (Outline)

しかし、上述した先行技術文献の場合には、(1)必要となるモジュールを磁気ディスクから読み出す動作の頻度が高くなる。(2)磁気ディスク上に格納されているコマンドを、スピンドルモータ(以下、SPMと称する)を回転させることなく実行させることができない。という問題点が存在している。   However, in the case of the above-described prior art documents, (1) the frequency of the operation of reading the required module from the magnetic disk increases. (2) A command stored on the magnetic disk cannot be executed without rotating a spindle motor (hereinafter referred to as SPM). There is a problem.

そこで、本発明は上記の問題を解決するためになされたものであり、RAM領域の増加を抑制しながら、必要モジュールのディスク媒体からの読み出し動作の頻度を抑制し、ホストシステムの要求により、コマンドの種類によってはSPMの回転を伴わずに実行できるようにすることが可能なディスク装置を提供することにある。   Therefore, the present invention has been made to solve the above-described problem, and while suppressing an increase in the RAM area, the frequency of a read operation from a disk medium of a necessary module is suppressed, and a command from the host system is requested. An object of the present invention is to provide a disk device that can be executed without rotation of SPM depending on the type of the disk.

上記した課題を解決するために、この発明に係るディスク装置は、CPUと、前記CPUが接続されるCPUバスと、前記CPUバスに接続され、プログラムモジュールを選択的に格納するための1つまたは複数の領域をもつRAMと、前記CPUに接続され、前記RAM内に展開されるプログラムモジュールを選択的に格納するための1つまたは複数の領域をもつフラッシュROMと、前記RAM内に展開されるすべてのプログラムモジュールを格納するための複数の領域をもつディスク媒体と、プログラムの実行内容に応じた必要なプログラムモジュールが前記RAM内に存在しない場合に、前記プログラムモジュールが前記フラッシュROM内に存在すれば前記フラッシュROMから、前記プログラムモジュールが前記フラッシュROM内に存在しなければ、前記ディスク媒体から読み出して前記RAMに展開する手段と、前記プログラムモジュールの使用頻度により前記フラッシュROM内に保存するための優先順位を求める手段と、前記フラッシュROMに保存された前記プログラムモジュールのうち、優先順位の低いものを優先順位の高いもので逐次置換する手段とを備えたことを特徴とするものである。   In order to solve the above-described problems, a disk device according to the present invention includes a CPU, a CPU bus to which the CPU is connected, and one or more connected to the CPU bus for selectively storing program modules. A RAM having a plurality of areas, a flash ROM having one or more areas for selectively storing program modules connected to the CPU and expanded in the RAM, and expanded in the RAM When the disk medium having a plurality of areas for storing all program modules and the necessary program module corresponding to the execution content of the program do not exist in the RAM, the program module exists in the flash ROM. From the flash ROM, the program module is transferred to the flash RO. Means for reading out from the disk medium and expanding it in the RAM, means for determining a priority order for storage in the flash ROM according to the frequency of use of the program module, and storage in the flash ROM. The program module includes means for sequentially replacing a program module having a low priority with a program module having a high priority.

また、本発明のディスク装置は、CPUと、前記CPUが接続されるCPUバスと、
前記CPUバスに接続され、プログラムモジュールを選択的に格納するための1つまたは複数の領域をもつRAMと、前記CPUに接続され、前記RAM内に展開されるプログラムモジュールを選択的に格納するための1つまたは複数の領域をもつフラッシュROMと、前記RAM内に展開されるすべてのプログラムモジュールを格納するための複数の領域をもつディスク媒体と、プログラムの実行内容に応じた必要なプログラムモジュールが前記RAM内に存在しない場合に、前記プログラムモジュールが前記フラッシュROM内に存在すれば前記フラッシュROMから、前記プログラムモジュールが前記フラッシュROM内に存在しなければ前記ディスク媒体から読み出して、前記RAMに展開する手段と、前記フラッシュROM内に必ず配置されるプログラムモジュールを指定および指定解除する手段とを備えたことを特徴とするものである。
The disk device of the present invention includes a CPU, a CPU bus to which the CPU is connected,
A RAM that is connected to the CPU bus and has one or more areas for selectively storing program modules, and a program module that is connected to the CPU and developed in the RAM. A flash ROM having one or a plurality of areas, a disk medium having a plurality of areas for storing all program modules developed in the RAM, and necessary program modules according to the execution contents of the program. If not present in the RAM, the program module is read from the flash ROM if it is present in the flash ROM, and is read from the disk medium if the program module is not present in the flash ROM, and is expanded in the RAM. In the flash ROM. It is characterized in that a means for specifying and specify cancel program module disposed.

この発明によれば、上記のような構成にすることで、使用頻度・重要度の高いプログラムモジュールを優先的にアクセス所要時間の短いフラッシュROMに配置することで、RAM容量の増加とコマンド実行のためのディスク媒体へのアクセス頻度を同時に抑制することが可能となる。   According to the present invention, with the configuration as described above, a program module having a high frequency of use and importance is preferentially arranged in a flash ROM having a short access time, thereby increasing the RAM capacity and executing commands. Therefore, it is possible to simultaneously suppress the access frequency to the disk medium.

また、ホストシステムが指定した、特定のコマンドを実行するためのプログラムモジュールを優先的にアクセス所要時間の短いフラッシュROMに配置することで、そのコマンド実行のためのメカニズム系の駆動を抑制することができ、ホストシステムの構成に対して最適な動作が可能となる。   Also, by preferentially placing a program module for executing a specific command specified by the host system in a flash ROM with a short access time, the drive of the mechanism system for executing the command can be suppressed. It is possible to perform an optimum operation with respect to the configuration of the host system.

以下、この発明の実施の形態について、図面を参照しながら詳細に説明する。
本発明の実施形態に係るディスク装置である磁気ディスク装置(HDD)の構造を図1を用いて説明する。
<装置の構成>
図1は本発明の構成を示すブロック図である。
同図において、CPU1は装置全体の制御およびモータドライバ6の制御を時分割で行う。モータドライバ6はCPU1からの制御によりディスク媒体である磁気ディスク9を定常回転させるためのスピンドルモータ(以下、SPMと称する)8および、磁気ヘッド13を目的の位置に移動させるためのボイスコイルモータ(以下、VCMと称する)7を駆動するための電流をSPM8およびVCM7に供給する。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
A structure of a magnetic disk device (HDD) which is a disk device according to an embodiment of the present invention will be described with reference to FIG.
<Device configuration>
FIG. 1 is a block diagram showing the configuration of the present invention.
In the figure, the CPU 1 controls the entire apparatus and the motor driver 6 in a time-sharing manner. The motor driver 6 is a spindle motor (hereinafter referred to as SPM) 8 for rotating the magnetic disk 9 as a disk medium under the control of the CPU 1 and a voice coil motor (moving the magnetic head 13 to a target position). (Hereinafter referred to as VCM) 7 is supplied to SPM 8 and VCM 7 with a current for driving.

CPUバス12にはCPU1が電源投入時に装置制御のためのファームウェアをフラッシュROM15からCPU内のRAM10へコピーする動作(この動作を以下、イニシャルロードと称する)を行うプログラム(以下、イニシャルプログラムロード:IPLと称する)が記録されているIPL ROM11、装置制御を行うためのプログラム、変数等を格納するためのRAM10とディスクコントローラ(以下、ハードディスクコントローラ:HDCと称する)3、および制御に必要な諸信号の生成を行うゲートアレイ2が接続されている。   The CPU bus 12 has a program (hereinafter referred to as initial load: IPL) for copying the firmware for controlling the device from the flash ROM 15 to the RAM 10 in the CPU when the power is turned on (hereinafter referred to as initial load). IPL ROM 11 in which is recorded), a program for performing device control, a RAM 10 for storing variables, a disk controller (hereinafter referred to as hard disk controller: HDC) 3, and various signals necessary for control A gate array 2 that performs generation is connected.

HDC3およびゲートアレイ2の制御用レジスタはそれぞれCPU1のメモリ空間の一部に割り当てられており、CPU1がこの領域に対して読み出しおよび書き込みを行うことでHDC3およびゲートアレイ2の制御を行う。   The control registers of the HDC 3 and the gate array 2 are respectively allocated to a part of the memory space of the CPU 1, and the CPU 1 controls the HDC 3 and the gate array 2 by reading and writing to this area.

また、リード/ライトIC回路5については、主として磁気ヘッド13の位置決め処理に必要な信号処理を行うサーボブロックと、データの読み出し/書き込みのための信号処理を行うリード/ライトブロックに大別される。   The read / write IC circuit 5 is roughly divided into a servo block that mainly performs signal processing necessary for positioning processing of the magnetic head 13 and a read / write block that performs signal processing for reading / writing data. .

磁気ディスク9には位置決めのためのサーボデータ信号が記録されている領域(以下、サーボ領域と称する)とホストシステムから転送されるデータを記録するための領域(以下、データ領域と称する)が交互にかつ等間隔に配置されている。   On the magnetic disk 9, an area where servo data signals for positioning are recorded (hereinafter referred to as servo areas) and an area for recording data transferred from the host system (hereinafter referred to as data areas) are alternated. Are arranged at regular intervals.

さらに、磁気ディスク9上にはその回転軸を中心とした同心円状にデータトラック(以下、単にトラックと称する)が配置され、トラック上に磁気ヘッド13を追従させるための位置決めを前述のサーボデータ信号から得られる情報をもとに行う。   Further, data tracks (hereinafter simply referred to as tracks) are arranged on the magnetic disk 9 concentrically around the rotation axis, and positioning for causing the magnetic head 13 to follow the tracks is performed on the servo data signal described above. Based on information obtained from

具体的には、磁気ヘッド13の位置決め実施時に磁気ヘッド13から読み出され、ヘッドIC回路16で増幅されたアナログ信号が、リード/ライトIC回路5に送られ、同リード/ライトIC回路5のサーボブロック21によりサーボデータとして抽出される。抽出されたサーボデータは更にゲートアレイ2によって処理され、CPU1はこのデータをもとにモータドライバ6を制御して、磁気ヘッド13の位置決めのための電流をVCM7に供給する。   Specifically, an analog signal read from the magnetic head 13 when the magnetic head 13 is positioned and amplified by the head IC circuit 16 is sent to the read / write IC circuit 5, and the read / write IC circuit 5 The servo block 21 extracts the servo data. The extracted servo data is further processed by the gate array 2, and the CPU 1 controls the motor driver 6 based on this data and supplies a current for positioning the magnetic head 13 to the VCM 7.

HDC3はCPUバス12以外にゲートアレイ2、バッファRAM4、リード/ライトIC回路5に接続されている。また、HDC3は更に機能毎にホストシステム17とのインタフェース制御を行うホストブロック、バッファRAMの制御を行うバッファブロック、リード/ライトIC回路5およびゲートアレイ2と接続され、読み出し/書き込み処理を行うリード/ライトブロックなどに分かれる。   The HDC 3 is connected to the gate array 2, the buffer RAM 4, and the read / write IC circuit 5 in addition to the CPU bus 12. Further, the HDC 3 is further connected to the host block for controlling the interface with the host system 17 for each function, the buffer block for controlling the buffer RAM, the read / write IC circuit 5 and the gate array 2, and performs read / write processing. / Divided into light blocks.

読み出し時、磁気ディスク9から磁気ヘッド13によって読み出され、ヘッドIC回路16によって増幅されたアナログ信号は、リード/ライトIC回路5によって復号化され、HDC3はこれをゲートアレイ2からの制御用の各信号にしたがって処理することにより、ホストシステム17に転送すべきデータを生成する。このデータは一旦バッファRAM4に格納されてからホストシステム17に転送される。   At the time of reading, the analog signal read from the magnetic disk 9 by the magnetic head 13 and amplified by the head IC circuit 16 is decoded by the read / write IC circuit 5, and the HDC 3 controls the analog signal from the gate array 2. Data to be transferred to the host system 17 is generated by processing according to each signal. This data is once stored in the buffer RAM 4 and then transferred to the host system 17.

書き込み時、ホストシステム17からHDC3に転送されたデータは一旦バッファRAM4に格納された後、ゲートアレイ2からの制御用の各信号にしたがってHDC3からリード/ライトIC回路5へ送られ、リード/ライトIC回路5によって符号化された書き込みデータは、ヘッドIC16を経由して磁気ヘッド13によって磁気ディスク9に書き込まれる。   At the time of writing, the data transferred from the host system 17 to the HDC 3 is temporarily stored in the buffer RAM 4, and then sent from the HDC 3 to the read / write IC circuit 5 in accordance with each control signal from the gate array 2. The write data encoded by the IC circuit 5 is written to the magnetic disk 9 by the magnetic head 13 via the head IC 16.

<ファームウェアコードの配置と装置の起動>
図2はファームウェアの配置を示す領域配置図である。
CPU1のアドレス空間にはCPU内のRAM10、HDC3、ゲートアレイ2のレジスタ(具体的には、CPU・ゲートアレイ制御レジスタ114)、およびIPLROM11が配置されており、CPU内のRAM10は更に、基本領域101とロード領域102に分割されている。
<Firmware code placement and device activation>
FIG. 2 is a region layout diagram showing the firmware layout.
In the address space of the CPU 1, the RAM 10 in the CPU, the HDC 3, the register of the gate array 2 (specifically, the CPU / gate array control register 114), and the IPLROM 11 are arranged. The RAM 10 in the CPU further includes a basic area. 101 and a load area 102.

ファームウェアのコードはCPU1のアドレス空間に存在するもののみが実行可能であり、装置に対して電源投入直後はCPU内のRAM10にはファームウェアのコードは存在しないため、ここにファームウェアコードを展開するためのコードがIPL115である。   Only the firmware code that exists in the address space of the CPU 1 can be executed. Since the firmware code does not exist in the RAM 10 in the CPU immediately after the apparatus is turned on, the firmware code is expanded here. The code is IPL115.

IPL115によって、CPU内のRAM10内に展開されるコードはフラッシュROM15に存在するが、フラッシュROM15はCPUバス12に接続されておらず、このアドレス空間は、CPU1のアドレス空間とは独立したものである。   The code developed in the RAM 10 in the CPU by the IPL 115 exists in the flash ROM 15, but the flash ROM 15 is not connected to the CPU bus 12, and this address space is independent of the address space of the CPU 1. .

フラッシュROM15内の領域はさらに非更新領域121とコード保持領域112に分割されており、前者には装置の起動、サーボ制御および磁気ディスク9に対する読み書きに最低限必要なファームウェアコード(以下、基本コード131と称する)と装置毎の調整および設定内容を記した最適化パラメータA132が格納されている。   The area in the flash ROM 15 is further divided into a non-update area 121 and a code holding area 112. The former includes firmware codes (hereinafter referred to as basic codes 131) which are the minimum required for starting the apparatus, servo control, and reading / writing to the magnetic disk 9. And an optimization parameter A132 describing the adjustment and setting contents for each apparatus.

装置の電源投入時、ハードウェアのリセット状態が解除されるとCPU1はIPL115の先頭からプログラムの実行を開始する。IPL115はフラッシュROM15中の非更新領域121の内容を読み出し、CPU1内のRAM10内の基本領域101にコピーする。   When the hardware reset state is released when the apparatus is turned on, the CPU 1 starts executing the program from the top of the IPL 115. The IPL 115 reads the contents of the non-update area 121 in the flash ROM 15 and copies it to the basic area 101 in the RAM 10 in the CPU 1.

これによって基本コード領域111、パラメータ領域A112内に装置の起動、サーボ制御および磁気ディスク9に対する読み書きに最低限必要なプログラムコードが用意されたことになるので、これに次いで基本コード領域111の先頭に処理を分岐させ、IPL115の動作は完了する。   As a result, program codes necessary for starting the apparatus, servo control, and reading / writing to the magnetic disk 9 are prepared in the basic code area 111 and parameter area A112. The processing is branched and the operation of the IPL 115 is completed.

基本コード領域111の先頭に処理が移されると、まず装置全体の初期化、自己診断など、磁気ディスク9のデータを読み出すための準備を行う。この初期化動作にはロード領域管理表マスタ133のロード領域管理表116へのコピー、およびコード保持領域管理表117の初期化(即ち、登録されている項目がない状態にする)が含まれる。   When the processing is moved to the head of the basic code area 111, first, preparation for reading data on the magnetic disk 9 is performed such as initialization of the entire apparatus and self-diagnosis. This initialization operation includes copying of the load area management table master 133 to the load area management table 116 and initialization of the code holding area management table 117 (that is, no registered items are present).

これに次いで、SPM8を回転させ、磁気ヘッド13を所定の位置に移動させた後、最適化パラメータB141を読み出し、パラメータ領域B113にコピーする。
なお、最適化パラメータB141は装置の起動には必要ではないが、ホストシステムからのコマンドを実行するために必要なデータ(例えば、ディフェクトリスト、セキュリティ情報等)が格納されており、この読み出しの完了をもって装置の起動処理が完了する。
Subsequently, after the SPM 8 is rotated and the magnetic head 13 is moved to a predetermined position, the optimization parameter B141 is read and copied to the parameter area B113.
The optimization parameter B141 is not necessary for starting the apparatus, but data necessary for executing a command from the host system (for example, defect list, security information, etc.) is stored, and the reading is completed. The device startup process is completed.

また、装置起動時にSPM8を回転させないような設定も可能であり、この場合にはこれらの読み出しは行われず、ホストシステム17より受信したコマンドを実行するなど、必要になった時点でSPM8を始動させ、読み出すことになる。   It is also possible to set the SPM 8 not to rotate when the device is started. In this case, these readings are not performed, and the command received from the host system 17 is executed. Read out.

<ホストシステムからのコマンドの実行>
図3はCPU内のRAM10上のロード領域102、およびフラッシュROM15上のコード保持領域122を管理する表のフォーマットである。
CPU内のRAM10中の変数領域103内にロード領域102を管理するためのロード領域管理表116、およびコード保持領域122を管理するためのコード保持領域管理表116がそれぞれ配置されており、これらのフォーマットはいずれも図3で示されるもので、各項の意味は以下に示す通りである。
<Executing commands from the host system>
FIG. 3 shows a table format for managing the load area 102 on the RAM 10 in the CPU and the code holding area 122 on the flash ROM 15.
A load area management table 116 for managing the load area 102 and a code holding area management table 116 for managing the code holding area 122 are arranged in the variable area 103 in the RAM 10 in the CPU. Each format is shown in FIG. 3, and the meaning of each item is as follows.

領域番号201:その行が表すサブ領域(具体的には、ロードサブ領域もしくはコード保持サブ領域と称する)の番号。
モジュール番号202:サブ領域に存在する実行時コード(モジュール)の識別番号。モジュールが存在しないときにはFFFFhとなっている。
優先度203:モジュールの使用頻度などから判定される上書時の優先度で、大きいほど高く(即ち、上書きされにくい)、FFFFhのときは上書き禁止。 チェックサム204:モジュールの整合性を確認するためのチェックサム。
Area number 201: A number of a sub area (specifically, a load sub area or a code holding sub area) represented by the row.
Module number 202: Identification number of a runtime code (module) existing in the sub area. When there is no module, it is FFFFh.
Priority 203: The priority at the time of overwriting determined from the usage frequency of the module, etc., the higher the value is, the higher the value is (that is, the more difficult it is to be overwritten). Checksum 204: Checksum for confirming the consistency of the module.

ロード領域102はファームウェアのコードを機能毎にまとめたモジュールを必要に応じて展開して実行するための領域でNR個のサブ領域に等分されており(ロードサブ領域1〜ロードサブ領域NR)、1つのモジュールを格納するためにその大きさにより1つまたは複数のサブ領域が使用される。また、ここに展開される各モジュールには識別のための番号がついている。   The load area 102 is an area for expanding and executing a module in which firmware codes are grouped for each function as needed, and is equally divided into NR sub areas (load sub area 1 to load sub area NR), 1 Depending on its size, one or more sub-areas are used to store one module. Each module developed here has an identification number.

ホストシステム17からコマンドを受信するなど新たな処理を行う必要が生じると、まずロード領域管理表116のモジュール202の項を検索する。ここで必要なモジュールの番号が見つかればロード領域102内の対応するロードサブ領域に既にそのモジュールが存在することになるので処理を継続させることができるが、必要なモジュールが存在しなければその前にフラッシュROM15内のコード保持領域122または磁気ディスク9上のコード領域142から必要なモジュールを読み出し、ロード領域102に展開しておかなければならない。このような処理を1つまたは複数のモジュールに対して行い、必要なモジュールが全てロード領域102に展開された時点で当初の処理を継続する。   When it is necessary to perform a new process such as receiving a command from the host system 17, the section of the module 202 in the load area management table 116 is first searched. If the necessary module number is found here, the module already exists in the corresponding load sub-area in the load area 102, so that the processing can be continued, but if the necessary module does not exist, before that, The necessary modules must be read from the code holding area 122 in the flash ROM 15 or the code area 142 on the magnetic disk 9 and developed in the load area 102. Such processing is performed on one or a plurality of modules, and the initial processing is continued when all necessary modules are expanded in the load area 102.

ロード領域102へのモジュール展開時には、モジュール番号202の項の中に空きを表す値(FFFFh)があるかを調べ、空きが見つかればそのロード領域102にモジュールが展開されるが、空きがなければ優先度203の項を検索して値が最も小さい、すなわち最も優先度が低いものを探し、これを上書きする形で展開する。   When a module is expanded to the load area 102, it is checked whether there is a value (FFFFh) indicating a vacancy in the module number 202, and if a vacancy is found, the module is expanded to the load area 102. The term of the priority 203 is searched to find the one having the smallest value, that is, the one having the lowest priority, and developed in such a manner that it is overwritten.

ここで、優先度203についてはモジュールの使用頻度などを元に計算するが、展開されたばかりのモジュールがすぐに上書きされることがないように最終使用時刻なども考慮する。また、優先度203の計算は逐次行うようにし、必要に応じてフラッシュROM15や磁気ディスク9などの不揮発記憶領域に保存する。   Here, the priority 203 is calculated based on the use frequency of the module, but the last use time is also taken into consideration so that the module just developed is not overwritten immediately. The calculation of the priority 203 is sequentially performed, and is stored in a nonvolatile storage area such as the flash ROM 15 or the magnetic disk 9 as necessary.

次に、ロード領域102に展開されるモジュールの展開元について述べる。
モジュールの展開元はフラッシュROM15内のコード保持領域122または磁気ディスク9上のコード領域142の何れかであり、前者は高速である上に常に(即ち、SPM8が停止した状態でも)読み出しが可能であるが、全てのモジュールを格納するだけの容量がなく、後者は読み出すためにSPM8の始動や磁気ヘッド13の移動を伴うこともあるため時間がかかるものの、全てのモジュールが格納されている。
Next, the expansion source of the module expanded in the load area 102 will be described.
The expansion source of the module is either the code holding area 122 in the flash ROM 15 or the code area 142 on the magnetic disk 9, and the former is fast and can always be read (ie, even when the SPM 8 is stopped). However, there is not enough capacity to store all the modules, and since the latter may involve the start of the SPM 8 and the movement of the magnetic head 13 for reading, all the modules are stored.

このことから、ロード領域102にモジュールを展開する場合にはまずコード保持領域122内に存在するかを調べ、存在すればそれを使用し、存在しなければコード領域142から読み出すという手順をとることになる。   For this reason, when a module is expanded in the load area 102, it is first checked whether it exists in the code holding area 122. If it exists, it is used, and if it does not exist, it is read from the code area 142. become.

このような特徴から、コード保持領域122には使用頻度の高いモジュールや、使用時にSPM8の始動や磁気ヘッド13の移動といった動作をさせたくないようなモジュールを格納することが望ましい。また、フラッシュROM15はある単位(例えば、本実施例ではコード保持サブ領域)での消去および書き込みが可能であるため、この領域に保持しておくモジュールを動的に変更することができる。   Because of these characteristics, it is desirable to store a module that is frequently used in the code holding area 122 or a module that does not want to operate the SPM 8 or move the magnetic head 13 during use. Further, since the flash ROM 15 can be erased and written in a certain unit (for example, the code holding sub-area in this embodiment), the module held in this area can be dynamically changed.

コード保持領域122内の管理はロード領域管理表116を使用してロード領域102を管理しているのと同様の方法で、コード保持領域管理表117を用いて行う。ロード領域102へのモジュールの展開が必要になった場合、まず同表のモジュール番号202の項を検索し、対応するモジュール番号が見つかればそれをロード領域102に展開した後、展開先のロードサブ領域内のチェックサムを計算してチェックサム204の項の対応する値と照合する。   Management in the code holding area 122 is performed using the code holding area management table 117 in the same manner as the load area 102 is managed using the load area management table 116. When it is necessary to expand the module to the load area 102, first the term of the module number 202 in the table is searched, and if the corresponding module number is found, it is expanded to the load area 102 and then the load sub-area of the expansion destination Is checked against the corresponding value in the checksum 204 term.

チェックサムが一致すれば展開処理は完了するが、チェックサムが不一致であるか、または、対応するモジュールが見つからなければコード領域142より読み出して展開する。チェックサムの不一致が発生した場合には、コード保持領域122内の対応するコード保持サブ領域も更新しておく。   If the checksums match, the expansion process is completed, but if the checksums do not match or if the corresponding module is not found, the data is read from the code area 142 and expanded. When a checksum mismatch occurs, the corresponding code holding subarea in the code holding area 122 is also updated.

また、コード保持領域122内に格納されているモジュールの更新は、やはりロード領域102内のモジュールと同様に使用頻度や最終更新時刻により決定される優先度によって行うが、この場合には更に自動的に決定される優先度と区別される「上書き禁止」(FFFFh)の条件を追加する。この値が自動的に下がることはなく、自動的に決定される優先度がこの値に到達することもない。   The update of the module stored in the code holding area 122 is also performed according to the priority determined by the use frequency and the last update time as in the case of the module in the load area 102. A condition of “overwrite prohibition” (FFFFh) that is distinguished from the priority determined in (1) is added. This value does not drop automatically, and the automatically determined priority does not reach this value.

なお、ロード領域管理表116を更新した場合には、同時にコード保持領域122内のロード領域管理表マスタ133も更新する。このとき、フラッシュROM15には書き換え上限回数などの制限がある場合が多いので、あまり頻繁にこれらの表が更新されないように優先度比較の判定条件を決定する必要がある。   When the load area management table 116 is updated, the load area management table master 133 in the code holding area 122 is updated at the same time. At this time, since the flash ROM 15 often has a limit such as the upper limit number of rewrites, it is necessary to determine a priority comparison determination condition so that these tables are not updated too frequently.

さらに、上述の「上書き禁止」(FFFFh)状態をホストシステム17が設定および解除できるように、そのためのコマンドを設ける。この場合、ホストシステム17がモジュール番号を直接指定すると煩雑になるので、指定はコマンド単位とする。   Further, a command is provided so that the host system 17 can set and cancel the above-described “overwrite prohibited” (FFFFh) state. In this case, since it becomes complicated if the host system 17 directly specifies the module number, the specification is made in command units.

すなわち、常に高速で実行したいコマンドや、SPM8の始動を伴わずに実行したいコマンドのコマンドコードを指定して「上書き禁止」(FFFFh)コマンドを実行すると、装置は必要なモジュールを列挙し、それをコード保持領域122に展開した後に、コード保持領域管理表117を更新する。もちろん、このときに記録する優先度は「上書き禁止」を表すFFFFhとする。   That is, when a command that is always executed at high speed or a command code of a command that is executed without starting SPM 8 is specified and an “overwrite prohibited” (FFFFh) command is executed, the apparatus enumerates necessary modules and After expansion into the code holding area 122, the code holding area management table 117 is updated. Of course, the priority recorded at this time is FFFFh representing “overwrite prohibited”.

逆に、この状態を解除するためには同様にコマンドコードを指定して「上書き禁止」解除コマンドを実行することで、これらのコマンドで使用しているモジュールの登録を解除することができる。このための動作として該当するモジュールの削除は行わず、優先度の値を通常のものに下げることで後により優先度が高いモジュールが現れた場合に置換されるようになる。   On the other hand, in order to cancel this state, the registration of the module used in these commands can be canceled by specifying the command code and executing the “overwrite prohibition” cancel command. As an operation for this, the corresponding module is not deleted, and the priority value is lowered to a normal one, so that when a module with a higher priority appears later, the module is replaced.

この機能は、例えばリード/ライト系コマンドにそれ以外のコマンドを頻繁に混在させて発行するようなシステムでのコマンド応答性の低下防止や、SPM8を停止させた状態で起動させ、SPM8の回転を伴うコマンドを実行するかどうかを判定するためのコマンド(例えば、温度測定など)を事前に発行するようなシステムでの「事前の」コマンドにおけるSPM回転防止などに利用できる。   This function prevents, for example, a decrease in command responsiveness in a system in which other commands are frequently mixed with a read / write command and is activated while the SPM 8 is stopped, and the SPM 8 is rotated. This can be used to prevent SPM rotation in a “preliminary” command in a system in which a command (for example, temperature measurement or the like) for determining whether to execute the accompanying command is issued in advance.

これにより、CPU1内のRAM10の容量増加を抑制しつつ必要モジュールの磁気ディスク9からの読み出し動作の頻度を抑制し、またホストシステム17の特徴に合わせてコマンドの種類によっては恒久的にSPM8の始動を伴わずに実行させることを可能にする磁気ディスク装置を提供することが可能となる。   As a result, the frequency of the read operation of the necessary module from the magnetic disk 9 is suppressed while suppressing the increase in the capacity of the RAM 10 in the CPU 1, and depending on the type of the host system 17, the SPM 8 can be started permanently. It is possible to provide a magnetic disk device that can be executed without accompanying.

なお、本発明は、磁気ディスク装置に限らず、情報をディスク状の媒体に記録する他のディスク装置、例えば、光磁気ディスク装置、オプティカルディスク装置にも適用可能であることは言うまでもない。   Needless to say, the present invention is not limited to a magnetic disk device, but can be applied to other disk devices that record information on a disk-shaped medium, for example, a magneto-optical disk device or an optical disk device.

本発明の実施形態に係る磁気ディスク装置(HDD)のハードウェア構成を示すブロック図1 is a block diagram showing a hardware configuration of a magnetic disk device (HDD) according to an embodiment of the present invention. 本実施形態に係るHDDの磁気ディスク上のコード領域を示す領域配置図Area arrangement diagram showing code area on magnetic disk of HDD according to this embodiment 本実施形態に係るHDDのフラッシュROM内のアドレス空間を示す領域配置図Area layout diagram showing address space in flash ROM of HDD according to this embodiment 本実施形態に係るHDDのCPUアドレス空間を示す領域配置図Area arrangement diagram showing CPU address space of HDD according to this embodiment 本実施形態に係るHDDのコード保持領域・ロード領域の管理表Code holding area / load area management table of HDD according to the present embodiment

符号の説明Explanation of symbols

1……CPU
2……ゲートアレイ
3……ハードディスクコントローラ(HDC)
4……バッファRAM
5……リード/ライトIC回路
6……ボイスコイルモータ(VCM)/スピンドルモータ(SPM)ドライバ
7……ボイスコイルモータ(VCM)
8……スピンドルモータ(SPM)
9……ディスク媒体(磁気ディスク)
10……CPURAM
11……イニシャルプログラムローダを格納したROM
12……CPUバス
13……磁気ヘッド
15……フラッシュROM
16……ヘッドIC回路
17……ホストシステム
18……ホストインタフェース
101……基本領域
102……ロード領域
103……変数領域
111……基本コード領域
112……パラメータ領域A
113……パラメータ領域B
114……HDC・ゲートアレイ制御レジスタ
115……イニシャルプログラムローダ格納領域(IPL)
116……ロード領域管理表
117……コード保持領域管理表
121……非更新領域
122……コード保持領域
131……基本コード領域
132……最適化パラメータA
133……ロード領域管理表マスタ
141……最適化パラメータB
142……コード領域
201……領域番号
202……モジュール番号
203……優先度
204……チェックサム
1 …… CPU
2 ... Gate array 3 ... Hard disk controller (HDC)
4 ... Buffer RAM
5: Read / write IC circuit 6: Voice coil motor (VCM) / spindle motor (SPM) driver 7: Voice coil motor (VCM)
8 ... Spindle motor (SPM)
9 …… Disk medium (magnetic disk)
10 …… CPURAM
11 …… ROM with initial program loader
12 ... CPU bus 13 ... Magnetic head 15 ... Flash ROM
16 …… Head IC circuit 17 …… Host system 18 …… Host interface 101 …… Basic area 102 …… Load area 103 …… Variable area 111 …… Basic code area 112 …… Parameter area A
113 …… Parameter area B
114... HDC / gate array control register 115... Initial program loader storage area (IPL)
116 …… Load area management table 117 …… Code holding area management table 121 …… Non-update area 122 …… Code holding area 131 …… Basic code area 132 …… Optimization parameter A
133 ... Load area management table master 141 ... Optimization parameter B
142 ... Code area 201 ... Area number 202 ... Module number 203 ... Priority 204 ... Checksum

Claims (4)

CPUと、
前記CPUが接続されるCPUバスと、
前記CPUバスに接続され、プログラムモジュールを選択的に格納するための1つまたは複数の領域をもつRAMと、
前記CPUに接続され、前記RAM内に展開されるプログラムモジュールを選択的に格納するための1つまたは複数の領域をもつフラッシュROMと、
前記RAM内に展開されるすべてのプログラムモジュールを格納するための複数の領域をもつディスク媒体と、
プログラムの実行内容に応じた必要なプログラムモジュールが前記RAM内に存在しない場合に、前記プログラムモジュールが前記フラッシュROM内に存在すれば前記フラッシュROMから、前記プログラムモジュールが前記フラッシュROM内に存在しなければ、前記ディスク媒体から読み出して前記RAMに展開する手段と、
前記プログラムモジュールの使用頻度により前記フラッシュROM内に保存するための優先順位を求める手段と、
前記フラッシュROMに保存された前記プログラムモジュールのうち、優先順位の低いものを優先順位の高いもので逐次置換する手段と
を備えたことを特徴とするディスク装置。
CPU,
A CPU bus to which the CPU is connected;
A RAM connected to the CPU bus and having one or more areas for selectively storing program modules;
A flash ROM connected to the CPU and having one or more areas for selectively storing program modules developed in the RAM;
A disk medium having a plurality of areas for storing all program modules developed in the RAM;
If the program module necessary for the execution content of the program does not exist in the RAM, the program module must exist in the flash ROM from the flash ROM if the program module exists in the flash ROM. Means for reading from the disk medium and expanding it into the RAM;
Means for obtaining a priority order for storage in the flash ROM according to the frequency of use of the program module;
A disk device comprising: means for sequentially replacing a program module stored in the flash ROM having a lower priority with a program module having a higher priority.
前記フラッシュROM内のプログラムモジュールを前記RAMに展開する際に、前記フラッシュROM内のプログラムモジュールが正しいかを検証するための手段と、
前記プログラムモジュールが正しくないと判断された場合に、前記ディスク媒体から前記プログラムモジュールを読み出して前記RAMに展開し、同時に正しくないと判断された前記フラッシュROM内のプログラムモジュールを正しいもので更新するための手段と、
を備えた請求項1に記載のディスク装置。
Means for verifying whether the program module in the flash ROM is correct when the program module in the flash ROM is expanded in the RAM;
When it is determined that the program module is not correct, the program module is read from the disk medium and expanded in the RAM, and at the same time, the program module in the flash ROM determined to be incorrect is updated with the correct one. Means of
The disk device according to claim 1, comprising:
CPUと、
前記CPUが接続されるCPUバスと、
前記CPUバスに接続され、プログラムモジュールを選択的に格納するための1つまたは複数の領域をもつRAMと、
前記CPUに接続され、前記RAM内に展開されるプログラムモジュールを選択的に格納するための1つまたは複数の領域をもつフラッシュROMと、
前記RAM内に展開されるすべてのプログラムモジュールを格納するための複数の領域をもつディスク媒体と、
プログラムの実行内容に応じた必要なプログラムモジュールが前記RAM内に存在しない場合に、前記プログラムモジュールが前記フラッシュROM内に存在すれば前記フラッシュROMから、前記プログラムモジュールが前記フラッシュROM内に存在しなければ前記ディスク媒体から読み出して、前記RAMに展開する手段と、
前記フラッシュROM内に必ず配置されるプログラムモジュールを指定および指定解除する手段と
を備えたことを特徴とするディスク装置。
CPU,
A CPU bus to which the CPU is connected;
A RAM connected to the CPU bus and having one or more areas for selectively storing program modules;
A flash ROM connected to the CPU and having one or more areas for selectively storing program modules developed in the RAM;
A disk medium having a plurality of areas for storing all program modules developed in the RAM;
If the program module necessary for the execution content of the program does not exist in the RAM, the program module must exist in the flash ROM from the flash ROM if the program module exists in the flash ROM. Means for reading from the disk medium and expanding it into the RAM;
A disk device comprising: means for designating and dedesignating program modules that are always arranged in the flash ROM.
前記フラッシュROM内の前記プログラムモジュールを前記RAMに展開する際に、前記フラッシュROM内の前記プログラムモジュールが正しいかを検証するための手段と、
前記プログラムモジュールが正しくないと判断された場合に、前記ディスク媒体から前記プログラムモジュールを読み出して前記RAMに展開し、同時に正しくないと判断された前記フラッシュROM内のプログラムモジュールを正しいもので更新するための手段と
を備えた請求項3に記載のディスク装置。
Means for verifying whether the program module in the flash ROM is correct when the program module in the flash ROM is expanded into the RAM;
When it is determined that the program module is not correct, the program module is read from the disk medium and expanded in the RAM, and at the same time, the program module in the flash ROM determined to be incorrect is updated with the correct one. The disk device according to claim 3, further comprising:
JP2003426770A 2003-12-24 2003-12-24 Disk device Pending JP2005189907A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003426770A JP2005189907A (en) 2003-12-24 2003-12-24 Disk device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003426770A JP2005189907A (en) 2003-12-24 2003-12-24 Disk device

Publications (1)

Publication Number Publication Date
JP2005189907A true JP2005189907A (en) 2005-07-14

Family

ID=34786207

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003426770A Pending JP2005189907A (en) 2003-12-24 2003-12-24 Disk device

Country Status (1)

Country Link
JP (1) JP2005189907A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1850340A1 (en) * 2006-04-26 2007-10-31 Funai Electric Co., Ltd. Recording device comprising a recording medium and a non-volatile memory
JP2009523290A (en) * 2006-01-11 2009-06-18 ソニー株式会社 Updating firmware for media
JP2010244679A (en) * 2009-04-06 2010-10-28 Samsung Electronics Co Ltd Method of dynamically relocating code and disk drive
JP2012226586A (en) * 2011-04-20 2012-11-15 Nec Corp Reboot/boot/shutdown quickening device and reboot/boot/shutdown quickening method

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009523290A (en) * 2006-01-11 2009-06-18 ソニー株式会社 Updating firmware for media
EP1850340A1 (en) * 2006-04-26 2007-10-31 Funai Electric Co., Ltd. Recording device comprising a recording medium and a non-volatile memory
US7583537B2 (en) 2006-04-26 2009-09-01 Funai Electric Co., Ltd. Recording device and HDD built-in recording device
JP2010244679A (en) * 2009-04-06 2010-10-28 Samsung Electronics Co Ltd Method of dynamically relocating code and disk drive
JP2012226586A (en) * 2011-04-20 2012-11-15 Nec Corp Reboot/boot/shutdown quickening device and reboot/boot/shutdown quickening method

Similar Documents

Publication Publication Date Title
US8667248B1 (en) Data storage device using metadata and mapping table to identify valid user data on non-volatile media
JP3310060B2 (en) Storage device and control program rewriting method for the same
KR101474344B1 (en) Method for controlling cache flush and data storage system using the same
JP4675881B2 (en) Magnetic disk drive and control method thereof
JP2009020986A (en) Disk drive apparatus, and method for storing table for managing data in nonvolatile semiconductor memory in disk drive apparatus
JP2008009874A (en) Memory controller, flash memory system equipped with memory controller, and method for controlling flash memory
JP2008046964A (en) Information recording device and control method therefor
JP5049835B2 (en) Hybrid recording device
JP2010049764A (en) Disk drive unit for supporting interface based on data sectors of different sizes, and its data writing method
EP1564738A2 (en) Method for partitioning hard disc drive and hard disc drive adapted thereto
US20050125602A1 (en) HDD with storage of critical data in FLASH
JP2010118112A (en) Memory system and control method of the same
US7174421B2 (en) HDD with rapid availability of critical data after critical event
JP5985529B2 (en) Apparatus, method and device for rapid resumption from hibernation
JP2008140459A (en) Hybrid disk storage device and disk write-method applied to the device
JP2005189907A (en) Disk device
JP3708914B2 (en) Method and apparatus for rewriting a program executed in a disk storage device
JP4919983B2 (en) Data storage device and data management method in data storage device
US20070174739A1 (en) Disk device, method of writing data in disk device, and computer product
JP4293948B2 (en) Disk device and disk device control method
US20050125651A1 (en) Method for providing critical data in an HDD after critical event
JP4575112B2 (en) Firmware rewriting method, disk drive device, and information processing system
US20050122610A1 (en) Rapid availability of critical data through reallocation
JPH08137622A (en) Disk device and write read method for same
JPH09312084A (en) Information recording device

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20050415

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20050606