Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015, 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 |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [diff] [blame] | 5 | */ |
Antonio Nino Diaz | e0f9063 | 2018-12-14 00:18:21 +0000 | [diff] [blame] | 6 | |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [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> |
Dan Handley | 9df4804 | 2015-03-19 18:58:55 +0000 | [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 | * --------------------------------------------- |
| 21 | */ |
| 22 | func plat_report_exception |
| 23 | mrs x1, CurrentEl |
| 24 | lsr x1, x1, #MODE_EL_SHIFT |
| 25 | lsl x1, x1, #V2M_SYS_LED_EL_SHIFT |
| 26 | lsl x0, x0, #V2M_SYS_LED_EC_SHIFT |
| 27 | mov x2, #(SECURE << V2M_SYS_LED_SS_SHIFT) |
| 28 | orr x0, x0, x2 |
| 29 | orr x0, x0, x1 |
| 30 | mov x1, #V2M_SYSREGS_BASE |
| 31 | add x1, x1, #V2M_SYS_LED |
| 32 | str w0, [x1] |
| 33 | ret |
| 34 | endfunc plat_report_exception |