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

remove T_SYSCALL altogether

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