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
10
init/main.c
10
init/main.c
|
|
@ -8,6 +8,7 @@
|
|||
#include <kernel/pio.h>
|
||||
|
||||
#include <dev/pic.h>
|
||||
#include <dev/apic.h>
|
||||
#include <dev/console.h>
|
||||
#include <dev/serial.h>
|
||||
|
||||
|
|
@ -15,8 +16,6 @@
|
|||
|
||||
#define KSTACK_SIZE 0x4000
|
||||
|
||||
void stack_init(uintptr_t rsp, uintptr_t rbp);
|
||||
|
||||
struct limine_hhdm_request hhdm_req = { .id = LIMINE_HHDM_REQUEST, .revision = 0 };
|
||||
|
||||
uintptr_t hhdm_start;
|
||||
|
|
@ -24,6 +23,8 @@ uintptr_t data_end;
|
|||
uintptr_t bss_start;
|
||||
uintptr_t bss_end;
|
||||
|
||||
void stack_init(uintptr_t rsp, uintptr_t rbp);
|
||||
|
||||
void yield()
|
||||
{
|
||||
for (;;) {
|
||||
|
|
@ -63,7 +64,10 @@ void kmain(void)
|
|||
mem_early_init(kmem, one_gb);
|
||||
kmalloc_init();
|
||||
|
||||
_pic_init();
|
||||
cli();
|
||||
acpi_init();
|
||||
apic_init();
|
||||
sti();
|
||||
|
||||
printf("\n# ");
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue