JP2017054243A - Driver device, information processing system, program, and method - Google Patents

Driver device, information processing system, program, and method Download PDF

Info

Publication number
JP2017054243A
JP2017054243A JP2015176678A JP2015176678A JP2017054243A JP 2017054243 A JP2017054243 A JP 2017054243A JP 2015176678 A JP2015176678 A JP 2015176678A JP 2015176678 A JP2015176678 A JP 2015176678A JP 2017054243 A JP2017054243 A JP 2017054243A
Authority
JP
Japan
Prior art keywords
world
module
unit
interrupt
processor
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.)
Granted
Application number
JP2015176678A
Other languages
Japanese (ja)
Other versions
JP6462540B2 (en
Inventor
遵 金井
Jun Kanai
遵 金井
橋本 幹生
Mikio Hashimoto
幹生 橋本
佐々木 俊介
Shunsuke Sasaki
俊介 佐々木
伸太郎 佐野
Shintaro Sano
伸太郎 佐野
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2015176678A priority Critical patent/JP6462540B2/en
Publication of JP2017054243A publication Critical patent/JP2017054243A/en
Application granted granted Critical
Publication of JP6462540B2 publication Critical patent/JP6462540B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Stored Programmes (AREA)

Abstract

PROBLEM TO BE SOLVED: To directly operate a first operating system on a processor, to directly operate a monitor on the processor after that, and to operate the first operating system and a second operating system on the monitor.SOLUTION: A processor operates as a first operating system in a first world after booting. A driver device operates under the management of the first operating system. The driver device loads a monitor module and a second OS module to a main memory, copies a memory map of the first world to set the memory map in a second world, copies an interruption destination address of the first world to set the interruption destination address in the second world, sets the address of an interruption handler of the second operating system in the first world, and sets the memory map for executing the monitor module and the second OS module in the first world.SELECTED DRAWING: Figure 5

Description

本発明の実施形態は、ドライバ装置、情報処理システム、プログラムおよび方法に関する。   Embodiments described herein relate generally to a driver device, an information processing system, a program, and a method.

近年、単一の情報処理装置で複数のオペレーティングシステムを並行して動作させるための仮想化技術が知られている。複数のオペレーティングシステムを並行して動作させるためのバーチャルマシンは、モニタ(またはハイパーバイザ)等と呼ばれる。モニタには、プロセッサ上で直接動作するタイプ(タイプ1)と、オペレーティングシステム上のアプリケーションとして動作するタイプ(タイプ2)とが知られている。   In recent years, a virtualization technology for operating a plurality of operating systems in parallel on a single information processing apparatus is known. A virtual machine for operating a plurality of operating systems in parallel is called a monitor (or hypervisor) or the like. As a monitor, a type that directly operates on a processor (type 1) and a type that operates as an application on an operating system (type 2) are known.

タイプ1のモニタは、通常、オペレーティングシステムが動作する前に起動する。このため、従来、タイプ1のモニタを更新したり、タイプ1のモニタの機能を一時的に無効にしたりすることは困難であった。   Type 1 monitors typically start before the operating system is operational. For this reason, conventionally, it has been difficult to update the type 1 monitor or to temporarily disable the function of the type 1 monitor.

特開2014−241172号公報JP 2014-241172 A 特開2005−327279号公報JP 2005-327279 A 特開2006−042289号公報JP 2006-042289 A

本発明が解決しようとする課題は、第1オペレーティングシステムをプロセッサ上で直接動作させ、その後に、プロセッサ上でモニタを直接動作させるとともに、モニタ上で第1オペレーティングシステムおよび第2オペレーティングシステムを動作させた状態に移行することにある。   The problem to be solved by the present invention is to operate the first operating system directly on the processor, and then operate the monitor directly on the processor and operate the first operating system and the second operating system on the monitor. It is to shift to the state.

実施形態に係るドライバ装置は、第1ワールドと第2ワールドとで異なるメモリマップを用いてメインメモリにアクセスするプロセッサがドライバモジュールを実行することにより動作する。前記プロセッサは、ブート後において、第1ワールドで、第1OSモジュールを実行することにより第1オペレーティングシステムとして動作する。前記ドライバ装置は、前記第1オペレーティングシステムの管理の下で動作する。前記ドライバ装置は、モジュールロード部と、第1メモリマップ設定部と、第2割込設定部と、第2メモリマップ設定部と、を備える。記モジュールロード部は、前記プロセッサをバーチャルマシンであるモニタとして動作させるためのプログラムであるモニタモジュール、および、前記プロセッサを第2オペレーティングシステムとして動作させるためのプログラムである第2OSモジュールを、前記メインメモリの空領域にロードする。前記第1メモリマップ設定部は、メモリ管理ユニットにより管理されている第1ワールドのメモリマップをコピーして、第2ワールドのメモリマップとしてメモリ管理ユニットに設定する。記第1割込設定部は、割込制御ユニットにより管理されている第1ワールドの割込先アドレスをコピーして、第2ワールドの割込先アドレスとしてメモリ管理ユニットに設定する。記第2割込設定部は、前記第2オペレーティングシステムの割込ハンドラのアドレスを、第1ワールドの割込先アドレスとして前記割込制御ユニットに設定する。前記第2メモリマップ設定部は、前記モニタモジュールおよび前記第2OSモジュールを実行するためのメモリマップを、第1ワールドのメモリマップとして前記メモリ管理ユニットに設定する。   The driver device according to the embodiment operates when a processor that accesses the main memory using different memory maps in the first world and the second world executes the driver module. The processor operates as the first operating system by executing the first OS module in the first world after booting. The driver device operates under the management of the first operating system. The driver device includes a module load unit, a first memory map setting unit, a second interrupt setting unit, and a second memory map setting unit. The module load unit includes a monitor module, which is a program for operating the processor as a monitor that is a virtual machine, and a second OS module, which is a program for operating the processor as a second operating system, in the main memory. Load into the empty area of. The first memory map setting unit copies the memory map of the first world managed by the memory management unit and sets it in the memory management unit as the memory map of the second world. The first interrupt setting unit copies the interrupt destination address of the first world managed by the interrupt control unit and sets it in the memory management unit as the interrupt destination address of the second world. The second interrupt setting unit sets the address of the interrupt handler of the second operating system in the interrupt control unit as the interrupt destination address of the first world. The second memory map setting unit sets a memory map for executing the monitor module and the second OS module as a first world memory map in the memory management unit.

第1実施形態に係る情報処理システムのハードウェア構成図。1 is a hardware configuration diagram of an information processing system according to a first embodiment. プロセッサのモードおよびワールドの関係を示す図。The figure which shows the mode of a processor, and the relationship of a world. ブート後におけるプロセッサの機能構成を示す図。The figure which shows the function structure of the processor after booting. デバイスドライバの実行後のプロセッサの機能構成を示す図。The figure which shows the function structure of the processor after execution of a device driver. 第1実施形態に係るデバイスドライバ52の機能構成を示す図。FIG. 3 is a diagram showing a functional configuration of a device driver 52 according to the first embodiment. メモリマップの第1例を示す図。The figure which shows the 1st example of a memory map. メモリマップの第2例を示す図。The figure which shows the 2nd example of a memory map. 割込先アドレスが設定されたテーブルを示す図。The figure which shows the table in which the interruption destination address was set. 割込が有効であるか無効であるかが設定されたテーブルを示す図。The figure which shows the table in which it was set whether interruption was effective or invalid. 割込ポート毎の割込先が設定されたテーブルを示す図。The figure which shows the table in which the interruption destination for every interruption port was set. 情報処理システムのブート後の処理フロー図。The processing flow figure after booting of an information processing system. メインメモリにロードされるプログラムの遷移を示す図。The figure which shows the transition of the program loaded into the main memory. 第1実施形態に係るデバイスドライバの処理フロー図。FIG. 5 is a processing flowchart of the device driver according to the first embodiment. 図13のステップS31の処理の詳細なフロー図。FIG. 14 is a detailed flowchart of the process in step S31 of FIG. 第2実施形態に係るデバイスドライバの機能構成を示す図。The figure which shows the function structure of the device driver which concerns on 2nd Embodiment. 第2実施形態に係るデバイスドライバの処理フロー図。FIG. 10 is a process flow diagram of a device driver according to a second embodiment. メインメモリにおける書き込みが禁止される領域を示す図。The figure which shows the area | region where writing in a main memory is prohibited. 第3実施形態に係るデバイスドライバの機能構成を示す図。The figure which shows the function structure of the device driver which concerns on 3rd Embodiment. 第3実施形態に係るデバイスドライバの処理フロー図。FIG. 10 is a process flow diagram of a device driver according to a third embodiment. 第4実施形態に係るデバイスドライバの機能構成を示す図。The figure which shows the function structure of the device driver which concerns on 4th Embodiment. 第4実施形態に係るデバイスドライバの処理フロー図。FIG. 10 is a process flow diagram of a device driver according to a fourth embodiment. 第5実施形態に係るデバイスドライバの機能構成を示す図。The figure which shows the function structure of the device driver which concerns on 5th Embodiment. 第5実施形態に係るデバイスドライバの処理フロー図。FIG. 10 is a process flow diagram of a device driver according to a fifth embodiment. 第6実施形態に係るプロセッサの機能構成を示す図。The figure which shows the function structure of the processor which concerns on 6th Embodiment. 第6実施形態に係る情報処理システムの処理フロー図。The processing flow figure of the information processing system concerning a 6th embodiment. 第7実施形態に係るデバイスドライバの機能構成を示す図。The figure which shows the function structure of the device driver which concerns on 7th Embodiment. 第7実施形態に係るデバイスドライバの処理フロー図。FIG. 10 is a process flow diagram of a device driver according to a seventh embodiment.

以下、実施形態に係る情報処理システムについて詳細に説明する。実施形態に係る情報処理システムは、第1オペレーティングシステムをプロセッサ上で直接動作させる。その後、情報処理システムは、バーチャルマシンであるモニタをプロセッサ上で直接動作させるとともに、モニタ上で第1オペレーティングシステムおよび第2オペレーティングシステムを動作させた状態に移行することを目的とする。なお、以下、複数の実施形態を説明するが、略同一の機能の構成要素には図面中に同一の符号を付けて重複した説明を省略する。   Hereinafter, the information processing system according to the embodiment will be described in detail. The information processing system according to the embodiment directly operates the first operating system on the processor. After that, the information processing system is intended to operate a monitor, which is a virtual machine, directly on the processor and to shift to a state in which the first operating system and the second operating system are operated on the monitor. In the following, a plurality of embodiments will be described, but components having substantially the same function are denoted by the same reference numerals in the drawings, and redundant description is omitted.

(第1実施形態)
図1は、第1実施形態に係る情報処理システム10のハードウェア構成図である。情報処理システム10は、情報処理装置20と、ストレージ22と、メインメモリ24と、ブートROM26とを備える。情報処理装置20、ストレージ22、メインメモリ24およびブートROM26は互いにバスにより接続される。
(First embodiment)
FIG. 1 is a hardware configuration diagram of an information processing system 10 according to the first embodiment. The information processing system 10 includes an information processing device 20, a storage 22, a main memory 24, and a boot ROM 26. The information processing device 20, the storage 22, the main memory 24, and the boot ROM 26 are connected to each other via a bus.

情報処理装置20は、プロセッサ30等を含むハードウェア装置であり、演算処理および制御処理を実行する。情報処理装置20は、例えば1つの半導体チップで実現されたSoCである。   The information processing device 20 is a hardware device including the processor 30 and the like, and executes arithmetic processing and control processing. The information processing apparatus 20 is, for example, an SoC realized with one semiconductor chip.

ストレージ22は、フラッシュメモリまたはハードディスク等の不揮発性の記憶装置である。ストレージ22は、情報処理装置20により実行されるプログラム(モジュール)を格納する。本実施形態においては、ストレージ22は、汎用OSモジュールおよびドライバモジュールを格納する。汎用OSモジュールおよびドライバモジュールについては詳細を後述する。   The storage 22 is a non-volatile storage device such as a flash memory or a hard disk. The storage 22 stores a program (module) executed by the information processing apparatus 20. In the present embodiment, the storage 22 stores a general-purpose OS module and a driver module. Details of the general-purpose OS module and the driver module will be described later.

メインメモリ24は、プログラムモジュールおよびデータを記憶する記憶装置である。メインメモリ24は、例えば、SDRAM(Synchronous Dynamic Random Access Memory)等であってよい。また、メインメモリ24は、MRAM(Magnetoresistive Random Access Memory)のような不揮発性の記憶装置であってもよい。メインメモリ24は、情報処理装置20に含まれるプロセッサ30の作業領域となる。   The main memory 24 is a storage device that stores program modules and data. The main memory 24 may be, for example, an SDRAM (Synchronous Dynamic Random Access Memory). The main memory 24 may be a non-volatile storage device such as an MRAM (Magnetoresistive Random Access Memory). The main memory 24 serves as a work area for the processor 30 included in the information processing apparatus 20.

ブートROM26は、情報処理装置20に含まれるプロセッサ30が、ブート後(電源投入後)において実行するブートプログラムを記憶する。情報処理装置20に含まれるプロセッサ30は、ブートプログラムを実行することにより、ストレージ22に格納されている汎用OSモジュールをメインメモリ24にロードして、汎用OSモジュールを実行する。   The boot ROM 26 stores a boot program that the processor 30 included in the information processing apparatus 20 executes after booting (after power-on). The processor 30 included in the information processing apparatus 20 executes the boot program to load the general-purpose OS module stored in the storage 22 into the main memory 24 and execute the general-purpose OS module.

情報処理装置20は、プロセッサ30と、ワールド制御ユニット32と、バンクレジスタ34と、メモリ管理ユニット36と、割込制御ユニット38とを有する。   The information processing apparatus 20 includes a processor 30, a world control unit 32, a bank register 34, a memory management unit 36, and an interrupt control unit 38.

プロセッサ30は、CPU(Central Processing Unit)、各種のレジスタおよび1次キャッシュ等を含み、メインメモリ24に記憶されたプログラム(モジュール)を実行する。プロセッサ30は、メインメモリ24を作業領域として用いる。プロセッサ30は、CPUコア等とも呼ばれる場合もある。   The processor 30 includes a central processing unit (CPU), various registers, a primary cache, and the like, and executes a program (module) stored in the main memory 24. The processor 30 uses the main memory 24 as a work area. The processor 30 may also be called a CPU core or the like.

本実施形態において、プロセッサ30は、レジスタの設定に応じて、セキュアワールド(第1ワールド)またはノンセキュアワールド(第2ワールド)の何れかの状態で動作する。また、本実施形態において、プロセッサ30は、レジスタの設定に応じて、モニタモード、OSモードまたはユーザモードの何れかのモードで動作する。ワールドおよびモードについては詳細を後述する。   In the present embodiment, the processor 30 operates in either a secure world (first world) or a non-secure world (second world) according to the register setting. In the present embodiment, the processor 30 operates in any one of the monitor mode, the OS mode, and the user mode according to the register setting. Details of the world and mode will be described later.

ワールド制御ユニット32は、プロセッサ30に含まれるレジスタの値を変更して、プロセッサ30の状態をセキュアワールドまたはノンセキュアワールドの何れかに設定する。また、ワールド制御ユニット32は、プロセッサ30に含まれるレジスタの値を変更して、プロセッサ30のモードを、モニタモード、OSモードまたはユーザモードの何れかに設定する。   The world control unit 32 changes the value of a register included in the processor 30 and sets the state of the processor 30 to either a secure world or a non-secure world. Further, the world control unit 32 changes the value of the register included in the processor 30 and sets the mode of the processor 30 to any one of the monitor mode, the OS mode, and the user mode.

バンクレジスタ34は、ワールド毎にレジスタ値を記憶できるレジスタである。すなわち、バンクレジスタ34には、セキュアワールドおよびノンセキュアワールドのそれぞれについてレジスタ値が設定される。プロセッサ30は、セキュアワールドとノンセキュアワールドとで同一のレジスタに対するアクセス命令を実行した場合でも、物理的に異なる格納位置にアクセスする。セキュアワールドとノンセキュアワールドで別々のオペレーティングシステムを動作させる場合には、プロセッサ30は、通常のレジスタに対しては、ワールド遷移の際にレジスタ値の待避、復帰をする。しかし、プロセッサ30は、バンクレジスタ34に対しては、セキュアワールドとノンセキュアワールドとでデータの物理的な格納場所が異なるので、ワールド遷移時にレジスタ値の待避、復帰をしなくてよい。これにより、プロセッサ30は、ワールド遷移を高速化することができる。   The bank register 34 is a register that can store a register value for each world. That is, register values are set in the bank register 34 for each of the secure world and the non-secure world. The processor 30 accesses a physically different storage location even when an access instruction to the same register is executed in the secure world and the non-secure world. When operating different operating systems in the secure world and the non-secure world, the processor 30 saves and restores the register value at the time of world transition for a normal register. However, the processor 30 does not need to save and restore the register value at the time of world transition because the physical storage locations of the bank register 34 are different between the secure world and the non-secure world. Thereby, the processor 30 can speed up world transition.

メモリ管理ユニット36(MMU)は、プロセッサ30からのメインメモリ24に対するアクセス要求を処理する。メモリ管理ユニット36は、プロセッサ30からのメインメモリ24に対するアクセス要求を処理するためのメモリマップを管理する。メモリマップは、一例として、メインメモリ24における物理アドレスと、プロセッサ30から要求される仮想アドレスとの対応関係を示す情報である。メモリ管理ユニット36は、プロセッサ30からメインメモリ24に対してアクセス要求があると、メモリマップに基づき仮想アドレスを物理アドレスに変換する。メモリ管理ユニット36は、セキュアワールドおよびノンセキュアワールドのそれぞれについてメモリマップを管理する。   The memory management unit 36 (MMU) processes an access request to the main memory 24 from the processor 30. The memory management unit 36 manages a memory map for processing an access request to the main memory 24 from the processor 30. For example, the memory map is information indicating a correspondence relationship between a physical address in the main memory 24 and a virtual address requested from the processor 30. When there is an access request from the processor 30 to the main memory 24, the memory management unit 36 converts the virtual address into a physical address based on the memory map. The memory management unit 36 manages the memory map for each of the secure world and the non-secure world.

割込制御ユニット38は、情報処理装置20の割込ポートに対する割込入力に対する制御を実行する。割込制御ユニット38は、割込ポートに割込入力が有った場合、プロセッサ30をメインメモリ24における予め設定された割込先アドレスにアクセスさせて、割込ハンドラを起動させる。割込制御ユニット38は、それぞれの割込ポートについて割込先アドレスが設定される。   The interrupt control unit 38 executes control for interrupt input to the interrupt port of the information processing apparatus 20. When there is an interrupt input at the interrupt port, the interrupt control unit 38 causes the processor 30 to access a preset interrupt destination address in the main memory 24 and activate the interrupt handler. In the interrupt control unit 38, an interrupt destination address is set for each interrupt port.

図2は、プロセッサ30により実現される機能、および、プロセッサ30のモードおよびワールドの関係を示す図である。   FIG. 2 is a diagram showing the functions realized by the processor 30 and the relationship between the modes and worlds of the processor 30.

プロセッサ30は、モニタモジュール(プログラムコード)をメインメモリ24にロードして実行することにより、モニタとして動作する。モニタは、オペレーティングシステムに対して、コンピュータシステムを仮想化して提供するバーチャルマシンである。モニタは、複数のオペレーティングシステムを切り替えて動作させることができる。本実施形態において、モニタは、プロセッサ30上で直接動作するタイプ(タイプ1)である。   The processor 30 operates as a monitor by loading a monitor module (program code) into the main memory 24 and executing it. The monitor is a virtual machine that provides a virtualized computer system to the operating system. The monitor can be operated by switching a plurality of operating systems. In the present embodiment, the monitor is of a type (type 1) that operates directly on the processor 30.

プロセッサ30は、OSモジュール(プログラムコード)をメインメモリ24にロードして実行することにより、オペレーティングシステムとして動作する。オペレーティングシステムは、コンピュータシステムの基本機能であり、コンピュータシステムに備えられるハードウェアデバイス(またはバーチャルマシンに備えられる仮想化したデバイス)を制御したり、タスクを管理したりする。また、オペレーティングシステムは、アプリケーションを管理して、アプリケーションによるハードウェアデバイスに対するアクセスを仲介する。   The processor 30 operates as an operating system by loading an OS module (program code) into the main memory 24 and executing it. The operating system is a basic function of the computer system, and controls hardware devices (or virtualized devices provided in a virtual machine) provided in the computer system and manages tasks. The operating system manages the application and mediates access to the hardware device by the application.

本実施形態においては、プロセッサ30は、汎用OSモジュール(第1OSモジュール)をメインメモリ24にロードして実行することにより、汎用オペレーティングシステム(第1オペレーティングシステム)として動作する。汎用オペレーティングシステムは、例えば、Linux(登録商標)またはWindows(登録商標)等である。第1オペレーティングシステムは、汎用に限らず、特殊な分野で使用される専用のオペレーティングシステムであってもよい。   In the present embodiment, the processor 30 operates as a general-purpose operating system (first operating system) by loading a general-purpose OS module (first OS module) into the main memory 24 and executing it. The general-purpose operating system is, for example, Linux (registered trademark) or Windows (registered trademark). The first operating system is not limited to a general purpose but may be a dedicated operating system used in a special field.

また、プロセッサ30は、セキュアOSモジュール(第2OSモジュール)をメインメモリ24にロードして実行することにより、セキュアオペレーティングシステム(第2オペレーティングシステム)として動作する。セキュアオペレーティングシステムは、例えば、汎用オペレーティングシステムに存在するセキュリティの脆弱性を補完するための機能を有する。セキュアオペレーティングシステムは、例えば、汎用オペレーティングシステムよりも機能が限定されている。なお、第2オペレーティングシステムは、このような目的に限らず、一般的なオペレーティングシステムであってもよい。   Further, the processor 30 operates as a secure operating system (second operating system) by loading a secure OS module (second OS module) into the main memory 24 and executing it. The secure operating system has, for example, a function for complementing security vulnerabilities existing in general-purpose operating systems. The secure operating system has, for example, limited functions than a general-purpose operating system. The second operating system is not limited to such a purpose, and may be a general operating system.

なお、オペレーティングシステムは、プロセッサ30がモニタとして動作している状態において、モニタの管理下で動作する。   The operating system operates under the management of the monitor in a state where the processor 30 operates as a monitor.

プロセッサ30は、アプリケーションプログラムをメインメモリ24にロードして実行することにより、アプリケーションとして動作する。アプリケーションは、オペレーティングシステムの管理下で動作し、情報処理サービスまたはデバイスの制御処理等を実行する。   The processor 30 operates as an application by loading an application program into the main memory 24 and executing it. The application operates under the management of the operating system, and executes an information processing service or a device control process.

プロセッサ30は、モニタモード、OSモードまたはユーザモードの何れかのモードに設定される。モニタモードは、プロセッサ30がモニタとして動作する場合に設定されるモードである。モニタモードにおいて、プロセッサ30は、ハードウェアデバイス(ハードウェアリソース)に対して無制限でアクセスが可能であり、ハードウェアデバイスの設定等を変更することができる。   The processor 30 is set to a monitor mode, an OS mode, or a user mode. The monitor mode is a mode that is set when the processor 30 operates as a monitor. In the monitor mode, the processor 30 can access the hardware device (hardware resource) without limitation, and can change the setting of the hardware device.

OSモードは、プロセッサ30がオペレーティングシステムとして動作する場合に設定される。OSモードにおいて、プロセッサ30は、モニタモードと比較してリソースに対するアクセスが制限される場合がある。   The OS mode is set when the processor 30 operates as an operating system. In the OS mode, the processor 30 may have limited access to resources compared to the monitor mode.

ユーザモードは、プロセッサ30がアプリケーションとして動作する場合に設定される。ユーザモードにおいて、プロセッサ30は、OSモードと比較してリソースに対するアクセスが制限される。   The user mode is set when the processor 30 operates as an application. In the user mode, the processor 30 has limited access to resources compared to the OS mode.

また、プロセッサ30は、セキュアワールドまたはノンセキュアワールドに状態が切り替えられる。プロセッサ30は、セキュアワールドとノンセキュアワールドとで異なるメモリマップを用いてメインメモリ24にアクセスする。これにより、プロセッサ30は、セキュアワールドとノンセキュアワールドとで、動作するオペレーティングシステムおよびアプリケーションを切り替えることができる。   In addition, the state of the processor 30 is switched to a secure world or a non-secure world. The processor 30 accesses the main memory 24 using different memory maps for the secure world and the non-secure world. Thereby, the processor 30 can switch the operating system and application which operate | move with a secure world and a non-secure world.

プロセッサ30は、モードおよびワールドがそれぞれ独立に設定される。ただし、モニタモードに設定されている場合には、プロセッサ30は、セキュアワールドまたはノンセキュアワールドの設定に関わらず、モニタをセキュアワールドで動作させる。   In the processor 30, the mode and the world are set independently. However, when the monitor mode is set, the processor 30 operates the monitor in the secure world regardless of the setting of the secure world or the non-secure world.

また、プロセッサ30は、セキュアワールドで動作するモニタ、オペレーティングシステムおよびアプリケーションが利用するメモリ領域を、ノンセキュアワールドで動作するオペレーティングシステムおよびアプリケーションからアクセスを禁止することができる。これにより、プロセッサ30は、例えば、通常の処理と、セキュリティを担保する処理とでアクセスするメモリ領域を分離することができる。従って、プロセッサ30は、ノンセキュアワールドで動作するオペレーティングシステムに脆弱性が存在し、悪意のあるプログラムが実行されてしまった場合であっても、セキュアワールドで動作するモニタおよびオペレーティングシステムを保護することができる。   Further, the processor 30 can prohibit access to the memory area used by the monitor, operating system, and application operating in the secure world from the operating system and application operating in the non-secure world. Thereby, the processor 30 can isolate | separate the memory area | region accessed by the normal process and the process which ensures security, for example. Therefore, the processor 30 protects the monitor and operating system operating in the secure world even when a vulnerability exists in the operating system operating in the non-secure world and a malicious program is executed. Can do.

なお、モニタを動かすモードのことをrootモード、OSやOS上のアプリケーションを動作させるモードのことをnon−rootモードと呼ぶ場合もある。この場合にはセキュアオペレーティングシステムおよび汎用オペレーティングシステムともにnon−rootモードで動作する。   Note that the mode for moving the monitor may be referred to as a root mode, and the mode for operating an OS or an application on the OS may be referred to as a non-root mode. In this case, both the secure operating system and the general-purpose operating system operate in the non-root mode.

このようなプロセッサ30は、例えば、TrustZone(登録商標)と呼ばれる機能を有するARM(登録商標)プロセッサ、または、VTと呼ばれる仮想化支援機構を有するIntel(登録商標)プロセッサ等により実現することができる。なお、プロセッサ30は、これら以外のプロセッサにより実現することもできる。   Such a processor 30 can be realized by, for example, an ARM (registered trademark) processor having a function called TrustZone (registered trademark) or an Intel (registered trademark) processor having a virtualization support mechanism called VT. . The processor 30 can also be realized by a processor other than these.

図3は、ブート後におけるプロセッサ30の機能構成を示す図である。プロセッサ30は、ブート直後において、セキュアワールドおよびOSモードに設定される。プロセッサ30は、ブート直後においてブートROM26にアクセスしてブートプログラムを実行する。   FIG. 3 is a diagram illustrating a functional configuration of the processor 30 after booting. The processor 30 is set to the secure world and the OS mode immediately after booting. The processor 30 accesses the boot ROM 26 immediately after booting and executes the boot program.

これにより、プロセッサ30は、ストレージ22に格納された汎用OSモジュールをメインメモリ24にロードすることができる。そして、プロセッサ30は、汎用OSモジュールを実行して、セキュアワールドで汎用オペレーティングシステム50として動作する。このとき、VTの場合には汎用オペレーティングシステム50は、non−rootモードで動作している。   As a result, the processor 30 can load the general-purpose OS module stored in the storage 22 into the main memory 24. Then, the processor 30 executes the general-purpose OS module and operates as the general-purpose operating system 50 in the secure world. At this time, in the case of VT, the general-purpose operating system 50 operates in the non-root mode.

汎用オペレーティングシステム50は、ドライバロード部54を有する。汎用オペレーティングシステム50は、予め定められたイベントが発生すると、ドライバロード部54を実行する。予め定められたイベントは、例えば、所定のタイマーイベントまたはユーザから指示入力等である。   The general-purpose operating system 50 has a driver load unit 54. The general-purpose operating system 50 executes the driver load unit 54 when a predetermined event occurs. The predetermined event is, for example, a predetermined timer event or an instruction input from the user.

ドライバロード部54は、ストレージ22に格納されたドライバモジュールをメインメモリ24にロードする。プロセッサ30は、ドライバモジュールがメインメモリ24にロードされると、ドライバモジュールを実行する。   The driver load unit 54 loads the driver module stored in the storage 22 into the main memory 24. When the driver module is loaded into the main memory 24, the processor 30 executes the driver module.

プロセッサ30は、ドライバモジュールを実行することにより、デバイスドライバ52(ドライバ装置)として動作する。このとき、デバイスドライバ52は、汎用オペレーティングシステム50の管理下で、汎用オペレーティングシステム50の機能の一部として動作する。   The processor 30 operates as a device driver 52 (driver device) by executing the driver module. At this time, the device driver 52 operates as part of the functions of the general-purpose operating system 50 under the management of the general-purpose operating system 50.

デバイスドライバ52は、情報処理システム10が備えるハードウェアリソースに対してアクセスが可能である。汎用オペレーティングシステム50の管理下で動作し、ハードウェアリソースに対してアクセスが可能であれば、ドライバに限らず、他のプログラムにより実行される機能であってもよい。   The device driver 52 can access hardware resources included in the information processing system 10. As long as it operates under the management of the general-purpose operating system 50 and can access hardware resources, it may be a function executed by another program without being limited to the driver.

図4は、デバイスドライバ52の実行後のプロセッサ30の機能構成を示す図である。デバイスドライバ52は、例えば自動的に実行を開始する。デバイスドライバ52は、所定のイベントが発生した場合に実行を開始してもよい。   FIG. 4 is a diagram illustrating a functional configuration of the processor 30 after the device driver 52 is executed. The device driver 52 automatically starts execution, for example. The device driver 52 may start execution when a predetermined event occurs.

デバイスドライバ52は、実行を完了すると、モニタ56をプロセッサ30上で直接動作させ、さらに、モニタ56上で汎用オペレーティングシステム50およびセキュアオペレーティングシステム58を動作させることができる。このとき、モニタ56は、セキュアワールドで動作する。また、セキュアオペレーティングシステム58は、セキュアワールドで動作する。また、汎用オペレーティングシステム50は、ノンセキュアワールドで動作する。   When the device driver 52 completes execution, it can operate the monitor 56 directly on the processor 30, and can operate the general-purpose operating system 50 and the secure operating system 58 on the monitor 56. At this time, the monitor 56 operates in the secure world. The secure operating system 58 operates in a secure world. The general-purpose operating system 50 operates in a non-secure world.

このようにデバイスドライバ52は、汎用オペレーティングシステム50をプロセッサ30上で直接動作させた状態から、プロセッサ30上でモニタ56を直接動作させる状態に移行させることができる。さらに、デバイスドライバ52は、モニタ56上で新たなセキュアオペレーティングシステム58および汎用オペレーティングシステム50を動作させた状態に移行させることができる。以下、デバイスドライバ52についてさらに詳細に説明する。   As described above, the device driver 52 can shift from the state in which the general-purpose operating system 50 is directly operated on the processor 30 to the state in which the monitor 56 is directly operated on the processor 30. Further, the device driver 52 can shift to a state in which the new secure operating system 58 and the general-purpose operating system 50 are operated on the monitor 56. Hereinafter, the device driver 52 will be described in more detail.

図5は、第1実施形態に係るデバイスドライバ52の機能構成を、ドライバロード部54および情報処理システム10のハードウェアとともに示す図である。デバイスドライバ52は、モジュール格納部71と、モジュールロード部72と、移行部73とを有する。   FIG. 5 is a diagram illustrating the functional configuration of the device driver 52 according to the first embodiment, together with the driver load unit 54 and the hardware of the information processing system 10. The device driver 52 includes a module storage unit 71, a module load unit 72, and a transition unit 73.

モジュール格納部71は、モニタモジュールおよびセキュアOSモジュールを格納する。モニタモジュールは、プロセッサ30をバーチャルマシンであるモニタとして動作させるためのプログラムである。セキュアOSモジュールは、プロセッサ30をセキュアオペレーティングシステムとして動作させるためのプログラムである。   The module storage unit 71 stores a monitor module and a secure OS module. The monitor module is a program for causing the processor 30 to operate as a monitor that is a virtual machine. The secure OS module is a program for causing the processor 30 to operate as a secure operating system.

モジュールロード部72は、ドライバロード部54に呼び出される。モジュールロード部72は、モジュール格納部71に格納されているモニタモジュールおよびセキュアOSモジュールを、メインメモリ24の空領域にロードする。メインメモリ24は、既に、汎用OSモジュールおよびドライバモジュールがロードされている。モジュールロード部72は、汎用OSモジュールおよびドライバモジュールがロードされていない領域に、モニタモジュールおよびセキュアOSモジュールをロードする。ロードが完了すると、モジュールロード部72は、移行部73を呼び出す。   The module load unit 72 is called by the driver load unit 54. The module load unit 72 loads the monitor module and the secure OS module stored in the module storage unit 71 into an empty area of the main memory 24. The main memory 24 is already loaded with a general-purpose OS module and a driver module. The module loading unit 72 loads the monitor module and the secure OS module in an area where the general-purpose OS module and the driver module are not loaded. When loading is completed, the module load unit 72 calls the transition unit 73.

移行部73は、メモリマップ生成部74と、メモリマップ設定部75と、割込設定部76と、レジスタ設定部77と、移行制御部78とを含む。   The migration unit 73 includes a memory map generation unit 74, a memory map setting unit 75, an interrupt setting unit 76, a register setting unit 77, and a migration control unit 78.

メモリマップ生成部74は、移行制御部78から、モニタモジュールおよびセキュアOSモジュールがロードされたメインメモリ24上のアドレスを示す情報を取得する。メモリマップ生成部74は、プロセッサ30がモニタモジュールおよびセキュアOSモジュールを実行するためのメモリマップを生成する。   The memory map generation unit 74 acquires information indicating the address on the main memory 24 loaded with the monitor module and the secure OS module from the migration control unit 78. The memory map generation unit 74 generates a memory map for the processor 30 to execute the monitor module and the secure OS module.

メモリマップは、例えば、物理アドレスと仮想アドレスとの対応関係を示したページテーブル等であってよい。メモリマップは、モニタモジュールおよびセキュアOSモジュールをプロセッサ30によりアクセスさせることが可能な情報であれば、ページテーブルに限らず他の情報であってもよい。   The memory map may be, for example, a page table indicating the correspondence between physical addresses and virtual addresses. The memory map is not limited to the page table but may be other information as long as it is information that allows the processor 30 to access the monitor module and the secure OS module.

ここで、メモリマップ生成部74は、モニタモジュールおよびセキュアOSモジュールを実行するメモリマップを生成する際に、汎用オペレーティングシステムおよびセキュアオペレーティングシステムの両者の管理の下で、デバイスドライバ52が動作可能なメモリマップを生成する。より詳しくは、メモリマップ生成部74は、汎用オペレーティングシステムおよびセキュアオペレーティングシステムの両者の管理の下で、移行部73(メモリマップ生成部74、メモリマップ設定部75、割込設定部76、レジスタ設定部77および移行制御部78)が動作可能なメモリマップを生成する。   Here, the memory map generation unit 74 is a memory in which the device driver 52 can operate under the management of both the general-purpose operating system and the secure operating system when generating the memory map for executing the monitor module and the secure OS module. Generate a map. More specifically, the memory map generation unit 74 is managed by the transition unit 73 (memory map generation unit 74, memory map setting unit 75, interrupt setting unit 76, register setting under the management of both the general-purpose operating system and the secure operating system. Unit 77 and transition control unit 78) generate an operable memory map.

例えば、メモリマップ生成部74は、モニタモジュールが異なる物理アドレスにロードされても、モニタモジュールの仮想アドレスが一定となるようにメモリマップを生成する。また、同様に、メモリマップ生成部74は、セキュアOSモジュールが異なる物理アドレスにロードされても、セキュアOSモジュールの仮想アドレスが一定となるようにメモリマップを生成する。   For example, the memory map generation unit 74 generates a memory map so that the virtual address of the monitor module is constant even when the monitor module is loaded at a different physical address. Similarly, the memory map generation unit 74 generates a memory map so that the virtual address of the secure OS module is constant even when the secure OS module is loaded at a different physical address.

より具体的には、図6に示すように、モニタモジュールが物理アドレス0x10000000からロードされ、セキュアOSモジュールが物理アドレス0x20000000からロードされた場合、メモリマップ生成部74は、モニタモジュールの先頭の仮想アドレスを0x10000000に設定し、セキュアOSモジュールの先頭の仮想アドレスを0x20000000に設定する。   More specifically, as illustrated in FIG. 6, when the monitor module is loaded from the physical address 0x10000000 and the secure OS module is loaded from the physical address 0x20000000, the memory map generation unit 74 determines the top virtual address of the monitor module. Is set to 0x10000000, and the top virtual address of the secure OS module is set to 0x20000000.

また、例えば図7に示すように、モニタモジュールが物理アドレス0xF0000000からロードされ、セキュアOSモジュールが物理アドレス0x10000000からロードされた場合、メモリマップ生成部74は、モニタモジュールの先頭の仮想アドレスを0x10000000に設定し、セキュアOSモジュールの先頭の仮想アドレスを0x20000000に設定する。これにより、プロセッサ30は、メインメモリ24の物理アドレスに関わらず、常に一定の仮想アドレスでモニタおよびセキュアオペレーティングシステムを動作させることができる。   For example, as shown in FIG. 7, when the monitor module is loaded from the physical address 0xF0000000 and the secure OS module is loaded from the physical address 0x10000000, the memory map generation unit 74 sets the top virtual address of the monitor module to 0x10000000. Set, and set the top virtual address of the secure OS module to 0x20000000. Thereby, the processor 30 can always operate the monitor and the secure operating system with a constant virtual address regardless of the physical address of the main memory 24.

さらに、メモリマップ生成部74は、移行部73(メモリマップ生成部74、メモリマップ設定部75、割込設定部76、レジスタ設定部77および移行制御部78)を実行するためのモジュールが配置されたメモリ領域について、汎用オペレーティングシステムを動作させるためのメモリマップ上、および、セキュアオペレーティングシステムを動作させるためのメモリマップ上の何れにおいても、同一の仮想アドレスでアクセスできるようにする。これにより、移行部73は、ワールドが切り替えられて動作するオペレーティングシステムが変更しても、動作を継続することができる。   Further, the memory map generation unit 74 includes modules for executing the transition unit 73 (the memory map generation unit 74, the memory map setting unit 75, the interrupt setting unit 76, the register setting unit 77, and the transition control unit 78). The memory area can be accessed with the same virtual address both on the memory map for operating the general-purpose operating system and on the memory map for operating the secure operating system. As a result, the transition unit 73 can continue the operation even when the operating system is changed when the world is switched.

メモリマップ設定部75は、メモリ管理ユニット36に対して、セキュアワールドのメモリマップおよびノンセキュアワールドのメモリマップを設定する。メモリマップ設定部75は、第1メモリマップ設定部81と、第2メモリマップ設定部82とを含む。   The memory map setting unit 75 sets a secure world memory map and a non-secure world memory map for the memory management unit 36. The memory map setting unit 75 includes a first memory map setting unit 81 and a second memory map setting unit 82.

第1メモリマップ設定部81は、メモリ管理ユニット36により管理されているセキュアワールドのメモリマップをコピーして、ノンセキュアワールドのメモリマップとしてメモリ管理ユニット36に設定する。ブート後において、プロセッサ30は、セキュアワールドに設定され、汎用オペレーティングシステムとして動作している。従って、メモリ管理ユニット36は、プロセッサ30が汎用OSモジュールを実行するためのメモリマップを管理している。従って、第1メモリマップ設定部81は、メモリ管理ユニット36により管理されているセキュアワールドのメモリマップをコピーして、ノンセキュアワールドのメモリマップとしてメモリ管理ユニット36に設定することにより、ノンセキュアワールドに設定が変更された場合、プロセッサ30を汎用オペレーティングシステムとして動作させることができる。   The first memory map setting unit 81 copies the secure world memory map managed by the memory management unit 36 and sets it in the memory management unit 36 as a non-secure world memory map. After booting, the processor 30 is set to a secure world and operates as a general-purpose operating system. Therefore, the memory management unit 36 manages a memory map for the processor 30 to execute the general-purpose OS module. Therefore, the first memory map setting unit 81 copies the memory map of the secure world managed by the memory management unit 36 and sets it in the memory management unit 36 as the memory map of the non-secure world, thereby making the non-secure world When the setting is changed, the processor 30 can be operated as a general-purpose operating system.

第2メモリマップ設定部82は、メモリマップ生成部74から、モニタモジュールおよびセキュアOSモジュールを実行するためのメモリマップを受け取る。第2メモリマップ設定部82は、モニタモジュールおよびセキュアOSモジュールを実行するためのメモリマップを、セキュアワールドのメモリマップとしてメモリ管理ユニット36に設定する。これにより、第2メモリマップ設定部82は、セキュアワールドにおいて、プロセッサ30をモニタおよびセキュアオペレーティングシステムとして動作させることができる。   The second memory map setting unit 82 receives a memory map for executing the monitor module and the secure OS module from the memory map generation unit 74. The second memory map setting unit 82 sets a memory map for executing the monitor module and the secure OS module in the memory management unit 36 as a secure world memory map. Accordingly, the second memory map setting unit 82 can operate the processor 30 as a monitor and a secure operating system in the secure world.

なお、メモリマップ設定部75は、セキュアワールドのメモリマップにアクセスする場合には、ワールド制御ユニット32を呼び出してプロセッサ30をセキュアワールドに変更する。また、メモリマップ設定部75は、ノンセキュアワールドのメモリマップにアクセスする場合には、ワールド制御ユニット32を呼び出してプロセッサ30をノンセキュアワールドに変更する。   Note that when accessing the memory map of the secure world, the memory map setting unit 75 calls the world control unit 32 and changes the processor 30 to the secure world. Further, when accessing the memory map of the non-secure world, the memory map setting unit 75 calls the world control unit 32 and changes the processor 30 to the non-secure world.

割込設定部76は、割込制御ユニット38に対して、割込入力に関する値を設定する。割込設定部76は、モニタ割込設定部86と、第1割込設定部87と、第2割込設定部88と、割込ポート設定部89とを含む。   The interrupt setting unit 76 sets a value related to the interrupt input to the interrupt control unit 38. Interrupt setting unit 76 includes a monitor interrupt setting unit 86, a first interrupt setting unit 87, a second interrupt setting unit 88, and an interrupt port setting unit 89.

モニタ割込設定部86は、モニタの割込ハンドラのアドレス(すなわち、モニタへの割込入力が有った場合におけるジャンプ先となるメインメモリ24のアドレス)を、モニタの割込先アドレスとして割込制御ユニット38に設定する。モニタ割込設定部86は、モニタモジュールのメインメモリ24上のアドレスを取得し、モニタの割込ハンドラのアドレスを算出する。モニタ割込設定部86は、移行制御部78からモニタの割込ハンドラのアドレスを直接取得してもよい。そして、モニタ割込設定部86は、算出または取得したアドレスを割込制御ユニット38に設定する。例えば、図8に示すように、モニタ割込設定部86は、モニタの割込先アドレスとして、0x10000000を設定することができる。   The monitor interrupt setting unit 86 allocates the address of the monitor interrupt handler (that is, the address of the main memory 24 that is the jump destination when there is an interrupt input to the monitor) as the monitor interrupt destination address. Is set in the control unit 38. The monitor interrupt setting unit 86 acquires an address on the main memory 24 of the monitor module, and calculates an address of the monitor interrupt handler. The monitor interrupt setting unit 86 may directly acquire the address of the monitor interrupt handler from the transition control unit 78. The monitor interrupt setting unit 86 sets the calculated or acquired address in the interrupt control unit 38. For example, as shown in FIG. 8, the monitor interrupt setting unit 86 can set 0x10000000 as the interrupt destination address of the monitor.

さらに、モニタ割込設定部86は、モニタへの割込入力を有効とするか無効とするかを割込制御ユニット38に設定する。例えば、モニタ割込設定部86は、図9に示すように、モニタへの割込入力を有効に設定することができる。   Furthermore, the monitor interrupt setting unit 86 sets in the interrupt control unit 38 whether to enable or disable the interrupt input to the monitor. For example, the monitor interrupt setting unit 86 can effectively set the interrupt input to the monitor as shown in FIG.

第1割込設定部87は、割込制御ユニット38により管理されているセキュアワールドの割込先アドレスをコピーして、ノンセキュアワールドの割込先アドレスとしてメモリ管理ユニット36に設定する。ブート後において、プロセッサ30は、セキュアワールドに設定され、汎用オペレーティングシステムとして動作している。従って、割込制御ユニット38のセキュアワールドの割込先アドレスには、汎用オペレーティングシステムの割込ハンドラのアドレス(すなわち、汎用オペレーティングシステムへの割込入力が有った場合におけるジャンプ先となるメインメモリ24のアドレス)が設定されている。従って、第1割込設定部87は、割込制御ユニット38により管理されているセキュアワールドの割込先アドレスをコピーして、ノンセキュアワールドの割込先アドレスとしてメモリ管理ユニット36に設定することにより、ノンセキュアワールドの割込先アドレスを汎用オペレーティングシステムの割込ハンドラのアドレスに設定することができる。例えば、図8に示すように、第1割込設定部87は、ノンセキュアワールドへの割込先アドレスとして、0x50000000を設定することができる。   The first interrupt setting unit 87 copies the secure world interrupt destination address managed by the interrupt control unit 38 and sets it in the memory management unit 36 as the non-secure world interrupt destination address. After booting, the processor 30 is set to a secure world and operates as a general-purpose operating system. Accordingly, the interrupt address of the secure world of the interrupt control unit 38 is the address of the interrupt handler of the general-purpose operating system (that is, the main memory that is the jump destination when there is an interrupt input to the general-purpose operating system) 24 addresses) are set. Therefore, the first interrupt setting unit 87 copies the interrupt destination address of the secure world managed by the interrupt control unit 38 and sets it in the memory management unit 36 as the interrupt destination address of the non-secure world. Thus, the interrupt destination address of the non-secure world can be set to the interrupt handler address of the general-purpose operating system. For example, as shown in FIG. 8, the first interrupt setting unit 87 can set 0x50000000 as the interrupt destination address to the non-secure world.

さらに、第1割込設定部87は、割込制御ユニット38により管理されているセキュアワールドのへの割込入力の有効/無効の設定値をコピーして、ノンセキュアワールドへの割込入力の有効/無効の設定値としてメモリ管理ユニット36に設定する。例えば、第1割込設定部87は、図9に示すように、ノンセキュアワールドへの割込入力を有効に設定することができる。   Further, the first interrupt setting unit 87 copies the valid / invalid setting value of the interrupt input to the secure world managed by the interrupt control unit 38, and sets the interrupt input to the non-secure world. It is set in the memory management unit 36 as a valid / invalid set value. For example, the first interrupt setting unit 87 can set the interrupt input to the non-secure world effectively as shown in FIG.

第2割込設定部88は、セキュアオペレーティングシステムの割込ハンドラのアドレス(すなわち、セキュアオペレーティングシステムへの割込入力が有った場合におけるジャンプ先となるメインメモリ24のアドレス)を、セキュアワールドの割込先アドレスとして割込制御ユニット38に設定する。第2割込設定部88は、セキュアOSモジュールがロードされたメインメモリ24上のアドレスを取得し、セキュアオペレーティングシステムの割込ハンドラのアドレスを算出する。第2割込設定部88は、移行制御部78からセキュアオペレーティングシステムの割込ハンドラのアドレスを直接取得してもよい。そして、第2割込設定部88は、算出または取得したアドレスを割込制御ユニット38に設定する。例えば、図8に示すように、第2割込設定部88は、セキュアワールドへの割込先アドレスとして、0x20000000を設定することができる。   The second interrupt setting unit 88 sets the address of the interrupt handler of the secure operating system (that is, the address of the main memory 24 that is the jump destination when there is an interrupt input to the secure operating system) in the secure world. It is set in the interrupt control unit 38 as an interrupt destination address. The second interrupt setting unit 88 acquires the address on the main memory 24 loaded with the secure OS module, and calculates the address of the interrupt handler of the secure operating system. The second interrupt setting unit 88 may directly acquire the address of the interrupt handler of the secure operating system from the migration control unit 78. Then, the second interrupt setting unit 88 sets the calculated or acquired address in the interrupt control unit 38. For example, as shown in FIG. 8, the second interrupt setting unit 88 can set 0x20000000 as the interrupt destination address to the secure world.

