summaryrefslogtreecommitdiff
path: root/firmware/system.c
diff options
context:
space:
mode:
authorThom Johansen <thomj@rockbox.org>2006-01-19 15:03:34 +0000
committerThom Johansen <thomj@rockbox.org>2006-01-19 15:03:34 +0000
commit127c3febc130c4f35ed7e66601a7a59a78fa97a9 (patch)
tree0b91345f83daf94759c642a7978bdd3f347a651a /firmware/system.c
parent4926682378ea22225675a4155a4fd3e5671f1a1c (diff)
downloadrockbox-127c3febc130c4f35ed7e66601a7a59a78fa97a9.tar.gz
rockbox-127c3febc130c4f35ed7e66601a7a59a78fa97a9.zip
UIE handler for ARM/iPod. Currently does not support interrupts. Will
probably also work for other ARM based targets, like iFP. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8388 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/system.c')
-rw-r--r--firmware/system.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/firmware/system.c b/firmware/system.c
index da15ee1122..81e6957c2b 100644
--- a/firmware/system.c
+++ b/firmware/system.c
@@ -1119,6 +1119,34 @@ void irq(void)
1119} 1119}
1120#endif 1120#endif
1121 1121
1122static const char* const uiename[] = {
1123 "Undefined instruction", "Prefetch abort", "Data abort"
1124};
1125
1126/* Unexpected Interrupt or Exception handler. Currently only deals with
1127 exceptions, but will deal with interrupts later.
1128 */
1129void UIE(unsigned int pc, unsigned int num)
1130{
1131 char str[32];
1132
1133 lcd_clear_display();
1134#ifdef HAVE_LCD_BITMAP
1135 lcd_setfont(FONT_SYSFIXED);
1136#endif
1137 lcd_puts(0, 0, uiename[num]);
1138 snprintf(str, sizeof(str), "at %08x", pc);
1139 lcd_puts(0, 1, str);
1140 lcd_update();
1141
1142 while (1)
1143 {
1144 /* TODO: perhaps add button handling in here when we get a polling
1145 driver some day.
1146 */
1147 }
1148}
1149
1122/* TODO: The following two function have been lifted straight from IPL, and 1150/* TODO: The following two function have been lifted straight from IPL, and
1123 hence have a lot of numeric addresses used straight. I'd like to use 1151 hence have a lot of numeric addresses used straight. I'd like to use
1124 #defines for these, but don't know what most of them are for or even what 1152 #defines for these, but don't know what most of them are for or even what