www.ti.com
Functional Description
The ROM Code retrieves a map of the booting file from the FAT table. The booting file map is a collection
of all FAT table entries related to the booting file (a FAT entry points to a cluster holding part of the file).
The booting procedure uses this map to access any 512 byte sector within the booting file without
involving ROM Code FAT module.
The sector read procedure utilizes standard MMC/SD raw data read function. The sector address is
generated based on the booting memory file map collected during the initialization. Hence the ROM Code
can address sectors freely within the booting file space.
26.1.7.5.7 FAT File system
This paragraph describes functions which are used by the ROM Code, it is not intended to fully describe
the Master Boot Record and the FAT file system:
• How to recognize if a sector is the 1
st
sector of an MBR
• How to recognize if a sector is the 1
st
sector of a FAT12/16/32
• How to find the 1
st
cluster of the booting file
• How to buffer the booting file FAT entries.
Some memory devices which support file systems can be formatted with or without MBR, therefore the
first task of the ROM Code is to detect whether or not the device is holding an MBR in the first sector.
If this is the case, an active FAT12/16/32 partition is searched in all 4 MBR partition entries, based on the
Type field. If the MBR entries are not valid or if no useable partition is found then the ROM Code returns
to the Booting procedure with FAIL. The Extended partitions are not checked, the booting file must reside
in a primary partition.
If a partition is found then its first sector is read and used further on. If no MBR is present (in case of a
floppy-like system), the first sector of the device is read and used further on.
The read sector is checked to be a valid FAT12/16 or FAT32 partition. If this fails, in case another partition
type is used (i.e. Linux FS or any other) or if the partition is not valid, the ROM Code returns with FAIL.
Otherwise, the Root Directory entries are searched for a file named depending on the booting device. The
Long File Names (LFN) format is not used and only File Names in 8.3 Format are searched for. If no
valid file is found, the ROM Code returns with FAIL.
Once the file has been found, the ROM Code reads the File Allocation Table (FAT) and buffers the singly-
linked chain of clusters in a FAT Buffer which will be used by the Booting Procedure to access the file
directly sector by sector. For FAT12/16 and for FAT32 (valid if a specific flag has been set in the FAT32
Boot Sector), there exist multiples copies of the FAT (ROM Code supports only 2 copies). When buffering
FAT entries, the 2 FATs are compared. If they are not the same, only entries from the last FAT are used.
The FAT Buffer holds sector numbers and not cluster numbers. The ROM Code converts each cluster
entry to one or several sector entries if applicable.
The whole process is described in Figure 26-19. Every part related to MBR or FAT12/16/32 is described in
the next paragraph.
4133
SPRUH73H–October 2011–Revised April 2013 Initialization
Submit Documentation Feedback
Copyright © 2011–2013, Texas Instruments Incorporated