JPS63752A - Memory protection system - Google Patents

Memory protection system

Info

Publication number
JPS63752A
JPS63752A JP61144489A JP14448986A JPS63752A JP S63752 A JPS63752 A JP S63752A JP 61144489 A JP61144489 A JP 61144489A JP 14448986 A JP14448986 A JP 14448986A JP S63752 A JPS63752 A JP S63752A
Authority
JP
Japan
Prior art keywords
access
memory
access restriction
restriction information
address
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
JP61144489A
Other languages
Japanese (ja)
Inventor
Shizuo Shiokawa
塩川 鎮雄
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.)
Nippon Telegraph and Telephone Corp
Original Assignee
Nippon Telegraph and Telephone 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 Nippon Telegraph and Telephone Corp filed Critical Nippon Telegraph and Telephone Corp
Priority to JP61144489A priority Critical patent/JPS63752A/en
Publication of JPS63752A publication Critical patent/JPS63752A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

PURPOSE:To ensure protection of a memory not only in a mapping mode but also in a direct mode by latching an effective ring level RLE and comparing it with a reference ring level RLR. CONSTITUTION:A selection circuit 10 selects the RLR of a latch circuit 7 and the RLE of a latch circuit 6 when a mode flag 12 in a program state PSW1 designates a mapping mode and a direct mode respectively to use it as the comparison input at one side of a comparator 9. The other comparison input of the comparator 9 is always equal to the RLE of the circuit 6. Therefore, access is given to a main memory with no limit in case RLE=0 is satisfied in the mapping mode. The access of the main memory is complied with access control information AR in case of RLE<=RLR and the access is possible only with reading in case of RLE>RLR. While in the direct mode the conditions are always secured for RLE=RLR and the memory protection is limited in accordance with the access information AR.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は電子計算機のメモリ保護方式に係り。[Detailed description of the invention] [Industrial application field] The present invention relates to a memory protection system for electronic computers.

詳しくは、リングレベルとアクセス制限により主メモリ
へのアクセス保護を行っており、該リングレベルとアク
セス制限の情報をアドレス変換テーブルに有し、アドレ
ス変換テーブルに持つリングレベル(参照リングレベル
)とプログラム状態語(p s w)上のリングレベル
(実行リングレベル)との比較により、アクセス制限情
報の制限条件を制御している電子計算機におけるメモリ
保護方式〔従来の技術〕 この種の電子計算機における従来のメモリ保護方式につ
いて第5図により説明する。
In detail, access to the main memory is protected using ring levels and access restrictions, and information on the ring levels and access restrictions is stored in an address translation table, and the ring level (reference ring level) and program information held in the address translation table are A memory protection method in a computer that controls the restriction conditions of access restriction information by comparison with the ring level (execution ring level) on the state word (p sw) [Prior art] Conventional technology in this type of computer The memory protection method will be explained with reference to FIG.

第5図(a)はリングレベル(RL)とアクセス制限(
AR)とによりメモリ保護を行っているDIPS等によ
り実現されている例である。1はプログラム状態m <
 p s w )であり、11はPSW内の実行リング
レベル(RLE)を示す。 2は参照するオペランド等
の論理アドレスで、セグメント番号S、ページ番号P、
ページ内アドレスLを含む、3はセグメントベースレジ
スタ(S B R)、4はセグメントテーブル(ST)
、5はページテーブル(PT)である。セグメントベー
スレジスタ3は、セグメントテーブル4の先頭アドレス
を保持しており、これに論理アドレス2中のSフィール
ドを加算してセグメントテーブル4をアクセスし、ペー
ジテーブルアドレスを得る。このページテーブルアドレ
スに論理アドレス2中のPフィールドを加算してページ
テーブル5をアクセスし。
Figure 5(a) shows the ring level (RL) and access restrictions (
This is an example implemented by DIPS, etc., which performs memory protection using AR). 1 is the program state m <
p s w ), and 11 indicates the execution ring level (RLE) within the PSW. 2 is the logical address of the operand etc. to be referenced, segment number S, page number P,
Contains in-page address L, 3 is segment base register (SBR), 4 is segment table (ST)
, 5 is a page table (PT). The segment base register 3 holds the start address of the segment table 4, and adds the S field in the logical address 2 to this to access the segment table 4 and obtain the page table address. The P field in logical address 2 is added to this page table address to access page table 5.

