3 Copyright (c) 2018, Linaro. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
9 #ifndef __PLATFORM_BOOT_MANAGER_PROTOCOL_H__
10 #define __PLATFORM_BOOT_MANAGER_PROTOCOL_H__
13 // Protocol interface structure
15 typedef struct _PLATFORM_BOOT_MANAGER_PROTOCOL PLATFORM_BOOT_MANAGER_PROTOCOL
;
18 // Function Prototypes
22 Get predefined boot options for platform.
24 @param[out] Count The number of elements in each of
25 BootOptions and BootKeys. On successful
26 return, Count is at least one.
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().
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
51 @retval EFI_SUCCESS Count, BootOptions and BootKeys have
54 @retval EFI_OUT_OF_RESOURCES Memory allocation failed.
56 @retval EFI_UNSUPPORTED The platform doesn't provide boot options
59 @retval EFI_NOT_FOUND The platform could provide boot options
60 as a feature, but none have been
63 @return Error codes propagated from underlying
68 (EFIAPI
*GET_PLATFORM_BOOT_OPTIONS_AND_KEYS
) (
70 OUT EFI_BOOT_MANAGER_LOAD_OPTION
**BootOptions
,
71 OUT EFI_INPUT_KEY
**BootKeys
74 struct _PLATFORM_BOOT_MANAGER_PROTOCOL
{
75 GET_PLATFORM_BOOT_OPTIONS_AND_KEYS GetPlatformBootOptionsAndKeys
;
78 extern EFI_GUID gPlatformBootManagerProtocolGuid
;
80 #endif /* __PLATFORM_BOOT_MANAGER_PROTOCOL_H__ */