TianoCore EDK2 master
Loading...
Searching...
No Matches
FatFileSystem.h File Reference

Go to the source code of this file.

Data Structures

struct  FAT_BOOT_SECTOR_BASIC
 
struct  FAT_BOOT_SECTOR_EXT
 
struct  FAT32_BOOT_SECTOR_EXT
 
union  FAT_BSE
 
struct  FAT_BOOT_SECTOR
 
struct  FAT_FREE_INFO
 
struct  FAT_INFO_SECTOR
 
struct  FAT_DATE
 
struct  FAT_TIME
 
struct  FAT_DATE_TIME
 
struct  FAT_DIRECTORY_ENTRY
 
struct  FAT_DIRECTORY_LFN
 

Macros

#define FAT_INFO_SIGNATURE   0x41615252
 
#define FAT_INFO_BEGIN_SIGNATURE   0x61417272
 
#define FAT_INFO_END_SIGNATURE   0xAA550000
 
#define FAT_CLUSTER_SPECIAL_EXT   (MAX_UINTN & (~0xF))
 
#define FAT_CLUSTER_SPECIAL   ((FAT_CLUSTER_SPECIAL_EXT) | 0x07)
 
#define FAT_CLUSTER_FREE   0
 
#define FAT_CLUSTER_RESERVED   (FAT_CLUSTER_SPECIAL)
 
#define FAT_CLUSTER_BAD   (FAT_CLUSTER_SPECIAL)
 
#define FAT_CLUSTER_LAST   (-1)
 
#define FAT_END_OF_FAT_CHAIN(Cluster)   ((Cluster) > (FAT_CLUSTER_SPECIAL))
 
#define FAT_MIN_CLUSTER   2
 
#define FAT_MAX_FAT12_CLUSTER   0xFF5
 
#define FAT_MAX_FAT16_CLUSTER   0xFFF5
 
#define FAT_CLUSTER_SPECIAL_FAT12   0xFF7
 
#define FAT_CLUSTER_SPECIAL_FAT16   0xFFF7
 
#define FAT_CLUSTER_SPECIAL_FAT32   0x0FFFFFF7
 
#define FAT_CLUSTER_MASK_FAT12   0xFFF
 
#define FAT_CLUSTER_UNMASK_FAT12   0xF000
 
#define FAT_CLUSTER_MASK_FAT32   0x0FFFFFFF
 
#define FAT_CLUSTER_UNMASK_FAT32   0xF0000000
 
#define FAT_POS_FAT12(a)   ((a) * 3 / 2)
 
#define FAT_POS_FAT16(a)   ((a) * 2)
 
#define FAT_POS_FAT32(a)   ((a) * 4)
 
#define FAT_ODD_CLUSTER_FAT12(a)   (((a) & 1) != 0)
 
#define FAT_ATTRIBUTE_READ_ONLY   0x01
 
#define FAT_ATTRIBUTE_HIDDEN   0x02
 
#define FAT_ATTRIBUTE_SYSTEM   0x04
 
#define FAT_ATTRIBUTE_VOLUME_ID   0x08
 
#define FAT_ATTRIBUTE_DIRECTORY   0x10
 
#define FAT_ATTRIBUTE_ARCHIVE   0x20
 
#define FAT_ATTRIBUTE_DEVICE   0x40
 
#define FAT_ATTRIBUTE_LFN   0x0F
 
#define FAT_LFN_LAST   0x40
 
#define MAX_LFN_ENTRIES   20
 
#define LFN_CHAR1_LEN   5
 
#define LFN_CHAR2_LEN   6
 
#define LFN_CHAR3_LEN   2
 
#define LFN_CHAR_TOTAL   (LFN_CHAR1_LEN + LFN_CHAR2_LEN + LFN_CHAR3_LEN)
 
#define LFN_ENTRY_NUMBER(a)   (((a) + LFN_CHAR_TOTAL - 1) / LFN_CHAR_TOTAL)
 
#define FAT_MAIN_NAME_LEN   8
 
#define FAT_EXTEND_NAME_LEN   3
 
#define FAT_NAME_LEN   (FAT_MAIN_NAME_LEN + FAT_EXTEND_NAME_LEN)
 
#define FAT_ENTRY_INFO_OFFSET   13
 
#define DELETE_ENTRY_MARK   0xE5
 
#define EMPTY_ENTRY_MARK   0x00
 
#define FAT16_DIRTY_MASK   0x7fff
 
#define FAT32_DIRTY_MASK   0xf7ffffff
 
#define FAT_CASE_MIXED   0x01
 
#define FAT_CASE_NAME_LOWER   0x08
 
#define FAT_CASE_EXT_LOWER   0x10
 
