diff --git a/part13-interrupts/kernel/kernel.c b/part13-interrupts/kernel/kernel.c index c134c5e..4c6d4a6 100644 --- a/part13-interrupts/kernel/kernel.c +++ b/part13-interrupts/kernel/kernel.c @@ -120,6 +120,7 @@ void main(void) irq_init_vectors(); enable_interrupt_controller(); + irq_barrier(); irq_enable(); timer_init(); diff --git a/part13-interrupts/kernel/kernel.h b/part13-interrupts/kernel/kernel.h index 0796c2a..a360da1 100644 --- a/part13-interrupts/kernel/kernel.h +++ b/part13-interrupts/kernel/kernel.h @@ -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(); diff --git a/part13-interrupts/kernel/utils.S b/part13-interrupts/kernel/utils.S index 6027c0d..7a34152 100644 --- a/part13-interrupts/kernel/utils.S +++ b/part13-interrupts/kernel/utils.S @@ -13,3 +13,8 @@ irq_enable: irq_disable: msr daifset, #2 ret + +.globl irq_barrier +irq_barrier: + dsb sy + ret