kv2: add paging
this also fixes up a bunch of formatting, adding the type vaddr_t Signed-off-by: Michael Shaw <spencershawiscool@gmail.com>
This commit is contained in:
parent
27a7f3de75
commit
d6873d6c7a
18 changed files with 130 additions and 66 deletions
|
|
@ -8,13 +8,13 @@
|
|||
|
||||
void pgd_load(pgd_t *pgd)
|
||||
{
|
||||
uintptr_t i = (uintptr_t)pgd;
|
||||
vaddr_t i = (vaddr_t)pgd;
|
||||
|
||||
cr3_write(TO_PHYS(i));
|
||||
}
|
||||
|
||||
pgd_t *pgd_get()
|
||||
{
|
||||
uintptr_t ret = cr3_read() | hhdm_start;
|
||||
vaddr_t ret = cr3_read() | hhdm_start;
|
||||
return (void *)ret;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue