JPS6220583B2 - - Google Patents

Info

Publication number
JPS6220583B2
JPS6220583B2 JP57172084A JP17208482A JPS6220583B2 JP S6220583 B2 JPS6220583 B2 JP S6220583B2 JP 57172084 A JP57172084 A JP 57172084A JP 17208482 A JP17208482 A JP 17208482A JP S6220583 B2 JPS6220583 B2 JP S6220583B2
Authority
JP
Japan
Prior art keywords
memory
address
instruction
software
protection
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
Application number
JP57172084A
Other languages
Japanese (ja)
Other versions
JPS5963097A (en
Inventor
Takashi Nishijima
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.)
Panafacom Ltd
Original Assignee
Panafacom 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 Panafacom Ltd filed Critical Panafacom Ltd
Priority to JP17208482A priority Critical patent/JPS5963097A/en
Publication of JPS5963097A publication Critical patent/JPS5963097A/en
Publication of JPS6220583B2 publication Critical patent/JPS6220583B2/ja
Granted legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)

Description

【発明の詳細な説明】 〔発明の技術分野〕 本発明は、ユーザ・プログラムのメモリを書換
えからシステムを守り、プログラム・ミスを発見
しデバツグを容易にする、データ処理装置におけ
るメモリ・プロテクシヨン方式に関するものであ
る。
[Detailed Description of the Invention] [Technical Field of the Invention] The present invention provides a memory protection method in a data processing device that protects a system from rewriting the memory of a user program, discovers program errors, and facilitates debugging. It is related to.

〔従来技術と問題点〕[Conventional technology and problems]

従来のデータ処理装置におけるメモリ・プロテ
クシヨン方式には大別して次の2つがあつた。
Memory protection methods in conventional data processing devices can be broadly classified into the following two types.

第1はメモリを固定または可変の大きさに区切
つて、各単位毎にそのメモリを書換えてよいかど
うかの属性を示すレジスタをもつものである。第
1図イを参照しながら説明すると、メモリの0〜
10番地は書換不可とすべき領域であり、このこと
はレジスタの先頭個所に記憶される。そしてメモ
リの11〜20番地については書換可であり、このこ
とは次位のレジスタに記憶される。このようなレ
ジスタを備えることによりメモリのどの領域が書
換不可かを示すことができる。
The first type divides the memory into fixed or variable sizes and has a register for each unit that indicates whether the memory can be rewritten or not. To explain with reference to Figure 1A, the memory 0~
Address 10 is an area that should not be rewritten, and this is stored at the beginning of the register. Memory addresses 11 to 20 are rewritable, and this is stored in the next register. By providing such a register, it is possible to indicate which area of the memory cannot be rewritten.

第2は論理的に参照できる範囲と物理的なメモ
リとを別にすることであり、論理的に隠れている
メモリに対しては書換えも参照もできない。第1
図ロを参照しながら説明すると、論理メモリ0〜
100番地がベースアドレス100、長さ100である
とすると物理メモリの100〜200番地が書換・参照
可能になるが、他の斜線部の領域に対しては書換
えも参照もできない。
The second is to separate the range that can be referenced logically from the physical memory, and the memory that is logically hidden cannot be rewritten or referenced. 1st
To explain with reference to Figure B, logical memory 0 to
If address 100 has a base address of 100 and a length of 100, addresses 100 to 200 of the physical memory can be rewritten and referenced, but the other shaded areas cannot be rewritten or referenced.

第1の方式の中には単なる書込み禁止ビツトだ
けを持つもの、参照禁止のビツトを持つもの、キ
ーを持つていてプログラム・ステイタス・ワード
内のキーと一致しない場合はアクセスできないも
の、キーにレベルを有するもの、などがある。
Some of the first methods have just a write-protect bit, some have a read-only bit, some have a key and cannot be accessed if it does not match the key in the program status word, and some have a key with a level There are some that have.

