US 7,480,775 B2
Method and apparatus for block-oriented memory management provided in smart card controllers
Rainer Nase, Vienna (Austria)
Assigned to Austria Card Plastikkarten und Ausweissysteme GmbH, Vienna (Austria)
Appl. No. 10/541,284
PCT Filed Dec. 30, 2003, PCT No. PCT/EP03/14961
§ 371(c)(1), (2), (4) Date Dec. 08, 2005,
PCT Pub. No. WO2004/061673, PCT Pub. Date Jul. 22, 2004.
Claims priority of application No. 03000125 (EP), filed on Jan. 03, 2003.
Prior Publication US 2006/0149916 A1, Jul. 06, 2006
Int. Cl. G06F 12/00 (2006.01)
U.S. Cl. 711—154  [711/103; 711/170; 711/202; 711/206; 711/209; 714/15; 714/19] 7 Claims
OG exemplary drawing
 
1. A method for memory management in smart card controllers or similar restricted hardware environment by writing of data into a data space in a persistent memory, said method comprising:
a) splitting the persistent memory into blocks with fixed data length having logical block numbers (LBN);
b) selecting the size of blocks as such that it is equal to, or equivalent to an integer ratio of, the length of a page in EEPROM to the physical size of the pages of the EEPROM memory existing on the card;
c) providing a Block Allocation Table (BAT) in order to calculate the physical place of the block in memory from the logical block number;
d) defining a bit existing in each block header, whereby this bit corresponds to a bit existing in a commit block;
e) where toggling of the bit existing in the commit block toggles the validity of the corresponding memory block;
f) replacing individual memory blocks to accomplish a secure write mechanism by:
1) writing the update data for a block together with the unchanged data of the block to a new formerly free block;
2) committing the operation by writing a new commit field after finishing the update process; and
3) erasing the old data blocks which contain non-updated data and updating the BAT so that the physical blocks for the updated logical blocks are exchanged, whereby respective old and new logical blocks are replaced by each other;
g) typically all commit bits of the commit field form the commit block and are located in on EEPROM page to prevent the system from losing a valid commit field if a power failure occurs during updating the commit block, the commit block is doubled and only one of the two commit blocks is valid at a time whereby an update of the commit block is always done by writing to the commit block not written to at the last update, because this is the commit block not containing valid commit data, where by the validity of the invalid commit block is determined by a two-bit counter (C0, C1), which is added to each commit block.