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