36#define PEI_FAT_CACHE_SIZE 4
37#define PEI_FAT_MAX_BLOCK_SIZE 8192
38#define FAT_MAX_FILE_NAME_LENGTH 128
39#define PEI_FAT_MAX_BLOCK_DEVICE 64
40#define PEI_FAT_MAX_BLOCK_IO_PPI 32
41#define PEI_FAT_MAX_VOLUME 64
43#define PEI_FAT_MEMORY_PAGE_SIZE 0x1000
56 BOOLEAN PartitionChecked;
61 CHAR8 PartitionFlag[8];
86 CHAR16 VolumeLabel[FAT_MAX_FILE_NAME_LENGTH];
91 UINT64 FirstClusterPos;
94 UINT32 RootDirCluster;
102 CHAR16 FileName[FAT_MAX_FILE_NAME_LENGTH];
104 BOOLEAN IsFixedRootDir;
106 UINT32 StartingCluster;
108 UINT32 StraightReadAmount;
109 UINT32 CurrentCluster;
123 UINT64 Buffer[PEI_FAT_MAX_BLOCK_SIZE / 8];
135#define PEI_FAT_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('p', 'f', 'a', 't')
143 UINT8 UnicodeCaseMap[0x300];
148 UINT64 BlockData[PEI_FAT_MAX_BLOCK_SIZE / 8];
149 UINTN BlockDeviceCount;
157#define PEI_FAT_PRIVATE_DATA_FROM_THIS(a) \
158 CR (a, PEI_FAT_PRIVATE_DATA, DeviceRecoveryPpi, PEI_FAT_PRIVATE_DATA_SIGNATURE)
163#define UNPACK_INT32(a) \
164 (INT32) ((((UINT8 *) a)[0] << 0) | (((UINT8 *) a)[1] << 8) | (((UINT8 *) a)[2] << 16) | (((UINT8 *) a)[3] << 24))
169#define UNPACK_UINT32(a) \
170 (UINT32) ((((UINT8 *) a)[0] << 0) | (((UINT8 *) a)[1] << 8) | (((UINT8 *) a)[2] << 16) | (((UINT8 *) a)[3] << 24))
199 OUT PEI_FILE_HANDLE *Handle
398 OUT UINT32 *NextCluster
418 IN UINT64 StartingAddress,
VOID EngFatToStr(IN UINTN FatSize, IN CHAR8 *Fat, OUT CHAR16 *Str)
EFI_STATUS EFIAPI GetRecoveryCapsuleInfo(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This, IN UINTN CapsuleInstance, OUT UINTN *Size, OUT EFI_GUID *CapsuleType)
EFI_STATUS FatReadNextDirectoryEntry(IN PEI_FAT_PRIVATE_DATA *PrivateData, IN PEI_FAT_FILE *ParentDir, OUT PEI_FAT_FILE *SubFile)
EFI_STATUS FindRecoveryFile(IN PEI_FAT_PRIVATE_DATA *PrivateData, IN UINTN VolumeIndex, IN CHAR16 *FileName, OUT PEI_FILE_HANDLE *Handle)
EFI_STATUS EFIAPI GetNumberRecoveryCapsules(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This, OUT UINTN *NumberRecoveryCapsules)
EFI_STATUS FatReadBlock(IN PEI_FAT_PRIVATE_DATA *PrivateData, IN UINTN BlockDeviceNo, IN EFI_PEI_LBA Lba, IN UINTN BufferSize, OUT VOID *Buffer)
EFI_STATUS FatGetBpbInfo(IN PEI_FAT_PRIVATE_DATA *PrivateData, IN OUT PEI_FAT_VOLUME *Volume)
VOID FatFindPartitions(IN PEI_FAT_PRIVATE_DATA *PrivateData)
EFI_STATUS EFIAPI LoadRecoveryCapsule(IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_DEVICE_RECOVERY_MODULE_PPI *This, IN UINTN CapsuleInstance, OUT VOID *Buffer)
EFI_STATUS FatSetFilePos(IN PEI_FAT_PRIVATE_DATA *PrivateData, IN PEI_FAT_FILE *File, IN UINT32 Pos)
BOOLEAN EngStriColl(IN PEI_FAT_PRIVATE_DATA *PrivateData, IN CHAR16 *Str1, IN CHAR16 *Str2)
EFI_STATUS FatReadFile(IN PEI_FAT_PRIVATE_DATA *PrivateData, IN PEI_FAT_FILE *File, IN UINTN Size, OUT VOID *Buffer)
EFI_STATUS FatGetNextCluster(IN PEI_FAT_PRIVATE_DATA *PrivateData, IN PEI_FAT_VOLUME *Volume, IN UINT32 Cluster, OUT UINT32 *NextCluster)
EFI_STATUS FatReadDisk(IN PEI_FAT_PRIVATE_DATA *PrivateData, IN UINTN BlockDeviceNo, IN UINT64 StartingAddress, IN UINTN Size, OUT VOID *Buffer)
EFI_PEI_BLOCK_DEVICE_TYPE