From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com []) by mx.groups.io with SMTP id smtpd.web10.1498.1606875674887200808 for ; Tue, 01 Dec 2020 18:21:16 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: w.sheng@intel.com) IronPort-SDR: pv2pBZPtGXwuq1Unr2x4oLVYo560ONzyybnVHyagL6PtTileeQZKA2X8/7AHS+eF8R3CestF4m WN1Rxv+exCNQ== X-IronPort-AV: E=McAfee;i="6000,8403,9822"; a="173100838" X-IronPort-AV: E=Sophos;i="5.78,385,1599548400"; d="scan'208";a="173100838" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Dec 2020 18:21:12 -0800 IronPort-SDR: 3U6YZ7ji9QusAdQzBcTAEcuNkStFel5BDCGrqDxmZ+Zo7oXOiBBhuhrcKWjE4IbyHZp6sZb3Wa Hgj7QLZpGhCg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,385,1599548400"; d="scan'208";a="365080244" Received: from shwdesssddpdwei.ccr.corp.intel.com ([10.239.157.46]) by fmsmga004.fm.intel.com with ESMTP; 01 Dec 2020 18:21:10 -0800 From: "Sheng Wei" To: devel@edk2.groups.io Cc: Ray Ni , Rangasai V Chaganty , Jiewen Yao , Jenny Huang , Feng Roger Subject: [PATCH 2/2] IntelSiliconPkg/VTd: Add PCD flag for select pre-boot DMA protection Driver Date: Wed, 2 Dec 2020 10:20:34 +0800 Message-Id: <20201202022034.16404-3-w.sheng@intel.com> X-Mailer: git-send-email 2.16.2.windows.1 In-Reply-To: <20201202022034.16404-1-w.sheng@intel.com> References: <20201202022034.16404-1-w.sheng@intel.com> 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 Cc: Ray Ni Cc: Rangasai V Chaganty Cc: Jiewen Yao Cc: Jenny Huang Cc: Feng Roger --- 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 284820af..2cfed22d 100644 --- a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec +++ b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec @@ -114,3 +114,8 @@ # @Prompt The VTd PEI DMA buffer size for S3. gIntelSiliconPkgTokenSpaceGuid.PcdVTdPeiDmaBufferSizeS3|0x00200000|UINT32|0x00000004 + ## Declares the VTd PEI driver to protect DMA.

+ # TRUE: Use DMAR to protect DMA at PEI phase + # FALSE: Use PMR to protect DMA at PEI phase + gIntelSiliconPkgTokenSpaceGuid.PcdVtdDmarPeiEnable|FALSE|BOOLEAN|0x00000006 + 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