]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Include/Protocol/PlatformBootManager.h
UefiCpuPkg: Move AsmRelocateApLoopStart from Mpfuncs.nasm to AmdSev.nasm
[mirror_edk2.git] / MdeModulePkg / Include / Protocol / PlatformBootManager.h
1 /** @file
2
3 Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
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 #include <Library/UefiBootManagerLib.h>
13
14 //
15 // Platform Boot Manager Protocol GUID value
16 //
17 #define EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL_GUID \
18 { \
19 0xaa17add4, 0x756c, 0x460d, { 0x94, 0xb8, 0x43, 0x88, 0xd7, 0xfb, 0x3e, 0x59 } \
20 }
21
22 //
23 // Protocol interface structure
24 //
25 typedef struct _EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL;
26
27 //
28 // Revision The revision to which the protocol interface adheres.
29 // All future revisions must be backwards compatible.
30 // If a future version is not back wards compatible it is not the same GUID.
31 //
32 #define EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL_REVISION 0x00000001
33
34 //
35 // Function Prototypes
36 //
37
38 /*
39 This function allows platform to refresh all boot options specific to the platform. Within
40 this function, platform can make modifications to the auto enumerated platform boot options
41 as well as NV boot options.
42
43 @param[in const] BootOptions An array of auto enumerated platform boot options.
44 This array will be freed by caller upon successful
45 exit of this function and output array would be used.
46
47 @param[in const] BootOptionsCount The number of elements in BootOptions.
48
49 @param[out] UpdatedBootOptions An array of boot options that have been customized
50 for the platform on top of input boot options. This
51 array would be allocated by REFRESH_ALL_BOOT_OPTIONS
52 and would be freed by caller after consuming it.
53
54 @param[out] UpdatedBootOptionsCount The number of elements in UpdatedBootOptions.
55
56
57 @retval EFI_SUCCESS Platform refresh to input BootOptions and
58 BootCount have been done.
59
60 @retval EFI_OUT_OF_RESOURCES Memory allocation failed.
61
62 @retval EFI_INVALID_PARAMETER Input is not correct.
63
64 @retval EFI_UNSUPPORTED Platform specific overrides are not supported.
65 */
66 typedef
67 EFI_STATUS
68 (EFIAPI *PLATFORM_BOOT_MANAGER_REFRESH_ALL_BOOT_OPTIONS)(
69 IN CONST EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions,
70 IN CONST UINTN BootOptionsCount,
71 OUT EFI_BOOT_MANAGER_LOAD_OPTION **UpdatedBootOptions,
72 OUT UINTN *UpdatedBootOptionsCount
73 );
74
75 struct _EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL {
76 UINT64 Revision;
77 PLATFORM_BOOT_MANAGER_REFRESH_ALL_BOOT_OPTIONS RefreshAllBootOptions;
78 };
79
80 extern EFI_GUID gEdkiiPlatformBootManagerProtocolGuid;
81
82 #endif /* __PLATFORM_BOOT_MANAGER_PROTOCOL_H__ */