]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdePkg/Include/Uefi/UefiSpec.h
Clarify PrintLib behavior on %d, %x, %l.
[mirror_edk2.git] / MdePkg / Include / Uefi / UefiSpec.h
index ffdfcd6398ea573ef6fd5a16de9f525cf2cad7f0..0dbabd8d630e1e30986921454502c7b3aab09dd9 100644 (file)
@@ -2011,50 +2011,46 @@ EFI_STATUS
 ///\r
 /// EFI Boot Key Data\r
 ///\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
-    ///\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
-} EFI_BOOT_KEY_DATA;\r
+typedef UINT32 EFI_BOOT_KEY_DATA;\r
+///\r
+/// Indicates the revision of the EFI_KEY_OPTION structure. This revision level should be 0.\r
+///\r
+#define EFI_KEY_OPTION_REVISION_MASK        0x000000FF\r
+///\r
+/// Either the left or right Shift keys must be pressed (1) or must not be pressed (0).\r
+///\r
+#define EFI_KEY_OPTION_SHIFT_PRESSED_MASK   BIT8\r
+///\r
+/// Either the left or right Control keys must be pressed (1) or must not be pressed (0).\r
+///\r
+#define EFI_KEY_OPTION_CONTROL_PRESSED_MASK BIT9\r
+///\r
+/// Either the left or right Alt keys must be pressed (1) or must not be pressed (0).\r
+///\r
+#define EFI_KEY_OPTION_ALT_PRESSED_MASK     BIT10\r
+///\r
+/// Either the left or right Logo keys must be pressed (1) or must not be pressed (0).\r
+///\r
+#define EFI_KEY_OPTION_LOGO_PRESSED_MASK    BIT11\r
+///\r
+/// The Menu key must be pressed (1) or must not be pressed (0).\r
+///\r
+#define EFI_KEY_OPTION_MENU_PRESSED_MASK    BIT12\r
+///\r
+/// The SysReq key must be pressed (1) or must not be pressed (0).\r
+///\r
+#define EFI_KEY_OPTION_SYS_REQ_PRESSED_MASK BIT13\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
+#define EFI_KEY_OPTION_INPUT_KEY_COUNT_MASK (BIT30 | BIT31)\r
 \r
 ///\r
 /// EFI Key Option.\r
 ///\r
+#pragma pack(1)\r
 typedef struct {\r
   ///\r
   /// Specifies options about how the key will be processed.\r
@@ -2078,6 +2074,7 @@ typedef struct {
   ///\r
   //EFI_INPUT_KEY      Keys[];\r
 } EFI_KEY_OPTION;\r
+#pragma pack()\r
 \r
 //\r
 // EFI File location to boot from on removable media devices\r