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 <20><>Name<6D><65> Guid memory
// may go here.
//
typedef struct {
EFI_HOB_GENERIC_HEADER Header;
EFI_HOB_MEMORY_ALLOCATION_HEADER AllocDescriptor;
//
// Additional data pertaining to the <20><>Name<6D><65> 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<6C><65>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<6D><65>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<EFBFBD><EFBFBD>s file handle. Must be the currently
@param FileHandle PEIM<EFBFBD><EFBFBD>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 {