[PATCH 2/2] ARM: i.MX: Webasto ccbv2: fix barebox chainloading with OP-TEE enabled

Marco Felsch m.felsch at pengutronix.de
Thu Jun 26 08:16:58 PDT 2025


On 25-06-26, Sascha Hauer wrote:
> Chainloading barebox when OP-TEE is enabled has multiple bugs, fix them.
> 
> When barebox starts we have to guess if we have to start OP-TEE or not.
> As we can't detect the exception level on ARMv7 we do this by checking
> if a first stage loader has passed us a device tree.
> 
> First of all the device tree is passed in r2, not in r0, so fix the
> register we use.
> 
> Then we have to check if r2 is within the SDRAM. We check against
> MX6_MMDC_P0_BASE_ADDR which is the base of the SDRAM controller. Use the
> base address of the SDRAM instead.
> 
> Finally we manipulate the TZASC which we are obviously not allowed in
> EL1, so move the manipulation to the code which is only executed in EL2.
> 
> Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>

Feel free to add my:

Acked-by: Marco Felsch <m.felsch at pengutronix.de>

Regards,
  Marco



More information about the barebox mailing list