Yatharth Kochar | f528faf | 2016-06-28 16:58:26 +0100 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2016, ARM Limited and Contributors. All rights reserved. |
| 3 | * |
dp-arm | fa3cf0b | 2017-05-03 09:38:09 +0100 | [diff] [blame] | 4 | * SPDX-License-Identifier: BSD-3-Clause |
Yatharth Kochar | f528faf | 2016-06-28 16:58:26 +0100 | [diff] [blame] | 5 | */ |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 6 | |
Yatharth Kochar | f528faf | 2016-06-28 16:58:26 +0100 | [diff] [blame] | 7 | #include <asm_macros.S> |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 8 | #include <common/bl_common.h> |
Antonio Nino Diaz | a320ecd | 2019-01-15 14:19:50 +0000 | [diff] [blame] | 9 | #include <platform_def.h> |
Yatharth Kochar | f528faf | 2016-06-28 16:58:26 +0100 | [diff] [blame] | 10 | |
| 11 | .globl plat_report_exception |
| 12 | |
| 13 | |
| 14 | /* ------------------------------------------------------- |
| 15 | * void plat_report_exception(unsigned int type) |
| 16 | * Function to report an unhandled exception |
| 17 | * with platform-specific means. |
| 18 | * On FVP platform, it updates the LEDs |
| 19 | * to indicate where we are. |
| 20 | * SYS_LED[0] - 0x0 |
| 21 | * SYS_LED[2:1] - 0x0 |
| 22 | * SYS_LED[7:3] - Exception Mode. |
| 23 | * Clobbers: r0-r1 |
| 24 | * ------------------------------------------------------- |
| 25 | */ |
| 26 | func plat_report_exception |
| 27 | lsl r0, r0, #V2M_SYS_LED_EC_SHIFT |
| 28 | ldr r1, =V2M_SYSREGS_BASE |
| 29 | add r1, r1, #V2M_SYS_LED |
| 30 | str r0, [r1] |
| 31 | bx lr |
| 32 | endfunc plat_report_exception |