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/PeimEntryPoint.h>
|
||||||
#include <Library/PeiServicesLib.h>
|
#include <Library/PeiServicesLib.h>
|
||||||
#include <Library/PcdLib.h>
|
#include <Library/PcdLib.h>
|
||||||
|
#include <Guid/TransferListHob.h>
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
EFIAPI
|
EFIAPI
|
||||||
@@ -76,14 +77,30 @@ InitializePlatformPeim (
|
|||||||
IN CONST EFI_PEI_SERVICES **PeiServices
|
IN CONST EFI_PEI_SERVICES **PeiServices
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
EFI_BOOT_MODE BootMode;
|
EFI_BOOT_MODE BootMode;
|
||||||
|
VOID *TransferListBase;
|
||||||
|
UINTN *TransferListHobData;
|
||||||
|
EFI_HOB_GUID_TYPE *GuidHob;
|
||||||
|
|
||||||
DEBUG ((DEBUG_LOAD | DEBUG_INFO, "Platform PEIM Loaded\n"));
|
DEBUG ((DEBUG_LOAD | DEBUG_INFO, "Platform PEIM Loaded\n"));
|
||||||
|
|
||||||
Status = PeiServicesSetBootMode (ArmPlatformGetBootMode ());
|
Status = PeiServicesSetBootMode (ArmPlatformGetBootMode ());
|
||||||
ASSERT_EFI_ERROR (Status);
|
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 ();
|
PlatformPeim ();
|
||||||
|
|
||||||
Status = PeiServicesGetBootMode (&BootMode);
|
Status = PeiServicesGetBootMode (&BootMode);
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
[Ppis]
|
[Ppis]
|
||||||
gEfiPeiMasterBootModePpiGuid # PPI ALWAYS_PRODUCED
|
gEfiPeiMasterBootModePpiGuid # PPI ALWAYS_PRODUCED
|
||||||
gEfiPeiBootInRecoveryModePpiGuid # PPI SOMETIMES_PRODUCED
|
gEfiPeiBootInRecoveryModePpiGuid # PPI SOMETIMES_PRODUCED
|
||||||
|
gArmTransferListPpiGuid # PPI SOMETIMES_CONSUMED
|
||||||
|
|
||||||
[FixedPcd]
|
[FixedPcd]
|
||||||
gArmTokenSpaceGuid.PcdFdBaseAddress
|
gArmTokenSpaceGuid.PcdFdBaseAddress
|
||||||
@@ -51,6 +52,9 @@
|
|||||||
gArmTokenSpaceGuid.PcdFvBaseAddress
|
gArmTokenSpaceGuid.PcdFvBaseAddress
|
||||||
gArmTokenSpaceGuid.PcdFvSize
|
gArmTokenSpaceGuid.PcdFvSize
|
||||||
|
|
||||||
|
[Guids]
|
||||||
|
gArmTransferListHobGuid
|
||||||
|
|
||||||
[Depex]
|
[Depex]
|
||||||
TRUE
|
TRUE
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user