第2の方式には、スーパバイザ・モードやユー
ザ・モードなどを設けてモード毎に論理的なアク
セス範囲を異ならせるもの、マツプ・レジスタ方
式によるもの、仮想メモリ方式で見られるように
セグメント・テーブルやページ・テーブルでアク
セスできる空間を区別するもの、プログラム単位
にアクセスできる範囲を示すリストをもつもの、
などがある。
The second method includes supervisor mode, user mode, etc., with different logical access ranges for each mode, map register method, and virtual memory method, which uses segment tables and One that distinguishes the space that can be accessed by a page table, one that has a list that shows the range that can be accessed by program unit,
and so on.

通常、これらの方式は組み合わせて使用され
る。
Usually these methods are used in combination.

以上述べたような従来のメモリ・プロテクシヨ
ン方式はソフトウエアのレベル毎のプロテクシヨ
ンに適さないものがあり、また適していてもハー
ドウエアを特に必要としたり、ソフトウエアによ
る取扱いが困難なものが多かつた。
Some of the conventional memory protection methods described above are not suitable for protection at each level of software, and even if they are suitable, some require special hardware or are difficult to handle by software. It was a lot.

〔発明の目的〕[Purpose of the invention]

本発明は上記従来の問題点に鑑み、ハードウエ
ア量も少なく、ソフトウエアでの扱いも簡単でか
つソフトウエアのレベル毎に強力にプロテクシヨ
ンを実現することができるメモリ・プロテクシヨ
ン方式を提供することを目的とするものである。
In view of the above-mentioned conventional problems, the present invention provides a memory protection method that requires a small amount of hardware, is easy to handle with software, and can implement strong protection for each software level. The purpose is to

〔発明の構成〕[Structure of the invention]

そしてこの目的は本発明によれば、メモリに各
種のプログラムをプロテクトの必要の高い順に配
列し、主記憶上にアクセスすべきオペランドを持
つ全ての命令について、命令の置かれているメモ
リ上のアドレスと、当該命令でアクセスされるオ
ペランドが置かれているメモリ上のアドレスとを
比較し、後者が前者より大きい場合には、当該命
令を実行可能とし、そうでない場合には、プログ
ラム・チエツクを行うことを特徴とするアドレス
比較によるメモリ・プロテクシヨン方式を提供す
ることにより達成される。
According to the present invention, this purpose is to arrange various programs in memory in order of need for protection, and for all instructions that have operands that need to be accessed in main memory, address in memory where the instruction is located. and the address in memory where the operand accessed by the instruction is located, and if the latter is larger than the former, the instruction is made executable, and if not, a program check is performed. This is achieved by providing a memory protection method using address comparison, which is characterized by:

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

以下、本発明実施例を図面を用いて詳述する。 Embodiments of the present invention will be described in detail below with reference to the drawings.

第2図は本発明によるメモリ・プロテクシヨン
方式の構成を示す図であり、第3図は本発明にお
けるメモリ内のプログラム配列を示す図である。
FIG. 2 is a diagram showing the configuration of the memory protection system according to the present invention, and FIG. 3 is a diagram showing the program arrangement in the memory according to the present invention.

第2図において、1はデータ処理装置、2は特
定のプログラム配列がなされたメモリ、3はイン
ストラクシヨン・カウンタ・レジスタICR、4は
オペランド・アドレス・レジスタOAR、5は比
較器を示す。
In FIG. 2, 1 is a data processing device, 2 is a memory having a specific program arrangement, 3 is an instruction counter register ICR, 4 is an operand address register OAR, and 5 is a comparator.

第2図に示すように、インストラクシヨン・カ
ウンタ・レジスタICR3にはメモリ2内の実行す
べき命令の置かれているアドレス(命令アドレ
ス)が蓄積される。次に、この命令でアクセスす
るメモリのアドレス(オペランド・アドレス)を
計算し、オペランド・アドレス・レジスタOAR
4に蓄積する。そしてICR3とOAR4の内容を
比較器で比較し、命令アドレスよりオペランド・
アドレスが大きい場合は正常に命令を実行する
が、そうでない場合にはプログラム・チエツクと
して割込みを発生する。
As shown in FIG. 2, the instruction counter register ICR3 stores the address (instruction address) at which the instruction to be executed in the memory 2 is located. Next, calculate the memory address (operand address) to be accessed by this instruction, and write it to the operand address register OAR.
Accumulate to 4. Then, the contents of ICR3 and OAR4 are compared using a comparator, and the operand is determined from the instruction address.
If the address is large, the instruction is executed normally, but if it is not, an interrupt is generated as a program check.

そしてメモリ2内に配列されるべきソフトウエ
アは第3図に示すように、いくつかのレベルのモ
ジユールから構成され、論理的に小さいアドレス
(プロテクトの必要性の高い)順に配置される。
例えば、OS核部のソフトウエア、入出力管理部
のソフトウエア、フアイル管理部のソフトウエ
ア、ユーザ共通のソフトウエア、各ユーザのソフ
トウエアの順に配列される。したがつて低いレベ
ルのプログラムは高いレベルの領域をアクセスす
ることができないので、プログラムのレベル間の
プロテクシヨンを実現することができる。
As shown in FIG. 3, the software to be arranged in the memory 2 is composed of modules at several levels, which are arranged in order of logically small addresses (high need for protection).
For example, the software is arranged in the following order: OS core software, input/output management section software, file management section software, user-common software, and each user's software. Therefore, since lower level programs cannot access higher level areas, protection between levels of programs can be achieved.

また、比較はアドレスの上位nビツトだけを対
象とすることができ、命令アドレスとオペラン
ド・アドレスの大小関係を逆に扱うこともでき
る。そしてアドレス比較の結果、等しい場合の処
理を正常とすることもでき、書込みや読込みの一
方だけ禁止することもできる。さらに従来の種々
のメモリ・プロテクシヨン方式と併用することも
できる。
Further, the comparison can be performed only on the upper n bits of the address, and the magnitude relationship between the instruction address and the operand address can also be reversed. If the addresses are equal as a result of the address comparison, processing can be normalized, or only one of writing and reading can be prohibited. Furthermore, it can also be used in conjunction with various conventional memory protection schemes.

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

以上、詳細に説明したように本発明のアドレス
比較によるメモリ・プロテクシヨン方式はハード
ウエア量も少く、ソフトウエアでの扱いも簡単で
かつソフトウエアのレベル毎に強力にプロテクシ
ヨンを実現することができる。
As explained above in detail, the memory protection method using address comparison according to the present invention requires a small amount of hardware, is easy to handle with software, and can realize powerful protection at each software level. can.

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

第1図は従来のメモリ・プロテクシヨン方式を
説明するための図、第2図は本発明によるメモ
リ・プロテクシヨン方式の構成を示す図、第3図
は本発明におけるメモリ内のソフトウエア配列を
示す図である。 1…データ処理装置、2…メモリ、3…インス
トラクシヨン・カウンタ・レジスタICR、4…オ
ペランド・アドレス・レジスタOAR、5…比較
器。
FIG. 1 is a diagram for explaining the conventional memory protection method, FIG. 2 is a diagram showing the configuration of the memory protection method according to the present invention, and FIG. 3 is a diagram showing the software arrangement in the memory according to the present invention. FIG. DESCRIPTION OF SYMBOLS 1...Data processing device, 2...Memory, 3...Instruction counter register ICR, 4...Operand address register OAR, 5...Comparator.

Claims (1)

【特許請求の範囲】[Claims] 1 メモリに各種のプログラムをプロテクトの必
要の高い順に配列し、主記憶上にアクセスすべき
オペランドを持つ全ての命令について、命令の置
かれているメモリ上のアドレスと、当該命令でア
クセスされるオペランドが置かれているメモリ上
のアドレスとを比較し、後者が前者より大きい場
合には、当該命令を実行可能とし、そうでない場
合には、プログラム・チエツクを行うことを特徴
とするアドレス比較によるメモリ・プロテクシヨ
ン方式。
1 Arrange various programs in memory in order of need for protection, and for all instructions that have operands that should be accessed in main memory, write the address in memory where the instruction is located and the operands accessed by the instruction. A memory device based on address comparison that compares the address on the memory where the instruction is located, and if the latter is larger than the former, the instruction is determined to be executable, and if not, a program check is performed.・Protection method.
JP17208482A 1982-09-30 1982-09-30 Memory protection system using address comparison Granted JPS5963097A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP17208482A JPS5963097A (en) 1982-09-30 1982-09-30 Memory protection system using address comparison

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP17208482A JPS5963097A (en) 1982-09-30 1982-09-30 Memory protection system using address comparison

Publications (2)

Publication Number Publication Date
JPS5963097A JPS5963097A (en) 1984-04-10
JPS6220583B2 true JPS6220583B2 (en) 1987-05-07

Family

ID=15935236

Family Applications (1)

Application Number Title Priority Date Filing Date
JP17208482A Granted JPS5963097A (en) 1982-09-30 1982-09-30 Memory protection system using address comparison

Country Status (1)

Country Link
JP (1) JPS5963097A (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS6137540U (en) * 1984-08-08 1986-03-08 日本電気株式会社 Memory with memory protection function
JPH077168B2 (en) * 1985-07-26 1995-01-30 オリンパス光学工業株式会社 camera
JP2880709B2 (en) * 1986-09-26 1999-04-12 株式会社東芝 Memory control method for IC card
JPS6410355A (en) * 1987-07-03 1989-01-13 Sumitomo Electric Industries Video memory device
US5274834A (en) * 1991-08-30 1993-12-28 Intel Corporation Transparent system interrupts with integrated extended memory addressing
DE10105284A1 (en) 2001-02-06 2002-08-29 Infineon Technologies Ag Microprocessor circuit for data carriers and method for organizing access to data stored in a memory

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56129947A (en) * 1980-03-17 1981-10-12 Nec Corp Microprogram controller

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS56129947A (en) * 1980-03-17 1981-10-12 Nec Corp Microprogram controller

Also Published As

Publication number Publication date
JPS5963097A (en) 1984-04-10

Similar Documents

Publication Publication Date Title
US5187792A (en) Method and apparatus for selectively reclaiming a portion of RAM in a personal computer system
JP4295111B2 (en) Memory management system and memory access security grant method based on linear address
JPH04247528A (en) Common access device and method into data space
US5873124A (en) Virtual memory scratch pages
US5802598A (en) Data memory access control and method using fixed size memory sections that are sub-divided into a fixed number of variable size sub-sections
CN107463513B (en) System and method for transferring control between storage locations
JPH0916461A (en) System and method for provision of efficient shared memory at inside of virtual memory system
JPS6220583B2 (en)
JPS61156445A (en) Tlb purge control system
KR100791815B1 (en) Privilege promotion based on check of previous privilege level
US20050138263A1 (en) Method and apparatus to retain system control when a buffer overflow attack occurs
SE8305290L (en) COMPUTER MEMORY MANAGER
JPS6074059A (en) Access control system for storage device
RU2623883C1 (en) Method of implementating instructions in systemic memory
JP3085309B2 (en) Debug system
JPS58137066A (en) Memory access controlling method of computer system
JPS626351A (en) Storage protecting deice
JPS61201353A (en) Address converter
JPS6341101B2 (en)
JPS62154166A (en) Microcomputer
JPH036644A (en) Storage protection system
JPH0241772B2 (en)
JPS61839A (en) Microprogram controller
JPH04360252A (en) Address conversion system for virtual storage in computer
JPS63752A (en) Memory protection system