提交 d7a33310 创建 作者: Nickolai Zeldovich's avatar Nickolai Zeldovich

remove T_SYSCALL altogether

上级 2992d6fe
......@@ -24,7 +24,6 @@
// These are arbitrarily chosen, but with care not to overlap
// processor defined exceptions or interrupt vectors.
#define T_SYSCALL 64 // system call
#define T_TLBFLUSH 65 // flush TLB
#define T_SAMPCONF 66 // configure event counters
#define T_DEFAULT 500 // catchall
......
......@@ -8,12 +8,12 @@ start:
movq $argv, %rsi
movq $init, %rdi
movq $SYS_exec, %rax
int $T_SYSCALL
syscall
# for(;;) exit();
exit:
movq $SYS_exit, %rax
int $T_SYSCALL
syscall
jmp exit
# char init[] = "/init\0";
......
......@@ -89,21 +89,6 @@ trap(struct trapframe *tf)
panic("NMI");
}
if(tf->trapno == T_SYSCALL){
sti();
if(myproc()->killed) {
mtstart(trap, myproc());
exit();
}
myproc()->tf = tf;
tf->rax = syscall(tf->rdi, tf->rsi, tf->rdx, tf->rcx, tf->r8, tf->rax);
if(myproc()->killed) {
mtstart(trap, myproc());
exit();
}
return;
}
#if MTRACE
if (myproc()->mtrace_stacks.curr >= 0)
mtpause(myproc());
......@@ -226,8 +211,6 @@ inittrap(void)
entry = trapentry[i];
idt[i] = INTDESC(KCSEG, entry, bits);
}
entry = trapentry[T_SYSCALL];
idt[T_SYSCALL] = INTDESC(KCSEG, entry, SEG_DPL(3) | SEG_INTR64 |INT_P);
}
void
......
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论