さらに、第2割込設定部88は、セキュアワールドへの割込入力を有効とするか無効とするかを割込制御ユニット38に設定する。例えば、第2割込設定部88は、図9に示すように、セキュアワールドへの割込入力を無効に設定することができる。   Further, the second interrupt setting unit 88 sets in the interrupt control unit 38 whether to enable or disable the interrupt input to the secure world. For example, the second interrupt setting unit 88 can set the interrupt input to the secure world to be invalid as shown in FIG.

割込ポート設定部89は、それぞれのポートの割込先のワールドを設定する。この場合において、割込ポート設定部89は、セキュアワールドが割込先に設定されている割込ポートにおける割込先を、ノンセキュアワールドに変更する。ブート後において、プロセッサ30は、セキュアワールドに設定され、汎用オペレーティングシステムとして動作している。従って、ブート後において、汎用オペレーティングシステムへの割り込みに使用される割込ポートにおける割込先は、セキュアワールドに設定されている。従って、割込ポート設定部89は、セキュアワールドが割込先に設定されている割込ポートにおける割込先をノンセキュアワールドに変更することにより、汎用オペレーティングシステムへの割り込みに使用される割込ポートにおける割込先をノンセキュアワールドに設定することができる。   The interrupt port setting unit 89 sets an interrupt destination world for each port. In this case, the interrupt port setting unit 89 changes the interrupt destination at the interrupt port where the secure world is set as the interrupt destination to the non-secure world. After booting, the processor 30 is set to a secure world and operates as a general-purpose operating system. Therefore, after booting, the interrupt destination in the interrupt port used for interrupting the general-purpose operating system is set to the secure world. Therefore, the interrupt port setting unit 89 changes the interrupt destination in the interrupt port where the secure world is set as the interrupt destination to the non-secure world, thereby interrupting the interrupt used for the general-purpose operating system. The interrupt destination at the port can be set to a non-secure world.

そして、割込ポート設定部89は、セキュアオペレーティングシステムへの割り込みに使用される割込ポートにおける割込先をセキュアワールドに設定する。これにより、割込ポート設定部89は、図10に示すように、それぞれの割込ポートに入力が有った場合、何れのワールドに割り込むかを設定することができる。   Then, the interrupt port setting unit 89 sets the interrupt destination in the interrupt port used for interrupting the secure operating system to the secure world. As a result, as shown in FIG. 10, the interrupt port setting unit 89 can set which world to interrupt when there is an input to each interrupt port.

なお、割込設定部76は、セキュアワールドの割り込みに関する設定をする場合には、ワールド制御ユニット32を呼び出してプロセッサ30をセキュアワールドに変更する。また、割込設定部76は、ノンセキュアワールドの割り込みに関する設定をする場合には、ワールド制御ユニット32を呼び出してプロセッサ30をノンセキュアワールドに変更する。   Note that the interrupt setting unit 76 calls the world control unit 32 to change the processor 30 to the secure world when making a setting related to the interruption of the secure world. Further, the interrupt setting unit 76 calls the world control unit 32 to change the processor 30 to the non-secure world when making settings related to the interruption of the non-secure world.

割込制御ユニット38は、割込設定部76により割り込み設定がされると、設定に従って割込制御をすることができる。具体的には、割込制御ユニット38は、ある割込ポートに入力が有った場合、図10に示すテーブルを参照して、セキュアワールドに割り込むか、ノンセキュアワールドに割り込むかを判断する。続いて、割込制御ユニット38は、対象のワールドに対する割り込みが有効か無効かを図9に示すテーブルを参照して判断する。この場合において、割込制御ユニット38は、対象のワールドがセキュアワールドであって、プロセッサ30がモニタモードに設定されている場合には、モニタに対する割り込みが有効か無効かを判断し、モニタモード以外に設定されている場合には、セキュアワールドに対する割り込みが有効か否かを判断する。続いて、割込制御ユニット38は、割り込みが有効であることを条件として、対応する割込先アドレスを図8に示すテーブルから取得する。そして、割込制御ユニット38は、取得した割込アドレスをプロセッサ30に与えて、割込ハンドラのアドレスに実行をジャンプさせる。   When an interrupt is set by the interrupt setting unit 76, the interrupt control unit 38 can perform interrupt control according to the setting. Specifically, when there is an input to a certain interrupt port, the interrupt control unit 38 refers to the table shown in FIG. 10 and determines whether to interrupt the secure world or the non-secure world. Subsequently, the interrupt control unit 38 determines whether the interrupt for the target world is valid or invalid with reference to the table shown in FIG. In this case, when the target world is a secure world and the processor 30 is set to the monitor mode, the interrupt control unit 38 determines whether the interrupt to the monitor is valid or invalid, and other than the monitor mode. If it is set to, it is determined whether or not the interruption to the secure world is valid. Subsequently, the interrupt control unit 38 acquires the corresponding interrupt destination address from the table shown in FIG. 8 on condition that the interrupt is valid. Then, the interrupt control unit 38 gives the acquired interrupt address to the processor 30 and causes execution to jump to the address of the interrupt handler.

レジスタ設定部77は、バンクレジスタ34に対して、セキュアワールドにおけるレジスタ値およびノンセキュアワールドにおけるレジスタ値を設定する。レジスタ設定部77は、第1レジスタ設定部91と、第2レジスタ設定部92とを含む。   The register setting unit 77 sets a register value in the secure world and a register value in the non-secure world for the bank register 34. Register setting unit 77 includes a first register setting unit 91 and a second register setting unit 92.

第1レジスタ設定部91は、バンクレジスタ34により記憶されているセキュアワールドのレジスタ値をコピーして、ノンセキュアワールドのレジスタ値としてバンクレジスタ34に設定する。ブート後において、プロセッサ30は、セキュアワールドに設定され、汎用オペレーティングシステムとして動作している。従って、セキュアワールドでのバンクレジスタ34には、プロセッサ30が汎用OSモジュールを実行するためのレジスタ値を記憶している。従って、第1レジスタ設定部91は、バンクレジスタ34により記憶されているセキュアワールドのレジスタ値をコピーして、ノンセキュアワールドのレジスタ値としてバンクレジスタ34に設定することにより、ノンセキュアワールドに設定が変更された場合、プロセッサ30を汎用オペレーティングシステムとして動作させることができる。   The first register setting unit 91 copies the secure world register value stored in the bank register 34 and sets it in the bank register 34 as a non-secure world register value. After booting, the processor 30 is set to a secure world and operates as a general-purpose operating system. Therefore, the register value for the processor 30 to execute the general-purpose OS module is stored in the bank register 34 in the secure world. Therefore, the first register setting unit 91 copies the secure world register value stored in the bank register 34 and sets it in the bank register 34 as the non-secure world register value. If changed, the processor 30 can be operated as a general purpose operating system.

第2レジスタ設定部92は、モニタモジュールおよびセキュアOSモジュールを実行するためのレジスタ値を、セキュアワールドのレジスタ値としてバンクレジスタ34に設定する。これにより、第2レジスタ設定部92は、セキュアワールドにおいて、プロセッサ30をモニタおよびセキュアオペレーティングシステムとして動作させることができる。   The second register setting unit 92 sets a register value for executing the monitor module and the secure OS module in the bank register 34 as a register value of the secure world. Accordingly, the second register setting unit 92 can operate the processor 30 as a monitor and a secure operating system in the secure world.

なお、レジスタ設定部77は、セキュアワールドのレジスタ値にアクセスする場合には、ワールド制御ユニット32を呼び出してプロセッサ30をセキュアワールドに変更する。また、レジスタ設定部77は、ノンセキュアワールドのレジスタ値にアクセスする場合には、ワールド制御ユニット32を呼び出してプロセッサ30をノンセキュアワールドに変更する。また、レジスタ設定部77は、複数のレジスタ値を1個ずつワールドの切り替えをしながらコピーおよび設定を繰り返してもよいし、複数のレジスタ値の全てを一括してコピーおよび設定をしてもよい。   In addition, when accessing the register value of the secure world, the register setting unit 77 calls the world control unit 32 and changes the processor 30 to the secure world. Further, when accessing the register value of the non-secure world, the register setting unit 77 calls the world control unit 32 and changes the processor 30 to the non-secure world. The register setting unit 77 may repeat copying and setting for a plurality of register values while switching the world one by one, or may copy and set all of the plurality of register values at once. .

移行制御部78は、モジュールロード部72に呼び出される。移行制御部78は、モジュールロード部72から、モニタモジュールおよびセキュアOSモジュールがロードされたメインメモリ24上のアドレスを示す情報を取得する。   The migration control unit 78 is called by the module load unit 72. The migration control unit 78 acquires information indicating the address on the main memory 24 loaded with the monitor module and the secure OS module from the module loading unit 72.

移行制御部78は、予め定められた移行処理の順序に従って、メモリマップ生成部74、メモリマップ設定部75、割込設定部76およびレジスタ設定部77を呼び出して処理を実行させ、所定のタイミングにおいてワールドおよびモードの設定等を実行する。具体的には、移行制御部78は、次の順序で処理を実行する。   The migration control unit 78 calls the memory map generation unit 74, the memory map setting unit 75, the interrupt setting unit 76, and the register setting unit 77 in accordance with a predetermined order of the migration processing to execute the processing, and at a predetermined timing. Set the world and mode. Specifically, the migration control unit 78 executes processing in the following order.

まず、移行制御部78は、メモリマップ生成部74を呼び出して、メモリマップを生成させる。続いて、移行制御部78は、メモリ管理ユニット36に対するノンセキュアワールドのメモリマップの設定に先だって、割込制御ユニット38を呼び出して、割込ポートへの入力を無効化する。   First, the migration control unit 78 calls the memory map generation unit 74 to generate a memory map. Subsequently, the migration control unit 78 calls the interrupt control unit 38 and invalidates the input to the interrupt port prior to setting the memory map of the non-secure world for the memory management unit 36.

続いて、移行制御部78は、メモリ管理ユニット36に対するノンセキュアワールドのメモリマップの設定に先だって、ワールド制御ユニット32を呼び出して、プロセッサ30をモニタモードに変更する。続いて、移行制御部78は、第1メモリマップ設定部81を呼び出して、セキュアワールドのメモリマップをコピーしてノンセキュアワールドに設定する。   Subsequently, prior to setting the memory map of the non-secure world for the memory management unit 36, the migration control unit 78 calls the world control unit 32 and changes the processor 30 to the monitor mode. Subsequently, the migration control unit 78 calls the first memory map setting unit 81 to copy the memory map of the secure world and set it to the non-secure world.

続いて、移行制御部78は、モニタ割込設定部86を呼び出して、モニタへの割込入力に関する値を設定する。続いて、移行制御部78は、第1割込設定部87を呼び出して、セキュアワールドへの割込入力に関する値をコピーして、ノンセキュアワールドに設定する。続いて、移行制御部78は、第2割込設定部88を呼び出して、セキュアワールドへの割込入力に関する値を設定する。続いて、移行制御部78は、割込ポート設定部89を呼び出して、それぞれのポートの割込先のワールドを設定する。   Subsequently, the transition control unit 78 calls the monitor interrupt setting unit 86 to set a value related to the interrupt input to the monitor. Subsequently, the migration control unit 78 calls the first interrupt setting unit 87 to copy a value related to the interrupt input to the secure world and set the non-secure world. Subsequently, the transition control unit 78 calls the second interrupt setting unit 88 and sets a value related to the interrupt input to the secure world. Subsequently, the migration control unit 78 calls the interrupt port setting unit 89 to set the interrupt destination world of each port.

