[PATCH v4 03/11] arm: mach-k3: Explicitly identify TIFSSTUB images when discarding buffers
Simon Glass
sjg at chromium.org
Thu Apr 30 01:47:05 CEST 2026
On 2026-04-25T03:37:39, Padhi, Beleswar <b-padhi at ti.com> wrote:
> arm: mach-k3: Explicitly identify TIFSSTUB images when discarding buffers
>
> The board_fit_image_post_process() function assumes that all TIFSSTUB
> images appear at the end of the image_os_match[] array by using
> the condition:
>
> i < IMAGE_AMT && i > IMAGE_ID_DM_FW
>
> However, this assumption breaks when new image types are appended to the
> enum and the array, causing unintended image types to match this
> condition and having their buffer sizes incorrectly set to 0 with:
>
> *p_size = 0
>
> To avoid this issue, replace the range-based check with an explicit
> match for TIFSSTUB image IDs.
>
> Signed-off-by: Beleswar Padhi <b-padhi at ti.com>
>
> arch/arm/mach-k3/r5/common.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
Reviewed-by: Simon Glass <sjg at chromium.org>
More information about the U-Boot
mailing list