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?

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://bugzilla.tianocore.org/show_bug.cgi?id=2198
> 
> 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 (#52147): https://edk2.groups.io/g/devel/message/52147
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