diff options
author | Dov Murik <dovmurik@linux.ibm.com> | 2021-06-30 12:36:45 +0000 |
---|---|---|
committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2021-07-29 09:49:50 +0000 |
commit | 5ace477f34f3339c1fb8d590430b5e15b69f099f (patch) | |
tree | e15ad3b6f12564db57b957a4cc5a37a958feb48c /OvmfPkg/AmdSev | |
parent | d10ad8444f29658d56eb7650a3781bc6cebe2620 (diff) | |
download | edk2-5ace477f34f3339c1fb8d590430b5e15b69f099f.tar.gz edk2-5ace477f34f3339c1fb8d590430b5e15b69f099f.tar.bz2 edk2-5ace477f34f3339c1fb8d590430b5e15b69f099f.zip |
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 <ardb+tianocore@kernel.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Ashish Kalra <ashish.kalra@amd.com>
Cc: Brijesh Singh <brijesh.singh@amd.com>
Cc: Erdem Aktas <erdemaktas@google.com>
Cc: James Bottomley <jejb@linux.ibm.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Min Xu <min.m.xu@intel.com>
Cc: Tom Lendacky <thomas.lendacky@amd.com>
Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3457
Signed-off-by: Dov Murik <dovmurik@linux.ibm.com>
Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
Reviewed-by: Brijesh Singh <brijesh.singh@amd.com>
Reviewed-by: Jiewen Yao <jiewen.yao@intel.com>
Diffstat (limited to 'OvmfPkg/AmdSev')
-rw-r--r-- | OvmfPkg/AmdSev/SecretPei/SecretPei.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 <Base.h>
#include <PiPei.h>
#include <Library/HobLib.h>
#include <Library/PcdLib.h>
@@ -17,7 +18,7 @@ InitializeSecretPei ( {
BuildMemoryAllocationHob (
PcdGet32 (PcdSevLaunchSecretBase),
- PcdGet32 (PcdSevLaunchSecretSize),
+ ALIGN_VALUE (PcdGet32 (PcdSevLaunchSecretSize), EFI_PAGE_SIZE),
EfiBootServicesData
);
|