ページアドレスを得る。この得られたページアドレスの
下位に論理アドレス2中のLフィールドを接合して実ア
ドレスが求まる。セグメントテーブル4の該当エントリ
には参照リングレベル(RLR)41が保持され、ペー
ジテーブル5の該当エントリにはアクセス制限情報(A
R)が保持されている。
Get the page address. A real address is determined by joining the L field in logical address 2 to the lower order of this obtained page address. The corresponding entry in the segment table 4 holds a reference ring level (RLR) 41, and the corresponding entry in the page table 5 holds access restriction information (A
R) is retained.

ラッチ回路6はPSWIからの実効リングレベル(RL
E)を受は取る。また、ラッチ回路7はセグメントテー
ブル4から読み出された参照リングレベル(RLR)を
受は取る。比較回路8はRL、がOか否かを判断し、比
較回路9はRLEとRLRとの大小関係を求める。RL
、=Oでは、ページテーブル5から読み出されたアクセ
ス制限情報(A R)の値に力いねらず、メモリアクセ
スに対する制限は加えられない。RLI:≦RLRの時
は、アクセス制限情報(AR)の内容に依存する。即ち
、RL、)RLRの時はオペランドリードアクセスしか
許されない。
The latch circuit 6 receives the effective ring level (RL) from the PSWI.
E) is received. The latch circuit 7 also receives the reference ring level (RLR) read from the segment table 4. The comparison circuit 8 determines whether RL is O or not, and the comparison circuit 9 determines the magnitude relationship between RLE and RLR. R.L.
, =O, the value of the access restriction information (AR) read from the page table 5 is not affected, and no restriction is applied to memory access. When RLI:≦RLR, it depends on the content of access restriction information (AR). That is, in the case of RL, )RLR, only operand read access is allowed.

第5図(b)に、上記RL、とRLRとアクセス制限と
の関係を示す。第5図(c)はアクセス制限情報(AR
)の内容例である。
FIG. 5(b) shows the relationship between the above-mentioned RL, RLR, and access restriction. Figure 5(c) shows the access restriction information (AR
) is an example of the content.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

上記のように、リングレベルとアクセス制限により主メ
モリへのアクセス保護を行う場合、従来技術では、リン
グレベルによるメモリ保護は実行リングレベル(RLE
)と参照リングレベル(RLR)という概念により制御
していた。この場合、実行リングレベル(RLE)はP
SW上、参照リングレベル(RLR)はアドレス変換テ
ーブル上に保持されているため、アドレス変換テーブル
を索引するマツピングモード時のみ保護機構が動作し、
ダイレクトモード時は全熱メモリ保護が行われないとい
う欠点があった。
As mentioned above, when protecting access to main memory using the ring level and access restrictions, in the conventional technology, memory protection using the ring level is performed at the execution ring level (RLE).
) and the concept of reference ring level (RLR). In this case, the execution ring level (RLE) is P
On the SW, the reference ring level (RLR) is held on the address translation table, so the protection mechanism operates only in the mapping mode that indexes the address translation table.
The drawback was that full thermal memory protection was not performed in direct mode.

また、論理ページ単位のアクセス制限(AR)もアドレ
ス変換テーブルにのみ保持され、かつ保護の単位がペー
ジ単位という比較的大きな容量を単位としていた。しか
し、プログラムはダイレクトモード走行も行われ、特に
、無駄な処理をなるべく少なくしたいプログラム、例え
ば仮想マシンのモニタ(VMモニタ)等ではダイレクト
モード時の走行がほとんどである。そのため、ダイレク
トモード時のメモリ保護機構が必要であり、がっ、ペー
ジ単位という比較的大きな容量を単位とする場合と、よ
り小容量のデータを扱う場合があり、小容量単位でのメ
モリ保護が要求されている。
Further, access restriction (AR) in units of logical pages is also held only in the address conversion table, and the unit of protection is a relatively large capacity unit of page. However, programs also run in the direct mode, and in particular, most programs that want to minimize unnecessary processing, such as a virtual machine monitor (VM monitor), run in the direct mode. Therefore, a memory protection mechanism is required during direct mode.There are cases where a relatively large capacity unit such as a page is handled, and there are cases where smaller capacity data is handled, so memory protection in small capacity units is necessary. requested.

本発明の目的は、リングレベルとアクセス制限によりメ
モリ保護を行う計算機において上記の欠点を除去したメ
モリ保護方式を提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to provide a memory protection method that eliminates the above drawbacks in a computer that protects memory using ring levels and access restrictions.

を問題点を解決するための手段及び作用〕本発明は、マ
ツピングモード時は、アドレス変換テーブルの参照リン
グレベル(RLII)とPSW上の実行リングレベル(
RLE)とを比較し、RLE=0の時は制限なくアクセ
スし、RLや≦RL3の時はアクセス制限情報に従い、
RLE>RLRの時は読出しのみ可とする制御機構に加
えて、ダイレクトモード時は、実行リングレベル(RL
E)を常に参照リングレベル(RLR)と等しくする制
御機構を設けて、マツピングモード時もダイレクトモー
ド時もメモリ保護を有効に動作させることを骨子とする
ものである。
[Means and effects for solving the problems] The present invention provides that, in the mapping mode, the reference ring level (RLII) of the address translation table and the execution ring level (RLII) on the PSW are
RLE), when RLE=0, there is no restriction access, and when RL or ≦RL3, according to the access restriction information,
In addition to the control mechanism that allows only reading when RLE>RLR, in direct mode, the execution ring level (RL
The main idea is to provide a control mechanism that always makes E) equal to the reference ring level (RLR) so that memory protection can be effectively operated in both mapping mode and direct mode.

〔実施例〕〔Example〕

以下、本発明の一実施例について図面により説明する。 An embodiment of the present invention will be described below with reference to the drawings.

第1図は本発明の一実施例のブロック図であり。FIG. 1 is a block diagram of one embodiment of the present invention.

第5図とは選択回路10が付加されている点が相違する
。PSWI中には実行リングレベル(RLE)の他に、
ダイレクトモードかマツピングモードかを示すモードフ
ラグ12が含まれる。ラッチ回路6はPSWIの実効リ
ングレベル(RLE)をラッチし、ラッチ回路7はセグ
メントテーブル4から読み出された参照リングレベル(
RLR)41をラッチする。第1図では省略したが、ア
ドレス変換の過程でページテーブルからはアクセス制限
情報(AR)が読み出される。比較回路8はRL。
The difference from FIG. 5 is that a selection circuit 10 is added. During PSWI, in addition to the execution ring level (RLE),
A mode flag 12 indicating whether the mode is direct mode or mapping mode is included. The latch circuit 6 latches the effective ring level (RLE) of PSWI, and the latch circuit 7 latches the reference ring level (RLE) read from the segment table 4.
RLR) 41 is latched. Although omitted in FIG. 1, access restriction information (AR) is read from the page table in the process of address translation. Comparison circuit 8 is RL.

がOか否かを判断し、比較回路9はRLEとRLRの大
小関係を判断する。
The comparator circuit 9 determines the magnitude relationship between RLE and RLR.

選択回路1oは、PSWI中のモードフラグ12がマツ
ピングモードを指定している時はラッチ回路7のRLR
を、 ダイレクトモードを指定している時はラッチ回路
6のRLEをそれぞれ選択して、比較回路9の一方の比
較入力とする回路である。比較回路9の他方の比較入力
は常にラッチ回路6のRL、である。従って、マツピン
グモード時は第5図と同様の論理が行われ、 RLE=
Oの時は制限なく主メモリをアクセスし、 RL、≦R
LRの時はアクセス制限情報(AR)に従い、RLE>
RLRの時は読出しのみアクセスが可となる。
The selection circuit 1o selects the RLR of the latch circuit 7 when the mode flag 12 in the PSWI specifies the mapping mode.
When the direct mode is specified, this circuit selects RLE of the latch circuit 6 and uses it as one comparison input of the comparison circuit 9. The other comparison input of the comparison circuit 9 is always the RL of the latch circuit 6. Therefore, in mapping mode, the same logic as in Figure 5 is performed, and RLE=
When O, main memory is accessed without restriction, RL, ≦R
At the time of LR, follow the access restriction information (AR), RLE>
In the case of RLR, only read access is possible.

−方、ダイレクトモード時は常にRLE=RL、lの条
件が作られ、メモリ保護はアクセス制限情報(AR)に
従って制限される。
- On the other hand, in the direct mode, the condition of RLE=RL, l is always created, and memory protection is restricted according to access restriction information (AR).

