JPH06119199A - Execution control system for test program - Google Patents

Execution control system for test program

Info

Publication number
JPH06119199A
JPH06119199A JP4265096A JP26509692A JPH06119199A JP H06119199 A JPH06119199 A JP H06119199A JP 4265096 A JP4265096 A JP 4265096A JP 26509692 A JP26509692 A JP 26509692A JP H06119199 A JPH06119199 A JP H06119199A
Authority
JP
Japan
Prior art keywords
program
architecture
test program
interrupt
instruction
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.)
Granted
Application number
JP4265096A
Other languages
Japanese (ja)
Other versions
JP2835896B2 (en
Inventor
Satoshi Matsushita
聡志 松下
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.)
PFU Ltd
Original Assignee
PFU Ltd
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 PFU Ltd filed Critical PFU Ltd
Priority to JP4265096A priority Critical patent/JP2835896B2/en
Publication of JPH06119199A publication Critical patent/JPH06119199A/en
Application granted granted Critical
Publication of JP2835896B2 publication Critical patent/JP2835896B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Test And Diagnosis Of Digital Computers (AREA)

Abstract

PURPOSE:To test a part to control a system such as the conversion mechanism of a dynamic address and a storage protective mechanism, etc., by generating an address conversion table independently by a test program, and performing the test of the address conversion mechanism and the storage protective mechanism managed by a monitor program in the ordinary operation of a computer. CONSTITUTION:IPL is performed in step S1, and the monitor program is loaded by the IPL. The monitor program is not provided with the address conversion table, and it can control two kinds of programs for architecture, and is provided with a state of PSW when control is delivered to the program. Other setting is performed by the monitor program in step S2, and the test program is loaded according to the instruction of an operator in step S3. The address conversion table is generated by the test program in step S4, and the setting of the storage protective mechanism is performed by the test program in step S4, and also, the test program is executed in step S6.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明は、動的アドレス変換機構
や記憶保護機構などのシステム制御を行う部分のテスト
を行い得るようになったテストプログラムの実行制御方
式に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a test program execution control system capable of testing a system control portion such as a dynamic address translation mechanism and a memory protection mechanism.

【0002】[0002]

【従来の技術】図8は従来のテストの処理手順を示す図
である。ステップS1ではIPLが行われ、モニタプロ
グラムがローディングされる。ステップS2では、モニ
タプログラムによって、アドレス変換テーブルの作成が
行われる。ステップS3では、記憶保護機構(リングN
o.)の設定が行われる。ステップS4では、その他の
設定(割込み処理など)が行われる。ステップS5で
は、オペレータの指示に従って、テストプログラム(T
P)がローディングされる。ステップS6では、テスト
プログラムを実行することにより、テストが行われる。
2. Description of the Related Art FIG. 8 is a diagram showing a conventional test processing procedure. In step S1, IPL is performed and the monitor program is loaded. In step S2, the monitor program creates an address conversion table. In step S3, the memory protection mechanism (ring N
o. ) Is set. In step S4, other settings (interrupt processing, etc.) are performed. In step S5, the test program (T
P) is loaded. In step S6, a test is performed by executing the test program.

【0003】図9は従来のテストプログラムのローディ
ング時の動作を示す図である。ステップS1では、テス
トプログラムをローディングする。ステップS2では、
PSWのアーキテクチャ・モードを旧アーキテクチャに
設定する。ステップS3では、テストプログラムに制御
を渡す。ステップS4では、旧アーキテクチャのテスト
プログラムを実行する。なお、旧アーキテクチャとは、
現在の計算機および新製品の計算機上で動作可能とする
論理的な構成を意味し、新アーキテクチャとは新製品の
計算機上でのみ動作可能とする論理的な構成を意味して
いる。
FIG. 9 is a diagram showing an operation at the time of loading a conventional test program. In step S1, a test program is loaded. In step S2,
Set the PSW architecture mode to old architecture. In step S3, control is passed to the test program. In step S4, the test program of the old architecture is executed. The old architecture is
It means a logical configuration that can operate on the current computer and a new product computer, and the new architecture means a logical configuration that can operate only on the new product computer.

【0004】モニタプログラムは、テストプログラムを
制御監視(テストプログラムのローディング/スター
ト,割込みの監視など)をするものである。テストプロ
グラムは、計算機のハードウェアおよびファームウェア
のテストを行うものである。本発明のテストプログラム
は、CPUに関するハードウェア及びファームウェアの
テストを行うものである。
The monitor program is for controlling and monitoring the test program (loading / starting the test program, monitoring interrupts, etc.). The test program tests the hardware and firmware of the computer. The test program of the present invention tests the hardware and firmware of the CPU.

