[go: up one dir, main page]

JP2016081291A - Access inspection apparatus and information processing system - Google Patents

Access inspection apparatus and information processing system Download PDF

Info

Publication number
JP2016081291A
JP2016081291A JP2014211821A JP2014211821A JP2016081291A JP 2016081291 A JP2016081291 A JP 2016081291A JP 2014211821 A JP2014211821 A JP 2014211821A JP 2014211821 A JP2014211821 A JP 2014211821A JP 2016081291 A JP2016081291 A JP 2016081291A
Authority
JP
Japan
Prior art keywords
access
processor
value
instruction
program counter
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
JP2014211821A
Other languages
Japanese (ja)
Inventor
章彦 白熊
Akihiko Shirakuma
章彦 白熊
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 JP2014211821A priority Critical patent/JP2016081291A/en
Publication of JP2016081291A publication Critical patent/JP2016081291A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

PROBLEM TO BE SOLVED: To prevent an access error due to software, with small-scale circuit configuration.SOLUTION: An access inspection apparatus 5 manages an address value of a target instruction specified as an instruction to be executed in accessing a device 7, as a target address value. The access inspection apparatus 5 receives an address value of the instruction to be executed by a processor 1, as a program counter value, and holds the received program counter value. When the processor executes one of the target instruction and an instruction other than the target instruction, to access the device 7, the access inspection apparatus 5 determines whether the held program counter value coincides with the target address value, and allows the processor 1 to access the device 7 when the program counter value coincides with the target address value, or prohibits the processor 1 from accessing the device 7 when the program counter value does not coincide with the target address value.SELECTED DRAWING: Figure 1

Description

本発明は、プロセッサからデバイスへのアクセスを検査する技術に関する。   The present invention relates to a technique for checking access from a processor to a device.

S/W(Software)の誤りに対する保護機能として、MMU(Memory Management Unit)を用いたメモリ保護装置やS/Wで実現したメモリ保護の技術がある。
しかし、MMUを用いる場合は、OS(Operating System)が必要であり、タスク切替のオーバーヘッドが大きくリアルタイム性が要求されるシステムでは用いることができないという課題がある。
また、S/Wによる実現方法も処理にオーバーヘッドが生じ、同じくリアルタイム性が低下するという課題がある。
As a protection function against an S / W (Software) error, there are a memory protection device using an MMU (Memory Management Unit) and a memory protection technology realized by S / W.
However, when the MMU is used, an OS (Operating System) is required, and there is a problem that it cannot be used in a system in which task switching overhead is large and real-time performance is required.
Also, the realization method by S / W has a problem that overhead occurs in the processing and the real-time property is also lowered.

例えば、特許文献1で示されているコンピューター・システムでは、プロセスID(Identifier)データ通信用のバスを設け、バスマスターがバススレーブのアドレスを指定してデータの読み書きを実施する際に、バスマスターが発行したプロセスIDをバススレーブが受信し、アクセスを許可するプロセスIDであるか判定することにより、OSを用いることなく、またリアルタイム性を確保しながら誤アクセスを防止している。   For example, in the computer system shown in Patent Document 1, a bus for process ID (Identifier) data communication is provided, and when the bus master designates the address of the bus slave and reads and writes data, the bus master By receiving the process ID issued by the bus slave and determining whether it is a process ID allowing access, erroneous access is prevented without using an OS and ensuring real-time performance.

特開2010−250470号公報JP 2010-250470 A

しかしながら、特許文献1の場合、プロセスIDのバス接続の配線リソースが増加し、チップ面積の増大や動作周波数の低下を招くという課題がある。
例えば、プロセスIDが数十必要とされる場合は、6本程度のバス接続が多数の周辺I/O(Input/Output)デバイスに繋がることになる。
However, in the case of Patent Document 1, there is a problem that the wiring resources for the process ID bus connection increase, leading to an increase in chip area and a decrease in operating frequency.
For example, when several tens of process IDs are required, about six bus connections are connected to a large number of peripheral I / O (Input / Output) devices.

この発明は、前記のような課題を解消することを主な目的としており、小規模な回路構成により、S/W起因の誤アクセス発生を防止することを主な目的とする。   The main object of the present invention is to solve the above-mentioned problems, and it is a main object of the present invention to prevent erroneous access due to S / W with a small circuit configuration.

本発明に係るアクセス検査装置は、
プロセッサからデバイスへのアクセスを検査するアクセス検査装置であって、
前記デバイスへのアクセスの際に実行される命令として指定されている対象命令のアドレス値を対象アドレス値として管理する対象アドレス値管理部と、
前記プロセッサが実行しようとする命令のアドレス値を、プログラムカウンタ値として受信し、受信したプログラムカウンタ値を保持するプログラムカウンタ値保持部と、
前記プロセッサが前記対象命令及び前記対象命令以外の命令のいずれかを実行して前記デバイスへのアクセスを行った場合に、前記プログラムカウンタ値保持部のプログラムカウンタ値が前記対象アドレス値管理部の前記対象アドレス値と一致するか否かを判定し、前記プログラムカウンタ値が前記対象アドレス値と一致する場合に、前記プロセッサによる前記デバイスへのアクセスを許可し、前記プログラムカウンタ値が前記対象アドレス値と一致しない場合に、前記プロセッサによる前記デバイスへのアクセスを禁止するアクセス判定部とを有する。
The access inspection apparatus according to the present invention is:
An access inspection device for inspecting access from a processor to a device,
A target address value management unit that manages, as a target address value, an address value of a target instruction that is designated as an instruction executed when accessing the device;
A program counter value holding unit that receives an address value of an instruction to be executed by the processor as a program counter value and holds the received program counter value;
When the processor executes either the target instruction or an instruction other than the target instruction to access the device, the program counter value of the program counter value holding unit is changed to the target address value management unit. It is determined whether or not it matches a target address value, and when the program counter value matches the target address value, the processor is allowed to access the device, and the program counter value and the target address value are And an access determination unit that prohibits access to the device by the processor when they do not match.

本発明では、プログラムカウンタ値が許可アドレス値と一致しない場合に、デバイスへのアクセスを禁止する。
このため、本発明によれば、小規模な回路構成により、S/W異常によるデバイスへの誤アクセスを禁止することができる。
In the present invention, access to the device is prohibited when the program counter value does not match the permitted address value.
Therefore, according to the present invention, erroneous access to a device due to S / W abnormality can be prohibited with a small circuit configuration.

実施の形態1による情報処理システムの構成例を示す概略図である。1 is a schematic diagram illustrating a configuration example of an information processing system according to a first embodiment. 実施の形態1による動作概略を示すフローチャートである。3 is a flowchart showing an outline of operation according to the first embodiment. 実施の形態1による情報処理システムのメモリ空間の一例を示す図である。3 is a diagram illustrating an example of a memory space of the information processing system according to Embodiment 1. FIG. 実施の形態1による周辺I/OのPC値アクセス許可領域の一例を示す図である。6 is a diagram illustrating an example of a PC value access permission area of peripheral I / O according to Embodiment 1. FIG. 実施の形態2による情報処理システムの構成例を示す概略図である。6 is a schematic diagram illustrating a configuration example of an information processing system according to Embodiment 2. FIG. 実施の形態2による動作概略を示すフローチャートである。10 is a flowchart showing an outline of operation according to the second embodiment. 実施の形態3による情報処理システムのメモリ空間の一例を示す図である。FIG. 10 is a diagram illustrating an example of a memory space of an information processing system according to a third embodiment. 実施の形態3による周辺I/OのPC値アクセス許可領域の一例を示す図である。FIG. 10 is a diagram illustrating an example of a PC value access permission area of peripheral I / O according to the third embodiment. 実施の形態1によるアクセス検査装置の構成例を示す概略図である。1 is a schematic diagram illustrating a configuration example of an access inspection apparatus according to Embodiment 1. FIG.

実施の形態1.
本実施の形態及び以降の実施の形態では、小規模な回路、および最小限(1本)のバス配線を用いることで、周辺IOの増減にも柔軟に対応可能な、S/W起因の誤アクセス発生を防止し、誤アクセス発生を検出できる情報処理システムを説明する。
Embodiment 1 FIG.
In this embodiment and the following embodiments, an error caused by S / W that can flexibly cope with increase / decrease in peripheral IO by using a small circuit and a minimum (one) bus wiring. An information processing system capable of preventing occurrence of access and detecting occurrence of erroneous access will be described.

***構成の説明***
図1は、本実施の形態に係る情報処理システム100のブロック図である。
本実施の形態に係る情報処理システムは、プロセッサ1と、アクセス検査装置5が含まれるデバイス6、アクセス検査装置5が含まれるデバイス7、命令取得タイミングパルス信号バス2、アドレスバス3、データバス4で構成される。
プロセッサ1は、例えば、CPU(Central Processing Unit)である。
デバイス6は、例えば、メモリである。
デバイス7は、例えば、周辺I/Oデバイス(以下、単に周辺I/Oともいう)である。
*** Explanation of configuration ***
FIG. 1 is a block diagram of an information processing system 100 according to the present embodiment.
The information processing system according to the present embodiment includes a processor 1, a device 6 including an access inspection device 5, a device 7 including the access inspection device 5, an instruction acquisition timing pulse signal bus 2, an address bus 3, and a data bus 4. Consists of.
The processor 1 is, for example, a CPU (Central Processing Unit).
The device 6 is a memory, for example.
The device 7 is, for example, a peripheral I / O device (hereinafter also simply referred to as a peripheral I / O).

プロセッサ1は、デバイス6又はデバイス7へのアクセスを行う。
プロセッサ1は、デバイス6へのアクセスを行う際には、デバイス6へのアクセスのための命令を実行する。
また、プロセッサ1は、デバイス7へのアクセスを行う際には、デバイス7へのアクセスのための命令を実行する。
プロセッサ1は、命令の実行に先立ち、実行しようとする命令のアドレスをプログラムカウンタ値(以下、PC値ともいう)として、アドレスバス3に出力する。
The processor 1 accesses the device 6 or the device 7.
When accessing the device 6, the processor 1 executes an instruction for accessing the device 6.
Further, when accessing the device 7, the processor 1 executes an instruction for accessing the device 7.
Prior to execution of an instruction, the processor 1 outputs the address of the instruction to be executed to the address bus 3 as a program counter value (hereinafter also referred to as a PC value).

