JP2008203988A - Security protection function-equipped microcomputer - Google Patents
Security protection function-equipped microcomputer Download PDFInfo
- Publication number
- JP2008203988A JP2008203988A JP2007036720A JP2007036720A JP2008203988A JP 2008203988 A JP2008203988 A JP 2008203988A JP 2007036720 A JP2007036720 A JP 2007036720A JP 2007036720 A JP2007036720 A JP 2007036720A JP 2008203988 A JP2008203988 A JP 2008203988A
- Authority
- JP
- Japan
- Prior art keywords
- security
- microcomputer
- flag
- written
- protection function
- 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.)
- Withdrawn
Links
Images
Abstract
Description
本発明は、セキュリティ保護機能付きマイクロコンピュータに関する。 The present invention relates to a microcomputer with a security protection function.
マイクロコンピュータに搭載するROMをフラッシュメモリなどの書き換え可能な不揮発性メモリとし、この書き換え可能な不揮発性メモリにマイクロコンピュータで実行するプログラムを書き込み、必要に応じてプログラムを書き換えることにより、プログラムの開発を容易としたマイクロコンピュータがある。 The ROM installed in the microcomputer is a rewritable non-volatile memory such as a flash memory, the program to be executed by the microcomputer is written in the rewritable non-volatile memory, and the program is rewritten as necessary to develop the program. There is an easy microcomputer.
このようなマイクロコンピュータでは、プログラムの開発時には不揮発性メモリの書き換えを許可するが、プログラムの開発完了後は、プログラムの保護のために、不揮発性メモリへ書き込んだデータの読み出し、書き換え、消去を禁止する、というようなセキュリティ保護のための管理が必要となる。 In such a microcomputer, rewriting of the non-volatile memory is permitted at the time of program development, but reading, rewriting and erasing of data written to the non-volatile memory are prohibited after the development of the program is completed in order to protect the program. It is necessary to manage security for security.
そのため、従来、フラッシュメモリに、プログラミングを行う領域と、このプログラミングを行う領域への管理情報である書き込みフラグ、読み出しフラグ、消去フラグを書き込むプログラミング管理領域と、を配設し、外部からのプログラミング要求があった場合、CPUが、プログラミング管理領域の管理情報を参照し、プログラミングを行う領域へのプログラミングの可否を判断するようにしたマイクロコンピュータが提案されている(例えば、特許文献1参照。)。 For this reason, conventionally, the flash memory is provided with a programming area and a programming management area for writing a write flag, a read flag, and an erase flag, which are management information for the programming area. In such a case, there has been proposed a microcomputer in which the CPU refers to the management information in the programming management area to determine whether or not the programming area can be programmed (see, for example, Patent Document 1).
しかし、上述の方法では、プログラミングを行う領域への管理情報自体が書き換え可能なフラッシュメモリに書き込まれているため、この管理情報に対するセキュリティが十分には保護されないという問題があった。 However, the above-described method has a problem that the management information itself for the area to be programmed is written in a rewritable flash memory, and thus the security for the management information is not sufficiently protected.
また、セキュリティ保護の対象がフラッシュメモリのプログラミングを行う領域に限られているため、マイクロコンピュータに内蔵されるRAMなどの他のリソースのセキュリティが保護されないという問題があった。
そこで、本発明の目的は、内蔵の書き換え可能な不揮発性メモリおよび他のリソースへのセキュリティ管理情報に対する保護を強化したセキュリティ保護機能付きマイクロコンピュータを提供することにある。 SUMMARY OF THE INVENTION An object of the present invention is to provide a microcomputer with a security protection function in which protection against security management information for a built-in rewritable nonvolatile memory and other resources is enhanced.
本発明の一態様によれば、内蔵する複数のリソースに対するセキュリティフラグを書き込む1回だけ書き込み可能な不揮発性メモリと、前記不揮発性メモリに書き込まれた前記セキュリティフラグの設定に従って前記リソースに対するアクセスを制御するアクセス制御手段とを有することを特徴とするセキュリティ保護機能付きマイクロコンピュータが提供される。 According to one aspect of the present invention, a non-volatile memory that can be written only once to write a security flag for a plurality of built-in resources, and access to the resource is controlled according to the setting of the security flag written to the non-volatile memory. There is provided a microcomputer with a security protection function characterized by having an access control means.
本発明によれば、1回だけ書き込み可能な不揮発性メモリにセキュリティ管理情報を書き込むのでセキュリティ管理情報が書き換えられることを防止でき、マイクロコンピュータのセキュリティ保護機能を強化することができる。 According to the present invention, since security management information is written in a non-volatile memory that can be written only once, the security management information can be prevented from being rewritten, and the security protection function of the microcomputer can be enhanced.
以下、本発明の実施例を図面を参照して説明する。 Embodiments of the present invention will be described below with reference to the drawings.
図1は、本発明の実施例に係るセキュリティ保護機能付きマイクロコンピュータの構成の例を示すブロック図である。 FIG. 1 is a block diagram showing an example of the configuration of a microcomputer with a security protection function according to an embodiment of the present invention.
本実施例のセキュリティ保護機能付きマイクロコンピュータ1は、セキュリティフラグを書き込む領域を有する1回だけ書き換え可能な不揮発性メモリであるPROM11と、PROM11に書き込まれたセキュリティフラグの設定に従って、セキュリティ保護機能付きマイクロコンピュータ1が内蔵する各種リソースに対するCPU13からのアクセスを制御するアクセス制御部12と、を有する。
The
ここで、アクセス制御部12によってアクセスが制御されるリソースの例として、フラッシュメモリ14、RAM15、I/O領域16を示す。このうち、書き換え可能な不揮発性メモリであるフラッシュメモリ14には、セキュリティ保護機能付きマイクロコンピュータ1が実行するプログラムが書き込まれる。
Here, a
なお、アクセス制御対象のリソースはこれらに限るものではなく、他のリソースもアクセス制御の対象とすることができる。 Note that the resources subject to access control are not limited to these, and other resources can also be subject to access control.
また、アクセス制御部12は、CPU13から各リソースへ対して発行されるリード/ライト信号の伝達を制御し、アクセスを禁止するリソースに対してはリード/ライト信号の伝達を抑止する。なお、各リソースへのデータの入出力はデータ・バスラインを介して行われる。
The
セキュリティフラグが書き込まれるPROM11は複数のビットを有し、セキュリティフラグの書き込みが行われたビットが、そのビットに予め割り当てられたリソースへのアクセスの禁止を示す。セキュリティフラグの書き込みが行われなければ、そのビットに割り当てられたリソースへのアクセスは許可される。
The
このセキュリティフラグの設定は、外部装置100からセキュリティデータをCPU13へ送付し、そのセキュリティデータの指定に従って、CPU13がPROM11の書き込みをビットごとに制御することによって行われる。
The security flag is set by sending security data from the
PROM11は、1回しか書き込みが行えず、書き換えができないので、セキュリティフラグの設定を一旦行うと、そのセキュリティフラグを取り消すことはできない。 Since the PROM 11 can be written only once and cannot be rewritten, once the security flag is set, the security flag cannot be canceled.
図2は、セキュリティフラグの構成の例を示す図である。ここで、PROM11のセキュリティフラグの書き込み領域が8ビットであるものとし、それぞれのビットは、次に示すようなアクセスの禁止を示す。
FIG. 2 is a diagram illustrating an example of the configuration of the security flag. Here, it is assumed that the security flag writing area of the
bit0のセキュリティフラグは、フラッシュメモリ14の書き換え禁止を指定する。例えば、フラッシュメモリ14にプログラムの書き込みを行った後に、このbit0へのセキュリティフラグの書き込みを行うと、それ以降、フラッシュメモリ14は書き換え禁止状態となり、フラッシュメモリ14に書き込まれたプログラムが保護される。
The security flag of bit 0 specifies prohibition of rewriting of the
bit1〜bit4のセキュリティフラグは、フラッシュメモリ14以外のリソースへのアクセス禁止を示す。
The security flags of
bit1はRAM15へのアクセス禁止を示し、bit2はI/O領域のアクセス禁止を示す。
また、bit3はRAM15からI/O領域16へのデータ転送禁止を示し、bit4はI/O領域16からRAM15へのデータ転送禁止を示す。データ転送を禁止するとき、アクセス制御部12は、データ転送元のリードアクセスを禁止するとともにデータ転送先のライトアクセスを禁止する。
このように、フラッシュメモリ14以外のリソースへのアクセス禁止を指定することにより、プログラムの保護のほかに、RAM15やI/O領域16に格納されているデータの外部への流出を防止することができる。
In this way, by designating prohibition of access to resources other than the
bit5、bit6のセキュリティフラグは、セキュリティフラグが書き込まれるPROM11の保護を図るために設定する。
The security flags of bit 5 and
bit5は、PROM11に書き込まれたセキュリティフラグの読み出しを禁止する。これにより、セキュリティフラグがどのように設定されているかを読み出せなくする。 Bit 5 prohibits reading of the security flag written in the PROM 11. This makes it impossible to read how the security flag is set.
bit6は、PROM11へのセキュリティフラグの追加書き込みを禁止する。PROM11の一部ビットにしか書き込みを行なわなかった場合、残りのビットへの書き込みはその後も可能である。しかし、このbit6のセキュリティフラグを設定することにより、その残りのビットへの書き込みを禁止することができる。これにより、一旦設定したセキュリティフラグの状態を保持することができる。
bit7は、デバッグ禁止を示す。通常、オンチップデバッグなどを行う場合、外部のデバッグツールを接続してマイクロコンピュータの内部動作を確認するが、このbit7のセキュリティフラグを設定することにより、セキュリティ保護機能付きマイクロコンピュータ1は、外部デバッグツールとの接続を拒否する。これにより、セキュリティ保護機能付きマイクロコンピュータ1の内部動作状態が外部デバッグツールを介して覗かれるのを防止する。
Bit 7 indicates that debugging is prohibited. Normally, when performing on-chip debugging or the like, an external debugging tool is connected to check the internal operation of the microcomputer. By setting this bit7 security flag, the
なお、セキュリティフラグを書き込む領域は8ビットに限られるものではなく、必要なビット数に増減させることができる。また、各ビットに割り当てるセキュリティ機能も、上述の例に限られるものではなく、ユーザが任意に設定できるものである。 The area for writing the security flag is not limited to 8 bits, and can be increased or decreased to the required number of bits. Further, the security function assigned to each bit is not limited to the above example, and can be arbitrarily set by the user.
図3は、図2に示したセキュリティフラグを設定するときの手順を示すフロー図である。 FIG. 3 is a flowchart showing a procedure for setting the security flag shown in FIG.
セキュリティフラグの書き込みを開始するために、外部装置100からセキュリティデータの送信を行うと(ステップS01)、CPU13は、PROM11のbit6のセキュリティフラグが設定済みかどうかを確認する(ステップS02)。
When security data is transmitted from the
bit6のセキュリティフラグが設定済みであれば(Y)、PROM11へのセキュリティフラグの追加書き込みが禁止状態であるので、新たなセキュリティフラグの設定を行うことはできず、セキュリティフラグの設定処理はそのまま終了する。
If the security flag for
bit6のセキュリティフラグが設定されていなければ(N)、以降、CPU13は、それぞれのビットごとに、送られてきたセキュリティデータ中にセキュリティフラグの設定要求があるかどうかを確認し、設定要求があればそのビットへの書き込みを行い、セキュリティフラグを設定する(ステップS03〜S16)。
If the
総てのビットの処理が終了すると、CPU13は、PROM11に設定されたデータを外部装置100へ返信し(ステップS17)、セキュリティフラグの設定処理を終了する。
When all the bits have been processed, the
図4は、アクセス制御部14によるアクセス制御の処理手順の例を示すフロー図である。ここでは、フラッシュメモリ14への書き換え要求に対する処理の例を示す。
FIG. 4 is a flowchart showing an example of an access control processing procedure performed by the
アクセス制御部14は、CPU13からのフラッシュメモリ14への書き換え要求があると(ステップS21)、PROM11のbit0のセキュリティフラグを読み出し(ステップS22)、bit0のセキュリティフラグが書き換え禁止に設定されているかどうかを確認する(ステップS23)。
When there is a rewrite request from the
bit0のセキュリティフラグが書き換え禁止に設定されていれば(Y)、アクセス制御部14はフラッシュメモリ14へのアクセスを禁止し(ステップS24)、bit0のセキュリティフラグが書き換え禁止に設定されていなければ(N)、アクセス制御部14はフラッシュメモリ14へのアクセスを許可して(ステップS24)、アクセス制御処理を終了する。
If the bit0 security flag is set to prohibit rewriting (Y), the
このような本実施例によれば、セキュリティフラグを1回だけ書き込み可能な不揮発性メモリ(PROM)に書き込むので、一度書き込んだセキュリティフラグが書き換えられることを防止でき、マイクロコンピュータのセキュリティ保護機能を強化することができる。 According to the present embodiment, since the security flag is written in the non-volatile memory (PROM) that can be written only once, the security flag once written can be prevented from being rewritten, and the security protection function of the microcomputer is enhanced. can do.
また、セキュリティフラグを書き込むPROMのビット数を複数とし、それぞれのビットにマイクロコンピュータに内蔵されるリソースに対するセキュリティ機能を割り当てることにより、マイクロコンピュータで実行されるプログラムの保護に加えて、マイクロコンピュータ内に格納されるさまざまなデータの保護が可能となり、マイクロコンピュータのセキュリティ保護機能をより向上させることができる。 In addition to the protection of programs executed by the microcomputer, the PROM to which the security flag is written has a plurality of bits, and a security function for resources incorporated in the microcomputer is assigned to each bit. Various kinds of stored data can be protected, and the security protection function of the microcomputer can be further improved.
また、PROMの各ビットに割り付けるセキュリティ機能をユーザが任意に設定できるので、マイクロコンピュータの用途に応じたセキュリティレベルの設定を行うことができる。 In addition, since the user can arbitrarily set the security function assigned to each bit of the PROM, the security level can be set according to the use of the microcomputer.
1 セキュリティ保護機能付きマイクロコンピュータ
11 PROM
12 アクセス制御部
13 CPU
14 フラッシュメモリ
15 RAM
16 I/O領域
1 Microcomputer with
12
14
16 I / O area
Claims (5)
前記不揮発性メモリに書き込まれた前記セキュリティフラグの設定に従って前記リソースに対するアクセスを制御するアクセス制御手段と
を有することを特徴とするセキュリティ保護機能付きマイクロコンピュータ。 Non-volatile memory that can be written only once to write security flags for multiple built-in resources;
An access control means for controlling access to the resource according to the setting of the security flag written in the nonvolatile memory.
ことを特徴とする請求項1に記載のセキュリティ保護機能付きマイクロコンピュータ。 The nonvolatile memory has a plurality of bits to be written for each bit, and the bit to which the security flag is written indicates prohibition of access to a predesignated resource. The microcomputer with a security protection function according to claim 1.
ことを特徴とする請求項2に記載のセキュリティ保護機能付きマイクロコンピュータ。 3. The microcomputer with security protection function according to claim 2, wherein the security flag includes a flag indicating prohibition of writing to the nonvolatile memory.
ことを特徴とする請求項2に記載のセキュリティ保護機能付きマイクロコンピュータ。 3. The microcomputer with security protection function according to claim 2, wherein the security flag includes a flag indicating prohibition of reading from the nonvolatile memory.
ことを特徴とする請求項1に記載のセキュリティ保護機能付きマイクロコンピュータ。 2. The microcomputer with security function according to claim 1, wherein the access control means inhibits access to the resource by inhibiting transmission of a read / write signal issued from a CPU.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007036720A JP2008203988A (en) | 2007-02-16 | 2007-02-16 | Security protection function-equipped microcomputer |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007036720A JP2008203988A (en) | 2007-02-16 | 2007-02-16 | Security protection function-equipped microcomputer |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008203988A true JP2008203988A (en) | 2008-09-04 |
Family
ID=39781465
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007036720A Withdrawn JP2008203988A (en) | 2007-02-16 | 2007-02-16 | Security protection function-equipped microcomputer |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008203988A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010286866A (en) * | 2009-06-09 | 2010-12-24 | Oki Semiconductor Co Ltd | Micro-controller device |
JP2016015020A (en) * | 2014-07-02 | 2016-01-28 | 株式会社デンソー | Microcomputer and security setting system |
-
2007
- 2007-02-16 JP JP2007036720A patent/JP2008203988A/en not_active Withdrawn
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010286866A (en) * | 2009-06-09 | 2010-12-24 | Oki Semiconductor Co Ltd | Micro-controller device |
JP2016015020A (en) * | 2014-07-02 | 2016-01-28 | 株式会社デンソー | Microcomputer and security setting system |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6306578B2 (en) | Memory protection device and protection method | |
US7421534B2 (en) | Data protection for non-volatile semiconductor memory using block protection flags | |
JP4939387B2 (en) | Data processing apparatus and address space protection method | |
US6453397B1 (en) | Single chip microcomputer internally including a flash memory | |
JP2001014871A (en) | Non-volatile semiconductor storage | |
JP4256859B2 (en) | Semiconductor memory device | |
JP3875153B2 (en) | Nonvolatile semiconductor memory device and its rewrite prohibition control method | |
JP2001356963A (en) | Semiconductor device and its control device | |
CN110020561B (en) | Semiconductor device and method of operating semiconductor device | |
TW201521028A (en) | Apparatuses for securing software code stored in a non-volatile memory | |
JP2008203988A (en) | Security protection function-equipped microcomputer | |
JP2008123106A (en) | Microcomputer and debug method for microcomputer | |
US7281103B2 (en) | Microcomputer with a security function for accessing a program storage memory | |
JP2004287541A (en) | Nonvolatile memory access control system | |
CN110888653A (en) | Control method and system for reading and writing firmware in memory, electronic equipment and chip | |
JP4865064B2 (en) | Semiconductor device | |
US20100312978A1 (en) | Computer system, information protection method, and program | |
KR19990078265A (en) | Microcomputer | |
US20220113879A1 (en) | System with Increasing Protected Storage Area and Erase Protection | |
JP2005107608A (en) | Electronic device, nonvolatile memory, and method for rewriting data of nonvolatile memory | |
JP2003203012A (en) | Microcomputer device | |
JP4118023B2 (en) | Memory control circuit | |
JP2004355383A (en) | Memory control circuit | |
JP2006040073A (en) | Integrated circuit and access control method therefor | |
JP2005135036A (en) | Memory controller |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A711 | Notification of change in applicant |
Free format text: JAPANESE INTERMEDIATE CODE: A712 Effective date: 20081226 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090210 |
|
A300 | Application deemed to be withdrawn because no request for examination was validly filed |
Free format text: JAPANESE INTERMEDIATE CODE: A300 Effective date: 20100511 |