From nobody Fri Mar 29 06:36:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+69787+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+69787+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=intel.com ARC-Seal: i=1; a=rsa-sha256; t=1609914698; cv=none; d=zohomail.com; s=zohoarc; b=B4ZpNgEfYZdT+yxiJBkb+G31x1w4hLTEdBneUqqtqNgUkg7xjOuNwcIGqIHsE5t7skLJryFs6tkGr1KUe4HADM/vdNZdt8Dh1phDngWr8eZntiQWRFl2gSHS6UDAV3HMdd7KCjqP3OdOsX9ORhfvNr1AD/F9A0MqzIGI2lyT528= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1609914698; h=Cc:Date:From:In-Reply-To:List-Id:List-Unsubscribe:Message-ID:Reply-To:References:Sender:Subject:To; bh=YB5OxdM6vfdwOMgP5JhWFUVydEG13yXicjhhWP9sieI=; b=ASKc+GIKEsjby6O1CunoXQBoTxfdTQo/9LovrklCF8HTB12ClHPzWjeSWPTwCGXo0p7Klv+cmmiYLxpG/x1Jd+bf9LxO4AE43JtDe/uCIl5iFsGz7ves8sZg3wJ9ZzzsKRC1He23vNzKS0GUn1C+lgymjwDUW1glKnV51kUUKpU= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+69787+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) header.from= Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1609914698420109.95301640368166; Tue, 5 Jan 2021 22:31:38 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id xzZYYY1788612xKGlw3moSiZ; Tue, 05 Jan 2021 22:31:38 -0800 X-Received: from mga05.intel.com (mga05.intel.com []) by mx.groups.io with SMTP id smtpd.web12.4493.1609914691241705230 for ; Tue, 05 Jan 2021 22:31:36 -0800 IronPort-SDR: ZBf+lbNRV8VmIGHErXIhvYixThUHr8sy7IrmESb7zsBxg1jdFs8nnAsi0KTtqsCfWIGcwzRbDq UU9tK0rXsF+Q== X-IronPort-AV: E=McAfee;i="6000,8403,9855"; a="262002177" X-IronPort-AV: E=Sophos;i="5.78,479,1599548400"; d="scan'208";a="262002177" X-Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Jan 2021 22:31:36 -0800 IronPort-SDR: XvQ7wpkFREvJhETjHFOXBoIqTnyHsjMen/4ztig2UUjqgOpW/KPU90B6u8sLFMQbiXxLbYX9zH 2eboP6wZH/zA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.78,479,1599548400"; d="scan'208";a="379170776" X-Received: from shwdesssddpdwei.ccr.corp.intel.com ([10.239.157.46]) by orsmga008.jf.intel.com with ESMTP; 05 Jan 2021 22:31:34 -0800 From: "Sheng Wei" To: devel@edk2.groups.io Cc: Ray Ni , Rangasai V Chaganty , Jiewen Yao , Jenny Huang , Feng Roger Subject: [edk2-devel] [PATCH v4 2/2] IntelSiliconPkg/VTd: Add PCD flag for select pre-boot DMA protection Driver Date: Wed, 6 Jan 2021 14:31:18 +0800 Message-Id: <20210106063118.17216-3-w.sheng@intel.com> In-Reply-To: <20210106063118.17216-1-w.sheng@intel.com> References: <20210106063118.17216-1-w.sheng@intel.com> Precedence: Bulk List-Unsubscribe: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,w.sheng@intel.com X-Gm-Message-State: DZOJHLb6l57eqZqp3Ja6zBHkx1787277AA= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1609914698; bh=xYHQM+re3bBGJLyjVFUZTspSOluOHfK2yEnJhvdaFFk=; h=Cc:Date:From:Reply-To:Subject:To; b=lY8uDrpRjbSOozspCWzOd7no/21Jizocv/veB3a3zYF2Hi6NNuYKx9U8rz/kk6W4a4G hKYgnTb5Pd9pd4LnNm4DJ+atwIqClAJN1g8nyHvf31AzuhadYadcAiulnACqalm2Fxhuy l6wSDuyJaiwfq3Rcj+bpz68Q52XfzAaABWA= X-ZohoMail-DKIM: pass (identity @groups.io) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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=3D3095 Signed-off-by: Sheng Wei Cc: Ray Ni Cc: Rangasai V Chaganty Cc: Jiewen Yao Cc: Jenny Huang Cc: Feng Roger Reviewed-by: Jenny Huang --- Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec | 7 +++++++ Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec b/Silicon/In= tel/IntelSiliconPkg/IntelSiliconPkg.dec index 4a2cbca5..b386080a 100644 --- a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec +++ b/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dec @@ -84,6 +84,12 @@ # @Prompt Shadow all microcode update patches. gIntelSiliconPkgTokenSpaceGuid.PcdShadowAllMicrocode|FALSE|BOOLEAN|0x000= 00006 =20 + ## 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 + # @Prompt The VTd PEI driver to protect DMA. + gIntelSiliconPkgTokenSpaceGuid.PcdVtdDmarPeiEnable|FALSE|BOOLEAN|0x00000= 007 + [PcdsFixedAtBuild, PcdsPatchableInModule] ## Error code for VTd error.

# EDKII_ERROR_CODE_VTD_ERROR =3D (EFI_IO_BUS_UNSPECIFIED | (EFI_OEM_SPE= CIFIC | 0x00000000)) =3D 0x02008000
@@ -121,3 +127,4 @@ # @Prompt The VTd PEI DMA buffer size for S3. gIntelSiliconPkgTokenSpaceGuid.PcdVTdPeiDmaBufferSizeS3|0x00200000|UINT3= 2|0x00000004 =20 + diff --git a/Silicon/Intel/IntelSiliconPkg/IntelSiliconPkg.dsc b/Silicon/In= tel/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/IntelPciD= eviceSecurityDxe.inf IntelSiliconPkg/Feature/PcieSecurity/SamplePlatformDevicePolicyDxe/Sampl= ePlatformDevicePolicyDxe.inf IntelSiliconPkg/Feature/VTd/IntelVTdDxe/IntelVTdDxe.inf +!if gIntelSiliconPkgTokenSpaceGuid.PcdVtdDmarPeiEnable =3D=3D 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/PlatformVTdInfoSamp= lePei.inf IntelSiliconPkg/Feature/Capsule/MicrocodeUpdateDxe/MicrocodeUpdateDxe.inf --=20 2.16.2.windows.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#69787): https://edk2.groups.io/g/devel/message/69787 Mute This Topic: https://groups.io/mt/79470032/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-