[edk2-devel] [PATCH v7 01/43] MdeModulePkg: Create PCDs to be used in support of SEV-ES
Lendacky, Thomas
thomas.lendacky at amd.com
Mon May 4 13:34:48 UTC 2020
On 5/2/20 3:19 AM, Dong, Eric wrote:
> Hi Tom,
Hi Eric,
>
> Can you describe what tests have you done for this patch serial?
I've built the OVMF package in 32, 32/64 and 64-bit configurations on
Linux using GCC as the compiler. These warnings were not emitted in those
configurations. I'll look into seeing if there is a compiler setting that
will provide these conversion warnings.
I don't have Visual Studio and so cannot test that. I can, however, fix
these warnings. Are these the only warnings you have seen?
Thanks,
Tom
>
> I just build the UefiCpupkg. Dsc with VS2015x86 and met below errors:
> g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuExceptionHandlerLib\X64\ArchAMDSevVcHandler.c(730): warning C4245: 'function': conversion from 'int' to 'UINT64', signed/unsigned mismatch
> g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuExceptionHandlerLib\X64\ArchAMDSevVcHandler.c(745): warning C4244: '=': conversion from 'UINTN' to 'UINT8', possible loss of data
> g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuExceptionHandlerLib\X64\ArchAMDSevVcHandler.c(753): warning C4245: 'function': conversion from 'int' to 'UINT64', signed/unsigned mismatch
> Trim --asm-file -o g:\edk2-open-source\edk2\Build\UefiCpu\DEBUG_VS2015x86\X64\UefiCpuPkg\Library\SmmCpuFeaturesLib\SmmCpuFeaturesLibStm\OUTPUT\X64\SmiEntry.i -i g:\edk2-open-source\edk2\Build\UefiCpu\DEBUG_VS2015x86\X64\UefiCpuPkg\Library\SmmCpuFeaturesLib\SmmCpuFeaturesLibStm\OUTPUT\inc.lst g:\edk2-open-source\edk2\UefiCpuPkg\Library\SmmCpuFeaturesLib\X64\SmiEntry.nasm
> PeiDxeSmmCpuException.c
> g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuExceptionHandlerLib\X64\ArchAMDSevVcHandler.c(778): warning C4245: 'function': conversion from 'int' to 'UINT64', signed/unsigned mismatch
> "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Vc\bin\x86_amd64\lib.exe" /NOLOGO /LTCG /OUT:g:\edk2-open-source\edk2\Build\UefiCpu\DEBUG_VS2015x86\X64\MdeModulePkg\Library\TpmMeasurementLibNull\TpmMeasurementLibNull\OUTPUT\TpmMeasurementLibNull.lib @g:\edk2-open-source\edk2\Build\UefiCpu\DEBUG_VS2015x86\X64\MdeModulePkg\Library\TpmMeasurementLibNull\TpmMeasurementLibNull\OUTPUT\object_files.lst
> Building ... g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuTimerLib\BaseCpuTimerLib.inf [X64]
> g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuExceptionHandlerLib\X64\ArchAMDSevVcHandler.c(801): warning C4245: 'function': conversion from 'int' to 'UINT64', signed/unsigned mismatch
> CheckSum.c
> g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuExceptionHandlerLib\X64\ArchAMDSevVcHandler.c(821): warning C4245: 'function': conversion from 'int' to 'UINT64', signed/unsigned mismatch
> g:\edk2-open-source\edk2\UefiCpuPkg\Library\CpuExceptionHandlerLib\X64\ArchAMDSevVcHandler.c(837): warning C4244: 'function': conversion from 'UINTN' to 'UINT8', possible loss of data
>
> Thanks,
> Eric
> -----Original Message-----
> From: devel at edk2.groups.io <devel at edk2.groups.io> On Behalf Of Lendacky, Thomas
> Sent: Thursday, April 23, 2020 1:41 AM
> To: devel at edk2.groups.io
> Cc: Justen, Jordan L <jordan.l.justen at intel.com>; Laszlo Ersek <lersek at redhat.com>; Ard Biesheuvel <ard.biesheuvel at linaro.org>; Kinney, Michael D <michael.d.kinney at intel.com>; Gao, Liming <liming.gao at intel.com>; Dong, Eric <eric.dong at intel.com>; Ni, Ray <ray.ni at intel.com>; Brijesh Singh <brijesh.singh at amd.com>; Wang, Jian J <jian.j.wang at intel.com>; Wu, Hao A <hao.a.wu at intel.com>
> Subject: [edk2-devel] [PATCH v7 01/43] MdeModulePkg: Create PCDs to be used in support of SEV-ES
>
> BZ: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fbugzilla.tianocore.org%2Fshow_bug.cgi%3Fid%3D2198&data=02%7C01%7Cthomas.lendacky%40amd.com%7Cfbe4f561e0234d8450fe08d7ee7186e2%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637240043676140655&sdata=xdnfAfSLtPi3FE5olqjU7%2B4OHJBxgOTRAFR0%2BMkECLc%3D&reserved=0
>
> 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 <jian.j.wang at intel.com>
> Cc: Hao A Wu <hao.a.wu at intel.com>
> Signed-off-by: Tom Lendacky <thomas.lendacky at amd.com>
> ---
> MdeModulePkg/MdeModulePkg.dec | 9 +++++++++ MdeModulePkg/MdeModulePkg.uni | 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
>
> + ## 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 as 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_PROMPT #language en-US "TCG Platform Firmware Profile revision"
>
> #string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdTcgPfpMeasurementRevision_HELP #language en-US "Indicates which TCG Platform Firmware Profile revision the EDKII firmware follows."
> +
> +#string STR_gEfiMdeModulePkgTokenSpaceGuid_PcdGhcbBase_PROMPT #language en-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 en-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
>
>
>
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#58553): https://edk2.groups.io/g/devel/message/58553
Mute This Topic: https://groups.io/mt/73201887/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