1
/* multiboot.h - the header for Multiboot */
2
/* Copyright (C) 1999, 2001 Free Software Foundation, Inc.
4
This program is free software; you can redistribute it and/or modify
5
it under the terms of the GNU General Public License as published by
6
the Free Software Foundation; either version 2 of the License, or
7
(at your option) any later version.
9
This program is distributed in the hope that it will be useful,
10
but WITHOUT ANY WARRANTY; without even the implied warranty of
11
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
GNU General Public License for more details.
14
You should have received a copy of the GNU General Public License
15
along with this program; if not, write to the Free Software
16
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
20
/* The magic number for the Multiboot header. */
21
#define MULTIBOOT_HEADER_MAGIC 0x1BADB002
23
/* The flags for the Multiboot header. */
25
# define MULTIBOOT_HEADER_FLAGS 0x00000003
27
# define MULTIBOOT_HEADER_FLAGS 0x00010003
30
/* The magic number passed by a Multiboot-compliant boot loader. */
31
#define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002
33
/* The size of our stack (16KB). */
34
#define STACK_SIZE 0x4000
36
/* C symbol format. HAVE_ASM_USCORE is defined by configure. */
37
#ifdef HAVE_ASM_USCORE
38
# define EXT_C(sym) _ ## sym
40
# define EXT_C(sym) sym
44
/* Do not include here in boot.S. */
48
/* The Multiboot header. */
49
typedef struct multiboot_header
53
unsigned long checksum;
54
unsigned long header_addr;
55
unsigned long load_addr;
56
unsigned long load_end_addr;
57
unsigned long bss_end_addr;
58
unsigned long entry_addr;
61
/* The symbol table for a.out. */
62
typedef struct aout_symbol_table
64
unsigned long tabsize;
65
unsigned long strsize;
67
unsigned long reserved;
68
} aout_symbol_table_t;
70
/* The section header table for ELF. */
71
typedef struct elf_section_header_table
77
} elf_section_header_table_t;
79
/* The Multiboot information. */
80
typedef struct multiboot_info
83
unsigned long mem_lower;
84
unsigned long mem_upper;
85
unsigned long boot_device;
86
unsigned long cmdline;
87
unsigned long mods_count;
88
unsigned long mods_addr;
91
aout_symbol_table_t aout_sym;
92
elf_section_header_table_t elf_sec;
94
unsigned long mmap_length;
95
unsigned long mmap_addr;
98
/* The module structure. */
101
unsigned long mod_start;
102
unsigned long mod_end;
103
unsigned long string;
104
unsigned long reserved;
107
/* The memory map. Be careful that the offset 0 is base_addr_low
109
typedef struct memory_map
112
unsigned long base_addr_low;
113
unsigned long base_addr_high;
114
unsigned long length_low;
115
unsigned long length_high;