Pip
Architecture-dependent parts of Pip: MAL, IAL and boot
multiboot.h
Go to the documentation of this file.
1 /*******************************************************************************/
2 /* © Université de Lille, The Pip Development Team (2015-2021) */
3 /* */
4 /* This software is a computer program whose purpose is to run a minimal, */
5 /* hypervisor relying on proven properties such as memory isolation. */
6 /* */
7 /* This software is governed by the CeCILL license under French law and */
8 /* abiding by the rules of distribution of free software. You can use, */
9 /* modify and/ or redistribute the software under the terms of the CeCILL */
10 /* license as circulated by CEA, CNRS and INRIA at the following URL */
11 /* "http://www.cecill.info". */
12 /* */
13 /* As a counterpart to the access to the source code and rights to copy, */
14 /* modify and redistribute granted by the license, users are provided only */
15 /* with a limited warranty and the software's author, the holder of the */
16 /* economic rights, and the successive licensors have only limited */
17 /* liability. */
18 /* */
19 /* In this respect, the user's attention is drawn to the risks associated */
20 /* with loading, using, modifying and/or developing or reproducing the */
21 /* software by the user in light of its specific status of free software, */
22 /* that may mean that it is complicated to manipulate, and that also */
23 /* therefore means that it is reserved for developers and experienced */
24 /* professionals having in-depth computer knowledge. Users are therefore */
25 /* encouraged to load and test the software's suitability as regards their */
26 /* requirements in conditions enabling the security of their systems and/or */
27 /* data to be ensured and, more generally, to use and operate it in the */
28 /* same conditions as regards security. */
29 /* */
30 /* The fact that you are presently reading this means that you have had */
31 /* knowledge of the CeCILL license and that you accept its terms. */
32 /*******************************************************************************/
33 
39 #ifndef __MULTIBOOT_HEADER__
40 #define __MULTIBOOT_HEADER__
41 
42 #include <stdint.h>
43 
44 #define MULTIBOOT_FLAG_MEM 0x001
45 #define MULTIBOOT_FLAG_DEVICE 0x002
46 #define MULTIBOOT_FLAG_CMDLINE 0x004
47 #define MULTIBOOT_FLAG_MODS 0x008
48 #define MULTIBOOT_FLAG_AOUT 0x010
49 #define MULTIBOOT_FLAG_ELF 0x020
50 #define MULTIBOOT_FLAG_MMAP 0x040
51 #define MULTIBOOT_FLAG_CONFIG 0x080
52 #define MULTIBOOT_FLAG_LOADER 0x100
53 #define MULTIBOOT_FLAG_APM 0x200
54 #define MULTIBOOT_FLAG_VBE 0x400
55 
56 #define MULTIBOOT_MEMORY_AVAILABLE 1
57 #define MULTIBOOT_MEMORY_RESERVED 2
58 #define MULTIBOOT_MEMORY_ACPI_RECLAIMABLE 3
59 #define MULTIBOOT_MEMORY_NVS 4
60 #define MULTIBOOT_MEMORY_BADRAM 5
61 
62 
66 struct multiboot
67 {
68  uint32_t flags;
69  uint32_t mem_lower;
70  uint32_t mem_upper;
71  uint32_t boot_device;
72  uint32_t cmdline;
73  uint32_t mods_count;
74  uint32_t mods_addr;
75  uint32_t num;
76  uint32_t size;
77  uint32_t addr;
78  uint32_t shndx;
79  uint32_t mmap_length;
80  uint32_t mmap_addr;
81  uint32_t drives_length;
82  uint32_t drives_addr;
83  uint32_t config_table;
84  uint32_t boot_loader_name;
85  uint32_t apm_table;
86  uint32_t vbe_control_info;
87  uint32_t vbe_mode_info;
88  uint32_t vbe_mode;
89  uint32_t vbe_interface_seg;
90  uint32_t vbe_interface_off;
91  uint32_t vbe_interface_len;
92 } __attribute__((packed));
93 
94 typedef struct multiboot_header multiboot_header_t;
95 
100 typedef struct multiboot_memory_map {
101  unsigned int size;
102  unsigned int base_addr_low;
103  unsigned int base_addr_high;
104  unsigned int length_low;
105  unsigned int length_high;
106  unsigned int type;
108 
109 #endif // __MULTIBOOT_HEADER__
unsigned int type
Memory type.
Definition: multiboot.h:106
unsigned int length_high
Higher bytes of the length.
Definition: multiboot.h:105
uint32_t vbe_interface_off
VBE3.0 interface segment offset.
Definition: multiboot.h:90
uint32_t vbe_interface_seg
VBE3.0 interface segment.
Definition: multiboot.h:89
uint32_t flags
Header flags.
Definition: multiboot.h:68
uint32_t mods_addr
Address to the first module structure.
Definition: multiboot.h:74
struct multiboot_header multiboot_header_t
Multiboot header structure define.
Definition: multiboot.h:94
uint32_t mmap_addr
Memory map address.
Definition: multiboot.h:80
uint32_t config_table
Configuration table address.
Definition: multiboot.h:83
unsigned int size
Size of this entry.
Definition: multiboot.h:101
Memory map structure.
Definition: multiboot.h:100
uint32_t size
This is reserved by symbol table & ELF headers.
Definition: multiboot.h:76
unsigned int base_addr_high
Higher bytes of the base address.
Definition: multiboot.h:103
unsigned int base_addr_low
Lower bytes of the base address.
Definition: multiboot.h:102
struct multiboot_memory_map multiboot_memory_map_t
uint32_t apm_table
Pointer to the APM table.
Definition: multiboot.h:85
uint32_t vbe_interface_len
VBE3.0 interface segment length.
Definition: multiboot.h:91
uint32_t vbe_mode
Current VBE mode.
Definition: multiboot.h:88
uint32_t shndx
This is reserved by symbol table & ELF headers.
Definition: multiboot.h:78
uint32_t vbe_control_info
Pointer to the VBE control info structure.
Definition: multiboot.h:86
uint32_t drives_addr
Drive map address.
Definition: multiboot.h:82
Multiboot header info.
Definition: multiboot.h:66
unsigned int length_low
Lower bytes of the length.
Definition: multiboot.h:104
uint32_t addr
This is reserved by symbol table & ELF headers.
Definition: multiboot.h:77
uint32_t boot_device
Boot device ID.
Definition: multiboot.h:71
uint32_t cmdline
Pointer to the boot command line.
Definition: multiboot.h:72
uint32_t num
This is reserved by symbol table & ELF headers.
Definition: multiboot.h:75
uint32_t mmap_length
Memory map length.
Definition: multiboot.h:79
uint32_t vbe_mode_info
Pointer to the VBE mode info structure.
Definition: multiboot.h:87
struct multiboot __attribute__((packed))
uint32_t mem_upper
Upper memory available.
Definition: multiboot.h:70
uint32_t mem_lower
Lower memory available.
Definition: multiboot.h:69
uint32_t boot_loader_name
Pointer to the bootloader&#39;s name.
Definition: multiboot.h:84
uint32_t drives_length
Drive map length.
Definition: multiboot.h:81
uint32_t mods_count
Amount of modules loaded.
Definition: multiboot.h:73