diff options
Diffstat (limited to 'src/boot.s')
| -rw-r--r-- | src/boot.s | 22 |
1 files changed, 17 insertions, 5 deletions
@@ -9,7 +9,15 @@ .long MAGIC .long FLAGS .long CHECKSUM - + +.global _start +.global load_gdt + +load_gdt: + movl 4(%esp), %edx + lgdt (%edx) + ret + .section .bss .align 16 stack_bottom: @@ -17,15 +25,19 @@ stack_bottom: stack_top: .section .text -.global _start .type _start, @function _start: + call init_gdt_table + mov 0x10, %ax + mov %ds, %ax + mov %es, %ax + mov %fs, %ax + mov %gs, %ax + mov %ss, %ax mov $stack_top, %esp - + cli call _init call kernel_main - - cli 1: hlt jmp 1b |