第2図は本発明の他の実施例のブロック図であり、アド
レス変換テーブル上のアクセス制限情報(AR)とは別
に、主メモリの実ページ単位に、該実ページ単位のアク
セス制限情報を保持する第1のメモリと該実ページ内小
単位容量に対するアクセス制限情報を保持する第2のメ
モリを有する例である。第2図において、101,10
2はプロセッサ、131はメモリアクセス制御部、14
は主メモリである。20はアドレス変換テーブル上のア
クセス制限情報(AR)とは別に、主メモリの実ページ
対応のアクセス制限情報を持つ第1のメモリ(ARMI
)、21は当該実ページ内小単位容量単位のアクセス制
限情報を持つ第2のメモリ(ARM2)である。22は
実アドレスである。
FIG. 2 is a block diagram of another embodiment of the present invention, which holds access restriction information for each real page in the main memory in addition to the access restriction information (AR) on the address translation table. This is an example in which a first memory is used to store access restriction information for a small unit capacity within the real page, and a second memory is used to hold access restriction information for the small unit capacity within the real page. In Figure 2, 101, 10
2 is a processor, 131 is a memory access control unit, 14
is the main memory. 20 is a first memory (ARMI) which has access restriction information corresponding to the real page of the main memory, in addition to the access restriction information (AR) on the address translation table.
), 21 is a second memory (ARM2) having access restriction information in small unit capacity units within the relevant real page. 22 is a real address.

メモリ20.21は主メモリ14へのアクセス時の実ア
ドレス22を用いて読み出される。メモリ21はさらに
ページ内のアドレスであるので、実アドレス22のL部
のビットをデコードすることにより、ページ内小単位容
量単位の番号により。
The memory 20.21 is read using the real address 22 when accessing the main memory 14. Since the memory 21 is an address within a page, by decoding the bit of the L part of the real address 22, the number of small unit capacity units within the page is determined.

当該小単位容量単位のアクセス制限情報を読み出す。Reads the access restriction information for the small capacity unit.

第2図の2段階のアクセス制限情報によるメモリ保護制
御機構を第3図に示す。第3図において。
FIG. 3 shows a memory protection control mechanism based on the two-stage access restriction information shown in FIG. In fig.

25は第1のメモリ20 (ARMI)から読み出され
たアクセス制限情報、26は第2のメモリ21 (AR
M2)から読み出されたアクセス制限情報を示す。25
1は情報25中の先頭ビットで、A RMl中のアクセ
ス制限情報を使用するか否かを示す。251が“○″の
時、ARMI中のアクセス制限情報252を使用し、I
t I IIの時はARMI中の情報ではなく、当該ペ
ージのより小単位毎のアクセス制限情報を保持するAR
M2中の情報26を使用する。ARMZ中のアクセス制
限情報26は1ページ当り2m個存在する。当該小単位
容量単位は実アドレス22中のページ内アドレスL部か
らmビット抽出し、デコーダ23でデコードして求める
Reference numeral 25 indicates access restriction information read from the first memory 20 (ARMI), and 26 indicates access restriction information read from the first memory 20 (ARMI).
The access restriction information read from M2) is shown. 25
1 is the first bit in the information 25 and indicates whether or not the access restriction information in ARMI is used. When 251 is “○”, access restriction information 252 in ARMI is used, and I
At the time of t I II, AR retains access restriction information for each smaller unit of the page, not the information in ARMI.
Use information 26 in M2. There are 2m pieces of access restriction information 26 per page in the ARMZ. The small unit capacity unit is obtained by extracting m bits from the intra-page address L part of the real address 22 and decoding it with the decoder 23.

ラッチ回路27はARMIから読み出されたアクセス制
限情報25の先頭ビット251を保持し、選択回路30
はラッチ回路27の内容によりARMlから情報25を
用いるか、ARM2の情報26を用いるかを選択する0
選択回路30で選択されたアクセス制限情報はレジスタ
31に保持される。論理積回路32は該レジスタ31の
ARMIまたはARM2から読み出されたアクセス制限
情報とページテーブル5に保持されているアクセス制限
情報との論理積をとり、その論理積結果をレジスタ33
に保持する。
The latch circuit 27 holds the first bit 251 of the access restriction information 25 read from the ARMI, and the selection circuit 30
selects whether to use the information 25 from ARM1 or the information 26 from ARM2 depending on the contents of the latch circuit 27.
The access restriction information selected by the selection circuit 30 is held in the register 31. The AND circuit 32 performs an AND operation between the access restriction information read from ARMI or ARM2 of the register 31 and the access restriction information held in the page table 5, and transmits the AND result to the register 33.
to hold.

