aboutsummaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-01-23 12:59:27 -0700
committerChristian Cunningham <cc@localhost>2022-01-23 12:59:27 -0700
commit5bb02975ac5f541245af9b4f6c0be4ffaa2d8463 (patch)
tree6e101458a5d763cb3fd66d7dc0baeef409a81d47 /src/cpu
parentbb09366a7cafeb8ab91b55b98f15934f0f512d47 (diff)
Draw Exception info to screen
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/irq.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/src/cpu/irq.c b/src/cpu/irq.c
index 830c1ba..2697797 100644
--- a/src/cpu/irq.c
+++ b/src/cpu/irq.c
@@ -20,7 +20,17 @@ void c_irq_handler(void)
if(load32(IRQ_PENDING2) & (1 << 25)) {
if(load32(UART0_MIS) & (1<<4)) {
unsigned long data = load32(UART0_DR);
- // Ctrl+Tab to toggle timer
+ {
+ unsigned int x = g_Drawer.x;
+ unsigned int y = g_Drawer.y;
+ g_Drawer.x = 0;
+ g_Drawer.y = 14;
+ write_hex32(&g_Drawer, data);
+ g_Drawer.x = x;
+ g_Drawer.y = y;
+ }
+
+ // Ctrl+T to toggle timer
if(data == 0x14) {
unsigned long timer_status;
asm volatile("mrc p15, 0, %0, c14, c3, 1" : "=r"(timer_status));
@@ -40,6 +50,9 @@ void c_irq_handler(void)
}
g_Drawer.x = x;
g_Drawer.y = y;
+ // Ctrl+R to reset
+ } else if(data == 0x12) {
+ _start();
} else {
unsigned long off = cmdidx;
if (off < 2048) {
@@ -68,22 +81,11 @@ void c_irq_handler(void)
} else if (data == 0x61) {
cmd[off] = (char) data;
off += 1;
- //_start(); // Trigger reset
add_thread(localtest, 0, 0);
- //heap_info_u();
} else if (data == 0x62) {
cmd[off] = (char) data;
off += 1;
- //_start(); // Trigger reset
- uart_scheduler();
- //heap_info_u();
- } else if (data == 0x63) {
- cmd[off] = (char) data;
- off += 1;
- //_start(); // Trigger reset
- //uart_scheduler();
heap_info();
- //heap_info_u();
// Else output
} else {
cmd[off] = (char) data;
@@ -243,5 +245,4 @@ unsigned long c_fiq_handler(void)
void localtest(void)
{
- uart_char('.');
}