summaryrefslogtreecommitdiff
path: root/common/spl/spl.c
diff options
context:
space:
mode:
authorPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-08-30 15:25:58 +0200
committerPhilipp Tomsich <philipp.tomsich@theobroma-systems.com>2017-10-02 11:20:53 +0200
commit8ffd96ea53a81e23a31761483663b597597f83c9 (patch)
tree4b035cb125248a1bf6dbd2efcb26d3729a853fff /common/spl/spl.c
parentb880b0ff3c112617dcb832846611cba143ae7c50 (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>
Diffstat (limited to 'common/spl/spl.c')
-rw-r--r--common/spl/spl.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/common/spl/spl.c b/common/spl/spl.c
index 4afbe97fc1..de6b7020eb 100644
--- a/common/spl/spl.c
+++ b/common/spl/spl.c
@@ -410,6 +410,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");