summaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/multiboot/multiboot.s
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/boot/multiboot/multiboot.s')
-rw-r--r--arch/x86/boot/multiboot/multiboot.s11
1 files changed, 5 insertions, 6 deletions
diff --git a/arch/x86/boot/multiboot/multiboot.s b/arch/x86/boot/multiboot/multiboot.s
index 33e54f1..e6e8c21 100644
--- a/arch/x86/boot/multiboot/multiboot.s
+++ b/arch/x86/boot/multiboot/multiboot.s
@@ -1,13 +1,12 @@
# https://www.gnu.org/software/grub/manual/multiboot/multiboot.html
+.include "bare_multiboot.h" # the file is auto-generated
+
/*
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 FLAGS, MULTIBOOT_PAGE_ALIGN | MULTIBOOT_MEMORY_INFO # this is the Multiboot 'flag' field
+.set CHECKSUM, -(MULTIBOOT_HEADER_MAGIC + FLAGS) # checksum of above, to prove we are multiboot
/*
Declare a multiboot header that marks the program as a kernel.
@@ -19,7 +18,7 @@ its own section so the header can be forced to be within the first
*/
.section .multiboot
.align 4
-.long MAGIC
+.long MULTIBOOT_HEADER_MAGIC
.long FLAGS
.long CHECKSUM