diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c index a3b2d7925f..e950695162 100644 --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c @@ -25,6 +25,7 @@ #include #include #include +#include #include #include #include @@ -449,12 +450,23 @@ PlatformBootManagerBeforeConsole ( VOID ) { - EFI_STATUS Status; + EFI_STATUS Status; + ESRT_MANAGEMENT_PROTOCOL *EsrtManagement; if (GetBootModeHob() == BOOT_ON_FLASH_UPDATE) { DEBUG ((DEBUG_INFO, "ProcessCapsules Before EndOfDxe ......\n")); Status = ProcessCapsules (); DEBUG ((DEBUG_INFO, "ProcessCapsules returned %r\n", Status)); + } else { + if (EsrtManagement != NULL) { + EsrtManagement->SyncEsrtFmp (); + } + } + + Status = gBS->LocateProtocol (&gEsrtManagementProtocolGuid, NULL, + (VOID **)&EsrtManagement); + if (EFI_ERROR (Status)) { + EsrtManagement = NULL; } // @@ -524,7 +536,8 @@ PlatformBootManagerAfterConsole ( VOID ) { - EFI_STATUS Status; + ESRT_MANAGEMENT_PROTOCOL *EsrtManagement; + EFI_STATUS Status; // // Show the splash screen. @@ -538,6 +551,12 @@ PlatformBootManagerAfterConsole ( // EfiBootManagerConnectAll (); + Status = gBS->LocateProtocol (&gEsrtManagementProtocolGuid, NULL, + (VOID **)&EsrtManagement); + if (!EFI_ERROR (Status)) { + EsrtManagement->SyncEsrtFmp (); + } + if (GetBootModeHob() == BOOT_ON_FLASH_UPDATE) { DEBUG((DEBUG_INFO, "ProcessCapsules After EndOfDxe ......\n")); Status = ProcessCapsules (); diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf index 58c4d6d2c7..fce7349ff8 100644 --- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf +++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf @@ -82,3 +82,4 @@ gEfiLoadedImageProtocolGuid gEfiPciRootBridgeIoProtocolGuid gEfiSimpleFileSystemProtocolGuid + gEsrtManagementProtocolGuid