【0005】アドレス変換機構とは、仮想記憶方式を実
現する場合、オペレーティング・システムを援助するた
めに、ハードウェアに装備されている機能である。仮想
記憶方式とはプログラムが実際の主記憶装置の容量を意
識することなく、それよりも遙かに大きな容量の論理ア
ドレス空間を使用可能にしたものである。プログラムは
論理アドレス空間を使用することによって、あたかも連
続したアドレスを主記憶装置内に与えられているものと
考えてプログラムを作成することが可能である。
The address translation mechanism is a function provided in hardware to assist the operating system when implementing the virtual memory system. The virtual memory system allows a program to use a logical address space of a much larger capacity than the actual memory capacity of the main memory. By using the logical address space, the program can create the program as if continuous addresses were given in the main memory.

【0006】アドレス変換テーブルは、論理アドレスを
実アドレスに変換するための対応表である。このアドレ
ス変換テーブルは、ブロック・テーブル,セグメント・
テーブル,ページ・テーブルの3種類のテーブルから構
成されている。アドレス変換テーブル作成とは、この対
応表を主記憶上に展開することである。
The address conversion table is a correspondence table for converting a logical address into a real address. This address translation table is used for block table, segment
It consists of three types of tables: tables and page tables. Creating the address conversion table means expanding this correspondence table in the main memory.

【0007】図10はアドレス変換テーブルの概要を説
明する図である。論理アドレスは、ブロック番号,セグ
メント番号,ページ番号およびページ内変位から構成さ
れている。ブロック・テーブルは複数のエントリを有し
ており、各エントリにはエントリ有効/無効ビット及び
セグメント・テーブル先頭アドレスが記入される。セグ
メント・テーブルは複数のエントリを有しており、各エ
ントリにはエントリ有効/無効ビット,リング番号及び
ページ・テーブル先頭アドレスが記入される。ページ・
テーブルは複数のエントリを有しており、各エントリに
はエントリ有効/無効ビット及びページ・アドレスが記
入される。
FIG. 10 is a diagram for explaining the outline of the address conversion table. The logical address is composed of a block number, a segment number, a page number and a displacement within a page. The block table has a plurality of entries, and the entry valid / invalid bit and the segment table start address are written in each entry. The segment table has a plurality of entries, and entry valid / invalid bits, ring numbers and page table start addresses are written in each entry. page·
The table has a plurality of entries, each entry having an entry valid / invalid bit and a page address.

【0008】論理アドレスから実アドレスへの変換は次
のようにして行われる。先ず、論理アドレスのブロック
番号に対応するブロック・テーブルのエントリを読み出
し、セグメント・テーブル先頭アドレスを求める。次
に、求めたセグメント・テーブル先頭アドレスで指定さ
れるセグメント・テーブル中における論理アドレスのセ
グメント番号に対応するエントリを読み出し、ページ・
テーブル先頭アドレスを求める。次に、求めたページ・
テーブル先頭アドレスで指定されるページ・テーブル中
における論理アドレスのページ番号に対応するエントリ
を読み出し、ページ・アドレスを求める。次に、求めた
ページ・アドレスと,論理アドレスのページ内変位とを
加算することにより、実アドレスを得る。
The conversion from the logical address to the real address is performed as follows. First, the entry of the block table corresponding to the block number of the logical address is read to obtain the segment table start address. Next, the entry corresponding to the segment number of the logical address in the segment table specified by the obtained segment table start address is read,
Find the table top address. Next, the requested page
The entry corresponding to the page number of the logical address in the page table specified by the table top address is read to obtain the page address. Next, the real address is obtained by adding the obtained page address and the displacement within the page of the logical address.

【0009】実行中のプログラムが他のプログラムの領
域やデータ領域,オペレーティング・システムの領域を
誤ってアクセスすると、プログラムの暴走を起こした
り、他のプログラムやデータを破壊してしまうことがあ
る。記憶保護機構は、このような事態の発生を防ぐため
のものである。記憶保護機構により、もしも誤った領域
がアクセスされた場合は、実行は抑止または打ち切ら
れ、記憶保護例外のプログラム割込みが発生する。記憶
保護機能は、セグメント単位の論理アドレス空間に対し
て行われる。
If the program being executed mistakenly accesses the area of another program, the data area, or the area of the operating system, the program may run away or the other program or data may be destroyed. The memory protection mechanism is for preventing such a situation from occurring. If the wrong area is accessed by the storage protection mechanism, execution is suppressed or aborted and a storage exception program interrupt occurs. The memory protection function is performed on the logical address space of each segment.

【0010】記憶保護機能には、セグメントのリング番
号(セグメント・テーブルのエントリ内の領域で指定す
る)とPSWのリング番号(プログラム状態語で指定す
る)との大小によって記憶保護を行うリング保護機能
と、リミット・レジスタ外の領域の記憶保護を行うリミ
ット保護機能の2種の機能がある。記憶保護機構の設定
とは、セグメント・テーブルのエントリ内の領域にリン
グ番号を設定することである。
The storage protection function is a ring protection function that protects the storage by the size of the segment ring number (designated by the area in the entry of the segment table) and the PSW ring number (designated by the program status word). And the limit protection function that protects the memory outside the limit register. The setting of the storage protection mechanism is to set the ring number in the area in the entry of the segment table.

