]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelSiliconPkg/IntelVTdDxe/DmaProtection.c
IntelSiliconPkg/IntelVtd: Consume VTd policy PCD
[mirror_edk2.git] / IntelSiliconPkg / IntelVTdDxe / DmaProtection.c
index 82ed4d2df28504f2c243db495d565793b26d589a..f5de01f3806cc35a87cac2311049c77b00272a75 100644 (file)
@@ -437,8 +437,11 @@ OnExitBootServices (
 {\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
 }\r
 \r
 /**\r