Académique Documents
Professionnel Documents
Culture Documents
APPLICATION
NOTE
December 1998
Intel may make changes to specifications and product descriptions at any time, without notice.
Contact your local Intel sales office or your distributor to obtain the latest specifications and before placing your product order.
Copies of documents which have an ordering number and are referenced in this document, or other Intel literature, may be
obtained from:
Intel Corporation
P.O. Box 5937
Denver, CO 80217-9808
or call 1-800-858-4725
or visit Intel’s Website at http://www.intel.com
PAGE
6.0 VIRTUAL PAGE MAP–LOCATING THE VIRTUAL BLOCK MAP PAGES ............................................ 13
6.1 Page Map Handling............................................................................................................................. 13
6.2 Replacement Pages............................................................................................................................ 13
6.2.1 Replacement Page Map ............................................................................................................... 13
APPENDIX B: Structures............................................................................................................................ 17
APPENDIX C: Availablility.......................................................................................................................... 19
3
AP-684 E
REVISION HISTORY
Number Description
-001 Original Version
-002 Document formerly referred to as a technical paper; assigned application note number.
Legal disclaimer updated.
4
E
1.0 INTRODUCTION
AP-684
5
AP-684 E
R/W R/W 2 R/W 3
MAP Block 1 Sec 6 Sec 19
Sec 12
R/W 4 R/W 5 R/W 6 R/W 7
Sec 65 free Sec 0 deleted
FTL MAP
etc.
(VPM, VBM,
and BAM)
MAP
Example:
DOS requests
sector 14-FTL
map points to
R/W Block 21
for the data R/W 21
Sec 14
7681
Program
1111 1111B (FFH) 0111 1111B (7FH)
0111 1111B
Program
0111 1111B (7FH) 0011 1111B (3FH)
0011 1111B
Program
0011 1111B (3FH) 0011 1111B (3FH)
1111 1111B
7816_02
6
E AP-684
Read/Write Block
Erase Unit
Read/Write Block
Erase Unit
Read/Write Block
Read/Write Block
Erase Unit
Read/Write Block
Erase Unit
Read/Write Block
7816_03
Figure 3. Erase Unit Divided into Read/Write Blocks. Each Read/Write Block Is the Same Size as a
Virtual Block (Sector) Used by the Software Layers above FTL.
7
AP-684
8
E
3.2 Block Allocation Information to build the Virtual Page Map. Read/Write blocks
AP-684
7816_04
9
AP-684
10
E
4.0 VERIFY FTL PARTITION
AP-684
11
AP-684 E
Erase Unit Header
000A0600
Logical Address A0600
000C0800
Virtual Block Data, Logical Address C0800
Virtual Map Pages and
Replacement Pages 00000000 Use Repacement
Page Entry
0000CC00
Logical Address CC00
7816_05
12
E
for the desired Virtual Data block. Exactly how much of VBM Pages and Replacement Pages use negative BAM
AP-684
the VBM to maintain in RAM is dependent on available entries. Therefore, the virtual addresses are also
system memory and performance needs. In maintaining negative. A page’s virtual address can be calculated by
a portion of the VBM in RAM, FTL may not need to multiplying the page number by the size of a Virtual
update the media every time a Virtual Data block is block. One important item of note is the fact that the
written. page numbers are negative. The VBM Page would be
–NumVMPages and –1 would be the last page.
VBM entries may range from 0x00000000 to
0xFFFFFFFF. However, all values in between must be a
multiple of BlockSize. A VBM entry of 0x00000000 6.2 Replacement Pages
indicates that either the logical address of the Virtual
Data block is located on a Replacement Page if one Replacement VBM pages are identical to normal VBM
exists or that the block simply does not exist on the pages except for the fact that replacement pages have
media. A VBM entry of 0xFFFFFFFF also indicates that BAM entries with the least significant seven bits ending
the Virtual block does not exist on the media. FTL in 0x60 while normal VBM pages have BAM entries
returns BlockSize bytes of “0”s as virtual data if the host ending in 0x40. Both types of VBM pages have BAM
system requests a Virtual Data block not present on the entries with negative values. A Replacement Page is
media. used only if the original VBM Page has a VBM entry of
0x00000000 for the Virtual Data block being accessed.
• Related FTL Functions: If the corresponding entry in the Replacement Page is
Fill_VBM_PageMap also zero (0), then the Virtual block does not exist on the
media. Replacement Pages enhance performance by
minimizing the need to supersede VBM Pages when
6.0 VIRTUAL PAGE MAP–LOCATING logical addresses on a Page are updated and the existing
THE VIRTUAL BLOCK MAP entry is already used. A replacement page may delay the
need to rewrite the VBM Page. If the corresponding
PAGES entry on a Replacement Page is available, then it is used
and the original page need not be rewritten right away.
If any portion of the VBM is maintained on the media, Like normal VBM Pages, Replacement Pages are also
FTL must track and locate those VBM Pages. The allocated from any free Read/Write blocks in any Erase
Virtual Page Map (VPM) performs a function similar to Unit.
that of the VBM. Instead of mapping the location of
Virtual Data blocks, each entry in the VPM maps the
location of a VBM Page. The FTL specification does not 6.2.1 REPLACEMENT PAGE MAP
define a way to maintain the VPM on the media and
therefore typically must be constructed when the media FTL uses a duplicate VPM to keep track of the
is accessed for the first time. This is accomplished by Replacement Pages. The Replacement VPM is quite
scanning the media for VBM entries and constructing a similar to the normal VPM except that it points to the
table to them in system RAM. Replacement VBM pages. Each VBM Page is capable of
having a Replacement Page. Even though the
replacement VPM array is allocated large enough to map
6.1 Page Map Handling out a Replacement Page for every VBM Page, only one
Replacement Page should be implemented. This is to
The BAM is scanned to locate VBM Pages and guarantee compatibility and media interchangability
Replacement Pages and the logical locations are stored between all FTL solutions. The Replacement Page is
in the VPM. The total number of VBM Pages found located via a scan of the BAM at the time the media is
must equal NumVMPages. If a VBM Page is missing inserted.
and a Replacement Page exists for that page, the
Replacement page is used as the original VBM Page. If NOTE:
a VBM Page is missing and a Replacement Page does The FTL specification in PC Card 95 allows for
not exist, recovery operations must be performed. If up to four Replacement Pages at the present time.
duplicate VBM Pages are found, only one is used. This will be changed in future revisions to
specify only one Replacement Page.
13
AP-684
14
E AP-684
APPENDIX A
GLOSSARY
Block Allocation Map (BAM) ........................................................ This is a method of storing Block Allocation
Information about the status of Read/Write Blocks.
BIOS Parameter Block (BPB) ......................................................... This DOS FAT structure provides the Operating
System with information about the media and the
partition.
Erase Unit Header (EUH)................................................................ This header contains information specific to the
Erase Unit and global information about the entire
FTL partition.
Little - Endian ................................................................................. Method of storing data where the lowest byte address
contains the least significant byte.
Logical Erase Unit Number (LogicalEUN)..................................... Logical Unit Number. This is a logical number
assigned to a Erase Unit by FTL. This field is
contained in the EUH.
Memory Technology Driver (MTD) ............................................... This driver contain device specific algorithms.
Partition Boot Record (PBR)........................................................... This structure contains partition information and the
BPB.
15
AP-684 E
PCMCIA ..........................................................................................Personal Computer Memory Card International
Association
Physical Erase Unit Number (PhysicalEUN) ...................................This is a number assigned to an Erase Unit based on
its physical location on the media. This number
never changes for a Erase Unit.
16
E AP-684
APPENDIX B
STRUCTURES
17
AP-684 E
EUH struct – Erase Unit Header Structure (Continued)
Offset Size Field Description
36 WORD NumVMPages Total number of VBM pages.
38 BYTE Flags Special bit-mapped flags indicating checksum, block
allocation information, and flash polarity.
39 BYTE Code Binary value designating type of EDAC, ECC, CRC, or
checksum maintained for Virtual block data. No such
information is present if the field is in the erase state. In
the non-erase state, such information was present at a
time, but is no longer maintained. For a value of one, a
two- byte checksum is computed and maintained for each
Virtual block.
40 BYTE SerialNumber[4] Partition serial number.
44 DWORD AltEUHOffset Offset of alternative EUH.
48 DWORD BAMOffset Offset of BAM from start of EUH. This value is expressed
in bytes and is only valid if the Flags - HiddenAreaFlag is
set to zero (0). The BAM need not be aligned on a Virtual
Block boundary. If the Flags - DoubleBAI bit is set to one
(1), two copies of the BAM are maintained on the media.
If checksums, CRCs, or ECCs are used in the Erase Unit,
these codes follow the block allocation information.
52 BYTE Reserved[12] Reserved for future use.
18
E APPENDIX C
AP-684
FTL AVAILABILITY
SystemSoft FTL
SystemSoft, Inc. (Main) SystemSoft, Inc. (West)
2 Vision Dr. 2350 Mission College Blvd
Natick, MA 01760 Suite 450
Santa Clara, CA 95054-1534
Tel: (508) 651-0088 Tel: (408) 988-6756
FAX: (508) 651-8188 FAX: (408) 988-6758
email: wizard@systemsoft.com email: wizard@systemsoft.com
WWW: http://www.systemsoft.com WWW: http://www.systemsoft.com
19
AP-684
APPENDIX D
E
ADDITIONAL INFORMATION
Related Documents
PC Card Standard, Media Storage Formats Specification and the Flash Translation Layer Specification are available
through PCMCIA:
PCMCIA
2635 North First Street
San Jose, CA 95134
Related Information
FTL is based on Intellectual Property and patent(s) from M-Systems, Ltd. All rights are reserved by M-Systems. M-
Systems does grant a royalty-free, non-exclusive license for the design and development of FTL-compatible drivers,
file systems, and utilities using the data formats with PCMCIA PC Cards as described in the FTL Specification. Please
see the PC Card standard, available from PCMCIA, for detailed information.
M-Systems provides software which incorporates the FTL standards and algorithms. For information on contacting
them, or other FTL providers, please refer to Appendix C, FTL Availability.
20