【0011】図11は記憶保護機構の概要を説明するた
めの図である。図示の例では、主記憶は、モニタプログ
ラムの領域,アドレス変換テーブルの領域,領域A,テ
ストプログラムの領域,領域Bに分割され、モニタプロ
グラムの領域のリング番号は1とされ、アドレス変換テ
ーブルの領域のリング番号は2とされ、領域Aのリング
番号は3とされ、テストプログラムの領域のリング番号
は5とされ、領域Bのリング番号は6とされている。
FIG. 11 is a diagram for explaining the outline of the memory protection mechanism. In the illustrated example, the main memory is divided into a monitor program area, an address conversion table area, an area A, a test program area, and an area B. The ring number of the monitor program area is set to 1 and the address conversion table area is set. The ring number of the area is 2, the ring number of the area A is 3, the ring number of the area of the test program is 5, and the ring number of the area B is 6.

【0012】図示の例において、モニタプログラムが動
作する時の現PSWのリング番号が0の場合、主記憶上
の全ての領域がリード/ライト可能になる。また、テス
トプログラムが動作する時の現PSW(モニタプログラ
ムによって与えられる)のリング番号が4である場合、
テストプログラムの領域と領域Bはリード/ライト可能
であるが、モニタプログラムの領域,アドレス変換テー
ブルの領域および領域Aはライト不可である。
In the illustrated example, when the ring number of the current PSW when the monitor program operates is 0, all areas on the main memory can be read / written. If the ring number of the current PSW (given by the monitor program) when the test program operates is 4,
The area of the test program and the area B can be read / written, but the area of the monitor program, the area of the address conversion table and the area A cannot be written.

【0013】割込みの機能は、システムの内部や外部あ
るいはCPU自身の条件により、CPUの状態を変化さ
せる機能である。割込みは、入出力割込み,プログラム
割込み,スーパーバイザ・コール割込み,機械割込みの
4種類に分類されている。割込み要因が発生し且つCP
Uが此れを受け入れる状態にあれば、現PSWを旧PS
Wとして主記憶の固定番地に格納し、予め主記憶の固定
番地に格納されている新PSWを現PSWとして読み出
し、続いてCPUは新しいPSWで規定される処理に移
る。図8の「その他の設定」とは、各割込みが発生した
場合に割込み発生時の処理を実行できるように、主記憶
の固定番地に新PSWを設定することを意味している。
The interrupt function is a function for changing the state of the CPU according to the conditions inside or outside the system or the condition of the CPU itself. Interrupts are classified into four types: input / output interrupts, program interrupts, supervisor call interrupts, and machine interrupts. An interrupt factor occurs and CP
If U is ready to accept this, replace the current PSW with the old PS
W is stored in the fixed address of the main memory as the W, the new PSW stored in advance in the fixed address of the main memory is read as the current PSW, and then the CPU shifts to the process defined by the new PSW. The "other setting" in FIG. 8 means that a new PSW is set at a fixed address in the main memory so that the processing at the time of interrupt occurrence can be executed when each interrupt occurs.

【0014】[0014]

【発明が解決しようとする課題】通常,モニタプログラ
ムは、テストプログラムがモニタの領域を破壊しないよ
うに、テストプログラム側からモニタの領域を破壊しよ
うとすると、記憶保護例外の割込みを発生するようにア
ドレス変換テーブルを作成する。したがって、アドレス
変換テーブル自身もモニタの資産であるため、テストプ
ログラムがアドレス変換テーブルを変更しようとする
と、記憶保護例外となる。
Normally, the monitor program generates a memory protection exception interrupt when the test program tries to destroy the monitor area so that the test program does not destroy the monitor area. Create an address translation table. Therefore, since the address translation table itself is also an asset of the monitor, when the test program tries to change the address translation table, a memory protection exception occurs.

【0015】図8のような従来方式では、テストプログ
ラムはモニタプログラムが作成したアドレス変換テーブ
ルや記憶保護の制御の下で動作するために、これらの診
断ができない。すなわち、テストプログラムは、モニタ
プログラムの資源を破壊することができない。また、図
9のような従来方式では、新アーキテクチャの命令セッ
トで記述したテストプログラムを実行することが出来な
い。
In the conventional system as shown in FIG. 8, the test program operates under the control of the address conversion table created by the monitor program and the memory protection, so that the diagnosis cannot be performed. That is, the test program cannot destroy the resources of the monitor program. Further, in the conventional method as shown in FIG. 9, it is impossible to execute the test program described by the instruction set of the new architecture.

