On 12/12/19 12:53 AM, Ni, Ray wrote:
> 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, 
> UefiCpuPkg, etc)
> 
> 
> PcdSevEsIsEnabled seems to be used in OVMF pkg only so how about define that 
> in OvmfPkg.dec?

PcdSevEsIsEnabled is used by the UefiCpuPkg in the MP library. I can move
it from MdeModulePkg and into UefiCpuPkg if that's preferred?

Thanks,
Tom

> 
> Thanks,
> Ray
> 
>> -----Original Message-----
>> From: Tom Lendacky <thomas.lenda...@amd.com>
>> Sent: Thursday, November 21, 2019 4:06 AM
>> To: devel@edk2.groups.io
>> Cc: Justen, Jordan L <jordan.l.jus...@intel.com>; Laszlo Ersek 
>> <ler...@redhat.com>; Ard Biesheuvel
>> <ard.biesheu...@linaro.org>; Kinney, Michael D <michael.d.kin...@intel.com>; 
>> Gao, Liming <liming....@intel.com>; Dong,
>> Eric <eric.d...@intel.com>; Ni, Ray <ray...@intel.com>; Brijesh Singh 
>> <brijesh.si...@amd.com>; Wang, Jian J
>> <jian.j.w...@intel.com>; Wu, Hao A <hao.a...@intel.com>
>> Subject: [RFC PATCH v3 01/43] MdePkg: 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&amp;data=02%7C01%7Cthomas.lendacky%40amd.com%7Cf366369db18d403f73f808d77ed01213%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637117304445443903&amp;sdata=MlMdAafNmnwELGgm0I2qngT41Zr%2FuhjcUgYnOxfaMbY%3D&amp;reserved=0
>>
>> 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.
>>
>> Three new dynamic PCDs are needed to support SEV-ES under OVMF:
>>   - PcdSevEsIsEnabled: BOOLEAN value used to indicate if SEV-ES is enabled
>>   - 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.w...@intel.com>
>> Cc: Hao A Wu <hao.a...@intel.com>
>> Signed-off-by: Tom Lendacky <thomas.lenda...@amd.com>
>> ---
>>  MdeModulePkg/MdeModulePkg.dec | 23 +++++++++++++++++++++++
>>  1 file changed, 23 insertions(+)
>>
>> diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec
>> 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|0x30001055
>>
>> +  ## 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 setting 
>> 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
>>
>> +  ## 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|0x00030007
>> +
>> +  ## 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
> 

-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#52178): https://edk2.groups.io/g/devel/message/52178
Mute This Topic: https://groups.io/mt/60973096/21656
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to