summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/AmdSevDxe
diff options
context:
space:
mode:
authorRoth, Michael via groups.io <Michael.Roth=amd.com@groups.io>2023-04-26 04:32:56 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2023-04-26 13:39:01 +0000
commite5c7d0b017dd20a283ab5765a5d444ab38f7a4c6 (patch)
treed4bb9faa597351a64170172863b34853681fbda5 /OvmfPkg/AmdSevDxe
parentf384303dc563fab096f265a0227a13a3df403a70 (diff)
downloadedk2-e5c7d0b017dd20a283ab5765a5d444ab38f7a4c6.tar.gz
edk2-e5c7d0b017dd20a283ab5765a5d444ab38f7a4c6.tar.bz2
edk2-e5c7d0b017dd20a283ab5765a5d444ab38f7a4c6.zip
OvmfPkg/AmdSevDxe: Update ConfidentialComputing blob struct definition
The Confidential Computing blob defined here is intended to match the definition defined by linux guest kernel. Previously, both definitions relied on natural alignment, but that relies on both OVMF and kernel being compiled as 64-bit. While there aren't currently any plans to enable SNP support for 32-bit compilations, the kernel definition has since been updated to use explicit padding/reserved fields to avoid this dependency. Update OVMF to match that definition. While at it, also fix up the Reserved fields to match the numbering used in the kernel. No functional changes (for currently-supported environments, at least). Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com> Acked-by: Jiewen Yao <jiewen.yao@intel.com> Acked-by: Gerd Hoffmann <kraxel@redhat.com> Signed-off-by: Michael Roth <michael.roth@amd.com>
Diffstat (limited to 'OvmfPkg/AmdSevDxe')
-rw-r--r--OvmfPkg/AmdSevDxe/AmdSevDxe.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/OvmfPkg/AmdSevDxe/AmdSevDxe.c b/OvmfPkg/AmdSevDxe/AmdSevDxe.c
index df807066fa..db3675ae86 100644
--- a/OvmfPkg/AmdSevDxe/AmdSevDxe.c
+++ b/OvmfPkg/AmdSevDxe/AmdSevDxe.c
@@ -48,11 +48,13 @@ AllocateConfidentialComputingBlob (
CcBlob->Header = SIGNATURE_32 ('A', 'M', 'D', 'E');
CcBlob->Version = 1;
- CcBlob->Reserved1 = 0;
+ CcBlob->Reserved = 0;
CcBlob->SecretsPhysicalAddress = (UINT64)(UINTN)FixedPcdGet32 (PcdOvmfSnpSecretsBase);
CcBlob->SecretsSize = FixedPcdGet32 (PcdOvmfSnpSecretsSize);
+ CcBlob->Reserved1 = 0;
CcBlob->CpuidPhysicalAddress = (UINT64)(UINTN)FixedPcdGet32 (PcdOvmfCpuidBase);
CcBlob->CpuidLSize = FixedPcdGet32 (PcdOvmfCpuidSize);
+ CcBlob->Reserved2 = 0;
*CcBlobPtr = CcBlob;