JP3030037B2 - Main storage device - Google Patents

Main storage device

Info

Publication number
JP3030037B2
JP3030037B2 JP1278975A JP27897589A JP3030037B2 JP 3030037 B2 JP3030037 B2 JP 3030037B2 JP 1278975 A JP1278975 A JP 1278975A JP 27897589 A JP27897589 A JP 27897589A JP 3030037 B2 JP3030037 B2 JP 3030037B2
Authority
JP
Japan
Prior art keywords
address
protection key
buffer
real
register
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.)
Expired - Lifetime
Application number
JP1278975A
Other languages
Japanese (ja)
Other versions
JPH03139746A (en
Inventor
潔 薦田
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.)
Mitsubishi Electric Corp
Original Assignee
Mitsubishi Electric 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 Mitsubishi Electric Corp filed Critical Mitsubishi Electric Corp
Priority to JP1278975A priority Critical patent/JP3030037B2/en
Publication of JPH03139746A publication Critical patent/JPH03139746A/en
Application granted granted Critical
Publication of JP3030037B2 publication Critical patent/JP3030037B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明は,情報処理装置における仮想記憶制御方式
を採用した主記憶装置の改良に関するものである。
Description: BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to an improvement of a main storage device employing a virtual storage control method in an information processing device.

〔従来の技術〕[Conventional technology]

一般に,仮想記憶制御方式を採用した主記憶装置にお
いては中央処理装置から与えられる仮想アドレスを予め
用意されたアドレス変換テーブルにより実アドレスに変
換し,その実アドレスにより主記憶メモリに対してアク
セスする。仮想アドレスから実アドレスに変換する変換
速度を速くするため,通常は上記アドレス変換テーブル
の内使用頻度の高い部分を選出しその写しをアドレス変
換バツフアとして設け,アドレス変換テーブルを検索す
る前に先ずアドレス変換バツフアを検索することにより
変換速度を速くしている。
Generally, in a main storage device employing a virtual storage control method, a virtual address given from a central processing unit is converted into a real address by an address conversion table prepared in advance, and the main storage memory is accessed by the real address. In order to increase the speed of conversion from a virtual address to a real address, usually, a frequently used portion of the address conversion table is selected and a copy thereof is provided as an address conversion buffer. The conversion speed is increased by searching for a conversion buffer.

上記のような仮想記憶制御方式を採用した主記憶装置
の一例として第3図に示すものがある。第3図におい
て,(1)は中央処理装置(図示せず)から与えられる
仮想アドレスを格納する仮想アドレスレジスタで,ペー
ジアドレス部分(PA)とページ内アドレス部分(BA)と
から構成されている。(2)は仮想アドレスのページア
ドレスとしての仮想ページアドレスを実アドレスのペー
ジアドレスとしての実ページアドレスに変換する変換テ
ーブル(3)が格納された主記憶メモリ,(4)はこの
実記憶メモリ(2)に対するアクセスを保護するために
使用する保護キーが実ページアドレスに対応して設けら
れている保護キーメモリである。(5)は主記憶メモリ
(2)にアクセスする実アドレスを格納する物理アドレ
スレジスタ,(6)は上記変換テーブル(3)の内使用
頻度の高い部分の写しを保持したアドレス変換バツフア
で,仮想アドレスの1−11ビツトと比較するためのイン
デツクスフイールド(INDX)と,実ページアドレスフイ
ールド(RA)と,保護キーフイールド(KY)と,アドレ
ス変換バツフア(6)の各エントリが有効であることを
示す有効ビツト(V)とから構成されている。(8)は
保護キーフイールド(KY)に保護キーを書き込むための
保護キーライトデータレジスタ,(7)は主記憶メモリ
(2)の変換テーブル(3)でアドレス変換された実ペ
ージアドレスを格納する実ページアドレスレジスタであ
る。(9)は保護キーメモリ(4)の内使用頻度の高い
部分の写しを保持した保護キーバツフアで,インデツク
スフイールド(INDX)と,保護キーフイールド(KY)
と,有効ビツト(V)とから構成されている。この保護
キーバツフア(9)は仮想アドレスレジスタ(1)にア
ドレス変換する必要のない実アドレスが与えられた場
合,その実アドレスに対応する保護キーを検索するもの
である。(10)は仮想アドレスの1−11ビツトとアドレ
ス変換バツフア(6)のインデツクスフイールドとを比
較する第一の比較器,(11)はこの第一の比較器(10)
の出力と有効ビツト(V)とのANDをとる第一のANDゲー
トで,出力1のときがアドレス変換バツフア(6)で求
める変換情報が得られヒツトした状態を表わす。保護キ
ーバツフア(9)の場合も同様に,(12)は第二の比較
器,(13)は第二のANDゲートである。(22)は保護キ
ーを別に格納された保護ロツクと照合するために格納す
る保護キーリードデータレジスタ,(17)はこの保護キ
ーリードデータレジスタ(22)に格納する保護キーを選
択する第一のセレクタでアドレス変換モードレジスタ
(20)により選択され,このアドレス変換モードレジス
タ(20)はアドレス変換をする場合に1となりアドレス
変換バツフア(6)の保護キーを選択し,アドレス変換
をしない場合は0となり保護キーバツフア(9)の保護
キーを選択する。(23)は第二のセレクタで,アドレス
変換モードレジスタ(20)の状態によりアドレス変換バ
ツフア(6)の実ページアドレスフイールドまたは仮想
アドレスのページアドレスが選択される。(24)は以上
述べた装置の動作を制御する制御装置である。
FIG. 3 shows an example of a main storage device adopting the virtual storage control method as described above. In FIG. 3, (1) is a virtual address register for storing a virtual address given from a central processing unit (not shown), and is composed of a page address portion (PA) and an in-page address portion (BA). . (2) is a main storage memory storing a conversion table (3) for converting a virtual page address as a page address of a virtual address into a real page address as a page address of a real address, and (4) is a real storage memory (4). The protection key memory used to protect the access to 2) is a protection key memory provided corresponding to the real page address. (5) is a physical address register for storing a real address for accessing the main memory (2), and (6) is an address conversion buffer holding a copy of a frequently used part of the conversion table (3). Each entry of the index field (INDX) for comparing with the address 1-11 bits, the real page address field (RA), the protection key field (KY), and the address conversion buffer (6) must be valid. And an effective bit (V). (8) is a protection key write data register for writing a protection key in a protection key field (KY), and (7) stores a real page address converted by the conversion table (3) of the main memory (2). This is a real page address register. (9) is a protection key buffer which holds a copy of a frequently used part of the protection key memory (4). The index field (INDX) and the protection key field (KY)
And an effective bit (V). This protection key buffer (9) is to search for a protection key corresponding to the real address when a real address that does not need to be converted is given to the virtual address register (1). (10) is a first comparator for comparing the 1-11 bits of the virtual address with the index field of the address translation buffer (6), and (11) is this first comparator (10).
Is the first AND gate which takes the AND of the output of the address and the effective bit (V). When the output is 1, the conversion information required by the address conversion buffer (6) is obtained and the hit state is shown. Similarly, in the case of the protection key buffer (9), (12) is a second comparator, and (13) is a second AND gate. (22) is a protection key read data register for storing the protection key against a separately stored protection lock, and (17) is a first key for selecting a protection key to be stored in this protection key read data register (22). The address conversion mode register (20) is selected by the selector, and this address conversion mode register (20) becomes 1 when performing address conversion, selects the protection key of the address conversion buffer (6), and 0 when not performing address conversion. Next, the protection key of the protection key buffer (9) is selected. (23) is a second selector for selecting a real page address field or a virtual address page address of the address conversion buffer (6) according to the state of the address conversion mode register (20). (24) is a control device for controlling the operation of the above-described device.

