NOVA
Stripped down NOVA kernel for the OSY course
Loading...
Searching...
No Matches
multiboot.h
1/*
2 * Multiboot Support
3 *
4 * Copyright (C) 2009-2011 Udo Steinberg <udo@hypervisor.org>
5 * Economic rights: Technische Universitaet Dresden (Germany)
6 *
7 * This file is part of the NOVA microhypervisor.
8 *
9 * NOVA is free software: you can redistribute it and/or modify it
10 * under the terms of the GNU General Public License version 2 as
11 * published by the Free Software Foundation.
12 *
13 * NOVA is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License version 2 for more details.
17 */
18
19#pragma once
20
21#include "compiler.h"
22
23/*
24 * Multiboot Information Structure
25 */
27{
28 public:
29 enum
30 {
31 MAGIC = 0x2badb002,
32 MEMORY = 1ul << 0,
33 BOOT_DEVICE = 1ul << 1,
34 CMDLINE = 1ul << 2,
35 MODULES = 1ul << 3,
36 SYMBOLS = 1ul << 4 | 1ul << 5,
37 MEMORY_MAP = 1ul << 6,
38 DRIVES = 1ul << 7,
39 CONFIG_TABLE = 1ul << 8,
40 LOADER_NAME = 1ul << 9,
41 APM_TABLE = 1ul << 10,
42 VBE_INFO = 1ul << 11
43 };
44
45 uint32 flags; // 0
46 uint32 mem_lower; // 4
47 uint32 mem_upper; // 8
48 uint32 boot_device; // 12
49 uint32 cmdline; // 16
50 uint32 mods_count; // 20
51 uint32 mods_addr; // 24
52 uint32 syms[4]; // 28,32,36,40
53 uint32 mmap_len; // 44
54 uint32 mmap_addr; // 48
55 uint32 drives_length; // 52
56 uint32 drives_addr; // 56
57 uint32 config_table; // 60
58 uint32 loader_name; // 64
59};
60
61/*
62 * Multiboot Module
63 */
65{
66 public:
67 uint32 mod_start;
68 uint32 mod_end;
69 uint32 cmdline;
70 uint32 reserved;
71};
72
73/*
74 * Multiboot Memory Map
75 */
76#pragma pack(1)
78{
79 public:
80 uint32 size;
81 uint64 addr;
82 uint64 len;
83 uint32 type;
84};
85#pragma pack()
Definition multiboot.h:78
Definition multiboot.h:65
Definition multiboot.h:27