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>
{\r
DEBUG ((DEBUG_INFO, "Vtd OnExitBootServices\n"));\r
DumpVtdRegsAll ();\r
{\r
DEBUG ((DEBUG_INFO, "Vtd OnExitBootServices\n"));\r
DumpVtdRegsAll ();\r
- DisableDmar ();\r
- DumpVtdRegsAll ();\r
+\r
+ if ((PcdGet8(PcdVTdPolicyPropertyMask) & BIT1) == 0) {\r
+ DisableDmar ();\r
+ DumpVtdRegsAll ();\r
+ }\r
EFI_STATUS Status;\r
EFI_HANDLE Handle;\r
\r
EFI_STATUS Status;\r
EFI_HANDLE Handle;\r
\r
+ if ((PcdGet8(PcdVTdPolicyPropertyMask) & BIT0) == 0) {\r
+ return EFI_UNSUPPORTED;\r
+ }\r
+\r
InitializeDmaProtection ();\r
\r
Handle = NULL;\r
InitializeDmaProtection ();\r
\r
Handle = NULL;\r
gEfiPciEnumerationCompleteProtocolGuid ## CONSUMES\r
gEdkiiPlatformVTdPolicyProtocolGuid ## SOMETIMES_CONSUMES\r
\r
gEfiPciEnumerationCompleteProtocolGuid ## CONSUMES\r
gEdkiiPlatformVTdPolicyProtocolGuid ## SOMETIMES_CONSUMES\r
\r
+[Pcd]\r
+ gIntelSiliconPkgTokenSpaceGuid.PcdVTdPolicyPropertyMask ## CONSUMES\r
+\r
[Depex]\r
gEfiPciRootBridgeIoProtocolGuid AND\r
gEfiAcpiSdtProtocolGuid\r
[Depex]\r
gEfiPciRootBridgeIoProtocolGuid AND\r
gEfiAcpiSdtProtocolGuid\r