]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Pi/PiHob.h
Add EFI_DISPOSABLE_SECTION type defined in PI 1.2 specification.
[mirror_edk2.git] / MdePkg / Include / Pi / PiHob.h
index 4dd9761fc630fda9c4e364f002b9ea2b0fbf27b3..6a62abcd71ceb1649a49f778c3c9349f455e2ee1 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   HOB related definitions in PI.\r
 \r
-  Copyright (c) 2006 - 2007, Intel Corporation                                                         \r
+  Copyright (c) 2006 - 2009, 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
   WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.             \r
 \r
   @par Revision Reference:\r
-  Version 1.0.\r
+  PI Version 1.0\r
 \r
 **/\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
 /// All HOBs must contain this generic HOB header.\r
 /// \r
 typedef struct {\r
+  ///\r
+  /// Identifies the HOB data structure type.\r
+  ///\r
   UINT16    HobType;\r
+  ///\r
+  /// The length in bytes of the HOB.\r
+  ///\r
   UINT16    HobLength;\r
+  ///\r
+  /// This field must always be set to zero.\r
+  ///\r
   UINT32    Reserved;\r
 } EFI_HOB_GENERIC_HEADER;\r
 \r
@@ -59,22 +63,52 @@ typedef struct {
 /// This HOB must be the first one in the HOB list.\r
 /// \r
 typedef struct {\r
+  ///\r
+  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_HANDOFF.\r
+  ///\r
   EFI_HOB_GENERIC_HEADER  Header;\r
+  ///\r
+  /// The version number pertaining to the PHIT HOB definition.\r
+  /// This value is 4 bytes in length to provide an 8-byte aligned entry \r
+  /// when it is combined with the 4-byte BootMode.\r
+  ///\r
   UINT32                  Version;\r
+  ///\r
+  /// The system boot mode as determined during the HOB producer phase.\r
+  ///\r
   EFI_BOOT_MODE           BootMode;\r
+  ///\r
+  /// The highest address location of memory that is allocated for use by the HOB producer\r
+  /// phase. This address must be 4-KB aligned to meet page restrictions of UEFI.\r
+  ///\r
   EFI_PHYSICAL_ADDRESS    EfiMemoryTop;\r
+  ///\r
+  /// The lowest address location of memory that is allocated for use by the HOB producer phase.\r
+  ///\r
   EFI_PHYSICAL_ADDRESS    EfiMemoryBottom;\r
+  ///\r
+  /// The highest address location of free memory that is currently available \r
+  /// for use by the HOB producer phase.\r
+  ///\r
   EFI_PHYSICAL_ADDRESS    EfiFreeMemoryTop;\r
+  ///\r
+  /// The lowest address location of free memory that is available for use by the HOB producer phase.\r
+  ///\r
   EFI_PHYSICAL_ADDRESS    EfiFreeMemoryBottom;\r
+  ///\r
+  /// The end of the HOB list.\r
+  ///\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
+/// \r
 typedef struct {\r
   ///\r
-  /// A GUID that defines the memory allocation region¡¯s type and purpose, as well as\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
@@ -82,12 +116,16 @@ typedef struct {
   /// \r
   EFI_GUID              Name;\r
 \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
+  ///\r
   EFI_PHYSICAL_ADDRESS  MemoryBaseAddress;\r
 \r
+  /// \r
   /// The length in bytes of memory allocated by this HOB.\r
+  /// \r
   UINT64                MemoryLength;\r
 \r
   ///\r
@@ -106,11 +144,17 @@ typedef struct {
 ///\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
+/// describes how memory is used, not the physical attributes of memory.\r
+///\r
 typedef struct {\r
+  ///\r
+  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION.\r
+  ///\r
   EFI_HOB_GENERIC_HEADER            Header;\r
+  ///\r
+  /// An instance of the EFI_HOB_MEMORY_ALLOCATION_HEADER that describes the\r
+  /// various attributes of the logical memory allocation.\r
+  ///\r
   EFI_HOB_MEMORY_ALLOCATION_HEADER  AllocDescriptor;\r
   //\r
   // Additional data pertaining to the "Name" Guid memory\r
@@ -125,7 +169,14 @@ typedef struct {
 /// content in the HOB producer phase is executing.\r
 /// \r
 typedef struct {\r
+  ///\r
+  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION.\r
+  ///\r
   EFI_HOB_GENERIC_HEADER            Header;\r
+  ///\r
+  /// An instance of the EFI_HOB_MEMORY_ALLOCATION_HEADER that describes the\r
+  /// various attributes of the logical memory allocation.\r
+  ///\r
   EFI_HOB_MEMORY_ALLOCATION_HEADER  AllocDescriptor;\r
 } EFI_HOB_MEMORY_ALLOCATION_STACK;\r
 \r
@@ -136,7 +187,14 @@ typedef struct {
 /// register overflow store.\r
 /// \r
 typedef struct {\r
+  ///\r
+  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION.\r
+  ///\r
   EFI_HOB_GENERIC_HEADER            Header;\r
+  ///\r
+  /// An instance of the EFI_HOB_MEMORY_ALLOCATION_HEADER that describes the\r
+  /// various attributes of the logical memory allocation.\r
+  ///\r
   EFI_HOB_MEMORY_ALLOCATION_HEADER  AllocDescriptor;\r
 } EFI_HOB_MEMORY_ALLOCATION_BSP_STORE;\r
 \r
@@ -144,14 +202,29 @@ typedef struct {
 /// Defines the location and entry point of the HOB consumer phase.\r
 ///\r
 typedef struct {\r
+  ///\r
+  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION.\r
+  ///\r
   EFI_HOB_GENERIC_HEADER            Header;\r
+  ///\r
+  /// An instance of the EFI_HOB_MEMORY_ALLOCATION_HEADER that describes the\r
+  /// various attributes of the logical memory allocation.\r
+  ///\r
   EFI_HOB_MEMORY_ALLOCATION_HEADER  MemoryAllocationHeader;\r
-  EFI_GUID ModuleName;\r
-  EFI_PHYSICAL_ADDRESS EntryPoint;\r
+  ///\r
+  /// The GUID specifying the values of the firmware file system name \r
+  /// that contains the HOB consumer phase component.\r
+  ///\r
+  EFI_GUID                          ModuleName;\r
+  ///\r
+  /// The address of the memory-mapped firmware volume \r
+  /// that contains the HOB consumer phase firmware file.\r
+  ///\r
+  EFI_PHYSICAL_ADDRESS              EntryPoint;\r
 } EFI_HOB_MEMORY_ALLOCATION_MODULE;\r
 \r
 ///\r
-/// type of Recount type \r
+/// Resource type \r
 /// \r
 typedef UINT32 EFI_RESOURCE_TYPE;\r
 \r
@@ -183,21 +256,21 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
 //\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_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_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
 \r
 ///\r
 /// Describes the resource properties of all fixed, \r
@@ -205,11 +278,30 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
 /// host bus during the HOB producer phase.\r
 /// \r
 typedef struct {\r
+  ///\r
+  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_RESOURCE_DESCRIPTOR.\r
+  ///\r
   EFI_HOB_GENERIC_HEADER      Header;\r
+  ///\r
+  /// A GUID representing the owner of the resource. This GUID is used by HOB\r
+  /// consumer phase components to correlate device ownership of a resource.\r
+  ///\r
   EFI_GUID                    Owner;\r
+  ///\r
+  /// Resource type enumeration as defined by EFI_RESOURCE_TYPE.\r
+  ///\r
   EFI_RESOURCE_TYPE           ResourceType;\r
+  ///\r
+  /// Resource attributes as defined by EFI_RESOURCE_ATTRIBUTE_TYPE.\r
+  ///\r
   EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute;\r
+  ///\r
+  /// Physical start address of the resource region. \r
+  ///\r
   EFI_PHYSICAL_ADDRESS        PhysicalStart;\r
+  ///\r
+  /// Number of bytes of the resource region.\r
+  ///\r
   UINT64                      ResourceLength;\r
 } EFI_HOB_RESOURCE_DESCRIPTOR;\r
 \r
@@ -218,21 +310,35 @@ typedef struct {
 /// maintain and manage HOBs with specific GUID.\r
 /// \r
 typedef struct {\r
+  ///\r
+  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_GUID_EXTENSION.\r
+  ///\r
   EFI_HOB_GENERIC_HEADER      Header;\r
-  EFI_GUID                    Name;\r
-\r
   ///\r
-  /// Guid specific data goes here\r
+  /// A GUID that defines the contents of this HOB.\r
   ///\r
+  EFI_GUID                    Name;\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
+  ///\r
+  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_FV.\r
+  ///\r
   EFI_HOB_GENERIC_HEADER Header;\r
-  EFI_PHYSICAL_ADDRESS BaseAddress;\r
-  UINT64 Length;\r
+  ///\r
+  /// The physical memory-mapped base address of the firmware volume.\r
+  ///\r
+  EFI_PHYSICAL_ADDRESS   BaseAddress;\r
+  ///\r
+  /// The length in bytes of the firmware volume.\r
+  ///\r
+  UINT64                 Length;\r
 } EFI_HOB_FIRMWARE_VOLUME;\r
 \r
 ///\r
@@ -240,10 +346,25 @@ typedef struct {
 /// from a file within another firmware volume.\r
 /// \r
 typedef struct {\r
+  ///\r
+  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_FV2.\r
+  ///\r
   EFI_HOB_GENERIC_HEADER  Header;\r
+  ///\r
+  /// The physical memory-mapped base address of the firmware volume.\r
+  ///\r
   EFI_PHYSICAL_ADDRESS    BaseAddress;\r
+  ///\r
+  /// The length in bytes of the firmware volume.\r
+  ///\r
   UINT64                  Length;\r
+  ///\r
+  /// The name of the firmware volume.\r
+  ///\r
   EFI_GUID                FvName;\r
+  ///\r
+  /// The name of the firmware file which contained this firmware volume.\r
+  ///\r
   EFI_GUID                FileName;\r
 } EFI_HOB_FIRMWARE_VOLUME2;\r
 \r
@@ -252,9 +373,21 @@ typedef struct {
 /// Describes processor information, such as address space and I/O space capabilities.\r
 ///\r
 typedef struct {\r
+  ///\r
+  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_CPU.\r
+  ///\r
   EFI_HOB_GENERIC_HEADER  Header;\r
+  ///\r
+  /// Identifies the maximum physical memory addressability of the processor.\r
+  ///\r
   UINT8                   SizeOfMemorySpace;\r
+  ///\r
+  /// Identifies the maximum physical I/O addressability of the processor.\r
+  ///\r
   UINT8                   SizeOfIoSpace;\r
+  ///\r
+  /// This field will always be set to zero.\r
+  ///\r
   UINT8                   Reserved[6];\r
 } EFI_HOB_CPU;\r
 \r
@@ -263,9 +396,34 @@ typedef struct {
 /// Describes pool memory allocations.\r
 /// \r
 typedef struct {\r
+  ///\r
+  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_POOL.\r
+  ///\r
   EFI_HOB_GENERIC_HEADER  Header;\r
 } EFI_HOB_MEMORY_POOL;\r
 \r
+///\r
+/// Each UEFI capsule HOB details the location of a UEFI capsule. It includes a base address and length\r
+/// which is based upon memory blocks with a EFI_CAPSULE_HEADER and the associated\r
+/// CapsuleImageSize-based payloads. These HOB’s shall be created by the PEI PI firmware\r
+/// sometime after the UEFI UpdateCapsule service invocation with the\r
+/// CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE flag set in the EFI_CAPSULE_HEADER.\r
+///\r
+typedef struct {\r
+  ///\r
+  /// The HOB generic header where Header.HobType = EFI_HOB_TYPE_UEFI_CAPSULE.\r
+  ///\r
+  EFI_HOB_GENERIC_HEADER Header;\r
+  \r
+  ///\r
+  /// The physical memory-mapped base address of an UEFI capsule. This value is set to\r
+  /// point to the base of the contiguous memory of the UEFI capsule.\r
+  /// The length of the contiguous memory in bytes\r
+  ///\r
+  EFI_PHYSICAL_ADDRESS   BaseAddress;\r
+  UINT64                 Length;\r
+} EFI_HOB_UEFI_CAPSULE;\r
+\r
 ///\r
 /// Union of all the possible HOB Types\r
 ///\r
@@ -282,6 +440,7 @@ typedef union {
   EFI_HOB_FIRMWARE_VOLUME2            *FirmwareVolume2;\r
   EFI_HOB_CPU                         *Cpu;\r
   EFI_HOB_MEMORY_POOL                 *Pool;\r
+  EFI_HOB_UEFI_CAPSULE                *Capsule;\r
   UINT8                               *Raw;\r
 } EFI_PEI_HOB_POINTERS;\r
 \r