david/ipxe
david
/
ipxe
Archived
1
0
Fork 0

[efi] Update to latest UEFI headers

This commit is contained in:
Michael Brown 2008-11-18 21:54:51 +00:00
parent 0a8a17e669
commit ab96932ab3
26 changed files with 1891 additions and 1975 deletions

View File

@ -1,5 +1,4 @@
/** @file
Root include file for Mde Package Base type modules
This is the include file for any module of type base. Base modules only use
@ -57,34 +56,18 @@ struct _LIST_ENTRY {
// Modifiers for Data Types used to self document code.
// This concept is borrowed for UEFI specification.
//
#ifndef IN
//
// Some other envirnments use this construct, so #ifndef to prevent
// mulitple definition.
//
#define IN
#define OUT
#define OPTIONAL
#endif
//
// Constants. They may exist in other build structures, so #ifndef them.
//
#ifndef TRUE
//
// UEFI specification claims 1 and 0. We are concerned about the
// complier portability so we did it this way.
//
#define TRUE ((BOOLEAN)(1==1))
#endif
#ifndef FALSE
#define FALSE ((BOOLEAN)(0==1))
#endif
#ifndef NULL
#define NULL ((VOID *) 0)
#endif
#define BIT0 0x00000001
#define BIT1 0x00000002
@ -196,15 +179,11 @@ struct _LIST_ENTRY {
//
// Also support coding convention rules for var arg macros
//
#ifndef VA_START
typedef CHAR8 *VA_LIST;
#define VA_START(ap, v) (ap = (VA_LIST) & (v) + _INT_SIZE_OF (v))
#define VA_ARG(ap, t) (*(t *) ((ap += _INT_SIZE_OF (t)) - _INT_SIZE_OF (t)))
#define VA_END(ap) (ap = (VA_LIST) 0)
#endif
//
// Macro that returns the byte offset of a field in a data structure.
//
@ -216,20 +195,21 @@ typedef CHAR8 *VA_LIST;
///
#define _CR(Record, TYPE, Field) ((TYPE *) ((CHAR8 *) (Record) - (CHAR8 *) &(((TYPE *) 0)->Field)))
///
/// ALIGN_VALUE - aligns a value up to the next boundary of the given alignment.
///
#define ALIGN_VALUE(Value, Alignment) ((Value) + (((Alignment) - (Value)) & ((Alignment) - 1)))
///
/// ALIGN_POINTER - aligns a pointer to the lowest boundry
///
#define ALIGN_POINTER(p, s) ((VOID *) ((UINTN)(p) + (((s) - ((UINTN) (p))) & ((s) - 1))))
#define ALIGN_POINTER(Pointer, Alignment) ((VOID *) (ALIGN_VALUE ((UINTN)(Pointer), (Alignment))))
///
/// ALIGN_VARIABLE - aligns a variable up to the next natural boundry for int size of a processor
///
#define ALIGN_VARIABLE(Value, Adjustment) \
Adjustment = 0U; \
if ((UINTN) (Value) % sizeof (UINTN)) { \
(Adjustment) = (UINTN)(sizeof (UINTN) - ((UINTN) (Value) % sizeof (UINTN))); \
} \
(Value) = (UINTN)((UINTN) (Value) + (UINTN) (Adjustment))
#define ALIGN_VARIABLE(Value) ALIGN_VALUE ((Value), sizeof (UINTN))
//
// Return the maximum of two operands.
@ -301,5 +281,49 @@ typedef INTN RETURN_STATUS;
#define RETURN_WARN_WRITE_FAILURE ENCODE_WARNING (3)
#define RETURN_WARN_BUFFER_TOO_SMALL ENCODE_WARNING (4)
/**
Returns a 16-bit signature built from 2 ASCII characters.
@param A The first ASCII character.
@param B The second ASCII character.
@return A 16-bit value built from the two ASCII characters specified by A and B.
**/
#define SIGNATURE_16(A, B) ((A) | (B << 8))
/**
Returns a 32-bit signature built from 4 ASCII characters.
@param A The first ASCII character.
@param B The second ASCII character.
@param C The third ASCII character.
@param D The fourth ASCII character.
@return A 32-bit value built from the two ASCII characters specified by A, B,
C and D.
**/
#define SIGNATURE_32(A, B, C, D) (SIGNATURE_16 (A, B) | (SIGNATURE_16 (C, D) << 16))
/**
Returns a 64-bit signature built from 8 ASCII characters.
@param A The first ASCII character.
@param B The second ASCII character.
@param C The third ASCII character.
@param D The fourth ASCII character.
@param E The fifth ASCII character.
@param F The sixth ASCII character.
@param G The seventh ASCII character.
@param H The eighth ASCII character.
@return A 64-bit value built from the two ASCII characters specified by A, B,
C, D, E, F, G and H.
**/
#define SIGNATURE_64(A, B, C, D, E, F, G, H) \
(SIGNATURE_32 (A, B, C, D) | ((UINT64) (SIGNATURE_32 (E, F, G, H)) << 32))
#endif

View File

@ -28,12 +28,6 @@
#endif
#if __INTEL_COMPILER
//
// Disable ICC's remark #593: "LocalVariable" was set but never used
// This is legal ANSI C code so we disable the remark that is turned on with -Wall
//
#pragma warning ( disable : 593 )
//
// Disable ICC's remark #869: "Parameter" was never referenced warning.
// This is legal ANSI C code so we disable the remark that is turned on with -Wall

View File

