summaryrefslogtreecommitdiff
path: root/ArmVirtPkg
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2015-06-25 14:49:06 +0000
committerabiesheuvel <abiesheuvel@Edk2>2015-06-25 14:49:06 +0000
commit9cd7d3c5ba447b440ea189aad70665373099429d (patch)
treef8dd490137be37c48a4a836478d3beae00fd717e /ArmVirtPkg
parent83461d2ce88bdeb12b25c74beaca84dcd457e5a3 (diff)
downloadedk2-platforms-9cd7d3c5ba447b440ea189aad70665373099429d.tar.xz
ArmVirtPkg: signal EndOxDxe event in PlatformBsdInit
Currently, the ArmVirtPkg platforms built with the Intel BDS fail to signal the end-of-DXE event 'gEfiEndOfDxeEventGroupGuid' when entering the BDS phase, which results in some loss of functionality, i.e., variable reclaim in the VariableDxe drivers, and the splitting of the memory regions that is part of the recently added UEFI 2.5 properties table feature. As discussed on the edk2-devel mailing list here: http://thread.gmane.org/gmane.comp.bios.tianocore.devel/16088/focus=16109 it is up to the platform BDS to signal that event, since there may be platform specific ordering constraints with respect to the signalling of the event that are difficult to honor at the generic level. So add the SignalEvent () call to PlatformBdsInit () of ArmVirtPkg's PlatformBdsLib implementation for the Intel BDS. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Reviewed-by: Laszlo Ersek <lersek@redhat.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17713 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmVirtPkg')
-rw-r--r--ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c36
-rw-r--r--ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf1
2 files changed, 37 insertions, 0 deletions
diff --git a/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c b/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
index 499cce5dcd..13830cbe36 100644
--- a/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
+++ b/ArmVirtPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c
@@ -24,6 +24,7 @@
#include <Protocol/GraphicsOutput.h>
#include <Protocol/PciIo.h>
#include <Protocol/PciRootBridgeIo.h>
+#include <Guid/EventGroup.h>
#include "IntelBdsPlatform.h"
@@ -118,6 +119,23 @@ STATIC PLATFORM_USB_KEYBOARD mUsbKeyboard = {
}
};
+/**
+ An empty function to pass error checking of CreateEventEx ().
+
+ @param Event Event whose notification function is being invoked.
+ @param Context Pointer to the notification function's context,
+ which is implementation-dependent.
+
+**/
+STATIC
+VOID
+EFIAPI
+EmptyCallbackFunction (
+ IN EFI_EVENT Event,
+ IN VOID *Context
+ )
+{
+}
//
// BDS Platform Functions
@@ -133,6 +151,24 @@ PlatformBdsInit (
VOID
)
{
+ EFI_EVENT EndOfDxeEvent;
+ EFI_STATUS Status;
+
+ //
+ // Signal EndOfDxe PI Event
+ //
+ Status = gBS->CreateEventEx (
+ EVT_NOTIFY_SIGNAL,
+ TPL_CALLBACK,
+ EmptyCallbackFunction,
+ NULL,
+ &gEfiEndOfDxeEventGroupGuid,
+ &EndOfDxeEvent
+ );
+ if (!EFI_ERROR (Status)) {
+ gBS->SignalEvent (EndOfDxeEvent);
+ gBS->CloseEvent (EndOfDxeEvent);
+ }
}
diff --git a/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf b/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf
index d8f892642c..d9982167e8 100644
--- a/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf
+++ b/ArmVirtPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf
@@ -65,6 +65,7 @@
gEfiFileInfoGuid
gEfiFileSystemInfoGuid
gEfiFileSystemVolumeLabelInfoIdGuid
+ gEfiEndOfDxeEventGroupGuid
[Protocols]
gEfiDevicePathProtocolGuid