Remove magic numbers. Also, no code segment - not needed.
This commit is contained in:
@@ -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 $
|
||||
|
||||
Reference in New Issue
Block a user