X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdePkg%2FInclude%2FPi%2FPiFirmwareVolume.h;h=f5c1026ea212610c920cd8e36055c7fc458fe402;hb=73d622ed1610963b4a830bb1178abd5d6f7287ae;hp=7675df016c3052d58eee58446f367ef0cbff03bb;hpb=eda676101e7c115993878d3ece6e4255540cca39;p=mirror_edk2.git diff --git a/MdePkg/Include/Pi/PiFirmwareVolume.h b/MdePkg/Include/Pi/PiFirmwareVolume.h index 7675df016c..f5c1026ea2 100644 --- a/MdePkg/Include/Pi/PiFirmwareVolume.h +++ b/MdePkg/Include/Pi/PiFirmwareVolume.h @@ -1,7 +1,7 @@ /** @file The firmware volume related definitions in PI. - Copyright (c) 2006 - 2007, Intel Corporation + Copyright (c) 2006 - 2009, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -11,16 +11,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @par Revision Reference: - Version 1.0. + PI Version 1.0 **/ #ifndef __PI_FIRMWAREVOLUME_H__ #define __PI_FIRMWAREVOLUME_H__ -// -// EFI_FV_FILE_ATTRIBUTES -// +/// +/// EFI_FV_FILE_ATTRIBUTES +/// typedef UINT32 EFI_FV_FILE_ATTRIBUTES; // @@ -30,7 +30,10 @@ typedef UINT32 EFI_FV_FILE_ATTRIBUTES; #define EFI_FV_FILE_ATTRIB_FIXED 0x00000100 #define EFI_FV_FILE_ATTRIB_MEMORY_MAPPED 0x00000200 -typedef UINT32 EFI_FVB_ATTRIBUTES; +/// +/// type of EFI FVB attribute +/// +typedef UINT32 EFI_FVB_ATTRIBUTES_2; // // Attributes bit definitions @@ -86,56 +89,122 @@ typedef UINT32 EFI_FVB_ATTRIBUTES; typedef struct { + /// + /// The number of sequential blocks which are of the same size. + /// UINT32 NumBlocks; + /// + /// The size of the blocks. + /// UINT32 Length; } EFI_FV_BLOCK_MAP_ENTRY; -// -// Describes the features and layout of the firmware volume. -// +/// +/// Describes the features and layout of the firmware volume. +/// typedef struct { + /// + /// The first 16 bytes are reserved to allow for the reset vector of + /// processors whose reset vector is at address 0. + /// UINT8 ZeroVector[16]; + /// + /// Declares the file system with which the firmware volume is formatted. + /// EFI_GUID FileSystemGuid; + /// + /// Length in bytes of the complete firmware volume, including the header. + /// UINT64 FvLength; + /// + /// Set to EFI_FVH_SIGNATURE + /// UINT32 Signature; - EFI_FVB_ATTRIBUTES Attributes; + /// + /// Declares capabilities and power-on defaults for the firmware volume. + /// + EFI_FVB_ATTRIBUTES_2 Attributes; + /// + /// Length in bytes of the complete firmware volume header. + /// UINT16 HeaderLength; + /// + /// A 16-bit checksum of the firmware volume header. A valid header sums to zero. + /// UINT16 Checksum; + /// + /// Offset, relative to the start of the header, of the extended header + /// (EFI_FIRMWARE_VOLUME_EXT_HEADER) or zero if there is no extended header. + /// UINT16 ExtHeaderOffset; + /// + /// This field must always be set to zero. + /// UINT8 Reserved[1]; + /// + /// Set to 2. Future versions of this specification may define new header fields and will + /// increment the Revision field accordingly. + /// UINT8 Revision; + /// + /// An array of run-length encoded FvBlockMapEntry structures. The array is + /// terminated with an entry of {0,0}. + /// EFI_FV_BLOCK_MAP_ENTRY BlockMap[1]; } EFI_FIRMWARE_VOLUME_HEADER; -#define EFI_FVH_SIGNATURE EFI_SIGNATURE_32 ('_', 'F', 'V', 'H') +#define EFI_FVH_SIGNATURE SIGNATURE_32 ('_', 'F', 'V', 'H') /// /// Firmware Volume Header Revision definition /// #define EFI_FVH_REVISION 0x02 -// -// Extension header pointed by ExtHeaderOffset of volume header. -// +/// +/// Extension header pointed by ExtHeaderOffset of volume header. +/// typedef struct { + /// + /// Firmware volume name. + /// EFI_GUID FvName; + /// + /// Size of the rest of the extension header, including this structure. + /// UINT32 ExtHeaderSize; } EFI_FIRMWARE_VOLUME_EXT_HEADER; +/// +/// Entry struture for describing FV extension header +/// typedef struct { + /// + /// Size of this header extension. + /// UINT16 ExtEntrySize; + /// + /// Type of the header. + /// UINT16 ExtEntryType; } EFI_FIRMWARE_VOLUME_EXT_ENTRY; #define EFI_FV_EXT_TYPE_OEM_TYPE 0x01 +/// +/// This extension header provides a mapping between a GUID and an OEM file type. +/// typedef struct { + /// + /// Standard extension entry, with the type EFI_FV_EXT_TYPE_OEM_TYPE. + /// EFI_FIRMWARE_VOLUME_EXT_ENTRY Hdr; + /// + /// A bit mask, one bit for each file type between 0xC0 (bit 0) and 0xDF (bit 31). If a bit + /// is '1', then the GUID entry exists in Types. If a bit is '0' then no GUID entry exists in Types. + /// UINT32 TypeMask; - - // - // Array of GUIDs. - // Each GUID represents an OEM file type. - // + /// + /// An array of GUIDs, each GUID representing an OEM file type. + /// EFI_GUID Types[1]; } EFI_FIRMWARE_VOLUME_EXT_ENTRY_OEM_TYPE;