blob: 4385e62ba8ae94881af037ebebc9b199ac2d8f8e [file] [log] [blame]
Dan Handley9df48042015-03-19 18:58:55 +00001/*
2 * Copyright (c) 2015, ARM Limited and Contributors. All rights reserved.
3 *
dp-armfa3cf0b2017-05-03 09:38:09 +01004 * SPDX-License-Identifier: BSD-3-Clause
Dan Handley9df48042015-03-19 18:58:55 +00005 */
6#include <asm_macros.S>
7#include <bl_common.h>
8#include <v2m_def.h>
9
10 .globl plat_report_exception
11
12
13 /* ---------------------------------------------
14 * void plat_report_exception(unsigned int type)
15 * Function to report an unhandled exception
16 * with platform-specific means.
17 * On FVP platform, it updates the LEDs
18 * to indicate where we are
19 * ---------------------------------------------
20 */
21func plat_report_exception
22 mrs x1, CurrentEl
23 lsr x1, x1, #MODE_EL_SHIFT
24 lsl x1, x1, #V2M_SYS_LED_EL_SHIFT
25 lsl x0, x0, #V2M_SYS_LED_EC_SHIFT
26 mov x2, #(SECURE << V2M_SYS_LED_SS_SHIFT)
27 orr x0, x0, x2
28 orr x0, x0, x1
29 mov x1, #V2M_SYSREGS_BASE
30 add x1, x1, #V2M_SYS_LED
31 str w0, [x1]
32 ret
33endfunc plat_report_exception