Skip to content

Commit

Permalink
Updated part14 to reflect changes to part13
Browse files Browse the repository at this point in the history
  • Loading branch information
babbleberry committed Feb 6, 2024
1 parent 31bb21b commit 71c3b30
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion part14-spi-ethernet/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
1 change: 1 addition & 0 deletions part14-spi-ethernet/kernel/kernel.c
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ void main(void)

irq_init_vectors();
enable_interrupt_controller();
irq_barrier();
irq_enable();
timer_init();

Expand Down
1 change: 1 addition & 0 deletions part14-spi-ethernet/kernel/kernel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
5 changes: 5 additions & 0 deletions part14-spi-ethernet/kernel/utils.S
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ irq_enable:
irq_disable:
msr daifset, #2
ret

.globl irq_barrier
irq_barrier:
dsb sy
ret

0 comments on commit 71c3b30

Please sign in to comment.