Use either multiboot1 or multiboot2
This commit is contained in:
parent
14cd812e34
commit
fef9a11d16
@ -4,6 +4,11 @@
|
||||
#define MBOOT1_FLAGS (MBOOT1_PALIGN | MBOOT1_MEMINFO)
|
||||
#define MBOOT1_CS -(MBOOT1_FLAGS + MBOOT1_MAGIC)
|
||||
|
||||
#define MBOOT2_MAGIC 0xE85250D6
|
||||
#define MBOOT2_ARCH 0
|
||||
#define MBOOT2_LENGTH (MultiBootHeader2End - MultiBootHeader2)
|
||||
#define MBOOT2_CHECKSUM -(MBOOT2_MAGIC + MBOOT2_ARCH + MBOOT2_LENGTH)
|
||||
|
||||
.intel_syntax noprefix
|
||||
|
||||
.section .multiboot
|
||||
@ -13,6 +18,18 @@ MultiBootHeader1:
|
||||
.long MBOOT1_FLAGS
|
||||
.long MBOOT1_CS
|
||||
|
||||
.align 0x1000
|
||||
MultiBootHeader2:
|
||||
.long MBOOT2_MAGIC
|
||||
.long MBOOT2_ARCH
|
||||
.long MBOOT2_LENGTH
|
||||
.long MBOOT2_CHECKSUM
|
||||
|
||||
.short 0
|
||||
.short 0
|
||||
.long 8
|
||||
MultiBootHeader2End:
|
||||
|
||||
.section .text
|
||||
.global _start
|
||||
.code32
|
||||
|
@ -13,6 +13,9 @@ set timeout=1
|
||||
set default=0
|
||||
|
||||
menuentry "mittos64" {
|
||||
multiboot2 /kernel
|
||||
}
|
||||
menuentry "mittos64 multiboot1" {
|
||||
multiboot /kernel
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user