X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/cd09c4b222e4ddf45a42522563ae2471a829d1c8..fef29e9e993e62f025d8cbfeb6b8d51588083b7e:/lunaix-os/arch/x86/boot.S diff --git a/lunaix-os/arch/x86/boot.S b/lunaix-os/arch/x86/boot.S index bc1eec2..8ba78cc 100644 --- a/lunaix-os/arch/x86/boot.S +++ b/lunaix-os/arch/x86/boot.S @@ -18,7 +18,7 @@ /* 根据System V ABI,栈地址必须16字节对齐 */ /* 这里只是一个临时栈,在_hhk_init里面我们会初始化内核专用栈 */ stack_bottom: - .skip 16318, 0 + .skip 16318 * 2, 0 stack_top: @@ -41,6 +41,9 @@ * linker more knowledge about the label */ start_: + cld + # 确保屏蔽所有外中断,直到我们准备好PIC为止 + cli movl $stack_top, %esp subl $16, %esp @@ -57,9 +60,7 @@ /* _hhk_init用来初始化我们高半核: - 1. 设置GDT表 - 2. 设置IDT表(暂时,以后会拿到 kernel_init 里面) - 3. 初始化最简单的PTD与PT(重新映射我们的内核至3GiB处,以及对相应的地方进行Identity Map) + 1. 初始化最简单的PD与PT(重新映射我们的内核至3GiB处,以及对相应的地方进行Identity Map) */ movl $(KPG_SIZE), 4(%esp)