Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
xv6-public
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
问题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
银宸时代
OS Lab Group
奖励实验
xv6-public
提交
cb83c716
提交
cb83c716
6月 13, 2006
创建
作者:
rtm
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix some trap bugs
上级
84eb544b
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
26 行增加
和
6 行删除
+26
-6
Notes
Notes
+6
-0
main.c
main.c
+10
-2
trap.c
trap.c
+9
-3
vectors.pl
vectors.pl
+1
-1
没有找到文件。
Notes
浏览文件 @
cb83c716
...
...
@@ -73,3 +73,9 @@ setupsegs() may modify current segment table, is that legal?
trap() ought to lgdt on return, since currently only done in swtch()
protect hardware interrupt vectors from user INT instructions?
i'm getting a curious interrupt when jumping into user space. maybe
it's IRQ 0, but it comes at a weird and changing vector (e.g. 119) if
you don't initialize the PIC. why doesn't jos see this? if i
initialize the PIC with IRQ_OFFSET 32, the interrupt arrives at vector
32.
main.c
浏览文件 @
cb83c716
...
...
@@ -5,13 +5,21 @@
#include "defs.h"
#include "x86.h"
char
junk1
[
20000
];
char
junk2
[
20000
]
=
{
1
};
extern
char
edata
[],
end
[];
main
()
{
struct
proc
*
p
;
// clear BSS
memset
(
edata
,
0
,
end
-
edata
);
// partially initizialize PIC
outb
(
0x20
+
1
,
0xFF
);
// IO_PIC1
outb
(
0xA0
+
1
,
0xFF
);
// IO_PIC2
outb
(
0x20
,
0x11
);
outb
(
0x20
+
1
,
32
);
cprintf
(
"
\n
xV6
\n\n
"
);
kinit
();
// physical memory allocator
...
...
trap.c
浏览文件 @
cb83c716
...
...
@@ -12,11 +12,15 @@ extern unsigned vectors[]; /* vectors.S, array of 256 entry point addresses */
extern
void
trapenter
();
extern
void
trapenter1
();
int
xx
;
void
tinit
()
{
int
i
;
xx
=
0
;
for
(
i
=
0
;
i
<
256
;
i
++
){
SETGATE
(
idt
[
i
],
1
,
SEG_KCODE
<<
3
,
vectors
[
i
],
3
);
}
...
...
@@ -27,8 +31,10 @@ void
trap
(
struct
Trapframe
*
tf
)
{
/* which process are we running? */
cprintf
(
"trap %d tf %x
\n
"
,
tf
->
tf_trapno
,
tf
);
while
(
1
)
;
if
(
xx
<
10
)
cprintf
(
"%d
\n
"
,
tf
->
tf_trapno
);
xx
++
;
//while(1)
//;
// XXX probably ought to lgdt on trap return
}
vectors.pl
浏览文件 @
cb83c716
...
...
@@ -14,7 +14,7 @@ for(my $i = 0; $i < 256; $i++){
if
((
$i
<
8
||
$i
>
14
)
&&
$i
!=
17
){
print
"\tpushl \$0\n"
;
}
print
"\tpushl $i\n"
;
print
"\tpushl
\$
$i\n"
;
print
"\tjmp alltraps\n"
;
}
print
".data\n"
;
...
...
编写
预览
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论