[go: up one dir, main page]

JP2013161299A - Information processing apparatus and interface access method - Google Patents

Information processing apparatus and interface access method Download PDF

Info

Publication number
JP2013161299A
JP2013161299A JP2012023447A JP2012023447A JP2013161299A JP 2013161299 A JP2013161299 A JP 2013161299A JP 2012023447 A JP2012023447 A JP 2012023447A JP 2012023447 A JP2012023447 A JP 2012023447A JP 2013161299 A JP2013161299 A JP 2013161299A
Authority
JP
Japan
Prior art keywords
access
program
interface
port
processing apparatus
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
JP2012023447A
Other languages
Japanese (ja)
Inventor
Wataru Kanda
渉 神田
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.)
Toyota Motor Corp
Original Assignee
Toyota Motor 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 Toyota Motor Corp filed Critical Toyota Motor Corp
Priority to JP2012023447A priority Critical patent/JP2013161299A/en
Publication of JP2013161299A publication Critical patent/JP2013161299A/en
Pending legal-status Critical Current

Links

Images

Abstract

【課題】特別なハードウェアを用いることなく適切な量の管理情報を使用することでI/Oポートを保護できる情報処理装置を提供すること。
【解決手段】複数のプログラムが記憶されたプログラム記憶手段13と、前記プログラムを実行する1つ以上の演算手段11と、外部の回路と通信可能な複数のインタフェース20と、を有する情報処理装置100であって、前記プログラムがアクセス可能な前記インタフェースが登録されたインタフェース登録テーブル34と、前記インタフェースにアクセス要求した前記プログラムが、前記インタフェースにアクセスすることが許可されている場合、前記プログラムの代わりに前記インタフェースにアクセスするアクセス制御手段33と、を有する。
【選択図】図2
An information processing apparatus capable of protecting an I / O port by using an appropriate amount of management information without using special hardware.
An information processing apparatus includes: a program storage unit that stores a plurality of programs; one or more arithmetic units that execute the program; and a plurality of interfaces that can communicate with an external circuit. If the interface registration table 34 in which the interface accessible by the program is registered and the program that requested access to the interface are permitted to access the interface, instead of the program, Access control means 33 for accessing the interface.
[Selection] Figure 2

Description

本発明は、I/Oポートを有する情報処理装置に関し、システムやアプリ毎にI/Oポートへのアクセスを制御可能な情報処理装置に関する。   The present invention relates to an information processing apparatus having an I / O port, and relates to an information processing apparatus capable of controlling access to an I / O port for each system or application.

マイコンなどの情報処理装置では、複数のタスクがそれぞれ独立に実行される場合がある。複数のタスクがそれぞれ専用のI/Oにアクセスすべき場合に、あるタスクが別のタスク専用のI/Oにアクセスするようなことが生じることは好ましくない。このため、従来から、タスクによるI/Oへのアクセスを保護する技術が知られている。   In an information processing apparatus such as a microcomputer, a plurality of tasks may be executed independently. When a plurality of tasks should access dedicated I / O, it is not preferable that one task accesses I / O dedicated to another task. For this reason, conventionally, a technique for protecting access to I / O by a task is known.

従来のマイコンでは、ハードウェアのメモリアクセス保護資源(例えばメモリ管理ユニット)によりタスクのI/Oポートへのアクセスを制限している。しかしながら、マイコンが提供するメモリ保護資源はページ又はブロックと呼ばれる単位(例えば512バイト〜4kバイト)でメモリ保護を提供している。これに対し、I/Oポートのレジスタは数バイト(例えば1〜4バイト)で構成されているため、従来の方法ではI/Oポート単位でアクセス制御することができない(1ページ又は1ブロックのメモリ保護で複数のI/Oポートにアクセス制限してしまう)。   In a conventional microcomputer, access to a task I / O port is restricted by a hardware memory access protection resource (for example, a memory management unit). However, the memory protection resource provided by the microcomputer provides memory protection in units called pages or blocks (for example, 512 bytes to 4 kbytes). On the other hand, since the register of the I / O port is composed of several bytes (for example, 1 to 4 bytes), the conventional method cannot perform access control in units of I / O ports (one page or one block). Access to multiple I / O ports is restricted by memory protection).

また、新たにハードウェアを追加することでタスクのI/Oポートへのアクセスを制限する技術も考えられている(例えば、特許文献1参照。)。図12は、特許文献1に開示されたアクセス保護を説明する図の一例である。特許文献1では、OS(Operating System)が各アプリのプロセッサバスアドレス空間へのアクセス権をページ単位で管理している。また、プロセッサバスアドレス空間とI/Oアドレス空間を変換器が変換し、I/Oアドレス空間の各I/Oポートを、プロセッサバスアドレス空間にマッピングする。OSはアプリがI/Oへのアクセス権を有する場合に、変換器にI/Oへのアクセスを許可するので、アプリの不正なアクセスを防止できる。   In addition, a technique for restricting access to a task I / O port by adding new hardware is also considered (see, for example, Patent Document 1). FIG. 12 is an example of a diagram illustrating access protection disclosed in Patent Document 1. In FIG. In Patent Document 1, an OS (Operating System) manages the access right of each application to the processor bus address space in units of pages. Further, the converter converts the processor bus address space and the I / O address space, and maps each I / O port of the I / O address space to the processor bus address space. Since the OS permits the converter to access the I / O when the application has an access right to the I / O, it is possible to prevent unauthorized access to the application.

特開平7−191904号公報JP-A-7-191904

しかしながら、特許文献1に開示された技術又は従来の技術では以下のような問題がある。
1.変換器を追加する必要がある。
サーバやワークステーション向けのプロセッサと異なり車両等の組み込み用のプロセッサでは、変換器を有していないことが多いため、変換器を追加する必要が生じてしまう。または、変換器を搭載したマイコンへ変更しなければならない。
2.変換器を追加すると、アプリ側から見えるI/Oポートのアドレスが変更される。
すなわち、変換器の追加前までアプリがプロセッサバスアドレスに出力したI/Oのアドレスが変換器により変わってしまう。このため、アプリを修正する必要が生じてしまう。1つのアプリだけなら修正も可能だが、例えば、仮想化技術で複数のアプリを1つの仮想環境に実装した場合、仮想化による統合のメリットが失われてしまう。
3.メモリ保護の単位を細かくするとOSが保持するアクセス権に関する情報が増加する
上記のハードウェアのメモリアクセス保護資源を用いる場合、ハードウェアの制約によりシステム全体で同じ単位(例えば4バイト)でメモリ保護する必要がある。このため、メモリアクセス保護資源を用いてI/Oポートに最適な粒度(例えば4バイト)でメモリ保護する場合、保護単位毎にアクセス権の設定が必要になってしまう。例えば、1ページを4kバイトとした場合、1ページだけで1000個のアクセス権の設定が必要になる。したがって、保護単位に反比例してOSの管理情報が増加してしまう。
However, the technique disclosed in Patent Document 1 or the conventional technique has the following problems.
1. It is necessary to add a converter.
Unlike processors for servers and workstations, a built-in processor such as a vehicle often does not have a converter, so that it is necessary to add a converter. Or, it must be changed to a microcomputer equipped with a converter.
2. When a converter is added, the address of the I / O port visible from the application side is changed.
That is, the I / O address output by the application to the processor bus address before the addition of the converter is changed by the converter. For this reason, it becomes necessary to modify the application. Modification is possible with only one application, but for example, when a plurality of applications are implemented in one virtual environment using virtualization technology, the merit of integration by virtualization is lost.
3. If the memory access protection resource of the hardware described above, which increases the information related to the access right held by the OS if the memory protection unit is made finer, memory protection is performed in the same unit (for example, 4 bytes) in the entire system due to hardware restrictions. There is a need. For this reason, when the memory protection is performed with the optimum granularity (for example, 4 bytes) for the I / O port using the memory access protection resource, it is necessary to set the access right for each protection unit. For example, if one page is 4 kbytes, 1000 access rights need to be set for only one page. Therefore, OS management information increases in inverse proportion to the protection unit.

本発明は、上記課題に鑑み、特別なハードウェアを用いることなく適切な量の管理情報を使用することでI/Oポートを保護できる情報処理装置を提供することを目的とする。   In view of the above problems, an object of the present invention is to provide an information processing apparatus capable of protecting an I / O port by using an appropriate amount of management information without using special hardware.

本発明は、複数のプログラムが記憶されたプログラム記憶手段と、前記プログラムを実行する1つ以上の演算手段と、外部の回路と通信可能な複数のインタフェースと、を有する情報処理装置であって、前記プログラムがアクセス可能な前記インタフェースが登録されたインタフェース登録テーブルと、前記インタフェースにアクセス要求した前記プログラムが、前記インタフェースにアクセスすることが許可されている場合、前記プログラムの代わりに前記インタフェースにアクセスするアクセス制御手段と、を有する。   The present invention is an information processing apparatus having a program storage means in which a plurality of programs are stored, one or more arithmetic means for executing the programs, and a plurality of interfaces capable of communicating with an external circuit, The interface registration table in which the interface accessible by the program is registered, and when the program that requested access to the interface is permitted to access the interface, the interface is accessed instead of the program. Access control means.

特別なハードウェアを用いることなく適切な量の管理情報を使用することでI/Oポートを保護できる情報処理装置を提供することができる。   An information processing apparatus that can protect an I / O port by using an appropriate amount of management information without using special hardware can be provided.

I/Oポートへのアクセス制御を説明する図の一例である。It is an example of the figure explaining access control to an I / O port. マイコンのハードウェア構成図の一例である。It is an example of the hardware block diagram of a microcomputer. 仮想化技術による2つのシステムの統合を説明する図の一例である。It is an example of the figure explaining integration of two systems by virtualization technology. メモリ保護機構の機能を模式的に説明する図の一例である。It is an example of the figure which illustrates the function of a memory protection mechanism typically. システム1,2によるI/Oポートへのアクセスを禁止する際のPTEの設定例を示す図である。It is a figure which shows the example of a setting of PTE at the time of prohibiting the access to the I / O port by the systems 1 and 2. ハイパーバイザの機能ブロック図の一例である。It is an example of the functional block diagram of a hypervisor. システム実行情報等の一例を示す図である。It is a figure which shows an example of system execution information etc. アクセス履歴テーブルの一例を示す図である。It is a figure which shows an example of an access history table. マイコンの動作手順を示すフローチャート図の一例である。It is an example of the flowchart figure which shows the operation | movement procedure of a microcomputer. アクセスタイミングの予測を説明する図の一例である。It is an example of the figure explaining prediction of access timing. マイコンの動作手順を示すフローチャート図の一例である。It is an example of the flowchart figure which shows the operation | movement procedure of a microcomputer. 特許文献1に開示されたアクセス保護を説明する図の一例である。10 is an example of a diagram illustrating access protection disclosed in Patent Document 1. FIG.

