JP2009251967A - Multicore system - Google Patents
Multicore system Download PDFInfo
- Publication number
- JP2009251967A JP2009251967A JP2008099788A JP2008099788A JP2009251967A JP 2009251967 A JP2009251967 A JP 2009251967A JP 2008099788 A JP2008099788 A JP 2008099788A JP 2008099788 A JP2008099788 A JP 2008099788A JP 2009251967 A JP2009251967 A JP 2009251967A
- Authority
- JP
- Japan
- Prior art keywords
- core
- access
- unit
- information
- setting information
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Images
Landscapes
- Storage Device Security (AREA)
Abstract
Description
本発明は、種類の異なる2つ以上のソフトウェアを実行する複数のコアと、前記複数のコアにより共有されるメモリとを備えるマルチコアシステムに関する。 The present invention relates to a multi-core system including a plurality of cores that execute two or more types of software and a memory shared by the plurality of cores.
従来から、プロセッサと、書込み読出し可能メモリ間に、書込み禁止領域のアドレス設定及び書込み禁止を設定すると、アドレスバスにて該プロセッサよりのメモリアドレスを監視し、書込み禁止のアドレスになったら、該プロセッサよりの書込み信号を書込み禁止信号とし、書込み禁止解除を設定すると、書込み禁止を解除するメモリ保護回路を設け、該メモリ保護回路に書込み禁止領域のアドレス設定及び書込み禁止,解除の設定を行うことにより、書込み読出し可能メモリに書込み禁止領域を設定し、設定された領域を禁止設定から解除設定迄の期間書込み禁止領域とすることを特徴とするメモリ保護方法が知られている(例えば、特許文献1参照)。
しかしながら、上述の特許文献1に記載されるメモリ保護方法は、単一のプロセッサコアを用いるシステムに係る方法であり、また、メモリ保護領域を変更する際のセキュリティが考慮されていない。マルチコアシステムは、複数のコアにより複数の性質の異なるソフトウェアを実行する関係上、各コアに割り当てられるソフトウェアの性質が異なり、それに伴い各コアに対して、それぞれが実行するソフトウェアの性質に応じたメモリ領域を割り当てなければならず、単一のプロセッサコアを用いるシステムとは大きく異なる事情がある。また、セキュリティが考慮されない場合には、悪意のあるプログラム等によりメモリ保護領域が自由に変更されうるという問題がある。
However, the memory protection method described in
そこで、本発明は、マルチコアシステムにおいて、高いセキュリティ性を維持しつつメモリ保護領域への各コアのアクセス権限を動的に変化させることを可能とすることを目的とする。 Therefore, an object of the present invention is to make it possible to dynamically change the access authority of each core to a memory protection area while maintaining high security in a multi-core system.
上記目的を達成するため、第1の発明は、種類の異なる2つ以上のソフトウェアを実行する複数のコアと、前記複数のコアにより共有されるメモリとを備えるマルチコアシステムであって、
前記メモリの保護領域に対する各コアのアクセス権限に関する情報を保持するアクセス設定情報部と、
前記アクセス設定情報部で保持されるアクセス設定情報に応じて各コアによる前記メモリの保護領域へのアクセスを制限又は許可するメモリ保護部と、
前記アクセス設定情報部にて保持される前記アクセス設定情報を変更する保護管理部と、
所与の識別情報を保持する不変情報保持部とを備え、
前記アクセス設定情報部は、前記保護管理部からの識別情報が前記不変情報保持部内の所与の識別情報と対応した場合に、前記アクセス設定情報への前記保護管理部のアクセスを許可し、前記保護管理部からの識別情報が前記不変情報保持部内の所与の識別情報と対応しなかった場合に、前記アクセス設定情報への前記保護管理部のアクセスを制限することを特徴とする。
In order to achieve the above object, a first invention is a multi-core system comprising a plurality of cores that execute two or more types of software and a memory shared by the plurality of cores,
An access setting information section for holding information on access authority of each core to the protected area of the memory;
A memory protection unit that restricts or permits access to the protection area of the memory by each core according to the access setting information held in the access setting information unit;
A protection management unit for changing the access setting information held in the access setting information unit;
An invariant information holding unit for holding given identification information;
The access setting information unit permits the protection management unit access to the access setting information when the identification information from the protection management unit corresponds to given identification information in the invariant information holding unit, When the identification information from the protection management unit does not correspond to the given identification information in the invariant information holding unit, the access of the protection management unit to the access setting information is restricted.
第2の発明は、第1の発明に係るマルチコアシステムにおいて、
前記2つ以上のソフトウェアは、第1のソフトウェアと、前記第1のソフトウェアよりも重要性の高い(要求される信頼性が高い)第2のソフトウェアとを含み、
前記保護管理部は、前記複数のコアのうちの特定のコアにより実行されるソフトウェアの種類が前記第1のソフトウェアから前記第2のソフトウェアに変更される際に、該特定のコアによる前記メモリの保護領域へのアクセスが許可されるように、前記アクセス設定情報を変更することを特徴とする。
A second invention is the multi-core system according to the first invention, wherein
The two or more software includes first software and second software having higher importance (required reliability is higher) than the first software,
When the type of software executed by a specific core among the plurality of cores is changed from the first software to the second software, the protection management unit The access setting information is changed so that access to the protected area is permitted.
第3の発明は、第1の発明に係るマルチコアシステムにおいて、
前記所与の識別情報は、ハードウェア回路上に実装されたID情報であって前記保護管理部に固有のID情報であることを特徴とする。
A third invention is the multi-core system according to the first invention, wherein
The given identification information is ID information mounted on a hardware circuit and unique to the protection management unit.
第4の発明は、第1の発明に係るマルチコアシステムにおいて、
前記不変情報保持部は、複数のコアのうち前記保護管理部を動作させるコアの優先順位を定める情報を更に保持することを特徴とする。
A fourth invention is the multi-core system according to the first invention, wherein
The invariant information holding unit further holds information for determining a priority order of cores that operate the protection management unit among a plurality of cores.
第5の発明は、第1の発明に係るマルチコアシステムにおいて、
前記2つ以上のソフトウェアは、車両制御に関する車両制御系ソフトウェアと、車両制御以外のマルチメディア系ソフトウェアとを含み、
前記複数のコアは、前記車両制御系ソフトウェアを常時実行する第1のコアと、前記マルチメディア系ソフトウェアを実行する第2のコアとを含み、
前記アクセス設定情報は、前記第1のコアによる前記メモリの保護領域へのアクセスを許可する情報を含む一方、前記第2のコアによる前記メモリの保護領域へのアクセスを制限する情報を含み、
前記保護管理部は、前記第2のコアによる前記メモリの保護領域へのアクセスが許可されるように、前記アクセス設定情報を変更することを特徴とする。
A fifth invention is the multi-core system according to the first invention, wherein
The two or more software includes vehicle control system software related to vehicle control and multimedia software other than vehicle control,
The plurality of cores include a first core that always executes the vehicle control system software, and a second core that executes the multimedia software,
The access setting information includes information that permits access to the protection area of the memory by the first core, while including information that restricts access to the protection area of the memory by the second core,
The protection management unit may change the access setting information so that access to the protection area of the memory by the second core is permitted.
第6の発明は、第5の発明に係るマルチコアシステムにおいて、
前記第1のコアの状態を監視する状態監視部と、
前記状態監視部により前記第1のコアの高負荷状態若しくは不具合状態が検出された場合に、前記保護管理部に対して前記アクセス設定情報の変更を要求する負荷調整部とを更に備えることを特徴とする。
A sixth invention is a multi-core system according to the fifth invention, wherein
A state monitoring unit for monitoring the state of the first core;
A load adjustment unit that requests the protection management unit to change the access setting information when the state monitoring unit detects a high load state or a failure state of the first core; And
第7の発明は、第6の発明に係るマルチコアシステムにおいて、
前記負荷調整部は、前記保護管理部が、前記第2のコアによる前記メモリの保護領域へのアクセスが許可されるように、前記アクセス設定情報を変更するのに応じて、前記車両制御系ソフトウェアの少なくとも一部のタスクの担当を、前記第1のコアから前記第2のコアに変更することを特徴とする。
A seventh invention is the multi-core system according to the sixth invention, wherein
The load adjustment unit is configured to change the access control information so that the protection management unit is permitted to access the protection area of the memory by the second core. The responsibilities of at least some of the tasks are changed from the first core to the second core.
第8の発明は、第1の発明に係るマルチコアシステムにおいて、
前記保護管理部により前記アクセス設定情報が変更された際の状況を記憶する状況保存部を更に備えることを特徴とする。
An eighth invention is the multi-core system according to the first invention, wherein
The information processing apparatus may further include a status storage unit that stores a status when the access setting information is changed by the protection management unit.
第9の発明は、第6の発明に係るマルチコアシステムにおいて、
前記状態監視部は、前記状況保存部に記憶された状況が検出された場合に、前記保護管理部に対して前記アクセス設定情報の変更を要求することを特徴とする。
A ninth invention is the multi-core system according to the sixth invention, wherein
The state monitoring unit requests the protection management unit to change the access setting information when a state stored in the state storage unit is detected.
第10の発明は、車載システムを構築するために用いられるマルチコアシステムを特徴とする。 The tenth invention is characterized by a multi-core system used for constructing an in-vehicle system.
本発明によれば、マルチコアシステムにおいて、高いセキュリティ性を維持しつつメモリ保護領域への各コアのアクセス権限を動的に変化させることが可能となる。 According to the present invention, in a multi-core system, it is possible to dynamically change the access authority of each core to the memory protection area while maintaining high security.
以下、図面を参照して、本発明を実施するための最良の形態の説明を行う。 The best mode for carrying out the present invention will be described below with reference to the drawings.
図1は、本発明の実施例1によるマルチコアシステム100の主要構成を示す図である。図1において、セクション102は、ソフトウェアにより実現される機能部を示し、セクション104は、ハードウェア構成を示す。
FIG. 1 is a diagram showing a main configuration of a
本実施例のマルチコアシステム100は、ハードウェア構成として、複数のプロセッサコア(CPU)と、動的メモリ保護制御部10と、メモリ保護機構30と、メインメモリ32とを備える。図示のマルチコアシステム100は、N個のプロセッサコア(コア1、コア2、コア3、・・・、コアN)を備える。コアの個数Nは、2以上の整数であれば任意である。複数のプロセッサコアは、後述の高信頼OSのみを実行するコアと、原則として後述の通常OSのみを実行するコアとに分類される。但し、原則として通常OSのみを実行するコアは、後述の如く所定の場合に限り例外的に高信頼OSを実行するようなコアを含む。
The
動的メモリ保護制御部10は、アクセス設定情報部11と、不変情報保持部12とを備える。アクセス設定情報部11は、メモリ保護範囲の情報を格納するアクセス設定情報領域であり、内部構成としては、図2に示すような設定レジスタと、図3に示すような設定テーブルからなる。設定レジスタは、マジックナンバーが書き込まれる特殊キーレジスタと、領域設定レジスタとを備える。領域設定レジスタに書き込まれた内容は、後述のマジックナンバーの照合が取れることを条件として、設定テーブルに反映される。設定テーブルには、例えば、図3に示すように、CPU(コア)のID毎に、メインメモリ32におけるアクセス可能領域が設定される。この設定テーブルのアクセス設定情報は、後述のメモリ保護範囲の動的な切替のためにメモリ保護機構30により参照される。尚、セキュリティ担保の観点から、後述の保護管理部23のみが設定レジスタのアドレス情報を保持し、後述の保護管理部23しか設定レジスタにアクセスできないようにされる。
The dynamic memory
各コアのアクセス可能領域は、コア毎に異なってもよいし、一部若しくは全部が重複してもよい。但し、後述の高信頼OSのみを実行するコアに係るアクセス可能領域は、原則として後述の通常OSのみを実行するコアに係るアクセス可能領域に対して、少なくとも部分的に異なるように設定される。これは、高信頼OSの実行が通常OSの実行により阻害されないようにするためである。以下では、高信頼OSのみを実行するコアのみがアクセス可能なメモリ領域を、「メモリ保護領域」ともいう。 The accessible area of each core may be different for each core, or a part or all of them may overlap. However, an accessible area related to a core that executes only a high-reliability OS described later is set to be at least partially different from an accessible area related to a core that executes only a normal OS described later. This is to prevent the execution of the highly reliable OS from being hindered by the execution of the normal OS. Hereinafter, a memory area that can be accessed only by a core that executes only a highly reliable OS is also referred to as a “memory protection area”.
図4は、アクセス設定情報部11におけるアクセス設定情報(メモリ保護領域)を変更する際の処理フローの一例を示す。
FIG. 4 shows an example of a processing flow when changing the access setting information (memory protection area) in the access
ステップ001では、保護管理部23は、アクセス設定情報を変更しようとする際、アクセス設定情報部11の特殊キーレジスタへ所与のマジックナンバーを書き込む。
In step 001, the
ステップ002では、アクセス設定情報部11のハードウェア回路は、書き込まれたマジックナンバーが、ハードウェア回路上に実装されたキーと一致するか否かを判定する。また、即ち、保護管理部23は、自身のID(マジックナンバー)をレジスタに書き込み、アクセス設定情報部11のハードウェア回路は、保護管理部23により書き込まれたIDが、不変情報保持部12の不変情報(保護管理部23を一意に識別するID情報)と一致するか否かを判定する。
In step 002, the hardware circuit of the access
ステップ003では、書き込まれたマジックナンバーが、ハードウェア回路上に実装されたキーと一致する場合のみ、設定テーブルのロックを解除する。マジックナンバーがハードウェア回路上に実装されたキーと一致しない場合には、設定テーブルのロックを解除せず、アクセス設定情報変更処理はエラーとなる。
In
ステップ004では、保護管理部23は、領域設定レジスタに、どのCPUが、どのメモリ領域へアクセス出来るかを表す設定値を書き込む。この書き込み内容は、ロックが解除されている設定テーブルのデータに反映される。即ち、設定テーブルのデータ(アクセス設定情報)は、保護管理部23により書き込まれた内容に従って変更される。
In step 004, the
ステップ005では、アクセス設定情報の変更処理の完了後、設定テーブルをロックする。尚、再びアクセス設定情報の変更を行う場合には、ステップ001からステップ005の手順を繰り返す。 In step 005, after the access setting information changing process is completed, the setting table is locked. If the access setting information is changed again, the procedure from step 001 to step 005 is repeated.
図1に戻る。不変情報保持部12は、ソフトウェアによって変更が不可能な情報を保持する。即ち、不変情報保持部12は、所定の情報(不変情報)が埋め込まれたハードウェア回路上の改変不能な領域である。不変情報保持部12は、上述の如くアクセス設定情報の変更処理を可能としたことにより副次的に生じうるセキュリティホールの発生を防止すべく、設定される。具体的には、不変情報保持部12に保持される不変情報は、保護管理部23を一意に識別するID情報(上述のマジックナンバー)や、保護管理部23を動作させるコア番号の優先順位等を含んでよい。これらの不変情報は、いずれも悪意あるプログラムやソフトウェア・バグによるアクセス設定情報部11へのアクセスを防止するための情報である。保護管理部23を動作させるコア番号の優先順位を含む理由としては、ハードウェア不具合等により、保護管理部23の動作するコア自体が動作しなくなった場合にも、規定された優先順位に従って、次に優先順位の高いコア上で、保護管理部23を新たに起動可能にするためである。
Returning to FIG. The immutable
メモリ保護機構30は、複数のコア1、コア2、コア3、・・・、コアNのうちの任意のコアからのメインメモリ32へのアクセス要求を受けると、アクセス設定情報部11の設定テーブルのデータに従って、当該コアによるメインメモリ32へのアクセス要求を制限/許可する。例えば、図3に示す設定テーブルのデータの場合に、コア2がメインメモリ32のアドレス番号0x4000_0000に書き込み要求を発したとき、アドレス番号0x4000_0000はコア2にとってアクセス可能領域でないため、当該書き込み要求は制限される(却下される)。
When the
メインメモリ32は、複数のコア1、コア2、コア3、・・・、コアNによって共有される主記憶装置であり、例えば、半導体素子を利用して電気的にデータを記憶する揮発性記憶装置である。メインメモリ32は、複数のメモリから構成されてもよい。
The
本実施例のマルチコアシステム100では、大きく分けて高信頼OSと通常OSの2種類のソフトウェアプログラムが複数のコア1、コア2、コア3、・・・、コアNによって実行される。高信頼OSは、要求される信頼性が高いソフトウェアであり、車両システムにおいては、車両制御に関連するソフトウェア(例えばABSや、追従走行制御システムや制動力制御システム等の車両制御系ソフトウェア)であってよい。他方、通常OSは、要求される信頼性が高信頼OSほど高くないソフトウェアであり、車両制御に直接的に関係しないソフトウェア、例えば利便性に関連するソフトウェア(例えば、ナビゲーションシステムや情報検索システム等のマルチメディア系ソフトウェア)であってよい。
In the
高信頼OS及び通常OSを実行するコアは、原則としてそれぞれ所定されているが、後述の如く、高信頼OS側で高負荷状態が検出された場合等の所定の場合には、アクセス設定情報が変更されることと協調して、通常OSを実行するコアのうちの少なくとも1つのコアが、高信頼OSを実行するように高信頼OS側に移譲されることになる。 In principle, the cores that execute the high-reliability OS and the normal OS are predetermined. However, as described later, in a predetermined case such as when a high-load state is detected on the high-reliability OS side, the access setting information is stored. In cooperation with the change, at least one of the cores that normally execute the OS is transferred to the highly reliable OS so as to execute the highly reliable OS.
マルチコアシステム100は、その主要なソフトウェア機能部として、OS内処理管理部20を備える。また、マルチコアシステム100は、その他、複数OS制御やOS間通信機能を備える。OS内処理管理部20は、高信頼エリアで機能する負荷調整部21及び状態モニタ部22、並びに保護管理部23を備えると共に、通常エリアで機能する負荷調整部24及び状態モニタ部25を備える。
The
負荷調整部21は、上述のアクセス設定情報の変更に伴う各コア間の負荷を調整する部分である。負荷調整部21は、状態モニタ部22による負荷状態の監視結果の通知を受けて、負荷の調整が必要であるか否かの判断を行う。判断内容としては、例えば以下のようなロジックが考えられる。先ず、高信頼OS内で、タスク処理が可能か否かを判定する。これは、現在の負荷状態や、負荷状態の想定持続時間等に基づいて判断されてもよい。高信頼OS内で、タスク処理が可能であると判断した場合には、負荷の調整は不要と判断する。他方、高信頼OS内で、タスク処理が不能であると判断した場合には、高信頼OS側タスクのうち、タスクの優先度情報(既知の設定値)からサスペンド若しくは停止してもよいタスクを抽出し、当該抽出したタスクをサスペンド若しくは停止することで、高信頼OS内でタスク処理が可能となるか否かを判定する。抽出したタスクをサスペンド若しくは停止することで、高信頼OS内でタスク処理が可能と判断した場合には、負荷の調整は不要と判断する。他方、抽出したタスクをサスペンド若しくは停止しても、高信頼OS内でタスク処理が不能な高負荷状態であると判断した場合には、アクセス設定情報を変更して高信頼OSの使用コアを増やす手順へと移行する。即ち、負荷調整部21は、保護管理部23に対してアクセス設定情報の変更の要求(高信頼OSの使用コアの増加の要求)を行う。負荷調整部21は、保護管理部23から使用コアの増加を行った旨の通知を受けると、状態モニタ部22による負荷状態の監視結果に基づいて、増加通知に係る新たなコアを含めて負荷調整を行い、上述の高信頼OS内でタスク処理が不能な状態を解消する。例えば、増加通知に係る新たなコアに対して、高信頼OS内の処理不能であったタスク処理を割り当てることで、上述の高信頼OS内でタスク処理が不能な状態を解消する。尚、この際、サスペンド若しくは停止するために抽出したタスクについても、増加した高信頼OS側のコアを用いて実行するようにしてもよい。
The
状態モニタ部22は、高信頼OS内における各コアの負荷や不具合をモニタリングする部分である。状態モニタ部22は、OSの管理情報であるCPU負荷率や、メモリ使用率等の統計データを監視し、高負荷やハードウェア不具合状態が検出された場合に、その旨を負荷調整部21に通知する。状態モニタ部22は、例えば高信頼OSを実行するコアのCPU使用率が70%を超えた場合に、高負荷状態を検出することとしてもよい。また、状態モニタ部22は、例えば高信頼OSを実行するコアの不具合を表すアラームが発生した場合に、ハードウェア不具合状態を検出することとしてもよい。
The
保護管理部23は、上述の如くアクセス設定情報の変更を行う主体となる部分であり、負荷調整部21からの要求を受けて、アクセス情報設定部11へアクセスを行う。また、通常OS側の負荷調整部24との連携機能として、コア使用要求機能やコア移譲完了通知の受け取り機能を有する。これについては図5に示すシーケンスを参照されたい。
The
負荷調整部24は、状態モニタ部25による負荷状態の監視結果に基づいて、通常OS内で各コア間の負荷を調整する部分である。また、負荷調整部24は、高信頼OS側へのコアの移譲を行うための調整が完了した際に、保護管理部23にコア移譲完了通知を行う。
The
状態モニタ部25は、通常OS側において各コアの負荷や不具合をモニタリングする部分である。
The
図5は、実施例1によるマルチコアシステム100における高負荷状態発生時の処理シーケンスを示す図である。ここでは、一例として、マルチコアシステム100は、4つのコア1、コア2、コア3及びコア4を含み、デフォルト設定として、コア1及びコア2が、通常時(即ち後述の高負荷状態発生等に伴うコアの移譲が行われない時)の高信頼OSの使用コアとして設定されており、コア3及びコア4が、通常時の通常OSの使用コアとして設定されているものとする。また、これに伴い、アクセス設定情報部11の設定テーブルには、デフォルト設定として、コア1及びコア2のみがアクセス可能な領域(即ち、コア3及びコア4がアクセス不能なメモリ保護領域)が設定されているものとする。
FIG. 5 is a diagram illustrating a processing sequence when a high load state occurs in the
図5を時系列で参照するに、先ず、高信頼OS側で高負荷状態が発生すると、状態モニタ部22において、当該高負荷状態が検知される。例えば、図5のC部に示すように、コア1及び2により実行されるべきタスクがタスクU,V,W,X,Y及びZであり、タスクU及びXが所定時間内に処理不能である場合に、高負荷状態が検知される。高負荷状態が検知されると、高信頼OS側の負荷調整部21に通知され、負荷調整部21において、上述の如く、高信頼OSの使用コアを増やすべきか否かが判断される。高信頼OSの使用コアを増やすべきと判断した場合には、その旨の要求(使用コア数変更依頼)が保護管理部23に対して行われる。保護管理部23は、この要求を受け付けて、通常OS側の負荷調整部24に対して、通常OSの使用コア(例えばコア3)の高信頼OSでの使用要求を行う。通常OS側の負荷調整部24は、この要求を受け付けて、通常OS側の状態モニタ部25に対して、通常OS上の各タスクの動作情報を取得するように要求する。通常OS側の状態モニタ部25は、この要求を受け付けて、通常OS上の各タスクの動作情報を取得し、負荷調整部24に供給する。負荷調整部24は、状態モニタ部25から通常OS上の各タスクの動作情報を取得し、当該取得した情報を考慮して、タスク移動を実施する。例えば、通常OS側の負荷調整部24は、図5のA部に示すように、コア3のタスクa及びbを、コア4に移動する。これにより、コア3が、高信頼OSで使用可能な状態となる。ここで、通常OS側の使用コア数の削減に伴い、通常OS側の負荷状態によっては全てのタスクを移動できない可能性が考えられる。その場合には、タスクの優先度に従って移動させるタスク及び終了させるタスクを判断してもよい。タスク移動が完了すると、その旨の通知が(移動完了通知)が保護管理部23に対してなされ、保護管理部23は、この通知を受けて、アクセス設定情報を変更する。例えば、図5のB部に示すように、コア3のタスクの移動完了通知を受けた場合には、コア3がメモリ保護領域にアクセスできるように、アクセス設定情報部11にアクセスして、メモリ保護領域に対するアクセス権限を、コア1〜2から、コア1〜3に変更する。このようにしてアクセス設定情報の変更を実施すると、保護管理部23は、高信頼OS側の負荷調整部21に、コア移譲完了通知として、使用可能なコアの増加を通知する。高信頼OS側の負荷調整部21は、この通知を受けて、高信頼OS側の状態モニタ部22に対して、高信頼OS上の各タスクの動作情報を取得するように要求する。高信頼OS側の状態モニタ部22は、この要求を受け付けて、高信頼OS上の各タスクの動作情報を取得し、高信頼OS側の負荷調整部21に供給する。高信頼OS側の負荷調整部21は、状態モニタ部22から高信頼OS上の各タスクの動作情報を取得し、当該取得した情報を考慮して、タスク移動を実施する。例えば、高信頼OS側の負荷調整部21は、図5のC部に示すように、コア1及びコア2のタスクU及びXを、新たなコア3に移動する。この場合、コア3は、メインメモリ32のメモリ保護領域を用いて、高信頼OS側のタスクU及びXを実行する。このようにして、高信頼OS側のコア1及び2が高負荷状態に陥って高信頼OSのタスクU及びXが処理不能となった場合にも、通常OS側のコア3を利用して、メインメモリ32のメモリ保護領域で高信頼OSのタスクU及びXを実行することができる。
Referring to FIG. 5 in time series, first, when a high load state occurs on the highly reliable OS side, the
尚、図5に示した処理シーケンスにおいて、検知された高負荷状態が解消され、状態モニタ部22の監視結果に基づいて、高信頼OS側のコア1及びコア2の負荷が所定レベル以下に低減した場合(通常負荷状態又は低負荷状態に戻った場合)、保護管理部23は、アクセス設定情報部11にアクセスして、メモリ保護領域に対するコアのアクセス権限を、コア1〜3から、コア1〜2に変更する(元に戻す)。或いは、図5に示した処理シーケンスにおいて、コア3がタスクU及びXを実行し終えた段階で、保護管理部23は、アクセス設定情報部11にアクセスして、メモリ保護領域に対するコアのアクセス権限を、コア1〜3から、コア1〜2に変更することとしてもよい。
In the processing sequence shown in FIG. 5, the detected high load state is eliminated, and the loads on the
図6は、実施例1によるマルチコアシステム100における不具合状態発生時の処理シーケンスを示す図である。図6の処理シーケンスは、上述の図5に示した処理シーケンスに対して、高信頼OS側で高負荷状態が検出されることに代えて、高信頼OS側でハードウェア不具合状態が検出されることをトリガとする点だけが異なる。
FIG. 6 is a diagram illustrating a processing sequence when a malfunction state occurs in the
図6に示す処理シーケンスによれば、例えば図6のC部に示すように、高信頼OS側のコア2が動作不能となり、コア2のタスクU及びXが処理不能となった場合にも、通常OS側のコア3を利用して、メインメモリ32のメモリ保護領域で高信頼OSのタスクU及びXを実行することができる。
According to the processing sequence shown in FIG. 6, for example, as shown in part C of FIG. 6, even when the
ところで、近年の車載システムにおいては、実現するサービスの多種多様化による処理性能の向上と、車載環境特有の熱対策等の要望から、上述のような複数のコア1〜Nを搭載したシステム(マルチコアシステム100)が求められている。また、車両を制御する車両制御系ソフトウェアと、進化するマルチメディアサービスを実現するマルチメディア系ソフトウェアが同一のシステム上に搭載されることが要求されている。そのような車両制御系とマルチメディア系とが同居するシステムにおいては、システムの品質・信頼性を守るために、メモリ保護機能が必要不可欠となる。
By the way, in recent in-vehicle systems, a system (multi-core system) equipped with a plurality of
この点、本実施例によれば、上述の如く、高信頼OS側のコアのみがアクセス可能なメモリ保護領域を設定することにより、高信頼OSに係るシステムの品質・信頼性を守ることができる。 In this regard, according to the present embodiment, as described above, the quality and reliability of the system related to the highly reliable OS can be protected by setting the memory protection area accessible only by the core on the highly reliable OS side. .
また、限られたCPUリソースの観点からは、高信頼OSに対して無制限にCPUリソースを割り当てることはできない。従って、高信頼OSを担当するコアが高負荷状態に陥って高信頼OSのタスクが処理不能となる場合が生じうる。かかる場合に、一時的に通常OS側のコアを利用して、高信頼OSを実行させることも可能ではある。しかしながら、高信頼OSは高品質・信頼性を確保する必要があるが、単に通常OS側のコアに実行させるだけでは、通常OS側のコアのアクセス可能領域が不十分である等により、必要な高品質・信頼性を確保することができない場合がある。これは、高信頼OSを担当するコアが高負荷状態に陥った場合だけでなく、高信頼OSを担当するコアが機能不能な不具合状態に陥った場合も同様である。 Also, from the viewpoint of limited CPU resources, it is not possible to allocate unlimited CPU resources to a highly reliable OS. Therefore, there may occur a case where the core in charge of the highly reliable OS falls into a high load state and the task of the highly reliable OS becomes unprocessable. In such a case, it is possible to temporarily execute the highly reliable OS by using the core on the normal OS side. However, a high-reliability OS needs to ensure high quality and reliability, but it is necessary because the accessible area of the core on the normal OS side is insufficient if it is simply executed by the core on the normal OS side. In some cases, high quality and reliability cannot be ensured. This is the same not only when the core in charge of the high-reliability OS falls into a high load state, but also when the core in charge of the high-reliability OS falls into a malfunctioning state.
この点、本実施例によれば、上述の如く、高信頼OSを担当するコアが高負荷状態や不具合状態に陥った場合でも、通常OS側のコアがメモリ保護領域で高信頼OSのタスクを実行することができるので、高信頼OSに求められる必要な高品質・信頼性を確保しつつ、CPUリソースを効率的に利用することができる。これにより、車両制御系とマルチメディア系とを効果的に同居させることが可能な車載システムを構築することができる。 In this regard, according to the present embodiment, as described above, even when the core in charge of the high-reliability OS falls into a high load state or a failure state, the core on the normal OS side performs the task of the high-reliability OS in the memory protection area. Since it can be executed, CPU resources can be efficiently used while ensuring the required high quality and reliability required for a highly reliable OS. Thereby, the vehicle-mounted system which can coexist a vehicle control system and a multimedia system effectively can be constructed | assembled.
また、本実施例によれば、上述の如くアクセス設定情報部11のアクセス設定情報の変更は、不変情報保持部12で保持されるキーによる照合が確認された場合に限り実行可能となるので、高いセキュリティ性を維持することができる。また、不変情報保持部12で保持されるキーは、ハードウェア回路に埋設された不変情報であり、ユーザには知られることのないキーであるため、高いセキュリティ性が維持される。また、不変情報保持部12で保持されるキーは、ハードウェア回路に埋設された不変情報であり、悪意のあるソフトウェアにより書き換えられることが無いため、高いセキュリティ性が維持される。
Further, according to the present embodiment, as described above, the change of the access setting information in the access setting
図7は、本発明の実施例2によるマルチコアシステム200の主要構成を示す図である。図7において、セクション202は、ソフトウェアにより実現される機能部を示し、セクション104は、ハードウェア構成を示す。ハードウェア構成は、上述の実施例1と同様であってよく、詳細な説明を省略する。
FIG. 7 is a diagram showing a main configuration of a
本実施例のマルチコアシステム200は、上述の実施例1に対して、OS内処理管理部22’内に、状況保存部26と、予測・学習部27とを追加的に備える点が主に異なる。状況保存部26は、高信頼エリア及び通常エリアの双方に設けられ、予測・学習部27は高信頼エリアに設けられる。
The
状況保存部26は、アクセス設定情報を変更した状況を格納する部分である。具体的には、状況保存部26は、アクセス設定情報を変更する事象(例えば上述の高負荷状態)が発生したときのマルチコアシステム200内の状況、例えば、アクセス設定情報を変更する事象の発生時刻や動作タスク、OS統計情報(コア、バス等の利用率)等を格納する。或いは、状況保存部26は、アクセス設定情報を変更する事象が発生したときのマルチコアシステム200外の状況、例えばアクセス設定情報を変更する事象が発生したときの車両の位置や車両の周囲環境(道路や気温)や車両の走行状態(速度や加速度等)等を格納してもよい。この場合、これらの情報は、車載センサ(車載カメラを含む)により検出された状況に基づいて生成されてもよい。
The
予測・学習部27は、高信頼OS側及び通常OS側の双方の状況保存部26に格納されたデータから、上述の如くアクセス設定情報が変更されるような高負荷やハードウェア不具合発生のパターンを分析する機能を備える。また、予測・学習部27は、その分析した結果に基づいて、高負荷やハードウェア不具合発生が予測されるような前兆パターンの発生を検知したときに、その旨を保護管理部23に通知する。尚、予測・学習部27は、上述の如く高信頼エリアのみで動作する。
The prediction /
予測・学習部27は、例えば、状況保存部26に格納されたデータに基づいて、アクセス設定情報を変更する事象の発生時間別の偏り、動作アプリケーションによる偏り、ハードウェアの使用率による偏り、ハードウェア種別による不具合の偏りのようなパターンを解析・抽出する。
The prediction /
図8は、実施例2によるマルチコアシステム200における高負荷/不具合状態発生時の処理シーケンスを示す図である。図8に示す処理シーケンスは、状況保存部26及び予測・学習部27による処理が追加されている点が、上述の図5等に示した処理シーケンスと主に異なる。
FIG. 8 is a diagram illustrating a processing sequence when a high load / failure state occurs in the
図8に示す処理シーケンスでは、高負荷/不具合状態が発生すると、その際の状況が状況保存部26に格納され、予測・学習部27において高負荷/不具合状態が発生する状況の条件が解析・抽出される.予測・学習部27により高負荷/不具合状態が発生する状況の条件が解析されると、その条件がモニタ条件として追加され、状態モニタ部22に通知される。状態モニタ部22は、モニタ条件が通知されると、以後、高負荷/不具合状態の検知処理の他、モニタ条件に該当する状況が検知されたか否かの判断処理を行い、モニタ条件に該当する状況が検知した場合には、使用コア数変更依頼を保護管理部23に対して行う。
In the processing sequence shown in FIG. 8, when a high load / failure state occurs, the situation at that time is stored in the
例えば、図8のC部に示すように、コア1及び2により実行されるべきタスクがタスクU,V,W,X,Y及びZとなるような状況が予測された場合には、予め使用コア数変更依頼が保護管理部23に通知され、コア3がメインメモリ32のメモリ保護領域を用いて高信頼OS側のタスクU及びXを実行できる状態が形成される。
For example, as shown in part C of FIG. 8, when a situation in which the tasks to be executed by the
このように本実施例2によれば、モニタ条件が追加されると、モニタ条件に該当する状況が検知した場合に、速やかに使用コア数変更依頼が保護管理部23に出されるので、負荷調整部21を介して使用コア数変更依頼が保護管理部23に出される場合に比べて、対応時間を短縮することができる。即ち、高負荷/不具合状態が発生する前にアクセス設定情報を変更しておくことが可能となり、高負荷/不具合状態の発生時にも通常OS側のコアを利用して、メインメモリ32のメモリ保護領域で高信頼OSを実行することができる。かかる応答性の向上を実現する本実施例2は、迅速な応答性が要求される車載システムに好適である。
As described above, according to the second embodiment, when a monitoring condition is added, when a situation corresponding to the monitoring condition is detected, a request for changing the number of used cores is immediately issued to the
以上、本発明の好ましい実施例について詳説したが、本発明は、上述した実施例に制限されることはなく、本発明の範囲を逸脱することなく、上述した実施例に種々の変形及び置換を加えることができる。 The preferred embodiments of the present invention have been described in detail above. However, the present invention is not limited to the above-described embodiments, and various modifications and substitutions can be made to the above-described embodiments without departing from the scope of the present invention. Can be added.
例えば、上述した実施例では、高負荷/不具合状態の発生時に、メモリ保護領域への通常OS側のコアのアクセス権限を変更することで、メモリ保護領域の実質的な変更を行っているが、それに加えて、高負荷/不具合状態の発生時に、メモリ保護領域自体を増大させてもよい。例えば、高負荷/不具合状態の発生時に、通常時に使用されていないメモリ領域や、通常時に通常OS側のコアにより使用されるメモリ領域を、メモリ保護領域として追加設定してもよい。後者の場合(高負荷/不具合状態の発生時に、通常時に通常OS側のコアによりアクセス可能なメモリ領域を、メモリ保護領域として追加する場合)、設定テーブルのアクセス設定情報を変更することで、当該追加されたメモリ保護領域に対しては、高信頼OS側のコア及び高信頼OS側に移譲されたコアのみがアクセス可能とされ、他の通常OS側のコアはアクセス不能とされる。 For example, in the above-described embodiment, the memory protection area is substantially changed by changing the access authority of the core on the normal OS side to the memory protection area when a high load / failure state occurs. In addition, the memory protection area itself may be increased when a high load / failure state occurs. For example, when a high load / failure state occurs, a memory area that is not normally used or a memory area that is normally used by the core on the OS side may be additionally set as a memory protection area. In the latter case (when a memory area that is normally accessible by the core on the OS side is added as a memory protection area when a high load / failure state occurs), change the access setting information in the setting table to Only the core on the high-reliability OS side and the core transferred to the high-reliability OS side are accessible to the added memory protection area, and the other cores on the normal OS side are not accessible.
1〜N コア
10 動的メモリ保護制御部
11 アクセス設定情報部
12 不変情報保持部
20 OS内処理管理部
21 負荷調整部
22、22’ 状態モニタ部
23 保護管理部
24 負荷調整部
25 状態モニタ部
26 状況保存部
27 予測・学習部
30 メモリ保護機構
32 メインメモリ
100,200 マルチコアシステム
102,202 ソフトウェアセクション
104 ハードウェアセクション
1-
Claims (10)
前記メモリの保護領域に対する各コアのアクセス権限に関する情報を保持するアクセス設定情報部と、
前記アクセス設定情報部で保持されるアクセス設定情報に応じて各コアによる前記メモリの保護領域へのアクセスを制限又は許可するメモリ保護部と、
前記アクセス設定情報部にて保持される前記アクセス設定情報を変更する保護管理部と、
所与の識別情報を保持する不変情報保持部とを備え、
前記アクセス設定情報部は、前記保護管理部からの識別情報が前記不変情報保持部内の所与の識別情報と対応した場合に、前記アクセス設定情報への前記保護管理部のアクセスを許可し、前記保護管理部からの識別情報が前記不変情報保持部内の所与の識別情報と対応しなかった場合に、前記アクセス設定情報への前記保護管理部のアクセスを制限する、マルチコアシステム。 A multi-core system comprising a plurality of cores that execute two or more different types of software and a memory shared by the plurality of cores,
An access setting information section for holding information on access authority of each core to the protected area of the memory;
A memory protection unit that restricts or permits access to the protection area of the memory by each core according to the access setting information held in the access setting information unit;
A protection management unit for changing the access setting information held in the access setting information unit;
An invariant information holding unit for holding given identification information;
The access setting information unit permits the protection management unit to access the access setting information when the identification information from the protection management unit corresponds to given identification information in the invariant information holding unit, A multi-core system that restricts access of the protection management unit to the access setting information when identification information from a protection management unit does not correspond to given identification information in the invariant information holding unit.
前記保護管理部は、前記複数のコアのうちの特定のコアにより実行されるソフトウェアの種類が前記第1のソフトウェアから前記第2のソフトウェアに変更される際に、該特定のコアによる前記メモリの保護領域へのアクセスが許可されるように、前記アクセス設定情報を変更する、請求項1に記載のマルチコアシステム。 The two or more software includes first software and second software having higher importance than the first software,
When the type of software executed by a specific core among the plurality of cores is changed from the first software to the second software, the protection management unit The multi-core system according to claim 1, wherein the access setting information is changed so that access to the protected area is permitted.
前記複数のコアは、前記車両制御系ソフトウェアを常時実行する第1のコアと、前記マルチメディア系ソフトウェアを実行する第2のコアとを含み、
前記アクセス設定情報は、前記第1のコアによる前記メモリの保護領域へのアクセスを許可する情報を含む一方、前記第2のコアによる前記メモリの保護領域へのアクセスを制限する情報を含み、
前記保護管理部は、前記第2のコアによる前記メモリの保護領域へのアクセスが許可されるように、前記アクセス設定情報を変更する、請求項1に記載のマルチコアシステム。 The two or more software includes vehicle control system software related to vehicle control and multimedia software other than vehicle control,
The plurality of cores include a first core that always executes the vehicle control system software, and a second core that executes the multimedia software,
The access setting information includes information that permits access to the protection area of the memory by the first core, while including information that restricts access to the protection area of the memory by the second core,
The multi-core system according to claim 1, wherein the protection management unit changes the access setting information so that access to the protected area of the memory by the second core is permitted.
前記状態監視部により前記第1のコアの高負荷状態若しくは不具合状態が検出された場合に、前記保護管理部に対して前記アクセス設定情報の変更を要求する負荷調整部とを更に備える、請求項5に記載のマルチコアシステム。 A state monitoring unit for monitoring the state of the first core;
A load adjustment unit that requests the protection management unit to change the access setting information when the state monitoring unit detects a high load state or a malfunction state of the first core. 5. The multi-core system according to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008099788A JP2009251967A (en) | 2008-04-07 | 2008-04-07 | Multicore system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008099788A JP2009251967A (en) | 2008-04-07 | 2008-04-07 | Multicore system |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009251967A true JP2009251967A (en) | 2009-10-29 |
Family
ID=41312610
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008099788A Pending JP2009251967A (en) | 2008-04-07 | 2008-04-07 | Multicore system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009251967A (en) |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102110025A (en) * | 2009-12-28 | 2011-06-29 | 英特尔公司 | Mechanisms for avoiding inefficient core hopping and provide hardware assisted low-power state selection |
JP2011180840A (en) * | 2010-03-01 | 2011-09-15 | Toshiba Corp | Processor, multiprocessor system, and method of detecting illegal memory access |
WO2011141992A1 (en) * | 2010-05-10 | 2011-11-17 | トヨタ自動車株式会社 | Fault diagnosis device and fault diagnosis method |
WO2012131884A1 (en) * | 2011-03-28 | 2012-10-04 | 富士通株式会社 | Multicore processor system |
JP2012203698A (en) * | 2011-03-25 | 2012-10-22 | Toshiba Corp | Information processor and multi-core system |
CN103218032A (en) * | 2011-11-29 | 2013-07-24 | 英特尔公司 | Power management using relative energy break-even time |
CN103778099A (en) * | 2012-10-17 | 2014-05-07 | 瑞萨电子株式会社 | Information processing apparatus |
JP2014233998A (en) * | 2013-05-31 | 2014-12-15 | 富士通テン株式会社 | Device for vehicle, communication system, and application execution method |
JP2015118662A (en) * | 2013-12-20 | 2015-06-25 | 株式会社デンソー | Electronic controller |
JP2015133148A (en) * | 2015-03-19 | 2015-07-23 | 富士通株式会社 | Control program for controller, and control method for controller |
WO2017219975A1 (en) * | 2016-06-24 | 2017-12-28 | Huawei Technologies Co., Ltd. | System and method for shared memory ownership using context |
JP2019204382A (en) * | 2018-05-25 | 2019-11-28 | ルネサスエレクトロニクス株式会社 | Memory protection circuit and memory protection method |
-
2008
- 2008-04-07 JP JP2008099788A patent/JP2009251967A/en active Pending
Cited By (22)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US9292073B2 (en) | 2008-12-31 | 2016-03-22 | Intel Corporation | Power management using relative energy break-even time |
JP2011150694A (en) * | 2009-12-28 | 2011-08-04 | Intel Corp | Mechanism to avoid inefficient core hopping and provide hardware assisted low-power state selection |
CN102110025A (en) * | 2009-12-28 | 2011-06-29 | 英特尔公司 | Mechanisms for avoiding inefficient core hopping and provide hardware assisted low-power state selection |
JP2011180840A (en) * | 2010-03-01 | 2011-09-15 | Toshiba Corp | Processor, multiprocessor system, and method of detecting illegal memory access |
WO2011141992A1 (en) * | 2010-05-10 | 2011-11-17 | トヨタ自動車株式会社 | Fault diagnosis device and fault diagnosis method |
JPWO2011141992A1 (en) * | 2010-05-10 | 2013-07-22 | トヨタ自動車株式会社 | Failure diagnosis apparatus and failure diagnosis method |
JP2012203698A (en) * | 2011-03-25 | 2012-10-22 | Toshiba Corp | Information processor and multi-core system |
JP5716824B2 (en) * | 2011-03-28 | 2015-05-13 | 富士通株式会社 | Multi-core processor system |
WO2012131884A1 (en) * | 2011-03-28 | 2012-10-04 | 富士通株式会社 | Multicore processor system |
CN103218032A (en) * | 2011-11-29 | 2013-07-24 | 英特尔公司 | Power management using relative energy break-even time |
CN103218032B (en) * | 2011-11-29 | 2017-07-14 | 英特尔公司 | Utilize the power management of relative energy break-even time |
US9318167B2 (en) | 2012-10-17 | 2016-04-19 | Renesas Electronics Corporation | Information processing apparatus |
JP2014081819A (en) * | 2012-10-17 | 2014-05-08 | Renesas Electronics Corp | Information processing apparatus |
CN103778099A (en) * | 2012-10-17 | 2014-05-07 | 瑞萨电子株式会社 | Information processing apparatus |
US9740636B2 (en) | 2012-10-17 | 2017-08-22 | Renesas Electronics Corporation | Information processing apparatus |
JP2014233998A (en) * | 2013-05-31 | 2014-12-15 | 富士通テン株式会社 | Device for vehicle, communication system, and application execution method |
JP2015118662A (en) * | 2013-12-20 | 2015-06-25 | 株式会社デンソー | Electronic controller |
JP2015133148A (en) * | 2015-03-19 | 2015-07-23 | 富士通株式会社 | Control program for controller, and control method for controller |
WO2017219975A1 (en) * | 2016-06-24 | 2017-12-28 | Huawei Technologies Co., Ltd. | System and method for shared memory ownership using context |
US10452287B2 (en) | 2016-06-24 | 2019-10-22 | Futurewei Technologies, Inc. | System and method for shared memory ownership using context |
US11194478B2 (en) | 2016-06-24 | 2021-12-07 | Futurewei Technologies, Inc. | System and method for shared memory ownership using context |
JP2019204382A (en) * | 2018-05-25 | 2019-11-28 | ルネサスエレクトロニクス株式会社 | Memory protection circuit and memory protection method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2009251967A (en) | Multicore system | |
JP6481900B2 (en) | Hardware configuration reporting apparatus, hardware configuration arbitration method, program, machine-readable recording medium, and hardware configuration arbitration apparatus | |
JP5975629B2 (en) | Memory protection unit and storage element access control method | |
US10229077B2 (en) | Method for data transfer between real-time tasks using a DMA memory controller | |
JP5263602B2 (en) | ACCESS CONTROL SYSTEM, ACCESS CONTROL METHOD, ELECTRONIC DEVICE, AND CONTROL PROGRAM | |
EP2996043B1 (en) | Debugging in a data processing apparatus | |
JP5308629B2 (en) | Multiprocessor system and access protection method in multiprocessor system | |
WO2015045507A1 (en) | Vehicular control device | |
US11775649B2 (en) | Perform verification check in response to change in page table base register | |
US7409722B2 (en) | Control status register access to enable domain reconfiguration | |
US20110208948A1 (en) | Reading to and writing from peripherals with temporally separated redundant processor execution | |
JP2008186212A (en) | Data processing system | |
CN111213144A (en) | Single-chip system, method for operating a single-chip system and motor vehicle | |
WO2012131884A1 (en) | Multicore processor system | |
US8880827B2 (en) | Method for executing security-relevant and non-security-relevant software components on a hardware platform | |
US7555627B2 (en) | Input-output control apparatus, input-output control method, process control apparatus and process control method | |
WO2011158441A1 (en) | Data processing device and method, and processor unit of same | |
CN115576734A (en) | Multi-core heterogeneous log storage method and system | |
JP2019049928A (en) | Electronic control device and control method for electronic control device | |
JP6349444B2 (en) | Vehicle control device | |
JP5651209B2 (en) | Multiprocessor system | |
US20120265904A1 (en) | Processor system | |
JP5920509B2 (en) | Controller control program and controller control method | |
CN108415788B (en) | Data processing apparatus and method for responding to non-responsive processing circuitry | |
JP2023152485A (en) | Processing device |