続いて、移行制御部78は、第1レジスタ設定部91を呼び出して、セキュアワールドのレジスタ値をコピーしてノンセキュアワールドに設定する。続いて、移行制御部78は、第2レジスタ設定部92を呼び出して、モニタモジュールおよびセキュアOSモジュールを実行するためのレジスタ値を、セキュアワールドに設定する。   Subsequently, the migration control unit 78 calls the first register setting unit 91 to copy the register value of the secure world and set it to the non-secure world. Subsequently, the migration control unit 78 calls the second register setting unit 92 and sets register values for executing the monitor module and the secure OS module in the secure world.

続いて、移行制御部78は、第2メモリマップ設定部82を呼び出して、モニタモジュールおよびセキュアOSモジュールを実行するためのメモリマップをセキュアワールドに設定する。   Subsequently, the migration control unit 78 calls the second memory map setting unit 82 and sets a memory map for executing the monitor module and the secure OS module in the secure world.

続いて、移行制御部78は、メモリ管理ユニット36に対するセキュアワールドのメモリマップの設定の後に、ワールド制御ユニット32を呼び出して、プロセッサ30をノンセキュアワールドのOSモードに変更する。続いて、移行制御部78は、プロセッサ30をノンセキュアワールドのOSモードに変更した後に、割込制御ユニット38を呼び出して、無効化した割込ポートへの入力を復帰させる。最後に、移行制御部78は、処理を汎用オペレーティングシステムに戻す。   Subsequently, after setting the secure world memory map for the memory management unit 36, the migration control unit 78 calls the world control unit 32 and changes the processor 30 to the non-secure world OS mode. Subsequently, after changing the processor 30 to the OS mode of the non-secure world, the transition control unit 78 calls the interrupt control unit 38 to restore the input to the disabled interrupt port. Finally, the migration control unit 78 returns the process to the general-purpose operating system.

図11は、情報処理システム10のブート後の処理フローを示す図である。図12は、メインメモリ24にロードされるプログラムの遷移を示す図である。情報処理システム10は、電源投入されると、図11に示すフローに従って処理を実行する。   FIG. 11 is a diagram illustrating a processing flow after the information processing system 10 is booted. FIG. 12 is a diagram showing the transition of the program loaded into the main memory 24. When the information processing system 10 is turned on, the information processing system 10 executes processing according to the flow shown in FIG.

まず、情報処理システム10は、電源投入後において、汎用OSモジュールをメインメモリ24にロードする(S11)。この結果、メインメモリ24には、例えば、図12のAに示すように汎用OSモジュールが書き込まれる。また、プロセッサ30は、セキュアワールドのOSモードに設定される。これにより、プロセッサ30は、セキュアワールドのOSモードで、汎用OSモジュールを実行して、汎用オペレーティングシステムとして動作する。なおVTの場合、汎用オペレーティングシステムは、non−rootモードで動作する。   First, the information processing system 10 loads the general-purpose OS module into the main memory 24 after the power is turned on (S11). As a result, the general-purpose OS module is written in the main memory 24 as shown in FIG. The processor 30 is set to the secure world OS mode. As a result, the processor 30 executes the general-purpose OS module in the OS mode of the secure world and operates as a general-purpose operating system. In the case of VT, the general-purpose operating system operates in a non-root mode.

続いて、プロセッサ30は、ドライバモジュールをメインメモリ24にロードする(S12)。この結果、メインメモリ24には、例えば、図12のBに示すように、汎用OSモジュールとともにドライバモジュールが書き込まれる。   Subsequently, the processor 30 loads the driver module into the main memory 24 (S12). As a result, the driver module is written in the main memory 24 together with the general-purpose OS module, for example, as shown in FIG.

続いて、プロセッサ30は、ドライバモジュールを実行して、デバイスドライバ52として動作する(S13)。デバイスドライバ52は、モニタモジュールおよびセキュアOSモジュールをメインメモリ24にロードするとともに、各種の設定処理を実行する。   Subsequently, the processor 30 executes the driver module and operates as the device driver 52 (S13). The device driver 52 loads the monitor module and the secure OS module into the main memory 24 and executes various setting processes.

この結果、メインメモリ24には、図12のCに示すように、汎用OSモジュールおよびドライバモジュールが書き込まれた後の空領域に、モニタモジュールおよびセキュアOSモジュールが書き込まれる。これにより、プロセッサ30は、セキュアワールドで、モニタまたはセキュアオペレーティングシステムとして動作することができる。なお、モニタは、プロセッサ30上で直接動作する。またVTの場合、セキュアオペレーティングシステムは、non−rootモードで、モニタ上で動作する。   As a result, as shown in FIG. 12C, the monitor module and the secure OS module are written to the main memory 24 in the empty area after the general-purpose OS module and the driver module are written. Thus, the processor 30 can operate as a monitor or a secure operating system in the secure world. The monitor operates directly on the processor 30. In the case of VT, the secure operating system operates on the monitor in a non-root mode.

また、デバイスドライバ52は、処理の最後に、処理を汎用オペレーティングシステムに戻す。これにより、プロセッサ30は、ノンセキュアワールドのOSモードで、汎用OSモジュールを実行して、汎用オペレーティングシステムとして動作する。なお、汎用オペレーティングシステムはVTの場合、non−rootモードで動作する。   The device driver 52 returns the process to the general-purpose operating system at the end of the process. Thus, the processor 30 operates as a general-purpose operating system by executing the general-purpose OS module in the non-secure world OS mode. In the case of VT, the general-purpose operating system operates in a non-root mode.

図13は、第1実施形態に係るデバイスドライバ52の処理フローを示す図である。図14は、図13のステップS31の処理の詳細なフローを示す図である。デバイスドライバ52は、ドライバロード部54に呼び出されると、図13に示すフローに従って処理を実行する。   FIG. 13 is a diagram illustrating a processing flow of the device driver 52 according to the first embodiment. FIG. 14 is a diagram showing a detailed flow of the process of step S31 of FIG. When called by the driver load unit 54, the device driver 52 executes processing according to the flow shown in FIG.

まず、ステップS21において、モジュールロード部72は、メインメモリ24に、モニタモジュールおよびセキュアOSモジュールを記憶させるためのメモリ領域を確保する。モジュールロード部72は、例えば、汎用OSモジュールおよびドライバモジュールが使用していない領域を動的に確保する。また、モジュールロード部72は、汎用OSモジュールおよびドライバモジュールのロードに先だってメモリ領域を確保しておき、汎用OSモジュールおよびドライバモジュールのロードにおいて予め確保したメモリ領域を使用しないようにしてもよい。   First, in step S <b> 21, the module load unit 72 secures a memory area for storing the monitor module and the secure OS module in the main memory 24. For example, the module load unit 72 dynamically secures an area not used by the general-purpose OS module and the driver module. The module loading unit 72 may reserve a memory area prior to loading the general-purpose OS module and driver module, and may not use the memory area reserved in advance when loading the general-purpose OS module and driver module.

続いて、ステップS22において、モジュールロード部72は、確保したメモリ領域に、モニタモジュールおよびセキュアOSモジュールをロードする。モジュールロード部72は、ロードが完了すると、モニタモジュールおよびセキュアOSモジュールがロードされたアドレスを示す情報を移行制御部78に渡す。   Subsequently, in step S22, the module loading unit 72 loads the monitor module and the secure OS module into the secured memory area. When the loading is completed, the module loading unit 72 passes information indicating the address at which the monitor module and the secure OS module are loaded to the migration control unit 78.

続いて、ステップS23において、移行制御部78は、メモリマップ生成部74を呼び出す。メモリマップ生成部74は、モニタモジュールおよびセキュアOSモジュールがロードされたアドレスに基づき、プロセッサ30がモニタモジュールおよびセキュアOSモジュールを実行するためのメモリマップを生成する。   Subsequently, in step S <b> 23, the migration control unit 78 calls the memory map generation unit 74. The memory map generation unit 74 generates a memory map for the processor 30 to execute the monitor module and the secure OS module based on the address at which the monitor module and the secure OS module are loaded.

続いて、ステップS24において、移行制御部78は、割込制御ユニット38を呼び出す。割込制御ユニット38は、全ての割込ポートへの入力を無効化する。これにより、移行制御部78は、以後の処理中において、割込処理をさせなくすることができる。   Subsequently, in step S24, the transition control unit 78 calls the interrupt control unit 38. The interrupt control unit 38 invalidates the input to all interrupt ports. As a result, the transition control unit 78 can prevent interrupt processing during subsequent processing.

続いて、ステップS25において、移行制御部78は、ワールド制御ユニット32を呼び出す。ワールド制御ユニット32は、プロセッサ30をモニタモードに変更する。これにより、移行制御部78は、以後の処理においてノンセキュアワールドに変更しても、プロセッサ30にセキュアワールドのメモリマップに基づきメインメモリ24へのアクセスを継続させることができる。   Subsequently, in step S <b> 25, the transition control unit 78 calls the world control unit 32. The world control unit 32 changes the processor 30 to the monitor mode. As a result, even when the transition control unit 78 changes to a non-secure world in the subsequent processing, the processor 30 can continue to access the main memory 24 based on the memory map of the secure world.

続いて、ステップS26において、移行制御部78は、第1メモリマップ設定部81を呼び出す。第1メモリマップ設定部81は、メモリ管理ユニット36により管理されているセキュアワールドのメモリマップをコピーして、ノンセキュアワールドのメモリマップとしてメモリ管理ユニット36に設定する。   Subsequently, in step S <b> 26, the migration control unit 78 calls the first memory map setting unit 81. The first memory map setting unit 81 copies the secure world memory map managed by the memory management unit 36 and sets it in the memory management unit 36 as a non-secure world memory map.

ブート後において、メモリ管理ユニット36は、プロセッサ30が汎用OSモジュールを実行するためのメモリマップを管理している。従って、第1メモリマップ設定部81は、セキュアワールドのメモリマップをコピーしてノンセキュアワールドに設定することにより、ノンセキュアワールドに設定が変更された場合、プロセッサ30を汎用オペレーティングシステムとして動作させることができる。   After booting, the memory management unit 36 manages a memory map for the processor 30 to execute the general-purpose OS module. Therefore, the first memory map setting unit 81 causes the processor 30 to operate as a general-purpose operating system when the setting is changed to the non-secure world by copying the secure world memory map and setting the non-secure world. Can do.

なお、ステップS26においては、第1メモリマップ設定部81は、具体的には次のように処理を実行する。まず、第1メモリマップ設定部81は、セキュアワールドに設定されている状態で、メモリ管理ユニット36にアクセスしてメモリマップをコピーする。続いて、第1メモリマップ設定部81は、ワールド制御ユニット32を呼び出してノンセキュアワールドに変更してから、コピーしたメモリマップをメモリ管理ユニット36に設定する。そして、第1メモリマップ設定部81は、メモリマップを設定した後、再度、ワールド制御ユニット32を呼び出してセキュアワールドに変更する。これにより、第1メモリマップ設定部81は、セキュアワールドのメモリマップをコピーして、ノンセキュアワールドに設定することができる。   In step S26, the first memory map setting unit 81 specifically executes the process as follows. First, the first memory map setting unit 81 accesses the memory management unit 36 and copies the memory map in a state where the secure world is set. Subsequently, the first memory map setting unit 81 calls the world control unit 32 to change to the non-secure world, and then sets the copied memory map in the memory management unit 36. Then, after setting the memory map, the first memory map setting unit 81 calls the world control unit 32 again to change to the secure world. As a result, the first memory map setting unit 81 can copy the secure world memory map and set it to the non-secure world.

続いて、ステップS27において、移行制御部78は、モニタ割込設定部86を呼び出す。モニタ割込設定部86は、メモリ管理ユニット36に対してモニタへの割り込み対する設定を行う。より具体的には、モニタ割込設定部86は、モニタの割込ハンドラのアドレスを、モニタの割込先アドレスとして割込制御ユニット38に設定する。さらに、モニタ割込設定部86は、モニタへの割込入力を有効とするか無効とするかをメモリ管理ユニット36に対して設定する。   Subsequently, in step S <b> 27, the transition control unit 78 calls the monitor interrupt setting unit 86. The monitor interrupt setting unit 86 makes a setting for an interrupt to the monitor in the memory management unit 36. More specifically, the monitor interrupt setting unit 86 sets the address of the monitor interrupt handler in the interrupt control unit 38 as the monitor interrupt destination address. Further, the monitor interrupt setting unit 86 sets whether to enable or disable the interrupt input to the monitor in the memory management unit 36.

続いて、ステップS28において、移行制御部78は、第1割込設定部87を呼び出す。第1割込設定部87は、割込制御ユニット38により管理されているセキュアワールドの割込入力に関する値をコピーして、ノンセキュアワールドの割込入力に関する値としてメモリ管理ユニット36に設定する。より具体的には、第1割込設定部87は、割込制御ユニット38により管理されているセキュアワールドの割込先アドレスをコピーして、ノンセキュアワールドの割込先アドレスとしてメモリ管理ユニット36に設定する。さらに、第1割込設定部87は、割込制御ユニット38により管理されているセキュアワールドのへの割込入力の有効/無効の設定値をコピーして、ノンセキュアワールドへの割込入力の有効/無効の設定値としてメモリ管理ユニット36に設定する。   Subsequently, in step S28, the transition control unit 78 calls the first interrupt setting unit 87. The first interrupt setting unit 87 copies a value related to the interrupt input of the secure world managed by the interrupt control unit 38 and sets it in the memory management unit 36 as a value related to the interrupt input of the non-secure world. More specifically, the first interrupt setting unit 87 copies the interrupt destination address of the secure world managed by the interrupt control unit 38 and uses the memory management unit 36 as the interrupt destination address of the non-secure world. Set to. Further, the first interrupt setting unit 87 copies the valid / invalid setting value of the interrupt input to the secure world managed by the interrupt control unit 38, and sets the interrupt input to the non-secure world. It is set in the memory management unit 36 as a valid / invalid set value.

なお、ステップS28において、第1割込設定部87は、具体的には次のように処理を実行する。まず、第1割込設定部87は、セキュアワールドに設定されている状態で、割込制御ユニット38にアクセスして割込入力に関する値をコピーする。続いて、第1割込設定部87は、ワールド制御ユニット32を呼び出してノンセキュアワールドに変更してから、コピーした割込入力に関する値を割込制御ユニット38に設定する。そして、第1割込設定部87は、割込入力に関する値を設定した後、再度、ワールド制御ユニット32を呼び出してセキュアワールドに変更する。これにより、第1割込設定部87は、セキュアワールドの割込入力に関する値をコピーして、ノンセキュアワールドに設定することができる。   In step S28, the first interrupt setting unit 87 specifically executes the process as follows. First, the first interrupt setting unit 87 accesses the interrupt control unit 38 in a state where the secure world is set, and copies a value related to the interrupt input. Subsequently, the first interrupt setting unit 87 calls the world control unit 32 to change to the non-secure world, and then sets the value relating to the copied interrupt input in the interrupt control unit 38. The first interrupt setting unit 87 sets a value related to the interrupt input, and then calls the world control unit 32 again to change to the secure world. As a result, the first interrupt setting unit 87 can copy the value related to the secure world interrupt input and set it to the non-secure world.

続いて、ステップS29において、移行制御部78は、第2割込設定部88を呼び出す。第2割込設定部88は、メモリ管理ユニット36に対してセキュアワールドへの割り込み対する設定を行う。より具体的には、第2割込設定部88は、セキュアオペレーティングシステムの割込ハンドラのアドレスを、セキュアワールドの割込先アドレスとして割込制御ユニット38に設定する。さらに、第2割込設定部88は、セキュアワールドへの割込入力を有効とするか無効とするかを割込制御ユニット38に設定する。   Subsequently, in step S29, the transition control unit 78 calls the second interrupt setting unit 88. The second interrupt setting unit 88 makes a setting for interrupting the secure world to the memory management unit 36. More specifically, the second interrupt setting unit 88 sets the address of the interrupt handler of the secure operating system in the interrupt control unit 38 as the interrupt destination address of the secure world. Further, the second interrupt setting unit 88 sets in the interrupt control unit 38 whether to enable or disable the interrupt input to the secure world.

続いて、ステップS30において、移行制御部78は、割込ポート設定部89を呼び出す。割込ポート設定部89は、それぞれのポートの割込先のワールドを設定する。この場合において、割込ポート設定部89は、セキュアワールドが割込先に設定されている割込ポートにおける割込先を、ノンセキュアワールドに変更する。割込ポート設定部89は、セキュアオペレーティングシステムへの割り込みに使用される割込ポートにおける割込先をセキュアワールドに設定する。   Subsequently, in step S30, the migration control unit 78 calls the interrupt port setting unit 89. The interrupt port setting unit 89 sets an interrupt destination world for each port. In this case, the interrupt port setting unit 89 changes the interrupt destination at the interrupt port where the secure world is set as the interrupt destination to the non-secure world. The interrupt port setting unit 89 sets the interrupt destination in the interrupt port used for interrupting the secure operating system to the secure world.

続いて、ステップS31において、移行制御部78は、第1レジスタ設定部91を呼び出す。第1レジスタ設定部91は、バンクレジスタ34により記憶されているセキュアワールドのレジスタ値をコピーして、ノンセキュアワールドのレジスタ値としてバンクレジスタ34に設定する。   Subsequently, in step S31, the migration control unit 78 calls the first register setting unit 91. The first register setting unit 91 copies the secure world register value stored in the bank register 34 and sets it in the bank register 34 as a non-secure world register value.

なお、ステップS31において、第1レジスタ設定部91は、具体的には次のように処理を実行する。まず、第1レジスタ設定部91は、セキュアワールドに設定されている状態で、バンクレジスタ34にアクセスしてレジスタ値をコピーする。続いて、第1レジスタ設定部91は、ワールド制御ユニット32を呼び出してノンセキュアワールドに変更してから、コピーしたレジスタ値をバンクレジスタ34に設定する。そして、第1レジスタ設定部91は、レジスタ値を設定した後、再度、ワールド制御ユニット32を呼び出してセキュアワールドに変更する。これにより、第1レジスタ設定部91は、セキュアワールドのレジスタ値をコピーして、ノンセキュアワールドに設定することができる。   In step S31, the first register setting unit 91 specifically executes the process as follows. First, the first register setting unit 91 copies the register value by accessing the bank register 34 in a state where the secure world is set. Subsequently, the first register setting unit 91 calls the world control unit 32 to change to the non-secure world, and then sets the copied register value in the bank register 34. Then, after setting the register value, the first register setting unit 91 calls the world control unit 32 again to change to the secure world. Accordingly, the first register setting unit 91 can copy the register value of the secure world and set it to the non-secure world.

また、第1レジスタ設定部91は、複数のレジスタ値の全てを一括してコピーおよび設定をしてもよい。また、複数のレジスタ値を1個ずつワールドの切り替えをしながらコピーおよび設定を繰り返してもよい。この場合、第1レジスタ設定部91は、図14に示すように、処理を実行する。すなわち、第1レジスタ設定部91は、まず、未設定のレジスタが存在するか否かを判断する(S31−1)。未設定のレジスタが存在する場合(S31−1のYes)、第1レジスタ設定部91は、そのレジスタのレジスタ値を取得し(S31−2)、ノンセキュアワールドに変更し(S31−3)、レジスタ値を設定し(S31−4)、セキュアワールドに変更する(S31−5)。そして、未設定のレジスタが存在しなくなると(S31−1のNo)、処理を戻す。   Further, the first register setting unit 91 may copy and set all of the plurality of register values at once. Further, copying and setting may be repeated while switching the world one by one for a plurality of register values. In this case, the first register setting unit 91 executes processing as shown in FIG. That is, the first register setting unit 91 first determines whether there is an unset register (S31-1). When there is an unset register (Yes in S31-1), the first register setting unit 91 acquires the register value of the register (S31-2), changes to the non-secure world (S31-3), The register value is set (S31-4) and changed to the secure world (S31-5). When there is no unset register (No in S31-1), the process is returned.

