xref: /openbmc/qemu/tests/multiboot/multiboot.h (revision d6032e06)
1 /*
2  * Copyright (c) 2013 Kevin Wolf <kwolf@redhat.com>
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a copy
5  * of this software and associated documentation files (the "Software"), to deal
6  * in the Software without restriction, including without limitation the rights
7  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8  * copies of the Software, and to permit persons to whom the Software is
9  * furnished to do so, subject to the following conditions:
10  *
11  * The above copyright notice and this permission notice shall be included in
12  * all copies or substantial portions of the Software.
13  *
14  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
20  * THE SOFTWARE.
21  */
22 
23 #ifndef MULTIBOOT_H
24 #define MULTIBOOT_H
25 
26 #include "libc.h"
27 
28 struct mb_info {
29     uint32_t    flags;
30     uint32_t    mem_lower;
31     uint32_t    mem_upper;
32     uint32_t    boot_device;
33     uint32_t    cmdline;
34     uint32_t    mods_count;
35     uint32_t    mods_addr;
36     char        syms[16];
37     uint32_t    mmap_length;
38     uint32_t    mmap_addr;
39     uint32_t    drives_length;
40     uint32_t    drives_addr;
41     uint32_t    config_table;
42     uint32_t    boot_loader_name;
43     uint32_t    apm_table;
44     uint32_t    vbe_control_info;
45     uint32_t    vbe_mode_info;
46     uint16_t    vbe_mode;
47     uint16_t    vbe_interface_seg;
48     uint16_t    vbe_interface_off;
49     uint16_t    vbe_interface_len;
50 } __attribute__((packed));
51 
52 struct mb_module {
53     uint32_t    mod_start;
54     uint32_t    mod_end;
55     uint32_t    string;
56     uint32_t    reserved;
57 } __attribute__((packed));
58 
59 struct mb_mmap_entry {
60     uint32_t    size;
61     uint64_t    base_addr;
62     uint64_t    length;
63     uint32_t    type;
64 } __attribute__((packed));
65 
66 #endif
67