From 5ace477f34f3339c1fb8d590430b5e15b69f099f Mon Sep 17 00:00:00 2001 From: Dov Murik Date: Wed, 30 Jun 2021 12:36:45 +0000 Subject: OvmfPkg/AmdSev/SecretPei: build hob for full page Round up the size of the SEV launch secret area to a whole page, as required by BuildMemoryAllocationHob. This will allow the secret area defined in the MEMFD to take less than a whole 4KB page. Cc: Ard Biesheuvel Cc: Jordan Justen Cc: Ashish Kalra Cc: Brijesh Singh Cc: Erdem Aktas Cc: James Bottomley Cc: Jiewen Yao Cc: Min Xu Cc: Tom Lendacky Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3457 Signed-off-by: Dov Murik Reviewed-by: Tom Lendacky Reviewed-by: Brijesh Singh Reviewed-by: Jiewen Yao --- OvmfPkg/AmdSev/SecretPei/SecretPei.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OvmfPkg/AmdSev') diff --git a/OvmfPkg/AmdSev/SecretPei/SecretPei.c b/OvmfPkg/AmdSev/SecretPei/SecretPei.c index ad491515dd..db94c26b54 100644 --- a/OvmfPkg/AmdSev/SecretPei/SecretPei.c +++ b/OvmfPkg/AmdSev/SecretPei/SecretPei.c @@ -4,6 +4,7 @@ Copyright (C) 2020 James Bottomley, IBM Corporation. SPDX-License-Identifier: BSD-2-Clause-Patent **/ +#include #include #include #include @@ -17,7 +18,7 @@ InitializeSecretPei ( { BuildMemoryAllocationHob ( PcdGet32 (PcdSevLaunchSecretBase), - PcdGet32 (PcdSevLaunchSecretSize), + ALIGN_VALUE (PcdGet32 (PcdSevLaunchSecretSize), EFI_PAGE_SIZE), EfiBootServicesData ); -- cgit v1.2.3