Updated part14 to reflect changes to part13

This commit is contained in:
babbleberry 2024-02-06 12:22:54 +00:00
parent 31bb21b323
commit 71c3b30bd0
4 changed files with 8 additions and 1 deletions

View file

@ -11,7 +11,7 @@ void disable_interrupt_controller() {
void handle_irq() {
unsigned int irq = REGS_IRQ->irq0_pending_0;
while(irq) {
while(irq & (SYS_TIMER_IRQ_1 | SYS_TIMER_IRQ_3)) {
if (irq & SYS_TIMER_IRQ_1) {
irq &= ~SYS_TIMER_IRQ_1;

View file

@ -147,6 +147,7 @@ void main(void)
irq_init_vectors();
enable_interrupt_controller();
irq_barrier();
irq_enable();
timer_init();

View file

@ -38,6 +38,7 @@ enum vc_irqs {
void irq_init_vectors();
void irq_enable();
void irq_barrier();
void irq_disable();
void enable_interrupt_controller();
void disable_interrupt_controller();

View file

@ -13,3 +13,8 @@ irq_enable:
irq_disable:
msr daifset, #2
ret
.globl irq_barrier
irq_barrier:
dsb sy
ret