#define FAT_MAX_YEAR_FROM_1980   0x7f
 

Detailed Description

Definitions for on-disk FAT structures.

Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent

Definition in file FatFileSystem.h.

Macro Definition Documentation

◆ DELETE_ENTRY_MARK

#define DELETE_ENTRY_MARK   0xE5

Definition at line 76 of file FatFileSystem.h.

◆ EMPTY_ENTRY_MARK

#define EMPTY_ENTRY_MARK   0x00

Definition at line 77 of file FatFileSystem.h.

◆ FAT16_DIRTY_MASK

#define FAT16_DIRTY_MASK   0x7fff

Definition at line 82 of file FatFileSystem.h.

◆ FAT32_DIRTY_MASK

#define FAT32_DIRTY_MASK   0xf7ffffff

Definition at line 83 of file FatFileSystem.h.

◆ FAT_ATTRIBUTE_ARCHIVE

#define FAT_ATTRIBUTE_ARCHIVE   0x20

Definition at line 53 of file FatFileSystem.h.

◆ FAT_ATTRIBUTE_DEVICE

#define FAT_ATTRIBUTE_DEVICE   0x40

Definition at line 54 of file FatFileSystem.h.

◆ FAT_ATTRIBUTE_DIRECTORY

#define FAT_ATTRIBUTE_DIRECTORY   0x10

Definition at line 52 of file FatFileSystem.h.

◆ FAT_ATTRIBUTE_HIDDEN

#define FAT_ATTRIBUTE_HIDDEN   0x02

Definition at line 49 of file FatFileSystem.h.

◆ FAT_ATTRIBUTE_LFN

#define FAT_ATTRIBUTE_LFN   0x0F

Definition at line 55 of file FatFileSystem.h.

◆ FAT_ATTRIBUTE_READ_ONLY

#define FAT_ATTRIBUTE_READ_ONLY   0x01

Definition at line 48 of file FatFileSystem.h.

◆ FAT_ATTRIBUTE_SYSTEM

#define FAT_ATTRIBUTE_SYSTEM   0x04

Definition at line 50 of file FatFileSystem.h.

◆ FAT_ATTRIBUTE_VOLUME_ID

#define FAT_ATTRIBUTE_VOLUME_ID   0x08

Definition at line 51 of file FatFileSystem.h.

◆ FAT_CASE_EXT_LOWER

#define FAT_CASE_EXT_LOWER   0x10

Definition at line 89 of file FatFileSystem.h.

◆ FAT_CASE_MIXED

#define FAT_CASE_MIXED   0x01

Definition at line 87 of file FatFileSystem.h.

◆ FAT_CASE_NAME_LOWER

#define FAT_CASE_NAME_LOWER   0x08

Definition at line 88 of file FatFileSystem.h.

◆ FAT_CLUSTER_BAD

#define FAT_CLUSTER_BAD   (FAT_CLUSTER_SPECIAL)

Definition at line 27 of file FatFileSystem.h.

◆ FAT_CLUSTER_FREE

#define FAT_CLUSTER_FREE   0

Definition at line 25 of file FatFileSystem.h.

◆ FAT_CLUSTER_LAST

#define FAT_CLUSTER_LAST   (-1)

Definition at line 28 of file FatFileSystem.h.

◆ FAT_CLUSTER_MASK_FAT12

#define FAT_CLUSTER_MASK_FAT12   0xFFF

Definition at line 36 of file FatFileSystem.h.

◆ FAT_CLUSTER_MASK_FAT32

#define FAT_CLUSTER_MASK_FAT32   0x0FFFFFFF

Definition at line 38 of file FatFileSystem.h.

◆ FAT_CLUSTER_RESERVED

#define FAT_CLUSTER_RESERVED   (FAT_CLUSTER_SPECIAL)

Definition at line 26 of file FatFileSystem.h.

◆ FAT_CLUSTER_SPECIAL

#define FAT_CLUSTER_SPECIAL   ((FAT_CLUSTER_SPECIAL_EXT) | 0x07)

Definition at line 24 of file FatFileSystem.h.

◆ FAT_CLUSTER_SPECIAL_EXT

#define FAT_CLUSTER_SPECIAL_EXT   (MAX_UINTN & (~0xF))

Definition at line 23 of file FatFileSystem.h.

◆ FAT_CLUSTER_SPECIAL_FAT12

#define FAT_CLUSTER_SPECIAL_FAT12   0xFF7

Definition at line 33 of file FatFileSystem.h.

◆ FAT_CLUSTER_SPECIAL_FAT16

#define FAT_CLUSTER_SPECIAL_FAT16   0xFFF7

Definition at line 34 of file FatFileSystem.h.