@ -1,12 +1,13 @@
/** @file
EFI image format for PE32 and PE32+. Please note some data structures are
EFI image format for PE32, PE32+ and TE. Please note some data structures are
different for PE32 and PE32+. EFI_IMAGE_NT_HEADERS32 is for PE32 and
EFI_IMAGE_NT_HEADERS64 is for PE32+.
This file is coded to the Visual Studio, Microsoft Portable Executable and
Common Object File Format Specification, Revision 8.0 - May 16, 2006.
This file also includes some definitions in PI Specification, Revision 1.0.
Copyright (c) 2006 - 2007, Intel Corporation
Copyright (c) 2006 - 2008, 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
@ -17,23 +18,23 @@
**/
#ifndef __EFI_IMAGE_H__
#define __EFI_IMAGE_H__
#ifndef __PE_IMAGE_H__
#define __PE_IMAGE_H__
//
// PE32+ Subsystem type for EFI images
//
///
/// PE32+ Subsystem type for EFI images
///
#define EFI_IMAGE_SUBSYSTEM_EFI_APPLICATION 10
#define EFI_IMAGE_SUBSYSTEM_EFI_BOOT_SERVICE_DRIVER 11
#define EFI_IMAGE_SUBSYSTEM_EFI_RUNTIME_DRIVER 12
#define EFI_IMAGE_SUBSYSTEM_EFI_EFI_ROM 13
#define EFI_IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER 13
#define EFI_IMAGE_SUBSYSTEM_SAL_RUNTIME_DRIVER 13 ///< defined PI Specification, 1.0
//
// PE32+ Machine type for EFI images
//
///
/// PE32+ Machine type for EFI images
///
#define IMAGE_FILE_MACHINE_I386 0x014c
#define IMAGE_FILE_MACHINE_IA64 0x0200
#define IMAGE_FILE_MACHINE_EBC 0x0EBC
@ -47,39 +48,42 @@
#define EFI_IMAGE_MACHINE_EBC IMAGE_FILE_MACHINE_EBC
#define EFI_IMAGE_MACHINE_X64 IMAGE_FILE_MACHINE_X64
#define EFI_IMAGE_DOS_SIGNATURE 0x5A4D // MZ
#define EFI_IMAGE_OS2_SIGNATURE 0x454E // NE
#define EFI_IMAGE_OS2_SIGNATURE_LE 0x454C // LE
#define EFI_IMAGE_NT_SIGNATURE 0x00004550 // PE00
///
/// EXE file formats
///
#define EFI_IMAGE_DOS_SIGNATURE SIGNATURE_16('M', 'Z')
#define EFI_IMAGE_OS2_SIGNATURE SIGNATURE_16('N', 'E')
#define EFI_IMAGE_OS2_SIGNATURE_LE SIGNATURE_16('L', 'E')
#define EFI_IMAGE_NT_SIGNATURE SIGNATURE_32('P', 'E', '\0', '\0')
///
/// PE images can start with an optional DOS header, so if an image is run
/// under DOS it can print an error message.
/// under DOS it can print an error message.
///
typedef struct {
UINT16 e_magic; // Magic number
UINT16 e_cblp; // Bytes on last page of file
UINT16 e_cp; // Pages in file
UINT16 e_crlc; // Relocations
UINT16 e_cparhdr; // Size of header in paragraphs
UINT16 e_minalloc; // Minimum extra paragraphs needed
UINT16 e_maxalloc; // Maximum extra paragraphs needed
UINT16 e_ss; // Initial (relative) SS value
UINT16 e_sp; // Initial SP value
UINT16 e_csum; // Checksum
UINT16 e_ip; // Initial IP value
UINT16 e_cs; // Initial (relative) CS value
UINT16 e_lfarlc; // File address of relocation table
UINT16 e_ovno; // Overlay number
UINT16 e_res[4]; // Reserved words
UINT16 e_oemid; // OEM identifier (for e_oeminfo)
UINT16 e_oeminfo; // OEM information; e_oemid specific
UINT16 e_res2[10]; // Reserved words
UINT32 e_lfanew; // File address of new exe header
UINT16 e_magic; ///< Magic number
UINT16 e_cblp; ///< Bytes on last page of file
UINT16 e_cp; ///< Pages in file
UINT16 e_crlc; ///< Relocations
UINT16 e_cparhdr; ///< Size of header in paragraphs
UINT16 e_minalloc; ///< Minimum extra paragraphs needed
UINT16 e_maxalloc; ///< Maximum extra paragraphs needed
UINT16 e_ss; ///< Initial (relative) SS value
UINT16 e_sp; ///< Initial SP value
UINT16 e_csum; ///< Checksum
UINT16 e_ip; ///< Initial IP value
UINT16 e_cs; ///< Initial (relative) CS value
UINT16 e_lfarlc; ///< File address of relocation table
UINT16 e_ovno; ///< Overlay number
UINT16 e_res[4]; ///< Reserved words
UINT16 e_oemid; ///< OEM identifier (for e_oeminfo)
UINT16 e_oeminfo; ///< OEM information; e_oemid specific
UINT16 e_res2[10]; ///< Reserved words
UINT32 e_lfanew; ///< File address of new exe header
} EFI_IMAGE_DOS_HEADER;
///
/// File header format.
/// COFF File Header (Object and Image)
///
typedef struct {
UINT16 Machine;
@ -91,62 +95,63 @@ typedef struct {
UINT16 Characteristics;
} EFI_IMAGE_FILE_HEADER;
///
/// Size of EFI_IMAGE_FILE_HEADER
///
#define EFI_IMAGE_SIZEOF_FILE_HEADER 20
#define EFI_IMAGE_FILE_RELOCS_STRIPPED 0x0001 // Relocation info stripped from file.
#define EFI_IMAGE_FILE_EXECUTABLE_IMAGE 0x0002 // File is executable (i.e. no unresolved externel references).
#define EFI_IMAGE_FILE_LINE_NUMS_STRIPPED 0x0004 // Line nunbers stripped from file.
#define EFI_IMAGE_FILE_LOCAL_SYMS_STRIPPED 0x0008 // Local symbols stripped from file.
#define EFI_IMAGE_FILE_BYTES_REVERSED_LO 0x0080 // Bytes of machine word are reversed.
#define EFI_IMAGE_FILE_32BIT_MACHINE 0x0100 // 32 bit word machine.
#define EFI_IMAGE_FILE_DEBUG_STRIPPED 0x0200 // Debugging info stripped from file in .DBG file
#define EFI_IMAGE_FILE_SYSTEM 0x1000 // System File.
#define EFI_IMAGE_FILE_DLL 0x2000 // File is a DLL.
#define EFI_IMAGE_FILE_BYTES_REVERSED_HI 0x8000 // Bytes of machine word are reversed.
#define EFI_IMAGE_FILE_MACHINE_UNKNOWN 0
#define EFI_IMAGE_FILE_MACHINE_I386 0x14c // Intel 386.
#define EFI_IMAGE_FILE_MACHINE_R3000 0x162 // MIPS* little-endian, 0540 big-endian
#define EFI_IMAGE_FILE_MACHINE_R4000 0x166 // MIPS* little-endian
#define EFI_IMAGE_FILE_MACHINE_ALPHA 0x184 // Alpha_AXP*
#define EFI_IMAGE_FILE_MACHINE_POWERPC 0x1F0 // IBM* PowerPC Little-Endian
#define EFI_IMAGE_FILE_MACHINE_TAHOE 0x7cc // Intel EM machine
///
/// Characteristics
///
#define EFI_IMAGE_FILE_RELOCS_STRIPPED BIT0 ///< 0x0001 Relocation info stripped from file.
#define EFI_IMAGE_FILE_EXECUTABLE_IMAGE BIT1 ///< 0x0002 File is executable (i.e. no unresolved externel references).
#define EFI_IMAGE_FILE_LINE_NUMS_STRIPPED BIT2 ///< 0x0004 Line nunbers stripped from file.
#define EFI_IMAGE_FILE_LOCAL_SYMS_STRIPPED BIT3 ///< 0x0008 Local symbols stripped from file.
#define EFI_IMAGE_FILE_BYTES_REVERSED_LO BIT7 ///< 0x0080 Bytes of machine word are reversed.
#define EFI_IMAGE_FILE_32BIT_MACHINE BIT8 ///< 0x0100 32 bit word machine.
#define EFI_IMAGE_FILE_DEBUG_STRIPPED BIT9 ///< 0x0200 Debugging info stripped from file in .DBG file
#define EFI_IMAGE_FILE_SYSTEM BIT12 ///< 0x1000 System File.
#define EFI_IMAGE_FILE_DLL BIT13 ///< 0x2000 File is a DLL.
#define EFI_IMAGE_FILE_BYTES_REVERSED_HI BIT15 ///< 0x8000 Bytes of machine word are reversed.
///
/// Other Machine Types
///
#define EFI_IMAGE_FILE_MACHINE_UNKNOWN 0 ///< Any machine type
#define EFI_IMAGE_FILE_MACHINE_I386 0x14c ///< Intel 386.
#define EFI_IMAGE_FILE_MACHINE_R3000 0x162 ///< MIPS* little-endian, 0540 big-endian
#define EFI_IMAGE_FILE_MACHINE_R4000 0x166 ///< MIPS* little-endian
#define EFI_IMAGE_FILE_MACHINE_POWERPC 0x1F0 ///< IBM* PowerPC Little-Endian
//
// * Other names and brands may be claimed as the property of others.
//
///
/// Directory format.
/// Header Data Directories
///
typedef struct {
UINT32 VirtualAddress;
UINT32 Size;
} EFI_IMAGE_DATA_DIRECTORY;
#define EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES 16
typedef struct {
UINT16 Magic;
UINT8 MajorLinkerVersion;
UINT8 MinorLinkerVersion;
UINT32 SizeOfCode;
UINT32 SizeOfInitializedData;
UINT32 SizeOfUninitializedData;
UINT32 AddressOfEntryPoint;
UINT32 BaseOfCode;
UINT32 BaseOfData;
UINT32 BaseOfBss;
UINT32 GprMask;
UINT32 CprMask[4];
UINT32 GpValue;
} EFI_IMAGE_ROM_OPTIONAL_HEADER;
#define EFI_IMAGE_ROM_OPTIONAL_HDR_MAGIC 0x107
#define EFI_IMAGE_SIZEOF_ROM_OPTIONAL_HEADER sizeof (EFI_IMAGE_ROM_OPTIONAL_HEADER)
typedef struct {
EFI_IMAGE_FILE_HEADER FileHeader;
EFI_IMAGE_ROM_OPTIONAL_HEADER OptionalHeader;
} EFI_IMAGE_ROM_HEADERS;
///
/// Directory Entries
///
#define EFI_IMAGE_DIRECTORY_ENTRY_EXPORT 0
#define EFI_IMAGE_DIRECTORY_ENTRY_IMPORT 1
#define EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE 2
#define EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION 3
#define EFI_IMAGE_DIRECTORY_ENTRY_SECURITY 4
#define EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC 5
#define EFI_IMAGE_DIRECTORY_ENTRY_DEBUG 6
#define EFI_IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7
#define EFI_IMAGE_DIRECTORY_ENTRY_GLOBALPTR 8
#define EFI_IMAGE_DIRECTORY_ENTRY_TLS 9
#define EFI_IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10
#define EFI_IMAGE_NUMBER_OF_DIRECTORY_ENTRIES 16
///
/// @attention
@ -168,7 +173,7 @@ typedef struct {
UINT32 SizeOfUninitializedData;
UINT32 AddressOfEntryPoint;
UINT32 BaseOfCode;
UINT32 BaseOfData;
UINT32 BaseOfData; ///< PE32 contains this additional field, which is absent in PE32+
///
/// NT additional fields.
///
@ -266,11 +271,11 @@ typedef struct {
#define EFI_IMAGE_SIZEOF_NT_OPTIONAL64_HEADER sizeof (EFI_IMAGE_NT_HEADERS64)
//
// Processor specific definition of EFI_IMAGE_OPTIONAL_HEADER so the
// type name EFI_IMAGE_OPTIONAL_HEADER is appropriate to the build. Same for
// EFI_IMAGE_NT_HEADERS. These definitions MUST be used by ALL EFI code.
//
///
/// Processor specific definition of EFI_IMAGE_OPTIONAL_HEADER so the
/// type name EFI_IMAGE_OPTIONAL_HEADER is appropriate to the build. Same for
/// EFI_IMAGE_NT_HEADERS. These definitions MUST be used by ALL EFI code.
///
#if defined (MDE_CPU_IA32)
#define EFI_IMAGE_MACHINE_TYPE_SUPPORTED(Machine) \
@ -278,9 +283,6 @@ typedef struct {
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_X64)
//
// @bug - Remove me when other package updated.
//
typedef EFI_IMAGE_NT_HEADERS32 EFI_IMAGE_NT_HEADERS;
#elif defined (MDE_CPU_IPF)
@ -290,9 +292,6 @@ typedef EFI_IMAGE_NT_HEADERS32 EFI_IMAGE_NT_HEADERS;
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
//
// @bug - Remove me when other package updated.
//
typedef EFI_IMAGE_NT_HEADERS64 EFI_IMAGE_NT_HEADERS;
#elif defined (MDE_CPU_X64)
@ -302,9 +301,6 @@ typedef EFI_IMAGE_NT_HEADERS64 EFI_IMAGE_NT_HEADERS;
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) ((Machine) == EFI_IMAGE_MACHINE_IA32)
//
// @bug - Remove me when other package updated.
//
typedef EFI_IMAGE_NT_HEADERS64 EFI_IMAGE_NT_HEADERS;
#elif defined (MDE_CPU_EBC)
@ -318,9 +314,6 @@ typedef EFI_IMAGE_NT_HEADERS64 EFI_IMAGE_NT_HEADERS;
#define EFI_IMAGE_MACHINE_CROSS_TYPE_SUPPORTED(Machine) (FALSE)
//
// @bug - Remove me when other package updated.
//
typedef EFI_IMAGE_NT_HEADERS64 EFI_IMAGE_NT_HEADERS;
#else
@ -338,34 +331,19 @@ typedef EFI_IMAGE_NT_HEADERS64 EFI_IMAGE_NT_HEADERS;
) \
)
//
// Subsystem Values
//
///
/// Other Windows Subsystem Values
///
#define EFI_IMAGE_SUBSYSTEM_UNKNOWN 0
#define EFI_IMAGE_SUBSYSTEM_NATIVE 1
#define EFI_IMAGE_SUBSYSTEM_WINDOWS_GUI 2
#define EFI_IMAGE_SUBSYSTEM_WINDOWS_CUI 3.
#define EFI_IMAGE_SUBSYSTEM_WINDOWS_CUI 3
#define EFI_IMAGE_SUBSYSTEM_OS2_CUI 5
#define EFI_IMAGE_SUBSYSTEM_POSIX_CUI 7
//
// Directory Entries
//
#define EFI_IMAGE_DIRECTORY_ENTRY_EXPORT 0
#define EFI_IMAGE_DIRECTORY_ENTRY_IMPORT 1
#define EFI_IMAGE_DIRECTORY_ENTRY_RESOURCE 2
#define EFI_IMAGE_DIRECTORY_ENTRY_EXCEPTION 3
#define EFI_IMAGE_DIRECTORY_ENTRY_SECURITY 4
#define EFI_IMAGE_DIRECTORY_ENTRY_BASERELOC 5
#define EFI_IMAGE_DIRECTORY_ENTRY_DEBUG 6
#define EFI_IMAGE_DIRECTORY_ENTRY_COPYRIGHT 7
#define EFI_IMAGE_DIRECTORY_ENTRY_GLOBALPTR 8
#define EFI_IMAGE_DIRECTORY_ENTRY_TLS 9
#define EFI_IMAGE_DIRECTORY_ENTRY_LOAD_CONFIG 10
//
// Section header format.
//
///
/// Section header format.
///
#define EFI_IMAGE_SIZEOF_SHORT_NAME 8
typedef struct {
@ -384,80 +362,85 @@ typedef struct {
UINT32 Characteristics;
} EFI_IMAGE_SECTION_HEADER;
///
/// Size of EFI_IMAGE_SECTION_HEADER
///
#define EFI_IMAGE_SIZEOF_SECTION_HEADER 40
#define EFI_IMAGE_SCN_TYPE_NO_PAD 0x00000008 // Reserved.
#define EFI_IMAGE_SCN_CNT_CODE 0x00000020
#define EFI_IMAGE_SCN_CNT_INITIALIZED_DATA 0x00000040
#define EFI_IMAGE_SCN_CNT_UNINITIALIZED_DATA 0x00000080
///
/// Section Flags Values
///
#define EFI_IMAGE_SCN_TYPE_NO_PAD BIT3 ///< 0x00000008 ///< Reserved.
#define EFI_IMAGE_SCN_CNT_CODE BIT5 ///< 0x00000020
#define EFI_IMAGE_SCN_CNT_INITIALIZED_DATA BIT6 ///< 0x00000040
#define EFI_IMAGE_SCN_CNT_UNINITIALIZED_DATA BIT7 ///< 0x00000080
#define EFI_IMAGE_SCN_LNK_OTHER 0x00000100 // Reserved.
#define EFI_IMAGE_SCN_LNK_INFO 0x00000200 // Section contains comments or some other type of information.
#define EFI_IMAGE_SCN_LNK_REMOVE 0x00000800 // Section contents will not become part of image.
#define EFI_IMAGE_SCN_LNK_COMDAT 0x00001000
#define EFI_IMAGE_SCN_LNK_OTHER BIT8 ///< 0x00000100 ///< Reserved.
#define EFI_IMAGE_SCN_LNK_INFO BIT9 ///< 0x00000200 ///< Section contains comments or some other type of information.
#define EFI_IMAGE_SCN_LNK_REMOVE BIT10 ///< 0x00000800 ///< Section contents will not become part of image.
#define EFI_IMAGE_SCN_LNK_COMDAT BIT12 ///< 0x00001000
#define EFI_IMAGE_SCN_ALIGN_1BYTES 0x00100000
#define EFI_IMAGE_SCN_ALIGN_2BYTES 0x00200000
#define EFI_IMAGE_SCN_ALIGN_4BYTES 0x00300000
#define EFI_IMAGE_SCN_ALIGN_8BYTES 0x00400000
#define EFI_IMAGE_SCN_ALIGN_16BYTES 0x00500000
#define EFI_IMAGE_SCN_ALIGN_32BYTES 0x00600000
#define EFI_IMAGE_SCN_ALIGN_64BYTES 0x00700000
#define EFI_IMAGE_SCN_ALIGN_1BYTES BIT20 ///< 0x00100000
#define EFI_IMAGE_SCN_ALIGN_2BYTES BIT21 ///< 0x00200000
#define EFI_IMAGE_SCN_ALIGN_4BYTES (BIT20|BIT21) ///< 0x00300000
#define EFI_IMAGE_SCN_ALIGN_8BYTES BIT22 ///< 0x00400000
#define EFI_IMAGE_SCN_ALIGN_16BYTES (BIT20|BIT22) ///< 0x00500000
#define EFI_IMAGE_SCN_ALIGN_32BYTES (BIT21|BIT22) ///< 0x00600000
#define EFI_IMAGE_SCN_ALIGN_64BYTES (BIT20|BIT21|BIT22) ///< 0x00700000
#define EFI_IMAGE_SCN_MEM_DISCARDABLE 0x02000000
#define EFI_IMAGE_SCN_MEM_NOT_CACHED 0x04000000
#define EFI_IMAGE_SCN_MEM_NOT_PAGED 0x08000000
#define EFI_IMAGE_SCN_MEM_SHARED 0x10000000
#define EFI_IMAGE_SCN_MEM_EXECUTE 0x20000000
#define EFI_IMAGE_SCN_MEM_READ 0x40000000
#define EFI_IMAGE_SCN_MEM_WRITE 0x80000000
#define EFI_IMAGE_SCN_MEM_DISCARDABLE BIT25 ///< 0x02000000
#define EFI_IMAGE_SCN_MEM_NOT_CACHED BIT26 ///< 0x04000000
#define EFI_IMAGE_SCN_MEM_NOT_PAGED BIT27 ///< 0x08000000
#define EFI_IMAGE_SCN_MEM_SHARED BIT28 ///< 0x10000000
#define EFI_IMAGE_SCN_MEM_EXECUTE BIT29 ///< 0x20000000
#define EFI_IMAGE_SCN_MEM_READ BIT30 ///< 0x40000000
#define EFI_IMAGE_SCN_MEM_WRITE BIT31 ///< 0x80000000
///
/// Symbol format.
/// Size of a Symbol Table Record
///
#define EFI_IMAGE_SIZEOF_SYMBOL 18
//
// Section values.
//
// Symbols have a section number of the section in which they are
// defined. Otherwise, section numbers have the following meanings:
//
#define EFI_IMAGE_SYM_UNDEFINED (UINT16) 0 // Symbol is undefined or is common.
#define EFI_IMAGE_SYM_ABSOLUTE (UINT16) -1 // Symbol is an absolute value.
#define EFI_IMAGE_SYM_DEBUG (UINT16) -2 // Symbol is a special debug item.
//
// Type (fundamental) values.
//
#define EFI_IMAGE_SYM_TYPE_NULL 0 // no type.
#define EFI_IMAGE_SYM_TYPE_VOID 1 //
#define EFI_IMAGE_SYM_TYPE_CHAR 2 // type character.
#define EFI_IMAGE_SYM_TYPE_SHORT 3 // type short integer.
///
/// Symbols have a section number of the section in which they are
/// defined. Otherwise, section numbers have the following meanings:
///
#define EFI_IMAGE_SYM_UNDEFINED (UINT16) 0 ///< Symbol is undefined or is common.
#define EFI_IMAGE_SYM_ABSOLUTE (UINT16) -1 ///< Symbol is an absolute value.
#define EFI_IMAGE_SYM_DEBUG (UINT16) -2 ///< Symbol is a special debug item.
///
/// Symbol Type (fundamental) values.
///
#define EFI_IMAGE_SYM_TYPE_NULL 0 ///< no type.
#define EFI_IMAGE_SYM_TYPE_VOID 1 ///< no valid type.
#define EFI_IMAGE_SYM_TYPE_CHAR 2 ///< type character.
#define EFI_IMAGE_SYM_TYPE_SHORT 3 ///< type short integer.
#define EFI_IMAGE_SYM_TYPE_INT 4
#define EFI_IMAGE_SYM_TYPE_LONG 5
#define EFI_IMAGE_SYM_TYPE_FLOAT 6
#define EFI_IMAGE_SYM_TYPE_DOUBLE 7
#define EFI_IMAGE_SYM_TYPE_STRUCT 8
#define EFI_IMAGE_SYM_TYPE_UNION 9
#define EFI_IMAGE_SYM_TYPE_ENUM 10 // enumeration.
#define EFI_IMAGE_SYM_TYPE_MOE 11 // member of enumeration.
#define EFI_IMAGE_SYM_TYPE_ENUM 10 ///< enumeration.
#define EFI_IMAGE_SYM_TYPE_MOE 11 ///< member of enumeration.
#define EFI_IMAGE_SYM_TYPE_BYTE 12
#define EFI_IMAGE_SYM_TYPE_WORD 13
#define EFI_IMAGE_SYM_TYPE_UINT 14
#define EFI_IMAGE_SYM_TYPE_DWORD 15
//
// Type (derived) values.
//
#define EFI_IMAGE_SYM_DTYPE_NULL 0 // no derived type.
///
/// Symbol Type (derived) values.
///
#define EFI_IMAGE_SYM_DTYPE_NULL 0 ///< no derived type.
#define EFI_IMAGE_SYM_DTYPE_POINTER 1
#define EFI_IMAGE_SYM_DTYPE_FUNCTION 2
#define EFI_IMAGE_SYM_DTYPE_ARRAY 3
//
// Storage classes.
//
#define EFI_IMAGE_SYM_CLASS_END_OF_FUNCTION (UINT8) -1
///
/// Storage classes.
///
#define EFI_IMAGE_SYM_CLASS_END_OF_FUNCTION ((UINT8) -1)
#define EFI_IMAGE_SYM_CLASS_NULL 0
#define EFI_IMAGE_SYM_CLASS_AUTOMATIC 1
#define EFI_IMAGE_SYM_CLASS_EXTERNAL 2
@ -494,15 +477,18 @@ typedef struct {
#define EFI_IMAGE_N_BTSHFT 4
#define EFI_IMAGE_N_TSHIFT 2
//
// Communal selection types.
//
///
/// Communal selection types.
///
#define EFI_IMAGE_COMDAT_SELECT_NODUPLICATES 1
#define EFI_IMAGE_COMDAT_SELECT_ANY 2
#define EFI_IMAGE_COMDAT_SELECT_SAME_SIZE 3
#define EFI_IMAGE_COMDAT_SELECT_EXACT_MATCH 4
#define EFI_IMAGE_COMDAT_SELECT_ASSOCIATIVE 5
///
/// the following values only be referred in PeCoff, not defined in PECOFF.
///
#define EFI_IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY 1
#define EFI_IMAGE_WEAK_EXTERN_SEARCH_LIBRARY 2
#define EFI_IMAGE_WEAK_EXTERN_SEARCH_ALIAS 3
@ -516,24 +502,27 @@ typedef struct {
UINT16 Type;
} EFI_IMAGE_RELOCATION;
///
/// Size of EFI_IMAGE_RELOCATION
///
#define EFI_IMAGE_SIZEOF_RELOCATION 10
//
// I386 relocation types.
//
#define EFI_IMAGE_REL_I386_ABSOLUTE 0x0000 // Reference is absolute, no relocation is necessary
#define EFI_IMAGE_REL_I386_DIR16 0x0001 // Direct 16-bit reference to the symbols virtual address
#define EFI_IMAGE_REL_I386_REL16 0x0002 // PC-relative 16-bit reference to the symbols virtual address
#define EFI_IMAGE_REL_I386_DIR32 0x0006 // Direct 32-bit reference to the symbols virtual address
#define EFI_IMAGE_REL_I386_DIR32NB 0x0007 // Direct 32-bit reference to the symbols virtual address, base not included
#define EFI_IMAGE_REL_I386_SEG12 0x0009 // Direct 16-bit reference to the segment-selector bits of a 32-bit virtual address
#define EFI_IMAGE_REL_I386_SECTION 0x001a
#define EFI_IMAGE_REL_I386_SECREL 0x000b
#define EFI_IMAGE_REL_I386_REL32 0x0014 // PC-relative 32-bit reference to the symbols virtual address
///
/// I386 relocation types.
///
#define EFI_IMAGE_REL_I386_ABSOLUTE 0x0000 ///< Reference is absolute, no relocation is necessary
#define EFI_IMAGE_REL_I386_DIR16 0x0001 ///< Direct 16-bit reference to the symbols virtual address
#define EFI_IMAGE_REL_I386_REL16 0x0002 ///< PC-relative 16-bit reference to the symbols virtual address
#define EFI_IMAGE_REL_I386_DIR32 0x0006 ///< Direct 32-bit reference to the symbols virtual address
#define EFI_IMAGE_REL_I386_DIR32NB 0x0007 ///< Direct 32-bit reference to the symbols virtual address, base not included
#define EFI_IMAGE_REL_I386_SEG12 0x0009 ///< Direct 16-bit reference to the segment-selector bits of a 32-bit virtual address
#define EFI_IMAGE_REL_I386_SECTION 0x000A
#define EFI_IMAGE_REL_I386_SECREL 0x000B
#define EFI_IMAGE_REL_I386_REL32 0x0014 ///< PC-relative 32-bit reference to the symbols virtual address
//
// x64 processor relocation types.
//
///
/// x64 processor relocation types.
///
#define IMAGE_REL_AMD64_ABSOLUTE 0x0000
#define IMAGE_REL_AMD64_ADDR64 0x0001
#define IMAGE_REL_AMD64_ADDR32 0x0002
@ -560,11 +549,14 @@ typedef struct {
UINT32 SizeOfBlock;
} EFI_IMAGE_BASE_RELOCATION;
///
/// Size of EFI_IMAGE_BASE_RELOCATION
///
#define EFI_IMAGE_SIZEOF_BASE_RELOCATION 8
//
// Based relocation types.
//
///
/// Based relocation types.
///
#define EFI_IMAGE_REL_BASED_ABSOLUTE 0
#define EFI_IMAGE_REL_BASED_HIGH 1
#define EFI_IMAGE_REL_BASED_LOW 2
@ -572,6 +564,7 @@ typedef struct {
#define EFI_IMAGE_REL_BASED_HIGHADJ 4
#define EFI_IMAGE_REL_BASED_MIPS_JMPADDR 5
#define EFI_IMAGE_REL_BASED_IA64_IMM64 9
#define IMAGE_REL_BASED_MIPS_JMPADDR16 9
#define EFI_IMAGE_REL_BASED_DIR64 10
///
@ -585,11 +578,14 @@ typedef struct {
UINT16 Linenumber; // Line number.
} EFI_IMAGE_LINENUMBER;
///
/// Size of EFI_IMAGE_LINENUMBER
///
#define EFI_IMAGE_SIZEOF_LINENUMBER 6
//
// Archive format.
//
///
/// Archive format.
///
#define EFI_IMAGE_ARCHIVE_START_SIZE 8
#define EFI_IMAGE_ARCHIVE_START "!<arch>\n"
#define EFI_IMAGE_ARCHIVE_END "`\n"
@ -598,23 +594,27 @@ typedef struct {
#define EFI_IMAGE_ARCHIVE_LONGNAMES_MEMBER "// "
typedef struct {
UINT8 Name[16]; // File member name - `/' terminated.
UINT8 Date[12]; // File member date - decimal.
UINT8 UserID[6]; // File member user id - decimal.
UINT8 GroupID[6]; // File member group id - decimal.
UINT8 Mode[8]; // File member mode - octal.
UINT8 Size[10]; // File member size - decimal.
UINT8 EndHeader[2]; // String to end header.
UINT8 Name[16]; ///< File member name - `/' terminated.
UINT8 Date[12]; ///< File member date - decimal.
UINT8 UserID[6]; ///< File member user id - decimal.
UINT8 GroupID[6]; ///< File member group id - decimal.
UINT8 Mode[8]; ///< File member mode - octal.
UINT8 Size[10]; ///< File member size - decimal.
UINT8 EndHeader[2]; ///< String to end header. (0x60 0x0A)
} EFI_IMAGE_ARCHIVE_MEMBER_HEADER;
///
/// Size of EFI_IMAGE_ARCHIVE_MEMBER_HEADER
///
#define EFI_IMAGE_SIZEOF_ARCHIVE_MEMBER_HDR 60
//
// DLL support.
//
///
/// DLL Export Format
/// DLL Support
///
///
/// Export Directory Table
///
typedef struct {
UINT32 Characteristics;
@ -631,8 +631,7 @@ typedef struct {
} EFI_IMAGE_EXPORT_DIRECTORY;
///
/// DLL support.
/// Import Format
/// Hint/Name Table
///
typedef struct {
UINT16 Hint;
@ -647,10 +646,13 @@ typedef struct {
} u1;
} EFI_IMAGE_THUNK_DATA;
#define EFI_IMAGE_ORDINAL_FLAG 0x80000000
#define EFI_IMAGE_ORDINAL_FLAG BIT31 ///< Flag for PE32
#define EFI_IMAGE_SNAP_BY_ORDINAL(Ordinal) ((Ordinal & EFI_IMAGE_ORDINAL_FLAG) != 0)
#define EFI_IMAGE_ORDINAL(Ordinal) (Ordinal & 0xffff)
///
/// Import Directory Table
///
typedef struct {
UINT32 Characteristics;
UINT32 TimeDateStamp;
@ -659,11 +661,10 @@ typedef struct {
EFI_IMAGE_THUNK_DATA *FirstThunk;
} EFI_IMAGE_IMPORT_DESCRIPTOR;
///
/// Debug Format
///
#define EFI_IMAGE_DEBUG_TYPE_CODEVIEW 2
///
/// Debug Direcotry Format
///
typedef struct {
UINT32 Characteristics;
UINT32 TimeDateStamp;
@ -671,13 +672,18 @@ typedef struct {
UINT16 MinorVersion;
UINT32 Type;
UINT32 SizeOfData;
UINT32 RVA;
UINT32 FileOffset;
UINT32 RVA; ///< The address of the debug data when loaded, relative to the image base
UINT32 FileOffset; ///< The file pointer to the debug data
} EFI_IMAGE_DEBUG_DIRECTORY_ENTRY;
#define CODEVIEW_SIGNATURE_NB10 0x3031424E // "NB10"
#define EFI_IMAGE_DEBUG_TYPE_CODEVIEW 2 ///< The Visual C++ debug information
///
/// Debug Data Structure defined in Microsoft C++
///
#define CODEVIEW_SIGNATURE_NB10 SIGNATURE_32('N', 'B', '1', '0')
typedef struct {
UINT32 Signature; // "NB10"
UINT32 Signature; ///< "NB10"
UINT32 Unknown;
UINT32 Unknown2;
UINT32 Unknown3;
@ -686,9 +692,12 @@ typedef struct {
//
} EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY;
#define CODEVIEW_SIGNATURE_RSDS 0x53445352 // "RSDS"
///
/// Debug Data Structure defined in Microsoft C++
///
#define CODEVIEW_SIGNATURE_RSDS SIGNATURE_32('R', 'S', 'D', 'S')
typedef struct {
UINT32 Signature; // "RSDS"
UINT32 Signature; ///< "RSDS"
UINT32 Unknown;
UINT32 Unknown2;
UINT32 Unknown3;
@ -700,21 +709,22 @@ typedef struct {
} EFI_IMAGE_DEBUG_CODEVIEW_RSDS_ENTRY;
///
/// Header format for TE images
/// Header format for TE images, defined in PI Specification, 1.0
///
typedef struct {
UINT16 Signature; // signature for TE format = "VZ"
UINT16 Machine; // from the original file header
UINT8 NumberOfSections; // from the original file header
UINT8 Subsystem; // from original optional header
UINT16 StrippedSize; // how many bytes we removed from the header
UINT32 AddressOfEntryPoint; // offset to entry point -- from original optional header
UINT32 BaseOfCode; // from original image -- required for ITP debug
UINT64 ImageBase; // from original file header
EFI_IMAGE_DATA_DIRECTORY DataDirectory[2]; // only base relocation and debug directory
UINT16 Signature; ///< signature for TE format = "VZ"
UINT16 Machine; ///< from the original file header
UINT8 NumberOfSections; ///< from the original file header
UINT8 Subsystem; ///< from original optional header
UINT16 StrippedSize; ///< how many bytes we removed from the header
UINT32 AddressOfEntryPoint; ///< offset to entry point -- from original optional header
UINT32 BaseOfCode; ///< from original image -- required for ITP debug
UINT64 ImageBase; ///< from original file header
EFI_IMAGE_DATA_DIRECTORY DataDirectory[2]; ///< only base relocation and debug directory
} EFI_TE_IMAGE_HEADER;
#define EFI_TE_IMAGE_HEADER_SIGNATURE 0x5A56 // "VZ"
#define EFI_TE_IMAGE_HEADER_SIGNATURE SIGNATURE_16('V', 'Z')
//
// Data directory indexes in our TE image header

View File

@ -1,7 +1,7 @@
/** @file
Present the boot mode values in PI.
Copyright (c) 2006 - 2007, Intel Corporation
Copyright (c) 2006 - 2008, 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,7 +11,7 @@
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@par Revision Reference:
Version 1.0.
PI Version 1.0
**/

View File

@ -11,7 +11,7 @@
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@par Revision Reference:
Version 1.0.
PI Version 1.0
**/
#ifndef __PI_DEPENDENCY_H__

View File

@ -11,7 +11,7 @@
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@par Revision Reference:
Version 1.0.
PI Version 1.0
**/

View File

@ -11,7 +11,7 @@
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@par Revision Reference:
Version 1.0.
PI Version 1.0
**/
@ -156,7 +156,7 @@ typedef struct {
typedef EFI_COMMON_SECTION_HEADER EFI_DXE_DEPEX_SECTION;
///
/// Leaf section witch contains a PI FV.
/// Leaf section which contains a PI FV.
///
typedef EFI_COMMON_SECTION_HEADER EFI_FIRMWARE_VOLUME_IMAGE_SECTION;
@ -220,7 +220,7 @@ typedef struct {
///
/// Leaf section which contains a numeric build number and
/// an optional unicode string that represent the file revision.
/// an optional unicode string that represents the file revision.
///
typedef struct {
EFI_COMMON_SECTION_HEADER CommonHeader;

View File

@ -1,7 +1,7 @@
/** @file
The firmware volume related definitions in PI.
Copyright (c) 2006 - 2007, Intel Corporation
Copyright (c) 2006 - 2008, 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,7 +11,7 @@
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@par Revision Reference:
Version 1.0.
PI Version 1.0
**/

View File

@ -11,7 +11,7 @@
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@par Revision Reference:
Version 1.0.
PI Version 1.0
**/
@ -76,7 +76,7 @@ typedef struct {
///
typedef struct {
///
/// A GUID that defines the memory allocation region¡¯s type and purpose, as well as
/// A GUID that defines the memory allocation region's type and purpose, as well as
/// other fields within the memory allocation HOB. This GUID is used to define the
/// additional data within the HOB that may be present for the memory allocation HOB.
/// Type EFI_GUID is defined in InstallProtocolInterface() in the UEFI 2.0
@ -84,9 +84,11 @@ typedef struct {
///
EFI_GUID Name;
///
/// The base address of memory allocated by this HOB. Type
/// EFI_PHYSICAL_ADDRESS is defined in AllocatePages() in the UEFI 2.0
/// specification.
///
EFI_PHYSICAL_ADDRESS MemoryBaseAddress;
///
@ -155,7 +157,7 @@ typedef struct {
} EFI_HOB_MEMORY_ALLOCATION_MODULE;
///
/// type of Recount type
/// Resource type
///
typedef UINT32 EFI_RESOURCE_TYPE;

View File

@ -1,7 +1,7 @@
/** @file
Include file matches things in PI for multiple module types.
Copyright (c) 2006 - 2007, Intel Corporation
Copyright (c) 2006 - 2008, 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,7 +11,7 @@
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
@par Revision Reference:
Version 1.0.
PI Version 1.0
**/
@ -93,7 +93,7 @@ typedef struct {
//
// Bit values for AuthenticationStatus
// Bit values for Authentication Status
//
#define EFI_AUTH_STATUS_PLATFORM_OVERRIDE 0x01
#define EFI_AUTH_STATUS_IMAGE_SIGNED 0x02

View File

@ -255,59 +255,12 @@ EFI_STATUS
);
/**
@par Protocol Description:
The EFI_CPU_ARCH_PROTOCOL is used to abstract processor-specific functions from the DXE
Foundation. This includes flushing caches, enabling and disabling interrupts, hooking interrupt
vectors and exception vectors, reading internal processor timers, resetting the processor, and
determining the processor frequency.
@param FlushDataCache
Flushes a range of the processor's data cache. If the processor does
not contain a data cache, or the data cache is fully coherent, then this
function can just return EFI_SUCCESS. If the processor does not support
flushing a range of addresses from the data cache, then the entire data
cache must be flushed.
@param EnableInterrupt
Enables interrupt processing by the processor.
@param DisableInterrupt
Disables interrupt processing by the processor.
@param GetInterruptState
Retrieves the processor's current interrupt state.
@param Init
Generates an INIT on the processor. If a processor cannot programmatically
generate an INIT without help from external hardware, then this function
returns EFI_UNSUPPORTED.
@param RegisterInterruptHandler
Associates an interrupt service routine with one of the processor's interrupt
vectors. This function is typically used by the EFI_TIMER_ARCH_PROTOCOL to
hook the timer interrupt in a system. It can also be used by the debugger to
hook exception vectors.
@param GetTimerValue
Returns the value of one of the processor's internal timers.
@param SetMemoryAttributes
Attempts to set the attributes of a memory region.
@param NumberOfTimers
The number of timers that are available in a processor. The value in this
field is a constant that must not be modified after the CPU Architectural
Protocol is installed. All consumers must treat this as a read-only field.
@param DmaBufferAlignment
The size, in bytes, of the alignment required for DMA buffer allocations.
This is typically the size of the largest data cache line in the platform.
The value in this field is a constant that must not be modified after the
CPU Architectural Protocol is installed. All consumers must treat this as
a read-only field.
**/
///
/// The EFI_CPU_ARCH_PROTOCOL is used to abstract processor-specific functions from the DXE
/// Foundation. This includes flushing caches, enabling and disabling interrupts, hooking interrupt
/// vectors and exception vectors, reading internal processor timers, resetting the processor, and
/// determining the processor frequency.
///
struct _EFI_CPU_ARCH_PROTOCOL {
EFI_CPU_FLUSH_DATA_CACHE FlushDataCache;
EFI_CPU_ENABLE_INTERRUPT EnableInterrupt;
@ -317,7 +270,19 @@ struct _EFI_CPU_ARCH_PROTOCOL {
EFI_CPU_REGISTER_INTERRUPT_HANDLER RegisterInterruptHandler;
EFI_CPU_GET_TIMER_VALUE GetTimerValue;
EFI_CPU_SET_MEMORY_ATTRIBUTES SetMemoryAttributes;
///
/// The number of timers that are available in a processor. The value in this
/// field is a constant that must not be modified after the CPU Architectural
/// Protocol is installed. All consumers must treat this as a read-only field.
///
UINT32 NumberOfTimers;
///
/// The size, in bytes, of the alignment required for DMA buffer allocations.
/// This is typically the size of the largest data cache line in the platform.
/// The value in this field is a constant that must not be modified after the
/// CPU Architectural Protocol is installed. All consumers must treat this as
/// a read-only field.
///
UINT32 DmaBufferAlignment;
};

View File

@ -58,13 +58,13 @@ typedef INTN EFI_EXCEPTION_TYPE;
#define EXCEPT_IA32_MACHINE_CHECK 18
#define EXCEPT_IA32_SIMD 19
//
// IA-32 processor context definition
//
//
// FXSAVE_STATE
// FP / MMX / XMM registers (see fxrstor instruction definition)
//
///
/// IA-32 processor context definition
///
///
/// FXSAVE_STATE
/// FP / MMX / XMM registers (see fxrstor instruction definition)
///
typedef struct {
UINT16 Fcw;
UINT16 Fsw;
@ -152,12 +152,12 @@ typedef struct {
#define EXCEPT_X64_MACHINE_CHECK 18
#define EXCEPT_X64_SIMD 19
//
// X64 processor context definition
//
// FXSAVE_STATE
// FP / MMX / XMM registers (see fxrstor instruction definition)
//
///
/// X64 processor context definition
///
/// FXSAVE_STATE
/// FP / MMX / XMM registers (see fxrstor instruction definition)
///
typedef struct {
UINT16 Fcw;
UINT16 Fsw;
@ -278,9 +278,9 @@ typedef struct {
#define EXCEPT_IPF_IA32_INTERCEPT 46
#define EXCEPT_IPF_IA32_INTERRUPT 47
//
// IPF processor context definition
//
///
/// IPF processor context definition
///
typedef struct {
//
// The first reserved field is necessary to preserve alignment for the correct
@ -510,14 +510,14 @@ VOID
IN OUT EFI_SYSTEM_CONTEXT SystemContext
);
//
// Machine type definition
//
///
/// Machine type definition
///
typedef enum {
IsaIa32 = IMAGE_FILE_MACHINE_I386, // 0x014C
IsaX64 = IMAGE_FILE_MACHINE_X64, // 0x8664
IsaIpf = IMAGE_FILE_MACHINE_IA64, // 0x0200
IsaEbc = IMAGE_FILE_MACHINE_EBC // 0x0EBC
IsaIa32 = IMAGE_FILE_MACHINE_I386, ///< 0x014C
IsaX64 = IMAGE_FILE_MACHINE_X64, ///< 0x8664
IsaIpf = IMAGE_FILE_MACHINE_IA64, ///< 0x0200
IsaEbc = IMAGE_FILE_MACHINE_EBC ///< 0x0EBC
} EFI_INSTRUCTION_SET_ARCHITECTURE;
@ -613,37 +613,15 @@ EFI_STATUS
IN UINT64 Length
);
//
// DebugSupport protocol definition
//
/**
@par Protocol Description:
This protocol provides the services to allow the debug agent to register
callback functions that are called either periodically or when specific
processor exceptions occur.
@param Isa
Declares the processor architecture for this instance of the EFI
Debug Support protocol.
@param GetMaximumProcessorIndex
Returns the maximum processor index value that may be used.
@param RegisterPeriodicCallback
Registers a callback function that will be invoked periodically
and asynchronously to the execution of EFI.
@param RegisterExceptionCallback
Registers a callback function that will be called each time the
specified processor exception occurs.
@param InvalidateInstructionCache
Invalidate the instruction cache of the processor. This is required
by processor architectures where instruction and data caches are
not coherent when instructions in the code under debug has been
modified by the debug agent.
**/
///
/// This protocol provides the services to allow the debug agent to register
/// callback functions that are called either periodically or when specific
/// processor exceptions occur.
///
struct _EFI_DEBUG_SUPPORT_PROTOCOL {
///
/// Declares the processor architecture for this instance of the EFI Debug Support protocol.
///
EFI_INSTRUCTION_SET_ARCHITECTURE Isa;
EFI_GET_MAXIMUM_PROCESSOR_INDEX GetMaximumProcessorIndex;
EFI_REGISTER_PERIODIC_CALLBACK RegisterPeriodicCallback;

View File

@ -40,10 +40,30 @@
#pragma pack(1)
/**
This protocol can be used on any device handle to obtain generic path/location
information concerning the physical device or logical device. If the handle does
not logically map to a physical device, the handle may not necessarily support
the device path protocol. The device path describes the location of the device
the handle is for. The size of the Device Path can be determined from the structures
that make up the Device Path.
**/
typedef struct {
UINT8 Type;
UINT8 SubType;
UINT8 Length[2];
UINT8 Type; ///< 0x01 Hardware Device Path
///< 0x02 ACPI Device Path
///< 0x03 Messaging Device Path
///< 0x04 Media Device Path
///< 0x05 BIOS Boot Specification Device Path
///< 0x7F End of Hardware Device Path
UINT8 SubType; ///< Varies by Type
///< 0xFF End Entire Device Path, or
///< 0x01 End This Instance of a Device Path and start a new
///< Device Path
UINT8 Length[2]; ///< Specific Device Path data. Type and Sub-Type define
///< type of data. Size of data is included in Length.
} EFI_DEVICE_PATH_PROTOCOL;
///
@ -110,6 +130,7 @@ typedef struct {
///
/// Optional variable length _HIDSTR
/// Optional variable length _UIDSTR
/// Optional variable length _CIDSTR
///
} ACPI_EXTENDED_HID_DEVICE_PATH;
@ -505,55 +526,9 @@ typedef union {
#pragma pack()
#define EFI_DP_TYPE_MASK 0x7F
#define EFI_DP_TYPE_UNPACKED 0x80
#define END_DEVICE_PATH_TYPE 0x7f
#define EFI_END_ENTIRE_DEVICE_PATH 0xff
#define EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE 0xff
#define EFI_END_INSTANCE_DEVICE_PATH 0x01
#define END_ENTIRE_DEVICE_PATH_SUBTYPE EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE
#define END_INSTANCE_DEVICE_PATH_SUBTYPE EFI_END_INSTANCE_DEVICE_PATH
#define EFI_END_DEVICE_PATH_LENGTH (sizeof (EFI_DEVICE_PATH_PROTOCOL))
#define END_DEVICE_PATH_LENGTH EFI_END_DEVICE_PATH_LENGTH
#define DP_IS_END_TYPE(a)
#define DP_IS_END_SUBTYPE(a) (((a)->SubType == END_ENTIRE_DEVICE_PATH_SUBTYPE)
#define DevicePathSubType(a) ((a)->SubType)
#define IsDevicePathUnpacked(a) ((a)->Type & EFI_DP_TYPE_UNPACKED)
#define EfiDevicePathNodeLength(a) (((a)->Length[0]) | ((a)->Length[1] << 8))
#define DevicePathNodeLength(a) (EfiDevicePathNodeLength(a))
#define EfiNextDevicePathNode(a) ((EFI_DEVICE_PATH_PROTOCOL *) (((UINT8 *) (a)) + EfiDevicePathNodeLength (a)))
#define NextDevicePathNode(a) (EfiNextDevicePathNode(a))
#define EfiDevicePathType(a) (((a)->Type) & EFI_DP_TYPE_MASK)
#define DevicePathType(a) (EfiDevicePathType(a))
#define EfiIsDevicePathEndType(a) (EfiDevicePathType (a) == END_DEVICE_PATH_TYPE)
#define IsDevicePathEndType(a) (EfiIsDevicePathEndType(a))
#define EfiIsDevicePathEndSubType(a) ((a)->SubType == EFI_END_ENTIRE_DEVICE_PATH_SUBTYPE)
#define IsDevicePathEndSubType(a) (EfiIsDevicePathEndSubType(a))
#define EfiIsDevicePathEndInstanceSubType(a) ((a)->SubType == EFI_END_INSTANCE_DEVICE_PATH)
#define EfiIsDevicePathEnd(a) (EfiIsDevicePathEndType (a) && EfiIsDevicePathEndSubType (a))
#define IsDevicePathEnd(a) (EfiIsDevicePathEnd(a))
#define EfiIsDevicePathEndInstance(a) (EfiIsDevicePathEndType (a) && EfiIsDevicePathEndInstanceSubType (a))
#define SetDevicePathNodeLength(a,l) { \
(a)->Length[0] = (UINT8) (l); \
(a)->Length[1] = (UINT8) ((l) >> 8); \
}
#define SetDevicePathEndNode(a) { \
(a)->Type = END_DEVICE_PATH_TYPE; \
(a)->SubType = END_ENTIRE_DEVICE_PATH_SUBTYPE; \
(a)->Length[0] = sizeof(EFI_DEVICE_PATH_PROTOCOL); \
(a)->Length[1] = 0; \
}
#define END_ENTIRE_DEVICE_PATH_SUBTYPE 0xFF
#define END_INSTANCE_DEVICE_PATH_SUBTYPE 0x01
extern EFI_GUID gEfiDevicePathProtocolGuid;

View File

@ -18,7 +18,6 @@
#ifndef __EFI_DRIVER_BINDING_H__
#define __EFI_DRIVER_BINDING_H__
#include <gpxe/efi/PiDxe.h>
#include <gpxe/efi/Protocol/DevicePath.h>
///
/// Global ID for the ControllerHandle Driver Protocol
@ -31,7 +30,12 @@
typedef struct _EFI_DRIVER_BINDING_PROTOCOL EFI_DRIVER_BINDING_PROTOCOL;
/**
Test to see if this driver supports ControllerHandle.
Test to see if this driver supports ControllerHandle. This service
is called by the EFI boot service ConnectController(). In
order to make drivers as small as possible, there are a few calling
restrictions for this service. ConnectController() must
follow these calling restrictions. If any other agent wishes to call
Supported() it must also follow these calling restrictions.
@param This Protocol instance pointer.
@param ControllerHandle Handle of device to test
@ -52,7 +56,12 @@ EFI_STATUS
);
/**
Start this driver on ControllerHandle.
Start this driver on ControllerHandle. This service is called by the
EFI boot service ConnectController(). In order to make
drivers as small as possible, there are a few calling restrictions for
this service. ConnectController() must follow these
calling restrictions. If any other agent wishes to call Start() it
must also follow these calling restrictions.
@param This Protocol instance pointer.
@param ControllerHandle Handle of device to bind driver to
@ -73,7 +82,12 @@ EFI_STATUS
);
/**
Stop this driver on ControllerHandle.
Stop this driver on ControllerHandle. This service is called by the
EFI boot service DisconnectController(). In order to
make drivers as small as possible, there are a few calling
restrictions for this service. DisconnectController()
must follow these calling restrictions. If any other agent wishes
to call Stop() it must also follow these calling restrictions.
@param This Protocol instance pointer.
@param ControllerHandle Handle of device to stop driver on
@ -94,70 +108,43 @@ EFI_STATUS
IN EFI_HANDLE *ChildHandleBuffer OPTIONAL
);
//
// Interface structure for the ControllerHandle Driver Protocol
//
/**
@par Protocol Description:
This protocol provides the services required to determine if a driver supports a given controller.
If a controller is supported, then it also provides routines to start and stop the controller.
@param Supported
Tests to see if this driver supports a given controller. This service
is called by the EFI boot service ConnectController(). In
order to make drivers as small as possible, there are a few calling
restrictions for this service. ConnectController() must
follow these calling restrictions. If any other agent wishes to call
Supported() it must also follow these calling restrictions.
@param Start
Starts a controller using this driver. This service is called by the
EFI boot service ConnectController(). In order to make
drivers as small as possible, there are a few calling restrictions for
this service. ConnectController() must follow these
calling restrictions. If any other agent wishes to call Start() it
must also follow these calling restrictions.
@param Stop
Stops a controller using this driver. This service is called by the
EFI boot service DisconnectController(). In order to
make drivers as small as possible, there are a few calling
restrictions for this service. DisconnectController()
must follow these calling restrictions. If any other agent wishes
to call Stop() it must also follow these calling restrictions.
@param Version
The version number of the UEFI driver that produced the
EFI_DRIVER_BINDING_PROTOCOL. This field is used by
the EFI boot service ConnectController() to determine
the order that driver's Supported() service will be used when
a controller needs to be started. EFI Driver Binding Protocol
instances with higher Version values will be used before ones
with lower Version values. The Version values of 0x0-
0x0f and 0xfffffff0-0xffffffff are reserved for
platform/OEM specific drivers. The Version values of 0x10-
0xffffffef are reserved for IHV-developed drivers.
@param ImageHandle
The image handle of the UEFI driver that produced this instance
of the EFI_DRIVER_BINDING_PROTOCOL.
@param DriverBindingHandle
The handle on which this instance of the
EFI_DRIVER_BINDING_PROTOCOL is installed. In most
cases, this is the same handle as ImageHandle. However, for
UEFI drivers that produce more than one instance of the
EFI_DRIVER_BINDING_PROTOCOL, this value may not be
the same as ImageHandle.
**/
///
/// This protocol provides the services required to determine if a driver supports a given controller.
/// If a controller is supported, then it also provides routines to start and stop the controller.
///
struct _EFI_DRIVER_BINDING_PROTOCOL {
EFI_DRIVER_BINDING_SUPPORTED Supported;
EFI_DRIVER_BINDING_START Start;
EFI_DRIVER_BINDING_STOP Stop;
///
/// The version number of the UEFI driver that produced the
/// EFI_DRIVER_BINDING_PROTOCOL. This field is used by
/// the EFI boot service ConnectController() to determine
/// the order that driver's Supported() service will be used when
/// a controller needs to be started. EFI Driver Binding Protocol
/// instances with higher Version values will be used before ones
/// with lower Version values. The Version values of 0x0-
/// 0x0f and 0xfffffff0-0xffffffff are reserved for
/// platform/OEM specific drivers. The Version values of 0x10-
/// 0xffffffef are reserved for IHV-developed drivers.
///
UINT32 Version;
///
/// The image handle of the UEFI driver that produced this instance
/// of the EFI_DRIVER_BINDING_PROTOCOL.
///
EFI_HANDLE ImageHandle;
///
/// The handle on which this instance of the
/// EFI_DRIVER_BINDING_PROTOCOL is installed. In most
/// cases, this is the same handle as ImageHandle. However, for
/// UEFI drivers that produce more than one instance of the
/// EFI_DRIVER_BINDING_PROTOCOL, this value may not be
/// the same as ImageHandle.
///
EFI_HANDLE DriverBindingHandle;
};

View File

@ -48,27 +48,27 @@ typedef enum {
//
// Complete PCI address generater
//
#define EFI_PCI_IO_PASS_THROUGH_BAR 0xff // Special BAR that passes a memory or I/O cycle through unchanged
#define EFI_PCI_IO_ATTRIBUTE_MASK 0x077f // All the following I/O and Memory cycles
#define EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO 0x0001 // I/O cycles 0x0000-0x00FF (10 bit decode)
#define EFI_PCI_IO_ATTRIBUTE_ISA_IO 0x0002 // I/O cycles 0x0100-0x03FF or greater (10 bit decode)
#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO 0x0004 // I/O cycles 0x3C6, 0x3C8, 0x3C9 (10 bit decode)
#define EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY 0x0008 // MEM cycles 0xA0000-0xBFFFF (24 bit decode)
#define EFI_PCI_IO_ATTRIBUTE_VGA_IO 0x0010 // I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (10 bit decode)
#define EFI_PCI_IO_ATTRIBUTE_IDE_PRIMARY_IO 0x0020 // I/O cycles 0x1F0-0x1F7, 0x3F6, 0x3F7 (10 bit decode)
#define EFI_PCI_IO_ATTRIBUTE_IDE_SECONDARY_IO 0x0040 // I/O cycles 0x170-0x177, 0x376, 0x377 (10 bit decode)
#define EFI_PCI_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x0080 // Map a memory range so write are combined
#define EFI_PCI_IO_ATTRIBUTE_IO 0x0100 // Enable the I/O decode bit in the PCI Config Header
#define EFI_PCI_IO_ATTRIBUTE_MEMORY 0x0200 // Enable the Memory decode bit in the PCI Config Header
#define EFI_PCI_IO_ATTRIBUTE_BUS_MASTER 0x0400 // Enable the DMA bit in the PCI Config Header
#define EFI_PCI_IO_ATTRIBUTE_MEMORY_CACHED 0x0800 // Map a memory range so all r/w accesses are cached
#define EFI_PCI_IO_ATTRIBUTE_MEMORY_DISABLE 0x1000 // Disable a memory range
#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_DEVICE 0x2000 // Clear for an add-in PCI Device
#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM 0x4000 // Clear for a physical PCI Option ROM accessed through ROM BAR
#define EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE 0x8000 // Clear for PCI controllers that can not genrate a DAC
#define EFI_PCI_IO_ATTRIBUTE_ISA_IO_16 0x10000 // I/O cycles 0x0100-0x03FF or greater (16 bit decode)
#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16 0x20000 // I/O cycles 0x3C6, 0x3C8, 0x3C9 (16 bit decode)
#define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16 0x30000 // I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (16 bit decode)
#define EFI_PCI_IO_PASS_THROUGH_BAR 0xff ///< Special BAR that passes a memory or I/O cycle through unchanged
#define EFI_PCI_IO_ATTRIBUTE_MASK 0x077f ///< All the following I/O and Memory cycles
#define EFI_PCI_IO_ATTRIBUTE_ISA_MOTHERBOARD_IO 0x0001 ///< I/O cycles 0x0000-0x00FF (10 bit decode)
#define EFI_PCI_IO_ATTRIBUTE_ISA_IO 0x0002 ///< I/O cycles 0x0100-0x03FF or greater (10 bit decode)
#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO 0x0004 ///< I/O cycles 0x3C6, 0x3C8, 0x3C9 (10 bit decode)
#define EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY 0x0008 ///< MEM cycles 0xA0000-0xBFFFF (24 bit decode)
#define EFI_PCI_IO_ATTRIBUTE_VGA_IO 0x0010 ///< I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (10 bit decode)
#define EFI_PCI_IO_ATTRIBUTE_IDE_PRIMARY_IO 0x0020 ///< I/O cycles 0x1F0-0x1F7, 0x3F6, 0x3F7 (10 bit decode)
#define EFI_PCI_IO_ATTRIBUTE_IDE_SECONDARY_IO 0x0040 ///< I/O cycles 0x170-0x177, 0x376, 0x377 (10 bit decode)
#define EFI_PCI_IO_ATTRIBUTE_MEMORY_WRITE_COMBINE 0x0080 ///< Map a memory range so write are combined
#define EFI_PCI_IO_ATTRIBUTE_IO 0x0100 ///< Enable the I/O decode bit in the PCI Config Header
#define EFI_PCI_IO_ATTRIBUTE_MEMORY 0x0200 ///< Enable the Memory decode bit in the PCI Config Header
#define EFI_PCI_IO_ATTRIBUTE_BUS_MASTER 0x0400 ///< Enable the DMA bit in the PCI Config Header
#define EFI_PCI_IO_ATTRIBUTE_MEMORY_CACHED 0x0800 ///< Map a memory range so all r/w accesses are cached
#define EFI_PCI_IO_ATTRIBUTE_MEMORY_DISABLE 0x1000 ///< Disable a memory range
#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_DEVICE 0x2000 ///< Clear for an add-in PCI Device
#define EFI_PCI_IO_ATTRIBUTE_EMBEDDED_ROM 0x4000 ///< Clear for a physical PCI Option ROM accessed through ROM BAR
#define EFI_PCI_IO_ATTRIBUTE_DUAL_ADDRESS_CYCLE 0x8000 ///< Clear for PCI controllers that can not genrate a DAC
#define EFI_PCI_IO_ATTRIBUTE_ISA_IO_16 0x10000 ///< I/O cycles 0x0100-0x03FF or greater (16 bit decode)
#define EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO_16 0x20000 ///< I/O cycles 0x3C6, 0x3C8, 0x3C9 (16 bit decode)
#define EFI_PCI_IO_ATTRIBUTE_VGA_IO_16 0x30000 ///< I/O cycles 0x3B0-0x3BB and 0x3C0-0x3DF (16 bit decode)
#define EFI_PCI_DEVICE_ENABLE (EFI_PCI_IO_ATTRIBUTE_IO | EFI_PCI_IO_ATTRIBUTE_MEMORY | EFI_PCI_IO_ATTRIBUTE_BUS_MASTER)
#define EFI_VGA_DEVICE_ENABLE (EFI_PCI_IO_ATTRIBUTE_VGA_PALETTE_IO | EFI_PCI_IO_ATTRIBUTE_VGA_MEMORY | EFI_PCI_IO_ATTRIBUTE_VGA_IO | EFI_PCI_IO_ATTRIBUTE_IO)
@ -474,84 +474,13 @@ EFI_STATUS
IN OUT UINT64 *Length
);
/**
@par Protocol Description:
The EFI_PCI_IO_PROTOCOL provides the basic Memory, I/O, PCI configuration,
and DMA interfaces that are used to abstract accesses to PCI controllers.
There is one EFI_PCI_IO_PROTOCOL instance for each PCI controller on a PCI bus.
A device driver that wishes to manage a PCI controller in a system will have to
retrieve the EFI_PCI_IO_PROTOCOL instance that is associated with the PCI controller.
@param PollMem
Polls an address in PCI memory space until an exit condition is met, or a timeout occurs.
@param PollIo
Polls an address in PCI I/O space until an exit condition is met, or a timeout occurs.
@param Mem.Read
Allows BAR relative reads to PCI memory space.
@param Mem.Write
Allows BAR relative writes to PCI memory space.
@param Io.Read
Allows BAR relative reads to PCI I/O space.
@param Io.Write
Allows BAR relative writes to PCI I/O space.
@param Pci.Read
Allows PCI controller relative reads to PCI configuration space.
@param Pci.Write
Allows PCI controller relative writes to PCI configuration space.
@param CopyMem
Allows one region of PCI memory space to be copied to another region of PCI memory space.
@param Map
Provides the PCI controller's specific address needed to access system memory for DMA.
@param Unmap
Releases any resources allocated by Map().
@param AllocateBuffer
Allocates pages that are suitable for a common buffer mapping.
@param FreeBuffer
Frees pages that were allocated with AllocateBuffer().
@param Flush
Flushes all PCI posted write transactions to system memory.
@param GetLocation
Retrieves this PCI controller's current PCI bus number, device number, and function number.
@param Attributes
Performs an operation on the attributes that this PCI controller supports.
The operations include getting the set of supported attributes, retrieving
the current attributes, setting the current
attributes, enabling attributes, and disabling attributes.
@param GetBarAttributes
Gets the attributes that this PCI controller supports setting on a BAR using
SetBarAttributes(), and retrieves the list of resource descriptors for a BAR.
@param SetBarAttributes
Sets the attributes for a range of a BAR on a PCI controller.
@param RomSize
The size, in bytes, of the ROM image.
@param RomImage
A pointer to the in memory copy of the ROM image. The PCI Bus Driver is responsible
for allocating memory for the ROM image, and copying the contents of the ROM to memory.
The contents of this buffer are either from the PCI option ROM that can be accessed
through the ROM BAR of the PCI controller, or it is from a platform-specific location.
The Attributes() function can be used to determine from which of these two sources
the RomImage buffer was initialized.
**/
///
/// The EFI_PCI_IO_PROTOCOL provides the basic Memory, I/O, PCI configuration,
/// and DMA interfaces that are used to abstract accesses to PCI controllers.
/// There is one EFI_PCI_IO_PROTOCOL instance for each PCI controller on a PCI bus.
/// A device driver that wishes to manage a PCI controller in a system will have to
/// retrieve the EFI_PCI_IO_PROTOCOL instance that is associated with the PCI controller.
///
struct _EFI_PCI_IO_PROTOCOL {
EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollMem;
EFI_PCI_IO_PROTOCOL_POLL_IO_MEM PollIo;
@ -568,7 +497,20 @@ struct _EFI_PCI_IO_PROTOCOL {
EFI_PCI_IO_PROTOCOL_ATTRIBUTES Attributes;
EFI_PCI_IO_PROTOCOL_GET_BAR_ATTRIBUTES GetBarAttributes;
EFI_PCI_IO_PROTOCOL_SET_BAR_ATTRIBUTES SetBarAttributes;
///
/// The size, in bytes, of the ROM image.
///
UINT64 RomSize;
///
/// A pointer to the in memory copy of the ROM image. The PCI Bus Driver is responsible
/// for allocating memory for the ROM image, and copying the contents of the ROM to memory.
/// The contents of this buffer are either from the PCI option ROM that can be accessed
/// through the ROM BAR of the PCI controller, or it is from a platform-specific location.
/// The Attributes() function can be used to determine from which of these two sources
/// the RomImage buffer was initialized.
///
VOID *RomImage;
};

View File

@ -19,8 +19,6 @@
#ifndef __PCI_ROOT_BRIDGE_IO_H__
#define __PCI_ROOT_BRIDGE_IO_H__
#include <gpxe/efi/PiDxe.h>
#define EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GUID \
{ \
0x2f707ebb, 0x4a1a, 0x11d4, {0x9a, 0x38, 0x00, 0x90, 0x27, 0x3f, 0xc1, 0x4d } \
@ -360,73 +358,14 @@ EFI_STATUS
OUT VOID **Resources
);
/**
@par Protocol Description:
Provides the basic Memory, I/O, PCI configuration, and DMA interfaces that are
used to abstract accesses to PCI controllers behind a PCI Root Bridge Controller.
@param ParentHandle
The EFI_HANDLE of the PCI Host Bridge of which this PCI Root Bridge is a member.
@param PollMem
Polls an address in memory mapped I/O space until an exit condition is met,
or a timeout occurs.
@param PollIo
Polls an address in I/O space until an exit condition is met, or a timeout occurs.
@param Mem.Read
Allows reads from memory mapped I/O space.
@param Mem.Write
Allows writes to memory mapped I/O space.
@param Io.Read
Allows reads from I/O space.
@param Io.Write
Allows writes to I/O space.
@param Pci.Read
Allows reads from PCI configuration space.
@param Pci.Write
Allows writes to PCI configuration space.
@param CopyMem
Allows one region of PCI root bridge memory space to be copied to another
region of PCI root bridge memory space.
@param Map
Provides the PCI controller's specific addresses needed to access system memory for DMA.
@param Unmap
Releases any resources allocated by Map().
@param AllocateBuffer
Allocates pages that are suitable for a common buffer mapping.
@param FreeBuffer
Free pages that were allocated with AllocateBuffer().
@param Flush
Flushes all PCI posted write transactions to system memory.
@param GetAttributes
Gets the attributes that a PCI root bridge supports setting with SetAttributes(),
and the attributes that a PCI root bridge is currently using.
@param SetAttributes
Sets attributes for a resource range on a PCI root bridge.
@param Configuration
Gets the current resource settings for this PCI root bridge.
@param SegmentNumber
The segment number that this PCI root bridge resides.
**/
///
/// Provides the basic Memory, I/O, PCI configuration, and DMA interfaces that are
/// used to abstract accesses to PCI controllers behind a PCI Root Bridge Controller.
///
struct _EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL {
///
/// The EFI_HANDLE of the PCI Host Bridge of which this PCI Root Bridge is a member.
///
EFI_HANDLE ParentHandle;
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_POLL_IO_MEM PollMem;
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_POLL_IO_MEM PollIo;
@ -442,6 +381,10 @@ struct _EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL {
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_GET_ATTRIBUTES GetAttributes;
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_SET_ATTRIBUTES SetAttributes;
EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_CONFIGURATION Configuration;
///
/// The segment number that this PCI root bridge resides.
///
UINT32 SegmentNumber;
};

View File

@ -552,76 +552,18 @@ EFI_STATUS
//
#define EFI_SIMPLE_NETWORK_INTERFACE_REVISION EFI_SIMPLE_NETWORK_PROTOCOL_REVISION
/**
@par Protocol Description:
The EFI_SIMPLE_NETWORK_PROTOCOL protocol is used to initialize access
to a network adapter. Once the network adapter initializes,
the EFI_SIMPLE_NETWORK_PROTOCOL protocol provides services that
allow packets to be transmitted and received.
@param Revision
Revision of the EFI_SIMPLE_NETWORK_PROTOCOL. All future revisions must
be backwards compatible. If a future version is not backwards compatible
it is not the same GUID.
@param Start
Prepares the network interface for further command operations.
No other EFI_SIMPLE_NETWORK_PROTOCOL interface functions will operate
until this call is made.
@param Stop
Stops further network interface command processing.
No other EFI_SIMPLE_NETWORK_PROTOCOL interface functions will operate
after this call is made until another Start() call is made.
@param Initialize
Resets the network adapter and allocates the transmit and receive buffers.
@param Reset
Resets the network adapter and reinitializes it with the parameters
provided in the previous call to Initialize().
@param Shutdown
Resets the network adapter and leaves it in a state safe for another driver
to initialize. The memory buffers assigned in the Initialize() call are released.
After this call, only the Initialize() or Stop() calls may be used.
@param ReceiveFilters
Enables and disables the receive filters for the network interface and,
if supported, manages the filtered multicast
HW MAC (Hardware Media Access Control) address list.
@param StationAddress
Modifies or resets the current station address, if supported.
@param Statistics
Collects statistics from the network interface and allows the statistics to be reset.
@param MCastIpToMac
Maps a multicast IP address to a multicast HW MAC address.
@param NvData
Reads and writes the contents of the NVRAM devices attached to the network interface.
@param GetStatus
Reads the current interrupt status and the list of recycled transmit
buffers from the network interface.
@param Transmit
Places a packet in the transmit queue.
@param Receive
Retrieves a packet from the receive queue, along with the status
flags that describe the packet type.
@param WaitForPacket
Event used with WaitForEvent() to wait for a packet to be received.
@param Mode
Pointer to the EFI_SIMPLE_NETWORK_MODE data for the device.
**/
///
/// The EFI_SIMPLE_NETWORK_PROTOCOL protocol is used to initialize access
/// to a network adapter. Once the network adapter initializes,
/// the EFI_SIMPLE_NETWORK_PROTOCOL protocol provides services that
/// allow packets to be transmitted and received.
///
struct _EFI_SIMPLE_NETWORK_PROTOCOL {
///
/// Revision of the EFI_SIMPLE_NETWORK_PROTOCOL. All future revisions must
/// be backwards compatible. If a future version is not backwards compatible
/// it is not the same GUID.
///
UINT64 Revision;
EFI_SIMPLE_NETWORK_START Start;
EFI_SIMPLE_NETWORK_STOP Stop;
@ -636,7 +578,13 @@ struct _EFI_SIMPLE_NETWORK_PROTOCOL {
EFI_SIMPLE_NETWORK_GET_STATUS GetStatus;
EFI_SIMPLE_NETWORK_TRANSMIT Transmit;
EFI_SIMPLE_NETWORK_RECEIVE Receive;
///
/// Event used with WaitForEvent() to wait for a packet to be received.
///
EFI_EVENT WaitForPacket;
///
/// Pointer to the EFI_SIMPLE_NETWORK_MODE data for the device.
///
EFI_SIMPLE_NETWORK_MODE *Mode;
};

View File

@ -118,25 +118,16 @@ EFI_STATUS
OUT EFI_INPUT_KEY *Key
);
/**
@par Protocol Description:
The EFI_SIMPLE_TEXT_INPUT_PROTOCOL is used on the ConsoleIn device.
It is the minimum required protocol for ConsoleIn.
@param Reset
Reset the ConsoleIn device.
@param ReadKeyStroke
Returns the next input character.
@param WaitForKey
Event to use with WaitForEvent() to wait for a key to be available.
**/
///
/// The EFI_SIMPLE_TEXT_INPUT_PROTOCOL is used on the ConsoleIn device.
/// It is the minimum required protocol for ConsoleIn.
///
struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL {
EFI_INPUT_RESET Reset;
EFI_INPUT_READ_KEY ReadKeyStroke;
///
/// Event to use with WaitForEvent() to wait for a key to be available
///
EFI_EVENT WaitForKey;
};

View File

@ -20,8 +20,6 @@
#ifndef __SIMPLE_TEXT_OUT_H__
#define __SIMPLE_TEXT_OUT_H__
#include <gpxe/efi/PiDxe.h>
#define EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL_GUID \
{ \
0x387477c2, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
@ -375,43 +373,12 @@ typedef struct {
BOOLEAN CursorVisible;
} EFI_SIMPLE_TEXT_OUTPUT_MODE;
/**
@par Protocol Description:
The SIMPLE_TEXT_OUTPUT protocol is used to control text-based output devices.
It is the minimum required protocol for any handle supplied as the ConsoleOut
or StandardError device. In addition, the minimum supported text mode of such
devices is at least 80 x 25 characters.
@param Reset
Reset the ConsoleOut device.
@param OutputString
Displays the Unicode string on the device at the current cursor location.
@param TestString
Tests to see if the ConsoleOut device supports this Unicode string.
@param QueryMode
Queries information concerning the output device's supported text mode.
@param SetMode
Sets the current mode of the output device.
@param SetAttribute
Sets the foreground and background color of the text that is output.
@param ClearScreen
Clears the screen with the currently set background color.
@param SetCursorPosition
Sets the current cursor position.
@param EnableCursor
Turns the visibility of the cursor on/off.
@param Mode
Pointer to SIMPLE_TEXT_OUTPUT_MODE data.
**/
///
/// The SIMPLE_TEXT_OUTPUT protocol is used to control text-based output devices.
/// It is the minimum required protocol for any handle supplied as the ConsoleOut
/// or StandardError device. In addition, the minimum supported text mode of such
/// devices is at least 80 x 25 characters.
///
struct _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL {
EFI_TEXT_RESET Reset;
@ -426,9 +393,9 @@ struct _EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL {
EFI_TEXT_SET_CURSOR_POSITION SetCursorPosition;
EFI_TEXT_ENABLE_CURSOR EnableCursor;
//
// Current mode
//
///
/// Pointer to SIMPLE_TEXT_OUTPUT_MODE data.
///
EFI_SIMPLE_TEXT_OUTPUT_MODE *Mode;
};

View File

@ -1,5 +1,4 @@
/** @file
Defines data types and constants introduced in UEFI.
Copyright (c) 2006 - 2008, Intel Corporation
@ -18,33 +17,40 @@
#include <gpxe/efi/Base.h>
//
// Basical data type definitions introduced in UEFI.
//
///
/// Basical data type definitions introduced in UEFI.
/// 128-bit buffer containing a unique identifier value.
///
typedef GUID EFI_GUID;
///
/// Function return status for EFI API
///
typedef RETURN_STATUS EFI_STATUS;
///
/// A collection of related interfaces.
///
typedef VOID *EFI_HANDLE;
///
/// Handle to an event structure.
///
typedef VOID *EFI_EVENT;
///
/// Task priority level.
///
typedef UINTN EFI_TPL;
///
/// Logical block address.
///
typedef UINT64 EFI_LBA;
typedef UINT16 STRING_REF;
typedef UINT64 EFI_PHYSICAL_ADDRESS;
typedef UINT64 EFI_VIRTUAL_ADDRESS;
///
/// EFI Time Abstraction:
/// Year: 2000 - 20XX
/// Year: 1998 - 20XX
/// Month: 1 - 12
/// Day: 1 - 31
/// Hour: 0 - 23
@ -68,21 +74,31 @@ typedef struct {
} EFI_TIME;
//
// Networking Definitions
//
///
/// 4-byte buffer. An IPv4 internet protocol address.
///
typedef struct {
UINT8 Addr[4];
} EFI_IPv4_ADDRESS;
///
/// 16-byte buffer. An IPv6 internet protocol address
///
typedef struct {
UINT8 Addr[16];
} EFI_IPv6_ADDRESS;
///
/// 32-byte buffer containing a network Media Access Control address.
///
typedef struct {
UINT8 Addr[32];
} EFI_MAC_ADDRESS;
///
/// 16-byte buffer aligned on a 4-byte boundary.
/// An IPv4 or IPv6 internet protocol address.
///
typedef union {
UINT32 Addr[4];
EFI_IPv4_ADDRESS v4;
@ -131,8 +147,6 @@ typedef union {
#define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL
#define NULL_HANDLE ((VOID *) 0)
//
// Define macro to encode the status code.
//
@ -143,10 +157,9 @@ typedef union {
//
// Define macros to build data structure signatures from characters.
//
#define EFI_SIGNATURE_16(A, B) ((A) | (B << 8))
#define EFI_SIGNATURE_32(A, B, C, D) (EFI_SIGNATURE_16 (A, B) | (EFI_SIGNATURE_16 (C, D) << 16))
#define EFI_SIGNATURE_64(A, B, C, D, E, F, G, H) \
(EFI_SIGNATURE_32 (A, B, C, D) | ((UINT64) (EFI_SIGNATURE_32 (E, F, G, H)) << 32))
#define EFI_SIGNATURE_16(A, B) SIGNATURE_16 (A, B)
#define EFI_SIGNATURE_32(A, B, C, D) SIGNATURE_32 (A, B, C, D)
#define EFI_SIGNATURE_64(A, B, C, D, E, F, G, H) SIGNATURE_64 (A, B, C, D, E, F, G, H)
///
@ -171,4 +184,17 @@ typedef union {
#define EFI_MAX_BIT MAX_BIT
#define EFI_MAX_ADDRESS MAX_ADDRESS
///
/// Limited buffer size for a language code recommended by RFC3066
/// (42 characters plus a NULL terminator)
///
#define RFC_3066_ENTRY_SIZE (42 + 1)
///
/// The size of a 3 character ISO639 language code.
///
#define ISO_639_2_ENTRY_SIZE 3
#endif

View File

@ -1,7 +1,7 @@
/** @file
EFI Guid Partition Table Format Definition.
Copyright (c) 2006 - 2007, Intel Corporation
Copyright (c) 2006 - 2008, 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
@ -15,6 +15,10 @@
#ifndef __UEFI_GPT_H__
#define __UEFI_GPT_H__
///
/// The primary GUID Partition Table Header must be
/// located in LBA 1 (i.e., the second logical block).
///
#define PRIMARY_PART_HEADER_LBA 1
///
@ -52,14 +56,6 @@ typedef struct {
CHAR16 PartitionName[36];
} EFI_PARTITION_ENTRY;
///
/// GPT Partition Entry Status
///
typedef struct {
BOOLEAN OutOfRange;
BOOLEAN Overlap;
} EFI_PARTITION_ENTRY_STATUS;
#pragma pack()
#endif

View File

@ -23,8 +23,6 @@
///
/// The following types are currently defined:
///
typedef UINT32 RELOFST;
typedef VOID* EFI_HII_HANDLE;
typedef CHAR16* EFI_STRING;
typedef UINT16 EFI_IMAGE_ID;
@ -32,45 +30,31 @@ typedef UINT16 EFI_QUESTION_ID;
typedef UINT16 EFI_STRING_ID;
typedef UINT16 EFI_FORM_ID;
typedef UINT16 EFI_VARSTORE_ID;
typedef UINT16 EFI_DEFAULT_ID;
typedef UINT32 EFI_HII_FONT_STYLE;
#pragma pack(1)
//
// Definitions for Package Lists and Package Headers
// Section 27.3.1
//
///
/// HII package list
/// The header found at the start of each package list.
///
typedef struct {
EFI_GUID PackageListGuid;
UINT32 PackageLength;
} EFI_HII_PACKAGE_LIST_HEADER;
/**
Each package starts with a header, as defined above, which
indicates the size and type of the package. When added to a
pointer pointing to the start of the header, Length points at
the next package. The package lists form a package list when
concatenated together and terminated with an
EFI_HII_PACKAGE_HEADER with a Type of EFI_HII_PACKAGE_END. The
type EFI_HII_PACKAGE_TYPE_GUID is used for vendor-defined HII
packages, whose contents are determined by the Guid. The range
of package types starting with EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN
through EFI_HII_PACKAGE_TYPE_SYSTEM_END are reserved for system
firmware implementers.
@param Length The size of the package in bytes.
@param Type The package type. See EFI_HII_PACKAGE_TYPE_x,
below.
@param Data The package data, the format of which is
determined by Type.
**/
///
/// The header found at the start of each package.
///
typedef struct {
UINT32 Length:24;
UINT32 Type:8;
@ -78,32 +62,33 @@ typedef struct {
} EFI_HII_PACKAGE_HEADER;
//
// EFI_HII_PACKAGE_TYPE_x.
// Value of HII package type
//
#define EFI_HII_PACKAGE_TYPE_ALL 0x00
#define EFI_HII_PACKAGE_TYPE_GUID 0x01
#define EFI_HII_PACKAGE_FORM 0x02
#define EFI_HII_PACKAGE_KEYBOARD_LAYOUT 0x03
#define EFI_HII_PACKAGE_FORMS 0x02
#define EFI_HII_PACKAGE_STRINGS 0x04
#define EFI_HII_PACKAGE_FONTS 0x05
#define EFI_HII_PACKAGE_IMAGES 0x06
#define EFI_HII_PACKAGE_SIMPLE_FONTS 0x07
#define EFI_HII_PACKAGE_DEVICE_PATH 0x08
#define EFI_HII_PACKAGE_KEYBOARD_LAYOUT 0x09
#define EFI_HII_PACKAGE_END 0xDF
#define EFI_HII_PACKAGE_TYPE_SYSTEM_BEGIN 0xE0
#define EFI_HII_PACKAGE_TYPE_SYSTEM_END 0xFF
//
// Simplified Font Package
// Definitions for Simplified Font Package
// Section 27.3.2
//
#define EFI_GLYPH_HEIGHT 19
#define EFI_GLYPH_WIDTH 8
//
// Contents of EFI_NARROW_GLYPH.Attributes
//
#define EFI_GLYPH_NON_SPACING 0x01
#define EFI_GLYPH_WIDE 0x02
#define EFI_GLYPH_HEIGHT 19
#define EFI_GLYPH_WIDTH 8
typedef struct {
CHAR16 UnicodeWeight;
@ -119,7 +104,10 @@ typedef struct {
UINT8 Pad[3];
} EFI_WIDE_GLYPH;
///
/// A simplified font package consists of a font header
/// followed by a series of glyph structures.
///
typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR {
EFI_HII_PACKAGE_HEADER Header;
UINT16 NumberOfNarrowGlyphs;
@ -129,9 +117,13 @@ typedef struct _EFI_HII_SIMPLE_FONT_PACKAGE_HDR {
} EFI_HII_SIMPLE_FONT_PACKAGE_HDR;
//
// Font Package
// Definitions for Font Package
// Section 27.3.3
//
//
// Value for font style
//
#define EFI_HII_FONT_STYLE_NORMAL 0x00000000
#define EFI_HII_FONT_STYLE_BOLD 0x00000001
#define EFI_HII_FONT_STYLE_ITALIC 0x00000002
@ -149,6 +141,12 @@ typedef struct _EFI_HII_GLYPH_INFO {
INT16 AdvanceX;
} EFI_HII_GLYPH_INFO;
///
/// The fixed header consists of a standard record header and
/// then the character values in this section, the flags
/// (including the encoding method) and the offsets of the glyph
/// information, the glyph bitmaps and the character map.
///
typedef struct _EFI_HII_FONT_PACKAGE_HDR {
EFI_HII_PACKAGE_HEADER Header;
UINT32 HdrSize;
@ -158,6 +156,9 @@ typedef struct _EFI_HII_FONT_PACKAGE_HDR {
CHAR16 FontFamily[1];
} EFI_HII_FONT_PACKAGE_HDR;
//
// Value of different glyph info block types
//
#define EFI_HII_GIBT_END 0x00
#define EFI_HII_GIBT_GLYPH 0x10
#define EFI_HII_GIBT_GLYPHS 0x11
@ -175,6 +176,10 @@ typedef struct _EFI_HII_GLYPH_BLOCK {
UINT8 BlockType;
} EFI_HII_GLYPH_BLOCK;
//
// Definition of different glyph info block types
//
typedef struct _EFI_HII_GIBT_DEFAULTS_BLOCK {
EFI_HII_GLYPH_BLOCK Header;
EFI_HII_GLYPH_INFO Cell;
@ -210,25 +215,25 @@ typedef struct _EFI_HII_GIBT_EXT4_BLOCK {
typedef struct _EFI_HII_GIBT_GLYPH_BLOCK {
EFI_HII_GLYPH_BLOCK Header;
EFI_HII_GLYPH_INFO Cell;
UINT8 BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Cell.Width+7)/8)*Cell.Height
UINT8 BitmapData[1];
} EFI_HII_GIBT_GLYPH_BLOCK;
typedef struct _EFI_HII_GIBT_GLYPHS_BLOCK {
EFI_HII_GLYPH_BLOCK Header;
EFI_HII_GLYPH_INFO Cell;
UINT16 Count;
UINT8 BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Cell.Width+7)/8)*Cell.Height
UINT8 BitmapData[1];
} EFI_HII_GIBT_GLYPHS_BLOCK;
typedef struct _EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK {
EFI_HII_GLYPH_BLOCK Header;
UINT8 BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Global.Cell.Width+7)/8)*Global.Cell.Height
UINT8 BitmapData[1];
} EFI_HII_GIBT_GLYPH_DEFAULT_BLOCK;
typedef struct _EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK {
EFI_HII_GLYPH_BLOCK Header;
UINT16 Count;
UINT8 BitmapData[1]; // the number of bytes per bitmap can be calculated by ((Global.Cell.Width+7)/8)*Global.Cell.Height
UINT8 BitmapData[1];
} EFI_HII_GIBT_GLYPHS_DEFAULT_BLOCK;
typedef struct _EFI_HII_GIBT_SKIP1_BLOCK {
@ -242,16 +247,27 @@ typedef struct _EFI_HII_GIBT_SKIP2_BLOCK {
} EFI_HII_GIBT_SKIP2_BLOCK;
//
// Device Path Package
// Definitions for Device Path Package
// Section 27.3.4
//
///
/// The device path package is used to carry a device path
/// associated with the package list.
///
typedef struct _EFI_HII_DEVICE_PATH_PACKAGE {
EFI_HII_PACKAGE_HEADER Header;
// EFI_DEVICE_PATH_PROTOCOL DevicePath[];
} EFI_HII_DEVICE_PATH_PACKAGE;
//
// GUID Package
// Definitions for GUID Package
// Section 27.3.5
//
///
/// The GUID package is used to carry data where the format is defined by a GUID.
///
typedef struct _EFI_HII_GUID_PACKAGE_HDR {
EFI_HII_PACKAGE_HEADER Header;
EFI_GUID Guid;
@ -259,12 +275,17 @@ typedef struct _EFI_HII_GUID_PACKAGE_HDR {
} EFI_HII_GUID_PACKAGE_HDR;
//
// String Package
// Definitions for String Package
// Section 27.3.6
//
#define UEFI_CONFIG_LANG L"x-UEFI"
#define UEFI_CONFIG_LANG2 L"x-i-UEFI" // BUGBUG, spec need to be updated.
#define UEFI_CONFIG_LANG2 L"x-i-UEFI"
///
/// The fixed header consists of a standard record header and then the string identifiers
/// contained in this section and the offsets of the string and language information.
///
typedef struct _EFI_HII_STRING_PACKAGE_HDR {
EFI_HII_PACKAGE_HEADER Header;
UINT32 HdrSize;
@ -278,6 +299,9 @@ typedef struct {
UINT8 BlockType;
} EFI_HII_STRING_BLOCK;
//
// Value of different string information block types
//
#define EFI_HII_SIBT_END 0x00
#define EFI_HII_SIBT_STRING_SCSU 0x10
#define EFI_HII_SIBT_STRING_SCSU_FONT 0x11
@ -295,6 +319,10 @@ typedef struct {
#define EFI_HII_SIBT_EXT4 0x32
#define EFI_HII_SIBT_FONT 0x40
//
// Definition of different string information block types
//
typedef struct _EFI_HII_SIBT_DUPLICATE_BLOCK {
EFI_HII_STRING_BLOCK Header;
EFI_STRING_ID StringId;
@ -389,7 +417,8 @@ typedef struct _EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK {
} EFI_HII_SIBT_STRINGS_UCS2_FONT_BLOCK;
//
// Image Packages
// Definitions for Image Package
// Section 27.3.7
//
typedef struct _EFI_HII_IMAGE_PACKAGE_HDR {
@ -402,6 +431,9 @@ typedef struct _EFI_HII_IMAGE_BLOCK {
UINT8 BlockType;
} EFI_HII_IMAGE_BLOCK;
//
// Value of different image information block types
//
#define EFI_HII_IIBT_END 0x00
#define EFI_HII_IIBT_IMAGE_1BIT 0x10
#define EFI_HII_IIBT_IMAGE_1BIT_TRANS 0x11
@ -419,6 +451,10 @@ typedef struct _EFI_HII_IMAGE_BLOCK {
#define EFI_HII_IIBT_EXT2 0x31
#define EFI_HII_IIBT_EXT4 0x32
//
// Definition of different image information block types
//
typedef struct _EFI_HII_IIBT_END_BLOCK {
EFI_HII_IMAGE_BLOCK Header;
} EFI_HII_IIBT_END_BLOCK;
@ -538,6 +574,10 @@ typedef struct _EFI_HII_IIBT_SKIP2_BLOCK {
UINT16 SkipCount;
} EFI_HII_IIBT_SKIP2_BLOCK;
//
// Definitions for Palette Information
//
typedef struct _EFI_HII_IMAGE_PALETTE_INFO_HEADER {
UINT16 PaletteCount;
} EFI_HII_IMAGE_PALETTE_INFO_HEADER;
@ -548,9 +588,13 @@ typedef struct _EFI_HII_IMAGE_PALETTE_INFO {
} EFI_HII_IMAGE_PALETTE_INFO;
//
// Forms Package
// Definitions for Forms Package
// Section 27.3.8
//
///
/// The Forms package is used to carry forms-based encoding data.
///
typedef struct _EFI_HII_FORM_PACKAGE {
EFI_HII_PACKAGE_HEADER Header;
// EFI_IFR_OP_HEADER OpCodeHeader;
@ -672,6 +716,10 @@ typedef union {
#define EFI_IFR_CATENATE_OP 0x5E
#define EFI_IFR_GUID_OP 0x5F
//
// Definitions of IFR Standard Headers
// Section 27.3.8.2
//
typedef struct _EFI_IFR_OP_HEADER {
UINT8 OpCode;
@ -695,17 +743,27 @@ typedef struct _EFI_IFR_QUESTION_HEADER {
UINT8 Flags;
} EFI_IFR_QUESTION_HEADER;
//
// Flag values of EFI_IFR_QUESTION_HEADER
//
#define EFI_IFR_FLAG_READ_ONLY 0x01
#define EFI_IFR_FLAG_CALLBACK 0x04
#define EFI_IFR_FLAG_RESET_REQUIRED 0x10
#define EFI_IFR_FLAG_OPTIONS_ONLY 0x80
//
// Definition for Opcode Reference
// Section 27.3.8.3
//
typedef struct _EFI_IFR_DEFAULTSTORE {
EFI_IFR_OP_HEADER Header;
EFI_STRING_ID DefaultName;
UINT16 DefaultId;
} EFI_IFR_DEFAULTSTORE;
//
// Default Identifier of default store
//
#define EFI_HII_DEFAULT_CLASS_STANDARD 0x0000
#define EFI_HII_DEFAULT_CLASS_MANUFACTURING 0x0001
#define EFI_HII_DEFAULT_CLASS_SAFE 0x0002
@ -855,6 +913,9 @@ typedef struct _EFI_IFR_DATE {
UINT8 Flags;
} EFI_IFR_DATE;
//
// Flags that describe the behavior of the question.
//
#define EFI_QF_DATE_YEAR_SUPPRESS 0x01
#define EFI_QF_DATE_MONTH_SUPPRESS 0x02
#define EFI_QF_DATE_DAY_SUPPRESS 0x04
@ -894,16 +955,19 @@ typedef struct _EFI_IFR_NUMERIC {
MINMAXSTEP_DATA data;
} EFI_IFR_NUMERIC;
//
// Flags related to the numeric question
//
#define EFI_IFR_NUMERIC_SIZE 0x03
#define EFI_IFR_NUMERIC_SIZE_1 0x00
#define EFI_IFR_NUMERIC_SIZE_2 0x01
#define EFI_IFR_NUMERIC_SIZE_4 0x02
#define EFI_IFR_NUMERIC_SIZE_8 0x03
#define EFI_IFR_NUMERIC_SIZE_1 0x00
#define EFI_IFR_NUMERIC_SIZE_2 0x01
#define EFI_IFR_NUMERIC_SIZE_4 0x02
#define EFI_IFR_NUMERIC_SIZE_8 0x03
#define EFI_IFR_DISPLAY 0x30
#define EFI_IFR_DISPLAY_INT_DEC 0x00
#define EFI_IFR_DISPLAY_UINT_DEC 0x10
#define EFI_IFR_DISPLAY_UINT_HEX 0x20
#define EFI_IFR_DISPLAY_INT_DEC 0x00
#define EFI_IFR_DISPLAY_UINT_DEC 0x10
#define EFI_IFR_DISPLAY_UINT_HEX 0x20
typedef struct _EFI_IFR_ONE_OF {
EFI_IFR_OP_HEADER Header;
@ -945,14 +1009,17 @@ typedef struct _EFI_IFR_TIME {
UINT8 Flags;
} EFI_IFR_TIME;
//
// A bit-mask that determines which unique settings are active for this opcode.
//
#define QF_TIME_HOUR_SUPPRESS 0x01
#define QF_TIME_MINUTE_SUPPRESS 0x02
#define QF_TIME_SECOND_SUPPRESS 0x04
#define QF_TIME_STORAGE 0x30
#define QF_TIME_STORAGE_NORMAL 0x00
#define QF_TIME_STORAGE_TIME 0x10
#define QF_TIME_STORAGE_WAKEUP 0x20
#define QF_TIME_STORAGE_NORMAL 0x00
#define QF_TIME_STORAGE_TIME 0x10
#define QF_TIME_STORAGE_WAKEUP 0x20
typedef struct _EFI_IFR_DISABLE_IF {
EFI_IFR_OP_HEADER Header;
@ -994,6 +1061,9 @@ typedef struct _EFI_IFR_ONE_OF_OPTION {
EFI_IFR_TYPE_VALUE Value;
} EFI_IFR_ONE_OF_OPTION;
//
// Types of the option's value.
//
#define EFI_IFR_TYPE_NUM_SIZE_8 0x00
#define EFI_IFR_TYPE_NUM_SIZE_16 0x01
#define EFI_IFR_TYPE_NUM_SIZE_32 0x02
@ -1036,11 +1106,6 @@ typedef struct _EFI_IFR_EQ_ID_LIST {
UINT16 ValueList[1];
} EFI_IFR_EQ_ID_LIST;
typedef struct _EFI_IFR_QUESTION_REF1 {
EFI_IFR_OP_HEADER Header;
EFI_QUESTION_ID QuestionId;
} EFI_IFR_QUESTION_REF1;
typedef struct _EFI_IFR_UINT8 {
EFI_IFR_OP_HEADER Header;
UINT8 Value;
@ -1051,10 +1116,6 @@ typedef struct _EFI_IFR_UINT16 {
UINT16 Value;
} EFI_IFR_UINT16;
typedef struct _EFI_IFR_QUESTION_REF2 {
EFI_IFR_OP_HEADER Header;
} EFI_IFR_QUESTION_REF2;
typedef struct _EFI_IFR_UINT32 {
EFI_IFR_OP_HEADER Header;
UINT32 Value;
@ -1065,6 +1126,15 @@ typedef struct _EFI_IFR_UINT64 {
UINT64 Value;
} EFI_IFR_UINT64;
typedef struct _EFI_IFR_QUESTION_REF1 {
EFI_IFR_OP_HEADER Header;
EFI_QUESTION_ID QuestionId;
} EFI_IFR_QUESTION_REF1;
typedef struct _EFI_IFR_QUESTION_REF2 {
EFI_IFR_OP_HEADER Header;
} EFI_IFR_QUESTION_REF2;
typedef struct _EFI_IFR_QUESTION_REF3 {
EFI_IFR_OP_HEADER Header;
} EFI_IFR_QUESTION_REF3;
@ -1142,11 +1212,23 @@ typedef struct _EFI_IFR_TO_BOOLEAN {
EFI_IFR_OP_HEADER Header;
} EFI_IFR_TO_BOOLEAN;
//
// For EFI_IFR_TO_STRING, when converting from
// unsigned integers, these flags control the format:
// 0 = unsigned decimal
// 1 = signed decimal
// 2 = hexadecimal (lower-case alpha)
// 3 = hexadecimal (upper-case alpha)
//
#define EFI_IFR_STRING_UNSIGNED_DEC 0
#define EFI_IFR_STRING_SIGNED_DEC 1
#define EFI_IFR_STRING_LOWERCASE_HEX 2
#define EFI_IFR_STRING_UPPERCASE_HEX 3
//
// When converting from a buffer, these flags control the format:
// 0 = ASCII
// 8 = Unicode
//
#define EFI_IFR_STRING_ASCII 0
#define EFI_IFR_STRING_UNICODE 8
@ -1247,6 +1329,9 @@ typedef struct _EFI_IFR_CONDITIONAL {
EFI_IFR_OP_HEADER Header;
} EFI_IFR_CONDITIONAL;
//
// Flags governing the matching criteria of EFI_IFR_FIND
//
#define EFI_IFR_FF_CASE_SENSITIVE 0x00
#define EFI_IFR_FF_CASE_INSENSITIVE 0x01
@ -1263,6 +1348,10 @@ typedef struct _EFI_IFR_TOKEN {
EFI_IFR_OP_HEADER Header;
} EFI_IFR_TOKEN;
//
// Flags specifying whether to find the first matching string
// or the first non-matching string.
//
#define EFI_IFR_FLAGS_FIRST_MATCHING 0x00
#define EFI_IFR_FLAGS_FIRST_NON_MATCHING 0x01
@ -1272,7 +1361,9 @@ typedef struct _EFI_IFR_SPAN {
} EFI_IFR_SPAN;
//
// Keyboard Package
// Definitions for Keyboard Package
// Section 27.3.9
// Releated definitions are in Section of EFI_HII_DATABASE_PROTOCOL
//
typedef enum {

View File

@ -1,7 +1,7 @@
/** @file
This includes some definitions introduced in UEFI that will be used in both PEI and DXE phases.
Copyright (c) 2006, Intel Corporation
Copyright (c) 2006 - 2008, 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
@ -70,38 +70,32 @@ typedef struct {
#define WIN_CERT_TYPE_EFI_PKCS115 0x0EF0
#define WIN_CERT_TYPE_EFI_GUID 0x0EF1
/**
The WIN_CERTIFICATE structure is part of the PE/COFF
specification and has the following definition:
@param dwLength The length of the entire certificate,
including the length of the header, in
bytes.
@param wRevision The revision level of the WIN_CERTIFICATE
structure. The current revision level is
0x0200.
@param wCertificateType The certificate type. See
WIN_CERT_TYPE_xxx for the UEFI
certificate types. The UEFI
specification reserves the range of
certificate type values from 0x0EF0
to 0x0EFF.
@param bCertificate The actual certificate. The format of
the certificate depends on
wCertificateType. The format of the UEFI
certificates is defined below.
**/
///
/// The WIN_CERTIFICATE structure is part of the PE/COFF specification.
///
typedef struct _WIN_CERTIFICATE {
///
/// The length of the entire certificate,
/// including the length of the header, in bytes.
///
UINT32 dwLength;
///
/// The revision level of the WIN_CERTIFICATE
/// structure. The current revision level is 0x0200.
///
UINT16 wRevision;
///
/// The certificate type. See WIN_CERT_TYPE_xxx for the UEFI
/// certificate types. The UEFI specification reserves the range of
/// certificate type values from 0x0EF0 to 0x0EFF.
///
UINT16 wCertificateType;
//UINT8 bCertificate[ANYSIZE_ARRAY];
///
/// The following is the actual certificate. The format of
/// the certificate depends on wCertificateType.
///
/// UINT8 bCertificate[ANYSIZE_ARRAY];
///
} WIN_CERTIFICATE;
///
@ -110,9 +104,9 @@ typedef struct _WIN_CERTIFICATE {
#define EFI_CERT_TYPE_RSA2048_SHA256_GUID \
{0xa7717414, 0xc616, 0x4977, {0x94, 0x20, 0x84, 0x47, 0x12, 0xa7, 0x35, 0xbf } }
///
/// WIN_CERTIFICATE_UEFI_GUID.CertData
///
//
// WIN_CERTIFICATE_UEFI_GUID.CertData
//
typedef struct _EFI_CERT_BLOCK_RSA_2048_SHA256 {
UINT32 HashType;
UINT8 PublicKey[256];
@ -120,97 +114,95 @@ typedef struct _EFI_CERT_BLOCK_RSA_2048_SHA256 {
} EFI_CERT_BLOCK_RSA_2048_SHA256;
/**
@param Hdr This is the standard WIN_CERTIFICATE header, where
wCertificateType is set to
WIN_CERT_TYPE_UEFI_GUID.
@param CertType This is the unique id which determines the
format of the CertData. In this case, the
value is EFI_CERT_TYPE_RSA2048_SHA256_GUID.
@param CertData This is the certificate data. The format of
the data is determined by the CertType. In
this case the value is
EFI_CERT_BLOCK_RSA_2048_SHA256.
**/
///
/// Certificate which encapsulates a GUID-specific digital signature
///
typedef struct _WIN_CERTIFICATE_UEFI_GUID {
///
/// This is the standard WIN_CERTIFICATE header, where
/// wCertificateType is set to WIN_CERT_TYPE_UEFI_GUID.
///
WIN_CERTIFICATE Hdr;
///
/// This is the unique id which determines the
/// format of the CertData. In this case, the
/// value is EFI_CERT_TYPE_RSA2048_SHA256_GUID.
///
EFI_GUID CertType;
// UINT8 CertData[ANYSIZE_ARRAY];
///
/// The following is the certificate data. The format of
/// the data is determined by the CertType. In this case the value is
/// EFI_CERT_BLOCK_RSA_2048_SHA256.
///
/// UINT8 CertData[ANYSIZE_ARRAY];
///
} WIN_CERTIFICATE_UEFI_GUID;
/**
Certificate which encapsulates the RSASSA_PKCS1-v1_5 digital
signature.
The WIN_CERTIFICATE_UEFI_PKCS1_15 structure is derived from
WIN_CERTIFICATE and encapsulate the information needed to
implement the RSASSA-PKCS1-v1_5 digital signature algorithm as
specified in RFC2437.
@param Hdr This is the standard WIN_CERTIFICATE header, where
wCertificateType is set to
WIN_CERT_TYPE_UEFI_PKCS1_15.
@param HashAlgorithm This is the hashing algorithm which was
performed on the UEFI executable when
creating the digital signature. It is
one of the enumerated values pre-defined
in Section 26.4.1. See
EFI_HASH_ALGORITHM_x.
@param Signature This is the actual digital signature. The
size of the signature is the same size as
the key (1024-bit key is 128 bytes) and can
be determined by subtracting the length of
the other parts of this header from the
total length of the certificate as found in
Hdr.dwLength.
**/
///
/// Certificate which encapsulates the RSASSA_PKCS1-v1_5 digital signature.
///
/// The WIN_CERTIFICATE_UEFI_PKCS1_15 structure is derived from
/// WIN_CERTIFICATE and encapsulate the information needed to
/// implement the RSASSA-PKCS1-v1_5 digital signature algorithm as
/// specified in RFC2437.
///
typedef struct _WIN_CERTIFICATE_EFI_PKCS1_15 {
///
/// This is the standard WIN_CERTIFICATE header, where
/// wCertificateType is set to WIN_CERT_TYPE_UEFI_PKCS1_15.
///
WIN_CERTIFICATE Hdr;
///
/// This is the hashing algorithm which was performed on the
/// UEFI executable when creating the digital signature.
///
EFI_GUID HashAlgorithm;
// UINT8 Signature[ANYSIZE_ARRAY];
///
/// The following is the actual digital signature. The
/// size of the signature is the same size as the key
/// (1024-bit key is 128 bytes) and can be determined by
/// subtracting the length of the other parts of this header
/// from the total length of the certificate as found in
/// Hdr.dwLength.
///
/// UINT8 Signature[ANYSIZE_ARRAY];
///
} WIN_CERTIFICATE_EFI_PKCS1_15;
/**
AuthInfo is a WIN_CERTIFICATE using the wCertificateType
WIN_CERTIFICATE_UEFI_GUID and the CertType
EFI_CERT_TYPE_RSA2048_SHA256. If the attribute specifies
authenticated access, then the Data buffer should begin with an
authentication descriptor prior to the data payload and DataSize
should reflect the the data.and descriptor size. The caller
shall digest the Monotonic Count value and the associated data
for the variable update using the SHA-256 1-way hash algorithm.
The ensuing the 32-byte digest will be signed using the private
key associated w/ the public/private 2048-bit RSA key-pair. The
WIN_CERTIFICATE shall be used to describe the signature of the
Variable data *Data. In addition, the signature will also
include the MonotonicCount value to guard against replay attacks
@param MonotonicCount Included in the signature of
AuthInfo.Used to ensure freshness/no
replay. Incremented during each
"Write" access.
@param AuthInfo Provides the authorization for the variable
access. It is a signature across the
variable data and the Monotonic Count
value. Caller uses Private key that is
associated with a public key that has been
provisioned via the key exchange.
**/
///
/// AuthInfo is a WIN_CERTIFICATE using the wCertificateType
/// WIN_CERTIFICATE_UEFI_GUID and the CertType
/// EFI_CERT_TYPE_RSA2048_SHA256. If the attribute specifies
/// authenticated access, then the Data buffer should begin with an
/// authentication descriptor prior to the data payload and DataSize
/// should reflect the the data.and descriptor size. The caller
/// shall digest the Monotonic Count value and the associated data
/// for the variable update using the SHA-256 1-way hash algorithm.
/// The ensuing the 32-byte digest will be signed using the private
/// key associated w/ the public/private 2048-bit RSA key-pair. The
/// WIN_CERTIFICATE shall be used to describe the signature of the
/// Variable data *Data. In addition, the signature will also
/// include the MonotonicCount value to guard against replay attacks
///
typedef struct {
///
/// Included in the signature of
/// AuthInfo.Used to ensure freshness/no
/// replay. Incremented during each
/// "Write" access.
///
UINT64 MonotonicCount;
///
/// Provides the authorization for the variable
/// access. It is a signature across the
/// variable data and the Monotonic Count
/// value. Caller uses Private key that is
/// associated with a public key that has been
/// provisioned via the key exchange.
///
WIN_CERTIFICATE_UEFI_GUID AuthInfo;
} EFI_VARIABLE_AUTHENTICATION;

File diff suppressed because it is too large Load Diff

View File

@ -1,11 +1,11 @@
/** @file
Include file that supportes UEFI.
Include file that supports UEFI.
This include file must only contain things defined in the UEFI 2.0 specification.
If a code construct is defined in the UEFI 2.0 specification it must be included
This include file must only contain things defined in the UEFI 2.1 specification.
If a code construct is defined in the UEFI 2.1 specification it must be included
by this include file.
Copyright (c) 2006 - 2007, Intel Corporation
Copyright (c) 2006 - 2008, 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
@ -47,27 +47,32 @@ typedef enum {
#define EFI_UNSPECIFIED_TIMEZONE 0x07FF
//
// possible caching types for the memory range
// Memory cacheability attributes
//
#define EFI_MEMORY_UC 0x0000000000000001ULL
#define EFI_MEMORY_WC 0x0000000000000002ULL
#define EFI_MEMORY_WT 0x0000000000000004ULL
#define EFI_MEMORY_WB 0x0000000000000008ULL
#define EFI_MEMORY_UCE 0x0000000000000010ULL
//
// physical memory protection on range
// Physical memory protection attributes
//
#define EFI_MEMORY_WP 0x0000000000001000ULL
#define EFI_MEMORY_RP 0x0000000000002000ULL
#define EFI_MEMORY_XP 0x0000000000004000ULL
///
/// range requires a runtime mapping
///
//
// Runtime memory attribute
//
#define EFI_MEMORY_RUNTIME 0x8000000000000000ULL
///
/// Memory descriptor version number
///
#define EFI_MEMORY_DESCRIPTOR_VERSION 1
///
/// Definition of memory descriptor
///
typedef struct {
UINT32 Type;
EFI_PHYSICAL_ADDRESS PhysicalStart;
@ -79,8 +84,7 @@ typedef struct {
///
/// Build macros to find next EFI_MEMORY_DESCRIPTOR.
///
#define NextMemoryDescriptor(_Ptr, _Size) ((EFI_MEMORY_DESCRIPTOR *) (((UINT8 *) (_Ptr)) + (_Size)))
#define NEXT_MEMORY_DESCRIPTOR(_Ptr, _Size) NextMemoryDescriptor (_Ptr, _Size)
#define NEXT_MEMORY_DESCRIPTOR(_Ptr, _Size) ((EFI_MEMORY_DESCRIPTOR *) (((UINT8 *) (_Ptr)) + (_Size)))
///
/// Declare forward referenced data structures
@ -137,6 +141,10 @@ EFI_STATUS
Returns the current memory map.
@param MemoryMapSize A pointer to the size, in bytes, of the MemoryMap buffer.
On input, this is the size of the buffer allocated by the caller.
On output, it is the size of the buffer returned by the firmware if
the buffer was large enough, or the size of the buffer needed to contain
the map if the buffer was too small.
@param MemoryMap A pointer to the buffer in which firmware places the current memory
map.
@param MapKey A pointer to the location in which firmware returns the key for the
@ -265,14 +273,20 @@ EFI_STATUS
@param ControllerHandle The handle of the controller from which driver(s) are to be disconnected.
@param DriverImageHandle The driver to disconnect from ControllerHandle.
If DriverImageHandle is NULL, then all the drivers currently managing
ControllerHandle are disconnected from ControllerHandle.
@param ChildHandle The handle of the child to destroy.
If ChildHandle is NULL, then all the children of ControllerHandle are
destroyed before the drivers are disconnected from ControllerHandle.
@retval EFI_SUCCESS 1) One or more drivers were disconnected from the controller.
2) On entry, no drivers are managing ControllerHandle.
3) DriverImageHandle is not NULL, and on entry
DriverImageHandle is not managing ControllerHandle.
@retval EFI_INVALID_PARAMETER One ore more parameters are invalid.
@retval EFI_INVALID_PARAMETER 1) ControllerHandle is not a valid EFI_HANDLE.
2) DriverImageHandle is not NULL, and it is not a valid EFI_HANDLE.
3) ChildHandle is not NULL, and it is not a valid EFI_HANDLE.
4) DriverImageHandle does not support the EFI_DRIVER_BINDING_PROTOCOL.
@retval EFI_OUT_OF_RESOURCES There are not enough resources available to disconnect any drivers from
ControllerHandle.
@retval EFI_DEVICE_ERROR The controller could not be disconnected because of a device error.
@ -357,7 +371,7 @@ VOID
Creates an event.
@param Type The type of event to create and its mode and attributes.
@param NotifyTpl Pointer to the notification function's context.
@param NotifyTpl The task priority level of event notifications, if needed.
@param NotifyFunction Pointer to the event's notification function, if any.
@param NotifyContext Pointer to the notification function's context; corresponds to parameter
Context in the notification function.
@ -383,11 +397,13 @@ EFI_STATUS
Creates an event in a group.
@param Type The type of event to create and its mode and attributes.
@param NotifyTpl Pointer to the notification function's context.
@param NotifyTpl The task priority level of event notifications,if needed.
@param NotifyFunction Pointer to the event's notification function, if any.
@param NotifyContext Pointer to the notification function's context; corresponds to parameter
Context in the notification function.
@param EventGroup Pointer to the unique identifier of the group to which this event belongs.
If this is NULL, then the function behaves as if the parameters were passed
to CreateEvent.
@param Event Pointer to the newly created event if the call succeeds; undefined
otherwise.
@ -400,13 +416,16 @@ typedef
EFI_STATUS
(EFIAPI *EFI_CREATE_EVENT_EX)(
IN UINT32 Type,
IN EFI_TPL NotifyTpl OPTIONAL,
IN EFI_TPL NotifyTpl,
IN EFI_EVENT_NOTIFY NotifyFunction OPTIONAL,
IN CONST VOID *NotifyContext OPTIONAL,
IN CONST EFI_GUID *EventGroup OPTIONAL,
OUT EFI_EVENT *Event
);
///
/// Timer delay types
///
typedef enum {
TimerCancel,
TimerPeriodic,
@ -419,6 +438,11 @@ typedef enum {
@param Event The timer event that is to be signaled at the specified time.
@param Type The type of time that is specified in TriggerTime.
@param TriggerTime The number of 100ns units until the timer expires.
A TriggerTime of 0 is legal.
If Type is TimerRelative and TriggerTime is 0, then the timer
event will be signaled on the next timer tick.
If Type is TimerPeriodic and TriggerTime is 0, then the timer
event will be signaled on every timer tick.
@retval EFI_SUCCESS The event has been set to be signaled at the requested time.
@retval EFI_INVALID_PARAMETER Event or Type is not valid.
@ -500,7 +524,7 @@ EFI_STATUS
//
// Task priority level (name defined in spec).
// Task priority level
//
#define TPL_APPLICATION 4
#define TPL_CALLBACK 8
@ -513,7 +537,7 @@ EFI_STATUS
@param NewTpl The new task priority level.
@retval Previous task priority level
@return Previous task priority level
**/
typedef
@ -525,7 +549,7 @@ EFI_TPL
/**
Restores a task's priority level to its previous value.
@param OldTpl The previous task priority level to restore
@param OldTpl The previous task priority level to restore.
**/
typedef
@ -546,11 +570,15 @@ VOID
On output the size of data returned in Data.
@param Data The buffer to return the contents of the variable.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_NOT_FOUND The variable was not found.
@retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the result.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_NOT_FOUND The variable was not found.
@retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the result.
@retval EFI_INVALID_PARAMETER VariableName is NULL.
@retval EFI_INVALID_PARAMETER VendorGuid is NULL.
@retval EFI_INVALID_PARAMETER DataSize is NULL.
@retval EFI_INVALID_PARAMETER The DataSize is not too small and Data is NULL.
@retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.
@retval EFI_SECURITY_VIOLATION The variable could not be retrieved due to an authentication failure.
**/
typedef
@ -577,7 +605,9 @@ EFI_STATUS
@retval EFI_SUCCESS The function completed successfully.
@retval EFI_NOT_FOUND The next variable was not found.
@retval EFI_BUFFER_TOO_SMALL The VariableNameSize is too small for the result.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_INVALID_PARAMETER VariableNameSize is NULL.
@retval EFI_INVALID_PARAMETER VariableName is NULL.
@retval EFI_INVALID_PARAMETER VendorGuid is NULL.
@retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.
**/
@ -599,12 +629,17 @@ EFI_STATUS
@param DataSize The size in bytes of the Data buffer.
@param Data The contents for the variable.
@retval EFI_SUCCESS The firmware has successfully stored the variable and its data as
defined by the Attributes.
@retval EFI_WRITE_PROTECTED The variable in question is read-only.
@retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.
@retval EFI_SUCCESS The firmware has successfully stored the variable and its data as
defined by the Attributes.
@retval EFI_INVALID_PARAMETER An invalid combination of attribute bits was supplied, or the
DataSize exceeds the maximum allowed.
@retval EFI_INVALID_PARAMETER VariableName is an empty Unicode string.
@retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data.
@retval EFI_DEVICE_ERROR The variable could not be retrieved due to a hardware error.
@retval EFI_WRITE_PROTECTED The variable in question is read-only.
@retval EFI_WRITE_PROTECTED The variable in question cannot be deleted.
@retval EFI_SECURITY_VIOLATION The variable could not be retrieved due to an authentication failure.
@retval EFI_NOT_FOUND The variable trying to be updated or deleted was not found.
**/
typedef
@ -618,10 +653,10 @@ EFI_STATUS
);
//
// This provides the capabilities of the
// real time clock device as exposed through the EFI interfaces.
//
///
/// This provides the capabilities of the
/// real time clock device as exposed through the EFI interfaces.
///
typedef struct {
UINT32 Resolution;
UINT32 Accuracy;
@ -672,8 +707,11 @@ EFI_STATUS
@param Time The current alarm setting.
@retval EFI_SUCCESS The alarm settings were returned.
@retval EFI_INVALID_PARAMETER Any parameter is NULL.
@retval EFI_INVALID_PARAMETER Enabled is NULL.
@retval EFI_INVALID_PARAMETER Pending is NULL.
@retval EFI_INVALID_PARAMETER Time is NULL.
@retval EFI_DEVICE_ERROR The wakeup time could not be retrieved due to a hardware error.
@retval EFI_UNSUPPORTED A wakeup timer is not supported on this platform.
**/
typedef
@ -689,6 +727,7 @@ EFI_STATUS
@param Enabled Enable or disable the wakeup alarm.
@param Time If Enable is TRUE, the time to set the wakeup alarm for.
If Enable is FALSE, then this parameter is optional, and may be NULL.
@retval EFI_SUCCESS If Enable is TRUE, then the wakeup alarm was enabled. If
Enable is FALSE, then the wakeup alarm was disabled.
@ -705,13 +744,15 @@ EFI_STATUS
);
/**
This is the declaration of an EFI image entry point. This can be the entry point to an application
written to this specification, an EFI boot service driver, or an EFI runtime driver.
This is the declaration of an EFI image entry point. This entry point is
the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including
both device drivers and bus drivers.
@param ImageHandle Handle that identifies the loaded image.
@param SystemTable System Table for this image.
@param ImageHandle The firmware allocated handle for the UEFI image.
@param SystemTable A pointer to the EFI System Table.
@retval EFI_SUCCESS The operation completed successfully.
@retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources.
**/
typedef
@ -729,16 +770,16 @@ EFI_STATUS
FilePath as a boot selection. Ignored if SourceBuffer is
not NULL.
@param ParentImageHandle The caller's image handle.
@param FilePath The DeviceHandle specific file path from which the image is
@param DevicePath The DeviceHandle specific file path from which the image is
loaded.
@param SourceBuffer If not NULL, a pointer to the memory location containing a copy
of the image to be loaded.
@param SourceSize The size in bytes of SourceBuffer.
@param SourceSize The size in bytes of SourceBuffer. Ignored if SourceBuffer is NULL.
@param ImageHandle Pointer to the returned image handle that is created when the
image is successfully loaded.
@retval EFI_SUCCESS Image was loaded into memory correctly.
@retval EFI_NOT_FOUND Both SourceBuffer and FilePath are NULL.
@retval EFI_NOT_FOUND Both SourceBuffer and DevicePath are NULL.
@retval EFI_INVALID_PARAMETER One or more parametes are invalid.
@retval EFI_UNSUPPORTED The image type is not supported.
@retval EFI_OUT_OF_RESOURCES Image was not loaded due to insufficient resources.
@ -752,7 +793,7 @@ EFI_STATUS
(EFIAPI *EFI_IMAGE_LOAD)(
IN BOOLEAN BootPolicy,
IN EFI_HANDLE ParentImageHandle,
IN EFI_DEVICE_PATH_PROTOCOL *FilePath,
IN EFI_DEVICE_PATH_PROTOCOL *DevicePath,
IN VOID *SourceBuffer OPTIONAL,
IN UINTN SourceSize,
OUT EFI_HANDLE *ImageHandle
@ -768,7 +809,7 @@ EFI_STATUS
@retval EFI_INVALID_PARAMETER ImageHandle is either an invalid image handle or the image
has already been initialized with StartImage
@retval Exit code from image Exit code from image
@return Exit code from image
**/
typedef
@ -811,7 +852,7 @@ EFI_STATUS
@retval EFI_SUCCESS The image has been unloaded.
@retval EFI_INVALID_PARAMETER ImageHandle is not a valid image handle.
@retval EFI_UNSUPPORTED The image has been started, and does not support unload.
@retval Exit code from the image's unload handler
@return Exit code from the image's unload handler
**/
typedef
@ -877,9 +918,9 @@ EFI_STATUS
IN CHAR16 *WatchdogData OPTIONAL
);
//
// Enumeration of reset types.
//
///
/// Enumeration of reset types.
///
typedef enum {
EfiResetCold,
EfiResetWarm,
@ -949,7 +990,9 @@ EFI_STATUS
@retval EFI_SUCCESS The 32-bit CRC was computed for the data buffer and returned in
Crc32.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_INVALID_PARAMETER Data is NULL.
@retval EFI_INVALID_PARAMETER Crc32 is NULL.
@retval EFI_INVALID_PARAMETER DataSize is 0.
**/
typedef
@ -1014,7 +1057,10 @@ typedef enum {
@retval EFI_SUCCESS The protocol interface was installed.
@retval EFI_OUT_OF_RESOURCES Space for a new handle could not be allocated.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_INVALID_PARAMETER Handle is NULL.
@retval EFI_INVALID_PARAMETER Protocol is NULL.
@retval EFI_INVALID_PARAMETER InterfaceType is not EFI_NATIVE_INTERFACE.
@retval EFI_INVALID_PARAMETER Protocol is already installed on the handle specified by Handle.
**/
typedef
@ -1061,7 +1107,8 @@ EFI_STATUS
@retval EFI_ACCESS_DENIED The protocol interface could not be reinstalled,
because OldInterface is still being used by a
driver that will not release it.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_INVALID_PARAMETER Handle is not a valid EFI_HANDLE.
@retval EFI_INVALID_PARAMETER Protocol is NULL.
**/
typedef
@ -1086,7 +1133,8 @@ EFI_STATUS
@retval EFI_NOT_FOUND The interface was not found.
@retval EFI_ACCESS_DENIED The interface was not removed because the interface
is still being used by a driver.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_INVALID_PARAMETER Handle is not a valid EFI_HANDLE.
@retval EFI_INVALID_PARAMETER Protocol is NULL.
**/
typedef
@ -1122,9 +1170,12 @@ EFI_STATUS
@param Protocol The published unique identifier of the protocol.
@param Interface Supplies the address where a pointer to the corresponding Protocol
Interface is returned.
@retval EFI_SUCCESS The interface information for the specified protocol was returned.
@retval EFI_UNSUPPORTED The device does not support the specified protocol.
@retval EFI_INVALID_PARAMETER One of the protocol interfaces was not previously installed on Handle.
@retval EFI_INVALID_PARAMETER Handle is not a valid EFI_HANDLE.
@retval EFI_INVALID_PARAMETER Protocol is NULL.
@retval EFI_INVALID_PARAMETER Interface is NULL.
**/
typedef
@ -1174,9 +1225,9 @@ EFI_STATUS
(EFIAPI *EFI_OPEN_PROTOCOL)(
IN EFI_HANDLE Handle,
IN EFI_GUID *Protocol,
OUT VOID **Interface,
OUT VOID **Interface, OPTIONAL
IN EFI_HANDLE AgentHandle,
IN EFI_HANDLE ControllerHandle, OPTIONAL
IN EFI_HANDLE ControllerHandle,
IN UINT32 Attributes
);
@ -1187,15 +1238,16 @@ EFI_STATUS
@param Handle The handle for the protocol interface that was previously opened
with OpenProtocol(), and is now being closed.
@param Protocol The published unique identifier of the protocol.
@param Interface Supplies the address where a pointer to the corresponding Protocol
Interface is returned.
@param AgentHandle The handle of the agent that is closing the protocol interface.
@param ControllerHandle If the agent that opened a protocol is a driver that follows the
UEFI Driver Model, then this parameter is the controller handle
that required the protocol interface.
@retval EFI_SUCCESS The protocol instance was closed.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_INVALID_PARAMETER 1) Handle is not a valid EFI_HANDLE.
2) AgentHandle is not a valid EFI_HANDLE.
3) ControllerHandle is not NULL and ControllerHandle is not a valid EFI_HANDLE.
4) Protocol is NULL.
@retval EFI_NOT_FOUND 1) Handle does not support the protocol specified by Protocol.
2) The protocol interface specified by Handle and Protocol is not
currently open by AgentHandle and ControllerHandle.
@ -1238,7 +1290,7 @@ EFI_STATUS
(EFIAPI *EFI_OPEN_PROTOCOL_INFORMATION)(
IN EFI_HANDLE Handle,
IN EFI_GUID *Protocol,
IN EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,
OUT EFI_OPEN_PROTOCOL_INFORMATION_ENTRY **EntryBuffer,
OUT UINTN *EntryCount
);
@ -1257,7 +1309,10 @@ EFI_STATUS
ProtocolBuffer. The number of protocol interface GUIDs was
returned in ProtocolBufferCount.
@retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the results.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_INVALID_PARAMETER Handle is NULL.
@retval EFI_INVALID_PARAMETER Handle is not a valid EFI_HANDLE.
@retval EFI_INVALID_PARAMETER ProtocolBuffer is NULL.
@retval EFI_INVALID_PARAMETER ProtocolBufferCount is NULL.
**/
typedef
@ -1278,7 +1333,9 @@ EFI_STATUS
@retval EFI_SUCCESS The notification event has been registered.
@retval EFI_OUT_OF_RESOURCES Space for the notification event could not be allocated.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_INVALID_PARAMETER Protocol is NULL.
@retval EFI_INVALID_PARAMETER Event is NULL.
@retval EFI_INVALID_PARAMETER Registration is NULL.
**/
typedef
@ -1311,7 +1368,11 @@ typedef enum {
@retval EFI_SUCCESS The array of handles was returned.
@retval EFI_NOT_FOUND No handles match the search.
@retval EFI_BUFFER_TOO_SMALL The BufferSize is too small for the result.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_INVALID_PARAMETER SearchType is not a member of EFI_LOCATE_SEARCH_TYPE.
@retval EFI_INVALID_PARAMETER SearchType is ByRegisterNotify and SearchKey is NULL.
@retval EFI_INVALID_PARAMETER SearchType is ByProtocol and Protocol is NULL.
@retval EFI_INVALID_PARAMETER One or more matches are found and BufferSize is NULL.
@retval EFI_INVALID_PARAMETER BufferSize is large enough for the result and Buffer is NULL.
**/
typedef
@ -1335,7 +1396,9 @@ EFI_STATUS
@retval EFI_SUCCESS The resulting handle was returned.
@retval EFI_NOT_FOUND No handles match the search.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_INVALID_PARAMETER Protocol is NULL.
@retval EFI_INVALID_PARAMETER DevicePath is NULL.
@retval EFI_INVALID_PARAMETER A handle matched the search and Device is NULL.
**/
typedef
@ -1371,7 +1434,8 @@ EFI_STATUS
Returns an array of handles that support the requested protocol in a buffer allocated from pool.
@param SearchType Specifies which handle(s) are to be returned.
@param Protocol Specifies the protocol to search by.
@param Protocol Provides the protocol to search by.
This parameter is only valid for a SearchType of ByProtocol.
@param SearchKey Supplies the search key depending on the SearchType.
@param NoHandles The number of handles returned in Buffer.
@param Buffer A pointer to the buffer to return the requested array of handles that
@ -1381,7 +1445,8 @@ EFI_STATUS
handles in Buffer was returned in NoHandles.
@retval EFI_NOT_FOUND No handles match the search.
@retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the matching results.
@retval EFI_INVALID_PARAMETER One or more parameters are invalid.
@retval EFI_INVALID_PARAMETER NoHandles is NULL.
@retval EFI_INVALID_PARAMETER Buffer is NULL.
**/
typedef
@ -1433,6 +1498,11 @@ typedef struct {
UINT32 CapsuleImageSize;
} EFI_CAPSULE_HEADER;
//
// The EFI System Table entry must point to an array of capsules
// that contain the same CapsuleGuid value. The array must be
// prefixed by a UINT32 that represents the size of the array of capsules.
//
typedef struct {
UINT32 CapsuleArrayNumber;
VOID* CapsulePtr[1];
@ -1461,6 +1531,8 @@ typedef struct {
capsule has been successfully processed by the firmware.
@retval EFI_DEVICE_ERROR The capsule update was started, but failed due to a device error.
@retval EFI_INVALID_PARAMETER CapsuleSize is NULL.
@retval EFI_UNSUPPORTED The capsule type is not supported on this platform.
@retval EFI_OUT_OF_RESOURCES There were insufficient resources to process the capsule.
**/
typedef
@ -1487,6 +1559,7 @@ EFI_STATUS
@retval EFI_UNSUPPORTED The capsule type is not supported on this platform, and
MaximumCapsuleSize and ResetType are undefined.
@retval EFI_INVALID_PARAMETER MaximumCapsuleSize is NULL.
@retval EFI_OUT_OF_RESOURCES There were insufficient resources to process the query request.
**/
typedef
@ -1543,7 +1616,13 @@ EFI_STATUS
#define EFI_RUNTIME_SERVICES_SIGNATURE 0x56524553544e5552ULL
#define EFI_RUNTIME_SERVICES_REVISION EFI_2_10_SYSTEM_TABLE_REVISION
///
/// EFI Runtime Services Table
///
typedef struct {
///
/// The table header for the EFI Runtime Services Table.
///
EFI_TABLE_HEADER Hdr;
//
@ -1589,7 +1668,13 @@ typedef struct {
#define EFI_BOOT_SERVICES_SIGNATURE 0x56524553544f4f42ULL
#define EFI_BOOT_SERVICES_REVISION EFI_2_10_SYSTEM_TABLE_REVISION
///
/// EFI Boot Services Table
///
typedef struct {
///
/// The table header for the EFI Boot Services Table.
///
EFI_TABLE_HEADER Hdr;
//
@ -1678,32 +1763,85 @@ typedef struct {
//
EFI_COPY_MEM CopyMem;
EFI_SET_MEM SetMem;
EFI_CREATE_EVENT_EX CreateEventEx;
} EFI_BOOT_SERVICES;
//
// Contains a set of GUID/pointer pairs comprised of the ConfigurationTable field in the
// EFI System Table.
//
///
/// Contains a set of GUID/pointer pairs comprised of the ConfigurationTable field in the
/// EFI System Table.
///
typedef struct{
///
/// The 128-bit GUID value that uniquely identifies the system configuration table.
///
EFI_GUID VendorGuid;
///
/// A pointer to the table associated with VendorGuid.
///
VOID *VendorTable;
} EFI_CONFIGURATION_TABLE;
///
/// EFI System Table
///
struct _EFI_SYSTEM_TABLE {
///
/// The table header for the EFI System Table.
///
EFI_TABLE_HEADER Hdr;
///
/// A pointer to a null terminated Unicode string that identifies
/// the vendor that produces the system firmware for the platform.
///
CHAR16 *FirmwareVendor;
///
/// A firmware vendor specific value that identifies the revision
/// of the system firmware for the platform.
///
UINT32 FirmwareRevision;
///
/// The handle for the active console input device.
///
EFI_HANDLE ConsoleInHandle;
///
/// A pointer to the SIMPLE_INPUT_PROTOCOL interface that is
/// associated with ConsoleInHandle.
///
EFI_SIMPLE_TEXT_INPUT_PROTOCOL *ConIn;
///
/// The handle for the active console output device.
///
EFI_HANDLE ConsoleOutHandle;
///
/// A pointer to the SIMPLE_TEXT_OUTPUT_PROTOCOL interface
/// that is associated with ConsoleOutHandle.
///
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut;
///
/// The handle for the active standard error console device.
///
EFI_HANDLE StandardErrorHandle;
///
/// A pointer to the SIMPLE_TEXT_OUTPUT_PROTOCOL interface
/// that is associated with StandardErrorHandle.
///
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *StdErr;
///
/// A pointer to the EFI Runtime Services Table.
///
EFI_RUNTIME_SERVICES *RuntimeServices;
///
/// A pointer to the EFI Boot Services Table.
///
EFI_BOOT_SERVICES *BootServices;
///
/// The number of system configuration tables in the buffer ConfigurationTable.
///
UINTN NumberOfTableEntries;
///
/// A pointer to the system configuration tables.
/// The number of entries in the table is NumberOfTableEntries.
///
EFI_CONFIGURATION_TABLE *ConfigurationTable;
};
@ -1733,7 +1871,7 @@ typedef union {
UINT32 SysReqPessed : 1;
UINT32 Reserved : 16;
UINT32 InputKeyCount : 2;
} Options;
} Options;
UINT32 PackedValue;
} HOT_KEY_EFI_KEY_DATA;
@ -1759,7 +1897,6 @@ typedef struct {
#define EFI_REMOVABLE_MEDIA_FILE_NAME_IA32 L"\\EFI\\BOOT\\BOOTIA32.EFI"
#define EFI_REMOVABLE_MEDIA_FILE_NAME_IA64 L"\\EFI\\BOOT\\BOOTIA64.EFI"
#define EFI_REMOVABLE_MEDIA_FILE_NAME_X64 L"\\EFI\\BOOT\\BOOTX64.EFI"
#define EFI_REMOVABLE_MEDIA_FILE_NAME_EBC L"\\EFI\\BOOT\\BOOTEBC.EFI"
#if defined (MDE_CPU_IA32)
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_IA32
@ -1768,7 +1905,6 @@ typedef struct {
#elif defined (MDE_CPU_X64)
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_X64
#elif defined (MDE_CPU_EBC)
#define EFI_REMOVABLE_MEDIA_FILE_NAME EFI_REMOVABLE_MEDIA_FILE_NAME_EBC
#else
#error Unknown Processor Type
#endif

View File

@ -28,8 +28,12 @@
* filesystems, compilation under -mrtd and -mregparm=3, etc.
*/
/* Include the top-level EFI header file */
/* EFI headers rudely redefine NULL */
#undef NULL
/* Include the top-level EFI header files */
#include <gpxe/efi/Uefi.h>
#include <gpxe/efi/PiDxe.h>
/* Reset any trailing #pragma pack directives */
#pragma pack()