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
39 /* XXX not portable? */
41 typedef uint64_t multiboot_word
;
43 typedef uint32_t multiboot_word
;
46 struct multiboot_header
51 struct multiboot_tag_header
57 #define MULTIBOOT2_TAG_RESERVED1 0
58 #define MULTIBOOT2_TAG_RESERVED2 (~0)
60 #define MULTIBOOT2_TAG_START 1
61 struct multiboot_tag_start
63 struct multiboot_tag_header header
;
64 multiboot_word size
; /* Total size of all multiboot tags. */
67 #define MULTIBOOT2_TAG_NAME 2
68 struct multiboot_tag_name
70 struct multiboot_tag_header header
;
74 #define MULTIBOOT2_TAG_MODULE 3
75 struct multiboot_tag_module
77 struct multiboot_tag_header header
;
80 unsigned char type
[36];
81 unsigned char cmdline
[1];
84 #define MULTIBOOT2_TAG_MEMORY 4
85 struct multiboot_tag_memory
87 struct multiboot_tag_header header
;
93 #define MULTIBOOT2_TAG_UNUSED 5
94 struct multiboot_tag_unused
96 struct multiboot_tag_header header
;
99 #define MULTIBOOT2_TAG_END 0xffff
100 struct multiboot_tag_end
102 struct multiboot_tag_header header
;
105 #endif /* ! ASM_FILE */
107 #endif /* ! MULTIBOOT2_HEADER */