From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:UEFI firmware volume (PI)" |
|---|
| claim | "An FFS file header is 24 bytes (Name GUID, IntegrityCheck {Header u8, File u8}, Type, Attributes, Size[3], State); with attribute FFS_ATTRIB_LARGE_FILE (0x01) the Size bytes are zero and an 8-byte ExtendedSize follows, making a 32-byte EFI_FFS_FILE_HEADER2. Size includes the header; the next file starts at the next 8-byte aligned volume offset after the file's last byte." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:UEFI firmware volume (PI)" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "EFI_FFS_FILE_HEADER" |
|---|
| size | "0x18" |
|---|
| endianness | "little" |
|---|
| fields | | offset | "0x0" |
|---|
| size | 16 |
|---|
| type | "EFI_GUID" |
|---|
| name | "Name" |
|---|
|
| offset | "0x10" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "IntegrityCheck.Header" |
|---|
|
| offset | "0x11" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "IntegrityCheck.File" |
|---|
|
| offset | "0x12" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "Type" |
|---|
|
| offset | "0x13" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "Attributes" |
|---|
|
| offset | "0x14" |
|---|
| size | 3 |
|---|
| type | "uint8_t[3]" |
|---|
| name | "Size" |
|---|
|
| offset | "0x17" |
|---|
| size | 1 |
|---|
| type | "uint8_t" |
|---|
| name | "State" |
|---|
|
| offset | "0x18" |
|---|
| size | 8 |
|---|
| type | "uint64_t" |
|---|
| name | "ExtendedSize" |
|---|
| condition | "only in EFI_FFS_FILE_HEADER2, when Attributes & 0x01" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "EFI_FFS_FILE_HEADER, EFI_FFS_FILE_HEADER2 with the ExtendedSize comment, IS_FFS_FILE2, FFS_FILE_SIZE (Size[0] | Size[1]<<8 | Size[2]<<16); comment at 162-163 on 8-byte alignment of the next header." |
|---|
| repo | "tianocore/edk2" |
|---|
| commit | "c1415771ac592ad8509351c46cd3cda4f38d7d52" |
|---|
| path | "MdePkg/Include/Pi/PiFirmwareFile.h" |
|---|
| lines | "108-193" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "EFI_FFS_FILE_HEADER and HEADER2" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T03:50:25.559Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T07:41:24.660Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read PiFirmwareFile.h 104-193 (pack(1)): EFI_FFS_FILE_HEADER = GUID, IntegrityCheck (2 bytes), Type, Attributes, Size[3], State = 24; HEADER2 adds UINT64 ExtendedSize, used when FFS_ATTRIB_LARGE_FILE (0x01) is set and Size must be zero; the comment states the next header is at the next 8-byte aligned offset after the file's last byte; FFS_FILE_SIZE combines Size[0..2] little-endian." |
|---|
|
|
|---|