summaryrefslogtreecommitdiff
path: root/common/spl/spl.c
diff options
context:
space:
mode:
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-09-13 21:29:35 +0200
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-11-26 00:39:07 +0100
commit1d3790905d9c089b434c376f2dcc585b6a92bc99 (patch)
treebeead2dc5e0e5eeeeb31c7c05c0cac5fc9a87a0c /common/spl/spl.c
parenta616c783f22a045e580f101141a9d62775f97365 (diff)
spl: atf: introduce spl_invoke_atf and make bl31_entry private
This adds a new interface spl_invoke_atf() that takes a spl_image_info argument and then derives the necessary parameters for the ATF entry. Based on the additional information recorded (into /fit-images) from the FIT loadables, we can now easily locate the next boot stage. We now pass a pointer to a FDT as the platform-specific parameter pointer to ATF (so we don't run into the future headache of every board/platform defining their own proprietary tag-structure), as FDT access is already available in ATF. With the necessary infrastructure in place, we can now update the support for the ARM Trusted Firmware to dispatch into the spl_invoke_atf function only if a IH_OS_ARM_TRUSTED_FIRMWARE image is loaded. Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'common/spl/spl.c')
-rw-r--r--common/spl/spl.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index d232f67ba9..3bb20c7822 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -418,6 +418,12 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
case IH_OS_U_BOOT:
debug("Jumping to U-Boot\n");
break;
+#if CONFIG_IS_ENABLED(ATF)
+ case IH_OS_ARM_TRUSTED_FIRMWARE:
+ debug("Jumping to U-Boot via ARM Trusted Firmware\n");
+ spl_invoke_atf(&spl_image);
+ break;
+#endif
#ifdef CONFIG_SPL_OS_BOOT
case IH_OS_LINUX:
debug("Jumping to Linux\n");
@@ -442,11 +448,6 @@ void board_init_r(gd_t *dummy1, ulong dummy2)
debug("Failed to stash bootstage: err=%d\n", ret);
#endif
- if (CONFIG_IS_ENABLED(ATF_SUPPORT)) {
- debug("loaded - jumping to U-Boot via ATF BL31.\n");
- bl31_entry();
- }
-
debug("loaded - jumping to U-Boot...\n");
spl_board_prepare_for_boot();
jump_to_image_no_args(&spl_image);