JPS6161413B2 - - Google Patents

Info

Publication number
JPS6161413B2
JPS6161413B2 JP55159333A JP15933380A JPS6161413B2 JP S6161413 B2 JPS6161413 B2 JP S6161413B2 JP 55159333 A JP55159333 A JP 55159333A JP 15933380 A JP15933380 A JP 15933380A JP S6161413 B2 JPS6161413 B2 JP S6161413B2
Authority
JP
Japan
Prior art keywords
branch
area
instruction
address
buffer 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
Application number
JP55159333A
Other languages
Japanese (ja)
Other versions
JPS5783850A (en
Inventor
Hisazumi Ueda
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 JP55159333A priority Critical patent/JPS5783850A/en
Publication of JPS5783850A publication Critical patent/JPS5783850A/en
Publication of JPS6161413B2 publication Critical patent/JPS6161413B2/ja
Granted legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/32Address formation of the next instruction, e.g. by incrementing the instruction counter
    • G06F9/322Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address
    • G06F9/323Address formation of the next instruction, e.g. by incrementing the instruction counter for non-sequential address for indirect branch instructions

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Storage Device Security (AREA)
  • Executing Machine-Instructions (AREA)

Description

【発明の詳細な説明】 この発明はデータ処理装置に関し、特に計算機
の主記憶中に特権レベルが互に異なる領域が設け
られる場合のデータ処理に関するものである。
DETAILED DESCRIPTION OF THE INVENTION The present invention relates to a data processing device, and more particularly to data processing when areas with different privilege levels are provided in the main memory of a computer.

データ処理装置では、通常、特権レベルが互に
異なる複数個の動作モードを設け、特権レベルの
低いモードではシステムの動作環境に影響を与え
る命令の実行を許さず、特権レベルが高くなるほ
ど、これらの命令の使用を許すように構成する。
この特権レベルの異なる動作モードの命令は主記
憶内の異なる領域に格納されているが、この発明
は異なる領域をまたいでプログラム実行制御を渡
す場合の移行制御に関するものである。
Data processing equipment typically has multiple operating modes with different privilege levels, with lower privilege levels disallowing the execution of instructions that affect the system operating environment, and higher privilege levels disallowing the execution of instructions that affect the operating environment of the system. Configure to allow use of instructions.
Instructions in operating modes with different privilege levels are stored in different areas within the main memory, and the present invention relates to transition control when program execution control is passed across different areas.

従来のこの種の装置の一例を第1図に示す。第
1図において1は命令アドレスレジスタ、2は主
記憶、2,4,5はそれぞれ異なる領域で、異な
る領域では特権レベルがそれぞれ異なるものとす
る。6は主記憶2内の一つのアドレスに格納され
ている命令、7は命令6を格納するバツフアレジ
スタ、8はバツフアレジスタ7の命令の種類を示
すコード部(第1図の例ではこの命令が分岐命令
であることを示すコードが格納されている。)、9
はバツフアレジスタ7の命令が分岐命令である場
合分岐先アドレスを格納している分岐アドレス
部、10は比較器、11は信号線である。
An example of a conventional device of this type is shown in FIG. In FIG. 1, 1 is an instruction address register, 2 is a main memory, and 2, 4, and 5 are different areas, and the different areas have different privilege levels. 6 is an instruction stored at one address in the main memory 2, 7 is a buffer register that stores the instruction 6, and 8 is a code section indicating the type of instruction in the buffer register 7 (in the example in FIG. A code indicating that the instruction is a branch instruction is stored.), 9
1 is a branch address section storing a branch destination address when the instruction in the buffer register 7 is a branch instruction; 10 is a comparator; and 11 is a signal line.

主記憶2に格納されている命令の所在番地を示
すアドレスの上位数ビツトはその命令の属する領
域を示しており、かつ先に述べたようにこの領域
は特権レベルによつて分れているとする。たとえ
ば主記憶2はn=2N個の領域から構成されてい
るとすれば、アドレスの上位Nビツトによつて領
域指定を行うことができ、また第1図に示す例で
は分岐先領域番号が分岐元領域番号より小さいか
等しいと分岐は有効となり分岐命令は正常に実行
されるが、分岐先領域番号が分岐元領域番号より
大きいと分岐命令の実行は抑止されるように定め
られているとする。
The upper few bits of the address indicating the location of an instruction stored in main memory 2 indicate the area to which the instruction belongs, and as mentioned earlier, this area is divided according to privilege level. do. For example, if main memory 2 is composed of n = 2 N areas, the area can be specified by the upper N bits of the address, and in the example shown in Figure 1, the branch destination area number is If the branch source area number is smaller than or equal to the branch source area number, the branch is valid and the branch instruction is executed normally, but if the branch destination area number is greater than the branch source area number, execution of the branch instruction is inhibited. do.

第1図に示す例では命令アドレスレジスタ1の
アドレスは命令6を指定しており、命令6は一た
んバツフアレジスタ7に入力される。此処でコー
ド部8を解読すると、この命令6が分岐命令であ
ることがわかる。分岐命令の場合比較器10は命
令アドレスレジスタ1のアドレスが示している領
域と分岐アドレス部9の分岐先アドレスが示して
いる領域とが同一のものであるかどうかを調べ
る。通常の場合は、比較器9で全アドレスを比較
する必要はなく、さきに説明した例のようにn=
N個の領域が存在し、アドレスの上位Nビツト
により領域指定を行つている場合はこのNビツト
だけを比較すればよい。また上述の例のように分
岐先領域番号が分岐元領域番号より小さいか等し
いと分岐を有効とするのであれば、命令アドレス
レジスタ1のNビツトの示す数と分岐アドレス部
9のNビツトの示す数とを比較し後者の数が前者
の数に等しいか前者の数より小さいときはバツフ
アレジスタ7に保持される分岐命令は実行され、
そうでない場合は比較器10は信号線11にエラ
ー信号を出力して分岐命令の実行は抑止される。
In the example shown in FIG. 1, the address of instruction address register 1 specifies instruction 6, and instruction 6 is once input to buffer register 7. If the code part 8 is decoded here, it can be seen that this instruction 6 is a branch instruction. In the case of a branch instruction, the comparator 10 checks whether the area indicated by the address in the instruction address register 1 and the area indicated by the branch destination address in the branch address section 9 are the same. In normal cases, it is not necessary to compare all addresses with comparator 9, and as in the example explained earlier, n=
If there are 2N areas and the area is specified by the upper N bits of the address, only these N bits need to be compared. Furthermore, as in the above example, if the branch is valid if the branch destination area number is smaller than or equal to the branch source area number, the number indicated by the N bit of the instruction address register 1 and the number indicated by the N bit of the branch address field 9 are If the latter number is equal to or smaller than the former number, the branch instruction held in the buffer register 7 is executed;
If not, the comparator 10 outputs an error signal to the signal line 11, and execution of the branch instruction is inhibited.

従来の装置は以上のように構成されているの
で、分岐命令によつてある領域へ制御を渡す場合
に、たとえばその領域の番号より大きいか又はそ
の領域の番号に等しい番号の領域から制御を渡す
場合はすべて有効であり、そうでない場合はすべ
て分岐命令が実行されないというように設定する
ことができるが、他の領域からの分岐に対し、領
域番号の順序には無関係に、あらかじめ定める任
意の領域からの分岐は許し其他の領域からの分岐
を禁止するという設定を各領域ごとにあらかじめ
任意に設定しておくということができない欠点が
あつた。
Conventional devices are configured as described above, so when passing control to a certain area using a branch instruction, for example, control is passed from an area whose number is greater than or equal to the number of that area. It is possible to set the branch instruction to be valid in all cases, and not execute in all other cases, but for branches from other areas, any area specified in advance, regardless of the order of area numbers. There was a drawback that it was not possible to arbitrarily set in advance for each area the settings to allow branching from this area and to prohibit branching from other areas.

この発明は従来のものにおける上述の欠点を除
去するためになされたもので、主記憶の各領域ご
とに分岐制御情報を設けこの情報によつて分岐の
有効性をチエツクし、各領域間に分岐が有効であ
るか否かをあらかじめ任意に設定しておくことが
できるデータ処理装置を提供することを目的とす
るものである。
This invention was made in order to eliminate the above-mentioned drawbacks of the conventional ones. Branch control information is provided for each area of the main memory, and the validity of the branch is checked using this information, and branching is performed between each area. It is an object of the present invention to provide a data processing device that can arbitrarily set in advance whether or not the data is valid.

以下、図面についてこの発明の実施例を説明す
る。第2図はこの発明の一実施例を示すブロツク
図であつて、第1図と同一符号は同一又は相当部
分を示し、12は分岐制御情報テーブル、13は
分岐制御情報テーブル読出部、14は分岐有効性
チエツク部、15は信号線である。分岐制御情報
テーブル12は主記憶の各領域毎に1個ずつ対応
したエントリがあり、したがつて領域数がn個の
場合はn個のエントリを有し、また各エントリは
領域個数(n個)だけのビツト長を有し、このn
個のビツトはそれぞれ対応する領域からの分岐を
許可するか禁止するかによつてそのビツトの論理
があらかじめ設定されている。たとえば領域−1
3からの分岐を許可し、領域−24からの分岐を
禁止するなら第1番目のビツトの論理を「1」、
第2番目のビツトの論理を「0」に設定してお
く。また分岐制御情報テーブル12のエントリは
分岐アドレス部9の上位Nビツト(2N=n)に
よつて分岐制御情報テーブル読出部13を介して
読出される。分岐制御情報テーブル12において
自己領域からの分岐は常に許可されるので自己領
域に対応するビツトは常に論理「1」に設定さ
れ、これはいわば冗長情報であるので、分岐制御
情報テーブル12はその性質上からは、自己領域
以外の各領域からの分岐についてこれを許可する
か否かの情報を記憶するテーブルと言うことがで
きるが、実際にはテーブルを読出し易い形にする
ために自己領域に対応するビツトをも含んでい
る。
Embodiments of the invention will be described below with reference to the drawings. FIG. 2 is a block diagram showing an embodiment of the present invention, in which the same reference numerals as in FIG. Branch validity check section 15 is a signal line. The branch control information table 12 has an entry corresponding to each area of the main memory. Therefore, when the number of areas is n, it has n entries, and each entry corresponds to the number of areas (n ) has a bit length of n
The logic of each bit is set in advance depending on whether branching from the corresponding area is permitted or prohibited. For example, area-1
If you want to allow branching from area 3 and prohibit branching from area -24, set the logic of the first bit to ``1''.
The logic of the second bit is set to "0". Further, the entries in the branch control information table 12 are read out via the branch control information table reading section 13 using the upper N bits (2 N =n) of the branch address section 9 . In the branch control information table 12, branching from the self area is always permitted, so the bit corresponding to the self area is always set to logic "1", and this is so to speak redundant information, so the branch control information table 12 From the above, it can be said that this is a table that stores information about whether or not to allow branching from each area other than the self-area, but in reality, it is a table that stores information about whether or not to allow branching from each area other than the self-area, but in reality, it corresponds to the self-area in order to make the table easier to read. It also contains bits.

次に第2図の回路の動作を説明する。命令アド
レスレジスタ1のアドレスで命令6を読出し、バ
ツフアレジスタ7に入力し、コード部8を解読し
てバツフアレジスタ7の内容が分岐命令であるこ
とがわかると、比較器10で命令アドレスレジス
タ1のアドレスと分岐アドレス部9のアドレスを
比較することは第1図の回路の動作と同様であ
る。また第1図について説明したと同様な数値例
を用いれば、命令アドレスレジスタ1の上位Nビ
ツトと分岐アドレス部9の上位Nビツトだけを比
較すればよい。ただこの比較では両者のNビツト
が一致するか否かだけが比較され、一致する場合
は同一領域内での分岐であるので、バツフアレジ
スタ7の分岐命令は実行され、一致しない場合は
異なる領域への分岐ということになり、信号線1
1に信号が出力して分岐制御情報テーブル読出部
13と分岐有効性チエツク部14の動作を起動す
る。分岐制御情報テーブル読出部13は分岐先領
域に対応するエントリを分岐アドレス部9の上位
Nビツトを用いて分岐制御情報テーブル12から
読出して分岐有効性チエツク部14へ送る。分岐
有効性チエツク部14は送られてきたエントリ中
の分岐元領域(命令アドレスレジスタ1の上位N
ビツトによつて示される)に対応するビツトの論
理を調べることにより、この分岐が有効かどうか
をチエツクし、有効な場合はバツフアレジスタ7
の分岐命令を実行し、有効でないなら信号線15
にエラー信号を出力してバツフアレジスタ7の命
令の実行を抑止する。
Next, the operation of the circuit shown in FIG. 2 will be explained. Instruction 6 is read at the address of instruction address register 1, inputted to buffer register 7, and when the code section 8 is decoded and the contents of buffer register 7 is found to be a branch instruction, comparator 10 reads instruction 6 from the instruction address register. Comparing the address of 1 and the address of branch address section 9 is similar to the operation of the circuit shown in FIG. Further, if a numerical example similar to that explained with reference to FIG. 1 is used, only the upper N bits of the instruction address register 1 and the upper N bits of the branch address section 9 need to be compared. However, this comparison only compares whether or not the N bits of both match. If they match, the branch is in the same area, so the branch instruction in buffer register 7 is executed; if they do not match, the branch instruction is executed in a different area. This means branching to signal line 1.
A signal is output to the branch control information table reading section 13 and the branch validity checking section 14 to start their operations. The branch control information table reading section 13 reads the entry corresponding to the branch destination area from the branch control information table 12 using the upper N bits of the branch address section 9, and sends it to the branch validity checking section 14. The branch validity check unit 14 checks the branch source area (upper N of the instruction address register 1) in the sent entry.
Check whether this branch is valid by examining the logic of the bit corresponding to
Execute the branch instruction, and if it is not valid, signal line 15
The buffer register 7 outputs an error signal to suppress the execution of the instruction in the buffer register 7.

以上のような制御が行われるので、この発明に
よれば、ある領域に着目した場合、その領域へ分
岐できる領域と分岐できない領域とを、特権レベ
ルの高低とは無関係にあらかじめ任意に設定して
おくことができ、制御の柔軟性を向上することが
できる。
Since the above control is performed, according to the present invention, when focusing on a certain area, the areas where branching to that area is possible and the areas where branching is not possible are arbitrarily set in advance, regardless of the privilege level. control flexibility can be improved.

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

第1図は従来の装置の一例を示すブロツク図、
第2図はこの発明の一実施例を示すブロツク図で
ある。 1……命令アドレスレジスタ、2……主記憶、
3,4,5……主記憶の領域、6……主記憶上の
命令、7……バツフアレジスタ、8……バツフア
レジスタのコード部、9……バツフアレジスタの
分岐アドレス部、10……比較器、12……分岐
制御情報テーブル、13……分岐制御情報テーブ
ル読出部、14……分岐有効性チエツク部。な
お、図中同一符号は同一又は相当部分を示す。
FIG. 1 is a block diagram showing an example of a conventional device.
FIG. 2 is a block diagram showing one embodiment of the present invention. 1...Instruction address register, 2...Main memory,
3, 4, 5... Area of main memory, 6... Instruction on main memory, 7... Buffer register, 8... Code part of buffer register, 9... Branch address part of buffer register, 10 ... comparator, 12 ... branch control information table, 13 ... branch control information table reading section, 14 ... branch validity checking section. Note that the same reference numerals in the figures indicate the same or equivalent parts.

Claims (1)

【特許請求の範囲】[Claims] 1 計算機の主記憶を複数の領域に分ちそれぞれ
の領域に対し当該領域以外の各領域からの分岐に
ついてこれを許可するか否かの情報を記憶する分
岐制御情報テーブルと、上記主記憶内から読出す
べき命令のアドレスを格納する命令アドレスレジ
スタと、この命令アドレスレジスタの内容のアド
レスによつて読出された命令を格納するバツフア
レジスタと、このバツフアレジスタに格納される
命令が分岐命令であるとき上記命令アドレスレジ
スタの内容の一部と上記バツフアレジスタの内容
中の分岐アドレス部の一部とを比較し上記命令ア
ドレスレジスタによつて定められる主記憶の領域
と上記バツフアレジスタの上記分岐アドレス部に
よつて定められる主記憶の領域とが互に同一のも
のであるか否かを検出する比較器と、上記バツフ
アレジスタの分岐アドレス部の内容により上記分
岐制御情報テーブルから該当する領域の情報を読
出す分岐制御情報テーブル読出部と、上記比較器
の出力が領域が互に同一のものではないことを示
すとき上記分岐制御情報テーブル読出部の出力中
上記命令アドレスレジスタの内容によつて定めら
れる領域に対する分岐制御情報をチエツクし上記
バツフアレジスタの内容により示される分岐を実
行するか否かを決定する分岐有効性チエツク部と
を備えたデータ処理装置。
1. A branch control information table that divides the computer's main memory into multiple areas and stores information on whether or not to permit branching from each area other than the area for each area, and There is an instruction address register that stores the address of the instruction to be read, a buffer register that stores the instruction read according to the address of the contents of this instruction address register, and an instruction stored in this buffer register that is a branch instruction. At some point, a part of the contents of the instruction address register is compared with a part of the branch address part in the contents of the buffer register, and the area of the main memory defined by the instruction address register is compared with the area of the buffer register. A comparator detects whether or not the areas of the main memory defined by the branch address field are the same, and a comparator detects whether or not the areas of the main memory defined by the branch address field are the same, and the corresponding branch control information table is detected based on the contents of the branch address field of the buffer register. A branch control information table reading section reads out the information of the area, and when the output of the comparator indicates that the areas are not the same, the branch control information table reading section reads out the information of the area. and a branch validity check section for checking branch control information for the area defined by the buffer register and determining whether or not to execute the branch indicated by the contents of the buffer register.
JP55159333A 1980-11-12 1980-11-12 Data processing device Granted JPS5783850A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP55159333A JPS5783850A (en) 1980-11-12 1980-11-12 Data processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP55159333A JPS5783850A (en) 1980-11-12 1980-11-12 Data processing device

Publications (2)

Publication Number Publication Date
JPS5783850A JPS5783850A (en) 1982-05-25
JPS6161413B2 true JPS6161413B2 (en) 1986-12-25

Family

ID=15691524

Family Applications (1)

Application Number Title Priority Date Filing Date
JP55159333A Granted JPS5783850A (en) 1980-11-12 1980-11-12 Data processing device

Country Status (1)

Country Link
JP (1) JPS5783850A (en)

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2865689B2 (en) * 1989-02-13 1999-03-08 株式会社日立製作所 Data processing device
JPH10228421A (en) * 1997-02-14 1998-08-25 Nec Ic Microcomput Syst Ltd Memory access control circuit
US6986052B1 (en) 2000-06-30 2006-01-10 Intel Corporation Method and apparatus for secure execution using a secure memory partition
KR100505106B1 (en) * 2002-05-29 2005-07-29 삼성전자주식회사 Smart card with enhanced security
GB2448149B (en) 2007-04-03 2011-05-18 Advanced Risc Mach Ltd Protected function calling
GB2448151B (en) 2007-04-03 2011-05-04 Advanced Risc Mach Ltd Memory domain based security control within data processing systems

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5323244A (en) * 1976-08-16 1978-03-03 Hitachi Ltd Information processing unit

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS5323244A (en) * 1976-08-16 1978-03-03 Hitachi Ltd Information processing unit

Also Published As

Publication number Publication date
JPS5783850A (en) 1982-05-25

Similar Documents

Publication Publication Date Title
US4434464A (en) Memory protection system for effecting alteration of protection information without intervention of control program
US5023777A (en) Information processing system using domain table address extension for address translation without software modification
KR860000838B1 (en) Improved memory proterction system using capability registers
US6823433B1 (en) Memory management system and method for providing physical address based memory access security
KR100964000B1 (en) Memory management system and method providing linear address based memory access security
KR880000360B1 (en) Method for checking storage protection and a circuit for carrying out the same
EP0213843A2 (en) Digital processor control
US5802347A (en) Emulator with function for detecting illegal access to special function register
JP3454854B2 (en) Memory management device and method
EP0636986A2 (en) Address decoder with small circuit scale and address area expansion capability
US4851989A (en) Data processing apparatus with a virtual storage address boundary check circuit
US4991083A (en) Method and system for extending address space for vector processing
JPS6161413B2 (en)
KR20020054519A (en) Applied Program Bungle Detection Apparatus and Method by Interrupt
JPH03113548A (en) Extension memory controller
JP2004529430A (en) Method for identifying the correct command input address when using command words with different lengths
JPH05265798A (en) Debugging support device
JPH08185360A (en) Device for inhibiting read of built-in rom
JPH0293734A (en) Error detecting method in information processor
JPH0256663A (en) Lock data setting device
JPS63250740A (en) Microprogram control system
JPH01279343A (en) Main memory protection system for computer system
JPH05143366A (en) Interruption control circuit
JPH01204118A (en) Information processor
JPH02163839A (en) Output protecting circuit