From 9ff67fa6f25c5a0285eec27f3e86362ae535aac3 Mon Sep 17 00:00:00 2001 From: Gerald Lejeune Date: Thu, 26 Nov 2015 15:47:53 +0100 Subject: Dump platform-defined regs in crash reporting It is up to the platform to implement the new plat_crash_print_regs macro to report all relevant platform registers helpful for troubleshooting. plat_crash_print_regs merges or calls previously defined plat_print_gic_regs and plat_print_interconnect_regs macros for each existing platforms. NOTE: THIS COMMIT REQUIRES ALL PLATFORMS THAT ENABLE THE `CRASH_REPORTING` BUILD FLAG TO MIGRATE TO USE THE NEW `plat_crash_print_regs()` MACRO. BY DEFAULT, `CRASH_REPORTING` IS ENABLED IN DEBUG BUILDS FOR ALL PLATFORMS. Fixes: arm-software/tf-issues#373 Signed-off-by: Gerald Lejeune --- plat/mediatek/mt8173/include/plat_macros.S | 25 ++++++++----------------- 1 file changed, 8 insertions(+), 17 deletions(-) (limited to 'plat/mediatek') diff --git a/plat/mediatek/mt8173/include/plat_macros.S b/plat/mediatek/mt8173/include/plat_macros.S index 0e34b197..018a790a 100644 --- a/plat/mediatek/mt8173/include/plat_macros.S +++ b/plat/mediatek/mt8173/include/plat_macros.S @@ -43,14 +43,18 @@ newline: spacer: .asciz ":\t\t0x" +.section .rodata.cci_reg_name, "aS" +cci_iface_regs: + .asciz "cci_snoop_ctrl_cluster0", "cci_snoop_ctrl_cluster1" , "" + /* --------------------------------------------- - * The below macro prints out relevant GIC - * registers whenever an unhandled exception is - * taken in BL3-1. + * The below macro prints out relevant GIC and + * CCI registers whenever an unhandled exception + * is taken in BL3-1. * Clobbers: x0 - x10, x16, x17, sp * --------------------------------------------- */ - .macro plat_print_gic_regs + .macro plat_crash_print_regs mov_imm x16, BASE_GICD_BASE mov_imm x17, BASE_GICC_BASE /* Load the gicc reg list to x6 */ @@ -82,20 +86,7 @@ gicd_ispendr_loop: bl asm_print_str b gicd_ispendr_loop exit_print_gic_regs: - .endm -.section .rodata.cci_reg_name, "aS" -cci_iface_regs: - .asciz "cci_snoop_ctrl_cluster0", "cci_snoop_ctrl_cluster1" , "" - - /* ------------------------------------------------ - * The below macro prints out relevant interconnect - * registers whenever an unhandled exception is - * taken in BL3-1. - * Clobbers: x0 - x9, sp - * ------------------------------------------------ - */ - .macro plat_print_interconnect_regs adr x6, cci_iface_regs /* Store in x7 the base address of the first interface */ mov_imm x7, (PLAT_MT_CCI_BASE + SLAVE_IFACE_OFFSET( \ -- cgit v1.2.3