///\r
typedef UINT32 TPM_NV_INDEX;\r
///\r
-/// The family ID. Families ID¡¯s are automatically assigned a sequence number by the TPM. \r
+/// The family ID. Families ID's are automatically assigned a sequence number by the TPM. \r
/// A trusted process can set the FamilyID value in an individual row to NULL, which \r
/// invalidates that row. The family ID resets to NULL on each change of TPM Owner.\r
///\r
/// Global Coherencey Domain types - Memory type\r
///\r
typedef enum {\r
+ ///\r
+ /// A memory region that is visible to the boot processor. However, there are no system\r
+ /// components that are currently decoding this memory region.\r
+ ///\r
EfiGcdMemoryTypeNonExistent,\r
+ ///\r
+ /// A memory region that is visible to the boot processor. This memory region is being\r
+ /// decoded by a system component, but the memory region is not considered to be either\r
+ /// system memory or memory-mapped I/O.\r
+ ///\r
EfiGcdMemoryTypeReserved,\r
+ ///\r
+ /// A memory region that is visible to the boot processor. A memory controller is\r
+ /// currently decoding this memory region and the memory controller is producing a\r
+ /// tested system memory region that is available to the memory services.\r
+ ///\r
EfiGcdMemoryTypeSystemMemory,\r
+ ///\r
+ /// A memory region that is visible to the boot processor. This memory region is\r
+ /// currently being decoded by a component as memory-mapped I/O that can be used to\r
+ /// access I/O devices in the platform.\r
+ ///\r
EfiGcdMemoryTypeMemoryMappedIo,\r
EfiGcdMemoryTypeMaximum\r
} EFI_GCD_MEMORY_TYPE;\r
/// Global Coherencey Domain types - IO type\r
///\r
typedef enum {\r
+ ///\r
+ /// An I/O region that is visible to the boot processor. However, there are no system\r
+ /// components that are currently decoding this I/O region.\r
+ ///\r
EfiGcdIoTypeNonExistent,\r
+ ///\r
+ /// An I/O region that is visible to the boot processor. This I/O region is currently being\r
+ /// decoded by a system component, but the I/O region cannot be used to access I/O devices.\r
+ ///\r
EfiGcdIoTypeReserved,\r
+ ///\r
+ /// An I/O region that is visible to the boot processor. This I/O region is currently being\r
+ /// decoded by a system component that is producing I/O ports that can be used to access I/O devices.\r
+ ///\r
EfiGcdIoTypeIo,\r
EfiGcdIoTypeMaximum\r
} EFI_GCD_IO_TYPE;\r
/// The type of allocation to perform.\r
/// \r
typedef enum {\r
+ ///\r
+ /// The GCD memory space map is searched from the lowest address up to the highest address\r
+ /// looking for unallocated memory ranges.\r
+ ///\r
EfiGcdAllocateAnySearchBottomUp,\r
+ ///\r
+ /// The GCD memory space map is searched from the lowest address up \r
+ /// to the specified MaxAddress looking for unallocated memory ranges.\r
+ ///\r
EfiGcdAllocateMaxAddressSearchBottomUp,\r
+ ///\r
+ /// The GCD memory space map is checked to see if the memory range starting \r
+ /// at the specified Address is available.\r
+ ///\r
EfiGcdAllocateAddress,\r
+ ///\r
+ /// The GCD memory space map is searched from the highest address down to the lowest address \r
+ /// looking for unallocated memory ranges.\r
+ ///\r
EfiGcdAllocateAnySearchTopDown,\r
+ ///\r
+ /// The GCD memory space map is searched from the specified MaxAddress \r
+ /// down to the lowest address looking for unallocated memory ranges.\r
+ ///\r
EfiGcdAllocateMaxAddressSearchTopDown,\r
EfiGcdMaxAllocateType\r
} EFI_GCD_ALLOCATE_TYPE;\r
#define DXE_SERVICES_REVISION ((1<<16) | (00))\r
\r
typedef struct {\r
+ ///\r
+ /// The table header for the DXE Services Table.\r
+ /// This header contains the DXE_SERVICES_SIGNATURE and DXE_SERVICES_REVISION values.\r
+ ///\r
EFI_TABLE_HEADER Hdr;\r
\r
//\r
/// \r
typedef union {\r
struct {\r
+ ///\r
+ /// The IntegrityCheck.Checksum.Header field is an 8-bit checksum of the file\r
+ /// header. The State and IntegrityCheck.Checksum.File fields are assumed\r
+ /// to be zero and the checksum is calculated such that the entire header sums to zero.\r
+ ///\r
UINT8 Header;\r
+ ///\r
+ /// If the FFS_ATTRIB_CHECKSUM (see definition below) bit of the Attributes\r
+ /// field is set to one, the IntegrityCheck.Checksum.File field is an 8-bit\r
+ /// checksum of the entire file The State field and the file tail are assumed to be zero\r
+ /// and the checksum is calculated such that the entire file sums to zero.\r
+ /// If the FFS_ATTRIB_CHECKSUM bit of the Attributes field is cleared to zero,\r
+ /// the IntegrityCheck.Checksum.File field must be initialized with a value of\r
+ /// 0x55AA. The IntegrityCheck.Checksum.File field is valid any time the\r
+ /// EFI_FILE_DATA_VALID bit is set in the State field.\r
+ ///\r
UINT8 File;\r
} Checksum;\r
+ ///\r
+ /// This is the full 16 bits of the IntegrityCheck field.\r
+ ///\r
UINT16 Checksum16;\r
} EFI_FFS_INTEGRITY_CHECK;\r
\r
/// contents and state of the files.\r
/// \r
typedef struct {\r
+ ///\r
+ /// This GUID is the file name. It is used to uniquely identify the file.\r
+ ///\r
EFI_GUID Name;\r
+ ///\r
+ /// Used to verify the integrity of the file.\r
+ ///\r
EFI_FFS_INTEGRITY_CHECK IntegrityCheck;\r
+ ///\r
+ /// Identifies the type of file.\r
+ ///\r
EFI_FV_FILETYPE Type;\r
+ ///\r
+ /// Declares various file attribute bits.\r
+ ///\r
EFI_FFS_FILE_ATTRIBUTES Attributes;\r
+ ///\r
+ /// The length of the file in bytes, including the FFS header.\r
+ ///\r
UINT8 Size[3];\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
} EFI_FFS_FILE_HEADER;\r
\r
/// Common section header\r
/// \r
typedef struct {\r
+ ///\r
+ /// A 24-bit unsigned integer that contains the total size of the section in bytes, \r
+ /// including the EFI_COMMON_SECTION_HEADER.\r
+ ///\r
UINT8 Size[3];\r
EFI_SECTION_TYPE Type;\r
+ ///\r
+ /// Declares the section type.\r
+ ///\r
} EFI_COMMON_SECTION_HEADER;\r
\r
///\r
/// section data is compressed.\r
/// \r
typedef struct {\r
+ ///\r
+ /// Usual common section header. CommonHeader.Type = EFI_SECTION_COMPRESSION.\r
+ ///\r
EFI_COMMON_SECTION_HEADER CommonHeader;\r
+ ///\r
+ /// UINT32 that indicates the size of the section data after decompression.\r
+ ///\r
UINT32 UncompressedLength;\r
+ ///\r
+ /// Indicates which compression algorithm is used.\r
+ ///\r
UINT8 CompressionType;\r
} EFI_COMPRESSION_SECTION;\r
\r
/// Leaf section which contains a single GUID.\r
/// \r
typedef struct {\r
+ ///\r
+ /// Common section header. CommonHeader.Type = EFI_SECTION_FREEFORM_SUBTYPE_GUID.\r
+ ///\r
EFI_COMMON_SECTION_HEADER CommonHeader;\r
+ ///\r
+ /// This GUID is defined by the creator of the file. It is a vendor-defined file type.\r
+ ///\r
EFI_GUID SubTypeGuid;\r
} EFI_FREEFORM_SUBTYPE_GUID_SECTION;\r
\r
/// Leaf section which is encapsulation defined by specific GUID\r
/// \r
typedef struct {\r
+ ///\r
+ /// Common section header. CommonHeader.Type = EFI_SECTION_GUID_DEFINED.\r
+ ///\r
EFI_COMMON_SECTION_HEADER CommonHeader;\r
+ ///\r
+ /// GUID that defines the format of the data that follows. It is a vendor-defined section type.\r
+ ///\r
EFI_GUID SectionDefinitionGuid;\r
+ ///\r
+ /// Contains the offset in bytes from the beginning of the common header to the first byte of the data.\r
+ ///\r
UINT16 DataOffset;\r
+ ///\r
+ /// Bit field that declares some specific characteristics of the section contents.\r
+ ///\r
UINT16 Attributes;\r
} EFI_GUID_DEFINED_SECTION;\r
\r
\r
\r
typedef struct {\r
+ ///\r
+ /// The number of sequential blocks which are of the same size.\r
+ ///\r
UINT32 NumBlocks;\r
+ ///\r
+ /// The size of the blocks.\r
+ ///\r
UINT32 Length;\r
} EFI_FV_BLOCK_MAP_ENTRY;\r
\r
/// Describes the features and layout of the firmware volume.\r
///\r
typedef struct {\r
+ ///\r
+ /// The first 16 bytes are reserved to allow for the reset vector of \r
+ /// processors whose reset vector is at address 0.\r
+ ///\r
UINT8 ZeroVector[16];\r
+ ///\r
+ /// Declares the file system with which the firmware volume is formatted.\r
+ ///\r
EFI_GUID FileSystemGuid;\r
+ ///\r
+ /// Length in bytes of the complete firmware volume, including the header.\r
+ ///\r
UINT64 FvLength;\r
+ ///\r
+ /// Set to EFI_FVH_SIGNATURE\r
+ ///\r
UINT32 Signature;\r
+ ///\r
+ /// Declares capabilities and power-on defaults for the firmware volume.\r
+ ///\r
EFI_FVB_ATTRIBUTES_2 Attributes;\r
+ ///\r
+ /// Length in bytes of the complete firmware volume header.\r
+ ///\r
UINT16 HeaderLength;\r
+ ///\r
+ /// A 16-bit checksum of the firmware volume header. A valid header sums to zero.\r
+ ///\r
UINT16 Checksum;\r
+ ///\r
+ /// Offset, relative to the start of the header, of the extended header\r
+ /// (EFI_FIRMWARE_VOLUME_EXT_HEADER) or zero if there is no extended header.\r
+ ///\r
UINT16 ExtHeaderOffset;\r
+ ///\r
+ /// This field must always be set to zero.\r
+ ///\r
UINT8 Reserved[1];\r
+ ///\r
+ /// Set to 2. Future versions of this specification may define new header fields and will\r
+ /// increment the Revision field accordingly.\r
+ ///\r
UINT8 Revision;\r
+ ///\r
+ /// An array of run-length encoded FvBlockMapEntry structures. The array is\r
+ /// terminated with an entry of {0,0}.\r
+ ///\r
EFI_FV_BLOCK_MAP_ENTRY BlockMap[1];\r
} EFI_FIRMWARE_VOLUME_HEADER;\r
\r
/// Extension header pointed by ExtHeaderOffset of volume header.\r
/// \r
typedef struct {\r
+ ///\r
+ /// Firmware volume name.\r
+ ///\r
EFI_GUID FvName;\r
+ ///\r
+ /// Size of the rest of the extension header, including this structure.\r
+ ///\r
UINT32 ExtHeaderSize;\r
} EFI_FIRMWARE_VOLUME_EXT_HEADER;\r
\r
/// Entry struture for describing FV extension header\r
/// \r
typedef struct {\r
+ ///\r
+ /// Size of this header extension.\r
+ ///\r
UINT16 ExtEntrySize;\r
+ ///\r
+ /// Type of the header.\r
+ ///\r
UINT16 ExtEntryType;\r
} EFI_FIRMWARE_VOLUME_EXT_ENTRY;\r
\r
/// This extension header provides a mapping between a GUID and an OEM file type.\r
/// \r
typedef struct {\r
+ ///\r
+ /// Standard extension entry, with the type EFI_FV_EXT_TYPE_OEM_TYPE.\r
+ ///\r
EFI_FIRMWARE_VOLUME_EXT_ENTRY Hdr;\r
+ ///\r
+ /// A bit mask, one bit for each file type between 0xC0 (bit 0) and 0xDF (bit 31). If a bit\r
+ /// is '1', then the GUID entry exists in Types. If a bit is '0' then no GUID entry exists in Types.\r
+ ///\r
UINT32 TypeMask;\r
-\r
- //\r
- // Array of GUIDs. \r
- // Each GUID represents an OEM file type.\r
- // \r
+ ///\r
+ /// An array of GUIDs, each GUID representing an OEM file type.\r
+ /// \r
EFI_GUID Types[1];\r
} EFI_FIRMWARE_VOLUME_EXT_ENTRY_OEM_TYPE;\r
\r
/// All HOBs must contain this generic HOB header.\r
/// \r
typedef struct {\r
+ ///\r
+ /// Identifies the HOB data structure type.\r
+ ///\r
UINT16 HobType;\r
+ ///\r
+ /// The length in bytes of the HOB.\r
+ ///\r
UINT16 HobLength;\r
+ ///\r
+ /// This field must always be set to zero.\r
+ ///\r
UINT32 Reserved;\r
} EFI_HOB_GENERIC_HEADER;\r
\r
/// This HOB must be the first one in the HOB list.\r
/// \r
typedef struct {\r
+ ///\r
+ /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_HANDOFF.\r
+ ///\r
EFI_HOB_GENERIC_HEADER Header;\r
+ ///\r
+ /// The version number pertaining to the PHIT HOB definition.\r
+ /// This value is 4 bytes in length to provide an 8-byte aligned entry \r
+ /// when it is combined with the 4-byte BootMode.\r
+ ///\r
UINT32 Version;\r
+ ///\r
+ /// The system boot mode as determined during the HOB producer phase.\r
+ ///\r
EFI_BOOT_MODE BootMode;\r
+ ///\r
+ /// The highest address location of memory that is allocated for use by the HOB producer\r
+ /// phase. This address must be 4-KB aligned to meet page restrictions of UEFI.\r
+ ///\r
EFI_PHYSICAL_ADDRESS EfiMemoryTop;\r
+ ///\r
+ /// The lowest address location of memory that is allocated for use by the HOB producer phase.\r
+ ///\r
EFI_PHYSICAL_ADDRESS EfiMemoryBottom;\r
+ ///\r
+ /// The highest address location of free memory that is currently available \r
+ /// for use by the HOB producer phase.\r
+ ///\r
EFI_PHYSICAL_ADDRESS EfiFreeMemoryTop;\r
+ ///\r
+ /// The lowest address location of free memory that is available for use by the HOB producer phase.\r
+ ///\r
EFI_PHYSICAL_ADDRESS EfiFreeMemoryBottom;\r
+ ///\r
+ /// The end of the HOB list.\r
+ ///\r
EFI_PHYSICAL_ADDRESS EfiEndOfHobList;\r
} EFI_HOB_HANDOFF_INFO_TABLE;\r
\r
///\r
/// Describes all memory ranges used during the HOB producer \r
/// phase that exist outside the HOB list. This HOB type \r
-/// describes how memory is used, \r
-/// not the physical attributes of memory.\r
-/// \r
+/// describes how memory is used, not the physical attributes of memory.\r
+///\r
typedef struct {\r
+ ///\r
+ /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION.\r
+ ///\r
EFI_HOB_GENERIC_HEADER Header;\r
+ ///\r
+ /// An instance of the EFI_HOB_MEMORY_ALLOCATION_HEADER that describes the\r
+ /// various attributes of the logical memory allocation.\r
+ ///\r
EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor;\r
//\r
// Additional data pertaining to the "Name" Guid memory\r
/// content in the HOB producer phase is executing.\r
/// \r
typedef struct {\r
+ ///\r
+ /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION.\r
+ ///\r
EFI_HOB_GENERIC_HEADER Header;\r
+ ///\r
+ /// An instance of the EFI_HOB_MEMORY_ALLOCATION_HEADER that describes the\r
+ /// various attributes of the logical memory allocation.\r
+ ///\r
EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor;\r
} EFI_HOB_MEMORY_ALLOCATION_STACK;\r
\r
/// register overflow store.\r
/// \r
typedef struct {\r
+ ///\r
+ /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION.\r
+ ///\r
EFI_HOB_GENERIC_HEADER Header;\r
+ ///\r
+ /// An instance of the EFI_HOB_MEMORY_ALLOCATION_HEADER that describes the\r
+ /// various attributes of the logical memory allocation.\r
+ ///\r
EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor;\r
} EFI_HOB_MEMORY_ALLOCATION_BSP_STORE;\r
\r
/// Defines the location and entry point of the HOB consumer phase.\r
///\r
typedef struct {\r
+ ///\r
+ /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION.\r
+ ///\r
EFI_HOB_GENERIC_HEADER Header;\r
+ ///\r
+ /// An instance of the EFI_HOB_MEMORY_ALLOCATION_HEADER that describes the\r
+ /// various attributes of the logical memory allocation.\r
+ ///\r
EFI_HOB_MEMORY_ALLOCATION_HEADER MemoryAllocationHeader;\r
+ ///\r
+ /// The GUID specifying the values of the firmware file system name \r
+ /// that contains the HOB consumer phase component.\r
+ ///\r
EFI_GUID ModuleName;\r
+ ///\r
+ /// The address of the memory-mapped firmware volume \r
+ /// that contains the HOB consumer phase firmware file.\r
+ ///\r
EFI_PHYSICAL_ADDRESS EntryPoint;\r
} EFI_HOB_MEMORY_ALLOCATION_MODULE;\r
\r
/// host bus during the HOB producer phase.\r
/// \r
typedef struct {\r
+ ///\r
+ /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_RESOURCE_DESCRIPTOR.\r
+ ///\r
EFI_HOB_GENERIC_HEADER Header;\r
+ ///\r
+ /// A GUID representing the owner of the resource. This GUID is used by HOB\r
+ /// consumer phase components to correlate device ownership of a resource.\r
+ ///\r
EFI_GUID Owner;\r
+ ///\r
+ /// Resource type enumeration as defined by EFI_RESOURCE_TYPE.\r
+ ///\r
EFI_RESOURCE_TYPE ResourceType;\r
+ ///\r
+ /// Resource attributes as defined by EFI_RESOURCE_ATTRIBUTE_TYPE.\r
+ ///\r
EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute;\r
+ ///\r
+ /// Physical start address of the resource region. \r
+ ///\r
EFI_PHYSICAL_ADDRESS PhysicalStart;\r
+ ///\r
+ /// Number of bytes of the resource region.\r
+ ///\r
UINT64 ResourceLength;\r
} EFI_HOB_RESOURCE_DESCRIPTOR;\r
\r
/// maintain and manage HOBs with specific GUID.\r
/// \r
typedef struct {\r
+ ///\r
+ /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_GUID_EXTENSION.\r
+ ///\r
EFI_HOB_GENERIC_HEADER Header;\r
- EFI_GUID Name;\r
-\r
///\r
- /// Guid specific data goes here\r
+ /// A GUID that defines the contents of this HOB.\r
///\r
+ EFI_GUID Name;\r
+ //\r
+ // Guid specific data goes here\r
+ //\r
} EFI_HOB_GUID_TYPE;\r
\r
///\r
/// Details the location of firmware volumes that contain firmware files.\r
/// \r
typedef struct {\r
+ ///\r
+ /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_FV.\r
+ ///\r
EFI_HOB_GENERIC_HEADER Header;\r
+ ///\r
+ /// The physical memory-mapped base address of the firmware volume.\r
+ ///\r
EFI_PHYSICAL_ADDRESS BaseAddress;\r
+ ///\r
+ /// The length in bytes of the firmware volume.\r
+ ///\r
UINT64 Length;\r
} EFI_HOB_FIRMWARE_VOLUME;\r
\r
/// from a file within another firmware volume.\r
/// \r
typedef struct {\r
+ ///\r
+ /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_FV2.\r
+ ///\r
EFI_HOB_GENERIC_HEADER Header;\r
+ ///\r
+ /// The physical memory-mapped base address of the firmware volume.\r
+ ///\r
EFI_PHYSICAL_ADDRESS BaseAddress;\r
+ ///\r
+ /// The length in bytes of the firmware volume.\r
+ ///\r
UINT64 Length;\r
+ ///\r
+ /// The name of the firmware volume.\r
+ ///\r
EFI_GUID FvName;\r
+ ///\r
+ /// The name of the firmware file which contained this firmware volume.\r
+ ///\r
EFI_GUID FileName;\r
} EFI_HOB_FIRMWARE_VOLUME2;\r
\r
/// Describes processor information, such as address space and I/O space capabilities.\r
///\r
typedef struct {\r
+ ///\r
+ /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_CPU.\r
+ ///\r
EFI_HOB_GENERIC_HEADER Header;\r
+ ///\r
+ /// Identifies the maximum physical memory addressability of the processor.\r
+ ///\r
UINT8 SizeOfMemorySpace;\r
+ ///\r
+ /// Identifies the maximum physical I/O addressability of the processor.\r
+ ///\r
UINT8 SizeOfIoSpace;\r
+ ///\r
+ /// This field will always be set to zero.\r
+ ///\r
UINT8 Reserved[6];\r
} EFI_HOB_CPU;\r
\r
/// Describes pool memory allocations.\r
/// \r
typedef struct {\r
+ ///\r
+ /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_POOL.\r
+ ///\r
EFI_HOB_GENERIC_HEADER Header;\r
} EFI_HOB_MEMORY_POOL;\r
\r
/// the structure and is Size bytes long.\r
///\r
typedef struct {\r
+ ///\r
+ /// The size of the structure. This is specified to enable future expansion.\r
+ ///\r
UINT16 HeaderSize;\r
+ ///\r
+ /// The size of the data in bytes. This does not include the size of the header structure.\r
+ ///\r
UINT16 Size;\r
+ ///\r
+ /// The GUID defining the type of the data.\r
+ ///\r
EFI_GUID Type;\r
} EFI_STATUS_CODE_DATA;\r
\r
/// The data structure through which a PEIM describes available services to the PEI Foundation.\r
/// \r
typedef struct {\r
+ ///\r
+ /// This field is a set of flags describing the characteristics of this imported table entry.\r
+ /// All flags are defined as EFI_PEI_PPI_DESCRIPTOR_***, which can also be combined into one.\r
+ ///\r
UINTN Flags;\r
+ ///\r
+ /// The address of the EFI_GUID that names the interface.\r
+ ///\r
EFI_GUID *Guid;\r
+ ///\r
+ /// A pointer to the PPI. It contains the information necessary to install a service.\r
+ ///\r
VOID *Ppi;\r
} EFI_PEI_PPI_DESCRIPTOR;\r
\r
/// Foundation where to invoke the notification service.\r
/// \r
struct _EFI_PEI_NOTIFY_DESCRIPTOR {\r
+ ///\r
+ /// Details if the type of notification is callback or dispatch.\r
+ ///\r
UINTN Flags;\r
+ ///\r
+ /// The address of the EFI_GUID that names the interface.\r
+ ///\r
EFI_GUID *Guid;\r
+ ///\r
+ /// Address of the notification callback function itself within the PEIM.\r
+ ///\r
EFI_PEIM_NOTIFY_ENTRY_POINT Notify;\r
};\r
\r
-///\r
-/// Describes request of the module to be loaded to \r
-/// the permanent memory once it is available. Unlike most of the other HOBs, \r
-/// this HOB is produced and consumed during the HOB producer phase.\r
-/// \r
-typedef struct _EFI_HOB_LOAD_PEIM {\r
- EFI_HOB_GENERIC_HEADER Header;\r
- EFI_PEI_FILE_HANDLE FileHandle;\r
- EFI_PEIM_ENTRY_POINT2 EntryPoint;\r
- EFI_PEIM_ENTRY_POINT2 InMemEntryPoint;\r
-} EFI_HOB_LOAD_PEIM;\r
-\r
-\r
/**\r
This service is the first one provided by the PEI Foundation. This function \r
installs an interface in the PEI PPI database by GUID. The purpose of the \r
EfiPciIoOperationBusMasterWrite,\r
///\r
/// Provides both read and write access to system memory by both the processor and a\r
- /// bus master. The buffer is coherent from both the processor¡¯s and the bus master's point of view.\r
+ /// bus master. The buffer is coherent from both the processor's and the bus master's point of view.\r
///\r
EfiPciIoOperationBusMasterCommonBuffer,\r
EfiPciIoOperationMaximum\r
///\r
typedef enum {\r
///\r
- /// Retrieve the PCI controller¡¯s current attributes, and return them in Result.\r
+ /// Retrieve the PCI controller's current attributes, and return them in Result.\r
///\r
EfiPciIoAttributeOperationGet,\r
///\r
- /// Set the PCI controller¡¯s current attributes to Attributes.\r
+ /// Set the PCI controller's current attributes to Attributes.\r
///\r
EfiPciIoAttributeOperationSet,\r
///\r
/// GPT Partition Table Header\r
///\r
typedef struct {\r
+ ///\r
+ /// The table header for the GPT partition Table.\r
+ /// This header contains EFI_PTAB_HEADER_ID\r
+ ///\r
EFI_TABLE_HEADER Header;\r
+ ///\r
+ /// The LBA that contains this data structure.\r
+ ///\r
EFI_LBA MyLBA;\r
+ ///\r
+ /// LBA address of the alternate GUID Partition Table Header.\r
+ ///\r
EFI_LBA AlternateLBA;\r
+ ///\r
+ /// The first usable logical block that may be used\r
+ /// by a partition described by a GUID Partition Entry.\r
+ ///\r
EFI_LBA FirstUsableLBA;\r
+ ///\r
+ /// The last usable logical block that may be used\r
+ /// by a partition described by a GUID Partition Entry.\r
+ ///\r
EFI_LBA LastUsableLBA;\r
+ ///\r
+ /// GUID that can be used to uniquely identify the disk.\r
+ ///\r
EFI_GUID DiskGUID;\r
+ ///\r
+ /// The starting LBA of the GUID Partition Entry array.\r
+ ///\r
EFI_LBA PartitionEntryLBA;\r
+ ///\r
+ /// The number of Partition Entries in the GUID Partition Entry array.\r
+ ///\r
UINT32 NumberOfPartitionEntries;\r
+ ///\r
+ /// The size, in bytes, of each the GUID Partition\r
+ /// Entry structures in the GUID Partition Entry\r
+ /// array. Must be a multiple of 8.\r
+ ///\r
UINT32 SizeOfPartitionEntry;\r
+ ///\r
+ /// The CRC32 of the GUID Partition Entry array.\r
+ /// Starts at PartitionEntryLBA and is\r
+ /// computed over a byte length of\r
+ /// NumberOfPartitionEntries * SizeOfPartitionEntry.\r
+ ///\r
UINT32 PartitionEntryArrayCRC32;\r
} EFI_PARTITION_TABLE_HEADER;\r
\r
/// GPT Partition Entry\r
///\r
typedef struct {\r
+ ///\r
+ /// Unique ID that defines the purpose and type of this Partition. A value of\r
+ /// zero defines that this partition entry is not being used.\r
+ ///\r
EFI_GUID PartitionTypeGUID;\r
+ ///\r
+ /// GUID that is unique for every partition entry. Every partition ever\r
+ /// created will have a unique GUID.\r
+ /// This GUID must be assigned when the GUID Partition Entry is created.\r
+ ///\r
EFI_GUID UniquePartitionGUID;\r
+ ///\r
+ /// Starting LBA of the partition defined by this entry\r
+ ///\r
EFI_LBA StartingLBA;\r
+ ///\r
+ /// Ending LBA of the partition defined by this entry.\r
+ ///\r
EFI_LBA EndingLBA;\r
+ ///\r
+ /// Attribute bits, all bits reserved by UEFI\r
+ /// Bit 0 Required for the platform to function.\r
+ /// Bits 1-47 Undefined and must be zero.\r
+ /// Bits 48-63 Reserved for GUID specific use.\r
+ ///\r
UINT64 Attributes;\r
+ ///\r
+ /// Unicode string.\r
+ ///\r
CHAR16 PartitionName[36];\r
} EFI_PARTITION_ENTRY;\r
\r
/// Enumeration of memory types introduced in UEFI.\r
/// \r
typedef enum {\r
+ ///\r
+ /// Not used.\r
+ ///\r
EfiReservedMemoryType,\r
+ ///\r
+ /// The code portions of a loaded application. \r
+ /// (Note that UEFI OS loaders are UEFI applications.)\r
+ ///\r
EfiLoaderCode,\r
+ ///\r
+ /// The data portions of a loaded application and the default data allocation\r
+ /// type used by an application to allocate pool memory.\r
+ ///\r
EfiLoaderData,\r
+ ///\r
+ /// The code portions of a loaded Boot Services Driver\r
+ ///\r
EfiBootServicesCode,\r
+ ///\r
+ /// The data portions of a loaded Boot Serves Driver, and the default data\r
+ /// allocation type used by a Boot Services Driver to allocate pool memory.\r
+ ///\r
EfiBootServicesData,\r
+ ///\r
+ /// The code portions of a loaded Runtime Services Driver.\r
+ ///\r
EfiRuntimeServicesCode,\r
+ ///\r
+ /// The data portions of a loaded Runtime Services Driver and the default\r
+ /// data allocation type used by a Runtime Services Driver to allocate pool memory.\r
+ ///\r
EfiRuntimeServicesData,\r
+ ///\r
+ /// Free (unallocated) memory.\r
+ ///\r
EfiConventionalMemory,\r
+ ///\r
+ /// Memory in which errors have been detected.\r
+ ///\r
EfiUnusableMemory,\r
+ ///\r
+ /// Memory that holds the ACPI tables.\r
+ ///\r
EfiACPIReclaimMemory,\r
+ ///\r
+ /// Address space reserved for use by the firmware.\r
+ ///\r
EfiACPIMemoryNVS,\r
+ ///\r
+ /// Used by system firmware to request that a memory-mapped IO region\r
+ /// be mapped by the OS to a virtual address so it can be accessed by EFI runtime services.\r
+ ///\r
EfiMemoryMappedIO,\r
+ ///\r
+ /// System memory-mapped IO region that is used to translate memory\r
+ /// cycles to IO cycles by the processor.\r
+ ///\r
EfiMemoryMappedIOPortSpace,\r
+ ///\r
+ /// Address space reserved by the firmware for code that is part of the processor.\r
+ ///\r
EfiPalCode,\r
EfiMaxMemoryType\r
} EFI_MEMORY_TYPE;\r
\r
-\r
///\r
/// Data structure that precedes all of the standard EFI table types.\r
/// \r
typedef struct {\r
+ ///\r
+ /// A 64-bit signature that identifies the type of table that follows.\r
+ /// Unique signatures have been generated for the EFI System Table,\r
+ /// the EFI Boot Services Table, and the EFI Runtime Services Table.\r
+ ///\r
UINT64 Signature;\r
+ ///\r
+ /// The revision of the EFI Specification to which this table\r
+ /// conforms. The upper 16 bits of this field contain the major\r
+ /// revision value, and the lower 16 bits contain the minor revision\r
+ /// value. The minor revision values are limited to the range of 00..99.\r
+ ///\r
UINT32 Revision;\r
+ ///\r
+ /// The size, in bytes, of the entire table including the EFI_TABLE_HEADER.\r
+ ///\r
UINT32 HeaderSize;\r
+ ///\r
+ /// The 32-bit CRC for the entire table. This value is computed by\r
+ /// setting this field to 0, and computing the 32-bit CRC for HeaderSize bytes.\r
+ ///\r
UINT32 CRC32;\r
+ ///\r
+ /// Reserved field that must be set to 0.\r
+ ///\r
UINT32 Reserved;\r
} EFI_TABLE_HEADER;\r
\r
#define EFI_CERT_TYPE_RSA2048_SHA256_GUID \\r
{0xa7717414, 0xc616, 0x4977, {0x94, 0x20, 0x84, 0x47, 0x12, 0xa7, 0x35, 0xbf } }\r
\r
-//\r
-// WIN_CERTIFICATE_UEFI_GUID.CertData\r
-// \r
+///\r
+/// WIN_CERTIFICATE_UEFI_GUID.CertData\r
+/// \r
typedef struct _EFI_CERT_BLOCK_RSA_2048_SHA256 {\r
UINT32 HashType;\r
UINT8 PublicKey[256];\r
/// real time clock device as exposed through the EFI interfaces.\r
///\r
typedef struct {\r
+ ///\r
+ /// Provides the reporting resolution of the real-time clock device in\r
+ /// counts per second. For a normal PC-AT CMOS RTC device, this\r
+ /// value would be 1 Hz, or 1, to indicate that the device only reports\r
+ /// the time to the resolution of 1 second.\r
+ ///\r
UINT32 Resolution;\r
+ ///\r
+ /// Provides the timekeeping accuracy of the real-time clock in an\r
+ /// error rate of 1E-6 parts per million. For a clock with an accuracy\r
+ /// of 50 parts per million, the value in this field would be\r
+ /// 50,000,000.\r
+ ///\r
UINT32 Accuracy;\r
+ ///\r
+ /// A TRUE indicates that a time set operation clears the device¡¯s\r
+ /// time below the Resolution reporting level. A FALSE\r
+ /// indicates that the state below the Resolution level of the\r
+ /// device is not cleared when the time is set. Normal PC-AT CMOS\r
+ /// RTC devices set this value to FALSE.\r
+ ///\r
BOOLEAN SetsToZero;\r
} EFI_TIME_CAPABILITIES;\r
\r
/// EFI Capsule Block Descriptor\r
///\r
typedef struct {\r
+ ///\r
+ /// Length in bytes of the data pointed to by DataBlock/ContinuationPointer.\r
+ ///\r
UINT64 Length;\r
union {\r
+ ///\r
+ /// Physical address of the data block. This member of the union is\r
+ /// used if Length is not equal to zero.\r
+ ///\r
EFI_PHYSICAL_ADDRESS DataBlock;\r
+ ///\r
+ /// Physical address of another block of\r
+ /// EFI_CAPSULE_BLOCK_DESCRIPTOR structures. This\r
+ /// member of the union is used if Length is equal to zero. If\r
+ /// ContinuationPointer is zero this entry represents the end of the list.\r
+ ///\r
EFI_PHYSICAL_ADDRESS ContinuationPointer;\r
} Union;\r
} EFI_CAPSULE_BLOCK_DESCRIPTOR;\r
/// EFI Capsule Header\r
///\r
typedef struct {\r
+ ///\r
+ /// A GUID that defines the contents of a capsule.\r
+ ///\r
EFI_GUID CapsuleGuid;\r
+ ///\r
+ /// The size of the capsule header. This may be larger than the size of\r
+ /// the EFI_CAPSULE_HEADER since CapsuleGuid may imply\r
+ /// extended header entries\r
+ ///\r
UINT32 HeaderSize;\r
+ ///\r
+ /// Bit-mapped list describing the capsule attributes. The Flag values\r
+ /// of 0x0000 ¨C 0xFFFF are defined by CapsuleGuid. Flag values\r
+ /// of 0x10000 ¨C 0xFFFF0000 are defined by this specification\r
+ ///\r
UINT32 Flags;\r
+ ///\r
+ /// Size in bytes of the capsule.\r
+ ///\r
UINT32 CapsuleImageSize;\r
} EFI_CAPSULE_HEADER;\r
\r
-//\r
-// The EFI System Table entry must point to an array of capsules\r
-// that contain the same CapsuleGuid value. The array must be\r
-// prefixed by a UINT32 that represents the size of the array of capsules.\r
-//\r
+///\r
+/// The EFI System Table entry must point to an array of capsules\r
+/// that contain the same CapsuleGuid value. The array must be\r
+/// prefixed by a UINT32 that represents the size of the array of capsules.\r
+///\r
typedef struct {\r
+ ///\r
+ /// the size of the array of capsules.\r
+ ///\r
UINT32 CapsuleArrayNumber;\r
+ ///\r
+ /// Point to an array of capsules that contain the same CapsuleGuid value.\r
+ ///\r
VOID* CapsulePtr[1];\r
} EFI_CAPSULE_TABLE;\r
\r
///\r
typedef union {\r
struct {\r
+ ///\r
+ /// Indicates the revision of the EFI_KEY_OPTION structure. This revision level should be 0.\r
+ ///\r
UINT32 Revision : 8;\r
+ ///\r
+ /// Either the left or right Shift keys must be pressed (1) or must not be pressed (0).\r
+ ///\r
UINT32 ShiftPressed : 1;\r
+ ///\r
+ /// Either the left or right Control keys must be pressed (1) or must not be pressed (0).\r
+ ///\r
UINT32 ControlPressed : 1;\r
+ ///\r
+ /// Either the left or right Alt keys must be pressed (1) or must not be pressed (0).\r
+ ///\r
UINT32 AltPressed : 1;\r
+ ///\r
+ /// Either the left or right Logo keys must be pressed (1) or must not be pressed (0).\r
+ ///\r
UINT32 LogoPressed : 1;\r
+ ///\r
+ /// The Menu key must be pressed (1) or must not be pressed (0).\r
+ ///\r
UINT32 MenuPressed : 1;\r
+ ///\r
+ /// The SysReq key must be pressed (1) or must not be pressed (0).\r
+ ///\r
UINT32 SysReqPessed : 1;\r
UINT32 Reserved : 16;\r
+ ///\r
+ /// Specifies the actual number of entries in EFI_KEY_OPTION.Keys, from 0-3. If\r
+ /// zero, then only the shift state is considered. If more than one, then the boot option will\r
+ /// only be launched if all of the specified keys are pressed with the same shift state.\r
+ ///\r
UINT32 InputKeyCount : 2;\r
} Options;\r
UINT32 PackedValue;\r
/// EFI Key Option\r
///\r
typedef struct {\r
- EFI_BOOT_KEY_DATA KeyOptions;\r
+ ///\r
+ /// Specifies options about how the key will be processed.\r
+ ///\r
+ EFI_BOOT_KEY_DATA KeyData;\r
+ ///\r
+ /// The CRC-32 which should match the CRC-32 of the entire EFI_LOAD_OPTION to\r
+ /// which BootOption refers. If the CRC-32s do not match this value, then this key\r
+ /// option is ignored.\r
+ ///\r
UINT32 BootOptionCrc;\r
+ ///\r
+ /// The Boot#### option which will be invoked if this key is pressed and the boot option\r
+ /// is active (LOAD_OPTION_ACTIVE is set).\r
+ ///\r
UINT16 BootOption;\r
-//EFI_INPUT_KEY Keys[];\r
+ ///\r
+ /// The key codes to compare against those returned by the\r
+ /// EFI_SIMPLE_TEXT_INPUT and EFI_SIMPLE_TEXT_INPUT_EX protocols.\r
+ /// The number of key codes (0-3) is specified by the EFI_KEY_CODE_COUNT field in KeyOptions.\r
+ ///\r
+ //EFI_INPUT_KEY Keys[];\r
} EFI_KEY_OPTION;\r
\r
#define EFI_KEY_OPTION_SHIFT 0x00000001\r