Removed tabs and fixed some minor coding style issues. Also fixed typo in EFI_PEI_ENTRY_POINT

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2668 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
AJFISH 2007-06-18 20:28:02 +00:00
parent 00a8a5bfbb
commit 00edb2182b
23 changed files with 886 additions and 885 deletions

View File

@ -20,21 +20,21 @@
#ifndef __PI_BOOT_MODE_H__
#define __PI_BOOT_MODE_H__
typedef UINT32 EFI_BOOT_MODE;
typedef UINT32 EFI_BOOT_MODE;
//
// 0x21 - 0xf..f are reserved.
//
#define BOOT_WITH_FULL_CONFIGURATION 0x00
#define BOOT_WITH_MINIMAL_CONFIGURATION 0x01
#define BOOT_ASSUMING_NO_CONFIGURATION_CHANGES 0x02
#define BOOT_WITH_FULL_CONFIGURATION 0x00
#define BOOT_WITH_MINIMAL_CONFIGURATION 0x01
#define BOOT_ASSUMING_NO_CONFIGURATION_CHANGES 0x02
#define BOOT_WITH_FULL_CONFIGURATION_PLUS_DIAGNOSTICS 0x03
#define BOOT_WITH_DEFAULT_SETTINGS 0x04
#define BOOT_ON_S4_RESUME 0x05
#define BOOT_ON_S5_RESUME 0x06
#define BOOT_ON_S2_RESUME 0x10
#define BOOT_ON_S3_RESUME 0x11
#define BOOT_ON_FLASH_UPDATE 0x12
#define BOOT_IN_RECOVERY_MODE 0x20
#define BOOT_WITH_DEFAULT_SETTINGS 0x04
#define BOOT_ON_S4_RESUME 0x05
#define BOOT_ON_S5_RESUME 0x06
#define BOOT_ON_S2_RESUME 0x10
#define BOOT_ON_S3_RESUME 0x11
#define BOOT_ON_FLASH_UPDATE 0x12
#define BOOT_IN_RECOVERY_MODE 0x20
#endif

View File

