| * (C) Copyright 2007 Michal Simek |
| * Michal SIMEK <monstr@monstr.eu> |
| * SPDX-License-Identifier: GPL-2.0+ |
| void _hw_exception_handler (void) |
| /* loading address of exception EAR */ |
| /* loading excetpion state register ESR */ |
| printf ("Hardware exception at 0x%x address\n", address); |
| switch (state & 0x1f) { /* mask on exception cause */ |
| puts ("Unaligned data access exception\n"); |
| puts ("Illegal op-code exception\n"); |
| puts ("Instruction bus error exception\n"); |
| puts ("Data bus error exception\n"); |
| puts ("Divide by zero exception\n"); |
| puts ("Exception in delay slot\n"); |
| puts ("Undefined cause\n"); |
| printf ("Unaligned %sword access\n", ((state & 0x800) ? "" : "half")); |
| printf ("Unaligned %s access\n", ((state & 0x400) ? "store" : "load")); |
| printf ("Register R%x\n", (state & 0x3E) >> 5); |
| #ifdef CONFIG_SYS_USR_EXCEP |
| void _exception_handler (void) |
| puts ("User vector_exception\n"); |