1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-22 16:16:16 +04:00

Fix rv32 page table panic

This commit is contained in:
Jiajie Chen 2019-06-30 16:54:18 +08:00
parent 7a2383eba6
commit de6d5b6d54

View File

@ -176,11 +176,11 @@ impl PageTableExt for PageTableImpl {
let table = unsafe { &mut *(phys_to_virt(target) as *mut RvPageTable) };
table.zero();
// MaybeUninit is not working
// MaybeUninit is not working, dunno why
PageTableImpl {
page_table: TopLevelPageTable::new(table, PHYSICAL_MEMORY_OFFSET),
root_frame: frame,
entry: unsafe { core::mem::zeroed() },
entry: unsafe { core::mem::uninitialized() },
}
}