Files
system76-edk2/OvmfPkg/AmdSev/SecretPei/SecretPei.c
James Bottomley bff2811c6d OvmfPkg/AmdSev: assign and reserve the Sev Secret area
Create a one page secret area in the MEMFD and reserve the area with a
boot time HOB.

Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3077
Signed-off-by: James Bottomley <jejb@linux.ibm.com>
Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20201130202819.3910-6-jejb@linux.ibm.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com>
[lersek@redhat.com: s/protect/reserve/g in the commit message, at Ard's
 and James's suggestion]
2020-12-14 19:56:18 +00:00

26 lines
554 B
C

/** @file
SEV Secret boot time HOB placement
Copyright (C) 2020 James Bottomley, IBM Corporation.
SPDX-License-Identifier: BSD-2-Clause-Patent
**/
#include <PiPei.h>
#include <Library/HobLib.h>
#include <Library/PcdLib.h>
EFI_STATUS
EFIAPI
InitializeSecretPei (
IN EFI_PEI_FILE_HANDLE FileHandle,
IN CONST EFI_PEI_SERVICES **PeiServices
)
{
BuildMemoryAllocationHob (
PcdGet32 (PcdSevLaunchSecretBase),
PcdGet32 (PcdSevLaunchSecretSize),
EfiBootServicesData
);
return EFI_SUCCESS;
}