Skip to content

Commit de6d5b6

Browse files
author
Jiajie Chen
committed
Fix rv32 page table panic
1 parent 7a2383e commit de6d5b6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

kernel/src/arch/riscv32/paging.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,11 +176,11 @@ impl PageTableExt for PageTableImpl {
176176
let table = unsafe { &mut *(phys_to_virt(target) as *mut RvPageTable) };
177177
table.zero();
178178

179-
// MaybeUninit is not working
179+
// MaybeUninit is not working, dunno why
180180
PageTableImpl {
181181
page_table: TopLevelPageTable::new(table, PHYSICAL_MEMORY_OFFSET),
182182
root_frame: frame,
183-
entry: unsafe { core::mem::zeroed() },
183+
entry: unsafe { core::mem::uninitialized() },
184184
}
185185
}
186186

0 commit comments

Comments
 (0)