]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Uefi/UefiSpec.h
MdePkg/ProcessorBind: add defines for page allocation granularity
[mirror_edk2.git] / MdePkg / Include / Uefi / UefiSpec.h
index 243f33078a5e962b4b8cdc3ca88b453f3fb64e41..57cb4e804f703e7e21c1cf6ca1b23b3aa65386ab 100644 (file)
@@ -1,11 +1,11 @@
 /** @file\r
   Include file that supports UEFI.\r
 \r
-  This include file must contain things defined in the UEFI 2.4 specification.\r
-  If a code construct is defined in the UEFI 2.4 specification it must be included\r
+  This include file must contain things defined in the UEFI 2.6 specification.\r
+  If a code construct is defined in the UEFI 2.6 specification it must be included\r
   by this include file.\r
 \r
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2016, 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
@@ -63,30 +63,35 @@ typedef enum {
 //\r
 // Memory cacheability attributes\r
 //\r
-#define EFI_MEMORY_UC   0x0000000000000001ULL\r
-#define EFI_MEMORY_WC   0x0000000000000002ULL\r
-#define EFI_MEMORY_WT   0x0000000000000004ULL\r
-#define EFI_MEMORY_WB   0x0000000000000008ULL\r
-#define EFI_MEMORY_UCE  0x0000000000000010ULL\r
+#define EFI_MEMORY_UC               0x0000000000000001ULL\r
+#define EFI_MEMORY_WC               0x0000000000000002ULL\r
+#define EFI_MEMORY_WT               0x0000000000000004ULL\r
+#define EFI_MEMORY_WB               0x0000000000000008ULL\r
+#define EFI_MEMORY_UCE              0x0000000000000010ULL\r
 //\r
 // Physical memory protection attributes\r
 //\r
 // Note: UEFI spec 2.5 and following: use EFI_MEMORY_RO as write-protected physical memory\r
 // protection attribute. Also, EFI_MEMORY_WP means cacheability attribute.\r
 //\r
-#define EFI_MEMORY_WP   0x0000000000001000ULL\r
-#define EFI_MEMORY_RP   0x0000000000002000ULL\r
-#define EFI_MEMORY_XP   0x0000000000004000ULL\r
-#define EFI_MEMORY_RO   0x0000000000020000ULL\r
+#define EFI_MEMORY_WP               0x0000000000001000ULL\r
+#define EFI_MEMORY_RP               0x0000000000002000ULL\r
+#define EFI_MEMORY_XP               0x0000000000004000ULL\r
+#define EFI_MEMORY_RO               0x0000000000020000ULL\r
 //\r
 // Physical memory persistence attribute. \r
 // The memory region supports byte-addressable non-volatility.\r
 //\r
-#define EFI_MEMORY_NV   0x0000000000008000ULL\r
+#define EFI_MEMORY_NV               0x0000000000008000ULL\r
+//\r
+// The memory region provides higher reliability relative to other memory in the system.\r
+// If all memory has the same reliability, then this bit is not used.\r
+//\r
+#define EFI_MEMORY_MORE_RELIABLE    0x0000000000010000ULL\r
 //\r
 // Runtime memory attribute\r
 //\r
-#define EFI_MEMORY_RUNTIME  0x8000000000000000ULL\r
+#define EFI_MEMORY_RUNTIME          0x8000000000000000ULL\r
 \r
 ///\r
 /// Memory descriptor version number.\r
@@ -128,6 +133,10 @@ typedef struct {
 \r
   @param[in]       Type         The type of allocation to perform.\r
   @param[in]       MemoryType   The type of memory to allocate.\r
+                                MemoryType values in the range 0x70000000..0x7FFFFFFF\r
+                                are reserved for OEM use. MemoryType values in the range\r
+                                0x80000000..0xFFFFFFFF are reserved for use by UEFI OS loaders\r
+                                that are provided by operating system vendors.\r
   @param[in]       Pages        The number of contiguous 4 KB pages to allocate.\r
   @param[in, out]  Memory       The pointer to a physical address. On input, the way in which the address is\r
                                 used depends on the value of Type.\r
@@ -136,9 +145,9 @@ typedef struct {
   @retval EFI_INVALID_PARAMETER 1) Type is not AllocateAnyPages or\r
                                 AllocateMaxAddress or AllocateAddress.\r
                                 2) MemoryType is in the range\r
+                                EfiMaxMemoryType..0x6FFFFFFF.\r
                                 3) Memory is NULL.\r
-                                4) MemoryType was EfiPersistentMemory.\r
-                                EfiMaxMemoryType..0x7FFFFFFF.\r
+                                4) MemoryType is EfiPersistentMemory.\r
   @retval EFI_OUT_OF_RESOURCES  The pages could not be allocated.\r
   @retval EFI_NOT_FOUND         The requested pages could not be found.\r
 \r
@@ -210,14 +219,19 @@ EFI_STATUS
   Allocates pool memory.\r
 \r
   @param[in]   PoolType         The type of pool to allocate.\r
+                                MemoryType values in the range 0x70000000..0x7FFFFFFF\r
+                                are reserved for OEM use. MemoryType values in the range\r
+                                0x80000000..0xFFFFFFFF are reserved for use by UEFI OS loaders\r
+                                that are provided by operating system vendors.\r
   @param[in]   Size             The number of bytes to allocate from the pool.\r
   @param[out]  Buffer           A pointer to a pointer to the allocated buffer if the call succeeds;\r
                                 undefined otherwise.\r
 \r
   @retval EFI_SUCCESS           The requested number of bytes was allocated.\r
   @retval EFI_OUT_OF_RESOURCES  The pool requested could not be allocated.\r
-  @retval EFI_INVALID_PARAMETER PoolType was invalid or Buffer is NULL.\r
-                                PoolType was EfiPersistentMemory.\r
+  @retval EFI_INVALID_PARAMETER Buffer is NULL.\r
+                                PoolType is in the range EfiMaxMemoryType..0x6FFFFFFF.\r
+                                PoolType is EfiPersistentMemory.\r
 \r
 **/\r
 typedef\r
