]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Uefi/UefiSpec.h
NvVarsFileLib: Fix build warning with VS2005 on X64.
[mirror_edk2.git] / MdePkg / Include / Uefi / UefiSpec.h
index df3b373278e976bdf6736fc67eeffb31ef39dc7d..199ee37a591b6049616c38276401f6455820f930 100644 (file)
@@ -5,7 +5,8 @@
   If a code construct is defined in the UEFI 2.1 specification it must be included\r
   by this include file.\r
 \r
-  Copyright (c) 2006 - 2008, Intel Corporation\r
+  Copyright (c) 2006 - 2009, Intel Corporation<BR>\r
+  Portions copyright (c) 2008-2009 Apple Inc. All rights reserved.<BR>\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
@@ -328,7 +329,6 @@ EFI_STATUS
 // ConvertPointer DebugDisposition type.\r
 //\r
 #define EFI_OPTIONAL_PTR     0x00000001\r
-#define EFI_OPTIONAL_POINTER EFI_OPTIONAL_PTR\r
 \r
 /**\r
   Determines the new virtual address that is to be used on subsequent memory accesses.\r
@@ -653,23 +653,28 @@ EFI_STATUS
 /**\r
   Sets the value of a variable.\r
 \r
-  @param  VariableName          A Null-terminated Unicode string that is the name of the\r
-                                vendor's variable.\r
-  @param  VendorGuid            A unique identifier for the vendor.\r
-  @param  Attributes            Attributes bitmask to set for the variable.\r
-  @param  DataSize              The size in bytes of the Data buffer.\r
-  @param  Data                  The contents for the variable.\r
+  @param  VariableName           A Null-terminated string that is the name of the vendor's variable.\r
+                                 Each VariableName is unique for each VendorGuid. VariableName must\r
+                                 contain 1 or more characters. If VariableName is an empty string,\r
+                                 then EFI_INVALID_PARAMETER is returned.\r
+  @param  VendorGuid             A unique identifier for the vendor.\r
+  @param  Attributes             Attributes bitmask to set for the variable.\r
+  @param  DataSize               The size in bytes of the Data buffer. A size of zero causes the\r
+                                 variable to be deleted.\r
+  @param  Data                   The contents for the variable.\r
 \r
   @retval EFI_SUCCESS            The firmware has successfully stored the variable and its data as\r
                                  defined by the Attributes.\r
   @retval EFI_INVALID_PARAMETER  An invalid combination of attribute bits was supplied, or the\r
                                  DataSize exceeds the maximum allowed.\r
-  @retval EFI_INVALID_PARAMETER  VariableName is an empty Unicode string.\r
+  @retval EFI_INVALID_PARAMETER  VariableName is an empty string.\r
   @retval EFI_OUT_OF_RESOURCES   Not enough storage is available to hold the variable and its data.\r
   @retval EFI_DEVICE_ERROR       The variable could not be retrieved due to a hardware error.\r
   @retval EFI_WRITE_PROTECTED    The variable in question is read-only.\r
   @retval EFI_WRITE_PROTECTED    The variable in question cannot be deleted.\r
-  @retval EFI_SECURITY_VIOLATION The variable could not be retrieved due to an authentication failure.\r
+  @retval EFI_SECURITY_VIOLATION The variable could not be written due to EFI_VARIABLE_AUTHENTICATED_WRITE_ACCESS\r
+                                 set but the AuthInfo does NOT pass the validation check carried out\r
+                                 by the firmware.\r
   @retval EFI_NOT_FOUND          The variable trying to be updated or deleted was not found.\r
 \r
 **/\r
@@ -689,8 +694,27 @@ EFI_STATUS
 /// real time clock device as exposed through the EFI interfaces.\r
 ///\r
 typedef struct {\r
+  ///\r
+  /// Provides the reporting resolution of the real-time clock device in\r
+  /// counts per second. For a normal PC-AT CMOS RTC device, this\r
+  /// value would be 1 Hz, or 1, to indicate that the device only reports\r
+  /// the time to the resolution of 1 second.\r
+  ///\r
   UINT32    Resolution;\r
+  ///\r
+  /// Provides the timekeeping accuracy of the real-time clock in an\r
+  /// error rate of 1E-6 parts per million. For a clock with an accuracy\r
+  /// of 50 parts per million, the value in this field would be\r
+  /// 50,000,000.\r
+  ///\r
   UINT32    Accuracy;\r
+  ///\r
+  /// A TRUE indicates that a time set operation clears the device's\r
+  /// time below the Resolution reporting level. A FALSE\r
+  /// indicates that the state below the Resolution level of the\r
+  /// device is not cleared when the time is set. Normal PC-AT CMOS\r
+  /// RTC devices set this value to FALSE.\r
+  ///\r
   BOOLEAN   SetsToZero;\r
 } EFI_TIME_CAPABILITIES;\r
 \r
