aboutsummaryrefslogtreecommitdiff
path: root/kernel/sys/core.c
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-03-24 16:44:51 -0700
committerChristian Cunningham <cc@localhost>2022-03-24 16:44:51 -0700
commit49bd4c133fc83de1cb1761ff089a2de03699d991 (patch)
tree1033663698e3651d0fdbc6773c6a3db8261ae3c3 /kernel/sys/core.c
parentbb6ddd5a82ab4f2afa253b6048a71504c64274bb (diff)
IRQ Subscription
Diffstat (limited to 'kernel/sys/core.c')
-rw-r--r--kernel/sys/core.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/kernel/sys/core.c b/kernel/sys/core.c
index d76b712..7f42d6e 100644
--- a/kernel/sys/core.c
+++ b/kernel/sys/core.c
@@ -10,6 +10,7 @@
#include <sys/core.h>
#include <sys/power.h>
#include <sys/schedule.h>
+#include <usr/main.h>
#include <util/mutex.h>
#include <util/status.h>
#include <util/time.h>
@@ -18,30 +19,30 @@
void sysinit(void)
{
// Initialize System Globals
- stimeh = *(unsigned long*)SYS_TIMER_CHI;
- stimel = *(unsigned long*)SYS_TIMER_CLO;
- *(unsigned long*) SYS_TIMER_C0 = 2000000 + stimeh; // 2 second trigger
+ //stimeh = *(unsigned long*)SYS_TIMER_CHI;
+ //stimel = *(unsigned long*)SYS_TIMER_CLO;
+ //*(unsigned long*) SYS_TIMER_C0 = 2000000 + stimeh; // 2 second trigger
uart_init();
///...
// Route GPU interrupts to Core 0
store32(0x00, GPU_INTERRUPTS_ROUTING);
- // Mask Overrun of UART0
- store32(1<<4, UART0_IMSC);
- // Enable UART GPU IRQ
- store32(1<<25, IRQ_ENABLE2);
- // Enable Timer
- //// Get the frequency
- cntfrq = read_cntfrq();
- // Clear cntv interrupt and set next 1 second timer
- write_cntv_tval(cntfrq);
- // Route timer to core0 fiq
- routing_core0cntv_to_core0fiq();
- // Enable timer
- enablecntv();
- // Enable system timer
- store32(SYS_TIMER_SC_M0, IRQ_ENABLE1);
+ //// Mask Overrun of UART0
+ //store32(1<<4, UART0_IMSC);
+ //// Enable UART GPU IRQ
+ //store32(1<<25, IRQ_ENABLE2);
+ //// Enable Timer
+ ////// Get the frequency
+ //cntfrq = read_cntfrq();
+ //// Clear cntv interrupt and set next 1 second timer
+ //write_cntv_tval(cntfrq);
+ //// Route timer to core0 fiq
+ //routing_core0cntv_to_core0fiq();
+ //// Enable timer
+ //enablecntv();
+ //// Enable system timer
+ //store32(SYS_TIMER_SC_M0, IRQ_ENABLE1);
// Graphics Initialize
lfb_init();
@@ -55,4 +56,5 @@ void sysinit(void)
// Start Scheduler
init_scheduler();
+ add_thread(main, 0, 0);
}