JP2000293376A - Circuit and method for switching boot program - Google Patents

Circuit and method for switching boot program

Info

Publication number
JP2000293376A
JP2000293376A JP11098177A JP9817799A JP2000293376A JP 2000293376 A JP2000293376 A JP 2000293376A JP 11098177 A JP11098177 A JP 11098177A JP 9817799 A JP9817799 A JP 9817799A JP 2000293376 A JP2000293376 A JP 2000293376A
Authority
JP
Japan
Prior art keywords
boot
program
boot program
time stamp
switching
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
JP11098177A
Other languages
Japanese (ja)
Inventor
Chizuko Kubo
千鶴子 久保
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP11098177A priority Critical patent/JP2000293376A/en
Publication of JP2000293376A publication Critical patent/JP2000293376A/en
Pending legal-status Critical Current

Links

Landscapes

  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To obtain boot program switching circuit and switching method capable of easily switching to the latest program all the time and also surely starting a rewritten program even when abnormality occurs in the rewritten program. SOLUTION: This switching circuit of a boot program is provided with a CPU 1, a boot ROM 3 storing a 1st boot program executed by the CPU 1, its check sum and its time stamp and a boot ROM 4 storing a 2nd boot program executed by the CPU 1, its check sum and its time stamp. It is further provided with a selector 2 switching boot programs to be executed by the CPU 1 when the check sum of a boot program whose time stamp is the newest between the 1st and 2nd boot programs is normal.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、コンピュータの起
動時等に動作又は実行するブートプログラムの切替回路
及び切替方法に関し、特に、書き換え後の動作又は実行
の確実性が向上したブートプログラムの切替回路及び切
替方法に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a boot program switching circuit and a switching method that operate or execute at the time of starting a computer, and more particularly to a boot program switching circuit with improved reliability of operation or execution after rewriting. And a switching method.

【0002】[0002]

【従来の技術】一般に、マイクロプロセッサが組み込ま
れた装置においては、そのマイクロプロセッサを制御す
るためのプログラムがROM(Read Only Memory)に格
納されていることが多い。
2. Description of the Related Art Generally, in an apparatus incorporating a microprocessor, a program for controlling the microprocessor is often stored in a ROM (Read Only Memory).

【0003】また、近時、電子デバイス技術の進歩によ
り、EEPROM(Electrically Erasable Programmab
le ROM)及びFROM(Flash ROM)のように、電源供
給がなくても記録内容を保持し、且つプログラムによっ
て記録内容の書き換えが可能なデバイスの大容量化が進
められている。そして、ROMの替わりにEEPROM
又はFROMが使用されることが多くなっている。な
お、特にマイクロプロセッサの起動時に実行されるプロ
グラムはブートROMとよばれるROMの特定の領域に
格納されており、その格納場所を変更することはできな
い。
Recently, with the advance of electronic device technology, an EEPROM (Electrically Erasable Programmab) has been developed.
Devices such as le ROM) and FROM (Flash ROM), which retain recorded contents without power supply and are capable of rewriting recorded contents by programs, have been increasing in capacity. And, instead of ROM, EEPROM
Alternatively, FROM is increasingly used. In particular, a program executed when the microprocessor is started is stored in a specific area of a ROM called a boot ROM, and the storage location cannot be changed.

【0004】このようなブートROMに格納されたプロ
グラムデータが破損した場合又はその書き換えをし損じ
た場合にはマイクロプロセッサが正しく起動しなくなる
ため、従来は、このような場合にはブートROMを取り
外して別装置でプログラムデータを書き戻す必要があ
り、その工程が煩雑であった。更に、ブートROMの取
り外しの際には、そのブートROM自体及び周辺装置を
破損する虞もあった。
[0004] If the program data stored in the boot ROM is damaged or rewritten incorrectly, the microprocessor will not start up properly. Therefore, it is necessary to rewrite the program data by another device, and the process is complicated. Furthermore, when the boot ROM is removed, the boot ROM itself and peripheral devices may be damaged.

【0005】このため、複数のブートプログラム領域を
有するブートプログラムの切替装置であって複雑な操作
を行うことなくブートプログラム領域を変更することが
可能なものが提案されている(特開平8−179937
号公報)。この公報に記載されたブートプログラムの切
替装置においては、スイッチ操作により4個のROMか
ら1個のROMが選択され、それに格納されているプロ
グラムがCPUの起動時に実行されるような構成となっ
ている。
For this reason, there has been proposed a boot program switching device having a plurality of boot program areas, which can change the boot program area without performing complicated operations (Japanese Patent Laid-Open No. Hei 8-179937).
No.). The boot program switching device described in this publication has a configuration in which one ROM is selected from four ROMs by a switch operation, and a program stored in the ROM is executed when the CPU is started. I have.

