mirror of
https://github.com/sgmarz/osblog.git
synced 2024-11-23 18:06:20 +04:00
Fixed mapping kernel stack
This commit is contained in:
parent
ce0cc7df11
commit
7e3d97b908
@ -264,7 +264,7 @@ extern "C" fn kinit() {
|
||||
id_map_range(
|
||||
&mut root,
|
||||
cpu::KERNEL_TRAP_FRAME[0].trap_stack.sub(page::PAGE_SIZE) as usize,
|
||||
cpu::KERNEL_TRAP_FRAME[0].trap_stack as usize + 1,
|
||||
cpu::KERNEL_TRAP_FRAME[0].trap_stack as usize,
|
||||
page::EntryBits::ReadWrite.val(),
|
||||
);
|
||||
id_map_range(
|
||||
@ -273,7 +273,7 @@ extern "C" fn kinit() {
|
||||
cpu::mscratch_read() + core::mem::size_of::<cpu::KernelTrapFrame>(),
|
||||
page::EntryBits::ReadWrite.val(),
|
||||
);
|
||||
let p = cpu::KERNEL_TRAP_FRAME[0].trap_stack as usize;
|
||||
let p = cpu::KERNEL_TRAP_FRAME[0].trap_stack as usize - 1;
|
||||
let m = page::virt_to_phys(&root, p).unwrap_or(0);
|
||||
println!("Walk 0x{:x} = 0x{:x}", p, m);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user