[edk2-devel] [PATCH v3 2/2] IntelSiliconPkg/VTd: Add PCD flag for select pre-boot DMA protection Driver

Sheng Wei w.sheng at intel.com
Wed Jan 6 01:53:35 UTC 2021


gIntelSiliconPkgTokenSpaceGuid.PcdVtdDmarPeiEnable is added for select
 pre-boot DMA protection driver in PEI phase.
IntelVTdPmrPei driver is used to do the pre-boot DMA protection by PMR.
IntelVTdDmarPei driver is used to do the pre-boot DMA protection by DMAR.

REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3095

Signed-off-by: Sheng Wei <w.sheng at intel.com>
Cc: Ray Ni <ray.ni at intel.com>
Cc: Rangasai V Chaganty <rangasai.v.chaganty at intel.com>
Cc: Jiewen Yao <jiewen.yao at intel.com>
Cc: Jenny Huang <jenny.huang at intel.com>
Cc: Feng Roger <roger.feng at intel.com>
Reviewed-by: Jenny Huang <jenny.huang at intel.com>
---
 Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec | 5 +++++
 Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc | 4 ++++
 2 files changed, 9 insertions(+)

diff --git a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec
index 4a2cbca5..3f247dd3 100644
--- a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec
+++ b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec
@@ -121,3 +121,8 @@
   # @Prompt The VTd PEI DMA buffer size for S3.
   gIntelSiliconPkgTokenSpaceGuid.PcdVTdPeiDmaBufferSizeS3|0x00200000|UINT32|0x00000004
 
+  ## Declares the VTd PEI driver to protect DMA.<BR><BR>
+  #  TRUE:  Use DMAR to protect DMA at PEI phase
+  #  FALSE: Use PMR to protect DMA at PEI phase
+  gIntelSiliconPkgTokenSpaceGuid.PcdVtdDmarPeiEnable|FALSE|BOOLEAN|0x00000007
+
diff --git a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc
index 029b9156..6feb5a99 100644
--- a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc
+++ b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc
@@ -80,7 +80,11 @@
   IntelSiliconPkg/Feature/PcieSecurity/IntelPciDeviceSecurityDxe/IntelPciDeviceSecurityDxe.inf
   IntelSiliconPkg/Feature/PcieSecurity/SamplePlatformDevicePolicyDxe/SamplePlatformDevicePolicyDxe.inf
   IntelSiliconPkg/Feature/VTd/IntelVTdDxe/IntelVTdDxe.inf
+!if gIntelSiliconPkgTokenSpaceGuid.PcdVtdDmarPeiEnable == TRUE
+  IntelSiliconPkg/Feature/VTd/IntelVTdDmarPei/IntelVTdDmarPei.inf
+!else
   IntelSiliconPkg/Feature/VTd/IntelVTdPmrPei/IntelVTdPmrPei.inf
+!endif
   IntelSiliconPkg/Feature/VTd/PlatformVTdSampleDxe/PlatformVTdSampleDxe.inf
   IntelSiliconPkg/Feature/VTd/PlatformVTdInfoSamplePei/PlatformVTdInfoSamplePei.inf
   IntelSiliconPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdateDxe.inf
-- 
2.16.2.windows.1



-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#69769): https://edk2.groups.io/g/devel/message/69769
Mute This Topic: https://groups.io/mt/79466625/1813853
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-





More information about the edk2-devel-archive mailing list