fix gcc warnings & improved makefile echos
[lunaix-os.git] / lunaix-os / kernel / asm / x86 / prologue.S
index 4e114e9c50153c1f8d1370aa05521a4129e615dd..0716b4898b76078ba2888be16882ced6d443d117 100644 (file)
         movl $mb_info, (%esp)
         call _kernel_init
 
+        /* 
+            加载新的栈指针,位于0xffbfffff,但因为16字节对齐的需求,低四位清零。
+            为什么不是0xffffffff? 因为0xffc00000 - 0xffffffff 这4MiB的空间用于
+            对页表与页目录的循环映射。
+        */
+        mov $0xffbffff0, %esp
+
+        call _kernel_post_init
+
+        subl $6, %esp
+
         # 加载 IDT
         movl $_idt, 2(%esp)
         movw _idt_limit, %ax
         movw %ax, (%esp)
         lidt (%esp)
 
-        /* 
-            加载新的栈指针,位于0xffbfffff,但因为16字节对齐的需求,低四位清零。
-            为什么不是0xffffffff? 因为0xffc00000 - 0xffffffff 这4MiB的空间用于
-            对页表与页目录的循环映射。
-        */
-        mov $0xffbffff0, %esp     
+        addl $6, %esp
 
         /* 进入内核 */  
         call _kernel_main