]> git.proxmox.com Git - mirror_edk2.git/blob - UefiPayloadPkg/Include/Protocol/PlatformBootManagerOverride.h
59544e417c9a1cf366ac51c6ee5874390a36ab3c
[mirror_edk2.git] / UefiPayloadPkg / Include / Protocol / PlatformBootManagerOverride.h
1 /** @file
2 This file defines the Univeral Payload Platform BootManager Protocol.
3
4 Copyright (c) 2021, Intel Corporation. All rights reserved.<BR>
5 SPDX-License-Identifier: BSD-2-Clause-Patent
6 **/
7
8 #ifndef __PLATFORM_BOOT_MANAGER_OVERRIDE_H__
9 #define __PLATFORM_BOOT_MANAGER_OVERRIDE_H__
10
11
12 /**
13 Do the platform specific action before the console is connected.
14
15 Such as:
16 Update console variable;
17 Register new Driver#### or Boot####;
18 Signal ReadyToLock event.
19
20 This function will override the default behavior in PlatformBootManagerLib
21 **/
22 typedef
23 VOID
24 (EFIAPI *UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_BEFORE_CONSOLE) (
25 VOID
26 );
27
28 /**
29 Do the platform specific action after the console is connected.
30
31 Such as:
32 Dynamically switch output mode;
33 Signal console ready platform customized event;
34 Run diagnostics like memory testing;
35 Connect certain devices;
36 Dispatch aditional option roms.
37
38 This function will override the default behavior in PlatformBootManagerLib
39 **/
40 typedef
41 VOID
42 (EFIAPI *UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_AFTER_CONSOLE) (
43 VOID
44 );
45
46 /**
47 This function is called each second during the boot manager waits the timeout.
48 This function will override the default behavior in PlatformBootManagerLib
49
50 @param TimeoutRemain The remaining timeout.
51 **/
52 typedef
53 VOID
54 (EFIAPI *UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_WAIT_CALLBACK) (
55 UINT16 TimeoutRemain
56 );
57
58 /**
59 The function is called when no boot option could be launched,
60 including platform recovery options and options pointing to applications
61 built into firmware volumes.
62
63 If this function returns, BDS attempts to enter an infinite loop.
64 This function will override the default behavior in PlatformBootManagerLib
65 **/
66 typedef
67 VOID
68 (EFIAPI *UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_UNABLE_TO_BOOT) (
69 VOID
70 );
71
72 ///
73 /// Provides an interface to override the default behavior in PlatformBootManagerLib,
74 /// so platform can provide its own platform specific logic through this protocol
75 ///
76 typedef struct {
77 UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_BEFORE_CONSOLE BeforeConsole;
78 UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_AFTER_CONSOLE AfterConsole;
79 UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_WAIT_CALLBACK WaitCallback;
80 UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_UNABLE_TO_BOOT UnableToBoot;
81 } UNIVERSAL_PAYLOAD_PLATFORM_BOOT_MANAGER_OVERRIDE_PROTOCOL;
82
83 extern GUID gUniversalPayloadPlatformBootManagerOverrideProtocolGuid;
84
85 #endif