mirror of
https://github.com/isometimes/rpi4-osdev
synced 2024-11-09 20:00:40 +00:00
Updated part14 to reflect changes to part13
This commit is contained in:
parent
31bb21b323
commit
71c3b30bd0
4 changed files with 8 additions and 1 deletions
|
@ -11,7 +11,7 @@ void disable_interrupt_controller() {
|
||||||
void handle_irq() {
|
void handle_irq() {
|
||||||
unsigned int irq = REGS_IRQ->irq0_pending_0;
|
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) {
|
if (irq & SYS_TIMER_IRQ_1) {
|
||||||
irq &= ~SYS_TIMER_IRQ_1;
|
irq &= ~SYS_TIMER_IRQ_1;
|
||||||
|
|
||||||
|
|
|
@ -147,6 +147,7 @@ void main(void)
|
||||||
|
|
||||||
irq_init_vectors();
|
irq_init_vectors();
|
||||||
enable_interrupt_controller();
|
enable_interrupt_controller();
|
||||||
|
irq_barrier();
|
||||||
irq_enable();
|
irq_enable();
|
||||||
timer_init();
|
timer_init();
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,7 @@ enum vc_irqs {
|
||||||
|
|
||||||
void irq_init_vectors();
|
void irq_init_vectors();
|
||||||
void irq_enable();
|
void irq_enable();
|
||||||
|
void irq_barrier();
|
||||||
void irq_disable();
|
void irq_disable();
|
||||||
void enable_interrupt_controller();
|
void enable_interrupt_controller();
|
||||||
void disable_interrupt_controller();
|
void disable_interrupt_controller();
|
||||||
|
|
|
@ -13,3 +13,8 @@ irq_enable:
|
||||||
irq_disable:
|
irq_disable:
|
||||||
msr daifset, #2
|
msr daifset, #2
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
.globl irq_barrier
|
||||||
|
irq_barrier:
|
||||||
|
dsb sy
|
||||||
|
ret
|
||||||
|
|
Loading…
Reference in a new issue