Smart card
AssigneeTendyron Corporation
InventorDongsheng Li
Life of this patent
Estimating the term…
Abstract
The virtual machine includes a receiving module, an instruction assigning module, a downloading module, an application registry maintenance module, a state switching module, a storage managing module, and a communication module. The state switching module is configured to in response to determining that it is required to move the code segment, allocate a storage space of the off-chip FLASH for the code segment of the application to be loaded, acquire a second base address of the code segment of the application to be loaded, and modify the current running address as the second base address. The off-chip FLASH is configured to store the code segment of the application to be loaded on the off-chip FLASH.
Claims19
A smart card, at least comprising:
- a virtual machine and an on-chip FLASH, and further comprising an off-chip FLASH;
- wherein
- the virtual machine comprises:
- a receiving module, an instruction assigning module, a downloading module, an application registry maintenance module, a state switching module;
- a storage managing module, and a communication module;
- the receiving module is configured to receive a downloading instruction and transmit the downloading instruction to the instruction issuing module;
- the instruction assigning module is configured to receive the downloading instruction transmitted by the receiving module and trigger the downloading module to execute a corresponding operation;
- the downloading module is configured to acquire an intermediate code file of an application to be loaded;
- the intermediate code file at least comprising:
- a code segment of the application to be loaded and a first base address of the code segment of the application to be loaded;
- and the first base address being an address in the on-chip FLASH assigned by the virtual machine for the code segment of the application to be loaded;
- the application registry maintenance module is configured to generate an application registry key of the application to be loaded;
- the application registry key comprising at least:
- identification information of the application to be loaded, a current running address and a current storage address of the code segment of the application to be loaded;
- and the current running address being the first base address and the current storage address comprising the first base address;
- the state switching module is configured to determine whether it is required to move the code segment of the application to be loaded stored in the on-chip FLASH, according to a type of the application to be loaded, a requirement on running speed or a moving request input by the user;
- in response to determining that it is required to move the code segment, allocate by the storage managing module, a storage space of the off-chip FLASH for the code segment of the application to be loaded, acquire a second base address of the code segment of the application to be loaded, transmit to the communication module, a storage instruction for storing the code segment of the application to be loaded, and modify the current running address as the second base address, wherein the second base address is the base address of the code segment of the application to be loaded in the off-chip FLASH;
- the storage managing module is configured to allocate a storage space of the off-chip FLASH for the code segment of the application to be loaded;
- and
- the communication module is configured to transmit the storage instruction to the off-chip FLASH;
- wherein the off-chip FLASH is configured to, after receiving the storage instruction, store the code segment of the application to be loaded on the off-chip FLASH.
A method for loading an application in a smart card, the smart card comprising a virtual machine, an on-chip FLASH and an off-chip FLASH, the method comprising:
- receiving a downloading instruction of an application to be loaded;
- acquiring an intermediate code file of the application to be loaded;
- the intermediate code file at least comprising:
- a code segment of the application to be loaded and a first base address of the code segment of the application to be loaded, and the first base address being an address in the on-chip FLASH assigned by the virtual machine for the code segment of the application to be loaded;
- generating an application registry key of the application to be loaded;
- the application registry key comprising at least:
- identification information of the application to be loaded, a current running address and a current storage address of the code segment of the application to be loaded;
- and the current running address being the first base address and the current storage address comprising the first base address;
- determining whether it is required to move the code segment of the application to be loaded stored in the on-chip FLASH, according to a type of the application to be loaded, a requirement on running speed or a moving request input by the user;
- in response to determining that it is required to move the code segment, allocating a storage space of the off-chip FLASH for the code segment of the application to be loaded, acquiring a second base address of the code segment of the application to be loaded, and modifying the current running address as the second base address, wherein the second base address is the base address of the code segment of the application to be loaded in the off-chip FLASH;
- storing the code segment of the application to be loaded on the off-chip FLASH.
A non-transitory computer readable storage medium;
- having instructions stored thereon, wherein when the instructions are executed by a processor, the processor is configured to execute a method for loading an application in a smart card, the method comprises;
- receiving a downloading instruction of an application to be loaded;
- acquiring an intermediate code file of the application to be loaded;
- the intermediate code file at least comprising:
- a code segment of the application to be loaded and a first base address of the code segment of the application to be loaded, and the first base address being an address in the on-chip FLASH assigned by the virtual machine for the code segment of the application to be loaded;
- generating an application registry key of the application to be loaded;
- the application registry key comprising at least:
- identification information of the application to be loaded, a current running address and a current storage address of the code segment of the application to be loaded;
- and the current running address being the first base address and the current storage address comprising the first base address;
- determining whether it is required to move the code segment of the application to be loaded stored in the on-chip FLASH, according to a type of the application to be loaded, a requirement on running speed or a moving request input by the user;
- in response to determining that it is required to move the code segment, allocating a storage space of the off-chip FLASH for the code segment of the application to be loaded, acquiring a second base address of the code segment of the application to be loaded, and modifying the current running address as the second base address, wherein the second base address is the base address of the code segment of the application to be loaded in the off-chip FLASH;
- storing the code segment of the application to be loaded on the off-chip FLASH.
Dependencies are inferred from the claim text.