JPS62212852A - Storage protecting system - Google Patents

Storage protecting system

Info

Publication number
JPS62212852A
JPS62212852A JP61057303A JP5730386A JPS62212852A JP S62212852 A JPS62212852 A JP S62212852A JP 61057303 A JP61057303 A JP 61057303A JP 5730386 A JP5730386 A JP 5730386A JP S62212852 A JPS62212852 A JP S62212852A
Authority
JP
Japan
Prior art keywords
address
area
base
register
length
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
JP61057303A
Other languages
Japanese (ja)
Inventor
Hideaki Doi
土肥 英明
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP61057303A priority Critical patent/JPS62212852A/en
Publication of JPS62212852A publication Critical patent/JPS62212852A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To detect misprogramming by storing a pass word and the length of a prescribed area corresponding to the value of a base register in the prescribed area, and at the execution of a memory updating instruction, checking the pass word and the address range. CONSTITUTION:In a main storage device 1, a base register indicating the base address of a certain area 11 assigned to a certain program is defined as the 4th location (R4) e.g. of a general register. A pass word to use the area and the length information indicating the size of the area are stored in an address having specific relation to the base address. Namely, the length 13 is stored in the address of the base address 4 and the pass word 12 is stored in the address of the base register 8. Consequently, the misspecification of the base register or the specification of a displacement address exceeding an assigned area can be checked.

Description

【発明の詳細な説明】 〔概要〕 本発明は電子計算機等の主記憶装置の記憶保護に関し、
ベースレジスタの値に対応する所定の領域にパスワード
とその領域のレングスとを格納しておき、メモリ更新命
令の実行時にパスワードとアドレス範囲のチェックを行
うものである。
[Detailed Description of the Invention] [Summary] The present invention relates to memory protection of a main memory device of an electronic computer, etc.
A password and the length of the area are stored in a predetermined area corresponding to the value of the base register, and the password and address range are checked when a memory update instruction is executed.

〔産業上の利用分野〕[Industrial application field]

本発明は電子計算機、電子交換機などの情報処理装置に
おける主記憶装置の記憶保護に関し、プログラムミスな
どによる記憶内容の破壊を木目細かく防止する方式に関
する。
The present invention relates to memory protection of a main memory device in an information processing device such as an electronic computer or an electronic exchange, and relates to a method for meticulously preventing destruction of stored contents due to program errors or the like.

〔従来技術とその問題点〕[Prior art and its problems]

