PiFirmwareVolume.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #ifndef __PI_FIRMWAREVOLUME_H__
00019 #define __PI_FIRMWAREVOLUME_H__
00020
00021 #include <gpxe/efi/ProcessorBind.h>
00022
00023
00024
00025
00026 typedef UINT32 EFI_FV_FILE_ATTRIBUTES;
00027
00028
00029
00030
00031 #define EFI_FV_FILE_ATTRIB_ALIGNMENT 0x0000001F
00032 #define EFI_FV_FILE_ATTRIB_FIXED 0x00000100
00033 #define EFI_FV_FILE_ATTRIB_MEMORY_MAPPED 0x00000200
00034
00035
00036
00037
00038 typedef UINT32 EFI_FVB_ATTRIBUTES_2;
00039
00040
00041
00042
00043 #define EFI_FVB2_READ_DISABLED_CAP 0x00000001
00044 #define EFI_FVB2_READ_ENABLED_CAP 0x00000002
00045 #define EFI_FVB2_READ_STATUS 0x00000004
00046 #define EFI_FVB2_WRITE_DISABLED_CAP 0x00000008
00047 #define EFI_FVB2_WRITE_ENABLED_CAP 0x00000010
00048 #define EFI_FVB2_WRITE_STATUS 0x00000020
00049 #define EFI_FVB2_LOCK_CAP 0x00000040
00050 #define EFI_FVB2_LOCK_STATUS 0x00000080
00051 #define EFI_FVB2_STICKY_WRITE 0x00000200
00052 #define EFI_FVB2_MEMORY_MAPPED 0x00000400
00053 #define EFI_FVB2_ERASE_POLARITY 0x00000800
00054 #define EFI_FVB2_READ_LOCK_CAP 0x00001000
00055 #define EFI_FVB2_READ_LOCK_STATUS 0x00002000
00056 #define EFI_FVB2_WRITE_LOCK_CAP 0x00004000
00057 #define EFI_FVB2_WRITE_LOCK_STATUS 0x00008000
00058 #define EFI_FVB2_ALIGNMENT 0x001F0000
00059 #define EFI_FVB2_ALIGNMENT_1 0x00000000
00060 #define EFI_FVB2_ALIGNMENT_2 0x00010000
00061 #define EFI_FVB2_ALIGNMENT_4 0x00020000
00062 #define EFI_FVB2_ALIGNMENT_8 0x00030000
00063 #define EFI_FVB2_ALIGNMENT_16 0x00040000
00064 #define EFI_FVB2_ALIGNMENT_32 0x00050000
00065 #define EFI_FVB2_ALIGNMENT_64 0x00060000
00066 #define EFI_FVB2_ALIGNMENT_128 0x00070000
00067 #define EFI_FVB2_ALIGNMENT_256 0x00080000
00068 #define EFI_FVB2_ALIGNMENT_512 0x00090000
00069 #define EFI_FVB2_ALIGNMENT_1K 0x000A0000
00070 #define EFI_FVB2_ALIGNMENT_2K 0x000B0000
00071 #define EFI_FVB2_ALIGNMENT_4K 0x000C0000
00072 #define EFI_FVB2_ALIGNMENT_8K 0x000D0000
00073 #define EFI_FVB2_ALIGNMENT_16K 0x000E0000
00074 #define EFI_FVB2_ALIGNMENT_32K 0x000F0000
00075 #define EFI_FVB2_ALIGNMENT_64K 0x00100000
00076 #define EFI_FVB2_ALIGNMENT_128K 0x00110000
00077 #define EFI_FVB2_ALIGNMENT_256K 0x00120000
00078 #define EFI_FVB2_ALIGNMNET_512K 0x00130000
00079 #define EFI_FVB2_ALIGNMENT_1M 0x00140000
00080 #define EFI_FVB2_ALIGNMENT_2M 0x00150000
00081 #define EFI_FVB2_ALIGNMENT_4M 0x00160000
00082 #define EFI_FVB2_ALIGNMENT_8M 0x00170000
00083 #define EFI_FVB2_ALIGNMENT_16M 0x00180000
00084 #define EFI_FVB2_ALIGNMENT_32M 0x00190000
00085 #define EFI_FVB2_ALIGNMENT_64M 0x001A0000
00086 #define EFI_FVB2_ALIGNMENT_128M 0x001B0000
00087 #define EFI_FVB2_ALIGNMENT_256M 0x001C0000
00088 #define EFI_FVB2_ALIGNMENT_512M 0x001D0000
00089 #define EFI_FVB2_ALIGNMENT_1G 0x001E0000
00090 #define EFI_FVB2_ALIGNMENT_2G 0x001F0000
00091
00092
00093 typedef struct {
00094 UINT32 NumBlocks;
00095 UINT32 Length;
00096 } EFI_FV_BLOCK_MAP_ENTRY;
00097
00098
00099
00100
00101 typedef struct {
00102 UINT8 ZeroVector[16];
00103 EFI_GUID FileSystemGuid;
00104 UINT64 FvLength;
00105 UINT32 Signature;
00106 EFI_FVB_ATTRIBUTES_2 Attributes;
00107 UINT16 HeaderLength;
00108 UINT16 Checksum;
00109 UINT16 ExtHeaderOffset;
00110 UINT8 Reserved[1];
00111 UINT8 Revision;
00112 EFI_FV_BLOCK_MAP_ENTRY BlockMap[1];
00113 } EFI_FIRMWARE_VOLUME_HEADER;
00114
00115 #define EFI_FVH_SIGNATURE EFI_SIGNATURE_32 ('_', 'F', 'V', 'H')
00116
00117
00118
00119
00120 #define EFI_FVH_REVISION 0x02
00121
00122
00123
00124
00125 typedef struct {
00126 EFI_GUID FvName;
00127 UINT32 ExtHeaderSize;
00128 } EFI_FIRMWARE_VOLUME_EXT_HEADER;
00129
00130
00131
00132
00133 typedef struct {
00134 UINT16 ExtEntrySize;
00135 UINT16 ExtEntryType;
00136 } EFI_FIRMWARE_VOLUME_EXT_ENTRY;
00137
00138 #define EFI_FV_EXT_TYPE_OEM_TYPE 0x01
00139
00140
00141
00142 typedef struct {
00143 EFI_FIRMWARE_VOLUME_EXT_ENTRY Hdr;
00144 UINT32 TypeMask;
00145
00146
00147
00148
00149
00150 EFI_GUID Types[1];
00151 } EFI_FIRMWARE_VOLUME_EXT_ENTRY_OEM_TYPE;
00152
00153
00154 #endif