@@ -613,7 +627,8 @@ VOID
                                  attributes bitmask for the variable.\r
   @param[in, out]  DataSize      On input, the size in bytes of the return Data buffer.\r
                                  On output the size of data returned in Data.\r
-  @param[out]      Data          The buffer to return the contents of the variable.\r
+  @param[out]      Data          The buffer to return the contents of the variable. May be NULL\r
+                                 with a zero DataSize in order to determine the size buffer needed.\r
 \r
   @retval EFI_SUCCESS            The function completed successfully.\r
   @retval EFI_NOT_FOUND          The variable was not found.\r
@@ -633,7 +648,7 @@ EFI_STATUS
   IN     EFI_GUID                    *VendorGuid,\r
   OUT    UINT32                      *Attributes,    OPTIONAL\r
   IN OUT UINTN                       *DataSize,\r
-  OUT    VOID                        *Data\r
+  OUT    VOID                        *Data           OPTIONAL\r
   );\r
 \r
 /**\r
@@ -989,11 +1004,15 @@ EFI_STATUS
 \r
   @param[in]  ResetType         The type of reset to perform.\r
   @param[in]  ResetStatus       The status code for the reset.\r
-  @param[in]  DataSize          The size, in bytes, of WatchdogData.\r
+  @param[in]  DataSize          The size, in bytes, of ResetData.\r
   @param[in]  ResetData         For a ResetType of EfiResetCold, EfiResetWarm, or\r
                                 EfiResetShutdown the data buffer starts with a Null-terminated\r
                                 string, optionally followed by additional binary data.\r
-\r
+                                The string is a description that the caller may use to further\r
+                                indicate the reason for the system reset. ResetData is only\r
+                                valid if ResetStatus is something other than EFI_SUCCESS\r
+                                unless the ResetType is EfiResetPlatformSpecific\r
+                                where a minimum amount of ResetData is always required.\r
 **/\r
 typedef\r
 VOID\r