【0006】また、ブートプログラムが格納された2個
の不揮発性の記憶デバイスが設けられたコンピュータが
提案されている(特開平10−21085号公報)。こ
の公報に記載されたコンピュータにおいては、通常使用
されるブートプログラムが格納された記憶デバイスにバ
グ等の異常が生じているときに、自動的に予備的に使用
される記憶デバイスがアクセスされるような構成となっ
ている。
Further, a computer provided with two nonvolatile storage devices storing a boot program has been proposed (Japanese Patent Laid-Open No. Hei 10-21085). In the computer described in this publication, when an abnormality such as a bug occurs in a storage device in which a normally used boot program is stored, a storage device used as a spare is automatically accessed. Configuration.

【0007】更に、特開平10−124474号公報に
は、ブートROMに記憶されたプログラムの書き換えに
使用されるメモリ等の容量低減を図ったコンピュータが
開示されている。
Further, Japanese Patent Laid-Open Publication No. Hei 10-124474 discloses a computer in which the capacity of a memory or the like used for rewriting a program stored in a boot ROM is reduced.

【0008】[0008]

【発明が解決しようとする課題】しかしながら、特開平
8−179937号公報に記載されたブートプログラム
の切替回路においては、切替えられたブートROMへは
アクセスすることができないという問題点がある。
However, in the boot program switching circuit described in Japanese Patent Application Laid-Open No. 8-179937, there is a problem that the switched boot ROM cannot be accessed.

【0009】また、特開平10−21085号公報に記
載されたコンピュータにおいては、常に書き換えられた
最新のブートプログラムが実行されるとは限らない。
In the computer described in Japanese Patent Application Laid-Open No. 10-21085, the updated boot program is not always executed.

【0010】更に、特開平10−124474号公報に
記載されたコンピュータにおいては、ブートプログラム
切替の制御が極めて複雑なものとなっている。
Further, in the computer described in Japanese Patent Application Laid-Open No. 10-124474, the control of the switching of the boot program is extremely complicated.

【0011】本発明はかかる問題点に鑑みてなされたも
のであって、常に最新のプログラムに容易に切替えるこ
とができると共に、書き換えられプログラムに異常があ
った場合にも確実に起動することができるブートプログ
ラムの切替回路及び切替方法を提供することを目的とす
る。
The present invention has been made in view of such a problem, and it is possible to easily switch to the latest program at all times, and to surely start the program even if there is an error in the rewritten program. An object of the present invention is to provide a boot program switching circuit and a switching method.

【0012】[0012]

【課題を解決するための手段】本発明に係るブートプロ
グラムの切替回路は、中央処理装置と、この中央処理装
置が実行する第1のブートプログラム、そのチェックサ
ム及びそのタイムスタンプを記憶する第1のプログラム
記憶手段と、前記中央処理装置が実行する第2のブート
プログラム、そのチェックサム及びそのタイムスタンプ
を記憶する第2のプログラム記憶手段と、前記第1又は
第2のブートプログラムのうち最もタイムスタンプが新
しいブートプログラムのチェックサムが正常である場合
に前記中央処理装置が実行するブートプログラムを切替
える切替手段と、を有することを特徴とする。
According to the present invention, there is provided a boot program switching circuit comprising: a central processing unit; a first boot program executed by the central processing unit; a checksum thereof; and a time stamp thereof. Program storage means, a second boot program to be executed by the central processing unit, a second program storage means for storing its checksum and its time stamp, and the most time-out of the first or second boot program. Switching means for switching the boot program executed by the central processing unit when the checksum of the boot program with a newer stamp is normal.

【0013】本発明においては、中央処理装置により第
1又は第2のブートプログラムの実行が開始され、最も
タイムスタンプが新しいブートプログラムのチェックサ
ムが正常である場合にブートプログラムが切替えられ
る。従って、書き換えられたプログラムのチェックサム
に異常があった場合にはプログラムの切替は行われず、
書き換えられていないブートプログラムが実行されるの
で、確実に起動する。また、常に正常な最新のブートプ
ログラムが実行されることになる。
In the present invention, execution of the first or second boot program is started by the central processing unit, and the boot program is switched when the checksum of the boot program with the latest time stamp is normal. Therefore, if there is an error in the checksum of the rewritten program, the program is not switched,
Since the boot program that has not been rewritten is executed, the boot is reliably started. In addition, the latest normal boot program is always executed.

【0014】なお、本発明においては、前記第1及び第
2のブートプログラムは、前記第1のブートプログラム
のタイムスタンプと第2のブートプログラムのタイムス
タンプとを比較するプログラムと、前記第1又は第2の
ブートプログラムのうち最もタイムスタンプが新しいブ
ートプログラムのチェックサムが正常であるか異常であ
るかを判断するプログラムと、を有することができる。
In the present invention, the first and second boot programs include a program for comparing a time stamp of the first boot program and a time stamp of the second boot program, and the first or second boot program. And a program for determining whether the checksum of the boot program with the latest time stamp among the second boot programs is normal or abnormal.

