1 /* 2 * Copyright 2009, François Revol, revol@free.fr. 3 * Distributed under the terms of the MIT License. 4 */ 5 #ifndef _MULTIBOOT_H 6 #define _MULTIBOOT_H 7 8 9 #include <SupportDefs.h> 10 11 12 /* minimal part of the MultiBoot API */ 13 14 /* magics */ 15 #define MULTIBOOT_MAGIC 0x1badb002 16 #define MULTIBOOT_MAGIC2 0x2badb002 17 18 /* header flags */ 19 #define MULTIBOOT_PAGE_ALIGN 0x00000001 20 #define MULTIBOOT_MEMORY_INFO 0x00000002 21 #define MULTIBOOT_VIDEO_MODE 0x00000004 22 #define MULTIBOOT_AOUT_KLUDGE 0x00010000 23 24 /* info flags */ 25 #define MULTIBOOT_INFO_MEMORY 0x00000001 26 #define MULTIBOOT_INFO_BOOTDEV 0x00000002 27 #define MULTIBOOT_INFO_CMDLINE 0x00000004 28 #define MULTIBOOT_INFO_MODS 0x00000008 29 #define MULTIBOOT_INFO_MEM_MAP 0x00000040 30 31 32 /* info struct passed to the loader */ 33 struct multiboot_info { 34 uint32 flags; 35 uint32 mem_lower; 36 uint32 mem_upper; 37 uint32 boot_device; 38 uint32 cmdline; 39 uint32 mods_count; 40 uint32 mods_addr; 41 uint32 syms[4]; 42 uint32 mmap_length; 43 uint32 mmap_addr; 44 uint32 drives_length; 45 uint32 drives_addr; 46 uint32 config_table; 47 uint32 boot_loader_name; 48 uint32 apm_table; 49 uint32 vbe_control_info; 50 uint32 vbe_mode_info; 51 uint16 vbe_interface_seg; 52 uint16 vbe_interface_off; 53 uint16 vbe_interface_len; 54 }; 55 56 57 #ifdef __cplusplus 58 extern "C" { 59 #endif 60 61 extern void dump_multiboot_info(void); 62 extern status_t parse_multiboot_commandline(struct stage2_args *args); 63 64 #ifdef __cplusplus 65 } 66 #endif 67 68 69 #endif /* _MULTIBOOT_H */ 70