diff options
author | Ard Biesheuvel <ard.biesheuvel@linaro.org> | 2015-09-04 06:11:42 +0000 |
---|---|---|
committer | abiesheuvel <abiesheuvel@Edk2> | 2015-09-04 06:11:42 +0000 |
commit | 0f060e34a4cb272ca595482fb9117c3162697141 (patch) | |
tree | 4e7034ac96f49fd590ff005f7fc63122c6877a22 | |
parent | c68d3a697874a81f076ae57dc16acfe255d2986b (diff) | |
download | edk2-platforms-0f060e34a4cb272ca595482fb9117c3162697141.tar.xz |
ArmPlatformPkg: signal EndOfDxe event in PlatformBsdInit
Like the ArmVirtPkg platforms up until SVN r17713, the ArmPlatformPkg
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 ArmPlatformPkg'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>
Reviewed-by: Leif Lindholm <leif.lindholm@linaro.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18394 6f19259b-4bc3-4df7-8a09-765794883524
3 files changed, 38 insertions, 0 deletions
diff --git a/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c b/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c index 98d5b277a6..e27e6d66df 100644 --- a/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c +++ b/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.c @@ -31,6 +31,24 @@ PlatformIntelBdsConstructor ( return EFI_SUCCESS;
}
+/**
+ 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
//
@@ -45,6 +63,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);
+ }
}
STATIC
diff --git a/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h b/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h index 7122d58be7..da428288fb 100644 --- a/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h +++ b/ArmPlatformPkg/Library/PlatformIntelBdsLib/IntelBdsPlatform.h @@ -30,5 +30,6 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include <Library/PlatformBdsLib.h>
#include <Guid/GlobalVariable.h>
+#include <Guid/EventGroup.h>
#endif // _INTEL_BDS_PLATFORM_H
diff --git a/ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf b/ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf index a18c5ea71f..39df113288 100644 --- a/ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf +++ b/ArmPlatformPkg/Library/PlatformIntelBdsLib/PlatformIntelBdsLib.inf @@ -53,6 +53,7 @@ [Guids]
gArmGlobalVariableGuid
+ gEfiEndOfDxeEventGroupGuid
[Pcd]
gArmPlatformTokenSpaceGuid.PcdDefaultConInPaths
|