summaryrefslogtreecommitdiffstats
path: root/ArmPlatformPkg/Bds
diff options
context:
space:
mode:
authorOlivier Martin <olivier.martin@arm.com>2015-01-06 15:54:12 +0000
committeroliviermartin <oliviermartin@Edk2>2015-01-06 15:54:12 +0000
commit5c2d456b9670cd8eeed1b06d3e50011598ade3b0 (patch)
tree1a9afdf1d9868b93006cc4036160b15e48a73499 /ArmPlatformPkg/Bds
parentf2c730d3123c8952e2715b120e79c4ea20c73451 (diff)
downloadedk2-5c2d456b9670cd8eeed1b06d3e50011598ade3b0.tar.gz
edk2-5c2d456b9670cd8eeed1b06d3e50011598ade3b0.tar.bz2
edk2-5c2d456b9670cd8eeed1b06d3e50011598ade3b0.zip
ArmPlatformPkg/Bds: Signal when the variable 'Fdt' has been updated
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16589 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'ArmPlatformPkg/Bds')
-rw-r--r--ArmPlatformPkg/Bds/Bds.c1
-rw-r--r--ArmPlatformPkg/Bds/Bds.inf3
-rw-r--r--ArmPlatformPkg/Bds/BdsInternal.h15
-rw-r--r--ArmPlatformPkg/Bds/BootMenu.c19
4 files changed, 36 insertions, 2 deletions
diff --git a/ArmPlatformPkg/Bds/Bds.c b/ArmPlatformPkg/Bds/Bds.c
index debc93218b..971ab07524 100644
--- a/ArmPlatformPkg/Bds/Bds.c
+++ b/ArmPlatformPkg/Bds/Bds.c
@@ -427,7 +427,6 @@ StartDefaultBootOnTimeout (
which is implementation-dependent.
**/
-STATIC
VOID
EFIAPI
EmptyCallbackFunction (
diff --git a/ArmPlatformPkg/Bds/Bds.inf b/ArmPlatformPkg/Bds/Bds.inf
index c3de53c2bd..9872ce38ac 100644
--- a/ArmPlatformPkg/Bds/Bds.inf
+++ b/ArmPlatformPkg/Bds/Bds.inf
@@ -2,7 +2,7 @@
#
# Component description file for Bds module
#
-# Copyright (c) 2011-2014, ARM Ltd. All rights reserved.<BR>
+# Copyright (c) 2011-2015, ARM Ltd. All rights reserved.<BR>
#
# This program and the accompanying materials
# are licensed and made available under the terms and conditions of the BSD License
@@ -53,6 +53,7 @@
gEfiEndOfDxeEventGroupGuid
gEfiFileSystemInfoGuid
gArmGlobalVariableGuid
+ gArmPlatformUpdateFdtEventGuid
[Protocols]
gEfiBdsArchProtocolGuid
diff --git a/ArmPlatformPkg/Bds/BdsInternal.h b/ArmPlatformPkg/Bds/BdsInternal.h
index f14e28591a..95cc0b65c9 100644
--- a/ArmPlatformPkg/Bds/BdsInternal.h
+++ b/ArmPlatformPkg/Bds/BdsInternal.h
@@ -289,4 +289,19 @@ IsPrintableString (
OUT BOOLEAN *IsUnicode
);
+/**
+ 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.
+
+**/
+VOID
+EFIAPI
+EmptyCallbackFunction (
+ IN EFI_EVENT Event,
+ IN VOID *Context
+ );
+
#endif /* _BDSINTERNAL_H_ */
diff --git a/ArmPlatformPkg/Bds/BootMenu.c b/ArmPlatformPkg/Bds/BootMenu.c
index 04a2eee6f5..3676bf0245 100644
--- a/ArmPlatformPkg/Bds/BootMenu.c
+++ b/ArmPlatformPkg/Bds/BootMenu.c
@@ -15,6 +15,7 @@
#include "BdsInternal.h"
#include <Guid/ArmGlobalVariableHob.h>
+#include <Guid/ArmPlatformEvents.h>
extern BDS_LOAD_OPTION_SUPPORT *BdsLoadOptionSupportList;
@@ -834,6 +835,7 @@ UpdateFdtPath (
BDS_SUPPORTED_DEVICE *SupportedBootDevice;
EFI_DEVICE_PATH_PROTOCOL *FdtDevicePathNodes;
EFI_DEVICE_PATH_PROTOCOL *FdtDevicePath;
+ EFI_EVENT UpdateFdtEvent;
Status = SelectBootDevice (&SupportedBootDevice);
if (EFI_ERROR(Status)) {
@@ -873,6 +875,23 @@ UpdateFdtPath (
ASSERT_EFI_ERROR(Status);
}
+ if (!EFI_ERROR (Status)) {
+ //
+ // Signal FDT has been updated
+ //
+ Status = gBS->CreateEventEx (
+ EVT_NOTIFY_SIGNAL,
+ TPL_NOTIFY,
+ EmptyCallbackFunction,
+ NULL,
+ &gArmPlatformUpdateFdtEventGuid,
+ &UpdateFdtEvent
+ );
+ if (!EFI_ERROR (Status)) {
+ gBS->SignalEvent (UpdateFdtEvent);
+ }
+ }
+
EXIT:
if (Status == EFI_ABORTED) {
Print(L"\n");