|
@@ -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
|
|
|
);
|
|
|
}
|