]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Pi/PiHob.h
MdePkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / MdePkg / Include / Pi / PiHob.h
index a6fed4e43f3cc2467d882748854a6bba42e71eab..62c07742a688e249db8e22271105f76f1eeff971 100644 (file)
@@ -1,17 +1,11 @@
 /** @file\r
   HOB related definitions in PI.\r
 \r
-Copyright (c) 2006 - 2010, Intel Corporation.  All rights reserved<BR>\r
-This program and the accompanying materials are licensed and made available under \r
-the terms and conditions of the BSD License that accompanies this distribution.  \r
-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
+Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>\r
+SPDX-License-Identifier: BSD-2-Clause-Patent\r
 \r
   @par Revision Reference:\r
-  PI Version 1.0\r
+  PI Version 1.6\r
 \r
 **/\r
 \r
@@ -20,7 +14,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 \r
 //\r
 // HobType of EFI_HOB_GENERIC_HEADER.\r
-// \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
@@ -31,13 +25,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
 #define EFI_HOB_TYPE_FV2                  0x0009\r
 #define EFI_HOB_TYPE_LOAD_PEIM_UNUSED     0x000A\r
 #define EFI_HOB_TYPE_UEFI_CAPSULE         0x000B\r
+#define EFI_HOB_TYPE_FV3                  0x000C\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
+/// Describes the format and size of the data inside the HOB.\r
 /// All HOBs must contain this generic HOB header.\r
-/// \r
+///\r
 typedef struct {\r
   ///\r
   /// Identifies the HOB data structure type.\r
@@ -56,13 +51,13 @@ typedef struct {
 \r
 ///\r
 /// Value of version  in EFI_HOB_HANDOFF_INFO_TABLE.\r
-/// \r
+///\r
 #define EFI_HOB_HANDOFF_TABLE_VERSION 0x0009\r
 \r
 ///\r
-/// Contains general state information used by the HOB producer phase. \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
 typedef struct {\r
   ///\r
   /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_HANDOFF.\r
@@ -70,7 +65,7 @@ typedef struct {
   EFI_HOB_GENERIC_HEADER  Header;\r
   ///\r
   /// The version number pertaining to the PHIT HOB definition.\r
-  /// This value is four bytes in length to provide an 8-byte aligned entry \r
+  /// This value is four 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
@@ -88,7 +83,7 @@ typedef struct {
   ///\r
   EFI_PHYSICAL_ADDRESS    EfiMemoryBottom;\r
   ///\r
-  /// The highest address location of free memory that is currently available \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
@@ -102,19 +97,19 @@ typedef struct {
   EFI_PHYSICAL_ADDRESS    EfiEndOfHobList;\r
 } EFI_HOB_HANDOFF_INFO_TABLE;\r
 \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
+///\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
+  /// specification.\r
+  ///\r
   EFI_GUID              Name;\r
 \r
   ///\r
@@ -124,16 +119,16 @@ typedef struct {
   ///\r
   EFI_PHYSICAL_ADDRESS  MemoryBaseAddress;\r
 \r
-  /// \r
+  ///\r
   /// The length in bytes of memory allocated by this HOB.\r
-  /// \r
+  ///\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
+  ///\r
   EFI_MEMORY_TYPE       MemoryType;\r
 \r
   ///\r
@@ -143,8 +138,8 @@ typedef struct {
 } 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 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, not the physical attributes of memory.\r
 ///\r
 typedef struct {\r
@@ -165,10 +160,10 @@ typedef struct {
 \r
 \r
 ///\r
-/// Describes the memory stack that is produced by the HOB producer \r
+/// Describes the memory stack that is produced by the HOB producer\r
 /// phase and upon which all post-memory-installed executable\r
 /// content in the HOB producer phase is executing.\r
-/// \r
+///\r
 typedef struct {\r
   ///\r
   /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION.\r
@@ -182,11 +177,11 @@ typedef struct {
 } EFI_HOB_MEMORY_ALLOCATION_STACK;\r
 \r
 ///\r
-/// Defines the location of the boot-strap \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
+/// This HOB is valid for the Itanium processor family only\r
 /// register overflow store.\r
-/// \r
+///\r
 typedef struct {\r
   ///\r
   /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_ALLOCATION.\r
@@ -213,12 +208,12 @@ typedef struct {
   ///\r
   EFI_HOB_MEMORY_ALLOCATION_HEADER  MemoryAllocationHeader;\r
   ///\r
-  /// The GUID specifying the values of the firmware file system name \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
+  /// The address of the memory-mapped firmware volume\r
   /// that contains the HOB consumer phase firmware file.\r
   ///\r
   EFI_PHYSICAL_ADDRESS              EntryPoint;\r
@@ -226,12 +221,12 @@ typedef struct {
 \r
 ///\r
 /// The resource type.\r
-/// \r
+///\r
 typedef UINT32 EFI_RESOURCE_TYPE;\r
 \r
 //\r
 // Value of ResourceType in EFI_HOB_RESOURCE_DESCRIPTOR.\r
-// \r
+//\r
 #define EFI_RESOURCE_SYSTEM_MEMORY          0x00000000\r
 #define EFI_RESOURCE_MEMORY_MAPPED_IO       0x00000001\r
 #define EFI_RESOURCE_IO                     0x00000002\r
@@ -243,27 +238,35 @@ typedef UINT32 EFI_RESOURCE_TYPE;
 \r
 ///\r
 /// A type of recount attribute type.\r
-/// \r
+///\r
 typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;\r
 \r
 //\r
 // These types can be ORed together as needed.\r
 //\r
-// The first three enumerations describe settings\r
+// The following attributes are used to 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_READ_PROTECTED           0x00000080\r
+//\r
+// This is typically used as memory cacheability attribute today.\r
+// NOTE: Since PI spec 1.4, please use EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED\r
+// as Physical write protected attribute, and EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTED\r
+// means Memory cacheability attribute: The memory supports being programmed with\r
+// a writeprotected cacheable attribute.\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_WRITE_PROTECTED          0x00000100\r
+#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTED      0x00000200\r
+#define EFI_RESOURCE_ATTRIBUTE_PERSISTENT               0x00800000\r
 //\r
-// The rest of the settings describe capabilities\r
+// The rest of the attributes are used to 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
@@ -272,12 +275,34 @@ typedef UINT32 EFI_RESOURCE_ATTRIBUTE_TYPE;
 #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_READ_PROTECTABLE         0x00100000\r
+//\r
+// This is typically used as memory cacheability attribute today.\r
+// NOTE: Since PI spec 1.4, please use EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE\r
+// as Memory capability attribute: The memory supports being protected from processor\r
+// writes, and EFI_RESOURCE_ATTRIBUTE_WRITE_PROTEC TABLE means Memory cacheability attribute:\r
+// The memory supports being programmed with a writeprotected cacheable attribute.\r
+//\r
+#define EFI_RESOURCE_ATTRIBUTE_WRITE_PROTECTABLE        0x00200000\r
+#define EFI_RESOURCE_ATTRIBUTE_EXECUTION_PROTECTABLE    0x00400000\r
+#define EFI_RESOURCE_ATTRIBUTE_PERSISTABLE              0x01000000\r
+\r
+#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTED      0x00040000\r
+#define EFI_RESOURCE_ATTRIBUTE_READ_ONLY_PROTECTABLE    0x00080000\r
+\r
+//\r
+// Physical memory relative reliability attribute. This\r
+// memory provides higher reliability relative to other\r
+// memory in the system. If all memory has the same\r
+// reliability, then this bit is not used.\r
+//\r
+#define EFI_RESOURCE_ATTRIBUTE_MORE_RELIABLE            0x02000000\r
 \r
 ///\r
-/// Describes the resource properties of all fixed, \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
 typedef struct {\r
   ///\r
   /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_RESOURCE_DESCRIPTOR.\r
@@ -297,7 +322,7 @@ typedef struct {
   ///\r
   EFI_RESOURCE_ATTRIBUTE_TYPE ResourceAttribute;\r
   ///\r
-  /// The physical start address of the resource region. \r
+  /// The physical start address of the resource region.\r
   ///\r
   EFI_PHYSICAL_ADDRESS        PhysicalStart;\r
   ///\r
@@ -307,9 +332,9 @@ typedef struct {
 } EFI_HOB_RESOURCE_DESCRIPTOR;\r
 \r
 ///\r
-/// Allows writers of executable content in the HOB producer phase to \r
+/// Allows writers of executable content in the HOB producer phase to\r
 /// maintain and manage HOBs with specific GUID.\r
-/// \r
+///\r
 typedef struct {\r
   ///\r
   /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_GUID_EXTENSION.\r
@@ -326,7 +351,7 @@ typedef struct {
 \r
 ///\r
 /// Details the location of firmware volumes that contain firmware files.\r
-/// \r
+///\r
 typedef struct {\r
   ///\r
   /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_FV.\r
@@ -343,9 +368,9 @@ typedef struct {
 } EFI_HOB_FIRMWARE_VOLUME;\r
 \r
 ///\r
-/// Details the location of a firmware volume that was extracted \r
+/// Details the location of a firmware volume that was extracted\r
 /// from a file within another firmware volume.\r
-/// \r
+///\r
 typedef struct {\r
   ///\r
   /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_FV2.\r
@@ -369,6 +394,43 @@ typedef struct {
   EFI_GUID                FileName;\r
 } EFI_HOB_FIRMWARE_VOLUME2;\r
 \r
+///\r
+/// Details the location of a firmware volume that was extracted\r
+/// from a file within another firmware volume.\r
+///\r
+typedef struct {\r
+  ///\r
+  /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_FV3.\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 authentication status.\r
+  ///\r
+  UINT32                  AuthenticationStatus;\r
+  ///\r
+  /// TRUE if the FV was extracted as a file within another firmware volume.\r
+  /// FALSE otherwise.\r
+  ///\r
+  BOOLEAN                 ExtractedFv;\r
+  ///\r
+  /// The name of the firmware volume.\r
+  /// Valid only if IsExtractedFv is TRUE.\r
+  ///\r
+  EFI_GUID                FvName;\r
+  ///\r
+  /// The name of the firmware file that contained this firmware volume.\r
+  /// Valid only if IsExtractedFv is TRUE.\r
+  ///\r
+  EFI_GUID                FileName;\r
+} EFI_HOB_FIRMWARE_VOLUME3;\r
 \r
 ///\r
 /// Describes processor information, such as address space and I/O space capabilities.\r
@@ -395,7 +457,7 @@ typedef struct {
 \r
 ///\r
 /// Describes pool memory allocations.\r
-/// \r
+///\r
 typedef struct {\r
   ///\r
   /// The HOB generic header. Header.HobType = EFI_HOB_TYPE_MEMORY_POOL.\r
@@ -415,7 +477,7 @@ typedef struct {
   /// The HOB generic header where Header.HobType = EFI_HOB_TYPE_UEFI_CAPSULE.\r
   ///\r
   EFI_HOB_GENERIC_HEADER Header;\r
-  \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
@@ -439,6 +501,7 @@ typedef union {
   EFI_HOB_GUID_TYPE                   *Guid;\r
   EFI_HOB_FIRMWARE_VOLUME             *FirmwareVolume;\r
   EFI_HOB_FIRMWARE_VOLUME2            *FirmwareVolume2;\r
+  EFI_HOB_FIRMWARE_VOLUME3            *FirmwareVolume3;\r
   EFI_HOB_CPU                         *Cpu;\r
   EFI_HOB_MEMORY_POOL                 *Pool;\r
   EFI_HOB_UEFI_CAPSULE                *Capsule;\r
@@ -446,4 +509,4 @@ typedef union {
 } EFI_PEI_HOB_POINTERS;\r
 \r
 \r
-#endif \r
+#endif\r