ArmPlatformPkg: Introduce TransferList Guid Hob for SEC
ArmTransferListHobGuid holds TransferList base address If there's no valid TransferList found, or if a Guid HOB is already present Guid HOB is not built, boot progresses as usual. https://firmwarehandoff.github.io/firmware_handoff Signed-off-by: Prachotan Bathi <prachotan.bathi@arm.com>
This commit is contained in:
committed by
mergify[bot]
parent
c1e3e71643
commit
adf345e27b
@@ -24,6 +24,7 @@
|
||||
#include <Library/PeimEntryPoint.h>
|
||||
#include <Library/PeiServicesLib.h>
|
||||
#include <Library/PcdLib.h>
|
||||
#include <Guid/TransferListHob.h>
|
||||
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
@@ -78,12 +79,28 @@ InitializePlatformPeim (
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_BOOT_MODE BootMode;
|
||||
VOID *TransferListBase;
|
||||
UINTN *TransferListHobData;
|
||||
EFI_HOB_GUID_TYPE *GuidHob;
|
||||
|
||||
DEBUG ((DEBUG_LOAD | DEBUG_INFO, "Platform PEIM Loaded\n"));
|
||||
|
||||
Status = PeiServicesSetBootMode (ArmPlatformGetBootMode ());
|
||||
ASSERT_EFI_ERROR (Status);
|
||||
|
||||
// If TransferList PPI is present and TransferListHobGuid is not present,
|
||||
// then create a TransferListHob with the TransferListBase address.
|
||||
Status = PeiServicesLocatePpi (&gArmTransferListPpiGuid, 0, NULL, &TransferListBase);
|
||||
if (!EFI_ERROR (Status)) {
|
||||
GuidHob = GetFirstGuidHob (&gArmTransferListHobGuid);
|
||||
if ((GuidHob == NULL) && (TransferListBase != NULL)) {
|
||||
TransferListHobData = BuildGuidHob (&gArmTransferListHobGuid, sizeof (*TransferListHobData));
|
||||
ASSERT (TransferListHobData != NULL);
|
||||
|
||||
*TransferListHobData = (UINTN)TransferListBase;
|
||||
}
|
||||
}
|
||||
|
||||
PlatformPeim ();
|
||||
|
||||
Status = PeiServicesGetBootMode (&BootMode);
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
[Ppis]
|
||||
gEfiPeiMasterBootModePpiGuid # PPI ALWAYS_PRODUCED
|
||||
gEfiPeiBootInRecoveryModePpiGuid # PPI SOMETIMES_PRODUCED
|
||||
gArmTransferListPpiGuid # PPI SOMETIMES_CONSUMED
|
||||
|
||||
[FixedPcd]
|
||||
gArmTokenSpaceGuid.PcdFdBaseAddress
|
||||
@@ -51,6 +52,9 @@
|
||||
gArmTokenSpaceGuid.PcdFvBaseAddress
|
||||
gArmTokenSpaceGuid.PcdFvSize
|
||||
|
||||
[Guids]
|
||||
gArmTransferListHobGuid
|
||||
|
||||
[Depex]
|
||||
TRUE
|
||||
|
||||
|
||||
Reference in New Issue
Block a user