linker.ld: use all .data* and .bss* sections
[marionette.git] / kernel / multiboot.h
blob910327c916e7a979eb95f28723f5c071fa25ff4d
1 /*
2 * Copyright (c) 2008 Joshua Phillips. All rights reserved.
3 *
4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are
6 * met:
7 *
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in
12 * the documentation and/or other materials provided with the
13 * distribution.
15 * THIS SOFTWARE IS PROVIDED "AS IS" AND ANY EXPRESS OR IMPLIED
16 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 * DISCLAIMED. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY
19 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
21 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
22 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
23 * IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
25 * IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 #ifndef MULTIBOOT_H
29 #define MULTIBOOT_H
31 // magic numbers
32 #define MB_MBH_MAGIC 0x1BADB002 // magic number in multiboot header
33 #define MB_BOOT_MAGIC 0x2BADB002 // magic number in eax at startup
35 #define MBI_MEM_XXX 0x01
36 #define MBI_BOOT_DEVICE 0x02
37 #define MBI_CMDLINE 0x04
38 #define MBI_MODS_XXX 0x08
39 #define MBI_SYMS 0x30
40 #define MBI_MMAP_XXX 0x40
41 #define MBI_DRIVES_XXX 0x80
42 #define MBI_CONFIG_TABLE 0x100
43 #define MBI_BOOT_LOADER_NAME 0x200
44 #define MBI_APM_TABLE 0x400
45 #define MBI_VBE_XXX 0x800
47 struct mb_info {
48 unsigned long flags, mem_lower, mem_upper,
49 boot_device, cmd_line, mods_count, mods_addr,
50 syms[4], mmap_length, mmap_addr, drives_length,
51 drives_addr, config_table, boot_loader_name,
52 apm_table, vbe_control_info, vbe_mode_info,
53 vbe_mode, vbe_interface_seg, vbe_interface_off,
54 vbe_interface_len;
57 struct mb_module {
58 unsigned long mod_start, mod_end, string, reserved;
61 struct mb_mmap {
62 unsigned long size;
63 unsigned long long base_addr, length;
64 unsigned long type;
67 struct mb_drive {
68 unsigned long size;
69 unsigned char drive_number, drive_mode;
70 unsigned short drive_cylinders;
71 unsigned char drive_heads, drive_sectors;
72 unsigned short drive_ports[1];
75 #endif