]>
git.proxmox.com Git - mirror_edk2.git/blob - IntelFrameworkModulePkg/Universal/BdsDxe/Hotkey.h
2 Provides a way for 3rd party applications to register themselves for launch by the
3 Boot Manager based on hot key
5 Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>
6 This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
22 #define SET_BOOT_OPTION_SUPPORT_KEY_COUNT(a, c) { \
23 (a) = ((a) & ~EFI_BOOT_OPTION_SUPPORT_COUNT) | (((c) << LowBitSet32 (EFI_BOOT_OPTION_SUPPORT_COUNT)) & EFI_BOOT_OPTION_SUPPORT_COUNT); \
26 #define BDS_HOTKEY_OPTION_SIGNATURE SIGNATURE_32 ('B', 'd', 'K', 'O')
29 Get the revision of the EFI_KEY_OPTION structure.
31 @param KeyOption Pointer to the EFI_KEY_OPTION structure.
35 #define KEY_OPTION_REVISION(KeyOption) ((KeyOption)->KeyData & EFI_KEY_OPTION_REVISION_MASK)
38 Get the actual number of entries in EFI_KEY_OPTION.Keys, from 0-3.
40 @param KeyOption Pointer to the EFI_KEY_OPTION structure.
42 @return Actual number of entries in EFI_KEY_OPTION.Keys.
44 #define KEY_OPTION_INPUT_KEY_COUNT(KeyOption) (((KeyOption)->KeyData & EFI_KEY_OPTION_INPUT_KEY_COUNT_MASK) >> LowBitSet32 (EFI_KEY_OPTION_INPUT_KEY_COUNT_MASK))
47 Return whether the Shift key needs pressed.
49 @param KeyOption Pointer to the EFI_KEY_OPTION structure.
51 @retval TRUE Shift key needs pressed.
52 @retval FALSE Shift key needn't pressed.
54 #define KEY_OPTION_SHIFT_PRESSED(KeyOption) (BOOLEAN) (((KeyOption)->KeyData & EFI_KEY_OPTION_SHIFT_PRESSED_MASK) != 0)
57 Return whether the Control key needs pressed.
59 @param KeyOption Pointer to the EFI_KEY_OPTION structure.
61 @retval TRUE Control key needs pressed.
62 @retval FALSE Control key needn't pressed.
64 #define KEY_OPTION_CONTROL_PRESSED(KeyOption) (BOOLEAN) (((KeyOption)->KeyData & EFI_KEY_OPTION_CONTROL_PRESSED_MASK) != 0)
67 Return whether the Alt key needs pressed.
69 @param KeyOption Pointer to the EFI_KEY_OPTION structure.
71 @retval TRUE Alt key needs pressed.
72 @retval FALSE Alt key needn't pressed.
74 #define KEY_OPTION_ALT_PRESSED(KeyOption) (BOOLEAN) (((KeyOption)->KeyData & EFI_KEY_OPTION_ALT_PRESSED_MASK) != 0)
77 Return whether the Logo key needs pressed.
79 @param KeyOption Pointer to the EFI_KEY_OPTION structure.
81 @retval TRUE Logo key needs pressed.
82 @retval FALSE Logo key needn't pressed.
84 #define KEY_OPTION_LOGO_PRESSED(KeyOption) (BOOLEAN) (((KeyOption)->KeyData & EFI_KEY_OPTION_LOGO_PRESSED_MASK) != 0)
87 Return whether the Menu key needs pressed.
89 @param KeyOption Pointer to the EFI_KEY_OPTION structure.
91 @retval TRUE Menu key needs pressed.
92 @retval FALSE Menu key needn't pressed.
94 #define KEY_OPTION_MENU_PRESSED(KeyOption) (BOOLEAN) (((KeyOption)->KeyData & EFI_KEY_OPTION_MENU_PRESSED_MASK) != 0)
97 Return whether the SysReq key needs pressed.
99 @param KeyOption Pointer to the EFI_KEY_OPTION structure.
101 @retval TRUE SysReq key needs pressed.
102 @retval FALSE SysReq key needn't pressed.
104 #define KEY_OPTION_SYS_REQ_PRESSED(KeyOption) (BOOLEAN) (((KeyOption)->KeyData & EFI_KEY_OPTION_SYS_REQ_PRESSED_MASK) != 0)
111 UINT16 BootOptionNumber
;
114 EFI_KEY_DATA KeyData
[3];
117 #define BDS_HOTKEY_OPTION_FROM_LINK(a) CR (a, BDS_HOTKEY_OPTION, Link, BDS_HOTKEY_OPTION_SIGNATURE)
121 Process all the "Key####" variables, associate Hotkeys with corresponding Boot Options.
126 @retval EFI_SUCCESS Hotkey services successfully initialized.
130 InitializeHotkeyService (
135 Try to boot the boot option triggered by hotkey.
136 @retval EFI_SUCCESS There is HotkeyBootOption & it is processed
137 @retval EFI_NOT_FOUND There is no HotkeyBootOption