IMX8M and Optee support

Ahmad Fatoum a.fatoum at
Wed Oct 18 02:06:44 PDT 2023

Hello Hans,

On 18.10.23 10:11, Hans Christian Lønstad wrote:
> Just reaching out to ask whether anyone has successfully integrated Optee on the IMX8M(P) platform.
> Our trials results in a crash when the ATF (NXP 2.8) does the handover to Optee (exit EL3).
> In ATF it appears that BL32 is expected to load at 0x56000000 on IMX8MP while Barebox actually loads
> The Optee bin blob just below top of memory.
> (Patching Barebox to the expected ATF BL32_BASE does not resolve the issue)
> Any help would be appreciated

I am using OP-TEE in an i.MX8MN project successfully. The hardcoding of addresses
is indeed unfortunate and it needs manual adjustment depending on the size
of available RAM.

The common configuration is to reserve secure memory at the end of DRAM as not
to split the RAM in half. You should thus change the BL32 address used in TF-A
in alignment with barebox CONFIG_OPTEE_SIZE, which is always relative to the end
of RAM.

Let me know how it goes.


> Hans Christian Lønstad

Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       |  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

More information about the barebox mailing list