Functional Description
Table 26-25. FAT Boot Sector (continued)
Offset
Length[bytes]
Name
Description
Size in sectors of one FAT. Field
0024h
4
BPB_FATSz32
BPB_FATSz16 must be 0
0028h
2
BPB_ExtFlags
FAT Flags:
0=FAT is mirrored;
[7]:
1=Only one FAT is
used
Number of used
[3:0]:
FAT if no mirroring
used
002Ah
2
BPB_FSVer
File system Version Number
002Ch
4
BPB_RootClus
First Cluster number of the Root Directory
Sector number of FSINFO Structure in the
0030h
2
BPB_FSInfo
reserved-area, usually 1
FAT32
If non-zero, indicates the sector number in
0032h
2
BPB_BkBootSec
the reserved-area of a copy of the Boot
Sector
0034h
12
BPB_Reserved
Reserved, set to 00h
0040h
1
BS_DrvNum
Drive Number
0041h
1
BS_Reserved1
00h
Extended Boot Signature 29h. Indicates
0042h
1
BS_BootSig
that the following 3 fields are present
0043h
4
BS_VolID
Volume Serial Number
0047h
11
BS_VolLab
Volume Label
File system Type: “FAT12”, “FAT16”,
“FAT32”.Note: This field is not mandatory
0052h
8
BS_FilSysType
(i.e BS_) therefore it cannot be used to
indentify the partition type.
01FEh
2
BPB_Signature
AA55h
To check whether or not a sector holds a valid FAT12/16/32 partition, only fields starting with BPB can be
checked as they are mandatory. The fields starting from offset 0024h to 01FDh cannot be used for the
check as they will differ if using FAT12/16 or FAT32. The procedure is described in Figure 30. First the
ROM Code checks if the BPB_Signature is equal to AA55h. Then it checks some fields which must have
some specific values (BPB_BytsPerSec, BPB_SecPerClus, BPB_RsvdSecCnt, BPB_NumFATs,
BPB_RootEntCnt) If the geometry of the device is known (valid CHS for device size < 4Gbytes) then it is
compared against BPB_SecPerTrk and BPB_NumHeads fields. If an MBR was found before, the partition
size is also checked:
The field BPB_ToSec16 is used if the total number of sectors is below 65518 (in this case
BPB_TotSec32=0), otherwise BPB_TotSec32 is used (BPB_TotSec16=0). The partition sector offset is
also checked: BPB_HiddSec = MBR_Partition_Offset (if this value is not 0 as some operating systems do
not update this field correctly). The last step is to decide which type of FAT file system it is. The ROM
Code computes the number of clusters in the Data Area part of the partition:
Where Nb clusters is given by the size of the Data Area:
4138
Initialization
SPRUH73H – October 2011 – Revised April 2013
Copyright © 2011–2013, Texas Instruments Incorporated