Preliminary
www.ti.com
Memory Booting
21.7.4.6 SD Read Sector Procedure in FAT Mode
SD cards may hold a FAT file system which ROM Code is able to read and process. The image used
by the booting procedure is taken from a specific booting file named “MLO”. This file has to be located
in the root directory on an active primary partition of type FAT12/16 or FAT32.
An SD card can be configured either as floppy-like or hard-drive-like.
•
When acting as floppy-like, the content of the card is a single file system without any master boot
record (MBR) holding a partition table
•
When acting as hard-drive-like, an MBR is present in the first sector of the card. This MBR holds a
table of partitions, one of which must be FAT12/16/32, primary and active.
The card should always hold an MBR. However, depending on the operating system, the SD card will
be formatted either with partition(s) (using an MBR) or without. The ROM Code supports both types;
this is described in the following section.
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 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.
21.7.4.7 FAT File System
This paragraph describes functionalities which are used by the ROM Code. It is not intended to fully
describe the Master Boot Record and the FAT file system, but does include:
•
How to recognize if a sector is the 1st sector of an MBR
•
How to recognize if a sector is the 1st sector of a FAT12/16/32
•
How to find the 1st 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 four 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 two copies).
When buffering FAT entries, the two 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
. Every part related to MBR or FAT12/16/32 is
described in the next paragraph.
2015
SPRUGX9 – 15 April 2011
ROM Code Memory and Peripheral Booting
© 2011, Texas Instruments Incorporated
Содержание TMS320C6A816 Series
Страница 2: ...Preliminary 2 SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 92: ...92 Read This First SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1122: ...1122 Multichannel Audio Serial Port McASP SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1562: ...1562 Real Time Clock RTC SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1658: ...1658 Timers SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1750: ...1750 UART IrDA CIR Module SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...
Страница 1984: ...1984 Universal Serial Bus USB SPRUGX9 15 April 2011 Submit Documentation Feedback 2011 Texas Instruments Incorporated...