]>
Commit | Line | Data |
---|---|---|
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 | |
5 | Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.<BR>\r | |
6 | This program and the accompanying materials\r | |
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 | |
22 | #define SET_BOOT_OPTION_SUPPORT_KEY_COUNT(a, c) { \\r | |
23 | (a) = ((a) & ~EFI_BOOT_OPTION_SUPPORT_COUNT) | (((c) << LowBitSet32 (EFI_BOOT_OPTION_SUPPORT_COUNT)) & EFI_BOOT_OPTION_SUPPORT_COUNT); \\r | |
24 | }\r | |
25 | \r | |
26 | #define BDS_HOTKEY_OPTION_SIGNATURE SIGNATURE_32 ('B', 'd', 'K', 'O')\r | |
27 | \r | |
28 | \r | |
29 | typedef struct {\r | |
30 | UINTN Signature;\r | |
31 | LIST_ENTRY Link;\r | |
32 | \r | |
33 | VOID *NotifyHandle;\r | |
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 | |
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 | |
57 | /**\r | |
58 | Try to boot the boot option triggered by hotkey.\r | |
59 | @retval EFI_SUCCESS There is HotkeyBootOption & it is processed\r | |
60 | @retval EFI_NOT_FOUND There is no HotkeyBootOption\r | |
61 | **/\r | |
62 | EFI_STATUS\r | |
63 | HotkeyBoot (\r | |
64 | VOID\r | |
65 | );\r | |
66 | \r | |
67 | #endif\r |