diff options
author | Igor Guryanov <guryanov@synopsys.com> | 2014-12-24 16:26:14 +0300 |
---|---|---|
committer | Alexey Brodkin <abrodkin@synopsys.com> | 2015-01-15 22:38:42 +0300 |
commit | e47d733867b2da336754718f7eaa7f51655dbefa (patch) | |
tree | 2768c99fce5aed73730d697774732e80c51154d9 /arch | |
parent | f8cf3d1ebdf7622f65c4eeba9eae1ed04982de12 (diff) | |
download | u-boot-imx-e47d733867b2da336754718f7eaa7f51655dbefa.zip u-boot-imx-e47d733867b2da336754718f7eaa7f51655dbefa.tar.gz u-boot-imx-e47d733867b2da336754718f7eaa7f51655dbefa.tar.bz2 |
arc: add ECR (exception cause register) output
Exception cause register (ECR) contains value that describes a reason
for exception that has happened. This helps a lot to figure-out what
went wrong.
Now we print this register contents when dumping registers.
Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Signed-off-by: Igor Guryanov <guryanov@synopsys.com>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arc/cpu/arc700/interrupts.c | 1 | ||||
-rw-r--r-- | arch/arc/cpu/arc700/start.S | 10 |
2 files changed, 7 insertions, 4 deletions
diff --git a/arch/arc/cpu/arc700/interrupts.c b/arch/arc/cpu/arc700/interrupts.c index d93a6eb..7dde74b 100644 --- a/arch/arc/cpu/arc700/interrupts.c +++ b/arch/arc/cpu/arc700/interrupts.c @@ -61,6 +61,7 @@ static void print_reg_file(long *reg_rev, int start_num) void show_regs(struct pt_regs *regs) { + printf("ECR:\t0x%08lx\n", regs->ecr); printf("RET:\t0x%08lx\nBLINK:\t0x%08lx\nSTAT32:\t0x%08lx\n", regs->ret, regs->blink, regs->status32); printf("GP: 0x%08lx\t r25: 0x%08lx\t\n", regs->r26, regs->r25); diff --git a/arch/arc/cpu/arc700/start.S b/arch/arc/cpu/arc700/start.S index 563513b..4d505bf 100644 --- a/arch/arc/cpu/arc700/start.S +++ b/arch/arc/cpu/arc700/start.S @@ -57,11 +57,13 @@ .endm .macro SAVE_ALL_SYS - + /* saving %r0 to reg->r0 in advance since we read %ecr into it */ + st %r0, [%sp, -8] + lr %r0, [%ecr] /* all stack addressing is manual so far */ st %r0, [%sp] - lr %r0, [%ecr] - st %r0, [%sp, 8] /* ECR */ - st %sp, [%sp, 4] + st %sp, [%sp, -4] + /* now move %sp to reg->r0 position so we can do "push" automatically */ + sub %sp, %sp, 8 SAVE_R1_TO_R24 PUSH %r25 |