diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c index 8a877330dd733..5471e4259da43 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c +++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c @@ -203,6 +203,8 @@ EFI_HANDLE gDxeCoreImageHandle = NULL; BOOLEAN gMemoryMapTerminated = FALSE; +static BOOLEAN mExitBootServicesCalled = FALSE; + // // EFI Decompress Protocol // @@ -778,7 +780,10 @@ CoreExitBootServices ( // Notify other drivers of their last chance to use boot services // before the memory map is terminated. // - CoreNotifySignalList (&gEfiEventBeforeExitBootServicesGuid); + if (!mExitBootServicesCalled) { + CoreNotifySignalList (&gEfiEventBeforeExitBootServicesGuid); + mExitBootServicesCalled = TRUE; + } // // Disable Timer