diff --git a/src/boot.s b/src/boot.s index 3eeb36c..24b0979 100644 --- a/src/boot.s +++ b/src/boot.s @@ -1,16 +1,27 @@ # Declare constants for the multiboot header. .set ALIGN, 1<<0 # align loaded modules on page boundaries .set MEMINFO, 1<<1 # provide memory map -.set FLAGS, ALIGN | MEMINFO # this is the Multiboot 'flag' field -.set MAGIC, 0x1BADB002 # 'magic number' lets bootloader find the header -.set CHECKSUM, -(MAGIC + FLAGS) # checksum of above, to prove we are multiboot +.set MAGIC, 0xE85250D6 # 'magic number' lets bootloader find the header +.set ARCHITECTURE, 0 # Declare a multiboot header that marks the program as a kernel. .section .multiboot.data, "aw" -.align 4 -.long MAGIC -.long FLAGS -.long CHECKSUM +header_start: + # HEADER + .long MAGIC + .long ARCHITECTURE + .long header_end - header_start + .long 0x100000000 - (MAGIC + (header_end - header_start)) + + #TAGS: + + + # END TAG + .align 8 + .int 0 # type + .int 0 # flag + .long 8 # size +header_end: # Allocate the initial stack. .section .bootstrap_stack, "aw", @nobits