b969104abdd5f2b2d37537b0d4a0550915a9df70
[lunaix-os.git] / lunaix-os / arch / x86 / boot / i386 / boot32.S
1 #define __ASM__
2
3 #if defined(CONFIG_X86_BL_MB) || defined(CONFIG_X86_BL_MB2)
4 #include "sys/boot/multiboot.S.inc"
5 #endif
6
7 .section .boot.bss
8     /* 根据System V ABI,栈地址必须16字节对齐 */
9     /* 这里只是一个临时栈,在_hhk_init里面我们会初始化内核专用栈 */
10     .align 16
11         .skip 256, 0
12     __boot_stack_top:
13
14 .section .boot.text
15     .global start_
16     .type start_, @function     /* Optional, this just give the 
17                                  * linker more knowledge about the label 
18                                  */
19     start_: 
20         cld
21         # 确保屏蔽所有外中断,直到我们准备好PIC为止
22         cli
23         movl $__boot_stack_top, %esp
24
25         subl $16, %esp
26
27         movl %ebx, (%esp)
28         call x86_init
29
30         addl $16, %esp
31
32         pushl $hhk_entry_
33         ret