]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Uefi/UefiMultiPhase.h
ShellPkg: Fix buffer overflow issue in 'map' command.
[mirror_edk2.git] / MdePkg / Include / Uefi / UefiMultiPhase.h
index 7c4cec1103bf9fbb6996008c287643df2f56b7a6..1a879c191de450c0fe6ac7a2882363401affebc4 100644 (file)
@@ -1,14 +1,14 @@
 /** @file\r
   This includes some definitions introduced in UEFI that will be used in both PEI and DXE phases.\r
 \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
-  http://opensource.org/licenses/bsd-license.php                                            \r
+Copyright (c) 2006 - 2015, 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
+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
 **/\r
 \r
 #include <Guid/WinCertificate.h>\r
 ///\r
 /// Enumeration of memory types introduced in UEFI.\r
-/// \r
+///\r
 typedef enum {\r
   ///\r
   /// Not used.\r
   ///\r
   EfiReservedMemoryType,\r
   ///\r
-  /// The code portions of a loaded application. \r
+  /// The code portions of a loaded application.\r
   /// (Note that UEFI OS loaders are UEFI applications.)\r
   ///\r
   EfiLoaderCode,\r
@@ -35,7 +35,7 @@ typedef enum {
   ///\r
   EfiLoaderData,\r
   ///\r
-  /// The code portions of a loaded Boot Services Driver\r
+  /// The code portions of a loaded Boot Services Driver.\r
   ///\r
   EfiBootServicesCode,\r
   ///\r
@@ -82,12 +82,17 @@ typedef enum {
   /// Address space reserved by the firmware for code that is part of the processor.\r
   ///\r
   EfiPalCode,\r
+  ///\r
+  /// A memory region that operates as EfiConventionalMemory, \r
+  /// however it happens to also support byte-addressable non-volatility.\r
+  ///\r
+  EfiPersistentMemory,\r
   EfiMaxMemoryType\r
 } EFI_MEMORY_TYPE;\r
 \r
 ///\r
 /// Data structure that precedes all of the standard EFI table types.\r
-/// \r
+///\r
 typedef struct {\r
   ///\r
   /// A 64-bit signature that identifies the type of table that follows.\r
@@ -119,22 +124,27 @@ typedef struct {
 \r
 ///\r
 /// Attributes of variable.\r
-/// \r
-#define EFI_VARIABLE_NON_VOLATILE                 0x00000001\r
-#define EFI_VARIABLE_BOOTSERVICE_ACCESS           0x00000002\r
-#define EFI_VARIABLE_RUNTIME_ACCESS               0x00000004\r
-#define EFI_VARIABLE_HARDWARE_ERROR_RECORD        0x00000008\r
-\r
 ///\r
-/// This attribute is identified by the mnemonic 'HR' \r
+#define EFI_VARIABLE_NON_VOLATILE                            0x00000001\r
+#define EFI_VARIABLE_BOOTSERVICE_ACCESS                      0x00000002\r
+#define EFI_VARIABLE_RUNTIME_ACCESS                          0x00000004\r
+///\r
+/// This attribute is identified by the mnemonic 'HR'\r
 /// elsewhere in this specification.\r
-/// \r
-#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS   0x00000010\r
+///\r
+#define EFI_VARIABLE_HARDWARE_ERROR_RECORD                   0x00000008\r
+///\r
+/// Attributes of Authenticated Variable\r
+///\r
+#define EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS              0x00000010\r
+#define EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS   0x00000020\r
+#define EFI_VARIABLE_APPEND_WRITE                            0x00000040\r
 \r
-///   \r
+\r
+///\r
 /// AuthInfo is a WIN_CERTIFICATE using the wCertificateType\r
 /// WIN_CERTIFICATE_UEFI_GUID and the CertType\r
-/// EFI_CERT_TYPE_RSA2048_SHA256. If the attribute specifies\r
+/// EFI_CERT_TYPE_RSA2048_SHA256_GUID. If the attribute specifies\r
 /// authenticated access, then the Data buffer should begin with an\r
 /// authentication descriptor prior to the data payload and DataSize\r
 /// should reflect the the data.and descriptor size. The caller\r
@@ -144,26 +154,45 @@ typedef struct {
 /// key associated w/ the public/private 2048-bit RSA key-pair. The\r
 /// WIN_CERTIFICATE shall be used to describe the signature of the\r
 /// Variable data *Data. In addition, the signature will also\r
-/// include the MonotonicCount value to guard against replay attacks\r
-///  \r
+/// include the MonotonicCount value to guard against replay attacks.\r
+///\r
 typedef struct {\r
   ///\r
-  /// Included in the signature of        \r
+  /// Included in the signature of\r
   /// AuthInfo.Used to ensure freshness/no\r
-  /// replay. Incremented during each     \r
-  /// "Write" access.   \r
-  ///                  \r
+  /// replay. Incremented during each\r
+  /// "Write" access.\r
+  ///\r
   UINT64                      MonotonicCount;\r
   ///\r
-  /// Provides the authorization for the variable \r
-  /// access. It is a signature across the        \r
-  /// variable data and the  Monotonic Count      \r
-  /// value. Caller uses Private key that is      \r
-  /// associated with a public key that has been  \r
-  /// provisioned via the key exchange.           \r
+  /// Provides the authorization for the variable\r
+  /// access. It is a signature across the\r
+  /// variable data and the  Monotonic Count\r
+  /// value. Caller uses Private key that is\r
+  /// associated with a public key that has been\r
+  /// provisioned via the key exchange.\r
   ///\r
   WIN_CERTIFICATE_UEFI_GUID   AuthInfo;\r
 } EFI_VARIABLE_AUTHENTICATION;\r
 \r
-#endif\r
+///\r
+/// When the attribute EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS is\r
+/// set, then the Data buffer shall begin with an instance of a complete (and serialized)\r
+/// EFI_VARIABLE_AUTHENTICATION_2 descriptor. The descriptor shall be followed by the new\r
+/// variable value and DataSize shall reflect the combined size of the descriptor and the new\r
+/// variable value. The authentication descriptor is not part of the variable data and is not\r
+/// returned by subsequent calls to GetVariable().\r
+///\r
+typedef struct {\r
+  ///\r
+  /// For the TimeStamp value, components Pad1, Nanosecond, TimeZone, Daylight and\r
+  /// Pad2 shall be set to 0. This means that the time shall always be expressed in GMT.\r
+  ///\r
+  EFI_TIME                    TimeStamp;\r
+  ///\r
+  /// Only a CertType of  EFI_CERT_TYPE_PKCS7_GUID is accepted.\r
+  ///\r
+  WIN_CERTIFICATE_UEFI_GUID   AuthInfo;\r
+ } EFI_VARIABLE_AUTHENTICATION_2;\r
 \r
+#endif\r