@@ -1735,11 +1754,13 @@ EFI_STATUS
 #define EFI_OS_INDICATIONS_FILE_CAPSULE_DELIVERY_SUPPORTED  0x0000000000000004\r
 #define EFI_OS_INDICATIONS_FMP_CAPSULE_SUPPORTED            0x0000000000000008\r
 #define EFI_OS_INDICATIONS_CAPSULE_RESULT_VAR_SUPPORTED     0x0000000000000010\r
+#define EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY          0x0000000000000040\r
 \r
 //\r
 // EFI Runtime Services Table\r
 //\r
 #define EFI_SYSTEM_TABLE_SIGNATURE      SIGNATURE_64 ('I','B','I',' ','S','Y','S','T')\r
+#define EFI_2_60_SYSTEM_TABLE_REVISION  ((2 << 16) | (60))\r
 #define EFI_2_50_SYSTEM_TABLE_REVISION  ((2 << 16) | (50))\r
 #define EFI_2_40_SYSTEM_TABLE_REVISION  ((2 << 16) | (40))\r
 #define EFI_2_31_SYSTEM_TABLE_REVISION  ((2 << 16) | (31))\r
@@ -1749,7 +1770,7 @@ EFI_STATUS
 #define EFI_2_00_SYSTEM_TABLE_REVISION  ((2 << 16) | (00))\r
 #define EFI_1_10_SYSTEM_TABLE_REVISION  ((1 << 16) | (10))\r
 #define EFI_1_02_SYSTEM_TABLE_REVISION  ((1 << 16) | (02))\r
-#define EFI_SYSTEM_TABLE_REVISION       EFI_2_50_SYSTEM_TABLE_REVISION\r
+#define EFI_SYSTEM_TABLE_REVISION       EFI_2_60_SYSTEM_TABLE_REVISION\r
 #define EFI_SPECIFICATION_VERSION       EFI_SYSTEM_TABLE_REVISION\r
 \r
 #define EFI_RUNTIME_SERVICES_SIGNATURE  SIGNATURE_64 ('R','U','N','T','S','E','R','V')\r
@@ -2056,17 +2077,18 @@ typedef struct _EFI_LOAD_OPTION {
 //\r
 // EFI Load Options Attributes\r
 //\r
-#define LOAD_OPTION_ACTIVE            0x00000001\r
-#define LOAD_OPTION_FORCE_RECONNECT   0x00000002\r
-#define LOAD_OPTION_HIDDEN            0x00000008\r
-#define LOAD_OPTION_CATEGORY          0x00001F00\r
-\r
-#define LOAD_OPTION_CATEGORY_BOOT     0x00000000\r
-#define LOAD_OPTION_CATEGORY_APP      0x00000100\r
-\r
-#define EFI_BOOT_OPTION_SUPPORT_KEY   0x00000001\r
-#define EFI_BOOT_OPTION_SUPPORT_APP   0x00000002\r
-#define EFI_BOOT_OPTION_SUPPORT_COUNT 0x00000300\r
+#define LOAD_OPTION_ACTIVE              0x00000001\r
+#define LOAD_OPTION_FORCE_RECONNECT     0x00000002\r
+#define LOAD_OPTION_HIDDEN              0x00000008\r
+#define LOAD_OPTION_CATEGORY            0x00001F00\r
+\r
+#define LOAD_OPTION_CATEGORY_BOOT       0x00000000\r
+#define LOAD_OPTION_CATEGORY_APP        0x00000100\r
+\r
+#define EFI_BOOT_OPTION_SUPPORT_KEY     0x00000001\r
+#define EFI_BOOT_OPTION_SUPPORT_APP     0x00000002\r
+#define EFI_BOOT_OPTION_SUPPORT_SYSPREP 0x00000010\r
+#define EFI_BOOT_OPTION_SUPPORT_COUNT   0x00000300\r
 \r
 ///\r
 /// EFI Boot Key Data\r