【0016】本発明の第1の目的は、この点に鑑みて創
作されたものであって、動的アドレス変換機構や記憶保
護機構などのシステムを制御する部分のテストを行い得
るようにすることにある。本発明の第2の目的は、命令
セットが異なる2種類のテストプログラムを1つの計算
機上で動作させることにある。本発明の第3の目的は、
2種類の異なるテストプログラムが発生した割込みを処
理できるようにすることにある。
A first object of the present invention was created in view of this point, and it is possible to perform a test of a portion that controls a system such as a dynamic address translation mechanism and a memory protection mechanism. It is in. A second object of the present invention is to operate two kinds of test programs having different instruction sets on one computer. The third object of the present invention is to
It is to be able to handle interrupts generated by two different test programs.

【0017】[0017]

【課題を解決するための手段】そしてそのため、請求項
1のテストプログラムの実行制御方式は、テストプログ
ラムが独自にアドレス変換テーブルを作成し、記憶保護
の設定を行い、計算機の通常動作時にはモニタプログラ
ムが管理するアドレス変換機構や記憶保護機構のテスト
を行うことを特徴とするものである。
Therefore, according to the test program execution control method of claim 1, the test program creates its own address translation table, sets the memory protection, and monitors the program during normal operation of the computer. It is characterized by testing the address translation mechanism and the memory protection mechanism managed by.

【0018】請求項2のテストプログラムの実行制御方
式は、テストプログラムをローディングし、ローディン
グしたテストプログラムの先頭の命令を判断し、当該先
頭命令が第1のアーキテクチャの命令か,第2のアーキ
テクチャの命令かを調べ、第1のアーキテクチャの命令
である場合には、プログラム状態語のアーキテクチャ・
モードを所定値に設定して、当該テストプログラムを実
行し、第2のアーキテクチャの命令である場合には、プ
ログラム状態語のアーキテクチャ・モードを他の所定値
に設定して、当該テストプログラムを実行することを特
徴とするものである。
According to another aspect of the test program execution control method of the present invention, the test program is loaded, the first instruction of the loaded test program is determined, and the first instruction is the instruction of the first architecture or the instruction of the second architecture. If it is an instruction of the first architecture, the program state word architecture
Set the mode to a predetermined value and execute the test program. If the instruction is of the second architecture, set the architecture mode of the program state word to another predetermined value and execute the test program. It is characterized by doing.

【0019】請求項3のテストプログラムの実行制御方
式は、テストプログラムが発生する割込みの種類を登録
し、テストプログラムで割込みが発生した場合、当該割
込みが期待した割込みであるか否かを調べ、期待した割
込みである場合には、割込み時のプログラム状態語のア
ーキテクチャ・モードを判断し、アーキテクチャモード
が第1のアーキテクチャ・モードか,第2のアーキテク
チャ・モードかを調べ、第1のアーキテクチャ・モード
の場合には、第1のアーキテクチャのインタフェースに
合わせた処理を行い、プログラム状態語のアーキテクチ
ャ・モードを第1のアーキテクチャに設定し、テストプ
ログラムに制御を渡し、第2のアーキテクチャ・モード
の場合には、第2のアーキテクチャのインタフェースに
合わせた処理を行い、プログラム状態語のアーキテクチ
ャ・モードを第2のアーキテクチャに設定し、テストプ
ログラムに制御を渡すことを特徴とするものである。
According to the test program execution control method of claim 3, the type of interrupt generated by the test program is registered, and when an interrupt occurs in the test program, it is checked whether or not the interrupt is the expected interrupt. If the interrupt is the expected interrupt, the architecture mode of the program state word at the time of the interrupt is determined, the architecture mode is checked to determine whether it is the first architecture mode or the second architecture mode, and the first architecture mode In the case of, the processing according to the interface of the first architecture is performed, the architecture mode of the program state word is set to the first architecture, control is passed to the test program, and in the case of the second architecture mode, Performs processing according to the interface of the second architecture. , Set the architecture mode program status word to the second architecture, it is characterized in that passes control to the test program.

【0020】[0020]

【実施例】図1は本発明におけるテストの処理手順を示
す図である。ステップS1では、IPLを行う。IPL
によって、モニタプログラムがローディングされる。本
発明のモニタプログラムは、 アドレス変換テーブル(記憶保護を含む)を持たな
い。 2種類のアーキテクチャのプログラムを制御でき
る。 プログラムに制御を渡す時のPSWの状態(リング
番号など)を持つ。 と言う点で従来のモニタプログラムと相違している。
DESCRIPTION OF THE PREFERRED EMBODIMENTS FIG. 1 is a diagram showing a test processing procedure in the present invention. In step S1, IPL is performed. IPL
Causes the monitor program to be loaded. The monitor program of the present invention does not have an address conversion table (including storage protection). It can control programs with two different architectures. Holds the PSW state (ring number, etc.) when control is passed to the program. This is different from the conventional monitor program.

