1/* 2 * Copyright (c) 2016-2017, ARM Limited and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7#include <arch.h> 8#include <asm_macros.S> 9 10 .weak plat_report_exception 11 .weak plat_crash_console_init 12 .weak plat_crash_console_putc 13 .weak plat_crash_console_flush 14 .weak plat_reset_handler 15 .weak plat_disable_acp 16 .weak bl1_plat_prepare_exit 17 .weak platform_mem_init 18 .weak plat_error_handler 19 .weak plat_panic_handler 20 .weak bl2_plat_preload_setup 21 .weak plat_try_next_boot_source 22 23 /* ----------------------------------------------------- 24 * Placeholder function which should be redefined by 25 * each platform. 26 * ----------------------------------------------------- 27 */ 28func plat_report_exception 29 bx lr 30endfunc plat_report_exception 31 32 /* ----------------------------------------------------- 33 * Placeholder function which should be redefined by 34 * each platform. 35 * ----------------------------------------------------- 36 */ 37func plat_crash_console_init 38 mov r0, #0 39 bx lr 40endfunc plat_crash_console_init 41 42 /* ----------------------------------------------------- 43 * Placeholder function which should be redefined by 44 * each platform. 45 * ----------------------------------------------------- 46 */ 47func plat_crash_console_putc 48 bx lr 49endfunc plat_crash_console_putc 50 51 /* ----------------------------------------------------- 52 * Placeholder function which should be redefined by 53 * each platform. 54 * ----------------------------------------------------- 55 */ 56func plat_crash_console_flush 57 mov r0, #0 58 bx lr 59endfunc plat_crash_console_flush 60 61 /* ----------------------------------------------------- 62 * Placeholder function which should be redefined by 63 * each platform. 64 * ----------------------------------------------------- 65 */ 66func plat_reset_handler 67 bx lr 68endfunc plat_reset_handler 69 70 /* ----------------------------------------------------- 71 * Placeholder function which should be redefined by 72 * each platform. 73 * ----------------------------------------------------- 74 */ 75func plat_disable_acp 76 bx lr 77endfunc plat_disable_acp 78 79 /* --------------------------------------------------------------------- 80 * Placeholder function which should be redefined by 81 * each platform. 82 * --------------------------------------------------------------------- 83 */ 84func platform_mem_init 85 bx lr 86endfunc platform_mem_init 87 88 /* ----------------------------------------------------- 89 * void bl1_plat_prepare_exit(entry_point_info_t *ep_info); 90 * Called before exiting BL1. Default: do nothing 91 * ----------------------------------------------------- 92 */ 93func bl1_plat_prepare_exit 94 bx lr 95endfunc bl1_plat_prepare_exit 96 97 /* ----------------------------------------------------- 98 * void plat_error_handler(int err) __dead2; 99 * Endless loop by default. 100 * ----------------------------------------------------- 101 */ 102func plat_error_handler 103 wfi 104 b plat_error_handler 105endfunc plat_error_handler 106 107 /* ----------------------------------------------------- 108 * void plat_panic_handler(void) __dead2; 109 * Endless loop by default. 110 * ----------------------------------------------------- 111 */ 112func plat_panic_handler 113 b plat_panic_handler 114endfunc plat_panic_handler 115 116 117 /* ----------------------------------------------------- 118 * Placeholder function which should be redefined by 119 * each platfrom. 120 * ----------------------------------------------------- 121 */ 122func bl2_plat_preload_setup 123 bx lr 124endfunc bl2_plat_preload_setup 125 126 /* ----------------------------------------------------- 127 * Placeholder function which should be redefined by 128 * each platfrom. 129 * ----------------------------------------------------- 130 */ 131func plat_try_next_boot_source 132 mov r0, #0 133 bx lr 134endfunc plat_try_next_boot_source 135