OvmfPkg/AmdSev: Expose the Sev Secret area using a configuration table
Now that the secret area is protected by a boot time HOB, extract its location details into a configuration table referenced by gSevLaunchSecretGuid so the boot loader or OS can locate it before a call to ExitBootServices(). 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-7-jejb@linux.ibm.com> Acked-by: Ard Biesheuvel <ard.biesheuvel@arm.com> [lersek@redhat.com: fix indentation of InstallConfigurationTable() args]
This commit is contained in:
committed by
mergify[bot]
parent
bff2811c6d
commit
01726b6d23
27
OvmfPkg/AmdSev/SecretDxe/SecretDxe.c
Normal file
27
OvmfPkg/AmdSev/SecretDxe/SecretDxe.c
Normal file
@@ -0,0 +1,27 @@
|
||||
/** @file
|
||||
SEV Secret configuration table constructor
|
||||
|
||||
Copyright (C) 2020 James Bottomley, IBM Corporation.
|
||||
SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
**/
|
||||
#include <PiDxe.h>
|
||||
#include <Library/UefiBootServicesTableLib.h>
|
||||
#include <Guid/SevLaunchSecret.h>
|
||||
|
||||
STATIC SEV_LAUNCH_SECRET_LOCATION mSecretDxeTable = {
|
||||
FixedPcdGet32 (PcdSevLaunchSecretBase),
|
||||
FixedPcdGet32 (PcdSevLaunchSecretSize),
|
||||
};
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
InitializeSecretDxe(
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
{
|
||||
return gBS->InstallConfigurationTable (
|
||||
&gSevLaunchSecretGuid,
|
||||
&mSecretDxeTable
|
||||
);
|
||||
}
|
Reference in New Issue
Block a user