Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
X
xv6-public
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
问题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
银宸时代
OS Lab Group
奖励实验
xv6-public
提交
94496468
提交
94496468
8月 15, 2011
创建
作者:
Frans Kaashoek
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use 4Mbyte pages during boot
上级
843eecfc
全部展开
显示空白字符变更
内嵌
并排
正在显示
4 个修改的文件
包含
12 行增加
和
1 行删除
+12
-1
entry.S
entry.S
+5
-0
entryother.S
entryother.S
+5
-1
main.c
main.c
+0
-0
mmu.h
mmu.h
+2
-0
没有找到文件。
entry.S
浏览文件 @
94496468
...
@@ -39,6 +39,11 @@ multiboot_header:
...
@@ -39,6 +39,11 @@ multiboot_header:
# Multiboot entry point. Machine is mostly set up.
# Multiboot entry point. Machine is mostly set up.
.globl multiboot_entry
.globl multiboot_entry
multiboot_entry:
multiboot_entry:
# Turn on page size extension for 4Mbyte pages
movl %cr4, %eax
orl $(CR4_PSE), %eax
movl %eax, %cr4
# Set page directory
movl $(V2P_WO(bootpgdir)), %eax
movl $(V2P_WO(bootpgdir)), %eax
movl %eax, %cr3
movl %eax, %cr3
# Turn on paging.
# Turn on paging.
...
...
entryother.S
浏览文件 @
94496468
...
@@ -50,6 +50,10 @@ start32:
...
@@ -50,6 +50,10 @@ start32:
movw %ax, %fs
movw %ax, %fs
movw %ax, %gs
movw %ax, %gs
# Turn on page size extension for 4Mbyte pages
movl %cr4, %eax
orl $(CR4_PSE), %eax
movl %eax, %cr4
# Use bootpgdir as our initial page table
# Use bootpgdir as our initial page table
movl (start-12), %eax
movl (start-12), %eax
movl %eax, %cr3
movl %eax, %cr3
...
@@ -58,7 +62,7 @@ start32:
...
@@ -58,7 +62,7 @@ start32:
orl $(CR0_PE|CR0_PG|CR0_WP), %eax
orl $(CR0_PE|CR0_PG|CR0_WP), %eax
movl %eax, %cr0
movl %eax, %cr0
# Switch to the stack allocated by ent
ry
others()
# Switch to the stack allocated by ent
er
others()
movl (start-4), %esp
movl (start-4), %esp
# Call mpboot()
# Call mpboot()
call *(start-8)
call *(start-8)
...
...
main.c
浏览文件 @
94496468
差异被折叠。
点击展开。
mmu.h
浏览文件 @
94496468
...
@@ -37,6 +37,8 @@
...
@@ -37,6 +37,8 @@
#define CR0_CD 0x40000000 // Cache Disable
#define CR0_CD 0x40000000 // Cache Disable
#define CR0_PG 0x80000000 // Paging
#define CR0_PG 0x80000000 // Paging
#define CR4_PSE 0x00000010 // Page size extension
#define SEG_KCODE 1 // kernel code
#define SEG_KCODE 1 // kernel code
#define SEG_KDATA 2 // kernel data+stack
#define SEG_KDATA 2 // kernel data+stack
#define SEG_KCPU 3 // kernel per-cpu data
#define SEG_KCPU 3 // kernel per-cpu data
...
...
编写
预览
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论