以下、本発明を実施するための形態について図面を参照しながら説明する。   Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings.

図1は、本実施例のI/Oポートへのアクセス制御を説明する図の一例である。   FIG. 1 is an example of a diagram illustrating access control to an I / O port according to the present embodiment.

1.まず、システムの起動時に、例えばハイパーバイザ31は、メモリ保護機構32に対しアプリ1、アプリ2がI/Oポートにアクセスすることを禁止する。なお、ハイパーバイザ31は全てのI/Oポートにアクセスすることができる。   1. First, when the system is activated, for example, the hypervisor 31 prohibits the memory protection mechanism 32 from accessing the I / O port by the applications 1 and 2. The hypervisor 31 can access all the I / O ports.

2.アプリ1又はアプリ2がI/Oポートにアクセスしようとすると、メモリ保護機構32がアクセス違反(例外を発生させる)を検出する。   2. When application 1 or application 2 tries to access the I / O port, the memory protection mechanism 32 detects an access violation (causes an exception).

3.ハイパーバイザ31は、メモリ保護機構32からアクセスしたアプリとI/Oポートの情報を取得して、アプリがI/Oポートにアクセスする権限を有しているか否かを判定する。   3. The hypervisor 31 acquires information on the accessed application and I / O port from the memory protection mechanism 32, and determines whether or not the application has the authority to access the I / O port.

4.アプリにI/Oポートへのアクセス権がある場合、ハイパーバイザ31が該アプリの代わりにI/Oポートへアクセスする。   4). When the application has an access right to the I / O port, the hypervisor 31 accesses the I / O port instead of the application.

5.アプリにI/Oポートへのアクセス権がない場合、ハイパーバイザ31はアクセスしようとしたアプリに対しアクセス違反を通知する。   5. When the application does not have access right to the I / O port, the hypervisor 31 notifies the access violation to the application to be accessed.

したがって、変換器などの新たなハードウェアを追加することなく、各アプリのI/Oアクセスを保護できる。論理アドレスから物理アドレスの変換はメモリ保護機構32が行うので、アプリが指定するI/Oポートのアドレスには変更が必要ない。また、メモリ保護機構32に対し、全てのI/Oポートのアクセスを禁止すればよいので、ハイパーバイザ31の管理情報が増大することもない。   Therefore, the I / O access of each application can be protected without adding new hardware such as a converter. Since the memory protection mechanism 32 converts the logical address to the physical address, it is not necessary to change the address of the I / O port designated by the application. Further, since it is only necessary to prohibit access to all I / O ports to the memory protection mechanism 32, the management information of the hypervisor 31 does not increase.

〔構成例〕
図2は、マイコン100のハードウェア構成図の一例である。マイコン100は、メインバス21に接続された、CPU11、RAM12、ROM13、INTC14、WDT15、及び、DMAC16を有し、周辺バス22に接続されたCAN(Controller Area Network)コントローラ18、ADC19及びI/Oポート20を有する。メインバス21と周辺バス22はブリッジ17を介して接続されている。
[Configuration example]
FIG. 2 is an example of a hardware configuration diagram of the microcomputer 100. The microcomputer 100 includes a CPU 11, a RAM 12, a ROM 13, an INTC 14, a WDT 15, and a DMAC 16 connected to the main bus 21, and a CAN (Controller Area Network) controller 18, an ADC 19, and an I / O connected to the peripheral bus 22. It has a port 20. The main bus 21 and the peripheral bus 22 are connected via the bridge 17.

CPU11は、好ましくは複数のコアを有し、ROM13に記憶されたプログラムを実行することでマイコン100の全体を制御する。CPUはメモリ保護機構32を有している。RAM12は、CPU11がプログラムを実行する際の作業メモリである。また、フラッシュROM13にはハイパーバイザ31や各システム(OS、デバイスドライバ、ミドルウェア及びアプリ)が記憶されている。   The CPU 11 preferably has a plurality of cores and controls the entire microcomputer 100 by executing a program stored in the ROM 13. The CPU has a memory protection mechanism 32. The RAM 12 is a working memory when the CPU 11 executes a program. The flash ROM 13 stores a hypervisor 31 and each system (OS, device driver, middleware, and application).

INTC14は割込みレジスタを監視して、周辺機器からの割り込み要求を割込みの優先順位に基づき調停してCPU11に通知する。これによりCPU11は、例えばISR(Interrupt Service Routine)を実行して、割込みした周辺機器に応じて定められているタスクを起床させる。   The INTC 14 monitors the interrupt register, arbitrates an interrupt request from a peripheral device based on the priority of the interrupt, and notifies the CPU 11 of it. Thereby, the CPU 11 executes an ISR (Interrupt Service Routine), for example, and wakes up a task determined according to the interrupted peripheral device.

WDT15は、動作クロックをカウントして計測した時間が予め定められたリセット時間に達すると(オーバーフローすると)、異常検出(マイコンリセット、CPU割込み等)する回路である。   The WDT 15 is a circuit that detects an abnormality (microcomputer reset, CPU interrupt, etc.) when the time measured by counting the operation clock reaches a predetermined reset time (when overflowing).

DMAC16は、RAM12と周辺回路の間や、RAM12内で、CPU11を介することなくデータを移動する。CPU11がI/Oポート20から外部にデータを送信する場合、CPU11はRAM12に記憶されているデータのアドレスと送信先の周辺回路のアドレスを指示する。DMAC16は、RAM12から読み出したデータを周辺回路のアドレスに対応するI/Oポート20に書き込む。また、CPU11が外部からデータを受信する場合、I/Oポート20にデータが到達すると、DMAC16がそれを検出してRAM12にデータを転送する。受信が終了するとDMAC16はINTC14に割込み要求することで、CPU11はRAM12のデータを読み出すことができる。   The DMAC 16 moves data between the RAM 12 and peripheral circuits or within the RAM 12 without going through the CPU 11. When the CPU 11 transmits data from the I / O port 20 to the outside, the CPU 11 instructs an address of data stored in the RAM 12 and an address of a transmission destination peripheral circuit. The DMAC 16 writes the data read from the RAM 12 to the I / O port 20 corresponding to the peripheral circuit address. In addition, when the CPU 11 receives data from the outside, when the data reaches the I / O port 20, the DMAC 16 detects it and transfers the data to the RAM 12. When the reception is completed, the DMAC 16 issues an interrupt request to the INTC 14, so that the CPU 11 can read the data in the RAM 12.

ブリッジ17は、メインバス21と周辺バス22の間の周波数の違いを吸収し、メインバス21に接続された回路と周辺バス22に接続された回路とを通信可能に接続する。CANコントローラ18は、マイコン100がCANバス43に接続された他のECU(Electronic Control Unit)と通信するための通信回路である。CANコントローラ18はCANフレームの受信をDMAC16に通知すると、DMAC16がCANコントローラ18の受信バッファからCANフレームを読み出しRAM12に記憶する。受信が終了するとDMAC16はINTC14に割込み要求することで、CPU11にCANフレームの受信を通知する。   The bridge 17 absorbs the difference in frequency between the main bus 21 and the peripheral bus 22 and connects the circuit connected to the main bus 21 and the circuit connected to the peripheral bus 22 so that they can communicate with each other. The CAN controller 18 is a communication circuit for the microcomputer 100 to communicate with another ECU (Electronic Control Unit) connected to the CAN bus 43. When the CAN controller 18 notifies the DMAC 16 of reception of the CAN frame, the DMAC 16 reads the CAN frame from the reception buffer of the CAN controller 18 and stores it in the RAM 12. When the reception is completed, the DMAC 16 issues an interrupt request to the INTC 14 to notify the CPU 11 of the reception of the CAN frame.

ADC(A/Dコントーラ)19は、マイコン100に接続されたセンサのアナログ信号をデジタル信号に変換して、アクチュエータ等に制御信号を出力する。I/Oポート20は周辺回路と入出力のインタフェースであり、周辺回路毎に複数用意されている。I/Oポート20には、例えばセンサ、アクチュエータ、スイッチ等が接続されている。本実施例では、I/Oポート1をシステム1がI/Oポート2をシステム2がそれぞれ使用する。   An ADC (A / D controller) 19 converts an analog signal of a sensor connected to the microcomputer 100 into a digital signal and outputs a control signal to an actuator or the like. The I / O port 20 is an input / output interface with a peripheral circuit, and a plurality of I / O ports 20 are prepared for each peripheral circuit. For example, sensors, actuators, switches, and the like are connected to the I / O port 20. In this embodiment, the system 1 uses the I / O port 1 and the system 2 uses the I / O port 2 respectively.

マイコン100は各種の電子制御装置に搭載される。本実施例では、異なる電子制御装置に搭載されていたシステム1,2を1つの電子制御装置に搭載することも可能ため、電子制御装置が単一の機能のみを有しているとは限らない。しかし、電子制御装置の機能としては、例えば、HV−ECU、エンジンECU、ブレーキECU、ナビECU等、種々のものがある。本実施例のマイコン100はこれらの機能の1つ以上を提供する。   The microcomputer 100 is mounted on various electronic control devices. In this embodiment, since the systems 1 and 2 mounted on different electronic control devices can be mounted on one electronic control device, the electronic control device does not always have only a single function. . However, the electronic control device has various functions such as an HV-ECU, an engine ECU, a brake ECU, and a navigation ECU. The microcomputer 100 of this embodiment provides one or more of these functions.

〔システムの統合〕
図3は、仮想化技術による2つのシステムの統合を説明する図の一例である。ECU1に搭載されたアプリ1とOS1をシステム1、ECU2に搭載されたアプリ2とOS2をシステム2と称する。ECU1とECU2のマイコンは同じものである必要はなく、OS1とOS2も同じものである必要はない。
[System integration]
FIG. 3 is an example of a diagram illustrating the integration of two systems by the virtualization technology. The application 1 and OS 1 installed in the ECU 1 are referred to as a system 1, and the application 2 and OS 2 installed in the ECU 2 are referred to as a system 2. The microcomputers of ECU1 and ECU2 do not need to be the same, and OS1 and OS2 need not be the same.

