]>
Commit | Line | Data |
---|---|---|
7e074d15 HZ |
1 | /** @file\r |
2 | \r | |
3 | Copyright (c) 2018, Linaro. All rights reserved.<BR>\r | |
4 | \r | |
5 | This program and the accompanying materials\r | |
6 | are licensed and made available under the terms and conditions of the BSD License\r | |
7 | which accompanies this distribution. The full text of the license may be found at\r | |
8 | http://opensource.org/licenses/bsd-license.php\r | |
9 | \r | |
10 | THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r | |
11 | WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r | |
12 | \r | |
13 | **/\r | |
14 | \r | |
15 | #ifndef __PLATFORM_BOOT_MANAGER_PROTOCOL_H__\r | |
16 | #define __PLATFORM_BOOT_MANAGER_PROTOCOL_H__\r | |
17 | \r | |
18 | //\r | |
19 | // Protocol interface structure\r | |
20 | //\r | |
21 | typedef struct _PLATFORM_BOOT_MANAGER_PROTOCOL PLATFORM_BOOT_MANAGER_PROTOCOL;\r | |
22 | \r | |
23 | //\r | |
24 | // Function Prototypes\r | |
25 | //\r | |
26 | \r | |
27 | /*\r | |
28 | Get predefined boot options for platform.\r | |
29 | \r | |
30 | @param[out] Count The number of elements in each of\r | |
31 | BootOptions and BootKeys. On successful\r | |
32 | return, Count is at least one.\r | |
33 | \r | |
34 | @param[out] BootOptions An array of platform boot options.\r | |
35 | BootOptions is pool-allocated by\r | |
36 | GET_PLATFORM_BOOT_OPTIONS_AND_KEYS, and\r | |
37 | GET_PLATFORM_BOOT_OPTIONS_AND_KEYS populates\r | |
38 | every element in BootOptions with\r | |
39 | EfiBootManagerInitializeLoadOption().\r | |
40 | BootOptions shall not contain duplicate\r | |
41 | entries. The caller is responsible for\r | |
42 | releasing BootOptions after use with\r | |
43 | EfiBootManagerFreeLoadOptions().\r | |
44 | \r | |
45 | @param[out] BootKeys A pool-allocated array of platform boot\r | |
46 | hotkeys. For every 0 <= Index < Count, if\r | |
47 | BootOptions[Index] is not to be associated\r | |
48 | with a hotkey, then BootKeys[Index] is\r | |
49 | zero-filled. Otherwise, BootKeys[Index]\r | |
50 | specifies the boot hotkey for\r | |
51 | BootOptions[Index]. BootKeys shall not\r | |
52 | contain duplicate entries (other than\r | |
53 | zero-filled entries). The caller is\r | |
54 | responsible for releasing BootKeys with\r | |
55 | FreePool() after use.\r | |
56 | \r | |
57 | @retval EFI_SUCCESS Count, BootOptions and BootKeys have\r | |
58 | been set.\r | |
59 | \r | |
60 | @retval EFI_OUT_OF_RESOURCES Memory allocation failed.\r | |
61 | \r | |
62 | @retval EFI_UNSUPPORTED The platform doesn't provide boot options\r | |
63 | as a feature.\r | |
64 | \r | |
65 | @retval EFI_NOT_FOUND The platform could provide boot options\r | |
66 | as a feature, but none have been\r | |
67 | configured.\r | |
68 | \r | |
69 | @return Error codes propagated from underlying\r | |
70 | functions.\r | |
71 | */\r | |
72 | typedef\r | |
73 | EFI_STATUS\r | |
74 | (EFIAPI *GET_PLATFORM_BOOT_OPTIONS_AND_KEYS) (\r | |
75 | OUT UINTN *Count,\r | |
76 | OUT EFI_BOOT_MANAGER_LOAD_OPTION **BootOptions,\r | |
77 | OUT EFI_INPUT_KEY **BootKeys\r | |
78 | );\r | |
79 | \r | |
80 | struct _PLATFORM_BOOT_MANAGER_PROTOCOL {\r | |
81 | GET_PLATFORM_BOOT_OPTIONS_AND_KEYS GetPlatformBootOptionsAndKeys;\r | |
82 | };\r | |
83 | \r | |
84 | extern EFI_GUID gPlatformBootManagerProtocolGuid;\r | |
85 | \r | |
86 | #endif /* __PLATFORM_BOOT_MANAGER_PROTOCOL_H__ */\r |