+typedef struct {\r
+ ///\r
+ /// This GUID is the file name. It is used to uniquely identify the file. There may be only\r
+ /// one instance of a file with the file name GUID of Name in any given firmware\r
+ /// volume, except if the file type is EFI_FV_FILETYPE_FFS_PAD.\r
+ ///\r
+ EFI_GUID Name;\r
+ \r
+ ///\r
+ /// Used to verify the integrity of the file.\r
+ /// \r
+ EFI_FFS_INTEGRITY_CHECK IntegrityCheck;\r
+ \r
+ ///\r
+ /// Identifies the type of file.\r
+ /// \r
+ EFI_FV_FILETYPE Type;\r
+ \r
+ ///\r
+ /// Declares various file attribute bits.\r
+ /// \r
+ EFI_FFS_FILE_ATTRIBUTES Attributes;\r
+ \r
+ ///\r
+ /// The length of the file in bytes, including the FFS header.\r
+ /// The length of the file data is either (Size - sizeof(EFI_FFS_FILE_HEADER)). This calculation means a\r
+ /// zero-length file has a Size of 24 bytes, which is sizeof(EFI_FFS_FILE_HEADER).\r
+ /// Size is not required to be a multiple of 8 bytes. Given a file F, the next file header is\r
+ /// located at the next 8-byte aligned firmware volume offset following the last byte of the file F.\r
+ ///\r
+ UINT8 Size[3];\r
+ \r
+ ///\r
+ /// Used to track the state of the file throughout the life of the file from creation to deletion.\r
+ ///\r
+ EFI_FFS_FILE_STATE State;\r
+ \r
+ ///\r
+ /// If FFS_ATTRIB_LARGE_FILE is set in Attributes, then ExtendedSize exists and Size must be set to zero.\r
+ /// If FFS_ATTRIB_LARGE_FILE is not set then EFI_FFS_FILE_HEADER is used.\r
+ ///\r
+ UINT32 ExtendedSize;\r
+} EFI_FFS_FILE_HEADER2;\r
+\r
+#define IS_FFS_FILE2(FfsFileHeaderPtr) \\r
+ (((((EFI_FFS_FILE_HEADER *) (UINTN) FfsFileHeaderPtr)->Attributes) & FFS_ATTRIB_LARGE_FILE) == FFS_ATTRIB_LARGE_FILE)\r
+\r
+#define FFS_FILE_SIZE(FfsFileHeaderPtr) \\r
+ ((UINT32) (*((UINT32 *) ((EFI_FFS_FILE_HEADER *) (UINTN) FfsFileHeaderPtr)->Size) & 0x00ffffff))\r
+\r
+#define FFS_FILE2_SIZE(FfsFileHeaderPtr) \\r
+ (((EFI_FFS_FILE_HEADER2 *) (UINTN) FfsFileHeaderPtr)->ExtendedSize)\r