IntelSiliconPkg IntelVTdDxe: Do not SetupVtd again

Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
Tested-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
This commit is contained in:
Star Zeng 2017-11-23 08:55:02 +08:00
parent 2d3a626e3e
commit 7729e3c448
3 changed files with 10 additions and 5 deletions

View File

@ -412,6 +412,9 @@ AcpiNotificationFunc (
Status = GetDmarAcpiTable ();
if (EFI_ERROR (Status)) {
if (Status == EFI_ALREADY_STARTED) {
gBS->CloseEvent (Event);
}
return;
}
SetupVtd ();

View File

@ -302,8 +302,9 @@ FindVtdIndexByPciDevice (
/**
Get the DMAR ACPI table.
@retval EFI_SUCCESS The DMAR ACPI table is got.
@retval EFI_NOT_FOUND The DMAR ACPI table is not found.
@retval EFI_SUCCESS The DMAR ACPI table is got.
@retval EFI_ALREADY_STARTED The DMAR ACPI table has been got previously.
@retval EFI_NOT_FOUND The DMAR ACPI table is not found.
**/
EFI_STATUS
GetDmarAcpiTable (

View File

@ -978,8 +978,9 @@ FindAcpiPtr (
/**
Get the DMAR ACPI table.
@retval EFI_SUCCESS The DMAR ACPI table is got.
@retval EFI_NOT_FOUND The DMAR ACPI table is not found.
@retval EFI_SUCCESS The DMAR ACPI table is got.
@retval EFI_ALREADY_STARTED The DMAR ACPI table has been got previously.
@retval EFI_NOT_FOUND The DMAR ACPI table is not found.
**/
EFI_STATUS
GetDmarAcpiTable (
@ -990,7 +991,7 @@ GetDmarAcpiTable (
EFI_STATUS Status;
if (mAcpiDmarTable != NULL) {
return EFI_SUCCESS;
return EFI_ALREADY_STARTED;
}
AcpiTable = NULL;