...
This commit is contained in:
@@ -39,20 +39,17 @@ section .data
|
||||
section .data
|
||||
align 8
|
||||
multiboot_info:
|
||||
dq 0
|
||||
dd 0
|
||||
multiboot_magic:
|
||||
dd 0
|
||||
|
||||
section .text
|
||||
bits 32
|
||||
_start:
|
||||
mov esp, stack_top
|
||||
|
||||
; Multiboot will place a magic value in eax
|
||||
; If this magic value is not present, then we might not have multiboot info in ebx,
|
||||
; therefore we throw an error
|
||||
cmp eax, 0x2BADB002
|
||||
jne error
|
||||
|
||||
; Save multiboot info pointer for later
|
||||
mov [multiboot_magic], eax
|
||||
mov [multiboot_info], ebx
|
||||
|
||||
; Check if cpuid is available by flipping bit 21
|
||||
@@ -150,7 +147,8 @@ section .text
|
||||
mov ss, ax
|
||||
|
||||
; Finally, we call in to c
|
||||
mov rdi, [multiboot_info]
|
||||
mov edi, [multiboot_magic]
|
||||
mov esi, [multiboot_info]
|
||||
call entry
|
||||
.hang:
|
||||
hlt
|
||||
|
||||
Reference in New Issue
Block a user