summaryrefslogtreecommitdiffstats
path: root/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c')
-rw-r--r--ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c23
1 files changed, 21 insertions, 2 deletions
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 <Library/UefiBootManagerLib.h>
#include <Library/UefiLib.h>
#include <Protocol/DevicePath.h>
+#include <Protocol/EsrtManagement.h>
#include <Protocol/GraphicsOutput.h>
#include <Protocol/LoadedImage.h>
#include <Protocol/PciIo.h>
@@ -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 ();