JPH09160831A - Information processing device - Google Patents
Information processing deviceInfo
- Publication number
- JPH09160831A JPH09160831A JP7319989A JP31998995A JPH09160831A JP H09160831 A JPH09160831 A JP H09160831A JP 7319989 A JP7319989 A JP 7319989A JP 31998995 A JP31998995 A JP 31998995A JP H09160831 A JPH09160831 A JP H09160831A
- Authority
- JP
- Japan
- Prior art keywords
- level
- instruction
- access
- circuit
- information processing
- 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.)
- Withdrawn
Links
Landscapes
- Storage Device Security (AREA)
Abstract
(57)【要約】
【課題】データアクセス命令の位置する空間によってデ
ータアクセスの可否を判断することにより保護機能を実
現する。
【解決手段】命令フェッチ時にアドレスをデコードしレ
ベルを設定する回路とデータアクセス時にCPUで遅延
された命令レベルとデータアドレスのレベルを比較する
回路を有し、アクセスの許可がない場合にはCPUとメ
モリ間のデータ転送を禁止する機能備える保護回路を設
ける。
(57) [Abstract] [PROBLEMS] To realize a protection function by judging whether data access is possible or not depending on a space where a data access instruction is located. A circuit having a circuit for decoding an address and setting a level at the time of instruction fetch and a circuit for comparing an instruction level delayed by a CPU at the time of data access and a level of a data address are provided. A protection circuit having a function of inhibiting data transfer between memories is provided.
Description
【0001】[0001]
【発明の属する技術分野】本発明はマイクロプロセッサ
またはそれを利用したシステムにおけるデータアクセス
の保護機能に関する。BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data access protection function in a microprocessor or a system using the same.
【0002】[0002]
【従来の技術】マイクロプロセッサまたはそれを利用し
たシステムにおいてデータ保護機能を実現する場合、あ
らかじめ内部に設定しておいたレベルを用い命令実行時
にそのレベルに違反するかどうかの判定を行い、違反し
た場合に例外を発生することによりデータ保護機能を実
現する。もしくはメモリ管理機構を有するプロセッサの
場合にはアドレス変換時に変換したページに対するアク
セスレベルも同時に読みだし、そのページ中の命令がそ
のレベルに違反したときにはアクセスを中断する機能を
有することによりデータ保護機能を実現する。2. Description of the Related Art In the case of implementing a data protection function in a microprocessor or a system using the same, it is determined whether or not the level is internally violated when an instruction is executed, and the level is violated. The data protection function is realized by generating an exception in some cases. Alternatively, in the case of a processor having a memory management mechanism, the access level for the translated page is also read at the time of address translation, and when the instruction in the page violates the level, the access is interrupted to provide a data protection function. To be realized.
【0003】[0003]
【発明が解決しようとする課題】本発明の目的は、デー
タの保護機能を、データアクセスする命令自体の位置す
るアドレス空間の別により区別し、保護をかけることを
可能とすることにある。すなわち、プログラムの位置す
る空間のメモリの種類によって、あらかじめ保護をかけ
られるようにし、特別に読みだされたくないメモリ、例
えばROMやRAMの内容といったものに対して保護をか
ける。SUMMARY OF THE INVENTION An object of the present invention is to enable protection by distinguishing the data protection function according to the address space in which the instruction itself that accesses the data is located. That is, it is possible to protect in advance depending on the type of memory in the space where the program is located, and to protect the memory that is not particularly desired to be read, such as the contents of ROM or RAM.
【0004】また本発明の目的は、保護されているデー
タに対しアクセスする権利がない状態で読みだしあるい
は書き込みを行った時、例外を発生して保護違反を知ら
せる場合と、例外を発生させずに正常にアクセスが終了
したかのように動作する場合の2通りの方法を実現し、
後者の方法を用いることにより保護がかかっているアド
レスが外に知られないためのセキュリティの機能を高め
ることを可能とすることにある。It is another object of the present invention to generate an exception and notify a protection violation when reading or writing in a state where the protected data does not have the right to access, and whether the exception is generated. We have implemented two methods to operate as if the access was normally completed.
By using the latter method, it is possible to enhance the security function because the protected address is not known outside.
【0005】[0005]
【課題を解決するための手段】保護機能を実現するため
の手段として保護回路を設ける。保護回路にはCPUか
ら命令アクセスかデータアクセスかを区別するコマンド
とアクセスするアドレスが入力として渡され、保護回路
はそのアドレスをデコードしてレベルをCPUへ返す。
CPUからのアクセスが命令フェッチだった場合CPU
は命令コードと共にレベルを受け取る。ここで受け取っ
たレベルはその命令のデータアクセスステージまで保持
され、データアクセスのコマンド,アドレスと共に保護
回路に渡される。保護回路はコマンドからデータアクセ
スと判断し、CPUから受け取ったレベルとアクセスす
るアドレスのレベルを比較し、そのデータアクセスに対
し許可を与える。A protection circuit is provided as a means for realizing a protection function. A command for distinguishing between instruction access and data access and an address to be accessed are passed as inputs to the protection circuit, and the protection circuit decodes the address and returns the level to the CPU.
If the access from the CPU is an instruction fetch CPU
Receives a level with an opcode. The level received here is held until the data access stage of the instruction, and is passed to the protection circuit together with the data access command and address. The protection circuit judges that the command is a data access, compares the level received from the CPU with the level of the address to be accessed, and gives permission for the data access.
【0006】データのリードアクセスに許可がなかった
場合、例外を発生する方法と例外を発生せず間違ったデ
ータをあたかも正常に読めたかのようにCPUへ返す方
法がある。データのライトアクセスに許可がなかった場
合も例外を発生する方法と例外を発生せず書き込みが行
えたかのように動作して実際は書き込みは行わないとい
う2通りの方法がある。これによりデータの保護を実現
する。When data read access is not permitted, there are a method of generating an exception and a method of not returning an exception and returning wrong data to the CPU as if the data was normally read. There are two methods, that is, a method of generating an exception even when the data write access is not permitted, and a method of operating as if writing was performed without generating an exception and not actually writing. This realizes data protection.
【0007】アドレスによるレベルの決定は内蔵レジス
タにより可変にすることも可能である。The determination of the level by the address can be made variable by a built-in register.
【0008】[0008]
【発明の実施の形態】図1に示すように本情報処理装置
はCPUと保護回路から成り、メモリまたは周辺回路の
アクセスの保護を行う。CPUのコマンド発行回路から
は命令フェッチ/データアクセスのリクエストがバス1
01を通して保護回路に発行される。またそれらのリク
エストに対するアドレスがALUからバス102を通し
て保護回路に転送され、アクセスレベル設定回路がアド
レスのデコードを行いアドレスごとのレベルを103を
通してCPUへ転送する。DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS As shown in FIG. 1, this information processing apparatus comprises a CPU and a protection circuit, and protects access to a memory or peripheral circuits. An instruction fetch / data access request is issued from the command issuing circuit of the CPU on the bus 1.
Issued through 01 to the protection circuit. The addresses for these requests are transferred from the ALU to the protection circuit through the bus 102, and the access level setting circuit decodes the address and transfers the level for each address to the CPU through 103.
【0009】CPUはコマンドが命令フェッチだった場
合、その命令に対応したアドレスのレベルをその命令の
実行ステージまでアクセスレベル遅延回路を使って保持
し、データアクセスと同時にバス105を通して保護回
路のアクセスレベル判定回路へ転送する。When the command is an instruction fetch, the CPU holds the address level corresponding to the instruction using the access level delay circuit until the execution stage of the instruction, and at the same time as the data access, the access level of the protection circuit through the bus 105. Transfer to the judgment circuit.
【0010】アクセスレベル判定回路ではバス101を
通してCPUから送られたコマンドを使ってデータアク
セスかどうかの判定を行い、もしデータアクセスだった
場合バス104を通して送られるデータアクセス自体の
レベルとバス105を通して送られるデータアクセスを
発行する命令自体のレベルを比較する。この判定回路で
アクセスが許可された場合、バス106を通してCPU
とメモリ/周辺回路を結ぶバス107,108のドライ
ブを制御する。The access level judgment circuit judges whether or not the data access is made by using the command sent from the CPU through the bus 101, and if it is the data access, the level of the data access itself sent through the bus 104 and the data access through the bus 105 are sent. Compare the level of the instruction itself that issues the data access. When access is permitted by this determination circuit, the CPU is accessed through the bus 106.
And drives the buses 107 and 108 connecting the memory and peripheral circuits.
【0011】図2にこの保護機能を実現する保護回路と
CPUとの間のプロトコルを示す。命令が5段のパイプ
ラインで201のように表されているとする。パイプラ
インの各ステージは命令フェッチのI−Stage,デコード
のD−Stage,実行のE−Stage,メモリアクセスのA−Sta
ge,レジスタストアのS−Stageから構成されている。I
−Stageでは信号路202,203を通し命令フェッチ
のコマンド(204)と命令フェッチのアドレス(20
5)が保護回路に渡される。FIG. 2 shows a protocol between the CPU and the protection circuit that realizes this protection function. It is assumed that an instruction is represented by 201 in a 5-stage pipeline. Each stage of the pipeline has an I-Stage for instruction fetch, a D-Stage for decoding, an E-Stage for execution, and an A-Sta for memory access.
ge, S-Stage of register store. I
In -Stage, the instruction fetch command (204) and the instruction fetch address (20
5) is passed to the protection circuit.
【0012】保護回路では205のアドレスからレベル
を生成し信号路207を通してCPUへ命令のレベルを返
す。命令フェッチされたデータ(命令コード)の読みだ
し自体には保護がかからないため命令コードは信号路2
06を通しCPUのD−Stageへ渡される。デコードされ
た命令がデータアクセスの場合、A−Stageにおいてデー
タアクセスの命令とアドレスが信号路209,210を
通して保護回路に渡される。またこれと同時に遅延回路
208によって保持された命令のレベルがCPUから保護
回路に渡される。The protection circuit generates a level from the address 205 and returns the level of the instruction to the CPU through the signal path 207. Since the reading of the instruction fetched data (instruction code) itself is not protected, the instruction code is in signal path 2
It is passed to D-Stage of CPU through 06. When the decoded instruction is a data access, the instruction and address of the data access are passed to the protection circuit through the signal paths 209 and 210 in A-Stage. At the same time, the level of the instruction held by the delay circuit 208 is passed from the CPU to the protection circuit.
【0013】これらの信号が保護回路のアクセスレベル
判定回路で処理され213を通してデータの転送の保護
がかけられる。これはパイプラインが5段のケースであ
るがE−Stageが2つ以上ある場合でも遅延回路208を
増やすことで対応ができる。These signals are processed by the access level determination circuit of the protection circuit, and the transfer of data is protected through 213. This is a case where the pipeline has five stages, but even if there are two or more E-Stages, it can be dealt with by increasing the delay circuit 208.
【0014】図3にアドレス空間の割付の例を示す。同
図(a)において、アドレス空間が301のように空間
1,空間2,空間3というように分割されているとす
る。この場合、同図(b)に示す通り3空間のアクセス
の対応が考えられる。303には命令の位置する空間、
304には303の命令がアクセスするデータの空間を
表す。ここでは空間3の命令は空間3の読みだしは可能
で空間1,2の読みだし/書き込みが可能になってい
る。また空間2の命令は空間1,2の読みだし/書き込
みは可能になっているが、空間3のアクセスは禁止され
ている。また空間1の命令は空間1の読みだし/書き込
みの許可しか与えられておらず、空間2,3のアクセス
は禁止されている。FIG. 3 shows an example of address space allocation. In FIG. 3A, it is assumed that the address space is divided into 301, space 1, space 2, and space 3. In this case, it is possible to deal with access to the three spaces as shown in FIG. 303 is the space where the instruction is located,
Reference numeral 304 represents a data space accessed by the instruction 303. Here, the instructions of space 3 can read the space 3 and read / write the spaces 1 and 2. Further, the instructions in the space 2 can read / write the spaces 1 and 2, but the access in the space 3 is prohibited. Further, the instruction of the space 1 is given only the read / write permission of the space 1, and the access of the spaces 2 and 3 is prohibited.
【0015】[0015]
【発明の効果】本発明により情報処理装置が外部に読み
だされたくないメモリ、例えば内部のROMやRAMな
どを内蔵していた場合にそれらのメモリに割り付けられ
たアドレスのみによって保護をかけることが可能にな
る。According to the present invention, when the information processing apparatus has a memory which is not desired to be read out to the outside, for example, an internal ROM or RAM, it is possible to protect only by the addresses assigned to those memories. It will be possible.
【図1】保護機能を実現する保護回路とCPUとメモリ
の関係を示すブロック図。FIG. 1 is a block diagram showing the relationship between a protection circuit that realizes a protection function, a CPU, and a memory.
【図2】保護機能を実現する場合のCPUと保護回路間
のプロトコルを示すブロック図。FIG. 2 is a block diagram showing a protocol between a CPU and a protection circuit when realizing a protection function.
【図3】保護機能を実現した場合のアドレス割付の一例
を示す説明図。FIG. 3 is an explanatory diagram showing an example of address allocation when a protection function is realized.
301…アドレス空間、302…命令/データのアクセ
ス対応表、303…命令の位置する空間、304…デー
タの位置する空間。301 ... Address space, 302 ... Instruction / data access correspondence table, 303 ... Instruction location space, 304 ... Data location space
───────────────────────────────────────────────────── フロントページの続き (72)発明者 玉城 実明 東京都小平市上水本町5丁目20番1号 株 式会社日立製作所半導体事業部内 (72)発明者 松井 重純 東京都小平市上水本町5丁目20番1号 株 式会社日立製作所半導体事業部内 (72)発明者 高窪 加津治 東京都小平市上水本町5丁目22番1号 株 式会社日立マイコンシステム内 (72)発明者 橋本 幸治 東京都小平市上水本町5丁目22番1号 株 式会社日立マイコンシステム内 (72)発明者 館澤 健 東京都小平市上水本町5丁目22番1号 株 式会社日立マイコンシステム内 (72)発明者 古山 幹夫 東京都小平市上水本町5丁目22番1号 株 式会社日立マイコンシステム内 ─────────────────────────────────────────────────── ─── Continuation of the front page (72) Inventor Mitsuaki Tamaki 5-20-1 Joumizuhoncho, Kodaira-shi, Tokyo Inside the Semiconductor Business Division, Hitachi, Ltd. (72) Inventor Shigezumi Matsui Josui, Kodaira-shi, Tokyo 5-20-1 Honmachi, Hitachi, Ltd. Semiconductor Business Division (72) Inventor Katsuharu Takakubo 5-22-1 Kamisuihonmachi, Kodaira-shi, Tokyo Inside Hitachi Microcomputer System Ltd. (72) Inventor Hashimoto Koji 5-22-1, Kamisuihonmachi, Kodaira-shi, Tokyo Inside Hitachi Microcomputer System Co., Ltd. (72) Inventor Ken Tatezawa 5-22-1 Kamisuihoncho, Kodaira-shi, Tokyo Inside Hitachi Microcomputer System ( 72) Inventor Mikio Furuyama 5-22-1 Kamimizuhonmachi, Kodaira-shi, Tokyo Inside Hitachi Microcomputer System Co., Ltd.
Claims (6)
アドレス空間によりレベルを設定する命令レベル設定回
路を有し、そのレベルに応じてデータの読みだしまたは
書き込みの可否を判定する実行レベル判定回路を有する
ことを特徴とする情報処理装置。1. An execution level determination circuit having an instruction level setting circuit for setting a level according to a logical address space in which an instruction for accessing data is located, and determining whether data can be read or written according to the level. An information processing apparatus having:
されたレベルをその命令の実行時まで保持する回路を有
する情報処理装置。2. An information processing apparatus having a circuit for holding the level generated by the instruction level setting circuit according to claim 1 until the instruction is executed.
スが発生したときに例外を発生し実行を中断する情報処
理装置。3. An information processing apparatus that interrupts execution by generating an exception when an access occurs at a level without the right to access.
スが発生したときに例外を発生せず、読みだし時には常
に固定値が読みだされ、書き込み時には実際の書き込み
は行わないで、まるで正常に書き込みが終了したかのよ
うに動作を完了させることによりアクセスする権利のな
いアドレスを知られないようにしたことを特徴とする情
報処理装置。4. An exception is not generated when an access occurs at a level without the right to access, a fixed value is always read at the time of reading, and actual writing is not performed at the time of writing. An information processing device, characterized in that an address without a right to access is made unknown by completing the operation as if it had ended.
より命令レベルの設定をアドレスの任意の位置を用いて
生成することが出来る回路を有する情報処理装置。5. An information processing apparatus having a circuit capable of generating an instruction level setting using an arbitrary position of an address by a built-in register or a substitute thereof.
を内蔵レジスタまたはそれに代わるものにより設定する
ことが可能な情報処理装置。6. An information processing apparatus capable of setting whether to use a data protection function or not by using a built-in register or a substitute thereof.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP7319989A JPH09160831A (en) | 1995-12-08 | 1995-12-08 | Information processing device |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP7319989A JPH09160831A (en) | 1995-12-08 | 1995-12-08 | Information processing device |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| JPH09160831A true JPH09160831A (en) | 1997-06-20 |
Family
ID=18116510
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP7319989A Withdrawn JPH09160831A (en) | 1995-12-08 | 1995-12-08 | Information processing device |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JPH09160831A (en) |
Cited By (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6101586A (en) * | 1997-02-14 | 2000-08-08 | Nec Corporation | Memory access control circuit |
| JP2005301949A (en) * | 2004-03-19 | 2005-10-27 | Toshiba Kyaria Kk | Microcomputer |
| US7260690B2 (en) | 2001-02-06 | 2007-08-21 | Infineon Technologies Ag | Microprocessor circuit for data carriers and method for organizing access to data stored in a memory |
| US7266658B2 (en) | 2002-09-12 | 2007-09-04 | International Business Machines Corporation | System, method, and computer program product for prohibiting unauthorized access to protected memory regions |
| US9305183B2 (en) | 2000-06-30 | 2016-04-05 | Intel Corporation | Method and apparatus for secure execution using a secure memory partition |
-
1995
- 1995-12-08 JP JP7319989A patent/JPH09160831A/en not_active Withdrawn
Cited By (12)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US6101586A (en) * | 1997-02-14 | 2000-08-08 | Nec Corporation | Memory access control circuit |
| US9305183B2 (en) | 2000-06-30 | 2016-04-05 | Intel Corporation | Method and apparatus for secure execution using a secure memory partition |
| US9323954B2 (en) | 2000-06-30 | 2016-04-26 | Intel Corporation | Method and apparatus for secure execution using a secure memory partition |
| US9507963B2 (en) | 2000-06-30 | 2016-11-29 | Intel Corporation | Method and apparatus for secure execution using a secure memory partition |
| US9507962B2 (en) | 2000-06-30 | 2016-11-29 | Intel Corporation | Method and apparatus for secure execution using a secure memory partition |
| US9547779B2 (en) | 2000-06-30 | 2017-01-17 | Intel Corporation | Method and apparatus for secure execution using a secure memory partition |
| US9619672B2 (en) | 2000-06-30 | 2017-04-11 | Intel Corporation | Method and apparatus for secure execution using a secure memory partition |
| US9971909B2 (en) | 2000-06-30 | 2018-05-15 | Intel Corporation | Method and apparatus for secure execution using a secure memory partition |
| US10572689B2 (en) | 2000-06-30 | 2020-02-25 | Intel Corporation | Method and apparatus for secure execution using a secure memory partition |
| US7260690B2 (en) | 2001-02-06 | 2007-08-21 | Infineon Technologies Ag | Microprocessor circuit for data carriers and method for organizing access to data stored in a memory |
| US7266658B2 (en) | 2002-09-12 | 2007-09-04 | International Business Machines Corporation | System, method, and computer program product for prohibiting unauthorized access to protected memory regions |
| JP2005301949A (en) * | 2004-03-19 | 2005-10-27 | Toshiba Kyaria Kk | Microcomputer |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP1495394B1 (en) | A computer system including a secure execution mode - capable cpu and a security services processor connected via a secure communication path | |
| KR100987507B1 (en) | Computer system including a bus bridge for connection to a secure service processor | |
| JP4872001B2 (en) | Memory access safety management | |
| JP4688490B2 (en) | Trusted client using high security kernel in high security execution mode | |
| US7277972B2 (en) | Data processing system with peripheral access protection and method therefor | |
| US7434264B2 (en) | Data processing system with peripheral access protection and method therefor | |
| US5680581A (en) | Microcomputer having a read protection circuit to secure the contents of an internal memory | |
| JP4945053B2 (en) | Semiconductor device, bus interface device, and computer system | |
| US20040221173A1 (en) | Method and apparatus for endianness control in a data processing system | |
| JP2005512228A (en) | System and method for controlling device access to memory providing enhanced memory access security | |
| US5276884A (en) | Controlling the initiation of logical systems in a data processing system with logical processor facility | |
| JP2001005726A (en) | Memory address space expanding device and storage medium stored with program | |
| KR100972635B1 (en) | Systems and methods for controlling device-to-device access within a computer system | |
| JPH09160831A (en) | Information processing device | |
| US6119191A (en) | Performing PCI access cycles through PCI bridge hub routing | |
| US20050081015A1 (en) | Method and apparatus for adapting write instructions for an expansion bus | |
| RU2005115088A (en) | MEMORY ACCESS MANAGEMENT | |
| JP2007264679A (en) | Access control apparatus and access control method | |
| JPS6240555A (en) | Prefetch control system | |
| JPH10143436A (en) | Security control device | |
| JPH0363854A (en) | Data protective circuit | |
| JPH02238547A (en) | Interruption control system | |
| JPS58109950A (en) | Hidden memory access control circuit | |
| JPS63752A (en) | Memory protection system | |
| JPS60246450A (en) | Memory protecting device |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20030304 |