UefiPayloadPkg/BlSMMStoreDxe: Support Secureboot

Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
This commit is contained in:
Patrick Rudolph
2021-02-03 16:09:58 +01:00
committed by Tim Crawford
parent bf2ca74bb6
commit aae506ce44

View File

@@ -103,7 +103,11 @@ InitializeFvAndVariableStoreHeaders (
// VARIABLE_STORE_HEADER // VARIABLE_STORE_HEADER
// //
VariableStoreHeader = (VARIABLE_STORE_HEADER*)((UINTN)Headers + FirmwareVolumeHeader->HeaderLength); VariableStoreHeader = (VARIABLE_STORE_HEADER*)((UINTN)Headers + FirmwareVolumeHeader->HeaderLength);
CopyGuid (&VariableStoreHeader->Signature, &gEfiVariableGuid); //
// Should be gEfiVariableGuid as SMM doesn't authenticate, but userspace does
// Must be gEfiAuthenticatedVariableGuid for SecureBoot
//
CopyGuid (&VariableStoreHeader->Signature, &gEfiAuthenticatedVariableGuid);
VariableStoreHeader->Size = PcdGet32(PcdFlashNvStorageVariableSize) - FirmwareVolumeHeader->HeaderLength; VariableStoreHeader->Size = PcdGet32(PcdFlashNvStorageVariableSize) - FirmwareVolumeHeader->HeaderLength;
VariableStoreHeader->Format = VARIABLE_STORE_FORMATTED; VariableStoreHeader->Format = VARIABLE_STORE_FORMATTED;
VariableStoreHeader->State = VARIABLE_STORE_HEALTHY; VariableStoreHeader->State = VARIABLE_STORE_HEALTHY;