diff --git a/src/system/boot/platform/bios_ia32/multiboot.h b/src/system/boot/platform/bios_ia32/multiboot.h index 5f22bcaad8..fc42af7c39 100644 --- a/src/system/boot/platform/bios_ia32/multiboot.h +++ b/src/system/boot/platform/bios_ia32/multiboot.h @@ -6,10 +6,15 @@ #define _MULTIBOOT_H +#ifndef __ASSEMBLER__ + #include +#endif /* __ASSEMBLER__ */ + /* minimal part of the MultiBoot API */ +/* we use the official names */ /* magics */ #define MULTIBOOT_MAGIC 0x1badb002 @@ -28,6 +33,7 @@ #define MULTIBOOT_INFO_MODS 0x00000008 #define MULTIBOOT_INFO_MEM_MAP 0x00000040 +#ifndef __ASSEMBLER__ /* info struct passed to the loader */ struct multiboot_info { @@ -65,5 +71,6 @@ extern status_t parse_multiboot_commandline(struct stage2_args *args); } #endif +#endif /* __ASSEMBLER__ */ #endif /* _MULTIBOOT_H */ diff --git a/src/system/boot/platform/bios_ia32/shell.S b/src/system/boot/platform/bios_ia32/shell.S index 32d3b633e3..405be7987d 100644 --- a/src/system/boot/platform/bios_ia32/shell.S +++ b/src/system/boot/platform/bios_ia32/shell.S @@ -14,19 +14,9 @@ * the entry function of the embedded ELF part of the loader. */ -#define GLOBAL(x) .globl x ; x +#include "multiboot.h" -// GRUB-compatible MultiBoot info -// we use the official names -#define MULTIBOOT_MAGIC 0x1badb002 -#define MULTIBOOT_MAGIC2 0x2badb002 -// header flags -#define MULTIBOOT_PAGE_ALIGN 0x00000001 -#define MULTIBOOT_MEMORY_INFO 0x00000002 -#define MULTIBOOT_VIDEO_MODE 0x00000004 -#define MULTIBOOT_AOUT_KLUDGE 0x00010000 -// info flags -#define MULTIBOOT_INFO_BOOTDEV 0x00000002 +#define GLOBAL(x) .globl x ; x #define OUR_MB_FLAGS (MULTIBOOT_PAGE_ALIGN \ | MULTIBOOT_MEMORY_INFO \