Commit 4c05b6bc authored by Sandrine Bailleux's avatar Sandrine Bailleux
Browse files

juno: Implement plat_report_exception() function

As for FVP platforms, Juno provides some LEDs that we can
use to report exceptions during the early boot code.
No related merge requests found
Showing with 30 additions and 2 deletions
+30 -2
...@@ -39,12 +39,21 @@ ...@@ -39,12 +39,21 @@
* void plat_report_exception(unsigned int type) * void plat_report_exception(unsigned int type)
* Function to report an unhandled exception * Function to report an unhandled exception
* with platform-specific means. * with platform-specific means.
* On FVP platform, it updates the LEDs * On Juno platform, it updates the LEDs
* to indicate where we are * to indicate where we are
* --------------------------------------------- * ---------------------------------------------
*/ */
plat_report_exception: plat_report_exception:
/* Juno todo: Come up with a way of reporting errors */ mrs x1, CurrentEl
lsr x1, x1, #MODE_EL_SHIFT
lsl x1, x1, #SYS_LED_EL_SHIFT
lsl x0, x0, #SYS_LED_EC_SHIFT
mov x2, #(SECURE << SYS_LED_SS_SHIFT)
orr x0, x0, x2
orr x0, x0, x1
mov x1, #VE_SYSREGS_BASE
add x1, x1, #V2M_SYS_LED
str w0, [x1]
ret ret
/* /*
......
...@@ -148,6 +148,25 @@ ...@@ -148,6 +148,25 @@
#define CNTACR_RWVT_SHIFT 0x4 #define CNTACR_RWVT_SHIFT 0x4
#define CNTACR_RWPT_SHIFT 0x5 #define CNTACR_RWPT_SHIFT 0x5
/* V2M motherboard system registers & offsets */
#define VE_SYSREGS_BASE 0x1c010000
#define V2M_SYS_LED 0x8
/*
* V2M sysled bit definitions. The values written to this
* register are defined in arch.h & runtime_svc.h. Only
* used by the primary cpu to diagnose any cold boot issues.
*
* SYS_LED[0] - Security state (S=0/NS=1)
* SYS_LED[2:1] - Exception Level (EL3-EL0)
* SYS_LED[7:3] - Exception Class (Sync/Async & origin)
*
*/
#define SYS_LED_SS_SHIFT 0x0
#define SYS_LED_EL_SHIFT 0x1
#define SYS_LED_EC_SHIFT 0x3
/******************************************************************************* /*******************************************************************************
* BL2 specific defines. * BL2 specific defines.
******************************************************************************/ ******************************************************************************/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment