JPH01265341A - Memory access controller - Google Patents

Memory access controller

Info

Publication number
JPH01265341A
JPH01265341A JP63093509A JP9350988A JPH01265341A JP H01265341 A JPH01265341 A JP H01265341A JP 63093509 A JP63093509 A JP 63093509A JP 9350988 A JP9350988 A JP 9350988A JP H01265341 A JPH01265341 A JP H01265341A
Authority
JP
Japan
Prior art keywords
task
memory
memory access
microcomputer
address
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
JP63093509A
Other languages
Japanese (ja)
Inventor
Yasuyuki Ito
泰之 伊藤
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP63093509A priority Critical patent/JPH01265341A/en
Publication of JPH01265341A publication Critical patent/JPH01265341A/en
Pending legal-status Critical Current

Links

Landscapes

  • Storage Device Security (AREA)

Abstract

PURPOSE:To improve the reliability of a multi-task system by setting and registering previously the ID task numbers and the address areas to which the tasks can access and stopping immediately the instruction cycle via a CPU with an improper access different from a task ID number. CONSTITUTION:A memory access controller 2 registers the ID numbers for identification of tasks and the accessable address areas for each task at initialization. A dispatcher of an operating system always informs the task ID numbers when the tasks are switched and hereafter always an address bus when a microcomputer 1 gets into a memory cycle. Then an instruction is immediately given to the microcomputer 1 for its interruption as long as the address received from a microprocessor is unaccessable. Such improper accesses are excluded for protection of a memory. Thus a protecting function is secured even for the microcomputer 1 at the memory access in a comparatively simple and inexpensive way.

Description

【発明の詳細な説明】 [発明の目的コ (産業上の利用分野) 本発明はマルチタスクソフトウェア処理を行うマイクロ
コンピュータシステムに係り、そのメモリアクセス時の
保護機能に関するものである。
DETAILED DESCRIPTION OF THE INVENTION [Purpose of the Invention (Field of Industrial Application) The present invention relates to a microcomputer system that performs multitask software processing, and relates to a protection function during memory access in the microcomputer system.

(従来の技術) マルチタスク処理を行うコンピュータシステムでは、特
定のタスクがバグやその他の要因により誤って自分の管
理範囲以外のメモリ領域をアクセスし、特に書き込みを
行うことによって他のタスクに影響を与えたり、あるい
はタスク管理を行うオペレーティングシステムのソフト
ウェアについての重要なパラメータやデータを破壊する
ことによりシステムダウンを引起こすというようなこと
がある。このようなシステムダウンを絶対に避けなけれ
ばならない各扛制御システムの場合には大変重要な問題
である。このためこのようなシステムではタスク、ジョ
ブをメモリ資源を利用する際の基本単位とし、それらが
アクセス可能なメモリ領域を決め、何等かの方法でそれ
以外のメモリ領域のアクセスを排他することが必要とな
る。この様な問題に対して従来は外部的には同等対策を
行わず、システム可動以前のデバッキングの段階で、前
記のようなことが確実に起こらないことを徹底的に検証
するか、あるいはハードウェア的に種々の方法、例えば
メモリ領域ごとに設けたアクセス制御スイッチ等の方法
により対処していた。
(Prior art) In a computer system that performs multitasking processing, it is possible for a specific task to accidentally access a memory area outside its control range due to a bug or other factors, and affect other tasks, especially when writing. This may cause a system downtime by destroying important parameters and data of the operating system software that performs task management. This is a very important problem in the case of various control systems where such system failure must be avoided at all costs. Therefore, in such a system, it is necessary to use tasks and jobs as the basic units when using memory resources, determine the memory areas that they can access, and exclude access to other memory areas by some method. becomes. Conventionally, equivalent countermeasures were not taken externally to deal with such problems, and instead, it was necessary to thoroughly verify that the above-mentioned problems would not occur during the debugging stage before the system was activated, or to implement hardware measures. This problem has been dealt with using various software methods, such as providing an access control switch for each memory area.

また近年16ビツト以上のマイクロコンピュータでは仮
想記憶をサポートするものがあり、このためのMMU 
(メモリ管理ユニット、CPU内蔵のものもある)の内
部にメモリ保護メカニズムを内蔵するものがあり、これ
を利用することもある。
Also, in recent years, some microcomputers with 16 bits or more support virtual memory, and MMU for this purpose.
Some devices have a built-in memory protection mechanism (some have a memory management unit built into the CPU), and this is sometimes used.

(発明が解決しようとする課題) しかるに従来の事前の検証による方法では不意の暴走に
は対処できないことは明かであり、完全にバグを潰すた
めにデバッキングに要する時間が大きくなり、開発工程
において不利であるという問題がある。次にハードウェ
アによる方法ではメモリアクセスのための回路が複雑に
なり、コストの増加、信頼性の低下、他のシステムに応
用が効かない等の問題がある。また、コンピュータのア
ーキテクチュア自身がメモリ保護機能を有するものの応
用では、大半の16−8ビツトマイクロコンピユータで
はサポートされていないので高性能なマイクロコンピュ
ータを利用しなくてもよいシステムでは無理があるとい
った問題がある。
(Problem to be solved by the invention) However, it is clear that the conventional method of prior verification cannot deal with unexpected runaways, and the time required for debugging to completely eliminate bugs increases, making it difficult to solve problems in the development process. The problem is that it is disadvantageous. Next, hardware methods require complicated circuits for memory access, resulting in increased costs, reduced reliability, and inapplicability to other systems. Additionally, although the computer architecture itself has a memory protection function, it is not supported by most 16-8 bit microcomputers, making it difficult to implement in systems that do not require the use of high-performance microcomputers. be.

本発明の目的はどの様なマイクロコンピュータにおいて
も比較的単純に、かつ安価にメモリアクセス時の保護機
能を実現するために、メモリ保護のみを目的として、マ
イクロコンピュータのバス、制御線に接続し、簡単なコ
マンド制御によりタスク別のメモリ保護を実現するメモ
リアクセス制御装置を提供することにある。
The purpose of the present invention is to relatively simply and inexpensively realize a protection function when accessing memory in any microcomputer. An object of the present invention is to provide a memory access control device that realizes task-specific memory protection through simple command control.

[発明の構成] (課題を解決するための手段) 本発明のメモリアクセス制御装置は、マルチタスク処理
を行うマイクロコンピュータシステムにあって、タスク
別のタスクIDナンバとそのタスクがアクセス可能なア
ドレス領域を予め設定登録する手段と、メモリアクセス
時に前記タスクIDナンバを通知するとアドレスバスを
常に監視する手段と、前記タスクIDナンバと異なる不
当なアクセス時には直ちにCPUに命令サイクルを中止
させる手段とからなることに特徴を有する。
[Structure of the Invention] (Means for Solving the Problems) A memory access control device of the present invention is provided in a microcomputer system that performs multi-task processing, and is configured to identify a task ID number for each task and an address area that can be accessed by that task. means for setting and registering the task ID number in advance, means for constantly monitoring the address bus when the task ID number is notified at the time of memory access, and means for immediately causing the CPU to abort the instruction cycle in the event of an illegal access different from the task ID number. It has the following characteristics.

(作用) 本発明のメモリアクセス制御装置によれば、初期時に各
タスク毎にタスクを識別するためのIDナンバとアクセ
ス可能なアドレス領域が登録される。オペレーティング
システムのディスパッチャはタスクのスイッチングを行
う際必ず前記タスクIDナンバを通知すると、その後は
マイクロコンピュータがメモリサイクルに入ったときに
は必ずアドレスバスを監視し、マイクロプロセッサの出
力するアドレスがアクセス可能範囲外なら直ちにマイク
ロコンピュータに命令して中断させ、このような不当ア
クセスを排除してメモリ保護を行う。
(Operation) According to the memory access control device of the present invention, an ID number for identifying the task and an accessible address area are registered for each task at the initial stage. The operating system dispatcher always notifies the task ID number when switching tasks, and thereafter monitors the address bus whenever the microcomputer enters a memory cycle, and if the address output by the microprocessor is outside the accessible range, Immediately instruct the microcomputer to interrupt, eliminate such unauthorized access, and protect the memory.

(実施例) 本発明の一実施例を第1図乃至第4図により説明する。(Example) An embodiment of the present invention will be described with reference to FIGS. 1 to 4.

第2図はメモリアクセス制御装置のブロック図である。FIG. 2 is a block diagram of the memory access control device.

図においてマイクロコンピュータ1はZ80(商品名)
である。メモリアクセス制御装置2にはマイクロコンピ
ュータ1とメモリ3との間にアドレスバス、データバス
がそれぞれ接続されている。4はデコーダであり、5.
6.7.8はORゲートである。メモリアクセス制御装
置2はICであって、どんな形態のものでもよいが、い
ずれにせよシステムロックが必要となるため、外付けの
クロックを作らずCPU用のクロックを使うならマイク
ロプログラミング方式は使用できず、ワイヤドロシック
方式やアレイ方式のASICで構成される。これらシス
テムを制御するそれぞれの制御線はゲートやバッファを
介して、またINT端子はマイクロコンピュータ1のI
NT端子に接続されている。メモリアクセス制御装置2
のWRE信号は同装置2のMWRITE信号とAND処
理を取り、メモリシステムのMWRITE信号としてメ
モリ3に接続される。第2図は単純化されたものであり
実際のシステムでは割り込みコントローラ等種々の周辺
機器が使用されるので実際にはもっと複雑になる。第4
図はアドレスディスクリブタと呼ばれるメモリアクセス
制御装置2に登録されるタスクのアクセス許可情報であ
って、各タスクのIDナンバが付けられコード別、デー
タ別にアクセス可能範囲がそれぞれ設定され登録される
。このアドレスディスクリブタは最大256個登録可能
である。第3図はメモリアクセス制御装置2のレジスタ
構成とコントロールレジスタの内容である。初期設定の
フローは、(1)登録モードにてWRE端子、INT端
子の使用、未使用およびベクタレジスタにベクタをセッ
トする。
In the diagram, microcomputer 1 is Z80 (product name)
It is. An address bus and a data bus are connected to the memory access control device 2 between the microcomputer 1 and the memory 3, respectively. 4 is a decoder; 5.
6.7.8 is an OR gate. The memory access control device 2 is an IC and may be of any type, but in any case, a system lock is required, so if you use the CPU clock without creating an external clock, you cannot use the microprogramming method. First, it is composed of ASIC of wire rossic type or array type. Each control line that controls these systems is connected via gates and buffers, and the INT terminal is connected to the I/O terminal of the microcomputer 1.
Connected to the NT terminal. Memory access control device 2
The WRE signal is ANDed with the MWRITE signal of the device 2 and connected to the memory 3 as the MWRITE signal of the memory system. Although FIG. 2 is a simplified diagram, an actual system would actually be more complex since various peripheral devices such as an interrupt controller are used. Fourth
The figure shows access permission information for tasks registered in the memory access control device 2 called an address disk libter, in which an ID number is attached to each task, and accessible ranges are set and registered for each code and data. A maximum of 256 address discriminators can be registered. FIG. 3 shows the register configuration of the memory access control device 2 and the contents of the control register. The initial setting flow is as follows: (1) In the registration mode, use or unuse the WRE terminal and INT terminal and set a vector in the vector register.

(2)アドレスディスクリブタを全てセットする。(2) Set all address disc libters.

(3)実行モードに移るとなる。(3) Move to execution mode.

次に、上記のように構成される本実施例の作用について
説明する。マルチタスクシステムを制御するオペレーテ
ィングシステムは、タスクのディスバッチの際必ずこれ
から実行するタスクのIDナンバを通知しメモリアクセ
ス制御装置2のレジスタに書き込む。この時点でメモリ
アクセス制御装置2はこのIDナンバのアドレスディス
クリブタを選定し、CPUがメモリサイクルに入った時
には必ずアドレスバスの監視を始める。但し書き込み直
後のフェッチサイクルはすべて無視する。
Next, the operation of this embodiment configured as described above will be explained. The operating system that controls the multitasking system always notifies the ID number of the task to be executed when disbatching the task and writes it into the register of the memory access control device 2. At this point, the memory access control device 2 selects an address discreptor with this ID number, and starts monitoring the address bus whenever the CPU enters a memory cycle. However, all fetch cycles immediately after writing are ignored.

(レジスタの復元、RET命令実行のため)。(For register restoration and RET instruction execution).

アドレス監視のタイミングは、MREAD信号。The address monitoring timing is the MREAD signal.

MWRITE信号、CFETCH信号のいずれかがアク
ティブになり、τ1信号がネガティブの場合である。こ
の時アドレスバスの確定したアドレスがアドレスディス
クリブタの指定するアドレス許可範囲でなければ、メモ
リアクセス制御装置2は直ちにバーストモードに入り、
初期設定時に決められていれば、INT信号、WRE信
号をそれぞれアクティブにする期間は、INT信号は割
り込みが確認されるまで、WRE信号は現在実行中の命
令が終了するまで(次のフェッチがあるまで)となる。
This is the case when either the MWRITE signal or the CFETCH signal becomes active and the τ1 signal is negative. At this time, if the determined address of the address bus is not within the address permission range specified by the address distributor, the memory access control device 2 immediately enters burst mode.
If determined at the time of initial setting, the periods in which the INT signal and WRE signal are active are as follows: INT signal is activated until an interrupt is acknowledged, WRE signal is activated until the currently executed instruction is completed (the next fetch occurs). ).

このようにして不当なアクセスは排除され、タスクごと
のメモリ保護が実現する。
In this way, illegal accesses are eliminated and memory protection for each task is achieved.

このようなメモリアクセス制御装置2を使用すれば、ハ
ードウェア、ソフトウェアとも簡単な構成および手続き
でタスク毎のメモリ保護を実現することが出来る。これ
によりマルチタスクシステムにおいて、コストの増加を
招かず、適用するアプリケーションに最適なマイクロコ
ンピュータで信頼性の高いシステムが構築可能となる。
By using such a memory access control device 2, memory protection for each task can be realized with a simple configuration and procedure for both hardware and software. This makes it possible to construct a highly reliable multitasking system using a microcomputer that is optimal for the application without increasing costs.

尚、本実施例では本装置をシステムの中に組込んで説明
したが、システムの中に組込まずにマイクロプロセッサ
と一対にしたピギーバック(複数のICを実装し、CP
Uのソケットに挿入出来るようにインタフェースを合せ
たもの)としてデパック時のみ使用するようにしても同
様な機能を発揮することが出来る。
In this embodiment, this device has been described as being incorporated into a system, but instead of being incorporated into a system, it can be used as a piggyback device (mounted with multiple ICs and paired with a microprocessor).
The same function can be achieved even if it is used only when depacking (with an interface so that it can be inserted into the U socket).

[発明の効果] 本発明のメモリアクセス制御装置は、マルチタスクシス
テムにおいて不可欠なメモリアクセス保護機能を独自に
提供するものであり、しがも非常に単純なアルゴリズム
でメモリ保護を実現することで、この利用方法は簡単、
単純になるので、コストの増大を招かず、しかも信頼性
の高い完全なマルチタスクシステムを実現することが出
来る。
[Effects of the Invention] The memory access control device of the present invention uniquely provides a memory access protection function that is essential in a multitasking system, and by realizing memory protection using a very simple algorithm, This usage is easy,
Since it is simple, it is possible to realize a complete multitasking system that does not increase costs and is highly reliable.

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

第1図は本発明の一実施例を示すメモリアクセス制御装
置のブロック図、第2図はZ8o(商品名)マイクロコ
ンピュータを用いたメモリアクセス制御装置のブロック
図、第3図はメモリアクセス制御装置のレジスタの構成
図、第4図はアドレスディスクリブタの構成図である。 1・・・CPU。 2・・・メモリアクセス制御装置 3・・・メモリブロック 代理人 弁理士 則 近 憲 佑
Fig. 1 is a block diagram of a memory access control device showing an embodiment of the present invention, Fig. 2 is a block diagram of a memory access control device using a Z8o (product name) microcomputer, and Fig. 3 is a memory access control device. FIG. 4 is a diagram showing the configuration of the address discriminator. 1...CPU. 2...Memory access control device 3...Memory block agent Patent attorney Noriyuki Chika

Claims (1)

【特許請求の範囲】[Claims] マルチタスク処理を行うマイクロコンピュータシステム
にあって、タスク別のタスクIDナンバとそのタスクが
アクセス可能なアドレス領域を予め設定登録する手段と
、メモリアクセス時に前記タスクIDナンバを通知する
とアドレスバスを常に監視する手段と、前記タスクID
ナンバと異なる不当なアクセス時には直ちにCPUに命
令サイクルを中止させる手段とからなることを特徴とす
るメモリアクセス制御装置。
In a microcomputer system that performs multi-task processing, means for presetting and registering a task ID number for each task and an address area accessible by that task, and constantly monitoring an address bus when the task ID number is notified at the time of memory access. and the task ID
1. A memory access control device comprising means for causing a CPU to immediately stop an instruction cycle when there is an illegal access different from the number.
JP63093509A 1988-04-18 1988-04-18 Memory access controller Pending JPH01265341A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63093509A JPH01265341A (en) 1988-04-18 1988-04-18 Memory access controller

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63093509A JPH01265341A (en) 1988-04-18 1988-04-18 Memory access controller

Publications (1)

Publication Number Publication Date
JPH01265341A true JPH01265341A (en) 1989-10-23

Family

ID=14084316

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63093509A Pending JPH01265341A (en) 1988-04-18 1988-04-18 Memory access controller

Country Status (1)

Country Link
JP (1) JPH01265341A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04117541A (en) * 1990-09-07 1992-04-17 Nec Corp Memory controller
JP2009518742A (en) * 2005-12-08 2009-05-07 アギア システムズ インコーポレーテッド Method and apparatus for secure handling of data in a microcontroller
US8713217B2 (en) 2009-04-14 2014-04-29 Nec Corporation Permitting access of slave device from master device based on process ID's

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04117541A (en) * 1990-09-07 1992-04-17 Nec Corp Memory controller
JP2009518742A (en) * 2005-12-08 2009-05-07 アギア システムズ インコーポレーテッド Method and apparatus for secure handling of data in a microcontroller
US8713217B2 (en) 2009-04-14 2014-04-29 Nec Corporation Permitting access of slave device from master device based on process ID's

Similar Documents

Publication Publication Date Title
US5751950A (en) Secure power supply for protecting the shutdown of a computer system
US4875186A (en) Peripheral emulation apparatus
US10223290B2 (en) Processing device with sensitive data access mode
EP0312194B1 (en) Data processor having two modes of operation
EP0382468A2 (en) Power-on password functions for computer system
EP0702297B1 (en) A data processor with breakpoint circuit
US20120144140A1 (en) Memory Protection Unit and a Method for Controlling an Access to a Memory Device
JPH02287635A (en) Debugging peripheral equipment for microcomputer,microprocessor and core processor integrated circuit
JPS6133218B2 (en)
US20210232337A1 (en) Memory-access control
US6141774A (en) Peripheral device with access control
US6105140A (en) Secure power supply
US5390332A (en) Method and apparatus for performing a takeover of a microprocessor
JPH02250110A (en) Dedicated service processor with interchannel communication function
AU5353390A (en) Information processing system emulation apparatus and method
US6968410B2 (en) Multi-threaded processing of system management interrupts
US4758950A (en) Method and apparatus for selectively delaying an interrupt of a coprocessor
US5003468A (en) Guest machine execution control system for virutal machine system
US4914578A (en) Method and apparatus for interrupting a coprocessor
JPH01265341A (en) Memory access controller
EP0575171A2 (en) Enhanced system management method and apparatus
KR100223096B1 (en) Method and apparatus for observing internal memory-mapped registers
JPH02264339A (en) Information processor
JPH01309138A (en) In-circuit emulator
JPS6195464A (en) Data protecting system