refactor(st): move plat_image_load.c
This file is common for ST platforms, move it to plat/st/common/.
Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: I7cefbc7f857d4ea63320042988c86d28e8a3cc09
diff --git a/plat/st/common/common.mk b/plat/st/common/common.mk
index f69c901..d10f185 100644
--- a/plat/st/common/common.mk
+++ b/plat/st/common/common.mk
@@ -146,6 +146,7 @@
BL2_SOURCES += drivers/io/io_fip.c \
plat/st/common/bl2_io_storage.c \
+ plat/st/common/plat_image_load.c \
plat/st/common/stm32mp_fconf_io.c
BL2_SOURCES += drivers/io/io_block.c \
diff --git a/plat/st/common/plat_image_load.c b/plat/st/common/plat_image_load.c
new file mode 100644
index 0000000..4644168
--- /dev/null
+++ b/plat/st/common/plat_image_load.c
@@ -0,0 +1,37 @@
+/*
+ * Copyright (c) 2016-2023, Arm Limited and Contributors. All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+#include <common/desc_image_load.h>
+#include <plat/common/platform.h>
+
+/*******************************************************************************
+ * This function flushes the data structures so that they are visible
+ * in memory for the next BL image.
+ ******************************************************************************/
+void plat_flush_next_bl_params(void)
+{
+ flush_bl_params_desc();
+}
+
+/*******************************************************************************
+ * This function returns the list of loadable images.
+ ******************************************************************************/
+bl_load_info_t *plat_get_bl_image_load_info(void)
+{
+ return get_bl_load_info_from_mem_params_desc();
+}
+
+/*******************************************************************************
+ * This function returns the list of executable images.
+ ******************************************************************************/
+bl_params_t *plat_get_next_bl_params(void)
+{
+ bl_params_t *bl_params = get_next_bl_params_from_mem_params_desc();
+
+ populate_next_bl_params_config(bl_params);
+
+ return bl_params;
+}