[PATCH 06/23] ARM: i.MX8M: move BL32 setup into imx8m_tfa_start_bl31()
Ahmad Fatoum
a.fatoum at pengutronix.de
Wed Jan 14 04:21:23 PST 2026
On 11/10/25 9:34 PM, Marco Felsch wrote:
> Each i.MX8M platform repeated the same pattern for loading the optional
> BL32 image because of the firmware name handling and the BL32 location
> (end of memory).
>
> The firmware name handling can't be generalized without change the logic
> to function-like macros but the rest can be handled within the common
> imx8m_tfa_start_bl31() function. While on it the commit adds a sanity
> check that the BL32 image size is > 0.
>
> Signed-off-by: Marco Felsch <m.felsch at pengutronix.de>
Reviewed-by: Ahmad Fatoum <a.fatoum at pengutronix.de>
> + if (tee_bin) {
> + BUG_ON(tee_size <= 0);
Nitpick: tee_size < 0 can't happen for size_t. tee_size == 0 must mean
an empty file was passed. I think it would be better just to do
if (tee_bin && tee_size).
Cheers,
Ahmad
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
More information about the barebox
mailing list