summaryrefslogtreecommitdiffstats
path: root/IntelSiliconPkg
diff options
context:
space:
mode:
authorStar Zeng <star.zeng@intel.com>2018-01-03 14:00:03 +0800
committerStar Zeng <star.zeng@intel.com>2018-01-17 10:27:47 +0800
commit5070c3f408dae26584f53baa2d592d3d6f1849eb (patch)
treed181e74c536b48d7c3b56d46bdd15cb1a81d2923 /IntelSiliconPkg
parentb6c446b77eeb6722d1a72529bf682fcd7d214764 (diff)
downloadedk2-5070c3f408dae26584f53baa2d592d3d6f1849eb.tar.gz
edk2-5070c3f408dae26584f53baa2d592d3d6f1849eb.tar.bz2
edk2-5070c3f408dae26584f53baa2d592d3d6f1849eb.zip
IntelSiliconPkg IntelVTdDxe: Signal AcpiNotificationFunc() initially
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> (cherry picked from commit dcd39e09ff3dbec468152a32b343e68e6c87f4b6)
Diffstat (limited to 'IntelSiliconPkg')
-rw-r--r--IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c16
-rw-r--r--IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c3
2 files changed, 15 insertions, 4 deletions
diff --git a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c
index 37b3b19bce..648f64c20b 100644
--- a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c
+++ b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c
@@ -1,6 +1,6 @@
/** @file
- Copyright (c) 2017, Intel Corporation. All rights reserved.<BR>
+ Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -473,7 +473,8 @@ InitializeDmaProtection (
EFI_STATUS Status;
EFI_EVENT ExitBootServicesEvent;
EFI_EVENT LegacyBootEvent;
- EFI_EVENT Event;
+ EFI_EVENT EventAcpi10;
+ EFI_EVENT EventAcpi20;
Status = gBS->CreateEventEx (
EVT_NOTIFY_SIGNAL,
@@ -481,7 +482,7 @@ InitializeDmaProtection (
AcpiNotificationFunc,
NULL,
&gEfiAcpi10TableGuid,
- &Event
+ &EventAcpi10
);
ASSERT_EFI_ERROR (Status);
@@ -491,10 +492,17 @@ InitializeDmaProtection (
AcpiNotificationFunc,
NULL,
&gEfiAcpi20TableGuid,
- &Event
+ &EventAcpi20
);
ASSERT_EFI_ERROR (Status);
+ //
+ // Signal the events initially for the case
+ // that DMAR table has been installed.
+ //
+ gBS->SignalEvent (EventAcpi20);
+ gBS->SignalEvent (EventAcpi10);
+
Status = gBS->CreateEventEx (
EVT_NOTIFY_SIGNAL,
TPL_CALLBACK,
diff --git a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c
index ce350bafbe..b16bd93d53 100644
--- a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c
+++ b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c
@@ -1005,6 +1005,9 @@ GetDmarAcpiTable (
&AcpiTable
);
}
+ if (EFI_ERROR (Status)) {
+ return EFI_NOT_FOUND;
+ }
ASSERT (AcpiTable != NULL);
mAcpiDmarTable = FindAcpiPtr (