]> git.proxmox.com Git - mirror_edk2.git/blobdiff - IntelSiliconPkg/Feature/VTd/IntelVTdDxe/IntelVTdDxe.c
IntelSiliconPkg VTdDxe: Option to force no early access attr request
[mirror_edk2.git] / IntelSiliconPkg / Feature / VTd / IntelVTdDxe / IntelVTdDxe.c
index 25d7c80af1d421edb6e37daab50d72309aea7be5..09948ce50e940b4f408603465de9f8c33e6af20e 100644 (file)
@@ -254,6 +254,13 @@ VTdSetAttribute (
     // Record the entry to driver global variable.\r
     // As such once VTd is activated, the setting can be adopted.\r
     //\r
+    if ((PcdGet8 (PcdVTdPolicyPropertyMask) & BIT2) != 0) {\r
+      //\r
+      // Force no IOMMU access attribute request recording before DMAR table is installed.\r
+      //\r
+      ASSERT_EFI_ERROR (EFI_NOT_READY);\r
+      return EFI_NOT_READY;\r
+    }\r
     Status = RequestAccessAttribute (Segment, SourceId, DeviceAddress, Length, IoMmuAccess);\r
   } else {\r
     PERF_CODE (\r