summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2004-11-02 22:24:30 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2004-11-02 22:24:30 +0000
commita062b4a22c4d88d7b0b87f9dc1fc07f848f68b00 (patch)
treeeced6316d851116e67eb8edadf2086bd9a4f6639
parentb2ffaa9d91afa5c73641b4d6cfc0401fdf655d57 (diff)
downloadrockbox-a062b4a22c4d88d7b0b87f9dc1fc07f848f68b00.tar.gz
rockbox-a062b4a22c4d88d7b0b87f9dc1fc07f848f68b00.zip
Correct handling of unhandled exceptions for coldfire
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5376 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/system.c22
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 @@
19#include <stdio.h> 19#include <stdio.h>
20#include "config.h" 20#include "config.h"
21#include <stdbool.h> 21#include <stdbool.h>
22#include "lcd.h"
23#include "font.h"
22 24
23#if CONFIG_CPU == MCF5249 25#if CONFIG_CPU == MCF5249
24 26
@@ -140,12 +142,24 @@ void UIE (void) /* Unexpected Interrupt or Exception */
140{ 142{
141 unsigned int format_vector, pc; 143 unsigned int format_vector, pc;
142 int vector; 144 int vector;
145 char str[32];
143 146
144 asm volatile ("move.l (0,%%sp),%0": "=r"(format_vector)); 147 asm volatile ("move.l (52,%%sp),%0": "=r"(format_vector));
145 asm volatile ("move.l (4,%%sp),%0": "=r"(pc)); 148 asm volatile ("move.l (56,%%sp),%0": "=r"(pc));
146 149
147 vector = (format_vector >> 16) & 0xff; 150 vector = (format_vector >> 18) & 0xff;
148 151
152 /* clear screen */
153 lcd_clear_display ();
154#ifdef HAVE_LCD_BITMAP
155 lcd_setfont(FONT_SYSFIXED);
156#endif
157 snprintf(str,sizeof(str),"I%02x:%s",vector,irqname[vector]);
158 lcd_puts(0,0,str);
159 snprintf(str,sizeof(str),"at %08x",pc);
160 lcd_puts(0,1,str);
161 lcd_update();
162
149 while (1) 163 while (1)
150 { 164 {
151 } 165 }
@@ -193,8 +207,6 @@ void system_init(void)
193} 207}
194 208
195#elif CONFIG_CPU == SH7034 209#elif CONFIG_CPU == SH7034
196#include "lcd.h"
197#include "font.h"
198#include "led.h" 210#include "led.h"
199#include "system.h" 211#include "system.h"
200#include "rolo.h" 212#include "rolo.h"