アクセス検査装置5は、プロセッサ1からデバイス6又はデバイス7へのアクセスを検査する。
以下では、代表として、デバイス7に含まれるアクセス検査装置5について説明するが、デバイス6に含まれるアクセス検査装置5も同様である。
アクセス検査装置5は、例えば、図9に示す回路構成を有する。
図9において、対象アドレス値管理部501は、デバイス7へのアクセスの際に実行される命令として指定されている対象命令のアドレス値を対象アドレス値として管理する。
対象アドレス値は、PC値アクセス許可領域ともいう。
PC値保持部502は、プロセッサ1が実行しようとする命令のアドレス値を、プログラムカウンタ値として受信し、受信したプログラムカウンタ値を保持する。
アクセス判定部503は、プロセッサ1が対象命令及び対象命令以外の命令のいずれかを実行してデバイス7へのアクセスを行った場合に、PC値保持部502のプログラムカウンタ値が対象アドレス値管理部501の対象アドレス値と一致するか否かを判定する。
そして、プログラムカウンタ値が対象アドレス値と一致する場合に、アクセス判定部503は、プロセッサ1によるデバイス7へのアクセスを許可する。
一方、プログラムカウンタ値が対象アドレス値と一致しない場合は、アクセス判定部503は、プロセッサ1によるデバイス7へのアクセスを禁止する。
アクセス判定部503は、ライトイネーブル又はリードイネーブルの制御により、デバイス7へのアクセスの許可又は禁止を行う。
The access inspection apparatus 5 inspects access from the processor 1 to the device 6 or the device 7.
Below, the access inspection apparatus 5 included in the device 7 will be described as a representative, but the same applies to the access inspection apparatus 5 included in the device 6.
The access inspection device 5 has, for example, a circuit configuration shown in FIG.
In FIG. 9, the target address value management unit 501 manages the address value of the target instruction specified as an instruction executed when accessing the device 7 as the target address value.
The target address value is also referred to as a PC value access permission area.
The PC value holding unit 502 receives an address value of an instruction to be executed by the processor 1 as a program counter value, and holds the received program counter value.
When the processor 1 executes either the target instruction or an instruction other than the target instruction to access the device 7, the access determination unit 503 displays the program counter value of the PC value holding unit 502 as the target address value management unit. It is determined whether or not it matches the target address value of 501.
When the program counter value matches the target address value, the access determination unit 503 permits the processor 1 to access the device 7.
On the other hand, when the program counter value does not match the target address value, the access determination unit 503 prohibits the processor 1 from accessing the device 7.
The access determination unit 503 permits or prohibits access to the device 7 by controlling write enable or read enable.

命令取得タイミングパルス信号バス2は、プロセッサ1からアクセス検査装置5に、命令取得タイミングパルス信号を出力するためのバスである。
命令取得タイミングパルス信号とは、プロセッサ1からアクセス検査装置5に対してプログラムカウンタ値を出力するタイミングを通知するパルス信号である。
The instruction acquisition timing pulse signal bus 2 is a bus for outputting an instruction acquisition timing pulse signal from the processor 1 to the access inspection device 5.
The instruction acquisition timing pulse signal is a pulse signal for notifying the timing of outputting the program counter value from the processor 1 to the access inspection device 5.

アドレスバス3は、プロセッサ1とアクセス検査装置5の間で、アドレス情報を通信するためのバスである。   The address bus 3 is a bus for communicating address information between the processor 1 and the access checking device 5.

データバス4は、プロセッサ1とアクセス検査装置5の間で、データを通信するためのバスである。   The data bus 4 is a bus for communicating data between the processor 1 and the access checking device 5.

***動作の説明*** *** Explanation of operation ***

次に、本実施の形態に係る情報処理システムの動作例を説明する。
図2は、本実施の形態に係る情報処理システムの動作の概略を示すフローチャートである。
Next, an operation example of the information processing system according to the present embodiment will be described.
FIG. 2 is a flowchart showing an outline of the operation of the information processing system according to the present embodiment.

プログラム実行時に、プログラムを構成する命令を取得する必要があるため、プロセッサ1はその命令の位置を示すアドレス値をPC値としてアドレスバス3に出力する(ステップ102)。
つまり、プロセッサ1は、これから実行しようとする命令のアドレス値をPC値として出力する。
また、プロセッサ1は、同時に命令取得タイミングパルス信号を命令取得タイミングパルス信号バス2に出力する(ステップ102)。
Since it is necessary to acquire an instruction constituting the program when executing the program, the processor 1 outputs an address value indicating the position of the instruction to the address bus 3 as a PC value (step 102).
That is, the processor 1 outputs the address value of the instruction to be executed as a PC value.
At the same time, the processor 1 outputs an instruction acquisition timing pulse signal to the instruction acquisition timing pulse signal bus 2 (step 102).

各アクセス検査装置5(バススレーブ)は、プロセッサ1が出力した命令取得タイミングパルス信号を受信し、受信した命令取得タイミングパルス信号を用いてPC値をアドレスバス3でラッチし、PC値を取得する(ステップ103)。
つまり、アクセス検査装置5内のPC値保持部502がPC値を受信し、受信したPC値を保持する。
Each access inspection device 5 (bus slave) receives the instruction acquisition timing pulse signal output from the processor 1, latches the PC value with the address bus 3 using the received instruction acquisition timing pulse signal, and acquires the PC value. (Step 103).
That is, the PC value holding unit 502 in the access inspection apparatus 5 receives the PC value and holds the received PC value.

プロセッサ1がデバイス6(メモリ)から取得したプログラムをもとに、外部とアクセスする場合を考える。
この時、プロセッサ1はアクセス先アドレスをアドレスバス3に出力する(ステップ104)。
各アクセス検査装置5(バススレーブ)では、アクセス判定部503が、このアドレス値をもとに、自身へのアクセスであるか判定する(ステップ105)。
具体的には、デバイス6内のアクセス検査装置5のアクセス判定部503は、プロセッサ1からのアクセスがデバイス6へのアクセスであるか否かを判定する。
また、デバイス7内のアクセス検査装置5のアクセス判定部503は、プロセッサ1からのアクセスがデバイス7へのアクセスであるか否かを判定する。
Consider a case where the processor 1 accesses the outside based on a program acquired from the device 6 (memory).
At this time, the processor 1 outputs the access destination address to the address bus 3 (step 104).
In each access inspection device 5 (bus slave), the access determination unit 503 determines whether it is an access to itself based on this address value (step 105).
Specifically, the access determination unit 503 of the access inspection apparatus 5 in the device 6 determines whether or not the access from the processor 1 is an access to the device 6.
Further, the access determination unit 503 of the access inspection apparatus 5 in the device 7 determines whether or not the access from the processor 1 is an access to the device 7.

