Change the EFI_BOOT_KEY_DATA definition to use macro instead of bit fields.

Change the BDS module in IntelFrameworkModulePkg to use the new EFI_BOOT_KEY_DATA definition.

Signed-off-by: Ruiyu Ni<ruiyu.ni@intel.com>
Reviewed-by: Eric Dong<eric.dong@intel.com>
Reviewed-by: Kinney Michael D<michael.d.kinney@intel.com>

git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13659 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
niruiyu
2012-08-22 02:24:40 +00:00
parent b92b1209f7
commit 53cdd43979
3 changed files with 125 additions and 58 deletions

View File

@@ -2011,50 +2011,46 @@ EFI_STATUS
///
/// EFI Boot Key Data
///
typedef union {
struct {
///
/// Indicates the revision of the EFI_KEY_OPTION structure. This revision level should be 0.
///
UINT32 Revision : 8;
///
/// Either the left or right Shift keys must be pressed (1) or must not be pressed (0).
///
UINT32 ShiftPressed : 1;
///
/// Either the left or right Control keys must be pressed (1) or must not be pressed (0).
///
UINT32 ControlPressed : 1;
///
/// Either the left or right Alt keys must be pressed (1) or must not be pressed (0).
///
UINT32 AltPressed : 1;
///
/// Either the left or right Logo keys must be pressed (1) or must not be pressed (0).
///
UINT32 LogoPressed : 1;
///
/// The Menu key must be pressed (1) or must not be pressed (0).
///
UINT32 MenuPressed : 1;
///
/// The SysReq key must be pressed (1) or must not be pressed (0).
///
UINT32 SysReqPressed : 1;
UINT32 Reserved : 16;
///
/// Specifies the actual number of entries in EFI_KEY_OPTION.Keys, from 0-3. If
/// zero, then only the shift state is considered. If more than one, then the boot option will
/// only be launched if all of the specified keys are pressed with the same shift state.
///
UINT32 InputKeyCount : 2;
} Options;
UINT32 PackedValue;
} EFI_BOOT_KEY_DATA;
typedef UINT32 EFI_BOOT_KEY_DATA;
///
/// Indicates the revision of the EFI_KEY_OPTION structure. This revision level should be 0.
///
#define EFI_KEY_OPTION_REVISION_MASK 0x000000FF
///
/// Either the left or right Shift keys must be pressed (1) or must not be pressed (0).
///
#define EFI_KEY_OPTION_SHIFT_PRESSED_MASK BIT8
///
/// Either the left or right Control keys must be pressed (1) or must not be pressed (0).
///
#define EFI_KEY_OPTION_CONTROL_PRESSED_MASK BIT9
///
/// Either the left or right Alt keys must be pressed (1) or must not be pressed (0).
///
#define EFI_KEY_OPTION_ALT_PRESSED_MASK BIT10
///
/// Either the left or right Logo keys must be pressed (1) or must not be pressed (0).
///
#define EFI_KEY_OPTION_LOGO_PRESSED_MASK BIT11
///
/// The Menu key must be pressed (1) or must not be pressed (0).
///
#define EFI_KEY_OPTION_MENU_PRESSED_MASK BIT12
///
/// The SysReq key must be pressed (1) or must not be pressed (0).
///
#define EFI_KEY_OPTION_SYS_REQ_PRESSED_MASK BIT13
///
/// Specifies the actual number of entries in EFI_KEY_OPTION.Keys, from 0-3. If
/// zero, then only the shift state is considered. If more than one, then the boot option will
/// only be launched if all of the specified keys are pressed with the same shift state.
///
#define EFI_KEY_OPTION_INPUT_KEY_COUNT_MASK (BIT30 | BIT31)
///
/// EFI Key Option.
///
#pragma pack(1)
typedef struct {
///
/// Specifies options about how the key will be processed.
@@ -2078,6 +2074,7 @@ typedef struct {
///
//EFI_INPUT_KEY Keys[];
} EFI_KEY_OPTION;
#pragma pack()
//
// EFI File location to boot from on removable media devices