RTEMS 6.1-rc5
Loading...
Searching...
No Matches
multiboot2.h
1/* multiboot2.h - Multiboot 2 header file. */
2/* Copyright (C) 1999,2003,2007,2008,2009,2010 Free Software Foundation, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a copy
5 * of this software and associated documentation files (the "Software"), to
6 * deal in the Software without restriction, including without limitation the
7 * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8 * sell copies of the Software, and to permit persons to whom the Software is
9 * furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ANY
17 * DEVELOPER OR DISTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
20 * IN THE SOFTWARE.
21 */
22
23#ifndef _MULTIBOOT2_HEADER_H_
24#define _MULTIBOOT2_HEADER_H_
25
26/* How many bytes from the start of the file we search for the header. */
27#define MULTIBOOT_SEARCH 32768
28#define MULTIBOOT_HEADER_ALIGN 8
29
30/* The magic field should contain this. */
31#define MULTIBOOT2_HEADER_MAGIC 0xe85250d6
32
33/* This should be in %eax. */
34#define MULTIBOOT2_BOOTLOADER_MAGIC 0x36d76289
35
36/* Alignment of multiboot modules. */
37#define MULTIBOOT_MOD_ALIGN 0x00001000
38
39/* Alignment of the multiboot info structure. */
40#define MULTIBOOT_INFO_ALIGN 0x00000008
41
42/* Flags set in the 'flags' member of the multiboot header. */
43
44#define MULTIBOOT_TAG_ALIGN 8
45#define MULTIBOOT_TAG_TYPE_END 0
46#define MULTIBOOT_TAG_TYPE_CMDLINE 1
47#define MULTIBOOT_TAG_TYPE_BOOT_LOADER_NAME 2
48#define MULTIBOOT_TAG_TYPE_MODULE 3
49#define MULTIBOOT_TAG_TYPE_BASIC_MEMINFO 4
50#define MULTIBOOT_TAG_TYPE_BOOTDEV 5
51#define MULTIBOOT_TAG_TYPE_MMAP 6
52#define MULTIBOOT_TAG_TYPE_VBE 7
53#define MULTIBOOT_TAG_TYPE_FRAMEBUFFER 8
54#define MULTIBOOT_TAG_TYPE_ELF_SECTIONS 9
55#define MULTIBOOT_TAG_TYPE_APM 10
56#define MULTIBOOT_TAG_TYPE_EFI32 11
57#define MULTIBOOT_TAG_TYPE_EFI64 12
58#define MULTIBOOT_TAG_TYPE_SMBIOS 13
59#define MULTIBOOT_TAG_TYPE_ACPI_OLD 14
60#define MULTIBOOT_TAG_TYPE_ACPI_NEW 15
61#define MULTIBOOT_TAG_TYPE_NETWORK 16
62#define MULTIBOOT_TAG_TYPE_EFI_MMAP 17
63#define MULTIBOOT_TAG_TYPE_EFI_BS 18
64#define MULTIBOOT_TAG_TYPE_EFI32_IH 19
65#define MULTIBOOT_TAG_TYPE_EFI64_IH 20
66#define MULTIBOOT_TAG_TYPE_LOAD_BASE_ADDR 21
67
68#define MULTIBOOT_HEADER_TAG_END 0
69#define MULTIBOOT_HEADER_TAG_INFORMATION_REQUEST 1
70#define MULTIBOOT_HEADER_TAG_ADDRESS 2
71#define MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS 3
72#define MULTIBOOT_HEADER_TAG_CONSOLE_FLAGS 4
73#define MULTIBOOT_HEADER_TAG_FRAMEBUFFER 5
74#define MULTIBOOT_HEADER_TAG_MODULE_ALIGN 6
75#define MULTIBOOT_HEADER_TAG_EFI_BS 7
76#define MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS_EFI64 9
77#define MULTIBOOT_HEADER_TAG_RELOCATABLE 10
78
79#define MULTIBOOT_ARCHITECTURE_I386 0
80#define MULTIBOOT_ARCHITECTURE_MIPS32 4
81#define MULTIBOOT_HEADER_TAG_OPTIONAL 1
82
83#define MULTIBOOT_LOAD_PREFERENCE_NONE 0
84#define MULTIBOOT_LOAD_PREFERENCE_LOW 1
85#define MULTIBOOT_LOAD_PREFERENCE_HIGH 2
86
87#define MULTIBOOT_CONSOLE_FLAGS_CONSOLE_REQUIRED 1
88#define MULTIBOOT_CONSOLE_FLAGS_EGA_TEXT_SUPPORTED 2
89
90#ifndef __ASSEMBLER__
91
92typedef unsigned char multiboot_uint8_t;
93typedef unsigned short multiboot_uint16_t;
94typedef unsigned int multiboot_uint32_t;
95typedef unsigned long long multiboot_uint64_t;
96
98{
99 /* Must be MULTIBOOT_MAGIC - see above. */
100 multiboot_uint32_t magic;
101
102 /* ISA */
103 multiboot_uint32_t architecture;
104
105 /* Total header length. */
106 multiboot_uint32_t header_length;
107
108 /* The above fields plus this one must equal 0 mod 2^32. */
109 multiboot_uint32_t checksum;
110};
111
113{
114 multiboot_uint16_t type;
115 multiboot_uint16_t flags;
116 multiboot_uint32_t size;
117};
118
120{
121 multiboot_uint16_t type;
122 multiboot_uint16_t flags;
123 multiboot_uint32_t size;
124 multiboot_uint32_t requests[0];
125};
126
128{
129 multiboot_uint16_t type;
130 multiboot_uint16_t flags;
131 multiboot_uint32_t size;
132 multiboot_uint32_t header_addr;
133 multiboot_uint32_t load_addr;
134 multiboot_uint32_t load_end_addr;
135 multiboot_uint32_t bss_end_addr;
136};
137
139{
140 multiboot_uint16_t type;
141 multiboot_uint16_t flags;
142 multiboot_uint32_t size;
143 multiboot_uint32_t entry_addr;
144};
145
147{
148 multiboot_uint16_t type;
149 multiboot_uint16_t flags;
150 multiboot_uint32_t size;
151 multiboot_uint32_t console_flags;
152};
153
155{
156 multiboot_uint16_t type;
157 multiboot_uint16_t flags;
158 multiboot_uint32_t size;
159 multiboot_uint32_t width;
160 multiboot_uint32_t height;
161 multiboot_uint32_t depth;
162};
163
165{
166 multiboot_uint16_t type;
167 multiboot_uint16_t flags;
168 multiboot_uint32_t size;
169};
170
172{
173 multiboot_uint16_t type;
174 multiboot_uint16_t flags;
175 multiboot_uint32_t size;
176 multiboot_uint32_t min_addr;
177 multiboot_uint32_t max_addr;
178 multiboot_uint32_t align;
179 multiboot_uint32_t preference;
180};
181
183{
184 multiboot_uint8_t red;
185 multiboot_uint8_t green;
186 multiboot_uint8_t blue;
187};
188
190{
191 multiboot_uint64_t addr;
192 multiboot_uint64_t len;
193#define MULTIBOOT_MEMORY_AVAILABLE 1
194#define MULTIBOOT_MEMORY_RESERVED 2
195#define MULTIBOOT_MEMORY_ACPI_RECLAIMABLE 3
196#define MULTIBOOT_MEMORY_NVS 4
197#define MULTIBOOT_MEMORY_BADRAM 5
198 multiboot_uint32_t type;
199 multiboot_uint32_t zero;
200};
202
204{
205 multiboot_uint32_t type;
206 multiboot_uint32_t size;
207};
208
210{
211 multiboot_uint32_t type;
212 multiboot_uint32_t size;
213 char string[0];
214};
215
217{
218 multiboot_uint32_t type;
219 multiboot_uint32_t size;
220 multiboot_uint32_t mod_start;
221 multiboot_uint32_t mod_end;
222 char cmdline[0];
223};
224
226{
227 multiboot_uint32_t type;
228 multiboot_uint32_t size;
229 multiboot_uint32_t mem_lower;
230 multiboot_uint32_t mem_upper;
231};
232
234{
235 multiboot_uint32_t type;
236 multiboot_uint32_t size;
237 multiboot_uint32_t biosdev;
238 multiboot_uint32_t slice;
239 multiboot_uint32_t part;
240};
241
243{
244 multiboot_uint32_t type;
245 multiboot_uint32_t size;
246 multiboot_uint32_t entry_size;
247 multiboot_uint32_t entry_version;
248 struct multiboot_mmap_entry entries[0];
249};
250
252{
253 multiboot_uint8_t external_specification[512];
254};
255
257{
258 multiboot_uint8_t external_specification[256];
259};
260
262{
263 multiboot_uint32_t type;
264 multiboot_uint32_t size;
265
266 multiboot_uint16_t vbe_mode;
267 multiboot_uint16_t vbe_interface_seg;
268 multiboot_uint16_t vbe_interface_off;
269 multiboot_uint16_t vbe_interface_len;
270
271 struct multiboot_vbe_info_block vbe_control_info;
272 struct multiboot_vbe_mode_info_block vbe_mode_info;
273};
274
276{
277 multiboot_uint32_t type;
278 multiboot_uint32_t size;
279
280 multiboot_uint64_t framebuffer_addr;
281 multiboot_uint32_t framebuffer_pitch;
282 multiboot_uint32_t framebuffer_width;
283 multiboot_uint32_t framebuffer_height;
284 multiboot_uint8_t framebuffer_bpp;
285#define MULTIBOOT_FRAMEBUFFER_TYPE_INDEXED 0
286#define MULTIBOOT_FRAMEBUFFER_TYPE_RGB 1
287#define MULTIBOOT_FRAMEBUFFER_TYPE_EGA_TEXT 2
288 multiboot_uint8_t framebuffer_type;
289 multiboot_uint16_t reserved;
290};
291
293{
295
296 union
297 {
298 struct
299 {
300 multiboot_uint16_t framebuffer_palette_num_colors;
301 struct multiboot_color framebuffer_palette[0];
302 };
303 struct
304 {
305 multiboot_uint8_t framebuffer_red_field_position;
306 multiboot_uint8_t framebuffer_red_mask_size;
307 multiboot_uint8_t framebuffer_green_field_position;
308 multiboot_uint8_t framebuffer_green_mask_size;
309 multiboot_uint8_t framebuffer_blue_field_position;
310 multiboot_uint8_t framebuffer_blue_mask_size;
311 };
312 };
313};
314
316{
317 multiboot_uint32_t type;
318 multiboot_uint32_t size;
319 multiboot_uint32_t num;
320 multiboot_uint32_t entsize;
321 multiboot_uint32_t shndx;
322 char sections[0];
323};
324
326{
327 multiboot_uint32_t type;
328 multiboot_uint32_t size;
329 multiboot_uint16_t version;
330 multiboot_uint16_t cseg;
331 multiboot_uint32_t offset;
332 multiboot_uint16_t cseg_16;
333 multiboot_uint16_t dseg;
334 multiboot_uint16_t flags;
335 multiboot_uint16_t cseg_len;
336 multiboot_uint16_t cseg_16_len;
337 multiboot_uint16_t dseg_len;
338};
339
341{
342 multiboot_uint32_t type;
343 multiboot_uint32_t size;
344 multiboot_uint32_t pointer;
345};
346
348{
349 multiboot_uint32_t type;
350 multiboot_uint32_t size;
351 multiboot_uint64_t pointer;
352};
353
355{
356 multiboot_uint32_t type;
357 multiboot_uint32_t size;
358 multiboot_uint8_t major;
359 multiboot_uint8_t minor;
360 multiboot_uint8_t reserved[6];
361 multiboot_uint8_t tables[0];
362};
363
365{
366 multiboot_uint32_t type;
367 multiboot_uint32_t size;
368 multiboot_uint8_t rsdp[0];
369};
370
372{
373 multiboot_uint32_t type;
374 multiboot_uint32_t size;
375 multiboot_uint8_t rsdp[0];
376};
377
379{
380 multiboot_uint32_t type;
381 multiboot_uint32_t size;
382 multiboot_uint8_t dhcpack[0];
383};
384
386{
387 multiboot_uint32_t type;
388 multiboot_uint32_t size;
389 multiboot_uint32_t descr_size;
390 multiboot_uint32_t descr_vers;
391 multiboot_uint8_t efi_mmap[0];
392};
393
395{
396 multiboot_uint32_t type;
397 multiboot_uint32_t size;
398 multiboot_uint32_t pointer;
399};
400
402{
403 multiboot_uint32_t type;
404 multiboot_uint32_t size;
405 multiboot_uint64_t pointer;
406};
407
409{
410 multiboot_uint32_t type;
411 multiboot_uint32_t size;
412 multiboot_uint32_t load_base_addr;
413};
414
415#endif // __ASSEMBLER__
416
417#endif // _MULTIBOOT2_HEADER_H_
Definition: multiboot2.h:183
Definition: multiboot2.h:128
Definition: multiboot2.h:147
Definition: multiboot2.h:139
Definition: multiboot2.h:155
Definition: multiboot2.h:120
Definition: multiboot2.h:165
Definition: multiboot2.h:172
Definition: multiboot2.h:113
Definition: multiboot2.h:98
Definition: multiboot2.h:190
Definition: multiboot2.h:326
Definition: multiboot2.h:226
Definition: multiboot2.h:234
Definition: multiboot2.h:395
Definition: multiboot2.h:341
Definition: multiboot2.h:402
Definition: multiboot2.h:348
Definition: multiboot2.h:386
Definition: multiboot2.h:316
Definition: multiboot2.h:276
Definition: multiboot2.h:293
Definition: multiboot2.h:409
Definition: multiboot2.h:243
Definition: multiboot2.h:217
Definition: multiboot2.h:379
Definition: multiboot2.h:372
Definition: multiboot2.h:365
Definition: multiboot2.h:355
Definition: multiboot2.h:210
Definition: multiboot2.h:262
Definition: multiboot2.h:204
Definition: multiboot2.h:252
Definition: multiboot2.h:257