v2 initial commit

This commit is contained in:
Michael Shaw 2026-04-11 11:35:31 -04:00
commit d2ef885e8d
118 changed files with 2420 additions and 9320 deletions

20
amd64/arch/page.c Normal file
View file

@ -0,0 +1,20 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <kernel/types.h>
#include <kernel/page.h>
#include <kernel/mem.h>
#include <arch/page.h>
#include "reg.h"
void pgd_load(pgd_t *pgd)
{
uintptr_t i = (uintptr_t)pgd;
cr3_write(TO_PHYS(i));
}
pgd_t *pgd_get()
{
uintptr_t ret = cr3_read() | hhdm_start;
return (void *)ret;
}