]>
Commit | Line | Data |
---|---|---|
5c08e117 | 1 | /** @file\r |
2 | Provides a way for 3rd party applications to register themselves for launch by the\r | |
3 | Boot Manager based on hot key\r | |
4 | \r | |
d4468cdf | 5 | Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>\r |
180a5a35 | 6 | This program and the accompanying materials\r |
5c08e117 | 7 | are licensed and made available under the terms and conditions of the BSD License\r |
8 | which accompanies this distribution. The full text of the license may be found at\r | |
9 | http://opensource.org/licenses/bsd-license.php\r | |
10 | \r | |
11 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
12 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
13 | \r | |
14 | **/\r | |
15 | \r | |
16 | #ifndef _HOTKEY_H_\r | |
17 | #define _HOTKEY_H_\r | |
18 | \r | |
19 | #include "Bds.h"\r | |
20 | #include "String.h"\r | |
21 | \r | |
a9e7937a | 22 | #define SET_BOOT_OPTION_SUPPORT_KEY_COUNT(a, c) { \\r |
53cdd439 | 23 | (a) = ((a) & ~EFI_BOOT_OPTION_SUPPORT_COUNT) | (((c) << LowBitSet32 (EFI_BOOT_OPTION_SUPPORT_COUNT)) & EFI_BOOT_OPTION_SUPPORT_COUNT); \\r |
a9e7937a | 24 | }\r |
5c08e117 | 25 | \r |
26 | #define BDS_HOTKEY_OPTION_SIGNATURE SIGNATURE_32 ('B', 'd', 'K', 'O')\r | |
a9e7937a | 27 | \r |
28 | \r | |
5c08e117 | 29 | typedef struct {\r |
30 | UINTN Signature;\r | |
31 | LIST_ENTRY Link;\r | |
32 | \r | |
402e4a9d | 33 | VOID *NotifyHandle;\r |
5c08e117 | 34 | UINT16 BootOptionNumber;\r |
35 | UINT8 CodeCount;\r | |
36 | UINT8 WaitingKey;\r | |
37 | EFI_KEY_DATA KeyData[3];\r | |
38 | } BDS_HOTKEY_OPTION;\r | |
39 | \r | |
40 | #define BDS_HOTKEY_OPTION_FROM_LINK(a) CR (a, BDS_HOTKEY_OPTION, Link, BDS_HOTKEY_OPTION_SIGNATURE)\r | |
41 | \r | |
5c08e117 | 42 | /**\r |
43 | \r | |
44 | Process all the "Key####" variables, associate Hotkeys with corresponding Boot Options.\r | |
45 | \r | |
46 | \r | |
47 | @param VOID\r | |
48 | \r | |
49 | @retval EFI_SUCCESS Hotkey services successfully initialized.\r | |
50 | \r | |
51 | **/\r | |
52 | EFI_STATUS\r | |
53 | InitializeHotkeyService (\r | |
54 | VOID\r | |
55 | );\r | |
56 | \r | |
d394581d RN |
57 | /**\r |
58 | Try to boot the boot option triggered by hotkey.\r | |
2df686c6 | 59 | @retval EFI_SUCCESS There is HotkeyBootOption & it is processed\r |
60 | @retval EFI_NOT_FOUND There is no HotkeyBootOption\r | |
d394581d | 61 | **/\r |
2df686c6 | 62 | EFI_STATUS\r |
d394581d RN |
63 | HotkeyBoot (\r |
64 | VOID\r | |
65 | );\r | |
66 | \r | |
5c08e117 | 67 | #endif\r |