JP2003167783A - Memory protect control device - Google Patents

Memory protect control device

Info

Publication number
JP2003167783A
JP2003167783A JP2001365878A JP2001365878A JP2003167783A JP 2003167783 A JP2003167783 A JP 2003167783A JP 2001365878 A JP2001365878 A JP 2001365878A JP 2001365878 A JP2001365878 A JP 2001365878A JP 2003167783 A JP2003167783 A JP 2003167783A
Authority
JP
Japan
Prior art keywords
memory
cache
access
microcomputer
write
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
JP2001365878A
Other languages
Japanese (ja)
Inventor
Daisuke Hosoi
大佐 細井
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.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial 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 Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2001365878A priority Critical patent/JP2003167783A/en
Publication of JP2003167783A publication Critical patent/JP2003167783A/en
Pending legal-status Critical Current

Links

Abstract

<P>PROBLEM TO BE SOLVED: To solve the problems in a conventional memory protect control device that it requires the set to a write through mode because a memory protect function cannot be often realized in the use of a cache in a write back mode, which causes a reduction in memory access speed and the specification limitation for a system to a set designer. <P>SOLUTION: This device comprises a memory control part having a protect function capable of monitoring and protecting the memory access not only between a microcomputer part and a memory but also between a CPU part and the cache within the microcomputer. According to such a structure, the memory protect function can be realized even in the use of the cache. Further, since the write back mode can be used, compared with a conventional system only usable in the write-through mode, the access speed can be improved. <P>COPYRIGHT: (C)2003,JPO

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【発明の属する技術分野】本発明は、半導体集積回路に
おけるメモリ制御部に関し、特に、メモリプロテクト制
御装置に関するものである。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a memory control unit in a semiconductor integrated circuit, and more particularly to a memory protect control device.

【0002】[0002]

【従来の技術】従来、この種の装置として、アクセス禁
止領域とアクセスサイクルとを設定可能なメモリプロテ
クト機能を有したメモリ制御部により、マイコン部−メ
モリ間におけるアドレスバス、及びチップセレクト、リ
ード、ライト等の制御信号を監視し、不正メモリアクセ
スに対するメモリ保護を実現している装置がある。
2. Description of the Related Art Conventionally, as a device of this type, an address bus between a microcomputer unit and a memory, a chip select, a read, There is a device that monitors a control signal such as a write and realizes memory protection against unauthorized memory access.

【0003】図3は従来のメモリプロテクト制御装置の
構成を示すブロック図である。CPU部301、割込み
制御部302、キャッシュ303を含むマイコン部30
4と、あるメモリ空間へのアクセスを監視および防止
し、マイコン部304に対する通知信号307を出力し
割込みを発生させることが可能なプロテクト機能を備え
たメモリ制御部305、およびメモリ306から構成さ
れるシステムである。
FIG. 3 is a block diagram showing the configuration of a conventional memory protect control device. A microcomputer unit 30 including a CPU unit 301, an interrupt control unit 302, and a cache 303
4, a memory control unit 305 having a protect function capable of monitoring and preventing access to a certain memory space, outputting a notification signal 307 to the microcomputer unit 304 and generating an interrupt, and a memory 306. System.

【0004】次に動作について説明する。CPU部30
1よりプロテクト条件を満たした不正メモリアクセスが
発生した場合、メモリ制御部305がそのアクセスを停
止させると同時に、マイコン部304へ不正メモリアク
セスを通知する通知信号307を出力し割込みを発生さ
せる。
Next, the operation will be described. CPU unit 30
When an illegal memory access satisfying the protection condition occurs from 1, the memory control unit 305 stops the access and simultaneously outputs a notification signal 307 for notifying the illegal memory access to the microcomputer unit 304 to generate an interrupt.

【0005】[0005]

【発明が解決しようとする課題】しかしながら、従来の
装置において、キャッシュを使用してメモリプロテクト
機能を実現する場合、あるメモリ空間にライトアクセス
プロテクトを設定し、かつデータキャッシュをライトバ
ックモードで使用するとする。その後、プロテクト領域
へライトアクセスした場合、キャッシュヒット時および
ミスヒット時ともに、キャッシュ上にあるデータのみを
書き換えてしまう。また同時にマイコン部へ不正メモリ
アクセスを通知する制御信号を出力せず割込みが発生し
ないため、メモリプロテクト機能が実現できないケース
がある。これにより、データキャッシュ使用時にはメモ
リプロテクト機能実現のため、ライトスルーモードに設
定する必要があり、メモリアクセス速度の低下、さらに
はセット設計者にシステムの仕様制限を与えてしまうと
いう問題があった。
However, in the conventional device, when the memory protect function is realized by using the cache, if the write access protect is set in a certain memory space and the data cache is used in the write back mode. To do. After that, when a write access is made to the protected area, only the data in the cache is rewritten at both the cache hit and the miss hit. At the same time, since the control signal for notifying the illegal memory access is not output to the microcomputer unit and the interrupt does not occur, there are cases where the memory protect function cannot be realized. As a result, when the data cache is used, it is necessary to set the write-through mode in order to realize the memory protect function, which causes a problem that the memory access speed is lowered, and the set designer is restricted by the system specifications.