【0021】ステップS2では、モニタプログラムによ
って、その他の設定(割込み処理など)を行う。ステッ
プS3では、オペレータの指示に従い、テストプログラ
ムをロードする。本発明のテストプログラムは、アドレ
ス変換テーブル(記憶保護を含む)を持つと言う点で、
従来のテストプログラムと相違している。ステップS4
では、テトスプログラムがアドレス変換テーブルを作成
する。ステップS5では、テストプログラムが記憶保護
機構(リングNo.)の設定を行う。ステップS6で
は、テストプログラムを実行する。
In step S2, other settings (interrupt processing, etc.) are made by the monitor program. In step S3, the test program is loaded according to the instruction of the operator. The test program of the present invention has an address translation table (including memory protection),
It is different from the conventional test program. Step S4
Then, the Tetos program creates the address translation table. In step S5, the test program sets the memory protection mechanism (ring No.). In step S6, the test program is executed.

【0022】代表的なテストの具体例を2件以下に記述
する。 (1) ブロック変換指定のテスト ブロック・テーブルの無効ビットがONの領域をアクセ
スした場合、ブロック変換例外のプログラム割込みが発
生することを確認する。また、指定した論理アドレス
(各テーブルの無効ビットがOFF)が期待した実アド
レスと一致することを確認する。 (2) 記憶保護例外のテスト 現PSWのリング番号よりも小さいセグメント・リング
番号が割り当てられた領域にライトしようとした場合、
記憶保護例外のプログラム割込みが発生することを確認
すく。また、現PSWのリング番号よりも大きいセグメ
ント・リング番号が割り当てられた領域には正常にリー
ド/ライト出来ることを確認する。
Two specific examples of typical tests will be described below. (1) Block conversion specification test Confirm that a block conversion exception program interrupt is generated when an area where the invalid bit of the block table is ON is accessed. Also, it is confirmed that the specified logical address (the invalid bit of each table is OFF) matches the expected real address. (2) Memory protection exception test If an attempt is made to write to an area assigned a segment ring number smaller than the ring number of the current PSW,
Confirm that a memory protection exception program interrupt has occurred. Further, it is confirmed that the area assigned with the segment ring number larger than the ring number of the current PSW can be normally read / written.

【0023】図2は本発明で使用するPSW(プログラ
ム状態語)の構成を示す図である。本発明で使用するP
SWは、アーキテクチャ・モード指定ビットを有してい
る。旧のアーキテクチャの場合にはアーキテクチャ・モ
ード指定ビットは0とされ、新のアーキテクチャの場合
にはアーキテクチャ・モード指定ビットは1とされる。
アーキテクチャ・モード指定ビットが0の状態の下で新
のアーキテクチャ用の命令を実行しようとすると、プロ
グラム割込みが発生する。同様に、アーキテクチャ・モ
ード指定ビットが1の状態の下で旧のアーキテクチャ用
の命令を実行しようとすると、プログラム割込みが発生
する。なお、本発明におけるモニタプログラムは、基本
的に旧アーキテクチャで動作する。
FIG. 2 is a diagram showing the structure of the PSW (program status word) used in the present invention. P used in the present invention
SW has an architecture mode designation bit. The architecture mode designation bit is set to 0 in the case of the old architecture, and the architecture mode designation bit is set to 1 in the case of the new architecture.
If an attempt is made to execute an instruction for a new architecture while the architecture mode specification bit is 0, a program interrupt will occur. Similarly, attempting to execute an instruction for the old architecture while the architecture mode designation bit is 1 will cause a program interrupt. The monitor program of the present invention basically operates on the old architecture.

【0024】図3は新旧アーキテクチャの命令セットを
説明する図である。旧のアーキテクチャでは分岐命令は
GOであり、新のアーキテクチャでは分岐命令はJUM
Pである。旧アーキ命令セットを使用したテストプログ
ラムの先頭命令はGOとなっており、新アーキ命令セッ
トを使用したテストプログラムの先頭命令はJUMPと
なっている。
FIG. 3 is a diagram for explaining the instruction set of the old and new architectures. The branch instruction is GO in the old architecture, and the branch instruction is JUM in the new architecture.
P. The head instruction of the test program using the old arch instruction set is GO, and the head instruction of the test program using the new arch instruction set is JUMP.

【0025】図4は新旧アーキテクチャの汎用レジスタ
を示す図である。旧のアーキテクチャにおいてはR0な
いしR15の16個の汎用レジスタが存在し、各汎用レ
ジスタは2バイト構成である。新のアーキテクチャで
は、R0ないしR31の32個の汎用レジスタが存在
し、各汎用レジスタは4バイト構成である。
FIG. 4 is a diagram showing general-purpose registers of the old and new architectures. In the old architecture, there are 16 general-purpose registers R0 to R15, and each general-purpose register has a 2-byte structure. In the new architecture, there are 32 general-purpose registers R0 to R31, and each general-purpose register has a 4-byte structure.

