JP2005063170A - Memory system and memory access method - Google Patents

Memory system and memory access method Download PDF

Info

Publication number
JP2005063170A
JP2005063170A JP2003292941A JP2003292941A JP2005063170A JP 2005063170 A JP2005063170 A JP 2005063170A JP 2003292941 A JP2003292941 A JP 2003292941A JP 2003292941 A JP2003292941 A JP 2003292941A JP 2005063170 A JP2005063170 A JP 2005063170A
Authority
JP
Japan
Prior art keywords
access
memory
address
code
determination
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
JP2003292941A
Other languages
Japanese (ja)
Inventor
Takayuki Mihara
原 貴 之 三
Takao Nakajima
島 隆 夫 中
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Toshiba Corp
Original Assignee
Toshiba Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Toshiba Corp filed Critical Toshiba Corp
Priority to JP2003292941A priority Critical patent/JP2005063170A/en
Publication of JP2005063170A publication Critical patent/JP2005063170A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Storage Device Security (AREA)
  • Memory System Of A Hierarchy Structure (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To surely protect a secret code stored in a memory. <P>SOLUTION: This memory system comprises a first memory storing secret codes; a processor having an address conversion buffer for converting a virtual address to a physical address, the processor executing a program using the virtual address; and an access propriety determination circuit for determining the propriety of access to the first memory by the processor. The access propriety determination circuit stores an access propriety determination code which is the criterion for the determination of access propriety in a second memory and, on receipt of the physical address converted from the virtual address of the access propriety determination code from the processor, determines the access propriety based on the access propriety determination code stored in this physical address in the second memory and an access code outputted from the processor that is a determination object in the determination of access propriety. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、メモリシステム及びメモリアクセス方法に関する。   The present invention relates to a memory system and a memory access method.

図4は、従来のメモリシステムの構成を示すブロック図である。   FIG. 4 is a block diagram showing a configuration of a conventional memory system.

このメモリシステムにおいて、ROM(Read Only Memory)21には、暗号化データ(例えば、DVDに格納された映像データや音楽データなど)の復号化に用いる復号キー等の機密コードが格納されている。ROM22(1)〜22(n)には、CPU23により実行される各種プログラム等が格納されている。CPU23は、プログラムを実行してROM21から機密コードを取り出し、各種処理(例えば、映像データや音楽データの復号化など)を行う。   In this memory system, a ROM (Read Only Memory) 21 stores a secret code such as a decryption key used for decrypting encrypted data (for example, video data or music data stored on a DVD). Various programs executed by the CPU 23 are stored in the ROMs 22 (1) to 22 (n). The CPU 23 executes the program, extracts the secret code from the ROM 21, and performs various processes (for example, decoding of video data and music data).

CPU23がROM21内の機密コードを取得するには、まず、機密コードの格納された物理アドレスMADRをアドレスライン24に送出する。アドレスライン24に接続された分割回路25は、この物理アドレスMADRを、ROM21、22(1)〜22(n)を選択するための上位アドレスUADRと、選択されたROM内における物理アドレスを特定するための下位アドレスLADRとに分割する。分割回路25は、上位アドレスUADRをデコード回路26に送出し、一方、下位アドレスLADRをROM21、22(1)〜22(n)に送出する。   In order to acquire the secret code in the ROM 21, the CPU 23 first sends the physical address MADR in which the secret code is stored to the address line 24. The dividing circuit 25 connected to the address line 24 specifies the physical address MADR, the upper address UADR for selecting the ROM 21, 22 (1) to 22 (n), and the physical address in the selected ROM. For the lower address LADR. The dividing circuit 25 sends the upper address UADR to the decoding circuit 26, while sending the lower address LADR to the ROMs 21, 22 (1) to 22 (n).

デコード回路26は、受け取った上位アドレスUADRに基づき、ROM21、22(1)〜22(n)のいずれかを選択する。具体的には、デコード回路26は、選択するROMに対してチップ選択信号(ローレベル)を出力する。ここでは、デコード回路26は、機密コードが格納されたROM21を選択するものとする。   The decode circuit 26 selects one of the ROMs 21, 22 (1) to 22 (n) based on the received upper address UADR. Specifically, the decode circuit 26 outputs a chip selection signal (low level) to the ROM to be selected. Here, it is assumed that the decoding circuit 26 selects the ROM 21 in which the secret code is stored.

選択されたROM21は、上において分割回路25から受け取った下位アドレスLADRに格納されたデータ(ここでは機密コード)を読み出し、図示しないデータ線を介して、CPU23に送出する。   The selected ROM 21 reads out the data (the secret code here) stored in the lower address LADR received from the dividing circuit 25 and sends it to the CPU 23 via a data line (not shown).

以上から分かるように、このメモリシステムでは、CPU23がROM21内の機密コードを取得するには、機密コードが格納された物理アドレスMADRをアドレスライン24に送出する。   As can be seen from the above, in this memory system, the CPU 23 sends the physical address MADR storing the secret code to the address line 24 in order to obtain the secret code in the ROM 21.

ここで、アドレスライン24を流れる物理アドレスMADRは、半導体解析装置を用いることにより、観察可能である。   Here, the physical address MADR flowing through the address line 24 can be observed by using a semiconductor analyzer.

従って、上述した構成では、不正の目的をもった者が、アドレスライン24を観察するなどして機密コードの物理アドレスMADRを取得することで、機密コードを取得するプログラムを作成するなどして、容易に機密コードにアクセスできてしまう。   Therefore, in the configuration described above, a person who has an unauthorized purpose observes the address line 24 and acquires the physical address MADR of the confidential code, thereby creating a program for acquiring the confidential code, Easily access sensitive code.

図5は、従来の別のメモリシステムの構成を示すブロック図である。   FIG. 5 is a block diagram showing a configuration of another conventional memory system.

この別のメモリシステムは、上述のメモリシステムに対し、プロセッサ23がROM21へアクセスすることを認めるか否かを判定するアクセス可否判定回路28を新たに追加したものである。   This other memory system is obtained by adding an access permission determination circuit 28 for determining whether or not the processor 23 is permitted to access the ROM 21 to the memory system described above.

このアクセス可否判定回路28は、アクセス可否の判定基準となるアクセス可否判定コードを格納したレジスタ29を備える。レジスタ29は、所定の物理アドレスMADRを有する。   The access permission determination circuit 28 includes a register 29 that stores an access permission determination code serving as a determination criterion for access permission. The register 29 has a predetermined physical address MADR.

CPU23は、ROM21へのアクセスに際しては、まず、アクセス可否の判定において判定対象となるアクセスコードを、レジスタ29の物理アドレスMADRを指定して、アクセス可否判定回路28に送出する。   When accessing the ROM 21, the CPU 23 first sends an access code to be determined in determining whether access is possible to the access permission determination circuit 28 by designating the physical address MADR of the register 29.

アクセス可否判定回路28は、レジスタ29内のアクセス可否判定コードと、受け取ったアクセスコードを比較し、両者が一致する場合は、アクセス許可を示す許可信号(ローレベル)をOR回路30に出力する。   The access permission determination circuit 28 compares the access permission determination code in the register 29 with the received access code, and outputs a permission signal (low level) indicating access permission to the OR circuit 30 if the two match.

OR回路30は、アクセス可否判定回路28から許可信号(ローレベル)が入力された場合のみ、デコード回路26からROM21へのチップ選択信号(ローレベル)を通過させる。   The OR circuit 30 passes the chip selection signal (low level) from the decoding circuit 26 to the ROM 21 only when the permission signal (low level) is input from the access permission determination circuit 28.

しかし、以上のようなメモリシステムにおいても、アドレスライン24を観察することで、レジスタ29の物理アドレスMADRを容易に取得できる。レジスタ29の物理アドレスMADRが分かれば、レジスタ29内のアクセス可否判定コードも容易に取得できる。この結果、機密コードを容易に取得されてしまう。
特開2000−276397号公報 特開2001−265654号公報 特開2002−312239号公報
However, even in the memory system as described above, the physical address MADR of the register 29 can be easily obtained by observing the address line 24. If the physical address MADR of the register 29 is known, the access permission determination code in the register 29 can be easily obtained. As a result, the secret code is easily obtained.
Japanese Patent Laid-Open No. 2000-276397 JP 2001-265654 A JP 2002-31239 A

本発明は、上記問題点に鑑みてなされたものであり、その目的は、メモリ内に格納された機密コードを有効に保護できるメモリシステム及びメモリアクセス方法を提供することにある。   The present invention has been made in view of the above problems, and an object of the present invention is to provide a memory system and a memory access method capable of effectively protecting a confidential code stored in a memory.

本発明の第1のメモリシステムは、機密コードを格納した第1のメモリと、仮想アドレスを物理アドレスに変換するアドレス変換バッファを有し、前記仮想アドレスを用いたプログラムを実行するプロセッサと、前記プロセッサによる前記第1のメモリへのアクセス可否を判定するアクセス可否判定回路であって、前記アクセス可否の判定において判定基準となるアクセス可否判定コードを第2のメモリにおいて格納し、前記アクセス可否判定コードの前記仮想アドレスから変換された前記物理アドレスを前記プロセッサから受け取った場合は、前記第2のメモリ内におけるこの物理アドレスに格納された前記アクセス可否判定コードと、前記アクセス可否の判定において判定対象となる前記プロセッサから出力されるアクセスコードとに基づいて、前記アクセス可否を判定するアクセス可否判定回路と、を備えたことを特徴とする。   A first memory system of the present invention includes a first memory storing a secret code, an address translation buffer that translates a virtual address into a physical address, a processor that executes a program using the virtual address, An access permission determination circuit for determining whether a processor can access the first memory, wherein an access permission determination code serving as a determination criterion in the determination of the access permission is stored in a second memory, and the access permission determination code When the physical address converted from the virtual address is received from the processor, the access permission determination code stored at the physical address in the second memory and the determination target in the determination of the access permission Based on the access code output from the processor There are, characterized by comprising a an access determination circuit determines the access permission.

本発明の第2のメモリシステムは、前記プロセッサは、前記第1のメモリへのアクセスが許可された場合は、前記アドレス変換バッファを用いて前記機密コードの前記仮想アドレスを前記物理アドレスに変換し、この物理アドレスを用いて前記第1のメモリから前記機密コードを取得することを特徴とする。   In the second memory system of the present invention, when access to the first memory is permitted, the processor converts the virtual address of the confidential code into the physical address using the address conversion buffer. The secret code is acquired from the first memory using the physical address.

本発明のメモリアクセス方法は、機密コードを格納した第1のメモリと、仮想アドレスを用いたプログラムを実行し、前記仮想アドレスを物理アドレスに変換するアドレス変換バッファを有したプロセッサと、前記プロセッサによる前記第1のメモリへのアクセス可否を判定する、前記アクセス可否の判定における判定基準となるアクセス可否判定コードを第2のメモリにおいて格納したアクセス可否判定回路とを備えたメモリシステムにおいて、前記プロセッサが前記第1のメモリから前記機密コードを取得するメモリアクセス方法であって、前記アクセス可否判定回路が、前記アクセス可否判定コードの前記仮想アドレスから変換された前記物理アドレスを前記プロセッサから受け取るステップと、前記アクセス可否判定回路が、前記アクセス可否の判定における判定対象となるアクセスコードを前記プロセッサから受け取るステップと、前記アクセス可否判定回路が、前記第2のメモリ内における前記物理アドレスに格納された前記アクセス可否判定コードと、受け取った前記アクセスコードとに基づいて、前記プロセッサによる前記第1のメモリへのアクセス可否を判定するステップと、前記プロセッサは、前記第1のメモリへのアクセスが許可された場合は、前記アドレス変換バッファを用いて、前記機密コードの前記仮想アドレスを前記物理アドレスに変換し、前記物理アドレスを用いて前記第1のメモリから前記機密コードを取得するステップと、を備えたことを特徴とする。   The memory access method of the present invention includes a first memory storing a secret code, a processor having an address translation buffer for executing a program using a virtual address and converting the virtual address to a physical address, and the processor. In a memory system comprising: an access enable / disable determining circuit that stores an access enable / disable determination code serving as a determination criterion in the access enable / disable determination that determines whether or not access to the first memory is stored in the second memory; A memory access method for obtaining the secret code from the first memory, wherein the access permission determination circuit receives the physical address converted from the virtual address of the access permission determination code from the processor; The access permission / inhibition judgment circuit A step of receiving from the processor an access code to be determined in determination of accessibility; the access determination circuit receiving the access determination code stored in the physical address in the second memory; Determining whether or not the processor can access the first memory based on an access code; and when the processor is permitted to access the first memory, the processor uses the address translation buffer. And converting the virtual address of the secret code into the physical address and obtaining the secret code from the first memory using the physical address.

本発明によれば、プログラムにおいてメモリアドレスとして仮想アドレスを用いるとともに、仮想アドレスを物理アドレスに変換するアドレス変換バッファをプロセッサに備えさせたので、アドレスラインの観察などにより、アクセス可否判定コードの物理アドレスや、機密コードの物理アドレスが露呈した場合においても、機密コードを確実に保護することができる。   According to the present invention, a virtual address is used as a memory address in a program, and the processor is provided with an address translation buffer that translates a virtual address into a physical address. Even when the physical address of the confidential code is exposed, the confidential code can be reliably protected.

図1は、本発明の実施の形態としてのメモリシステムの構成を示すブロック図である。   FIG. 1 is a block diagram showing a configuration of a memory system as an embodiment of the present invention.

このメモリシステムは、例えば、1チップにより構成される。   This memory system is composed of, for example, one chip.

図1に示すように、ROM(メモリ)1は、暗号化データを解読するための復号キー等の機密コードを格納する。   As shown in FIG. 1, a ROM (memory) 1 stores a secret code such as a decryption key for decrypting encrypted data.

一方、ROM2(1)〜2(n)は、ROM1から機密コードを取得することを実現するプログラムや、取得した機密コードを用いて各種処理を行うことを実現するプログラム等を格納する。各種処理としては、例えば、暗号化された音楽データを機密コードを用いて復号することなどがある。   On the other hand, the ROMs 2 (1) to 2 (n) store a program that realizes acquisition of a confidential code from the ROM 1, a program that realizes various processes using the acquired confidential code, and the like. Various processes include, for example, decrypting encrypted music data using a secret code.

CPU3は、ROM2(1)〜2(n)内に格納されたプログラムを含む各種プログラムを実行する。CPU3の実行対象となるプログラムは、メモリアドレスとして仮想アドレスVADRを用いる。   The CPU 3 executes various programs including programs stored in the ROMs 2 (1) to 2 (n). The program to be executed by the CPU 3 uses the virtual address VADR as a memory address.

CPU3は、仮想アドレスVADRを物理アドレスMADRに変換するアドレス変換バッファ(TLB:Translation Lookaside Buffer)(図示せず)を備えたメモリ管理ユニット(MMU:Memory Management Unit)10を有する。   The CPU 3 includes a memory management unit (MMU: Memory Management Unit) 10 including an address translation buffer (TLB: Translation Lookaside Buffer) (not shown) that converts the virtual address VADR into a physical address MADR.

アドレス変換バッファは、図3に示すような、仮想アドレスVADRと物理アドレスMADRとをマッピングしたアドレス変換テーブルを有する。アドレス変換バッファは、このアドレス変換テーブルを用いて、図2に示すように、仮想アドレスVADRを物理アドレスMADRに変換する。このアドレス変換テーブルは、例えばあらかじめユーザが作成しておく。   The address translation buffer has an address translation table in which the virtual address VADR and the physical address MADR are mapped as shown in FIG. The address conversion buffer uses this address conversion table to convert the virtual address VADR to the physical address MADR as shown in FIG. This address conversion table is prepared in advance by the user, for example.

CPU3は、ROM1、2(1)〜2(n)へのアクセスの際は、メモリ管理ユニット10を用いて仮想アドレスVADRを物理アドレスMADRに変換する。このような仕組みは、例えば、Windows-CE(登録商標), Linux(登録商標), EPOC(登録商標)等のオペレーティング・システムにも採用されている。   When accessing the ROMs 1, 2 (1) to 2 (n), the CPU 3 converts the virtual address VADR into the physical address MADR using the memory management unit 10. Such a mechanism is also employed in operating systems such as Windows-CE (registered trademark), Linux (registered trademark), and EPOC (registered trademark).

アクセス可否判定回路4は、CPU3がROM1へアクセスことを許可するか否かを判定する。アクセス可否判定回路4は、アクセス可否の判定をする際の判定基準となるアクセス可否判定コード(例えば1バイトのサイズを有するコード)を保有したレジスタ5を備える。レジスタ5は、所定の物理アドレスMADRを有する。   The access permission determination circuit 4 determines whether or not the CPU 3 permits access to the ROM 1. The access enable / disable determining circuit 4 includes a register 5 that holds an access enable / disable determination code (for example, a code having a size of 1 byte) that serves as a determination reference when determining access enable / disable. The register 5 has a predetermined physical address MADR.

CPU3がROM1へアクセス際は、アクセス可否の判定において判定対象となるアクセスコードを、レジスタ5の物理アドレスMADRを指定して、アクセス可否判定回路4に送る。アクセス可否判定回路4は、レジスタ5内のアクサセス可否判定コードと、受け取ったアクセスコードが一致すればROM1へのアクセスを許可する。   When the CPU 3 accesses the ROM 1, an access code that is a determination target in determining whether access is possible is sent to the access permission determination circuit 4 by specifying the physical address MADR of the register 5. The access permission determination circuit 4 permits access to the ROM 1 if the access permission determination code in the register 5 matches the received access code.

一方、アクセス可否判定回路4は、指定された物理アドレスMADRがレジスタ5の物理アドレスMADRと異なる場合や、アクセスコードとアクセス可否判定コードとが一致しない場合は、ROM1へのアクセスを許可しない。   On the other hand, when the designated physical address MADR is different from the physical address MADR of the register 5 or when the access code does not match the access permission determination code, the access permission determination circuit 4 does not permit access to the ROM 1.

アクセス可否判定回路4は、アクセスを許可する場合は、許可信号(ローレベル)をOR回路9に出力し、許可しない場合は、非許可信号(ハイレベル)をOR回路9に出力する。   The access permission determination circuit 4 outputs a permission signal (low level) to the OR circuit 9 when permitting access, and outputs a non-permission signal (high level) to the OR circuit 9 when not permitted.

分割回路8は、CPU3から物理アドレスMADRを受け取り、ROM1、2(1)〜2(n)のいずれかを選択するための上位アドレスUADRと、各ROM内における物理アドレスを特定するための下位アドレスLADRとにこの物理アドレスMADRを分割する。分割回路8は、上位アドレスUADR及び下位アドレスLADRのうち、上位アドレスUADRをデコード回路6に、下位アドレスLADRをROM1、ROM2(1)〜ROM2(n)に送出する。   The dividing circuit 8 receives the physical address MADR from the CPU 3, and receives a higher address UADR for selecting one of the ROMs 1, 2 (1) to 2 (n), and a lower address for specifying the physical address in each ROM. The physical address MADR is divided into LADR. Of the upper address UADR and the lower address LADR, the dividing circuit 8 sends the upper address UADR to the decoding circuit 6 and the lower address LADR to ROM1, ROM2 (1) to ROM2 (n).

デコード回路6は、分割回路8から受け取った上位アドレスUADRに基づいて、ROM1及びROM2(1)〜2(n)のいずれかを選択する。   The decode circuit 6 selects one of the ROM 1 and the ROMs 2 (1) to 2 (n) based on the upper address UADR received from the dividing circuit 8.

具体的には、デコード回路6は、ROM1を選択する場合は、OR回路9に対してチップ選択信号(ローレベル)を出力し、ROM2(1)〜2(n)に対してはチップ非選択信号(ハイレベル)を出力する。OR回路9は、上述のアクセス可否判定回路4から許可信号(ローレベル)が入力された場合のみ、デコード回路6からのチップ選択信号(ローレベル)をROM1に通過させる。   Specifically, when selecting the ROM 1, the decode circuit 6 outputs a chip selection signal (low level) to the OR circuit 9 and does not select the chips for the ROMs 2 (1) to 2 (n). A signal (high level) is output. The OR circuit 9 passes the chip selection signal (low level) from the decoding circuit 6 to the ROM 1 only when the permission signal (low level) is input from the above-described access permission determination circuit 4.

一方、デコード回路6は、ROM2(1)〜2(n)のいずれかを選択する場合は、選択するROMに対してチップ選択信号(ローレベル)を出力し、選択されないROM及びOR回路9に対してはチップ非選択信号(ハイレベル)を出力する。   On the other hand, when selecting any one of the ROMs 2 (1) to 2 (n), the decode circuit 6 outputs a chip selection signal (low level) to the selected ROM, and outputs it to the unselected ROM and the OR circuit 9 On the other hand, a chip non-selection signal (high level) is output.

選択されたROM1、2(1)〜2(n)は、分割回路8から受け取った下位アドレスLADRに格納されたデータを取り出して、図示しないデータ線を介して、CPU3に送出する。   The selected ROMs 1, 2 (1) to 2 (n) take out the data stored in the lower address LADR received from the dividing circuit 8 and send it to the CPU 3 via a data line (not shown).

次に、上述したメモリシステムによる処理動作を、CPU3がROM1内の機密コードを読み出す場合を例に、説明する。   Next, the processing operation by the above-described memory system will be described by taking as an example the case where the CPU 3 reads the confidential code in the ROM 1.

まず、CPU3は、レジスタ5の仮想アドレスVADRをプログラムから読み出すとともに、アクセス可否の判定対象となるアクセスコードをこのプログラムから読み出す。CPU3は、メモリ管理ユニット10を用いて、仮想アドレスVADRを物理アドレスMADRに変換し、この物理アドレスMADRと上述のアクセスコードとをアクセス可否判定回路4に送出する。   First, the CPU 3 reads the virtual address VADR of the register 5 from the program, and reads an access code that is an access permission determination target from the program. The CPU 3 uses the memory management unit 10 to convert the virtual address VADR into a physical address MADR and sends the physical address MADR and the access code to the access permission determination circuit 4.

アクセス可否判定回路4は、受け取った物理アドレスMADRが、レジスタ5の物理アドレスMADRに一致する場合は、レジスタ5内のアクセス可否判定コードと、受け取ったアクセスコードとが一致するか否かを判断する。アクセス可否判定回路4は、アクセス可否判定コードとアクセスコードとが一致すると判断したら、アクセス許可信号(ローレベル)をOR回路9に送出する。   When the received physical address MADR matches the physical address MADR of the register 5, the access permission determination circuit 4 determines whether or not the access permission determination code in the register 5 matches the received access code. . When determining that the access permission determination code matches the access code, the access permission determination circuit 4 sends an access permission signal (low level) to the OR circuit 9.

一方、CPU3は、機密コードの仮想アドレスVADRをプログラムから読出し、この仮想アドレスVADRをメモリ管理ユニット10を用いて物理アドレスMADRに変換する。CPU3は、この物理アドレスMADRを分割回路8に送出する。   On the other hand, the CPU 3 reads the virtual address VADR of the secret code from the program, and converts this virtual address VADR into a physical address MADR using the memory management unit 10. The CPU 3 sends this physical address MADR to the dividing circuit 8.

分割回路8は、受け取った物理アドレスMADRを、上位アドレスUADRと下位アドレスLADRとに分割し、上位アドレスUADRをデコード回路6に送出する。一方、分割回路8は、下位アドレスLADRをROM1、2(1)〜2(n)に送出する。   The dividing circuit 8 divides the received physical address MADR into an upper address UADR and a lower address LADR, and sends the upper address UADR to the decoding circuit 6. On the other hand, the dividing circuit 8 sends the lower address LADR to the ROMs 1, 2 (1) to 2 (n).

デコード回路6は、受け取った上位アドレスUADRに基づいて、ROM1を選択する。つまり、デコード回路6は、OR回路9にチップ選択信号(ローレベル)を出力し、ROM2(1)〜2(n)に対してはチップ非選択信号(ハイレベル)を出力する。   The decode circuit 6 selects the ROM 1 based on the received upper address UADR. That is, the decode circuit 6 outputs a chip selection signal (low level) to the OR circuit 9, and outputs a chip non-selection signal (high level) to the ROMs 2 (1) to 2 (n).

OR回路9は、アクセス可否判定回路4からアクセス許可信号(ローレベル)を受け取っているので、デコード回路6からのチップ選択信号(ローレベル)をROM1に通過させる。   Since the OR circuit 9 receives the access permission signal (low level) from the access permission determination circuit 4, it passes the chip selection signal (low level) from the decoding circuit 6 to the ROM 1.

ROM1は、分割回路8から受け取った下位アドレスLADRに格納された機密コードを取り出し、図示しないデータ線を介して、CPU3に送出する。これにより、CPU3は、機密コードを取得する。   The ROM 1 takes out the confidential code stored in the lower address LADR received from the dividing circuit 8 and sends it to the CPU 3 via a data line (not shown). Thereby, CPU3 acquires a secret code.

以上のように、本実施の形態によれば、CPUの実行対象となるプログラムにおいてメモリアドレスとして仮想アドレスを用いるようにするとともに、仮想アドレスを物理アドレスに変換するアドレス変換バッファをCPUに備えさせたので、アドレスラインの観察などによりアクセス可否判定コードの物理アドレス及び機密コードの物理アドレスが露呈されたとしても、機密コードを有効に防御することができる。物理アドレスに対応する仮想アドレスを特定することは、アドレス変換テーブルが露呈されない限り、実質上困難であるからである。   As described above, according to the present embodiment, a virtual address is used as a memory address in a program to be executed by the CPU, and the CPU is provided with an address conversion buffer that converts the virtual address into a physical address. Therefore, even if the physical address of the accessibility determination code and the physical address of the confidential code are exposed by observing the address line, the confidential code can be effectively protected. This is because it is substantially difficult to specify the virtual address corresponding to the physical address unless the address conversion table is exposed.

また、本実施の形態によれば、仮想記憶方式という非常にシンプルな構成を採用したので、従来技術に示した回路構成からの変更(回路規模の増大)を極めて少なくしつつ、ROMに格納された機密コードを、確実に守ることができる。また、システム構成自体が非常にシンプルなので、CPU3からROMへアクセスする際のレイテンシ(待ち時間)ペナルティも少ない。   In addition, according to the present embodiment, since a very simple configuration called a virtual storage system is adopted, the change from the circuit configuration shown in the prior art (increase in circuit scale) is extremely small and stored in the ROM. Secure confidential code. Further, since the system configuration itself is very simple, there is little latency (waiting time) penalty when the CPU 3 accesses the ROM.

本発明の実施の形態としてのメモリシステムの構成を示すブロック図である。It is a block diagram which shows the structure of the memory system as embodiment of this invention. アドレス変換バッファを説明するための図である。It is a figure for demonstrating an address translation buffer. アドレス変換バッファが保有するアドレス変換テーブルを示す図である。It is a figure which shows the address conversion table which an address conversion buffer holds. 従来におけるメモリシステムの構成を示すブロック図である。It is a block diagram which shows the structure of the memory system in the past. 従来における別のメモリシステムの構成を示すブロック図である。It is a block diagram which shows the structure of another conventional memory system.

符号の説明Explanation of symbols

1 ROM(メモリ)
2(1)〜2(n)ROM
3 CPU
4 アクセス可否判定回路
5 レジスタ
6 デコード回路
8 分割回路
9 OR回路
10 メモリ管理ユニット
11 アドレスライン
1 ROM (memory)
2 (1) to 2 (n) ROM
3 CPU
4 Accessibility determination circuit 5 Register 6 Decode circuit 8 Dividing circuit 9 OR circuit 10 Memory management unit 11 Address line

Claims (3)

機密コードを格納した第1のメモリと、
仮想アドレスを物理アドレスに変換するアドレス変換バッファを有し、前記仮想アドレスを用いたプログラムを実行するプロセッサと、
前記プロセッサによる前記第1のメモリへのアクセス可否を判定するアクセス可否判定回路であって、前記アクセス可否の判定において判定基準となるアクセス可否判定コードを第2のメモリにおいて格納し、前記アクセス可否判定コードの前記仮想アドレスから変換された前記物理アドレスを前記プロセッサから受け取った場合は、前記第2のメモリ内におけるこの物理アドレスに格納された前記アクセス可否判定コードと、前記アクセス可否の判定において判定対象となる前記プロセッサから出力されるアクセスコードとに基づいて、前記アクセス可否を判定するアクセス可否判定回路と、
を備えたメモリシステム。
A first memory storing a secret code;
A processor having an address translation buffer for translating a virtual address into a physical address, and executing a program using the virtual address;
An access enable / disable determining circuit for determining whether or not the processor can access the first memory, wherein an access enable / disable determination code serving as a determination reference in the access enable / disable determination is stored in a second memory, and the access enable / disable determination is performed. When the physical address converted from the virtual address of the code is received from the processor, the access permission determination code stored at the physical address in the second memory and the determination target in the determination of the access permission An access permission determination circuit that determines whether the access is possible based on an access code output from the processor.
With a memory system.
前記プロセッサは、前記第1のメモリへのアクセスが許可された場合は、前記アドレス変換バッファを用いて前記機密コードの前記仮想アドレスを前記物理アドレスに変換し、この物理アドレスを用いて前記第1のメモリから前記機密コードを取得することを特徴とする請求項1に記載のメモリシステム。   When the access to the first memory is permitted, the processor converts the virtual address of the confidential code to the physical address using the address conversion buffer, and uses the physical address to convert the first address The memory system according to claim 1, wherein the secret code is obtained from a plurality of memories. 機密コードを格納した第1のメモリと、仮想アドレスを用いたプログラムを実行し、前記仮想アドレスを物理アドレスに変換するアドレス変換バッファを有したプロセッサと、前記プロセッサによる前記第1のメモリへのアクセス可否を判定する、前記アクセス可否の判定における判定基準となるアクセス可否判定コードを第2のメモリにおいて格納したアクセス可否判定回路とを備えたメモリシステムにおいて、前記プロセッサが前記第1のメモリから前記機密コードを取得するメモリアクセス方法であって、
前記アクセス可否判定回路が、前記アクセス可否判定コードの前記仮想アドレスから変換された前記物理アドレスを前記プロセッサから受け取るステップと、
前記アクセス可否判定回路が、前記アクセス可否の判定における判定対象となるアクセスコードを前記プロセッサから受け取るステップと、
前記アクセス可否判定回路が、前記第2のメモリ内における前記物理アドレスに格納された前記アクセス可否判定コードと、受け取った前記アクセスコードとに基づいて、前記プロセッサによる前記第1のメモリへのアクセス可否を判定するステップと、
前記プロセッサは、前記第1のメモリへのアクセスが許可された場合は、前記アドレス変換バッファを用いて、前記機密コードの前記仮想アドレスを前記物理アドレスに変換し、前記物理アドレスを用いて前記第1のメモリから前記機密コードを取得するステップと、
を備えたことを特徴とするメモリアクセス方法。
A first memory storing a secret code; a processor having an address translation buffer for executing a program using a virtual address and converting the virtual address to a physical address; and access to the first memory by the processor In a memory system comprising: an access enable / disable determination circuit that stores an access enable / disable determination code serving as a determination criterion in the access enable / disable determination in a second memory; A memory access method for obtaining code,
The access determination circuit receiving from the processor the physical address converted from the virtual address of the access determination code;
A step of receiving, from the processor, an access code to be determined by the access permission determination circuit in the determination of access permission;
The access permission determination circuit determines whether the processor can access the first memory based on the access permission determination code stored at the physical address in the second memory and the received access code. Determining
When access to the first memory is permitted, the processor converts the virtual address of the confidential code to the physical address using the address conversion buffer, and uses the physical address to convert the first address. Obtaining the secret code from a memory of one;
A memory access method comprising:
JP2003292941A 2003-08-13 2003-08-13 Memory system and memory access method Pending JP2005063170A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2003292941A JP2005063170A (en) 2003-08-13 2003-08-13 Memory system and memory access method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2003292941A JP2005063170A (en) 2003-08-13 2003-08-13 Memory system and memory access method

Publications (1)

Publication Number Publication Date
JP2005063170A true JP2005063170A (en) 2005-03-10

Family

ID=34370091

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2003292941A Pending JP2005063170A (en) 2003-08-13 2003-08-13 Memory system and memory access method

Country Status (1)

Country Link
JP (1) JP2005063170A (en)

Similar Documents

Publication Publication Date Title
US8473754B2 (en) Hardware-facilitated secure software execution environment
JP5581403B2 (en) Store secure mode page table data in secure and non-secure areas of memory
US7783898B2 (en) Encryption/decryption of stored data using non-accessible, unique encryption key
US8296538B2 (en) Storing secure mode page table data in secure and non-secure regions of memory
US10180913B1 (en) Secure virtual access for real-time embedded devices
JP4514066B2 (en) Data processing apparatus and access control method in data processing apparatus
JP2006350782A (en) Processor and system
KR20060135467A (en) System and method of using a protected non-volatile memory
US7353401B2 (en) Device and method for data protection by scrambling address lines
US7130955B2 (en) Microprocessor and video/sound processing system
KR970007583A (en) Method and apparatus for safely storing detectable information on relatively insecure storage media
US20020144078A1 (en) Address translation
JP2006293516A (en) Bus access control unit
KR101754518B1 (en) Security system and method for protecting data input via usb device
US20090327750A1 (en) Security system for code dump protection and method thereof
US20030141994A1 (en) Address encoding apparatus, address encoding method and address encoding program
JP2005063170A (en) Memory system and memory access method
CN111950017B (en) Memory data protection method, device, equipment and storage medium
CN113609458A (en) System and method for obfuscating opcode commands in a semiconductor device
JP2008299930A (en) Semiconductor memory
RU2005115088A (en) MEMORY ACCESS MANAGEMENT
US7707431B2 (en) Device of applying protection bit codes to encrypt a program for protection
EP1291776A2 (en) Address translation
JPH09106690A (en) Rom with copy preventing function
JP2006254099A (en) Microprocessor