Code: Select all
.set LENGTH, (header_end - header_start)
.set ARCH, 0
.set MAGIC, 0xE85250D6
.set CHECKSUM, -(MAGIC + ARCH + LENGTH)
.section .multiboot
header_start:
.int MAGIC /* Magic number */
.int ARCH /* x86 protected mode */
.int LENGTH /* Header length */
.int CHECKSUM /* Multiboot2 checksum */
/* Set the end flag */
.word 0 /* Type */
.word 0 /* Flag */
.int 8 /* Size */
header_end:
The kernel thus formed fails the multiboot2 test:
Code: Select all
grub-file --is-x86-multiboot2 build/simple-os.bin || echo "Not multiboot 2"
The fix suggested is to set the max-page-size while linking.
What would be the correct size to set?