続いて、ステップS32において、移行制御部78は、第2レジスタ設定部92を呼び出す。第2レジスタ設定部92は、モニタモジュールおよびセキュアOSモジュールを実行するためのレジスタ値を、セキュアワールドのレジスタ値としてバンクレジスタ34に設定する。   Subsequently, in step S <b> 32, the migration control unit 78 calls the second register setting unit 92. The second register setting unit 92 sets a register value for executing the monitor module and the secure OS module in the bank register 34 as a register value of the secure world.

続いて、ステップS33において、移行制御部78は、第2メモリマップ設定部82を呼び出す。第2メモリマップ設定部82は、モニタモジュールおよびセキュアOSモジュールを実行するためのメモリマップを、セキュアワールドのメモリマップとしてメモリ管理ユニット36に設定する。これにより、第2メモリマップ設定部82は、セキュアワールドにおいて、プロセッサ30をモニタおよびセキュアオペレーティングシステムとして動作させることができる。   Subsequently, in step S33, the migration control unit 78 calls the second memory map setting unit 82. The second memory map setting unit 82 sets a memory map for executing the monitor module and the secure OS module in the memory management unit 36 as a secure world memory map. Accordingly, the second memory map setting unit 82 can operate the processor 30 as a monitor and a secure operating system in the secure world.

続いて、ステップS34において、移行制御部78は、ワールド制御ユニット32を呼び出す。ワールド制御ユニット32は、プロセッサ30をノンセキュアワールドのOSモードに変更する。これにより、移行制御部78は、以後の処理においてノンセキュアワールドにおいて、プロセッサ30をデバイスドライバ52として動作させることができる。   Subsequently, in step S <b> 34, the transition control unit 78 calls the world control unit 32. The world control unit 32 changes the processor 30 to the non-secure world OS mode. Thereby, the migration control unit 78 can cause the processor 30 to operate as the device driver 52 in the non-secure world in the subsequent processing.

続いて、ステップS35において、移行制御部78は、割込制御ユニット38を呼び出す。割込制御ユニット38は、無効化した割込ポートへの入力を復帰させる。これにより、移行制御部78は、以後の処理において、通常の設定に従って、割込入力を有効にすることができる。   Subsequently, in step S35, the transition control unit 78 calls the interrupt control unit 38. The interrupt control unit 38 restores the input to the disabled interrupt port. Thereby, the transition control unit 78 can validate the interrupt input in the subsequent processing according to the normal setting.

そして、ステップS36において、移行制御部78は、処理をドライバロード部54に返す。これにより、移行制御部78は、処理を汎用オペレーティングシステムに戻すことができる。   In step S 36, the migration control unit 78 returns the process to the driver load unit 54. Thereby, the transfer control unit 78 can return the process to the general-purpose operating system.

以上のように、デバイスドライバ52は、セキュアワールドで動作していた汎用オペレーティングシステムのメモリマップ、バンクレジスタ34のレジスタ値、割込入力に関する設定値を、ノンセキュアワールドに移行することができる。これにより、汎用オペレーティングシステムは、ノンセキュアワールドで動作することができる。さらに、デバイスドライバ52は、セキュアワールドのメモリマップ、バンクレジスタ34のレジスタ値、割込入力に関する設定値を新たに設定することができる。これにより、モニタおよびセキュアオペレーティングシステムは、セキュアワールドで動作することができる。   As described above, the device driver 52 can transfer the memory map of the general-purpose operating system operating in the secure world, the register value of the bank register 34, and the setting value related to the interrupt input to the non-secure world. As a result, the general-purpose operating system can operate in a non-secure world. Further, the device driver 52 can newly set a secure world memory map, a register value of the bank register 34, and a setting value related to an interrupt input. Thereby, the monitor and the secure operating system can operate in the secure world.

タイプ1のモニタ(ハイパーバイザ)をオペレーティングシステムの起動後に動作させるためには、オペレーティングシステムを動作させるワールド(VT機能プロセッサではVMXmode、TrustZone搭載プロセッサではワールド)を移行させなければならない。その際、ワールドの移行の「直前」と「直後」とでオペレーティングシステムから見た設定が同一になるよう辻褄を合わせる必要がある。具体的には、同一のバンクメモリへのアクセス命令でもワールドが変わると物理的に別個のバンクメモリにアクセスされるといった問題、割込ポートにされた入力は、元のワールドに入力されてしまうといった問題等が生じる。従って、このような設定を、ワールドの移行の「直前」と「直後」とで正しく変更しなければならない。   In order for the type 1 monitor (hypervisor) to operate after the operating system is started, the world in which the operating system operates (VMX mode for the VT function processor and world for the TrustZone processor) must be shifted. At that time, it is necessary to match the habits so that the settings seen from the operating system are the same between “immediately before” and “immediately” of the world transition. Specifically, even if the access instruction to the same bank memory is changed, if the world changes, a physically separate bank memory is accessed, and the input made to the interrupt port is input to the original world. Problems arise. Therefore, such a setting must be correctly changed between “immediately before” and “immediately after” the world transition.

さらに、これらの設定は、ワールドの移行の「移行中」においても正しく動作する必要もある。例えば、汎用オペレーティングシステムをセキュアワールドからノンセキュアワールドに移行し、且つ、セキュアワールドで新しいセキュアオペレーティングシステムを動作させる場合、移行中において、プロセッサ30は、汎用オペレーティングシステムとセキュアオペレーティングシステムの両方のメモリマップで正しく動作しなければならない。また、さらに、設定すべき項目は、複数個存在するため、移行中において正しく動作するために、設定を切換える項目の順序も重要となる。   In addition, these settings also need to work correctly during the “transition” world transition. For example, if a general purpose operating system is transitioned from a secure world to a non-secure world and a new secure operating system is operating in the secure world, during the transition, the processor 30 will have a memory map for both the general purpose operating system and the secure operating system. Must work correctly. In addition, since there are a plurality of items to be set, the order of the items whose settings are switched is important in order to operate correctly during the transition.

第1実施形態に係る情報処理システム10によれば、このような問題を解決することができる。これにより、第1実施形態に係る情報処理システム10によれば、汎用オペレーティングシステムをプロセッサ30上で直接動作させ、その後に、プロセッサ30上でモニタを直接動作させるとともに、モニタ上で新たなセキュアオペレーティングシステムおよび汎用オペレーティングシステムを動作させることができる。   According to the information processing system 10 according to the first embodiment, such a problem can be solved. As a result, according to the information processing system 10 according to the first embodiment, the general-purpose operating system is directly operated on the processor 30, and then the monitor is directly operated on the processor 30, and a new secure operating system is operated on the monitor. System and general purpose operating system can be operated.

(第2実施形態)
図15は、第2実施形態に係るデバイスドライバ110の機能構成を、ドライバロード部54および情報処理システム10のハードウェアとともに示す図である。第2実施形態に係る情報処理システム10は、メモリ保護ユニット111をさらに備える。メモリ保護ユニット111は、プロセッサ30がノンセキュアワールドで動作している場合にメインメモリ24における指定された領域への書き込みを禁止する。
(Second Embodiment)
FIG. 15 is a diagram illustrating the functional configuration of the device driver 110 according to the second embodiment, together with the driver load unit 54 and the hardware of the information processing system 10. The information processing system 10 according to the second embodiment further includes a memory protection unit 111. The memory protection unit 111 prohibits writing to a designated area in the main memory 24 when the processor 30 is operating in the non-secure world.

第2実施形態に係るデバイスドライバ110は、図5に示した第1実施形態に係るデバイスドライバ52が有する構成要素に加えて、保護設定部112をさらに有する。モジュールロード部72は、モニタモジュールおよびセキュアOSモジュールをメインメモリ24にロードした後に、保護設定部112を呼び出す。保護設定部112は、メモリ保護ユニット111に対して、モニタモジュールおよびセキュアOSモジュールがロードされた領域を書き込み禁止領域として設定する。これにより、メモリ保護ユニット111は、プロセッサ30がノンセキュアワールドで動作している場合に、モニタモジュールおよびセキュアOSモジュールが書き込まれた領域への書き込みを禁止することができる。   The device driver 110 according to the second embodiment further includes a protection setting unit 112 in addition to the components included in the device driver 52 according to the first embodiment shown in FIG. The module loading unit 72 calls the protection setting unit 112 after loading the monitor module and the secure OS module into the main memory 24. The protection setting unit 112 sets an area in which the monitor module and the secure OS module are loaded as a write prohibited area in the memory protection unit 111. Thus, the memory protection unit 111 can prohibit writing to the area where the monitor module and the secure OS module are written when the processor 30 is operating in the non-secure world.

図16は、第2実施形態に係るデバイスドライバ110の処理フローを示す図である。第2実施形態に係るデバイスドライバ110は、図13に示したステップS22の処理の後に、ステップS51の処理を実行する。ステップS51において、保護設定部112は、モジュールロード部72から、モニタモジュールおよびセキュアOSモジュールが書き込まれたアドレスを示す情報を受け取る。そして、保護設定部112は、モニタモジュールおよびセキュアOSモジュールが書き込まれた領域を、ノンセキュアワールドにおける書き込み禁止領域として設定する。デバイスドライバ110は、ステップS51の処理を終えると、以降、図13のステップS23以下と同一の処理を実行する。   FIG. 16 is a diagram illustrating a processing flow of the device driver 110 according to the second embodiment. The device driver 110 according to the second embodiment executes the process of step S51 after the process of step S22 illustrated in FIG. In step S <b> 51, the protection setting unit 112 receives information indicating the address where the monitor module and the secure OS module are written from the module load unit 72. Then, the protection setting unit 112 sets the area where the monitor module and the secure OS module are written as a write prohibited area in the non-secure world. When the device driver 110 finishes the process of step S51, the device driver 110 subsequently executes the same process as that of step S23 and subsequent steps in FIG.

図17は、メインメモリ24における書き込みが禁止される領域を示す図である。メモリ保護ユニット111は、図17に示すように、プロセッサ30がノンセキュアワールドで動作している場合に、モニタモジュールおよびセキュアOSモジュールが書き込まれた領域への書き込みを禁止する。このような第2実施形態に係る情報処理システム10によれば、例えば汎用オペレーティングシステムに脆弱性が存在した場合であっても、攻撃者によりモニタおよびセキュアオペレーティングシステムを改ざんさせないようにすることができる。   FIG. 17 is a diagram showing an area in the main memory 24 where writing is prohibited. As shown in FIG. 17, the memory protection unit 111 prohibits writing to the area where the monitor module and the secure OS module are written when the processor 30 is operating in the non-secure world. According to the information processing system 10 according to the second embodiment as described above, for example, even when a vulnerability exists in the general-purpose operating system, it is possible to prevent an attacker from falsifying the monitor and the secure operating system. .

(第3実施形態)
図18は、第3実施形態に係るデバイスドライバ120の機能構成を、ドライバロード部54および情報処理システム10のハードウェアとともに示す図である。第3実施形態に係るデバイスドライバ120は、図15に示した第2実施形態に係るデバイスドライバ110が有する構成要素に加えて、ロード判定部121をさらに有する。
(Third embodiment)
FIG. 18 is a diagram illustrating the functional configuration of the device driver 120 according to the third embodiment, together with the driver load unit 54 and the hardware of the information processing system 10. The device driver 120 according to the third embodiment further includes a load determination unit 121 in addition to the components included in the device driver 110 according to the second embodiment illustrated in FIG.

ロード判定部121は、ドライバロード部54に呼び出される。ロード判定部121は、モニタモジュールおよびセキュアOSモジュールのロードに先だって、予め定められた基準に従って、ロードを実行するか否かを判定する。ロードすると判定した場合、ロード判定部121は、モジュールロード部72を呼び出して、ロードを実行させる。ロードしないと判定した場合、ドライバロード部54にエラーを通知して、モジュールロード部72によるロードを禁止する。   The load determination unit 121 is called by the driver load unit 54. Prior to loading the monitor module and the secure OS module, the load determination unit 121 determines whether or not to execute the load according to a predetermined standard. When it is determined to load, the load determination unit 121 calls the module load unit 72 to execute the load. When it is determined not to load, an error is notified to the driver loading unit 54 and the loading by the module loading unit 72 is prohibited.

図19は、第3実施形態に係るデバイスドライバ120のロード時における処理フローを示す図である。第3実施形態に係るデバイスドライバ120は、まず、ステップS61を実行する。ステップS61において、ロード判定部121は、モニタモジュールおよびセキュアOSモジュールをロードするか否かを判定する。ロードしないと判定した場合、ステップS62において、ロード判定部121は、ドライバロード部54にエラー通知を返して、本フローを終了する。ロードすると判定した場合、ロード判定部121は、図16のステップS21に処理を進める。   FIG. 19 is a diagram showing a processing flow when loading the device driver 120 according to the third embodiment. The device driver 120 according to the third embodiment first executes step S61. In step S61, the load determination unit 121 determines whether to load the monitor module and the secure OS module. If it is determined not to load, in step S62, the load determination unit 121 returns an error notification to the driver load unit 54 and ends this flow. If it is determined to load, the load determination unit 121 proceeds to step S21 in FIG.

ロード判定部121は、例えば、モニタまたはセキュアオペレーティングシステムが前回異常終了した場合、ロードをしないと判定する。また、ロード判定部121は、ネットワークを介して所定のサーバに問い合わせをし、問い合わせ結果に基づきロードをするかしないかを判定してもよい。また、ロード判定部121は、例えば、ハードウェアの耐タンパ性を有するモジュール(Trusted Platform Module)と連携して汎用OSモジュールを検証し、その検証結果に基づきロードをするか否かを判定してもよい。   For example, when the monitor or the secure operating system ends abnormally last time, the load determination unit 121 determines not to load. The load determination unit 121 may inquire a predetermined server via a network and determine whether or not to load based on the inquiry result. Also, the load determination unit 121 verifies the general-purpose OS module in cooperation with, for example, a hardware tamper-resistant module (Trusted Platform Module), and determines whether to load based on the verification result. Also good.

このような第3実施形態に係る情報処理システム10によれば、攻撃者により悪意にロードの指示をされた場合、または、モニタモジュールまたはセキュアが破壊してしまった場合等の異常な動作時において、ロードを禁止することができる。   According to the information processing system 10 according to the third embodiment as described above, in the case of an abnormal operation such as when an attacker gives a malicious instruction to load or when the monitor module or secure is destroyed. , Loading can be prohibited.

(第4実施形態)
図20は、第4実施形態に係るデバイスドライバ130の機能構成を、ドライバロード部54および情報処理システム10のハードウェアとともに示す図である。第4実施形態に係るデバイスドライバ130は、図18に示した第3実施形態に係るデバイスドライバ120が有する構成要素に加えて、アンロード判定部131をさらに有する。
(Fourth embodiment)
FIG. 20 is a diagram illustrating the functional configuration of the device driver 130 according to the fourth embodiment, together with the driver load unit 54 and the hardware of the information processing system 10. The device driver 130 according to the fourth embodiment further includes an unload determination unit 131 in addition to the components included in the device driver 120 according to the third embodiment illustrated in FIG.

アンロード判定部131は、ドライバロード部54から呼び出される。アンロード判定部131は、プロセッサ30がノンセキュアワールドに設定されている場合に、モニタモジュールおよびセキュアOSモジュールのアンロードの指示を受け付ける。   The unload determination unit 131 is called from the driver load unit 54. The unload determination unit 131 receives an instruction to unload the monitor module and the secure OS module when the processor 30 is set to the non-secure world.

アンロード判定部131は、ドライバロード部54からアンロードの指示を受けると、予め定められた基準に従って、アンロードを実行するか否かを判定する。アンロードすると判定した場合、アンロード判定部131は、移行部73を呼び出して、モニタモジュールおよびセキュアOSモジュールのアンロードを実行させる。アンロードしないと判定した場合、ドライバロード部54にエラーを通知してアンロードを禁止する。   When the unload determination unit 131 receives an unload instruction from the driver load unit 54, the unload determination unit 131 determines whether or not to execute the unload according to a predetermined criterion. If it is determined to unload, the unload determination unit 131 calls the migration unit 73 to cause the monitor module and the secure OS module to be unloaded. If it is determined not to unload, an error is notified to the driver load unit 54 to prohibit unloading.

移行部73は、アンロード判定部131から呼び出された場合、予め定められたアンロード処理を実行する。そして、移行部73は、アンロード処理を完了すると、処理をドライバロード部54に戻す。   When the migration unit 73 is called from the unload determination unit 131, the migration unit 73 executes a predetermined unload process. Then, when the unloading process is completed, the transfer unit 73 returns the process to the driver loading unit 54.

図21は、第4実施形態に係るデバイスドライバ130のアンロード時における処理フローを示す図である。第4実施形態に係るデバイスドライバ130は、ノンセキュアワールドにおいて、ドライバロード部54から呼び出されて、アンロードの指示を受けると、図21に示す処理を実行する。   FIG. 21 is a diagram illustrating a processing flow when the device driver 130 according to the fourth embodiment is unloaded. When the device driver 130 according to the fourth embodiment is called from the driver load unit 54 and receives an unload instruction in the non-secure world, the device driver 130 executes the process shown in FIG.

まず、ステップS71において、アンロード判定部131は、モニタモジュールおよびセキュアOSモジュールをアンロードするか否かを判定する。アンロード判定部131は、例えば、汎用オペレーティングシステムに異常が無いか、すなわち、サイバー攻撃の痕跡が無いか、マルウェアが侵入していなか等を判断し、異常が無い場合にアンロードをすると判定してもよい。また、アンロード判定部131は、ネットワークを介して所定のサーバに問い合わせをし、問い合わせ結果に基づきアンロードをするかしないかを判定してもよい。また、アンロード判定部131は、アンロードを指示したプログラムが正規品であることを条件として、アンロードすると判定してもよい。これにより、アンロード判定部131は、攻撃者により悪意にアンロードの指示をされた場合等の異常時において、アンロードを禁止することができる。   First, in step S71, the unload determination unit 131 determines whether to unload the monitor module and the secure OS module. The unload determination unit 131 determines, for example, whether there is no abnormality in the general-purpose operating system, that is, whether there is no trace of a cyber attack or whether malware has entered, and determines that unloading is performed when there is no abnormality. May be. Further, the unload determination unit 131 may inquire a predetermined server via a network and determine whether or not to perform unloading based on the inquiry result. Further, the unload determination unit 131 may determine to unload on the condition that the program instructing the unload is a genuine product. Thereby, the unload determination part 131 can prohibit unloading at the time of abnormality, such as a case where an attacker maliciously instructs unload.

アンロードしないと判定した場合、ステップS72において、アンロード判定部131は、ドライバロード部54にエラー通知を返して、本フローを終了する。アンロードすると判定した場合、アンロード判定部131は、処理をステップS73に進めて、移行制御部78を呼び出す。   If it is determined not to unload, in step S72, the unload determination unit 131 returns an error notification to the driver load unit 54 and ends this flow. When it determines with unloading, the unload determination part 131 advances a process to step S73, and calls the transfer control part 78. FIG.

ステップS73において、移行制御部78は、ワールド制御ユニット32を呼び出す。ワールド制御ユニット32は、プロセッサ30をノンセキュアワールドからセキュアワールドに変更する。   In step S <b> 73, the transition control unit 78 calls the world control unit 32. The world control unit 32 changes the processor 30 from the non-secure world to the secure world.

続いて、ステップS74において、移行制御部78は、割込制御ユニット38を呼び出す。割込制御ユニット38は、全ての割込ポートへの入力を無効化する。   Subsequently, in step S74, the transition control unit 78 calls the interrupt control unit 38. The interrupt control unit 38 invalidates the input to all interrupt ports.

続いて、ステップS75において、移行制御部78は、ワールド制御ユニット32を呼び出す。ワールド制御ユニット32は、プロセッサ30をモニタモードに変更する。   Subsequently, in step S <b> 75, the transition control unit 78 calls the world control unit 32. The world control unit 32 changes the processor 30 to the monitor mode.

続いて、ステップS76において、移行制御部78は、第1メモリマップ設定部81を呼び出す。第1メモリマップ設定部81は、メモリ管理ユニット36により管理されているノンセキュアワールドのメモリマップをコピーして、セキュアワールドのメモリマップとしてメモリ管理ユニット36に設定する。これにより、第1メモリマップ設定部81は、セキュアワールドに設定が変更された場合、プロセッサ30を汎用オペレーティングシステムとして動作させることができる。   Subsequently, in step S76, the migration control unit 78 calls the first memory map setting unit 81. The first memory map setting unit 81 copies the memory map of the non-secure world managed by the memory management unit 36 and sets it in the memory management unit 36 as a memory map of the secure world. Thus, the first memory map setting unit 81 can operate the processor 30 as a general-purpose operating system when the setting is changed to the secure world.

続いて、ステップS77において、移行制御部78は、第1レジスタ設定部91を呼び出す。第1レジスタ設定部91は、バンクレジスタ34により記憶されているノンセキュアワールドのレジスタ値をコピーして、セキュアワールドのレジスタ値としてバンクレジスタ34に設定する。   Subsequently, in step S77, the transition control unit 78 calls the first register setting unit 91. The first register setting unit 91 copies the register value of the non-secure world stored in the bank register 34 and sets it in the bank register 34 as the register value of the secure world.

続いて、ステップS78において、移行制御部78は、割込ポート設定部89を呼び出す。割込ポート設定部89は、それぞれのポートの割り込み先のワールドを設定する。この場合において、割込ポート設定部89は、ノンセキュアワールドが割込先に設定されている割込ポートにおける割込先を、セキュアワールドに変更する。割込ポート設定部89は、セキュアオペレーティングシステムへの割り込みに使用される割込ポートにおける割込先を、初期値に設定する。   Subsequently, in step S78, the migration control unit 78 calls the interrupt port setting unit 89. The interrupt port setting unit 89 sets the interrupt destination world of each port. In this case, the interrupt port setting unit 89 changes the interrupt destination in the interrupt port where the non-secure world is set as the interrupt destination to the secure world. The interrupt port setting unit 89 sets an interrupt destination in an interrupt port used for interrupting the secure operating system to an initial value.

続いて、ステップS79において、移行制御部78は、第1割込設定部87を呼び出す。第1割込設定部87は、割込制御ユニット38により管理されているノンセキュアワールドの割込入力に関する値をコピーして、セキュアワールドの割込入力に関する値としてメモリ管理ユニット36に設定する。より具体的には、第1割込設定部87は、割込制御ユニット38により管理されているノンセキュアワールドの割込先アドレスをコピーして、セキュアワールドの割込先アドレスとしてメモリ管理ユニット36に設定する。さらに、第1割込設定部87は、割込制御ユニット38により管理されているノンセキュアワールドのへの割込入力の有効/無効の設定値をコピーして、セキュアワールドへの割込入力の有効/無効の設定値としてメモリ管理ユニット36に設定する。   Subsequently, in step S79, the transition control unit 78 calls the first interrupt setting unit 87. The first interrupt setting unit 87 copies the value related to the interrupt input of the non-secure world managed by the interrupt control unit 38 and sets it in the memory management unit 36 as the value related to the interrupt input of the secure world. More specifically, the first interrupt setting unit 87 copies the interrupt destination address of the non-secure world managed by the interrupt control unit 38 and uses the memory management unit 36 as the interrupt destination address of the secure world. Set to. Further, the first interrupt setting unit 87 copies the valid / invalid setting value of the interrupt input to the non-secure world managed by the interrupt control unit 38, and sets the interrupt input to the secure world. It is set in the memory management unit 36 as a valid / invalid set value.

続いて、ステップS80において、移行制御部78は、ワールド制御ユニット32を呼び出す。ワールド制御ユニット32は、プロセッサ30をセキュアワールドのOSモードに変更する。続いて、ステップS81において、移行制御部78は、割込制御ユニット38を呼び出す。割込制御ユニット38は、無効化した割込ポートへの入力を復帰させる。   Subsequently, in step S80, the transition control unit 78 calls the world control unit 32. The world control unit 32 changes the processor 30 to the secure world OS mode. Subsequently, in step S <b> 81, the transition control unit 78 calls the interrupt control unit 38. The interrupt control unit 38 restores the input to the disabled interrupt port.

そして、ステップS82において、移行制御部78は、処理をドライバロード部54に返す。これにより、移行制御部78は、処理を汎用オペレーティングシステムに戻すことができる。なお、移行制御部78は、セキュアワールドにおけるメモリマップ、割込設定およびバンクレジスタ34のレジスタ値を初期値に戻す処理を実行させてもよい。また、移行制御部78は、メモリ保護ユニット111の保護設定を初期値に戻す処理も実行させてもよい。   In step S <b> 82, the migration control unit 78 returns the process to the driver load unit 54. Thereby, the transfer control unit 78 can return the process to the general-purpose operating system. Note that the migration control unit 78 may execute processing for returning the memory map in the secure world, the interrupt setting, and the register value of the bank register 34 to the initial values. Further, the migration control unit 78 may also execute processing for returning the protection setting of the memory protection unit 111 to the initial value.

このような第4実施形態に係る情報処理システム10は、再起動をさせずに、モニタモジュールおよびセキュアOSモジュールをアンロードすることができる。これにより、情報処理システム10によれば、モニタモジュールおよびセキュアOSモジュールを更新し、再度、ロードすることができる。従って、情報処理システム10によれば、可用性の高いアプリケーションに利用された場合であっても、モニタモジュールおよびセキュアOSモジュールを更新することができる。   The information processing system 10 according to the fourth embodiment can unload the monitor module and the secure OS module without restarting. Thereby, according to the information processing system 10, the monitor module and the secure OS module can be updated and loaded again. Therefore, according to the information processing system 10, the monitor module and the secure OS module can be updated even when used for a highly available application.

(第5実施形態)
図22は、第5実施形態に係るデバイスドライバ140の機能構成を、ドライバロード部54および情報処理システム10のハードウェアとともに示す図である。第5実施形態に係るデバイスドライバ140は、図18に示した第3実施形態に係るデバイスドライバ120が有する構成要素に加えて、検証部141と、復号部142とをさらに有する。なお、デバイスドライバ140は、図20に示す第4実施形態に係るデバイスドライバ130が有する構成要素に加えて、検証部141と、復号部142とをさらに有する構成であってもよい。
(Fifth embodiment)
FIG. 22 is a diagram illustrating the functional configuration of the device driver 140 according to the fifth embodiment, together with the driver load unit 54 and the hardware of the information processing system 10. The device driver 140 according to the fifth embodiment further includes a verification unit 141 and a decoding unit 142 in addition to the components included in the device driver 120 according to the third embodiment illustrated in FIG. The device driver 140 may be configured to further include a verification unit 141 and a decoding unit 142 in addition to the components included in the device driver 130 according to the fourth embodiment illustrated in FIG.

第5実施形態において、モジュール格納部71は、暗号化されたモニタモジュールおよび暗号化されたセキュアOSモジュールを格納する。さらに、モジュール格納部71は、暗号化されたモニタモジュールおよび暗号化されたセキュアOSモジュールに、デジタル署名が付加されている。暗号化方法は、どのような方法であってもよく、例えば、AES(Advanced Encryption Standard)等の共通鍵暗号方式であってよい。また、デジタル署名の方法は、SHA(Secure Hash Algorithm)等のハッシュ値の計算方式とRSA暗号等の公開鍵暗号方式を組み合わせた方法であってよい。   In the fifth embodiment, the module storage unit 71 stores an encrypted monitor module and an encrypted secure OS module. Further, in the module storage unit 71, a digital signature is added to the encrypted monitor module and the encrypted secure OS module. The encryption method may be any method, for example, a common key encryption method such as AES (Advanced Encryption Standard). The digital signature method may be a method combining a hash value calculation method such as SHA (Secure Hash Algorithm) and a public key encryption method such as RSA encryption.

検証部141は、モニタモジュールおよびセキュアOSモジュールのロードの指示を受けた場合、モジュール格納部71に格納されたモニタモジュールおよびセキュアOSモジュールが改ざんされていないかを検証する。ロード判定部121は、検証部141により改ざんされていないと判定された場合、モジュールロード部72を呼び出す。   When receiving the instruction to load the monitor module and the secure OS module, the verification unit 141 verifies whether the monitor module and the secure OS module stored in the module storage unit 71 have been tampered with. When it is determined by the verification unit 141 that the load determination unit 121 has not been tampered with, the load determination unit 121 calls the module load unit 72.

復号部142は、暗号化されたモニタモジュールおよび暗号化されたセキュアOSモジュールを、内部で管理する暗号化鍵を用いて復号する。モジュールロード部72は、復号部142により復号されたモニタモジュールおよびセキュアOSモジュールをメインメモリ24にロードする。   The decryption unit 142 decrypts the encrypted monitor module and the encrypted secure OS module using an encryption key managed internally. The module load unit 72 loads the monitor module and secure OS module decrypted by the decryption unit 142 into the main memory 24.

図23は、第5実施形態に係るデバイスドライバ140のロード時における処理フローを示す図である。第5実施形態に係るデバイスドライバ140は、ドライバロード部54から呼び出されて、ロードの指示を受けると、図23に示す処理を実行する。   FIG. 23 is a diagram illustrating a processing flow when the device driver 140 according to the fifth embodiment is loaded. When the device driver 140 according to the fifth embodiment is called from the driver load unit 54 and receives a load instruction, the device driver 140 executes the process shown in FIG.

まず、ステップS101において、検証部141は、モニタモジュールおよびセキュアOSモジュールのデジタル署名を検証する。例えば、検証部141は、公開鍵を有し、公開鍵によりデジタル署名を検証する。続いて、ステップS102において、検証部141は、検証が成功したか失敗したかを判断する。検証が失敗した場合(ステップS102のNo)、検証部141は、処理をステップS105に進める。   First, in step S101, the verification unit 141 verifies the digital signatures of the monitor module and the secure OS module. For example, the verification unit 141 has a public key and verifies the digital signature using the public key. Subsequently, in step S102, the verification unit 141 determines whether the verification has succeeded or failed. When the verification fails (No in step S102), the verification unit 141 advances the process to step S105.

検証が成功した場合(S102のYes)、ステップS103において、検証部141は、モニタモジュールおよびセキュアOSモジュールのそれぞれの全体のハッシュ値を算出する。続いて、ステップS104において、検証部141は、モニタモジュールおよびセキュアOSモジュールの全体のハッシュ値と、デジタル署名に含まれるハッシュ値と比較する。検証部141は、ハッシュ値同士が一致する場合、モニタモジュールおよびセキュアOSモジュールが改ざんされていないと判定する。モニタモジュールまたはセキュアOSモジュールが改ざんされていると判断する場合(S104のNo)、検証部141は、処理をステップS105に進める。   If the verification is successful (Yes in S102), in step S103, the verification unit 141 calculates the entire hash value of each of the monitor module and the secure OS module. Subsequently, in step S104, the verification unit 141 compares the hash values of the entire monitor module and secure OS module with the hash values included in the digital signature. If the hash values match, the verification unit 141 determines that the monitor module and the secure OS module have not been tampered with. When determining that the monitor module or the secure OS module has been tampered with (No in S104), the verification unit 141 advances the process to Step S105.

ステップS105において、ロード判定部121は、ドライバロード部54にエラー通知を返して、本フローを終了する。モニタモジュールおよびセキュアOSモジュールが改ざんされていないと判断する場合(S104のYes)、検証部141は、処理をステップS106に進める。   In step S105, the load determination unit 121 returns an error notification to the driver load unit 54, and ends this flow. When determining that the monitor module and the secure OS module have not been tampered with (Yes in S104), the verification unit 141 advances the processing to Step S106.

ステップS106において、モジュールロード部72は、メインメモリ24に、モニタモジュールおよびセキュアOSモジュールをロードするためのメモリ領域を確保する。続いて、ステップS107において、復号部142は、暗号化されたモニタモジュールおよび暗号化されたセキュアOSモジュールを、内部で管理する暗号化鍵を用いて復号する。そして、モジュールロード部72は、復号部142により復号されたモニタモジュールおよびセキュアOSモジュールをメインメモリ24にロードする。   In step S106, the module loading unit 72 secures a memory area for loading the monitor module and the secure OS module in the main memory 24. Subsequently, in step S107, the decrypting unit 142 decrypts the encrypted monitor module and the encrypted secure OS module using an encryption key managed internally. Then, the module load unit 72 loads the monitor module and the secure OS module decrypted by the decryption unit 142 into the main memory 24.

続いて、ステップS108において、保護設定部112は、モジュールロード部72から、モニタモジュールおよびセキュアOSモジュールが書き込まれたアドレスを示す情報を受け取る。続いて、保護設定部112は、モニタモジュールおよびセキュアOSモジュールが書き込まれた領域を、ノンセキュアワールドにおける書き込み禁止領域として設定する。そして、デバイスドライバ140は、ステップS108の処理を終えると、以降、図16のステップS23以下と同一の処理を実行する。   Subsequently, in step S <b> 108, the protection setting unit 112 receives information indicating addresses where the monitor module and the secure OS module are written from the module load unit 72. Subsequently, the protection setting unit 112 sets an area in which the monitor module and the secure OS module are written as a write prohibited area in the non-secure world. Then, after completing the process of step S108, the device driver 140 executes the same process as that of step S23 and subsequent steps in FIG.

このような第5実施形態に係る情報処理システム10は、デバイスドライバ140に格納されているモニタモジュールおよびセキュアOSモジュールを暗号化して改ざんを困難とし、もし改ざんされてしまった場合にもロードしない。これにより、本実施形態に係る情報処理システム10によれば、モニタモジュールおよびセキュアOSモジュールをより強力に保護することができる。   Such an information processing system 10 according to the fifth embodiment encrypts the monitor module and the secure OS module stored in the device driver 140 to make it difficult to tamper with them, and does not load them even if they are tampered with. Thereby, according to information processing system 10 concerning this embodiment, a monitor module and a secure OS module can be protected more strongly.

なお、情報処理システム10は、暗号化およびデジタル署名に用いる鍵を難読化したり、ドライバモジュール自体を難読化したりして、ドライバモジュールをさらに強力に保護してもよい。また、情報処理システム10は、プロセッサ30に、暗号化したプログラムまたはデジタル署名を付加したプログラムを実行可能なCPUを適用してもよい。このようにしても、情報処理システム10は、ドライバモジュールをさらに強力に保護することができる。   Note that the information processing system 10 may obfuscate the keys used for encryption and digital signature, or obfuscate the driver module itself to further protect the driver module. The information processing system 10 may apply a CPU capable of executing an encrypted program or a program with a digital signature to the processor 30. Even in this case, the information processing system 10 can protect the driver module more strongly.

(第6実施形態)
図24は、第6実施形態に係るプロセッサ30の機能構成を、情報処理システム10のハードウェアとともに示す図である。第6実施形態に係る情報処理システム10は、通知ユニット151をさらに備える。
(Sixth embodiment)
FIG. 24 is a diagram illustrating a functional configuration of the processor 30 according to the sixth embodiment together with hardware of the information processing system 10. The information processing system 10 according to the sixth embodiment further includes a notification unit 151.

また、プロセッサ30は、モニタ56上で確認モジュールを実行することにより確認部152として動作する。確認部152は、汎用オペレーティングシステム50およびセキュアオペレーティングシステム58と並行してモニタ56上で動作する。   Further, the processor 30 operates as the confirmation unit 152 by executing the confirmation module on the monitor 56. The confirmation unit 152 operates on the monitor 56 in parallel with the general-purpose operating system 50 and the secure operating system 58.

通知ユニット151は、確認部152を呼び出す。通知ユニット151は、例えば周期タイマーであって定期的に確認部152を呼び出してもよいし、情報処理システム10が起動した後の所定のタイミングで1回だけ確認部152を呼び出してもよい。また、通知ユニット151は、時間に関するイベント以外にも、特定のイベント発生時において確認部152を呼び出してもよい。   The notification unit 151 calls the confirmation unit 152. The notification unit 151 may be a periodic timer, for example, and may call the confirmation unit 152 periodically, or may call the confirmation unit 152 only once at a predetermined timing after the information processing system 10 is activated. Further, the notification unit 151 may call the confirmation unit 152 when a specific event occurs in addition to the event related to time.

確認部152は、ロード検証部153と、対処部154とを含む。ロード検証部153は、モニタモジュールおよびセキュアOSモジュールが正常にロードされているか否かを検証する。   The confirmation unit 152 includes a load verification unit 153 and a handling unit 154. The load verification unit 153 verifies whether the monitor module and the secure OS module are normally loaded.

ロード検証部153は、メインメモリ24におけるモニタモジュールおよびセキュアOSモジュールがロードされた領域を読み出して、ハッシュ値を算出する。ロード検証部153は、算出されたハッシュ値と、予め記憶しているハッシュ値とが一致するか否かを判別して、モニタモジュールおよびセキュアOSモジュールが正常にロードされているか否かを検証する。また、ロード検証部153は、ワールド制御ユニット32、バンクレジスタ34、メモリ管理ユニット36および割込制御ユニット38に設定されている値が適切か否かを確認してもよい。ロード検証部153は、モニタモジュールおよびセキュアOSモジュールが正常にロードされていないと判断した場合、対処部154を呼び出す。   The load verification unit 153 reads an area in the main memory 24 where the monitor module and the secure OS module are loaded, and calculates a hash value. The load verification unit 153 determines whether the calculated hash value matches the hash value stored in advance, and verifies whether the monitor module and the secure OS module are normally loaded. . Further, the load verification unit 153 may confirm whether or not the values set in the world control unit 32, the bank register 34, the memory management unit 36, and the interrupt control unit 38 are appropriate. When the load verification unit 153 determines that the monitor module and the secure OS module are not loaded normally, the load verification unit 153 calls the coping unit 154.

対処部154は、モニタモジュールまたはセキュアOSモジュールが正常にロードされていないと判断された場合において、予め定められた対処処理を実行する。例えば、対処部154は、異常状態であることをサーバ等に通知する。また、対処部154は、情報処理システム10を再起動する。また、対処部154は、ファームェアアップデートプログラムが存在する場合には、強制的にファームウェアのアップデートプログラムを実行する。また、対処部154は、情報処理システム10を最低限の機能を持った縮退動作状態に移行させる。また、対処部154は、情報処理システム10を待機系の動作状態に切り替える。また、対処部154は、異常ログの記録を実行する。また、対処部154は、情報処理システム10を停止させる。   The coping unit 154 executes a predetermined coping process when it is determined that the monitor module or the secure OS module is not normally loaded. For example, the handling unit 154 notifies the server or the like that the state is abnormal. In addition, the handling unit 154 restarts the information processing system 10. The coping unit 154 forcibly executes the firmware update program when there is a firmware update program. Further, the coping unit 154 shifts the information processing system 10 to a degenerate operation state having a minimum function. In addition, the handling unit 154 switches the information processing system 10 to the standby operation state. Further, the coping unit 154 records an abnormality log. Further, the handling unit 154 stops the information processing system 10.

また、確認部152は、ロード検証部153が正常状態であると判断した場合に、正常状態である旨をサーバ等に通知する状態通知部をさらに有してもよい。また、この状態通知部は、ロード検証部153が異常状態であると判断した場合に、異常状態である旨をサーバに通知してもよい。   In addition, the confirmation unit 152 may further include a state notification unit that notifies the server or the like of the normal state when the load verification unit 153 determines that the normal state. Further, when the load verification unit 153 determines that the state is an abnormal state, the state notification unit may notify the server that the state is an abnormal state.

図25は、第6実施形態に係る情報処理システム10の状態の確認時の処理フローを示す図である。情報処理システム10は、図25に示すフローを実行する。   FIG. 25 is a diagram illustrating a processing flow when checking the state of the information processing system 10 according to the sixth embodiment. The information processing system 10 executes the flow shown in FIG.

まず、通知ユニット151は、予め定められたイベントが発生したか否かを検知する。予め定められたイベントが発生した場合、ステップS111において、通知ユニット151は、確認部152を呼び出す。   First, the notification unit 151 detects whether or not a predetermined event has occurred. When a predetermined event occurs, the notification unit 151 calls the confirmation unit 152 in step S111.

