]> git.proxmox.com Git - mirror_edk2.git/commitdiff
IntelSiliconPkg IntelVTdDxe: Signal AcpiNotificationFunc() initially
authorStar Zeng <star.zeng@intel.com>
Wed, 3 Jan 2018 06:00:03 +0000 (14:00 +0800)
committerStar Zeng <star.zeng@intel.com>
Fri, 5 Jan 2018 02:26:32 +0000 (10:26 +0800)
Signal AcpiNotificationFunc() initially for the case that
DMAR table has been installed when creating event.

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c
IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.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
index ce350bafbe3ffdee176909d46a7626d9833e779c..b16bd93d53f135238bca446efc57557f224e50f8 100644 (file)
@@ -1005,6 +1005,9 @@ GetDmarAcpiTable (
                &AcpiTable\r
                );\r
   }\r
                &AcpiTable\r
                );\r
   }\r
+  if (EFI_ERROR (Status)) {\r
+    return EFI_NOT_FOUND;\r
+  }\r
   ASSERT (AcpiTable != NULL);\r
 \r
   mAcpiDmarTable = FindAcpiPtr (\r
   ASSERT (AcpiTable != NULL);\r
 \r
   mAcpiDmarTable = FindAcpiPtr (\r