【0015】また、前記切替手段は、前記中央処理装置
から出力されたアドレス信号に関連づけて前記第1又は
第2のブートプログラムを選択する選択手段を有しても
よい。
Further, the switching means may have a selection means for selecting the first or second boot program in association with an address signal output from the central processing unit.

【0016】更に、前記切替手段は、前記中央処理装置
に接続され前記中央処理装置に実行されるブートプログ
ラムが設定されるレジスタを備えた選択回路を有しても
よく、前記中央処理装置に接続され前記中央処理装置に
実行されるブートプログラムを手動で設定するためのス
イッチを備えた選択回路を有してもよい。
Further, the switching means may include a selection circuit having a register which is connected to the central processing unit and in which a boot program to be executed by the central processing unit is set, and which is connected to the central processing unit. And a selection circuit having a switch for manually setting a boot program to be executed in the central processing unit.

【0017】本発明に係るブートプログラムの切替方法
は、中央処理装置が実行する第1のブートプログラムの
第1のタイムスタンプ及び前記中央処理装置が実行する
第2のブートプログラムの第2のタイムスタンプを夫々
第1及び第2のプログラム記憶手段から読み出す工程
と、前記第1のタイムスタンプと前記のタイムスタンプ
とを比較する工程と、前記第1又は第2のブートプログ
ラムのうち最もそのタイムスタンプが新しいブートプロ
グラムのチェックサムが正常であるか異常であるかを判
断する工程と、前記チェックサムが正常である場合に前
記中央処理装置が実行するブートプログラムを切替える
工程と、を有することを特徴とする。
According to the boot program switching method of the present invention, a first time stamp of a first boot program executed by the central processing unit and a second time stamp of a second boot program executed by the central processing unit are provided. Reading from the first and second program storage means, comparing the first time stamp with the time stamp, respectively, and determining whether the time stamp of the first or second boot program is the highest. Determining whether the checksum of the new boot program is normal or abnormal, and switching the boot program to be executed by the central processing unit when the checksum is normal. I do.

【0018】[0018]

【発明の実施の形態】以下、本発明の実施例に係るブー
トプログラムの切替回路について、添付の図面を参照し
て具体的に説明する。図1は本発明の第1の実施例に係
るブートプログラムの切替回路の構成を示すブロック図
である。
DESCRIPTION OF THE PREFERRED EMBODIMENTS A boot program switching circuit according to an embodiment of the present invention will be specifically described below with reference to the accompanying drawings. FIG. 1 is a block diagram showing the configuration of the boot program switching circuit according to the first embodiment of the present invention.

【0019】第1の実施例においては、中央処理装置
(CPU)1にアドレスデータ線5が接続されており、
アドレスデータ線5に相互に容量が等しい2個のブート
ROM3及び4が接続されている。また、アドレスデー
タ線5には、CPU1から出力されたアドレス信号をデ
コードしブートROM3又はブートROM4を選択する
セレクタ2が接続されている。なお、ブートROM3及
び4には、夫々チェックサム及びタイムスタンプを含む
プログラムデータが書き込まれている。いずれのプログ
ラムにも、ブートROM3に書き込まれたプログラムの
タイムスタンプとブートROM4に書き込まれたプログ
ラムのタイムスタンプとを比較するプログラム、及びこ
れらのプログラムのうち最もタイムスタンプが新しいプ
ログラムのチェックサムが正常であるか異常であるかを
判断するプログラムが含まれている。
In the first embodiment, an address data line 5 is connected to a central processing unit (CPU) 1.
Two boot ROMs 3 and 4 having the same capacity are connected to the address data line 5. The address data line 5 is connected to a selector 2 that decodes an address signal output from the CPU 1 and selects the boot ROM 3 or the boot ROM 4. Note that program data including a checksum and a time stamp are written in the boot ROMs 3 and 4, respectively. Each program has a program for comparing the time stamp of the program written in the boot ROM 3 with the time stamp of the program written in the boot ROM 4, and the checksum of the program with the latest time stamp among these programs is normal. And a program for determining whether the condition is abnormal.

【0020】セレクタ2には、選択されるブートROM
が設定された切替レジスタ8が設けられている。更に、
セレクタ2には、アドレスマップ上で切替レジスタ8に
設定されたブートROMのアドレスにオフセットを生じ
させ他方のブートROMが設定されたオフセットレジス
タ9が設けられている。従って、アドレスマップ上で
は、切替レジスタ8に設定されたブートROMに格納さ
れているプログラムが「ROM空間」の領域に書き込ま
れ、切替レジスタ8に設定されていないブートROMに
格納されているプログラムが「ROM空間+オフセッ
ト」の領域に書き込まれている。
The selector 2 has a boot ROM to be selected.
Is set in the switching register 8. Furthermore,
The selector 2 is provided with an offset register 9 that causes an offset in the address of the boot ROM set in the switching register 8 on the address map and sets the other boot ROM. Therefore, on the address map, the program stored in the boot ROM set in the switching register 8 is written in the “ROM space” area, and the program stored in the boot ROM not set in the switching register 8 is written. It is written in the area of “ROM space + offset”.

【0021】図2は本発明の第1の実施例における初期
状態を示すアドレスマップである。初期値で、例えば、
切替レジスタ8にブートROM3が設定されている場合
には、「ROM空間」の領域にブートROM3に格納さ
れたプログラムデータ、チェックサム及びタイムスタン
プが書き込まれ、「ROM空間+オフセット」の領域に
ブートROM4に格納されたプログラムデータ、チェッ
クサム及びタイムスタンプが書き込まれている。切替レ
ジスタ8にブートROM4が設定されている場合には、
ブートROM3のプログラムとブートROM4のプログ
ラムとが逆に書き込まれる。
FIG. 2 is an address map showing an initial state in the first embodiment of the present invention. By default, for example,
When the boot ROM 3 is set in the switching register 8, the program data, the checksum, and the time stamp stored in the boot ROM 3 are written in the “ROM space” area, and the boot ROM is written in the “ROM space + offset” area. The program data, the checksum, and the time stamp stored in the ROM 4 are written. When the boot ROM 4 is set in the switching register 8,
The program in the boot ROM 3 and the program in the boot ROM 4 are written in reverse.

【0022】セレクタ2からは、デコードしたアドレス
が「ROM空間」を示している場合には、切替レジスタ
8に設定されているブートROMにセレクト信号が出力
される。図2に示す状態では、ブートROM3にセレク
ト信号6が出力される。一方、デコードしたアドレスが
「ROM空間+オフセット」を示している場合には、切
替レジスタ8に設定されていないブートROMにセレク
ト信号が出力される。図2に示す状態では、ブートRO
M4にセレクト信号7が出力される。また、ブートRO
Mの切替が行われたときには、セレクタ2からCPU1
にリセット信号10が出力される。
When the decoded address indicates the “ROM space”, the selector 2 outputs a select signal to the boot ROM set in the switching register 8. In the state shown in FIG. 2, the select signal 6 is output to the boot ROM 3. On the other hand, if the decoded address indicates “ROM space + offset”, the select signal is output to the boot ROM not set in the switching register 8. In the state shown in FIG.
The select signal 7 is output to M4. Also, boot RO
When the switching of M is performed, the selector 2
Reset signal 10 is output.

【0023】次に、上述のように構成された第1の実施
例のブートプログラムの切替回路の動作について説明す
る。ここでは、初期状態で、図2に示すように、起動用
のブートROMとして切替レジスタ8にブートROM3
が設定されているものとする。
Next, the operation of the boot program switching circuit of the first embodiment configured as described above will be described. Here, in the initial state, as shown in FIG.
Is set.

【0024】先ず、CPU1がブートROMのアドレス
信号をアドレスデータ線5に出力する。セレクタ2は、
アドレスデータ線5から入力されるアドレス信号をデコ
ードする。この結果、そのアドレスが「ROM空間」を
示している場合には、セレクタ2はセレクト信号6を出
力する。そして、ブートROM3に格納されているプロ
グラムデータをCPU1が読み出し、その実行を開始す
る。
First, the CPU 1 outputs an address signal of the boot ROM to the address data line 5. Selector 2
The address signal input from the address data line 5 is decoded. As a result, when the address indicates “ROM space”, the selector 2 outputs the select signal 6. Then, the CPU 1 reads the program data stored in the boot ROM 3 and starts executing the program data.

【0025】その後、CPU1はブートROM3に書き
込まれているプログラムにより、「ROM空間」の領域
に書き込まれているタイムスタンプと「ROM空間+オ
フセット」の領域に書き込まれているタイムスタンプと
を比較する。
After that, the CPU 1 compares the time stamp written in the area of “ROM space” with the time stamp written in the area of “ROM space + offset” according to the program written in the boot ROM 3. .

【0026】この動作の前に、「ROM空間+オフセッ
ト」の領域が書き換えプログラムによりブートROMに
格納したいプログラムデータに書き込まれている場合、
即ち、ブートROMの内容に修正が必要とされ書き換え
が行われている場合、「ROM空間+オフセット」の領
域に書き込まれているタイムスタンプの方が「ROM空
間」の領域のものよりも新しい。この場合には、「RO
M空間+オフセット」の領域に書き込まれているプログ
ラムのチェックサムを計算する。
Before this operation, if the area of “ROM space + offset” has been written in the program data to be stored in the boot ROM by the rewriting program,
That is, when the contents of the boot ROM need to be modified and rewritten, the time stamp written in the “ROM space + offset” area is newer than that in the “ROM space” area. In this case, "RO
The checksum of the program written in the area of “M space + offset” is calculated.