【0006】本発明では前記従来の問題を解決するもの
で、プロテクト設定されているメモリ空間のデータがキ
ャッシュにエントリされていて、かつそのキャッシュへ
のアクセスが発生した場合、そのキャッシュへのアクセ
スを実施せず、またマイコン部に対して不正メモリアク
セスを通知する制御信号を出力し割込みを発生させるこ
とが可能となるため、キャッシュをライトバックモード
で活用してもメモリプロテクト機能を実現できる装置を
提供することを目的とする。
The present invention solves the above-mentioned conventional problem. When data in a protected memory space is entered in a cache and an access to the cache occurs, the cache is accessed. It is possible to implement a memory protect function even if the cache is used in the write-back mode because it is possible to generate a control signal notifying the illegal memory access to the microcomputer unit and generate an interrupt without performing the operation. The purpose is to provide.

【0007】[0007]

【課題を解決するための手段】この目的を達成するため
に、本発明は、CPU部と割込み制御部とキャッシュを
含むマイコン部と、メモリと、さらに前記マイコン部と
メモリ間かつマイコン部内のCPU部とキャッシュ間に
おけるメモリアクセスの監視および保護可能なプロテク
ト機能を備えたメモリ制御部を具備することを特徴とす
る。さらに、前記メモリ制御部は、マイコン部に対し不
正メモリアクセス時に通知する制御信号を出力し、不正
メモリアクセスを発生させた実行プログラムを終了させ
る制御を行うことを特徴とする。
In order to achieve this object, the present invention provides a CPU unit, an interrupt control unit, a microcomputer unit including a cache, a memory, and a CPU between the microcomputer unit and the memory and in the microcomputer unit. And a memory control unit having a protect function capable of monitoring and protecting memory access between the unit and the cache. Further, the memory control unit outputs a control signal for notifying the microcomputer unit at the time of illegal memory access, and performs control to terminate the execution program that caused the illegal memory access.

【0008】この構成によって、プロテクト設定されて
いるキャッシュのエントリデータへCPU部がアクセス
しても、該当のエントリデータへのアクセスを防ぎ、か
つメモリ制御部の通知信号にてマイコン部へ不正メモリ
アクセスを通知し割込みを発生させ、実行プログラムを
終了させることができ、システム・ダウンを防止するこ
とが可能となる。また、これによりキャッシュをライト
バックモードで使用してもメモリプロテクト機能が実現
できるため、従来のライトスルーモードでしか使用でき
なかったシステムと比較して、メモリのアクセス速度を
向上させることができる。
With this configuration, even if the CPU section accesses the entry data of the protected cache, the access to the corresponding entry data is prevented, and an illegal memory access is made to the microcomputer section by the notification signal of the memory control section. Is issued, an interrupt is generated, the execution program can be terminated, and a system down can be prevented. Further, as a result, the memory protect function can be realized even when the cache is used in the write-back mode, so that the memory access speed can be improved as compared with the conventional system which can be used only in the write-through mode.

【0009】[0009]

【発明の実施の形態】本発明の第1の実施形態につい
て、図面を参照して説明する。図1において、CPU部
101、割込み制御部102、キャッシュ103を含む
マイコン部104と、あるメモリ空間へのアクセスを監
視および防止し、マイコン部に対する通知信号107を
出力し割込みを発生させることが可能なプロテクト機能
を備えたメモリ制御部105、さらにメモリ106を具
備する構成となっている。
BEST MODE FOR CARRYING OUT THE INVENTION A first embodiment of the present invention will be described with reference to the drawings. In FIG. 1, a CPU unit 101, an interrupt control unit 102, a microcomputer unit 104 including a cache 103 and an access to a certain memory space can be monitored and prevented, and a notification signal 107 to the microcomputer unit can be output to generate an interrupt. A memory control unit 105 having a different protection function and a memory 106 are further provided.

