JPS58141500A - Memory management protecting system - Google Patents

Memory management protecting system

Info

Publication number
JPS58141500A
JPS58141500A JP2408782A JP2408782A JPS58141500A JP S58141500 A JPS58141500 A JP S58141500A JP 2408782 A JP2408782 A JP 2408782A JP 2408782 A JP2408782 A JP 2408782A JP S58141500 A JPS58141500 A JP S58141500A
Authority
JP
Japan
Prior art keywords
address
memory
instruction
signal
management
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
JP2408782A
Other languages
Japanese (ja)
Inventor
Hiromasa Shimizu
清水 弘雅
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co 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 Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2408782A priority Critical patent/JPS58141500A/en
Publication of JPS58141500A publication Critical patent/JPS58141500A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

PURPOSE:To manage a memory and protect stored data, by managing addresses of instructions to be executed to detect the illegality of address designation and trapping instructions which probably damage the memory. CONSTITUTION:An address control block 3-b constitutes the principal part of an address management block 3 as the center of a memory management protecting mechanism and inhibits the write operation to a memory device in accordance with conditions and performs the address conversion. Operation processings are performed on a basis of an address signal A1 from a processor 1, an operation state signal S1 of the processor (I cycle/E cycle), a read/write signal S2 from the processor 1 to the memory device 2, a mode signal S8 from a mode register 3-a, and a signal from an address management register 3-c, and the control of a memory data read/write signal S3 to the memory device and the transmission of a memory address signal or a prescribed address conversion are performed and control whether an instruction control block 3-d should be operated or not.

Description

【発明の詳細な説明】 リ管理保護方式に関し、特に、実行される命令のアドレ
スを管理して、アドレス指定の不当性を検出することに
より、メモリの管理とメモリデータの保護を行うメモリ
管理保護方式に関するものである。
Detailed Description of the Invention: Memory management protection that manages memory and protects memory data by managing the address of an instruction to be executed and detecting invalidity in address specification. It is related to the method.

一般に汎用コンピュータ,ミニコンピユータでは、いわ
ゆるオペレーティングシステム(監視プログラム)の下
にシステム連用がなされ、この中のメモリ管理保護機構
は重要な役割を果たしている。これは、コンピュータシ
ステムが大規模化し、復肩1な仕事を実行する場合、へ
一ドウエアの誤動作・故障の波及,プログラミング上の
誤り,プログラムの損傷などに対して、記憶装置内のデ
ータの正確性ならびに長期間の安定性が問題とされ、要
求されるためである。更に多数の利用者の間でコンピュ
ータを時分割利用するタイムシェアリングシステム(T
SS)においぞは、仙利用者による記憶内容の破壊,悪
用などに対する問題があり、メモリ管理保護機構は重要
なものである。このため従来からいろいろなメモリ管理
保護方式が開発されている。これらの汎用コンピュータ
のメモリ保護機構は、その重要性の面から高度なシステ
ムとなり、これを動かすシステムプログラムおよびハー
ドウェアは複雑な構成とならざるを得す、コスト的にも
高いものとなっている。
Generally, in general-purpose computers and minicomputers, the system is operated under a so-called operating system (monitoring program), and a memory management protection mechanism within this system plays an important role. When a computer system becomes large-scale and performs repetitive work, it is important to ensure that the data in the storage device is accurate to prevent the spread of hardware malfunctions and failures, programming errors, and program damage. This is because stability and long-term stability are issues and are required. In addition, time-sharing systems (T
SS) Nizo has the problem of destruction and misuse of memory contents by non-users, so a memory management protection mechanism is important. For this reason, various memory management protection schemes have been developed. The memory protection mechanisms of these general-purpose computers are highly sophisticated systems due to their importance, and the system programs and hardware that run them have to be complex and expensive. .

