From 01f62b6d0d90a236cbfdf385aab7ec2ac11f2e65 Mon Sep 17 00:00:00 2001 From: Roberto Vargas Date: Tue, 26 Sep 2017 12:53:01 +0100 Subject: Add platform hooks for boot redundancy support These hooks are intended to allow one platform to try load images from alternative places. There is a hook to initialize the sequence of boot locations and a hook to pass to the next sequence. Change-Id: Ia0f84c415208dc4fa4f9d060d58476db23efa5b2 Signed-off-by: Roberto Vargas --- plat/common/aarch32/platform_helpers.S | 22 ++++++++++++++++++++++ plat/common/aarch64/platform_helpers.S | 21 +++++++++++++++++++++ 2 files changed, 43 insertions(+) (limited to 'plat') diff --git a/plat/common/aarch32/platform_helpers.S b/plat/common/aarch32/platform_helpers.S index b5f41ffbf..61d21ab36 100644 --- a/plat/common/aarch32/platform_helpers.S +++ b/plat/common/aarch32/platform_helpers.S @@ -14,6 +14,8 @@ .weak plat_disable_acp .weak platform_mem_init .weak plat_panic_handler + .weak bl2_plat_preload_setup + .weak plat_try_next_boot_source /* ----------------------------------------------------- * Placeholder function which should be redefined by @@ -79,3 +81,23 @@ endfunc platform_mem_init func plat_panic_handler b plat_panic_handler endfunc plat_panic_handler + + + /* ----------------------------------------------------- + * Placeholder function which should be redefined by + * each platfrom. + * ----------------------------------------------------- + */ +func bl2_plat_preload_setup + bx lr +endfunc bl2_plat_preload_setup + + /* ----------------------------------------------------- + * Placeholder function which should be redefined by + * each platfrom. + * ----------------------------------------------------- + */ +func plat_try_next_boot_source + mov r0, #0 + bx lr +endfunc plat_try_next_boot_source diff --git a/plat/common/aarch64/platform_helpers.S b/plat/common/aarch64/platform_helpers.S index e60db2013..797a93639 100644 --- a/plat/common/aarch64/platform_helpers.S +++ b/plat/common/aarch64/platform_helpers.S @@ -17,6 +17,8 @@ .weak bl1_plat_prepare_exit .weak plat_error_handler .weak plat_panic_handler + .weak bl2_plat_preload_setup + .weak plat_try_next_boot_source #if !ENABLE_PLAT_COMPAT .globl platform_get_core_pos @@ -129,3 +131,22 @@ func plat_panic_handler wfi b plat_panic_handler endfunc plat_panic_handler + + /* ----------------------------------------------------- + * Placeholder function which should be redefined by + * each platfrom. + * ----------------------------------------------------- + */ +func bl2_plat_preload_setup + ret +endfunc bl2_plat_preload_setup + + /* ----------------------------------------------------- + * Placeholder function which should be redefined by + * each platfrom. + * ----------------------------------------------------- + */ +func plat_try_next_boot_source + mov x0, #0 + ret +endfunc plat_try_next_boot_source -- cgit v1.2.3