git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
refactor: restructure the user space stuff.
[lunaix-os.git]
/
lunaix-os
/
arch
/
x86
/
boot.S
diff --git
a/lunaix-os/arch/x86/boot.S
b/lunaix-os/arch/x86/boot.S
index 938db876514333b8a8f0dec1b1d598590b51f80d..d1d14ba7e8af8ded3708aab9aa81fb330d65f62a 100644
(file)
--- a/
lunaix-os/arch/x86/boot.S
+++ b/
lunaix-os/arch/x86/boot.S
@@
-18,8
+18,8
@@
/* 根据System V ABI,栈地址必须16字节对齐 */
/* 这里只是一个临时栈,在_hhk_init里面我们会初始化内核专用栈 */
stack_bottom:
/* 根据System V ABI,栈地址必须16字节对齐 */
/* 这里只是一个临时栈,在_hhk_init里面我们会初始化内核专用栈 */
stack_bottom:
- .skip
16318 * 2
, 0
- stack_top:
+ .skip
4096
, 0
+
__
stack_top:
/*
/*
@@
-44,7
+44,7
@@
cld
# 确保屏蔽所有外中断,直到我们准备好PIC为止
cli
cld
# 确保屏蔽所有外中断,直到我们准备好PIC为止
cli
- movl $stack_top, %esp
+ movl $
__
stack_top, %esp
subl $16, %esp
subl $16, %esp
@@
-78,7
+78,7
@@
movl %eax, %cr3
movl %cr0, %eax
movl %eax, %cr3
movl %cr0, %eax
- orl $0x800
10000, %eax /* 开启分页与地址转换 (CR0.PG=1, CR0.WP=1
) */
+ orl $0x800
00000, %eax /* 开启分页与地址转换 (CR0.PG=1, CR0.WP=0
) */
andl $0xfffffffb, %eax
orl $0x2, %eax /* 启用x87 FPU (CR0.MP=1, CR0.EM=0) */
movl %eax, %cr0
andl $0xfffffffb, %eax
orl $0x2, %eax /* 启用x87 FPU (CR0.MP=1, CR0.EM=0) */
movl %eax, %cr0