PlatformBootManagerOverride.h 2.6 KB

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