@@ -946,7 +970,7 @@ typedef enum {
   ///\r
   EfiResetWarm,\r
   ///\r
-  /// Used to induce en entry into power state equivalent to the ACPI G2/S5 or G3\r
+  /// Used to induce an entry into a power state equivalent to the ACPI G2/S5 or G3\r
   /// state.  If the system does not support this reset type, then when the system\r
   /// is rebooted, it should exhibit the EfiResetCold attributes.\r
   ///\r
@@ -1527,9 +1551,22 @@ EFI_STATUS
 /// EFI Capsule Block Descriptor\r
 ///\r
 typedef struct {\r
+  ///\r
+  /// Length in bytes of the data pointed to by DataBlock/ContinuationPointer.\r
+  ///\r
   UINT64                  Length;\r
   union {\r
+    ///\r
+    /// Physical address of the data block. This member of the union is\r
+    /// used if Length is not equal to zero.\r
+    ///\r
     EFI_PHYSICAL_ADDRESS  DataBlock;\r
+    ///\r
+    /// Physical address of another block of\r
+    /// EFI_CAPSULE_BLOCK_DESCRIPTOR structures. This\r
+    /// member of the union is used if Length is equal to zero. If\r
+    /// ContinuationPointer is zero this entry represents the end of the list.\r
+    ///\r
     EFI_PHYSICAL_ADDRESS  ContinuationPointer;\r
   } Union;\r
 } EFI_CAPSULE_BLOCK_DESCRIPTOR;\r
@@ -1538,24 +1575,47 @@ typedef struct {
 /// EFI Capsule Header\r
 ///\r
 typedef struct {\r
+  ///\r
+  /// A GUID that defines the contents of a capsule.\r
+  ///\r
   EFI_GUID          CapsuleGuid;\r
+  ///\r
+  /// The size of the capsule header. This may be larger than the size of\r
+  /// the EFI_CAPSULE_HEADER since CapsuleGuid may imply\r
+  /// extended header entries\r
+  ///\r
   UINT32            HeaderSize;\r
+  ///\r
+  /// Bit-mapped list describing the capsule attributes. The Flag values\r
+  /// of 0x0000 - 0xFFFF are defined by CapsuleGuid. Flag values\r
+  /// of 0x10000 - 0xFFFFFFFF are defined by this specification\r
+  ///\r
   UINT32            Flags;\r
+  ///\r
+  /// Size in bytes of the capsule.\r
+  ///\r
   UINT32            CapsuleImageSize;\r
 } EFI_CAPSULE_HEADER;\r
 \r
-//\r
-// The EFI System Table entry must point to an array of capsules\r
-// that contain the same CapsuleGuid value. The array must be\r
-// prefixed by a UINT32 that represents the size of the array of capsules.\r
-//\r
+///\r
+/// The EFI System Table entry must point to an array of capsules\r
+/// that contain the same CapsuleGuid value. The array must be\r
+/// prefixed by a UINT32 that represents the size of the array of capsules.\r
+///\r
 typedef struct {\r
+  ///\r
+  /// the size of the array of capsules.\r
+  ///\r
   UINT32   CapsuleArrayNumber;\r
+  ///\r
+  /// Point to an array of capsules that contain the same CapsuleGuid value.\r
+  ///\r
   VOID*    CapsulePtr[1];\r
 } EFI_CAPSULE_TABLE;\r
 \r
 #define CAPSULE_FLAGS_PERSIST_ACROSS_RESET          0x00010000\r
 #define CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE         0x00020000\r
+#define CAPSULE_FLAGS_INITIATE_RESET                0x00040000\r
 \r
 /**\r
   Passes capsules to the firmware with both virtual and physical mapping. Depending on the intended\r
@@ -1575,8 +1635,10 @@ typedef struct {
   @retval EFI_SUCCESS           Valid capsule was passed. If\r
                                 CAPSULE_FLAGS_PERSIT_ACROSS_RESET is not set, the\r
                                 capsule has been successfully processed by the firmware.\r
+  @retval EFI_INVALID_PARAMETER CapsuleSize is NULL, or an incompatible set of flags were\r
+                                set in the capsule header.\r
+  @retval EFI_INVALID_PARAMETER CapsuleCount is 0.\r
   @retval EFI_DEVICE_ERROR      The capsule update was started, but failed due to a device error.\r
-  @retval EFI_INVALID_PARAMETER CapsuleSize is NULL.\r
   @retval EFI_UNSUPPORTED       The capsule type is not supported on this platform.\r
   @retval EFI_OUT_OF_RESOURCES  There were insufficient resources to process the capsule.\r
 \r
@@ -1652,14 +1714,16 @@ EFI_STATUS
 //\r
 // EFI Runtime Services Table\r
 //\r
-#define EFI_SYSTEM_TABLE_SIGNATURE      EFI_SIGNATURE_64 ('I','B','I',' ','S','Y','S','T')\r
+#define EFI_SYSTEM_TABLE_SIGNATURE      SIGNATURE_64 ('I','B','I',' ','S','Y','S','T')\r
 #define EFI_SYSTEM_TABLE_REVISION       ((2 << 16) | (10))\r
+#define EFI_2_30_SYSTEM_TABLE_REVISION  ((2 << 16) | (30))\r
+#define EFI_2_20_SYSTEM_TABLE_REVISION  ((2 << 16) | (20))\r
 #define EFI_2_10_SYSTEM_TABLE_REVISION  ((2 << 16) | (10))\r
 #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
 \r
-#define EFI_RUNTIME_SERVICES_SIGNATURE  EFI_SIGNATURE_64 ('R','U','N','T','S','E','R','V')\r
+#define EFI_RUNTIME_SERVICES_SIGNATURE  SIGNATURE_64 ('R','U','N','T','S','E','R','V')\r
 #define EFI_RUNTIME_SERVICES_REVISION   EFI_2_10_SYSTEM_TABLE_REVISION\r
 \r
 ///\r
@@ -1711,7 +1775,7 @@ typedef struct {
 } EFI_RUNTIME_SERVICES;\r
 \r
 \r
-#define EFI_BOOT_SERVICES_SIGNATURE   EFI_SIGNATURE_64 ('B','O','O','T','S','E','R','V')\r
+#define EFI_BOOT_SERVICES_SIGNATURE   SIGNATURE_64 ('B','O','O','T','S','E','R','V')\r
 #define EFI_BOOT_SERVICES_REVISION    EFI_2_10_SYSTEM_TABLE_REVISION\r
 \r
 ///\r
@@ -1850,7 +1914,7 @@ typedef struct {
   ///\r
   EFI_HANDLE                        ConsoleInHandle;\r
   ///\r
-  /// A pointer to the SIMPLE_INPUT_PROTOCOL interface that is\r
+  /// A pointer to the EFI_SIMPLE_TEXT_INPUT_PROTOCOL interface that is\r
   /// associated with ConsoleInHandle.\r
   ///\r
   EFI_SIMPLE_TEXT_INPUT_PROTOCOL    *ConIn;\r
@@ -1859,7 +1923,7 @@ typedef struct {
   ///\r
   EFI_HANDLE                        ConsoleOutHandle;\r
   ///\r
-  /// A pointer to the SIMPLE_TEXT_OUTPUT_PROTOCOL interface\r
+  /// A pointer to the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface\r
   /// that is associated with ConsoleOutHandle.\r
   ///\r
   EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL   *ConOut;\r
@@ -1868,7 +1932,7 @@ typedef struct {
   ///\r
   EFI_HANDLE                        StandardErrorHandle;\r
   ///\r
-  /// A pointer to the SIMPLE_TEXT_OUTPUT_PROTOCOL interface\r
+  /// A pointer to the EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL interface\r
   /// that is associated with StandardErrorHandle.\r
   ///\r
   EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL   *StdErr;\r
@@ -1929,14 +1993,40 @@ EFI_STATUS
 ///\r
 typedef union {\r
   struct {\r
+    ///\r
+    /// Indicates the revision of the EFI_KEY_OPTION structure. This revision level should be 0.\r
+    ///\r
     UINT32  Revision        : 8;\r
+    ///\r
+    /// Either the left or right Shift keys must be pressed (1) or must not be pressed (0).\r
+    ///\r
     UINT32  ShiftPressed    : 1;\r
+    ///\r
+    /// Either the left or right Control keys must be pressed (1) or must not be pressed (0).\r
+    ///\r
     UINT32  ControlPressed  : 1;\r
+    ///\r
+    /// Either the left or right Alt keys must be pressed (1) or must not be pressed (0).\r
+    ///\r
     UINT32  AltPressed      : 1;\r
+    ///\r
+    /// Either the left or right Logo keys must be pressed (1) or must not be pressed (0).\r
+    ///\r
     UINT32  LogoPressed     : 1;\r
+    ///\r
+    /// The Menu key must be pressed (1) or must not be pressed (0).\r
+    ///\r
     UINT32  MenuPressed     : 1;\r
-    UINT32  SysReqPessed    : 1;\r
+    ///\r
+    /// The SysReq key must be pressed (1) or must not be pressed (0).\r
+    ///\r
+    UINT32  SysReqPressed    : 1;\r
     UINT32  Reserved        : 16;\r
+    ///\r
+    /// Specifies the actual number of entries in EFI_KEY_OPTION.Keys, from 0-3. If\r
+    /// zero, then only the shift state is considered. If more than one, then the boot option will\r
+    /// only be launched if all of the specified keys are pressed with the same shift state.\r
+    ///\r
     UINT32  InputKeyCount   : 2;\r
   } Options;\r
   UINT32  PackedValue;\r
@@ -1946,26 +2036,36 @@ typedef union {
 /// EFI Key Option\r
 ///\r
 typedef struct {\r
-  EFI_BOOT_KEY_DATA  KeyOptions;\r
+  ///\r
+  /// Specifies options about how the key will be processed.\r
+  ///\r
+  EFI_BOOT_KEY_DATA  KeyData;\r
+  ///\r
+  /// The CRC-32 which should match the CRC-32 of the entire EFI_LOAD_OPTION to\r
+  /// which BootOption refers. If the CRC-32s do not match this value, then this key\r
+  /// option is ignored.\r
+  ///\r
   UINT32             BootOptionCrc;\r
+  ///\r
+  /// The Boot#### option which will be invoked if this key is pressed and the boot option\r
+  /// is active (LOAD_OPTION_ACTIVE is set).\r
+  ///\r
   UINT16             BootOption;\r
-//EFI_INPUT_KEY      Keys[];\r
+  ///\r
+  /// The key codes to compare against those returned by the\r
+  /// EFI_SIMPLE_TEXT_INPUT and EFI_SIMPLE_TEXT_INPUT_EX protocols.\r
+  /// The number of key codes (0-3) is specified by the EFI_KEY_CODE_COUNT field in KeyOptions.\r
+  ///\r
+  //EFI_INPUT_KEY      Keys[];\r
 } EFI_KEY_OPTION;\r
 \r
-#define EFI_KEY_OPTION_SHIFT     0x00000001\r
-#define EFI_KEY_OPTION_CONTROL   0x00000002\r
-#define EFI_KEY_OPTION_ALT       0x00000004\r
-#define EFI_KEY_OPTION_LOGO      0x00000008\r
-#define EFI_KEY_OPTION_MENU      0x00000010\r
-#define EFI_KEY_OPTION_SYSREQ    0x00000020\r
-#define EFI_KEY_CODE_COUNT       0x00000300\r
-\r
 //\r
 // EFI File location to boot from on removable media devices\r
 //\r
 #define EFI_REMOVABLE_MEDIA_FILE_NAME_IA32    L"\\EFI\\BOOT\\BOOTIA32.EFI"\r
 #define EFI_REMOVABLE_MEDIA_FILE_NAME_IA64    L"\\EFI\\BOOT\\BOOTIA64.EFI"\r
 #define EFI_REMOVABLE_MEDIA_FILE_NAME_X64     L"\\EFI\\BOOT\\BOOTX64.EFI"\r
+#define EFI_REMOVABLE_MEDIA_FILE_NAME_ARM     L"\\EFI\\BOOT\\BOOTARM.EFI"\r
 \r
 #if   defined (MDE_CPU_IA32)\r
   #define EFI_REMOVABLE_MEDIA_FILE_NAME   EFI_REMOVABLE_MEDIA_FILE_NAME_IA32\r
@@ -1974,6 +2074,8 @@ typedef struct {
 #elif defined (MDE_CPU_X64)\r
   #define EFI_REMOVABLE_MEDIA_FILE_NAME   EFI_REMOVABLE_MEDIA_FILE_NAME_X64\r
 #elif defined (MDE_CPU_EBC)\r
+#elif defined (MDE_CPU_ARM)\r
+  #define EFI_REMOVABLE_MEDIA_FILE_NAME   EFI_REMOVABLE_MEDIA_FILE_NAME_ARM\r
 #else\r
   #error Unknown Processor Type\r
 #endif\r