multiboot: disentangle multiboot and multiboot2.
[grub.git] / include / grub / i386 / multiboot.h
index 807a1de..9cd97df 100644 (file)
 #ifndef GRUB_MULTIBOOT_CPU_HEADER
 #define GRUB_MULTIBOOT_CPU_HEADER      1
 
+#define MULTIBOOT2_INITIAL_STATE  { .eax = MULTIBOOT2_BOOTLOADER_MAGIC,        \
+    .ecx = 0,                                                          \
+    .edx = 0,                                                          \
+    /* Set esp to some random location in low memory to avoid breaking */ \
+    /* non-compliant kernels.  */                                      \
+    .esp = 0x7ff00                                                     \
+      }
 #define MULTIBOOT_INITIAL_STATE  { .eax = MULTIBOOT_BOOTLOADER_MAGIC,  \
     .ecx = 0,                                                          \
     .edx = 0,                                                          \
@@ -28,7 +35,7 @@
       }
 #define MULTIBOOT_ENTRY_REGISTER eip
 #define MULTIBOOT_MBI_REGISTER ebx
-#define MULTIBOOT_ARCHITECTURE_CURRENT MULTIBOOT_ARCHITECTURE_I386
+#define MULTIBOOT2_ARCHITECTURE_CURRENT MULTIBOOT2_ARCHITECTURE_I386
 
 #ifdef GRUB_MACHINE_EFI
 #ifdef __x86_64__