X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/965940833071025bf0d386f4a9c70a5258453dbd..69777bdcab284335651a8002e2896f3862fa423d:/lunaix-os/arch/i386/boot/prologue.S diff --git a/lunaix-os/arch/i386/boot/prologue.S b/lunaix-os/arch/i386/boot/prologue.S index ff77ef5..f8d59ce 100644 --- a/lunaix-os/arch/i386/boot/prologue.S +++ b/lunaix-os/arch/i386/boot/prologue.S @@ -3,12 +3,24 @@ #define __ASM__ #include +.section .bss + .align 16 + .skip 2048, 0 + __kinit_stack_top: + # TODO + # This stack was too small that corrupt the ambient kernel structures. + # (took me days to figure this out!) + # We should spent more time to implement a good strategy to detect such + # run-over (we can check these invariants when we trapped in some non-recoverable + # state and provide good feedback to user) + .section .text .global hhk_entry_ hhk_entry_: /* 欢迎来到虚拟内存的世界! :D */ + movl $__kinit_stack_top, %esp andl $stack_alignment, %esp subl $16, %esp /*