ところで、パーソナルコンピュータでは、価格面と、小
容量の記憶装置を個人的にしかも単純な内容の仕事のた
めに使用する場合にはそれほど重要でないとの認識のも
とにメモリ保護機構を有していない。しかしながら、パ
ーソナルコンピュータにおいても、その機能が高度にな
り、複雑な仕事に応用しようとする場合には、メモリ管
理保護機構が必要になってくる。そのメモリ管理保護機
構は,θを用コンピュータにおいて使用されているよう
なものでは、プログラムおよびハードウェア構成が?n
雑であり、価格的にも高価になるので利用でキ−J’、
いわゆるパーソナルコンピュータに適合するような規模
、構成のメモリ管理保護機構が所望される。ハードウェ
アにおける一般的な記憶保護は、動作および記憶領域の
制限・許可の組合せで実現される。動作制限による記憶
保護は、メモリの書込み動作,読出し動作などの禁止・
許可をそれぞれに設定できるようにすることで、データ
破壊,悪用からの保護を行うものである。また記憶領域
の制限による記憶保護は,例えば、メモリの特定の領域
をレジスタなどで指定して、アクセス【」1能な範囲を
制限してしまうものなどである。
By the way, personal computers have a memory protection mechanism based on cost considerations and the recognition that it is not very important when a small capacity storage device is used personally and for simple work. do not have. However, even in personal computers, as their functions become more advanced and they are applied to complex tasks, a memory management protection mechanism becomes necessary. Is the memory management protection mechanism similar to that used in computers for θ programs and hardware configurations? n
It is complicated and expensive, so please use the key J',
A memory management protection mechanism of a scale and configuration suitable for so-called personal computers is desired. General storage protection in hardware is achieved by a combination of operation and storage area restrictions and permissions. Memory protection through operation restrictions prohibits and prohibits memory write operations, read operations, etc.
By allowing permissions to be set individually, data is protected from destruction and misuse. Furthermore, storage protection by limiting the storage area includes, for example, specifying a specific area of the memory using a register or the like to limit the range that can be accessed.