【0026】図5は本発明におけるテストプログラムの
ローディング時の処理を示す図である。本発明の計算機
は旧形式のものであるが、特殊なファームウェアでエミ
ュレーション(新アーキテクチャの命令セットを動作可
能とする)ことにより、旧アーキテクチャのテストプロ
グラム又は新アーキテクチャのテストプログラムを実行
できる。新アーキテクチャのテストプログラムを実行す
るのは、このテストプログラムのデバッグのためのであ
る。
FIG. 5 is a diagram showing a process at the time of loading the test program in the present invention. Although the computer of the present invention is of the old type, it can execute the test program of the old architecture or the test program of the new architecture by emulating with the special firmware (making the instruction set of the new architecture operable). Running the test program of the new architecture is for debugging this test program.

【0027】ステップS1では、テストプログラムをロ
ーディングする。ステップS2では、ローディングした
テストプログラムの先頭の命令を判断する。ステップS
3では、旧アーキの命令か否かを調べる。Yesの場合
はステップS4に進み、Noの場合はステップS7に進
む。
In step S1, a test program is loaded. In step S2, the first instruction of the loaded test program is determined. Step S
At 3, it is checked whether it is an old arche instruction. If Yes, the process proceeds to step S4, and if No, the process proceeds to step S7.

【0028】ステップS4ではPSWのアーキテクチャ
・モードを旧アーキに設定する。ステップS5では、テ
ストプログラムに制御を渡す。ステップS6では、旧ア
ーキのテストプログラムを実行する。ステップS7では
PSWのアーキテクチャ・モードを新アーキに設定す
る。ステップS8では、テストプログラムに制御を渡
す。ステップS9では、新アーキのテストプログラムを
実行する。
In step S4, the architecture mode of PSW is set to old arch. In step S5, control is passed to the test program. In step S6, the old arch test program is executed. In step S7, the architecture mode of PSW is set to new arch. In step S8, control is passed to the test program. In step S9, the new arch test program is executed.

【0029】図6及び図7は本発明による割込み発生時
の動作を説明する図である。ステップS1では、テスト
プログラムが割込み監視要求を発行する。通常のテスト
プログラムを実行中にプログラム割込みが発生した場
合、モニタプログラムに制御が渡り、異常終了を行う。
本発明のテストプログラムは意図的にプログラム割込み
を発生させる(アドレス変換や記憶保護のテストを行
う)ため、プログラム割込みが発生しても異常終了しな
いように、予めモニタプログラムに通知する。割込み監
視要求のためには、スーパバイザ・コール割込みを発生
する命令を使用する。(モニタプログラムとインタフェ
ースを合わせなければならない。当割込みが発生する
と、モニタプログラムは、テストプログラムの実行中に
プログラム割込みが発生しても、異常終了しないように
処理する。処理終了後、再びテストプログラムに制御を
渡す)
6 and 7 are diagrams for explaining the operation when an interrupt occurs according to the present invention. In step S1, the test program issues an interrupt monitoring request. If a program interrupt occurs during execution of a normal test program, control passes to the monitor program, causing abnormal termination.
Since the test program of the present invention intentionally generates a program interrupt (tests for address conversion and memory protection), it notifies the monitor program in advance so that it will not end abnormally even if a program interrupt occurs. An instruction for issuing a supervisor call interrupt is used for the interrupt monitoring request. (You must match the interface with the monitor program. When this interrupt occurs, the monitor program will handle it so that it will not end abnormally even if a program interrupt occurs during execution of the test program. Pass control to)

【0030】ステップS2では、モニタが割込み登録を
行う。ステップS3では、テストプログラムが割込みを
発生する。ステップS4では、モニタが期待した割込み
か否かを調べる。Yesの場合はステップS5に進み、
Noの場合は異常終了する。ステップS5では割込み時
のPSWのアーキテクチャ・モードを判断する。
In step S2, the monitor registers an interrupt. In step S3, the test program generates an interrupt. In step S4, it is checked whether the monitor is the expected interrupt. If Yes, go to step S5
If No, the process ends abnormally. In step S5, the architecture mode of the PSW at the time of interruption is determined.

【0031】ステップS6では、旧アーキテクチャ・モ
ードか否かを調べる。Yesの場合はステップS7に進
み、Noの場合はステップS9に進む。ステップS7で
は、旧アーキのインタフェースに合わせた処理を行う。
例えば、モニタプログラムは、再びテストプログラムに
制御を渡す時に、テストプログラムが使用していた時の
テストプログラムの状態を復元(予め退避)しなければ
ならない。レジスタの退避/復元は、旧アーキの場合は
0〜15の16個(32バイト)で良いが、新アーキの
場合は0〜31の32個(128バイト)必要である。
In step S6, it is checked whether the old architecture mode is set. If Yes, the process proceeds to step S7, and if No, the process proceeds to step S9. In step S7, processing is performed according to the interface of the old arche.
For example, the monitor program must restore (previously save) the state of the test program when it was used by the test program, when the control is passed to the test program again. The number of registers saved / restored is 16 (0 to 15) (32 bytes) for the old arch, but 32 (0 to 31) (128 bytes) for the new arch.

