diff options
Diffstat (limited to 'firmware/system.c')
-rw-r--r-- | firmware/system.c | 28 |
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 | ||
1122 | static 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 | */ | ||
1129 | void 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 |