【0010】以上のように構成された本実施形態のメモ
リプロテクト制御装置について、以下、動作を説明す
る。CPU部101よりアクセス禁止領域とアクセスサ
イクルのプロテクト設定条件を満たした不正メモリアク
セスが発生した場合、メモリ制御部105がそのアクセ
スを停止させる。アクセスを停止する対象メモリとして
は、マイコン部104から見た外部メモリ106はもち
ろん、マイコン部104内部のキャッシュ103に対し
てもアクセス停止可能である。プロテクト設定されてい
るメモリ空間のデータがキャッシュ103にエントリさ
れていて、かつそのキャッシュ103上のプロテクトデ
ータへのアクセスが発生した場合、そのキャッシュ10
3上のプロテクトデータへのアクセスを停止することが
できる。メモリアクセスの停止方法としては、CPU部
101からのアドレス、リード、ライトの制御信号を出
力させないことで実現する。
The operation of the memory protect control device of this embodiment having the above-described structure will be described below. When the CPU section 101 makes an illegal memory access that satisfies the protection setting conditions of the access prohibited area and the access cycle, the memory control section 105 stops the access. As a target memory whose access is stopped, not only the external memory 106 seen from the microcomputer unit 104 but also the cache 103 inside the microcomputer unit 104 can be stopped. If the data in the protected memory space is entered in the cache 103 and the protected data in the cache 103 is accessed, the cache 10
It is possible to stop access to the protected data on the No.3. A method of stopping the memory access is realized by not outputting the address, read, and write control signals from the CPU unit 101.

【0011】本発明の第2の実施形態について説明す
る。構成については、図1のメモリプロテクト制御装置
と同様である。動作については、図1および図2を参照
して説明する。図1のメモリ制御部105において、不
正メモリアクセスが発生した際、前記のメモリアクセス
停止と同時に、マイコン部へ不正メモリアクセスを通知
するために通知信号107、例えばノンマスカブル割込
み(NMI)信号を出力しNMIを発生させる。メモリ
106には、不正メモリアクセスを発生させたプログラ
ムとそのプログラムの実行を終了させるプログラム、例
えばNMI処理を記憶している。NMI処理では、図2
のフロー図のように、NMI要因判定(202)を行
い、不正メモリアクセスで発生したNMIであれば、不
正メモリアクセスを発生させた実行プログラムを終了
(203)する。それ以外は、他の要因用のNMI処理
(204)を実行しNMI処理を終了(205)する。
A second embodiment of the present invention will be described. The configuration is the same as that of the memory protect control device of FIG. The operation will be described with reference to FIGS. 1 and 2. When an illegal memory access occurs, the memory control unit 105 of FIG. 1 outputs a notification signal 107, for example, a non-maskable interrupt (NMI) signal, to notify the illegal memory access to the microcomputer unit at the same time as the above memory access stop. Generate NMI. The memory 106 stores a program that has caused an illegal memory access and a program that terminates the execution of the program, such as an NMI process. In NMI processing,
As shown in the flowchart of FIG. 5, the NMI factor determination (202) is performed, and if it is the NMI generated by the illegal memory access, the execution program that has caused the illegal memory access is ended (203). Other than that, the NMI processing for other factors (204) is executed and the NMI processing is ended (205).

【0012】[0012]

【発明の効果】以上説明したように、本発明によれば、
不正メモリアクセスによるシステム・ダウンの防止、ま
た従来、ライトスルーモードでしか使用できなかったシ
ステムにおいて、ライトバックモードでも使用可能とし
メモリのアクセス速度を向上させるために、ライトバッ
クモードを使用したキャッシュのメモリプロテクト制御
において、プロテクト設定されているキャッシュのエン
トリデータへCPU部がアクセスしても、該当のエント
リデータへのアクセスを防ぎ、かつメモリ制御部の通知
信号にてマイコン部へ不正メモリアクセスを通知し割込
みを発生させ、実行プログラムを終了させることが可能
となる。
As described above, according to the present invention,
In order to prevent system down due to illegal memory access, and to improve the memory access speed by enabling write-back mode in a system that was previously only available in write-through mode, the cache using write-back mode can be used. In the memory protection control, even if the CPU section accesses the entry data of the protected cache, the corresponding entry data is prevented from being accessed and the notification signal of the memory control section notifies the microcomputer section of the illegal memory access. Then, it becomes possible to generate an interrupt and terminate the execution program.

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

【図1】本発明の第1の実施形態に係るメモリプロテク
ト制御装置の構成を示すブロック図
FIG. 1 is a block diagram showing a configuration of a memory protect control device according to a first embodiment of the present invention.

【図2】本発明の第2の実施形態に係るメモリプロテク
ト制御装置の動作を説明するためのフロー図
FIG. 2 is a flowchart for explaining the operation of the memory protect control device according to the second embodiment of the present invention.

【図3】従来のメモリプロテクト制御装置の構成を示す
ブロック図
FIG. 3 is a block diagram showing a configuration of a conventional memory protection control device.

【符号の説明】[Explanation of symbols]

