diff options
author | Ashish Singhal <ashishsingha@nvidia.com> | 2019-12-24 10:57:47 +0800 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2020-01-08 07:28:39 +0000 |
commit | 972d88726410e21b1fff1a528854202c67e97ef1 (patch) | |
tree | 87c74dc4eb693acab30a4b1f604394648c8ad7d0 /MdeModulePkg/Include/Protocol | |
parent | c9d72628432126cbce58a48b440e4944baa4beab (diff) | |
download | edk2-972d88726410e21b1fff1a528854202c67e97ef1.tar.gz edk2-972d88726410e21b1fff1a528854202c67e97ef1.tar.bz2 edk2-972d88726410e21b1fff1a528854202c67e97ef1.zip |
MdeModulePkg: Add EDK2 Platform Boot Manager Protocol
Add edk2 platform boot manager protocol which would have platform
specific refreshes to the auto enumerated as well as NV boot options
for the platform.
Signed-off-by: Ashish Singhal <ashishsingha@nvidia.com>
Reviewed-by: Ray Ni <ray.ni@intel.com>
Diffstat (limited to 'MdeModulePkg/Include/Protocol')
-rw-r--r-- | MdeModulePkg/Include/Protocol/PlatformBootManager.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/MdeModulePkg/Include/Protocol/PlatformBootManager.h b/MdeModulePkg/Include/Protocol/PlatformBootManager.h new file mode 100644 index 0000000000..26b9ce48ad --- /dev/null +++ b/MdeModulePkg/Include/Protocol/PlatformBootManager.h @@ -0,0 +1,82 @@ +/** @file
+
+ Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
+
+ SPDX-License-Identifier: BSD-2-Clause-Patent
+
+**/
+
+#ifndef __PLATFORM_BOOT_MANAGER_PROTOCOL_H__
+#define __PLATFORM_BOOT_MANAGER_PROTOCOL_H__
+
+#include <Library/UefiBootManagerLib.h>
+
+//
+// Platform Boot Manager Protocol GUID value
+//
+#define EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL_GUID \
+ { \
+ 0xaa17add4, 0x756c, 0x460d, { 0x94, 0xb8, 0x43, 0x88, 0xd7, 0xfb, 0x3e, 0x59 } \
+ }
+
+//
+// Protocol interface structure
+//
+typedef struct _EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL;
+
+//
+// Revision The revision to which the protocol interface adheres.
+// All future revisions must be backwards compatible.
+// If a future version is not back wards compatible it is not the same GUID.
+//
+#define EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL_REVISION 0x00000001
+
+//
+// Function Prototypes
+//
+
+/*
+ This function allows platform to refresh all boot options specific to the platform. Within
+ this function, platform can make modifications to the auto enumerated platform boot options
+ as well as NV boot options.
+
+ @param[in const] BootOptions An array of auto enumerated platform boot options.
+ This array will be freed by caller upon successful
+ exit of this function and output array would be used.
+
+ @param[in const] BootOptionsCount The number of elements in BootOptions.
+
+ @param[out] UpdatedBootOptions An array of boot options that have been customized
+ for the platform on top of input boot options. This
+ array would be allocated by REFRESH_ALL_BOOT_OPTIONS
+ and would be freed by caller after consuming it.
+
+ @param[out] UpdatedBootOptionsCount The number of elements in UpdatedBootOptions.
+
+
+ @retval EFI_SUCCESS Platform refresh to input BootOptions and
+ BootCount have been done.
+
+ @retval EFI_OUT_OF_RESOURCES Memory allocation failed.
+
+ @retval EFI_INVALID_PARAMETER Input is not correct.
+
+ @retval EFI_UNSUPPORTED Platform specific overrides are not supported.
+*/
+typedef
+EFI_STATUS
+(EFIAPI *PLATFORM_BOOT_MANAGER_REFRESH_ALL_BOOT_OPTIONS) (
+ IN CONST EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions,
+ IN CONST UINTN BootOptionsCount,
+ OUT EFI_BOOT_MANAGER_LOAD_OPTION **UpdatedBootOptions,
+ OUT UINTN *UpdatedBootOptionsCount
+ );
+
+struct _EDKII_PLATFORM_BOOT_MANAGER_PROTOCOL {
+ UINT64 Revision;
+ PLATFORM_BOOT_MANAGER_REFRESH_ALL_BOOT_OPTIONS RefreshAllBootOptions;
+};
+
+extern EFI_GUID gEdkiiPlatformBootManagerProtocolGuid;
+
+#endif /* __PLATFORM_BOOT_MANAGER_PROTOCOL_H__ */
|