6 Copyright (c) 1998 Intel Corporation
14 EFI File System structures
24 // EFI Partition header (normaly starts in LBA 1)
27 #define EFI_PARTITION_SIGNATURE 0x5053595320494249
28 #define EFI_PARTITION_REVISION 0x00010001
29 #define MIN_EFI_PARTITION_BLOCK_SIZE 512
30 #define EFI_PARTITION_LBA 1
32 typedef struct _EFI_PARTITION_HEADER {
34 UINT32 DirectoryAllocationNumber;
36 EFI_LBA FirstUsableLba;
37 EFI_LBA LastUsableLba;
38 EFI_LBA UnusableSpace;
42 } EFI_PARTITION_HEADER;
49 #define EFI_FILE_HEADER_SIGNATURE 0x454c494620494249
50 #define EFI_FILE_HEADER_REVISION 0x00010000
51 #define EFI_FILE_STRING_SIZE 260
53 typedef struct _EFI_FILE_HEADER {
59 UINT64 FileAttributes;
60 EFI_TIME FileCreateTime;
61 EFI_TIME FileModificationTime;
63 CHAR16 FileString[EFI_FILE_STRING_SIZE];
68 // Return the file's first LBAL which is in the same
69 // logical block as the file header
72 #define EFI_FILE_LBAL(a) ((EFI_LBAL *) (((CHAR8 *) (a)) + (a)->LBALOffset))
74 #define EFI_FILE_CLASS_FREE_SPACE 1
75 #define EFI_FILE_CLASS_EMPTY 2
76 #define EFI_FILE_CLASS_NORMAL 3
80 // Logical Block Address List - the fundemental block
81 // description structure
84 #define EFI_LBAL_SIGNATURE 0x4c41424c20494249
85 #define EFI_LBAL_REVISION 0x00010000
87 typedef struct _EFI_LBAL {
97 #define EFI_LBAL_ARRAY_SIZE(lbal,offs,blks) \
98 (((blks) - (offs) - (lbal)->Hdr.HeaderSize) / sizeof(EFI_RL))
101 // Logical Block run-length
110 // Return the run-length structure from an LBAL header
113 #define EFI_LBAL_RL(a) ((EFI_RL*) (((CHAR8 *) (a)) + (a)->Hdr.HeaderSize))