-/* @file\r
+/** @file\r
HOB related definitions in PI.\r
\r
Copyright (c) 2006 - 2007, Intel Corporation \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
-\r
@par Revision Reference:\r
Version 1.0.\r
\r
#ifndef __PI_HOB_H__\r
#define __PI_HOB_H__\r
\r
+#include <ProcessorBind.h>\r
+#include <Pi/PiBootMode.h>\r
+#include <Uefi/UefiBaseType.h>\r
+#include <Uefi/UefiMultiPhase.h>\r
+\r
//\r
// HobType of EFI_HOB_GENERIC_HEADER.\r
// \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
+///\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 {\r
UINT16 HobType;\r
UINT16 HobLength;\r
} EFI_HOB_GENERIC_HEADER;\r
\r
\r
-//\r
-// Value of version ofinEFI_HOB_HANDOFF_INFO_TABLE.\r
-// \r
+///\r
+/// Value of version ofinEFI_HOB_HANDOFF_INFO_TABLE.\r
+/// \r
#define EFI_HOB_HANDOFF_TABLE_VERSION 0x0009\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
+\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 {\r
EFI_HOB_GENERIC_HEADER Header;\r
UINT32 Version;\r
EFI_PHYSICAL_ADDRESS EfiEndOfHobList;\r
} EFI_HOB_HANDOFF_INFO_TABLE;\r
\r
-\r
+/// EFI_HOB_MEMORY_ALLOCATION_HEADER describes the\r
+/// various attributes of the logical memory allocation. The type field will be used for\r
+/// subsequent inclusion in the UEFI memory map.\r
typedef struct {\r
+ ///\r
+ /// A GUID that defines the memory allocation region¡¯s type and purpose, as well as\r
+ /// other fields within the memory allocation HOB. This GUID is used to define the\r
+ /// additional data within the HOB that may be present for the memory allocation HOB.\r
+ /// Type EFI_GUID is defined in InstallProtocolInterface() in the UEFI 2.0\r
+ /// specification. \r
+ /// \r
EFI_GUID Name;\r
+\r
+ /// The base address of memory allocated by this HOB. Type\r
+ /// EFI_PHYSICAL_ADDRESS is defined in AllocatePages() in the UEFI 2.0\r
+ /// specification.\r
EFI_PHYSICAL_ADDRESS MemoryBaseAddress;\r
+\r
+ /// The length in bytes of memory allocated by this HOB.\r
UINT64 MemoryLength;\r
+\r
+ ///\r
+ /// Defines the type of memory allocated by this HOB. The memory type definition\r
+ /// follows the EFI_MEMORY_TYPE definition. Type EFI_MEMORY_TYPE is defined\r
+ /// in AllocatePages() in the UEFI 2.0 specification.\r
+ /// \r
EFI_MEMORY_TYPE MemoryType;\r
\r
- //\r
- // Padding for Itanium processor family\r
- // \r
+ ///\r
+ /// Padding for Itanium processor family\r
+ ///\r
UINT8 Reserved[4];\r
} EFI_HOB_MEMORY_ALLOCATION_HEADER;\r
\r
-//\r
-// Describes all memory ranges used during the HOB producer \r
-// phase that exist outside the HOB list. This HOB type \r
-// describes how memory is used, \r
-// not the physical attributes of memory.\r
-// \r
+///\r
+/// Describes all memory ranges used during the HOB producer \r
+/// phase that exist outside the HOB list. This HOB type \r
+/// describes how memory is used, \r
+/// not the physical attributes of memory.\r
+/// \r
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
+ // Additional data pertaining to the "Name" Guid memory\r
// may go here.\r
//\r
} EFI_HOB_MEMORY_ALLOCATION;\r
\r
\r
-//\r
-// Describes the memory stack that is produced by the HOB producer \r
-// phase and upon which all postmemory-installed executable\r
-// content in the HOB producer phase is executing.\r
-// \r
+///\r
+/// Describes the memory stack that is produced by the HOB producer \r
+/// phase and upon which all postmemory-installed executable\r
+/// content in the HOB producer phase is executing.\r
+/// \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
-// Defines the location of the boot-strap \r
-// processor (BSP) BSPStore (¡°Backing Store Pointer Store¡±).\r
-// This HOB is valid for the Itanium processor family only \r
-// register overflow store.\r
-// \r
+///\r
+/// Defines the location of the boot-strap \r
+/// processor (BSP) BSPStore ("Backing Store Pointer Store").\r
+/// This HOB is valid for the Itanium processor family only \r
+/// register overflow store.\r
+/// \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
+///\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_PHYSICAL_ADDRESS EntryPoint;\r
} EFI_HOB_MEMORY_ALLOCATION_MODULE;\r
\r
+///\r
+/// type of Recount type \r
+/// \r
typedef UINT32 EFI_RESOURCE_TYPE;\r
\r
//\r
#define EFI_RESOURCE_IO_RESERVED 0x00000006\r
#define EFI_RESOURCE_MAX_MEMORY_TYPE 0x00000007\r
\r
-\r
+///\r
+/// type of recount attribute type\r
+/// \r
typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;\r
\r
//\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
+///\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 {\r
EFI_HOB_GENERIC_HEADER Header;\r
EFI_GUID Owner;\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
+///\r
+/// Allows writers of executable content in the HOB producer phase to \r
+/// maintain and manage HOBs with specific GUID.\r
+/// \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
+///\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_FIRMWARE_VOLUME;\r
\r
-//\r
-// Details the location of a firmware volume which was extracted \r
-// from a file within another firmware volume.\r
-// \r
+///\r
+/// Details the location of a firmware volume which was extracted \r
+/// from a file within another firmware volume.\r
+/// \r
typedef struct {\r
EFI_HOB_GENERIC_HEADER Header;\r
EFI_PHYSICAL_ADDRESS BaseAddress;\r
} EFI_HOB_FIRMWARE_VOLUME2;\r
\r
\r
-//\r
-// Describes processor information, such as address space and I/O space capabilities.\r
-// \r
+///\r
+/// Describes processor information, such as address space and I/O space capabilities.\r
+///\r
typedef struct {\r
EFI_HOB_GENERIC_HEADER Header;\r
UINT8 SizeOfMemorySpace;\r
} EFI_HOB_CPU;\r
\r
\r
-//\r
-// Describes pool memory allocations.\r
-// \r
+///\r
+/// Describes pool memory allocations.\r
+/// \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
+///\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_RESOURCE_DESCRIPTOR *ResourceDescriptor;\r
EFI_HOB_GUID_TYPE *Guid;\r
EFI_HOB_FIRMWARE_VOLUME *FirmwareVolume;\r
+ EFI_HOB_FIRMWARE_VOLUME2 *FirmwareVolume2;\r
EFI_HOB_CPU *Cpu;\r
EFI_HOB_MEMORY_POOL *Pool;\r
UINT8 *Raw;\r