mirror of
https://github.com/sgmarz/osblog.git
synced 2024-11-23 18:06:20 +04:00
Fixed typos, updates.
This commit is contained in:
parent
6cbf12ada9
commit
f13948d5c0
@ -358,7 +358,7 @@ extern "C" fn kmain() {
|
||||
mtimecmp.write_volatile(mtime.read_volatile() + 10_000_000);
|
||||
|
||||
// Let's cause a page fault and see what happens. This should trap
|
||||
// to s_trap under trap.rs
|
||||
// to m_trap under trap.rs
|
||||
let v = 0x0 as *mut u64;
|
||||
v.write_volatile(0);
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ extern "C" fn m_trap(epc: usize,
|
||||
match cause_num {
|
||||
3 => {
|
||||
// Machine software
|
||||
println!("Machine software interrupt CPU#{}", hart);
|
||||
},
|
||||
7 => unsafe {
|
||||
// Machine timer
|
||||
@ -45,6 +46,7 @@ extern "C" fn m_trap(epc: usize,
|
||||
},
|
||||
11 => {
|
||||
// Machine external (interrupt from Platform Interrupt Controller (PLIC))
|
||||
println!("Machine external interrupt CPU#{}", hart);
|
||||
},
|
||||
_ => {
|
||||
panic!("Unhandled async trap CPU#{} -> {}\n", hart, cause_num);
|
||||
|
Loading…
Reference in New Issue
Block a user