diff options
Diffstat (limited to 'boot')
| -rw-r--r-- | boot/boot.asm | 11 | 
1 files changed, 9 insertions, 2 deletions
| diff --git a/boot/boot.asm b/boot/boot.asm index eedde07..62f80f8 100644 --- a/boot/boot.asm +++ b/boot/boot.asm @@ -1,5 +1,7 @@  format ELF64 +extrn kmain +  PML4_TABLE = 0x1000  E820_MMAP  = 0xf000 @@ -9,7 +11,7 @@ include 'bios.inc'  include 'page.inc'  include 'segdesc.inc' -section '.text.boot' executable +section '.boot' executable writeable  org 0x7c00  use16 @@ -104,12 +106,17 @@ longmode:  	xor ecx, ecx  	xor edx, edx  	xor edi, edi +	xor esi, esi  	; put stack at top of addressable memory  	mov esp, 0x200000  	mov ebp, esp -	jmp 0x100000 +	; manually encoded 'jmp rel32', fasm throws an 'invalid use of symbol' +	; error when generating code for a jmp to an external symbol after +	; setting code origin with 'org' directive or a 'virtual at X' block. +	db 0xe9 +	dd kmain-$-4  align 4  dw 0 | 
