1
0
Fork 0
forked from len0rd/rockbox

Correct handling of unhandled exceptions for coldfire

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5376 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Linus Nielsen Feltzing 2004-11-02 22:24:30 +00:00
parent b2ffaa9d91
commit a062b4a22c

View file

@ -19,6 +19,8 @@
#include <stdio.h>
#include "config.h"
#include <stdbool.h>
#include "lcd.h"
#include "font.h"
#if CONFIG_CPU == MCF5249
@ -140,11 +142,23 @@ 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"