diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2004-11-02 22:24:30 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2004-11-02 22:24:30 +0000 |
commit | a062b4a22c4d88d7b0b87f9dc1fc07f848f68b00 (patch) | |
tree | eced6316d851116e67eb8edadf2086bd9a4f6639 /firmware/system.c | |
parent | b2ffaa9d91afa5c73641b4d6cfc0401fdf655d57 (diff) |
Correct handling of unhandled exceptions for coldfire
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5376 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/system.c')
-rw-r--r-- | firmware/system.c | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/firmware/system.c b/firmware/system.c index 543a86986f..0628eb64cb 100644 --- a/firmware/system.c +++ b/firmware/system.c @@ -19,6 +19,8 @@ #include <stdio.h> #include "config.h" #include <stdbool.h> +#include "lcd.h" +#include "font.h" #if CONFIG_CPU == MCF5249 @@ -140,12 +142,24 @@ void UIE (void) /* Unexpected Interrupt or Exception */ { unsigned int format_vector, pc; int vector; + char str[32]; - asm volatile ("move.l (0,%%sp),%0": "=r"(format_vector)); - asm volatile ("move.l (4,%%sp),%0": "=r"(pc)); + asm volatile ("move.l (52,%%sp),%0": "=r"(format_vector)); + asm volatile ("move.l (56,%%sp),%0": "=r"(pc)); - vector = (format_vector >> 16) & 0xff; + vector = (format_vector >> 18) & 0xff; + /* clear screen */ + lcd_clear_display (); +#ifdef HAVE_LCD_BITMAP + lcd_setfont(FONT_SYSFIXED); +#endif + snprintf(str,sizeof(str),"I%02x:%s",vector,irqname[vector]); + lcd_puts(0,0,str); + snprintf(str,sizeof(str),"at %08x",pc); + lcd_puts(0,1,str); + lcd_update(); + while (1) { } @@ -193,8 +207,6 @@ void system_init(void) } #elif CONFIG_CPU == SH7034 -#include "lcd.h" -#include "font.h" #include "led.h" #include "system.h" #include "rolo.h" |