JPH01288943A - Memory protective system - Google Patents

Memory protective system

Info

Publication number
JPH01288943A
JPH01288943A JP11961488A JP11961488A JPH01288943A JP H01288943 A JPH01288943 A JP H01288943A JP 11961488 A JP11961488 A JP 11961488A JP 11961488 A JP11961488 A JP 11961488A JP H01288943 A JPH01288943 A JP H01288943A
Authority
JP
Japan
Prior art keywords
key
program
memory
access
access key
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
JP11961488A
Other languages
Japanese (ja)
Inventor
Akira Yamagami
山上 明
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 JP11961488A priority Critical patent/JPH01288943A/en
Publication of JPH01288943A publication Critical patent/JPH01288943A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To refer to the prescribed address contents of a program by providing a routine which sets an access level in a control table at an access key as an exception processing routine when the access key does not correspond to a memory key and prescribed conditions are satisfied. CONSTITUTION:When a program 1 refers to a prescribed address 6 in a reference page 5 in a memory 4, whether or not a memory key 7 coincides with an access key 3 in a program condition word 2 is checked. When the coincide the reference to the prescribed address of the program 1 is permitted. When they do not coincide whether or not an access key (i) is smaller than a memory key (j) is checked. When the condition of (i)<=(j) is satisfied, an exception processing routine 8 substitutes the value of an access level in a control table 9 for the value of the key 3 in the condition word 2. Here, the value of the key 3 coincides with the memory key 7, and the reference to the prescribed address of the program is permitted.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 この発明はメモリ内の所定アドレスを参照する場合、所
定アドレスの属する参照ページの記憶キーとプログラム
の状態話中のアクセスキーとが一致する場合のみ参照を
許す記憶保護方式に関する。
[Detailed Description of the Invention] [Industrial Application Field] This invention provides a method for referring to a predetermined address in a memory, when the storage key of the reference page to which the predetermined address belongs matches the access key of the program in the busy state. Concerning a memory protection method that allows only reference.

〔従来の技術〕[Conventional technology]

第3図は従来の記憶保護方式を説明するための模式図で
、図において1はプログラム、2はプログラム1の状態
を示すプログラム状態語、3はプログラム状態話中にあ
るアクセスキー、4は主記憶としてのメモリ、5はメモ
リ4内の所定アドレスが属する参照ページ、6は参照ベ
ージ5内における所定アドレス、7は上記参照ページ5
に設定されている記憶キーである。
FIG. 3 is a schematic diagram for explaining a conventional memory protection method. In the figure, 1 is a program, 2 is a program status word indicating the status of program 1, 3 is an access key in the program status busy state, and 4 is a main 5 is a reference page to which a predetermined address in the memory 4 belongs; 6 is a predetermined address in the reference page 5; 7 is the reference page 5.
This is the memory key set to .

次に動作について説明する。Next, the operation will be explained.

プログラム1がメモリ4上の参照ベージ5内にある参照
アドレス6の内容を参照する場合、その時のプログラム
状態語2の中に設定されたアクセスキー;3と参照ペー
ジ5に対応して設定された記憶キー7とが一致するか否
か調べる。そしてアクセスキー3と記憶キー7とが一致
する場合、プ[2グラム■は所定アドレス6の内容を参
照するごとができる。
When program 1 refers to the contents of reference address 6 in reference page 5 on memory 4, the access key set in program status word 2 at that time; 3 is set corresponding to reference page 5. It is checked whether or not the stored key 7 matches. If the access key 3 and the storage key 7 match, the program 2-gram 2 can refer to the contents of the predetermined address 6.

またアクセスキー3と記憶キー7とが一致しない場合、
記憶保護例外として内部割込みが発生し、所定アドレス
6の参照が禁止される。
Also, if access key 3 and memory key 7 do not match,
An internal interrupt is generated as a memory protection exception, and reference to the predetermined address 6 is prohibited.

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

従来の記憶保護方式は、以上説明したように構成されて
いるので、プログラムとメモリを階層化し、あるレベル
以上のプログラムはそのレベル以下のメモリにはアクセ
スできないといった所定の条件の下での柔軟な制御がで
きず、アクセスごとに記憶キーにアクセスキーを設定し
なおさなければならないため、処理性能が落ちるという
問題点があった。
Conventional memory protection systems are structured as explained above, so programs and memory are layered, and programs above a certain level cannot access memory below that level. This poses a problem in that processing performance deteriorates because it cannot be controlled and the access key must be reset in the storage key each time it is accessed.

この発明は上記のような問題点を解消するためにへされ
たもので、アクセスキーと記憶キーとが一致しなくとも
所定の条件を満たす場合には所定アドレスの参照できる
よう柔軟に対処して処理性能を向上させることを目的と
している。
This invention was made to solve the above-mentioned problems, and it flexibly deals with the problem so that even if the access key and the storage key do not match, a predetermined address can be referenced if a predetermined condition is met. The purpose is to improve processing performance.

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

この発明に係る記憶保護方式は、プログラムのアクセス
レベルを管理する管理テーブル9と、上記アクセスキー
3と上記記憶キー7とが一致しないが、所定の条件を満
たす場合上記管理テーブル9内のアクセスレベルIOを
上記アクセスキー3に設定する例外処理ルーチン8を設
け、上記所定の条件の下で参照ページ5内の所定アドレ
ス6の参照を許すことを特徴とするものである。
In the storage protection system according to the present invention, although the access key 3 and the storage key 7 do not match with the management table 9 for managing program access levels, if a predetermined condition is met, the access level in the management table 9 is The present invention is characterized in that an exception handling routine 8 for setting IO to the access key 3 is provided, and reference to a predetermined address 6 in the reference page 5 is permitted under the predetermined conditions.

〔作用〕[Effect]

この発明における例外処理ルーチン8はアクセスキー3
と記憶キー7が一致しない場合、所定の条件を満たして
いるか否か調べる。
The exception handling routine 8 in this invention is the access key 3
If the stored keys 7 and 7 do not match, it is checked whether predetermined conditions are met.

所定の条件を満たしている場合に、は管理テーブル9内
のアクセスレベル10を上記アクセスキー3に設定する
。これによりアクセスキーと記憶ギーが一致することに
なりプログラムは所定アドレスの内容を参照することが
できる。
If the predetermined conditions are met, sets the access level 10 in the management table 9 to the access key 3. As a result, the access key and memory key match, and the program can refer to the contents of the predetermined address.

一方、所定の条件を満たしていない場合にはプログラム
が所定アドレスの内容を参照するのを禁止する。
On the other hand, if a predetermined condition is not met, the program is prohibited from referencing the contents of the predetermined address.

〔発明の実施例〕[Embodiments of the invention]

以下、この発明の一実施例を図について説明する。なお
、従来技術と同一の構成要素については同一番号を付し
てその説明を省略する 第1図はこの発明の一実施例を示す模式図で、8はアク
セスキー3と記憶キー7とが一致しない場合、所定の条
件例えばプログラム1のアクセスキー3が記憶キー7よ
りも小さいか否かの条件を調べて発生する内部割込みを
処理する例外処理ルーチン、9はプログラム1を管理す
る情報を管理する管理テーブル、IOは管理テーブル9
内に設定されたアクセスレベルである。
An embodiment of the present invention will be described below with reference to the drawings. Components that are the same as those in the prior art are given the same numbers and their explanations are omitted. FIG. If not, an exception handling routine that processes an internal interrupt that occurs by checking a predetermined condition, such as whether access key 3 of program 1 is smaller than storage key 7; 9 manages information that manages program 1; Management table, IO is management table 9
This is the access level set within.

次に動作について説明する。Next, the operation will be explained.

ここではアクセスキーiが記憶キーjに対して、iSj
のときにアクセスを許す、というリングプロテクション
機能を実現する場合を例にとって説明する。
Here, access key i is iSj for storage key j.
An example of implementing a ring protection function that allows access when .

第2図はこの時の本発明の動作フローを示している。図
に示すように、プログラムlがメモリ4内の参照ベージ
5の所定アドレス6を参照しようとする(ステップSt
)と、所定アドレス6が属している参照ベージ5の記憶
キー7がプログラム状態語2内のアクセスキー3と一致
するか否か調べられる(ステ9プS2)。
FIG. 2 shows the operational flow of the present invention at this time. As shown in the figure, program l attempts to refer to a predetermined address 6 of reference page 5 in memory 4 (step St
), it is checked whether the storage key 7 of the reference page 5 to which the predetermined address 6 belongs matches the access key 3 in the program status word 2 (step S2).

一致している場合、プログラム1の所定アドレスへの参
照が許される(ステップS6)。
If they match, reference to the predetermined address of program 1 is permitted (step S6).

また一致していない場合、アクセスキーiが記憶キーj
より小さいか否か(iSj)調べられる(ステップS3
)。このステップS3の判断においてiSjの条件を満
たす場合には、管理テーブル9内のアクセスレベル10
の値がプログラム状態語2のアクセスキー3の値に代入
され(ステップS5)、ステップS2の判断に戻る。こ
の場合、SPのルーチンが例外処理ルーチンである。
If they do not match, access key i is memory key j
It is checked whether (iSj) is smaller than (step S3
). If the condition of iSj is satisfied in the judgment in step S3, the access level 10 in the management table 9 is
The value of is substituted into the value of access key 3 of program status word 2 (step S5), and the process returns to step S2. In this case, the SP routine is the exception handling routine.

ここにアクセスキー3の値が記憶キー7と一致すること
になり、プログラム1の所定アドレスへの参照が許可さ
れる(スj −/ 7’メC)。
Here, the value of the access key 3 matches the memory key 7, and reference to the predetermined address of the program 1 is permitted (step 7').

またステップS3の判断において、iSjの条件を満た
さない場合には、プログラムlの参照ページ5内の所定
アドレスへの参照は禁止される。
Further, in the judgment in step S3, if the condition iSj is not satisfied, reference to the predetermined address in the reference page 5 of the program 1 is prohibited.

なお、上記実施例では記憶保護例外処理ルーチンでアク
セスキーを変更する方式を示したが、フローチャートの
ステップ83〜S5の部分のみハードウェアまたはマイ
クロプログラムで実現し、記憶保護例外の内部割込みを
発生させる部分に付加する形で実現しても良い。
Although the above embodiment shows a method of changing the access key in the memory protection exception handling routine, only steps 83 to S5 of the flowchart are realized by hardware or a microprogram, and an internal interrupt of the memory protection exception is generated. It may be realized by adding it to a part.

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

以上説明したように、この発明はプログラムのアクセス
レベルを管理する管理テーブルと、上記アクセスキーと
上記記憶キーとが一致せず、所定の条件を満たす場合上
記管理テーブル内のアクセスレベルを上記アクセスキー
に設定する例外処理ルーチンを設け、上記所定の条件の
下で参照ページ内の所定アドレスの参照を許すので、ア
クセスキーと記憶キーとが一致しない場合でも所定の条
件を満たせば、プログラムの所定゛rドレスへの参照が
許されることになり柔軟な対処ができて処理能力が向上
する効果がある。
As explained above, the present invention provides a management table for managing the access level of a program, and when the access key and the storage key do not match and a predetermined condition is met, the access level in the management table is changed to the access key. An exception handling routine is set up to allow reference to a specified address in the reference page under the above specified conditions, so even if the access key and storage key do not match, if the specified conditions are met, the specified address of the program will be updated. Since reference to the r address is allowed, flexible handling is possible, which has the effect of improving processing capacity.

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

第1図はこの発明の一実施例を示す模式図、第2図はこ
の発明の動作を示すフローチャート、第3図は従来の記
憶保護方式を示す模式図である。 ■・・・プログラム、2・・・プログラム状態語、3・
・・アクセスキー、4・・・メモリ、5・・・参照ペー
ジ、6・・・参照アドレス、7・・・記憶キー、8・・
・例外処理ルーチン、9.・・・管理テーブル、10・
・・アクセスレベル。 代理人  大  岩  増  雄(ほか2名)手続補正
書(自発)
FIG. 1 is a schematic diagram showing an embodiment of the present invention, FIG. 2 is a flowchart showing the operation of the present invention, and FIG. 3 is a schematic diagram showing a conventional storage protection system. ■...Program, 2...Program status word, 3.
...Access key, 4...Memory, 5...Reference page, 6...Reference address, 7...Memory key, 8...
- Exception handling routine, 9. ...Management table, 10.
...Access level. Agent Masuo Oiwa (and 2 others) Procedural amendment (voluntary)

Claims (1)

【特許請求の範囲】[Claims] プログラムがメモリ内の参照ページの中に所定アドレス
を参照しようとする場合、上記プログラムの状態を示す
プログラム状態話中のアクセスキーと上記参照ページに
設定された記憶キーとが一致するか否か調べ、一致して
いる場合のみ上記参照ページ内の所定アドレスの参照を
許す記憶保護方式において、プログラムのアクセスレベ
ルを管理する管理テーブルと、上記アクセスキーと上記
記憶キーとが一致しないが、所定の条件を満たす場合上
記管理テーブル内のアクセスレベルを上記アクセスキー
に設定する例外処理ルーチンを設け、上記所定の条件の
下で参照ページ内の所定アドレスの参照を許すことを特
徴とする記憶保護方式。
When a program attempts to refer to a predetermined address in a reference page in memory, check whether the access key in the program status indicating the state of the program matches the memory key set for the reference page. In a memory protection method that allows reference to a predetermined address in the reference page only when they match, a management table that manages the access level of the program and the access key and the storage key do not match, but under a predetermined condition. A memory protection system characterized by providing an exception handling routine that sets an access level in the management table to the access key when the following is satisfied, and allowing reference to a predetermined address in the reference page under the predetermined conditions.
JP11961488A 1988-05-17 1988-05-17 Memory protective system Pending JPH01288943A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP11961488A JPH01288943A (en) 1988-05-17 1988-05-17 Memory protective system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP11961488A JPH01288943A (en) 1988-05-17 1988-05-17 Memory protective system

Publications (1)

Publication Number Publication Date
JPH01288943A true JPH01288943A (en) 1989-11-21

Family

ID=14765779

Family Applications (1)

Application Number Title Priority Date Filing Date
JP11961488A Pending JPH01288943A (en) 1988-05-17 1988-05-17 Memory protective system

Country Status (1)

Country Link
JP (1) JPH01288943A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009516879A (en) * 2005-11-18 2009-04-23 クゥアルコム・インコーポレイテッド Mobile security system and method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009516879A (en) * 2005-11-18 2009-04-23 クゥアルコム・インコーポレイテッド Mobile security system and method
US8499171B2 (en) 2005-11-18 2013-07-30 Qualcomm Incorporated Mobile security system and method

Similar Documents

Publication Publication Date Title
US5280614A (en) Apparatus and method for controlling access to data using domains
JP3081619B2 (en) Computer systems and security methods
EP0220920B1 (en) Instruction for implementing a secure computer system
US6601146B2 (en) Technique for efficiently transferring moderate amounts of data across address space boundary
JPS6134178B2 (en)
JP3454854B2 (en) Memory management device and method
US7680999B1 (en) Privilege promotion based on check of previous privilege level
JPH01288943A (en) Memory protective system
US7555627B2 (en) Input-output control apparatus, input-output control method, process control apparatus and process control method
US11100010B2 (en) Apparatus and method for handling memory access requests
CN105631317A (en) System calling method and apparatus
KR20000076125A (en) Microcomputer with a memory management unit
JPS63240657A (en) Memory protecting device
US6889308B1 (en) Method and apparatus for protecting page translations
JP2572435B2 (en) Instruction execution method of demand paging computer
JPS62126448A (en) Memory control and protection system
JPS626351A (en) Storage protecting deice
JP3047839B2 (en) Single-chip microcomputer
JP2944080B2 (en) Memory content protection circuit
JPH04205031A (en) Microcomputer
JPH0137779B2 (en)
JPH03144751A (en) Memory miswriting preventing device
JPS58203700A (en) Privacy protecting device for information in memory
JPS62232054A (en) Controlling system for stack frame descriptor
JPH05241861A (en) Free memory management system for operating system