iPXE
multiboot.h
Go to the documentation of this file.
1 #ifndef _MULTIBOOT_H
2 #define _MULTIBOOT_H
3 
4 /**
5  * @file
6  *
7  * Multiboot operating systems
8  *
9  */
10 
11 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
12 
13 #include <stdint.h>
14 
15 /** The magic number for the Multiboot header */
16 #define MULTIBOOT_HEADER_MAGIC 0x1BADB002
17 
18 /** Boot modules must be page aligned */
19 #define MB_FLAG_PGALIGN 0x00000001
20 
21 /** Memory map must be provided */
22 #define MB_FLAG_MEMMAP 0x00000002
23 
24 /** Video mode information must be provided */
25 #define MB_FLAG_VIDMODE 0x00000004
26 
27 /** Image is a raw multiboot image (not ELF) */
28 #define MB_FLAG_RAW 0x00010000
29 
30 /**
31  * The magic number passed by a Multiboot-compliant boot loader
32  *
33  * Must be passed in register %eax when jumping to the Multiboot OS
34  * image.
35  */
36 #define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002
37 
38 /** Multiboot information structure mem_* fields are valid */
39 #define MBI_FLAG_MEM 0x00000001
40 
41 /** Multiboot information structure boot_device field is valid */
42 #define MBI_FLAG_BOOTDEV 0x00000002
43 
44 /** Multiboot information structure cmdline field is valid */
45 #define MBI_FLAG_CMDLINE 0x00000004
46 
47 /** Multiboot information structure module fields are valid */
48 #define MBI_FLAG_MODS 0x00000008
49 
50 /** Multiboot information structure a.out symbol table is valid */
51 #define MBI_FLAG_AOUT 0x00000010
52 
53 /** Multiboot information struture ELF section header table is valid */
54 #define MBI_FLAG_ELF 0x00000020
55 
56 /** Multiboot information structure memory map is valid */
57 #define MBI_FLAG_MMAP 0x00000040
58 
59 /** Multiboot information structure drive list is valid */
60 #define MBI_FLAG_DRIVES 0x00000080
61 
62 /** Multiboot information structure ROM configuration field is valid */
63 #define MBI_FLAG_CFGTBL 0x00000100
64 
65 /** Multiboot information structure boot loader name field is valid */
66 #define MBI_FLAG_LOADER 0x00000200
67 
68 /** Multiboot information structure APM table is valid */
69 #define MBI_FLAG_APM 0x00000400
70 
71 /** Multiboot information structure video information is valid */
72 #define MBI_FLAG_VBE 0x00000800
73 
74 /** A multiboot header */
84 } __attribute__ (( packed, may_alias ));
85 
86 /** A multiboot a.out symbol table */
92 } __attribute__ (( packed, may_alias ));
93 
94 /** A multiboot ELF section header table */
100 } __attribute__ (( packed, may_alias ));
101 
102 /** A multiboot information structure */
111  union {
114  } syms;
128 } __attribute__ (( packed, may_alias ));
129 
130 /** A multiboot module structure */
136 } __attribute__ (( packed, may_alias ));
137 
138 /** A multiboot memory map entry */
144 } __attribute__ (( packed, may_alias ));
145 
146 /** Usable RAM */
147 #define MBMEM_RAM 1
148 
149 #endif /* _MULTIBOOT_H */
uint32_t mods_addr
Definition: multiboot.h:110
uint32_t boot_device
Definition: multiboot.h:107
unsigned short uint16_t
Definition: stdint.h:11
A multiboot a.out symbol table.
Definition: multiboot.h:87
uint16_t vbe_interface_len
Definition: multiboot.h:127
uint32_t entry_addr
Definition: multiboot.h:83
struct multiboot_aout_symbol_table aout_syms
Definition: multiboot.h:112
uint32_t mem_upper
Definition: multiboot.h:106
uint32_t bss_end_addr
Definition: multiboot.h:82
uint32_t mmap_length
Definition: multiboot.h:115
uint32_t load_addr
Definition: multiboot.h:80
unsigned long long uint64_t
Definition: stdint.h:13
uint32_t checksum
Definition: multiboot.h:78
A multiboot information structure.
Definition: multiboot.h:103
A multiboot module structure.
Definition: multiboot.h:131
uint32_t apm_table
Definition: multiboot.h:121
A multiboot memory map entry.
Definition: multiboot.h:139
uint32_t config_table
Definition: multiboot.h:119
uint32_t mod_end
Definition: multiboot.h:133
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
uint32_t drives_length
Definition: multiboot.h:117
struct multiboot_header __attribute__((packed, may_alias))
uint32_t mmap_addr
Definition: multiboot.h:116
uint32_t drives_addr
Definition: multiboot.h:118
uint32_t boot_loader_name
Definition: multiboot.h:120
uint32_t vbe_mode_info
Definition: multiboot.h:123
A multiboot ELF section header table.
Definition: multiboot.h:95
uint32_t mods_count
Definition: multiboot.h:109
union multiboot_info::@629 syms
unsigned int uint32_t
Definition: stdint.h:12
uint32_t reserved
Definition: multiboot.h:135
uint32_t mod_start
Definition: multiboot.h:132
uint32_t flags
Definition: multiboot.h:104
uint32_t header_addr
Definition: multiboot.h:79
uint32_t mem_lower
Definition: multiboot.h:105
uint32_t vbe_control_info
Definition: multiboot.h:122
uint16_t vbe_interface_off
Definition: multiboot.h:126
uint32_t flags
Definition: multiboot.h:77
uint32_t string
Definition: multiboot.h:134
uint32_t magic
Definition: multiboot.h:76
uint32_t load_end_addr
Definition: multiboot.h:81
uint16_t vbe_mode
Definition: multiboot.h:124
A multiboot header.
Definition: multiboot.h:75
uint32_t cmdline
Definition: multiboot.h:108
struct multiboot_elf_section_header_table elf_sections
Definition: multiboot.h:113
uint16_t vbe_interface_seg
Definition: multiboot.h:125