summaryrefslogtreecommitdiff
path: root/ArmPkg
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPkg')
-rw-r--r--ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c23
-rw-r--r--ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf1
2 files changed, 22 insertions, 2 deletions
diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c b/ArmPkg/Library/PlatformBootManagerLib/PlatformBm.c
index a3b2d79..e950695 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 ();
diff --git a/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf b/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
index 58c4d6d..fce7349 100644
--- a/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
+++ b/ArmPkg/Library/PlatformBootManagerLib/PlatformBootManagerLib.inf
@@ -82,3 +82,4 @@
gEfiLoadedImageProtocolGuid
gEfiPciRootBridgeIoProtocolGuid
gEfiSimpleFileSystemProtocolGuid
+ gEsrtManagementProtocolGuid