仮想化技術を利用することで、2つのシステム1,2をそのまま1つのマイコン100に搭載することができる。システムの変更が不要なので低コスト、短期間にシステム統合が可能となる。ところで、車両の機能安全にはASIL(Automotive Safety Integrity Level)という指標の安全性レベルがあり、ASILに応じた機能安全が達成されることが求められる。システム1,2の統合の際、システム1と2のASILが異なる場合があると考えられるが、ASILが異なる場合、ASILが高いシステムのI/Oポート20をASILが低いシステムから保護することが要求される。本実施例ではこのI/Oポート20の保護をハイパーバイザ31とメモリ保護機構32を利用して実現する
ハイパーバイザ31は、マイコン1,2のハードウェアをエミュレートするソフトウェアである。マイコン1,2は一般的なハードウェア(CPU、メモリ、I/Oポート等)を有している。例えば、マイコン1,2のメモリをエミュレートする場合、ハイパーバイザ32にはマイコン1,2に搭載されているROM、RAMの領域を確保する処理(一連の命令)が記述されている。マイコン100がマイコン1,2のプログラムを実行する際は、この確保した領域をマイコン1,2のメモリとしてアクセスすることで、マイコン1,2の動作をエミュレートする。すなわち、確保された領域には、マイコン1,2がシステム1,2を動作させた場合と同じデータが記憶される。
By using the virtualization technology, the two systems 1 and 2 can be mounted on one microcomputer 100 as they are. Since no system change is required, system integration is possible at a low cost in a short time. By the way, the functional safety of a vehicle has a safety level of an index called ASIL (Automotive Safety Integrity Level), and it is required that functional safety corresponding to ASIL is achieved. When integrating the systems 1 and 2, it is considered that the ASIL of the systems 1 and 2 may be different. However, when the ASIL is different, the I / O port 20 of the system having a high ASIL may be protected from the system having a low ASIL. Required. In this embodiment, the I / O port 20 is protected by using the hypervisor 31 and the memory protection mechanism 32. The hypervisor 31 is software that emulates the hardware of the microcomputers 1 and 2. The microcomputers 1 and 2 have general hardware (CPU, memory, I / O port, etc.). For example, when the memories of the microcomputers 1 and 2 are emulated, the hypervisor 32 describes a process (a series of instructions) for securing the ROM and RAM areas mounted on the microcomputers 1 and 2. When the microcomputer 100 executes the programs of the microcomputers 1 and 2, the reserved area is accessed as the memory of the microcomputers 1 and 2 to emulate the operations of the microcomputers 1 and 2. That is, the same data as when the microcomputers 1 and 2 operate the systems 1 and 2 is stored in the secured area.

CPUをエミュレートする場合、ハイパーバイザ32には、CPUが持つレジスタ(汎用レジスタ、プログラムカウンタ、フラグレジスタ、スタックポインタ)に対応した領域をマイコン100のRAM12に確保する処理が記述されている。また、ハイパーバイザ32には、エミュレートしたメモリから命令を1つずつ読み出す、解読する、実行する、という処理の繰り返し、及び、実行結果に応じてRAM12に確保したレジスタの値を更新する処理が記述されている。解読する際には、マイコン1,2のCPUが実行可能な全ての命令のうちどの命令に相当するかを特定する。そして解読結果に応じて、確保されたレジスタを操作する処理が記述されている。実行の内容としては、メモリからレジスタへのデータのコピー(例えばLoad命令の場合)、レジスタからメモリへのデータのコピー(例えばStore命令の場合)、レジスタの値の加減乗除、論理演算、等がある。したがって、RAM12に確保されたレジスタには、マイコン1,2がシステム1,2を動作させた場合にマイコン1,2のCPUのレジスタに格納されるデータと同じデータが記憶される。   When emulating a CPU, the hypervisor 32 describes a process for securing an area corresponding to a register (general-purpose register, program counter, flag register, stack pointer) in the CPU 100 in the RAM 12 of the microcomputer 100. Further, the hypervisor 32 has a process of repeatedly reading, decoding, and executing instructions from the emulated memory one by one, and a process of updating a register value secured in the RAM 12 according to the execution result. It has been described. At the time of decoding, which instruction corresponds to all the instructions executable by the CPUs of the microcomputers 1 and 2 is specified. A process for operating the secured register is described in accordance with the decoding result. The contents of execution include copying data from the memory to the register (for example, in the case of a Load instruction), copying data from the register to the memory (for example, in the case of a Store instruction), addition / subtraction / multiplication / division of a register value, logical operation, etc. is there. Therefore, the register secured in the RAM 12 stores the same data as the data stored in the CPU registers of the microcomputers 1 and 2 when the microcomputers 1 and 2 operate the systems 1 and 2.

I/Oポートをエミュレートする場合、ハイパーバイザ32には、入出力が指示されたI/Oポートに応じた処理が記述されている。すなわち、解読の結果、マイコン1,2のI/Oポートを操作する命令である場合、マイコン100のI/Oポートにアクセスする処理が記述されている。例えば、入力ポートの指定に対し、その入力ポートに対応するI/Oポート20からデータを読み出す処理が記述されている。よって、例えばマイコン1,2でセンサが接続されていた入力ポートが指定された場合、その入力ポートに接続されていたセンサが接続されているマイコン100のI/Oポート20からデータを読み出す、処理が記述されている。   When emulating an I / O port, the hypervisor 32 describes a process corresponding to the I / O port for which input / output is instructed. That is, as a result of decoding, when the instruction is for operating the I / O ports of the microcomputers 1 and 2, a process for accessing the I / O port of the microcomputer 100 is described. For example, a process for reading data from the I / O port 20 corresponding to the input port is described in response to the designation of the input port. Therefore, for example, when the input port to which the sensor is connected in the microcomputers 1 and 2 is designated, the process of reading data from the I / O port 20 of the microcomputer 100 to which the sensor connected to the input port is connected Is described.

出力ポートの指定に対し、その出力ポートにデータを書き込む、処理が記述されている。よって、例えばマイコン1,2でアクチュエータが接続されていた出力ポートが指定された場合、その出力ポートに接続されていたアクチュエータが接続されているマイコン100のI/Oポート20にデータを書き出す、処理が記述されている。   A process for writing data to the output port in response to the designation of the output port is described. Thus, for example, when the output port to which the actuator is connected in the microcomputers 1 and 2 is specified, the data is written to the I / O port 20 of the microcomputer 100 to which the actuator connected to the output port is connected. Is described.

なお、本実施例ではマイコン1,2がメモリマップドI/O(I/Oポートをアドレスに割り当ててアクセスするI/O指定方式)によりI/Oポート20にアクセスしている。したがって、上記した入力ポート又は出力ポートへのアクセス命令を検出することは、アクセス先のI/Oポート20に対応するアドレス(解読した命令のアクセス先のアドレス(オペランド)を検出することで行われる。   In this embodiment, the microcomputers 1 and 2 access the I / O port 20 by memory mapped I / O (I / O designation method in which an I / O port is assigned to an address for access). Accordingly, the above-described access instruction to the input port or output port is detected by detecting the address corresponding to the access destination I / O port 20 (the access destination address (operand) of the decoded instruction). .

システム1,2のようにOSも含めて1つのマイコン100に搭載する場合、OS1,2が実行する命令がCPU11の特権モードでのみ実行が許可される命令の場合がある。特権モードとはCPU11の動作モードであり、対比されるモードにユーザモードがある。一般的なアプリはシステムの安定性やセキュリティを維持するためユーザモードでのみ実行が許可される。   When installed in one microcomputer 100 including the OS as in the systems 1 and 2, the instruction executed by the OS 1 and 2 may be an instruction that is allowed to be executed only in the privileged mode of the CPU 11. The privileged mode is an operation mode of the CPU 11 and a user mode is a mode to be compared. General apps are only allowed to run in user mode to maintain system stability and security.

しかし、マイコン100のハイパーバイザ31上で実行されるOS1,2はユーザモードで実行されているので、ハイパーバイザ31がOS1、2の実行をエミュレートできないおそれがある(そのまま実行すると例外が発生してしまう)。このため、ハイパーバイザ31はOS1,2の特定の命令を、ユーザモードのまま実行できるように別の命令に変換する。   However, since the OSs 1 and 2 executed on the hypervisor 31 of the microcomputer 100 are executed in the user mode, there is a possibility that the hypervisor 31 cannot emulate the execution of the OSs 1 and 2 (an exception occurs if executed as it is). ) For this reason, the hypervisor 31 converts a specific instruction of the OSs 1 and 2 into another instruction so that it can be executed in the user mode.

特権モードからユーザモードへは、マイコン100に用意されている特定の命令を実行することで変更される。逆に、ユーザモードから特権モードへは、ハイパーバイザ31が特殊な命令を実行した場合に変更されるので、システム1,2が特権モードに切り替えることはできない。   The privilege mode is changed to the user mode by executing a specific instruction prepared in the microcomputer 100. Conversely, since the user mode is changed to the privileged mode when the hypervisor 31 executes a special instruction, the systems 1 and 2 cannot be switched to the privileged mode.

この他、マイコン1,2が搭載するCANコントローラによる通信も、ハイパーバイザ31はマイコン1,2をエミュレートすることができる。すなわち、ハイパーバイザ31には、命令の解読によりCANコントローラによる通信を検出し、マイコン100のCANコントローラで通信する処理が記述されている。   In addition, the hypervisor 31 can also emulate the microcomputers 1 and 2 for communication by the CAN controller mounted on the microcomputers 1 and 2. That is, the hypervisor 31 describes a process of detecting communication by the CAN controller by decoding a command and communicating by the CAN controller of the microcomputer 100.

ハイパーバイザ31は、システム1,2をアプリケーションとして実行するので、システム1,2を1つのタスクやスレッドなどの実行単位として、実行管理する。したがって、少なくともCPU11がどちらのシステムを実行しているかを検出している。CPU11がシングルコアであれば、ハイパーバイザ31は例えば時分割的にシステム1と2を切り替えてCPU11に割り当てる。CPU11がマルチコアであれば、ハイパーバイザ31は例えばコア1とコア2にそれぞれシステム1と2を割り当てる。   Since the hypervisor 31 executes the systems 1 and 2 as applications, the hypervisor 31 executes and manages the systems 1 and 2 as an execution unit such as one task or thread. Accordingly, at least the CPU 11 detects which system is running. If the CPU 11 is a single core, the hypervisor 31 switches between the systems 1 and 2 in a time division manner and assigns them to the CPU 11, for example. If the CPU 11 is multi-core, the hypervisor 31 assigns the systems 1 and 2 to the core 1 and the core 2, for example.

〔メモリ保護〕
このように、仮想化技術によりシステム1,2を変更することなくハイパーバイザ31上でシステム1,2が動作する。マイコン100は例えばベースアドレス指定によりシステム1,2を再配置可能にRAMにロードする。再配置可能なプログラムが指定するアドレスを論理アドレスという。これに対しRAM上におけるシステム1,2のアドレスを物理アドレスという。システム1,2のRAMのアドレスは不定であるが、システム1,2の命令に含まれるアドレスは固定なので、マイコン100は、メモリ保護機構32を用いて、システム1,2が出力する論理アドレスとRAMの物理アドレスを対応づける。
[Memory protection]
Thus, the systems 1 and 2 operate on the hypervisor 31 without changing the systems 1 and 2 by the virtualization technology. The microcomputer 100 loads the systems 1 and 2 into the RAM so that they can be rearranged, for example, by base address designation. An address specified by a relocatable program is called a logical address. On the other hand, the addresses of the systems 1 and 2 on the RAM are called physical addresses. Although the addresses of the RAMs of the systems 1 and 2 are indefinite, the addresses included in the instructions of the systems 1 and 2 are fixed. Therefore, the microcomputer 100 uses the memory protection mechanism 32 to determine the logical addresses output by the systems 1 and 2. The physical address of the RAM is associated.

図4は、メモリ保護機構32の機能を模式的に説明する図の一例である。ハイパーバイザ31はシステム1、2の起動を特定の命令の実行などから検出して、システム毎にページテーブルエントリ(PTE)とページテーブルを作成する。メモリ保護機構32は、RAMなどの物理アドレスをページ単位に分割し、論理アドレスのアドレス空間を同じサイズのページ単位に分割する。そして、物理ページのページ番号と論理ページのページ番号を対応付ける。   FIG. 4 is an example of a diagram for schematically explaining the function of the memory protection mechanism 32. The hypervisor 31 detects the activation of the systems 1 and 2 from the execution of a specific command and creates a page table entry (PTE) and a page table for each system. The memory protection mechanism 32 divides a physical address such as RAM into pages, and divides the address space of logical addresses into pages of the same size. Then, the page number of the physical page is associated with the page number of the logical page.

PTEには、論理ページ番号に対応づけてページテーブルのアドレス、無効フラグ、R/Wフラグ、及び、U/Hフラグなどが登録されている。ページテーブルのアドレスは、システム別に用意されたページテーブルの先頭アドレスである。無効フラグは対応する物理ページの有無を示す。R/Wフラグはリード/ライトの許可を示す。U/Hフラグは、ユーザモードと特権モード(ハイパーバイザモード)のどちらでアクセスが許可されているかを示す。   In the PTE, a page table address, an invalid flag, an R / W flag, a U / H flag, and the like are registered in association with the logical page number. The page table address is the top address of a page table prepared for each system. The invalid flag indicates the presence or absence of the corresponding physical page. The R / W flag indicates read / write permission. The U / H flag indicates whether access is permitted in the user mode or the privilege mode (hypervisor mode).

論理アドレスの先頭の所定数のビットが論理ページ番号で、残りがページ内のオフセットである。メモリ保護機構32は、PTEを参照してページテーブルを参照し、システム1,2の命令に含まれる論理ページ番号に対応づけられた物理ページ番号を特定する。この物理ページ番号とオフセットを統合したアドレスが物理アドレスになる。システム毎にページテーブルが異なるので、論理アドレスが同じでも、物理アドレスが重複することがない。   A predetermined number of bits at the beginning of the logical address are logical page numbers, and the rest are offsets within the page. The memory protection mechanism 32 refers to the PTE, refers to the page table, and specifies the physical page number associated with the logical page number included in the instructions of the systems 1 and 2. An address obtained by integrating the physical page number and the offset becomes a physical address. Since the page table is different for each system, even if the logical address is the same, the physical address does not overlap.

システム1,2が論理アドレスをメモリ保護機構32に出力すると、メモリ保護機構32は実行中のシステムを特定して、システムに固有のページテーブルを参照する。よって、システム1,2はRAMのシステム1,2の領域にアクセスすることができる。I/Oポート20もアドレス空間の一部に割り当てられるので、RAMと同様にアクセスできる。   When the system 1 or 2 outputs a logical address to the memory protection mechanism 32, the memory protection mechanism 32 identifies a running system and refers to a page table specific to the system. Therefore, the systems 1 and 2 can access the areas of the systems 1 and 2 in the RAM. Since the I / O port 20 is also assigned to a part of the address space, it can be accessed in the same manner as the RAM.

また、システム1がRAMにマッピングされていない論理アドレスを指定した場合、メモリ保護機構32は例外を発生する。マッピングされているかどうかは無効フラグにより判定される。また、リード/ライトの許可がない物理アドレスに変換される論理アドレスを指定した場合、特権モードでのみアクセスが許可される物理アドレスに変換される論理アドレスを指定した場合も同様である。このように、メモリ保護機構32によりシステム1、2がアクセスするメモリが保護される。   Further, when the system 1 designates a logical address that is not mapped to the RAM, the memory protection mechanism 32 generates an exception. Whether or not mapping is performed is determined by an invalid flag. The same applies when a logical address that is converted into a physical address that is not permitted to be read / written is specified, or when a logical address that is converted into a physical address that is allowed to be accessed only in the privileged mode is specified. As described above, the memory accessed by the systems 1 and 2 is protected by the memory protection mechanism 32.

そして、システム1,2がI/Oポート20にアクセスする場合、I/Oポート20に割り当てられた論理アドレスを指定する。従来であればメモリ保護機構32はこの論理アドレスも物理アドレスに変換するが、本実施例では、システム1,2がI/Oポート20に直接、アクセスすることが禁止される。   When the systems 1 and 2 access the I / O port 20, the logical address assigned to the I / O port 20 is designated. Conventionally, the memory protection mechanism 32 converts this logical address into a physical address, but in this embodiment, the systems 1 and 2 are prohibited from directly accessing the I / O port 20.

図5は、システム1,2によるI/Oポート20へのアクセスを禁止する際のPTEの設定例を示す図である。フラグ=“1”で許可であるとする。
・R/Wフラグ=1/1
・U/Hフラグ=0/1
R/Wフラグによれば、いずれも“1”なので、このPTEが指示する論理ページに対応するI/Oポート20に対しリードすることもライトすることも可能である。しかしながら、U/Hフラグが“0/1”なので、ユーザモードではリード/ライトが許可されない。すなわち、システム1,2はI/Oポート20にアクセスすることはできない。一方、特権モードではリード/ライトが許可されるので、ハイパーバイザ31はI/Oポート20にアクセスすることができる。
FIG. 5 is a diagram illustrating a setting example of the PTE when the access to the I / O port 20 by the systems 1 and 2 is prohibited. It is assumed that the flag = “1” and permission is given.
・ R / W flag = 1/1
・ U / H flag = 0/1
According to the R / W flag, since both are “1”, it is possible to read from or write to the I / O port 20 corresponding to the logical page indicated by the PTE. However, since the U / H flag is “0/1”, read / write is not permitted in the user mode. That is, the systems 1 and 2 cannot access the I / O port 20. On the other hand, since read / write is permitted in the privileged mode, the hypervisor 31 can access the I / O port 20.

したがって、例えばハイパーバイザ31がマイコン100の起動時に、論理アドレスがI/Oポート20を含む論理ページのPTEについて、図5のように設定することで、システム1,2がI/Oポート20にアクセスすることを禁止できる。なお、I/Oポート20の論理アドレスはシステム1,2の構成から明らかであるし、開発者にとって既知である。   Therefore, for example, when the hypervisor 31 starts up the microcomputer 100, the logical page PTE of the logical page including the I / O port 20 is set as shown in FIG. Access can be prohibited. The logical address of the I / O port 20 is obvious from the configuration of the systems 1 and 2 and is known to the developer.

システム1,2がI/Oポート20にアクセスする命令を実行した場合、メモリ保護機構32は例外を発生する(この例外の発生をアクセス違反という場合がある。)。これにより、ハイパーバイザ31はシステム1,2によるI/Oポート20へのアクセスを検出する。   When the system 1 or 2 executes an instruction to access the I / O port 20, the memory protection mechanism 32 generates an exception (the occurrence of this exception may be referred to as an access violation). Thereby, the hypervisor 31 detects access to the I / O port 20 by the systems 1 and 2.

このように本実施例ではページ単位でI/Oポート20にアクセス制限すればよいので(全てのI/Oポートをアクセス禁止にすればよいので)、ページテーブルエントリの数が多くなりすぎることがない。   As described above, in this embodiment, it is only necessary to restrict access to the I / O port 20 in units of pages (since all I / O ports should be prohibited from accessing), the number of page table entries may become too large. Absent.

〔機能構成〕
図6は、ハイパーバイザ31の機能ブロック図の一例を示す。ハイパーバイザ31は主にアクセス制御部33、I/Oアクセス管理情報34、及び、システム実行情報35を有している。
[Function configuration]
FIG. 6 shows an example of a functional block diagram of the hypervisor 31. The hypervisor 31 mainly includes an access control unit 33, I / O access management information 34, and system execution information 35.

システム実行情報35は、アクセス違反が通知された場合に、実行中のシステム(OS又はアプリ)を特定するための情報である。システム1,2のどちらもI/Oポート20へのアクセスが禁止されているので、どちらがアクセスしたか特定する必要があるためである。   The system execution information 35 is information for specifying a system (OS or application) being executed when an access violation is notified. This is because access to the I / O port 20 is prohibited in both the systems 1 and 2, and it is necessary to specify which one has accessed.

図7(a)はシステム実行情報35の一例を示す図である。システム実行情報35としては、例えば、マイコン100で実行中のシステムの識別情報、例外を発生させたプログラムのアドレスが挙げられる。マイコン100で実行中のシステムの識別情報は、ハイパーバイザ31が定常的に管理している。ハイパーバイザ31は、CPU11に割り当てているシステムをテーブルなどに登録してあるので、このテーブルを参照することでシステムを特定できる。   FIG. 7A shows an example of the system execution information 35. Examples of the system execution information 35 include identification information of the system being executed by the microcomputer 100 and the address of the program that generated the exception. The identification information of the system being executed by the microcomputer 100 is constantly managed by the hypervisor 31. Since the hypervisor 31 has registered the system assigned to the CPU 11 in a table or the like, the system can be specified by referring to this table.

例外を発生させたプログラムのアドレスは、エミュレートされたプログラムカウンタに設定されている。プログラムカウンタの値は論理アドレスなので、ページテーブルを参照して物理アドレスを特定すれば、それがシステム1の領域かシステム2の領域かを判別できる。プログラムカウンタに設定されているアドレスは、ハイパーバイザ31がエミュレートにより取得しているので容易に特定できる。そして、プログラムカウンタに設定されているアドレスから、システム1,2が実行した命令が分かるので、システム1,2がI/Oポート1又はI/Oポート2のどちらにアクセスしたかが判明する。   The address of the program that generated the exception is set in the emulated program counter. Since the value of the program counter is a logical address, if the physical address is specified by referring to the page table, it can be determined whether it is the system 1 area or the system 2 area. The address set in the program counter can be easily specified because the hypervisor 31 has acquired it by emulation. Since the instruction executed by the systems 1 and 2 can be found from the address set in the program counter, it can be determined whether the systems 1 and 2 have accessed the I / O port 1 or the I / O port 2.

なお、メモリ保護機構は、論理アドレスから物理アドレスを出力するので(アドレスに関する変換を行うので)、例外を発生させたプログラムの論理アドレス、アクセス違反が発生した時のI/Oポート20の物理アドレス、システムが書き込む予定のデータ(又はそのアドレス)が設定される。したがって、メモリ保護機構からシステム実行情報と同等の情報を取得することもできる。   Since the memory protection mechanism outputs a physical address from the logical address (since it performs conversion related to the address), the logical address of the program that generated the exception, and the physical address of the I / O port 20 when the access violation occurred The data (or its address) to be written by the system is set. Therefore, information equivalent to the system execution information can be acquired from the memory protection mechanism.

I/Oアクセス管理情報34は、各I/Oポート1,2に対する各システムのアクセス権が登録された情報である。すなわち、メモリ保護機構32では禁止されているが、統合前のシステムではアクセスが許可されていたI/Oポート1,2がシステムに対応づけて登録されている。   The I / O access management information 34 is information in which the access rights of each system for the I / O ports 1 and 2 are registered. That is, the I / O ports 1 and 2 that are prohibited in the memory protection mechanism 32 but are allowed to be accessed in the system before the integration are registered in association with the system.

図7(b)はI/Oアクセス管理情報34の一例を示す図である。図示するように、例えば、I/Oポート1にはシステム1が対応づけられ、I/Oポート2にはシステム2が対応づけられている。I/Oアクセス管理情報34は静的な情報なので、開発者等がハイパーバイザ31のビルド時に設定しておくことができる。また、マイコン100の起動時に、ハイパーバイザ31が動的に設定してもよい。この方法は、システム1,2がI/Oポート1,2のどちらを使用してもよい場合に採用できる。例えばシステム1,2の起動順にI/Oポート1,2を割り当てる。   FIG. 7B is a diagram showing an example of the I / O access management information 34. As illustrated, for example, system 1 is associated with I / O port 1 and system 2 is associated with I / O port 2. Since the I / O access management information 34 is static information, it can be set by a developer or the like when the hypervisor 31 is built. Further, the hypervisor 31 may dynamically set when the microcomputer 100 is activated. This method can be adopted when the systems 1 and 2 may use either the I / O ports 1 or 2. For example, the I / O ports 1 and 2 are assigned in the order in which the systems 1 and 2 are activated.

アクセス制御部33は、ハイパーバイザ31内部の機能である。すなわち、特権モードで動作する。アクセス制御部33は、メモリ保護機構32の例外の発生により起動される。アクセス制御部33は、例外発生時のプログラムカウンタの値により実行された命令を特定し、命令がI/Oポート20に対応するアドレスへのアクセスによるものであるか否かを判定する。   The access control unit 33 is a function inside the hypervisor 31. That is, it operates in a privileged mode. The access control unit 33 is activated when an exception of the memory protection mechanism 32 occurs. The access control unit 33 identifies the executed instruction based on the value of the program counter at the time of the exception occurrence, and determines whether the instruction is due to access to an address corresponding to the I / O port 20.

例外がI/Oポート20へのアクセスにより発生した場合、アクセス制御部33はアクセス制御を行う。すなわち、システム実行情報35に基づき例外が発生した時のシステムを特定し、I/Oアクセス管理情報34において、該システムのアクセスが許可されているか否かを判定する。アクセスが許可されている場合は、システムの代わりにI/Oポート20にアクセスし、アクセスが許可されていない場合は、システムに対しアクセス違反を通知する。   When an exception occurs due to access to the I / O port 20, the access control unit 33 performs access control. That is, the system when an exception occurs is specified based on the system execution information 35, and it is determined in the I / O access management information 34 whether access to the system is permitted. If access is permitted, the I / O port 20 is accessed instead of the system. If access is not permitted, an access violation is notified to the system.

統合前のシステム1、2ではI/Oポートのアクセス違反は生じないとしてよい。しかし、I/Oポートに限定しなければ、アクセス違反が生じた場合、マイコン1,2に搭載されているメモリ保護機構32が例外の発生を割込みなどでOSに通知する。システム1,2はOS1,2が備える例えば、例外ハンドラ等を実行することで、例外発生に対応した処理を行う。この処理はOS1,2により統合前から決まっている。よって、アクセス制御部33としては、システム1,2に例外ハンドラを実行させることで例外の発生をOS1,2に通知できる。具体的には、例外ハンドラが記述されたシステム1,2のアドレスからシステム1,2の命令の解読(エミュレート)を再開する。   In the systems 1 and 2 before integration, no I / O port access violation may occur. However, if not limited to I / O ports, when an access violation occurs, the memory protection mechanism 32 mounted on the microcomputers 1 and 2 notifies the OS of the occurrence of an exception by an interrupt or the like. The systems 1 and 2 execute processing corresponding to the occurrence of an exception by executing, for example, an exception handler provided in the OS 1 and 2. This process is determined by the OS 1 and 2 before integration. Therefore, the access control unit 33 can notify the OSs 1 and 2 of the occurrence of an exception by causing the systems 1 and 2 to execute the exception handler. Specifically, the decoding of the instructions of the systems 1 and 2 is resumed from the addresses of the systems 1 and 2 in which the exception handler is described.

また、アクセス制御部33は、統合の影響によりアクセス違反がどの程度生じているかを管理するため、アクセスの履歴を記録する。   Further, the access control unit 33 records an access history in order to manage how much access violation has occurred due to the influence of integration.

図8は、アクセス履歴テーブルの一例を示す図である。アクセス制御部33は、例えば、I/Oポート20にアクセスしたシステム、アクセス時刻、アクセス時に実行された命令の物理アドレス、アクセス先のI/Oポート1,2、例外発生の有無等を記録する。発生時刻は例えば起動時からの経過時間であるが、絶対時刻でもよい。   FIG. 8 is a diagram illustrating an example of the access history table. The access control unit 33 records, for example, the system that accessed the I / O port 20, the access time, the physical address of the instruction executed at the time of access, the I / O ports 1 and 2 to be accessed, the presence / absence of an exception, etc. . The occurrence time is, for example, the elapsed time from the startup, but may be an absolute time.

このような記録により、開発者等は、システム1,2がどのくらいの頻度でどのI/Oポート1,2にアクセスするか、及び、周期性などを検証できる。また、システム1とシステム2のアクセスのパターン(例えば、システム1が2回アクセスするとシステム1が1回アクセスする、システム1とシステム2が連続してアクセスする)の有無を検証できる。また、例外が発生した場合には、例えば特定の物理アドレスの命令で例外が起こりやすいこと、例外発生の前後のアクセスのパターン(例えば、システム1又は2が連続してアクセスすると例外が発生する)の有無を検証できる。   With such a record, the developer or the like can verify which I / O ports 1 and 2 are accessed by the systems 1 and 2 and the periodicity. In addition, it is possible to verify whether there is an access pattern of the system 1 and the system 2 (for example, when the system 1 accesses twice, the system 1 accesses once, and the system 1 and system 2 continuously access). When an exception occurs, for example, an exception is likely to occur with an instruction at a specific physical address, and an access pattern before and after the occurrence of the exception (for example, an exception occurs when the system 1 or 2 is accessed continuously). The presence or absence of can be verified.

〔例外発生によりアクセス制御部33がI/Oポートへのアクセスを代替することのメリット〕
ハイパーバイザ31はシステム1,2が実行する命令を解析しているので、I/Oポート20へのアクセスを検出した場合に、例外発生を待つことなくI/Oポート20にアクセスすることも可能である。この場合、メモリ保護機構32によりユーザモードのI/Oポート20へのアクセスを禁止しない方法と、禁止する方法が考えられる。I/Oポート20へのアクセスを禁止しない方法では、想定していないプログラムが追加されることなどでI/Oポート20へアクセスされるおそれがあるため好ましくない。
[Advantages of the access control unit 33 substituting access to the I / O port when an exception occurs]
Since the hypervisor 31 analyzes instructions executed by the systems 1 and 2, when access to the I / O port 20 is detected, it is possible to access the I / O port 20 without waiting for an exception to occur. It is. In this case, a method for prohibiting access to the I / O port 20 in the user mode by the memory protection mechanism 32 and a method for prohibiting the access can be considered. The method that does not prohibit the access to the I / O port 20 is not preferable because there is a possibility that the I / O port 20 may be accessed due to the addition of an unexpected program.

I/Oポート20へのアクセスを禁止する方法では、I/Oポート20へのアクセスを検出した場合、特権モードに切り替える処理等をハイパーバイザ32に記述する必要が生じ、ハイパーバイザ31の修正が必要になってしまう(ハイパーバイザ31の汎用性が低下してしまう。)。これに対し、例外発生によりアクセス制御部33がI/Oポート20にアクセスする場合、ハイパーバイザ32に例外処理用のモジュールを追加すればよいので、ハイパーバイザ33の汎用性が低下しにくいというメリットがある。   In the method of prohibiting access to the I / O port 20, when access to the I / O port 20 is detected, it is necessary to describe processing for switching to the privileged mode in the hypervisor 32, and the hypervisor 31 is corrected. (The versatility of the hypervisor 31 is reduced.) On the other hand, when the access control unit 33 accesses the I / O port 20 due to the occurrence of an exception, it is only necessary to add an exception processing module to the hypervisor 32. Therefore, the merit that the versatility of the hypervisor 33 is unlikely to deteriorate. There is.

したがって、本実施例の手法が好適であるが、I/Oポート20へのアクセスを検出した場合に、例外発生を待つことなくI/Oポート20にアクセスすることも可能である。   Therefore, although the method of this embodiment is suitable, it is also possible to access the I / O port 20 without waiting for the occurrence of an exception when the access to the I / O port 20 is detected.

〔動作手順〕
図9(a)はマイコン100の動作手順を示すフローチャート図の一例を、図9(b)はマイコン100の動作を矢印で示す図の一例である。なお、図9(a)と図9(b)の括弧付きの番号は互いに対応している。
[Operation procedure]
FIG. 9A is an example of a flowchart showing an operation procedure of the microcomputer 100, and FIG. 9B is an example of an arrow showing the operation of the microcomputer 100. Note that the numbers in parentheses in FIGS. 9A and 9B correspond to each other.

まず、ハイパーバイザ31は例えば起動時にユーザモードにおけるI/Oポート20へのアクセスを禁止する(S10)。この後、システム1,2がハイパーバイザ31上で実行される。   First, the hypervisor 31 prohibits access to the I / O port 20 in the user mode at the time of startup, for example (S10). Thereafter, the systems 1 and 2 are executed on the hypervisor 31.

例えばシステム1がI/Oポート20にアクセスする命令を実行したものとする(S20)。   For example, it is assumed that the system 1 executes an instruction to access the I / O port 20 (S20).

メモリ保護機構32はアクセス違反を検出して例外を発生させる(S30)。例外の発生は、CPU11が例外発生時に実行するプログラムの実行によりハイパーバイザ31に通知される。   The memory protection mechanism 32 detects an access violation and generates an exception (S30). The occurrence of an exception is notified to the hypervisor 31 by the execution of a program executed by the CPU 11 when the exception occurs.

ハイパーバイザ31のアクセス制御部33は、メモリ保護機構32からアクセスに関する以下の情報を取得する(S40)。
・アクセス違反が発生したI/Oポートの物理アドレス
・システムが書き込む予定のデータ(又はそのアドレス)
・例外を発生させたプログラムのアドレス
そして、システム実行情報35又はステップ40で取得した情報に基づき実行中のシステム及びI/Oポート20を特定する(S50)。
The access control unit 33 of the hypervisor 31 acquires the following information regarding access from the memory protection mechanism 32 (S40).
-Physical address of the I / O port where the access violation occurred-Data to be written by the system (or its address)
The address of the program that generated the exception Then, the system being executed and the I / O port 20 are identified based on the system execution information 35 or the information acquired in step 40 (S50).

なお、例外の発生により、ハイパーバイザ31は少なくとも例外を発生させたシステム1のエミュレーションを停止し、システム1のコンテキスト(エミュレート内容)を退避しておく。これにより、システム1はI/Oポート20へのアクセスを行った後は命令を実行しない。   When an exception occurs, the hypervisor 31 stops at least the emulation of the system 1 that caused the exception, and saves the context (emulated contents) of the system 1. As a result, the system 1 does not execute the instruction after accessing the I / O port 20.

アクセス制御部33は、特定したシステム1がI/Oポート20へのアクセス権を有するか否かを、I/Oアクセス管理情報34を参照することで判定する(S60)。   The access control unit 33 determines whether or not the identified system 1 has an access right to the I / O port 20 by referring to the I / O access management information 34 (S60).

システム1がI/Oポート20へのアクセス権を有している場合(S60のYes)、アクセス制御部33はシステム1の代わりにI/Oポート20へアクセスする(S70)。アクセス制御部33は、プログラムカウンタに設定されているアドレスから、システムが実行した命令を特定し、その命令を実行する。システムが実行した命令そのものを実行するのではなく、データの記憶元を該命令から特定し、そのデータをI/Oポート20に書き込む命令を実行してもよい。これにより、システム1がI/Oポート20にアクセスしようとした命令をハイパーバイザ31が実行できる。   When the system 1 has an access right to the I / O port 20 (Yes in S60), the access control unit 33 accesses the I / O port 20 instead of the system 1 (S70). The access control unit 33 identifies an instruction executed by the system from the address set in the program counter, and executes the instruction. Instead of executing the instruction itself executed by the system, an instruction for specifying the data storage source from the instruction and writing the data to the I / O port 20 may be executed. As a result, the hypervisor 31 can execute an instruction for the system 1 to access the I / O port 20.

I/Oポート20へのアクセスが書き込みだった場合、ハイパーバイザ31はシステム1の代わりにI/Oポート20にアクセスした後、コンテキストを復帰させる。これにより、システム1は、例外の発生後の命令から実行を再開できる。   When the access to the I / O port 20 is writing, the hypervisor 31 accesses the I / O port 20 instead of the system 1 and then returns the context. As a result, the system 1 can resume execution from the instruction after the occurrence of the exception.

I/Oポート20へのアクセスが読み出しだった場合、ハイパーバイザ31はシステム1の代わりにI/Oポート20にアクセスした後、DMACからの割込みを待つ。DMACはメモリ保護機構32が出力した物理アドレスのI/Oポート20にアクセスして、I/Oポート20の受信バッファからデータを読み出しRAMに書き込む。DMACは、I/Oポート20からRAMへの転送が終了するとCPU11に受信割り込みするので、その割り込みによりハイパーバイザ31は中断したシステム1のコンテキストを復帰させる。システム1は、例外の発生後の命令から実行を再開し、I/Oポート20から読み出されたデータをRAMから読み出すことができる。   When the access to the I / O port 20 is read, the hypervisor 31 accesses the I / O port 20 instead of the system 1 and then waits for an interrupt from the DMAC. The DMAC accesses the I / O port 20 of the physical address output from the memory protection mechanism 32, reads data from the reception buffer of the I / O port 20, and writes it to the RAM. When the DMAC completes the transfer from the I / O port 20 to the RAM, the DMAC interrupts the CPU 11 so that the hypervisor 31 restores the interrupted context of the system 1 by the interrupt. The system 1 can resume execution from the instruction after the occurrence of the exception, and read data read from the I / O port 20 from the RAM.

システム1がI/Oポート20へのアクセス権を有していない場合(S60のNo)、アクセス制御部33はシステム1にアクセス違反を通知する(S80)。すなわち、例外ハンドラを実行させ、実行後、ハイパーバイザ31は中断したシステム1のコンテキストを復帰させる。これにより、システム1は統合前と同様にアクセス違反を検出できる。   When the system 1 does not have the access right to the I / O port 20 (No in S60), the access control unit 33 notifies the system 1 of an access violation (S80). That is, the exception handler is executed, and after execution, the hypervisor 31 returns the interrupted context of the system 1. Thereby, the system 1 can detect an access violation as before the integration.

以上のように、本実施例のマイコン100は、統合前にアクセスするI/Oポート20が定められている複数のシステム1,2を1つのマイコン100に統合した場合、アクセス制御部33がI/Oポート20へのアクセスを制御する。よって、システム1,2のアクセス違反を防止できる。システム1,2には変更が必要なく、新たなハードウェアの追加も必要ない。また、統合対象のシステムが増加しても、アクセス制御部33やメモリ保護機構32の設定を修正するだけで対応することができる。   As described above, in the microcomputer 100 according to the present embodiment, when a plurality of systems 1 and 2 in which the I / O ports 20 to be accessed before integration are integrated into one microcomputer 100, the access control unit 33 is Controls access to the / O port 20. Therefore, the access violation of the systems 1 and 2 can be prevented. There is no need to change the systems 1 and 2 and no additional hardware is required. Moreover, even if the number of systems to be integrated increases, it can be dealt with by simply modifying the settings of the access control unit 33 and the memory protection mechanism 32.

本実施例ではシステムの優先度に基づきシステム1,2のアクセスを制御するマイコン100について説明する。   In this embodiment, a microcomputer 100 that controls access to the systems 1 and 2 based on the priority of the system will be described.

機能ブロック図は実施例1の図6と同様である。しかし、本実施例のアクセス制御部33はシステム1,2の優先度に基づき、優先度の高い方のシステムのI/Oポート20へのアクセスを優先する。このような優先制御は、異なるシステム1,2が同じI/Oポート20にアクセスする場合に有効である。   The functional block diagram is the same as FIG. 6 of the first embodiment. However, the access control unit 33 according to the present embodiment gives priority to access to the I / O port 20 of the higher priority system based on the priorities of the systems 1 and 2. Such priority control is effective when different systems 1 and 2 access the same I / O port 20.

システム1、2の優先度は統合時に開発者等に既知の場合と、アクセス制御部33が動的に決定する場合がある。ASILに基づき優先度を決定する場合、ASIL QM<A<B<C<Dの順に優先度が高い。したがって、開発者等がアクセス制御部33にシステム1,2の優先度を予め設定しておくことができる。   The priorities of the systems 1 and 2 may be known to a developer or the like at the time of integration, or may be determined dynamically by the access control unit 33. When determining the priority based on ASIL, the priority is higher in the order of ASIL QM <A <B <C <D. Therefore, a developer or the like can set the priorities of the systems 1 and 2 in the access control unit 33 in advance.

優先度を動的に決定する場合、例えば、アクセス違反の頻度から決定する。ASILが高いシステムは高度に設計・検証が行われているので、アクセス違反することが少ない。したがって、アクセス違反が少ないシステムは優先度が高いシステムであることが推定される。アクセス制御部33は、図8のアクセス履歴テーブルを参照して、過去の全て又は所定時間のアクセス違反の頻度に基づき各システムの優先度を動的に決定する。   When the priority is dynamically determined, for example, it is determined from the frequency of access violation. A system with a high ASIL is highly designed and verified, so there are few access violations. Therefore, it is estimated that a system with few access violations is a system with high priority. The access control unit 33 refers to the access history table of FIG. 8 and dynamically determines the priority of each system based on the frequency of all past or predetermined time access violations.

