HELLO: Zero out page tables after allocating, before using
This commit is contained in:
parent
05cc2da2e3
commit
3e25ab6ae4
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user