aboutsummaryrefslogtreecommitdiff
path: root/kernel/cpu
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2022-03-24 18:52:56 -0700
committerChristian Cunningham <cc@localhost>2022-03-24 18:52:56 -0700
commit7753da66d7d72f441dadd76f357fd5ceb50e7c8f (patch)
treec79cee644108ecb65952eff2104127a19e72d0c4 /kernel/cpu
parent78493b1d441ef888910cf958a16f260bc3c1a7bd (diff)
Modularize Userspace
Diffstat (limited to 'kernel/cpu')
-rw-r--r--kernel/cpu/irq.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/kernel/cpu/irq.c b/kernel/cpu/irq.c
index 0bc8221..ae29379 100644
--- a/kernel/cpu/irq.c
+++ b/kernel/cpu/irq.c
@@ -136,6 +136,10 @@ void subscribe_irq(unsigned long irq_num, void* handler, void* handler_info)
store32(SYS_TIMER_SC_M3, IRQ_ENABLE1);
*(volatile unsigned long*)SYS_TIMER_C3 = *(volatile unsigned long*)SYS_TIMER_CHI + *(unsigned long*)handler_info;
break;
+ case LOCAL_TIMER_IRQ:
+ store32(0x80, CORE0_TIMER_IRQCNTL);
+ sys0(SYS_ENABLE_CNTV);
+ break;
}
}
@@ -161,5 +165,9 @@ void unsubscribe_irq(unsigned long irq_num)
case SYS_TIMER_3_IRQ:
store32(SYS_TIMER_SC_M3, IRQ_DISABLE1);
break;
+ case LOCAL_TIMER_IRQ:
+ store32(0x00, CORE0_TIMER_IRQCNTL);
+ sys0(SYS_DISABLE_CNTV);
+ break;
}
}