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