【0027】そして、チェックサムに異常がなければ、
切替レジスタ8に設定されているブートROMをブート
ROM3からブートROM4へと切替えると共に、リセ
ット信号10をCPU1に出力する。図3は本発明の第
1の実施例においてブートROMの切替が行われた状態
を示すアドレスマップである。CPU1は、上述のリセ
ット信号を入力するとアドレスマップのリセットを行
い、「ROM空間」に割り当てるブートROMをブート
ROM3からブートROM4に切替え、「ROM空間+
オフセット」に割り当てるブートROMをブートROM
4からブートROM3に切り替える。この結果、ブート
(起動)時に読み出しが行われるブートROMがブート
ROM3からブートROM4に切り替わると共に、次に
書き込みが行われるブートROMがブートROM4から
ブートROM3に切り替わる。
If there is no abnormality in the checksum,
The boot ROM set in the switching register 8 is switched from the boot ROM 3 to the boot ROM 4, and a reset signal 10 is output to the CPU 1. FIG. 3 is an address map showing a state in which the boot ROM is switched in the first embodiment of the present invention. When the above-mentioned reset signal is input, the CPU 1 resets the address map, switches the boot ROM assigned to the “ROM space” from the boot ROM 3 to the boot ROM 4, and sets “ROM space +
Boot ROM assigned to "Offset"
4 to the boot ROM 3. As a result, the boot ROM from which reading is performed at the time of booting (booting) is switched from the boot ROM 3 to the boot ROM 4, and the boot ROM to be written next is switched from the boot ROM 4 to the boot ROM 3.

【0028】ブートROM4に格納されたプログラムに
も、タイムスタンプを確認するルーチン及びチェックサ
ムを計算して正常/異常を判断するルーチンが含まれて
いるので、その後、ブートROM3の内容が書き換えら
れると、その時点で、ブートROM4に格納されたプロ
グラムに従って上述のような再度ブートROMの切り替
えを行う。
The program stored in the boot ROM 4 also includes a routine for checking a time stamp and a routine for calculating a checksum to determine normality / abnormality. At that time, the boot ROM is switched again according to the program stored in the boot ROM 4.

【0029】以降、一方のブートROMの内容が書き換
えられるたびに、このようなブートROMの切替えを行
う。
Thereafter, each time the content of one boot ROM is rewritten, such boot ROM switching is performed.

【0030】なお、チェックサムに異常がある場合に
は、切替レジスタ8に設定されているブートROMの書
き換え及びリセット信号10のCPU1への出力は行わ
ない。
If the checksum is abnormal, the rewriting of the boot ROM set in the switching register 8 and the output of the reset signal 10 to the CPU 1 are not performed.

【0031】また、前述の動作の前にブートROM4の
書き換えが行われていない場合には、「ROM空間」の
領域に書き込まれているタイムスタンプの方が「ROM
空間+オフセット」の領域のものよりも新しいので、
「ROM空間+オフセット」の領域に書き込まれている
プログラムデータのチェックサムの計算は行わない。
If the boot ROM 4 has not been rewritten before the above-described operation, the time stamp written in the “ROM space” area is replaced with the “ROM space”.
Since it is newer than the space + offset area,
The checksum of the program data written in the area of “ROM space + offset” is not calculated.

【0032】更に、セレクタ2でデコードされたアドレ
スが「ROM空間+オフセット」を示している場合に
は、セレクタ2はセレクト信号7を出力する。そして、
ブートROM4に格納されているプログラムデータをC
PU1が読み出し、これを実行する。
Further, when the address decoded by the selector 2 indicates “ROM space + offset”, the selector 2 outputs a select signal 7. And
The program data stored in the boot ROM 4 is stored in C
PU1 reads and executes this.

【0033】このように、本実施例によれば、ブートR
OMにチェックサムを書き込み、そのチェックサムを計
算し、その結果、異常がない場合にのみブートROMの
切り替えを行う。従って、ブートROMの内容を書き損
じた場合にも、コンピュータが立ち上がらなくなること
が防止される。
As described above, according to the present embodiment, the boot R
The checksum is written into the OM, the checksum is calculated, and as a result, the boot ROM is switched only when there is no abnormality. Therefore, even if the contents of the boot ROM are miswritten, the computer is prevented from starting up.

【0034】また、ブートROMに書き込まれるプログ
ラムを、ブート(起動)時にROM空間に書き込まれて
いるチェックサムを計算し、このチェックサムに異常が
ある場合に「ROM空間+オフセット」のチェックサム
を確認するようにし、このチェックサムに異常がない場
合に切り替えを行うなものとしてもよい。このような構
成とすることにより、ブートROMの故障時にも書き換
え前の古いプログラムでブート(起動)することが可能
となるので、ブートROMが冗長化される。
The program written in the boot ROM is calculated by calculating the checksum written in the ROM space at the time of booting (starting), and if this checksum is abnormal, the checksum of “ROM space + offset” is calculated. Confirmation may be made, and if there is no abnormality in the checksum, switching may not be performed. With this configuration, the boot ROM can be booted (started) with an old program before rewriting even when the boot ROM fails, so that the boot ROM is made redundant.