選択回路34は、PSWのマツピング/ダイレクトモー
ドフラグの内容を示す信号線121により、レジスタ3
3の論理積結果を使用するか、又はレジスタ31のAR
MIまたはARM2から読み出されたアクセス制限情報
をそのま\使用するか選択する回路であり、マツピング
モード時はレジスタ33の内容が、ダイレクトモードは
レジスタ31の内容が選択される9選択回路4で選択さ
れた情報は信号線341を介してアドレス変換バッファ
(ATB)に登録される。−方、判定回路35はメモリ
へのリクエスト(Req)に対して、メモリ保護例外検
出のための判定を行い、メモリ保護例外が検出された場
合、メモリアクセスは抑止され、メモリ保護例外のプロ
グラム割込みを起こす。
The selection circuit 34 selects the register 3 through a signal line 121 indicating the contents of the mapping/direct mode flag of the PSW.
3, or use the AR of register 31.
This is a circuit that selects whether to use the access restriction information read from MI or ARM2 as is, and selects the contents of register 33 in mapping mode, and selects the contents of register 31 in direct mode.9 Selection circuit 4 The information selected in is registered in the address translation buffer (ATB) via the signal line 341. - On the other hand, the determination circuit 35 performs a determination to detect a memory protection exception in response to a request (Req) to the memory, and if a memory protection exception is detected, memory access is inhibited and the program interrupt of the memory protection exception is executed. wake up

第4図は小容量単位の保護を行った時、アクセス制限情
報をアドレス変換バッファ(ATB)に登録し、高速ア
ドレス変換及びメモリ保護例外検出の高速化を実現する
部分の構成図である。40゜41はアドレス変換バッフ
ァ(ATB)、42はATB中の1エントリの内容例、
LAは論理アドレス、Pは実ページ番号、RLはリング
レベル。
FIG. 4 is a block diagram of a part that registers access restriction information in an address translation buffer (ATB) when protecting a small capacity unit, thereby realizing high-speed address translation and memory protection exception detection. 40° 41 is the address translation buffer (ATB), 42 is an example of the contents of one entry in the ATB,
LA is a logical address, P is a real page number, and RL is a ring level.

AR’は第3図により生成され信号線341から送られ
て登録゛されるアクセス制限情報である。AR′は従来
、ページテーブルから読み出された内容が格納されてい
たが、第3図により生成されたアクセス制限情報はペー
ジテーブルからのARと値が異なるため、AR’ と記
す。421は当該ページが小容量の保護を行っているか
否かを示しており、第3図の251と同じ内容が格納さ
れる。
AR' is access restriction information generated as shown in FIG. 3, sent from the signal line 341, and registered. Conventionally, AR' stores the contents read from the page table, but since the access restriction information generated in FIG. 3 has a different value from the AR from the page table, it is written as AR'. 421 indicates whether or not the page is protected for a small amount, and the same content as 251 in FIG. 3 is stored.

422は小容量単位の当該単位番号である。422 is the unit number of the small capacity unit.

