Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
xv6-public
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
问题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
银宸时代
OS Lab Group
奖励实验
xv6-public
提交
d7a33310
提交
d7a33310
4月 07, 2012
创建
作者:
Nickolai Zeldovich
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
remove T_SYSCALL altogether
上级
2992d6fe
隐藏空白字符变更
内嵌
并排
正在显示
3 个修改的文件
包含
2 行增加
和
20 行删除
+2
-20
traps.h
include/traps.h
+0
-1
initcode.S
kernel/initcode.S
+2
-2
trap.cc
kernel/trap.cc
+0
-17
没有找到文件。
include/traps.h
浏览文件 @
d7a33310
...
@@ -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
...
...
kernel/initcode.S
浏览文件 @
d7a33310
...
@@ -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";
...
...
kernel/trap.cc
浏览文件 @
d7a33310
...
@@ -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
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论