HELLO: Zero out page tables after allocating, before using

This commit is contained in:
josh committed 2022-03-18 21:21:00 -04:00
1 parent 05cc2da2e3
commit 3e25ab6ae4
1 file changed
+4 -1
+4 -1
View File
@@ -4,6 +4,7 @@ import scratch;
import hulk.bootinfo;
import hos.page_table;
import hos.cpu;
import hos.memory;
__gshared EFI_SYSTEM_TABLE * st;
__gshared BootInfo bootinfo;
@@ -124,7 +125,9 @@ private bool get_memory_map()
private PageTableEntry * new_page_table()
{
return cast(PageTableEntry *)scratch_alloc(1u);
PageTableEntry * pt = cast(PageTableEntry *)scratch_alloc(1u);
memset64(pt, 0u, 512);
return pt;
}
private void map(ulong source_page, ulong dest_page, PageTableEntry * pt_base)