そして、アクセス制御部33は、システム1,2の過去のアクセス履歴に基づき、次のアクセスタイミングを予測する。   Then, the access control unit 33 predicts the next access timing based on the past access history of the systems 1 and 2.

図10は、アクセスタイミングの予測を説明する図の一例である。システムが同じI/Oポート20にアクセスする周期をアクセス間隔Ta、I/Oポート20を占有する時間をアクセス時間Tbとする。図示するように、システム1のアクセス間隔はTa1、システム2のアクセス間隔はTa2,システム1アクセス時間はTb1、システム2のアクセス時間はTb2、である。本実施例では優先度の高いシステム1を優先すればよいので、システム1のアクセス間隔Ta1と、システム2のアクセス時間Tb2とが特定できていればよい。よって、システム2のアクセス間隔Tbは不定期でもよい。   FIG. 10 is an example of a diagram illustrating prediction of access timing. A cycle in which the system accesses the same I / O port 20 is defined as an access interval Ta, and a time during which the system occupies the I / O port 20 is defined as an access time Tb. As shown in the figure, the access interval of the system 1 is Ta1, the access interval of the system 2 is Ta2, the system 1 access time is Tb1, and the access time of the system 2 is Tb2. In the present embodiment, since the system 1 having a higher priority may be given priority, it is sufficient that the access interval Ta1 of the system 1 and the access time Tb2 of the system 2 can be specified. Therefore, the access interval Tb of the system 2 may be irregular.

システム1のアクセス間隔Ta1に規則性があるので、アクセス制御部33はシステム1のアクセスタイミングを予測できる。すなわち、時刻t1にシステム1がアクセスした場合、次回のアクセスタイミングは「時刻t2=時刻t1+アクセス間隔Ta1」、時刻t2にシステム1がアクセスした場合、次回のアクセスタイミングは「時刻t4=時刻t2+アクセス間隔Ta1」である。   Since the access interval Ta1 of the system 1 has regularity, the access control unit 33 can predict the access timing of the system 1. That is, when the system 1 accesses at time t1, the next access timing is “time t2 = time t1 + access interval Ta1,” and when the system 1 accesses at time t2, the next access timing is “time t4 = time t2 + access. Interval Ta1 ”.

例えば、時刻t3に、優先度が低いシステム2がI/Oポート20にアクセスした場合、実施例1にて説明したように、アクセス制御部33は例外の発生によりアクセス要求を検出する。アクセス制御部33はシステム2によるI/Oポート20の占有が、システム1がアクセスするまでに完了するか否かを判定する。具体的には以下を判定する。
時刻t4>現在時刻+アクセス時間Tb2
時刻t4の方が、「現在時刻+アクセス時間Tb2」よりも大きい場合、システム2によるI/Oポート20のアクセスは、システム1がI/Oポート20にアクセスを開始するまでに完了する。この場合、アクセス制御部33はシステム2のアクセス要求を、待機することなく実行する。
For example, when the system 2 with low priority accesses the I / O port 20 at time t3, as described in the first embodiment, the access control unit 33 detects an access request due to the occurrence of an exception. The access control unit 33 determines whether or not the occupation of the I / O port 20 by the system 2 is completed before the system 1 accesses. Specifically, the following is determined.
Time t4> current time + access time Tb2
When the time t4 is larger than “current time + access time Tb2”, the access of the I / O port 20 by the system 2 is completed before the system 1 starts accessing the I / O port 20. In this case, the access control unit 33 executes the access request of the system 2 without waiting.

時刻t4の方が、「現在時刻+アクセス時間Tb2」よりも大きくない場合、システム2によるI/Oポート20のアクセスは、システム1がI/Oポート20にアクセスを開始するまでに完了しない。この場合、アクセス制御部33は、システム1のI/Oポート20のアクセスを優先するため、システム2のアクセス要求を、システム1のアクセスが完了するまで待機させる。こうすることで、統合によりシステム1,2が同じI/Oポート20にアクセスする状況が生じても、優先が高いシステム1を優先できる。   When the time t4 is not greater than the “current time + access time Tb2”, the access to the I / O port 20 by the system 2 is not completed until the system 1 starts accessing the I / O port 20. In this case, the access control unit 33 puts the access request of the system 2 on standby until the access of the system 1 is completed in order to give priority to the access of the I / O port 20 of the system 1. By doing so, even if a situation occurs in which the systems 1 and 2 access the same I / O port 20 due to the integration, the system 1 with higher priority can be given priority.

図11(a)はマイコン100の動作手順を示すフローチャート図の一例を、図11(b)はマイコン100の動作を矢印で示す図の一例である。なお、図11(a)と図11(b)の括弧付きの番号は互いに対応している。   FIG. 11A is an example of a flowchart showing an operation procedure of the microcomputer 100, and FIG. 11B is an example of an arrow showing the operation of the microcomputer 100. The numbers in parentheses in FIGS. 11 (a) and 11 (b) correspond to each other.

図11の手順のうちステップS10〜S60までの処理は図9と同様であるが、本実施例では優先度が低いシステム2がアクセスするものとする。特定したシステム2がI/Oポート20へのアクセス権を有していない場合、実施例1と同様にアクセス制御部33はアクセス違反を通知する(S80)。   The processing from step S10 to step S60 in the procedure of FIG. 11 is the same as that in FIG. 9, but in this embodiment, it is assumed that the system 2 with low priority accesses. When the identified system 2 does not have the access right to the I / O port 20, the access control unit 33 notifies an access violation as in the first embodiment (S80).

特定したシステム2がI/Oポート20へのアクセス権を有している場合(S60のYes)、アクセス制御部33は、アクセス履歴テーブルにより、システム1のアクセス間隔Ta1と、システム2のアクセス時間Tb2を特定する(S62)。アクセス間隔やアクセス時間は、予め更新されていることが好ましいが、アクセス要求がある度に算出してもよい。   When the identified system 2 has an access right to the I / O port 20 (Yes in S60), the access control unit 33 uses the access history table to determine the access interval Ta1 of the system 1 and the access time of the system 2. Tb2 is specified (S62). The access interval and access time are preferably updated in advance, but may be calculated each time there is an access request.

アクセス制御部33は、システム2よりも優先度が高いシステム1が、システム2のアクセス完了までにI/Oポート20にアクセスするか否かを判定する(S64)。   The access control unit 33 determines whether the system 1 having a higher priority than the system 2 accesses the I / O port 20 before the access of the system 2 is completed (S64).

システム2のアクセス完了までにシステム1がI/Oポート20にアクセスしない場合(S64のNo)、アクセス制御部33はシステム2の代わりにI/Oポート20へアクセスする(S82)。   When the system 1 does not access the I / O port 20 until the access of the system 2 is completed (No in S64), the access control unit 33 accesses the I / O port 20 instead of the system 2 (S82).

システム2のアクセス完了までにシステム1がI/Oポート20にアクセスする場合(S64のYes)、アクセス制御部33はシステム2のアクセスよりもシステム1のアクセスを先に行い、その後、システム2の代わりにI/Oポート20へアクセスする(S84)。   When the system 1 accesses the I / O port 20 by the completion of the access of the system 2 (Yes in S64), the access control unit 33 performs the access of the system 1 before the access of the system 2, and then the system 2 Instead, the I / O port 20 is accessed (S84).

こうすることで、優先度の異なるシステムが同じI/Oポート20を共有する場合、優先度の高いシステムを優先することができ、システム1は統合前と同程度のタイミングでI/Oポート20にアクセスすることが可能になる。   In this way, when systems with different priorities share the same I / O port 20, it is possible to prioritize a system with a higher priority, and the system 1 has the same timing as before the integration. Can be accessed.

以上説明したように、本実施例のマイコン100によれば、実施例1の効果に加え、優先度が高いシステム1のI/Oポート20のアクセスを優先度が低いシステム2よりも優先できる。   As described above, according to the microcomputer 100 of this embodiment, in addition to the effects of the first embodiment, the access of the I / O port 20 of the system 1 having a high priority can be given priority over the system 2 having a low priority.

31 ハイパーバイザ
32 メモリ保護機構
33 アクセス制御部
34 I/Oアクセス管理情報
35 システム実行情報
100 マイコン
31 Hypervisor 32 Memory Protection Mechanism 33 Access Control Unit 34 I / O Access Management Information 35 System Execution Information 100 Microcomputer

Claims (8)

