Split TaskManager and Processor.

This commit is contained in:
Yifan Wu 2020-12-08 15:37:10 +08:00
parent e538b204ce
commit a9066d75e5
6 changed files with 175 additions and 132 deletions

View file

@ -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");
}