次にこのものの動作について説明する。アドレス変換
をする仮想アドレスが仮想アドレスレジスタ(1)に与
えられると,その仮想アドレスの12−19ビツトが表わす
アドレスによりアドレス変換バツフア(6)上を検索
し,そのアドレスに格納されている変換情報のインデツ
クスフイールドと仮想アドレスの1−11ビツトとを第一
の比較器(10)で比較し一致しなかつた場合,求める変
換情報はアドレス変換バツフア(6)上には存在しない
ことになる。次に,主記憶メモリ(2)上の変換テーブ
ル(3)を検索し得られた実ページアドレスを実ページ
アドレスレジスタ(7)に格納し,その実ページアドレ
スをアドレス変換バツフア(6)の実ページアドレスフ
イールドに格納する。次に,その実ページアドレスによ
り保護キーメモリ(4)で保護キーを検索し得られた保
護キーを保護キーライトデータレジスタ(8)に格納
し,更にその保護キーをアドレス変換バツフア(6)の
保護キーフイルタドに格納する。次に仮想アドレスの1
−11ビツトをアドレス変換バツフア(6)のインデツク
スフイールドに格納するとともに有効ビツト1を格納し
次回のアドレス変換のために変換情報を整備する。アド
レス変換モードレジスタ(20)は1となつているので,
アドレス変換バツフア(6)の保護キーが選択され保護
キーリードデータレジスタ(22)に格納する。この格納
された保護キーは別に格納されている保護ロツクと照合
され,一致した場合は第二のセレクタ(23)においてア
ドレス変換モードレジスタ(20)が1となつているの
で,アドレス変換バツフア(6)の実ページアドレスが
選択され仮想アドレスのページ内アドレスとともに実ア
ドレスとして物理アドレスレジスタ(5)に格納され主
記憶メモリ(2)のアクセスが行なわれる。
Next, the operation of this device will be described. When a virtual address to be translated is given to the virtual address register (1), a search is made on the address translation buffer (6) with the address represented by the 12-19 bits of the virtual address, and the translation information stored in that address is retrieved. If the index field is compared with the 1-11 bits of the virtual address by the first comparator (10) and they do not match, the conversion information to be obtained does not exist on the address conversion buffer (6). Next, the real page address obtained by searching the conversion table (3) on the main storage memory (2) is stored in the real page address register (7), and the real page address is stored in the real page of the address conversion buffer (6). Store in the address field. Next, the protection key is searched for in the protection key memory (4) using the real page address, and the obtained protection key is stored in the protection key write data register (8), and the protection key is further protected by the address conversion buffer (6). Store in key filter. Next, the virtual address 1
-11 bits are stored in the index field of the address conversion buffer (6), and the effective bit 1 is stored to prepare conversion information for the next address conversion. Since the address translation mode register (20) is 1,
The protection key of the address conversion buffer (6) is selected and stored in the protection key read data register (22). The stored protection key is collated with the protection lock stored separately. If the keys match, the address conversion mode register (20) is set to 1 in the second selector (23), so that the address conversion buffer (6) is used. ) Is selected and stored in the physical address register (5) together with the virtual address within the page as a real address, and the main memory (2) is accessed.

〔発明が解決しようとする課題〕[Problems to be solved by the invention]

従来の主記憶装置は以上のように構成されているの
で,アドレス変換する仮想アドレスに対応する実アドレ
スがアドレス変換バツフア(6)にない場合,変換テー
ブルを検索し得られた上記実アドレスにより保護キーメ
モリ(4)から保護キーを得なければならず,保護キー
メモリ(4)を検索して保護キーが得られるまでかなり
の時間がかかりその分装置全体の処理時間が長くなると
いう問題点があつた。
Since the conventional main storage device is configured as described above, if the real address corresponding to the virtual address to be translated is not in the address translation buffer (6), it is protected by the real address obtained by searching the translation table. It is necessary to obtain the protection key from the key memory (4), and it takes a considerable time until the protection key is obtained by searching the protection key memory (4), thereby increasing the processing time of the entire apparatus. Atsuta.

