If the pgdir in debug_print_pgdir is not set, assume rcr3() This is a convenience when using the monitor Signed-off-by: Ron Minnich <rminnich@gmail.com>
diff --git a/kern/arch/x86/pmap64.c b/kern/arch/x86/pmap64.c index 2fb1112..5b76771 100644 --- a/kern/arch/x86/pmap64.c +++ b/kern/arch/x86/pmap64.c
@@ -600,6 +600,8 @@ void debug_print_pgdir(kpte_t *pgdir) { + if (! pgdir) + pgdir = KADDR(rcr3()); printk("Printing the entire page table set for %p, DFS\n", pgdir); /* Need to be careful we avoid VPT/UVPT, o/w we'll recurse */ pml_for_each(pgdir, 0, UVPT, print_pte, 0);