第1図に示すように2つのレジスタをアドレスを管理す
るレジスタとして、一方に保護領域の先頭アドレスを入
れ、他方に保護他職の最終番地を入れ′Cお(。そして
この連続した領域以外の記憶領域の使用を禁止してしま
う方法である。
As shown in Figure 1, two registers are used to manage addresses; one contains the start address of the protected area, and the other contains the final address of the protected area. This method prohibits the use of storage areas.

このようにメモリの内容を保護するために、メモリ領域
の特定のブロックを固定的または半固定的に書込みを禁
止する方法、または、条件設定でメモリの書込み動作,
読み出し動作を一律に禁止・許可を行うような方法では
、命令実行の際のメモリ管理の制御はできず、メモリの
保護はするが、全てのプログラムのデータの書込みを禁
止してしまい、システムを維持するメモリ管理保護機構
としての役を果たさないものであった。
In order to protect the contents of memory, there is a method of permanently or semi-permanently prohibiting writing to a specific block in the memory area, or a method of controlling memory write operation by setting conditions.
A method that uniformly prohibits or allows read operations cannot control memory management during instruction execution, and although it protects memory, it prohibits all programs from writing data, causing the system to crash. It did not serve as a memory management protection mechanism.

本発明の第1の目的は、いわゆるパーソナルコンピュー
タのような小規模のコンピュータシステムに好適なメモ
リ管理保護方式を提供することである。また本発明の第
2の目的は、命令実行によるメモリ管理の制御を行い、
システムを維持するメモリ管理機構としてのメモリ管理
保護方式を提供することにある。
A first object of the present invention is to provide a memory management protection system suitable for small-scale computer systems such as so-called personal computers. A second object of the present invention is to control memory management by executing instructions;
The object of the present invention is to provide a memory management protection method as a memory management mechanism for maintaining the system.

これらの目的を達成するため、本発明にお(・では、特
に簡単な構成によって、実行される命令のアドレスを管
理してアドレス指定の不当性を検出することにより、メ
モリに損傷を与える可能性のある命令をトラップし、メ
モリの管理とメモリデ−夕の保護を行うことを特徴とし
ている。
To achieve these objectives, the present invention provides, by means of a particularly simple configuration, the ability to manage the addresses of executed instructions to detect incorrect addressing, thereby reducing the possibility of damaging memory. It is characterized by trapping certain instructions to manage memory and protect memory data.

L;l l−1本発明のメモリ管理保&方式の一実施例
を第2図および第3図を参照して説明する。第2図は本
発明のメモリ管理保護方式が適用されるコンビ−1ユタ
システムのブロック図である。1は処理装置、いわゆる
マイクロプロセッサである。2はメモリ装置である。通
常のシステム構成においては、この処理装置1とメモリ
装置2とが、概略的にはアドレスバスAlおよびデータ
バスD3で結合され、コンピュータシステムを構成する
。本発明によるメモリ管理保護方式が適用されるコンピ
ュータシステムにおいては、第3図に示すように、1−
の処理装置1とメモリ装置2とを結合するアドレスバス
にアドレス管理制御ブロック3が挿入される。このアド
レス管理制御ブロック3は、処理装置lとメモリ装置を
結合するデータバスにも挿入されるが、データバスには
挿入されない構成をとることもできる。アドレス□管理
制御ブロック3は、処理装置1がメモリ装置2に対して
発生するアドレスを管理し、条件によっては処理装置1
が発生したアドレスをそのままメモリ装置2に送り。
L;l l-1 An embodiment of the memory management and maintenance system of the present invention will be described with reference to FIGS. 2 and 3. FIG. 2 is a block diagram of a Combi-1 Utah system to which the memory management protection method of the present invention is applied. 1 is a processing device, a so-called microprocessor. 2 is a memory device. In a normal system configuration, the processing device 1 and the memory device 2 are generally connected by an address bus Al and a data bus D3 to form a computer system. In a computer system to which the memory management protection method according to the present invention is applied, as shown in FIG.
An address management control block 3 is inserted into an address bus connecting a processing device 1 and a memory device 2. This address management control block 3 is also inserted into the data bus connecting the processing device 1 and the memory device, but it can also be configured so that it is not inserted into the data bus. Address □ Management control block 3 manages addresses generated by the processing device 1 to the memory device 2, and depending on conditions, the processing device 1
The address where the error occurred is sent as is to the memory device 2.

他の条件によっては処理装置1が発生したアドレスを適
当にアドレス変換してメモリ装置2に送るように動作す
る。アドレス管理ブロック3は、モードレジスタ3−a
、アドレス制御ブロック3−b。
Depending on other conditions, the processing device 1 operates to appropriately convert the generated address and send it to the memory device 2. The address management block 3 has a mode register 3-a.
, address control block 3-b.

アドレス管理レジスタ3−C1命令制御ブロック3−d
、および特定アドレス生成ブロック3−eから構成され
ている。次に、第3図のシステムブロック図における主
な信号線およびその信号線(皿載る信号について説明す
ると、A1は処理装置lからアドレス制御ブロック3−
bへのアドレス信号線。
Address management register 3-C1 instruction control block 3-d
, and a specific address generation block 3-e. Next, to explain the main signal lines and their signal lines (signals on the plate) in the system block diagram of FIG.
Address signal line to b.

A2はアドレス制御ブロック3−bからメモ1)装置2
へのアドレス信号線、DIはメモリ装置2カ・ら命令制
御ブロック3−dへのデータ信号、D2は命令制御ブロ
ック3−dから処理装置1へのデータ信号、D3は処理
装置1とメモリ装置2とC9間のデータバスである。S
lは処理装置1の状態信号で命令フェッチサイクル(I
サイクル)と命令実行サイクル(Eサイクル)との状態
を示す信号、82も処理装置1の状態信号でメモリ装置
2からの読み収り(Read )とメモリ装置への書き
込み(Write)  。
A2 is the memo 1) device 2 from the address control block 3-b.
DI is a data signal from the memory device 2 to the instruction control block 3-d, D2 is a data signal from the instruction control block 3-d to the processing device 1, and D3 is the data signal between the processing device 1 and the memory device. 2 and C9. S
l is a status signal of the processing device 1 and is an instruction fetch cycle (I
A signal 82 indicating the status of the instruction execution cycle (cycle) and the instruction execution cycle (E cycle) is also a status signal of the processing device 1, indicating completion of reading from the memory device 2 (Read) and writing to the memory device (Write).

との動作を行っていることを示す信号である。S3はア
ドレス制御ブロック3−bからメモリ装置2へのメモリ
データ読取り/書込みを示す信号、84ハモ−ドレジス
タ3−aへのモード信号記憶制御信’+’l  85は
モードレジスタ3−aからのモード信号11’Vり出し
制御信号、86は命令制御ブロックを動作させるか否か
を示す制御信号、S8はモードレジスタ3−aのモード
信号、89はアドレス管理レジスタ3−cからのアドレ
ス空間の判別であり、設定された領域が監視プログラム
域かユーザプログラム域かの検出信号でもある。
This is a signal indicating that an operation is being performed. S3 is a signal indicating memory data read/write from the address control block 3-b to the memory device 2, 84 is a mode signal storage control signal '+'l to the Hammode register 3-a, and 85 is a signal from the mode register 3-a. The mode signal 11'V output control signal, 86 is a control signal indicating whether or not to operate the instruction control block, S8 is the mode signal of the mode register 3-a, and 89 is the control signal of the address space from the address management register 3-c. This is a determination and also serves as a detection signal as to whether the set area is a monitoring program area or a user program area.

アドレス管理ブロック3を構成する各構成要素の動作概
要を次に説明する。
An outline of the operation of each component constituting the address management block 3 will be described below.

モードレジスタ3−aは実行するプログラムの状態が監
視プログラムモードかユーザプログラムモードかのプロ
グラムモード信号S8を保持するものであり、命令フェ
ッチサイクル(■サイクル)の終f 時に、モードレジ
スタ3−aへのモード信号記憶制御信号S4によって、
プログラムモード信号S8を記憶する。モード信号取り
出し制御信号S5は■サイクルの始めと、メモリアクセ
スのある命令実行サイクル(Eサイクル)の始めにモー
ドレジスタ3−aに記憶されているモード信号S8を取
り出し、プログラム状態の判定のためアドレス制御ブロ
ック3−bに制御信号として写える。
The mode register 3-a holds the program mode signal S8 indicating whether the state of the program to be executed is the monitoring program mode or the user program mode, and is transferred to the mode register 3-a at the end f of the instruction fetch cycle (■ cycle). By the mode signal storage control signal S4,
Store program mode signal S8. The mode signal retrieval control signal S5 retrieves the mode signal S8 stored in the mode register 3-a at the beginning of the ■ cycle and at the beginning of the instruction execution cycle (E cycle) with memory access, and extracts the mode signal S8 stored in the mode register 3-a and addresses the address to determine the program state. It appears in the control block 3-b as a control signal.

アドレス制御ブロック3−bは、本発明のメモリ管理保
護機構の中心となるアドレス管理ブロック3の主要部を
構成するものであり、条件によって、メモリ装置への書
込み動作を禁止し、またアドレス変換をも行うものであ
る。処理装置1からのアドレス信号AI、処理装置1の
動作状態信号Sl(■サイクル/Eサイクル)、処理装
置1からメモリ装置2への読取り/書込み信号S2. 
モードレジスタ3−aからのモード信号S8.およびア
ドレス管理レジスタ3−cからの信号によって演算鷺理
を行い、メモリ装置に対するメモリデータ読取り/書込
み信号S3の制御、およびメモリアドレス信号の通過あ
るいは所定のアドレス変換を行う。
The address control block 3-b constitutes the main part of the address management block 3, which is the core of the memory management protection mechanism of the present invention, and prohibits write operations to the memory device and performs address conversion depending on conditions. It is also something that is done. An address signal AI from the processing device 1, an operating state signal Sl (■ cycle/E cycle) of the processing device 1, a read/write signal S2 from the processing device 1 to the memory device 2.
Mode signal S8. from mode register 3-a. It performs arithmetic operations based on the signals from the address management register 3-c, controls the memory data read/write signal S3 to the memory device, and passes the memory address signal or performs predetermined address conversion.

また命令制御ブロック3−bを動作させるか計かに−)
シ・′Cも制御する。この動作は第4図に示すフロチャ
ートに従って後述する。
Also, I wonder if I will operate the instruction control block 3-b.)
It also controls C.'C. This operation will be described later according to the flowchart shown in FIG.

アドレス管理レジスタ3−cは、処理装置が発生するア
ドレス空間に対応づけられたメモリ領域を分割し、た管
理学位に応じて、アドレス空間の管理を行うためのもの
で、メモリ領域の監視プログラム咳およびユーザプログ
ラム域の設定を行う。アドレス空間の管理、その設定は
固定または半固定スイッチ、FROMなどでアドレス空
間の領域を設定することにより行なわれる。例えば、あ
る管理中位J)アドレス空間を判定するには、そのアド
レス空間の先頭アドレスおよび最終アドレスを設定して
おき、その間に入るアドレスを検出したとき判定信号を
出すようにしてお(。また、アビレフ111号の上位数
桁ビットの信号をとり、それとの一致検出信号により所
定のアドレス空間の判定を行うようにしても良い。
The address management register 3-c is used to divide the memory area associated with the address space generated by the processing device and manage the address space according to the management degree. and set the user program area. Management and setting of the address space is performed by setting the address space area using a fixed or semi-fixed switch, FROM, or the like. For example, to determine a certain mid-management address space, set the start address and end address of that address space, and issue a determination signal when an address between them is detected. , Abirev No. 111 may be obtained, and a predetermined address space may be determined based on a coincidence detection signal with the signals of the upper several digit bits of Abirev No. 111.

高台制御ブロック3−dは、ユーザプログラム域で実行
する命令を制御する特殊な命令(例えば、入出力処理命
令、停止命令など)、処理装置に定義されていないよう
な命令を監視プログラム域の所定アドレスへの分岐命令
に取りかえるもので漆)る。
The platform control block 3-d sends special instructions (for example, input/output processing instructions, stop instructions, etc.) that control instructions executed in the user program area, and instructions that are not defined in the processing device to a predetermined location in the monitoring program area. It can be replaced with a branch instruction to an address.

特定アドレス生成ブロック3−eは、ユーザプログラム
域にある命令が監視プログラム域にある命令に制御を移
した後に、監視プログラムで実行される命令のアドレス
を発生する。このアドレスは固定または半固定スイッチ
、PROMなどで指定する。
The specific address generation block 3-e generates the address of an instruction to be executed in the monitoring program after an instruction in the user program area transfers control to an instruction in the monitoring program area. This address is designated by a fixed or semi-fixed switch, PROM, or the like.

第4図を参照して、本発明のメモリ管理保護方式の主要
部を構成するアドレス管理制御ブロック3の動作概要を
フローチャートにより説明する。
Referring to FIG. 4, an overview of the operation of the address management control block 3, which constitutes the main part of the memory management protection system of the present invention, will be explained using a flowchart.

本発明においては、命令実行の際に処理装置1が発生す
るアドレスを管理し、そのアドレスの不当性を検出する
ことにより、プログラムを損傷するような命令をトラッ
プし、ユーザプログラムの暴走や、操作誤り1已、よ、
るコンピュータシステムの異常状態をさけるようにして
いる。本発明によるコンピュータシステムにおいては、
電源投入時や初期リセット時には、まずプログラムのモ
ードレジスタ3−aが必ず監視プログラム状態SPに設
定(31)さhる。モードレジスタ3−aが監視プログ
ラム状態SPに設定されていると、第4図のフローチャ
ートを参照すると明らかなように、アドレス管理ブロッ
ク3は存在しないものと同様になり、処理装置lから発
生する信号はそのままメモリ装置2に送られる。ただこ
の時は、処理装置のIサイクルまたはEサイクルの状態
信号に応じて、命令フェッチのIサイクルでは必ずメモ
リ装置からの命?r 、−Aみ込みであるから、信号S
3を強制的にメモリ読み込み状態として(38)、処理
装置1が仮りに障害などでメモリへの書込み信号を発生
しても、メモリ装置に与えないようにしてメモリ保護を
行う。すなわち、プログラムのモードレジスタ3−aが
輻祝プログラム状態のモードに設定されていると、■サ
イクルではフローチャートの32.33゜35、38.
40.42.44.32.33.35・・・・・・・・
・・・・のループを繰り返す。また、Eサイクルに移る
と32、49.53.54.44.32.49.53・
・・・・・・・・・・のループを繰り返す。このときア
ドレスの不当性のチェックは行なっていない。プログラ
ムのモードレジスタ3−aの内容を監視プログラムの中
の命令により、ユーザプログラム状態UPのモード設定
に変わると、アドレスの不当性チェックのルーチンであ
る34.または51を通り、アドレスの管理が行なわれ
る。モードレジスタ3−aがユーザプログラム状態UP
にモード設定されていると、■サイクルにおいてはアド
レスの管理を行うと共に取り出した命令の内容について
もチェックされる(45)。すなわち、命令のフェッチ
サイクルでメモリから取り出した命令が、特定命令か葭
かを命令制御ブロック3−dを働かせてチェックするよ
うになる。ユーザプログラムにおける不適当なアドレス
設定、命令設定は、このアドレス管理ルーチン3415
1、命令のチェックルーチン45によって検査され、ユ
ーザプログラムの暴走と操作誤りによるコンピュータシ
ステムの異常状態が起る恐れのあるようなメモリ装置へ
の書き込み命令はトラップされ無効とされる。さらにユ
ーザプログラムモードのときの命令実行のEサイクルに
おいては、アドレスを管理し、そのアドレスが適当なも
のでない場合にはメモリ装置2へのメモリの読出1.7
7′書込み信号S3は強制的に読出し信号としてしまい
、不注意なメモリ書込みにより、メモリ内容をtllr
、を壊してしまわないようにしである。なお、これらの
アドレスの管理によるメモリの保護に加えて、プログラ
ムにおける命令コードの不当性を管理して、メモリ内容
を破壊に導く恐れのある裾貨を実行しないようにしてい
る(このルーチンは第4図のフローチャートにおいては
44.45.46゜47.48で示され、第3図におい
ては命令制御ブuレク3−dを動作させることにより行
なわれる)が、本発明の主安部のアドレス管理制御ブロ
ック3をデータバスD3の間には挿入しないで、アドレ
スバスにのみ挿入する構成をとれば、この命令コードの
不当性の管理を行うルーチンは省かれる゛、。
In the present invention, by managing the addresses generated by the processing device 1 when executing an instruction and detecting the invalidity of the address, it is possible to trap instructions that may damage the program and prevent the user program from running out of control or from being manipulated. One mistake, yo.
We try to avoid abnormal conditions in the computer system. In the computer system according to the present invention,
At power-on or initial reset, the mode register 3-a of the program is always set to the monitoring program state SP (31). When the mode register 3-a is set to the supervisory program state SP, as is clear from the flowchart of FIG. is sent to the memory device 2 as is. However, in this case, depending on the status signal of the processing unit's I cycle or E cycle, the command from the memory device is always received in the I cycle of instruction fetch. r, −A inclusion, so the signal S
3 is forcibly placed in a memory reading state (38), and even if the processing device 1 generates a write signal to the memory due to a failure or the like, the memory is protected by not giving it to the memory device. That is, when the mode register 3-a of the program is set to the congested program state mode, in the cycle (2), 32.33°35, 38.
40.42.44.32.33.35・・・・・・・・・
Repeat the loop of... Also, moving to the E cycle, 32, 49.53.54.44.32.49.53.
Repeat the loop of ・・・・・・・・・・・・. At this time, the address is not checked for invalidity. When the contents of the mode register 3-a of the program are changed to the user program state UP mode setting by an instruction in the monitoring program, the address invalidity check routine 34. or 51, address management is performed. Mode register 3-a is in user program state UP
If the mode is set to , the address is managed in cycle (2) and the contents of the fetched instruction are also checked (45). That is, the instruction control block 3-d is operated to check whether the instruction taken out from the memory in the instruction fetch cycle is a specific instruction or a specific instruction. Inappropriate address settings and command settings in the user program are handled by this address management routine 3415.
1. It is checked by the instruction check routine 45, and any write instruction to the memory device that may cause an abnormal state of the computer system due to a runaway of the user program or an operational error is trapped and invalidated. Furthermore, in the E cycle of instruction execution in the user program mode, the address is managed, and if the address is not appropriate, the memory is read to the memory device 2.
7' The write signal S3 is forced to become a read signal, and careless memory writing causes the memory contents to become tllr.
, so as not to damage it. In addition to protecting memory by managing these addresses, it also manages invalid instruction codes in the program to prevent execution of supporting commands that may destroy memory contents (this routine In the flowchart of FIG. 4, this is indicated by 44, 45, 46, 47, 48, and in FIG. If the control block 3 is not inserted between the data buses D3 but is inserted only into the address bus, the routine for managing the invalidity of this instruction code can be omitted.

ことになる。アドレス管理に・よるメモリ保護のみによ
っても十分にその機能は実現されうる。
It turns out. This function can be sufficiently realized only by memory protection through address management.

以トに、アドレス管理制御ブロック3の動作概曹を説明
したが、本発明によるメモリ管理保護方式による利点お
よび効果を列記すれば以下σ〕ようになる。
The general operation of the address management control block 3 has been described above, and the advantages and effects of the memory management protection system according to the present invention are listed as follows.

lal  監視プログラムの大きさが固定的なものでは
、メモリ領域の監視プログラム域の領域設定を固定結線
すると、アドレス線をそのまま利用できノ・−ドウエア
構成は簡単にできる。また、監視プログラムの大きさが
変化するものでは、外部スイッチあるいはプログラム的
に監視プログラム域/ユーザプログラム域の領域設定を
行うようにすれ−i、領域設定を自由にでき、システム
の自由度が太きい。
lal If the size of the monitoring program is fixed, if the area setting of the monitoring program area in the memory area is fixedly connected, the address line can be used as is, and the software configuration can be simplified. In addition, in cases where the size of the monitoring program changes, it is recommended to set the area of the monitoring program area/user program area using an external switch or programmatically. Hey.

(bl  命令制御ブロックでトラップする命令コード
を適当に設定してお(ことで、処理装置シニな℃・命令
コードの実行をのがれられる。
(By setting the instruction code to be trapped in the instruction control block appropriately, you can avoid executing the instruction code that is too complicated for the processing device.

(C1従来のようなオペレーティングシステム(監視プ
ログラム)内でのメモリ管理プログラムは、本発明では
ノ1−ド的な構成に変わって(・るりで、その分の監視
プログラムのメモリ管理保護の負担は軽減される。
(C1 The conventional memory management program within the operating system (monitoring program) has been changed to a node-like configuration in the present invention. Reduced.

(dl  メモリの領域設定およびプログラム状態σつ
°モー ド設定を多様化することにより、複数のプログ
ラムモードが設定でき、領域とプログラム状態の設定モ
ードの組合せにより、各プログラムを独立]て管理でき
る。
(By diversifying the memory area settings and program status mode settings, multiple program modes can be set, and each program can be managed independently by combining the area and program status setting modes.)

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

第1図は記憶領域のアクセス可能領域制限による記憶保
護の説明図、第2図は本発明が適用される−・般的なコ
ンピュータシステムのブロック図、第3図は本発明によ
るメモリ管理保護方式を適用しまたコンピュータシステ
ムのブロック図、第4図は本発明の主要部であるメモリ
制御ブロックの動作な説明するフローチャートの概略図
である。 1:処理装置      2:メモリ装置3ニアドレス
管理制御ブロツク :3−a:監視プログラムモード/ユーザプログラムモ
ード設定モードレジスタ 3b=アドレス制御ブロツク 3−Cニアドレス管理レジスタ ;3d:命令制御ブロック 3−e:特定アドレス生成ブロック A1:処理装置からアドレス管理制御ブロックへのアド
レス信号A2ニアドレス管理制御ブロックからメモリ装
置へのアドレス信号D1:メモリ装置から命令制御ブロ
ックへのデータ信号D2:命令制御ブロックから処理装
置へのデータ信号D3:処理装置とメモリ装置との間の
データ信号線Sl:処理装置の状態信号でIサイクル/
Eサイクルを示す信号S2:処理装置からのメモリ読み
出し/書き込みを制御する信号S3ニアドレス管理制御
ブロックからのメモリ読み出し書き込みを制御する信号 S4:モード信号記憶制御信号 S5:モード信号取り出し制御信号 S6:命令制御ブロックの動作を制御するEnable
/])isable信号S8ニブログラムモード状態信
号 S9ニアドレス空間の判別・設定領域検出信号′9J1
図 記tl領を翫 第2図
Fig. 1 is an explanatory diagram of storage protection by limiting the accessible storage area, Fig. 2 is a block diagram of a general computer system to which the present invention is applied, and Fig. 3 is a memory management protection method according to the present invention. FIG. 4 is a block diagram of a computer system to which the present invention is applied. FIG. 4 is a schematic flowchart illustrating the operation of the memory control block which is the main part of the present invention. 1: Processing device 2: Memory device 3 Near address management control block: 3-a: Monitoring program mode/user program mode setting mode register 3b = Address control block 3-C Near address management register; 3d: Instruction control block 3-e : Specific address generation block A1: Address signal from the processing device to the address management control block A2 Address signal from the near address management control block to the memory device D1: Data signal from the memory device to the instruction control block D2: Processing from the instruction control block Data signal D3 to the device: Data signal line Sl between the processing device and memory device: Status signal of the processing device;
Signal indicating E cycle S2: Signal that controls memory read/write from the processing device S3 Signal that controls memory read/write from the near address management control block S4: Mode signal Storage control signal S5: Mode signal retrieval control signal S6: Enable that controls the operation of the instruction control block
/]) enable signal S8 Niprogram mode status signal S9 Near address space determination/setting area detection signal '9J1
Diagram 2

Claims (1)

【特許請求の範囲】 (11処理装置が発生するアドレス空間に対応づけられ
たメモリ領域を複数の領域に分割し、この分割された領
域に対応するアドレス空間を管理単位として、管理単位
のアドレス空間を監視ブログラノ、域と複数の、ユーザ
プログラム域に設定するアドレス管理レジスタと、実行
するプログラムのモード状態をSC憶するモードレジス
タと、このアドレス管理レジスタおよびモードレジスタ
の内容に応じて処理装置が発生するアドレスを管理し制
御する制御手段とを備え、実行される命令のアドレスを
管理して、ユーザモードにおける命令の監視プログラム
域または他のユーザプログラム域へのメ(IJ書込み命
令をトラップして無効とすることを特徴とするメモリ管
理保護方式。 (2)  アドレス管理レジスタおよびモードレジスタ
の内容に応じて処理装置が発生するアドレスを管理し制
御する制御手段は特定アドレスを発生してアドレス変換
する手段を含み、実行される命令のアドレスを管理して
、ユーザモードにおける命令の監視プログラム域または
他のユーザプログラム域へのメモリ書込み命令をトラッ
プした場合、実行される命令のアドレス変換を行うこと
を特徴とする特許請求の範囲第(1)項に記載のメモリ
管理保護方式。 (3)  処理装置が発生するアドレス空間に対応づけ
られたメモリ領域を複数の領域に分割し、この分割され
た領域に対応するアドレス空間を管理学位として、管理
単位のアドレス空間を監視プログラム域と複数のユーザ
プログラム域に設定するアドレス管理レジスタと、実行
するプログラムのモード状態を記憶するモードレジスタ
と、このアドレス管理レジスタおよびモードレジスタの
内容に応じて処理装置が発生するアドレスを管理し制御
する制御手段と、命令を監視プログラム域の特定アドレ
スへの分岐命令にとりかえる命令制御手段とを備え、実
行される命令のアドレスを管理して、ユーザモードにお
ける命令の監視プログラム域または他のユーザプログラ
ム域へのメモリ書込み命咎をトラップし、監視プログラ
ム域の特定アドレスへの分岐命令にとりかえることを特
徴とするメモリ管理保護方式。
[Scope of Claims] (11) A memory area associated with an address space generated by a processing device is divided into a plurality of areas, and the address space corresponding to the divided area is defined as a management unit. There is an address management register that is set in the user program area, a mode register that stores the mode state of the program to be executed, and a processing unit that generates data according to the contents of this address management register and mode register. control means for managing and controlling the address of the instruction to be executed, and controlling the address of the instruction to be executed to trap and invalidate the IJ write instruction to the supervisory program area or other user program area of the instruction in the user mode. (2) The control means for managing and controlling the addresses generated by the processing device according to the contents of the address management register and the mode register is means for generating a specific address and converting the address. It manages the address of the instruction to be executed, and converts the address of the instruction to be executed when a memory write instruction to the instruction monitoring program area or other user program area in user mode is trapped. The memory management protection method according to claim (1). (3) A memory area associated with an address space generated by a processing device is divided into a plurality of areas, and the divided area is An address management register that sets the address space of a management unit to a monitoring program area and multiple user program areas, with the corresponding address space as a management degree, a mode register that stores the mode state of the program to be executed, and this address management register and It is equipped with a control means for managing and controlling the addresses generated by the processing unit according to the contents of the mode register, and an instruction control means for replacing an instruction with a branch instruction to a specific address in the supervisory program area, and controlling the address of the instruction to be executed. 1. A memory management protection method, which traps a memory write instruction to a supervisory program area or another user program area by an instruction in a user mode, and replaces it with a branch instruction to a specific address in the supervisory program area.
JP2408782A 1982-02-17 1982-02-17 Memory management protecting system Pending JPS58141500A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2408782A JPS58141500A (en) 1982-02-17 1982-02-17 Memory management protecting system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2408782A JPS58141500A (en) 1982-02-17 1982-02-17 Memory management protecting system

Publications (1)

Publication Number Publication Date
JPS58141500A true JPS58141500A (en) 1983-08-22

Family

ID=12128606

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2408782A Pending JPS58141500A (en) 1982-02-17 1982-02-17 Memory management protecting system

Country Status (1)

Country Link
JP (1) JPS58141500A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03276337A (en) * 1990-03-27 1991-12-06 Toshiba Corp Microcontroller
JP2005084721A (en) * 2003-09-04 2005-03-31 Renesas Technology Corp Microcomputer

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH03276337A (en) * 1990-03-27 1991-12-06 Toshiba Corp Microcontroller
JP2005084721A (en) * 2003-09-04 2005-03-31 Renesas Technology Corp Microcomputer

Similar Documents

Publication Publication Date Title
CN1149342A (en) Guared memory system and method
US4903194A (en) Storage addressing error detection circuitry
JPS6035697B2 (en) input/output control system
JPS58141500A (en) Memory management protecting system
JPS59154700A (en) Data processing system
JPH05100847A (en) Memory protection system for information processor
JPS6057091B2 (en) Common memory storage protection method
JPS6020779B2 (en) Composite computer system
JP3350069B2 (en) Bus line monitoring method
JPH03244054A (en) Storage protection system
JP2533931B2 (en) Data contents protection method of dynamic allocation area
JPS63250753A (en) Memory access checking system
JPS6162142A (en) I/o controller
JPS6118045A (en) Detecting system of program runaway
JPH06161797A (en) Data processor
JP2904991B2 (en) Numerical control unit
JPS61279940A (en) Fault detector for computer
JPH02297235A (en) Memory data protecting circuit
JPH05265865A (en) Memory write protector
JP2002091826A (en) Information processor
JPS6195464A (en) Data protecting system
JPH02116933A (en) Control system for maneuvering apparatus
JPS62266602A (en) Setting guard device for system parameter
JPH0358217A (en) Electronic disk subsystem
JPH0713879A (en) Bus connecting device