主記憶装置の記憶保護方式としては、いわゆる記憶保護
キーによるチェックがよ(知られているが、一般にその
キーを付与する単位は2にバイトないし4にバイトと比
較的大きい領域の単位であり、必ずしも充分なチェック
を行うことはできない。
As a memory protection method for the main storage device, checking using a so-called memory protection key is recommended (this is well known, but the unit in which the key is generally assigned is a relatively large unit of area, such as 2 bytes or 4 bytes). It is not always possible to perform sufficient checks.

例えば、よく知られたソフトウェアの手法として、特定
のユーザまたは特定のプログラムの処理単位に任意の記
憶領域を割り当て、その領域の先頭アドレスをペースア
ドレスとしてベースレジスタに設定しておき、プログラ
ムの中ではそのベースアドレスからの変位アドレスのみ
指定する方式や、さらにベースレジスタとインデクスレ
ジスタとを組み合わせて相対アドレシングを可能とする
ことが行われている。
For example, a well-known software technique is to allocate an arbitrary storage area to the processing unit of a specific user or a specific program, set the start address of that area as a pace address in the base register, and then There are methods in which only displacement addresses from the base address are specified, and methods in which a base register and an index register are combined to enable relative addressing.

このような場合において割り当てられる領域の大きさや
その境界アドレスは、上記記憶保護キーの付与される単
位領域の大きさや境界アドレスとは全く独立のため、た
とえばプログラムのミスによりベースレジスタの指定を
間違えたりした場合に、そのミスをチェックする手段は
なく、記憶保護キーさえ一致していれば記憶内容の破壊
が生じ得るという問題があった。
In such a case, the size of the allocated area and its boundary address are completely independent of the size and boundary address of the unit area to which the storage protection key is assigned, so for example, if the base register is specified incorrectly due to a program error. In this case, there is no way to check for mistakes, and even if the memory protection keys match, there is a problem in that the memory contents may be destroyed.

〔問題点を解決する手段〕[Means to solve problems]

本発明では、上記の問題点を解決するために、記憶領域
を割り当てる際にその領域のベースアドレスに対応する
特定の領域に、パスワードとその領域のレングスを設定
しておき、アクセスがあった際にはそのベースレジスタ
の指定に基づいて、上記パスワードとレングスとを読み
出し、その正当性をチェックするようにしたものである
In the present invention, in order to solve the above problems, when allocating a storage area, a password and the length of the area are set in a specific area corresponding to the base address of the area, and when the area is accessed, The password and length are read out based on the specification of the base register, and their validity is checked.

〔作用〕[Effect]

このように構成することにより、ベースレジスタの指定
ミスや割り当て領域を超えて変位アドレスを指定した場
合のチェックが可能となる。
With this configuration, it is possible to check for a base register specification error or a displacement address specified beyond the allocated area.

〔実施例〕〔Example〕

第1図に本発明の一実施例処理フローチャートを示し、
また第2図に本発明の一実施例ブロック図を示す。
FIG. 1 shows a processing flowchart of an embodiment of the present invention,
Further, FIG. 2 shows a block diagram of an embodiment of the present invention.

第2図において、lは主記憶装置(MSU>、それ以外
は中央処理装置内の回路であり、2は命令レジスタ(I
R)、3は汎用レジスタ群、4はアドレス計算用加算器
、5は演算装置(ALU)、6はそれらの回路を制御す
るために命令レジスタ2の命令コードを解読するデコー
ダである。デコーダ6はハードウェアでもマイクロプロ
グラムでも実現可能である。
In FIG. 2, l is the main storage unit (MSU), other circuits are in the central processing unit, and 2 is the instruction register (I).
R), 3 is a group of general-purpose registers, 4 is an adder for address calculation, 5 is an arithmetic unit (ALU), and 6 is a decoder that decodes the instruction code of the instruction register 2 in order to control these circuits. The decoder 6 can be realized by hardware or a microprogram.

命令レジスタ2のOPは命令コード部、R1は第1オペ
ランドのレジスタ指定部、Bは第2オペランドのベース
レジスタ指定部、■は同じく第2オペランドのインデク
スレジスタ指定部、pは同じく第2オペランドの変位ア
ドレス部である。
OP of instruction register 2 is the instruction code part, R1 is the register designation part of the first operand, B is the base register designation part of the second operand, ■ is the index register designation part of the second operand, and p is the index register designation part of the second operand. This is the displacement address part.

例えば、レジスターメモリ型のストア命令であって、上
記R1で示す汎用レジスタの内容を上記B、1.Dで定
まる主記憶アドレスに格納する命令がある。
For example, in a register memory type store instruction, the contents of the general-purpose register indicated by R1 above are stored in B, 1. There is an instruction to store in the main memory address determined by D.

主記憶装置lにおいて、11はあるプログラムに割り当
てたある領域の1つを示し、この領域のベースアドレス
を示すベースレジスタが例えば汎用レジスタの4番(以
下R4と記す)とする。
In the main memory device I, 11 indicates one area allocated to a certain program, and the base register indicating the base address of this area is, for example, general-purpose register number 4 (hereinafter referred to as R4).

本発明の特徴は、このベースアドレスと特定の関係にあ
るアドレスにこの領域を使用するためのパスワードとこ
の領域の大きさを示すレングス情報とを格納しておく点
にある。図示の例では、ベースアドレス−4のアドレス
にレングス13が、またベースアドレス−8のアドレス
にパスワード12が格納されている。
A feature of the present invention is that a password for using this area and length information indicating the size of this area are stored in an address that has a specific relationship with this base address. In the illustrated example, a length 13 is stored at the base address -4, and a password 12 is stored at the base address -8.

また、各プログラムが処理を開始するに先立ってROに
そのプログラム固有のパスワードを設定するようにされ
ているものとする。
It is also assumed that a password unique to each program is set in the RO before each program starts processing.

このような状態である命令が命令レジスタ2にセットさ
れたときの動作を第1図に基づいて説明する。
The operation when an instruction in such a state is set in the instruction register 2 will be explained based on FIG.

■まず、メモリアクセス系の命令(更にはストア系の命
令に限ってもよい)がデコーダ6で検出されると、ベー
スレジスタ指定部Bの値により汎用レジスタ3がアクセ
スされ、ベースアドレスが読み出され、該アドレスに基
づいてパスワード12とレングス13が読み出される。
■First, when a memory access instruction (or even just a store instruction) is detected by the decoder 6, the general-purpose register 3 is accessed based on the value of the base register specification part B, and the base address is read. The password 12 and length 13 are read out based on the address.

■次いで、汎用レジスタ3のROが読み出され、ALU
5によってパスワードのチェックが行なわれる。
■Next, RO of general-purpose register 3 is read out, and ALU
5, the password is checked.

■パスワード12が(RO)と一致していれば次のステ
ップに進むが、不一致のときはプログラムチェック割り
込みを生ずる。
(2) If the password 12 matches (RO), proceed to the next step, but if they do not match, a program check interrupt is generated.

■次いで、上記ベースアドレスとインデクスレジスタ指
定部Iにより読み出されたインデクス値と変位アドレス
Dとを加算器4で加算して、実効アドレスEAを求める
(2) Next, the adder 4 adds the base address, the index value read by the index register specifying section I, and the displacement address D to obtain the effective address EA.

■また、上記ベースアドレスと上記レングス13とをA
LU5にて加算し、領域IIの最大アドレスMAXを求
める。
■Also, set the above base address and the above length 13 to A.
Addition is made in LU5 to find the maximum address MAX of area II.

■そして、上記実効アドレスEAが上記最大アドレスM
AXを超えるか否かをALU5でチェックし、超えてい
る時は、プログラムチェック割り込みを生ずる。
■The above effective address EA is the above maximum address M
The ALU 5 checks whether it exceeds AX, and if it does, a program check interrupt is generated.

■上記実効アドレスEAが上記最大アドレスMAX以下
であるときには、該EAによって主記憶装置1がアクセ
スされる。
(2) When the effective address EA is less than or equal to the maximum address MAX, the main storage device 1 is accessed by the EA.

なお、上記■〜■の処理はマイクロプログラム等の手段
によりデコーダ6が制御すると考えてよい。
It should be noted that the above processes (1) to (2) may be considered to be controlled by the decoder 6 by means such as a microprogram.

又、上記パスワード12およびレングス13の設定は、
制御プログラム(O8)が領域を割り当てる際に、例え
ば従来の装置でX番地からNバイトを割り当てている場
合、実際には(X−8)番地から(N+8)バイトを割
り当て、ベースレジスタにはX番地を設定し、(X−8
)番地にはパスワードを、(X−4)番地にはレングス
Nを格納するようにすればよい。
Also, the settings for password 12 and length 13 are as follows:
When the control program (O8) allocates an area, for example, if N bytes are allocated from address X in a conventional device, it actually allocates (N+8) bytes from address (X-8) and Set the address and (X-8
) address may be used to store a password, and address (X-4) may be used to store a length N.

又、仮想記憶方式をとる計算機においては、上記ベース
アドレスや実効アドレスをさらに実アドレスに変換して
主記憶装置1をアクセスすることはいうまでもない。
Furthermore, in a computer that uses a virtual storage system, it goes without saying that the base address and effective address described above are further converted into real addresses to access the main storage device 1.

〔発明の効果〕〔Effect of the invention〕

以上の如くであるので、プログラムミスなどによりベー
スレジスタの指定を間違えたり、割り当てられた領域の
範囲を超えて変位アドレスを指定したりした場合でも、
これを検出することができる。
As described above, even if the base register is specified incorrectly due to a programming error or a displacement address is specified beyond the range of the allocated area,
This can be detected.

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

第1図は本発明の一実施例フローチャート、第2図は本
発明の一実施例ブロック図である。 図中、■は主記憶装置(MSU) 、2は命令レジスタ
(IR)、3は汎用レジスタ群、4はアドレス計算用加
算器、5は演算装置(ALU) 、6はそれらの回路を
制御するために命令レジスタ2の命令コードを解読する
デコーダである。 不発明の一炙施9+1フローチマート 第 1121
FIG. 1 is a flow chart of an embodiment of the present invention, and FIG. 2 is a block diagram of an embodiment of the present invention. In the figure, ■ is the main storage unit (MSU), 2 is the instruction register (IR), 3 is a general-purpose register group, 4 is an adder for address calculation, 5 is an arithmetic unit (ALU), and 6 is for controlling these circuits. This is a decoder that decodes the instruction code in the instruction register 2. Uninvented Roasted 9+1 Flowchmart No. 1121

Claims (1)

【特許請求の範囲】 命令中で指定されるベースレジスタの内容に基づいて実
効アドレスを求めて主記憶装置をアクセスする情報処理
装置において、 該ベースレジスタの内容に対応する所定の主記憶領域に
当該ベースレジスタにて指定される記憶領域に関するパ
スワード(12)と当該記憶領域のレングス(13)と
を格納しておき、上記命令の実行時に当該命令で指定し
たベースレジスタに基づいて上記パスワードとレングス
とを読み出して該パスワード及び上記実効アドレスのチ
ェックを行うことを特徴とする記憶保護方式。
[Claims] In an information processing device that accesses a main storage device to obtain an effective address based on the contents of a base register specified in an instruction, The password (12) and the length (13) of the storage area specified in the base register are stored, and when the above instruction is executed, the password and length are set based on the base register specified in the instruction. A memory protection method characterized in that the password and the effective address are checked by reading out the password.
JP61057303A 1986-03-14 1986-03-14 Storage protecting system Pending JPS62212852A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61057303A JPS62212852A (en) 1986-03-14 1986-03-14 Storage protecting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61057303A JPS62212852A (en) 1986-03-14 1986-03-14 Storage protecting system

Publications (1)

Publication Number Publication Date
JPS62212852A true JPS62212852A (en) 1987-09-18

Family

ID=13051787

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61057303A Pending JPS62212852A (en) 1986-03-14 1986-03-14 Storage protecting system

Country Status (1)

Country Link
JP (1) JPS62212852A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5149611A (en) * 1987-02-17 1992-09-22 Minolta Camera Kabushiki Kaisha Color toner for developing electrostatic latent image

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5149611A (en) * 1987-02-17 1992-09-22 Minolta Camera Kabushiki Kaisha Color toner for developing electrostatic latent image

Similar Documents

Publication Publication Date Title
US5280614A (en) Apparatus and method for controlling access to data using domains
CA1261479A (en) Direct input/output in a virtual memory system
JP2678183B2 (en) Digital processor controller and method for runtime memory allocation
US5305460A (en) Data processor
JPS6237419B2 (en)
JPS6055849B2 (en) Command control method
WO1985002040A1 (en) Microcomputer having an internal address mapper
JPS61156445A (en) Tlb purge control system
JPS62212852A (en) Storage protecting system
JPS6220583B2 (en)
JPS6035694B2 (en) Main memory protection method
JPS6285372A (en) Comparing and swapping system in multi-processor system
JPH05225361A (en) Register rewriting system
JPH06309236A (en) Illegal write detecting circuit for memory
EP0423735B1 (en) Microprocessor having parity check function
JP3140028B2 (en) Subroutine argument passing method
JPH03113548A (en) Extension memory controller
JP2796162B2 (en) Instruction processing method
JP2677043B2 (en) Program development support device
JPS6221140B2 (en)
JPS58139396A (en) Memory protecting method
JPH11238016A (en) Method and device for memory protection
JPH0471219B2 (en)
JPS6155754A (en) Memory protection system
JPS607819B2 (en) information processing equipment