JP2021006973A - Semiconductor device, ic card, control method, and program - Google Patents
Semiconductor device, ic card, control method, and program Download PDFInfo
- Publication number
- JP2021006973A JP2021006973A JP2019121185A JP2019121185A JP2021006973A JP 2021006973 A JP2021006973 A JP 2021006973A JP 2019121185 A JP2019121185 A JP 2019121185A JP 2019121185 A JP2019121185 A JP 2019121185A JP 2021006973 A JP2021006973 A JP 2021006973A
- Authority
- JP
- Japan
- Prior art keywords
- patch
- function
- entry point
- module
- program
- 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.)
- Granted
Links
- 239000004065 semiconductor Substances 0.000 title claims abstract description 28
- 238000000034 method Methods 0.000 title claims description 61
- 125000000524 functional group Chemical group 0.000 claims description 8
- 238000004519 manufacturing process Methods 0.000 claims description 2
- 230000006870 function Effects 0.000 abstract description 277
- 230000015654 memory Effects 0.000 abstract description 17
- 238000012545 processing Methods 0.000 description 66
- 238000012790 confirmation Methods 0.000 description 10
- 238000010586 diagram Methods 0.000 description 9
- 238000000605 extraction Methods 0.000 description 9
- 238000012937 correction Methods 0.000 description 7
- CDFKCKUONRRKJD-UHFFFAOYSA-N 1-(3-chlorophenoxy)-3-[2-[[3-(3-chlorophenoxy)-2-hydroxypropyl]amino]ethylamino]propan-2-ol;methanesulfonic acid Chemical compound CS(O)(=O)=O.CS(O)(=O)=O.C=1C=CC(Cl)=CC=1OCC(O)CNCCNCC(O)COC1=CC=CC(Cl)=C1 CDFKCKUONRRKJD-UHFFFAOYSA-N 0.000 description 5
- 230000007547 defect Effects 0.000 description 5
- 239000000284 extract Substances 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000002950 deficient Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
Images
Landscapes
- Stored Programmes (AREA)
Abstract
Description
本発明は、半導体装置、ICカード、制御方法およびプログラムに関する。 The present invention relates to semiconductor devices, IC cards, control methods and programs.
近年、IC(integrated circuit)カードが多くの業種で用いられており、ICカードに組み込まれるオペレーティングシステム・プログラムやアプリケーション・プログラムも用途に応じて多種多様である。
これらのプログラムは、ICカードの作成時において、書き換えできないプログラムコード(以下、ROM(read only memory)コードと示す)として、マスクROMやフラッシュメモリなどに書き込まれている。
In recent years, IC (integrated circuit) cards have been used in many industries, and the operating system programs and application programs incorporated in IC cards are also diverse depending on the application.
These programs are written in a mask ROM, a flash memory, or the like as a program code that cannot be rewritten (hereinafter referred to as a ROM (read only memory) code) when the IC card is created.
上述したように、出荷時に書き込まれたプログラムの書き換えができないことにより、ROMコードとして書き込まれているプログラムに不具合が見つかった場合、このICカードの不具合を修正したプログラムが書き込まれたICカードと交換する必要がある。
近年、一枚のICカードに対して多くの機能を持たせる場合が多く、プログラムのコード数が多くなり、プログラムの動作に不具合を生じる割合が高くなっている。
As described above, if a defect is found in the program written as the ROM code due to the inability to rewrite the program written at the time of shipment, replace the IC card with the program that corrects the defect in this IC card. There is a need to.
In recent years, one IC card is often provided with many functions, the number of program codes increases, and the rate of problems in program operation increases.
このため、ROMコードの修正が発生する可能性が高いと推定される箇所に、修正プログラム(以下、パッチと示す)の適用をチェックする入り口(以下、エントリポイント)を設ける。
そして、パッチプログラムを書き換え可能なフラッシュメモリやEEPROM(electrically erasable programmable read only memory)にロードしておき、ROMコードの置き換えが必要であるか否かを、上記エントリポイントにおいて判定して、不具合のあったROMコードをパッチプログラムで置き換えて、プログラムのROMコードの修正を行っている(例えば、特許文献1参照)。
For this reason, an entrance (hereinafter, entry point) for checking the application of the patch (hereinafter, referred to as a patch) is provided at a place where it is presumed that the ROM code is likely to be modified.
Then, the patch program is loaded into a rewritable flash memory or EEPROM (electrically erasable programmable read only memory), and whether or not the ROM code needs to be replaced is determined at the above entry point, and there is a problem. The ROM code of the program is replaced with a patch program to correct the ROM code of the program (see, for example, Patent Document 1).
上述したように、不具合などにより修正する必要のあるプログラムのROMコードに代え、パッチプログラムが実行される(以下、パッチ処理と示す)場合、プログラムのROMコードに設けられたエントリポイントから、外部装置からロードしてフラッシュメモリやEEPROMに書き込まれたパッチプログラムが呼び出される。 As described above, when a patch program is executed (hereinafter referred to as patch processing) instead of the ROM code of the program that needs to be corrected due to a defect or the like, an external device is used from the entry point provided in the ROM code of the program. The patch program loaded from and written to the flash memory or EEPROM is called.
このとき、プログラムのROMコードに対してパッチ処理を行う際、エントリポイントに対応したパッチプログラムが用意されているか否かの検索を行う。
ここで、特許文献1においては、エントリポイントの各々にパッチが用意されているか否かを示すエントリポイントテーブルを設けておき、エントリポイント毎に付番した番号によりこのエントリポイントテーブルを検索する。
At this time, when patch processing is performed on the ROM code of the program, it is searched whether or not the patch program corresponding to the entry point is prepared.
Here, in Patent Document 1, an entry point table indicating whether or not a patch is prepared for each entry point is provided, and the entry point table is searched by a number assigned to each entry point.
そして、検索の結果において抽出したエントリポイントの番号に対応して、このエントリポイントのROMコードに対するパッチがあるか否かにより、エントリポイントにおけるパッチ処理が必要か否かの判定が行われる。
パッチ処理が必要である場合、エントリポイントテーブルにおいてエントリポイントに対応して記載されたパッチプログラムのアドレスを読出し、対象となるエントリポイントにおけるパッチ処理が行われる。
Then, it is determined whether or not patch processing at the entry point is necessary depending on whether or not there is a patch for the ROM code of the entry point corresponding to the number of the entry point extracted in the search result.
When patch processing is required, the address of the patch program described corresponding to the entry point is read in the entry point table, and patch processing is performed at the target entry point.
しかしながら、エントリポイントの数が増加するに従い、プログラムのROMコードにおけるエントリポイント毎に、エントリポイントテーブルを参照してパッチ処理を実行するための時間も増加して、プログラムの実行速度を低下させる原因となる。
また、引用文献1のように、エントリポイントテーブルにおいて、エントリポイント毎にパッチプログラムのアドレスを記載する場合、少なくともエントリポイントの数分、エントリポイントのID、エントリポイントに対応するパッチの有無、パッチのROMコードのアドレスを記載するための記憶領域が必要となり、フラッシュメモリやEEPROMにおける利用可能領域を低減させる。
However, as the number of entry points increases, the time required to refer to the entry point table and execute patch processing for each entry point in the program ROM code also increases, which causes the program execution speed to decrease. Become.
Further, when the address of the patch program is described for each entry point in the entry point table as in Reference 1, at least the number of entry points, the ID of the entry point, the presence / absence of the patch corresponding to the entry point, and the patch A storage area for describing the address of the ROM code is required, and the available area in the flash memory or the EEPROM is reduced.
本発明は、このような状況に鑑みてなされたもので、プログラムに付加されているエントリポイント毎にエントリポイントテーブルを用意することなくパッチプログラムを実行することにより、プログラムに記憶されたROMコードの実行時間の増加を抑制し、かつパッチ処理に必要な情報を記憶させるための記憶領域の増加を抑制し、フラッシュメモリやEEPROMなどの書き換え可能なメモリからなる記憶部における利用可能領域を低減させることがない半導体装置、ICカード、制御方法およびプログラムを提供する。 The present invention has been made in view of such a situation, and the ROM code stored in the program can be obtained by executing the patch program without preparing an entry point table for each entry point added to the program. Suppressing the increase in execution time, suppressing the increase in the storage area for storing information required for patch processing, and reducing the available area in the storage unit consisting of rewritable memory such as flash memory and EEPROM. Provides semiconductor devices, IC cards, control methods and programs without flash memory.
上述した課題を解決するために、本発明の一態様は、プログラムが記憶され、記憶されたデータの書き換えが不可能な第1記憶部と、前記プログラムを実行する制御部と、記憶されたデータの書き換えが可能であり、前記プログラムにおける前記関数モジュールと置き換えるモジュールであるパッチが記憶される第2記憶部と、前記第2記憶部に設けられており、前記プログラムにおける関数モジュールに付加されたエントリポイントの全てにおいて、前記パッチが用意されたエントリポイントが、少なくとも一つ以上存在するか否かを示すパッチ有無フラグを含むパッチデータを記憶するパッチパラメータ領域とを備えることを特徴とする半導体装置である。 In order to solve the above-mentioned problems, one aspect of the present invention is a first storage unit in which a program is stored and the stored data cannot be rewritten, a control unit that executes the program, and stored data. A second storage unit in which a patch, which is a module to replace the function module in the program, is stored, and an entry provided in the second storage unit and added to the function module in the program. A semiconductor device characterized in that all of the points include a patch parameter area for storing patch data including a patch presence / absence flag indicating whether or not at least one entry point for which the patch is prepared exists. is there.
また、本発明の一態様は、上記半導体装置であって、関数モジュールに配置された前記エントリポイントの各々を、当該関数モジュールの機能の種類に対応した機能グループそれぞれに分類しており、前記パッチデータが、前記機能グループに含まれる前記エントリポイントにおいて、前記パッチの用意されたエントリポイントが少なくとも一つ以上存在するか否かを示すパッチ機能フラグを含む。 Further, one aspect of the present invention is the above-mentioned semiconductor device, in which each of the entry points arranged in the function module is classified into each function group corresponding to the type of function of the function module, and the patch. The data includes a patch function flag indicating whether or not at least one or more prepared entry points of the patch exist at the entry point included in the function group.
また、本発明の一態様は、上記半導体装置であって、前記エントリポイントを識別するエントリポイント識別情報が、前記機能グループを示すグループ情報と、当該機能グループにおける前記エントリポイントに対応するパッチを示すパッチ情報とが組み合わされて生成されている。 Further, one aspect of the present invention is the semiconductor device, in which the entry point identification information for identifying the entry point indicates group information indicating the functional group and a patch corresponding to the entry point in the functional group. It is generated in combination with patch information.
また、本発明の一態様は、上記半導体装置であって、前記第2記憶部に対して自身の製造後に書き込まれた、前記関数モジュールと置き換えるパッチを含むパッチモジュールをさらに備え、前記制御部が、前記関数モジュールを実行する際、当該関数モジュールが前記エントリポイントを有する場合、前記パッチ有無フラグが前記パッチの用意されたエントリポイントがあることを示し、かつ当該関数モジュールのグループ情報が示す前記機能グループの前記パッチ機能フラグが当該機能グループに前記パッチが用意されたエントリポイントがあることを示す場合、前記パッチモジュールを実行する。 Further, one aspect of the present invention is the semiconductor device, further comprising a patch module including a patch to replace the function module written to the second storage unit after its manufacture, and the control unit. , When the function module is executed, if the function module has the entry point, the patch presence / absence flag indicates that there is an entry point for which the patch is prepared, and the function indicated by the group information of the function module. If the patch function flag of the group indicates that the function group has an entry point for which the patch is prepared, the patch module is executed.
また、本発明の一態様は、上記半導体装置であって、前記パッチモジュールにおいて、前記エントリポイントのパッチ情報に対応した前記パッチの各々が、前記機能グループ単位に分類されている。 Further, one aspect of the present invention is the semiconductor device, in which each of the patches corresponding to the patch information of the entry point is classified into the functional group unit in the patch module.
また、本発明の一態様は、上記半導体装置であって、前記制御部が、前記パッチモジュールに記載された機能グループにおける前記パッチのなかから前記パッチ情報に対応するパッチを、前記関数モジュールに代えて実行する。 Further, one aspect of the present invention is the semiconductor device, in which the control unit replaces the patch corresponding to the patch information from the patches in the functional group described in the patch module with the function module. And execute.
また、本発明の一態様は、少なくとも、上記半導体装置が搭載されているICカードである。 Further, one aspect of the present invention is at least an IC card on which the above-mentioned semiconductor device is mounted.
また、本発明の一態様は、記憶されたデータの書き換えが不可能な第1記憶部に記憶された、エントリポイントが付加された関数モジュールを含むプログラムを制御部が実行する際、前記エントリポイントを識別するエントリポイント識別情報が、前記関数モジュールの機能の種類に対応した機能グループを示すグループ情報と、当該機能グループにおける前記関数モジュールに対応するパッチを示すパッチ情報とが含まれており、前記制御部が、第2記憶部に記憶されている前記プログラムにおけるエントリポイントの全てにおいて、パッチの用意されたエントリポイントが少なくとも一つ以上存在するか否かを示すパッチ有無フラグと、前記機能グループに含まれる前記エントリポイントにおいて、パッチの用意されたエントリポイントが少なくとも一つ以上存在するか否かを示すパッチ機能フラグとを参照する過程と、前記制御部が、前記パッチ有無フラグが前記パッチが有ることを示し、かつ前記エントリポイントが含まれるパッチ機能フラグがパッチが有ることを示した場合、記憶されたデータの書き換えが可能な第2記憶部から、エントリポイントのパッチのプログラムを有するパッチモジュールを読出す過程と、前記制御部が、前記パッチモジュールにおいて前記機能グループに前記パッチが用意された前記エントリポイントがある場合、当該機能グループにおける前記パッチのなかから前記パッチ情報に対応するパッチを、前記関数モジュールに代えて実行する過程とを含む制御方法である。 Further, one aspect of the present invention is the entry point when the control unit executes a program including a function module to which an entry point is added, which is stored in a first storage unit in which the stored data cannot be rewritten. The entry point identification information for identifying the function includes group information indicating a function group corresponding to the type of function of the function module and patch information indicating a patch corresponding to the function module in the function group. The control unit sets the patch presence / absence flag indicating whether or not at least one patch-prepared entry point exists in all the entry points in the program stored in the second storage unit, and the function group. In the included entry point, the process of referring to the patch function flag indicating whether or not at least one entry point for which a patch is prepared exists, and the control unit has the patch presence / absence flag of the patch. When the fact is indicated and the patch function flag including the entry point indicates that there is a patch, the patch module having the entry point patch program is output from the second storage unit capable of rewriting the stored data. In the process of reading and when the control unit has the entry point in which the patch is prepared in the function group in the patch module, the patch corresponding to the patch information is selected from the patches in the function group. It is a control method including a process to be executed instead of a function module.
また、本発明の一態様は、記憶されたデータの書き換えが不可能な第1記憶部に記憶された、エントリポイント識別情報に識別されるエントリポイントが付加された関数モジュールを含むプログラムをコンピュータに実行させる際、前記コンピュータを、第2記憶部に記憶されている前記プログラムにおけるエントリポイントの全てにおいて、パッチの用意されたエントリポイントが少なくとも一つ以上存在するか否かを示すパッチ有無フラグと、前記関数モジュールを機能別に分類した機能グループに含まれる前記エントリポイントにおいて、パッチの用意されたエントリポイントが少なくとも一つ以上存在するか否かを示すパッチ機能フラグとを参照する手段、前記パッチ有無フラグが前記パッチが有ることを示し、かつ前記エントリポイントが含まれるパッチ機能フラグがパッチが有ることを示した場合、記憶されたデータの書き換えが可能な第2記憶部から、エントリポイントのパッチのプログラムを有するパッチモジュールを実行する手段として機能させるプログラムである。 Further, one aspect of the present invention is to provide a computer with a program including a function module in which an entry point identified by an entry point identification information is added, which is stored in a first storage unit in which the stored data cannot be rewritten. When executing the computer, a patch presence / absence flag indicating whether or not at least one patch-prepared entry point exists in all the entry points in the program stored in the second storage unit, and A means for referring to a patch function flag indicating whether or not at least one entry point for which a patch is prepared exists at the entry point included in a function group in which the function module is classified by function, the patch presence / absence flag. Indicates that the patch is present, and the patch function flag that includes the entry point indicates that the patch is present, the program of the entry point patch is provided from the second storage unit in which the stored data can be rewritten. It is a program that functions as a means for executing a patch module having.
また、本発明の一態様は、記憶されたデータの書き換えが不可能な第1記憶部に記憶された、エントリポイント識別情報に識別されるエントリポイントが付加された関数モジュールを含むプログラムをコンピュータに実行させる際、前記コンピュータを、前記エントリポイントのパッチのプログラムを有するパッチモジュールにおいて、前記関数モジュールを機能別に分類した機能グループに前記パッチが用意された前記エントリポイントがある場合、当該機能グループにおける前記パッチのなかから、前記エントリポイントに対応するパッチを示すパッチ情報に対応するパッチを、前記関数モジュールに代えて実行する手段、として機能させ、前記エントリポイント識別情報が、前記関数モジュールの機能の種類に対応した機能グループを示すグループ情報と、当該機能グループにおける前記関数モジュールに対応するパッチを示す前記パッチ情報とが含まれているプログラムである。 Further, one aspect of the present invention is to provide a computer with a program including a function module in which an entry point identified by an entry point identification information is added, which is stored in a first storage unit in which the stored data cannot be rewritten. When the computer is executed, in the patch module having the program of the patch of the entry point, if the entry point in which the patch is prepared is in the functional group in which the function module is classified according to the function, the said in the functional group. Among the patches, the patch corresponding to the patch information indicating the patch corresponding to the entry point is made to function as a means for executing the patch in place of the function module, and the entry point identification information is the type of function of the function module. It is a program including the group information indicating the function group corresponding to the above and the patch information indicating the patch corresponding to the function module in the function group.
以上説明したように、本発明によれば、プログラムに付加されているエントリポイント毎にエントリポイントテーブルを用意することなくパッチプログラムを実行することにより、プログラムに記憶されたROMコードの実行時間の増加を抑制し、かつパッチ処理に必要な情報を記憶させるための記憶領域の増加を抑制し、EEPROMなどの書き換え可能なメモリからなる記憶部における利用可能領域を低減させることがない半導体装置、制御方法およびプログラムを提供する。 As described above, according to the present invention, by executing the patch program without preparing an entry point table for each entry point added to the program, the execution time of the ROM code stored in the program is increased. A semiconductor device and a control method that suppresses an increase in a storage area for storing information required for patch processing and does not reduce the available area in a storage unit composed of a rewritable memory such as an EEPROM. And provide programs.
以下、本発明の一実施形態について、図面を参照して説明する。
図1は、本発明の一実施形態による半導体装置1の構成例を示すブロック図である。
図1において、半導体装置1は、CPU(central processing unit)、メモリなどを構成する半導体素子を用いたIC(integrated circuit)を備え、情報を処理および記憶する装置である。
半導体装置1は、ICカード、SIM(subscriber identity module)カードなどである。図1に示す半導体装置1は、制御部11とデータ入出力部12と記憶部13とを備える。
Hereinafter, an embodiment of the present invention will be described with reference to the drawings.
FIG. 1 is a block diagram showing a configuration example of a semiconductor device 1 according to an embodiment of the present invention.
In FIG. 1, the semiconductor device 1 is a device including an IC (integrated circuit) using semiconductor elements constituting a CPU (central processing unit), a memory, and the like, and processes and stores information.
The semiconductor device 1 is an IC card, a SIM (subscriber identity module) card, or the like. The semiconductor device 1 shown in FIG. 1 includes a control unit 11, a data input /
制御部11は、CPU111を備え、記憶部13に記憶されているプログラム(例えば、アプリケーションプログラムや後述するモジュールなどのプログラム)を実行することで、所定の処理を行う。
データ入出力部12は、所定のプロトコルに従って外部装置(不図示)とのデータの送受信を行う。
The control unit 11 includes a
The data input /
記憶部13は、ROM131、EEPROM132及びRAM(random access memory)133を有する。
ROM131には、半導体装置1の製造の際に書き込まれる、ROMコードの形態のプログラム150が記憶されている。このプログラム150は、例えば、公共系、金融系及び交通系などの業界あるいはグループの提供するICカードで利用するサービスの処理を行うアプリケーションプログラムなどである。ROM131において、プログラム150はROMコードで書き込まれているため、不具合を有する関数モジュールが含まれていても書き換えることができない。本実施形態において、ROMコードでプログラムが記載された書き換え不能のROMとしてマスクROM131を用いているが、マスクROMに換えてフラッシュメモリを用いてもよい。
The
The
このため、上記プログラム150には、不具合が発生して修正することが予想される、あるいはアプリケーションの関係で書き換えることを前提とする関数モジュールに対してエントリポイントを付加させてある。
本実施形態においては、上記エントリポイントを識別するエントリポイント識別情報が、機能番号及び個別番号との組合せで形成されている。
機能番号は、プログラム150における関数モジュールの各々を機能(例えば、暗号機能、通信機能、数値計算機能などの各種機能)別に分類した機能グループを識別するグループ情報である。
個別番号は、機能番号が示す各々の機能グループにおいて、この機能グループに含まれるパッチのそれぞれを個別に識別するパッチ情報である。
For this reason, the
In the present embodiment, the entry point identification information for identifying the entry point is formed by a combination of a function number and an individual number.
The function number is group information that identifies a function group in which each of the function modules in the
The individual number is patch information that individually identifies each of the patches included in this function group in each function group indicated by the function number.
本実施形態において、エントリポイント識別情報は2バイト(xxyyh)で記述されており、機能番号がxxhの1バイト、個別番号がyyhの1バイトである。
例えば、暗号機能の機能番号が01hであり、暗号機能の機能グループにおける個別番号が02hである場合、エントリポイント識別情報は、0102hで表される。
また、本実施形態においては、1バイトの機能番号と1バイトの個別番号とで、エントリポイント識別情報が2バイトとして説明している。しかしながら、プログラムに含まれる関数モジュール(エントリポイントが付加される関数モジュール)の機能の種類の数と、機能グループにおけるパッチの数とにより、エントリポイント識別情報のバイト数を任意に設定する。
In the present embodiment, the entry point identification information is described in 2 bytes (xxxhyh), the function number is 1 byte of xxxh, and the individual number is 1 byte of yyh.
For example, when the function number of the cryptographic function is 01h and the individual number in the function group of the cryptographic function is 02h, the entry point identification information is represented by 0102h.
Further, in the present embodiment, the entry point identification information is described as 2 bytes by the 1-byte function number and the 1-byte individual number. However, the number of bytes of the entry point identification information is arbitrarily set according to the number of function types of the function module (function module to which the entry point is added) included in the program and the number of patches in the function group.
EEPROM132には、パッチモジュール250とパッチパラメータ350とが記憶されている。EEPROM132は、書き換え可能な不揮発性メモリであれば何れでもよく、例えばフラッシュメモリを用いた構成としてもよい。
ここで、制御部11は、データ入出力部12を介して、外部装置からパッチモジュール250が供給された場合、パッチモジュール250と、このパッチモジュール250に対応したパッチパラメータ350をEEPROM132に書き込んで記憶させる。
The
Here, when the
パッチモジュール250(後述する800)は、プログラム150において、不具合などで修正を必要とする関数モジュール、言い換えると、関数モジュールに付加されたエントリポイントに対応するパッチプログラムが、その関数モジュールの機能の種類で分類されてそれぞれの機能グループ単位に記述されている(詳細は後述)。
The patch module 250 (800 described later) is a function module that needs to be corrected due to a defect in the
パッチパラメータ350は、少なくとも、パッチ有無フラグと、パッチ機能フラグと、パッチ領域先頭アドレスとである。パッチパラメータ350は、EEPROM132における予め設定されたアドレスが既知のパッチパラメータ領域に書き込まれている。
図2は、EEPROM132のパッチパラメータ領域に書き込まれるパッチパラメータ350の構成例を示す図である。
The patch parameter 350 is at least a patch presence / absence flag, a patch function flag, and a patch area start address. In the patch parameter 350, a preset address in the
FIG. 2 is a diagram showing a configuration example of the patch parameter 350 written in the patch parameter area of the
パッチ有無フラグ301は、エントリポイントが付加された関数モジュールの各々において、置き換えるパッチが存在する関数モジュールが少なくとも1個以上あるか否かを示すフラグである。パッチ有無フラグは、例えば、置き換えるパッチが存在する関数モジュールが少なくとも1個以上ある場合「ON」であり、一方、置き換えるパッチが存在する関数モジュールが無い場合「OFF」である。
The patch presence /
パッチ機能フラグ302、303及び304の各々は、関数モジュールの機能の種類毎に分類した機能グループにおいて、置き換えるパッチが存在する関数モジュールが少なくとも1個以上あるか否かを示すフラグである。パッチ機能フラグ302、303及び304の各々は、例えば、それぞれに対応する機能グループ毎に置き換えるパッチが存在する関数モジュールが少なくとも1個以上ある場合「ON」であり、一方、置き換えるパッチが存在する関数モジュールが全く無い場合「OFF」である。例えば、パッチ機能フラグ302は、機能番号00hの示す、例えばメイン機能の機能グループに対応したフラグである。パッチ機能フラグ303は、機能番号01hの示す、例えば通信機能の機能グループに対応したフラグである。パッチ機能フラグ304は、機能番号02hの示す、例えば暗号機能の機能グループに対応したフラグである。
Each of the patch function flags 302, 303, and 304 is a flag indicating whether or not there is at least one function module in which the patch to be replaced exists in the function group classified according to the function type of the function module. Each of the patch function flags 302, 303 and 304 is, for example, "ON" when there is at least one function module having a patch to be replaced for each function group corresponding to each, while a function having a patch to be replaced. If there are no modules, it is "OFF". For example, the
パッチ領域先頭アドレス305は、EEPROM132におけるパッチモジュール250が書き込まれた記憶領域の先頭アドレスを示している。
The patch area start
RAM133は、制御部11がプログラム150を実行する際のメインメモリとして用いられる。
The
図3は、プログラム150におけるエントリポイントの付加された関数モジュールの記述例を示す図である。
図3において、プログラム150は、例えば、メイン関数モジュール500、関数モジュール600、エントリポイントモジュール700などを備えている。
メイン関数モジュール500には、所定のアプリケーションの機能を実行するために必要な関数501や502などの複数の関数が記述されている。
関数モジュール600は、制御部11が実際に実行する関数501の機能に対応した処理を示す実体のコードが記述されている。
FIG. 3 is a diagram showing a description example of a function module to which an entry point is added in the
In FIG. 3, the
In the
In the
関数501にエントリポイントが設定されている場合、メイン関数モジュール600には、エントリポイント関数601のコードが付加されている。
エントリポイント関数601は、エントリポイントモジュール700を呼び出して実行させる関数である。
エントリポイントモジュール700には、制御部11が実際に実行するエントリポイント関数601の機能に対応した処理を示す実体のコードが記述されている。エントリポイントモジュール700には、第1分岐処理701、機能番号抽出処理702、第2分岐処理703が記述されている。ここで、第1分岐処理701は、パッチ有無フラグがONか否かを判定する処理である。機能番号抽出処理702は、エントリポイント識別情報から機能番号を抽出する処理である。第2分岐処理703は、パッチ機能フラグがONか否かを判定する処理である。
第2分岐処理703には、パッチ機能フラグがONの場合に、パッチモジュール800(図4参照)を実行させるパッチ関数704が記述されている。
When an entry point is set in the
The
In the
In the
図1に戻り、制御部11は、関数501を実行する際、関数501に記述されている関数501の実体である関数モジュール600の記憶されたアドレス(マスクROM131におけるアドレス)を読み込み、関数モジュール600を実行する。ここで、実体とは、制御部11が実際に実行する関数501の機能が記述されたROMコードを示している。
そして、制御部11は、関数モジュール600がエントリポイント関数601を含む場合、エントリポイント関数601に記述されたエントリポイントモジュール700を呼び出すアドレスを読み込み、エントリポイントモジュール700のROMコードの処理を実行する。
Returning to FIG. 1, when executing the
Then, when the
このとき、制御部11は、エントリポイントモジュール700に記述された第1分岐処理701の記述の処理により、EEPROM132のパッチパラメータ領域におけるパッチパラメータ350のパッチ有無フラグを参照する。
そして、制御部11は、パッチ有無フラグがONであるか否かの判定を行い、ONであれば機能番号抽出処理702の記述の処理を実行し、一方、パッチ有無フラグがOFFであれば、関数モジュール600に戻る処理(リターン処理)を行い、関数モジュール600に記述された処理を実行する。
At this time, the control unit 11 refers to the patch presence / absence flag of the patch parameter 350 in the patch parameter area of the
Then, the control unit 11 determines whether or not the patch presence / absence flag is ON, and if it is ON, executes the process of describing the function
また、制御部11は、パッチ有無フラグがONである場合、エントリポイントモジュール700に記述された機能番号抽出処理702の処理により、エントリポイント識別情報から機能番号を抽出する。
そして、制御部11は、EEPROM132におけるパッチパラメータ領域に記憶されているパッチパラメータ350において、抽出した機能番号に対応するパッチ機能フラグを参照する。
制御部11は、参照したパッチ機能フラグがONであるか否かの判定を行い、ONであればパッチ関数704に対応してパッチモジュール800の処理を実行し、一方、パッチ機能フラグがOFFであれば、関数モジュール600に戻り、関数モジュール600に記述された処理を実行する。
Further, when the patch presence / absence flag is ON, the control unit 11 extracts the function number from the entry point identification information by the process of the function
Then, the control unit 11 refers to the patch function flag corresponding to the extracted function number in the patch parameter 350 stored in the patch parameter area in the
The control unit 11 determines whether or not the referenced patch function flag is ON, and if it is ON, executes the processing of the
制御部11は、EEPROM132において、パッチモジュール800が記憶された記憶領域の先頭アドレスであるパッチ領域先頭アドレス305を、パッチパラメータ350から読み出す。
そして、制御部11は、パッチ領域先頭アドレス305の領域に記憶されているパッチモジュール800に記述された処理を実行する。
In the
Then, the control unit 11 executes the process described in the
図4は、エントリポイントモジュールにおけるパッチ関数により実行されるパッチモジュールの記述例を示す図である。パッチモジュールは、プログラム150の不具合を修正する必要が生じた際、制御部11が外部装置からパッチモジュール800(パッチモジュール250)のコードをロードして、EEPROM132に、パッチパラメータ350とともに書き込んで記憶させる。
図4において、パッチモジュール800には、制御部11が実際に実行するパッチ関数704の入れ替えるべき関数モジュールに対するパッチ処理を示す実体のコードが記述されている。すなわち、パッチモジュール800には、機能番号及び個別番号抽出処理801、パッチ機能フラグ確認処理802、第3分岐処理803、エントリポイント修正処理804、第3分岐処理805、エントリポイント修正処理806、パッチ機能フラグ確認処理807などが記述されている。
FIG. 4 is a diagram showing a description example of a patch module executed by a patch function in the entry point module. When it becomes necessary for the patch module to correct a defect in the
In FIG. 4, the
機能番号及び個別番号抽出処理801は、エントリポイント識別情報から、エントリポイントに付与されている機能番号及び個別番号の各々を抽出する処理である。
パッチ機能フラグ確認処理802及び807の各々は、それぞれ機能番号02h、06hのパッチ機能フラグがONであるか否かの判定を行う。このパッチ機能フラグ確認処理は、関数モジュールを置き換えるパッチが少なくとも1個が存在する機能グループに対応して設けられている。
The function number and individual
Each of the patch function flag confirmation processes 802 and 807 determines whether or not the patch function flags of the function numbers 02h and 06h are ON, respectively. This patch function flag confirmation process is provided corresponding to a function group in which at least one patch that replaces a function module exists.
第3分岐処理803及び805の各々は、それぞれエントリー識別情報から抽出された個別番号が01h、03hであるか否かを判定している。この第3分岐処理は、機能ブロックにおける関数モジュールと置き換えるパッチに対応した個数が設けられている。
エントリポイント修正処理804及び806の各々は、それぞれエントリー識別情報から抽出された個別番号が01h、03hであった場合に、関数モジュールとパッチとを置き換えるパッチ処理として記述されている。
Each of the
Each of the entry point correction processes 804 and 806 is described as a patch process that replaces the function module and the patch when the individual numbers extracted from the entry identification information are 01h and 03h, respectively.
図1に戻り、制御部11は、機能番号及び個別番号抽出処理801の記述に対応して、引数として得られたエントリポイント識別情報から、対応するエントリポイントの機能番号及び個別番号の各々を抽出する。
次に、制御部11は、EEPROM132のパッチパラメータ領域におけるパッチパラメータ350において、抽出した機能番号に対応するパッチ機能フラグを参照する。
そして、制御部11は、抽出した機能番号に対応したパッチ機能フラグ確認処理、例えば、機能番号が02hである場合、パッチ機能フラグ確認処理802を実行する。一方、制御部11は、抽出し機能番号が06hである場合にパッチ機能フラグ確認処理807を実行する。
Returning to FIG. 1, the control unit 11 extracts each of the function number and the individual number of the corresponding entry point from the entry point identification information obtained as an argument corresponding to the description of the function number and the individual
Next, the control unit 11 refers to the patch function flag corresponding to the extracted function number in the patch parameter 350 in the patch parameter area of the
Then, the control unit 11 executes the patch function flag confirmation process corresponding to the extracted function number, for example, when the function number is 02h, the patch function
制御部11は、抽出した機能番号に対応するパッチ機能フラグ確認処理を実行し、抽出した機能番号の示すパッチ機能フラグがONであるか否かの判定を行う。
そして、制御部11は、抽出した機能番号の示すパッチ機能フラグがONである場合、第3分岐処理803、805、…などを順次実行し、抽出した個別番号に対応する第3分岐処理の有無を判定する。例えば、抽出した機能番号が02hであり、機能番号02hのパッチ機能フラグがONである場合、制御部11は、順次、第3分岐処理803、805、…において、抽出した個別番号と一致する第3分岐処理があるか否かの判定を行う。
The control unit 11 executes the patch function flag confirmation process corresponding to the extracted function number, and determines whether or not the patch function flag indicated by the extracted function number is ON.
Then, when the patch function flag indicated by the extracted function number is ON, the control unit 11 sequentially executes the
このとき、制御部11は、個別番号が01hか否かの判定を行う第3分岐処理803において、抽出した個別番号が01hである場合、第3分岐処理803に記述されたエントリポイント修正処理804を実行する。
また、制御部11は、個別番号が03hか否かの判定を行う第3分岐処理805において、抽出した個別番号が03hである場合、第3分岐処理805に記述されたエントリポイント修正処理806を実行する。
一方、制御部11は、抽出した個別番号に対応する第3分岐処理が存在しない場合、関数モジュール600に戻り、当該関数モジュール600の機能処理をコード記述に対応して実行する。
At this time, when the extracted individual number is 01h in the
Further, in the
On the other hand, when the third branch processing corresponding to the extracted individual number does not exist, the control unit 11 returns to the
上記構成により、本実施形態によれば、第1分岐処理により、メイン関数モジュール500においてエントリポイントが付加された関数の関数モジュールの中に、パッチと置き換える関数モジュールが少なくとも1個以上あるか否かをパッチ有無フラグで確認するため、置き換えを行う関数モジュールが無い場合、従来のようにテーブルを参照してエントリポイントに対応するパッチの有無を、テーブルのエントリポイント毎に確認する必要が無く、プログラムの処理速度を向上させることができる。
With the above configuration, according to the present embodiment, whether or not there is at least one function module to be replaced with the patch in the function module of the function to which the entry point is added in the
また、本実施形態によれば、関数モジュールの機能の種類毎の機能グループに分類する機能番号と、機能グループ内におけるパッチを識別する個別番号とを組み合わせ、各エントリポイントを識別するエントリポイント識別情報を構成しているため、エントリポイント毎にそれぞれの属する機能グループに対応するパッチ機能フラグにより、パッチと置き換える関数モジュールが少なくとも1個以上あるか否かを判定するため、エントリポイントの属する機能ブロックの機能番号に対応したパッチ機能フラグがOFFである場合、従来のようにテーブルを参照してエントリポイントに対応するパッチの有無を、テーブルのエントリポイント毎に確認する必要が無く、プログラムの処理速度を向上させることができる。一方、エントリポイントの属する機能ブロックの機能番号に対応したパッチ機能フラグがONである場合、機能ブロックに属するパッチと置き換える関数モジュールに対応した個数の第3分岐処理により、エントリポイントの個別番号に対応するパッチ処理を検索する。 Further, according to the present embodiment, the entry point identification information for identifying each entry point by combining the function number classified into the function group for each function type of the function module and the individual number for identifying the patch in the function group. Therefore, in order to determine whether or not there is at least one function module to replace the patch by the patch function flag corresponding to each function group to which the entry point belongs, the function block to which the entry point belongs When the patch function flag corresponding to the function number is OFF, it is not necessary to refer to the table and check the presence or absence of the patch corresponding to the entry point for each entry point in the table as in the past, and the processing speed of the program can be increased. Can be improved. On the other hand, when the patch function flag corresponding to the function number of the function block to which the entry point belongs is ON, the individual number of the entry point is supported by the third branch processing of the number corresponding to the function module to be replaced with the patch belonging to the function block. Search for patching to do.
上述したように、本実施形態によれば、上記第1分岐処理、第2分岐処理及び第3分岐処理により、従来のようにエントリポイントに対するパッチの有無を、エントリポイントが存在する毎に、このエントリポイントと、テーブルにおける全てのエントリポイントの各々とを比較し、関数モジュールと置き換えるパッチを検索する処理を行わないため、プログラムにおける関数モジュールにおいてエントリポイントが付加された全ての関数モジュールと、当該関数モジュールと置き換えるパッチとの対応を示すテーブルを設ける必要がなくなり、エントリポイントが増加しても、従来のようにパッチのコード以外のパッチ処理に必要な記憶領域の増加が抑制することが可能となり、EEPROMなどの書き換え可能なメモリからなる記憶部における利用可能領域の圧迫を防止することができる。 As described above, according to the present embodiment, the presence or absence of the patch for the entry point is determined by the first branch processing, the second branch processing, and the third branch processing, each time the entry point exists, as in the conventional case. Since the process of comparing the entry point with each of all the entry points in the table and searching for the patch to be replaced with the function module is not performed, all the function modules to which the entry point is added in the function module in the program and the function concerned. It is no longer necessary to provide a table showing the correspondence between the module and the patch to be replaced, and even if the entry point increases, it is possible to suppress the increase in the storage area required for patch processing other than the patch code as in the past. It is possible to prevent pressure on the available area in the storage unit including the rewritable memory such as the EEPROM.
以下、図5、図6及び図7を用いて、本実施形態における第1分岐処理及び第2分岐処理の動作を説明する、図5は、プログラム150における第1分岐処理及び第2分岐処理の動作例を説明するフローチャートである。図6は、関数モジュールにおけるエントリポイントに対応したパッチが存在しない場合の第1分岐処理及び第2分岐処理の動作を説明する概念図である。図6(a)は、パッチパラメータにおけるパッチ有無フラグ、パッチ先頭アドレス及びパッチ機能フラグの設定を示している。図6(b)は、メイン関数モジュール500、関数モジュール600及びエントリポイントモジュール700のコードの記述例を示している。図7は、関数モジュールにおけるエントリポイントに対応したパッチが存在する場合の第1分岐処理及び第2分岐処理の動作を説明する概念図である。図7(a)は、パッチパラメータにおけるパッチ有無フラグ、パッチ先頭アドレス及びパッチ機能フラグの設定を示している。図7(b)は、メイン関数モジュール500、関数モジュール600、エントリポイントモジュール700及びパッチモジュール800のコードの記述例を示している。
Hereinafter, the operations of the first branch processing and the second branch processing in the present embodiment will be described with reference to FIGS. 5, 6 and 7. FIG. 5 shows the first branch processing and the second branch processing in the
制御部11は、プログラム150を実行し、メイン関数モジュール500における関数501の実体である関数モジュール600を呼び出して処理を行う。このとき、制御部11は、エントリポイント関数601(エントリポイント)の検出を行う(ステップS1)。
制御部11は、エントリポイント関数601の処理において、エントリポイントモジュール700を呼び出す。制御部11は、EEPROM132におけるパッチパラメータ350を参照し、パッチ有無フラグを読み込む(ステップS2)。
The control unit 11 executes the
The control unit 11 calls the
制御部11は、読み込んだパッチ有無フラグがONであるか否かの判定を行う(ステップS3)。このとき、制御部11は、読み込んだパッチ有無フラグがONである(図7(a)の記載、パッチ領域先頭アドレスとして、例えば、012345hが記述されている)場合、処理をステップS4へ進める。
一方、制御部11は、読み込んだパッチ有無フラグがOFFである(図6(a)の記載、パッチ領域先頭アドレスが記述されていない)場合、処理を終了する。すなわち、制御部11は、関数モジュール600に戻り、関数モジュール600における関数501の処理を行う。
上述したステップS2及びステップS3が第1分岐処理である。
The control unit 11 determines whether or not the read patch presence / absence flag is ON (step S3). At this time, when the read patch presence / absence flag is ON (the description in FIG. 7A, for example, 012345h is described as the patch area start address), the control unit 11 proceeds to the process in step S4.
On the other hand, when the read patch presence / absence flag is OFF (the description in FIG. 6A and the patch area start address are not described), the control unit 11 ends the process. That is, the control unit 11 returns to the
The above-mentioned steps S2 and S3 are the first branch processing.
制御部11は、エントリポイント関数601から引数として与えられるエントリポイント識別情報、例えばエントリポイント識別情報0201hから、2バイトにおける上位1バイトの機能番号02hを抽出する(ステップS4)。
制御部11は、EEPROM132におけるパッチパラメータ350を参照し、機能番号に対応する、すなわち機能番号02hに対応するパッチ機能フラグを読み込み、機能グループにパッチがある(関数モジュールに対してパッチが適用されている)ことを確認する(ステップS5)。
The control unit 11 extracts the function number 02h of the upper 1 byte in 2 bytes from the entry point identification information given as an argument from the
The control unit 11 refers to the patch parameter 350 in the
制御部11は、パッチ機能フラグがONか否かにより、処理中の関数モジュールの属する機能グループ内にパッチが適用されている関数モジュールが有るか否かの判定を行う(ステップS6)。このとき、制御部11は、パッチ機能フラグがONである(機能番号の示す機能グループ内の関数モジュールにパッチが適用されている)場合、処理をステップS7へ進める。一方、制御部11は、パッチ機能フラグがOFFである(機能番号の示す機能グループ内の関数モジュールにパッチが適用されていない)場合、処理を終了する。すなわち、制御部11は、エントリポイントモジュール700から関数モジュール600に戻り、関数モジュール600における関数501の処理を行う。
上述したステップS5及びステップS6が第2分岐処理である。
The control unit 11 determines whether or not there is a function module to which the patch is applied in the function group to which the function module being processed belongs, depending on whether or not the patch function flag is ON (step S6). At this time, if the patch function flag is ON (the patch is applied to the function module in the function group indicated by the function number), the control unit 11 proceeds to step S7. On the other hand, when the patch function flag is OFF (the patch is not applied to the function module in the function group indicated by the function number), the control unit 11 ends the process. That is, the control unit 11 returns from the
The above-mentioned steps S5 and S6 are the second branch processing.
制御部11は、パッチ関数704を実行し、EEPROM132におけるパッチパラメータ350を参照し、パッチ領域先頭アドレス(012345h)を読み込み、このパッチ先頭アドレスによりパッチモジュール800を呼び出して、パッチ処理(第3分岐処理を含む)を行う(ステップS7)。
The control unit 11 executes the
以下、図8及び図7を用いて、本実施形態における第3分岐処理の動作を説明する、図8は、エントリポイントモジュール700から読み出されるパッチモジュール800における第3分岐処理の動作例を説明するフローチャートである。
Hereinafter, the operation of the third branch processing in the present embodiment will be described with reference to FIGS. 8 and 7. FIG. 8 describes an operation example of the third branch processing in the
制御部11は、エントリポイントモジュール700において、機能番号及び個別番号抽出処理801により、エントリポイントモジュール700から引数として与えられるエントリポイント識別情報0201hから、上位1バイトの02hを機能番号として、下位1バイトの01hを個別番号として抽出する(ステップS11)。
制御部11は、EEPROM132におけるパッチパラメータ350を参照し、抽出した機能番号02hに対応するパッチ機能フラグを読み込む。制御部11は、抽出した機能フ番号02hに対応するパッチ機能フラグ確認処理802を行う(ステップS12)。
In the
The control unit 11 refers to the patch parameter 350 in the
制御部11は、機能番号02hに対応するパッチ機能フラグがONであるか否かにより、分岐がある(機能番号02hに対応する機能グループにおいて関数モジュールと置き換えるパッチがあり、個別番号を検索するという分岐がある)か否かの判定を行う(ステップS13)。このとき、制御部11は、機能番号02hに対応するパッチ機能フラグがONである(個別番号を検索するという分岐がある)場合、処理をステップS13へ進める。一方、制御部11は、パッチ機能フラグがOFFである(個別番号を検索するという分岐がない)場合、処理を終了する。すなわち、制御部11は、パッチモジュール800から、エントリポイントモジュール700を介して関数モジュール600に戻り、関数モジュール600における関数501の処理を行う。
The control unit 11 has a branch depending on whether or not the patch function flag corresponding to the function number 02h is ON (there is a patch to replace the function module in the function group corresponding to the function number 02h, and the individual number is searched. It is determined whether or not there is a branch (step S13). At this time, if the patch function flag corresponding to the function number 02h is ON (there is a branch to search for an individual number), the control unit 11 advances the process to step S13. On the other hand, when the patch function flag is OFF (there is no branch to search for an individual number), the control unit 11 ends the process. That is, the control unit 11 returns from the
制御部11は、パッチ機能フラグ確認処理802における第3分岐処理を順次行い、抽出した個別番号01hの第3分岐処理803の有無、すなわちパッチを適用するという分岐が有るかを確認する(ステップS14及びステップS15)。このとき、制御部11は、パッチを適用するという分岐としての第3分岐処理803が有る場合、処理をステップS16へ進める。一方、制御部11は、パッチを適用するという分岐としての第3分岐処理803が有る場合、処理を終了する。すなわち、制御部11は、パッチモジュール800から、エントリポイントモジュール700を介して関数モジュール600に戻り、関数モジュール600における関数501の処理を行う。
制御部11は、エントリポイント識別情報0201hの関数モジュールに対する修正処理(エントリポイント修正処理804)を行う(ステップS16)。
The control unit 11 sequentially performs the third branch processing in the patch function
The control unit 11 performs a correction process (entry point correction process 804) for the function module of the entry point identification information 0201h (step S16).
以上、この発明の実施形態を図面を参照して詳述してきたが、具体的な構成はこの実施形態に限られるものではなく、この発明の要旨を逸脱しない範囲の設計等も含まれる。 Although the embodiment of the present invention has been described in detail with reference to the drawings, the specific configuration is not limited to this embodiment, and the design and the like within a range not deviating from the gist of the present invention are also included.
1…半導体装置
11…制御部
12…データ入出力部
13…記憶部
111…CPU
131…マスクROM
132…EEPROM
133…RAM
150…プログラム
250,800…パッチモジュール
350…パッチパラメータ
600…関数モジュール
700…エントリポイントモジュール
1 ... Semiconductor device 11 ...
131 ... Mask ROM
132 ... EEPROM
133 ... RAM
150 ...
Claims (10)
前記プログラムを実行する制御部と、
記憶されたデータの書き換えが可能であり、前記プログラムにおける前記関数モジュールと置き換えるモジュールであるパッチが記憶される第2記憶部と、
前記第2記憶部に設けられており、前記プログラムにおける関数モジュールに付加されたエントリポイントの全てにおいて、前記パッチが用意されたエントリポイントが、少なくとも一つ以上存在するか否かを示すパッチ有無フラグを含むパッチデータを記憶するパッチパラメータ領域と
を備えることを特徴とする半導体装置。 The first storage unit where the program is stored and the stored data cannot be rewritten,
A control unit that executes the program and
A second storage unit that can rewrite the stored data and stores a patch that is a module that replaces the function module in the program, and
A patch presence / absence flag provided in the second storage unit and indicating whether or not at least one entry point for which the patch is prepared exists in all the entry points added to the function module in the program. A semiconductor device including a patch parameter area for storing patch data including.
前記パッチデータが、前記機能グループに含まれる前記エントリポイントにおいて、前記パッチの用意されたエントリポイントが少なくとも一つ以上存在するか否かを示すパッチ機能フラグを含む
ことを特徴とする請求項1に記載の半導体装置。 Each of the entry points placed in the function module is classified into each function group corresponding to the type of function of the function module.
The first aspect of the present invention is characterized in that the patch data includes a patch function flag indicating whether or not at least one or more prepared entry points of the patch exist at the entry point included in the function group. The described semiconductor device.
ことを特徴とする請求項2に記載の半導体装置。 The entry point identification information for identifying the entry point is generated by combining group information indicating the function group and patch information indicating a patch corresponding to the entry point in the function group. The semiconductor device according to claim 2.
前記制御部が、前記関数モジュールを実行する際、当該関数モジュールが前記エントリポイントを有する場合、前記パッチ有無フラグが前記パッチが用意されたエントリポイントがあることを示し、かつ当該関数モジュールのグループ情報が示す前記機能グループの前記パッチ機能フラグが当該機能グループに前記パッチが用意されたエントリポイントがあることを示す場合、前記パッチモジュールを実行する
ことを特徴とする請求項3に記載の半導体装置。 It further comprises a patch module containing a patch to replace the function module written to the second storage after its manufacture.
When the control unit executes the function module, if the function module has the entry point, the patch presence / absence flag indicates that there is an entry point for which the patch is prepared, and the group information of the function module. The semiconductor device according to claim 3, wherein the patch module is executed when the patch function flag of the function group indicated by indicates that the function group has an entry point in which the patch is prepared.
前記エントリポイントのパッチ情報に対応した前記パッチの各々が、前記機能グループ単位に分類されている
ことを特徴とする請求項4に記載の半導体装置。 In the patch module
The semiconductor device according to claim 4, wherein each of the patches corresponding to the patch information of the entry point is classified into the functional group unit.
前記パッチモジュールに記載された機能グループにおける前記パッチのなかから前記パッチ情報に対応するパッチを、前記関数モジュールに代えて実行する
ことを特徴とする請求項5に記載の半導体装置。 The control unit
The semiconductor device according to claim 5, wherein a patch corresponding to the patch information is executed in place of the function module from the patches in the functional group described in the patch module.
ことを特徴とするICカード。 An IC card characterized in that at least the semiconductor device according to any one of claims 1 to 6 is mounted.
前記エントリポイントを識別するエントリポイント識別情報が、前記関数モジュールの機能の種類に対応した機能グループを示すグループ情報と、当該機能グループにおける前記関数モジュールに対応するパッチを示すパッチ情報とが含まれており、
前記制御部が、第2記憶部に記憶されている前記プログラムにおけるエントリポイントの全てにおいて、パッチの用意されたエントリポイントが少なくとも一つ以上存在するか否かを示すパッチ有無フラグと、前記関数モジュールの機能の種類に対応した機能グループに含まれる前記エントリポイントにおいて、パッチの用意されたエントリポイントが少なくとも一つ以上存在するか否かを示すパッチ機能フラグとを参照する過程と、
前記制御部が、前記パッチ有無フラグが前記パッチが有ることを示し、かつ前記エントリポイントが含まれるパッチ機能フラグがパッチが有ることを示した場合、記憶されたデータの書き換えが可能な第2記憶部から、エントリポイントのパッチのプログラムを有するパッチモジュールを読出す過程と、
前記制御部が、前記パッチモジュールにおいて前記機能グループに前記パッチが用意された前記エントリポイントがある場合、当該機能グループにおける前記パッチのなかから前記パッチ情報に対応するパッチを、前記関数モジュールに代えて実行する過程と
を含むことを特徴とする制御方法。 When the control unit executes a program containing a function module with an entry point added, which is stored in the first storage unit in which the stored data cannot be rewritten.
The entry point identification information that identifies the entry point includes group information indicating a function group corresponding to the type of function of the function module and patch information indicating a patch corresponding to the function module in the function group. Ori,
The control unit has a patch presence / absence flag indicating whether or not at least one patch-prepared entry point exists in all the entry points in the program stored in the second storage unit, and the function module. In the process of referring to the patch function flag indicating whether or not at least one patch-prepared entry point exists in the entry point included in the function group corresponding to the function type of
When the control unit indicates that the patch presence / absence flag indicates that the patch is present, and the patch function flag that includes the entry point indicates that the patch is present, the stored data can be rewritten. The process of reading the patch module with the entry point patch program from the section,
When the control unit has the entry point in which the patch is prepared in the function group in the patch module, the patch corresponding to the patch information from the patches in the function group is replaced with the function module. A control method characterized by including a process to be performed.
前記コンピュータを、
第2記憶部に記憶されている前記プログラムにおけるエントリポイントの全てにおいて、パッチの用意されたエントリポイントが少なくとも一つ以上存在するか否かを示すパッチ有無フラグと、前記関数モジュールを機能別に分類した機能グループに含まれる前記エントリポイントにおいて、パッチの用意されたエントリポイントが少なくとも一つ以上存在するか否かを示すパッチ機能フラグとを参照する手段、
前記パッチ有無フラグが前記パッチが有ることを示し、かつ前記エントリポイントが含まれるパッチ機能フラグがパッチが有ることを示した場合、記憶されたデータの書き換えが可能な第2記憶部から、エントリポイントのパッチのプログラムを有するパッチモジュールを実行する手段
として機能させるプログラム。 When a computer is made to execute a program including a function module in which an entry point identified in the entry point identification information is added, which is stored in the first storage unit in which the stored data cannot be rewritten.
The computer
The patch presence / absence flag indicating whether or not at least one patch-prepared entry point exists in all the entry points in the program stored in the second storage unit, and the function module are classified by function. A means for referring to a patch function flag indicating whether or not at least one patch-prepared entry point exists in the entry point included in the function group.
When the patch presence / absence flag indicates that the patch is present and the patch function flag including the entry point indicates that the patch is present, the entry point is transmitted from the second storage unit capable of rewriting the stored data. A program that acts as a means of executing a patch module that has a patch program for.
前記コンピュータを、
前記エントリポイントのパッチのプログラムを有するパッチモジュールにおいて、前記関数モジュールを機能別に分類した機能グループに前記パッチが用意された前記エントリポイントがある場合、当該機能グループにおける前記パッチのなかから、前記エントリポイントに対応するパッチを示すパッチ情報に対応するパッチを、前記関数モジュールに代えて実行する手段、
として機能させ、前記エントリポイント識別情報が、前記関数モジュールの機能の種類に対応した機能グループを示すグループ情報と、当該機能グループにおける前記関数モジュールに対応するパッチを示す前記パッチ情報とが含まれている
プログラム。 When a computer is made to execute a program including a function module in which an entry point identified in the entry point identification information is added, which is stored in the first storage unit in which the stored data cannot be rewritten.
The computer
In a patch module having a patch program for the entry point, if the entry point for which the patch is prepared is in a function group in which the function module is classified by function, the entry point is selected from the patches in the function group. A means for executing a patch corresponding to the patch information indicating the patch corresponding to the above function module in place of the function module.
The entry point identification information includes group information indicating a function group corresponding to the type of function of the function module and patch information indicating a patch corresponding to the function module in the function group. Program.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019121185A JP7284003B2 (en) | 2019-06-28 | 2019-06-28 | Semiconductor device, IC card, control method and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2019121185A JP7284003B2 (en) | 2019-06-28 | 2019-06-28 | Semiconductor device, IC card, control method and program |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2021006973A true JP2021006973A (en) | 2021-01-21 |
JP7284003B2 JP7284003B2 (en) | 2023-05-30 |
Family
ID=74174482
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2019121185A Active JP7284003B2 (en) | 2019-06-28 | 2019-06-28 | Semiconductor device, IC card, control method and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP7284003B2 (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6355631A (en) * | 1986-08-27 | 1988-03-10 | Fujitsu Ltd | Patch control method for program |
JPH03269726A (en) * | 1990-03-20 | 1991-12-02 | Fujitsu Ltd | Patch system for rom program |
JPH0452834A (en) * | 1990-06-15 | 1992-02-20 | Mitsubishi Electric Corp | Electronic computer |
US20040107416A1 (en) * | 2002-12-02 | 2004-06-03 | Microsoft Corporation | Patching of in-use functions on a running computer system |
JP2010113549A (en) * | 2008-11-06 | 2010-05-20 | Dainippon Printing Co Ltd | Ic card and method for execution of patch code |
-
2019
- 2019-06-28 JP JP2019121185A patent/JP7284003B2/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPS6355631A (en) * | 1986-08-27 | 1988-03-10 | Fujitsu Ltd | Patch control method for program |
JPH03269726A (en) * | 1990-03-20 | 1991-12-02 | Fujitsu Ltd | Patch system for rom program |
JPH0452834A (en) * | 1990-06-15 | 1992-02-20 | Mitsubishi Electric Corp | Electronic computer |
US20040107416A1 (en) * | 2002-12-02 | 2004-06-03 | Microsoft Corporation | Patching of in-use functions on a running computer system |
JP2010113549A (en) * | 2008-11-06 | 2010-05-20 | Dainippon Printing Co Ltd | Ic card and method for execution of patch code |
Also Published As
Publication number | Publication date |
---|---|
JP7284003B2 (en) | 2023-05-30 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7424570B2 (en) | Method for patching ROM instructions in an electronic embedded system including at least a further memory portion | |
US9348597B2 (en) | Device and method for bypassing a first program code portion with a replacement program code portion | |
JP2015501039A (en) | Writing data in the smart card's non-volatile memory | |
CN108170456B (en) | Firmware upgrading method and device for electronic equipment | |
CN112540725A (en) | Nonvolatile data storage method, embedded system and storage medium | |
CN106709386B (en) | Smart card data writing method and device | |
JP7284002B2 (en) | Semiconductor device, control method and program | |
JP2021006973A (en) | Semiconductor device, ic card, control method, and program | |
JP2010113549A (en) | Ic card and method for execution of patch code | |
US7353348B2 (en) | Nonvolatile memory and card reader provided with the same | |
KR20230019032A (en) | Pre-personalized secure element and embedded personalization | |
US7684992B2 (en) | Remote application correction | |
JP2017228222A (en) | Electronic information storage medium, abnormality detection method and abnormality detection program | |
JP2008146343A (en) | Ic card, and method for calling update program | |
EP3023925B1 (en) | Secure element with applications | |
CN104657185A (en) | Java code patching method of Java card | |
CN111090542A (en) | Abnormal block identification method and device based on abnormal power failure and computer equipment | |
JP5708228B2 (en) | IC card and IC card refresh method | |
JP2006293706A (en) | Multi-application ic card with application updating function | |
EP4145271A1 (en) | Methods and terminal for updating converted applet file, and java card device | |
JP2007034434A (en) | Ic card, method for writing data to ic card, and ic card program | |
EP4024254A1 (en) | Method and device for updating data | |
JP6915338B2 (en) | IC card | |
JP7010084B2 (en) | Token device used for IC payment | |
CN115291930A (en) | Component version management method and device, computer equipment and storage medium |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20190726 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20220513 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20230208 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20230214 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20230412 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20230425 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20230518 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 7284003 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S111 | Request for change of ownership or part of ownership |
Free format text: JAPANESE INTERMEDIATE CODE: R313115 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |