summaryrefslogtreecommitdiff
path: root/cpu/microblaze/exception.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2007-05-17 00:06:11 +0200
committerWolfgang Denk <wd@denx.de>2007-05-17 00:06:11 +0200
commit3a71b5ca775fc9cf506c12d91925019591446c7c (patch)
tree0eb875a5ed89145e1d73ce411b8e2705a53132bd /cpu/microblaze/exception.c
parent3162eb836903c8b247fdc7470dd39bfa6996f495 (diff)
parent70124c2602ae2d4c5d3dba05b482d91548242de8 (diff)
downloadu-boot-imx-3a71b5ca775fc9cf506c12d91925019591446c7c.zip
u-boot-imx-3a71b5ca775fc9cf506c12d91925019591446c7c.tar.gz
u-boot-imx-3a71b5ca775fc9cf506c12d91925019591446c7c.tar.bz2
Merge with /home/git/u-boot
Diffstat (limited to 'cpu/microblaze/exception.c')
-rw-r--r--cpu/microblaze/exception.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/cpu/microblaze/exception.c b/cpu/microblaze/exception.c
index b135acb..d76b05a 100644
--- a/cpu/microblaze/exception.c
+++ b/cpu/microblaze/exception.c
@@ -23,15 +23,16 @@
*/
#include <common.h>
+#include <asm/asm.h>
void _hw_exception_handler (void)
{
int address = 0;
int state = 0;
/* loading address of exception EAR */
- __asm__ __volatile ("mfs %0,rear"::"r" (address):"memory");
+ MFS (address, rear);
/* loading excetpion state register ESR */
- __asm__ __volatile ("mfs %0,resr"::"r" (state):"memory");
+ MFS (state, resr);
printf ("Hardware exception at 0x%x address\n", address);
switch (state & 0x1f) { /* mask on exception cause */
case 0x1:
@@ -49,6 +50,11 @@ void _hw_exception_handler (void)
case 0x5:
puts ("Divide by zero exception\n");
break;
+#ifdef MICROBLAZE_V5
+ case 0x1000:
+ puts ("Exception in delay slot\n");
+ break;
+#endif
default:
puts ("Undefined cause\n");
break;