1 /* multiboot.h - multiboot header file with grub definitions. */
3 * GRUB -- GRand Unified Bootloader
4 * Copyright (C) 2003,2007,2008 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 GRUB_MULTIBOOT_HEADER
21 #define GRUB_MULTIBOOT_HEADER 1
23 #include <multiboot.h>
25 void grub_multiboot (int argc
, char *argv
[]);
26 void grub_module (int argc
, char *argv
[]);
30 #include <grub/types.h>
32 struct grub_multiboot_header
34 /* Must be MULTIBOOT_MAGIC - see above. */
40 /* The above fields plus this one must equal 0 mod 2^32. */
41 grub_uint32_t checksum
;
43 /* These are only valid if MULTIBOOT_AOUT_KLUDGE is set. */
44 grub_uint32_t header_addr
;
45 grub_uint32_t load_addr
;
46 grub_uint32_t load_end_addr
;
47 grub_uint32_t bss_end_addr
;
48 grub_uint32_t entry_addr
;
50 /* These are only valid if MULTIBOOT_VIDEO_MODE is set. */
51 grub_uint32_t mode_type
;
57 struct grub_multiboot_info
59 /* Multiboot info version number */
62 /* Available memory from BIOS */
63 grub_uint32_t mem_lower
;
64 grub_uint32_t mem_upper
;
66 /* "root" partition */
67 grub_uint32_t boot_device
;
69 /* Kernel command line */
70 grub_uint32_t cmdline
;
72 /* Boot-Module list */
73 grub_uint32_t mods_count
;
74 grub_uint32_t mods_addr
;
76 grub_uint32_t syms
[4];
78 /* Memory Mapping buffer */
79 grub_uint32_t mmap_length
;
80 grub_uint32_t mmap_addr
;
82 /* Drive Info buffer */
83 grub_uint32_t drives_length
;
84 grub_uint32_t drives_addr
;
86 /* ROM configuration table */
87 grub_uint32_t config_table
;
89 /* Boot Loader Name */
90 grub_uint32_t boot_loader_name
;
93 grub_uint32_t apm_table
;
96 grub_uint32_t vbe_control_info
;
97 grub_uint32_t vbe_mode_info
;
98 grub_uint16_t vbe_mode
;
99 grub_uint16_t vbe_interface_seg
;
100 grub_uint16_t vbe_interface_off
;
101 grub_uint16_t vbe_interface_len
;
104 struct grub_multiboot_mmap_entry
109 #define GRUB_MULTIBOOT_MEMORY_AVAILABLE 1
110 #define GRUB_MULTIBOOT_MEMORY_RESERVED 2
112 } __attribute__((packed
));
116 /* the memory used goes from bytes 'mod_start' to 'mod_end-1' inclusive */
117 grub_uint32_t mod_start
;
118 grub_uint32_t mod_end
;
120 /* Module command line */
121 grub_uint32_t cmdline
;
123 /* padding to take it to 16 bytes (must be zero) */
127 #endif /* ! ASM_FILE */
129 #endif /* ! GRUB_MULTIBOOT_HEADER */