【0032】ステップS8ではPSWのアーキテクチャ
・モードを旧アーキに設定する。ステップS9では、新
アーキのインタフェースに合わせた処理を行う。ステッ
プS10ではPSWのアーキテクチャ・モードを新アー
キに設定する。ステップS11では、テストプログラム
に制御を渡す。ステップS12では、テストを実行す
る。
In step S8, the architecture mode of PSW is set to old arch. In step S9, processing is performed according to the new arch interface. In step S10, the architecture mode of PSW is set to new arch. In step S11, control is passed to the test program. In step S12, a test is executed.

【0033】[0033]

【発明の効果】以上の説明から明らかなように、本発明
によれば、従来のモニタプログラムの制御の下では診断
できなかった動的アドレス変換機構や記憶保護機構の診
断を行うことが出来る。また、本発明によれば、命令セ
ットの異なる2種類のテストプログラムの何れをも1つ
の計算機上で実行することが出来る。さらに、本発明に
よれば、或る命令セットのテストプログラムが発生した
割込みを処理することもでき、他の命令セットのテスト
プログラムが発生した割込みを処理することも出来る。
As is apparent from the above description, according to the present invention, it is possible to diagnose the dynamic address translation mechanism and the memory protection mechanism which cannot be diagnosed under the control of the conventional monitor program. Further, according to the present invention, both of two types of test programs having different instruction sets can be executed on one computer. Furthermore, according to the present invention, an interrupt generated by a test program of a certain instruction set can be processed, and an interrupt generated by a test program of another instruction set can also be processed.

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

【図1】本発明におけるテストの処理手順を示す図であ
る。
FIG. 1 is a diagram showing a test processing procedure according to the present invention.

【図2】本発明のPSWの構成を示す図である。FIG. 2 is a diagram showing a configuration of a PSW of the present invention.

【図3】新旧アーキテクチャの命令セットを示す図であ
る。
FIG. 3 is a diagram showing an instruction set of the old and new architectures.

【図4】新旧アーキテクチャの汎用レジスタを説明する
図である。
FIG. 4 is a diagram illustrating general-purpose registers of old and new architectures.

【図5】本発明におけるテストプログラムのローディン
グ時の処理を示す図である。
FIG. 5 is a diagram showing a process at the time of loading a test program according to the present invention.

【図6】本発明における割込み発生時の動作(その1)
を示す図である。
FIG. 6 is an operation (No. 1) when an interrupt occurs in the present invention.
FIG.

【図7】本発明における割込み発生時の動作(その2)
を示す図である。
FIG. 7 is an operation (No. 2) when an interrupt occurs in the present invention.
FIG.

【図8】従来例を示す図である。FIG. 8 is a diagram showing a conventional example.

【図9】従来のローディング時の動作を示す図である。FIG. 9 is a diagram showing a conventional loading operation.

【図10】アドレス変換テーブルの概要を説明する図で
ある。
FIG. 10 is a diagram illustrating an outline of an address conversion table.

【図11】記憶保護機構の概要を説明するための図であ
る。
FIG. 11 is a diagram for explaining an outline of a memory protection mechanism.

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

