]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - arch/arm/lib/interrupts.c
arm: print unrelocated PC value for easier reference to object code
[karo-tx-uboot.git] / arch / arm / lib / interrupts.c
index 74ff5ce1c442564303ae09944f543517e5f3ce6e..787dceb93d0841ea8b407777eefb60ee64405f30 100644 (file)
  * (C) Copyright 2004
  * Philippe Robin, ARM Ltd. <philippe.robin@arm.com>
  *
- * See file CREDITS for list of people who contributed to this
- * project.
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License as
- * published by the Free Software Foundation; either version 2 of
- * the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.         See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- * MA 02111-1307 USA
+ * SPDX-License-Identifier:    GPL-2.0+ 
  */
 
 #include <common.h>
@@ -123,11 +107,12 @@ void show_regs (struct pt_regs *regs)
        "UK12_32",      "UK13_32",      "UK14_32",      "SYS_32",
        };
 
-       flags = condition_codes (regs);
+       flags = condition_codes(regs);
 
-       printf ("pc : [<%08lx>]    lr : [<%08lx>]\n"
+       printf ("pc : [<%08lx>] (pre-reloc: [<%08lx>]) lr : [<%08lx>]\n"
                "sp : %08lx  ip : %08lx  fp : %08lx\n",
-               instruction_pointer (regs),
+               instruction_pointer(regs),
+               instruction_pointer(regs) - gd->reloc_off,
                regs->ARM_lr, 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);
@@ -169,7 +154,14 @@ void do_prefetch_abort (struct pt_regs *pt_regs)
 
 void do_data_abort (struct pt_regs *pt_regs)
 {
-       printf ("data abort\n");
+       unsigned long fsr;
+
+       /* Read Fault Status Register */
+       asm volatile ("mrc p15, 0, %0, c5, c0, 0" : "=r"(fsr));
+
+       printf ("data abort\n\n");
+       if (fsr & 1)
+               printf ("MAYBE you should read doc/README.arm-unaligned-accesses\n\n");
        show_regs (pt_regs);
        bad_mode ();
 }