7 * Multiboot operating systems
11 FILE_LICENCE ( GPL2_OR_LATER
);
15 /** The magic number for the Multiboot header */
16 #define MULTIBOOT_HEADER_MAGIC 0x1BADB002
18 /** Boot modules must be page aligned */
19 #define MB_FLAG_PGALIGN 0x00000001
21 /** Memory map must be provided */
22 #define MB_FLAG_MEMMAP 0x00000002
24 /** Video mode information must be provided */
25 #define MB_FLAG_VIDMODE 0x00000004
27 /** Image is a raw multiboot image (not ELF) */
28 #define MB_FLAG_RAW 0x00010000
31 * The magic number passed by a Multiboot-compliant boot loader
33 * Must be passed in register %eax when jumping to the Multiboot OS
36 #define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002
38 /** Multiboot information structure mem_* fields are valid */
39 #define MBI_FLAG_MEM 0x00000001
41 /** Multiboot information structure boot_device field is valid */
42 #define MBI_FLAG_BOOTDEV 0x00000002
44 /** Multiboot information structure cmdline field is valid */
45 #define MBI_FLAG_CMDLINE 0x00000004
47 /** Multiboot information structure module fields are valid */
48 #define MBI_FLAG_MODS 0x00000008
50 /** Multiboot information structure a.out symbol table is valid */
51 #define MBI_FLAG_AOUT 0x00000010
53 /** Multiboot information struture ELF section header table is valid */
54 #define MBI_FLAG_ELF 0x00000020
56 /** Multiboot information structure memory map is valid */
57 #define MBI_FLAG_MMAP 0x00000040
59 /** Multiboot information structure drive list is valid */
60 #define MBI_FLAG_DRIVES 0x00000080
62 /** Multiboot information structure ROM configuration field is valid */
63 #define MBI_FLAG_CFGTBL 0x00000100
65 /** Multiboot information structure boot loader name field is valid */
66 #define MBI_FLAG_LOADER 0x00000200
68 /** Multiboot information structure APM table is valid */
69 #define MBI_FLAG_APM 0x00000400
71 /** Multiboot information structure video information is valid */
72 #define MBI_FLAG_VBE 0x00000800
74 /** A multiboot header */
75 struct multiboot_header
{
81 uint32_t load_end_addr
;
82 uint32_t bss_end_addr
;
84 } __attribute__ (( packed
, may_alias
));
86 /** A multiboot a.out symbol table */
87 struct multiboot_aout_symbol_table
{
92 } __attribute__ (( packed
, may_alias
));
94 /** A multiboot ELF section header table */
95 struct multiboot_elf_section_header_table
{
100 } __attribute__ (( packed
, may_alias
));
102 /** A multiboot information structure */
103 struct multiboot_info
{
107 uint32_t boot_device
;
112 struct multiboot_aout_symbol_table aout_syms
;
113 struct multiboot_elf_section_header_table elf_sections
;
115 uint32_t mmap_length
;
117 uint32_t drives_length
;
118 uint32_t drives_addr
;
119 uint32_t config_table
;
120 uint32_t boot_loader_name
;
122 uint32_t vbe_control_info
;
123 uint32_t vbe_mode_info
;
125 uint16_t vbe_interface_seg
;
126 uint16_t vbe_interface_off
;
127 uint16_t vbe_interface_len
;
128 } __attribute__ (( packed
, may_alias
));
130 /** A multiboot module structure */
131 struct multiboot_module
{
136 } __attribute__ (( packed
, may_alias
));
138 /** A multiboot memory map entry */
139 struct multiboot_memory_map
{
144 } __attribute__ (( packed
, may_alias
));
149 #endif /* _MULTIBOOT_H */