diff options
-rw-r--r-- | OvmfPkg/AmdSev/SecretDxe/SecretDxe.c | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/OvmfPkg/AmdSev/SecretDxe/SecretDxe.c b/OvmfPkg/AmdSev/SecretDxe/SecretDxe.c index 3d84b25450..c3258570e9 100644 --- a/OvmfPkg/AmdSev/SecretDxe/SecretDxe.c +++ b/OvmfPkg/AmdSev/SecretDxe/SecretDxe.c @@ -8,11 +8,6 @@ #include <Library/UefiBootServicesTableLib.h>
#include <Guid/ConfidentialComputingSecret.h>
-STATIC CONFIDENTIAL_COMPUTING_SECRET_LOCATION mSecretDxeTable = {
- FixedPcdGet32 (PcdSevLaunchSecretBase),
- FixedPcdGet32 (PcdSevLaunchSecretSize),
-};
-
EFI_STATUS
EFIAPI
InitializeSecretDxe (
@@ -20,8 +15,23 @@ InitializeSecretDxe ( IN EFI_SYSTEM_TABLE *SystemTable
)
{
+ EFI_STATUS Status;
+ CONFIDENTIAL_COMPUTING_SECRET_LOCATION *SecretDxeTable;
+
+ Status = gBS->AllocatePool (
+ EfiACPIReclaimMemory,
+ sizeof (CONFIDENTIAL_COMPUTING_SECRET_LOCATION),
+ (VOID **)&SecretDxeTable
+ );
+ if (EFI_ERROR (Status)) {
+ return Status;
+ }
+
+ SecretDxeTable->Base = FixedPcdGet32 (PcdSevLaunchSecretBase);
+ SecretDxeTable->Size = FixedPcdGet32 (PcdSevLaunchSecretSize);
+
return gBS->InstallConfigurationTable (
&gConfidentialComputingSecretGuid,
- &mSecretDxeTable
+ SecretDxeTable
);
}
|