この発明は上記のような問題点を解消するためになさ
れたもので,保護キーの検索時間を短縮することにより
装置全体の処理時間が短い主記憶装置を得ることを目的
とする。
SUMMARY OF THE INVENTION The present invention has been made to solve the above-described problems, and has as its object to obtain a main storage device in which the processing time of the entire apparatus is reduced by shortening the search time of a protection key.

〔課題を解決するための手段〕[Means for solving the problem]

この発明に係わる主記憶装置は,仮想記憶制御方式に
おける仮想アドレスを主記憶メモリ上の実アドレスに変
換する変換テーブルと,この変換テーブルの内使用頻度
の高い部分の写しと保護キーの写しを設けたアドレス変
換バツフアと,上記主記憶メモリに対するアクセスを可
能とし上記実アドレスに対応して設けられた保護キーを
格納する保護キーメモリと,この保護キーメモリの内使
用頻度の高い部分の写しを設けた保護キーバツフアと,
上記仮想アドレスに基づき上記アドレス変調バツフアか
ら上記仮想アドレスに対応する上記実アドレスを検索し
当該実アドレスが得られなかつた場合上記変換テーブル
から当該実アドレスを検索し得られた当該実アドレスに
基づき上記保護キーバツフアから当該実アドレスに対応
する上記保護キーを検索する制御装置とを備え、上記保
護キーバッファから当該実アドレスに対応する上記保護
キーが検索された場合、上記アドレス変換バッファは、
検索された上記保護キーを格納するように構成したもの
である。
The main storage device according to the present invention is provided with a conversion table for converting a virtual address in a virtual storage control system into a real address on the main storage memory, a copy of a frequently used portion of the conversion table and a copy of a protection key. An address conversion buffer, a protection key memory for enabling access to the main storage memory and storing a protection key provided corresponding to the real address, and a copy of a frequently used portion of the protection key memory. A protection key buffer and
If the real address corresponding to the virtual address is searched from the address modulation buffer based on the virtual address and the real address cannot be obtained, the real address obtained from the conversion table is searched based on the real address. A control unit that searches the protection key buffer for the protection key corresponding to the real address, and when the protection key corresponding to the real address is searched from the protection key buffer, the address conversion buffer includes:
The protection key searched is stored.

〔作用〕[Action]

この発明における保護キーバツフアは,実アドレスと
仮想アドレスのいずれの場合にも使用できるように共用
としたので,仮想アドレスをアドレス変換する場合に保
護キーを得るために上記保護キーバツフアを検索するこ
とができる。
Since the protection key buffer according to the present invention is shared so that it can be used for both the real address and the virtual address, the protection key buffer can be searched for obtaining the protection key when translating the virtual address. .

〔発明の実施例〕(Example of the invention)

以下,この発明による主記憶装置の一実施例を第1図
および第2図に基づいて説明する。第1図は主記憶装置
の主要部の回路図を示し,図において(1)は中央処理
装置から与えられプログラム上の論理アドレスから実ア
ドレスにアドレス変換される仮想アドレスまたはアドレ
ス変換する必要のない実アドレスを保持する仮想アドレ
スレジスタである。この仮想アドレスレジスタ(1)は
仮想アドレスのページアドレス(PA)を格納する部分と
ページ内アドレス(BA)を格納する部分とから構成され
ている。(2)は主記憶メモリ(MM)で,仮想アドレス
の内ページ部分のアドレスである仮想ページアドレスを
実アドレスの内ページ部分の実ページアドレスに変換す
る変換テーブル(3)が格納されている。(4)は主記
憶メモリ(2)に対する不正なアクセスを防止するため
に別に設けた保護ロツクと一致したときにアクセスを可
能とするページ単位の保護キーが上記実ページアドレス
に対応して格納されている保護キーメモリである。
(5)は主記憶メモリ(2)および保護キーメモリ
(4)をアクセスするための実アドレスを保持する物理
アドレスレジスタで,そのアクセスは共通のアドレスバ
スを使用するため主記憶メモリ(2)および保護キーメ
モリ(4)は同時にはアクセスできない。(6)は変換
テーブル(3)の内使用頻度の高い部分の写しと保護キ
ーの写しを設けたアドレス変換バツフアで,仮想ページ
アドレスが格納されているINDXフイールドとその仮想ペ
ージアドレスに対応する実ページアドレスが格納されて
いるRAフイールドと保護キーが格納されているKYフイー
ルドとアドレス変換バツフア(6)に格納されている変
換情報1件毎を表わす各エントリが有効であることを表
わす有効ビツトVとから構成されている。このアドレス
変換バツフア(6)には256エントリが格納されてお
り,仮想アドレスレジスタ(1)に保持されるページア
ドレスの内12−19ビツトの8ビツトが上記256エントリ
を指示するアドレスを形成している。(7)は上記変換
テーブルから得られた実ページアドレスを保持する実ペ
ージアドレスレジスタ,(8)は保護キーメモリ(4)
から得られた保護キーを保持する保護キーライトデータ
レジスタである。(9)は保護キーメモリ(4)の内使
用頻度の高い部分の写しを設けた保護キーバツフアで,
実ページアドレスが格納されているINDXフイールドとそ
の実ページアドレスに対応する保護キーが格納されてい
るKYフイールドと各エントリが有効であることを表わす
有効ビツトVからなるVフイールドとから構成されてい
る。(10)は第一の比較器で,仮想アドレスレジスタ
(1)に保持された仮想アドレスの1−11ビツトとアド
レス変換バツフア(6)のINDXフイールドとを比較し一
致した場合は1を出力し一致しない場合は0を出力す
る。
An embodiment of the main storage device according to the present invention will be described below with reference to FIGS. FIG. 1 is a circuit diagram of a main part of a main storage device. In FIG. 1, (1) is a virtual address provided from a central processing unit and converted from a logical address on a program to a real address or there is no need for address conversion. This is a virtual address register that holds a real address. The virtual address register (1) includes a portion for storing a page address (PA) of a virtual address and a portion for storing an in-page address (BA). (2) is a main memory (MM) which stores a conversion table (3) for converting a virtual page address, which is an address of an inner page portion of a virtual address, into a real page address of an inner page portion of a real address. In (4), a protection key for each page, which can be accessed when it coincides with a protection lock separately provided for preventing unauthorized access to the main memory (2), is stored in correspondence with the real page address. Protection key memory.
(5) is a physical address register for holding a real address for accessing the main memory (2) and the protection key memory (4). Since the access uses a common address bus, the physical address register (5) is used. The protection key memory (4) cannot be accessed at the same time. (6) is an address conversion buffer provided with a copy of a frequently used part of the conversion table (3) and a copy of the protection key. The INDX field storing the virtual page address and the real address corresponding to the virtual page address are provided. An RA field in which the page address is stored, a KY field in which the protection key is stored, and a valid bit V indicating that each entry indicating each conversion information stored in the address conversion buffer (6) is valid. It is composed of The address conversion buffer (6) stores 256 entries. Of the page addresses held in the virtual address register (1), 8 bits of 12-19 bits form an address designating the 256 entries. I have. (7) is a real page address register for holding the real page address obtained from the conversion table, and (8) is a protection key memory (4)
This is a protection key write data register that holds the protection key obtained from. (9) is a protection key buffer provided with a copy of a frequently used part of the protection key memory (4).
It is composed of an INDX field in which a real page address is stored, a KY field in which a protection key corresponding to the real page address is stored, and a V field consisting of a valid bit V indicating that each entry is valid. (10) is a first comparator which compares the 1-11 bits of the virtual address held in the virtual address register (1) with the INDX field of the address conversion buffer (6) and outputs 1 if they match. If they do not match, 0 is output.

(11)はこの出力と有効ビツトとのANDをとる第一のA
NDゲートで,この第一のANDゲート(11)の出力が1の
ときが求める変換情報がアドレス変換バツフア(6)に
存在したことを表わす。(12)は第二の比較器で,実ペ
ージアドレスレジスタ(7)に保持された実ページアド
レスの1−11ビツトまたは仮想アドレスレジスタ(1)
に保持された実アドレスの1−11ビツトと保護キーバツ
フア(9)のINDXフイールドとを比較し一致した場合は
1を出力し一致しない場合は0を出力する。(13)はこ
の出力と有効ビツトとのANDをとる第二のANDゲートで,
この第二のANDゲート(13)の出力が1のときが求める
保護キーが保護キーバツフア(9)に存在したことを表
わす。(14)は求める変換情報がアドレス変換バツフア
(6)になく,変換テーブル(3)から実ページアドレ
スを得てその実ページアドレスがアドレス変換バツフア
(6)に格納されたとき1となりその実ページアドレス
へのアクセスが終了したとき0となるミスフラグレジス
タ(M)である。(15)は実ページアドレスレジスタ
(7)に保持された実ページアドレスの12−19ビツトと
仮想アドレスレジスタ(1)に保持された実ページアド
レスの12−19ビツトの内いずれかを選択する第一のセレ
クタで,ミスフラグレジスタ(14)が1のとき前者を選
択し0の時は後者を選択するように設定されている。
(16)は実ページアドレスレジスタ(7)に保持された
実ページアドレスの1−11ビツトと仮想アドレスレジス
タ(1)に保持された実ページアドレスの1−11ビツト
の内いずれかを選択する第二のセレクタで,ミスフラグ
レジスタ(14)が1のとき前者を選択し0のとき後者を
選択するように設定されている。この第二のセレクタ
(16)で選択された信号は,第二の比較器(12)の一方
の入力と保護キーバツフア(9)のINDXフイールドに接
続されている。(17)は保護キーバツフア(9)のKYフ
イールドとアドレス変換バツフア(6)のKYフイールド
の内いずれかを選択する第三のセレクタで,選択用入力
が1のとき保護キーバツフア(9)のKYフイールドが選
択され,選択用入力が0のときアドレス変換バツフア
(6)のKYフイールドが選択されるように設定されてい
る。(18)は一方の入力にNOT回路(19)が接続されたO
Rゲートで,NOT回路(19)が接続された入力にアドレス
変換をする場合1でアドレス変換をしない場合0となる
アドレス変換モードレジスタ(20)が接続され,他の入
力にはミスフラツグレジスタ(14)が接続されている。
(21)は保護キーリードデータレジスタ(22)に保持さ
れた保護キーと保護キーメモリ(4)から読出した保護
キーの内いずれかを選択する第四のセレクタである。
(23)はアドレス変換バツフア(6)の実ページアドレ
スと仮想アドレスレジスタ(1)に保持された実ページ
アドレスの内いずれかを選択する第五のセレクタで,ア
ドレス変換モードレジスタ(20)が1のときアドレス変
換バツフア(6)の実ページアドレスを選択し0のとき
仮想アドレスレジスタ(1)に保持された実ページアド
レスを選択するように設定されている。(24)は以上述
べた装置の動作を制御する制御装置である。
(11) is the first A that ANDs this output with the effective bit.
In the ND gate, when the output of the first AND gate (11) is 1, it indicates that the conversion information required exists in the address conversion buffer (6). (12) is a second comparator, which is a 1-11 bit of the real page address held in the real page address register (7) or a virtual address register (1).
The 1-11 bits of the real address held in the above are compared with the INDX field of the protection key buffer (9). If they match, 1 is output, and if they do not match, 0 is output. (13) is a second AND gate for ANDing this output with the effective bit.
When the output of the second AND gate (13) is 1, it indicates that the protection key required exists in the protection key buffer (9). (14) is when the conversion information to be obtained is not in the address conversion buffer (6), the real page address is obtained from the conversion table (3), and the real page address is stored in the address conversion buffer (6), and becomes 1 to the real page address. This is a miss flag register (M) which becomes 0 when the access of the data is completed. (15) is a process for selecting any one of the 12-19 bits of the real page address held in the real page address register (7) and the 12-19 bits of the real page address held in the virtual address register (1). One selector is set so that when the miss flag register (14) is 1, the former is selected, and when it is 0, the latter is selected.
(16) is a step for selecting any one of 1-11 bits of the real page address held in the real page address register (7) and 1-11 bits of the real page address held in the virtual address register (1). The second selector is set so that when the miss flag register (14) is 1, the former is selected, and when it is 0, the latter is selected. The signal selected by the second selector (16) is connected to one input of the second comparator (12) and the INDX field of the protection key buffer (9). (17) is a third selector for selecting one of the KY field of the protection key buffer (9) and the KY field of the address conversion buffer (6). When the selection input is 1, the KY field of the protection key buffer (9) Is selected, and when the selection input is 0, the KY field of the address conversion buffer (6) is set to be selected. (18) is O with NOT circuit (19) connected to one input
An address conversion mode register (20), which is 1 when the address is converted to the input to which the NOT circuit (19) is connected and is 0 when the address is not converted, is connected to the R gate, and the misflag register is connected to the other inputs (14) is connected.
Reference numeral (21) denotes a fourth selector for selecting one of the protection key stored in the protection key read data register (22) and the protection key read from the protection key memory (4).
(23) is a fifth selector for selecting either the real page address of the address conversion buffer (6) or the real page address held in the virtual address register (1). At the time of setting, the real page address of the address conversion buffer (6) is selected, and at 0, the real page address held in the virtual address register (1) is selected. (24) is a control device for controlling the operation of the above-described device.

次にこのものの動作について第2図のフローチャート
を参照しながら第1図に基づいて説明する。先ず,ステ
ツプ25においてアドレス変換が必要かどうかすなわちア
ドレス変換モードが指定されているかどうかが判定され
る。
Next, the operation of this will be described based on FIG. 1 with reference to the flowchart of FIG. First, in step 25, it is determined whether address conversion is necessary, that is, whether the address conversion mode is designated.

ステツプ25においてアドレス変換モードが指定されて
いない場合,ミスフラグレジスタ(14)が0のため第二
のセレクタ(16)は仮想アドレスレジスタ(1)からの
入力を選択しステツプ26において仮想アドレスレジスタ
(1)に保持された実アドレスの12−19ビツトにより保
護キーバツフア(9)の該当するアドレスが検索され,
そのアドレスにおけるINDXフイールドのデータと仮想ア
ドレスレジスタ(1)に保持された実アドレスの1−11
ビツトとが一致しているかどうかが第二の比較器(12)
でチエツクされ更に第二のANDゲート(13)にてVフイ
ールドが1かどうかがチエツクされる。その結果,第二
のANDゲート(13)の出力が1のときは保護キーバツフ
ア(9)に当該保護キーが存在することを表わし,第二
のANDゲート(13)の出力が0のときは当該保護キーが
存在しないことを表わす。
If the address conversion mode is not designated in step 25, the second selector (16) selects the input from the virtual address register (1) because the miss flag register (14) is 0, and the virtual address register ( The corresponding address of the protection key buffer (9) is searched by the 12-19 bits of the real address held in 1).
The data of the INDX field at that address and 1-11 of the real address held in the virtual address register (1)
Whether the bit matches the second comparator (12)
The second AND gate (13) checks whether the V field is 1 or not. As a result, when the output of the second AND gate (13) is 1, it indicates that the protection key is present in the protection key buffer (9), and when the output of the second AND gate (13) is 0, the corresponding protection key is present. Indicates that no protection key exists.

ステツプ26において保護キーバツフア(9)に当該保
護キーが存在する場合にはKYBヒツトであり,ミスフラ
グレジスタ(14)が0でアドレス変換モードレジスタ
(20)が0のためORゲート(18)に接続されたNOT回路
(19)によりアドレス変換モードレジスタ(20)の出力
が反転されてORゲート(18)の出力は1となり,保護キ
ーバツフア(9)のKYフイールドが選択され保護キーリ
ードデータレジスタ(22)に保持される。
In step 26, if the protection key is present in the protection key buffer (9), it is a KYB hit. Since the miss flag register (14) is 0 and the address translation mode register (20) is 0, it is connected to the OR gate (18). The output of the address conversion mode register (20) is inverted by the NOT circuit (19), and the output of the OR gate (18) becomes 1, the KY field of the protection key buffer (9) is selected, and the protection key read data register (22) is selected. ).

ステツプ26において保護キーバツフア(9)に当該保
護キーが存在しない場合には,ステツプ27において仮想
アドレスレジスタ(1)に保持された実ページアドレス
に対応する当該保護キーを保護キーメモリ(4)から読
出し保護キーバツフア(9)のKYフイールドに格納し,
同時に仮想アドレスレジスタ(1)に保持された実ペー
ジアドレスの1−11ビツトが保護キーバッファ(9)の
INDXフイールドに格納されるとともに1がVフイールド
に格納される。次に,ステツプ26の説明で述べたように
当該保護キーは保護キーリードデータレジスタ(22)に
保持される。
If the protection key does not exist in the protection key buffer (9) in step 26, the protection key corresponding to the real page address held in the virtual address register (1) is read from the protection key memory (4) in step 27. Store it in the KY field of the protection key buffer (9),
At the same time, 1-11 bits of the real page address held in the virtual address register (1) are stored in the protection key buffer (9).
1 is stored in the V field while being stored in the INDX field. Next, as described in the description of step 26, the protection key is held in the protection key read data register (22).

ステツプ25においてアドレス変換モードが指定されて
いる場合は,ステツプ28において仮想アドレスレジスタ
(1)に保持された仮想アドレスの12−19ビツトにより
アドレス変換バツフア(6)の該当するアドレスが検索
され,そのアドレスにおけるINDXフイールドのデータと
仮想アドレスレジスタ(1)に保持された仮想アドレス
の1−11ビツトとが一致しているかどうかが第一の比較
器(10)でチエツクされ更に第一のANDゲート(11)に
てVフイールドが1かどうかがチエツツされる。その結
果,第一のANDゲート(11)の出力が1のときはアドレ
ス変換バツフア(6)に当該変換情報が存在することを
表わし,第一のANDゲート(11)の出力が0のときは当
該変換情報が存在しないことを表わす。
If the address translation mode is designated in step 25, the corresponding address of the address translation buffer (6) is searched in step 28 by using the virtual address 12-19 bits held in the virtual address register (1). The first comparator (10) checks whether or not the data of the INDX field at the address matches the 1-11 bits of the virtual address held in the virtual address register (1), and further checks the first AND gate (1). At 11), it is checked whether the V field is 1 or not. As a result, when the output of the first AND gate (11) is 1, it indicates that the translation information exists in the address translation buffer (6), and when the output of the first AND gate (11) is 0, Indicates that the conversion information does not exist.

ステツプ28においてアドレス変換バツフア(6)に当
該変換情報が存在した場合にはTLBヒツトであり,ミス
フラグレジスタ(14)が0でアドレス変換モードレジス
タ(20)が1のためORゲート(18)に接壮されたNOT回
路(19)によりアドレス変換モードレジスタ(20)の出
力が反転されて0となりその結果ORゲート(18)の出力
は0となり,アドレス変換バツフア(6)のKYフイール
ドが選択され保護キーリードデータレジスタ(22)に保
持される。
If the translation information is present in the address translation buffer (6) in step 28, it is a TLB hit. Since the miss flag register (14) is 0 and the address translation mode register (20) is 1, the OR gate (18) The output of the address conversion mode register (20) is inverted to 0 by the connected NOT circuit (19), and as a result, the output of the OR gate (18) becomes 0, and the KY field of the address conversion buffer (6) is selected. It is held in the protection key read data register (22).

ステツプ28においてアドレス変換バツフア(6)に当
該変換情報が存在しない場合には,ステツプ29において
先ずミスフラグレジスタ(14)に1がセツトされ,主記
憶メモリ(2)に格納されている変換テーブル(3)を
検索して仮想アドレスレジスタ(1)に保持された仮想
アドレスの仮想ページアドレスに対応する実ページアド
レスを得てその実ページアドレスを実ページアドレスレ
ジスタ(7)に保持させるとともにアドレス変換バツフ
ア(6)のRAフイールドに格納する。
If there is no corresponding translation information in the address translation buffer (6) in step 28, 1 is first set in the miss flag register (14) in step 29, and the translation table (1) is stored in the main memory (2). 3) to obtain a real page address corresponding to the virtual page address of the virtual address held in the virtual address register (1), to hold the real page address in the real page address register (7), and to execute the address conversion buffer ( Store in RA field of 6).

ステツプ30においては,ステツプ29において実ページ
アドレスレジスタ(7)に保持された実ページアドレス
の12−19ビツトがミスフラグレジスタ(14)が1である
ことにより第一のセレクタ(15)で選択され、保護キー
バツフア(9)を読み出すアドレスとなり保護キーバツ
フア(9)から当該保護キーが検索される。
In step 30, 12-19 bits of the real page address held in the real page address register (7) in step 29 are selected by the first selector (15) because the miss flag register (14) is 1. , Becomes the address from which the protection key buffer (9) is read out, and the protection key is retrieved from the protection key buffer (9).

ステツプ31においては,ステツプ30で得られたアドレ
スの保護キーバツフア(9)におけるINDXフイールドの
データとミスフラグレジスタ(14)が1であることによ
り第二のセレクタ(16)で選択された実ページアドレス
の1−11ビツトとが一致しているかどうかが第二の比較
器(12)でチエツクされ更に第二のANDゲート(13)に
てVフイールドが1かどうかがチエツクされる。その結
果,第二のANDゲート(13)の出力が1のときは保護キ
ーバツフア(9)に当該保護キーが存在することを表わ
し,第二のANDゲート(13)の出力が0のときは当該保
護キーが存在しないことを表わす。
In step 31, the data of the INDX field in the protection key buffer (9) of the address obtained in step 30 and the value of the miss flag register (14) are 1, and the actual page address selected by the second selector (16). A check is made by the second comparator (12) to see if the 1 to 11 bits are equal, and a check is made by the second AND gate (13) to see if the V field is one. As a result, when the output of the second AND gate (13) is 1, it indicates that the protection key is present in the protection key buffer (9), and when the output of the second AND gate (13) is 0, the corresponding protection key is present. Indicates that no protection key exists.

ステツプ31において保護キーバツフア(9)に当該保
護キーが存在する場合には,ミスフラグレジスタ(14)
が1でアドレス変換モードレジスタ(20)が1のためOR
ゲート(18)に接続されたNOT回路(19)によりアドレ
ス変換モードレジスタ(20)の出力が反転されて0とな
りその結果ORゲート(18)の出力は1となり,保護キー
バツフア(9)のKYフイールドのデータが選択され当該
保護キーとして保護キーリードデータレジスタ(22)に
保持される。この当該保護キーは第四のセレクタ(21)
においてKYBヒツトであることから1が入力されること
により選択され保護キーライトデータレジスタ(8)に
保持されるとともにアドレス変換バツフア(6)のKYフ
イールドに格納される。同時に仮想アドレスレジスタ
(1)に保持された仮想アドレスの1−11ビツトがアド
レス変換バツフア(6)のINDXフイールドに格納される
とともにアドレス変換バツフア(6)のVフイールドに
1が格納される。
If the protection key exists in the protection key buffer (9) in step 31, the miss flag register (14)
OR is 1 because the address translation mode register (20) is 1
The output of the address conversion mode register (20) is inverted to 0 by the NOT circuit (19) connected to the gate (18), and as a result, the output of the OR gate (18) becomes 1 and the KY field of the protection key buffer (9) Is selected and held in the protection key read data register (22) as the protection key. This protection key is provided by the fourth selector (21).
Is selected by inputting 1 because it is a KYB hit, and is stored in the protection key write data register (8) and stored in the KY field of the address conversion buffer (6). At the same time, 1-11 bits of the virtual address held in the virtual address register (1) are stored in the INDX field of the address conversion buffer (6) and 1 is stored in the V field of the address conversion buffer (6).

ステツプ31において保護キーバツフア(9)に当該保
護キーが存在しない場合は,ステツプ32において当該保
護キーを保護キーメモリ(4)から読出し,KYBヒツトで
ないことから第四のセレクタ(21)に0が入力されるこ
とにより選択され保護キーライトデータレジスタ(8)
に保持されるとともにアドレス変換バツフア(6)のKY
フイールドに格納される。同時に仮想アドレスレジスタ
(1)に保持された仮想アドレスの1−11ビツトがアド
レス変換バツフア(6)のINDXフイールドに格納される
とともにアドレス変換バツフア(6)のVフイールドに
1が格納される。以後は,アドレス変換バツフア(6)
のKYフイールドに格納された当該保護キーが第三のセレ
クタ(17)により選択され保護キーリードデータレジス
タ(22)に保持される。
If the protection key does not exist in the protection key buffer (9) in step 31, the protection key is read from the protection key memory (4) in step 32 and 0 is input to the fourth selector (21) because it is not a KYB hit. Protected key write data register (8)
And KY of the address conversion buffer (6)
Stored in the field. At the same time, 1-11 bits of the virtual address held in the virtual address register (1) are stored in the INDX field of the address conversion buffer (6) and 1 is stored in the V field of the address conversion buffer (6). Thereafter, the address conversion buffer (6)
The protection key stored in the KY field is selected by the third selector (17) and held in the protection key read data register (22).

ステツプ33においては,別に設けられたプログラム状
態語(PSW)(図示せず)に格納されている保護ロツク
の内当該保護キーに対応する保護ロツクと保護キーリー
ドデータレジスタ(22)に保持された当該保護キーとを
比較しそれらが一致するかどうかが判定される。上記保
護ロツクは主記憶メモリ(2)に対する不正なアクセス
を防止し主記憶メモリ(2)を保護するために保護キー
と一対で実ページアドレスに対応して設けられている。
In step 33, of the protection locks stored in the separately provided program status word (PSW) (not shown), the protection lock corresponding to the protection key and the protection lock are stored in the protection key read data register (22). The protection key is compared to determine whether they match. The protection lock is provided in a pair with a protection key corresponding to a real page address in order to prevent unauthorized access to the main storage memory (2) and protect the main storage memory (2).

ステツプ33で当該保護キーとプログラム状態語に格納
された保護ロツクとが一致した場合には,ステツプ34に
おいて第五のセレクタ(23)においてアドレス変換モー
ドレジスタ(20)のデータが1の場合にはアドレス変換
バツフア(6)のRAフイールドに格納されている実ペー
ジアドレスが選択され,アドレス変換モードレジスタ
(20)のデータが0の場合には仮想アドレスレジスタ
(1)に保持された実ページアドレスが選択される。第
五のセレクタ(23)において選択された実ページアドレ
スは,仮想アドレスレジスタ(1)に保持されたページ
内アドレスとともに物理アドレスレジスタ(5)に保持
され主記憶メモリ(2)に対してアクセスが行なわれ
る。
If the protection key matches the protection lock stored in the program status word at step 33, the process proceeds to step 34 if the data of the address translation mode register (20) is 1 in the fifth selector (23). The real page address stored in the RA field of the address conversion buffer (6) is selected, and when the data of the address conversion mode register (20) is 0, the real page address held in the virtual address register (1) is used. Selected. The real page address selected by the fifth selector (23) is held in the physical address register (5) together with the in-page address held in the virtual address register (1), and access to the main memory (2) is performed. Done.

ステツプ34で当該保護キーとプログラム状態語に格納
された保護ロツクとが一致しなかつた場合にはステツプ
35でその例外処理が行なわれる。
If the protection key does not match the protection lock stored in the program status word in step 34, the process proceeds to step 34.
At 35, the exception processing is performed.

〔発明の効果〕〔The invention's effect〕

以上のように,この発明によれば保護キーバツフアを
実アドレスと仮想アドレスのいずれの場合にも使用でき
るように構成したので,仮想アドレスをアドレス変換す
る場合保護キーを得るために上記保護キーバツフアを検
索することができるので保護キーの検索時間が短縮され
装置全体の処理時間の短い主記憶装置が得られるという
また、この発明によれば、アドレス変換バッファから仮
想アドレスに対応する実アドレスを検索し実アドレスが
得られなかった場合、変換テーブルから得られた実アド
レスに基づいて保護キーバッファから実アドレスに対応
する保護キーを検索するように構成することにより、ア
ドレス変換バッファがアドレス変換しない場合の情報が
失われることを防ぐことができるという効果がある。ま
た、この発明によれば、保護キーバッファから実アドレ
スに対応する保護キーが検索された場合、アドレス変換
バッファに検索された保護キーを格納するように構成す
ることにより、アドレス変換バッファのアドレス変換を
高速処理することができるという効果がある。
As described above, according to the present invention, the protection key buffer is configured so as to be used for both the real address and the virtual address. Therefore, when converting the virtual address, the protection key buffer is searched to obtain the protection key. In addition, according to the present invention, the search time of the protection key can be shortened, and the main storage device having a short processing time of the entire device can be obtained. If the address is not obtained, the configuration is such that the protection key corresponding to the real address is searched from the protection key buffer based on the real address obtained from the conversion table, so that the information when the address conversion buffer does not perform the address conversion. There is an effect that it can be prevented from being lost. Further, according to the present invention, when a protection key corresponding to a real address is retrieved from a protection key buffer, the address translation buffer is configured to store the retrieved protection key. Can be processed at high speed.

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

第1図はこの発明の一実施例による主記憶装置の回路
図,第2図はその動作を示すフローチヤート,第3図は
従来の主記憶装置を示す回路図である。 図において,(2)は主記憶メモリ,(3)は変換テー
ブル,(4)は保護キーメモリ,(6)はアドレス変換
バツファ,(9)は保護バツフア,(24)は制御装置で
ある。 なお,図中,同一符号は同一または相当部分を示す。
FIG. 1 is a circuit diagram of a main storage device according to an embodiment of the present invention, FIG. 2 is a flowchart showing the operation thereof, and FIG. 3 is a circuit diagram showing a conventional main storage device. In the figure, (2) is a main storage memory, (3) is a conversion table, (4) is a protection key memory, (6) is an address conversion buffer, (9) is a protection buffer, and (24) is a control device. In the drawings, the same reference numerals indicate the same or corresponding parts.

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】中央処理装置から与えられプログラム上の
論理アドレスからアドレス変換する必要のない実アドレ
スにアドレス変換される仮想アドレスを主記憶メモリ上
の実アドレスに変換する変換テーブル、この変換テーブ
ルの内使用頻度の高い部分の写しと保護キーの写しを設
けたアドレス変換バッファ、上記主記憶メモリに対する
アクセスを可能とし上記実アドレスに対応して設けられ
た保護キーを格納する保護キーメモリ、この保護キーメ
モリの内使用頻度の高い部分の写しの保護キーに加えて
保護キーと実アドレスとを対応させるためのインデック
ス及び登録した保護キーが有効であることを示す有効ビ
ットを含む保護キーバッファ、上記仮想アドレスに基づ
き上記アドレス変換バッファから上記仮想アドレスに対
応する上記実アドレスを検索し当該実アドレスが得られ
なかった場合上記変換テーブルから当該実アドレスを検
索し得られた当該実アドレスに基づき上記保護キーバッ
ファから当該実アドレスに対応する上記保護キーを検索
し、上記保護キーバッファから当該実アドレスに対応す
る上記保護キーが検索された場合、上記アドレス変換バ
ッファは、検索された上記保護キーを格納する制御装置
を有することを特徴とする主記憶装置。
1. A conversion table for converting a virtual address provided from a central processing unit, which is converted from a logical address on a program into a real address which does not need to be converted, to a real address on a main storage memory. An address conversion buffer provided with a copy of a frequently used part and a copy of a protection key, a protection key memory that enables access to the main storage memory and stores a protection key provided corresponding to the real address, A protection key buffer including, in addition to a protection key for a copy of a frequently used part of the key memory, an index for associating the protection key with a real address and a valid bit indicating that the registered protection key is valid, The real address corresponding to the virtual address is read from the address translation buffer based on the virtual address. If the real address is not obtained by searching for the protection key, the protection key corresponding to the real address is searched from the protection key buffer based on the real address obtained by searching the conversion table for the real address. When the protection key corresponding to the real address is retrieved from the protection key buffer, the address translation buffer has a control device for storing the retrieved protection key.
JP1278975A 1989-10-26 1989-10-26 Main storage device Expired - Lifetime JP3030037B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1278975A JP3030037B2 (en) 1989-10-26 1989-10-26 Main storage device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1278975A JP3030037B2 (en) 1989-10-26 1989-10-26 Main storage device

Publications (2)

Publication Number Publication Date
JPH03139746A JPH03139746A (en) 1991-06-13
JP3030037B2 true JP3030037B2 (en) 2000-04-10

Family

ID=17604679

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1278975A Expired - Lifetime JP3030037B2 (en) 1989-10-26 1989-10-26 Main storage device

Country Status (1)

Country Link
JP (1) JP3030037B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9940268B2 (en) 2013-02-05 2018-04-10 Arm Limited Handling memory access protection and address translation in a data processing apparatus

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5847784B2 (en) * 1978-08-30 1983-10-25 富士通株式会社 key storage system

Also Published As

Publication number Publication date
JPH03139746A (en) 1991-06-13

Similar Documents

Publication Publication Date Title
US5628023A (en) Virtual storage computer system having methods and apparatus for providing token-controlled access to protected pages of memory via a token-accessible view
JP2825550B2 (en) Multiple virtual space address control method and computer system
US3938100A (en) Virtual addressing apparatus for addressing the memory of a computer utilizing associative addressing techniques
US4733350A (en) Improved purge arrangement for an address translation control system
JP4295111B2 (en) Memory management system and memory access security grant method based on linear address
US4999770A (en) Command controlled multi-storage space protection key pretesting system permitting access regardless of test result if selected key is predetermined value
JPS63502224A (en) Paged storage management unit that can selectively support multiple address spaces
US5276829A (en) Data processing system including cache memory for rapidly converting a logical address into a physical address using shared memory flag
JPH06139149A (en) Multiple virtual space control device
JP3030037B2 (en) Main storage device
US4424564A (en) Data processing system providing dual storage of reference bits
JPH0548497B2 (en)
JPH0695967A (en) Data processor
JPS5922315B2 (en) Buffer memory control method
JP3476402B2 (en) Address translation device and address translation method
JP3290682B2 (en) Address translation device
JPH08305634A (en) Information processing method and device therefor
JPH01166148A (en) Memory access device
JPH0368421B2 (en)
JP2641319B2 (en) Address translation buffer clear method
JPH09504627A (en) Virtual indexable cache memory
JPS60230249A (en) Storage protecting system
JPH06309196A (en) Information processor with trace function
JPH0337217B2 (en)
JPS63292255A (en) Logical cache