【0035】次に、第2の実施例について説明する。第
1の実施例には、容量が等しい2個のブートROMが設
けられているが、第2の実施例には、大容量のブートR
OMが1個設けられている。図4は本発明の第2の実施
例に係るブートプログラムの切替回路の構成を示すブロ
ック図である。なお、図4に示す第2の実施例におい
て、図1に示す第1の実施例と同一の構成要素には、同
一の符号を付してその詳細な説明は省略する。
Next, a second embodiment will be described. In the first embodiment, two boot ROMs having the same capacity are provided, but in the second embodiment, a large-capacity boot ROM is provided.
One OM is provided. FIG. 4 is a block diagram showing a configuration of a boot program switching circuit according to the second embodiment of the present invention. In the second embodiment shown in FIG. 4, the same components as those in the first embodiment shown in FIG. 1 are denoted by the same reference numerals, and detailed description thereof will be omitted.

【0036】第2の実施例には、1個のブートROM1
1が設けられており、ブートROM11に2種類のブー
トプログラムが格納される第1プログラム領域11a及
び第2プログラム領域11bが設けられている。なお、
セレクタ2からは、ブートROM11に、第1プログラ
ム領域11a又は第2プログラム領域11bを選択する
セレクト信号12が出力される。
In the second embodiment, one boot ROM 1
1, a first program area 11a and a second program area 11b in which two types of boot programs are stored in the boot ROM 11. In addition,
From the selector 2, a select signal 12 for selecting the first program area 11 a or the second program area 11 b is output to the boot ROM 11.

【0037】このように構成された第2の実施例におい
ては、プログラムの書き換え及び読み出しを、第1の実
施例のようなブートROM単位ではなく、プログラム領
域単位で行う。
In the second embodiment configured as described above, rewriting and reading of the program are performed not in the unit of the boot ROM as in the first embodiment but in the unit of the program area.

【0038】なお、ブートROM11の容量は、少なく
とも2種類のプログラム領域を設けることができるもの
であれば、特に限定されるものではない。
The capacity of the boot ROM 11 is not particularly limited as long as at least two types of program areas can be provided.

【0039】次に、第3の実施例について説明する。第
1及び第2の実施例においては、CPU1がプログラム
を実行することにより、種々のチェック及び切替えを行
っているが、第3の実施例は、これらをオペレータが行
うようにしたものである。図5は本発明の第3の実施例
に係るブートプログラムの切替回路の構成を示すブロッ
ク図である。
Next, a third embodiment will be described. In the first and second embodiments, various checks and switching are performed by the CPU 1 executing the program. In the third embodiment, these are performed by the operator. FIG. 5 is a block diagram showing a configuration of a boot program switching circuit according to the third embodiment of the present invention.

【0040】第3の実施例においては、アドレスデータ
線5に接続されたセレクタ2a内に切替レジスタ8は設
けられておらず、その外部に切替スイッチ8aが接続さ
れている。切替スイッチ8aによりセレクタ2aに接地
電位又は5Vの電源電位が供給される。そして、この供
給される電位に関連づけてブートROM3又は4が選択
される。
In the third embodiment, the changeover register 8 is not provided in the selector 2a connected to the address data line 5, and the changeover switch 8a is connected to the outside thereof. The selector switch 2a supplies a ground potential or a power supply potential of 5 V to the selector 2a. Then, the boot ROM 3 or 4 is selected in association with the supplied potential.

【0041】このように構成された第3の実施例におい
ては、オペレータが書き換えられたブートROMの内容
の異常を確認し、切替スイッチ8aを操作することによ
り、ブートROM3とブートROM4とを切替える。
In the third embodiment configured as described above, the operator confirms an abnormality in the contents of the rewritten boot ROM, and operates the changeover switch 8a to switch between the boot ROM 3 and the boot ROM 4.

【0042】なお、第2の実施例と第3の実施例とを組
み合わせた構成とすることも可能である。
Incidentally, it is also possible to adopt a configuration in which the second embodiment and the third embodiment are combined.

【0043】[0043]

【発明の効果】以上詳述したように、本発明によれば、
プログラムデータに、破損又は書き損じがあっても起動
が不可能になることを防止することができると共に、容
易に正常な最新のブートプログラムを切替えることがで
きる。
As described in detail above, according to the present invention,
Even if the program data is damaged or miswritten, it is possible to prevent the boot from becoming impossible, and to easily switch the normal latest boot program.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明の第1の実施例に係るブートプログラム
の切替回路の構成を示すブロック図である。
FIG. 1 is a block diagram showing a configuration of a boot program switching circuit according to a first embodiment of the present invention.