続いて、ステップS112において、確認部152のロード検証部153は、モニタモジュールおよびセキュアOSモジュールがメインメモリ24に正常にロードされているか否かを検証する。続いて、ステップS113において、ロード検証部153は、正常にロードされているか否かを判定する。ロード検証部153は、正常にロードされていると判断する場合(S113のYes)、本フローを終了する。ロード検証部153は、正常にロードされていないと判断する場合(S113のNo)、対処部154を呼び出して、処理をステップS114に進める。   Subsequently, in step S112, the load verification unit 153 of the confirmation unit 152 verifies whether the monitor module and the secure OS module are normally loaded in the main memory 24. Subsequently, in step S113, the load verification unit 153 determines whether or not the load has been normally performed. If the load verification unit 153 determines that the load has been normally performed (Yes in S113), the flow ends. When the load verification unit 153 determines that the load has not been normally performed (No in S113), the load verification unit 153 calls the coping unit 154 and advances the processing to Step S114.

ステップS114において、対処部154は、予め定められた対処処理を実行する。対処部154は、対処処理を完了すると、本フローを終了する。   In step S114, the handling unit 154 executes predetermined handling processing. When the coping unit 154 completes the coping process, the flow ends.

このような第6実施形態に係る情報処理システム10によれば、メインメモリ24にロードされたモニタモジュールおよびセキュアOSモジュールが改ざんされてしまった場合であっても、確実に対処をすることができる。   According to the information processing system 10 according to the sixth embodiment as described above, even when the monitor module and the secure OS module loaded in the main memory 24 are falsified, it is possible to reliably deal with the situation. .

(第7実施形態)
図26は、第7実施形態に係るデバイスドライバ160の機能構成を、ドライバロード部54および情報処理システム10のハードウェアとともに示す図である。第7実施形態に係るデバイスドライバ160は、図5に示した第1実施形態に係るデバイスドライバ52が有する構成要素から、割込設定部76を除き、同期部161をさらに有する構成となっている。なお、デバイスドライバ160は、割込設定部76を有してもよい。
(Seventh embodiment)
FIG. 26 is a diagram illustrating the functional configuration of the device driver 160 according to the seventh embodiment, together with the driver load unit 54 and the hardware of the information processing system 10. The device driver 160 according to the seventh embodiment is configured to further include a synchronization unit 161 except for the interrupt setting unit 76 from the components included in the device driver 52 according to the first embodiment illustrated in FIG. . The device driver 160 may include an interrupt setting unit 76.

第7実施形態に係るプロセッサ30は、複数のCPUコアを有するマルチコアプロセッサである。同期部161は、複数のCPUコアの間で処理の同期を取る。具体的には、同期部161は、指定された処理位置まで到達したCPUコアの実行を停止させる。そして、同期部161は、全てのCPUコアが指定された処理位置に到達すると、全てのCPUコアの処理を再開させる。   The processor 30 according to the seventh embodiment is a multi-core processor having a plurality of CPU cores. The synchronization unit 161 synchronizes processing among a plurality of CPU cores. Specifically, the synchronization unit 161 stops the execution of the CPU core that has reached the designated processing position. Then, when all the CPU cores have reached the designated processing position, the synchronization unit 161 resumes the processing of all the CPU cores.

また、第7実施形態に係るプロセッサ30は、例えば、VTと呼ばれる仮想化支援機構を有するプロセッサである。第7実施形態に係るプロセッサ30は、ブート後において、ノンセキュアワールドで汎用オペレーティングシステム50として動作する。   The processor 30 according to the seventh embodiment is a processor having a virtualization support mechanism called VT, for example. The processor 30 according to the seventh embodiment operates as the general-purpose operating system 50 in the non-secure world after booting.

図27は、第7実施形態に係るデバイスドライバ160の処理フローを示す図である。なお、第7実施形態に係るデバイスドライバ160は、図13に示した処理フローと略同一の処理を実行するので、図13で説明した処理と同様の処理には同一のステップ番号を付けて相違点を中心に説明する。   FIG. 27 is a diagram illustrating a processing flow of the device driver 160 according to the seventh embodiment. Note that the device driver 160 according to the seventh embodiment executes substantially the same processing as the processing flow shown in FIG. 13, and therefore the same processing as the processing described in FIG. The explanation will focus on the points.

デバイスドライバ160は、ドライバロード部54に呼び出されると、図27に示すフローに従って処理を実行する。まず、ステップS21において、何れかのCPUコアにより実行されるモジュールロード部72は、メインメモリ24にメモリ領域を確保する。続いて、ステップS22において、モジュールロード部72は、確保した領域に、モニタモジュールおよびセキュアOSモジュールをロードする。モジュールロード部72は、ロードが完了すると、移行制御部78を呼び出す。ここで、移行制御部78は、何れかのCPUコアにより実行される。   When called by the driver load unit 54, the device driver 160 executes processing according to the flow shown in FIG. First, in step S <b> 21, the module load unit 72 executed by any one of the CPU cores secures a memory area in the main memory 24. Subsequently, in step S22, the module loading unit 72 loads the monitor module and the secure OS module in the secured area. When the loading is completed, the module load unit 72 calls the transition control unit 78. Here, the transition control unit 78 is executed by any of the CPU cores.

続いて、ステップS121において、何れかのCPUコアにより実行される移行制御部78は、同期部161を呼び出してコア間を同期させる。より具体的には、同期部161は、他の全てのCPUコアに対して割り込みを発生させて、それぞれのCPUコアに移行部73を実行させる。そして、それぞれのCPUコアは、互いに独立にステップS123からS131までの処理を実行する。なお、移行部73が割込設定部76を有する構成の場合には、図13に示したステップS27〜S30の処理を実行する。   Subsequently, in step S121, the transition control unit 78 executed by any of the CPU cores calls the synchronization unit 161 to synchronize the cores. More specifically, the synchronization unit 161 generates an interrupt for all other CPU cores, and causes each CPU core to execute the transition unit 73. And each CPU core performs the process from step S123 to S131 independently of each other. In the case where the transition unit 73 has the interrupt setting unit 76, the processing of steps S27 to S30 shown in FIG. 13 is executed.

まず、ステップS123において、移行制御部78は、メモリマップ生成部74を呼び出す。メモリマップ生成部74は、プロセッサ30がモニタモジュールおよびセキュアOSモジュールを実行するためのメモリマップを生成する。   First, in step S123, the migration control unit 78 calls the memory map generation unit 74. The memory map generation unit 74 generates a memory map for the processor 30 to execute the monitor module and the secure OS module.

続いて、ステップS124において、移行制御部78は、割込制御ユニット38を呼び出す。割込制御ユニット38は、全ての割込ポートへの入力を無効化する。   Subsequently, in step S124, the transition control unit 78 calls the interrupt control unit 38. The interrupt control unit 38 invalidates the input to all interrupt ports.

続いて、ステップS125において、移行制御部78は、ワールド制御ユニット32を呼び出す。ワールド制御ユニット32は、プロセッサ30をモニタモードに変更する。   Subsequently, in step S125, the transition control unit 78 calls the world control unit 32. The world control unit 32 changes the processor 30 to the monitor mode.

続いて、ステップS126において、移行制御部78は、第1メモリマップ設定部81を呼び出す。第1メモリマップ設定部81は、メモリ管理ユニット36により管理されているノンセキュアワールドのメモリマップをコピーして、メモリ管理ユニット36における、モニタの管理の下においてオペレーティングシステムをセキュアワールドで動作させるための保存領域に設定する。   Subsequently, in step S126, the migration control unit 78 calls the first memory map setting unit 81. The first memory map setting unit 81 copies the non-secure world memory map managed by the memory management unit 36, and operates the operating system in the secure world under the management of the monitor in the memory management unit 36. Set to the storage area.

ブート後において、メモリ管理ユニット36は、プロセッサ30が汎用OSモジュールを実行するためのメモリマップを管理している。従って、第1メモリマップ設定部81は、ノンセキュアワールドのメモリマップをコピーすることにより、汎用OSモジュールを実行するためのメモリマップをコピーすることができる。そして、第1メモリマップ設定部81は、コピーしたメモリマップを、モニタの管理の下においてオペレーティングシステムをセキュアワールドで動作させるための保存領域に設定することにより、プロセッサ30をrootモードで動作させることができる。   After booting, the memory management unit 36 manages a memory map for the processor 30 to execute the general-purpose OS module. Therefore, the first memory map setting unit 81 can copy the memory map for executing the general-purpose OS module by copying the memory map of the non-secure world. Then, the first memory map setting unit 81 causes the processor 30 to operate in the root mode by setting the copied memory map as a storage area for operating the operating system in the secure world under the management of the monitor. Can do.

続いて、ステップS127において、移行制御部78は、第1レジスタ設定部91を呼び出す。第1レジスタ設定部91は、バンクレジスタ34により記憶されているノンセキュアワールドのレジスタ値をコピーして、バンクレジスタ34における、モニタの管理の下においてオペレーティングシステムをセキュアワールドで動作させるための保存領域に設定する。これにより、第1レジスタ設定部91は、プロセッサ30をrootモードで動作させることができる。   Subsequently, in step S127, the migration control unit 78 calls the first register setting unit 91. The first register setting unit 91 copies the register value of the non-secure world stored in the bank register 34, and the storage area for operating the operating system in the secure world under the management of the monitor in the bank register 34 Set to. Accordingly, the first register setting unit 91 can operate the processor 30 in the root mode.

続いて、ステップS128において、移行制御部78は、第2レジスタ設定部92を呼び出す。第2レジスタ設定部92は、モニタモジュールおよびセキュアOSモジュールを実行するためのレジスタ値を、セキュアワールドのレジスタ値としてバンクレジスタ34に設定する。   Subsequently, in step S128, the migration control unit 78 calls the second register setting unit 92. The second register setting unit 92 sets a register value for executing the monitor module and the secure OS module in the bank register 34 as a register value of the secure world.

続いて、ステップS129において、移行制御部78は、第2メモリマップ設定部82を呼び出す。第2メモリマップ設定部82は、モニタモジュールおよびセキュアOSモジュールを実行するためのメモリマップを、セキュアワールドのメモリマップとしてメモリ管理ユニット36に設定する。これにより、第2メモリマップ設定部82は、セキュアワールドにおいて、プロセッサ30をモニタおよびセキュアオペレーティングシステムとして動作させることができる。   Subsequently, in step S129, the migration control unit 78 calls the second memory map setting unit 82. The second memory map setting unit 82 sets a memory map for executing the monitor module and the secure OS module in the memory management unit 36 as a secure world memory map. Accordingly, the second memory map setting unit 82 can operate the processor 30 as a monitor and a secure operating system in the secure world.

続いて、ステップS130において、移行制御部78は、ワールド制御ユニット32を呼び出す。ワールド制御ユニット32は、プロセッサ30をOSモードに変更する。これにより、移行制御部78は、以後の処理において、rootモードのノンセキュアワールドにおいて、プロセッサ30をデバイスドライバ52として動作させることができる。   Subsequently, in step S <b> 130, the transition control unit 78 calls the world control unit 32. The world control unit 32 changes the processor 30 to the OS mode. Thereby, the migration control unit 78 can cause the processor 30 to operate as the device driver 52 in the non-secure world in the root mode in the subsequent processing.

続いて、それぞれのCPUコアは、ステップS130まで処理が達すると、ステップS131において処理を待機する。続いて、ステップS131において、同期部161は、全てのCPUコアがステップS130まで処理を完了した場合、処理を何れかのCPUコアにより実行される移行制御部78に戻し、コア間を同期させる。   Subsequently, when the processing reaches step S130, each CPU core waits for processing in step S131. Subsequently, in step S131, when all the CPU cores complete the processing up to step S130, the synchronization unit 161 returns the processing to the transition control unit 78 executed by any of the CPU cores and synchronizes the cores.

続いて、ステップS35において、移行制御部78は、割込制御ユニット38を呼び出す。割込制御ユニット38は、無効化した割込ポートへの入力を復帰させる。   Subsequently, in step S35, the transition control unit 78 calls the interrupt control unit 38. The interrupt control unit 38 restores the input to the disabled interrupt port.

そして、ステップS36において、移行制御部78は、処理をドライバロード部54に返す。これにより、移行制御部78は、処理を汎用オペレーティングシステムに戻すことができる。   In step S 36, the migration control unit 78 returns the process to the driver load unit 54. Thereby, the transfer control unit 78 can return the process to the general-purpose operating system.

このような第7実施形態に係る情報処理システム10によれば、プロセッサ30が複数のCPUコアを有する場合であっても、汎用オペレーティングシステムをプロセッサ30上で動作させた後に、プロセッサ30上でモニタを直接動作させるとともに、モニタ上においてセキュアオペレーティングシステムおよび汎用オペレーティングシステムを動作させることができる。   According to the information processing system 10 according to the seventh embodiment, even if the processor 30 has a plurality of CPU cores, after the general-purpose operating system is operated on the processor 30, the monitor is executed on the processor 30. And a secure operating system and a general-purpose operating system can be operated on the monitor.

以上のようなそれぞれの実施形態に係る情報処理システム10で実行されるプログラムは、モジュール格納モジュール、モジュールロードモジュールおよび移行モジュールを含むモジュール構成となっている。このプログラムは、プロセッサ30によりメインメモリ24上に展開して実行されることにより、情報処理システム10をモジュール格納モジュール、モジュールロードモジュールおよび移行モジュールを有するデバイスドライバ52、110、120、130、140、160として機能させる。   The program executed by the information processing system 10 according to each embodiment as described above has a module configuration including a module storage module, a module load module, and a migration module. This program is developed on the main memory 24 by the processor 30 and executed, whereby the information processing system 10 is converted into device drivers 52, 110, 120, 130, 140 having module storage modules, module load modules, and migration modules. Function as 160.

また、情報処理システム10で実行されるプログラムは、コンピュータにインストール可能な形式または実行可能な形式のファイルで、CD−ROM、フレキシブルディスク、CD−R、DVD(Digital Versatile Disk)等のコンピュータで読み取り可能な記録媒体に記録されて提供される。   The program executed in the information processing system 10 is a file that can be installed in a computer or in an executable format, and is read by a computer such as a CD-ROM, flexible disk, CD-R, DVD (Digital Versatile Disk). It is provided by being recorded on a possible recording medium.

また、情報処理システム10で実行されるプログラムを、インターネット等のネットワークに接続されたコンピュータ上に格納し、ネットワーク経由でダウンロードさせることにより提供するように構成してもよい。また、情報処理システム10で実行されるプログラムをインターネット等のネットワーク経由で提供または配布するように構成してもよい。また、情報処理システム10で実行されるプログラムを、ROM等に予め組み込んで提供するように構成してもよい。   Further, the program executed in the information processing system 10 may be provided by being stored on a computer connected to a network such as the Internet and downloaded via the network. The program executed in the information processing system 10 may be configured to be provided or distributed via a network such as the Internet. The program executed by the information processing system 10 may be provided by being incorporated in advance in a ROM or the like.

本発明のいくつかの実施形態を説明したが、これらの実施形態は、例として提示したものであり、発明の範囲を限定することは意図していない。これら新規な実施形態は、その他の様々な形態で実施されることが可能であり、発明の要旨を逸脱しない範囲で、種々の省略、置き換え、変更を行うことができる。これら実施形態やその変形は、発明の範囲や要旨に含まれるとともに、請求の範囲に記載された発明とその均等の範囲に含まれる。   Although several embodiments of the present invention have been described, these embodiments are presented by way of example and are not intended to limit the scope of the invention. These novel embodiments can be implemented in various other forms, and various omissions, replacements, and changes can be made without departing from the scope of the invention. These embodiments and modifications thereof are included in the scope and gist of the invention, and are included in the invention described in the claims and the equivalents thereof.

10 情報処理システム
20 情報処理装置
22 ストレージ
24 メインメモリ
26 ブートROM
30 プロセッサ
32 ワールド制御ユニット
34 バンクレジスタ
36 メモリ管理ユニット
38 割込制御ユニット
50 汎用オペレーティングシステム
52 デバイスドライバ
54 ドライバロード部
56 モニタ
58 セキュアオペレーティングシステム
71 モジュール格納部
72 モジュールロード部
73 移行部
74 メモリマップ生成部
75 メモリマップ設定部
76 割込設定部
77 レジスタ設定部
78 移行制御部
81 第1メモリマップ設定部
82 第2メモリマップ設定部
86 モニタ割込設定部
87 第1割込設定部
88 第2割込設定部
89 割込ポート設定部
91 第1レジスタ設定部
92 第2レジスタ設定部
110 デバイスドライバ
111 メモリ保護ユニット
112 保護設定部
120 デバイスドライバ
121 ロード判定部
130 デバイスドライバ
131 アンロード判定部
132 モジュールアンロード部
140 デバイスドライバ
141 検証部
142 復号部
151 通知ユニット
152 確認部
153 ロード検証部
154 対処部
160 デバイスドライバ
161 同期部
DESCRIPTION OF SYMBOLS 10 Information processing system 20 Information processing apparatus 22 Storage 24 Main memory 26 Boot ROM
30 processor 32 world control unit 34 bank register 36 memory management unit 38 interrupt control unit 50 general-purpose operating system 52 device driver 54 driver load unit 56 monitor 58 secure operating system 71 module storage unit 72 module load unit 73 transition unit 74 memory map generation Unit 75 memory map setting unit 76 interrupt setting unit 77 register setting unit 78 transition control unit 81 first memory map setting unit 82 second memory map setting unit 86 monitor interrupt setting unit 87 first interrupt setting unit 88 second rate Interrupt setting unit 89 Interrupt port setting unit 91 First register setting unit 92 Second register setting unit 110 Device driver 111 Memory protection unit 112 Protection setting unit 120 Device driver 121 Load determination unit 130 Device Driver 131 unload determining section 132 module unloading section 140 the device driver 141 verifying unit 142 decoding unit 151 notifies the unit 152 confirming unit 153 loads the verification unit 154 addressed 160 the device driver 161 synchronization unit

Claims (19)

第1ワールドと第2ワールドとで異なるメモリマップを用いてメインメモリにアクセスするプロセッサがドライバモジュールを実行することにより動作するドライバ装置であって、
前記プロセッサは、ブート後において、第1ワールドで、第1OSモジュールを実行することにより第1オペレーティングシステムとして動作し、
前記ドライバ装置は、前記第1オペレーティングシステムの管理の下で動作し、
前記ドライバ装置は、
前記プロセッサをバーチャルマシンであるモニタとして動作させるためのプログラムであるモニタモジュール、および、前記プロセッサを第2オペレーティングシステムとして動作させるためのプログラムである第2OSモジュールを、前記メインメモリの空領域にロードするモジュールロード部と、
メモリ管理ユニットにより管理されている第1ワールドのメモリマップをコピーして、第2ワールドのメモリマップとしてメモリ管理ユニットに設定する第1メモリマップ設定部と、
割込制御ユニットにより管理されている第1ワールドの割込先アドレスをコピーして、第2ワールドの割込先アドレスとしてメモリ管理ユニットに設定する第1割込設定部と、
前記第2オペレーティングシステムの割込ハンドラのアドレスを、第1ワールドの割込先アドレスとして前記割込制御ユニットに設定する第2割込設定部と、
前記モニタモジュールおよび前記第2OSモジュールを実行するためのメモリマップを、第1ワールドのメモリマップとして前記メモリ管理ユニットに設定する第2メモリマップ設定部と、
を備えるドライバ装置。
A driver device that operates by executing a driver module by a processor that accesses a main memory using different memory maps in the first world and the second world,
The processor operates as a first operating system by executing a first OS module in the first world after booting;
The driver device operates under the management of the first operating system;
The driver device is:
A monitor module which is a program for operating the processor as a monitor which is a virtual machine, and a second OS module which is a program for operating the processor as a second operating system are loaded into an empty area of the main memory. Module loading section;
A first memory map setting unit that copies the memory map of the first world managed by the memory management unit and sets the memory map as the second world memory map;
A first interrupt setting unit configured to copy the interrupt destination address of the first world managed by the interrupt control unit and set the interrupt destination address of the second world in the memory management unit;
A second interrupt setting unit for setting an interrupt handler address of the second operating system as an interrupt destination address of the first world in the interrupt control unit;
A second memory map setting unit for setting a memory map for executing the monitor module and the second OS module as a first world memory map in the memory management unit;
A driver device comprising:
前記モニタモジュールおよび前記第2OSモジュールを実行するためのメモリマップを生成するメモリマップ生成部と、
第1ワールドのメモリマップが前記メモリ管理ユニットに設定された後に、前記プロセッサを第1ワールドから第2ワールドに切り替え、前記プロセッサを第2ワールドで前記第1オペレーティングシステムとして動作させる移行制御部と、
をさらに備え、
前記メモリマップ生成部は、前記第1オペレーティングシステムおよび前記第2オペレーティングシステムの両者の管理の下で、前記ドライバ装置が動作可能なメモリマップを生成する
請求項1に記載のドライバ装置。
A memory map generator for generating a memory map for executing the monitor module and the second OS module;
A transition controller that switches the processor from the first world to the second world after the memory map of the first world is set in the memory management unit, and operates the processor as the first operating system in the second world;
Further comprising
The driver device according to claim 1, wherein the memory map generation unit generates a memory map in which the driver device can operate under the management of both the first operating system and the second operating system.
前記プロセッサは、前記モニタとして動作する場合、ハードウェアデバイスに対して無制限でアクセスできるモニタモードに設定され、オペレーティングシステムとして動作する場合、ハードウェアデバイスに対する一部のアクセスが制限されたOSモードに設定される
請求項2に記載のドライバ装置。
When the processor operates as the monitor, the processor is set to a monitor mode that allows unlimited access to the hardware device. When the processor operates as an operating system, the processor is set to an OS mode that restricts partial access to the hardware device. The driver device according to claim 2.
前記プロセッサは、ブート後において、第1ワールドの前記OSモードに設定され、
前記移行制御部は、前記メモリ管理ユニットに対する第2ワールドのメモリマップの設定に先だって、前記プロセッサを前記モニタモードに変更し、
前記移行制御部は、前記メモリ管理ユニットに対する第1ワールドのメモリマップの設定の後に、前記プロセッサを第2ワールドの前記OSモードに変更する
請求項3に記載のドライバ装置。
The processor is set to the OS mode of the first world after booting,
The migration control unit changes the processor to the monitor mode prior to setting the second world memory map for the memory management unit;
The driver device according to claim 3, wherein the migration control unit changes the processor to the OS mode of the second world after setting the memory map of the first world for the memory management unit.
前記移行制御部は、
前記メモリ管理ユニットに対する第2ワールドのメモリマップの設定に先だって、割込ポートへの入力を無効化し、
前記プロセッサを第2ワールドの前記OSモードに変更した後に、無効化した前記割込ポートの入力を復帰させる
請求項4に記載のドライバ装置。
The transition control unit
Prior to setting the second world memory map for the memory management unit, disable input to the interrupt port;
The driver device according to claim 4, wherein after the processor is changed to the OS mode of the second world, input of the disabled interrupt port is restored.
前記モニタの割込ハンドラのアドレスを、前記モニタの割込先アドレスとして前記割込制御ユニットに設定するモニタ割込設定部
をさらに備える請求項1から5の何れか1項に記載のドライバ装置。
6. The driver device according to claim 1, further comprising a monitor interrupt setting unit configured to set an address of the interrupt handler of the monitor in the interrupt control unit as an interrupt destination address of the monitor.
第1ワールドが割込先に設定されている割込ポートにおける割込先を第2ワールドに変更し、前記第2オペレーティングシステムへの割り込みに使用される割込ポートにおける割込先を第1ワールドに設定する割込ポート設定部
をさらに備える請求項1から6の何れか1項に記載のドライバ装置。
The interrupt destination in the interrupt port set as the interrupt destination of the first world is changed to the second world, and the interrupt destination in the interrupt port used for interrupting the second operating system is changed to the first world. The driver device according to any one of claims 1 to 6, further comprising: an interrupt port setting unit configured to set to
バンクレジスタに記憶されている第1ワールドのレジスタ値をコピーして、第2ワールドのレジスタ値として前記バンクレジスタに設定する第1レジスタ設定部と、
前記モニタモジュールおよび前記第2OSモジュールを実行するための前記バンクレジスタのレジスタ値を、第1ワールドのレジスタ値として前記バンクレジスタに設定する第2レジスタ設定部と、
をさらに備える請求項1から7の何れか1項に記載のドライバ装置。
A first register setting unit that copies the register value of the first world stored in the bank register and sets the register value of the first world as the register value of the second world;
A second register setting unit that sets a register value of the bank register for executing the monitor module and the second OS module in the bank register as a register value of a first world;
The driver device according to any one of claims 1 to 7, further comprising:
前記プロセッサが前記第2ワールドで動作している場合に前記メインメモリにおける指定された領域への書き込みを禁止するメモリ保護ユニットに対して、前記モニタモジュールおよび前記第2OSモジュールがロードされた領域を書き込み禁止領域として設定する保護設定部
をさらに備える請求項1から8の何れか1項に記載のドライバ装置。
When the processor is operating in the second world, the area loaded with the monitor module and the second OS module is written to a memory protection unit that prohibits writing to a specified area in the main memory. The driver device according to claim 1, further comprising a protection setting unit that is set as a prohibited area.
前記モニタモジュールおよび前記第2OSモジュールのロードに先だって、予め定められた基準に従って、ロードを実行するか否かを判定し、ロードを実行しないと判定した場合、前記モジュールロード部によるロードを禁止するロード判定部
をさらに備える請求項1から9の何れか1項に記載のドライバ装置。
Prior to loading the monitor module and the second OS module, it is determined whether or not to perform loading according to a predetermined criterion. When it is determined that loading is not performed, loading that prohibits loading by the module loading unit The driver device according to claim 1, further comprising a determination unit.
前記モニタモジュールおよび前記第2OSモジュールのロードの指示を受けた場合、前記モニタモジュールおよび前記第2OSモジュールが改ざんされていないかを検証する検証部をさらに備え、
前記ロード判定部は、前記検証部により改ざんされていないと検証された場合、ロードを実行すると判定する
請求項10に記載のドライバ装置。
A verification unit that verifies whether the monitor module and the second OS module have been tampered with when receiving an instruction to load the monitor module and the second OS module;
The driver device according to claim 10, wherein the load determination unit determines to perform loading when it is verified that the load is not tampered with by the verification unit.
前記プロセッサが第2ワールドに設定されている場合に、前記モニタモジュールおよび前記第2OSモジュールのアンロードの指示を受け付け、予め定められた基準に従ってアンロードを実行するか否かを判定するアンロード判定部と、
前記アンロード判定部がアンロードをすると判定した場合、前記プロセッサを第2ワールドから第1ワールドに変更する前記移行制御部と、
をさらに備え、
前記第1メモリマップ設定部は、前記メモリ管理ユニットにより管理されている第2ワールドのメモリマップをコピーして、第1ワールドのメモリマップとして前記メモリ管理ユニットに設定し、
前記第1割込設定部は、前記割込制御ユニットにより管理されている第2ワールドの割込先アドレスをコピーして、第1ワールドの割込先アドレスとして前記割込制御ユニットに設定する
請求項1に記載のドライバ装置。
When the processor is set to the second world, an unload determination for receiving an instruction to unload the monitor module and the second OS module and determining whether to execute the unload according to a predetermined criterion And
When the unload determination unit determines to unload, the transition control unit to change the processor from the second world to the first world;
Further comprising
The first memory map setting unit copies the second world memory map managed by the memory management unit and sets the first world memory map as the first world memory map in the memory management unit;
The first interrupt setting unit copies an interrupt destination address of the second world managed by the interrupt control unit, and sets it in the interrupt control unit as an interrupt destination address of the first world. Item 2. The driver device according to Item 1.
暗号化された前記モニタモジュールおよび暗号化された前記第2OSモジュールを復号する復号部をさらに備え、
前記モジュールロード部は、前記復号部により復号された前記モニタモジュールおよび前記第2OSモジュールを前記メインメモリにロードする
請求項1から12の何れか1項に記載のドライバ装置。
A decryption unit for decrypting the encrypted monitor module and the encrypted second OS module;
The driver device according to any one of claims 1 to 12, wherein the module loading unit loads the monitor module and the second OS module decoded by the decoding unit into the main memory.
前記モニタモジュールまたは前記第2OSモジュールが正常にロードされているかを検証するロード検証部と、
前記モニタモジュールまたは前記第2OSモジュールが正常にロードされていない場合に、予め定められた処理を実行する対処部と、
をさらに備える請求項1から13の何れか1項に記載のドライバ装置。
A load verification unit that verifies whether the monitor module or the second OS module is normally loaded;
A coping unit that executes a predetermined process when the monitor module or the second OS module is not normally loaded;
The driver device according to any one of claims 1 to 13, further comprising:
第1ワールドと第2ワールドとで異なるメモリマップを用いてメインメモリにアクセスするプロセッサがドライバモジュールを実行することにより動作するドライバ装置であって、
前記プロセッサは、ブート後において、第2ワールドで、第1OSモジュールを実行することにより第1オペレーティングシステムとして動作し、
前記ドライバ装置は、前記第1オペレーティングシステムの管理の下で動作し、
前記ドライバ装置は、
前記プロセッサをバーチャルマシンであるモニタとして動作させるためのプログラムであるモニタモジュール、および、前記プロセッサを第2オペレーティングシステムとして動作させるためのプログラムである第2OSモジュールを、前記メインメモリの空領域にロードするモジュールロード部と、
前記プロセッサにおける1つのコアから他のコアのそれぞれに対して割り込みを入力して、複数のコアの間で処理を一致させる同期部と、
メモリ管理ユニットにより管理されている第2ワールドのメモリマップをコピーして、メモリ管理ユニットにおける、前記モニタの管理の下においてオペレーティングシステムを第2ワールドで動作させるための保存領域に設定する第1メモリマップ設定部と、
前記モニタモジュールおよび前記第2OSモジュールを実行するためのメモリマップを、第1ワールドのメモリマップとして前記メモリ管理ユニットに設定する第2メモリマップ設定部と、
を備えるドライバ装置。
A driver device that operates by executing a driver module by a processor that accesses a main memory using different memory maps in the first world and the second world,
The processor operates as a first operating system by executing a first OS module in the second world after booting;
The driver device operates under the management of the first operating system;
The driver device is:
A monitor module which is a program for operating the processor as a monitor which is a virtual machine, and a second OS module which is a program for operating the processor as a second operating system are loaded into an empty area of the main memory. Module loading section;
A synchronization unit that inputs an interrupt from one core to each of the other cores in the processor and matches processing among a plurality of cores;
A first memory that copies a memory map of the second world managed by the memory management unit and sets it as a storage area for operating the operating system in the second world under the management of the monitor in the memory management unit A map setting section;
A second memory map setting unit for setting a memory map for executing the monitor module and the second OS module as a first world memory map in the memory management unit;
A driver device comprising:
前記プロセッサを、請求項1から15の何れか1項に記載のドライバ装置として機能させるためのプログラム。   A program for causing the processor to function as the driver device according to any one of claims 1 to 15. メインメモリと、
第1OSモジュールおよびドライバモジュールを格納するストレージと、
第1ワールドと第2ワールドとで異なるメモリマップを用いてメインメモリにアクセスするプロセッサと、
前記メインメモリへのアクセスを管理するメモリ管理ユニットと、
割込入力を制御する割り込み制御ユニットと、
前記プロセッサが前記ドライバモジュールを実行することにより動作する、請求項1〜15の何れか1項に記載のドライバ装置と、
を備える情報処理システム。
Main memory,
A storage for storing the first OS module and the driver module;
A processor for accessing main memory using different memory maps in the first world and the second world;
A memory management unit for managing access to the main memory;
An interrupt control unit that controls the interrupt input;
The driver device according to any one of claims 1 to 15, wherein the processor operates by executing the driver module;
An information processing system comprising:
第1ワールドと第2ワールドとで異なるメモリマップを用いてメインメモリにアクセスするプロセッサがドライバモジュールを実行することにより動作するドライバ装置で実行される方法であって、
前記プロセッサは、ブート後において、第1ワールドで、第1OSモジュールを実行することにより第1オペレーティングシステムとして動作し、
前記ドライバ装置は、前記第1オペレーティングシステムの管理の下で動作し、
モジュールロード部が、前記プロセッサをバーチャルマシンであるモニタとして動作させるためのプログラムであるモニタモジュール、および、前記プロセッサを第2オペレーティングシステムとして動作させるためのプログラムである第2OSモジュールを、前記メインメモリの空領域にロードし、
第1メモリマップ設定部が、メモリ管理ユニットにより管理されている第1ワールドのメモリマップをコピーして、第2ワールドのメモリマップとしてメモリ管理ユニットに設定し、
第1割込設定部が、割込制御ユニットにより管理されている第1ワールドの割込先アドレスをコピーして、第2ワールドの割込先アドレスとしてメモリ管理ユニットに設定し、
第2割込設定部が、前記第2オペレーティングシステムの割込ハンドラのアドレスを、第1ワールドの割込先アドレスとして前記割込制御ユニットに設定し、
第2メモリマップ設定部が、前記モニタモジュールおよび前記第2OSモジュールを実行するためのメモリマップを、第1ワールドのメモリマップとして前記メモリ管理ユニットに設定する
方法。
A method that is executed by a driver device that operates by executing a driver module by a processor that accesses a main memory using different memory maps in a first world and a second world,
The processor operates as a first operating system by executing a first OS module in the first world after booting;
The driver device operates under the management of the first operating system;
The module load unit includes a monitor module that is a program for operating the processor as a monitor that is a virtual machine, and a second OS module that is a program for operating the processor as a second operating system. Load into empty space,
The first memory map setting unit copies the memory map of the first world managed by the memory management unit and sets it in the memory management unit as the memory map of the second world;
The first interrupt setting unit copies the interrupt destination address of the first world managed by the interrupt control unit and sets it in the memory management unit as the interrupt destination address of the second world.
A second interrupt setting unit sets an interrupt handler address of the second operating system in the interrupt control unit as an interrupt destination address of the first world;
A method in which a second memory map setting unit sets a memory map for executing the monitor module and the second OS module in the memory management unit as a first world memory map.
第1ワールドと第2ワールドとで異なるメモリマップを用いてメインメモリにアクセスするプロセッサがドライバモジュールを実行することにより動作するドライバ装置で実行される方法であって、
前記プロセッサは、ブート後において、第1ワールドで、第1OSモジュールを実行することにより第1オペレーティングシステムとして動作し、
前記ドライバ装置は、前記第1オペレーティングシステムの管理の下で動作し、
モジュールロード部が、前記プロセッサをバーチャルマシンであるモニタとして動作させるためのプログラムであるモニタモジュール、および、前記プロセッサを第2オペレーティングシステムとして動作させるためのプログラムである第2OSモジュールを、前記メインメモリの空領域にロードし、
同期部が、前記プロセッサにおける1つのコアから他のコアのそれぞれに対して割り込みを入力して、複数のコアの間で処理を一致させ、
第1メモリマップ設定部が、メモリ管理ユニットにより管理されている第1ワールドのメモリマップをコピーして、第2ワールドのメモリマップとしてメモリ管理ユニットに設定し、
第2メモリマップ設定部が、前記モニタモジュールおよび前記第2OSモジュールを実行するためのメモリマップを、第1ワールドのメモリマップとして前記メモリ管理ユニットに設定する
方法。
A method that is executed by a driver device that operates by executing a driver module by a processor that accesses a main memory using different memory maps in a first world and a second world,
The processor operates as a first operating system by executing a first OS module in the first world after booting;
The driver device operates under the management of the first operating system;
The module load unit includes a monitor module that is a program for operating the processor as a monitor that is a virtual machine, and a second OS module that is a program for operating the processor as a second operating system. Load into empty space,
The synchronization unit inputs an interrupt from one core in the processor to each of the other cores to match the processing among the plurality of cores,
The first memory map setting unit copies the memory map of the first world managed by the memory management unit and sets it in the memory management unit as the memory map of the second world;
A method in which a second memory map setting unit sets a memory map for executing the monitor module and the second OS module in the memory management unit as a first world memory map.
JP2015176678A 2015-09-08 2015-09-08 Driver device, information processing system, program, and method Active JP6462540B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015176678A JP6462540B2 (en) 2015-09-08 2015-09-08 Driver device, information processing system, program, and method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015176678A JP6462540B2 (en) 2015-09-08 2015-09-08 Driver device, information processing system, program, and method

Publications (2)

Publication Number Publication Date
JP2017054243A true JP2017054243A (en) 2017-03-16
JP6462540B2 JP6462540B2 (en) 2019-01-30

Family

ID=58316732

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015176678A Active JP6462540B2 (en) 2015-09-08 2015-09-08 Driver device, information processing system, program, and method

Country Status (1)

Country Link
JP (1) JP6462540B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10474494B2 (en) 2016-09-16 2019-11-12 Kabushiki Kaisha Toshiba Information processing apparatus, information processing method, and computer program product
JP2020067802A (en) * 2018-10-24 2020-04-30 トヨタ自動車株式会社 Control device

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011008646A (en) * 2009-06-27 2011-01-13 Lenovo Singapore Pte Ltd Computer program for transferring between actual environment and virtual environment
WO2011114655A1 (en) * 2010-03-16 2011-09-22 パナソニック株式会社 Information processing device, virtual machine generation method, and application software distribution system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2011008646A (en) * 2009-06-27 2011-01-13 Lenovo Singapore Pte Ltd Computer program for transferring between actual environment and virtual environment
WO2011114655A1 (en) * 2010-03-16 2011-09-22 パナソニック株式会社 Information processing device, virtual machine generation method, and application software distribution system
US20120260250A1 (en) * 2010-03-16 2012-10-11 Manabu Maeda Information processing device, virtual machine creation method, and application distribution system

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ROBERT C. FANNON, AN ANALYSIS OF HARDWARE-ASSISTED VIRTUAL MACHINE BASED ROOTKITS, JPN6018034352, June 2014 (2014-06-01), pages 36 - 69 *

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10474494B2 (en) 2016-09-16 2019-11-12 Kabushiki Kaisha Toshiba Information processing apparatus, information processing method, and computer program product
JP2020067802A (en) * 2018-10-24 2020-04-30 トヨタ自動車株式会社 Control device
JP7196532B2 (en) 2018-10-24 2022-12-27 株式会社デンソー Control device

Also Published As

Publication number Publication date
JP6462540B2 (en) 2019-01-30

Similar Documents

Publication Publication Date Title
CN108509250B (en) Secure public cloud with protected guest authentication host control
KR101288700B1 (en) Multi-operating system(os) start device, computer-readable recording medium, and multi-os start method
US10032029B2 (en) Verifying integrity of backup file in a multiple operating system environment
JP5390703B2 (en) Providing integrity verification and proof in a hidden execution environment
US10796003B2 (en) Divided integrity verification using memory segment protection
JP5260081B2 (en) Information processing apparatus and control method thereof
US9104602B2 (en) Method and apparatus for performing mapping within a data processing system having virtual machines
JP5307196B2 (en) Providing a system integrated with silicon code
KR20060130200A (en) Autonomous memory checkers and their methods for ensuring runtime safety
JP5740573B2 (en) Information processing apparatus and information processing method
JP5346608B2 (en) Information processing apparatus and file verification system
CN111353162B (en) TrustZone kernel-based asynchronous execution active trusted computing method and system
JP2015537274A (en) Method and apparatus for protecting a memory area during a low power state
US11461474B2 (en) Process-based virtualization system for executing a secure application process
US11641272B2 (en) Seamless one-way access to protected memory using accessor key identifier
EP4156008A1 (en) Seamless access to trusted domain protected memory by virtual machine manager using transformer key identifier
KR102579861B1 (en) In-vehicle software update system and method for controlling the same
JP6462540B2 (en) Driver device, information processing system, program, and method
CN112219202A (en) Memory allocation for guest operating systems
JP2018526720A (en) Protecting virtual machine state information
EP3440586A1 (en) Method for write-protecting boot code if boot sequence integrity check fails
JP6494143B2 (en) Apparatus, method, integrated circuit, program, and tangible computer-readable storage medium
JP6316370B2 (en) Apparatus, method, integrated circuit, program, and tangible computer-readable storage medium
RU2609761C1 (en) Method for code performance in hypervisor mode

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180201

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20180823

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20180904

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20181016

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20181204

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20181227

R151 Written notification of patent or utility model registration

Ref document number: 6462540

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151