From 7e501bd9e881b9d3b9dadc483218dd877b0bb25d Mon Sep 17 00:00:00 2001 From: Christian Cunningham Date: Thu, 20 Jan 2022 14:57:26 -0700 Subject: Clear Globals on Init --- src/sys/core.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.1