【図2】本発明の第1の実施例における初期状態を示す
アドレスマップである。
FIG. 2 is an address map showing an initial state in the first embodiment of the present invention.

【図3】本発明の第1の実施例においてブートROMの
切替が行われた状態を示すアドレスマップである。
FIG. 3 is an address map showing a state in which boot ROM switching is performed in the first embodiment of the present invention.

【図4】本発明の第2の実施例に係るブートプログラム
の切替回路の構成を示すブロック図である。
FIG. 4 is a block diagram illustrating a configuration of a boot program switching circuit according to a second embodiment of the present invention.

【図5】本発明の第3の実施例に係るブートプログラム
の切替回路の構成を示すブロック図である。
FIG. 5 is a block diagram showing a configuration of a boot program switching circuit according to a third embodiment of the present invention.

【符号の説明】[Explanation of symbols]

1;CPU 2、2a;セレクタ 3、4、11;ブートROM 5;アドレスデータ線 6、7、12;セレクト信号 8;切替レジスタ 8a;切替スイッチ 9;オフセットレジスタ 10;リセット信号 11a、11b;プログラム領域 1; CPU 2, 2a; selectors 3, 4, 11; boot ROM 5; address data lines 6, 7, 12; select signal 8; switching register 8a; region

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 中央処理装置と、この中央処理装置が実
行する第1のブートプログラム、そのチェックサム及び
そのタイムスタンプを記憶する第1のプログラム記憶手
段と、前記中央処理装置が実行する第2のブートプログ
ラム、そのチェックサム及びそのタイムスタンプを記憶
する第2のプログラム記憶手段と、前記第1又は第2の
ブートプログラムのうち最もタイムスタンプが新しいブ
ートプログラムのチェックサムが正常である場合に前記
中央処理装置が実行するブートプログラムを切替える切
替手段と、を有することを特徴とするブートプログラム
の切替回路。
1. A central processing unit, a first boot program executed by the central processing unit, a first program storage means for storing a checksum thereof and a time stamp thereof, and a second program executed by the central processing unit. A second program storage means for storing a boot program, a checksum thereof, and a time stamp thereof, and a boot program having a newest time stamp among the first or second boot programs when the checksum is normal. Switching means for switching a boot program to be executed by the central processing unit.
【請求項2】 前記第1及び第2のブートプログラム
は、前記第1のブートプログラムのタイムスタンプと第
2のブートプログラムのタイムスタンプとを比較するプ
ログラムと、前記第1又は第2のブートプログラムのう
ち最もタイムスタンプが新しいブートプログラムのチェ
ックサムが正常であるか異常であるかを判断するプログ
ラムと、を有することを特徴とする請求項1に記載のブ
ートプログラムの切替回路。
2. The first and second boot programs include a program for comparing a time stamp of the first boot program and a time stamp of a second boot program, and the first or second boot program. The boot program switching circuit according to claim 1, further comprising: a program for determining whether the checksum of the boot program whose time stamp is newest is normal or abnormal.
【請求項3】 前記切替手段は、前記中央処理装置から
出力されたアドレス信号に関連づけて前記第1又は第2
のブートプログラムを選択する選択手段を有することを
特徴とする請求項1又は2に記載のブートプログラムの
切替回路。
3. The switching means according to claim 1, wherein said switching means relates to said first or second address signal outputted from said central processing unit.
3. The boot program switching circuit according to claim 1, further comprising a selection unit for selecting the boot program.
【請求項4】 前記切替手段は、前記中央処理装置に接
続され前記中央処理装置に実行されるブートプログラム
が設定されるレジスタを備えた選択回路を有することを
特徴とする請求項1乃至3のいずれか1項に記載のブー
トプログラムの切替回路。
4. The apparatus according to claim 1, wherein said switching means includes a selection circuit having a register connected to said central processing unit and configured to set a boot program to be executed by said central processing unit. A boot program switching circuit according to claim 1.
【請求項5】 前記切替手段は、前記中央処理装置に接
続され前記中央処理装置に実行されるブートプログラム
を手動で設定するためのスイッチを備えた選択回路を有
することを特徴とする請求項1乃至3のいずれか1項に
記載のブートプログラムの切替回路。
5. The switching device according to claim 1, wherein the switching means includes a selection circuit connected to the central processing unit and provided with a switch for manually setting a boot program to be executed on the central processing unit. The boot program switching circuit according to any one of claims 1 to 3.
【請求項6】 中央処理装置が実行する第1のブートプ
ログラムの第1のタイムスタンプ及び前記中央処理装置
が実行する第2のブートプログラムの第2のタイムスタ
ンプを夫々第1及び第2のプログラム記憶手段から読み
出す工程と、前記第1のタイムスタンプと前記のタイム
スタンプとを比較する工程と、前記第1又は第2のブー
トプログラムのうち最もそのタイムスタンプが新しいブ
ートプログラムのチェックサムが正常であるか異常であ
るかを判断する工程と、前記チェックサムが正常である
場合に前記中央処理装置が実行するブートプログラムを
切替える工程と、を有することを特徴とするブートプロ
グラムの切替方法。
6. A first time stamp of a first boot program executed by the central processing unit and a second time stamp of a second boot program executed by the central processing unit, the first and second programs respectively. A step of reading from the storage means, a step of comparing the first time stamp with the time stamp, and a step in which the first or second boot program has a normal checksum of a boot program whose time stamp is newest. A boot program switching method, comprising: determining whether the checksum is abnormal; and switching a boot program executed by the central processing unit when the checksum is normal.
JP11098177A 1999-04-05 1999-04-05 Circuit and method for switching boot program Pending JP2000293376A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11098177A JP2000293376A (en) 1999-04-05 1999-04-05 Circuit and method for switching boot program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11098177A JP2000293376A (en) 1999-04-05 1999-04-05 Circuit and method for switching boot program

