+/** @file\r
+ This file defines the Univeral Payload Platform BootManager Protocol.\r
+\r
+ Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
+**/\r
+\r
+#ifndef __PLATFORM_BOOT_MANAGER_OVERRIDE_H__\r
+#define __PLATFORM_BOOT_MANAGER_OVERRIDE_H__\r
+\r
+\r
+/**\r
+ Do the platform specific action before the console is connected.\r
+\r
+ Such as:\r
+ Update console variable;\r
+ Register new Driver#### or Boot####;\r
+ Signal ReadyToLock event.\r
+\r
+ This function will override the default behavior in PlatformBootManagerLib\r
+**/\r
+typedef\r
+VOID\r
+(EFIAPI *UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_BEFORE_CONSOLE) (\r
+ VOID\r
+ );\r
+\r
+/**\r
+ Do the platform specific action after the console is connected.\r
+\r
+ Such as:\r
+ Dynamically switch output mode;\r
+ Signal console ready platform customized event;\r
+ Run diagnostics like memory testing;\r
+ Connect certain devices;\r
+ Dispatch aditional option roms.\r
+\r
+ This function will override the default behavior in PlatformBootManagerLib\r
+**/\r
+typedef\r
+VOID\r
+(EFIAPI *UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_AFTER_CONSOLE) (\r
+ VOID\r
+ );\r
+\r
+/**\r
+ This function is called each second during the boot manager waits the timeout.\r
+ This function will override the default behavior in PlatformBootManagerLib\r
+\r
+ @param TimeoutRemain The remaining timeout.\r
+**/\r
+typedef\r
+VOID\r
+(EFIAPI *UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_WAIT_CALLBACK) (\r
+ UINT16 TimeoutRemain\r
+ );\r
+\r
+/**\r
+ The function is called when no boot option could be launched,\r
+ including platform recovery options and options pointing to applications\r
+ built into firmware volumes.\r
+\r
+ If this function returns, BDS attempts to enter an infinite loop.\r
+ This function will override the default behavior in PlatformBootManagerLib\r
+**/\r
+typedef\r
+VOID\r
+(EFIAPI *UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_UNABLE_TO_BOOT) (\r
+ VOID\r
+ );\r
+\r
+///\r
+/// Provides an interface to override the default behavior in PlatformBootManagerLib,\r
+/// so platform can provide its own platform specific logic through this protocol\r
+///\r
+typedef struct {\r
+ UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_BEFORE_CONSOLE BeforeConsole;\r
+ UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_AFTER_CONSOLE AfterConsole;\r
+ UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_WAIT_CALLBACK WaitCallback;\r
+ UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_UNABLE_TO_BOOT UnableToBoot;\r
+} UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_PROTOCOL;\r
+\r
+extern GUID gUniversalPayloadPlatformBootManagerOverrideProtocolGuid;\r
+\r
+#endif\r