]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c
IntelSiliconPkg IntelVTdDxe: Signal AcpiNotificationFunc() initially
[mirror_edk2.git] / IntelSiliconPkg / Feature / VTd / IntelVTdDxe / DmaProtection.c
index 37b3b19bce90df2b8b4e687666a59ad79e4e463d..648f64c20b7751690d8cda38cc25bf93c1b57c90 100644 (file)
@@ -1,6 +1,6 @@
 /** @file\r
 \r
 /** @file\r
 \r
-  Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>\r
+  Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
   This program and the accompanying materials\r
   are licensed and made available under the terms and conditions of the BSD License\r
   which accompanies this distribution.  The full text of the license may be found at\r
@@ -473,7 +473,8 @@ InitializeDmaProtection (
   EFI_STATUS  Status;\r
   EFI_EVENT   ExitBootServicesEvent;\r
   EFI_EVENT   LegacyBootEvent;\r
   EFI_STATUS  Status;\r
   EFI_EVENT   ExitBootServicesEvent;\r
   EFI_EVENT   LegacyBootEvent;\r
-  EFI_EVENT   Event;\r
+  EFI_EVENT   EventAcpi10;\r
+  EFI_EVENT   EventAcpi20;\r
   \r
   Status = gBS->CreateEventEx (\r
                   EVT_NOTIFY_SIGNAL,\r
   \r
   Status = gBS->CreateEventEx (\r
                   EVT_NOTIFY_SIGNAL,\r
@@ -481,7 +482,7 @@ InitializeDmaProtection (
                   AcpiNotificationFunc,\r
                   NULL,\r
                   &gEfiAcpi10TableGuid,\r
                   AcpiNotificationFunc,\r
                   NULL,\r
                   &gEfiAcpi10TableGuid,\r
-                  &Event\r
+                  &EventAcpi10\r
                   );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
                   );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
@@ -491,10 +492,17 @@ InitializeDmaProtection (
                   AcpiNotificationFunc,\r
                   NULL,\r
                   &gEfiAcpi20TableGuid,\r
                   AcpiNotificationFunc,\r
                   NULL,\r
                   &gEfiAcpi20TableGuid,\r
-                  &Event\r
+                  &EventAcpi20\r
                   );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
                   );\r
   ASSERT_EFI_ERROR (Status);\r
 \r
+  //\r
+  // Signal the events initially for the case\r
+  // that DMAR table has been installed.\r
+  //\r
+  gBS->SignalEvent (EventAcpi20);\r
+  gBS->SignalEvent (EventAcpi10);\r
+\r
   Status = gBS->CreateEventEx (\r
                   EVT_NOTIFY_SIGNAL,\r
                   TPL_CALLBACK,\r
   Status = gBS->CreateEventEx (\r
                   EVT_NOTIFY_SIGNAL,\r
                   TPL_CALLBACK,\r