mem: add page entry type
This commit is contained in:
parent
01a2dde3cb
commit
2b9d76d015
7 changed files with 100 additions and 9 deletions
26
mem/pfa.c
Normal file
26
mem/pfa.c
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
#include <kernel/common.h>
|
||||
#include <kernel/mem.h>
|
||||
|
||||
#include <dev/apic.h>
|
||||
#include <limine/limine.h>
|
||||
|
||||
struct page pml4[512] ALIGN(0x1000);
|
||||
struct page pdpt[512] ALIGN(0x1000);
|
||||
struct page pdt[512] ALIGN(0x1000);
|
||||
struct page pt[512] ALIGN(0x1000);
|
||||
|
||||
static void pfa_gen_tables()
|
||||
{
|
||||
}
|
||||
|
||||
void pfa_init()
|
||||
{
|
||||
uintptr_t pml4_t = (cr3_get() & 0xFFFFFFFFFFFFF000);
|
||||
pml4_t += HHDM_START;
|
||||
|
||||
uint64_t *pml4 = (uint64_t *)pml4_t;
|
||||
|
||||
printf(LOG_WARN "PML4 Entry 0: %Xh\n", *pml4);
|
||||
printf(LOG_INFO "PML4 ADDRESS: %Xh\n", pml4);
|
||||
}
|
||||
Loading…
Reference in a new issue