JP2013156760A - Data processor - Google Patents

Data processor Download PDF

Info

Publication number
JP2013156760A
JP2013156760A JP2012015650A JP2012015650A JP2013156760A JP 2013156760 A JP2013156760 A JP 2013156760A JP 2012015650 A JP2012015650 A JP 2012015650A JP 2012015650 A JP2012015650 A JP 2012015650A JP 2013156760 A JP2013156760 A JP 2013156760A
Authority
JP
Japan
Prior art keywords
processor
access
address
data processing
boundary
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2012015650A
Other languages
Japanese (ja)
Inventor
Tomoaki Kanai
友明 金井
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.)
Renesas Electronics Corp
Original Assignee
Renesas Electronics 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 Renesas Electronics Corp filed Critical Renesas Electronics Corp
Priority to JP2012015650A priority Critical patent/JP2013156760A/en
Publication of JP2013156760A publication Critical patent/JP2013156760A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Storage Device Security (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide a data processor having high security.SOLUTION: A data processor 10 includes: a first processor 11; a second processor 12 having a security function; a shared memory 13 including a first memory area accessible by the first processor 11 and a second memory area accessible by the second processor 12; a control information storage section 15 capable of storing a boundary address; and an access control circuit 14 for controlling access to the shared memory 13 from the first processor 11 and the second processor 12 according to the boundary address. When rewriting the boundary address stored in the control information storage section 15, the second processor executes authentication processing.

Description

本発明はデータ処理装置に関し、特に複数のプロセッサでメモリを共有可能なデータ処理装置に関する。   The present invention relates to a data processing apparatus, and more particularly to a data processing apparatus capable of sharing a memory among a plurality of processors.

単一の共有メモリを複数のプロセッサで共有することができるデータ処理装置が知られている。   There is known a data processing apparatus capable of sharing a single shared memory by a plurality of processors.

特許文献1には、初期化処理におけるプログラムの共通化とプロセッサ間の独立性を両立させることができるマルチプロセッサ型コントローラに関する技術が開示されている。特許文献1に開示されているマルチプロセッサ型コントローラは、複数のプロセッサと、共有メモリと、複数の境界レジスタと、比較器と、メモリ制御部と、複数のマスクレジスタと、割込み制御部と、を備えている。   Patent Document 1 discloses a technique related to a multiprocessor controller that can achieve both sharing of a program in initialization processing and independence between processors. A multiprocessor controller disclosed in Patent Document 1 includes a plurality of processors, a shared memory, a plurality of boundary registers, a comparator, a memory control unit, a plurality of mask registers, and an interrupt control unit. I have.

複数のプロセッサは、電源投入直後に特定のメモリアドレスの初期化プログラムを実行する機能を有する。共有メモリは、複数のプロセッサからアクセスされる。複数の境界レジスタは、共有メモリを複数のプロセッサ毎の領域に分割するアドレスを設定する。比較器は、複数のプロセッサからの共有メモリへのアクセスアドレスと複数の境界レジスタの内容とを比較する。メモリ制御部は、比較器の結果によって共有メモリの領域に対して複数のプロセッサからのアクセスを制限する。複数のマスクレジスタは、割込み要因毎にマスク情報を設定する。割込み制御部は、マスクレジスタからのマスク情報に従い、プロセッサへの割込みをマスクする。   The plurality of processors have a function of executing an initialization program for a specific memory address immediately after power-on. The shared memory is accessed from a plurality of processors. The plurality of boundary registers set addresses for dividing the shared memory into areas for a plurality of processors. The comparator compares the access addresses to the shared memory from the plurality of processors with the contents of the plurality of boundary registers. The memory control unit restricts access from the plurality of processors to the shared memory area based on the result of the comparator. A plurality of mask registers sets mask information for each interrupt factor. The interrupt control unit masks an interrupt to the processor according to the mask information from the mask register.

特許文献1に開示されているマルチプロセッサ型コントローラでは、プロセッサ間の共有メモリ領域の独立性は、主に通常時の処理において必要であり、立上げ処理ではプロセッサ間で共通処理を実行するため必要性が少ない。そこで、特許文献1に開示されているマルチプロセッサ型コントローラでは、電源が投入された後プロセッサが最初に読み出しを行う番地に初期化プログラムを配置し、この初期化プログラムをプロセッサ間で共通に実行している。このとき、共有メモリへのアクセスは境界レジスタに境界アドレスが設定され、境界アドレスが有効になるまでは、全てのプロセッサが共有メモリに制限なくアクセスすることができる。   In the multiprocessor controller disclosed in Patent Document 1, the independence of the shared memory area between processors is mainly necessary for normal processing, and is necessary for startup processing to execute common processing between processors. There is little nature. Therefore, in the multiprocessor type controller disclosed in Patent Document 1, an initialization program is arranged at an address where the processor first reads after power is turned on, and this initialization program is executed in common between the processors. ing. At this time, for accessing the shared memory, a boundary address is set in the boundary register, and all the processors can access the shared memory without restriction until the boundary address becomes valid.

特許文献2には、プロセッサ間通信のスループットを向上させ、送受信するメッセージの優先順位に基づいたプロセッサ間通信を実行することができるマルチプロセッサシステムに関する技術が開示されている。   Patent Document 2 discloses a technique related to a multiprocessor system that can improve inter-processor communication throughput and execute inter-processor communication based on the priority order of messages to be transmitted and received.

特開平11−338833号公報JP 11-338833 A 特開2006−309512号公報JP 2006-309512 A

共有メモリを複数のプロセッサで共有しているデータ処理装置では、各プロセッサで実行するためのプログラムが共有メモリに格納されている。そして、プロセッサの中にセキュリティ性の高いプロセッサ(セキュアプロセッサ)が含まれている場合、セキュリティ性の高いプログラムが共有メモリに格納される。   In a data processing apparatus in which a shared memory is shared by a plurality of processors, a program to be executed by each processor is stored in the shared memory. If the processor includes a highly secure processor (secure processor), a highly secure program is stored in the shared memory.

特許文献1に開示されているマルチプロセッサ型コントローラでは、境界レジスタに境界アドレスを設定することで、各プロセッサがアクセス可能な共有メモリの領域を設定している。しかしながら、境界レジスタに設定される境界アドレスを容易に書き換えることができると、セキュアプロセッサ以外のプロセッサがセキュリティ性の高いプログラムにアクセスすることが可能となり、セキュアプロセッサを含むデータ処理装置のセキュリティ性が失われるという問題がある。特に、この問題はセキュアプロセッサ以外のプロセッサが脆弱性を有する場合に顕著となる。   In the multiprocessor controller disclosed in Patent Document 1, a shared memory area accessible by each processor is set by setting a boundary address in a boundary register. However, if the boundary address set in the boundary register can be easily rewritten, a processor other than the secure processor can access a highly secure program, and the security of the data processing apparatus including the secure processor is lost. There is a problem of being. In particular, this problem becomes significant when a processor other than the secure processor is vulnerable.

本発明の一態様にかかるデータ処理装置は、第1プロセッサと、セキュリティ機能を備えた第2プロセッサと、前記第1プロセッサがアクセス可能な第1メモリ領域と、前記第2プロセッサがアクセス可能な第2メモリ領域とを備えた共有メモリと、前記共有メモリの前記第1メモリ領域および前記第2メモリ領域の境界に対応するアドレスである境界アドレスを格納可能な制御情報格納部と、前記境界アドレスに応じて前記第1プロセッサおよび前記第2プロセッサからの前記共有メモリへのアクセスを制御するアクセス制御回路と、を備え、前記制御情報格納部に格納されている前記境界アドレスを書き換える際、前記第2プロセッサが認証処理を実施する。   A data processing apparatus according to an aspect of the present invention includes a first processor, a second processor having a security function, a first memory area accessible by the first processor, and a second processor accessible by the second processor. A shared memory having two memory areas, a control information storage unit capable of storing a boundary address that is an address corresponding to a boundary between the first memory area and the second memory area of the shared memory, and the boundary address And an access control circuit for controlling access to the shared memory from the first processor and the second processor in response to the second address when rewriting the boundary address stored in the control information storage unit. The processor performs an authentication process.

本発明の一態様にかかるデータ処理装置では、制御情報格納部に格納されている境界アドレスを書き換える際、セキュアプロセッサである第2プロセッサが認証処理を実施している。よって、制御情報格納部に格納されている境界アドレスが不正に書き換えられることを抑制することができるため、セキュリティ性の高いデータ処理装置を提供することができる。   In the data processing apparatus according to one aspect of the present invention, when the boundary address stored in the control information storage unit is rewritten, the second processor, which is a secure processor, performs the authentication process. Therefore, since it is possible to suppress unauthorized rewriting of the boundary address stored in the control information storage unit, it is possible to provide a data processing device with high security.

本発明により、セキュリティ性の高いデータ処理装置を提供することができる。   According to the present invention, a data processing device with high security can be provided.

実施の形態1にかかるデータ処理装置を示すブロック図である。1 is a block diagram showing a data processing device according to a first exemplary embodiment; 実施の形態1にかかるデータ処理装置が備える共有メモリのメモリ領域を説明するための図である。3 is a diagram for explaining a memory area of a shared memory included in the data processing apparatus according to the first embodiment; FIG. 実施の形態1にかかるデータ処理装置が備えるアクセス制御回路の動作を説明するためのフローチャートである。3 is a flowchart for explaining an operation of an access control circuit included in the data processing apparatus according to the first exemplary embodiment; 実施の形態1にかかるデータ処理装置における境界アドレス書き換え処理を説明するためのフローチャートである。6 is a flowchart for explaining boundary address rewriting processing in the data processing apparatus according to the first exemplary embodiment; 実施の形態1にかかるデータ処理装置における境界アドレス書き換え処理を説明するためのフローチャートである。6 is a flowchart for explaining boundary address rewriting processing in the data processing apparatus according to the first exemplary embodiment; 実施の形態2にかかるデータ処理装置を示すブロック図である。FIG. 3 is a block diagram showing a data processing apparatus according to a second exemplary embodiment. 実施の形態2にかかるデータ処理装置が備える共有メモリのメモリ領域を説明するための図である。FIG. 10 is a diagram for explaining a memory area of a shared memory included in the data processing apparatus according to the second embodiment; 実施の形態3にかかるデータ処理装置が備えるアクセス制御回路の動作を説明するためのフローチャートである。10 is a flowchart for explaining an operation of an access control circuit included in the data processing apparatus according to the third embodiment; 実施の形態3にかかるデータ処理装置が備える共有メモリのメモリ領域を説明するための図である。FIG. 10 is a diagram for explaining a memory area of a shared memory included in a data processing apparatus according to a third embodiment; 実施の形態4にかかるデータ処理装置を示すブロック図である。FIG. 6 is a block diagram illustrating a data processing apparatus according to a fourth embodiment. 実施の形態4にかかるデータ処理装置が備える共有メモリのメモリ領域を説明するための図である。FIG. 10 is a diagram for explaining a memory area of a shared memory included in a data processing apparatus according to a fourth embodiment; 実施の形態5にかかるデータ処理装置を示すブロック図である。FIG. 9 is a block diagram illustrating a data processing apparatus according to a fifth embodiment. 実施の形態5にかかるデータ処理装置が備える共有メモリのメモリ領域を説明するための図である。FIG. 10 is a diagram for explaining a memory area of a shared memory included in a data processing apparatus according to a fifth embodiment; 本発明にかかるデータ処理装置の使用例を説明するための図である。It is a figure for demonstrating the usage example of the data processor concerning this invention. 本発明にかかるデータ処理装置の使用例を説明するための図である。It is a figure for demonstrating the usage example of the data processor concerning this invention. 本発明にかかるデータ処理装置の使用例を説明するための図である。It is a figure for demonstrating the usage example of the data processor concerning this invention.

<実施の形態1>
以下、図面を参照して本発明の実施の形態について説明する。
図1は、本発明の実施の形態1にかかるデータ処理装置を説明するためのブロック図である。図1に示すように、本実施の形態にかかるデータ処理装置10は、第1プロセッサ11、第2プロセッサ12、共有メモリ13、アクセス制御回路14、制御情報格納部15、およびバス16を備える。第1プロセッサ11、第2プロセッサ12、アクセス制御回路14、および制御情報格納部15は、バス16を介して互いに接続されている。また、共有メモリ13はアクセス制御回路14を介してバス16に接続されている。
<Embodiment 1>
Embodiments of the present invention will be described below with reference to the drawings.
FIG. 1 is a block diagram for explaining the data processing apparatus according to the first embodiment of the present invention. As shown in FIG. 1, the data processing apparatus 10 according to the present embodiment includes a first processor 11, a second processor 12, a shared memory 13, an access control circuit 14, a control information storage unit 15, and a bus 16. The first processor 11, the second processor 12, the access control circuit 14, and the control information storage unit 15 are connected to each other via a bus 16. The shared memory 13 is connected to the bus 16 via the access control circuit 14.

第1プロセッサ11は、共有メモリ13の第1メモリ領域にアクセスし、第1メモリ領域にデータを格納したり、第1メモリ領域に格納されているデータ(プログラム)を読み出して当該プログラムを実行したりすることができる。第2プロセッサ12は、共有メモリ13の第2メモリ領域にアクセスし、第2メモリ領域にデータを格納したり、第2メモリ領域に格納されているデータ(プログラム)を読み出して当該プログラムを実行したりすることができる。例えば、第2プロセッサ12は、セキュリティ機能を備えたプロセッサ(セキュアプロセッサ)で構成することができる。ここで、セキュアプロセッサとは、アタック耐性やタンパ耐性を備えたプロセッサである。   The first processor 11 accesses the first memory area of the shared memory 13 and stores data in the first memory area or reads data (program) stored in the first memory area and executes the program. Can be. The second processor 12 accesses the second memory area of the shared memory 13 and stores data in the second memory area, or reads data (program) stored in the second memory area and executes the program. Can be. For example, the second processor 12 can be configured by a processor (secure processor) having a security function. Here, the secure processor is a processor having attack resistance and tamper resistance.

共有メモリ13は、第1プロセッサ11がアクセス可能な第1メモリ領域と、第2プロセッサ12がアクセス可能な第2メモリ領域とを備える。第1メモリ領域には第1プロセッサ11で実行されるプログラムが格納されている。第2メモリ領域には第2プロセッサ12で実行されるプログラムが格納されている。ここで、第2プロセッサ12はセキュアプロセッサで構成されているので、第2メモリ領域にはセキュリティ性が高いプログラムが格納されている。共有メモリ13は、例えば同一のメモリ(物理的に単一のメモリ)で構成されており、第1メモリ領域と第2メモリ領域は、境界アドレスを用いて領域が分割されている。また、共有メモリ13は、例えばフラッシュメモリを用いて構成することができる。   The shared memory 13 includes a first memory area accessible by the first processor 11 and a second memory area accessible by the second processor 12. A program to be executed by the first processor 11 is stored in the first memory area. A program executed by the second processor 12 is stored in the second memory area. Here, since the second processor 12 is composed of a secure processor, a program with high security is stored in the second memory area. The shared memory 13 is composed of, for example, the same memory (physically single memory), and the first memory area and the second memory area are divided using boundary addresses. The shared memory 13 can be configured using, for example, a flash memory.

図2は、本実施の形態にかかるデータ処理装置が備える共有メモリ13のメモリ領域を説明するための図である。図2に示すように、共有メモリ13のアドレスadd_a〜add_bは第1メモリ領域に対応したアドレスであり、アドレスadd_b〜add_cは第2メモリ領域に対応したアドレスである。ここで、アドレスadd_bは、共有メモリ13の第1メモリ領域および第2メモリ領域の境界に対応する境界アドレスである。   FIG. 2 is a diagram for explaining a memory area of the shared memory 13 included in the data processing apparatus according to the present embodiment. As shown in FIG. 2, the addresses add_a to add_b of the shared memory 13 are addresses corresponding to the first memory area, and the addresses add_b to add_c are addresses corresponding to the second memory area. Here, the address add_b is a boundary address corresponding to the boundary between the first memory area and the second memory area of the shared memory 13.

図2に示す共有メモリ13では、各アドレスの大小関係がadd_a<add_b<add_cであってもよく、また、add_a>add_b>add_cであってもよい。各アドレスの大小関係がadd_a<add_b<add_cである場合、例えば、境界アドレスadd_bは第2メモリ領域の先頭アドレスとすることができる。また、各アドレスの大小関係がadd_a>add_b>add_cである場合、例えば、境界アドレスadd_bは第1メモリ領域の先頭アドレスとすることができる。   In the shared memory 13 illustrated in FIG. 2, the size relationship between the addresses may be add_a <add_b <add_c, or add_a> add_b> add_c. When the magnitude relationship between the addresses is add_a <add_b <add_c, for example, the boundary address add_b can be the head address of the second memory area. In addition, when the size relationship between the addresses is add_a> add_b> add_c, for example, the boundary address add_b can be the head address of the first memory area.

アクセス制御回路14は、境界アドレスに応じて第1プロセッサ11および第2プロセッサ12からの共有メモリ13へのアクセスを制御する。つまり、アクセス制御回路14は、共有メモリ13のアクセス先のアドレスと境界アドレスadd_bとの比較結果に応じて、第1プロセッサ11および第2プロセッサ12からの共有メモリ13へのアクセスを制御することができる。これにより、アクセス制御回路14は、共有メモリ13のメモリ領域を第1メモリ領域と第2メモリ領域とに論理的に分割することができる。   The access control circuit 14 controls access to the shared memory 13 from the first processor 11 and the second processor 12 according to the boundary address. That is, the access control circuit 14 can control access to the shared memory 13 from the first processor 11 and the second processor 12 according to the comparison result between the access destination address of the shared memory 13 and the boundary address add_b. it can. Thereby, the access control circuit 14 can logically divide the memory area of the shared memory 13 into the first memory area and the second memory area.

例えば、境界アドレスadd_bよりも小さいアドレスの領域を第1メモリ領域と、境界アドレスadd_bよりも大きいアドレスの領域を第2メモリ領域とした場合(add_a<add_b<add_c)、アクセス制御回路14は、共有メモリ13へのアクセス元が第1プロセッサ11であり、アクセス先のアドレスが境界アドレスadd_bよりも小さい場合、第1プロセッサ11が第1メモリ領域にアクセスすることを許可する。また、アクセス制御回路14は、共有メモリ13へのアクセス元が第2プロセッサ12であり、アクセス先のアドレスが境界アドレスadd_bよりも大きい場合(または、アクセス先のアドレスが境界アドレスadd_b以上である場合)、第2プロセッサ12が第2メモリ領域にアクセスすることを許可する。   For example, when an area having an address smaller than the boundary address add_b is a first memory area and an area having an address larger than the boundary address add_b is a second memory area (add_a <add_b <add_c), the access control circuit 14 When the access source to the memory 13 is the first processor 11 and the access destination address is smaller than the boundary address add_b, the first processor 11 is permitted to access the first memory area. Further, the access control circuit 14 has a case where the access source to the shared memory 13 is the second processor 12 and the access destination address is larger than the boundary address add_b (or the access destination address is greater than or equal to the boundary address add_b). ), Allowing the second processor 12 to access the second memory area.

逆に、境界アドレスadd_bよりも大きいアドレスの領域を第1メモリ領域と、境界アドレスadd_bよりも小さいアドレスの領域を第2メモリ領域とした場合、アクセス制御回路14は、共有メモリ13へのアクセス元が第1プロセッサ11であり、アクセス先のアドレスが境界アドレスadd_bよりも大きい場合(または、アクセス先のアドレスが境界アドレスadd_b以上である場合)、第1プロセッサ11が第1メモリ領域にアクセスすることを許可する。また、アクセス制御回路14は、共有メモリ13へのアクセス元が第2プロセッサ12であり、アクセス先のアドレスが境界アドレスadd_bよりも小さい場合、第2プロセッサ12が第2メモリ領域にアクセスすることを許可する。   On the contrary, when the area having an address larger than the boundary address add_b is the first memory area and the area having an address smaller than the boundary address add_b is the second memory area, the access control circuit 14 is the access source to the shared memory 13. Is the first processor 11 and the access destination address is larger than the boundary address add_b (or the access destination address is greater than or equal to the boundary address add_b), the first processor 11 accesses the first memory area. Allow. Further, the access control circuit 14 determines that the second processor 12 accesses the second memory area when the access source to the shared memory 13 is the second processor 12 and the access destination address is smaller than the boundary address add_b. To give permission.

制御情報格納部15は、共有メモリ13の第1メモリ領域および第2メモリ領域の境界に対応する境界アドレスを格納する。境界アドレスは、第1プロセッサ11または第2プロセッサ12が任意のタイミングで書き換えることができる。このように、境界アドレスを書き換えることで、第1メモリ領域および第2メモリ領域の範囲を任意に変更することができる。また、本実施の形態にかかるデータ処理装置では、制御情報格納部15に格納されている境界アドレスを書き換える際、セキュアプロセッサである第2プロセッサ12が認証処理を実施する。   The control information storage unit 15 stores a boundary address corresponding to the boundary between the first memory area and the second memory area of the shared memory 13. The boundary address can be rewritten at any timing by the first processor 11 or the second processor 12. In this way, the range of the first memory area and the second memory area can be arbitrarily changed by rewriting the boundary address. In the data processing apparatus according to the present embodiment, when the boundary address stored in the control information storage unit 15 is rewritten, the second processor 12 that is a secure processor performs an authentication process.

制御情報格納部15に格納されている境界アドレスは、バス16を介してアクセス制御回路14に出力される。例えば、制御情報格納部15は、境界アドレスが書き換えられるタイミング毎に、アクセス制御回路14に境界アドレスを出力する。これにより、アクセス制御回路14は最新の境界アドレスを保持することができる。   The boundary address stored in the control information storage unit 15 is output to the access control circuit 14 via the bus 16. For example, the control information storage unit 15 outputs the boundary address to the access control circuit 14 every time the boundary address is rewritten. Thereby, the access control circuit 14 can hold the latest boundary address.

次に、本実施の形態にかかるデータ処理装置の動作について説明する。まず、第1プロセッサ11および第2プロセッサ12が共有メモリ13にアクセスする場合の動作について説明する。   Next, the operation of the data processing apparatus according to this embodiment will be described. First, the operation when the first processor 11 and the second processor 12 access the shared memory 13 will be described.

第1プロセッサ11および第2プロセッサ12が共有メモリ13にアクセスする際、アクセス制御回路14は、境界アドレスに応じて第1プロセッサ11および第2プロセッサ12からの共有メモリ13へのアクセスを制御する。図3は、アクセス制御回路14の動作を説明するためのフローチャートである。なお、以下では、各アドレスの大小関係がadd_a<add_b<add_cである場合を例として説明する。   When the first processor 11 and the second processor 12 access the shared memory 13, the access control circuit 14 controls access to the shared memory 13 from the first processor 11 and the second processor 12 according to the boundary address. FIG. 3 is a flowchart for explaining the operation of the access control circuit 14. In the following, a case will be described as an example where the size relationship of each address is add_a <add_b <add_c.

