IntelSiliconPkg/IntelVtd: Consume VTd policy PCD

Cc: Star Zeng <star.zeng@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Jiewen Yao <jiewen.yao@intel.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
This commit is contained in:
Jiewen Yao 2017-09-04 09:50:25 +08:00
parent 0d12b73306
commit c50596a701
3 changed files with 12 additions and 2 deletions

View File

@ -437,8 +437,11 @@ OnExitBootServices (
{ {
DEBUG ((DEBUG_INFO, "Vtd OnExitBootServices\n")); DEBUG ((DEBUG_INFO, "Vtd OnExitBootServices\n"));
DumpVtdRegsAll (); DumpVtdRegsAll ();
if ((PcdGet8(PcdVTdPolicyPropertyMask) & BIT1) == 0) {
DisableDmar (); DisableDmar ();
DumpVtdRegsAll (); DumpVtdRegsAll ();
}
} }
/** /**

View File

@ -352,6 +352,10 @@ IntelVTdInitialize (
EFI_STATUS Status; EFI_STATUS Status;
EFI_HANDLE Handle; EFI_HANDLE Handle;
if ((PcdGet8(PcdVTdPolicyPropertyMask) & BIT0) == 0) {
return EFI_UNSUPPORTED;
}
InitializeDmaProtection (); InitializeDmaProtection ();
Handle = NULL; Handle = NULL;

View File

@ -73,6 +73,9 @@
gEfiPciEnumerationCompleteProtocolGuid ## CONSUMES gEfiPciEnumerationCompleteProtocolGuid ## CONSUMES
gEdkiiPlatformVTdPolicyProtocolGuid ## SOMETIMES_CONSUMES gEdkiiPlatformVTdPolicyProtocolGuid ## SOMETIMES_CONSUMES
[Pcd]
gIntelSiliconPkgTokenSpaceGuid.PcdVTdPolicyPropertyMask ## CONSUMES
[Depex] [Depex]
gEfiPciRootBridgeIoProtocolGuid AND gEfiPciRootBridgeIoProtocolGuid AND
gEfiAcpiSdtProtocolGuid gEfiAcpiSdtProtocolGuid