]> git.proxmox.com Git - mirror_edk2.git/blob - EmbeddedPkg/Include/Protocol/PlatformBootManager.h
EmbeddedPkg: Replace BSD License with BSD+Patent License
[mirror_edk2.git] / EmbeddedPkg / Include / Protocol / PlatformBootManager.h
1 /** @file
2
3 Copyright (c) 2018, Linaro. All rights reserved.<BR>
4
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6
7 **/
8
9 #ifndef __PLATFORM_BOOT_MANAGER_PROTOCOL_H__
10 #define __PLATFORM_BOOT_MANAGER_PROTOCOL_H__
11
12 //
13 // Protocol interface structure
14 //
15 typedef struct _PLATFORM_BOOT_MANAGER_PROTOCOL PLATFORM_BOOT_MANAGER_PROTOCOL;
16
17 //
18 // Function Prototypes
19 //
20
21 /*
22 Get predefined boot options for platform.
23
24 @param[out] Count The number of elements in each of
25 BootOptions and BootKeys. On successful
26 return, Count is at least one.
27
28 @param[out] BootOptions An array of platform boot options.
29 BootOptions is pool-allocated by
30 GET_PLATFORM_BOOT_OPTIONS_AND_KEYS, and
31 GET_PLATFORM_BOOT_OPTIONS_AND_KEYS populates
32 every element in BootOptions with
33 EfiBootManagerInitializeLoadOption().
34 BootOptions shall not contain duplicate
35 entries. The caller is responsible for
36 releasing BootOptions after use with
37 EfiBootManagerFreeLoadOptions().
38
39 @param[out] BootKeys A pool-allocated array of platform boot
40 hotkeys. For every 0 <= Index < Count, if
41 BootOptions[Index] is not to be associated
42 with a hotkey, then BootKeys[Index] is
43 zero-filled. Otherwise, BootKeys[Index]
44 specifies the boot hotkey for
45 BootOptions[Index]. BootKeys shall not
46 contain duplicate entries (other than
47 zero-filled entries). The caller is
48 responsible for releasing BootKeys with
49 FreePool() after use.
50
51 @retval EFI_SUCCESS Count, BootOptions and BootKeys have
52 been set.
53
54 @retval EFI_OUT_OF_RESOURCES Memory allocation failed.
55
56 @retval EFI_UNSUPPORTED The platform doesn't provide boot options
57 as a feature.
58
59 @retval EFI_NOT_FOUND The platform could provide boot options
60 as a feature, but none have been
61 configured.
62
63 @return Error codes propagated from underlying
64 functions.
65 */
66 typedef
67 EFI_STATUS
68 (EFIAPI *GET_PLATFORM_BOOT_OPTIONS_AND_KEYS) (
69 OUT UINTN *Count,
70 OUT EFI_BOOT_MANAGER_LOAD_OPTION **BootOptions,
71 OUT EFI_INPUT_KEY **BootKeys
72 );
73
74 struct _PLATFORM_BOOT_MANAGER_PROTOCOL {
75 GET_PLATFORM_BOOT_OPTIONS_AND_KEYS GetPlatformBootOptionsAndKeys;
76 };
77
78 extern EFI_GUID gPlatformBootManagerProtocolGuid;
79
80 #endif /* __PLATFORM_BOOT_MANAGER_PROTOCOL_H__ */