irq: begin moving away from 8259
8259 PIC was used for interrupts for bootstrap development while the memory manager was being constructed. now that this is complete, a transition to the apic will begin this patch fixes memory mapping issues with the reserved regions that caused page faults before.
This commit is contained in:
parent
7bddf838fd
commit
22762339f9
6 changed files with 37 additions and 7 deletions
|
|
@ -1,5 +1,6 @@
|
|||
#include <kernel/acpi.h>
|
||||
#include <kernel/mem.h>
|
||||
#include <kernel/slab.h>
|
||||
#include <dev/apic.h>
|
||||
|
||||
#include <stdint.h>
|
||||
|
|
@ -81,7 +82,7 @@ int madt_parse_next_entry(int offset)
|
|||
printf(LOG_INFO "LAPIC ID: %xh\n", m_lapic->apic_id);
|
||||
break;
|
||||
case MADT_IOAPIC:
|
||||
ioapic_addr = m_ioapic->ioapic_addr;
|
||||
ioapic_addr = m_ioapic->ioapic_addr | hhdm_start;
|
||||
printf(LOG_INFO "IOAPIC address: %xh\n", m_ioapic->ioapic_addr);
|
||||
break;
|
||||
case MADT_IOAPIC_OVRD:
|
||||
|
|
@ -125,7 +126,7 @@ void apic_init()
|
|||
while ((offset = madt_parse_next_entry(offset)))
|
||||
;
|
||||
|
||||
lapic_addr = __madt->lapic_addr;
|
||||
lapic_addr = __madt->lapic_addr | hhdm_start;
|
||||
|
||||
printf(LOG_INFO "IOAPIC ADDR: %X\n", ioapic_addr);
|
||||
printf(LOG_INFO "LAPIC ADDR : %X\n", lapic_addr);
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
popq %rsi
|
||||
movq $\nr, %rdi
|
||||
call exception
|
||||
call yield
|
||||
iretq
|
||||
.endm
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue