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,4 +1,5 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#include <kernel/mem.h>
|
||||
#include <kernel/acpi.h>
|
||||
#include <dev/apic.h>
|
||||
|
||||
|
|
@ -19,7 +20,7 @@ void rsdt_print(struct rsdt *rsdt)
|
|||
|
||||
for (int i = 0; i < num_sdt; i++) {
|
||||
/* 2 steps silences warning */
|
||||
uint64_t sdt_addr = (uint64_t)rsdt->sdt[i];
|
||||
uint64_t sdt_addr = (uint64_t)rsdt->sdt[i] | hhdm_start;
|
||||
struct acpi_sdt_header *h = (struct acpi_sdt_header *)sdt_addr;
|
||||
|
||||
if (!(memcmp(h->signature, "APIC", 4))) {
|
||||
|
|
@ -37,7 +38,7 @@ void acpi_init()
|
|||
rsdp = (struct rsdp *)rsdp_req.response->address;
|
||||
|
||||
/* 2 steps silences warning */
|
||||
uint64_t rsdt_addr = (uint64_t)rsdp->rsdt_addr;
|
||||
uint64_t rsdt_addr = (uint64_t)rsdp->rsdt_addr | hhdm_start;
|
||||
struct rsdt *rsdt = (struct rsdt *)rsdt_addr;
|
||||
rsdt_print(rsdt);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue