Hi Okash,

At the handoff boundary, X3 (for AArch64) or R3 (for AArch32) hold the TL base address [1].
The size of the TL is deduced from the TL header, in the field “size” [2] (note that the TL header also contains a signature).
Post-handoff, the firmware stage may cache the TL base address.

When the firmware stage needs to access the TL, post-handoff, it needs to obtain the:
- TL base address,
- the TL size,
- and potentially other info, e.g. a pointer to the next free element, the free space in the TL.


That API (to retrieve the (cached) TL base, and all other info post-handoff) ought to be defined for the TF-A common code.


Regards,
Jose

[1] https://github.com/FirmwareHandoff/firmware_handoff/blob/main/source/register_conventions.rst
[2] https://github.com/FirmwareHandoff/firmware_handoff/blob/main/source/transfer_list.rst


From: Okash Khawaja via TF-A <tf-a@lists.trustedfirmware.org>
Sent: Saturday, May 13, 2023 2:13 PM
To: Raymond Mao <raymond.mao@linaro.org>
Cc: Ilias Apalodimas <ilias.apalodimas@linaro.org>; tf-a@lists.trustedfirmware.org
Subject: [TF-A] Re: [RFC] Common API to retrieve pre-allocated share memory for Transfer List

 

Hi,

 

Would passing the region base address and size in one of the general purpose registers when jumping to next BL stage suffice?

 

Thanks,

Okash

 

On Sat, 13 May 2023 at 12:50, Raymond Mao via TF-A <tf-a@lists.trustedfirmware.org> wrote:

Hi,

 

I am currently doing research to implement the Transfer List to comply with Arm's firmware handoff spec (https://github.com/FirmwareHandoff/firmware_handoff) in order to have a standardized handoff approach between different firmware stages during boot.

 

The idea is to create a Transfer List in BL2 and cache it into a pre-allocated memory in SRAM that can be shared between BL2 and BL3x.

 

A prototype currently available is creating APIs under qemu platform code to retrieve the pre-defined memory address (The shared memory region is defined in platform_def.h).

But I think we need to define a common API for this purpose to support all platforms.

 

Please share your views or any suggestions.

 

Thanks.

Regards,

Raymond

--
TF-A mailing list -- tf-a@lists.trustedfirmware.org
To unsubscribe send an email to tf-a-leave@lists.trustedfirmware.org