Publications (1)

Publication Number Publication Date
JP2000293376A true JP2000293376A (en) 2000-10-20

Family

ID=14212763

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11098177A Pending JP2000293376A (en) 1999-04-05 1999-04-05 Circuit and method for switching boot program

Country Status (1)

Country Link
JP (1) JP2000293376A (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003044307A (en) * 2001-07-31 2003-02-14 Nec Corp Radio communication equipment, method for rewriting its boot program, and program
JP2004355067A (en) * 2003-05-27 2004-12-16 Konica Minolta Business Technologies Inc Information processor
KR100604877B1 (en) 2004-07-03 2006-07-31 삼성전자주식회사 Apparatus and method for controlling memory address mapping in embedded system
JP2008217636A (en) * 2007-03-07 2008-09-18 Alpine Electronics Inc Data processor and program start method
JP2013137732A (en) * 2011-11-30 2013-07-11 Mitsubishi Electric Corp Information processor, broadcasting receiver and software starting method
JP2014089497A (en) * 2012-10-29 2014-05-15 Mitsubishi Electric Corp Information processing device
JPWO2018150820A1 (en) * 2017-02-17 2019-07-18 日立オートモティブシステムズ株式会社 Information processing device

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003044307A (en) * 2001-07-31 2003-02-14 Nec Corp Radio communication equipment, method for rewriting its boot program, and program
US6934537B2 (en) 2001-07-31 2005-08-23 Nec Corporation Radio communication device, method of and program for rewriting boot program therefor
JP2004355067A (en) * 2003-05-27 2004-12-16 Konica Minolta Business Technologies Inc Information processor
KR100604877B1 (en) 2004-07-03 2006-07-31 삼성전자주식회사 Apparatus and method for controlling memory address mapping in embedded system
JP2008217636A (en) * 2007-03-07 2008-09-18 Alpine Electronics Inc Data processor and program start method
JP2013137732A (en) * 2011-11-30 2013-07-11 Mitsubishi Electric Corp Information processor, broadcasting receiver and software starting method
JP2014089497A (en) * 2012-10-29 2014-05-15 Mitsubishi Electric Corp Information processing device
JPWO2018150820A1 (en) * 2017-02-17 2019-07-18 日立オートモティブシステムズ株式会社 Information processing device

Similar Documents

Publication Publication Date Title
US7750676B2 (en) Embedded system and control method therefor
KR100415371B1 (en) Computer
KR100316981B1 (en) Microcomputer provided with flash memory and method of storing program into flash memory
WO2000019317A1 (en) Protection of boot block code while allowing write accesses to the boot block
KR100541781B1 (en) Information processing apparatus and method
JP2007193596A (en) Firmware updating circuit and firmware updating method
US5933595A (en) Computer apparatus having electrically rewritable nonvolatile memory, and nonvolatile semiconductor memory
US20030076311A1 (en) Computer having a display interface with two basic input/output systems
CN110809755A (en) Electronic control system
JP3830867B2 (en) Single-chip microcomputer and its boot area switching method
JP2000293376A (en) Circuit and method for switching boot program
US6934537B2 (en) Radio communication device, method of and program for rewriting boot program therefor
JP2001117766A (en) Information processor with patch function of mask rom
JPH11265283A (en) Correction method for firmware in storage device, and storage device
JP2003271420A (en) Electronic control device
JP5233869B2 (en) Processing system and method for executing program executed by processing apparatus
JP2001344156A (en) Device with flash memory and data rewriting method
JPH10283171A (en) Information processor and control method therefor
JP2005128613A (en) Image forming device
JP2853593B2 (en) Download device
JP2003242046A (en) Information processor, and operational method and program for information processor
JPH0973437A (en) Multi-cpu system
JP2002024044A (en) Controller
JPH1050086A (en) Microcomputer having eeprom and its rewriting method
JP2001256061A (en) Information storage device