From 8214ecdab22a72877dfff539eee31cfb92f36423 Mon Sep 17 00:00:00 2001 From: Yann Gautier Date: Tue, 10 Jan 2023 16:58:56 +0100 Subject: [PATCH] fix(stm32mp1): add void entry in plat_def_toc_entries The fill_image_descs() function in fiptool adds images until .cmdline_name is NULL. Add a void entry to STM32MP1 plat_def_toc_entries[] to properly escape the loop. Also reported by Valentyn Korniienko (@ValentiWorkLearning) on github with pull requests [1] and [2]. [1] https://github.com/ARM-software/arm-trusted-firmware/pull/1997 [2] https://github.com/STMicroelectronics/arm-trusted-firmware/pull/8 Signed-off-by: Yann Gautier Change-Id: I94fd36ca677d46ce6df95c7674c6b6bd365b28c7 --- .../plat_fiptool/st/stm32mp1/plat_def_uuid_config.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/fiptool/plat_fiptool/st/stm32mp1/plat_def_uuid_config.c b/tools/fiptool/plat_fiptool/st/stm32mp1/plat_def_uuid_config.c index efaf56701..4df414468 100644 --- a/tools/fiptool/plat_fiptool/st/stm32mp1/plat_def_uuid_config.c +++ b/tools/fiptool/plat_fiptool/st/stm32mp1/plat_def_uuid_config.c @@ -1,9 +1,11 @@ /* - * Copyright (c) 2022, STMicroelectronics - All Rights Reserved + * Copyright (c) 2022-2023, STMicroelectronics - All Rights Reserved * * SPDX-License-Identifier: BSD-3-Clause */ +#include + #include #include "tbbr_config.h" @@ -13,6 +15,11 @@ toc_entry_t plat_def_toc_entries[] = { .name = "STM32MP CONFIG CERT", .uuid = UUID_STM32MP_CONFIG_CERT, .cmdline_name = "stm32mp-cfg-cert" + }, + + { + .name = NULL, + .uuid = { {0} }, + .cmdline_name = NULL, } }; -