diff options
| author | Aleksa Vučković <aleksav013@gmail.com> | 2021-10-09 02:34:21 +0200 |
|---|---|---|
| committer | Aleksa Vučković <aleksav013@gmail.com> | 2021-10-09 02:34:21 +0200 |
| commit | 3a9ccbd8e762477f75d8b164a1d99383a01414ae (patch) | |
| tree | 8088a02f8013bf5b73e078ac421a1cf6b93c4072 /src/boot.s | |
| parent | 1dd9c366b885725a3081726b05732a2b81a8e6c7 (diff) | |
Adding gdt
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 |
