Split TaskManager and Processor.
This commit is contained in:
parent
e538b204ce
commit
a9066d75e5
6 changed files with 175 additions and 132 deletions
|
@ -83,6 +83,7 @@ pub fn trap_handler() -> ! {
|
|||
|
||||
#[no_mangle]
|
||||
pub fn trap_return() -> ! {
|
||||
//println!("into trap_return!");
|
||||
set_user_trap_entry();
|
||||
let trap_cx_ptr = TRAP_CONTEXT;
|
||||
let user_satp = current_user_token();
|
||||
|
@ -91,6 +92,7 @@ pub fn trap_return() -> ! {
|
|||
fn __restore();
|
||||
}
|
||||
let restore_va = __restore as usize - __alltraps as usize + TRAMPOLINE;
|
||||
//println!("before jr!");
|
||||
unsafe {
|
||||
llvm_asm!("jr $0" :: "r"(restore_va), "{a0}"(trap_cx_ptr), "{a1}"(user_satp) :: "volatile");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue