From 7a152c3d9d0b8c4b7b136ccf983b8a73e856096b Mon Sep 17 00:00:00 2001 From: Marcelo Povoa Date: Fri, 14 Feb 2014 15:11:20 -0800 Subject: [PATCH] aarch64: Fix formatting of exception registers dump BUG=None BRANCH=none TEST=Build coreboot Change-Id: I9f55e85e720de5f55ea6bfe863b83be842859be1 Signed-off-by: Marcelo Povoa Reviewed-on: https://chromium-review.googlesource.com/186740 Reviewed-by: David Hendricks --- src/arch/aarch64/exception.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/arch/aarch64/exception.c b/src/arch/aarch64/exception.c index eabc8a511c..31e31311a7 100644 --- a/src/arch/aarch64/exception.c +++ b/src/arch/aarch64/exception.c @@ -46,9 +46,13 @@ static void print_regs(uint64_t *regs) { int i; - for (i = 0; i < 31; i+=2) { - printk(BIOS_ERR, "X%02d = 0x%016llx ", i, regs[i]); - printk(BIOS_ERR, "X%02d = 0x%016llx\n", i + 1, regs[i + 1]); + /* ELR contains the restart PC at target exception level */ + printk(BIOS_ERR, "ELR = 0x%016llx ", regs[0]); + printk(BIOS_ERR, "X00 = 0x%016llx\n", regs[1]); + + for (i = 2; i < 31; i+=2) { + printk(BIOS_ERR, "X%02d = 0x%016llx ", i - 1, regs[i]); + printk(BIOS_ERR, "X%02d = 0x%016llx\n", i, regs[i + 1]); } } @@ -121,5 +125,5 @@ void exception_init(void) extern uint32_t exception_table[]; set_vbar((uintptr_t)exception_table); - printk(0, "Exception handlers installed.\n"); + printk(BIOS_DEBUG, "Exception handlers installed.\n"); }