diff options
Diffstat (limited to 'asm/start.s')
| -rw-r--r-- | asm/start.s | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/asm/start.s b/asm/start.s index bb12a7c..1d881b4 100644 --- a/asm/start.s +++ b/asm/start.s @@ -1,7 +1,9 @@ -# https://www.gnu.org/software/grub/manual/multiboot/multiboot.html#Boot-information-format -# http://wiki.osdev.org/Bare_Bones +.global _start +.global _start_smp +.global stack_top +.global stack_bottom -# Fill Multiboot Haeder, init stack and call kernel_main passing to params: +# Fill Multiboot Haeder, init stack and call kernel_main passing two params: # eax - magic number # ebx - multiboot structure @@ -16,7 +18,9 @@ # entry point for application processors at 0x7000 .section .smp .code16 -call smp_go # TODO: align later before going C +_start_smp: +jmp . +//call smp_go # TODO: align later before going C # Declare a header as in the Multiboot Standard. We put this into a special # section so we can force the header to be in the start of the final program. @@ -56,12 +60,8 @@ stack_top: # 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 _start -.global stack_top -.global stack_bottom -.type _start, @function -_start: +_start: # To set up a stack, we simply set the esp register to point to the top of # our stack (as it grows downwards). @@ -73,10 +73,11 @@ _start: call kernel_main - # should never be reached - + # turn off interrupts and halt. + # this should never be reached cli hlt + .Lhang: jmp .Lhang |