◆ FAT_CLUSTER_SPECIAL_FAT32

#define FAT_CLUSTER_SPECIAL_FAT32   0x0FFFFFF7

Definition at line 35 of file FatFileSystem.h.

◆ FAT_CLUSTER_UNMASK_FAT12

#define FAT_CLUSTER_UNMASK_FAT12   0xF000

Definition at line 37 of file FatFileSystem.h.

◆ FAT_CLUSTER_UNMASK_FAT32

#define FAT_CLUSTER_UNMASK_FAT32   0xF0000000

Definition at line 39 of file FatFileSystem.h.

◆ FAT_END_OF_FAT_CHAIN

#define FAT_END_OF_FAT_CHAIN (   Cluster)    ((Cluster) > (FAT_CLUSTER_SPECIAL))

Definition at line 29 of file FatFileSystem.h.

◆ FAT_ENTRY_INFO_OFFSET

#define FAT_ENTRY_INFO_OFFSET   13

Definition at line 75 of file FatFileSystem.h.

◆ FAT_EXTEND_NAME_LEN

#define FAT_EXTEND_NAME_LEN   3

Definition at line 70 of file FatFileSystem.h.

◆ FAT_INFO_BEGIN_SIGNATURE

#define FAT_INFO_BEGIN_SIGNATURE   0x61417272

Definition at line 18 of file FatFileSystem.h.

◆ FAT_INFO_END_SIGNATURE

#define FAT_INFO_END_SIGNATURE   0xAA550000

Definition at line 19 of file FatFileSystem.h.

◆ FAT_INFO_SIGNATURE

#define FAT_INFO_SIGNATURE   0x41615252

Definition at line 17 of file FatFileSystem.h.

◆ FAT_LFN_LAST

#define FAT_LFN_LAST   0x40

Definition at line 59 of file FatFileSystem.h.

◆ FAT_MAIN_NAME_LEN

#define FAT_MAIN_NAME_LEN   8

Definition at line 69 of file FatFileSystem.h.

◆ FAT_MAX_FAT12_CLUSTER

#define FAT_MAX_FAT12_CLUSTER   0xFF5

Definition at line 31 of file FatFileSystem.h.

◆ FAT_MAX_FAT16_CLUSTER

#define FAT_MAX_FAT16_CLUSTER   0xFFF5

Definition at line 32 of file FatFileSystem.h.

◆ FAT_MAX_YEAR_FROM_1980

#define FAT_MAX_YEAR_FROM_1980   0x7f

Definition at line 163 of file FatFileSystem.h.

◆ FAT_MIN_CLUSTER

#define FAT_MIN_CLUSTER   2

Definition at line 30 of file FatFileSystem.h.

◆ FAT_NAME_LEN

#define FAT_NAME_LEN   (FAT_MAIN_NAME_LEN + FAT_EXTEND_NAME_LEN)

Definition at line 71 of file FatFileSystem.h.

◆ FAT_ODD_CLUSTER_FAT12

#define FAT_ODD_CLUSTER_FAT12 (   a)    (((a) & 1) != 0)

Definition at line 43 of file FatFileSystem.h.

◆ FAT_POS_FAT12

#define FAT_POS_FAT12 (   a)    ((a) * 3 / 2)

Definition at line 40 of file FatFileSystem.h.

◆ FAT_POS_FAT16

#define FAT_POS_FAT16 (   a)    ((a) * 2)

Definition at line 41 of file FatFileSystem.h.

◆ FAT_POS_FAT32

#define FAT_POS_FAT32 (   a)    ((a) * 4)

Definition at line 42 of file FatFileSystem.h.

◆ LFN_CHAR1_LEN

#define LFN_CHAR1_LEN   5

Definition at line 61 of file FatFileSystem.h.

◆ LFN_CHAR2_LEN

#define LFN_CHAR2_LEN   6

Definition at line 62 of file FatFileSystem.h.

◆ LFN_CHAR3_LEN

#define LFN_CHAR3_LEN   2

Definition at line 63 of file FatFileSystem.h.

◆ LFN_CHAR_TOTAL

#define LFN_CHAR_TOTAL   (LFN_CHAR1_LEN + LFN_CHAR2_LEN + LFN_CHAR3_LEN)

Definition at line 64 of file FatFileSystem.h.

◆ LFN_ENTRY_NUMBER

#define LFN_ENTRY_NUMBER (   a)    (((a) + LFN_CHAR_TOTAL - 1) / LFN_CHAR_TOTAL)

Definition at line 65 of file FatFileSystem.h.

◆ MAX_LFN_ENTRIES

#define MAX_LFN_ENTRIES   20

Definition at line 60 of file FatFileSystem.h.