1 /* multiboot2.h - multiboot 2 header file. */
3 * GRUB -- GRand Unified Bootloader
4 * Copyright (C) 2007 Free Software Foundation, Inc.
6 * GRUB is free software: you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation, either version 3 of the License, or
9 * (at your option) any later version.
11 * GRUB is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with GRUB. If not, see <http://www.gnu.org/licenses/>.
20 #ifndef MULTIBOOT2_HEADER
21 #define MULTIBOOT2_HEADER 1
23 /* How many bytes from the start of the file we search for the header. */
24 #define MULTIBOOT2_HEADER_SEARCH 8192
26 /* The magic field should contain this. */
27 #define MULTIBOOT2_HEADER_MAGIC 0xe85250d6
29 /* Passed from the bootloader to the kernel. */
30 #define MULTIBOOT2_BOOTLOADER_MAGIC 0x36d76289
32 /* Alignment of multiboot modules. */
33 #define MULTIBOOT2_MOD_ALIGN 0x00001000
41 /* XXX not portable? */
43 typedef uint64_t multiboot_word
;
45 typedef uint32_t multiboot_word
;
48 struct multiboot_header
54 struct multiboot_tag_header
60 #define MULTIBOOT2_TAG_RESERVED1 0
61 #define MULTIBOOT2_TAG_RESERVED2 (~0)
63 #define MULTIBOOT2_TAG_START 1
64 struct multiboot_tag_start
66 struct multiboot_tag_header header
;
67 multiboot_word size
; /* Total size of all multiboot tags. */
70 #define MULTIBOOT2_TAG_NAME 2
71 struct multiboot_tag_name
73 struct multiboot_tag_header header
;
77 #define MULTIBOOT2_TAG_MODULE 3
78 struct multiboot_tag_module
80 struct multiboot_tag_header header
;
87 #define MULTIBOOT2_TAG_MEMORY 4
88 struct multiboot_tag_memory
90 struct multiboot_tag_header header
;
96 #define MULTIBOOT2_TAG_UNUSED 5
97 struct multiboot_tag_unused
99 struct multiboot_tag_header header
;
102 #define MULTIBOOT2_TAG_END 0xffff
103 struct multiboot_tag_end
105 struct multiboot_tag_header header
;
108 #endif /* ! ASM_FILE */
110 #endif /* ! MULTIBOOT2_HEADER */