2 * tag: header for multiboot
4 * Copyright (C) 2003 Stefan Reinauer
6 * See the file "COPYING" for further information about
7 * the copyright and warranty status of this work.
10 /* magic number for multiboot header */
11 #define MULTIBOOT_HEADER_MAGIC 0x1BADB002
13 /* flags for multiboot header */
14 #define MULTIBOOT_HEADER_FLAGS 0x00010003
16 /* magic number passed by multiboot-compliant boot loader. */
17 #define MULTIBOOT_BOOTLOADER_MAGIC 0x2BADB002
19 /* The size of our stack (8KB). */
20 #define STACK_SIZE 0x2000
22 /* C symbol format. HAVE_ASM_USCORE is defined by configure. */
23 #ifdef HAVE_ASM_USCORE
24 # define EXT_C(sym) _ ## sym
26 # define EXT_C(sym) sym
30 /* We don't want these declarations in boot.S */
32 /* multiboot header */
33 typedef struct multiboot_header
{
36 unsigned long checksum
;
37 unsigned long header_addr
;
38 unsigned long load_addr
;
39 unsigned long load_end_addr
;
40 unsigned long bss_end_addr
;
41 unsigned long entry_addr
;
44 /* symbol table for a.out */
45 typedef struct aout_symbol_table
{
46 unsigned long tabsize
;
47 unsigned long strsize
;
49 unsigned long reserved
;
50 } aout_symbol_table_t
;
52 /* section header table for ELF */
53 typedef struct elf_section_header_table
{
58 } elf_section_header_table_t
;
60 /* multiboot information */
61 typedef struct multiboot_info
{
63 unsigned long mem_lower
;
64 unsigned long mem_upper
;
65 unsigned long boot_device
;
66 unsigned long cmdline
;
67 unsigned long mods_count
;
68 unsigned long mods_addr
;
70 aout_symbol_table_t aout_sym
;
71 elf_section_header_table_t elf_sec
;
73 unsigned long mmap_length
;
74 unsigned long mmap_addr
;
77 /* module structure */
78 typedef struct module
{
79 unsigned long mod_start
;
80 unsigned long mod_end
;
82 unsigned long reserved
;
85 /* memory map. Be careful that the offset 0 is base_addr_low
87 typedef struct memory_map
{
89 unsigned long base_addr_low
;
90 unsigned long base_addr_high
;
91 unsigned long length_low
;
92 unsigned long length_high
;