]> git.proxmox.com Git - mirror_edk2.git/blobdiff - ArmPlatformPkg/Bds/BootMenu.c
ArmPlatformPkg/Bds: Signal when the variable 'Fdt' has been updated
[mirror_edk2.git] / ArmPlatformPkg / Bds / BootMenu.c
index 04a2eee6f5a88217369a68533ce9345c4e85f54f..3676bf02459471f26a5bc82d4db750f2701dd7c5 100644 (file)
@@ -15,6 +15,7 @@
 #include "BdsInternal.h"\r
 \r
 #include <Guid/ArmGlobalVariableHob.h>\r
+#include <Guid/ArmPlatformEvents.h>\r
 \r
 extern BDS_LOAD_OPTION_SUPPORT *BdsLoadOptionSupportList;\r
 \r
@@ -834,6 +835,7 @@ UpdateFdtPath (
   BDS_SUPPORTED_DEVICE      *SupportedBootDevice;\r
   EFI_DEVICE_PATH_PROTOCOL  *FdtDevicePathNodes;\r
   EFI_DEVICE_PATH_PROTOCOL  *FdtDevicePath;\r
+  EFI_EVENT                 UpdateFdtEvent;\r
 \r
   Status = SelectBootDevice (&SupportedBootDevice);\r
   if (EFI_ERROR(Status)) {\r
@@ -873,6 +875,23 @@ UpdateFdtPath (
     ASSERT_EFI_ERROR(Status);\r
   }\r
 \r
+  if (!EFI_ERROR (Status)) {\r
+    //\r
+    // Signal FDT has been updated\r
+    //\r
+    Status = gBS->CreateEventEx (\r
+        EVT_NOTIFY_SIGNAL,\r
+        TPL_NOTIFY,\r
+        EmptyCallbackFunction,\r
+        NULL,\r
+        &gArmPlatformUpdateFdtEventGuid,\r
+        &UpdateFdtEvent\r
+        );\r
+    if (!EFI_ERROR (Status)) {\r
+      gBS->SignalEvent (UpdateFdtEvent);\r
+    }\r
+  }\r
+\r
 EXIT:\r
   if (Status == EFI_ABORTED) {\r
     Print(L"\n");\r