From e9d7ab1ba3543ce6575aba361bf7d712bcb1fa76 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Wed, 18 Dec 2013 11:26:48 -0600 Subject: [PATCH] A10: Extend register debug logic --- arch/arm/src/a1x/a1x_irq.c | 9 ++++++++- arch/arm/src/armv7-a/arm_head.S | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/arch/arm/src/a1x/a1x_irq.c b/arch/arm/src/a1x/a1x_irq.c index a1dd69bc05..c8ef6c8278 100644 --- a/arch/arm/src/a1x/a1x_irq.c +++ b/arch/arm/src/a1x/a1x_irq.c @@ -50,6 +50,7 @@ #include "up_arch.h" #include "os_internal.h" #include "up_internal.h" +#include "sctlr.h" #include "a1x_pio.h" #include "a1x_irq.h" @@ -89,11 +90,15 @@ static void a1x_dumpintc(const char *msg, int irq) { irqstate_t flags; + /* Dump some relevant ARMv7 register contents */ + flags = irqsave(); - lldbg("INTC (%s, irq=%d):\n", msg, irq); + lldbg("ARMv7 (%s, irq=%d):\n", msg, irq); + lldbg(" CPSR: %08x SCTLR: %08x\n", flags, cp15_rdsctlr()); /* Dump all of the (readable) register contents */ + lldbg("INTC (%s, irq=%d):\n", msg, irq); lldbg(" VECTOR: %08x BASE: %08x PROTECT: %08x NMICTRL: %08x\n", getreg32(A1X_INTC_VECTOR), getreg32(A1X_INTC_BASEADDR), getreg32(A1X_INTC_PROTECT), getreg32(A1X_INTC_NMICTRL)); @@ -191,6 +196,8 @@ void up_irqinitialize(void) (void)irqenable(); #endif + + a1x_dumpintc("initial", 0); } /**************************************************************************** diff --git a/arch/arm/src/armv7-a/arm_head.S b/arch/arm/src/armv7-a/arm_head.S index 6540a69d83..80693b538e 100644 --- a/arch/arm/src/armv7-a/arm_head.S +++ b/arch/arm/src/armv7-a/arm_head.S @@ -377,7 +377,7 @@ __start: * r5 = Address of the base of the L1 table */ - orr r1, r5, #0x48 + orr r1, r5, #0x48 /* Select cache properties */ mcr CP15_TTBR0(r1) mcr CP15_TTBR1(r1)