blob: d2be87b75318d6856763b58936f775beefd58d4b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
|
#ifndef _MULTIBOOT_H_
#define _MULTIBOOT_H_
#include <stdint.h>
struct multiboot_header
{
uint32_t magic;
uint32_t flags;
/* The above fields plus this one must equal 0 mod 2^32. */
uint32_t checksum;
/* These are only valid if MULTIBOOT_AOUT_KLUDGE is set. */
uint32_t header_addr;
uint32_t load_addr;
uint32_t load_end_addr;
uint32_t bss_end_addr;
uint32_t entry_addr;
/* These are only valid if MULTIBOOT_VIDEO_MODE is set. */
uint32_t mode_type;
uint32_t width;
uint32_t height;
uint32_t depth;
};
/* The symbol table for a.out. */
struct multiboot_aout_symbol_table
{
uint32_t tabsize;
uint32_t strsize;
uint32_t addr;
uint32_t reserved;
};
/* The section header table for ELF. */
struct multiboot_elf_section_header_table
{
uint32_t num;
uint32_t size;
uint32_t addr;
uint32_t shndx;
};
struct multiboot_info
{
/* Multiboot info version number */
uint32_t flags;
/* Available memory from BIOS */
uint32_t mem_lower;
uint32_t mem_upper;
/* "root" partition */
uint32_t boot_device;
/* Kernel command line */
uint32_t cmdline;
/* Boot-Module list */
uint32_t mods_count;
uint32_t mods_addr;
union
{
struct multiboot_aout_symbol_table aout_sym;
struct multiboot_elf_section_header_table elf_sec;
} u;
/* Memory Mapping buffer */
uint32_t mmap_length;
uint32_t mmap_addr;
/* Drive Info buffer */
uint32_t drives_length;
uint32_t drives_addr;
/* ROM configuration table */
uint32_t config_table;
/* Boot Loader Name */
uint32_t boot_loader_name;
/* APM table */
uint32_t apm_table;
/* Video */
uint32_t vbe_control_info;
uint32_t vbe_mode_info;
uint16_t vbe_mode;
uint16_t vbe_interface_seg;
uint16_t vbe_interface_off;
uint16_t vbe_interface_len;
uint64_t framebuffer_addr;
uint32_t framebuffer_pitch;
uint32_t framebuffer_width;
uint32_t framebuffer_height;
uint8_t framebuffer_bpp;
#define MULTIBOOT_FRAMEBUFFER_TYPE_INDEXED 0
#define MULTIBOOT_FRAMEBUFFER_TYPE_RGB 1
#define MULTIBOOT_FRAMEBUFFER_TYPE_EGA_TEXT 2
uint8_t framebuffer_type;
union
{
struct
{
uint32_t framebuffer_palette_addr;
uint16_t framebuffer_palette_num_colors;
};
struct
{
uint8_t framebuffer_red_field_position;
uint8_t framebuffer_red_mask_size;
uint8_t framebuffer_green_field_position;
uint8_t framebuffer_green_mask_size;
uint8_t framebuffer_blue_field_position;
uint8_t framebuffer_blue_mask_size;
};
};
};
struct multiboot_color
{
uint8_t red;
uint8_t green;
uint8_t blue;
};
struct multiboot_mmap_entry
{
uint32_t size;
uint64_t addr;
uint64_t len;
#define MULTIBOOT_MEMORY_AVAILABLE 1
#define MULTIBOOT_MEMORY_RESERVED 2
#define MULTIBOOT_MEMORY_ACPI_RECLAIMABLE 3
#define MULTIBOOT_MEMORY_NVS 4
#define MULTIBOOT_MEMORY_BADRAM 5
uint32_t type;
} __attribute__((packed));
struct multiboot_mod_list
{
/* the memory used goes from bytes ’mod_start’ to ’mod_end-1’ inclusive */
uint32_t mod_start;
uint32_t mod_end;
/* Module command line */
uint32_t cmdline;
/* padding to take it to 16 bytes (must be zero) */
uint32_t pad;
};
/* APM BIOS info. */
struct multiboot_apm_info
{
uint16_t version;
uint16_t cseg;
uint32_t offset;
uint16_t cseg_16;
uint16_t dseg;
uint16_t flags;
uint16_t cseg_len;
uint16_t cseg_16_len;
uint16_t dseg_len;
};
#endif
|