wip: use multiboot2
This commit is contained in:
parent
1352201800
commit
f626edd0f0
25
src/boot.s
25
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
|
||||
|
Loading…
Reference in New Issue
Block a user