From: Jaehoon Chung Date: Mon, 16 Sep 2019 01:09:02 +0000 (+0900) Subject: spl: atf: call bl31_entry function before jump to u-boot X-Git-Tag: submit/tizen/20191107.042334~20 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d332415fe82f29ba0d8b22ad4948c811c8ebd4c8;p=platform%2Fkernel%2Fu-boot.git spl: atf: call bl31_entry function before jump to u-boot Call bl31_entry function before jump to u-boot in board_init_r. This patch is added because of Dignsys's ATF patches. In future, if find generic solution with fit-images node, will be reverted. Change-Id: I2a506207674aed8180d542a659d389c479d13b63 Signed-off-by: Jaehoon Chung --- diff --git a/common/spl/spl.c b/common/spl/spl.c index 082fa2bd94..71ed283007 100644 --- a/common/spl/spl.c +++ b/common/spl/spl.c @@ -687,6 +687,13 @@ void board_init_r(gd_t *dummy1, ulong dummy2) debug("Failed to stash bootstage: err=%d\n", ret); #endif + /* FIXME: This is workaround to use ATF for Tizen + * If find generic solution to use ATF, will remove this code. + * It has dependent with Dignsys's patch. + */ + if (IS_ENABLED(CONFIG_SPL_ATF)) + bl31_entry(CONFIG_SPL_ATF_TEXT_BASE, CONFIG_SYS_TEXT_BASE, NULL); + debug("loaded - jumping to U-Boot...\n"); spl_board_prepare_for_boot(); jump_to_image_no_args(&spl_image); diff --git a/common/spl/spl_atf.c b/common/spl/spl_atf.c index b8caf25586..11def8c75e 100644 --- a/common/spl/spl_atf.c +++ b/common/spl/spl_atf.c @@ -86,7 +86,7 @@ static inline void raw_write_daif(unsigned int daif) typedef void (*atf_entry_t)(struct bl31_params *params, void *plat_params); -static void bl31_entry(uintptr_t bl31_entry, uintptr_t bl33_entry, +void bl31_entry(uintptr_t bl31_entry, uintptr_t bl33_entry, uintptr_t fdt_addr) { struct bl31_params *bl31_params; diff --git a/include/spl.h b/include/spl.h index e4640f3830..8cc2ab18d2 100644 --- a/include/spl.h +++ b/include/spl.h @@ -415,4 +415,6 @@ void spl_perform_fixups(struct spl_image_info *spl_image); */ struct image_header *spl_get_load_buffer(ssize_t offset, size_t size); +void bl31_entry(uintptr_t bl31_entry, uintptr_t bl33_entry, + uintptr_t fdt_addr); #endif