Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
xv6-public
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
问题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
银宸时代
OS Lab Group
奖励实验
xv6-public
提交
0441ba0f
提交
0441ba0f
10月 21, 2011
创建
作者:
Silas Boyd-Wickizer
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Switch from mcmodel=large to mcmodel=kernel.
上级
2a270e5c
显示空白字符变更
内嵌
并排
正在显示
5 个修改的文件
包含
10 行增加
和
8 行删除
+10
-8
Makefile
Makefile
+1
-1
boot.S
boot.S
+6
-5
kernel.h
kernel.h
+1
-0
kernel.ld
kernel.ld
+1
-1
vmx.h
vmx.h
+1
-1
没有找到文件。
Makefile
浏览文件 @
0441ba0f
...
...
@@ -18,7 +18,7 @@ LD = $(TOOLPREFIX)ld
OBJCOPY
=
$(TOOLPREFIX)
objcopy
OBJDUMP
=
$(TOOLPREFIX)
objdump
CFLAGS
=
-fno-pic
-static
-fno-builtin
-fno-strict-aliasing
-O2
-Wall
-MD
-ggdb
-m64
\
-Werror
-fms-extensions
-mno-sse
-Werror
-fms-extensions
-mno-sse
-mcmodel
=
kernel
CFLAGS
+=
$(
shell
$(CC)
-fno-stack-protector
-E
-x
c /dev/null
>
/dev/null 2>&1
&&
echo
-fno-stack-protector
)
ASFLAGS
=
-m64
-gdwarf-2
LDFLAGS
+=
-m
elf_x86_64
...
...
boot.S
浏览文件 @
0441ba0f
...
...
@@ -10,7 +10,7 @@
# ask the loader to load the kernel at physical 2MB and then set up the
# necessary memory mapping to switch to the higher address.
# The value of KBASE must match the definitions in vmx.h and kernel.ld.
#define KBASE 0x
ffffff0000000000 /* last T
B */
#define KBASE 0x
FFFFFFFF80000000 /* -2G
B */
# PADDR(x) is the physical memory address corresponding to x.
# Until we set up the memory map, fairly late in this file, we have to
...
...
@@ -270,15 +270,16 @@ colorbar:
.align 4096
pml4:
.quad PADDR(pdpt) + (1<<0) + (1<<1) // present, read/write
.quad 0
.space 4096 - 2*16
.space 4096 - 16
.quad PADDR(pdpt) + (1<<0) + (1<<1) // present, read/write
.quad 0
.align 4096
pdpt:
.quad PADDR(pdt) + (1<<0) + (1<<1) // present, read/write
.space 4096 - 8
.quad 0
.space 4096 - 2*16
.quad PADDR(pdt) + (1<<0) + (1<<1) // present, read/write
.quad 0
.align 4096
pdt:
...
...
kernel.h
0 → 100644
浏览文件 @
0441ba0f
#include "types.h"
kernel.ld
浏览文件 @
0441ba0f
...
...
@@ -4,7 +4,7 @@ ENTRY(xxx)
SECTIONS
{
. = 0xFFFFFF
000
0100000;
. = 0xFFFFFF
FF8
0100000;
PROVIDE(text = .);
.text : AT(0x100000) {
*(.text .stub .text.* .gnu.linkonce.t.*)
...
...
vmx.h
浏览文件 @
0441ba0f
...
...
@@ -32,7 +32,7 @@ void lidt(void*, int);
void
ltr
(
int
);
void
lgdt
(
void
*
,
int
);
#define KBASE 0x
ffffff000
0000000ull
#define KBASE 0x
FFFFFFFF8
0000000ull
#define KADDR(x) ((void*)(KBASE+(uintptr)(x)))
#define PADDR(x) ((uintptr)(x) - KBASE)
#define PGSIZE (2*1024*1024ull)
...
...
编写
预览
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论