自身へのアクセスでない場合は、そのアクセス検査装置5(バススレーブ)のアクセス判定部503は何も処理しない(ステップ105:NO)。
自身へのアクセスである場合(ステップ105:YES)は、そのアクセス検査装置5(バススレーブ)のアクセス判定部503は、PC値が適切かどうかを判定する(ステップ106)。
つまり、アクセス判定部503は、先にプロセッサ1により出力された命令取得タイミングパルス信号でラッチしたPC値が自身へのアクセスに適切である命令が格納されているアドレス値であるかを、PC値保持部502のPC値アクセス許可領域(対象アドレス値)と照合することにより判定する。
PC値が適切である場合(ステップ106:YES)は、そのアクセス検査装置5(バススレーブ)のアクセス判定部503はプロセッサ1からのアクセスを許可する(ステップ107)。
PC値が適切でない場合(ステップ106:NO)は、そのアクセス検査装置5(バススレーブ)のアクセス判定部503はプロセッサ1からのアクセスを禁止する(ステップ108)。
If it is not an access to itself, the access determination unit 503 of the access checking device 5 (bus slave) does not process anything (step 105: NO).
If the access is to itself (step 105: YES), the access determination unit 503 of the access inspection device 5 (bus slave) determines whether the PC value is appropriate (step 106).
That is, the access determination unit 503 determines whether the PC value latched by the instruction acquisition timing pulse signal output from the processor 1 is an address value at which an instruction appropriate for access to itself is stored. The determination is made by collating with the PC value access permission area (target address value) of the holding unit 502.
If the PC value is appropriate (step 106: YES), the access determination unit 503 of the access checking device 5 (bus slave) permits access from the processor 1 (step 107).
If the PC value is not appropriate (step 106: NO), the access determination unit 503 of the access inspection device 5 (bus slave) prohibits access from the processor 1 (step 108).

図3は、実施の形態1による情報処理システムのメモリ空間の一例を示す図である。
図4は、実施の形態1によるデバイス7(周辺I/O)のアクセス検査装置5が対象アドレス値管理部501で所有するPC値アクセス許可領域の一例を示す図である。
図3と図4によると、デバイス7のアクセス検査装置5の対象アドレス値管理部501が所有するPC値アクセス許可領域が1000〜1003であるため、処理A1からのアクセスである場合のみにアクセスを許可し、それ以外からのアクセスを禁止する。
FIG. 3 is a diagram illustrating an example of a memory space of the information processing system according to the first embodiment.
FIG. 4 is a diagram illustrating an example of a PC value access permission area owned by the target address value management unit 501 in the access inspection device 5 of the device 7 (peripheral I / O) according to the first embodiment.
According to FIGS. 3 and 4, since the PC value access permission area owned by the target address value management unit 501 of the access inspection device 5 of the device 7 is 1000 to 1003, the access is performed only when the access is from the process A1. Permit and prohibit access from others.

つまり、デバイス7(周辺I/O)へのアクセスの際に実行される命令として、処理A1に対応する命令(以下、命令A1という)が指定されている。
メモリ空間のアドレス1000〜1003には、命令A1が格納されている。
デバイス7(周辺I/O)のアクセス検査装置5では、対象アドレス値管理部501において、命令A1のアドレスである、アドレス1000〜1003を記憶している(図4)。
プロセッサ1は、デバイス7(周辺I/O)にアクセスするために、命令A1を実行する必要がある。
命令A1の実行に際して、プロセッサ1は、命令A1が格納されているアドレス1000〜1003をPC値としてアドレスバス3に出力する(図2のステップ102)。
デバイス7(周辺I/O)のアクセス検査装置5と、デバイス6(メモリ)のアクセス検査装置5は、それぞれアドレスバス3からPC値を取得し、PC値保持部502に記憶する(図2のステップ103)。
プロセッサ1は、命令A1を実行して、デバイス7(周辺I/O)のアドレスをアドレスバス3に出力して、デバイス7(周辺I/O)にアクセスする(図2のステップ104、105)。
デバイス7(周辺I/O)のアクセス検査装置5では、アクセス判定部503が、ステップ103で取得したアドレス1000〜1003と図4のアドレス値とを比較し、両者が一致していると判定し、プロセッサ1からのアクセスを許可する(図2のステップ106、ステップ107)。
That is, an instruction corresponding to the process A1 (hereinafter referred to as instruction A1) is designated as an instruction executed when accessing the device 7 (peripheral I / O).
Instruction A1 is stored at addresses 1000 to 1003 in the memory space.
In the access inspection device 5 of the device 7 (peripheral I / O), the target address value management unit 501 stores addresses 1000 to 1003 that are addresses of the instruction A1 (FIG. 4).
The processor 1 needs to execute the instruction A1 in order to access the device 7 (peripheral I / O).
When executing the instruction A1, the processor 1 outputs the addresses 1000 to 1003 in which the instruction A1 is stored as the PC value to the address bus 3 (step 102 in FIG. 2).
The access inspection device 5 of the device 7 (peripheral I / O) and the access inspection device 5 of the device 6 (memory) each acquire a PC value from the address bus 3 and store it in the PC value holding unit 502 (FIG. 2). Step 103).
The processor 1 executes the instruction A1, outputs the address of the device 7 (peripheral I / O) to the address bus 3, and accesses the device 7 (peripheral I / O) (steps 104 and 105 in FIG. 2). .
In the access inspection device 5 of the device 7 (peripheral I / O), the access determination unit 503 compares the addresses 1000 to 1003 acquired in step 103 with the address values shown in FIG. 4 and determines that they match. The access from the processor 1 is permitted (step 106 and step 107 in FIG. 2).

一方、デバイス6(メモリ)にアクセスするために、プロセッサ1が処理B1に対応する命令(以下、命令B1という)を実行する場合は、プロセッサ1は、命令B1が格納されているアドレス2000〜2003をPC値としてアドレスバス3に出力する(図2のステップ102)。
デバイス7(周辺I/O)のアクセス検査装置5と、デバイス6(メモリ)のアクセス検査装置5は、それぞれアドレスバス3からPC値を取得し、PC値保持部502に記憶する(図2のステップ103)。
プロセッサ1は、本来であれば命令B1を実行してデバイス6(メモリ)にアクセスするが、S/Wエラーにより命令B1の実行によりデバイス7(周辺I/O)にアクセスしてしまった場合(図2のステップ104、105)に、デバイス7(周辺I/O)のアクセス検査装置5では、アクセス判定部503が、ステップ103で取得したアドレス2000〜2003と図4のアドレス値とを比較し、両者が一致していないと判定し、プロセッサ1からのアクセスを禁止する(図2のステップ106、ステップ108)。
On the other hand, when the processor 1 executes an instruction corresponding to the process B1 (hereinafter referred to as instruction B1) in order to access the device 6 (memory), the processor 1 has an address 2000 to 2003 where the instruction B1 is stored. Is output to the address bus 3 as a PC value (step 102 in FIG. 2).
The access inspection device 5 of the device 7 (peripheral I / O) and the access inspection device 5 of the device 6 (memory) each acquire a PC value from the address bus 3 and store it in the PC value holding unit 502 (FIG. 2). Step 103).
The processor 1 originally executes the instruction B1 to access the device 6 (memory). However, when the processor 1 accesses the device 7 (peripheral I / O) by executing the instruction B1 due to an S / W error ( In steps 104 and 105 in FIG. 2, in the access inspection apparatus 5 of the device 7 (peripheral I / O), the access determination unit 503 compares the addresses 2000 to 2003 acquired in step 103 with the address values in FIG. Then, it is determined that they do not match, and access from the processor 1 is prohibited (step 106 and step 108 in FIG. 2).

***効果の説明***
このように、本実施の形態では、アクセス検査装置5が命令取得タイミングパルス信号を用いてPC値を取得し、プロセッサ1からアクセスがあった際にPC値が自身へのアクセスに適切であるプログラムが格納されているアドレス値であるか判定し、適切でない際はアクセスを禁止し、適切である場合のみアクセスを許可する。
これにより、簡易な構成にて、S/Wの誤りに起因する誤アクセスを防止することができる。
また、誤アクセスが発生した際に、アクセス検査装置にエラー情報として格納されているPC値を参照することによりS/Wの誤りを特定することができる。
*** Explanation of effects ***
As described above, in the present embodiment, the access inspection device 5 acquires a PC value using the instruction acquisition timing pulse signal, and when the processor 1 accesses the program, the PC value is appropriate for access to itself. Is not stored, the access is prohibited when it is not appropriate, and the access is permitted only when it is appropriate.
Thereby, it is possible to prevent erroneous access due to an S / W error with a simple configuration.
Further, when an erroneous access occurs, an S / W error can be identified by referring to a PC value stored as error information in the access inspection apparatus.

以上、本実施の形態に係るデバイス6及びデバイス7は、
プロセッサ1がデバイス6から命令を取得する際のタイミングを伝達する命令取得タイミングパルス信号を用いてアドレスバス3をラッチすることによりPC値を取得し、
プログラムからアクセスされた際に、
先に取得したPC値が自身へのアクセスに適切であるプログラムが格納されているアドレス値であるかを自身が所有している1つのPC値アクセス許可領域と照合することにより判定し、
適切でない際はアクセスを禁止し、
適切である場合のみアクセスを許可するアクセス検査装置5を有していることを説明した。
また、本実施の形態に係るプロセッサ1は、デバイス6に記憶された命令列を取得し、命令に従いデータ処理を行い、アドレスバス3は、プロセッサ1がデータの送受信を行う際に、アクセス先を指定するために用いられ、データバス4は、プロセッサ1が送受信するデータを転送するために用いられる。
As described above, the device 6 and the device 7 according to the present embodiment are
PC value is acquired by latching the address bus 3 using an instruction acquisition timing pulse signal that conveys the timing when the processor 1 acquires an instruction from the device 6;
When accessed from the program,
It is determined by checking whether or not the previously obtained PC value is an address value in which a program suitable for access to itself is stored, by comparing with one PC value access permission area owned by itself,
Access is prohibited when it is not appropriate,
It has been described that the access checking device 5 that permits access only when appropriate is provided.
The processor 1 according to the present embodiment acquires an instruction sequence stored in the device 6 and performs data processing according to the instruction. The address bus 3 determines an access destination when the processor 1 transmits and receives data. The data bus 4 is used for transferring data transmitted and received by the processor 1.

実施の形態2.
***構成の説明***
以下、実施の形態2に係る情報処理システムを図5と図6に基づいて説明する。
図5は、実施の形態2による情報処理システムのブロック図である。
図5において、プロセッサ8はプロセッサ1と同じであり、命令取得タイミングパルス信号バス9は命令取得タイミングパルス信号バス2と同じであり、アドレスバス10はアドレスバス3と同じであり、データバス11はデータバス4と同じである。
アクセス検査装置12はアクセス検査装置5と同じであり、デバイス13はデバイス6と同じであり、デバイス14はデバイス7と同じである。
実施の形態2に係る情報処理システムでは、実施の形態1に係る情報処理システムと比べて、割込み発生装置15が追加されている。
割込み発生装置15は、アクセス検査装置12からデバイス13又はデバイス14への異常アクセスが通知された場合に、プロセッサ8への割込みを発生させて、デバイス13又はデバイス14への異常アクセスをプロセッサ8に通知する。
アクセス検査装置12の内部構成は、図9に示す通りである。
以下では、主に実施の形態1との差分を説明する。
以下で説明していない事項は、実施の形態1と同じである。
Embodiment 2. FIG.
*** Explanation of configuration ***
Hereinafter, an information processing system according to the second embodiment will be described with reference to FIGS.
FIG. 5 is a block diagram of an information processing system according to the second embodiment.
In FIG. 5, the processor 8 is the same as the processor 1, the instruction acquisition timing pulse signal bus 9 is the same as the instruction acquisition timing pulse signal bus 2, the address bus 10 is the same as the address bus 3, and the data bus 11 is The same as the data bus 4.
The access inspection device 12 is the same as the access inspection device 5, the device 13 is the same as the device 6, and the device 14 is the same as the device 7.
In the information processing system according to the second embodiment, an interrupt generation device 15 is added as compared with the information processing system according to the first embodiment.
The interrupt generation device 15 generates an interrupt to the processor 8 when an abnormal access to the device 13 or the device 14 is notified from the access inspection device 12, and the processor 8 is notified of the abnormal access to the device 13 or the device 14. Notice.
The internal configuration of the access inspection device 12 is as shown in FIG.
Hereinafter, differences from the first embodiment will be mainly described.
Matters not described below are the same as those in the first embodiment.

***動作の説明***
次に、本実施の形態に係る情報処理システムの動作を説明する。
図6は、本実施の形態に係る情報処理システムの動作概略を示すフローチャートである。
*** Explanation of operation ***
Next, the operation of the information processing system according to this embodiment will be described.
FIG. 6 is a flowchart showing an outline of the operation of the information processing system according to the present embodiment.

ステップ202〜ステップ205、ステップ206及びステップ207の動作は図2に示すフローチャートのステップ102〜ステップ105、ステップ106及びステップ107と同じであり、説明を省略する。   The operations of Step 202 to Step 205, Step 206, and Step 207 are the same as Step 102 to Step 105, Step 106, and Step 107 of the flowchart shown in FIG.

PC値が適切でない場合(ステップ206:NO)に、そのアクセス検査装置12(バススレーブ)のアクセス判定部503は、プロセッサ8からのアクセスを許可せず、取得したPC値を割込み発生装置15へ出力することにより異常アクセスを通知する (ステップ208)。
割込み発生装置15は、プロセッサ8へ異常検出割り込みを発生し、異常アクセスの発生をプロセッサ8に通知する(ステップ209)。
When the PC value is not appropriate (step 206: NO), the access determination unit 503 of the access check device 12 (bus slave) does not permit access from the processor 8 and sends the acquired PC value to the interrupt generation device 15. The abnormal access is notified by outputting (step 208).
The interrupt generation device 15 generates an abnormality detection interrupt to the processor 8 and notifies the processor 8 of the occurrence of abnormal access (step 209).

***効果の説明***
このように、本実施の形態では、アクセス検査装置12から異常アクセスが通知された際に、割込み発生装置15がプロセッサ8へ異常検出割り込みを発生し、誤アクセス発生をプロセッサ8に通知することができる。
*** Explanation of effects ***
As described above, in this embodiment, when an abnormal access is notified from the access inspection device 12, the interrupt generation device 15 generates an abnormality detection interrupt to the processor 8 and notifies the processor 8 of the occurrence of an erroneous access. it can.

実施の形態3.
実施の形態3では、実施の形態1に係る情報処理システム又は実施の形態2に係る情報処理システムにおいて、アクセス検査装置が所有するPC値アクセス許可領域(対象アドレス値)が複数である例を説明する。
以下では、主に実施の形態1及び実施の形態2との差分を説明する。
以下で説明していない事項は、実施の形態1又は実施の形態2と同じである。
Embodiment 3 FIG.
In the third embodiment, in the information processing system according to the first embodiment or the information processing system according to the second embodiment, an example in which there are a plurality of PC value access permission areas (target address values) owned by the access inspection device will be described. To do.
Hereinafter, differences from the first embodiment and the second embodiment will be mainly described.
Matters not described below are the same as those in the first or second embodiment.

図7は、実施の形態3による情報処理システムのメモリ空間の一例を示す。
図8は、実施の形態3によるアクセス検査装置が所有するPC値アクセス許可領域の一例を示す図である。
図7では、処理A1に対応する命令(以下、命令A1)のアドレス値は、アドレス1000〜1003であり、処理A2に対応する命令(以下、命令A2)のアドレス値は、アドレス3000〜3003である。
図8によれば、対象アドレス値管理部501には、PC値アクセス許可領域(対象アドレス値)として、アドレス1000〜1003、アドレス3000〜3001が記憶されている。
このため、本実施の形態に係るアクセス判定部503は、命令A1と命令A2に基づくアクセスを許可し、それ以外の命令に基づくアクセスを禁止する。
FIG. 7 shows an example of a memory space of the information processing system according to the third embodiment.
FIG. 8 is a diagram illustrating an example of a PC value access permission area owned by the access checking apparatus according to the third embodiment.
In FIG. 7, the address value of the instruction corresponding to the process A1 (hereinafter referred to as instruction A1) is addresses 1000 to 1003, and the address value of the instruction corresponding to the process A2 (hereinafter referred to as instruction A2) is as address 3000 to 3003. is there.
According to FIG. 8, the target address value management unit 501 stores addresses 1000 to 1003 and addresses 3000 to 3001 as PC value access permission areas (target address values).
For this reason, the access determination unit 503 according to the present embodiment permits access based on the instructions A1 and A2, and prohibits access based on other instructions.

このように、本実施の形態に係るアクセス検査装置では、対象アドレス値管理部501は、2つ以上の対象命令の2つ以上の対象アドレス値を管理している。
また、アクセス判定部503は、PC値が2つ以上の対象アドレス値のいずれかに一致するか否かを判定し、PC値がいずれかの対象アドレス値と一致する場合に、プロセッサによるデバイスへのアクセスを許可し、PC値がいずれの対象アドレス値とも一致しない場合に、プロセッサによるデバイスへのアクセスを禁止する。
As described above, in the access inspection apparatus according to this embodiment, the target address value management unit 501 manages two or more target address values of two or more target instructions.
Further, the access determination unit 503 determines whether the PC value matches one of two or more target address values, and when the PC value matches any one of the target address values, the access determination unit 503 transfers the device to the device. Access to the device is prohibited when the PC value does not match any of the target address values.

このように、本実施の形態によれば、アクセス検査装置が複数のPC値アクセス許可領域を有することにより、複数の命令に対してアクセスが適切であるか判定することができる。   Thus, according to the present embodiment, it is possible to determine whether or not access is appropriate for a plurality of instructions by having the plurality of PC value access permission areas.

実施の形態4.
実施の形態4に係る情報処理システムでは、アクセス検査装置が所有するPC値アクセス許可領域がプログラマブルに構成されている。
つまり、本実施の形態では、PC値保持部502で管理されている対象アドレス値を変更可能である。
対象アドレス値がプログラマブルである点以外は、実施の形態1〜3に示したものと同様である。
Embodiment 4 FIG.
In the information processing system according to the fourth embodiment, the PC value access permission area possessed by the access inspection device is programmable.
That is, in the present embodiment, the target address value managed by the PC value holding unit 502 can be changed.
Except that the target address value is programmable, it is the same as that shown in the first to third embodiments.

本実施の形態によれば、PC値アクセス許可領域をプログラマブルにすることにより、周辺I/Oやメモリ空間の増減があっても、各アクセス検査装置は、増減に対応してアクセス許否の判定をすることができる。
また、プロセッサがデバイスにアクセスする際に実行する命令を変更しても、各アクセス検査装置は、変更に対応してアクセス許否の判定をすることができる。
According to the present embodiment, by making the PC value access permission area programmable, each access checking device determines whether access is permitted or not according to the increase or decrease even if the peripheral I / O or the memory space increases or decreases. can do.
Further, even if the instruction executed when the processor accesses the device is changed, each access checking device can determine whether access is permitted or not in accordance with the change.

以上、本発明の実施の形態について説明したが、これらの実施の形態のうち、2つ以上を組み合わせて実施しても構わない。
あるいは、これらの実施の形態のうち、1つを部分的に実施しても構わない。
あるいは、これらの実施の形態のうち、2つ以上を部分的に組み合わせて実施しても構わない。
なお、本発明は、これらの実施の形態に限定されるものではなく、必要に応じて種々の変更が可能である。
As mentioned above, although embodiment of this invention was described, you may implement in combination of 2 or more among these embodiment.
Alternatively, one of these embodiments may be partially implemented.
Alternatively, two or more of these embodiments may be partially combined.
In addition, this invention is not limited to these embodiment, A various change is possible as needed.

1 プロセッサ、2 命令取得タイミングパルス信号バス、3 アドレスバス、4 データバス、5 アクセス検査装置、6 デバイス、7 デバイス、8 プロセッサ、9 命令取得タイミングパルス信号バス、10 アドレスバス、11 データバス、12 アクセス検査装置、13 デバイス、14 デバイス、15 割込み発生装置、100 情報処理システム、501 対象アドレス値管理部、502 PC値保持部、503 アクセス判定部。
1 processor, 2 instruction acquisition timing pulse signal bus, 3 address bus, 4 data bus, 5 access inspection device, 6 devices, 7 devices, 8 processor, 9 instruction acquisition timing pulse signal bus, 10 address bus, 11 data bus, 12 Access inspection device, 13 device, 14 device, 15 interrupt generation device, 100 information processing system, 501 target address value management unit, 502 PC value holding unit, 503 access determination unit.

Claims (4)

プロセッサからデバイスへのアクセスを検査するアクセス検査装置であって、
前記デバイスへのアクセスの際に実行される命令として指定されている対象命令のアドレス値を対象アドレス値として管理する対象アドレス値管理部と、
前記プロセッサが実行しようとする命令のアドレス値を、プログラムカウンタ値として受信し、受信したプログラムカウンタ値を保持するプログラムカウンタ値保持部と、
前記プロセッサが前記対象命令及び前記対象命令以外の命令のいずれかを実行して前記デバイスへのアクセスを行った場合に、前記プログラムカウンタ値保持部のプログラムカウンタ値が前記対象アドレス値管理部の前記対象アドレス値と一致するか否かを判定し、前記プログラムカウンタ値が前記対象アドレス値と一致する場合に、前記プロセッサによる前記デバイスへのアクセスを許可し、前記プログラムカウンタ値が前記対象アドレス値と一致しない場合に、前記プロセッサによる前記デバイスへのアクセスを禁止するアクセス判定部とを有するアクセス検査装置。
An access inspection device for inspecting access from a processor to a device,
A target address value management unit that manages, as a target address value, an address value of a target instruction that is designated as an instruction executed when accessing the device;
A program counter value holding unit that receives an address value of an instruction to be executed by the processor as a program counter value and holds the received program counter value;
When the processor executes either the target instruction or an instruction other than the target instruction to access the device, the program counter value of the program counter value holding unit is changed to the target address value management unit. It is determined whether or not it matches a target address value, and when the program counter value matches the target address value, the processor is allowed to access the device, and the program counter value and the target address value are And an access determination unit that prohibits access to the device by the processor when they do not match.
前記対象アドレス値管理部は、
2つ以上の対象命令の2つ以上の対象アドレス値を管理しており、
前記アクセス判定部は、
前記プログラムカウンタ値が前記2つ以上の対象アドレス値のいずれかに一致するか否かを判定し、前記プログラムカウンタ値がいずれかの対象アドレス値と一致する場合に、前記プロセッサによる前記デバイスへのアクセスを許可し、前記プログラムカウンタ値がいずれの対象アドレス値とも一致しない場合に、前記プロセッサによる前記デバイスへのアクセスを禁止する請求項1に記載のアクセス検査装置。
The target address value management unit
Manages two or more target address values of two or more target instructions,
The access determination unit
It is determined whether the program counter value matches any one of the two or more target address values, and when the program counter value matches any target address value, The access inspection apparatus according to claim 1, wherein access is permitted and access to the device by the processor is prohibited when the program counter value does not match any target address value.
前記対象アドレス値管理部で管理されている前記対象アドレス値を変更可能である請求項1に記載のアクセス検査装置。   The access inspection apparatus according to claim 1, wherein the target address value managed by the target address value management unit can be changed. プロセッサからデバイスへのアクセスを検査するアクセス検査装置と、
前記プロセッサへの割込みを発生させる割込み発生装置とを有する情報処理システムであって、
前記アクセス検査装置は、
前記デバイスへのアクセスの際に実行される命令として指定されている対象命令のアドレス値を対象アドレス値として管理する対象アドレス値管理部と、
前記プロセッサが実行しようとする命令のアドレス値を、プログラムカウンタ値として受信し、受信したプログラムカウンタ値を保持するプログラムカウンタ値保持部と、
前記プロセッサが前記対象命令及び前記対象命令以外の命令のいずれかを実行して前記デバイスへのアクセスを行った場合に、前記プログラムカウンタ値保持部のプログラムカウンタ値が前記対象アドレス値管理部の前記対象アドレス値と一致するか否かを判定し、前記プログラムカウンタ値が前記対象アドレス値と一致する場合に、前記プロセッサによる前記デバイスへのアクセスを許可し、前記プログラムカウンタ値が前記対象アドレス値と一致しない場合に、前記プロセッサによる前記デバイスへのアクセスを禁止し、前記割込み発生装置に前記デバイスへの異常アクセスを通知するアクセス判定部とを有し、
前記割込み発生装置は、
前記アクセス検査装置から前記デバイスへの異常アクセスが通知された場合に、前記プロセッサへの割込みを発生させて、前記デバイスへの異常アクセスを前記プロセッサに通知する情報処理システム。
An access inspection device for inspecting access from the processor to the device;
An information processing system having an interrupt generation device for generating an interrupt to the processor,
The access inspection device includes:
A target address value management unit that manages, as a target address value, an address value of a target instruction that is designated as an instruction executed when accessing the device;
A program counter value holding unit that receives an address value of an instruction to be executed by the processor as a program counter value and holds the received program counter value;
When the processor executes either the target instruction or an instruction other than the target instruction to access the device, the program counter value of the program counter value holding unit is changed to the target address value management unit. It is determined whether or not it matches a target address value, and when the program counter value matches the target address value, the processor is allowed to access the device, and the program counter value and the target address value are An access determination unit for prohibiting access to the device by the processor and notifying the interrupt generation device of abnormal access to the device, if they do not match,
The interrupt generator is
An information processing system that, when an abnormal access to the device is notified from the access inspection apparatus, generates an interrupt to the processor and notifies the processor of the abnormal access to the device.
JP2014211821A 2014-10-16 2014-10-16 Access inspection apparatus and information processing system Pending JP2016081291A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014211821A JP2016081291A (en) 2014-10-16 2014-10-16 Access inspection apparatus and information processing system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014211821A JP2016081291A (en) 2014-10-16 2014-10-16 Access inspection apparatus and information processing system

Publications (1)

Publication Number Publication Date
JP2016081291A true JP2016081291A (en) 2016-05-16

Family

ID=55958787

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014211821A Pending JP2016081291A (en) 2014-10-16 2014-10-16 Access inspection apparatus and information processing system

Country Status (1)

Country Link
JP (1) JP2016081291A (en)

Similar Documents

Publication Publication Date Title
Sun et al. OAT: Attesting operation integrity of embedded devices
US10353831B2 (en) Trusted launch of secure enclaves in virtualized environments
TWI570589B (en) Apparatus for providing trusted computing
JP5636501B2 (en) Method for performing resource access control in a computer system, system on chip, and computer system
CN100371906C (en) Method and apparatus for determining access permissions
TW201532073A (en) Region identifying operation for identifying a region of a memory attribute unit corresponding to a target memory address
JP2016516228A (en) Access method and circuit device under control of slave unit in system on chip
US8521920B2 (en) Data processor
JP2021507361A (en) Memory protection device for indirect access memory controllers
JP5975923B2 (en) Vehicle control device
EP2615551B1 (en) Abnormality inspection device, central processing unit, and abnormality inspection method
CN118541673A (en) Hierarchical hardware-software partitioning and configuration
US9081657B2 (en) Apparatus and method for abstract memory addressing
JP2020205050A (en) Resource protection
US9176821B2 (en) Watchpoint support system for functional simulator
CN109271789A (en) Malicious process detection method, device, electronic equipment and storage medium
WO2013147814A1 (en) System and method for determining correct execution of software
CN116795577A (en) System-level DMA security mechanism method, system chip, electronic device and medium
CN117688551A (en) Startup path white list updating method and device, electronic equipment and storage medium
CN110276214B (en) Dual-core trusted SOC architecture and method based on slave access protection
CN117272412B (en) Interrupt control register protection method, device, computer equipment and storage medium
US11023584B2 (en) Application-level signal handling and application-level memory protection
US10133881B2 (en) Method and circuit arrangement for protecting against scanning of an address space
EP3879783A1 (en) Data security processing method and terminal thereof, and server
JP2019525319A (en) Context-based protection system