* [PATCH] IntelSiliconPkg IntelVTdDxe: Do not SetupVtd again
@ 2017-11-23 1:11 Star Zeng
2017-11-23 1:27 ` Yao, Jiewen
0 siblings, 1 reply; 2+ messages in thread
From: Star Zeng @ 2017-11-23 1:11 UTC (permalink / raw)
To: edk2-devel; +Cc: Star Zeng, Jiewen Yao
Cc: Jiewen Yao <jiewen.yao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c | 3 +++
IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.h | 5 +++--
IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c | 7 ++++---
3 files changed, 10 insertions(+), 5 deletions(-)
diff --git a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c
index 6052a0aebe45..37b3b19bce90 100644
--- a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c
+++ b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c
@@ -412,6 +412,9 @@ AcpiNotificationFunc (
Status = GetDmarAcpiTable ();
if (EFI_ERROR (Status)) {
+ if (Status == EFI_ALREADY_STARTED) {
+ gBS->CloseEvent (Event);
+ }
return;
}
SetupVtd ();
diff --git a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.h b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.h
index 0886647ea673..519a5ab00450 100644
--- a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.h
+++ b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.h
@@ -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 (
diff --git a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c
index 81dec109675b..ce350bafbe3f 100644
--- a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c
+++ b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c
@@ -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;
--
2.7.0.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] IntelSiliconPkg IntelVTdDxe: Do not SetupVtd again
2017-11-23 1:11 [PATCH] IntelSiliconPkg IntelVTdDxe: Do not SetupVtd again Star Zeng
@ 2017-11-23 1:27 ` Yao, Jiewen
0 siblings, 0 replies; 2+ messages in thread
From: Yao, Jiewen @ 2017-11-23 1:27 UTC (permalink / raw)
To: Zeng, Star, edk2-devel@lists.01.org
Tested-by: Jiewen.yao@intel.com
Reviewed-by: Jiewen.yao@intel.com
> -----Original Message-----
> From: Zeng, Star
> Sent: Thursday, November 23, 2017 9:11 AM
> To: edk2-devel@lists.01.org
> Cc: Zeng, Star <star.zeng@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>
> Subject: [PATCH] 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>
> ---
> IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c | 3 +++
> IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.h | 5 +++--
> IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c | 7 ++++---
> 3 files changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c
> b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c
> index 6052a0aebe45..37b3b19bce90 100644
> --- a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c
> +++ b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.c
> @@ -412,6 +412,9 @@ AcpiNotificationFunc (
>
> Status = GetDmarAcpiTable ();
> if (EFI_ERROR (Status)) {
> + if (Status == EFI_ALREADY_STARTED) {
> + gBS->CloseEvent (Event);
> + }
> return;
> }
> SetupVtd ();
> diff --git a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.h
> b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.h
> index 0886647ea673..519a5ab00450 100644
> --- a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.h
> +++ b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmaProtection.h
> @@ -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 (
> diff --git a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c
> b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c
> index 81dec109675b..ce350bafbe3f 100644
> --- a/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c
> +++ b/IntelSiliconPkg/Feature/VTd/IntelVTdDxe/DmarAcpiTable.c
> @@ -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;
> --
> 2.7.0.windows.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-23 1:23 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-23 1:11 [PATCH] IntelSiliconPkg IntelVTdDxe: Do not SetupVtd again Star Zeng
2017-11-23 1:27 ` Yao, Jiewen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox