From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mx.groups.io with SMTP id smtpd.web10.3421.1576133640797029236 for ; Wed, 11 Dec 2019 22:54:00 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 192.55.52.136, mailfrom: ray.ni@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga106.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Dec 2019 22:54:00 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,304,1571727600"; d="scan'208";a="415138213" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga006.fm.intel.com with ESMTP; 11 Dec 2019 22:54:00 -0800 Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 11 Dec 2019 22:53:59 -0800 Received: from shsmsx107.ccr.corp.intel.com (10.239.4.96) by FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 11 Dec 2019 22:53:59 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.90]) by SHSMSX107.ccr.corp.intel.com ([169.254.9.164]) with mapi id 14.03.0439.000; Thu, 12 Dec 2019 14:53:57 +0800 From: "Ni, Ray" To: Tom Lendacky , "devel@edk2.groups.io" CC: "Justen, Jordan L" , Laszlo Ersek , Ard Biesheuvel , "Kinney, Michael D" , "Gao, Liming" , "Dong, Eric" , Brijesh Singh , "Wang, Jian J" , "Wu, Hao A" Subject: Re: [RFC PATCH v3 01/43] MdePkg: Create PCDs to be used in support of SEV-ES Thread-Topic: [RFC PATCH v3 01/43] MdePkg: Create PCDs to be used in support of SEV-ES Thread-Index: AQHVn94ifpOONOYt706Azp4CQODSW6e2LkgQ Date: Thu, 12 Dec 2019 06:53:57 +0000 Message-ID: <734D49CCEBEEF84792F5B80ED585239D5C399A33@SHSMSX104.ccr.corp.intel.com> References: In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzk2N2JjYTEtMTM0Zi00NmY2LWE3ZmItMzE4MThkNTljMWQyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiNmNzV25DakR6b1lYMnFxd2VDdG5CQVlBRG9jWjV3Nk5mM2hBdks3dlplRTh5UDdreGhHS1JTZ2xmSEhXa0EzayJ9 x-ctpclassification: CTP_NT dlp-product: dlpe-windows dlp-version: 11.2.0.6 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: ray.ni@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Do you really need to define the PCD in MdePkg? General guide lines are: 1. Avoid UefiCpuPkg depend on MdeModulePkg. 2. Do not define platform level PCD in core pkgs (MdePkg, MdeModulePkg, Uef= iCpuPkg, etc) PcdSevEsIsEnabled seems to be used in OVMF pkg only so how about define tha= t in OvmfPkg.dec? Thanks, Ray > -----Original Message----- > From: Tom Lendacky > Sent: Thursday, November 21, 2019 4:06 AM > To: devel@edk2.groups.io > Cc: Justen, Jordan L ; Laszlo Ersek ; Ard Biesheuvel > ; Kinney, Michael D ; Gao, Liming ; Dong, > Eric ; Ni, Ray ; Brijesh Singh ; Wang, Jian J > ; Wu, Hao A > Subject: [RFC PATCH v3 01/43] MdePkg: Create PCDs to be used in support o= f SEV-ES >=20 > BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2198 >=20 > Two new fixed PCSs are needed to support SEV-ES under OVMF: > - PcdSecGhcbBase UINT64 value that is the base address of the GHCB > used during the SEC phase. > - PcdSecGhcbSize UINT64 value that is the size, in bytes, of the GHCB > area used during the SEC phase. >=20 > Three new dynamic PCDs are needed to support SEV-ES under OVMF: > - PcdSevEsIsEnabled: BOOLEAN value used to indicate if SEV-ES is enable= d > - PcdGhcbBase: UINT64 value that is the base address of the GHCB > allocation. > - PcdGhcbSize: UINT64 value that is the size, in bytes, of the > GHCB allocation (size is dependent on the number o= f > APs). >=20 > Cc: Jian J Wang > Cc: Hao A Wu > Signed-off-by: Tom Lendacky > --- > MdeModulePkg/MdeModulePkg.dec | 23 +++++++++++++++++++++++ > 1 file changed, 23 insertions(+) >=20 > diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.de= c > index 41b9e70a1ac8..c3bdfcc80971 100644 > --- a/MdeModulePkg/MdeModulePkg.dec > +++ b/MdeModulePkg/MdeModulePkg.dec > @@ -1037,6 +1037,14 @@ [PcdsFixedAtBuild] > # @Prompt Enable UEFI Stack Guard. > gEfiMdeModulePkgTokenSpaceGuid.PcdCpuStackGuard|FALSE|BOOLEAN|0x300010= 55 >=20 > + ## The base address of the SEC GHCB page. > + # @Prompt SEC GHCB Base Address > + gEfiMdeModulePkgTokenSpaceGuid.PcdSecGhcbBase|0|UINT32|0x30001056 > + > + ## The total size of the SEC GHCB page. > + # @Prompt SEC GHCB Size > + gEfiMdeModulePkgTokenSpaceGuid.PcdSecGhcbSize|0|UINT32|0x30001057 > + > [PcdsFixedAtBuild, PcdsPatchableInModule] > ## Dynamic type PCD can be registered callback function for Pcd settin= g action. > # PcdMaxPeiPcdCallBackNumberPerPcdEntry indicates the maximum number = of callback function > @@ -2053,6 +2061,21 @@ [PcdsDynamic, PcdsDynamicEx] > # @Prompt If there is any test key used by the platform. > gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed|FALSE|BOOLEAN|0x00030003 >=20 > + ## This dynamic PCD indicates whether SEV-ES is enabled > + # TRUE - SEV-ES is enabled > + # FALSE - SEV-ES is not enabled > + # @Prompt SEV-ES Status > + gEfiMdeModulePkgTokenSpaceGuid.PcdSevEsIsEnabled|FALSE|BOOLEAN|0x00030= 007 > + > + ## This dynamic PCD holds the base address of the GHCB pool allocation= . > + # @Prompt GHCB Pool Base Address > + gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbBase|0|UINT64|0x00030008 > + > + ## This dynamic PCD holds the total size of the GHCB pool allocation. > + # The amount of memory allocated for GHCBs is dependent on the number= of APs. > + # @Prompt GHCB Pool Size > + gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbSize|0|UINT64|0x00030009 > + > [PcdsDynamicEx] > ## This dynamic PCD enables the default variable setting. > # Its value is the default store ID value. The default value is zero = as Standard default. > -- > 2.17.1