diff --git a/arch/x86/include/asm/multiboot.h b/arch/x86/include/asm/multiboot.h index 9d41ec0e..a191631d 100644 --- a/arch/x86/include/asm/multiboot.h +++ b/arch/x86/include/asm/multiboot.h @@ -28,6 +28,11 @@ * which specifies an interface between a boot loader and a operating system */ +/* are there modules to do something with? */ +#define MULTIBOOT_INFO_MODS 0x00000008 +/* is there a full memory map? */ +#define MULTIBOOT_INFO_MEM_MAP 0x00000040 + typedef uint16_t multiboot_uint16_t; typedef uint32_t multiboot_uint32_t; typedef uint64_t multiboot_uint64_t; diff --git a/fs/initrd.c b/fs/initrd.c index 99b19669..5349b7bb 100644 --- a/fs/initrd.c +++ b/fs/initrd.c @@ -218,7 +218,7 @@ int initrd_init(void) uint32_t mods_count = 0; multiboot_module_t* mmodule = NULL; - if (mb_info && (mb_info->flags & (1 << 3))) { + if (mb_info && (mb_info->flags & MULTIBOOT_INFO_MODS)) { mmodule = (multiboot_module_t*) mb_info->mods_addr; mods_count = mb_info->mods_count; } diff --git a/mm/memory.c b/mm/memory.c index fbefd461..e33b5202 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -94,7 +94,7 @@ int mmu_init(void) size_t addr, end_addr; #ifdef CONFIG_MULTIBOOT - if (mb_info && (mb_info->flags & (1 << 6))) { + if (mb_info && (mb_info->flags & MULTIBOOT_INFO_MEM_MAP)) { multiboot_memory_map_t* mmap = (multiboot_memory_map_t*) mb_info->mmap_addr; multiboot_memory_map_t* mmap_end = (void*) ((size_t) mb_info->mmap_addr + mb_info->mmap_length); @@ -124,7 +124,7 @@ int mmu_init(void) * Modules like the init ram disk are already loaded. * Therefore, we set these pages as used. */ - if (mb_info && (mb_info->flags & (1 << 3))) { + if (mb_info && (mb_info->flags & MULTIBOOT_INFO_MODS)) { multiboot_module_t* mmodule = (multiboot_module_t*) mb_info->mods_addr; for(i=0; imods_count; i++, mmodule++) {