diff options
| author | Prachotan Bathi <prachotan.bathi@arm.com> | 2025-07-01 13:18:51 -0500 |
|---|---|---|
| committer | mergify[bot] <37929162+mergify[bot]@users.noreply.github.com> | 2025-07-24 05:59:45 +0000 |
| commit | adf345e27b01037d895830e11622c44c7890fc82 (patch) | |
| tree | 8b28f35b08e54a38015107c279c2f18717ff77bc | |
| parent | c1e3e71643db005a0bd9bd173333b68a1643ad74 (diff) | |
| download | edk2-adf345e27b01037d895830e11622c44c7890fc82.tar.gz edk2-adf345e27b01037d895830e11622c44c7890fc82.zip | |
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>
| -rw-r--r-- | ArmPlatformPkg/PlatformPei/PlatformPeim.c | 21 | ||||
| -rw-r--r-- | ArmPlatformPkg/PlatformPei/PlatformPeim.inf | 4 |
2 files changed, 23 insertions, 2 deletions
diff --git a/ArmPlatformPkg/PlatformPei/PlatformPeim.c b/ArmPlatformPkg/PlatformPei/PlatformPeim.c index 62d1faf0c4..921371a3e5 100644 --- a/ArmPlatformPkg/PlatformPei/PlatformPeim.c +++ b/ArmPlatformPkg/PlatformPei/PlatformPeim.c @@ -24,6 +24,7 @@ #include <Library/PeimEntryPoint.h>
#include <Library/PeiServicesLib.h>
#include <Library/PcdLib.h>
+#include <Guid/TransferListHob.h>
EFI_STATUS
EFIAPI
@@ -76,14 +77,30 @@ InitializePlatformPeim ( IN CONST EFI_PEI_SERVICES **PeiServices
)
{
- EFI_STATUS Status;
- EFI_BOOT_MODE BootMode;
+ 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);
diff --git a/ArmPlatformPkg/PlatformPei/PlatformPeim.inf b/ArmPlatformPkg/PlatformPei/PlatformPeim.inf index f2b0e0f084..d9e8f32ac9 100644 --- a/ArmPlatformPkg/PlatformPei/PlatformPeim.inf +++ b/ArmPlatformPkg/PlatformPei/PlatformPeim.inf @@ -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
|