第1プロセッサ11および第2プロセッサ12が共有メモリ13にアクセス要求(書き込み要求または読み出し要求)する際、第1プロセッサ11および第2プロセッサ12はアクセス先のアドレスとアクセス元を示すID情報を送信する。アクセス制御回路14は、第1プロセッサ11および第2プロセッサ12が送信したID情報に基づき、共有メモリ13へアクセスするプロセッサ(つまり、アクセス元)を判定する(ステップS1)。共有メモリ13へアクセスするプロセッサが第1プロセッサ11である場合(ステップS2:Yes)、第1プロセッサ11がアクセスするアクセス先のアドレスと境界アドレスadd_bとを比較する。そして、アクセス先のアドレスが境界アドレスadd_bよりも小さい場合(ステップS3:Yes)は、アクセス先のアドレスがアドレスadd_a〜add_bの範囲内(第1メモリ領域の範囲内)であるので、第1プロセッサ11の共有メモリ13(第1メモリ領域)へのアクセスを許可する(ステップS4)。一方、アクセス先のアドレスが境界アドレスadd_bよりも大きい(または、アクセス先のアドレスが境界アドレスadd_b以上である)場合(ステップS3:No)は、アクセス先のアドレスがアドレスadd_a〜add_bの範囲内(第1メモリ領域の範囲内)にないため、第1プロセッサ11の共有メモリ13へのアクセスを禁止する(ステップS5)。   When the first processor 11 and the second processor 12 make an access request (write request or read request) to the shared memory 13, the first processor 11 and the second processor 12 transmit access destination address and ID information indicating the access source. . The access control circuit 14 determines a processor (that is, an access source) that accesses the shared memory 13 based on the ID information transmitted by the first processor 11 and the second processor 12 (step S1). When the processor accessing the shared memory 13 is the first processor 11 (step S2: Yes), the access destination address accessed by the first processor 11 is compared with the boundary address add_b. When the access destination address is smaller than the boundary address add_b (step S3: Yes), the access destination address is within the range of addresses add_a to add_b (within the range of the first memory area). 11 is permitted to access the 11 shared memory 13 (first memory area) (step S4). On the other hand, when the access destination address is larger than the boundary address add_b (or the access destination address is greater than or equal to the boundary address add_b) (step S3: No), the access destination address is within the range of addresses add_a to add_b ( Since it is not within the range of the first memory area, access to the shared memory 13 by the first processor 11 is prohibited (step S5).

また、共有メモリ13へアクセスするプロセッサが第1プロセッサ11でない場合(ステップS2:No)、つまり、共有メモリ13へアクセスするプロセッサが第2プロセッサ12である場合、第2プロセッサ12がアクセスするアクセス先のアドレスと境界アドレスadd_bとを比較する。そして、アクセス先のアドレスが境界アドレスadd_bよりも大きい(または、アクセス先のアドレスが境界アドレスadd_b以上である)場合(ステップS6:Yes)は、アクセス先のアドレスがアドレスadd_b〜add_cの範囲内(第2メモリ領域の範囲内)であるので、第2プロセッサ12の共有メモリ13(第2メモリ領域)へのアクセスを許可する(ステップS7)。一方、アクセス先のアドレスが境界アドレスadd_bよりも小さい場合(ステップS6:No)は、アクセス先のアドレスがアドレスadd_b〜add_cの範囲内(第2メモリ領域の範囲内)にないため、第2プロセッサ12の共有メモリ13へのアクセスを禁止する(ステップS8)。   If the processor accessing the shared memory 13 is not the first processor 11 (step S2: No), that is, if the processor accessing the shared memory 13 is the second processor 12, the access destination accessed by the second processor 12 Are compared with the boundary address add_b. If the access destination address is larger than the boundary address add_b (or the access destination address is greater than or equal to the boundary address add_b) (step S6: Yes), the access destination address is within the range of addresses add_b to add_c ( Therefore, the second processor 12 is permitted to access the shared memory 13 (second memory area) (step S7). On the other hand, if the access destination address is smaller than the boundary address add_b (step S6: No), the access destination address is not within the range of the addresses add_b to add_c (within the range of the second memory area). Access to the 12 shared memories 13 is prohibited (step S8).

次に、制御情報格納部15に格納されている境界アドレスを書き換える場合の動作について説明する。図4は、本実施の形態にかかるデータ処理装置における境界アドレス書き換え処理を説明するためのフローチャートである。図4では、第1プロセッサ11が制御情報格納部15に格納されている境界アドレスを書き換える場合の動作を示している。   Next, an operation for rewriting the boundary address stored in the control information storage unit 15 will be described. FIG. 4 is a flowchart for explaining the boundary address rewriting process in the data processing apparatus according to the present embodiment. FIG. 4 shows an operation when the first processor 11 rewrites the boundary address stored in the control information storage unit 15.

制御情報格納部15に格納されている境界アドレスを書き換える際、第1プロセッサ11は書き換え用の境界アドレスとアクセスコードを取得する(ステップS11)。例えば、第1プロセッサ11は、バス16に接続された設定回路(不図示)から書き換え用の境界アドレスとアクセスコードを取得することができる。ここで、アクセスコードは、例えばユーザIDとパスワードである。   When the boundary address stored in the control information storage unit 15 is rewritten, the first processor 11 acquires the boundary address and access code for rewriting (step S11). For example, the first processor 11 can acquire a rewrite boundary address and access code from a setting circuit (not shown) connected to the bus 16. Here, the access code is, for example, a user ID and a password.

次に、第2プロセッサ12は、第1プロセッサ11が取得したアクセスコードの認証処理を実施する(ステップS12)。例えば、第1プロセッサ11は、取得したアクセスコードを第2プロセッサ12に送信する。そして、第2プロセッサ12は、第1プロセッサ11から送信されたアクセスコードが正しいか否か判断する。   Next, the second processor 12 performs an authentication process for the access code acquired by the first processor 11 (step S12). For example, the first processor 11 transmits the acquired access code to the second processor 12. Then, the second processor 12 determines whether or not the access code transmitted from the first processor 11 is correct.

第2プロセッサ12は、第1プロセッサ11から送信されたアクセスコードが正しいと判断した場合(ステップS13:Yes)、第1プロセッサ11に対して境界アドレスの書き換えを指示する。境界アドレスの書き換えを許可された第1プロセッサ11は、書き換え用の境界アドレスを用いて制御情報格納部15に格納されている境界アドレスを書き換える(ステップS14)。   If the second processor 12 determines that the access code transmitted from the first processor 11 is correct (step S13: Yes), the second processor 12 instructs the first processor 11 to rewrite the boundary address. The first processor 11 permitted to rewrite the boundary address rewrites the boundary address stored in the control information storage unit 15 by using the boundary address for rewriting (step S14).

一方、第2プロセッサ12は、第1プロセッサ11から送信されたアクセスコードが正しくないと判断した場合(ステップS13:No)、第1プロセッサ11に対してアクセスコードが正しくない旨を通知する。この場合、第1プロセッサ11は、制御情報格納部15に格納されている境界アドレスを書き換えることなく境界アドレス書き換え処理を終了する(ステップS15)。   On the other hand, when the second processor 12 determines that the access code transmitted from the first processor 11 is not correct (step S13: No), the second processor 12 notifies the first processor 11 that the access code is incorrect. In this case, the first processor 11 ends the boundary address rewriting process without rewriting the boundary address stored in the control information storage unit 15 (step S15).

図5は、本実施の形態にかかるデータ処理装置における境界アドレス書き換え処理を説明するためのフローチャートである。図5では、第2プロセッサ12が制御情報格納部15に格納されている境界アドレスを書き換える場合の動作を示している。   FIG. 5 is a flowchart for explaining boundary address rewriting processing in the data processing apparatus according to this embodiment. FIG. 5 shows an operation when the second processor 12 rewrites the boundary address stored in the control information storage unit 15.

制御情報格納部15に格納されている境界アドレスを書き換える際、第2プロセッサ12は書き換え用の境界アドレスとアクセスコードを取得する(ステップS21)。例えば、第2プロセッサ21は、バス16に接続された設定回路(不図示)から書き換え用の境界アドレスとアクセスコードを取得することができる。ここで、アクセスコードは、例えばユーザIDとパスワードである。   When the boundary address stored in the control information storage unit 15 is rewritten, the second processor 12 acquires the boundary address and access code for rewriting (step S21). For example, the second processor 21 can acquire a rewrite boundary address and access code from a setting circuit (not shown) connected to the bus 16. Here, the access code is, for example, a user ID and a password.

次に、第2プロセッサ12は、取得したアクセスコードの認証処理を実施する(ステップS22)。第2プロセッサ12は、保持するアクセスコードが正しいと判断した場合(ステップS23:Yes)、書き換え用の境界アドレスを用いて制御情報格納部15に格納されている境界アドレスを書き換える(ステップS24)。   Next, the second processor 12 performs an authentication process for the acquired access code (step S22). If the second processor 12 determines that the access code held is correct (step S23: Yes), the second processor 12 rewrites the boundary address stored in the control information storage unit 15 using the rewrite boundary address (step S24).

一方、第2プロセッサ12は、保持するアクセスコードが正しくないと判断した場合(ステップS23:No)、制御情報格納部15に格納されている境界アドレスを書き換えることなく境界アドレス書き換え処理を終了する(ステップS25)。   On the other hand, when the second processor 12 determines that the held access code is not correct (step S23: No), the second processor 12 ends the boundary address rewriting process without rewriting the boundary address stored in the control information storage unit 15 ( Step S25).

本発明の課題で説明したように、共有メモリを複数のプロセッサで共有しているデータ処理装置では、各プロセッサで実行するためのプログラムが共有メモリに格納されている。そして、プロセッサの中にセキュリティ性の高いプロセッサ(セキュアプロセッサ)が含まれている場合、セキュリティ性の高いプログラムが共有メモリに格納される。   As described in the problem of the present invention, in a data processing apparatus in which a shared memory is shared by a plurality of processors, a program to be executed by each processor is stored in the shared memory. If the processor includes a highly secure processor (secure processor), a highly secure program is stored in the shared memory.

特許文献1に開示されているマルチプロセッサ型コントローラでは、境界レジスタに境界アドレスを設定することで、各プロセッサがアクセス可能な共有メモリの領域を設定している。しかしながら、境界レジスタに設定される境界アドレスを容易に書き換えることができると、セキュアプロセッサ以外のプロセッサがセキュリティ性の高いプログラムにアクセスすることが可能となり、セキュアプロセッサを含むデータ処理装置のセキュリティ性が失われるという問題があった。特に、この問題はセキュアプロセッサ以外のプロセッサが脆弱性を有する場合に顕著となる。   In the multiprocessor controller disclosed in Patent Document 1, a shared memory area accessible by each processor is set by setting a boundary address in a boundary register. However, if the boundary address set in the boundary register can be easily rewritten, a processor other than the secure processor can access a highly secure program, and the security of the data processing apparatus including the secure processor is lost. There was a problem of being. In particular, this problem becomes significant when a processor other than the secure processor is vulnerable.

また、特許文献1に開示されているマルチプロセッサ型コントローラでは、電源投入時に初期化プログラムをプロセッサ間で共通に実行しており、全てのプロセッサが共有メモリに制限なくアクセスすることができる。このため、セキュリティ性の高いプログラムが共有メモリに格納されている場合、セキュアプロセッサ以外のプロセッサがセキュリティ性の高いプログラムにアクセス可能となり、セキュアプロセッサを含むデータ処理装置のセキュリティ性が失われるという問題があった。   Further, in the multiprocessor type controller disclosed in Patent Document 1, the initialization program is executed in common between the processors when the power is turned on, and all the processors can access the shared memory without restriction. For this reason, when a highly secure program is stored in the shared memory, a processor other than the secure processor can access the highly secure program, and the security of the data processing apparatus including the secure processor is lost. there were.

これに対して本実施の形態にかかるデータ処理装置では、制御情報格納部15に格納されている境界アドレスを書き換える際、セキュアプロセッサである第2プロセッサ12が認証処理を実施している。よって、制御情報格納部15に格納されている境界アドレスが不正に書き換えられることを抑制することができるため、セキュリティ性の高いデータ処理装置を提供することができる。つまり、境界アドレスが不正に書き換えられて、セキュリティ性が高いプログラムが格納されている第2メモリ領域のデータが不正に取得されることを抑制することができる。   On the other hand, in the data processing apparatus according to the present embodiment, when rewriting the boundary address stored in the control information storage unit 15, the second processor 12, which is a secure processor, performs an authentication process. Therefore, since it is possible to prevent the boundary address stored in the control information storage unit 15 from being rewritten illegally, it is possible to provide a data processing device with high security. That is, it is possible to prevent the boundary address from being rewritten illegally and the data in the second memory area in which the high security program is stored from being illegally acquired.

また、本実施の形態にかかるデータ処理装置では、アクセス制御回路14を設けることで、第1プロセッサ11がセキュリティ性の高い第2メモリ領域へアクセスすることを禁止することができる。よって、第1プロセッサ11に脆弱性が内在していても、第1プロセッサ11は共有メモリ13の第2メモリ領域にアクセスできないため、セキュアプロセッサである第2のプロセッサのセキュリティ性に影響を及ぼすことを抑制することができる。   Further, in the data processing apparatus according to the present embodiment, by providing the access control circuit 14, the first processor 11 can be prohibited from accessing the second memory area with high security. Therefore, even if the vulnerability is inherent in the first processor 11, the first processor 11 cannot access the second memory area of the shared memory 13, which affects the security of the second processor, which is a secure processor. Can be suppressed.

また、本実施の形態にかかるデータ処理装置では、同一のメモリ(物理的に単一のメモリ)で共有メモリ13を構成することができるので、各プロセッサに対応した独立したメモリを搭載する必要がないため、半導体チップの面積やコストを削減することができる。   Further, in the data processing apparatus according to the present embodiment, the shared memory 13 can be configured by the same memory (physically single memory), so it is necessary to mount independent memories corresponding to the respective processors. Therefore, the area and cost of the semiconductor chip can be reduced.

また、本実施の形態にかかるデータ処理装置では、制御情報格納部15に格納されている境界アドレスを正規のユーザが任意に書き換えることで、共有メモリ13の第1メモリ領域および第2メモリ領域の容量を変更することができる。よって、共有メモリのメモリ領域を効率よく利用することができる。   In the data processing apparatus according to the present embodiment, the legitimate user arbitrarily rewrites the boundary address stored in the control information storage unit 15, so that the first memory area and the second memory area of the shared memory 13 are rewritten. The capacity can be changed. Therefore, the memory area of the shared memory can be used efficiently.

以上で説明した本実施の形態にかかる発明により、セキュリティ性の高いデータ処理装置を提供することができる。   The invention according to the present embodiment described above can provide a data processing apparatus with high security.

<実施の形態2>
次に、本発明の実施の形態2について説明する。図6は、本実施の形態の形態にかかるデータ処理装置を示すブロック図である。本実施の形態の形態にかかるデータ処理装置20では、制御情報格納部25に境界アドレスおよび第2プロセッサ用リセットベクタ(RSV)が格納されている点、および共有メモリ23の第2メモリ領域に第2プロセッサ12を起動するためのプログラムが格納されている点が、実施の形態1で説明したデータ処理装置10と異なる。これ以外は、実施の形態1で説明したデータ処理装置10と同様であるので、同一の構成要素には同一の符号を付し、重複した説明は省略する。
<Embodiment 2>
Next, a second embodiment of the present invention will be described. FIG. 6 is a block diagram showing a data processing apparatus according to this embodiment. In the data processing device 20 according to the present embodiment, the boundary address and the second processor reset vector (RSV) are stored in the control information storage unit 25, and the second memory area of the shared memory 23 has the second memory area. The difference from the data processing apparatus 10 described in the first embodiment is that a program for starting the two-processor 12 is stored. Other than this, since it is the same as the data processing apparatus 10 described in the first embodiment, the same components are denoted by the same reference numerals, and redundant description is omitted.

図6に示すように、本実施の形態にかかるデータ処理装置20が備える制御情報格納部25は、境界アドレスと共に、第2プロセッサ用リセットベクタ(RSV)が格納されている。ここで、第2プロセッサ用リセットベクタは、第2プロセッサ12を起動する際、最初に実行されるプログラムが格納されている先頭アドレスを示している。   As shown in FIG. 6, the control information storage unit 25 included in the data processing device 20 according to the present embodiment stores a second processor reset vector (RSV) along with the boundary address. Here, the reset vector for the second processor indicates a head address in which a program to be executed first when the second processor 12 is activated is stored.

図7は、本実施の形態にかかるデータ処理装置が備える共有メモリ23のメモリ領域を説明するための図である。図7に示すように、共有メモリ23のアドレスadd_a〜add_bは第1メモリ領域に対応したアドレスであり、アドレスadd_b〜add_cは第2メモリ領域に対応したアドレスである。ここで、アドレスadd_bは、共有メモリ13の第1メモリ領域および第2メモリ領域の境界に対応する境界アドレスである。   FIG. 7 is a diagram for explaining a memory area of the shared memory 23 included in the data processing apparatus according to the present embodiment. As shown in FIG. 7, the addresses add_a to add_b of the shared memory 23 are addresses corresponding to the first memory area, and the addresses add_b to add_c are addresses corresponding to the second memory area. Here, the address add_b is a boundary address corresponding to the boundary between the first memory area and the second memory area of the shared memory 13.

図7に示す共有メモリ23では、各アドレスの大小関係はadd_a<add_b<add_cであり、境界アドレスadd_bは第2メモリ領域の先頭アドレスである。そして、本実施の形態にかかるデータ処理装置では、共有メモリ23の第2メモリ領域に、第2プロセッサ12を起動するためのプログラムが格納されている。この起動用プログラムの先頭アドレスは、リセットベクタに対応している。   In the shared memory 23 shown in FIG. 7, the size relationship between the addresses is add_a <add_b <add_c, and the boundary address add_b is the top address of the second memory area. In the data processing apparatus according to the present embodiment, a program for starting the second processor 12 is stored in the second memory area of the shared memory 23. The start address of this activation program corresponds to the reset vector.

本実施の形態にかかるデータ処理装置20では、第2プロセッサ12は、起動(再起動)する際に制御情報格納部25に格納されているリセットベクタを読み出す。そして、第2プロセッサ12は、起動用プログラムを読み出すために、リセットベクタで指定された共有メモリのアドレスとアクセス元を示すID情報をアクセス制御回路14に送信する。アクセス制御回路14は、アクセス元が第2プロセッサ12であり、アクセス先が第2メモリ領域(リセットベクタで指定されたアドレス)であるので、第2プロセッサ12の共有メモリ23へのアクセスを許可する。そして、第2プロセッサ12は、共有メモリ23から起動用プログラムを読み出して実行する。このような動作により、第2プロセッサ12が起動する。   In the data processing device 20 according to the present embodiment, the second processor 12 reads the reset vector stored in the control information storage unit 25 when starting (restarting). Then, the second processor 12 transmits the shared memory address specified by the reset vector and ID information indicating the access source to the access control circuit 14 in order to read the activation program. Since the access source is the second processor 12 and the access destination is the second memory area (address specified by the reset vector), the access control circuit 14 permits the second processor 12 to access the shared memory 23. . Then, the second processor 12 reads the activation program from the shared memory 23 and executes it. With this operation, the second processor 12 is activated.

また、本実施の形態にかかるデータ処理装置20では、制御情報格納部25に格納されているリセットベクタを書き換える際、第2プロセッサ12が認証処理を実施している。なお、制御情報格納部25に格納されているリセットベクタを書き換える際の動作については、図4および図5(実施の形態1参照)で説明した制御情報格納部15に格納されている境界アドレスを書き換える動作と同様であるので、重複した説明は省略する。   Further, in the data processing device 20 according to the present embodiment, when the reset vector stored in the control information storage unit 25 is rewritten, the second processor 12 performs an authentication process. For the operation when rewriting the reset vector stored in the control information storage unit 25, the boundary address stored in the control information storage unit 15 described in FIGS. 4 and 5 (see the first embodiment) is used. Since it is the same as the operation of rewriting, a duplicate description is omitted.

本実施の形態にかかるデータ処理装置では、制御情報格納部25に格納されているリセットベクタを書き換える際、セキュアプロセッサである第2プロセッサ12が認証処理を実施している。よって、制御情報格納部25に格納されているリセットベクタが不正に書き換えられることを抑制することができるため、セキュリティ性の高いデータ処理装置を提供することができる。また、制御情報格納部25にリセットベクタを格納することで、第2プロセッサ12を起動する際に共有メモリ23の第2メモリ領域に格納されているプログラムのみで動作を完結することができる。   In the data processing apparatus according to the present embodiment, when the reset vector stored in the control information storage unit 25 is rewritten, the second processor 12 that is a secure processor performs an authentication process. Therefore, since the reset vector stored in the control information storage unit 25 can be prevented from being rewritten illegally, a highly secure data processing apparatus can be provided. Further, by storing the reset vector in the control information storage unit 25, the operation can be completed with only the program stored in the second memory area of the shared memory 23 when the second processor 12 is activated.

以上で説明した本実施の形態にかかる発明により、セキュリティ性の高いデータ処理装置を提供することができる。   The invention according to the present embodiment described above can provide a data processing apparatus with high security.

<実施の形態3>
次に、本発明の実施の形態3について説明する。本実施の形態の形態にかかるデータ処理装置では、第2プロセッサ12が共有メモリ13の第1メモリ領域にアクセスできる点が、実施の形態1の場合と異なる。これ以外は、実施の形態1で説明したデータ処理装置10と同様であるので、同一の構成要素には同一の符号を付し、重複した説明は省略する。
<Embodiment 3>
Next, a third embodiment of the present invention will be described. The data processing apparatus according to the present embodiment is different from the first embodiment in that the second processor 12 can access the first memory area of the shared memory 13. Other than this, since it is the same as the data processing apparatus 10 described in the first embodiment, the same components are denoted by the same reference numerals, and redundant description is omitted.

図8は、アクセス制御回路14(図1参照)の動作を説明するためのフローチャートである。なお、以下では、各アドレスの大小関係がadd_a<add_b<add_cである場合を例として説明する。   FIG. 8 is a flowchart for explaining the operation of the access control circuit 14 (see FIG. 1). In the following, a case will be described as an example where the size relationship of each address is add_a <add_b <add_c.

第1プロセッサ11および第2プロセッサ12が共有メモリ13にアクセス要求(書き込み要求または読み出し要求)する際、第1プロセッサ11および第2プロセッサ12はアクセス先のアドレスとアクセス元を示すID情報を送信する。アクセス制御回路14は、第1プロセッサ11および第2プロセッサ12が送信したID情報に基づき、共有メモリ13へアクセスするプロセッサ(つまり、アクセス元)を判定する(ステップS31)。共有メモリ13へアクセスするプロセッサが第1プロセッサ11である場合(ステップS32:Yes)、第1プロセッサ11がアクセスするアクセス先のアドレスと境界アドレスadd_bとを比較する。そして、アクセス先のアドレスが境界アドレスadd_bよりも小さい場合(ステップS33:Yes)は、アクセス先のアドレスがアドレスadd_a〜add_bの範囲内(第1メモリ領域の範囲内)であるので、第1プロセッサ11の共有メモリ13(第1メモリ領域)へのアクセスを許可する(ステップS34)。一方、アクセス先のアドレスが境界アドレスadd_bよりも大きい(または、アクセス先のアドレスが境界アドレスadd_b以上である)場合(ステップS33:No)は、アクセス先のアドレスがアドレスadd_a〜add_bの範囲内(第1メモリ領域の範囲内)にないため、第1プロセッサ11の共有メモリ13へのアクセスを禁止する(ステップS35)。   When the first processor 11 and the second processor 12 make an access request (write request or read request) to the shared memory 13, the first processor 11 and the second processor 12 transmit access destination address and ID information indicating the access source. . The access control circuit 14 determines a processor (that is, an access source) that accesses the shared memory 13 based on the ID information transmitted by the first processor 11 and the second processor 12 (step S31). When the processor accessing the shared memory 13 is the first processor 11 (step S32: Yes), the access destination address accessed by the first processor 11 is compared with the boundary address add_b. When the access destination address is smaller than the boundary address add_b (step S33: Yes), since the access destination address is within the range of the addresses add_a to add_b (within the range of the first memory area), the first processor 11 is permitted to access the 11 shared memory 13 (first memory area) (step S34). On the other hand, when the access destination address is larger than the boundary address add_b (or the access destination address is greater than or equal to the boundary address add_b) (step S33: No), the access destination address is within the range of the addresses add_a to add_b ( Since it is not within the range of the first memory area, access to the shared memory 13 by the first processor 11 is prohibited (step S35).

また、共有メモリ13へアクセスするプロセッサが第1プロセッサ11でない場合(ステップS32:No)、つまり、共有メモリ13へアクセスするプロセッサが第2プロセッサ12である場合、第2プロセッサ12がアクセスするアクセス先のアドレスと境界アドレスadd_bとの比較結果にかかわらず、第2プロセッサ12の共有メモリ13(第1メモリ領域および第2メモリ領域)へのアクセスを許可する(ステップS36)。   If the processor accessing the shared memory 13 is not the first processor 11 (step S32: No), that is, if the processor accessing the shared memory 13 is the second processor 12, the access destination accessed by the second processor 12 Regardless of the comparison result between the first address and the boundary address add_b, the second processor 12 is permitted to access the shared memory 13 (first memory area and second memory area) (step S36).

本実施の形態にかかるデータ処理装置では、図9に示すように、第1プロセッサ11と第2プロセッサ12のアクセス範囲に差異を設けることができるため、より多様なデータ処理装置を構成することができる。また、共有メモリ13の第1メモリ領域および第2メモリ領域にアクセスすることができるプロセッサを、セキュアプロセッサである第2プロセッサ12に限定することで、データ処理装置のセキュリティ性を保つことができる。   In the data processing apparatus according to the present embodiment, as shown in FIG. 9, since the access ranges of the first processor 11 and the second processor 12 can be different, it is possible to configure more various data processing apparatuses. it can. Further, by limiting the processor that can access the first memory area and the second memory area of the shared memory 13 to the second processor 12 that is a secure processor, the security of the data processing device can be maintained.

<実施の形態4>
次に、本発明の実施の形態4について説明する。図10は、本実施の形態にかかるデータ処理装置を示すブロック図である。図10に示すデータ処理装置40では、プロセッサをN個(Nは3以上の整数)備えている点が、実施の形態1および2で説明したデータ処理装置と異なる。これ以外は、実施の形態1および2で説明したデータ処理装置と同様であるので、適宜、重複した説明は省略する。
<Embodiment 4>
Next, a fourth embodiment of the present invention will be described. FIG. 10 is a block diagram showing the data processing apparatus according to this embodiment. The data processing device 40 shown in FIG. 10 is different from the data processing device described in the first and second embodiments in that N processors are provided (N is an integer of 3 or more). Other than this, since it is the same as the data processing apparatus described in the first and second embodiments, a repeated description is omitted as appropriate.

図10に示すように、本実施の形態にかかるデータ処理装置40は、第1乃至第Nプロセッサ41_1〜41_N、共有メモリ43、アクセス制御回路44、制御情報格納部45、およびバス46を備える。第1乃至第Nプロセッサ41_1〜41_N、アクセス制御回路44、および制御情報格納部45は、バス46を介して互いに接続されている。また、共有メモリ43はアクセス制御回路44を介してバス46に接続されている。   As shown in FIG. 10, the data processing device 40 according to the present embodiment includes first to Nth processors 41_1 to 41_N, a shared memory 43, an access control circuit 44, a control information storage unit 45, and a bus 46. The first to Nth processors 41_1 to 41_N, the access control circuit 44, and the control information storage unit 45 are connected to each other via a bus 46. The shared memory 43 is connected to the bus 46 via the access control circuit 44.

第1乃至第Nプロセッサ41_1〜41_Nの構成および動作については、実施の形態1および2で説明した第1プロセッサおよび第2プロセッサと基本的に同様である。図10に示すデータ処理装置40では、セキュアプロセッサは第2プロセッサ41_2のみであるが、セキュアプロセッサの数は1つに限定されることはなく、これ以上であってもよい。   The configurations and operations of the first to Nth processors 41_1 to 41_N are basically the same as those of the first processor and the second processor described in the first and second embodiments. In the data processing device 40 shown in FIG. 10, the secure processor is only the second processor 41_2, but the number of secure processors is not limited to one and may be more.

共有メモリ43は、第1プロセッサ41_1がアクセス可能な第1メモリ領域、第2プロセッサ41_2がアクセス可能な第2メモリ領域、第Nプロセッサ41_Nがアクセス可能な第Nメモリ領域を備える。共有メモリ43についても、実施の形態1および2で説明した共有メモリと基本的に同様である。   The shared memory 43 includes a first memory area accessible by the first processor 41_1, a second memory area accessible by the second processor 41_2, and an Nth memory area accessible by the Nth processor 41_N. The shared memory 43 is basically the same as the shared memory described in the first and second embodiments.

図11は、本実施の形態にかかるデータ処理装置40が備える共有メモリ43のメモリ領域を説明するための図である。図11に示すように、共有メモリ43のアドレスadd_a〜add_b_1は第1メモリ領域に対応したアドレスであり、アドレスadd_b_1〜add_b_2は第2メモリ領域に対応したアドレスであり、アドレスadd_b_2〜add_b_3は第3メモリ領域に対応したアドレスであり、アドレスadd_b_N−1〜add_b_cは第Nメモリ領域に対応したアドレスである。ここで、アドレスadd_b_1〜add_b_N−1は、共有メモリ43の各メモリ領域の境界に対応する境界アドレスである。   FIG. 11 is a diagram for explaining a memory area of the shared memory 43 provided in the data processing device 40 according to the present embodiment. As shown in FIG. 11, the addresses add_a to add_b_1 of the shared memory 43 are addresses corresponding to the first memory area, the addresses add_b_1 to add_b_2 are addresses corresponding to the second memory area, and the addresses add_b_2 to add_b_3 are the third addresses. Addresses corresponding to the memory area, and addresses add_b_N-1 to add_b_c are addresses corresponding to the Nth memory area. Here, the addresses add_b_1 to add_b_N−1 are boundary addresses corresponding to the boundaries of the memory areas of the shared memory 43.

アクセス制御回路44は、境界アドレスに応じて第1乃至第Nプロセッサ41_1〜41_Nからの共有メモリ43へのアクセスを制御する。つまり、アクセス制御回路44は、共有メモリ43のアクセス先のアドレスと境界アドレスadd_b_1〜add_b_N−1との比較結果に応じて、第1乃至第Nプロセッサ41_1〜41_Nからの共有メモリ43へのアクセスを制御することができる。これにより、アクセス制御回路44は、共有メモリ43のメモリ領域を第1乃至第Nメモリ領域に論理的に分割することができる。アクセス制御回路44についても、実施の形態1および2で説明したアクセス制御回路と基本的に同様である。   The access control circuit 44 controls access to the shared memory 43 from the first to Nth processors 41_1 to 41_N according to the boundary address. In other words, the access control circuit 44 accesses the shared memory 43 from the first to Nth processors 41_1 to 41_N according to the comparison result between the access destination address of the shared memory 43 and the boundary addresses add_b_1 to add_b_N-1. Can be controlled. Thereby, the access control circuit 44 can logically divide the memory area of the shared memory 43 into the first to Nth memory areas. The access control circuit 44 is basically the same as the access control circuit described in the first and second embodiments.

制御情報格納部45は、共有メモリ43の第1乃至第Nメモリ領域の境界に対応する境界アドレスadd_b_1〜add_b_N−1を格納している。また、制御情報格納部45は、第2乃至第Nプロセッサ用リセットベクタ(RSV)を格納している。境界アドレスadd_b_1〜add_b_N−1およびリセットベクタは、第1乃至第Nプロセッサ41_1〜41_Nのいずれかが任意のタイミングで書き換えることができる。このように、境界アドレスadd_b_1〜add_b_N−1を書き換えることで、第1乃至第Nメモリ領域の範囲を任意に変更することができる。また、本実施の形態にかかるデータ処理装置では、制御情報格納部45に格納されている境界アドレスやリセットベクタを書き換える際、セキュアプロセッサである第2プロセッサ41_2が認証処理を実施する。なお、本実施の形態にかかるデータ処理装置40では、制御情報格納部45がN−1個のリセットベクタを備える場合について説明したが、リセットベクタの数は任意に決定することができる。   The control information storage unit 45 stores boundary addresses add_b_1 to add_b_N−1 corresponding to the boundaries of the first to Nth memory areas of the shared memory 43. The control information storage unit 45 stores second to Nth processor reset vectors (RSV). Any one of the first to Nth processors 41_1 to 41_N can rewrite the boundary addresses add_b_1 to add_b_N-1 and the reset vector at any timing. As described above, the range of the first to Nth memory areas can be arbitrarily changed by rewriting the boundary addresses add_b_1 to add_b_N-1. In the data processing apparatus according to the present embodiment, when rewriting the boundary address and the reset vector stored in the control information storage unit 45, the second processor 41_2, which is a secure processor, performs an authentication process. In the data processing device 40 according to the present embodiment, the case where the control information storage unit 45 includes N−1 reset vectors has been described. However, the number of reset vectors can be arbitrarily determined.

制御情報格納部45に格納されている境界アドレスは、バス46を介してアクセス制御回路44に出力される。例えば、制御情報格納部45は、境界アドレスが書き換えられるタイミング毎に、アクセス制御回路44に境界アドレスを出力する。これにより、アクセス制御回路44は最新の境界アドレスを保持することができる。   The boundary address stored in the control information storage unit 45 is output to the access control circuit 44 via the bus 46. For example, the control information storage unit 45 outputs the boundary address to the access control circuit 44 every time the boundary address is rewritten. Thereby, the access control circuit 44 can hold the latest boundary address.

また、本実施の形態にかかるデータ処理装置40では、第2乃至第Nプロセッサ41_2〜41_Nは、起動(再起動)する際に制御情報格納部45に格納されているリセットベクタを読み出す。これにより、第2乃至第Nプロセッサ41_2〜41_Nは、共有メモリ43から各々の起動用プログラムを読み出して実行することができる。   Further, in the data processing device 40 according to the present embodiment, the second to Nth processors 41_2 to 41_N read the reset vector stored in the control information storage unit 45 when starting (restarting). As a result, the second to Nth processors 41_2 to 41_N can read and execute each startup program from the shared memory 43.

なお、本実施の形態にかかるデータ処理装置40の動作、つまり第1乃至第Nプロセッサ41_1〜41_Nが共有メモリ43にアクセスする場合の動作、並びに制御情報格納部45に格納されている境界アドレスおよびリセットベクタを書き換える場合の動作については、実施の形態1および2で説明した場合と同様であるので重複した説明は省略する。   The operation of the data processing device 40 according to the present embodiment, that is, the operation when the first to Nth processors 41_1 to 41_N access the shared memory 43, the boundary address stored in the control information storage unit 45, and Since the operation when rewriting the reset vector is the same as that described in the first and second embodiments, a duplicate description is omitted.

以上で説明した本実施の形態にかかるデータ処理装置により、プロセッサを多数搭載した場合であっても、各々のプロセッサに対応したメモリ領域を備えたデータ処理装置を提供することができる。また、以上で説明した本実施の形態にかかる発明により、セキュリティ性の高いデータ処理装置を提供することができる。   Even if a large number of processors are installed, the data processing apparatus according to the present embodiment described above can provide a data processing apparatus having a memory area corresponding to each processor. In addition, according to the invention according to the present embodiment described above, a data processing apparatus with high security can be provided.

<実施の形態5>
次に、本発明の実施の形態5について説明する。図12は、本実施の形態にかかるデータ処理装置を示すブロック図である。図12に示すデータ処理装置50では、共有メモリ53が制御情報格納部55を備えている点が実施の形態1で説明したデータ処理装置と異なる。これ以外は、実施の形態1で説明したデータ処理装置と同様であるので、適宜、重複した説明は省略する。
<Embodiment 5>
Next, a fifth embodiment of the present invention will be described. FIG. 12 is a block diagram showing the data processing apparatus according to this embodiment. The data processing device 50 shown in FIG. 12 is different from the data processing device described in the first embodiment in that the shared memory 53 includes a control information storage unit 55. Other than this, the data processing apparatus is the same as that described in the first embodiment, and thus redundant description will be omitted as appropriate.

図12に示すように、本実施の形態にかかるデータ処理装置50は、第1プロセッサ51、第2プロセッサ52、制御情報格納部55を含む共有メモリ53、アクセス制御回路54、およびバス56を備える。第1プロセッサ51、第2プロセッサ52、およびアクセス制御回路54は、バス56を介して互いに接続されている。また、共有メモリ53はアクセス制御回路54を介してバス56に接続されている。   As shown in FIG. 12, the data processing device 50 according to the present embodiment includes a first processor 51, a second processor 52, a shared memory 53 including a control information storage unit 55, an access control circuit 54, and a bus 56. . The first processor 51, the second processor 52, and the access control circuit 54 are connected to each other via a bus 56. The shared memory 53 is connected to the bus 56 via the access control circuit 54.

第1プロセッサ51および第2プロセッサ52の構成および動作については、実施の形態1で説明した第1プロセッサ11および第2プロセッサ12と基本的に同様である。   The configurations and operations of the first processor 51 and the second processor 52 are basically the same as those of the first processor 11 and the second processor 12 described in the first embodiment.

共有メモリ53は、第1プロセッサ51がアクセス可能な第1メモリ領域と、第2プロセッサ52がアクセス可能な第2メモリ領域と、制御情報格納部55とを備える。第1メモリ領域には第1プロセッサ51で実行されるプログラムが格納されている。第2メモリ領域には第2プロセッサ52で実行されるプログラムが格納されている。ここで、第2プロセッサ52はセキュアプロセッサで構成されているので、第2メモリ領域にはセキュリティ性が高いプログラムが格納されている。   The shared memory 53 includes a first memory area accessible by the first processor 51, a second memory area accessible by the second processor 52, and a control information storage unit 55. A program executed by the first processor 51 is stored in the first memory area. A program executed by the second processor 52 is stored in the second memory area. Here, since the second processor 52 is composed of a secure processor, a program with high security is stored in the second memory area.

共有メモリ53は、例えば同一のメモリ(物理的に単一のメモリ)で構成されており、第1メモリ領域、第2メモリ領域、および制御情報格納部55は、境界アドレスを用いて領域が分割されている。また、共有メモリ53は、例えばフラッシュメモリを用いて構成することができる。   The shared memory 53 is composed of, for example, the same memory (physically single memory), and the first memory area, the second memory area, and the control information storage unit 55 are divided into areas using boundary addresses. Has been. The shared memory 53 can be configured using, for example, a flash memory.

共有メモリ53が備える制御情報格納部55は、共有メモリ53の第1メモリ領域、第2メモリ領域、および制御情報格納部55の領域の各々の境界に対応する境界アドレスを格納する。境界アドレスは、第1プロセッサ51または第2プロセッサ52が任意のタイミングで書き換えることができる。このように、境界アドレスを書き換えることで、第1メモリ領域、第2メモリ領域、制御情報格納部55の領域の範囲を任意に変更することができる。また、本実施の形態にかかるデータ処理装置では、制御情報格納部55に格納されている境界アドレスを書き換える際、セキュアプロセッサである第2プロセッサ52が認証処理を実施する。   The control information storage unit 55 provided in the shared memory 53 stores boundary addresses corresponding to the boundaries of the first memory area, the second memory area, and the control information storage unit 55 of the shared memory 53. The boundary address can be rewritten at any timing by the first processor 51 or the second processor 52. As described above, by rewriting the boundary address, the ranges of the first memory area, the second memory area, and the area of the control information storage unit 55 can be arbitrarily changed. Further, in the data processing apparatus according to the present embodiment, when rewriting the boundary address stored in the control information storage unit 55, the second processor 52, which is a secure processor, performs an authentication process.

制御情報格納部55に格納されている境界アドレスは、アクセス制御回路54に出力される。例えば、制御情報格納部55は、境界アドレスが書き換えられるタイミング毎に、アクセス制御回路54に境界アドレスを出力する。これにより、アクセス制御回路54は最新の境界アドレスを保持することができる。   The boundary address stored in the control information storage unit 55 is output to the access control circuit 54. For example, the control information storage unit 55 outputs the boundary address to the access control circuit 54 every time the boundary address is rewritten. Thereby, the access control circuit 54 can hold the latest boundary address.

図13は、本実施の形態にかかるデータ処理装置が備える共有メモリ53のメモリ領域を説明するための図である。図13に示すように、共有メモリ53のアドレスadd_a〜add_b_1は第1メモリ領域に対応したアドレスであり、アドレスadd_b_1〜add_b_2は第2メモリ領域に対応したアドレスであり、アドレスadd_b_2〜add_b_cは制御情報格納部55に対応したアドレスである。ここで、アドレスadd_b_1、add_b_2は、共有メモリ53の第1メモリ領域、第2メモリ領域、および制御情報格納部55の領域の境界に対応する境界アドレスである。   FIG. 13 is a diagram for explaining a memory area of the shared memory 53 provided in the data processing apparatus according to the present embodiment. As shown in FIG. 13, the addresses add_a to add_b_1 of the shared memory 53 are addresses corresponding to the first memory area, the addresses add_b_1 to add_b_2 are addresses corresponding to the second memory area, and the addresses add_b_2 to add_b_c are control information. The address corresponds to the storage unit 55. Here, the addresses add_b_1 and add_b_2 are boundary addresses corresponding to the boundary between the first memory area, the second memory area, and the control information storage unit 55 in the shared memory 53.

図13に示す共有メモリ53では、各アドレスの大小関係がadd_a<add_b_1<add_b_2<add_cであってもよく、また、add_a>add_b_1>add_b_2>add_cであってもよい。各アドレスの大小関係がadd_a<add_b_1<add_b_2<add_cである場合、例えば、境界アドレスadd_b_1は第2メモリ領域の先頭アドレス、境界アドレスadd_b_2は制御情報格納部55の先頭アドレスとすることができる。また、各アドレスの大小関係がadd_a>add_b_1>add_b_2>add_cである場合、例えば、境界アドレスadd_b_1は第1メモリ領域の先頭アドレス、境界アドレスadd_b_2は第2メモリ領域の先頭アドレスとすることができる。   In the shared memory 53 illustrated in FIG. 13, the size relationship between the addresses may be add_a <add_b_1 <add_b_2 <add_c, or add_a> add_b_1> add_b_2> add_c. When the size relationship between the addresses is add_a <add_b_1 <add_b_2 <add_c, for example, the boundary address add_b_1 can be the start address of the second memory area, and the boundary address add_b_2 can be the start address of the control information storage unit 55. In addition, when the size relationship of each address is add_a> add_b_1> add_b_2> add_c, for example, the boundary address add_b_1 can be the start address of the first memory area, and the boundary address add_b_2 can be the start address of the second memory area.

アクセス制御回路54は、境界アドレスに応じて第1プロセッサ51および第2プロセッサ52からの共有メモリ53へのアクセスを制御する。つまり、アクセス制御回路54は、共有メモリ53のアクセス先のアドレスと境界アドレスadd_b_1、add_b_2との比較結果に応じて、第1プロセッサ51および第2プロセッサ52からの共有メモリ53へのアクセスを制御することができる。これにより、アクセス制御回路54は、共有メモリ53のメモリ領域を第1メモリ領域、第2メモリ領域、および制御情報格納部55に論理的に分割することができる。   The access control circuit 54 controls access to the shared memory 53 from the first processor 51 and the second processor 52 according to the boundary address. That is, the access control circuit 54 controls access to the shared memory 53 from the first processor 51 and the second processor 52 in accordance with the comparison result between the access destination address of the shared memory 53 and the boundary addresses add_b_1 and add_b_2. be able to. Thereby, the access control circuit 54 can logically divide the memory area of the shared memory 53 into the first memory area, the second memory area, and the control information storage unit 55.

例えば、境界アドレスadd_b_1よりも小さいアドレスの領域を第1メモリ領域と、境界アドレスadd_b_1よりも大きく境界アドレスadd_b_2よりも小さいアドレスの領域を第2メモリ領域と、境界アドレスadd_b_2よりも大きいアドレスの領域を制御情報格納部55とした場合(add_a<add_b_1<add_b_2<add_c)、アクセス制御回路54は、次のように第1プロセッサ51および第2プロセッサ52からの共有メモリ53へのアクセスを制御する。   For example, an area having an address smaller than the boundary address add_b_1 is a first memory area, an area having an address larger than the boundary address add_b_1 and smaller than the boundary address add_b_2 is a second memory area, and an area having an address larger than the boundary address add_b_2. When the control information storage unit 55 is used (add_a <add_b_1 <add_b_2 <add_c), the access control circuit 54 controls access to the shared memory 53 from the first processor 51 and the second processor 52 as follows.

アクセス制御回路54は、共有メモリ53へのアクセス元が第1プロセッサ51であり、アクセス先のアドレスが境界アドレスadd_b_1よりも小さい場合、第1プロセッサ51が第1メモリ領域にアクセスすることを許可する。また、アクセス制御回路54は、共有メモリ53へのアクセス元が第2プロセッサ52であり、アクセス先のアドレスが境界アドレスadd_b_1よりも大きく境界アドレスadd_b_2よりも小さい場合(または、アクセス先のアドレスが境界アドレスadd_b以上で境界アドレスadd_b_2よりも小さい場合)、第2プロセッサ52が第2メモリ領域にアクセスすることを許可する。   The access control circuit 54 permits the first processor 51 to access the first memory area when the access source to the shared memory 53 is the first processor 51 and the access destination address is smaller than the boundary address add_b_1. . The access control circuit 54 also accesses the shared memory 53 when the access source is the second processor 52 and the access destination address is larger than the boundary address add_b_1 and smaller than the boundary address add_b_2 (or the access destination address is a boundary). When the address add_b is equal to or greater than the boundary address add_b_2), the second processor 52 is permitted to access the second memory area.

また、アクセス制御回路54は、アクセス先のアドレスが境界アドレスadd_b_2よりも大きい場合、第1プロセッサ51および第2プロセッサ52が制御情報格納部55にアクセスすることを許可する。つまり、第1プロセッサ51および第2プロセッサ52は、制御情報格納部55に格納されている境界アドレスを書き換える際に、共有メモリ53の制御情報格納部55に対応するアドレスをアクセス制御回路54に出力することで、制御情報格納部55にアクセスすることができる。   The access control circuit 54 permits the first processor 51 and the second processor 52 to access the control information storage unit 55 when the access destination address is larger than the boundary address add_b_2. That is, when the first processor 51 and the second processor 52 rewrite the boundary address stored in the control information storage unit 55, the address corresponding to the control information storage unit 55 of the shared memory 53 is output to the access control circuit 54. As a result, the control information storage unit 55 can be accessed.

なお、本実施の形態にかかるデータ処理装置50の動作、つまり第1プロセッサ51および第2プロセッサ52が共有メモリ53にアクセスする場合の動作、および制御情報格納部55に格納されている境界アドレスを書き換える場合の動作については、実施の形態1で説明した場合と同様であるので重複した説明は省略する。また、本実施の形態にかかる発明は、実施の形態2乃至4にかかる発明と、適宜、組み合わせることができる。   The operation of the data processing device 50 according to the present embodiment, that is, the operation when the first processor 51 and the second processor 52 access the shared memory 53, and the boundary address stored in the control information storage unit 55 are shown. Since the operation in the case of rewriting is the same as that described in the first embodiment, a duplicate description is omitted. Further, the invention according to the present embodiment can be appropriately combined with the inventions according to the second to fourth embodiments.

本実施の形態にかかるデータ処理装置では、第1メモリ領域、第2メモリ領域、および制御情報格納部を同一のメモリ(物理的に単一のメモリ)で構成することができるので、半導体チップの面積を削減することができる。   In the data processing apparatus according to the present embodiment, the first memory area, the second memory area, and the control information storage unit can be configured by the same memory (physically single memory). The area can be reduced.

<実施の形態6>
次に、本発明の実施の形態6について説明する。実施の形態6では、実施の形態2で説明したデータ処理装置20の使用例について説明する。本実施の形態では、データ処理装置20を使用者Aおよび使用者Bが使用する場合の一例について説明する。
<Embodiment 6>
Next, a sixth embodiment of the present invention will be described. In the sixth embodiment, a usage example of the data processing device 20 described in the second embodiment will be described. In the present embodiment, an example in which the data processor 20 is used by the user A and the user B will be described.

本実施の形態では、図6に示すデータ処理装置20の第1プロセッサ11をメインプロセッサとし、第2プロセッサ12をセキュアプロセッサとし、共有メモリ23の第1メモリ領域をメイン領域とし、第2メモリ領域をセキュア領域としている。   In the present embodiment, the first processor 11 of the data processing device 20 shown in FIG. 6 is a main processor, the second processor 12 is a secure processor, the first memory area of the shared memory 23 is a main area, and the second memory area is Is a secure area.

図14は、本発明にかかるデータ処理装置20の使用例を説明するための図であり、初期状態における共有メモリ23のメモリ領域と制御情報格納部25の状態を示している。初期状態では、共有メモリ23のメモリ領域は全てメイン領域に設定されており、セキュア領域は設定されていない。このとき、制御情報格納部25には、境界アドレスおよび第2プロセッサ用リセットベクタとして、共有メモリ23の最上位アドレスadd_cがそれぞれ設定されている。   FIG. 14 is a diagram for explaining a usage example of the data processing device 20 according to the present invention, and shows the memory area of the shared memory 23 and the state of the control information storage unit 25 in the initial state. In the initial state, the memory area of the shared memory 23 is all set as the main area, and the secure area is not set. At this time, in the control information storage unit 25, the highest address add_c of the shared memory 23 is set as the boundary address and the second processor reset vector.

図15は、本発明にかかるデータ処理装置20の使用例を説明するための図であり、初期状態のデータ処理装置を使用者Aが使用した際の、共有メモリ23のメモリ領域と制御情報格納部25の状態を示している。使用者Aは、初期状態のデータ処理装置を使用する場合、メインプロセッサ(第1プロセッサ)用のメインプログラムコードAを、共有メモリ23のメイン領域の最下位アドレスadd_aから書き込む。また、セキュアプロセッサ(第2プロセッサ)用のセキュアプログラムコードAを、共有メモリ23の最上位アドレスadd_cから書き込む。ここで、セキュアプログラムコードAが書き込まれるセキュリティ領域へのアクセスは、使用者Aのセキュリティ性が保証されたシステムのみが許可される。   FIG. 15 is a diagram for explaining an example of use of the data processing device 20 according to the present invention. When the user A uses the data processing device in the initial state, the memory area of the shared memory 23 and storage of control information are shown. The state of the unit 25 is shown. When using the data processor in the initial state, the user A writes the main program code A for the main processor (first processor) from the lowest address add_a in the main area of the shared memory 23. Further, the secure program code A for the secure processor (second processor) is written from the highest address add_c of the shared memory 23. Here, access to the security area in which the secure program code A is written is permitted only to a system in which the security of the user A is guaranteed.

このとき、境界アドレスは、使用者AのセキュアプログラムコードAを格納している領域の最下位アドレスadd_b_1とすることができる。これにより、使用者AのセキュアプログラムコードAを格納している領域add_b_1〜add_cをセキュア領域とすることができる。また、第2プロセッサ用リセットベクタは、使用者AのセキュアプログラムコードAを格納している領域の最下位アドレスadd_b_1とすることができる。これにより、セキュアプロセッサ(第2プロセッサ)は、使用者AのセキュアプログラムコードAからフェッチを開始することができる。また、使用者AのメインプログラムコードAは、メイン領域のadd_a〜add_d_1に格納されている。   At this time, the boundary address can be the lowest address add_b_1 of the area storing the secure program code A of the user A. As a result, the areas add_b_1 to add_c storing the secure program code A of the user A can be set as secure areas. The second processor reset vector can be the lowest address add_b_1 of the area storing the secure program code A of the user A. Thereby, the secure processor (second processor) can start fetching from the secure program code A of the user A. The main program code A of the user A is stored in add_a to add_d_1 in the main area.

図16は、本発明にかかるデータ処理装置20の使用例を説明するための図であり、使用者Aのプログラムコードが格納されたデータ処理装置20に、更に、使用者Bが使用者Bのプログラムコードを格納した場合のメモリ領域と制御情報格納部25の状態を示している。使用者Bは、データ処理装置を使用する場合、メインプロセッサ(第1プロセッサ)用のメインプログラムコードBを、共有メモリ23のメイン領域のアドレスadd_d_1から書き込む。このとき、メインプログラムコードBが書き込まれている領域より上位のアドレス(アドレスadd_d_2より上位のアドレスの領域)はブランクとなる。また、セキュアプロセッサ(第2プロセッサ)用のセキュアプログラムコードBを、共有メモリ23のアドレスadd_b_1の次のアドレスから書き込む。ここで、セキュアプログラムコードBが書き込まれるセキュリティ領域へのアクセスは、使用者Bのセキュリティ性が保証されたシステムのみが許可される。   FIG. 16 is a diagram for explaining an example of use of the data processing device 20 according to the present invention. In addition to the data processing device 20 storing the program code of the user A, the user B is the user B's The memory area and the state of the control information storage unit 25 when the program code is stored are shown. When using the data processing apparatus, the user B writes the main program code B for the main processor (first processor) from the address add_d_1 in the main area of the shared memory 23. At this time, the address higher than the area where the main program code B is written (the area of the address higher than the address add_d_2) is blank. Further, the secure program code B for the secure processor (second processor) is written from the address next to the address add_b_1 in the shared memory 23. Here, access to the security area in which the secure program code B is written is permitted only to a system in which the security of the user B is guaranteed.

このとき、境界アドレスは、使用者BのセキュアプログラムコードBを格納している領域の最下位アドレスadd_b_2とすることができる。これにより、使用者AのセキュアプログラムコードAを格納している領域add_b_1〜add_c、および使用者BのセキュアプログラムコードBを格納している領域add_b_2〜add_b_1をセキュア領域とすることができる。   At this time, the boundary address can be the lowest address add_b_2 of the area storing the secure program code B of the user B. Accordingly, the areas add_b_1 to add_c storing the secure program code A of the user A and the areas add_b_2 to add_b_1 storing the secure program code B of the user B can be set as secure areas.

なお、第2プロセッサ用リセットベクタは、使用者AのセキュアプログラムコードAを格納している領域の最下位アドレスadd_b_1のままであるので、セキュアプロセッサ(第2プロセッサ)は、使用者AのセキュアプログラムコードAからフェッチを開始することができる。   Since the second processor reset vector remains the lowest address add_b_1 of the area storing the user A's secure program code A, the secure processor (second processor) is the user A's secure program. Fetch can be started from code A.

以上で説明した使用例により、使用者AのセキュアプログラムコードAと使用者BのセキュアプログラムコードBを、共有メモリ23のセキュア領域に別々に格納することができる。すなわち、複数の使用者間で相互に干渉することなく、共有メモリのセキュア領域を使用することができる。このセキュア領域はメインプロセッサ(第1プロセッサ)によるアクセスが禁止されている領域であるので、メインプロセッサが何らかの理由により脆弱性を有している場合であっても、セキュアプログラムコードA、Bが影響を受けることを抑制することができる。   According to the use example described above, the secure program code A of the user A and the secure program code B of the user B can be stored separately in the secure area of the shared memory 23. That is, the secure area of the shared memory can be used without interfering with each other among a plurality of users. Since this secure area is an area where access by the main processor (first processor) is prohibited, the secure program codes A and B are affected even if the main processor is vulnerable for some reason. Can be suppressed.

なお、上記使用例では、境界アドレスを境に、共有メモリ23の上位アドレス側をセキュア領域、下位アドレス側をメイン領域としているが、セキュア領域とメイン領域の配置は任意に決定することができる。例えば、境界アドレスを境に、共有メモリ23の下位アドレス側をセキュア領域、上位アドレス側をメイン領域としてもよい。また、本実施の形態では、実施の形態2で説明したデータ処理装置20の使用例について説明したが、他の実施の形態(実施の形態1、3〜5)で説明したデータ処理装置についても適用することができる。   In the above usage example, with the boundary address as the boundary, the upper address side of the shared memory 23 is the secure area and the lower address side is the main area. However, the arrangement of the secure area and the main area can be arbitrarily determined. For example, with the boundary address as the boundary, the lower address side of the shared memory 23 may be the secure area and the upper address side may be the main area. Further, in the present embodiment, the usage example of the data processing device 20 described in the second embodiment has been described. However, the data processing device described in the other embodiments (the first and third embodiments) is also described. Can be applied.

以上、本発明を上記実施形態に即して説明したが、上記実施形態の構成にのみ限定されるものではなく、本願特許請求の範囲の請求項の発明の範囲内で当業者であればなし得る各種変形、修正、組み合わせを含むことは勿論である。   Although the present invention has been described with reference to the above embodiment, the present invention is not limited to the configuration of the above embodiment, and can be made by those skilled in the art within the scope of the invention of the claims of the claims of the present application. It goes without saying that various modifications, corrections, and combinations are included.

10 データ処理装置
11 第1プロセッサ
12 第2プロセッサ
13 共有メモリ
14 アクセス制御回路
15 制御情報格納部
16 バス
DESCRIPTION OF SYMBOLS 10 Data processor 11 1st processor 12 2nd processor 13 Shared memory 14 Access control circuit 15 Control information storage part 16 Bus

Claims (12)

第1プロセッサと、
セキュリティ機能を備えた第2プロセッサと、
前記第1プロセッサがアクセス可能な第1メモリ領域と、前記第2プロセッサがアクセス可能な第2メモリ領域とを備えた共有メモリと、
前記共有メモリの前記第1メモリ領域および前記第2メモリ領域の境界に対応するアドレスである境界アドレスを格納可能な制御情報格納部と、
前記境界アドレスに応じて前記第1プロセッサおよび前記第2プロセッサからの前記共有メモリへのアクセスを制御するアクセス制御回路と、を備え、
前記制御情報格納部に格納されている前記境界アドレスを書き換える際、前記第2プロセッサが認証処理を実施する、
データ処理装置。
A first processor;
A second processor having a security function;
A shared memory comprising a first memory area accessible by the first processor and a second memory area accessible by the second processor;
A control information storage unit capable of storing a boundary address that is an address corresponding to a boundary between the first memory area and the second memory area of the shared memory;
An access control circuit for controlling access to the shared memory from the first processor and the second processor according to the boundary address,
When rewriting the boundary address stored in the control information storage unit, the second processor performs an authentication process;
Data processing device.
前記制御情報格納部に格納されている前記境界アドレスを書き換える際、前記第1プロセッサは書き換え用の境界アドレスとアクセスコードを取得し、
前記第2プロセッサは、前記第1プロセッサが取得した前記アクセスコードの認証処理を実施し、
前記第2プロセッサが前記アクセスコードが正しいと判断した場合、前記第1プロセッサは前記書き換え用の境界アドレスを用いて前記制御情報格納部に格納されている前記境界アドレスを書き換える、
請求項1に記載のデータ処理装置。
When rewriting the boundary address stored in the control information storage unit, the first processor acquires a boundary address and an access code for rewriting,
The second processor performs an authentication process of the access code acquired by the first processor,
When the second processor determines that the access code is correct, the first processor rewrites the boundary address stored in the control information storage unit using the rewrite boundary address;
The data processing apparatus according to claim 1.
前記制御情報格納部に格納されている前記境界アドレスを書き換える際、前記第2プロセッサは、書き換え用の境界アドレスとアクセスコードを取得し、当該取得したアクセスコードの認証処理を実施し、当該アクセスコードが正しいと判断した場合、前記書き換え用の境界アドレスを用いて前記制御情報格納部に格納されている前記境界アドレスを書き換える、
請求項1に記載のデータ処理装置。
When rewriting the boundary address stored in the control information storage unit, the second processor acquires the boundary address and access code for rewriting, performs authentication processing of the acquired access code, and executes the access code. Is rewritten, the boundary address stored in the control information storage unit is rewritten using the rewrite boundary address.
The data processing apparatus according to claim 1.
前記アクセス制御回路は、前記共有メモリのアクセス先のアドレスと前記境界アドレスとの比較結果に応じて、前記第1プロセッサおよび前記第2プロセッサからの前記共有メモリへのアクセスを制御する、請求項1乃至3のいずれか一項に記載のデータ処理装置。   The access control circuit controls access to the shared memory from the first processor and the second processor in accordance with a comparison result between an access destination address of the shared memory and the boundary address. The data processing device according to any one of claims 1 to 3. 前記境界アドレスよりも小さいアドレスの領域を前記第1メモリ領域と、前記境界アドレスよりも大きいアドレスの領域を前記第2メモリ領域とした場合、前記アクセス制御回路は、前記共有メモリへのアクセス元が前記第1プロセッサであり、前記アクセス先のアドレスが前記境界アドレスよりも小さい場合、前記第1プロセッサが前記第1メモリ領域にアクセスすることを許可する、請求項1乃至4のいずれか一項に記載のデータ処理装置。   When the area having an address smaller than the boundary address is the first memory area, and the area having an address larger than the boundary address is the second memory area, the access control circuit can determine whether the access source to the shared memory is 5. The first processor according to claim 1, wherein the first processor permits the first processor to access the first memory area when the access destination address is smaller than the boundary address. 6. The data processing apparatus described. 前記アクセス制御回路は、前記共有メモリへのアクセス元が前記第2プロセッサであり、前記アクセス先のアドレスが前記境界アドレスよりも大きい場合、前記第2プロセッサが前記第2メモリ領域にアクセスすることを許可する、請求項5に記載のデータ処理装置。   The access control circuit is configured such that when the access source to the shared memory is the second processor and the access destination address is larger than the boundary address, the second processor accesses the second memory area. 6. The data processing apparatus according to claim 5, wherein the data processing is permitted. 前記境界アドレスよりも大きいアドレスの領域を前記第1メモリ領域と、前記境界アドレスよりも小さいアドレスの領域を前記第2メモリ領域とした場合、前記アクセス制御回路は、前記共有メモリへのアクセス元が前記第1プロセッサであり、前記アクセス先のアドレスが前記境界アドレスよりも大きい場合、前記第1プロセッサが前記第1メモリ領域にアクセスすることを許可する、請求項1乃至4のいずれか一項に記載のデータ処理装置。   When the area having an address larger than the boundary address is the first memory area, and the area having an address smaller than the boundary address is the second memory area, the access control circuit can determine whether the access source to the shared memory is 5. The first processor according to claim 1, wherein the first processor permits the first processor to access the first memory area when the access destination address is larger than the boundary address. 6. The data processing apparatus described. 前記アクセス制御回路は、前記共有メモリへのアクセス元が前記第2プロセッサであり、前記アクセス先のアドレスが前記境界アドレスよりも小さい場合、前記第2プロセッサが前記第2メモリ領域にアクセスすることを許可する、請求項7に記載のデータ処理装置。   The access control circuit is configured such that when the access source to the shared memory is the second processor and the access destination address is smaller than the boundary address, the second processor accesses the second memory area. 8. The data processing apparatus according to claim 7, wherein the data processing is permitted. 前記制御情報格納部には更に、前記第2プロセッサを起動するためのプログラムが格納されている先頭アドレスを示すリセットベクタが格納されており、
前記制御情報格納部に格納されている前記リセットベクタを書き換える際、前記第2プロセッサが認証処理を実施する、
請求項1乃至8のいずれか一項に記載のデータ処理装置。
The control information storage unit further stores a reset vector indicating a head address in which a program for starting the second processor is stored,
When rewriting the reset vector stored in the control information storage unit, the second processor performs an authentication process;
The data processing apparatus according to any one of claims 1 to 8.
前記第1メモリ領域に前記第2プロセッサがアクセス可能に構成されている、請求項1乃至9のいずれか一項に記載のデータ処理装置。   The data processing apparatus according to any one of claims 1 to 9, wherein the second processor is configured to be accessible to the first memory area. 前記データ処理装置はN個のプロセッサを備え、
前記共有メモリは、前記N個のプロセッサに対応して設けられ、当該N個のプロセッサが各々アクセス可能なN個のメモリ領域を備え、
前記制御情報格納部には、前記N個のメモリ領域の境界に対応するアドレスであるN−1個の境界アドレス情報が格納されており、
前記アクセス制御回路は、前記N個のプロセッサのそれぞれが、前記N個のプロセッサのそれぞれに対応したメモリ領域にのみアクセスするように制御する、
請求項1に記載のデータ処理装置。
The data processing device includes N processors,
The shared memory is provided corresponding to the N processors, and includes N memory areas that can be accessed by the N processors,
The control information storage unit stores N-1 boundary address information, which is an address corresponding to a boundary of the N memory areas,
The access control circuit controls each of the N processors to access only a memory area corresponding to each of the N processors.
The data processing apparatus according to claim 1.
前記制御情報格納部および前記共有メモリが同一のメモリで構成されている、請求項1乃至11のいずれか一項に記載のデータ処理装置。
The data processing apparatus according to any one of claims 1 to 11, wherein the control information storage unit and the shared memory are configured by the same memory.
JP2012015650A 2012-01-27 2012-01-27 Data processor Pending JP2013156760A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2012015650A JP2013156760A (en) 2012-01-27 2012-01-27 Data processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2012015650A JP2013156760A (en) 2012-01-27 2012-01-27 Data processor

Publications (1)

Publication Number Publication Date
JP2013156760A true JP2013156760A (en) 2013-08-15

Family

ID=49051894

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2012015650A Pending JP2013156760A (en) 2012-01-27 2012-01-27 Data processor

Country Status (1)

Country Link
JP (1) JP2013156760A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017211980A (en) * 2016-05-20 2017-11-30 ルネサスエレクトロニクス株式会社 Semiconductor device and memory access control method thereof

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017211980A (en) * 2016-05-20 2017-11-30 ルネサスエレクトロニクス株式会社 Semiconductor device and memory access control method thereof

Similar Documents

Publication Publication Date Title
US10324864B2 (en) Storage system and method for performing and authenticating write-protection thereof
US11615035B2 (en) Storage system and method for performing and authenticating write-protection thereof
JP4939382B2 (en) Information processing apparatus and program execution control method thereof
US7444668B2 (en) Method and apparatus for determining access permission
TWI570589B (en) Apparatus for providing trusted computing
US8443181B2 (en) Processor boot security device and methods thereof
CN110457236B (en) Storage system and method for executing and verifying write protection of storage system
JP4939387B2 (en) Data processing apparatus and address space protection method
US11126565B2 (en) Encrypted memory access using page table attributes
JP6916454B2 (en) Key thread ownership for hardware-accelerated cryptography
JP5911835B2 (en) Information processing device
JP4945053B2 (en) Semiconductor device, bus interface device, and computer system
US20170032126A1 (en) Information processing device, controller and method of controlling information processing device
US10708061B2 (en) Secure key storage for multi-core processor
JP2009157542A (en) Information processing apparatus and method of updating stack pointer
US20160092375A1 (en) Data access protection for computer systems
WO2020063975A1 (en) Partition protection method and apparatus for non-volatile memory
JP2014081819A (en) Information processing apparatus
JP2020042341A (en) Processing device and software execution control method
JP2023047278A (en) Seamless access to trusted domain protected memory by virtual machine manager using transformer key identifier
JP2013156760A (en) Data processor
JP2015171008A (en) Information processor, control method for information processor, and program
JP6668908B2 (en) Information processing system, transmitting apparatus, and control method for information processing system
JP5324676B2 (en) Processor, bus interface device, and computer system
JP5380392B2 (en) Semiconductor device, bus interface device, and computer system