複数のプログラムが記憶されたプログラム記憶手段と、
前記プログラムを実行する1つ以上の演算手段と、
外部の回路と通信可能な複数のインタフェースと、を有する情報処理装置であって、
前記プログラムがアクセス可能な前記インタフェースが登録されたインタフェース登録テーブルと、
前記インタフェースにアクセス要求した前記プログラムが、前記インタフェースにアクセスすることが許可されている場合、前記プログラムの代わりに前記インタフェースにアクセスするアクセス制御手段と、
を有する情報処理装置。
Program storage means for storing a plurality of programs;
One or more computing means for executing the program;
An information processing apparatus having a plurality of interfaces capable of communicating with an external circuit,
An interface registration table in which the interface accessible by the program is registered;
When the program that requested access to the interface is permitted to access the interface, access control means for accessing the interface instead of the program;
An information processing apparatus.
複数の前記プログラムのそれぞれが前記インタフェースにアクセスすることを禁止するアクセス禁止手段を有し、
前記アクセス制御手段は、前記アクセス禁止手段から前記プログラムが前記インタフェースにアクセス要求したことを検出する、
ことを特徴とする請求項1記載の情報処理装置。
Access prohibiting means for prohibiting each of the plurality of programs from accessing the interface;
The access control means detects from the access prohibition means that the program has requested access to the interface;
The information processing apparatus according to claim 1.
前記インタフェースにアクセスした前記プログラム及び前記インタフェースを識別するためのプログラム識別情報を有し、
前記アクセス制御手段は、前記プログラムが前記インタフェースにアクセス要求した際、前記プログラム識別情報に基づき、前記プログラム及び前記インタフェースを特定する、
ことを特徴とする請求項1又は2記載の情報処理装置。
Having program identification information for identifying the program accessing the interface and the interface;
The access control means specifies the program and the interface based on the program identification information when the program requests access to the interface.
The information processing apparatus according to claim 1 or 2.
前記プログラム識別情報は、前記アクセス禁止手段が、前記プログラムが前記インタフェースにアクセス要求したことを検出した際に前記演算手段が実行していた前記プログラムのアドレスである、
ことを特徴とする請求項3記載の情報処理装置。
The program identification information is an address of the program executed by the arithmetic unit when the access prohibition unit detects that the program requests access to the interface.
The information processing apparatus according to claim 3.
複数の前記プログラムが同じ前記インタフェースにアクセスする場合、
前記アクセス制御手段は、第一のプログラムによる前記インタフェースへのアクセスが、前記第一のプログラムよりも優先度が低い第二のプログラムにより待機状態となることを予測した場合、前記第二のプログラムの前記インタフェースへのアクセスを行う前に、前記第一のプログラムの前記インタフェースへのアクセスを行い、前記第一のプログラムの前記インタフェースへのアクセスが完了した後、前記第二のプログラムの前記インタフェースへのアクセスを行う、
ことを特徴とする請求項1〜4いずれか1項記載の情報処理装置。
When a plurality of the programs access the same interface,
When the access control means predicts that access to the interface by the first program is in a standby state by a second program having a lower priority than the first program, the access control means Before accessing the interface, the interface of the first program is accessed, and after the access of the first program to the interface is completed, the interface of the second program to the interface is completed. Access,
The information processing apparatus according to claim 1, wherein the information processing apparatus is an information processing apparatus.
前記アクセス制御手段は、前記インタフェースにアクセス要求した前記プログラム及びアクセスが許可されたか否かを記録しておき、アクセスが許可されていないという記録が多い方の前記プログラムの優先度が、アクセスが許可されていないという記録が少ない前記プログラムよりも低いと決定する、
ことを特徴とする請求項5記載の情報処理装置。
The access control means records the program that has requested access to the interface and whether or not access is permitted, and the priority of the program that has more records that access is not permitted is permitted to access. It is determined that the record is not lower than the program with less records,
The information processing apparatus according to claim 5.
前記アクセス制御手段は、前記プログラムが動作していた個々のハードウェアをエミュレートするハイパーバイザが有する機能であり、
前記ハイパーバイザは、複数の前記プログラムの各命令を解析した結果に基づき、前記ハードウェア上で前記プログラムが実行された場合の前記ハードウェアのメモリ、CPUのレジスタ、及び、入出力インタフェースのエミュレート状態を更新することで、複数の前記プログラムを実行する、
ことを特徴とする請求項1〜6いずれか1項記載の情報処理装置。
The access control means is a function of a hypervisor that emulates individual hardware in which the program was operating,
The hypervisor emulates the hardware memory, the CPU register, and the input / output interface when the program is executed on the hardware based on the result of analyzing each instruction of the plurality of programs. Executing a plurality of the programs by updating the state;
The information processing apparatus according to claim 1, wherein:
複数のプログラムが記憶されたプログラム記憶手段と、
前記プログラムを実行する1つ以上の演算手段と、
外部の回路と通信可能な複数のインタフェースと、を有する情報処理装置のインタフェースアクセス方法であって、
アクセス制御手段が、前記プログラムがアクセス可能な前記インタフェースが登録されたインタフェース登録テーブルを参照して、前記インタフェースにアクセス要求した前記プログラムが、前記インタフェースにアクセスすることが許可されている場合、前記プログラムの代わりに前記インタフェースにアクセスする、
インタフェースアクセス方法。
Program storage means for storing a plurality of programs;
One or more computing means for executing the program;
An interface access method for an information processing apparatus having a plurality of interfaces capable of communicating with an external circuit,
When the access control means refers to the interface registration table in which the interface accessible by the program is registered, the program that has requested access to the interface is permitted to access the interface. Access the interface instead of
Interface access method.
JP2012023447A 2012-02-06 2012-02-06 Information processing apparatus and interface access method Pending JP2013161299A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012023447A JP2013161299A (en) 2012-02-06 2012-02-06 Information processing apparatus and interface access method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012023447A JP2013161299A (en) 2012-02-06 2012-02-06 Information processing apparatus and interface access method

Publications (1)

Publication Number Publication Date
JP2013161299A true JP2013161299A (en) 2013-08-19

Family

ID=49173480

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012023447A Pending JP2013161299A (en) 2012-02-06 2012-02-06 Information processing apparatus and interface access method

Country Status (1)

Country Link
JP (1) JP2013161299A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015025597A1 (en) * 2013-08-22 2015-02-26 日立オートモティブシステムズ株式会社 Vehicle control device
WO2015045507A1 (en) * 2013-09-30 2015-04-02 日立オートモティブシステムズ株式会社 Vehicular control device
WO2017056725A1 (en) * 2015-09-30 2017-04-06 日立オートモティブシステムズ株式会社 In-vehicle control device
CN106716617A (en) * 2014-09-19 2017-05-24 东京毅力科创株式会社 Substrate transportation method and processing system
JP2017204286A (en) * 2017-06-28 2017-11-16 日立オートモティブシステムズ株式会社 Vehicle control device
JP2017207952A (en) * 2016-05-19 2017-11-24 日本電信電話株式会社 Processing device, access control method, and access control program
JP2021111083A (en) * 2020-01-09 2021-08-02 株式会社デンソー Electronic control device
JP2022085863A (en) * 2020-11-27 2022-06-08 株式会社デンソー Electronic controls, software update methods, software updates, and electronic control systems
JP2022085862A (en) * 2020-11-27 2022-06-08 株式会社デンソー Electronic controls, software update methods, software updates, and electronic control systems
WO2023119652A1 (en) * 2021-12-24 2023-06-29 日立Astemo株式会社 Electronic control device and access control method

Cited By (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015039983A (en) * 2013-08-22 2015-03-02 日立オートモティブシステムズ株式会社 Vehicle control device
CN105636832A (en) * 2013-08-22 2016-06-01 日立汽车系统株式会社 Vehicle control device
US9610906B2 (en) 2013-08-22 2017-04-04 Hitachi Automotive Systems, Ltd. Vehicle control device
CN105636832B (en) * 2013-08-22 2017-06-23 日立汽车系统株式会社 Controller of vehicle
WO2015025597A1 (en) * 2013-08-22 2015-02-26 日立オートモティブシステムズ株式会社 Vehicle control device
WO2015045507A1 (en) * 2013-09-30 2015-04-02 日立オートモティブシステムズ株式会社 Vehicular control device
JP2015067107A (en) * 2013-09-30 2015-04-13 日立オートモティブシステムズ株式会社 Vehicle control device
CN106716617A (en) * 2014-09-19 2017-05-24 东京毅力科创株式会社 Substrate transportation method and processing system
CN106716617B (en) * 2014-09-19 2020-02-07 东京毅力科创株式会社 Substrate transfer method and processing system
US10552368B2 (en) 2015-09-30 2020-02-04 Hitachi Automotive Systems, Ltd. In-vehicle control device
WO2017056725A1 (en) * 2015-09-30 2017-04-06 日立オートモティブシステムズ株式会社 In-vehicle control device
JPWO2017056725A1 (en) * 2015-09-30 2018-03-15 日立オートモティブシステムズ株式会社 In-vehicle control device
JP2017207952A (en) * 2016-05-19 2017-11-24 日本電信電話株式会社 Processing device, access control method, and access control program
JP2017204286A (en) * 2017-06-28 2017-11-16 日立オートモティブシステムズ株式会社 Vehicle control device
JP2021111083A (en) * 2020-01-09 2021-08-02 株式会社デンソー Electronic control device
JP7322715B2 (en) 2020-01-09 2023-08-08 株式会社デンソー electronic controller
JP2022085863A (en) * 2020-11-27 2022-06-08 株式会社デンソー Electronic controls, software update methods, software updates, and electronic control systems
JP2022085862A (en) * 2020-11-27 2022-06-08 株式会社デンソー Electronic controls, software update methods, software updates, and electronic control systems
JP7707864B2 (en) 2020-11-27 2025-07-15 株式会社デンソー Electronic control device, software update method, software update program, and electronic control system
JP7707863B2 (en) 2020-11-27 2025-07-15 株式会社デンソー Electronic control device, software update method, software update program, and electronic control system
WO2023119652A1 (en) * 2021-12-24 2023-06-29 日立Astemo株式会社 Electronic control device and access control method
JPWO2023119652A1 (en) * 2021-12-24 2023-06-29
JP7751660B2 (en) 2021-12-24 2025-10-08 Astemo株式会社 Electronic control device and access control method

Similar Documents

Publication Publication Date Title
JP2013161299A (en) Information processing apparatus and interface access method
CN109643290B (en) Techniques for object-oriented memory management with extended segmentation
JP5914145B2 (en) Memory protection circuit, processing device, and memory protection method
JP5870206B2 (en) Efficient memory and resource management
CN104685479B (en) Virtual input/output memory management unit in guest virtual machine
US8595487B2 (en) Virtualization hardware for device driver isolation
EP1966706B1 (en) Identifier associated with memory locations for managing memory accesses
GB2531844B (en) Hardware-protective data processing systems and methods using an application executing in a secure domain
US20120331465A1 (en) Virtual machine system, virtual machine control method, virtual machine control application, and semiconductor integrated circuit
JP4668166B2 (en) Method and apparatus for guest to access memory converted device
JPH11149385A (en) Multi-OS configuration method
CN118210622B (en) A memory allocation method and computing device
CN103778099B (en) Information processing equipment
JPWO2010097925A1 (en) Information processing device
JP2009009232A (en) Computer and kernel protection method and computer software
JP6679419B2 (en) Memory protection unit, memory management unit, and microcontroller
JP2016018555A (en) Operating environment switching method, computer, and computer program
US7523229B2 (en) Memory protection during direct memory access
JP5999216B2 (en) Data processing device
GB2537760A (en) Computer, and resource scheduling method using hypervisor
JP5925288B2 (en) Computer, access management method and access management program
JP2014074995A (en) Information processor
EP4372551A1 (en) Virtual machine management method and related system, and storage medium
Farrall et al. Hardware and software support for mixed-criticality multicore systems
JP5703505B2 (en) Computer with bus partition structure