2009-11-21 Samuel Thibault <samuel.thibault@ens-lyon.org>
[grub2.git] / include / multiboot.h
blob110ad2f17434c62fdffa9415a54960da3c89b103
1 /* multiboot.h - multiboot header file. */
2 /*
3 * GRUB -- GRand Unified Bootloader
4 * Copyright (C) 2003,2007,2009 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 MULTIBOOT_HEADER
21 #define MULTIBOOT_HEADER 1
23 /* How many bytes from the start of the file we search for the header. */
24 #define MULTIBOOT_SEARCH 8192
26 /* The magic field should contain this. */
27 #define MULTIBOOT_MAGIC 0x1BADB002
29 /* This should be in %eax. */
30 #define MULTIBOOT_MAGIC2 0x2BADB002
32 /* The bits in the required part of flags field we don't support. */
33 #define MULTIBOOT_UNSUPPORTED 0x0000fffc
35 /* Alignment of multiboot modules. */
36 #define MULTIBOOT_MOD_ALIGN 0x00001000
38 /* Alignment of the multiboot info structure. */
39 #define MULTIBOOT_INFO_ALIGN 0x00000004
42 * Flags set in the 'flags' member of the multiboot header.
45 /* Align all boot modules on i386 page (4KB) boundaries. */
46 #define MULTIBOOT_PAGE_ALIGN 0x00000001
48 /* Must pass memory information to OS. */
49 #define MULTIBOOT_MEMORY_INFO 0x00000002
51 /* Must pass video information to OS. */
52 #define MULTIBOOT_VIDEO_MODE 0x00000004
54 /* This flag indicates the use of the address fields in the header. */
55 #define MULTIBOOT_AOUT_KLUDGE 0x00010000
58 * Flags to be set in the 'flags' member of the multiboot info structure.
61 /* is there basic lower/upper memory information? */
62 #define MULTIBOOT_INFO_MEMORY 0x00000001
63 /* is there a boot device set? */
64 #define MULTIBOOT_INFO_BOOTDEV 0x00000002
65 /* is the command-line defined? */
66 #define MULTIBOOT_INFO_CMDLINE 0x00000004
67 /* are there modules to do something with? */
68 #define MULTIBOOT_INFO_MODS 0x00000008
70 /* These next two are mutually exclusive */
72 /* is there a symbol table loaded? */
73 #define MULTIBOOT_INFO_AOUT_SYMS 0x00000010
74 /* is there an ELF section header table? */
75 #define MULTIBOOT_INFO_ELF_SHDR 0x00000020
77 /* is there a full memory map? */
78 #define MULTIBOOT_INFO_MEM_MAP 0x00000040
80 /* Is there drive info? */
81 #define MULTIBOOT_INFO_DRIVE_INFO 0x00000080
83 /* Is there a config table? */
84 #define MULTIBOOT_INFO_CONFIG_TABLE 0x00000100
86 /* Is there a boot loader name? */
87 #define MULTIBOOT_INFO_BOOT_LOADER_NAME 0x00000200
89 /* Is there a APM table? */
90 #define MULTIBOOT_INFO_APM_TABLE 0x00000400
92 /* Is there video information? */
93 #define MULTIBOOT_INFO_VIDEO_INFO 0x00000800
95 #endif /* ! MULTIBOOT_HEADER */