TP テストプログラム R0〜R31 汎用レジスタ TP test program R0 to R31 general-purpose registers

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 テストプログラムが独自にアドレス変換
テーブルを作成し、記憶保護の設定を行い、 計算機の通常動作時にはモニタプログラムが管理するア
ドレス変換機構や記憶保護機構のテストを行うことを特
徴とするテストプログラムの実行制御方式。
1. The test program creates an address translation table independently, sets storage protection, and tests the address translation mechanism and storage protection mechanism managed by the monitor program during normal operation of the computer. Test program execution control method.
【請求項2】 テストプログラムをローディングし、 ローディングしたテストプログラムの先頭の命令を判断
し、 当該先頭命令が第1のアーキテクチャの命令か,第2の
アーキテクチャの命令かを調べ、 第1のアーキテクチャの命令である場合には、プログラ
ム状態語のアーキテクチャ・モードを所定値に設定し
て、当該テストプログラムを実行し、 第2のアーキテクチャの命令である場合には、プログラ
ム状態語のアーキテクチャ・モードを他の所定値に設定
して、当該テストプログラムを実行することを特徴とす
るテストプログラムの実行制御方式。
2. A test program is loaded, an instruction at the head of the loaded test program is determined, it is checked whether the head instruction is an instruction of the first architecture or an instruction of the second architecture, and the instruction of the first architecture is read. If it is an instruction, the architecture mode of the program state word is set to a predetermined value, the test program is executed, and if it is an instruction of the second architecture, the architecture mode of the program state word is changed to another. The test program execution control method is characterized in that the test program is executed by setting it to a predetermined value.
【請求項3】 テストプログラムが発生する割込みの種
類を登録し、 テストプログラムで割込みが発生した場合、当該割込み
が期待した割込みであるか否かを調べ、 期待した割込みである場合には、割込み時のプログラム
状態語のアーキテクチャ・モードを判断し、 アーキテクチャモードが第1のアーキテクチャ・モード
か,第2のアーキテクチャ・モードかを調べ、 第1のアーキテクチャ・モードの場合には、第1のアー
キテクチャのインタフェースに合わせた処理を行い、プ
ログラム状態語のアーキテクチャ・モードを第1のアー
キテクチャに設定し、テストプログラムに制御を渡し、 第2のアーキテクチャ・モードの場合には、第2のアー
キテクチャのインタフェースに合わせた処理を行い、プ
ログラム状態語のアーキテクチャ・モードを第2のアー
キテクチャに設定し、テストプログラムに制御を渡すこ
とを特徴とするテストプログラムの実行制御方式。
3. An interrupt type generated by a test program is registered. When an interrupt occurs in the test program, it is checked whether or not the interrupt is an expected interrupt. If the interrupt is the expected interrupt, an interrupt is generated. The architecture mode of the program state word at the time is determined, and whether the architecture mode is the first architecture mode or the second architecture mode is checked. In the case of the first architecture mode, the first architecture mode Performs processing according to the interface, sets the architecture mode of the program state word to the first architecture, transfers control to the test program, and in the case of the second architecture mode, adjusts to the interface of the second architecture. And the program status word architecture Set de the second architecture, execution control method of the test program, characterized in that passes control to the test program.
JP4265096A 1992-10-02 1992-10-02 Test program execution control method Expired - Fee Related JP2835896B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP4265096A JP2835896B2 (en) 1992-10-02 1992-10-02 Test program execution control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP4265096A JP2835896B2 (en) 1992-10-02 1992-10-02 Test program execution control method

Publications (2)

Publication Number Publication Date
JPH06119199A true JPH06119199A (en) 1994-04-28
JP2835896B2 JP2835896B2 (en) 1998-12-14

Family

ID=17412554

Family Applications (1)

Application Number Title Priority Date Filing Date
JP4265096A Expired - Fee Related JP2835896B2 (en) 1992-10-02 1992-10-02 Test program execution control method

Country Status (1)

Country Link
JP (1) JP2835896B2 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63143948U (en) * 1987-03-12 1988-09-21
JPH01152540A (en) * 1987-09-10 1989-06-15 Nec Corp Data processor
JPH0384645A (en) * 1989-08-29 1991-04-10 Nec Corp Memory protection system
JPH04143845A (en) * 1990-10-04 1992-05-18 Pfu Ltd Page fault test system for computer

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS63143948U (en) * 1987-03-12 1988-09-21
JPH01152540A (en) * 1987-09-10 1989-06-15 Nec Corp Data processor
JPH0384645A (en) * 1989-08-29 1991-04-10 Nec Corp Memory protection system
JPH04143845A (en) * 1990-10-04 1992-05-18 Pfu Ltd Page fault test system for computer

Also Published As

Publication number Publication date
JP2835896B2 (en) 1998-12-14

Similar Documents

Publication Publication Date Title
JP2650675B2 (en) Method and operating system for executing a program in a multi-mode microprocessor
US5386565A (en) Method and system for controlling/monitoring computer system having plural operating systems to run thereon
US4825358A (en) Method and operating system for executing programs in a multi-mode microprocessor
US5437033A (en) System for recovery from a virtual machine monitor failure with a continuous guest dispatched to a nonguest mode
US5680599A (en) Program counter save on reset system and method
US5363502A (en) Hot stand-by method and computer system for implementing hot stand-by method
EP0638864B1 (en) Development support system for microcomputer with internal cache
US6141635A (en) Method of diagnosing faults in an emulated computer system via a heterogeneous diagnostic program
JPH06119199A (en) Execution control system for test program
JPH09330141A (en) Fault recovery processing system for dynamic reconstitution processing
JP3317361B2 (en) Battery backup control method for memory
JP3102381B2 (en) Task debugging device, task debugging method, and recording medium therefor
JPH0664569B2 (en) Micro program loading method
JPS6118224B2 (en)
JP2000353109A (en) Emulator and emulation system
JPS6116338A (en) Interrupt processing system of virtual computer system
JPS6195464A (en) Data protecting system
JPH04227554A (en) Hot stand-by method and computer system
JPS6379139A (en) Method for preventing runaway of computer
JPS63116239A (en) Stack control system for processor
JPS6394339A (en) Virtual calculation system
JPH06202879A (en) Interrupt processing method
JPH04123235A (en) Debugging method and system for microprogram
JPH01266642A (en) Memory controller
JPH02244345A (en) Information processor

Legal Events

Date Code Title Description
S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313532

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

LAPS Cancellation because of no payment of annual fees