ArmPlatformPkg: Introduce gArmTransferListPpiGuid

Populate the gArmTransferListPpiGuid with the TransferList
base address.
Place the Ppi at the end of the PpiList
For platforms with no TransferList support,
boot continues without any errors.
https://firmwarehandoff.github.io/firmware_handoff

Signed-off-by: Prachotan Bathi <prachotan.bathi@arm.com>
This commit is contained in:
Prachotan Bathi 2025-07-16 13:50:14 -05:00 committed by mergify[bot]
parent 0bad279bd4
commit c1e3e71643
2 changed files with 18 additions and 4 deletions

View file

@ -86,12 +86,14 @@ STATIC CONST EFI_PEI_PPI_DESCRIPTOR gCommonPpiTable[] = {
@param[out] PpiListSize Size of the PPI list in bytes
@param[out] PpiList Pointer to the constructed PPI list
@param[in] TransferListBase Pointer to the Transfer List base
**/
STATIC
VOID
CreatePpiList (
OUT UINTN *PpiListSize,
OUT EFI_PEI_PPI_DESCRIPTOR **PpiList
OUT EFI_PEI_PPI_DESCRIPTOR **PpiList,
IN VOID *TransferListBase
)
{
EFI_PEI_PPI_DESCRIPTOR *PlatformPpiList;
@ -111,10 +113,20 @@ CreatePpiList (
// Set the Terminate flag on the last PPI entry
LastPpi = (EFI_PEI_PPI_DESCRIPTOR *)ListBase +
((sizeof (gCommonPpiTable) + PlatformPpiListSize) / sizeof (EFI_PEI_PPI_DESCRIPTOR)) - 1;
*PpiListSize = sizeof (gCommonPpiTable) + PlatformPpiListSize;
// Add the Transfer List PPI after the Common and Platform PPIs
if (TransferListBase != NULL) {
LastPpi++;
LastPpi->Flags = EFI_PEI_PPI_DESCRIPTOR_PPI;
LastPpi->Guid = &gArmTransferListPpiGuid;
LastPpi->Ppi = TransferListBase;
*PpiListSize += sizeof (EFI_PEI_PPI_DESCRIPTOR);
}
LastPpi->Flags |= EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST;
*PpiList = (EFI_PEI_PPI_DESCRIPTOR *)ListBase;
*PpiListSize = sizeof (gCommonPpiTable) + PlatformPpiListSize;
*PpiList = (EFI_PEI_PPI_DESCRIPTOR *)ListBase;
}
/**
@ -177,13 +189,14 @@ SecMain (
TransferListDump (TransferListBase);
DEBUG_CODE_END ();
} else {
TransferListBase = NULL;
DEBUG ((DEBUG_ERROR, "%a: No valid operations possible on TransferList found @ 0x%p\n", __func__, TransferListBase));
}
} else {
DEBUG ((DEBUG_INFO, "%a: No TransferList found, continuing boot\n", __func__));
}
CreatePpiList (&PpiListSize, &PpiList);
CreatePpiList (&PpiListSize, &PpiList, TransferListBase);
// Adjust the Temporary Ram as the new Ppi List (Common + Platform Ppi Lists) is created at
// the base of the primary core stack

View file

@ -52,6 +52,7 @@
[Ppis]
gEfiTemporaryRamSupportPpiGuid
gArmTransferListPpiGuid
[Pcd]
gEfiMdeModulePkgTokenSpaceGuid.PcdFirmwareVersionString