Create a new arch-specific way of creating a standard passage to the next phase.
Signed-off-by: Simon Glass <s...@chromium.org> --- (no changes since v2) Changes in v2: - Make the stdpass calling standard arch-specific common/spl/spl.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/common/spl/spl.c b/common/spl/spl.c index 6e38f118f48..b705fd5514a 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -22,6 +22,7 @@ #include <malloc.h> #include <mapmem.h> #include <nand.h> +#include <passage.h> #include <serial.h> #include <spl.h> #include <spl_load.h> @@ -398,13 +399,28 @@ int spl_load(struct spl_image_info *spl_image, __weak void __noreturn jump_to_image(struct spl_image_info *spl_image) { - typedef void __noreturn (*image_entry_noargs_t)(void); - - image_entry_noargs_t image_entry = - (image_entry_noargs_t)spl_image->entry_point; + ulong bloblist = 0; debug("image entry point: 0x%lx\n", spl_image->entry_point); - image_entry(); + + if (CONFIG_IS_ENABLED(PASSAGE_OUT)) { + const void *fdt; + + bloblist = bloblist_get_base(); + fdt = bloblist_find(BLOBLISTT_CONTROL_FDT, 0); + + log_debug("passage: sending bloblist %lx dtb %lx\n", + bloblist, (ulong)map_to_sysmem(fdt)); + arch_passage_entry(spl_image->entry_point, + map_to_sysmem(gd_bloblist()), + map_to_sysmem(fdt)); + } else { + typedef void __noreturn (*image_entry_noargs_t)(void); + + image_entry_noargs_t image_entry = + (image_entry_noargs_t)spl_image->entry_point; + image_entry(); + } } #if CONFIG_IS_ENABLED(HANDOFF) -- 2.43.0