Remove magic numbers. Also, no code segment - not needed.

This commit is contained in:
2017-11-14 16:26:11 +01:00
parent dd7636e906
commit 5ddf0173c2
6 changed files with 60 additions and 39 deletions

View File

@@ -1,8 +1,9 @@
#include <x86_64/memory.h>
.intel_syntax noprefix
.section .bss
.align 0x1000
.skip 0x1000
.align PAGE_SIZE
.skip PAGE_SIZE
BootStack:
.byte 0
@@ -71,10 +72,6 @@ mov cr0, eax
lgdt [BootGDTp]
mov eax, 0x10
mov ss, eax
mov ds, eax
mov es, eax
.extern long_mode_start
jmp 0x8:long_mode_start
@@ -82,4 +79,11 @@ mov es, eax
.code64
long_mode_start:
mov eax, 0x0
mov ss, eax
mov ds, eax
mov es, eax
mov fs, eax
mov gs, eax
jmp $