From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mx.groups.io with SMTP id smtpd.web11.1771.1588407567093255534 for ; Sat, 02 May 2020 01:19:27 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: eric.dong@intel.com) IronPort-SDR: tMOE15puXER+8tP0R8djBjQHoA09JRLR7nD40IARzZGT4c6sPXTNDWqWV6Wxxy3zlt/Op2+xML Am5HYV1sGOTw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 May 2020 01:19:24 -0700 IronPort-SDR: +q2YiptsJglFlsawoywDAQMpBMzo4RpVwfEn5oByEAoX9rorS57R3chvpRLWq9LnjPNk/PLncg ELhJzZ2wp8CA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,343,1583222400"; d="scan'208";a="460493582" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by fmsmga006.fm.intel.com with ESMTP; 02 May 2020 01:19:24 -0700 Received: from fmsmsx102.amr.corp.intel.com (10.18.124.200) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 2 May 2020 01:19:24 -0700 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX102.amr.corp.intel.com (10.18.124.200) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sat, 2 May 2020 01:19:24 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.138]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.22]) with mapi id 14.03.0439.000; Sat, 2 May 2020 16:19:20 +0800 From: "Dong, Eric" To: "devel@edk2.groups.io" , "thomas.lendacky@amd.com" CC: "Justen, Jordan L" , Laszlo Ersek , Ard Biesheuvel , "Kinney, Michael D" , "Gao, Liming" , "Ni, Ray" , Brijesh Singh , "Wang, Jian J" , "Wu, Hao A" Subject: Re: [edk2-devel] [PATCH v7 01/43] MdeModulePkg: Create PCDs to be used in support of SEV-ES Thread-Topic: [edk2-devel] [PATCH v7 01/43] MdeModulePkg: Create PCDs to be used in support of SEV-ES Thread-Index: AQHWGM1pL5n8c77RvEKHgNe+rGnzSaiUYqrg Date: Sat, 2 May 2020 08:19:19 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: 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: eric.dong@intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi Tom, Can you describe what tests have you done for this patch serial? I just build the UefiCpupkg. Dsc with VS2015x86 and met below errors: g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuExceptionHandlerLib\X64\Arc= hAMDSevVcHandler.c(730): warning C4245: 'function': conversion from 'int' t= o 'UINT64', signed/unsigned mismatch g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuExceptionHandlerLib\X64\Arc= hAMDSevVcHandler.c(745): warning C4244: '=3D': conversion from 'UINTN' to '= UINT8', possible loss of data g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuExceptionHandlerLib\X64\Arc= hAMDSevVcHandler.c(753): warning C4245: 'function': conversion from 'int' t= o 'UINT64', signed/unsigned mismatch Trim --asm-file -o g:\edk2-open-source\edk2\Build\UefiCpu\DEBUG_VS= 2015x86\X64\UefiCpuPkg\Library\SmmCpuFeaturesLib\SmmCpuFeaturesLibStm\OUTPU= T\X64\SmiEntry.i -i g:\edk2-open-source\edk2\Build\UefiCpu\DEBUG_VS2015x86\= X64\UefiCpuPkg\Library\SmmCpuFeaturesLib\SmmCpuFeaturesLibStm\OUTPUT\inc.ls= t g:\edk2-open-source\edk2\UefiCpuPkg\Library\SmmCpuFeaturesLib\X64\SmiEntr= y.nasm PeiDxeSmmCpuException.c g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuExceptionHandlerLib\X64\Arc= hAMDSevVcHandler.c(778): warning C4245: 'function': conversion from 'int' t= o 'UINT64', signed/unsigned mismatch "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Vc\bin\x86_am= d64\lib.exe" /NOLOGO /LTCG /OUT:g:\edk2-open-source\edk2\Build\UefiCpu\DEBU= G_VS2015x86\X64\MdeModulePkg\Library\TpmMeasurementLibNull\TpmMeasurementLi= bNull\OUTPUT\TpmMeasurementLibNull.lib @g:\edk2-open-source\edk2\Build\Uefi= Cpu\DEBUG_VS2015x86\X64\MdeModulePkg\Library\TpmMeasurementLibNull\TpmMeasu= rementLibNull\OUTPUT\object_files.lst Building ... g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuTimerLib\BaseC= puTimerLib.inf [X64] g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuExceptionHandlerLib\X64\Arc= hAMDSevVcHandler.c(801): warning C4245: 'function': conversion from 'int' t= o 'UINT64', signed/unsigned mismatch CheckSum.c g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuExceptionHandlerLib\X64\Arc= hAMDSevVcHandler.c(821): warning C4245: 'function': conversion from 'int' t= o 'UINT64', signed/unsigned mismatch g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuExceptionHandlerLib\X64\Arc= hAMDSevVcHandler.c(837): warning C4244: 'function': conversion from 'UINTN'= to 'UINT8', possible loss of data Thanks, Eric -----Original Message----- From: devel@edk2.groups.io On Behalf Of Lendacky, T= homas Sent: Thursday, April 23, 2020 1:41 AM To: devel@edk2.groups.io Cc: Justen, Jordan L ; Laszlo Ersek ; Ard Biesheuvel ; Kinney, Michael D ; Gao, Liming ; Dong, Eric <= eric.dong@intel.com>; Ni, Ray ; Brijesh Singh ; Wang, Jian J ; Wu, Hao A Subject: [edk2-devel] [PATCH v7 01/43] MdeModulePkg: Create PCDs to be use= d in support of SEV-ES BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2198 Two new dynamic MdeModulePkg PCDs are needed to support SEV-ES under OVMF: - 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 of APs). Cc: Jian J Wang Cc: Hao A Wu Signed-off-by: Tom Lendacky --- MdeModulePkg/MdeModulePkg.dec | 9 +++++++++ MdeModulePkg/MdeModulePkg.un= i | 8 ++++++++ 2 files changed, 17 insertions(+) diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec= index 42ad21cf244d..642a4791d83c 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -2048,6 +2048,15 @@ [PcdsDynamic, PcdsDynamicEx] # @Prompt If there is any test key used by the platform. gEfiMdeModulePkgTokenSpaceGuid.PcdTestKeyUsed|FALSE|BOOLEAN|0x00030003 =20 + ## This dynamic PCD holds the base address of the GHCB pool allocation. + # @Prompt GHCB Pool Base Address + gEfiMdeModulePkgTokenSpaceGuid.PcdGhcbBase|0|UINT64|0x00030007 + + ## 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|0x00030008 + [PcdsDynamicEx] ## This dynamic PCD enables the default variable setting. # Its value is the default store ID value. The default value is zero a= s Standard default. diff --git a/MdeModulePkg/MdeModulePkg.uni b/MdeModulePkg/MdeModulePkg.uni= index 2007e0596c4f..2f8cca03e527 100644 --- a/MdeModulePkg/MdeModulePkg.uni +++ b/MdeModulePkg/MdeModulePkg.uni @@ -1297,3 +1297,11 @@ #string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdTcgPfpMeasurementRevision_P= ROMPT #language en-US "TCG Platform Firmware Profile revision" =20 #string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdTcgPfpMeasurementRevision_H= ELP #language en-US "Indicates which TCG Platform Firmware Profile revision= the EDKII firmware follows." + +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdGhcbBase_PROMPT #language e= n-US "GHCB Pool Base Address" + +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdGhcbBase_HELP #language en-= US "Used with SEV-ES support to identify an address range that is not to be= encrypted." + +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdGhcbSize_PROMPT #language e= n-US "GHCB Pool Base Size" + +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdGhcbSize_HELP #language en-= US "Used with SEV-ES support to identify the size of the address range that= is not to be encrypted." -- 2.17.1