[FREELDR] Limit the usage of DiskStopFloppyMotor() in hardware/platform-specific...
[reactos.git] / boot / freeldr / freeldr / include / multiboot.h
1 /* multiboot.h - the header for Multiboot */
2 /* Copyright (C) 1999 Free Software Foundation, Inc.
3
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.
8
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.
13
14 You should have received a copy of the GNU General Public License along
15 with this program; if not, write to the Free Software Foundation, Inc.,
16 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17 */
18
19 #ifndef __ASM__
20 #pragma once
21 #endif
22
23 /* Macros. */
24
25 /* The magic number for the Multiboot header. */
26 #define MULTIBOOT_HEADER_MAGIC HEX(1BADB002)
27
28 /* The flags for the Multiboot header. */
29 #define MULTIBOOT_HEADER_FLAGS HEX(00010003)
30
31 /* The magic number passed by a Multiboot-compliant boot loader. */
32 #define MULTIBOOT_BOOTLOADER_MAGIC HEX(2BADB002)
33
34 /* The size of our stack (16KB). */
35 #define STACK_SIZE 0x4000
36
37 /* C symbol format. HAVE_ASM_USCORE is defined by configure. */
38 #ifdef HAVE_ASM_USCORE
39 # define EXT_C(sym) _ ## sym
40 #else
41 # define EXT_C(sym) sym
42 #endif
43
44 #define MB_INFO_FLAG_MEM_SIZE HEX(00000001)
45 #define MB_INFO_FLAG_BOOT_DEVICE HEX(00000002)
46 #define MB_INFO_FLAG_COMMAND_LINE HEX(00000004)
47 #define MB_INFO_FLAG_MODULES HEX(00000008)
48 #define MB_INFO_FLAG_AOUT_SYMS HEX(00000010)
49 #define MB_INFO_FLAG_ELF_SYMS HEX(00000020)
50 #define MB_INFO_FLAG_MEMORY_MAP HEX(00000040)
51 #define MB_INFO_FLAG_DRIVES HEX(00000080)
52 #define MB_INFO_FLAG_CONFIG_TABLE HEX(00000100)
53 #define MB_INFO_FLAG_BOOT_LOADER_NAME HEX(00000200)
54 #define MB_INFO_FLAG_APM_TABLE HEX(00000400)
55 #define MB_INFO_FLAG_GRAPHICS_TABLE HEX(00000800)
56
57 #ifndef __ASM__
58 /* Do not include here in boot.S. */
59
60 /* Types. */
61
62 /* The Multiboot header. */
63 typedef struct multiboot_header
64 {
65 unsigned long magic;
66 unsigned long flags;
67 unsigned long checksum;
68 unsigned long header_addr;
69 unsigned long load_addr;
70 unsigned long load_end_addr;
71 unsigned long bss_end_addr;
72 unsigned long entry_addr;
73 } multiboot_header_t;
74
75 /* The symbol table for a.out. */
76 typedef struct aout_symbol_table
77 {
78 unsigned long tabsize;
79 unsigned long strsize;
80 unsigned long addr;
81 unsigned long reserved;
82 } aout_symbol_table_t;
83
84 /* The section header table for ELF. */
85 typedef struct elf_section_header_table
86 {
87 unsigned long num;
88 unsigned long size;
89 unsigned long addr;
90 unsigned long shndx;
91 } elf_section_header_table_t;
92
93 /* The memory map. Be careful that the offset 0 is base_addr_low
94 but no size. */
95 typedef struct memory_map
96 {
97 //unsigned long size;
98 unsigned long base_addr_low;
99 unsigned long base_addr_high;
100 unsigned long length_low;
101 unsigned long length_high;
102 unsigned long type;
103 unsigned long reserved;
104 } memory_map_t;
105
106 #endif /* ! __ASM__ */