JP2009271597A - Processor - Google Patents
Processor Download PDFInfo
- Publication number
- JP2009271597A JP2009271597A JP2008119065A JP2008119065A JP2009271597A JP 2009271597 A JP2009271597 A JP 2009271597A JP 2008119065 A JP2008119065 A JP 2008119065A JP 2008119065 A JP2008119065 A JP 2008119065A JP 2009271597 A JP2009271597 A JP 2009271597A
- Authority
- JP
- Japan
- Prior art keywords
- address
- attribute
- information
- processor
- memory
- 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
- 230000015654 memory Effects 0.000 claims abstract description 48
- 238000012544 monitoring process Methods 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 11
- 230000007257 malfunction Effects 0.000 description 4
- 238000001514 detection method Methods 0.000 description 3
- 238000007726 management method Methods 0.000 description 2
- 101100165337 Arabidopsis thaliana BHLH103 gene Proteins 0.000 description 1
- 101100084169 Arabidopsis thaliana PRE2 gene Proteins 0.000 description 1
- 241000700605 Viruses Species 0.000 description 1
- 230000002411 adverse Effects 0.000 description 1
- 238000000034 method Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000005855 radiation Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Classifications
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02D—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
- Y02D10/00—Energy efficient computing, e.g. low power processors, power management or thermal management
Landscapes
- Storage Device Security (AREA)
Abstract
Description
本発明は、プロセッサに関し、特に、メモリへのアクセスを監視するメモリ保護装置を有するプロセッサに関する。 The present invention relates to a processor, and more particularly to a processor having a memory protection device that monitors access to a memory.
従来より、プロセッサ又はマルチプロセッサでは、複数のプログラムが並列に実行され、それら複数のプログラムの間において1つのメモリを共有している場合がある。例えば、ユーザインターフェースプログラム又はオペレーティングシステム(以下、OSという)が動作するホストプロセッサと、オーディオデータ又はビデオデータ等を処理するアプリケーションプログラムが動作するアプリケーションプロセッサとが、それぞれ1つのSDRAMを共有して動作している場合等である。 Conventionally, in a processor or a multiprocessor, a plurality of programs are executed in parallel, and one memory may be shared among the plurality of programs. For example, a host processor that operates a user interface program or an operating system (hereinafter referred to as an OS) and an application processor that operates an application program that processes audio data, video data, etc. share one SDRAM and operate. This is the case.
1つのメモリが、各プロセッサ上において実行されるプログラムによりアクセスされる場合、例えば、あるプログラムが誤って別のプログラム又はOSのプログラム領域又はスタック領域を書きつぶす、あるいは、意図的に、別のプログラム又はOSのプログラム又はデータを無許可で使用する等の誤動作、即ち、メモリへのアクセス違反が発生することがある。 When one memory is accessed by a program executed on each processor, for example, one program mistakenly writes another program or the program area or stack area of the OS, or another program intentionally. Alternatively, a malfunction such as unauthorized use of an OS program or data, that is, a memory access violation may occur.
このような誤動作が発生する原因としては、プログラムのバグ、ソフトエラー、意図的な攻撃等があり得る。プログラムのバグとは、例えば、スタックオーバーフロー、ポインタの付け換えミス、プロセッサ間又はプログラム間の仕様又は取り決めの勘違い、開発時に購入又は導入したソフトウエアIPの動作不良等である。ソフトエラーとは、例えば、宇宙からの放射線によりメモリ内の情報が書き換えられる場合等である。意図的な攻撃とは、例えば、製品化後、ユーザがダウンロードしたプログラムに悪意的なウイルスが混入されている場合等である。 Possible causes of such malfunctions include program bugs, soft errors, and intentional attacks. Program bugs include, for example, stack overflow, misplacement of pointers, misunderstanding of specifications or arrangements between processors or programs, and malfunction of software IP purchased or introduced during development. A soft error is, for example, a case where information in a memory is rewritten by radiation from space. The intentional attack is, for example, a case where a malicious virus is mixed in a program downloaded by a user after commercialization.
そこで、このような誤動作を監視する装置として、メモリ保護装置が知られている。このメモリ保護装置は、あるプログラムのメモリへのアクセスを監視し、メモリへのアクセス違反をした場合には、他のタスクに悪影響を及ぼさないようにする装置である。このメモリ保護装置は、予め各領域に書き込み可、実行可等の属性を定義しておくと、属性違反のアクセスに対し、アクセス実行前に、例外またはトラップを発生する。このメモリ保護装置は、メモリマネージメントユニット(MMU)にマージされる場合もある。 Therefore, a memory protection device is known as a device for monitoring such a malfunction. This memory protection device is a device that monitors the access of a certain program to the memory and prevents any other task from being adversely affected if a memory access violation occurs. If this memory protection device defines attributes such as writable and executable in each area in advance, an exception or a trap is generated before the access is executed for an attribute violation access. This memory protection device may be merged into a memory management unit (MMU).
このようなメモリ保護装置として、プログラムのロード、実行、停止、終了を監視するプログラム制御部と、その属性を生成してプログラム毎に属性領域に登録するプログラム領域生成部と、実行中のプログラムのメモリアクセスをプログラム単位でチェックするアクセスチェック機構とを有するメモリ属性管理方式が提案されている(例えば、特許文献1参照)。 As such a memory protection device, a program control unit that monitors load, execution, stop, and termination of a program, a program area generation unit that generates an attribute and registers it in the attribute area for each program, and a program being executed A memory attribute management method having an access check mechanism for checking memory access in units of programs has been proposed (see, for example, Patent Document 1).
しかし、このようなメモリ保護装置は、アドレス情報及び属性情報を保持するためにレジスタを使用する。レジスタは、回路規模が大きく、また、レジスタにアドレス情報及び属性情報を設定する際には、それらの設定のタイミングの制御も困難であり、消費電力を増大するという問題がある。
そこで、本発明は、レジスタに保持されるアドレス情報及び属性情報の一部を組み合わせ回路により予め定数値として設定することにより、回路規模を削減し、設定のタイミングの制御を容易にし、かつ、消費電力を低減することができるプロセッサを提供することを目的とする。 Therefore, the present invention reduces the circuit scale, facilitates the control of the setting timing, and consumes a part of the address information and attribute information held in the register by setting them as constant values in advance by the combinational circuit. It is an object of the present invention to provide a processor capable of reducing power.
本発明の一態様によれば、バスに接続されるプロセッサコアと、前記プロセッサコアに設けられ、前記プロセッサコアにおいてプログラムが実行されることにより、前記バスを介してメモリへアクセスするときにおける前記メモリのアドレス及び前記プロセッサコアにおいて実行される前記プログラムの命令の属性を監視し、監視して得られたアドレス及び属性と、予め設定された複数のアドレス及び複数の属性との比較を行い、前記監視して得られたアドレスのビット列の全体或いは一部のビット列及び属性と、前記予め設定されたアドレスのビット列の全体或いは一部のビット列及び属性とが一致しないときに、アドレス違反又は属性違反の例外を発生し、前記プロセッサコアに前記例外の発生を通知するユニットであって、前記予め設定された複数のアドレスと複数の属性の一部は、前記プロセッサコアを介してレジスタに設定され、前記予め設定された複数のアドレスと複数の属性の他の一部は、組み合わせ回路により出力されるメモリ保護部と、を有することを特徴とするプロセッサを提供することができる。 According to one aspect of the present invention, a processor core connected to a bus, and the memory provided in the processor core and accessing the memory via the bus by executing a program in the processor core The address and attribute of the program executed in the processor core are compared, and the address and attribute obtained by monitoring are compared with a plurality of preset addresses and attributes, and the monitoring is performed. When the whole or part of the bit string and attribute of the address bit string obtained in this way does not match the whole or part of the bit string and attribute of the preset address, an exception of address violation or attribute violation And a unit for notifying the processor core of the occurrence of the exception, The plurality of addresses and some of the plurality of attributes are set in a register through the processor core, and the other parts of the plurality of preset addresses and the plurality of attributes are output by a combinational circuit. It is possible to provide a processor including a memory protection unit.
本発明のプロセッサによれば、レジスタに保持されるアドレス情報及び属性情報の一部を組み合わせ回路により予め定数値として設定することにより、回路規模を削減し、設定のタイミングの制御を容易にし、かつ、消費電力を低減することができる。 According to the processor of the present invention, part of the address information and attribute information held in the register is set in advance as a constant value by the combinational circuit, thereby reducing the circuit scale, facilitating the control of the setting timing, and , Power consumption can be reduced.
以下、図面を参照して本発明の実施の形態を詳細に説明する。
まず、図1から図3に基づいて、本発明の一実施の形態に係るプロセッサの構成を説明する。図1は、本実施の形態に係るプロセッサの全体構成を示すブロック図である。
Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
First, the configuration of a processor according to an embodiment of the present invention will be described with reference to FIGS. FIG. 1 is a block diagram showing an overall configuration of a processor according to the present embodiment.
図1に示すように、プロセッサ1は、プロセッサコア(以下、コアという)11a及び11bと、メモリ保護装置(以下、APU(Address Protection Unit)という)12a及び12bと、バス13と、共有メモリとしてのメモリ14とを有して、1チップの半導体装置として構成されている。なお、本実施の形態では、2つのコアを有しているが、1つのコア、或いは、3つ以上のコアを有していてもよい。
As shown in FIG. 1, the processor 1 includes processor cores (hereinafter referred to as cores) 11a and 11b, memory protection devices (hereinafter referred to as APU (Address Protection Unit)) 12a and 12b, a
コア11a及び11bは、バス13を介してメモリ14と接続されている。APU12a及び12bは、それぞれコア11a及び11bからのメモリへのアクセスを監視する。詳しく言うと、APU12aは、コア11aにおいてプログラムが実行されることにより、バス13を介してメモリ14へアクセスするときにおけるメモリ14のアドレス、及びコア11aにおいて実行されるプログラムの命令の属性を監視する。同様に、APU12bは、コア11bにおいてプログラムが実行されることにより、バス13を介してメモリ14へアクセスするときにおけるメモリ14のアドレス、及びコア11bにおいて実行されるプログラムの命令の属性を監視する。
The
ここで、命令の属性とは、実行されるプログラムがアクセスするメモリ領域のアドレスに対する読み出し(R)、書き込み(W)等の命令の種類、優先度等の情報である。 Here, the attribute of the instruction is information such as the type of instruction such as read (R) and write (W), the priority, etc. with respect to the address of the memory area accessed by the program to be executed.
なお、メモリ14は、チップの外部にあってもよい。また、プロセッサ1は、図1において点線で示すように、コア11a及び11bにそれぞれローカルメモリ15a及び15bを有する構成にしてもよい。
Note that the memory 14 may be outside the chip. Further, the processor 1 may be configured to have
ここで、コア11a、11bとAPU12a、12bの構成について、コア11a及びAPU12aの構成により説明する。図2は、コアとAPUの構成を示すブロック図である。
Here, the configuration of the
図2に示すように、APU12aは、アドレス/属性比較部16を有して構成されている。アドレス/属性比較部16は、後述する複数のアドレス/属性設定部を有しており、この複数のアドレス/属性設定部の一部は、設定可能であり、他の一部は、固定である。コア11aは、設定プログラムによって、APU12aのアドレス/属性比較部16にアドレス情報SAD及び属性情報SATを設定する。APU12aには、バス13のアドレスバスへのアドレス情報ADが入力されると共に、コア11aから、その入力されるアドレス情報ADに対応する属性情報IDが入力される。APU12aは、アドレス情報AD及び属性情報IDと設定プログラムを介して設定されたアドレス情報SAD及び属性情報SATを比較し、アドレス違反又は属性違反がある場合、例外信号EXを発生し、発生した例外信号EXをコア11aに出力する。即ち、APU12aは、アドレス違反又は属性違反に対して例外信号EXを発生し、発生した例外信号EXをコア11aに通知するユニットである。
As shown in FIG. 2, the APU 12 a includes an address /
具体的には、APU12は、入力されるアドレスのビット列の全体或いは一部のビット列と、設定プログラムを介して設定されたアドレスのビット列の全体或いは一部のビット列が一致した場合で、その一致したアドレスにおいて、入力される属性と、設定プログラムを介して設定された属性とが一致しないときに、属性違反の例外信号EXを発生する。ここで、アドレスの一部のビット列とは、アドレスの所定の上位ビット部分である。これは、入力されたアドレスが、設定されたメモリの領域に含まれているか否かは、その領域の範囲を示す上位ビット部分が一致するか否かにより判定することができるからである。よって、そのような場合は、アドレスの全てを比較する必要がない。例えば、1キロバイトの領域毎に、属性を指定している場合には、アドレスの内、下位10ビットは比較する必要がない。即ち、アドレスの内、下位10ビットをマスクし、所定の上位ビットだけを比較することになる。 Specifically, the APU 12 matches the whole or part of the bit string of the input address with the whole or part of the bit string of the address set through the setting program. An attribute violation exception signal EX is generated when the input attribute does not match the attribute set through the setting program at the address. Here, the partial bit string of the address is a predetermined upper bit portion of the address. This is because whether or not the input address is included in the set memory area can be determined based on whether or not the upper bit portion indicating the range of the area matches. Therefore, in such a case, it is not necessary to compare all of the addresses. For example, if an attribute is specified for each 1 kilobyte area, it is not necessary to compare the lower 10 bits of the address. That is, the lower 10 bits of the address are masked, and only predetermined upper bits are compared.
ここで、アドレス違反とは、バス13のアドレスバスへのアドレス情報IDと、設定プログラムを介して設定されたアドレス情報SADあるいは後述する予め定数値として出力されるアドレス情報とが一致しないことをいう。また、属性違反とは、入力されるアドレス情報ADに対応する属性情報IDと、設定プログラムを介して設定された属性情報SATあるいは後述する予め定数値として出力される属性情報とが一致しないことをいう。
Here, the address violation means that the address information ID to the address bus of the
次に、APU12aの詳細な構成について説明する。図3は、APUの詳細な構成を示すブロック図である。
Next, a detailed configuration of the
図3に示すように、APU12aは、コア11aとのインターフェースであるコアインターフェース(以下、コアI/Fという)21と、アドレス/属性比較部16と、OR回路22とを有して構成されている。なお、コアI/F21及びOR回路22は、コア11a内にあってもよい。
As shown in FIG. 3, the APU 12a includes a core interface (hereinafter referred to as a core I / F) 21, which is an interface with the
アドレス/属性比較部16は、比較部41及び比較部42を有して構成されている。比較部41は、アドレス/属性設定部51と、イネーブル信号設定部(以下、ENという)52と、アドレス比較部53と、属性比較部54と、AND回路55とを有して構成されている。比較部42は、アドレス/属性設定部61と、EN62と、アドレス比較部63と、属性比較部64と、AND回路65とを有して構成されている。
The address /
コア11aからの設定情報は、プログラムが使用するメモリ領域のアドレス情報SADと、このメモリ領域の属性情報SATである。コア11aからの設定情報は、コアI/F21を介して、アドレス/属性設定部51に出力され、設定される。更に、コアI/F21を介して、コア11aは、EN52及びEN62にイネーブル情報を出力し、設定可能となっている。
The setting information from the
アドレス/属性設定部51は、複数のレジスタからなるレジスタ群により構成されており、コアI/F21からのアドレス情報SADと属性情報SATとを保持する。ここでは、アドレス情報としては、開始アドレスと、終了アドレスと、サイズと、無効領域の各情報であり、属性情報としては、読み出し(R)、書き込み(W)、実行(Ex)、キャッシュ(C)及び優先度等の情報である。これらの各情報の全てが、アドレス/属性設定部51に設定されなくてもよく、必要な情報だけが設定されてもよい。
The address /
アドレス/属性設定部51は、コアI/F21を介して設定されたアドレス情報AD1をアドレス比較部53に出力し、同様に、コアI/F21を介して設定された属性情報ID1を属性比較部54に出力する。アドレス比較部53は、バス13のアドレスバスへのアドレス情報ADと、アドレス/属性設定部51からのアドレス情報AD1とを比較し、比較結果を属性比較部54に出力する。
The address /
属性比較部54は、コア11aからの属性情報IDと、アドレス/属性設定部51からの属性情報AD1とを比較し、比較結果をAND回路55に出力する。なお、属性情報IDは、コアI/F21を介して、属性比較部54に入力されてもよい。AND回路55は、属性比較部54の出力とEN52の出力とのAND演算を行い、AND演算が行われた演算結果をOR回路22に出力する。
The
一方、アドレス/属性設定部61は、組み合わせ回路により構成されており、動的に変更する必要のないアドレス情報と属性情報とを予め定数値として出力されるように構成されている。組み合わせ回路は、入力信号によって、出力信号が一義的に決まる回路であり、所定の電圧を印加することにより所定の出力を得ることができる。アドレス/属性設定部61から出力されるアドレス情報及び属性情報は、上述したアドレス/属性設定部51が保持しているアドレス情報及び属性情報と同一の信号形式である。アドレス/属性設定部61は、組み合わせ回路により予め定数値の信号として出力されるアドレス情報AD2をアドレス比較部63に出力し、同様に、組み合わせ回路により予め定数値の信号として出力される属性情報ID2を属性比較部64に出力する。アドレス比較部63は、バス13のアドレスバスへのアドレス情報ADと、アドレス/属性設定部61からのアドレス情報AD2とを比較し、比較結果を属性比較部64に出力する。
On the other hand, the address /
属性比較部64は、コア11aからの属性情報IDと、アドレス/属性設定部61からの属性情報ID2とを比較し、比較結果をAND回路65に出力する。AND回路65は、属性比較部64の出力とEN62の出力とのAND演算を行い、AND演算が行われた演算結果をOR回路22に出力する。
The
OR回路22は、AND回路55及びAND回路65のそれぞれから出力される演算結果に対してOR演算を行い、OR演算が行われた演算結果をコア11aに出力する。即ち、この演算結果は、例外信号EXとして、APU12aからコア11aに出力される。
The OR
具体的には、APU12は、入力されるアドレスのビット列の全体或いは一部のビット列と、設定プログラムを介して設定されたアドレスのビット列の全体或いは一部のビット列が一致した場合で、その一致したアドレスにおいて、入力される属性と、設定プログラムを介して設定された属性とが一致しないときに、属性違反の例外信号EXを発生する。
Specifically, the
ここで、レジスタにアドレス情報及び属性情報を設定するプログラムについて説明する。図4は、レジスタにアドレス情報及び属性情報を設定するプログラムの例を説明するための説明図である。 Here, a program for setting address information and attribute information in a register will be described. FIG. 4 is an explanatory diagram for explaining an example of a program for setting address information and attribute information in a register.
図4に示すように、プログラム71には、OS、ユーザインターフェース、アプリケーションA、アプリケーションB等のプログラムが格納されている。また、プログラム71には、矢印72及び矢印73により示す斜線の領域が存在し、この領域には、アドレス/属性設定部51のレジスタ群にアドレス情報及び属性情報を設定するための命令が格納されている。矢印72の示す斜線の領域には、アプリケーションA用のアドレス情報及び属性情報を設定するための命令が格納され、矢印73の示す斜線の領域には、アプリケーションB用のアドレス情報及び属性情報を設定するための命令が格納されている。
As shown in FIG. 4, the program 71 stores programs such as an OS, a user interface, an application A, and an application B. Further, the program 71 has a hatched area indicated by
即ち、コア11aは、アプリケーションAを実行する前に矢印72の示す斜線の領域に格納されている命令を実行することにより、アプリケーションA用のアドレス情報及び属性情報をアドレス/属性設定部51に設定することができる。
That is, the
同様に、コア11aは、アプリケーションBを実行する前に矢印73の示す斜線の領域に格納されている命令を実行することにより、アプリケーションB用のアドレス情報及び属性情報をアドレス/属性設定部51に設定することができる。
Similarly, the
本実施の形態では、レジスタに保持されるアドレス情報及び属性情報の一部を組み合わせ回路により予め定数値として設定すること特徴としている。例えば、アプリケーションプログラムあるいはタスク等のアドレス情報及び属性情報は、アプリケーション毎にメモリの使用領域等が異なるため、プログラムを介してレジスタに設定する。一方、ユーザインターフェースプログラムあるいはタスク及びOS等のアドレス情報及び属性情報は、メモリの使用領域等が変更されないため、組み合わせ回路により予め定数値として設定する。 This embodiment is characterized in that part of address information and attribute information held in a register is set in advance as a constant value by a combinational circuit. For example, address information and attribute information such as application programs or tasks are set in a register via a program because the memory usage area and the like differ for each application. On the other hand, address information and attribute information such as user interface programs or tasks and OSs are set in advance as constant values by a combinational circuit because the memory use area and the like are not changed.
次に、このように構成される実施の形態の動作について説明する。
まず、コア11aからメモリ保護のためのアドレス情報SAD及び属性情報SATがAPU12aに出力される。コア11aから出力されたアドレス情報SAD及び属性情報SATは、コアI/F21を介して、アドレス/属性設定部51のレジスタにより構成される所定の領域に設定させる。
Next, the operation of the embodiment configured as described above will be described.
First, address information SAD and attribute information SAT for memory protection are output from the
アドレス/属性設定部51からは、レジスタに設定されたアドレス情報AD1及び属性情報ID1が、それぞれアドレス比較部53及び属性比較部54に出力される。アドレス比較部53では、バス13のアドレスバスへのアドレス情報ADとアドレス/属性設定部51からのアドレス情報AD1とが比較され、アドレス違反があるか否かが検出される。このアドレス違反があるか否かを示す検出結果は、属性比較部54に出力される。
From the address /
属性比較部54では、コア11aからの属性情報IDとアドレス/属性設定部51からの属性情報ID1とが比較され、属性違反があるか否かが検出される。属性比較部54では、アドレス違反又は属性違反が検出された場合、1がAND回路55に出力され、アドレス違反又は属性違反が検出されない場合、0がAND回路55に出力される。また、EN52からは、イネーブルが有効な場合、1がAND回路55に出力され、イネーブルが無効な場合、0がAND回路55に出力される。AND回路55は、属性比較部54の出力とEN52からの出力とのAND演算を行う。即ち、AND回路55からは、アドレス違反又は属性違反が検出され、かつ、イネーブルが有効な場合のみ、1がOR回路22に出力される。
The
一方、アドレス/属性設定部61からは、組み合わせ回路により予め定数値として保持されているアドレス情報AD2及び属性情報ID2が、それぞれアドレス比較部63及び属性比較部64に出力される。アドレス比較部63では、バス13のアドレスバスへのアドレス情報ADとアドレス/属性設定部61からのアドレス情報AD2とが比較され、アドレス違反があるか否かが検出される。このアドレス違反があるか否かを示す検出結果は、属性比較部64に出力される。
On the other hand, the address /
属性比較部64では、コア11aからの属性情報IDとアドレス/属性設定部61からの属性情報ID2とが比較され、属性違反があるか否かが検出される。属性比較部64では、アドレス違反又は属性違反が検出された場合、1がAND回路65に出力され、アドレス違反又は属性違反が検出されない場合、0がAND回路65に出力される。また、EN62からは、イネーブルが有効な場合、1がAND回路65に出力され、イネーブルが無効な場合、0がAND回路65に出力される。AND回路65は、属性比較部64の出力とEN62からの出力とのAND演算を行う。即ち、AND回路65からは、アドレス違反又は属性違反が検出され、かつ、イネーブルが有効な場合のみ、1がOR回路22に出力される。
The
OR回路22では、AND回路55の出力とAND回路65の出力とのOR演算が行われる。AND回路55又はAND回路65のいずれか一方の出力が1の場合、OR回路22から1が出力される。即ち、比較部41又は比較部42のいずれかにおいて、アドレス違反又は属性違反が検出されると、OR演算の結果が1となり、OR回路22から例外の発生を通知する例外信号EXが、コア11aに出力される。
In the
EN52及びEN62のそれぞれから出力されるイネーブル信号は、比較部41及び比較部42の制御を行うための信号であり、これらのイネーブル信号を制御することにより、対応する比較部の比較結果を有効又は無効にすることができる。
The enable signals output from each of EN52 and EN62 are signals for controlling the
以上のように、レジスタに保持されるアドレス情報及び属性情報の一部を組み合わせ回路により予め定数値として設定するようにした。この結果、レジスタにより構成されていた領域を組み合わせ回路にすることにより、回路規模を削減できると共に、レジスタにアドレス情報及び属性情報を設定する際には、設定のタイミングの制御を容易にし、消費電力の低減をすることができる。 As described above, part of the address information and attribute information held in the register is set in advance as a constant value by the combinational circuit. As a result, the circuit area can be reduced by combining the area configured by the register into a combinational circuit, and when setting address information and attribute information in the register, the setting timing can be easily controlled, and power consumption can be reduced. Can be reduced.
よって、本実施の形態のプロセッサによれば、レジスタに保持されるアドレス情報及び属性情報の一部を組み合わせ回路により予め定数値として設定することにより、回路規模を削減し、設定のタイミングの制御を容易にし、かつ、消費電力を低減することができる。 Therefore, according to the processor of the present embodiment, part of the address information and attribute information held in the register is set in advance as a constant value by the combinational circuit, thereby reducing the circuit scale and controlling the setting timing. It is easy and power consumption can be reduced.
(応用例1)
次に、本実施の形態の応用例1について説明する。上述した実施の形態では、比較部41のアドレス/属性設定部51がレジスタにより構成され、比較部42のアドレス/属性設定部61が組み合わせ回路により構成されている例について説明したが、応用例1では、アドレス/属性設定部内の一部がレジスタにより構成され、他の一部が組み合わせ回路に構成されている例について説明する。なお、応用例1に係るプロセッサの構成は、図1及び図2と同様のため説明を省略する。
(Application 1)
Next, application example 1 of the present embodiment will be described. In the above-described embodiment, the example in which the address /
図5は、本実施の形態の応用例1に係るAPUの構成を示すブロック図である。図5において図3と同一の構成要素は、同一符号を付して説明を省略する。 FIG. 5 is a block diagram showing a configuration of an APU according to application example 1 of the present embodiment. In FIG. 5, the same components as those of FIG.
図5に示すAPU12a1は、図3のアドレス/属性設定部51及びアドレス/属性設定部61に代わり、それぞれアドレス/属性設定部51a及びアドレス/属性設定部61aを用いて構成されている。
The APU 12a1 shown in FIG. 5 is configured using an address /
アドレス/属性設定部51aでは、アドレス情報が組み合わせ回路により予め定数値として設定され、属性情報がコアI/F21を介して設定される構成になっている。このように設定されたアドレス情報は、アドレス比較部53に出力され、属性情報は属性比較部54に出力される。
In the address /
同様に、アドレス/属性設定部61aでは、アドレス情報が組み合わせ回路により予め定数値として設定され、属性情報がコアI/F21を介して設定される構成になっている。このように設定されたアドレス情報は、アドレス比較部63に出力され、属性情報は属性比較部64に出力される。その他の構成及び動作は、上述した実施の形態と同様なため説明を省略する。
Similarly, in the address /
以上のように、応用例1に係るAPU12a1は、アドレス情報を組み合わせ回路、属性情報をレジスタにより構成するようにした。この結果、レジスタにより構成されていた領域を組合せ回路にすることにより、回路規模を削減できると共に、レジスタにアドレス情報及び属性情報を設定する際には、設定のタイミングの設定を容易にし、消費電力を低減することができる。 As described above, the APU 12a1 according to the application example 1 is configured by combining address information with a combinational circuit and attribute information with a register. As a result, it is possible to reduce the circuit scale by making the area configured by the register a combinational circuit, and when setting the address information and attribute information in the register, the setting timing can be easily set, and the power consumption can be reduced. Can be reduced.
よって、応用例1のプロセッサによれば、上述した実施の形態と同様に、レジスタに保持されるアドレス情報及び属性情報の一部を組み合わせ回路により予め定数値として設定することにより、回路規模を削減し、設定のタイミングの制御を容易にし、かつ、消費電力を低減することができる。 Therefore, according to the processor of the application example 1, as in the above-described embodiment, a part of the address information and attribute information held in the register is set in advance as a constant value by the combinational circuit, thereby reducing the circuit scale. In addition, the setting timing can be easily controlled and the power consumption can be reduced.
なお、アドレス情報の全てを組み合わせ回路により構成しているが、アドレス情報の一部を組み合わせ回路により構成し、アドレス情報の他の一部をレジスタにより構成してもよい。また、アドレス情報の全てをレジスタにより構成し、属性情報の全てを組み合わせ回路により構成してもよい。或いは、属性情報の一部を組み合わせ回路により構成し、属性情報の他の一部をレジスタにより構成してもよい。 Although all of the address information is configured by a combinational circuit, a part of the address information may be configured by a combinational circuit, and the other part of the address information may be configured by a register. Alternatively, all of the address information may be configured by a register, and all of the attribute information may be configured by a combinational circuit. Alternatively, part of the attribute information may be configured by a combinational circuit, and the other part of the attribute information may be configured by a register.
(応用例2)
次に、本実施の形態の応用例2について説明する。上述した実施の形態では、比較部41及び42の2つの比較部を有する構成の例について説明したが、応用例2では、8つの比較部を有する構成の例について説明する。なお、応用例2に係るプロセッサの構成は、図1及び図2と同様のため説明を省略する。
(Application example 2)
Next, application example 2 of the present embodiment will be described. In the above-described embodiment, an example of a configuration having two
図6は、本実施の形態の応用例2に係るAPUの構成を示すブロック図である。図6において図3と同一の構成要素は、同一の符号を付して説明を省略する。 FIG. 6 is a block diagram showing a configuration of an APU according to application example 2 of the present embodiment. In FIG. 6, the same components as those in FIG.
図6に示すAPU12a2は、図3のアドレス/属性比較部16に代わり、アドレス/属性比較部16aを用いて構成されている。
The APU 12a2 shown in FIG. 6 is configured using an address / attribute comparison unit 16a instead of the address /
アドレス/属性比較部16aは、8つの比較部を含み、そのうちの4つの比較部は、上述した比較部41であり、残りの4つの比較部は、上述した比較部42である。各比較部41には、コアI/F21を介してアドレス/属性設定部51にアドレス情報と属性情報が設定され、EN52にイネーブル情報が設定される。また、各比較部42には、コアI/F21を介してEN62にイネーブル情報が設定される。
The address / attribute comparison unit 16a includes eight comparison units, of which four comparison units are the
各比較部41及び各比較部42のそれぞれには、アドレス情報及び属性情報が入力される。各比較部41及び各比較部42は、設定されたアドレス情報と入力されたアドレス情報との比較、更に、設定された属性情報と入力された属性情報との比較を行い、アドレス又は属性違反があるか否かを検出し、検出結果をOR回路22に出力する。その他の構成及び動作は、上述した実施の形態と同様なため説明を省略する。
Address information and attribute information are input to each
以上のように、応用例2に係るAPU12cは、4つの比較部41と、4つの比較部42とを有する構成にした。この結果、3つ以上の複数のタスクを並列に実行する場合にも、並列に実行される複数のタスクのそれぞれについて、アドレス又は属性違反があるか否かを検出することができる。
As described above, the APU 12c according to the application example 2 includes the four
また、APU12a2は、アドレス情報及び属性情報が、組み合わせ回路により予め定数値として設定されている比較部42を複数有する構成にすることにより、上述した実施の形態と同様に、レジスタに保持されるアドレス情報及び属性情報の一部を組み合わせ回路により予め定数値として設定することにより、回路規模を削減し、設定のタイミングの制御を容易にし、かつ、消費電力を低減することができる。
Further, the APU 12a2 has a configuration in which the address information and the attribute information have a plurality of
本発明は、上述した実施の形態に限定されるものではなく、本発明の要旨を変えない範囲において、種々の変更、改変等が可能である。 The present invention is not limited to the above-described embodiments, and various changes and modifications can be made without departing from the scope of the present invention.
1 プロセッサ、11a,11b コア、12a,12a1,12a2,12b APU、13 バス、14 メモリ、15a,15b ローカルメモリ、16,16a アドレス/属性比較部、21 コアI/F、22 OR回路、41,42 比較部、51,51a アドレス/属性設定部、52 EN、53 アドレス比較部、54 属性比較部、55 AND回路、61,61a アドレス/属性設定部、62 EN、63 アドレス比較部、64 属性比較部、65 AND回路 1 processor, 11a, 11b core, 12a, 12a1, 12a2, 12b APU, 13 bus, 14 memory, 15a, 15b local memory, 16, 16a address / attribute comparison unit, 21 core I / F, 22 OR circuit, 41, 42 comparison unit, 51, 51a address / attribute setting unit, 52 EN, 53 address comparison unit, 54 attribute comparison unit, 55 AND circuit, 61, 61a address / attribute setting unit, 62 EN, 63 address comparison unit, 64 attribute comparison Part, 65 AND circuit
Claims (5)
前記プロセッサコアに設けられ、前記プロセッサコアにおいてプログラムが実行されることにより、前記バスを介してメモリへアクセスするときにおける前記メモリのアドレス及び前記プロセッサコアにおいて実行される前記プログラムの命令の属性を監視し、監視して得られたアドレス及び属性と、予め設定された複数のアドレス及び複数の属性との比較を行い、前記監視して得られたアドレスのビット列の全体或いは一部のビット列及び属性と、前記予め設定されたアドレスのビット列の全体或いは一部のビット列及び属性とが一致しないときに、アドレス違反又は属性違反の例外を発生し、前記プロセッサコアに前記例外の発生を通知するユニットであって、前記予め設定された複数のアドレスと複数の属性の一部は、前記プロセッサコアを介してレジスタに設定され、前記予め設定された複数のアドレスと複数の属性の他の一部は、組み合わせ回路により出力されるメモリ保護部と、
を有することを特徴とするプロセッサ。 A processor core connected to the bus;
Provided in the processor core, and when the program is executed in the processor core, the memory address when accessing the memory via the bus and the attribute of the instruction of the program executed in the processor core are monitored. And comparing the addresses and attributes obtained by monitoring with a plurality of preset addresses and attributes, and a bit string and attributes of all or part of the bit string of the addresses obtained by monitoring, A unit that generates an address violation or attribute violation exception and notifies the processor core of the occurrence of the exception when the entire bit string of the preset address or a part of the bit string and attributes do not match. The plurality of preset addresses and some of the plurality of attributes are stored in the processor. Via the A is set to the register, the other part of the plurality of addresses and a plurality of attributes set in advance, and the memory protection unit output by the combining circuit,
A processor characterized by comprising:
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008119065A JP2009271597A (en) | 2008-04-30 | 2008-04-30 | Processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2008119065A JP2009271597A (en) | 2008-04-30 | 2008-04-30 | Processor |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2009271597A true JP2009271597A (en) | 2009-11-19 |
Family
ID=41438118
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2008119065A Pending JP2009271597A (en) | 2008-04-30 | 2008-04-30 | Processor |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2009271597A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
-
2008
- 2008-04-30 JP JP2008119065A patent/JP2009271597A/en active Pending
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012203698A (en) * | 2011-03-25 | 2012-10-22 | Toshiba Corp | Information processor and multi-core system |
US8959303B2 (en) | 2011-03-25 | 2015-02-17 | Kabushiki Kaisha Toshiba | Information processor and multi-core system |
WO2012131884A1 (en) * | 2011-03-28 | 2012-10-04 | 富士通株式会社 | Multicore processor system |
JP5716824B2 (en) * | 2011-03-28 | 2015-05-13 | 富士通株式会社 | Multi-core processor system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10445494B2 (en) | Attack protection for valid gadget control transfers | |
US10445154B2 (en) | Firmware-related event notification | |
TWI697805B (en) | Loading and virtualizing cryptographic keys | |
JP6507435B2 (en) | Instruction emulation processor, method, and system | |
JP5984865B2 (en) | Instruction emulation processor, method and system | |
KR101572079B1 (en) | Providing state storage in a processor for system management mode | |
JP4925973B2 (en) | Apparatus, system, method and program | |
US9684511B2 (en) | Using software having control transfer termination instructions with software not having control transfer termination instructions | |
JP2008158899A (en) | Device controller | |
JP5703378B2 (en) | Alignment control | |
US8473945B2 (en) | Enabling system management mode in a secure system | |
CN112805710A (en) | Verifying stack pointers | |
JP5100133B2 (en) | Information processing device | |
US20080163331A1 (en) | Reconfiguring a secure system | |
TWI470434B (en) | Method executing in computer system, computer system, and processor | |
JP2013225208A (en) | Information processing apparatus, information processing method and program | |
CN103164316A (en) | Hardware monitor | |
JP7569307B2 (en) | Apparatus and method for handling exception cause events - Patents.com | |
JP2009271597A (en) | Processor | |
JP2013008145A (en) | Processor system |