101 CPU部 102 割込み制御部 103 キャッシュ 104 マイコン部 105 メモリ制御部 106 メモリ 107 通知信号 201 NMI処理開始 202 割込み要因判定処理 203 不正メモリアクセス発生プログラム終了処理 204 不正メモリアクセス以外の要因のNMI処理 205 NMI処理終了 301 CPU部 302 割込み制御部 303 キャッシュ 304 マイコン部 305 メモリ制御部 306 メモリ 307 通知信号 101 CPU section 102 interrupt control unit 103 cache 104 Microcomputer section 105 memory control unit 106 memory 107 Notification signal 201 NMI processing start 202 Interrupt factor judgment processing 203 Illegal memory access generation program termination processing 204 NMI processing other than illegal memory access 205 NMI processing end 301 CPU section 302 Interrupt control unit 303 cache 304 Microcomputer part 305 Memory controller 306 memory 307 Notification signal

Claims (2)

【特許請求の範囲】[Claims] 【請求項1】CPU部と割込み制御部とキャッシュを含
むマイコン部と、メモリと、さらに前記マイコン部とメ
モリ間かつ前記マイコン部内のCPU部とキャッシュ間
におけるメモリアクセスの監視および保護可能なプロテ
クト機能を備えたメモリ制御部を具備することを特徴と
するメモリプロテクト制御装置。
1. A protect function capable of monitoring and protecting memory access between a CPU section, an interrupt control section, a microcomputer including a cache, a memory, and between the microcomputer section and the memory and between the CPU section and the cache in the microcomputer section. A memory protection control device, comprising: a memory control unit having:
【請求項2】前記メモリ制御部において、マイコン部に
対し不正メモリアクセス時に通知する制御信号を有し、
不正メモリアクセスを発生させた実行プログラムを終了
させる制御を行うことを特徴とする請求項1記載のメモ
リプロテクト制御装置。
2. The memory control unit has a control signal for notifying an illegal memory access to the microcomputer unit,
2. The memory protection control device according to claim 1, wherein control is performed to terminate an execution program that has caused an illegal memory access.
JP2001365878A 2001-11-30 2001-11-30 Memory protect control device Pending JP2003167783A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001365878A JP2003167783A (en) 2001-11-30 2001-11-30 Memory protect control device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001365878A JP2003167783A (en) 2001-11-30 2001-11-30 Memory protect control device

Publications (1)

Publication Number Publication Date
JP2003167783A true JP2003167783A (en) 2003-06-13

Family

ID=19175854

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001365878A Pending JP2003167783A (en) 2001-11-30 2001-11-30 Memory protect control device

Country Status (1)

Country Link
JP (1) JP2003167783A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012160760A1 (en) * 2011-05-25 2012-11-29 パナソニック株式会社 Information processing device and information processing method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2012160760A1 (en) * 2011-05-25 2012-11-29 パナソニック株式会社 Information processing device and information processing method
US9158924B2 (en) 2011-05-25 2015-10-13 Panasonic Intellectual Property Management Co., Ltd. Information processing apparatus and information processing method

Similar Documents

Publication Publication Date Title
US10949571B2 (en) Method and system for preventing unauthorized processor mode switches
US20210141871A1 (en) Method and system of verifying proper execution of a secure mode entry sequence
EP1085399B1 (en) Software-based temperature controller circuit in an electronic apparatus
US10983924B2 (en) Information processing device and processor
US20070067826A1 (en) Method and system for preventing unsecure memory accesses
US20060004964A1 (en) Method and system of ensuring integrity of a secure mode entry sequence
US20070180269A1 (en) I/O address translation blocking in a secure system during power-on-reset
US7523229B2 (en) Memory protection during direct memory access
JP2008276778A (en) Reducing information leakage between processes sharing cache
JP2009187223A (en) Processor, electronic equipment, interrupt control method, and interrupt control program
JPH11134258A (en) Method and device for providing access protection in integrated circuit
JP2003167783A (en) Memory protect control device
JP2007052481A (en) Lsi for ic card
JPH04130551A (en) Cache control method
CN110502933B (en) Method and system for realizing soft and hard cooperative timer capable of resisting cache attack based on flush operation
EP1862908B9 (en) Integrated circuit arrangement, a method for monitoring access requests to an integrated circuit arrangement component of an integrated circuit arrangement and a computer program product
WO2023119652A1 (en) Electronic control device and access control method
JP2010134572A (en) Device and method for achieving security
US20040240307A1 (en) Semiconductor device, semiconductor circuit, electronic equipment, and method of controlling clock-supply
JP2613986B2 (en) Information processing device
JPH08153018A (en) Semiconductor system
JPH02307123A (en) Computer
JPH05143365A (en) Interruption table expansion/protection system
JPH0991210A (en) Microcomputer and motor driver
JP2001022641A (en) Register protecting circuit