[edk2-devel] [PATCH 2/2] OvmfPkg/AmdSev/SecretDxe: make secret location naming generic
Dov Murik
dovmurik at linux.vnet.ibm.com
Wed Dec 16 08:27:13 UTC 2020
On Tue, Dec 15, 2020 at 05:41:46PM -0800, James Bottomley wrote:
> It is anticipated that this part of the code will work for both Intel
> TDX and AMD SEV, so remove the SEV specific naming and change to
> ConfidentialComputing as a more architecture neutral prefix. Apart
> from the symbol rename, there are no code changes.
>
> Signed-off-by: James Bottomley <James.Bottomley at HansenPartnership.com>
> ---
> OvmfPkg/OvmfPkg.dec | 2 +-
> OvmfPkg/AmdSev/SecretDxe/SecretDxe.inf | 2 +-
> ...SevLaunchSecret.h => ConfidentialComputingSecret.h} | 10 +++++-----
> OvmfPkg/AmdSev/SecretDxe/SecretDxe.c | 6 +++---
> 4 files changed, 10 insertions(+), 10 deletions(-)
> rename OvmfPkg/Include/Guid/{SevLaunchSecret.h => ConfidentialComputingSecret.h} (69%)
>
> diff --git a/OvmfPkg/OvmfPkg.dec b/OvmfPkg/OvmfPkg.dec
> index 8a294116efaa..50d7b27d941c 100644
> --- a/OvmfPkg/OvmfPkg.dec
> +++ b/OvmfPkg/OvmfPkg.dec
> @@ -117,7 +117,7 @@ [Guids]
> gLinuxEfiInitrdMediaGuid = {0x5568e427, 0x68fc, 0x4f3d, {0xac, 0x74, 0xca, 0x55, 0x52, 0x31, 0xcc, 0x68}}
> gQemuKernelLoaderFsMediaGuid = {0x1428f772, 0xb64a, 0x441e, {0xb8, 0xc3, 0x9e, 0xbd, 0xd7, 0xf8, 0x93, 0xc7}}
> gGrubFileGuid = {0xb5ae312c, 0xbc8a, 0x43b1, {0x9c, 0x62, 0xeb, 0xb8, 0x26, 0xdd, 0x5d, 0x07}}
> - gSevLaunchSecretGuid = {0xadf956ad, 0xe98c, 0x484c, {0xae, 0x11, 0xb5, 0x1c, 0x7d, 0x33, 0x64, 0x47}}
> + gConfidentialComputingSecretGuid = {0xadf956ad, 0xe98c, 0x484c, {0xae, 0x11, 0xb5, 0x1c, 0x7d, 0x33, 0x64, 0x47}}
>
> [Ppis]
> # PPI whose presence in the PPI database signals that the TPM base address
> diff --git a/OvmfPkg/AmdSev/SecretDxe/SecretDxe.inf b/OvmfPkg/AmdSev/SecretDxe/SecretDxe.inf
> index 62ab00a3d382..40bda7ff846c 100644
> --- a/OvmfPkg/AmdSev/SecretDxe/SecretDxe.inf
> +++ b/OvmfPkg/AmdSev/SecretDxe/SecretDxe.inf
> @@ -27,7 +27,7 @@ [LibraryClasses]
> UefiDriverEntryPoint
>
> [Guids]
> - gSevLaunchSecretGuid
> + gConfidentialComputingSecretGuid
>
> [FixedPcd]
> gUefiOvmfPkgTokenSpaceGuid.PcdSevLaunchSecretBase
> diff --git a/OvmfPkg/Include/Guid/SevLaunchSecret.h b/OvmfPkg/Include/Guid/ConfidentialComputingSecret.h
> similarity index 69%
> rename from OvmfPkg/Include/Guid/SevLaunchSecret.h
> rename to OvmfPkg/Include/Guid/ConfidentialComputingSecret.h
> index dfd89646651b..7026fc5b089f 100644
> --- a/OvmfPkg/Include/Guid/SevLaunchSecret.h
> +++ b/OvmfPkg/Include/Guid/ConfidentialComputingSecret.h
> @@ -6,12 +6,12 @@
> SPDX-License-Identifier: BSD-2-Clause-Patent
> **/
The comment at the top of this file (not visible in this diff) also
mentions "SEV Launch Secret" which should be renamed to "Confidential
Computing Secret".
-Dov
>
> -#ifndef SEV_LAUNCH_SECRET_H_
> -#define SEV_LAUNCH_SECRET_H_
> +#ifndef CONFIDENTIAL_COMPUTING_SECRET_H_
> +#define CONFIDENTIAL_COMPUTING_SECRET_H_
>
> #include <Uefi/UefiBaseType.h>
>
> -#define SEV_LAUNCH_SECRET_GUID \
> +#define CONFIDENTIAL_COMPUTING_SECRET_GUID \
> { 0xadf956ad, \
> 0xe98c, \
> 0x484c, \
> @@ -21,8 +21,8 @@
> typedef struct {
> UINT64 Base;
> UINT64 Size;
> -} SEV_LAUNCH_SECRET_LOCATION;
> +} CONFIDENTIAL_COMPUTING_SECRET_LOCATION;
>
> -extern EFI_GUID gSevLaunchSecretGuid;
> +extern EFI_GUID gConfidentialComputingSecretGuid;
>
> #endif // SEV_LAUNCH_SECRET_H_
> diff --git a/OvmfPkg/AmdSev/SecretDxe/SecretDxe.c b/OvmfPkg/AmdSev/SecretDxe/SecretDxe.c
> index 5385a6aea275..308022b5b25e 100644
> --- a/OvmfPkg/AmdSev/SecretDxe/SecretDxe.c
> +++ b/OvmfPkg/AmdSev/SecretDxe/SecretDxe.c
> @@ -6,9 +6,9 @@
> **/
> #include <PiDxe.h>
> #include <Library/UefiBootServicesTableLib.h>
> -#include <Guid/SevLaunchSecret.h>
> +#include <Guid/ConfidentialComputingSecret.h>
>
> -STATIC SEV_LAUNCH_SECRET_LOCATION mSecretDxeTable = {
> +STATIC CONFIDENTIAL_COMPUTING_SECRET_LOCATION mSecretDxeTable = {
> FixedPcdGet32 (PcdSevLaunchSecretBase),
> FixedPcdGet32 (PcdSevLaunchSecretSize),
> };
> @@ -21,7 +21,7 @@ InitializeSecretDxe(
> )
> {
> return gBS->InstallConfigurationTable (
> - &gSevLaunchSecretGuid,
> + &gConfidentialComputingSecretGuid,
> &mSecretDxeTable
> );
> }
> --
> 2.26.2
>
-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68944): https://edk2.groups.io/g/devel/message/68944
Mute This Topic: https://groups.io/mt/78991626/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