logo资料库

MMC-FAT16-File-System-Specification-v1.0(MMC卡资料).pdf

第1页 / 共24页
第2页 / 共24页
第3页 / 共24页
第4页 / 共24页
第5页 / 共24页
第6页 / 共24页
第7页 / 共24页
第8页 / 共24页
资料共24页,剩余部分请下载后查看
1 Introduction
2 Physical CHS geometry
3 Master Boot Record
3.1 Partition entry format
3.2 Address translations
4 File system
4.1 Partition Boot Record
4.2 Variable parameters in PBR
4.3 Miscellaneous notes on allocation tables and PBR
5 Directory entries
5.1 Long filename support
5.2 Filename character sets
5.3 FAT/VFAT16 caveats
5.4 Example of long filename entries
5.5 Example of file system memory layout
Appendix A: Abbreviations
Appendix B: References
The MultiMediaCard FAT16 File System Specification Version 1.0 MMCA Technical Committee
MultiMediaCard System Revision History Version Date Section/ Page Changes compared to previous issue 0.1 1.0 03/03 all all Initial file system spec proposal to MMCA Originator:MMCA FS workgroup Author:Juha Liinamaa Conversion to MMCA look and feel formats 2 MultiMediaCard FAT16 File System Specification Version 1.0 Official Release (c) March 2003 MMCA
MultiMediaCard System You acknowledge that the attached standard (the “Standard”) is provided to you on an “AS IS” basis. MULTIMEDIACARD ASSOCIATION (“MMCA”) MAKES NO EXPRESS, IMPLIED OR STATUTORY WARRANTIES AND EXPRESSLY DISCLAIMS THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON- INFRINGEMENT OF THIRD PARTY RIGHTS. MMCA SHALL NOT BE LIABLE FOR (I) TECHNICAL OR EDITORIAL ERRORS OR OMISSIONS CONTAINED WITHIN THE STANDARD, OR (II) ANY INCIDENTAL, SPECIAL, EXEMPLARY OR CONSEQUENTIAL DAMAGES (INCLUDING WITHOUT LIMITATION LOST PROFITS OR LOSS OF USE) RESULTING FROM THE FURNISHING, PERFORMANCE OR USE OF THE STANDARD, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Copyright (c) March 2003 MultiMediaCard Association, 19672 Stevens Creek Blvd., #404, Cupertino, CA 95014-2465. World rights reserved. No part of this publication may be transmitted, reproduced or distributed in any way, including but not limited to photocopying, electronic copying, magnetic or other recording, without the prior written consent of MMCA. MultiMediaCard FAT16 File System Specification Version 1.0 Official Release (c) March 2003 MMCA 3
MultiMediaCard System 4 MultiMediaCard FAT16 File System Specification Version 1.0 Official Release (c) March 2003 MMCA
MultiMediaCard System Table Of Contents 1 2 Introduction ............................................................................................................................. 7 Physical CHS geometry ........................................................................................................... 7 3 Master Boot Record ................................................................................................................. 9 Partition entry format ......................................................................................................... 10 3.1 3.2 Address translations ............................................................................................................ 11 4 4.1 4.2 4.3 5 5.1 5.2 5.3 5.4 5.5 File system............................................................................................................................... 12 Partition Boot Record ......................................................................................................... 12 Variable parameters in PBR ............................................................................................... 13 Miscellaneous notes on allocation tables and PBR ............................................................ 15 Directory entries .................................................................................................................... 17 Long filename support ........................................................................................................ 17 Filename character sets ....................................................................................................... 18 FAT/VFAT16 caveats ........................................................................................................ 19 Example of long filename entries ....................................................................................... 19 Example of file system memory layout .............................................................................. 20 Appendix A: Abbreviations ........................................................................................................... 23 Appendix B: References ................................................................................................................. 24 MultiMediaCard FAT16 File System Specification Version 1.0 Official Release (c) March 2003 MMCA 5
MultiMediaCard System 6 MultiMediaCard FAT16 File System Specification Version 1.0 Official Release (c) March 2003 MMCA
MultiMediaCard System 1 Introduction Introduction Purpose of this document is to define the details of FAT16 file system for MultiMediaCards’ user data area. First of all, various FAT systems have their roots in magnetic media (floppy disks and hard drives). With that background, FAT file system introduces some need to relate the byte-unit linearly addressed MultiMediaCard and conventional magnetic media. In order to maintain consistency at all levels, this document deals with the following specifics: - CHS geometry: how to translate the card characteristics into the conventional CHS geometry of magnetic media - Master Boot Record (partitioning): how and why to introduce the MultiMediaCard as logical hard drive(s), conversions between physical and logical addresses and addressing modes - Partition Boot Record(s), aka partition boot sector: how to define the actual FAT16 file system within a partition - Directory entries: how to create files and directories (with conventional 8+3 filenames) - Optional long filename support (VFAT): how to avoid breaking inter operability between sys- tems that do support VFAT and those that don’t CHS geometry is used as a basis for all calculations to maintain consistency throughout all addressing modes. Physical CHS geometry 2 The goal of this chapter is to define a way to calculate a physical (media-based) CHS geometry for an arbi- trary card with the following guidelines: - Calculated CHS should reflect card properties and potential as they are expressed in the card CSD register and MultiMediaCard System Specification - Singular conversions between addressing modes (CHS, linear sector and linear card address) - Simple and efficient conversion methods - Minimal waste of card memory capacity in address conversions In order to simplify the expressions, the following notations are defined. Practical implementation of these notations should be straightforward on any platform. floor(x): closest integer ≤ x ceil(x): closest integer ≥ x ceil2(x): closest even integer ≥ x rem(x, y): remainder of integer division (x/y). The remainder, x and y are ≥ 0 - - - - - min(r): smallest value found in a finite-length range of numbers - max(r): largest value found in a finite-length range of numbers The following table summarizes the all the factors that need to be considered at this point Table 1: Physical CHS calculation parameters Acronym M W S Explanation Card memory capacity as expressed in the card CSD register Sector Size Number of Sectors per Head Range 98304 to 232 512 32 Unit byte byte sector MultiMediaCard FAT16 File System Specification Version 1.0 Official Release (c) March 2003 MMCA 7
Introduction MultiMediaCard System Table 1: Physical CHS calculation parameters Acronym P H C Explanation Number of Sectors on media (aka Number of Physical sectors, aka LBA’s) Number of Heads per Cylinder Number of Cylinders on media (aka Number of Physical cylin- ders) Range floor(min(M)/W) to floor(max(M)/W) [2, 4, 6,..., 256] [3, 4, 5,..., 1024] Unit sector head cylinder Min(M) is the smallest card capacity for which the FAT16 system described in this document can be imple- mented; reasons for this limitation become more obvious later on. Max(M) is ultimately limited by the MultiMediaCard bus protocol itself with its byte-based 32-bit addressing. Thus, maximal capacity is 4GB. Sector size (W) was defined to be 512 bytes as it is the ‘de facto’ standard of current disks, file system imple- mentations and MultiMediaCards. However, if the card does not support data transfer operations at 512-byte granularity, host SW must provide support for the 512-byte sector size. Limitations on parameters C, H and S are introduced to maintain compatibility with the traditional BIOS int13h hard drive interface of PC computers. Parameter H is forced to even values in order to maintain consis- tency with disk drives; it makes sense that both sides of “disk platters” are used in conventional disk drives. Parameter S is fixed to 32 sectors for a number of reasons. It simplifies calculations, neatly divides the card capacity to fixed 16kB chunks and is sufficient to address the maximal card capacity: max C( ) max H( ⋅ ) S W 1024 ⋅ ( ⋅ ⁄ )KB = 1024 256 32 0.5KB ⋅ ⋅ ⋅ = 4194304KB = 4GB Furthermore, it is the maximum number of card write blocks in the smallest card erase unit (erase sector). Assuming 512-byte write block and powers-of-two logic in the card memory hierarchy, it exactly covers one 8 MultiMediaCard FAT16 File System Specification Version 1.0 Official Release (c) March 2003 MMCA
分享到:
收藏