mem: improve device memory mapping
MMIO ports will no longer directly map to HHDM addresses and will need to be searched for in the memory mapping tree
This commit is contained in:
parent
24e2610a6b
commit
4dc4f07dc6
10 changed files with 111 additions and 16 deletions
|
|
@ -45,11 +45,12 @@ static void rsdt_parse(struct rsdt *rsdt)
|
|||
|
||||
void acpi_init()
|
||||
{
|
||||
rsdp = (struct rsdp *)rsdp_req.response->address;
|
||||
rsdp_req.response->address = (void *)((uintptr_t)rsdp_req.response->address & ~(hhdm_start));
|
||||
rsdp = kmap_device(rsdp_req.response->address, 0x1000);
|
||||
|
||||
/* 2 steps silences warning */
|
||||
uintptr_t rsdt_addr = (uintptr_t)(rsdp->rsdt_addr | hhdm_start);
|
||||
struct rsdt *rsdt = (struct rsdt *)rsdt_addr;
|
||||
uintptr_t rsdt_addr = (uintptr_t)(rsdp->rsdt_addr & ~(hhdm_start));
|
||||
struct rsdt *rsdt = kmap_device((void *)rsdt_addr, 0x4000);
|
||||
rsdt_parse(rsdt);
|
||||
|
||||
#ifdef KDEBUG
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include <dev/serial.h>
|
||||
#include <dev/pci.h>
|
||||
#include <dev/ahci.h>
|
||||
#include <dev/apic.h>
|
||||
|
||||
#include <fs/vfs.h>
|
||||
|
||||
|
|
@ -149,6 +150,7 @@ void kmain_post_stack_init()
|
|||
vfs_init(root_path);
|
||||
|
||||
_pic_init();
|
||||
apic_init();
|
||||
|
||||
console_init();
|
||||
kprintf("\n\n# ");
|
||||
|
|
|
|||
Loading…
Reference in a new issue