diff --git a/src/boot.S b/src/boot.S index 0c59b21..6e6228c 100644 --- a/src/boot.S +++ b/src/boot.S @@ -1,33 +1,10 @@ -/* -The linker script specifies _start as the entry point to the kernel and the -bootloader will jump to this position once the kernel has been loaded. It -doesn't make sense to return from this function as the bootloader is gone. -*/ -.section .text .global hos_start .type hos_start, @function hos_start: + /* Set stack pointer. */ mov $_stack_end, %esp - /* - This is a good place to initialize crucial processor state before the - high-level kernel is entered. It's best to minimize the early - environment where crucial features are offline. Note that the - processor is not fully initialized yet: Features such as floating - point instructions and instruction set extensions are not initialized - yet. The GDT should be loaded here. Paging should be enabled here. - C++ features such as global constructors and exceptions will require - runtime support to work as well. - */ - - /* - Enter the high-level kernel. The ABI requires the stack is 16-byte - aligned at the time of the call instruction (which afterwards pushes - the return pointer of size 4 bytes). The stack was originally 16-byte - aligned above and we've pushed a multiple of 16 bytes to the - stack since (pushed 0 bytes so far), so the alignment has thus been - preserved and the call is well defined. - */ + /* Jump to C. */ push $0 push $0 push $0