plat/common: move arch-agnostic fallback functions to C file
When we add a new callback, we need to duplicate fallbacks among
plat/common/{aarch32,aarch64}/platform_helpers.S This is tedious.
I created a new C file, then moved 3 functions:
plat_error_handler
bl2_plat_preload_setup
plat_try_next_boot_source
They are called from C, so I do not see a good reason to implement
them in assembly.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
diff --git a/plat/common/aarch64/platform_helpers.S b/plat/common/aarch64/platform_helpers.S
index 8526752..033a12f 100644
--- a/plat/common/aarch64/platform_helpers.S
+++ b/plat/common/aarch64/platform_helpers.S
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013-2017, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -16,10 +16,7 @@
.weak plat_reset_handler
.weak plat_disable_acp
.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
@@ -159,16 +156,6 @@
endfunc bl1_plat_prepare_exit
/* -----------------------------------------------------
- * void plat_error_handler(int err) __dead2;
- * Endless loop by default.
- * -----------------------------------------------------
- */
-func plat_error_handler
- wfi
- b plat_error_handler
-endfunc plat_error_handler
-
- /* -----------------------------------------------------
* void plat_panic_handler(void) __dead2;
* Endless loop by default.
* -----------------------------------------------------
@@ -177,22 +164,3 @@
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