@ -190,7 +190,6 @@ EFI_STATUS
**/
typedef
EFI_STATUS
(EFIAPI *EFI_SET_MEMORY_SPACE_ATTRIBUTES) (
IN EFI_PHYSICAL_ADDRESS BaseAddress,
@ -351,7 +350,9 @@ EFI_STATUS
**/
typedef
EFI_STATUS
(EFIAPI *EFI_DISPATCH) (VOID)
(EFIAPI *EFI_DISPATCH) (
VOID
)
;
/**
@ -410,8 +411,8 @@ EFI_STATUS
//
// DXE Services Table
//
#define DXE_SERVICES_SIGNATURE 0x565245535f455844
#define DXE_SERVICES_REVISION ((1<<16) | (00)
#define DXE_SERVICES_SIGNATURE 0x565245535f455844
#define DXE_SERVICES_REVISION ((1<<16) | (00)
typedef struct {
EFI_TABLE_HEADER Hdr;

View File

@ -119,9 +119,9 @@ typedef EFI_COMMON_SECTION_HEADER EFI_COMPATIBILITY16_SECTION;
// section data is compressed.
//
typedef struct {
EFI_COMMON_SECTION_HEADER CommonHeader;
UINT32 UncompressedLength;
UINT8 CompressionType;
EFI_COMMON_SECTION_HEADER CommonHeader;
UINT32 UncompressedLength;
UINT8 CompressionType;
} EFI_COMPRESSION_SECTION;
//
@ -138,8 +138,8 @@ typedef EFI_COMMON_SECTION_HEADER EFI_FIRMWARE_VOLUME_IMAGE_SECTION;
// Leaf section which contains a single GUID.
//
typedef struct {
EFI_COMMON_SECTION_HEADER CommonHeader;
EFI_GUID SubTypeGuid;
EFI_COMMON_SECTION_HEADER CommonHeader;
EFI_GUID SubTypeGuid;
} EFI_FREEFORM_SUBTYPE_GUID_SECTION;
//
@ -151,10 +151,10 @@ typedef struct {
// Leaf section which is encapsulation defined by specific GUID
//
typedef struct {
EFI_COMMON_SECTION_HEADER CommonHeader;
EFI_GUID SectionDefinitionGuid;
UINT16 DataOffset;
UINT16 Attributes;
EFI_COMMON_SECTION_HEADER CommonHeader;
EFI_GUID SectionDefinitionGuid;
UINT16 DataOffset;
UINT16 Attributes;
} EFI_GUID_DEFINED_SECTION;
//
@ -183,12 +183,12 @@ typedef EFI_COMMON_SECTION_HEADER EFI_RAW_SECTION;
// is human readable file name.
//
typedef struct {
EFI_COMMON_SECTION_HEADER CommonHeader;
EFI_COMMON_SECTION_HEADER CommonHeader;
//
// Array of unicode string.
//
CHAR16 FileNameString[1];
CHAR16 FileNameString[1];
} EFI_USER_INTERFACE_SECTION;
@ -197,9 +197,9 @@ typedef struct {
// an optional unicode string that represent the file revision.
//
typedef struct {
EFI_COMMON_SECTION_HEADER CommonHeader;
UINT16 BuildNumber;
CHAR16 VersionString[1];
EFI_COMMON_SECTION_HEADER CommonHeader;
UINT16 BuildNumber;
CHAR16 VersionString[1];
} EFI_VERSION_SECTION;
#endif

View File

@ -23,16 +23,16 @@
//
// EFI_FV_FILE_ATTRIBUTES
//
typedef UINT32 EFI_FV_FILE_ATTRIBUTES;
typedef UINT32 EFI_FV_FILE_ATTRIBUTES;
//
// Value of EFI_FV_FILE_ATTRIBUTES.
//
#define EFI_FV_FILE_ATTRIB_ALIGNMENT 0x0000001F
#define EFI_FV_FILE_ATTRIB_FIXED 0x00000100
#define EFI_FV_FILE_ATTRIB_MEMORY_MAPPED 0x00000200
#define EFI_FV_FILE_ATTRIB_ALIGNMENT 0x0000001F
#define EFI_FV_FILE_ATTRIB_FIXED 0x00000100
#define EFI_FV_FILE_ATTRIB_MEMORY_MAPPED 0x00000200
typedef UINT32 EFI_FVB_ATTRIBUTES;
typedef UINT32 EFI_FVB_ATTRIBUTES;
//
// Attributes bit definitions
@ -96,16 +96,16 @@ typedef struct {
// Describes the features and layout of the firmware volume.
//
typedef struct {
UINT8 ZeroVector[16];
EFI_GUID FileSystemGuid;
UINT64 FvLength;
UINT32 Signature;
EFI_FVB_ATTRIBUTES Attributes;
UINT16 HeaderLength;
UINT16 Checksum;
UINT16 ExtHeaderOffset;
UINT8 Reserved[1];
UINT8 Revision;
UINT8 ZeroVector[16];
EFI_GUID FileSystemGuid;
UINT64 FvLength;
UINT32 Signature;
EFI_FVB_ATTRIBUTES Attributes;
UINT16 HeaderLength;
UINT16 Checksum;
UINT16 ExtHeaderOffset;
UINT8 Reserved[1];
UINT8 Revision;
EFI_FV_BLOCK_MAP_ENTRY BlockMap[1];
} EFI_FIRMWARE_VOLUME_HEADER;

View File

@ -1,19 +1,19 @@
/* @file
HOB related definitions in PI.
HOB related definitions in PI.
Copyright (c) 2006 - 2007, 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
http://opensource.org/licenses/bsd-license.php
Copyright (c) 2006 - 2007, 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
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name: PiHob.h
Module Name: PiHob.h
@par Revision Reference:
Version 1.0.
@par Revision Reference:
Version 1.0.
**/
@ -23,26 +23,26 @@
//
// HobType of EFI_HOB_GENERIC_HEADER.
//
#define EFI_HOB_TYPE_HANDOFF 0x0001
#define EFI_HOB_TYPE_MEMORY_ALLOCATION 0x0002
#define EFI_HOB_TYPE_RESOURCE_DESCRIPTOR 0x0003
#define EFI_HOB_TYPE_GUID_EXTENSION 0x0004
#define EFI_HOB_TYPE_FV 0x0005
#define EFI_HOB_TYPE_CPU 0x0006
#define EFI_HOB_TYPE_MEMORY_POOL 0x0007
#define EFI_HOB_TYPE_FV2 0x0009
#define EFI_HOB_TYPE_LOAD_PEIM 0x000A
#define EFI_HOB_TYPE_UNUSED 0xFFFE
#define EFI_HOB_TYPE_END_OF_HOB_LIST 0xFFFF
#define EFI_HOB_TYPE_HANDOFF 0x0001
#define EFI_HOB_TYPE_MEMORY_ALLOCATION 0x0002
#define EFI_HOB_TYPE_RESOURCE_DESCRIPTOR 0x0003
#define EFI_HOB_TYPE_GUID_EXTENSION 0x0004
#define EFI_HOB_TYPE_FV 0x0005
#define EFI_HOB_TYPE_CPU 0x0006
#define EFI_HOB_TYPE_MEMORY_POOL 0x0007
#define EFI_HOB_TYPE_FV2 0x0009
#define EFI_HOB_TYPE_LOAD_PEIM 0x000A
#define EFI_HOB_TYPE_UNUSED 0xFFFE
#define EFI_HOB_TYPE_END_OF_HOB_LIST 0xFFFF
//
// Describes the format and size of the data inside the HOB.
// All HOBs must contain this generic HOB header.
//
typedef struct _EFI_HOB_GENERIC_HEADER {
UINT16 HobType;
UINT16 HobLength;
UINT32 Reserved;
typedef struct {
UINT16 HobType;
UINT16 HobLength;
UINT32 Reserved;
} EFI_HOB_GENERIC_HEADER;
@ -54,28 +54,28 @@ typedef struct _EFI_HOB_GENERIC_HEADER {
// Contains general state information used by the HOB producer phase.
// This HOB must be the first one in the HOB list.
//
typedef struct _EFI_HOB_HANDOFF_INFO_TABLE {
EFI_HOB_GENERIC_HEADER Header;
UINT32 Version;
EFI_BOOT_MODE BootMode;
EFI_PHYSICAL_ADDRESS EfiMemoryTop;
EFI_PHYSICAL_ADDRESS EfiMemoryBottom;
EFI_PHYSICAL_ADDRESS EfiFreeMemoryTop;
EFI_PHYSICAL_ADDRESS EfiFreeMemoryBottom;
EFI_PHYSICAL_ADDRESS EfiEndOfHobList;
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
UINT32 Version;
EFI_BOOT_MODE BootMode;
EFI_PHYSICAL_ADDRESS EfiMemoryTop;
EFI_PHYSICAL_ADDRESS EfiMemoryBottom;
EFI_PHYSICAL_ADDRESS EfiFreeMemoryTop;
EFI_PHYSICAL_ADDRESS EfiFreeMemoryBottom;
EFI_PHYSICAL_ADDRESS EfiEndOfHobList;
} EFI_HOB_HANDOFF_INFO_TABLE;
typedef struct _EFI_HOB_MEMORY_ALLOCATION_HEADER {
EFI_GUID Name;
EFI_PHYSICAL_ADDRESS MemoryBaseAddress;
UINT64 MemoryLength;
EFI_MEMORY_TYPE MemoryType;
typedef struct {
EFI_GUID Name;
EFI_PHYSICAL_ADDRESS MemoryBaseAddress;
UINT64 MemoryLength;
EFI_MEMORY_TYPE MemoryType;
//
// Padding for Itanium processor family
//
UINT8 Reserved[4];
//
// Padding for Itanium processor family
//
UINT8 Reserved[4];
} EFI_HOB_MEMORY_ALLOCATION_HEADER;
//
@ -84,13 +84,13 @@ typedef struct _EFI_HOB_MEMORY_ALLOCATION_HEADER {
// describes how memory is used,
// not the physical attributes of memory.
//
typedef struct _EFI_HOB_MEMORY_ALLOCATION {
EFI_HOB_GENERIC_HEADER Header;
EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor;
//
// Additional data pertaining to the ¡°Name¡± Guid memory
// may go here.
//
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor;
//
// Additional data pertaining to the ¡°Name¡± Guid memory
// may go here.
//
} EFI_HOB_MEMORY_ALLOCATION;
@ -99,9 +99,9 @@ typedef struct _EFI_HOB_MEMORY_ALLOCATION {
// phase and upon which all postmemory-installed executable
// content in the HOB producer phase is executing.
//
typedef struct _EFI_HOB_MEMORY_ALLOCATION_STACK {
EFI_HOB_GENERIC_HEADER Header;
EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor;
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor;
} EFI_HOB_MEMORY_ALLOCATION_STACK;
//
@ -110,19 +110,19 @@ typedef struct _EFI_HOB_MEMORY_ALLOCATION_STACK {
// This HOB is valid for the Itanium processor family only
// register overflow store.
//
typedef struct _EFI_HOB_MEMORY_ALLOCATION_BSP_STORE {
EFI_HOB_GENERIC_HEADER Header;
EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor;
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor;
} EFI_HOB_MEMORY_ALLOCATION_BSP_STORE;
//
// Defines the location and entry point of the HOB consumer phase.
//
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
EFI_HOB_MEMORY_ALLOCATION_HEADER MemoryAllocationHeader;
EFI_GUID ModuleName;
EFI_PHYSICAL_ADDRESS EntryPoint;
EFI_HOB_GENERIC_HEADER Header;
EFI_HOB_MEMORY_ALLOCATION_HEADER MemoryAllocationHeader;
EFI_GUID ModuleName;
EFI_PHYSICAL_ADDRESS EntryPoint;
} EFI_HOB_MEMORY_ALLOCATION_MODULE;
typedef UINT32 EFI_RESOURCE_TYPE;
@ -130,14 +130,14 @@ typedef UINT32 EFI_RESOURCE_TYPE;
//
// Value of ResourceType in EFI_HOB_RESOURCE_DESCRIPTOR.
//
#define EFI_RESOURCE_SYSTEM_MEMORY 0x00000000
#define EFI_RESOURCE_MEMORY_MAPPED_IO 0x00000001
#define EFI_RESOURCE_IO 0x00000002
#define EFI_RESOURCE_FIRMWARE_DEVICE 0x00000003
#define EFI_RESOURCE_MEMORY_MAPPED_IO_PORT 0x00000004
#define EFI_RESOURCE_MEMORY_RESERVED 0x00000005
#define EFI_RESOURCE_IO_RESERVED 0x00000006
#define EFI_RESOURCE_MAX_MEMORY_TYPE 0x00000007
#define EFI_RESOURCE_SYSTEM_MEMORY 0x00000000
#define EFI_RESOURCE_MEMORY_MAPPED_IO 0x00000001
#define EFI_RESOURCE_IO 0x00000002
#define EFI_RESOURCE_FIRMWARE_DEVICE 0x00000003
#define EFI_RESOURCE_MEMORY_MAPPED_IO_PORT 0x00000004
#define EFI_RESOURCE_MEMORY_RESERVED 0x00000005
#define EFI_RESOURCE_IO_RESERVED 0x00000006
#define EFI_RESOURCE_MAX_MEMORY_TYPE 0x00000007
typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
@ -147,62 +147,62 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
//
// The first three enumerations describe settings
//
#define EFI_RESOURCE_ATTRIBUTE_PRESENT 0x00000001
#define EFI_RESOURCE_ATTRIBUTE_INITIALIZED 0x00000002
#define EFI_RESOURCE_ATTRIBUTE_TESTED 0x00000004
#define EFI_RESOURCE_ATTRIBUTE_PRESENT 0x00000001
#define EFI_RESOURCE_ATTRIBUTE_INITIALIZED 0x00000002
#define EFI_RESOURCE_ATTRIBUTE_TESTED 0x00000004
//
// The rest of the settings describe capabilities
//
#define EFI_RESOURCE_ATTRIBUTE_SINGLE_BIT_ECC 0x00000008
#define EFI_RESOURCE_ATTRIBUTE_MULTIPLE_BIT_ECC 0x00000010
#define EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_1 0x00000020
#define EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_2 0x00000040
#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED 0x00000080
#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED 0x00000100
#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED 0x00000200
#define EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE 0x00000400
#define EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE 0x00000800
#define EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE 0x00001000
#define EFI_RESOURCE_ATTRIBUTE_SINGLE_BIT_ECC 0x00000008
#define EFI_RESOURCE_ATTRIBUTE_MULTIPLE_BIT_ECC 0x00000010
#define EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_1 0x00000020
#define EFI_RESOURCE_ATTRIBUTE_ECC_RESERVED_2 0x00000040
#define EFI_RESOURCE_ATTRIBUTE_READ_PROTECTED 0x00000080
#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED 0x00000100
#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED 0x00000200
#define EFI_RESOURCE_ATTRIBUTE_UNCACHEABLE 0x00000400
#define EFI_RESOURCE_ATTRIBUTE_WRITE_COMBINEABLE 0x00000800
#define EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE 0x00001000
#define EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE 0x00002000
#define EFI_RESOURCE_ATTRIBUTE_16_BIT_IO 0x00004000
#define EFI_RESOURCE_ATTRIBUTE_32_BIT_IO 0x00008000
#define EFI_RESOURCE_ATTRIBUTE_64_BIT_IO 0x00010000
#define EFI_RESOURCE_ATTRIBUTE_UNCACHED_EXPORTED 0x00020000
#define EFI_RESOURCE_ATTRIBUTE_16_BIT_IO 0x00004000
#define EFI_RESOURCE_ATTRIBUTE_32_BIT_IO 0x00008000
#define EFI_RESOURCE_ATTRIBUTE_64_BIT_IO 0x00010000
#define EFI_RESOURCE_ATTRIBUTE_UNCACHED_EXPORTED 0x00020000
//
// Describes the resource properties of all fixed,
// nonrelocatable resource ranges found on the processor
// host bus during the HOB producer phase.
//
typedef struct _EFI_HOB_RESOURCE_DESCRIPTOR {
EFI_HOB_GENERIC_HEADER Header;
EFI_GUID Owner;
EFI_RESOURCE_TYPE ResourceType;
EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute;
EFI_PHYSICAL_ADDRESS PhysicalStart;
UINT64 ResourceLength;
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
EFI_GUID Owner;
EFI_RESOURCE_TYPE ResourceType;
EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute;
EFI_PHYSICAL_ADDRESS PhysicalStart;
UINT64 ResourceLength;
} EFI_HOB_RESOURCE_DESCRIPTOR;
//
// Allows writers of executable content in the HOB producer phase to
// maintain and manage HOBs with specific GUID.
//
typedef struct _EFI_HOB_GUID_TYPE {
EFI_HOB_GENERIC_HEADER Header;
EFI_GUID Name;
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
EFI_GUID Name;
//
// Guid specific data goes here
//
//
// Guid specific data goes here
//
} EFI_HOB_GUID_TYPE;
//
// Details the location of firmware volumes that contain firmware files.
//
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
EFI_PHYSICAL_ADDRESS BaseAddress;
UINT64 Length;
EFI_HOB_GENERIC_HEADER Header;
EFI_PHYSICAL_ADDRESS BaseAddress;
UINT64 Length;
} EFI_HOB_FIRMWARE_VOLUME;
//
@ -210,48 +210,48 @@ typedef struct {
// from a file within another firmware volume.
//
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
EFI_PHYSICAL_ADDRESS BaseAddress;
UINT64 Length;
EFI_GUID FvName;
EFI_GUID FileName;
EFI_HOB_GENERIC_HEADER Header;
EFI_PHYSICAL_ADDRESS BaseAddress;
UINT64 Length;
EFI_GUID FvName;
EFI_GUID FileName;
} EFI_HOB_FIRMWARE_VOLUME2;
//
// Describes processor information, such as address space and I/O space capabilities.
//
typedef struct _EFI_HOB_CPU {
EFI_HOB_GENERIC_HEADER Header;
UINT8 SizeOfMemorySpace;
UINT8 SizeOfIoSpace;
UINT8 Reserved[6];
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
UINT8 SizeOfMemorySpace;
UINT8 SizeOfIoSpace;
UINT8 Reserved[6];
} EFI_HOB_CPU;
//
// Describes pool memory allocations.
//
typedef struct _EFI_HOB_MEMORY_POOL {
EFI_HOB_GENERIC_HEADER Header;
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
} EFI_HOB_MEMORY_POOL;
//
// Union of all the possible HOB Types
//
typedef union {
EFI_HOB_GENERIC_HEADER *Header;
EFI_HOB_HANDOFF_INFO_TABLE *HandoffInformationTable;
EFI_HOB_MEMORY_ALLOCATION *MemoryAllocation;
EFI_HOB_MEMORY_ALLOCATION_BSP_STORE *MemoryAllocationBspStore;
EFI_HOB_MEMORY_ALLOCATION_STACK *MemoryAllocationStack;
EFI_HOB_MEMORY_ALLOCATION_MODULE *MemoryAllocationModule;
EFI_HOB_RESOURCE_DESCRIPTOR *ResourceDescriptor;
EFI_HOB_GUID_TYPE *Guid;
EFI_HOB_FIRMWARE_VOLUME *FirmwareVolume;
EFI_HOB_CPU *Cpu;
EFI_HOB_MEMORY_POOL *Pool;
UINT8 *Raw;
EFI_HOB_GENERIC_HEADER *Header;
EFI_HOB_HANDOFF_INFO_TABLE *HandoffInformationTable;
EFI_HOB_MEMORY_ALLOCATION *MemoryAllocation;
EFI_HOB_MEMORY_ALLOCATION_BSP_STORE *MemoryAllocationBspStore;
EFI_HOB_MEMORY_ALLOCATION_STACK *MemoryAllocationStack;
EFI_HOB_MEMORY_ALLOCATION_MODULE *MemoryAllocationModule;
EFI_HOB_RESOURCE_DESCRIPTOR *ResourceDescriptor;
EFI_HOB_GUID_TYPE *Guid;
EFI_HOB_FIRMWARE_VOLUME *FirmwareVolume;
EFI_HOB_CPU *Cpu;
EFI_HOB_MEMORY_POOL *Pool;
UINT8 *Raw;
} EFI_PEI_HOB_POINTERS;

View File

@ -32,14 +32,14 @@
//
// Status Code Type Definition
//
typedef UINT32 EFI_STATUS_CODE_TYPE;
typedef UINT32 EFI_STATUS_CODE_TYPE;
//
// A Status Code Type is made up of the code type and severity
// All values masked by EFI_STATUS_CODE_RESERVED_MASK are
// reserved for use by this specification.
//
#define EFI_STATUS_CODE_TYPE_MASK 0x000000FF
#define EFI_STATUS_CODE_TYPE_MASK 0x000000FF
#define EFI_STATUS_CODE_SEVERITY_MASK 0xFF000000
#define EFI_STATUS_CODE_RESERVED_MASK 0x00FFFF00
@ -48,9 +48,9 @@ typedef UINT32 EFI_STATUS_CODE_TYPE;
// EFI_STATUS_CODE_TYPE_MASK are reserved for use by
// this specification.
//
#define EFI_PROGRESS_CODE 0x00000001
#define EFI_ERROR_CODE 0x00000002
#define EFI_DEBUG_CODE 0x00000003
#define EFI_PROGRESS_CODE 0x00000001
#define EFI_ERROR_CODE 0x00000002
#define EFI_DEBUG_CODE 0x00000003
//
// Definitions of severities, all other values masked by
@ -61,10 +61,10 @@ typedef UINT32 EFI_STATUS_CODE_TYPE;
// For example, if a memory error was not detected early enough,
// the bad data could be consumed by other drivers.
//
#define EFI_ERROR_MINOR 0x40000000
#define EFI_ERROR_MAJOR 0x80000000
#define EFI_ERROR_UNRECOVERED 0x90000000
#define EFI_ERROR_UNCONTAINED 0xa0000000
#define EFI_ERROR_MINOR 0x40000000
#define EFI_ERROR_MAJOR 0x80000000
#define EFI_ERROR_UNRECOVERED 0x90000000
#define EFI_ERROR_UNCONTAINED 0xa0000000
//
// Status Code Value Definition
@ -74,18 +74,18 @@ typedef UINT32 EFI_STATUS_CODE_VALUE;
// A Status Code Value is made up of the class, subclass, and
// an operation.
//
#define EFI_STATUS_CODE_CLASS_MASK 0xFF000000
#define EFI_STATUS_CODE_SUBCLASS_MASK 0x00FF0000
#define EFI_STATUS_CODE_OPERATION_MASK 0x0000FFFF
#define EFI_STATUS_CODE_CLASS_MASK 0xFF000000
#define EFI_STATUS_CODE_SUBCLASS_MASK 0x00FF0000
#define EFI_STATUS_CODE_OPERATION_MASK 0x0000FFFF
//
// Definition of Status Code extended data header.
// The data will follow HeaderSize bytes from the beginning of
// the structure and is Size bytes long.
//
typedef struct {
UINT16 HeaderSize;
UINT16 Size;
EFI_GUID Type;
UINT16 HeaderSize;
UINT16 Size;
EFI_GUID Type;
} EFI_STATUS_CODE_DATA;
#endif

View File

@ -28,8 +28,8 @@
//
// Handles of EFI FV/FFS.
//
typedef VOID *EFI_PEI_FV_HANDLE;
typedef VOID *EFI_PEI_FILE_HANDLE;
typedef VOID *EFI_PEI_FV_HANDLE;
typedef VOID *EFI_PEI_FILE_HANDLE;
//
// Declare forward referenced data structures
@ -54,7 +54,7 @@ typedef struct _EFI_PEI_NOTIFY_DESCRIPTOR EFI_PEI_NOTIFY_DESCRIPTOR;
typedef
EFI_STATUS
(EFIAPI *EFI_PEIM_ENTRY_POINT)(
IN EFI_FFS_FILE_HEADER *FfsHeader,
IN EFI_PEI_FILE_HANDLE *FfsHeader,
IN EFI_PEI_SERVICES **PeiServices
);
@ -104,10 +104,10 @@ struct _EFI_PEI_NOTIFY_DESCRIPTOR {
// this HOB is produced and consumed during the HOB producer phase.
//
typedef struct _EFI_HOB_LOAD_PEIM {
EFI_HOB_GENERIC_HEADER Header;
EFI_PEI_FILE_HANDLE FileHandle;
EFI_PEIM_ENTRY_POINT EntryPoint;
EFI_PEIM_ENTRY_POINT InMemEntryPoint;
EFI_HOB_GENERIC_HEADER Header;
EFI_PEI_FILE_HANDLE FileHandle;
EFI_PEIM_ENTRY_POINT EntryPoint;
EFI_PEIM_ENTRY_POINT InMemEntryPoint;
} EFI_HOB_LOAD_PEIM;
@ -499,69 +499,69 @@ EFI_STATUS
/**
This service searches for files with a specific name, within
either the specified firmware volume or all firmware volumes.
The service returns a file handle of type EFI_PEI_FILE_HANDLE,
This service searches for files with a specific name, within
either the specified firmware volume or all firmware volumes.
The service returns a file handle of type EFI_PEI_FILE_HANDLE,
which must be unique within the system.
@param FileName A pointer to the name of the file to
find within the firmware volume.
@param FileName A pointer to the name of the file to
find within the firmware volume.
@param VolumeHandle The firmware volume to search FileHandle
@param VolumeHandle The firmware volume to search FileHandle
Upon exit, points to the found file's
handle or NULL if it could not be found.
@retval EFI_SUCCESS File was found.
@retval EFI_SUCCESS File was found.
@retval EFI_NOT_FOUND File was not found.
@retval EFI_NOT_FOUND File was not found.
@retval EFI_INVALID_PARAMETER VolumeHandle or FileHandle or
FileName was NULL.
@retval EFI_INVALID_PARAMETER VolumeHandle or FileHandle or
FileName was NULL.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_FFS_FIND_BY_NAME) (
IN CONST EFI_GUID *FileName,
IN CONST EFI_PEI_FV_HANDLE VolumeHandle,
OUT EFI_PEI_FILE_HANDLE *FileHandle
);
IN CONST EFI_GUID *FileName,
IN CONST EFI_PEI_FV_HANDLE VolumeHandle,
OUT EFI_PEI_FILE_HANDLE *FileHandle
);
/**
@param FileName Name of the file.
@param FileName Name of the file.
@param FileType File type. See EFI_FV_FILETYPE, which is
@param FileType File type. See EFI_FV_FILETYPE, which is
defined in the Platform Initialization
Firmware Storage Specification.
@param FileAttributes Attributes of the file. Type
@param FileAttributes Attributes of the file. Type
EFI_FV_FILE_ATTRIBUTES is defined in
the Platform Initialization Firmware
Storage Specification.
@param Buffer Points to the file's data (not the header).
@param Buffer Points to the file's data (not the header).
Not valid if EFI_FV_FILE_ATTRIB_MEMORY_MAPPED
is zero.
@param BufferSize Size of the file's data.
@param BufferSize Size of the file's data.
**/
typedef struct {
EFI_GUID FileName;
EFI_FV_FILETYPE FileType;
EFI_FV_FILE_ATTRIBUTES FileAttributes;
VOID *Buffer;
UINT32 BufferSize;
EFI_GUID FileName;
EFI_FV_FILETYPE FileType;
EFI_FV_FILE_ATTRIBUTES FileAttributes;
VOID *Buffer;
UINT32 BufferSize;
} EFI_FV_FILE_INFO;
/**
This function returns information about a specific file,
including its file name, type, attributes, starting address and
size. If the firmware volume is not memory mapped then the
This function returns information about a specific file,
including its file name, type, attributes, starting address and
size. If the firmware volume is not memory mapped then the
Buffer member will be NULL.
@param FileHandle Handle of the file.
@ -569,58 +569,58 @@ typedef struct {
@param FileInfo Upon exit, points to the file¡¯s
information.
@retval EFI_SUCCESS File information returned.
@retval EFI_SUCCESS File information returned.
@retval EFI_INVALID_PARAMETER If FileHandle does not
@retval EFI_INVALID_PARAMETER If FileHandle does not
represent a valid file.
@retval EFI_INVALID_PARAMETER If FileInfo is NULL.
@retval EFI_INVALID_PARAMETER If FileInfo is NULL.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_FFS_GET_FILE_INFO) (
IN CONST EFI_PEI_FILE_HANDLE FileHandle,
OUT EFI_FV_FILE_INFO *FileInfo
);
IN CONST EFI_PEI_FILE_HANDLE FileHandle,
OUT EFI_FV_FILE_INFO *FileInfo
);
/**
@param FvAttributes Attributes of the firmware volume. Type
@param FvAttributes Attributes of the firmware volume. Type
EFI_FVB_ATTRIBUTES is defined in the
Platform Initialization Firmware Storage
Specficiation.
@param FvFormat Format of the firmware volume. For PI
@param FvFormat Format of the firmware volume. For PI
Architecture Firmware Volumes, this can
be copied from FileSystemGuid in
EFI_FIRMWARE_VOLUME_HEADER.
@param FvName Name of the firmware volume. For PI
@param FvName Name of the firmware volume. For PI
Architecture Firmware Volumes, this can
be copied from VolumeName in the
extended header of
EFI_FIRMWARE_VOLUME_HEADER.
@param FvStart Points to the first byte of the firmware
@param FvStart Points to the first byte of the firmware
volume, if bit EFI_FVB_MEMORY_MAPPED is
set in FvAttributes. FvSize Size of the
firmware volume.
**/
typedef struct {
EFI_FVB_ATTRIBUTES FvAttributes;
EFI_GUID FvFormat;
EFI_GUID FvName;
VOID *FvStart;
UINT64 FvSize;
EFI_FVB_ATTRIBUTES FvAttributes;
EFI_GUID FvFormat;
EFI_GUID FvName;
VOID *FvStart;
UINT64 FvSize;
} EFI_FV_INFO;
/**
This function returns information about a specific firmware
volume, including its name, type, attributes, starting address
This function returns information about a specific firmware
volume, including its name, type, attributes, starting address
and size.
@param VolumeHandle Handle of the volume.
@ -628,51 +628,51 @@ typedef struct {
@param VolumeInfo Upon exit, points to the volume¡¯s
information.
@retval EFI_SUCCESS File information returned.
@retval EFI_SUCCESS File information returned.
@retval EFI_INVALID_PARAMETER If FileHandle does not
@retval EFI_INVALID_PARAMETER If FileHandle does not
represent a valid file.
@retval EFI_INVALID_PARAMETER If FileInfo is NULL.
@retval EFI_INVALID_PARAMETER If FileInfo is NULL.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_FFS_GET_VOLUME_INFO) (
IN CONST EFI_PEI_FV_HANDLE *VolumeHandle,
OUT EFI_FV_INFO *VolumeInfo
);
IN CONST EFI_PEI_FV_HANDLE *VolumeHandle,
OUT EFI_FV_INFO *VolumeInfo
);
/**
This service registers a file handle so that after memory is
available, the PEIM will be re-loaded into permanent memory and
re-initialized. The PEIM registered this way will always be
initialized twice. The first time, this function call will
return EFI_SUCCESS. The second time, this function call will
return EFI_ALREADY_STARTED. Depending on the order in which
PEIMs are dispatched, the PEIM making this call may be
initialized after permanent memory is installed, even the first
This service registers a file handle so that after memory is
available, the PEIM will be re-loaded into permanent memory and
re-initialized. The PEIM registered this way will always be
initialized twice. The first time, this function call will
return EFI_SUCCESS. The second time, this function call will
return EFI_ALREADY_STARTED. Depending on the order in which
PEIMs are dispatched, the PEIM making this call may be
initialized after permanent memory is installed, even the first
time.
@param FileHandle PEIM¡¯s file handle. Must be the currently
@param FileHandle PEIM¡¯s file handle. Must be the currently
xecuting PEIM.
@retval EFI_SUCCESS The PEIM was successfully registered for
@retval EFI_SUCCESS The PEIM was successfully registered for
shadowing.
@retval EFI_ALREADY_STARTED The PEIM was previously
@retval EFI_ALREADY_STARTED The PEIM was previously
registered for shadowing.
@retval EFI_NOT_FOUND The FileHandle does not refer to a
valid file handle.
@retval EFI_NOT_FOUND The FileHandle does not refer to a
valid file handle.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_REGISTER_FOR_SHADOW) (
IN CONST EFI_PEI_FILE_HANDLE FileHandle
);
IN CONST EFI_PEI_FILE_HANDLE FileHandle
);
//
@ -684,63 +684,63 @@ EFI_STATUS
//
// PEI Services Table
//
#define PEI_SERVICES_SIGNATURE 0x5652455320494550
#define PEI_SERVICES_REVISION (PEI_SPECIFICATION_MAJOR_REVISION<<16) | (PEI_SPECIFICATION_MINOR_REVISION)
#define PEI_SERVICES_SIGNATURE 0x5652455320494550
#define PEI_SERVICES_REVISION (PEI_SPECIFICATION_MAJOR_REVISION<<16) | (PEI_SPECIFICATION_MINOR_REVISION)
struct EFI_PEI_SERVICES {
EFI_TABLE_HEADER Hdr;
//
// PPI Functions
//
EFI_PEI_INSTALL_PPI InstallPpi;
EFI_PEI_REINSTALL_PPI ReInstallPpi;
EFI_PEI_LOCATE_PPI LocatePpi;
EFI_PEI_NOTIFY_PPI NotifyPpi;
//
// Boot Mode Functions
//
EFI_PEI_GET_BOOT_MODE GetBootMode;
EFI_PEI_SET_BOOT_MODE SetBootMode;
//
// HOB Functions
//
EFI_PEI_GET_HOB_LIST GetHobList;
EFI_PEI_CREATE_HOB CreateHob;
//
// Firmware Volume Functions
//
EFI_PEI_FFS_FIND_NEXT_VOLUME2 FfsFindNextVolume;
EFI_PEI_FFS_FIND_NEXT_FILE2 FfsFindNextFile;
EFI_PEI_FFS_FIND_SECTION_DATA2 FfsFindSectionData;
//
// PEI Memory Functions
//
EFI_PEI_INSTALL_PEI_MEMORY InstallPeiMemory;
EFI_PEI_ALLOCATE_PAGES AllocatePages;
EFI_PEI_ALLOCATE_POOL AllocatePool;
EFI_PEI_COPY_MEM CopyMem;
EFI_PEI_SET_MEM SetMem;
//
// Status Code
EFI_PEI_REPORT_STATUS_CODE ReportStatusCode;
//
// Reset
//
EFI_PEI_RESET_SYSTEM ResetSystem;
//
// (the following interfaces are installed by publishing PEIM)
//
// I/O Abstractions
//
EFI_PEI_CPU_IO_PPI *CpuIo;
EFI_PEI_PCI_CFG2_PPI *PciCfg;
//
// Future Installed Services
EFI_PEI_FFS_FIND_BY_NAME FfsFindFileByName;
EFI_PEI_FFS_GET_FILE_INFO FfsGetFileInfo;
EFI_PEI_FFS_GET_VOLUME_INFO FfsGetVolumeInfo;
EFI_PEI_REGISTER_FOR_SHADOW RegisterForShadow;
} ;
EFI_TABLE_HEADER Hdr;
//
// PPI Functions
//
EFI_PEI_INSTALL_PPI InstallPpi;
EFI_PEI_REINSTALL_PPI ReInstallPpi;
EFI_PEI_LOCATE_PPI LocatePpi;
EFI_PEI_NOTIFY_PPI NotifyPpi;
//
// Boot Mode Functions
//
EFI_PEI_GET_BOOT_MODE GetBootMode;
EFI_PEI_SET_BOOT_MODE SetBootMode;
//
// HOB Functions
//
EFI_PEI_GET_HOB_LIST GetHobList;
EFI_PEI_CREATE_HOB CreateHob;
//
// Firmware Volume Functions
//
EFI_PEI_FFS_FIND_NEXT_VOLUME2 FfsFindNextVolume;
EFI_PEI_FFS_FIND_NEXT_FILE2 FfsFindNextFile;
EFI_PEI_FFS_FIND_SECTION_DATA2 FfsFindSectionData;
//
// PEI Memory Functions
//
EFI_PEI_INSTALL_PEI_MEMORY InstallPeiMemory;
EFI_PEI_ALLOCATE_PAGES AllocatePages;
EFI_PEI_ALLOCATE_POOL AllocatePool;
EFI_PEI_COPY_MEM CopyMem;
EFI_PEI_SET_MEM SetMem;
//
// Status Code
EFI_PEI_REPORT_STATUS_CODE ReportStatusCode;
//
// Reset
//
EFI_PEI_RESET_SYSTEM ResetSystem;
//
// (the following interfaces are installed by publishing PEIM)
//
// I/O Abstractions
//
EFI_PEI_CPU_IO_PPI *CpuIo;
EFI_PEI_PCI_CFG2_PPI *PciCfg;
//
// Future Installed Services
EFI_PEI_FFS_FIND_BY_NAME FfsFindFileByName;
EFI_PEI_FFS_GET_FILE_INFO FfsGetFileInfo;
EFI_PEI_FFS_GET_VOLUME_INFO FfsGetVolumeInfo;
EFI_PEI_REGISTER_FOR_SHADOW RegisterForShadow;
};
typedef struct _EFI_SEC_PEI_HAND_OFF {

View File

@ -21,60 +21,60 @@
#define __DECOMPRESS_PPI_H__
#define EFI_PEI_DECOMPRESS_PPI_GUID \
{ 0x1a36e4e7, 0xfab6, 0x476a, { 0x8e, 0x75, 0x69, 0x5a, 0x5, 0x76, 0xfd, 0xd7 } }
{ 0x1a36e4e7, 0xfab6, 0x476a, { 0x8e, 0x75, 0x69, 0x5a, 0x5, 0x76, 0xfd, 0xd7 } }
typedef struct _EFI_PEI_DECOMPRESS_PPI EFI_PEI_DECOMPRESS_PPI;;
typedef struct _EFI_PEI_DECOMPRESS_PPI EFI_PEI_DECOMPRESS_PPI;;
/**
Decompresses the data in a compressed section and returns it
as a series of standard PI Firmware File Sections. The
required memory is allocated from permanent memory.
@param This Points to this instance of the
EFI_PEI_DECOMPRESS_PEI PPI. InputSection Points to
the compressed section.
@param This Points to this instance of the
EFI_PEI_DECOMPRESS_PEI PPI. InputSection Points to
the compressed section.
@param OutputBuffer Holds the returned pointer to the
decompressed sections.
@param OutputSize Holds the returned size of the decompress
@param OutputSize Holds the returned size of the decompress
section streams.
@retval EFI_SUCCESS The section was decompressed
successfully. OutputBuffer contains the
resulting data and OutputSize contains
the resulting size.
@retval EFI_SUCCESS The section was decompressed
successfully. OutputBuffer contains the
resulting data and OutputSize contains
the resulting size.
@retval EFI_OUT_OF_RESOURCES Unable to allocate sufficient
@retval EFI_OUT_OF_RESOURCES Unable to allocate sufficient
memory to hold the decompressed data.
@retval EFI_UNSUPPORTED The compression type specified
in the compression header is unsupported.
@retval EFI_UNSUPPORTED The compression type specified
in the compression header is unsupported.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_DECOMPRESS_DECOMPRESS)(
IN CONST EFI_PEI_DECOMPRESS_PPI *This,
IN CONST EFI_COMPRESSION_SECTION *InputSection,
OUT VOID **OutputBuffer,
OUT UINTN *OutputSize
IN CONST EFI_PEI_DECOMPRESS_PPI *This,
IN CONST EFI_COMPRESSION_SECTION *InputSection,
OUT VOID **OutputBuffer,
OUT UINTN *OutputSize
);
/**
This PPI¡¯s single member function decompresses a compression
encapsulated section. It is used by the PEI Foundation to
process sectioned files. Prior to the installation of this PPI,
encapsulated section. It is used by the PEI Foundation to
process sectioned files. Prior to the installation of this PPI,
compression sections will be ignored.
@param Decompress Decompress a single compression section in
@param Decompress Decompress a single compression section in
a firmware file.
**/
struct _EFI_PEI_DECOMPRESS_PPI {
EFI_PEI_DECOMPRESS_DECOMPRESS Decompress;
EFI_PEI_DECOMPRESS_DECOMPRESS Decompress;
};
extern EFI_GUID gEfiPeiDecompressPpiGuid;
extern EFI_GUID gEfiPeiDecompressPpiGuid;
#endif

View File

@ -27,7 +27,7 @@
// EFI_FIRMWARE_FILE_SYSTEM2_GUID is the PI Firmware Volume format.
//
typedef struct _EFI_PEI_FIRMWARE_VOLUME_PPI EFI_PEI_FIRMWARE_VOLUME_PPI;
typedef struct _EFI_PEI_FIRMWARE_VOLUME_PPI EFI_PEI_FIRMWARE_VOLUME_PPI;
/**
@ -40,26 +40,26 @@ typedef struct _EFI_PEI_FIRMWARE_VOLUME_PPI EFI_PEI_FIRMWARE_VOLUME_PPI;
from the EFI_FIRMWARE_VOLUME_INFO_PPI.
@param This Points to this instance of the
@param This Points to this instance of the
EFI_PEI_FIRMWARE_VOLUME_PPI
@param Buffer Points to the start of the buffer.
@param BufferSize Size of the buffer.
@param FvHandle Points to the returned firmware volume
@param Buffer Points to the start of the buffer.
@param BufferSize Size of the buffer.
@param FvHandle Points to the returned firmware volume
handle. The firmware volume handle must
be unique within the system.
@retval EFI_SUCCESS Firmware volume handle.
@retval EFI_VOLUME_CORRUPTED Volume was corrupt.
@retval EFI_SUCCESS Firmware volume handle.
@retval EFI_VOLUME_CORRUPTED Volume was corrupt.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_FV_PROCESS_FV) (
IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This,
IN CONST VOID *Buffer,
IN CONST UINTN BufferSize,
OUT EFI_PEI_FV_HANDLE *FvHandle
IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This,
IN CONST VOID *Buffer,
IN CONST UINTN BufferSize,
OUT EFI_PEI_FV_HANDLE *FvHandle
);
@ -73,76 +73,76 @@ EFI_STATUS
from the EFI_FIRMWARE_VOLUME_INFO_PPI.
@param This Points to this instance of the
@param This Points to this instance of the
EFI_PEI_FIRMWARE_VOLUME_PPI
@param Buffer Points to the start of the buffer.
@param BufferSize Size of the buffer.
@param FvHandle Points to the returned firmware volume
@param Buffer Points to the start of the buffer.
@param BufferSize Size of the buffer.
@param FvHandle Points to the returned firmware volume
handle. The firmware volume handle must
be unique within the system.
@retval EFI_SUCCESS Firmware volume handle.
@retval EFI_VOLUME_CORRUPTED Volume was corrupt.
@retval EFI_SUCCESS Firmware volume handle.
@retval EFI_VOLUME_CORRUPTED Volume was corrupt.
**/
/**
This service enables PEI modules to discover additional firmware files. The FileHandle must be
unique within the system.
unique within the system.
@param This Points to this instance of the
EFI_PEI_FIRMWARE_VOLUME_PPI. SearchType A filter
to find only files of this type. Type
EFI_FV_FILETYPE_ALL causes no filtering to be
done.
@param FvHandle Handle of firmware volume in which to
search.
@param This Points to this instance of the
EFI_PEI_FIRMWARE_VOLUME_PPI. SearchType A filter
to find only files of this type. Type
EFI_FV_FILETYPE_ALL causes no filtering to be
done.
@param FvHandle Handle of firmware volume in which to
search.
@param FileHandle Points to the current handle from which to
@param FileHandle Points to the current handle from which to
begin searching or NULL to start at the
beginning of the firmware volume. Updated
upon return to reflect the file found.
@retval EFI_SUCCESS The file was found.
@retval EFI_SUCCESS The file was found.
@retval EFI_NOT_FOUND The file was not found. FileHandle
contains NULL.
contains NULL.
**/
typedef EFI_STATUS
(EFIAPI *EFI_PEI_FV_FIND_FILE_TYPE) (
IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This,
IN CONST EFI_FV_FILETYPE SearchType,
IN CONST EFI_PEI_FV_HANDLE FvHandle,
IN OUT EFI_PEI_FILE_HANDLE *FileHandle
IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This,
IN CONST EFI_FV_FILETYPE SearchType,
IN CONST EFI_PEI_FV_HANDLE FvHandle,
IN OUT EFI_PEI_FILE_HANDLE *FileHandle
);
/**
This service searches for files with a specific name, within
either the specified firmware volume or all firmware volumes.
This service searches for files with a specific name, within
either the specified firmware volume or all firmware volumes.
@param This Points to this instance of the
EFI_PEI_FIRMWARE_VOLUME_PPI.
@param FileName A pointer to the name of the file to find
@param FileName A pointer to the name of the file to find
within the firmware volume.
@param FvHandle Upon entry, the pointer to the firmware
@param FvHandle Upon entry, the pointer to the firmware
volume to search or NULL if all firmware
volumes should be searched. Upon exit, the
actual firmware volume in which the file was
found.
@param FileHandle Upon exit, points to the found file's
@param FileHandle Upon exit, points to the found file's
handle or NULL if it could not be found.
@retval EFI_SUCCESS File was found.
@retval EFI_SUCCESS File was found.
@param EFI_NOT_FOUND File was not found.
@param EFI_NOT_FOUND File was not found.
@param EFI_INVALID_PARAMETER FvHandle or FileHandle or
@param EFI_INVALID_PARAMETER FvHandle or FileHandle or
FileName was NULL.
@ -150,29 +150,29 @@ typedef EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_FV_FIND_FILE_NAME) (
IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This,
IN CONST EFI_GUID *FileName,
IN CONST EFI_PEI_FV_HANDLE FvHandle,
OUT EFI_PEI_FILE_HANDLE *FileHandle
IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This,
IN CONST EFI_GUID *FileName,
IN CONST EFI_PEI_FV_HANDLE FvHandle,
OUT EFI_PEI_FILE_HANDLE *FileHandle
);
/**
This function returns information about a specific
file, including its file name, type, attributes, starting
file, including its file name, type, attributes, starting
address and size.
@param This Points to this instance of the
EFI_PEI_FIRMWARE_VOLUME_PPI.
@param This Points to this instance of the
EFI_PEI_FIRMWARE_VOLUME_PPI.
@param FileHandle Handle of the file.
@param FileInfo Upon exit, points to the file????s
information.
@param FileInfo Upon exit, points to the file????s
information.
@retval EFI_SUCCESS File information returned.
@retval EFI_SUCCESS File information returned.
@retval EFI_INVALID_PARAMETER If FileHandle does not
@retval EFI_INVALID_PARAMETER If FileHandle does not
represent a valid file.
EFI_INVALID_PARAMETER If
FileInfo is NULL
@ -181,88 +181,88 @@ EFI_STATUS
typedef
EFI_STATUS (EFIAPI *EFI_PEI_FV_GET_FILE_INFO) (
IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This,
IN CONST EFI_PEI_FILE_HANDLE FileHandle,
OUT EFI_FV_FILE_INFO *FileInfo
IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This,
IN CONST EFI_PEI_FILE_HANDLE FileHandle,
OUT EFI_FV_FILE_INFO *FileInfo
);
/**
This function returns information about the firmware
This function returns information about the firmware
volume.
@param This Points to this instance of the
EFI_PEI_FIRMWARE_VOLUME_PPI.
@param This Points to this instance of the
EFI_PEI_FIRMWARE_VOLUME_PPI.
@param FvHandle Handle to the firmware handle.
@param FvHandle Handle to the firmware handle.
@param VolumeInfo Points to the returned firmware volume
information.
@retval EFI_SUCCESS Information returned
@retval EFI_SUCCESS Information returned
successfully.
@retval EFI_INVALID_PARAMETER FvHandle does not indicate a
valid firmware volume or VolumeInfo is NULL
@retval EFI_INVALID_PARAMETER FvHandle does not indicate a
valid firmware volume or VolumeInfo is NULL
**/
typedef
EFI_STATUS (EFIAPI *EFI_PEI_FV_GET_INFO)(
IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This,
IN CONST EFI_PEI_FV_HANDLE FvHandle,
OUT EFI_FV_INFO *VolumeInfo
IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This,
IN CONST EFI_PEI_FV_HANDLE FvHandle,
OUT EFI_FV_INFO *VolumeInfo
);
/**
This service enables PEI modules to discover sections of a given type within a valid file.
@param This Points to this instance of the
@param This Points to this instance of the
EFI_PEI_FIRMWARE_VOLUME_PPI.
@param SearchType A filter to find only sections of this
@param SearchType A filter to find only sections of this
type.
@param FileHandle Handle of firmware file in which to
@param FileHandle Handle of firmware file in which to
search.
@param SectionData Updated upon return to point to the
section found.
@retval EFI_SUCCESS Section was found.
@retval EFI_SUCCESS Section was found.
@retval EFI_NOT_FOUND Section of the specified type was not
found. SectionData contains NULL.
@retval EFI_NOT_FOUND Section of the specified type was not
found. SectionData contains NULL.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_FV_FIND_SECTION) (
IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This,
IN CONST EFI_SECTION_TYPE SearchType,
IN CONST EFI_PEI_FILE_HANDLE FileHandle,
OUT VOID **SectionData
IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This,
IN CONST EFI_SECTION_TYPE SearchType,
IN CONST EFI_PEI_FILE_HANDLE FileHandle,
OUT VOID **SectionData
);
/*
This PPI provides functions for accessing a memory-mapped firmware volume of a specific format.
This PPI provides functions for accessing a memory-mapped firmware volume of a specific format.
@param ProcessVolume Process a firmware volume and create a volume handle.
@param FindFileByType Find all files of a specific type.
@param FindFileByName Find the file with a specific name.
@param GetFileInfo Return the information about a specific file
@param GetVolumeInfo Return the firmware volume attributes.
@param FindSectionByType Find all sections of a specific type.
@param ProcessVolume Process a firmware volume and create a volume handle.
@param FindFileByType Find all files of a specific type.
@param FindFileByName Find the file with a specific name.
@param GetFileInfo Return the information about a specific file
@param GetVolumeInfo Return the firmware volume attributes.
@param FindSectionByType Find all sections of a specific type.
**/
struct _EFI_PEI_FIRMWARE_VOLUME_PPI {
EFI_PEI_FV_PROCESS_FV ProcessVolume;
EFI_PEI_FV_FIND_FILE_TYPE FindFileByType;
EFI_PEI_FV_FIND_FILE_NAME FindFileByName;
EFI_PEI_FV_GET_FILE_INFO GetFileInfo;
EFI_PEI_FV_GET_INFO GetVolumeInfo;
EFI_PEI_FV_FIND_SECTION FindSectionByType;
EFI_PEI_FV_PROCESS_FV ProcessVolume;
EFI_PEI_FV_FIND_FILE_TYPE FindFileByType;
EFI_PEI_FV_FIND_FILE_NAME FindFileByName;
EFI_PEI_FV_GET_FILE_INFO GetFileInfo;
EFI_PEI_FV_GET_INFO GetVolumeInfo;
EFI_PEI_FV_FIND_SECTION FindSectionByType;
} ;
extern EFI_GUID gEfiPeiFirmwareVolumePpiGuid;
extern EFI_GUID gEfiPeiFirmwareVolumePpiGuid;
#endif

View File

@ -26,44 +26,44 @@
#define EFI_PEI_FIRMWARE_VOLUME_INFO_PPI_GUID \
{ 0x49edb1c1, 0xbf21, 0x4761, { 0xbb, 0x12, 0xeb, 0x0, 0x31, 0xaa, 0xbb, 0x39 } }
typedef struct _EFI_PEI_FIRMWARE_VOLUME_INFO_PPI EFI_PEI_FIRMWARE_VOLUME_INFO_PPI;
typedef struct _EFI_PEI_FIRMWARE_VOLUME_INFO_PPI EFI_PEI_FIRMWARE_VOLUME_INFO_PPI;
/**
This PPI describes the location and format of a firmware volume.
The FvFormat can be EFI_FIRMWARE_FILE_SYSTEM2_GUID or the GUID for
a user-defined format. The EFI_FIRMWARE_FILE_SYSTEM2_GUID is
the PI Firmware Volume format.
This PPI describes the location and format of a firmware volume.
The FvFormat can be EFI_FIRMWARE_FILE_SYSTEM2_GUID or the GUID for
a user-defined format. The EFI_FIRMWARE_FILE_SYSTEM2_GUID is
the PI Firmware Volume format.
@param FvFormat Unique identifier of the format of the memory-mapped firmware volume.
@param FvFormat Unique identifier of the format of the memory-mapped firmware volume.
@param FvInfo Points to a buffer which allows the EFI_PEI_FIRMWARE_VOLUME_PPI to
process the volume. The format of this buffer is
specific to the FvFormat. For memory-mapped firmware volumes,
this typically points to the first byte of the firmware volume.
@param FvInfo Points to a buffer which allows the EFI_PEI_FIRMWARE_VOLUME_PPI to
process the volume. The format of this buffer is
specific to the FvFormat. For memory-mapped firmware volumes,
this typically points to the first byte of the firmware volume.
@param FvInfoSize Size of the data provided by FvInfo. For memory-mapped firmware volumes,
this is typically the size of the firmware volume.
@param FvInfoSize Size of the data provided by FvInfo. For memory-mapped firmware volumes,
this is typically the size of the firmware volume.
@param ParentFvName If the firmware volume originally came from a firmware file,
then these point to the parent firmware volume
name and firmware volume file. If it did not originally come
from a firmware file, these should be NULL.
@param ParentFvName If the firmware volume originally came from a firmware file,
then these point to the parent firmware volume
name and firmware volume file. If it did not originally come
from a firmware file, these should be NULL.
@param ParentFileName If the firmware volume originally came from a firmware file,
then these point to the parent firmware volume
name and firmware volume file. If it did not originally come
from a firmware file, these should be NULL.
@param ParentFileName If the firmware volume originally came from a firmware file,
then these point to the parent firmware volume
name and firmware volume file. If it did not originally come
from a firmware file, these should be NULL.
**/
struct _EFI_PEI_FIRMWARE_VOLUME_INFO_PPI {
EFI_GUID FvFormat;
VOID *FvInfo;
UINT32 FvInfoSize;
EFI_GUID *ParentFvName;
EFI_GUID *ParentFileName;
EFI_GUID FvFormat;
VOID *FvInfo;
UINT32 FvInfoSize;
EFI_GUID *ParentFvName;
EFI_GUID *ParentFileName;
};
extern EFI_GUID gEfiPeiFirmwareVolumeInfoPpiGuid;
extern EFI_GUID gEfiPeiFirmwareVolumeInfoPpiGuid;
#endif

View File

@ -1,8 +1,8 @@
/* @file
If a GUID-defined section is encountered when doing section extraction,
the PEI Foundation or the EFI_PEI_FILE_LOADER_PPI instance
calls the appropriate instance of the GUIDed Section Extraction PPI
to extract the section stream contained therein..
the PEI Foundation or the EFI_PEI_FILE_LOADER_PPI instance
calls the appropriate instance of the GUIDed Section Extraction PPI
to extract the section stream contained therein..
Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
@ -37,40 +37,40 @@
//
typedef struct _EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI;
typedef struct _EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI;
//
// Bit values for AuthenticationStatus
//
#define EFI_AUTH_STATUS_PLATFORM_OVERRIDE 0x01
#define EFI_AUTH_STATUS_IMAGE_SIGNED 0x02
#define EFI_AUTH_STATUS_NOT_TESTED 0x04
#define EFI_AUTH_STATUS_TEST_FAILED 0x08
#define EFI_AUTH_STATUS_PLATFORM_OVERRIDE 0x01
#define EFI_AUTH_STATUS_IMAGE_SIGNED 0x02
#define EFI_AUTH_STATUS_NOT_TESTED 0x04
#define EFI_AUTH_STATUS_TEST_FAILED 0x08
/**
The ExtractSection() function processes the input section and
returns a pointer to the section contents. If the section being
returns a pointer to the section contents. If the section being
extracted does not require processing (if the section
GuidedSectionHeader.Attributes has the
EFI_GUIDED_SECTION_PROCESSING_REQUIRED field cleared), then
OutputBuffer is just updated to point to the start of the
GuidedSectionHeader.Attributes has the
EFI_GUIDED_SECTION_PROCESSING_REQUIRED field cleared), then
OutputBuffer is just updated to point to the start of the
section's contents. Otherwise, *Buffer must be allocated
from PEI permanent memory.
@param This Indicates the
EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI instance.
Buffer containing the input GUIDed section to be
processed. OutputBuffer OutputBuffer is
allocated from PEI permanent memory and contains
the new section stream.
@param This Indicates the
EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI instance.
Buffer containing the input GUIDed section to be
processed. OutputBuffer OutputBuffer is
allocated from PEI permanent memory and contains
the new section stream.
@param OutputSize A pointer to a caller-allocated
UINTN in which the size of *OutputBuffer
allocation is stored. If the function
returns anything other than EFI_SUCCESS,
the value of OutputSize is undefined.
@param OutputSize A pointer to a caller-allocated
UINTN in which the size of *OutputBuffer
allocation is stored. If the function
returns anything other than EFI_SUCCESS,
the value of OutputSize is undefined.
@param AuthenticationStatus A pointer to a caller-allocated
@param AuthenticationStatus A pointer to a caller-allocated
UINT32 that indicates the
authentication status of the
output buffer. If the input
@ -87,11 +87,11 @@ typedef struct _EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI EFI_PEI_GUIDED_SECTION_EX
AuthenticationStatus is
undefined.
@retval EFI_SUCCESS The InputSection was
@retval EFI_SUCCESS The InputSection was
successfully processed and the
section contents were returned.
@retval EFI_OUT_OF_RESOURCES The system has insufficient
@retval EFI_OUT_OF_RESOURCES The system has insufficient
resources to process the request.
@reteval EFI_INVALID_PARAMETER The GUID in InputSection does
@ -101,11 +101,11 @@ typedef struct _EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI EFI_PEI_GUIDED_SECTION_EX
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_EXTRACT_GUIDED_SECTION)(
IN CONST EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI *This,
IN CONST VOID *InputSection,
OUT VOID **OutputBuffer,
OUT UINTN *OutputSize,
OUT UINT32 *AuthenticationStatus
IN CONST EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI *This,
IN CONST VOID *InputSection,
OUT VOID **OutputBuffer,
OUT UINTN *OutputSize,
OUT UINT32 *AuthenticationStatus
);
@ -118,14 +118,14 @@ EFI_STATUS
therein.
@param ExtractSection Takes the GUIDed section as input and
@param ExtractSection Takes the GUIDed section as input and
produces the section stream data. See
the ExtractSection() function
description.
**/
struct _EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI {
EFI_PEI_EXTRACT_GUIDED_SECTION ExtractSection;
EFI_PEI_EXTRACT_GUIDED_SECTION ExtractSection;
};

View File

@ -21,32 +21,32 @@
#define __FV_FILE_LOADER_PPI_H__
#define EFI_PEI_LOAD_FILE_PPI_GUID \
{ 0xb9e0abfe, 0x5979, 0x4914, { 0x97, 0x7f, 0x6d, 0xee, 0x78, 0xc2, 0x78, 0xa6 } }
{ 0xb9e0abfe, 0x5979, 0x4914, { 0x97, 0x7f, 0x6d, 0xee, 0x78, 0xc2, 0x78, 0xa6 } }
typedef struct _EFI_PEI_LOAD_FILE_PPI EFI_PEI_LOAD_FILE_PPI;
typedef struct _EFI_PEI_LOAD_FILE_PPI EFI_PEI_LOAD_FILE_PPI;
/**
This service is the single member function of EFI_LOAD_FILE_PPI. This service separates
image loading and relocating from the PEI Foundation.
@param This Interface pointer that implements
@param This Interface pointer that implements
the Load File PPI instance.
@param FileHandle File handle of the file to load.
Type EFI_PEI_FILE_HANDLE is defined in
FfsFindNextFile().
@param FileHandle File handle of the file to load.
Type EFI_PEI_FILE_HANDLE is defined in
FfsFindNextFile().
@param ImageAddress Pointer to the address of the
loaded image.
@param ImageAddress Pointer to the address of the
loaded image.
@param ImageSize Pointer to the size of the loaded
@param ImageSize Pointer to the size of the loaded
image.
@param EntryPoint Pointer to the entry point of the
@param EntryPoint Pointer to the entry point of the
image.
@param AuthenticationState On exit, points to the attestation
@param AuthenticationState On exit, points to the attestation
authentication state of the image
or 0 if no attestation was
performed. The format of
@ -54,29 +54,29 @@ typedef struct _EFI_PEI_LOAD_FILE_PPI EFI_PEI_LOAD_FILE_PPI;
EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI.ExtractSection()
@retval EFI_SUCCESS The image was loaded successfully.
@retval EFI_SUCCESS The image was loaded successfully.
@retval EFI_OUT_OF_RESOURCES There was not enough memory.
@retval EFI_OUT_OF_RESOURCES There was not enough memory.
@retval EFI_LOAD_ERROR There was no supported image in
@retval EFI_LOAD_ERROR There was no supported image in
the file EFI_INVALID_PARAMETER
FileHandle was not a valid
firmware file handle.
@retval EFI_INVALID_PARAMETER EntryPoint was NULL.
@retval EFI_INVALID_PARAMETER EntryPoint was NULL.
@retval EFI_NOT_SUPPORTED An image requires relocations or
is not memory mapped.
@retval EFI_NOT_SUPPORTED An image requires relocations or
is not memory mapped.
**/
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_LOAD_FILE) (
IN CONST EFI_PEI_LOAD_FILE_PPI *This,
IN CONST EFI_PEI_FILE_HANDLE FileHandle,
OUT EFI_PHYSICAL_ADDRESS *ImageAddress,
OUT UINT64 *ImageSize,
OUT EFI_PHYSICAL_ADDRESS *EntryPoint,
OUT UINT32 *AuthenticationState
IN CONST EFI_PEI_LOAD_FILE_PPI *This,
IN CONST EFI_PEI_FILE_HANDLE FileHandle,
OUT EFI_PHYSICAL_ADDRESS *ImageAddress,
OUT UINT64 *ImageSize,
OUT EFI_PHYSICAL_ADDRESS *EntryPoint,
OUT UINT32 *AuthenticationState
);
@ -92,7 +92,7 @@ EFI_STATUS
**/
struct _EFI_PEI_LOAD_FILE_PPI {
EFI_PEI_LOAD_FILE LoadFile;
EFI_PEI_LOAD_FILE LoadFile;
};

View File

@ -1,6 +1,6 @@
/* @file
The file descript the PPI which notifies other drivers
of the PEIM being initialized by the PEI Dispatcher.
of the PEIM being initialized by the PEI Dispatcher.
Copyright (c) 2006 - 2007, Intel Corporation
All rights reserved. This program and the accompanying materials
@ -23,28 +23,28 @@
#define __LOADED_IMAGE_PPI_H__
#define EFI_PEI_LOADED_IMAGE_PPI_GUID \
{ 0xc1fcd448, 0x6300, 0x4458, { 0xb8, 0x64, 0x28, 0xdf, 0x1, 0x53, 0x64, 0xbc } }
{ 0xc1fcd448, 0x6300, 0x4458, { 0xb8, 0x64, 0x28, 0xdf, 0x1, 0x53, 0x64, 0xbc } }
typedef struct _EFI_PEI_LOADED_IMAGE_PPI EFI_PEI_LOADED_IMAGE_PPI;
typedef struct _EFI_PEI_LOADED_IMAGE_PPI EFI_PEI_LOADED_IMAGE_PPI;
/*
This interface is installed by the PEI Dispatcher after the image has been
loaded and after all security checks have been performed,
to notify other PEIMs of the files which are being loaded.
This interface is installed by the PEI Dispatcher after the image has been
loaded and after all security checks have been performed,
to notify other PEIMs of the files which are being loaded.
@param ImageAddress Address of the image at the address where it will be executed.
@param ImageSize Size of the image as it will be executed.
@param FileHandle File handle from which the image was loaded. Can be NULL,
indicating the image was not loaded from a handle.
@param FileHandle File handle from which the image was loaded. Can be NULL,
indicating the image was not loaded from a handle.
**/
struct _EFI_PEI_LOADED_IMAGE_PPI {
EFI_PHYSICAL_ADDRESS ImageAddress;
UINT64 ImageSize;
EFI_PEI_FILE_HANDLE FileHandle;
EFI_PHYSICAL_ADDRESS ImageAddress;
UINT64 ImageSize;
EFI_PEI_FILE_HANDLE FileHandle;
};

View File

@ -83,10 +83,10 @@ typedef struct {
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_PCI_CFG_PPI_IO) (
IN CONST EFI_PEI_SERVICES **PeiServices,
IN CONST EFI_PEI_PCI_CFG2_PPI *This,
IN CONST EFI_PEI_PCI_CFG_PPI_WIDTH Width,
IN CONST UINT64 Address,
IN CONST EFI_PEI_SERVICES **PeiServices,
IN CONST EFI_PEI_PCI_CFG2_PPI *This,
IN CONST EFI_PEI_PCI_CFG_PPI_WIDTH Width,
IN CONST UINT64 Address,
IN OUT VOID *Buffer
);

View File

@ -22,31 +22,31 @@
#define __PEI_READ_ONLY_VARIABLE2_PPI_H__
#define EFI_PEI_READ_ONLY_VARIABLE2_PPI_GUID \
{ 0x2ab86ef5, 0xecb5, 0x4134, { 0xb5, 0x56, 0x38, 0x54, 0xca, 0x1f, 0xe1, 0xb4 } }
{ 0x2ab86ef5, 0xecb5, 0x4134, { 0xb5, 0x56, 0x38, 0x54, 0xca, 0x1f, 0xe1, 0xb4 } }
typedef struct _EFI_PEI_READ_ONLY_VARIABLE2_PPI EFI_PEI_READ_ONLY_VARIABLE2_PPI;
/**
Read the specified variable from the UEFI variable store. If the Data
buffer is too small to hold the contents of the variable,
the error EFI_BUFFER_TOO_SMALL is returned and DataSize is set to the
required buffer size to obtain the data.
buffer is too small to hold the contents of the variable,
the error EFI_BUFFER_TOO_SMALL is returned and DataSize is set to the
required buffer size to obtain the data.
@param This A pointer to this instance of the EFI_PEI_READ_ONLY_VARIABLE2_PPI.
@param This A pointer to this instance of the EFI_PEI_READ_ONLY_VARIABLE2_PPI.
@param VariableName A pointer to a null-terminated string that is the variable¡¯s name.
@param VariableName A pointer to a null-terminated string that is the variable¡¯s name.
@param VendorGuid A pointer to an EFI_GUID that is the variable¡¯s GUID. The combination of
VariableGuid and VariableName must be unique.
@param VendorGuid A pointer to an EFI_GUID that is the variable¡¯s GUID. The combination of
VariableGuid and VariableName must be unique.
@param Attributes If non-NULL, on return, points to the variable¡¯s attributes. See ¡°Related Definitons¡±
below for possible attribute values.
@param Attributes If non-NULL, on return, points to the variable¡¯s attributes. See ¡°Related Definitons¡±
below for possible attribute values.
@param DataSize On entry, points to the size in bytes of the Data buffer. On return, points to the size of
the data returned in Data.
@param DataSize On entry, points to the size in bytes of the Data buffer. On return, points to the size of
the data returned in Data.
@param Data Points to the buffer which will hold the returned variable value.
@param Data Points to the buffer which will hold the returned variable value.
@retval EFI_SUCCESS The function completed successfully.
@ -54,8 +54,8 @@ typedef struct _EFI_PEI_READ_ONLY_VARIABLE2_PPI EFI_PEI_READ_ONLY_VARIABLE2_PPI
@retval EFI_NOT_FOUND The variable was not found.
@retval EFI_BUFFER_TOO_SMALL The DataSize is too small for the resulting data.
DataSize is updated with the size required for
the specified variable.
DataSize is updated with the size required for
the specified variable.
@retval EFI_INVALID_PARAMETER VariableName, VariableGuid, DataSize or Data is NULL.
@ -65,32 +65,32 @@ typedef struct _EFI_PEI_READ_ONLY_VARIABLE2_PPI EFI_PEI_READ_ONLY_VARIABLE2_PPI
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_GET_VARIABLE2)(
IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,
IN CONST CHAR16 *VariableName,
IN CONST EFI_GUID *VariableGuid,
OUT UINT32 *Attributes,
IN OUT UINTN *DataSize,
OUT VOID *Data
IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,
IN CONST CHAR16 *VariableName,
IN CONST EFI_GUID *VariableGuid,
OUT UINT32 *Attributes,
IN OUT UINTN *DataSize,
OUT VOID *Data
);
/**
This function is called multiple times to retrieve the VariableName
and VariableGuid of all variables currently available in the system.
On each call, the previous results are passed into the interface,
and, on return, the interface returns the data for the next
interface. When the entire variable list has been returned,
EFI_NOT_FOUND is returned.
and VariableGuid of all variables currently available in the system.
On each call, the previous results are passed into the interface,
and, on return, the interface returns the data for the next
interface. When the entire variable list has been returned,
EFI_NOT_FOUND is returned.
@param This A pointer to this instance of the EFI_PEI_READ_ONLY_VARIABLE2_PPI.
@param This A pointer to this instance of the EFI_PEI_READ_ONLY_VARIABLE2_PPI.
@param VariableNameSize On entry, points to the size of the buffer pointed to by VariableName.
@param VariableNameSize On entry, points to the size of the buffer pointed to by VariableName.
@param VariableName On entry, a pointer to a null-terminated string that is the variable¡¯s name.
On return, points to the next variable¡¯s null-terminated name string.
@param VariableName On entry, a pointer to a null-terminated string that is the variable¡¯s name.
On return, points to the next variable¡¯s null-terminated name string.
@param VendorGuid On entry, a pointer to an UEFI _GUID that is the variable¡¯s GUID.
On return, a pointer to the next variable¡¯s GUID.
@param VendorGuid On entry, a pointer to an UEFI _GUID that is the variable¡¯s GUID.
On return, a pointer to the next variable¡¯s GUID.
@retval EFI_SUCCESS The variable was read successfully.
@ -98,11 +98,11 @@ EFI_STATUS
@retval EFI_NOT_FOUND The variable could not be found.
@retval EFI_BUFFER_TOO_SMALL The VariableNameSize is too small for the resulting
data. VariableNameSize is updated with the size
required for the specified variable.
data. VariableNameSize is updated with the size
required for the specified variable.
@retval EFI_INVALID_PARAMETER VariableName, VariableGuid or
VariableNameSize is NULL.
VariableNameSize is NULL.
@retval EFI_DEVICE_ERROR The variable could not be retrieved because of a device error.
@ -110,10 +110,10 @@ EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_NEXT_VARIABLE_NAME2) (
IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,
IN OUT UINTN *VariableNameSize,
IN OUT CHAR16 *VariableName,
IN OUT EFI_GUID *VariableGuid
IN CONST EFI_PEI_READ_ONLY_VARIABLE2_PPI *This,
IN OUT UINTN *VariableNameSize,
IN OUT CHAR16 *VariableName,
IN OUT EFI_GUID *VariableGuid
);
/**
@ -128,8 +128,8 @@ EFI_STATUS
**/
struct _EFI_PEI_READ_ONLY_VARIABLE2_PPI {
EFI_PEI_GET_VARIABLE2 GetVariable;
EFI_PEI_NEXT_VARIABLE_NAME2 NextVariableName;
EFI_PEI_GET_VARIABLE2 GetVariable;
EFI_PEI_NEXT_VARIABLE_NAME2 NextVariableName;
};
extern EFI_GUID gEfiPeiReadOnlyVariable2PpiGuid;

View File

@ -66,14 +66,14 @@ typedef struct {
typedef
EFI_STATUS
(EFIAPI *EFI_SEC_PLATFORM_INFORMATION) (
IN CONST EFI_PEI_SERVICES **PeiServices,
IN OUT UINT64 *StructureSize,
OUT EFI_SEC_PLATFORM_INFORMATION_RECORD *PlatformInformationRecord
IN CONST EFI_PEI_SERVICES **PeiServices,
IN OUT UINT64 *StructureSize,
OUT EFI_SEC_PLATFORM_INFORMATION_RECORD *PlatformInformationRecord
);
/**
Ppi Description:
Ppi Description:
@param Name

View File

@ -24,7 +24,7 @@
#include <IndustryStandard/SmBus.h>
#define EFI_PEI_SMBUS2_PPI_GUID \
{ 0x9ca93627, 0xb65b, 0x4324, { 0xa2, 0x2, 0xc0, 0xb4, 0x61, 0x76, 0x45, 0x43 } }
{ 0x9ca93627, 0xb65b, 0x4324, { 0xa2, 0x2, 0xc0, 0xb4, 0x61, 0x76, 0x45, 0x43 } }
typedef struct _EFI_PEI_SMBUS2_PPI EFI_PEI_SMBUS2_PPI;
@ -32,36 +32,36 @@ typedef struct _EFI_PEI_SMBUS2_PPI EFI_PEI_SMBUS2_PPI;
//
// EFI_SMBUS_DEVICE_COMMAND
//
typedef UINTN EFI_SMBUS_DEVICE_COMMAND;
typedef UINTN EFI_SMBUS_DEVICE_COMMAND;
/*
Executes an SMBus operation to an SMBus controller.
@param This A pointer to the EFI_PEI_SMBUS2_PPI instance.
@param SlaveAddress The SMBUS hardware address to which the SMBUS device is preassigned or
allocated.
@param Command This command is transmitted by the SMBus host controller to the SMBus slave
device and the interpretation is SMBus slave device specific.
It can mean the offset to a list of functions inside
an SMBus slave device. Not all operations or slave devices support
this command's registers.
@param This A pointer to the EFI_PEI_SMBUS2_PPI instance.
@param SlaveAddress The SMBUS hardware address to which the SMBUS device is preassigned or
allocated.
@param Command This command is transmitted by the SMBus host controller to the SMBus slave
device and the interpretation is SMBus slave device specific.
It can mean the offset to a list of functions inside
an SMBus slave device. Not all operations or slave devices support
this command's registers.
@param Operation Signifies which particular SMBus hardware protocol instance that it
will use to execute the SMBus transactions.
This SMBus hardware protocol is defined by the System Management Bus (SMBus)
Specification and is not related to UEFI.
@param Operation Signifies which particular SMBus hardware protocol instance that it
will use to execute the SMBus transactions.
This SMBus hardware protocol is defined by the System Management Bus (SMBus)
Specification and is not related to UEFI.
@param PecCheck Defines if Packet Error Code (PEC) checking is required for this operation.
@param PecCheck Defines if Packet Error Code (PEC) checking is required for this operation.
@param Length Signifies the number of bytes that this operation will do.
The maximum number of bytes can be revision specific and operation specific.
This parameter will contain the actual number of bytes that are executed
for this operation. Not all operations require this argument.
@param Length Signifies the number of bytes that this operation will do.
The maximum number of bytes can be revision specific and operation specific.
This parameter will contain the actual number of bytes that are executed
for this operation. Not all operations require this argument.
@param Buffer Contains the value of data to execute to the SMBus slave device.
Not all operations require this argument.
The length of this buffer is identified by Length.
@param Buffer Contains the value of data to execute to the SMBus slave device.
Not all operations require this argument.
The length of this buffer is identified by Length.
@retval EFI_SUCCESS The last data that was returned from the access
@ -83,13 +83,13 @@ typedef UINTN EFI_SMBUS_DEVICE_COMMAND;
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_SMBUS2_PPI_EXECUTE_OPERATION) (
IN CONST EFI_PEI_SMBUS2_PPI *This,
IN CONST EFI_SMBUS_DEVICE_ADDRESS SlaveAddress,
IN CONST EFI_SMBUS_DEVICE_COMMAND Command,
IN CONST EFI_SMBUS_OPERATION Operation,
IN CONST BOOLEAN PecCheck,
IN OUT UINTN *Length,
IN OUT VOID *Buffer
IN CONST EFI_PEI_SMBUS2_PPI *This,
IN CONST EFI_SMBUS_DEVICE_ADDRESS SlaveAddress,
IN CONST EFI_SMBUS_DEVICE_COMMAND Command,
IN CONST EFI_SMBUS_OPERATION Operation,
IN CONST BOOLEAN PecCheck,
IN OUT UINTN *Length,
IN OUT VOID *Buffer
);
@ -119,9 +119,9 @@ typedef struct {
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_SMBUS_NOTIFY2_FUNCTION) (
IN CONST EFI_PEI_SMBUS2_PPI *SmbusPpi,
IN CONST EFI_SMBUS_DEVICE_ADDRESS SlaveAddress,
IN CONST UINTN Data
IN CONST EFI_PEI_SMBUS2_PPI *SmbusPpi,
IN CONST EFI_SMBUS_DEVICE_ADDRESS SlaveAddress,
IN CONST UINTN Data
);
/**
The ArpDevice() function enumerates the entire bus or enumerates a specific
@ -149,10 +149,10 @@ EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_SMBUS2_PPI_ARP_DEVICE) (
IN CONST EFI_PEI_SMBUS2_PPI *This,
IN CONST BOOLEAN ArpAll,
IN CONST EFI_SMBUS_UDID *SmbusUdid, OPTIONAL
IN OUT EFI_SMBUS_DEVICE_ADDRESS *SlaveAddress OPTIONAL
IN CONST EFI_PEI_SMBUS2_PPI *This,
IN CONST BOOLEAN ArpAll,
IN CONST EFI_SMBUS_UDID *SmbusUdid, OPTIONAL
IN OUT EFI_SMBUS_DEVICE_ADDRESS *SlaveAddress OPTIONAL
);
@ -176,9 +176,9 @@ typedef struct {
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_SMBUS2_PPI_GET_ARP_MAP) (
IN CONST EFI_PEI_SMBUS2_PPI *This,
IN OUT UINTN *Length,
IN OUT EFI_SMBUS_DEVICE_MAP **SmbusDeviceMap
IN CONST EFI_PEI_SMBUS2_PPI *This,
IN OUT UINTN *Length,
IN OUT EFI_SMBUS_DEVICE_MAP **SmbusDeviceMap
);
@ -201,10 +201,10 @@ EFI_STATUS
typedef
EFI_STATUS
(EFIAPI *EFI_PEI_SMBUS2_PPI_NOTIFY) (
IN CONST EFI_PEI_SMBUS2_PPI *This,
IN CONST EFI_SMBUS_DEVICE_ADDRESS SlaveAddress,
IN CONST UINTN Data,
IN CONST EFI_PEI_SMBUS_NOTIFY2_FUNCTION NotifyFunction
IN CONST EFI_PEI_SMBUS2_PPI *This,
IN CONST EFI_SMBUS_DEVICE_ADDRESS SlaveAddress,
IN CONST UINTN Data,
IN CONST EFI_PEI_SMBUS_NOTIFY2_FUNCTION NotifyFunction
);
/**
@ -231,11 +231,11 @@ EFI_STATUS
**/
struct _EFI_PEI_SMBUS2_PPI {
EFI_PEI_SMBUS2_PPI_EXECUTE_OPERATION Execute;
EFI_PEI_SMBUS2_PPI_ARP_DEVICE ArpDevice;
EFI_PEI_SMBUS2_PPI_GET_ARP_MAP GetArpMap;
EFI_PEI_SMBUS2_PPI_NOTIFY Notify;
EFI_GUID Identifier;
EFI_PEI_SMBUS2_PPI_EXECUTE_OPERATION Execute;
EFI_PEI_SMBUS2_PPI_ARP_DEVICE ArpDevice;
EFI_PEI_SMBUS2_PPI_GET_ARP_MAP GetArpMap;
EFI_PEI_SMBUS2_PPI_NOTIFY Notify;
EFI_GUID Identifier;
};
extern EFI_GUID gEfiPeiSmbus2PpiGuid;

View File

@ -24,7 +24,7 @@
#define __STALL_PPI_H__
#define EFI_PEI_STALL_PPI_GUID \
{ 0x1f4c6f90, 0xb06b, 0x48d8, {0xa2, 0x01, 0xba, 0xe5, 0xf1, 0xcd, 0x7d, 0x56 } }
{ 0x1f4c6f90, 0xb06b, 0x48d8, {0xa2, 0x01, 0xba, 0xe5, 0xf1, 0xcd, 0x7d, 0x56 } }
typedef struct _EFI_PEI_STALL_PPI EFI_PEI_STALL_PPI;

View File

@ -22,44 +22,44 @@
#define __TEMPORARY_RAM_SUPPORT_H__
#define TEMPORARY_RAM_SUPPORT_PPI_GUID \
{ 0xdbe23aa9, 0xa345, 0x4b97, {0x85, 0xb6, 0xb2, 0x26, 0xf1, 0x61, 0x73, 0x89} }
{ 0xdbe23aa9, 0xa345, 0x4b97, {0x85, 0xb6, 0xb2, 0x26, 0xf1, 0x61, 0x73, 0x89} }
/*
This service of the TEMPORARY_RAM_SUPPORT_PPI that migrates temporary RAM into
permanent memory.
permanent memory.
@param PeiServices Pointer to the PEI Services Table.
@param PeiServices Pointer to the PEI Services Table.
@param TemporaryMemoryBase Source Address in temporary memory from which the SEC or PEIM will copy the
Temporary RAM contents.
@param TemporaryMemoryBase Source Address in temporary memory from which the SEC or PEIM will copy the
Temporary RAM contents.
@param PermanentMemoryBase Destination Address in permanent memory into which the SEC or PEIM will copy the
Temporary RAM contents.
@param PermanentMemoryBase Destination Address in permanent memory into which the SEC or PEIM will copy the
Temporary RAM contents.
@param CopySize Amount of memory to migrate from temporary to permanent memory.
@param CopySize Amount of memory to migrate from temporary to permanent memory.
@retval EFI_SUCCESS The data was successfully returned.
@retval EFI_SUCCESS The data was successfully returned.
@retval EFI_INVALID_PARAMETER PermanentMemoryBase + CopySize >
TemporaryMemoryBase when TemporaryMemoryBase >
PermanentMemoryBase.
@retval EFI_INVALID_PARAMETER PermanentMemoryBase + CopySize >
TemporaryMemoryBase when TemporaryMemoryBase >
PermanentMemoryBase.
**/
typedef
EFI_STATUS
(EFIAPI * TEMPORARY_RAM_MIGRATION) (
IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_PHYSICAL_ADDRESS TemporaryMemoryBase,
IN EFI_PHYSICAL_ADDRESS PermanentMemoryBase,
IN UINTN CopySize
IN CONST EFI_PEI_SERVICES **PeiServices,
IN EFI_PHYSICAL_ADDRESS TemporaryMemoryBase,
IN EFI_PHYSICAL_ADDRESS PermanentMemoryBase,
IN UINTN CopySize
);
typedef struct {
TEMPORARY_RAM_MIGRATION TemporaryRamMigration;
TEMPORARY_RAM_MIGRATION TemporaryRamMigration;
} TEMPORARY_RAM_SUPPORT_PPI;
extern EFI_GUID gEfiPeiTemporaryRamSupportPpiGuid;

View File

@ -22,23 +22,23 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
//
// Basical data type definitions introduced in UEFI.
//
typedef GUID EFI_GUID;
typedef RETURN_STATUS EFI_STATUS;
typedef VOID *EFI_HANDLE;
typedef GUID EFI_GUID;
typedef RETURN_STATUS EFI_STATUS;
typedef VOID *EFI_HANDLE;
typedef VOID *EFI_EVENT;
typedef VOID *EFI_EVENT;
typedef UINTN EFI_TPL;
typedef UINTN EFI_TPL;
typedef UINT64 EFI_LBA;
typedef UINT64 EFI_LBA;
typedef UINT16 EFI_HII_HANDLE;
typedef UINT16 STRING_REF;
typedef UINT16 EFI_HII_HANDLE;
typedef UINT16 STRING_REF;
typedef UINT64 EFI_PHYSICAL_ADDRESS;
typedef UINT64 EFI_VIRTUAL_ADDRESS;
typedef UINT64 EFI_PHYSICAL_ADDRESS;
typedef UINT64 EFI_VIRTUAL_ADDRESS;
//
// EFI Time Abstraction:
@ -105,12 +105,12 @@ typedef struct {
#define EFI_WARN_BUFFER_TOO_SMALL RETURN_WARN_BUFFER_TOO_SMALL
#define NULL_HANDLE ((VOID *) 0)
#define NULL_HANDLE ((VOID *) 0)
//
// Define macro to encode the status code.
//
#define EFIERR(_a) ENCODE_ERROR(_a)
#define EFIERR(_a) ENCODE_ERROR(_a)
#define EFI_ERROR(A) RETURN_ERROR(A)
@ -133,9 +133,9 @@ typedef struct {
// 4K. This should in no way be confused with the page size of the processor.
// An EFI_PAGE is just the quanta of memory in EFI.
//
#define EFI_PAGE_SIZE 0x1000
#define EFI_PAGE_MASK 0xFFF
#define EFI_PAGE_SHIFT 12
#define EFI_PAGE_SIZE 0x1000
#define EFI_PAGE_MASK 0xFFF
#define EFI_PAGE_SHIFT 12
#endif

View File

@ -180,12 +180,12 @@ typedef struct {
UINT8 Lun;
} DEVICE_LOGICAL_UNIT_DEVICE_PATH;
#define MSG_SATA_DP 0x12
#define MSG_SATA_DP 0x12
typedef struct {
EFI_DEVICE_PATH_PROTOCOL Header;
UINT16 HbaPortNumber;
UINT16 PortMultiplierPort;
UINT16 LogicalUnitNumber;
EFI_DEVICE_PATH_PROTOCOL Header;
UINT16 HbaPortNumber;
UINT16 PortMultiplierPort;
UINT16 LogicalUnitNumber;
} SATA_DEVICE_PATH;
#define MSG_I2O_DP 0x06
@ -253,7 +253,7 @@ typedef struct {
// Use VENDOR_DEVICE_PATH struct
//
#define MSG_VENDOR_DP 0x0a
typedef VENDOR_DEVICE_PATH VENDOR_DEFINED_DEVICE_PATH;
typedef VENDOR_DEVICE_PATH VENDOR_DEFINED_DEVICE_PATH;
#define DEVICE_PATH_MESSAGING_PC_ANSI EFI_PC_ANSI_GUID
#define DEVICE_PATH_MESSAGING_VT_100 EFI_VT_100_GUID
@ -350,11 +350,11 @@ typedef struct {
} MEDIA_PROTOCOL_DEVICE_PATH;
#define MEDIA_PIWG_FW_VOL_DP 0x6
#define MEDIA_PIWG_FW_VOL_DP 0x6
typedef MEDIA_PROTOCOL_DEVICE_PATH MEDIA_FW_VOL_FILEPATH_DEVICE_PATH;
#define MEDIA_PIWG_FW_FILE_DP 0x7
#define MEDIA_PIWG_FW_FILE_DP 0x7
typedef MEDIA_PROTOCOL_DEVICE_PATH MEDIA_FW_VOL_DEVICE_PATH;
//

View File

@ -1,16 +1,16 @@
/** @file
This includes some definitions introduced in UEFI that will be used in both PEI and DXE phases.
This includes some definitions introduced in UEFI that will be used in both PEI and DXE phases.
Copyright (c) 2006, 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
http://opensource.org/licenses/bsd-license.php
Copyright (c) 2006, 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
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
Module Name: UefiMultiPhase.h
Module Name: UefiMultiPhase.h
**/
@ -21,21 +21,21 @@
// Enumeration of memory types introduced in UEFI.
//
typedef enum {
EfiReservedMemoryType,
EfiLoaderCode,
EfiLoaderData,
EfiBootServicesCode,
EfiBootServicesData,
EfiRuntimeServicesCode,
EfiRuntimeServicesData,
EfiConventionalMemory,
EfiUnusableMemory,
EfiACPIReclaimMemory,
EfiACPIMemoryNVS,
EfiMemoryMappedIO,
EfiMemoryMappedIOPortSpace,
EfiPalCode,
EfiMaxMemoryType
EfiReservedMemoryType,
EfiLoaderCode,
EfiLoaderData,
EfiBootServicesCode,
EfiBootServicesData,
EfiRuntimeServicesCode,
EfiRuntimeServicesData,
EfiConventionalMemory,
EfiUnusableMemory,
EfiACPIReclaimMemory,
EfiACPIMemoryNVS,
EfiMemoryMappedIO,
EfiMemoryMappedIOPortSpace,
EfiPalCode,
EfiMaxMemoryType
} EFI_MEMORY_TYPE;
@ -43,56 +43,56 @@ typedef enum {
// Data structure that precedes all of the standard EFI table types.
//
typedef struct {
UINT64 Signature;
UINT32 Revision;
UINT32 HeaderSize;
UINT32 CRC32;
UINT32 Reserved;
UINT64 Signature;
UINT32 Revision;
UINT32 HeaderSize;
UINT32 CRC32;
UINT32 Reserved;
} EFI_TABLE_HEADER;
//
// Attributes of variable.
//
#define EFI_VARIABLE_NON_VOLATILE 0x00000001
#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004
#define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x00000008
#define EFI_VARIABLE_NON_VOLATILE 0x00000001
#define EFI_VARIABLE_BOOTSERVICE_ACCESS 0x00000002
#define EFI_VARIABLE_RUNTIME_ACCESS 0x00000004
#define EFI_VARIABLE_HARDWARE_ERROR_RECORD 0x00000008
//
// This attribute is identified by the mnemonic 'HR'
// elsewhere in this specification.
//
#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x00000010
#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS 0x00000010
//
// _WIN_CERTIFICATE.wCertificateType
//
#define WIN_CERT_TYPE_EFI_PKCS115 0x0EF0
#define WIN_CERT_TYPE_EFI_GUID 0x0EF1
#define WIN_CERT_TYPE_EFI_PKCS115 0x0EF0
#define WIN_CERT_TYPE_EFI_GUID 0x0EF1
/**
The WIN_CERTIFICATE structure is part of the PE/COFF
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
@param wRevision The revision level of the WIN_CERTIFICATE
structure. The current revision level is
0x0200.
@param wCertificateType The certificate type. See
@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
@param bCertificate The actual certificate. The format of
the certificate depends on
wCertificateType. The format of the UEFI
certificates is defined below.
@ -100,31 +100,31 @@ typedef struct {
**/
typedef struct _WIN_CERTIFICATE {
UINT32 dwLength;
UINT16 wRevision;
UINT16 wCertificateType;
//UINT8 bCertificate[ANYSIZE_ARRAY];
UINT32 dwLength;
UINT16 wRevision;
UINT16 wCertificateType;
//UINT8 bCertificate[ANYSIZE_ARRAY];
} WIN_CERTIFICATE;
//
// WIN_CERTIFICATE_UEFI_GUID.CertType
//
#define EFI_CERT_TYPE_RSA2048_SHA256_GUID \
{0xa7717414, 0xc616, 0x4977, {0x94, 0x20, 0x84, 0x47, 0x12, 0xa7, 0x35, 0xbf } }
{0xa7717414, 0xc616, 0x4977, {0x94, 0x20, 0x84, 0x47, 0x12, 0xa7, 0x35, 0xbf } }
//
// WIN_CERTIFICATE_UEFI_GUID.CertData
//
typedef struct _EFI_CERT_BLOCK_RSA_2048_SHA256 {
UINT32 HashType;
UINT8 PublicKey[256];
UINT8 Signature[256];
UINT32 HashType;
UINT8 PublicKey[256];
UINT8 Signature[256];
} EFI_CERT_BLOCK_RSA_2048_SHA256;
/**
@param Hdr This is the standard WIN_CERTIFICATE header, where
@param Hdr This is the standard WIN_CERTIFICATE header, where
wCertificateType is set to
WIN_CERT_TYPE_UEFI_GUID.
@ -132,12 +132,12 @@ typedef struct _EFI_CERT_BLOCK_RSA_2048_SHA256 {
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
@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.
@param Information The WIN_CERTIFICATE_UEFI_GUID certificate
@param Information The WIN_CERTIFICATE_UEFI_GUID certificate
type allows new types of certificates to
be developed for driver authentication
without requiring a new certificate type.
@ -149,9 +149,9 @@ typedef struct _EFI_CERT_BLOCK_RSA_2048_SHA256 {
**/
typedef struct _WIN_CERTIFICATE_UEFI_GUID {
WIN_CERTIFICATE Hdr;
EFI_GUID CertType;
// UINT8 CertData[ANYSIZE_ARRAY];
WIN_CERTIFICATE Hdr;
EFI_GUID CertType;
// UINT8 CertData[ANYSIZE_ARRAY];
} WIN_CERTIFICATE_UEFI_GUID;
@ -165,9 +165,9 @@ typedef struct _WIN_CERTIFICATE_UEFI_GUID {
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.
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
@ -180,7 +180,7 @@ typedef struct _WIN_CERTIFICATE_UEFI_GUID {
in Section 26.4.1. See
EFI_HASH_ALGORITHM_x.
@param Signature This is the actual digital signature. The
@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
@ -190,34 +190,34 @@ typedef struct _WIN_CERTIFICATE_UEFI_GUID {
**/
typedef struct _WIN_CERTIFICATE_EFI_PKCS1_15 {
WIN_CERTIFICATE Hdr;
EFI_GUID HashAlgorithm;
// UINT8 Signature[ANYSIZE_ARRAY];
WIN_CERTIFICATE Hdr;
EFI_GUID HashAlgorithm;
// 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
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
@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
@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
@ -226,8 +226,8 @@ typedef struct _WIN_CERTIFICATE_EFI_PKCS1_15 {
**/
typedef struct {
UINT64 MonotonicCount;
WIN_CERTIFICATE_UEFI_GUID AuthInfo;
UINT64 MonotonicCount;
WIN_CERTIFICATE_UEFI_GUID AuthInfo;
} EFI_VARIABLE_AUTHENTICATION;
#endif

View File

@ -72,9 +72,9 @@ typedef enum {
//
// physical memory protection on range
//
#define EFI_MEMORY_WP 0x0000000000001000ULL
#define EFI_MEMORY_RP 0x0000000000002000ULL
#define EFI_MEMORY_XP 0x0000000000004000ULL
#define EFI_MEMORY_WP 0x0000000000001000ULL
#define EFI_MEMORY_RP 0x0000000000002000ULL
#define EFI_MEMORY_XP 0x0000000000004000ULL
//
// range requires a runtime mapping
@ -83,11 +83,11 @@ typedef enum {
#define EFI_MEMORY_DESCRIPTOR_VERSION 1
typedef struct {
UINT32 Type;
EFI_PHYSICAL_ADDRESS PhysicalStart;
EFI_VIRTUAL_ADDRESS VirtualStart;
UINT64 NumberOfPages;
UINT64 Attribute;
UINT32 Type;
EFI_PHYSICAL_ADDRESS PhysicalStart;
EFI_VIRTUAL_ADDRESS VirtualStart;
UINT64 NumberOfPages;
UINT64 Attribute;
} EFI_MEMORY_DESCRIPTOR;
//
@ -336,13 +336,13 @@ EFI_STATUS
// EVT_TIMER might be ¡°Ored¡± with EVT_NOTIFY_WAIT or
// EVT_NOTIFY_SIGNAL.
//
#define EVT_TIMER 0x80000000
#define EVT_RUNTIME 0x40000000
#define EVT_TIMER 0x80000000
#define EVT_RUNTIME 0x40000000
#define EVT_NOTIFY_WAIT 0x00000100
#define EVT_NOTIFY_SIGNAL 0x00000200
#define EVT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201
#define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202
#define EVT_NOTIFY_WAIT 0x00000100
#define EVT_NOTIFY_SIGNAL 0x00000200
#define EVT_SIGNAL_EXIT_BOOT_SERVICES 0x00000201
#define EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE 0x60000202
//
@ -638,9 +638,9 @@ EFI_STATUS
// real time clock device as exposed through the EFI interfaces.
//
typedef struct {
UINT32 Resolution;
UINT32 Accuracy;
BOOLEAN SetsToZero;
UINT32 Resolution;
UINT32 Accuracy;
BOOLEAN SetsToZero;
} EFI_TIME_CAPABILITIES;
/**
@ -1542,153 +1542,153 @@ EFI_STATUS
//
// EFI Runtime Services Table
//
#define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249
#define EFI_SYSTEM_TABLE_REVISION ((2<<16) | (10))
#define EFI_2_10_SYSTEM_TABLE_REVISION ((2<<16) | (10))
#define EFI_2_00_SYSTEM_TABLE_REVISION ((2<<16) | (00))
#define EFI_1_10_SYSTEM_TABLE_REVISION ((1<<16) | (10))
#define EFI_1_02_SYSTEM_TABLE_REVISION ((1<<16) | (02))
#define EFI_SYSTEM_TABLE_SIGNATURE 0x5453595320494249
#define EFI_SYSTEM_TABLE_REVISION ((2<<16) | (10))
#define EFI_2_10_SYSTEM_TABLE_REVISION ((2<<16) | (10))
#define EFI_2_00_SYSTEM_TABLE_REVISION ((2<<16) | (00))
#define EFI_1_10_SYSTEM_TABLE_REVISION ((1<<16) | (10))
#define EFI_1_02_SYSTEM_TABLE_REVISION ((1<<16) | (02))
#define EFI_RUNTIME_SERVICES_SIGNATURE 0x56524553544e5552
#define EFI_RUNTIME_SERVICES_REVISION EFI_2_00_SYSTEM_TABLE_REVISION
#define EFI_RUNTIME_SERVICES_SIGNATURE 0x56524553544e5552
#define EFI_RUNTIME_SERVICES_REVISION EFI_2_00_SYSTEM_TABLE_REVISION
typedef struct {
EFI_TABLE_HEADER Hdr;
EFI_TABLE_HEADER Hdr;
//
// Time Services
//
EFI_GET_TIME GetTime;
EFI_SET_TIME SetTime;
EFI_GET_WAKEUP_TIME GetWakeupTime;
EFI_SET_WAKEUP_TIME SetWakeupTime;
//
// Time Services
//
EFI_GET_TIME GetTime;
EFI_SET_TIME SetTime;
EFI_GET_WAKEUP_TIME GetWakeupTime;
EFI_SET_WAKEUP_TIME SetWakeupTime;
//
// Virtual Memory Services
//
EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap;
EFI_CONVERT_POINTER ConvertPointer;
//
// Virtual Memory Services
//
EFI_SET_VIRTUAL_ADDRESS_MAP SetVirtualAddressMap;
EFI_CONVERT_POINTER ConvertPointer;
//
// Variable Services
//
EFI_GET_VARIABLE GetVariable;
EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName;
EFI_SET_VARIABLE SetVariable;
//
// Variable Services
//
EFI_GET_VARIABLE GetVariable;
EFI_GET_NEXT_VARIABLE_NAME GetNextVariableName;
EFI_SET_VARIABLE SetVariable;
//
// Miscellaneous Services
//
EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount;
EFI_RESET_SYSTEM ResetSystem;
//
// Miscellaneous Services
//
EFI_GET_NEXT_HIGH_MONO_COUNT GetNextHighMonotonicCount;
EFI_RESET_SYSTEM ResetSystem;
//
// UEFI 2.0 Capsule Services
//
EFI_UPDATE_CAPSULE UpdateCapsule;
EFI_QUERY_CAPSULE_CAPABILITIES QueryCapsuleCapabilities;
//
// UEFI 2.0 Capsule Services
//
EFI_UPDATE_CAPSULE UpdateCapsule;
EFI_QUERY_CAPSULE_CAPABILITIES QueryCapsuleCapabilities;
//
// Miscellaneous UEFI 2.0 Service
//
EFI_QUERY_VARIABLE_INFO QueryVariableInfo;
//
// Miscellaneous UEFI 2.0 Service
//
EFI_QUERY_VARIABLE_INFO QueryVariableInfo;
} EFI_RUNTIME_SERVICES;
#define EFI_BOOT_SERVICES_SIGNATURE 0x56524553544f4f42
#define EFI_BOOT_SERVICES_REVISION ((2<<16) | (00))
#define EFI_BOOT_SERVICES_SIGNATURE 0x56524553544f4f42
#define EFI_BOOT_SERVICES_REVISION ((2<<16) | (00))
typedef struct {
EFI_TABLE_HEADER Hdr;
//
// Task Priority Services
//
EFI_RAISE_TPL RaiseTPL;
EFI_RESTORE_TPL RestoreTPL;
EFI_TABLE_HEADER Hdr;
//
// Task Priority Services
//
EFI_RAISE_TPL RaiseTPL;
EFI_RESTORE_TPL RestoreTPL;
//
// Memory Services
//
EFI_ALLOCATE_PAGES AllocatePages;
EFI_FREE_PAGES FreePages;
EFI_GET_MEMORY_MAP GetMemoryMap;
EFI_ALLOCATE_POOL AllocatePool;
EFI_FREE_POOL FreePool;
//
// Memory Services
//
EFI_ALLOCATE_PAGES AllocatePages;
EFI_FREE_PAGES FreePages;
EFI_GET_MEMORY_MAP GetMemoryMap;
EFI_ALLOCATE_POOL AllocatePool;
EFI_FREE_POOL FreePool;
//
// Event & Timer Services
//
EFI_CREATE_EVENT CreateEvent;
EFI_SET_TIMER SetTimer;
EFI_WAIT_FOR_EVENT WaitForEvent;
EFI_SIGNAL_EVENT SignalEvent;
EFI_CLOSE_EVENT CloseEvent;
EFI_CHECK_EVENT CheckEvent;
//
// Event & Timer Services
//
EFI_CREATE_EVENT CreateEvent;
EFI_SET_TIMER SetTimer;
EFI_WAIT_FOR_EVENT WaitForEvent;
EFI_SIGNAL_EVENT SignalEvent;
EFI_CLOSE_EVENT CloseEvent;
EFI_CHECK_EVENT CheckEvent;
//
// Protocol Handler Services
//
EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface;
EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface;
EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface;
EFI_HANDLE_PROTOCOL HandleProtocol;
VOID *Reserved;
EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify;
EFI_LOCATE_HANDLE LocateHandle;
EFI_LOCATE_DEVICE_PATH LocateDevicePath;
EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable;
//
// Protocol Handler Services
//
EFI_INSTALL_PROTOCOL_INTERFACE InstallProtocolInterface;
EFI_REINSTALL_PROTOCOL_INTERFACE ReinstallProtocolInterface;
EFI_UNINSTALL_PROTOCOL_INTERFACE UninstallProtocolInterface;
EFI_HANDLE_PROTOCOL HandleProtocol;
VOID *Reserved;
EFI_REGISTER_PROTOCOL_NOTIFY RegisterProtocolNotify;
EFI_LOCATE_HANDLE LocateHandle;
EFI_LOCATE_DEVICE_PATH LocateDevicePath;
EFI_INSTALL_CONFIGURATION_TABLE InstallConfigurationTable;
//
// Image Services
//
EFI_IMAGE_LOAD LoadImage;
EFI_IMAGE_START StartImage;
EFI_EXIT Exit;
EFI_IMAGE_UNLOAD UnloadImage;
EFI_EXIT_BOOT_SERVICES ExitBootServices;
//
// Image Services
//
EFI_IMAGE_LOAD LoadImage;
EFI_IMAGE_START StartImage;
EFI_EXIT Exit;
EFI_IMAGE_UNLOAD UnloadImage;
EFI_EXIT_BOOT_SERVICES ExitBootServices;
//
// Miscellaneous Services
//
EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount;
EFI_STALL Stall;
EFI_SET_WATCHDOG_TIMER SetWatchdogTimer;
//
// Miscellaneous Services
//
EFI_GET_NEXT_MONOTONIC_COUNT GetNextMonotonicCount;
EFI_STALL Stall;
EFI_SET_WATCHDOG_TIMER SetWatchdogTimer;
//
// DriverSupport Services
//
EFI_CONNECT_CONTROLLER ConnectController;
EFI_DISCONNECT_CONTROLLER DisconnectController;
//
// DriverSupport Services
//
EFI_CONNECT_CONTROLLER ConnectController;
EFI_DISCONNECT_CONTROLLER DisconnectController;
//
// Open and Close Protocol Services
//
EFI_OPEN_PROTOCOL OpenProtocol;
EFI_CLOSE_PROTOCOL CloseProtocol;
EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation;
//
// Open and Close Protocol Services
//
EFI_OPEN_PROTOCOL OpenProtocol;
EFI_CLOSE_PROTOCOL CloseProtocol;
EFI_OPEN_PROTOCOL_INFORMATION OpenProtocolInformation;
//
// Library Services
//
EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle;
EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer;
EFI_LOCATE_PROTOCOL LocateProtocol;
EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces;
EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces;
//
// Library Services
//
EFI_PROTOCOLS_PER_HANDLE ProtocolsPerHandle;
EFI_LOCATE_HANDLE_BUFFER LocateHandleBuffer;
EFI_LOCATE_PROTOCOL LocateProtocol;
EFI_INSTALL_MULTIPLE_PROTOCOL_INTERFACES InstallMultipleProtocolInterfaces;
EFI_UNINSTALL_MULTIPLE_PROTOCOL_INTERFACES UninstallMultipleProtocolInterfaces;
//
// 32-bit CRC Services
//
EFI_CALCULATE_CRC32 CalculateCrc32;
//
// 32-bit CRC Services
//
EFI_CALCULATE_CRC32 CalculateCrc32;
//
// Miscellaneous Services
//
EFI_COPY_MEM CopyMem;
EFI_SET_MEM SetMem;
//
// Miscellaneous Services
//
EFI_COPY_MEM CopyMem;
EFI_SET_MEM SetMem;
EFI_CREATE_EVENT_EX CreateEventEx;
EFI_CREATE_EVENT_EX CreateEventEx;
} EFI_BOOT_SERVICES;
//
@ -1696,24 +1696,24 @@ typedef struct {
// EFI System Table.
//
typedef struct{
EFI_GUID VendorGuid;
VOID *VendorTable;
EFI_GUID VendorGuid;
VOID *VendorTable;
} EFI_CONFIGURATION_TABLE;
struct _EFI_SYSTEM_TABLE {
EFI_TABLE_HEADER Hdr;
CHAR16 *FirmwareVendor;
UINT32 FirmwareRevision;
EFI_HANDLE ConsoleInHandle;
EFI_SIMPLE_TEXT_INPUT_PROTOCOL *ConIn;
EFI_HANDLE ConsoleOutHandle;
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut;
EFI_HANDLE StandardErrorHandle;
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *StdErr;
EFI_RUNTIME_SERVICES *RuntimeServices;
EFI_BOOT_SERVICES *BootServices;
UINTN NumberOfTableEntries;
EFI_CONFIGURATION_TABLE *ConfigurationTable;
EFI_TABLE_HEADER Hdr;
CHAR16 *FirmwareVendor;
UINT32 FirmwareRevision;
EFI_HANDLE ConsoleInHandle;
EFI_SIMPLE_TEXT_INPUT_PROTOCOL *ConIn;
EFI_HANDLE ConsoleOutHandle;
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *ConOut;
EFI_HANDLE StandardErrorHandle;
EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *StdErr;
EFI_RUNTIME_SERVICES *RuntimeServices;
EFI_BOOT_SERVICES *BootServices;
UINTN NumberOfTableEntries;
EFI_CONFIGURATION_TABLE *ConfigurationTable;
};
//