arm: interrupt: clean up registers show
Change-Id: I0ecb11c5e67cb7e0e95d3fcaad9220628fddbfc6 Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
This commit is contained in:
parent
9fa74d15b8
commit
683a8d16be
|
|
@ -23,6 +23,7 @@
|
|||
#include <asm/proc-armv/ptrace.h>
|
||||
#include <asm/u-boot-arm.h>
|
||||
#include <efi_loader.h>
|
||||
#include <iomem.h>
|
||||
|
||||
DECLARE_GLOBAL_DATA_PTR;
|
||||
|
||||
|
|
@ -55,6 +56,7 @@ void bad_mode (void)
|
|||
|
||||
void show_regs (struct pt_regs *regs)
|
||||
{
|
||||
ulong pc, lr;
|
||||
unsigned long __maybe_unused flags;
|
||||
const char __maybe_unused *processor_modes[] = {
|
||||
"USER_26", "FIQ_26", "IRQ_26", "SVC_26",
|
||||
|
|
@ -69,15 +71,17 @@ void show_regs (struct pt_regs *regs)
|
|||
|
||||
flags = condition_codes (regs);
|
||||
|
||||
printf("pc : [<%08lx>] lr : [<%08lx>]\n",
|
||||
instruction_pointer(regs), regs->ARM_lr);
|
||||
if (gd->flags & GD_FLG_RELOC) {
|
||||
printf("reloc pc : [<%08lx>] lr : [<%08lx>]\n",
|
||||
instruction_pointer(regs) - gd->reloc_off,
|
||||
regs->ARM_lr - gd->reloc_off);
|
||||
pc = instruction_pointer(regs) - gd->reloc_off;
|
||||
lr = regs->ARM_lr - gd->reloc_off;
|
||||
} else {
|
||||
pc = instruction_pointer(regs);
|
||||
lr = regs->ARM_lr;
|
||||
}
|
||||
printf("sp : %08lx ip : %08lx fp : %08lx\n",
|
||||
regs->ARM_sp, regs->ARM_ip, regs->ARM_fp);
|
||||
|
||||
printf ("pc : %08lx lr : %08lx\n", pc, lr);
|
||||
printf ("sp : %08lx ip : %08lx fp : %08lx\n",
|
||||
regs->ARM_sp, regs->ARM_ip, regs->ARM_fp);
|
||||
printf ("r10: %08lx r9 : %08lx r8 : %08lx\n",
|
||||
regs->ARM_r10, regs->ARM_r9, regs->ARM_r8);
|
||||
printf ("r7 : %08lx r6 : %08lx r5 : %08lx r4 : %08lx\n",
|
||||
|
|
@ -88,11 +92,13 @@ void show_regs (struct pt_regs *regs)
|
|||
flags & CC_N_BIT ? 'N' : 'n',
|
||||
flags & CC_Z_BIT ? 'Z' : 'z',
|
||||
flags & CC_C_BIT ? 'C' : 'c', flags & CC_V_BIT ? 'V' : 'v');
|
||||
printf (" IRQs %s FIQs %s Mode %s%s\n",
|
||||
printf (" IRQs %s FIQs %s Mode %s%s\n\n",
|
||||
interrupts_enabled (regs) ? "on" : "off",
|
||||
fast_interrupts_enabled (regs) ? "on" : "off",
|
||||
processor_modes[processor_mode (regs)],
|
||||
thumb_mode (regs) ? " (T)" : "");
|
||||
|
||||
iomem_show("sp", regs->ARM_sp, 0x00, 0xfc);
|
||||
}
|
||||
|
||||
/* fixup PC to point to the instruction leading to the exception */
|
||||
|
|
|
|||
Loading…
Reference in New Issue