ATB40.41からの情報はラッチ回路43〜48に
ラッチされる。比較回路51はオペランドアドレス等の
論理アドレス2とATB内エフェントリ42理アドレス
(LA)とを比較し、比較回路52は論理アドレス2の
ページ内アドレスの小容量単位指定番号とATB内の当
該単位番号422の内容との一致を確認する。アンドゲ
ート53はATB内情報421の内容により、比較回路
52の比較結果を出力するか否かを示すゲートであり、
421の内容がLg I Hの時は、比較回路52の比
較結果(0または1の信号)がアンドゲート54に送ら
れ、421の内容が“□ jlの時は、比較回路52の
比較結果は無意味であるので、アンドゲート53の出力
は常に“0″となり、アンドゲート55の出力値のみが
有効となる。アンドゲート55の出力は、比較回路51
で一致がとれ、かつ、421の内容が0”のとき“1”
となるものである。なお、421の内容が“1”の時は
、アンドゲート53および54により比較回路51の比
較結果出力と比較回路52の比較結果出力との論理積条
件がとられ1両方ともATB内の情報と一致した時のみ
、ATBから出力された実ページ番号(P)、リングレ
ベル(RL)、アクセス制限情報(AR’)が有効とな
る。それらの情報が有効か無効かは選択回路57〜59
で選択される。
Information from ATB 40.41 is latched into latch circuits 43-48. The comparison circuit 51 compares the logical address 2 such as the operand address with the physical address (LA) of the effect memory 42 in the ATB, and the comparison circuit 52 compares the small capacity unit designation number of the address in the page of the logical address 2 with the corresponding unit number in the ATB. 422 is confirmed. The AND gate 53 is a gate that indicates whether or not to output the comparison result of the comparison circuit 52 according to the contents of the ATB internal information 421.
When the content of 421 is Lg I H, the comparison result of the comparison circuit 52 (signal of 0 or 1) is sent to the AND gate 54, and when the content of 421 is "□ jl, the comparison result of the comparison circuit 52 is sent to the AND gate 54. Since it is meaningless, the output of the AND gate 53 is always "0" and only the output value of the AND gate 55 is valid.
“1” if there is a match and the content of 421 is “0”
This is the result. Note that when the content of 421 is "1", the AND gates 53 and 54 take the AND condition of the comparison result output of the comparison circuit 51 and the comparison result output of the comparison circuit 52, and 1, both are the information in the ATB. Only when they match, the real page number (P), ring level (RL), and access restriction information (AR') output from the ATB become valid. Selection circuits 57 to 59 determine whether the information is valid or invalid.
is selected.

なお、アドレス変換バッファ(ATB)の索引に関する
詳細説明は、−般的に既に公知の事項であるので省略す
る。
A detailed explanation regarding the index of the address translation buffer (ATB) will be omitted since it is generally known.

また、アドレス変換バッファ(ATB)には。Also, in the address translation buffer (ATB).

タイレフトモードでメモリアクセスした場合も保護情報
(RLRAR等)を登録し、高速に処理する方法をとる
場合がある。その時は、ATBエントリにダイレクトモ
ード時の情報か否かを保持し識別する。これに本発明を
適用すると、ダイレクトモード時に登録する情報のうち
のRLは、第1図で生成されたRLEが登録されてもま
たは別の値でもどちらでもよい。
Even when memory is accessed in tie-left mode, protection information (such as RLRAR) may be registered to speed up processing. At that time, the ATB entry holds and identifies whether the information is for direct mode or not. When the present invention is applied to this, the RL of the information registered in the direct mode may be the RLE generated in FIG. 1, or may be a different value.

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

以上説明したように、本発明によれば、リングレベルと
アクセス制限によりメモリ保護を行う電子計算機におい
て、マツピングモード時のみならず、ダイレクトモード
時もメモリ保護を行うことができる。また、実ページ対
応のアクセス制限情報、ページ内小容量単位のアクセス
制限情報の2面を持つことにより、ページ内小容量単位
のアクセス制御がマツピングモード時もダイレクトモー
ド時も適用できるようになったことにより、プログラム
の高信頼度な造りを行えるようになると\もに、プログ
ラムのステップ数を削減する目的でダイレクトモードで
処理するプログラムが造り易くなり、装置の性能を改善
することができる。
As described above, according to the present invention, in an electronic computer that protects memory by ring level and access restriction, memory can be protected not only in mapping mode but also in direct mode. In addition, by having two sides of access restriction information for real pages and access restriction information for small page capacity units, access control for small page capacity units can be applied in both mapping mode and direct mode. As a result, it becomes possible to create programs with high reliability, and it also becomes easier to create programs that process in direct mode in order to reduce the number of steps in the program, and the performance of the device can be improved.

また、小容量単位の保護のために、該単位番号をアドレ
ス変換バッファ(ATB)に登録することにより、小容
量単位の保護を行っても、高速アドレス変換が可能とな
る。これは、結果的にATBが、ページ単位の割当てか
ら1 / 2 mページ単位の割当てどなることで、A
TB上にない確率が増え、性能が多少ダウンする面もあ
るが、ATBに使用するR A M素子の高集積化によ
り、ATBが大容量化してきているため、より有効にA
TBを使用することができ、これによる性能への影響は
微小と考えられる。
Furthermore, by registering the unit number in the address translation buffer (ATB) for protection in small capacity units, high-speed address translation is possible even when protection is performed in small capacity units. As a result, ATB changes from allocation in page units to allocation in 1/2 m page units, and ATB
The probability that the RAM is not on the TB will increase, and the performance will drop to some extent. However, due to the high integration of the RAM elements used in the ATB, the capacity of the ATB is increasing, so the ATB can be used more effectively.
TB can be used, and the impact on performance is considered to be minimal.

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

第1図はPSW回りのリングレベル制御に関する本発明
実施例のブロック図、第2図はアクセス制限情報を2段
階に持つ場合の本発明実施例のブロック図、第3図は2
段階のアクセス制限情報によるメモリ保護制御に関する
本発明実施例のブロック図、第4図は小容量の単位のア
クセス制限を行わせる時のアドレス変換バッファ(AT
B)への情報の保持と参照時の制御に関する本発明実施
例のブロック図、第5図は従来のメモリ保護方式の構成
例を示す図である。 1・・・プログラム状態語(PSW)、11・・・実行
リングレベル(RLり、12・・・ダイレクト/マツピ
ングモード・ラッチ。 2・・・論理アドレス、 4,5・・・アドレス変換テ
ーブル、 41・・・参照リングレベル(RLR)、5
1・・・アクセス制限情報(AR)、8.9・・・比較
回路、 10・・・選択回路、20.21・・・アクセ
ス制限情報保持メモリ、22・・・実アドレス、 40
.41・・・アドレス変換バッファ。 第1図 @2図 第3図 第4図
FIG. 1 is a block diagram of an embodiment of the present invention regarding ring level control around PSW, FIG. 2 is a block diagram of an embodiment of the present invention in which access restriction information is provided in two stages, and FIG.
FIG. 4 is a block diagram of an embodiment of the present invention regarding memory protection control using step-by-step access restriction information.
FIG. 5 is a block diagram of an embodiment of the present invention regarding control of information retention and reference to B), and FIG. 5 is a diagram showing an example of the configuration of a conventional memory protection system. 1...Program status word (PSW), 11...Execution ring level (RL), 12...Direct/mapping mode latch. 2...Logical address, 4, 5...Address conversion table , 41... Reference ring level (RLR), 5
1... Access restriction information (AR), 8.9... Comparison circuit, 10... Selection circuit, 20.21... Access restriction information holding memory, 22... Real address, 40
.. 41...Address translation buffer. Figure 1 @ Figure 2 Figure 3 Figure 4

Claims (3)

【特許請求の範囲】[Claims] (1)リングレベルとアクセス制限により主メモリへの
アクセス保護を行い、かつ該リングレベルとアクセス制
限の情報をアドレス変換テーブルに有し、該アドレス変
換テーブルに持つリングレベル(参照リングレベル)と
プログラム状態語(PSW)上のリングレベル(実行リ
ングレベル)との比較により、アクセス制限情報の制限
条件を制御している電子計算機において、マッピングモ
ード時は参照リングレベル(RL_R)と実行リングレ
ベル(RL_E)とを比較して、RL_E=0の時は制
限なくアクセスし、RL_E≦RL_Rの時はアクセス
制限情報に従い、RL_E>RL_Rの時は読出しのみ
可とするとゝもに、ダイレクトモード時は、実行リング
レベル(RL_E)を常に参照リングレベル(RL_R
)と等しくする手段を設け、マッピングモード時もダイ
レクトモード時もメモリ保護を有効に動作せしめること
を特徴とするメモリ保護方式。
(1) Access to the main memory is protected using ring levels and access restrictions, and information on the ring levels and access restrictions is stored in an address translation table, and the ring levels (reference ring levels) and programs held in the address translation table In a computer that controls the restriction conditions of access restriction information by comparison with the ring level (execution ring level) on the status word (PSW), the reference ring level (RL_R) and execution ring level (RL_E) are determined in the mapping mode. ), when RL_E=0, access is allowed without restriction, when RL_E≦RL_R, access is allowed according to the access restriction information, when RL_E>RL_R, only reading is allowed, and in direct mode, execution is possible. Always refer to the ring level (RL_E).
) is provided, and the memory protection method is characterized in that the memory protection is effectively operated both in the mapping mode and in the direct mode.
(2)上記アドレス変換テーブル上のアクセス制限情報
とは別に、主メモリの実ページ単位に、該実ページのア
クセス制限情報をもつ第1のメモリと、該実ページ内小
単位容量に対するアクセス制限情報を持つ第2のメモリ
とを有し、第1のメモリ上の情報により該実ページ内小
単位のアクセス制限の有無を判断するとゝもに、ダイレ
クトモード時は第1または第2のメモリの内容によりア
クセス制限を受け、マッピングモード時はアドレス変換
テーブル上のアクセス制限情報と第1または第2のメモ
リ内のアクセス制限情報との論理積により生成されるア
クセス制限値によりアクセス制限を受けることを特徴と
する特許請求の範囲第1項記載のメモリ保護方式。
(2) Separately from the access restriction information on the address conversion table, a first memory that has access restriction information for each real page of the main memory, and access restriction information for small unit capacity within the real page. The information in the first memory is used to determine whether or not to restrict access to small units within the real page, and in the direct mode, the contents of the first or second memory are Access is restricted by the access restriction value generated by ANDing the access restriction information on the address translation table and the access restriction information in the first or second memory in the mapping mode. A memory protection method according to claim 1.
(3)アドレス変換を高速に処理するためのアドレス変
換バッファ(ATB)を有し、上記ページ単位内小単位
容量に対するアクセス制限がある場合、該ATBへの登
録時、該アクセス小単位容量のアドレス番号を同時に登
録し、ATB参照時、参照アドレス内該アドレス番号と
ATBエントリ内のアドレス番号とを比較して、小容量
単位のメモリ保護処理を高速に実行することを特徴とす
る特許請求の範囲第2項記載のメモリ保護方式。
(3) If an address translation buffer (ATB) is provided to process address translation at high speed, and there is access restriction to the small unit capacity within the page unit, when registering to the ATB, the address of the access small unit capacity is The scope of the claim is characterized in that the numbers are registered at the same time, and when the ATB is referenced, the address number in the reference address and the address number in the ATB entry are compared to execute memory protection processing in small capacity units at high speed. The memory protection method described in Section 2.
JP61144489A 1986-06-20 1986-06-20 Memory protection system Pending JPS63752A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP61144489A JPS63752A (en) 1986-06-20 1986-06-20 Memory protection system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP61144489A JPS63752A (en) 1986-06-20 1986-06-20 Memory protection system

Publications (1)

Publication Number Publication Date
JPS63752A true JPS63752A (en) 1988-01-05

Family

ID=15363518

Family Applications (1)

Application Number Title Priority Date Filing Date
JP61144489A Pending JPS63752A (en) 1986-06-20 1986-06-20 Memory protection system

Country Status (1)

Country Link
JP (1) JPS63752A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100995146B1 (en) 2001-12-05 2010-11-18 글로벌파운드리즈 인크. System and method for handling device accesses to a memory providing increased memory access security

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100995146B1 (en) 2001-12-05 2010-11-18 글로벌파운드리즈 인크. System and method for handling device accesses to a memory providing increased memory access security

Similar Documents

Publication Publication Date Title
JP4295111B2 (en) Memory management system and memory access security grant method based on linear address
US6321314B1 (en) Method and apparatus for restricting memory access
US6823433B1 (en) Memory management system and method for providing physical address based memory access security
US4347565A (en) Address control system for software simulation
US4777588A (en) General-purpose register file optimized for intraprocedural register allocation, procedure calls, and multitasking performance
US4937738A (en) Data processing system which selectively bypasses a cache memory in fetching information based upon bit information of an instruction
JPS6248258B2 (en)
US5873124A (en) Virtual memory scratch pages
JPS61166652A (en) Interruption generating system using exceptional memory protection
KR20000076653A (en) Simple high-performance memory management unit
KR100995146B1 (en) System and method for handling device accesses to a memory providing increased memory access security
KR910001314B1 (en) Method for operating data processing system
KR100791815B1 (en) Privilege promotion based on check of previous privilege level
US6324635B1 (en) Method and apparatus for address paging emulation
JPS63752A (en) Memory protection system
JP2535086B2 (en) Ring reduction logic device
JP2927072B2 (en) Access right inspection device
JPH0368421B2 (en)
JPH01125638A (en) Cache memory device
JPS6252334B2 (en)
JP2019212246A (en) Arithmetic processing unit, information processing device and method for controlling arithmetic processing unit
JPH024016B2 (en)
JPS5918797B2 (en) Address check processing method
JPH0210448A (en) Cache memory system
JPS62264345A (en) Processing system in address conversion exception mode of vector processor