aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-01-20 14:57:26 -0700
committerChristian Cunningham <cc@localhost>2022-01-20 14:57:26 -0700
commit7e501bd9e881b9d3b9dadc483218dd877b0bb25d (patch)
treecbe736973c7f09ed298b546f9e6cbb2f7c57aa61 /src
parentfc3002f17b1e698cd73d57d000e1f28269980daa (diff)
Clear Globals on Init
Diffstat (limited to 'src')
-rw-r--r--src/sys/core.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/sys/core.c b/src/sys/core.c
index 5bf631f..0b4b91a 100644
--- a/src/sys/core.c
+++ b/src/sys/core.c
@@ -27,8 +27,16 @@ void testlocal(void);
// Initialize IRQs
void sysinit(void)
{
+ // Clear System Globals
+ *(unsigned long*)exe_cnt_m.addr = 0;
+ exe_cnt_m.pid = NULL_PID;
+ cmdidx = 0;
+ for(int i = 0; i < 2048; i++)
+ cmd[i] = 0;
+ ///...
+
// Route GPU interrupts to Core 0
- store32(0x04, GPU_INTERRUPTS_ROUTING);
+ store32(0x00, GPU_INTERRUPTS_ROUTING);
// Mask Overrun of UART0
store32(1<<4, UART0_IMSC);