xref: /titanic_50/usr/src/uts/common/sys/multiboot2.h (revision d2670fc40c4567a1426992012f9a8666e3fa1098)
1*d2670fc4SToomas Soome /*
2*d2670fc4SToomas Soome  * Copyright (C) 1999,2003,2007,2008,2009,2010  Free Software Foundation, Inc.
3*d2670fc4SToomas Soome  *
4*d2670fc4SToomas Soome  * Permission is hereby granted, free of charge, to any person obtaining a copy
5*d2670fc4SToomas Soome  * of this software and associated documentation files (the "Software"), to
6*d2670fc4SToomas Soome  * deal in the Software without restriction, including without limitation the
7*d2670fc4SToomas Soome  * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
8*d2670fc4SToomas Soome  * sell copies of the Software, and to permit persons to whom the Software is
9*d2670fc4SToomas Soome  * furnished to do so, subject to the following conditions:
10*d2670fc4SToomas Soome  *
11*d2670fc4SToomas Soome  * The above copyright notice and this permission notice shall be included in
12*d2670fc4SToomas Soome  * all copies or substantial portions of the Software.
13*d2670fc4SToomas Soome  *
14*d2670fc4SToomas Soome  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15*d2670fc4SToomas Soome  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16*d2670fc4SToomas Soome  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL ANY
17*d2670fc4SToomas Soome  * DEVELOPER OR DISTRIBUTOR BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
18*d2670fc4SToomas Soome  * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
19*d2670fc4SToomas Soome  * IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20*d2670fc4SToomas Soome  */
21*d2670fc4SToomas Soome 
22*d2670fc4SToomas Soome /*
23*d2670fc4SToomas Soome  * Copyright 2016 Toomas Soome <tsoome@me.com>
24*d2670fc4SToomas Soome  */
25*d2670fc4SToomas Soome 
26*d2670fc4SToomas Soome /*
27*d2670fc4SToomas Soome  * This header contains definitions for Multiboot 2 boot protocol, based on
28*d2670fc4SToomas Soome  * the reference implementation by grub 2.
29*d2670fc4SToomas Soome  *
30*d2670fc4SToomas Soome  * At the time this was written (Jan 2017), the Multiboot 2 documentation is in
31*d2670fc4SToomas Soome  * process of being rewritten and the information in the specification is not
32*d2670fc4SToomas Soome  * entirely correct. Instead, you must rely on grub 2 source code.
33*d2670fc4SToomas Soome  *
34*d2670fc4SToomas Soome  * This header provides essential support for the Multiboot 2 specification
35*d2670fc4SToomas Soome  * for illumos and makes it possible to pass the needed structures from the
36*d2670fc4SToomas Soome  * boot loader to the kernel.
37*d2670fc4SToomas Soome  */
38*d2670fc4SToomas Soome 
39*d2670fc4SToomas Soome #ifndef	_SYS_MULTIBOOT2_H
40*d2670fc4SToomas Soome #define	_SYS_MULTIBOOT2_H
41*d2670fc4SToomas Soome 
42*d2670fc4SToomas Soome #ifdef	__cplusplus
43*d2670fc4SToomas Soome extern "C" {
44*d2670fc4SToomas Soome #endif
45*d2670fc4SToomas Soome 
46*d2670fc4SToomas Soome /* How many bytes from the start of the file we search for the header.  */
47*d2670fc4SToomas Soome #define	MULTIBOOT_SEARCH			32768
48*d2670fc4SToomas Soome #define	MULTIBOOT_HEADER_ALIGN			8
49*d2670fc4SToomas Soome 
50*d2670fc4SToomas Soome /* The magic field should contain this.  */
51*d2670fc4SToomas Soome #define	MULTIBOOT2_HEADER_MAGIC			0xe85250d6
52*d2670fc4SToomas Soome 
53*d2670fc4SToomas Soome /* This should be in %eax.  */
54*d2670fc4SToomas Soome #define	MULTIBOOT2_BOOTLOADER_MAGIC		0x36d76289
55*d2670fc4SToomas Soome 
56*d2670fc4SToomas Soome /* Alignment of multiboot modules.  */
57*d2670fc4SToomas Soome #if defined(__i386) || defined(__amd64)
58*d2670fc4SToomas Soome #define	MULTIBOOT_MOD_ALIGN			0x00001000
59*d2670fc4SToomas Soome #else
60*d2670fc4SToomas Soome #error No architecture defined
61*d2670fc4SToomas Soome #endif
62*d2670fc4SToomas Soome 
63*d2670fc4SToomas Soome /* Alignment of the multiboot info structure.  */
64*d2670fc4SToomas Soome #define	MULTIBOOT_INFO_ALIGN			0x00000008
65*d2670fc4SToomas Soome 
66*d2670fc4SToomas Soome /* Flags set in the 'flags' member of the multiboot header.  */
67*d2670fc4SToomas Soome 
68*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_ALIGN			8
69*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_END			0
70*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_CMDLINE		1
71*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_BOOT_LOADER_NAME	2
72*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_MODULE		3
73*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_BASIC_MEMINFO	4
74*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_BOOTDEV		5
75*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_MMAP			6
76*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_VBE			7
77*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_FRAMEBUFFER		8
78*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_ELF_SECTIONS		9
79*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_APM			10
80*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_EFI32		11
81*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_EFI64		12
82*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_SMBIOS		13
83*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_ACPI_OLD		14
84*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_ACPI_NEW		15
85*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_NETWORK		16
86*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_EFI_MMAP		17
87*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_EFI_BS		18
88*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_EFI32_IH		19
89*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_EFI64_IH		20
90*d2670fc4SToomas Soome #define	MULTIBOOT_TAG_TYPE_LOAD_BASE_ADDR	21
91*d2670fc4SToomas Soome 
92*d2670fc4SToomas Soome #define	MULTIBOOT_HEADER_TAG_END			0
93*d2670fc4SToomas Soome #define	MULTIBOOT_HEADER_TAG_INFORMATION_REQUEST	1
94*d2670fc4SToomas Soome #define	MULTIBOOT_HEADER_TAG_ADDRESS			2
95*d2670fc4SToomas Soome #define	MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS		3
96*d2670fc4SToomas Soome #define	MULTIBOOT_HEADER_TAG_CONSOLE_FLAGS		4
97*d2670fc4SToomas Soome #define	MULTIBOOT_HEADER_TAG_FRAMEBUFFER		5
98*d2670fc4SToomas Soome #define	MULTIBOOT_HEADER_TAG_MODULE_ALIGN		6
99*d2670fc4SToomas Soome #define	MULTIBOOT_HEADER_TAG_EFI_BS			7
100*d2670fc4SToomas Soome #define	MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS_EFI32	8
101*d2670fc4SToomas Soome #define	MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS_EFI64	9
102*d2670fc4SToomas Soome #define	MULTIBOOT_HEADER_TAG_RELOCATABLE		10
103*d2670fc4SToomas Soome 
104*d2670fc4SToomas Soome #define	MULTIBOOT_ARCHITECTURE_I386	0
105*d2670fc4SToomas Soome #define	MULTIBOOT_ARCHITECTURE_MIPS32	4
106*d2670fc4SToomas Soome #define	MULTIBOOT_HEADER_TAG_OPTIONAL	1
107*d2670fc4SToomas Soome 
108*d2670fc4SToomas Soome /* Hints for relocatable kernel load preference */
109*d2670fc4SToomas Soome #define	MULTIBOOT_LOAD_PREFERENCE_NONE	0
110*d2670fc4SToomas Soome #define	MULTIBOOT_LOAD_PREFERENCE_LOW	1
111*d2670fc4SToomas Soome #define	MULTIBOOT_LOAD_PREFERENCE_HIGH	2
112*d2670fc4SToomas Soome 
113*d2670fc4SToomas Soome /* Values for console_flags field in tag multiboot_header_tag_console_flags. */
114*d2670fc4SToomas Soome #define	MULTIBOOT_CONSOLE_FLAGS_CONSOLE_REQUIRED	1
115*d2670fc4SToomas Soome #define	MULTIBOOT_CONSOLE_FLAGS_EGA_TEXT_SUPPORTED	2
116*d2670fc4SToomas Soome 
117*d2670fc4SToomas Soome #ifndef _ASM
118*d2670fc4SToomas Soome 
119*d2670fc4SToomas Soome #include <sys/stdint.h>
120*d2670fc4SToomas Soome 
121*d2670fc4SToomas Soome #pragma pack(1)
122*d2670fc4SToomas Soome 
123*d2670fc4SToomas Soome typedef struct multiboot_header_tag {
124*d2670fc4SToomas Soome 	uint16_t mbh_type;
125*d2670fc4SToomas Soome 	uint16_t mbh_flags;
126*d2670fc4SToomas Soome 	uint32_t mbh_size;
127*d2670fc4SToomas Soome } multiboot_header_tag_t;
128*d2670fc4SToomas Soome 
129*d2670fc4SToomas Soome typedef struct multiboot2_header {
130*d2670fc4SToomas Soome 	/* Must be MULTIBOOT2_MAGIC - see above.  */
131*d2670fc4SToomas Soome 	uint32_t mb2_magic;
132*d2670fc4SToomas Soome 
133*d2670fc4SToomas Soome 	/* ISA */
134*d2670fc4SToomas Soome 	uint32_t mb2_architecture;
135*d2670fc4SToomas Soome 
136*d2670fc4SToomas Soome 	/* Total header length.  */
137*d2670fc4SToomas Soome 	uint32_t mb2_header_length;
138*d2670fc4SToomas Soome 
139*d2670fc4SToomas Soome 	/* The above fields plus this one must equal 0 mod 2^32. */
140*d2670fc4SToomas Soome 	uint32_t mb2_checksum;
141*d2670fc4SToomas Soome 	multiboot_header_tag_t mb2_tags[];
142*d2670fc4SToomas Soome } multiboot2_header_t;
143*d2670fc4SToomas Soome 
144*d2670fc4SToomas Soome typedef struct multiboot_header_tag_information_request {
145*d2670fc4SToomas Soome 	uint16_t mbh_type;
146*d2670fc4SToomas Soome 	uint16_t mbh_flags;
147*d2670fc4SToomas Soome 	uint32_t mbh_size;
148*d2670fc4SToomas Soome 	uint32_t mbh_requests[];
149*d2670fc4SToomas Soome } multiboot_header_tag_information_request_t;
150*d2670fc4SToomas Soome 
151*d2670fc4SToomas Soome typedef struct multiboot_header_tag_address {
152*d2670fc4SToomas Soome 	uint16_t mbh_type;
153*d2670fc4SToomas Soome 	uint16_t mbh_flags;
154*d2670fc4SToomas Soome 	uint32_t mbh_size;
155*d2670fc4SToomas Soome 	uint32_t mbh_header_addr;
156*d2670fc4SToomas Soome 	uint32_t mbh_load_addr;
157*d2670fc4SToomas Soome 	uint32_t mbh_load_end_addr;
158*d2670fc4SToomas Soome 	uint32_t mbh_bss_end_addr;
159*d2670fc4SToomas Soome } multiboot_header_tag_address_t;
160*d2670fc4SToomas Soome 
161*d2670fc4SToomas Soome typedef struct multiboot_header_tag_entry_address {
162*d2670fc4SToomas Soome 	uint16_t mbh_type;
163*d2670fc4SToomas Soome 	uint16_t mbh_flags;
164*d2670fc4SToomas Soome 	uint32_t mbh_size;
165*d2670fc4SToomas Soome 	uint32_t mbh_entry_addr;
166*d2670fc4SToomas Soome } multiboot_header_tag_entry_address_t;
167*d2670fc4SToomas Soome 
168*d2670fc4SToomas Soome typedef struct multiboot_header_tag_console_flags {
169*d2670fc4SToomas Soome 	uint16_t mbh_type;
170*d2670fc4SToomas Soome 	uint16_t mbh_flags;
171*d2670fc4SToomas Soome 	uint32_t mbh_size;
172*d2670fc4SToomas Soome 	uint32_t mbh_console_flags;
173*d2670fc4SToomas Soome } multiboot_header_tag_console_flags_t;
174*d2670fc4SToomas Soome 
175*d2670fc4SToomas Soome typedef struct multiboot_header_tag_framebuffer {
176*d2670fc4SToomas Soome 	uint16_t mbh_type;
177*d2670fc4SToomas Soome 	uint16_t mbh_flags;
178*d2670fc4SToomas Soome 	uint32_t mbh_size;
179*d2670fc4SToomas Soome 	uint32_t mbh_width;
180*d2670fc4SToomas Soome 	uint32_t mbh_height;
181*d2670fc4SToomas Soome 	uint32_t mbh_depth;
182*d2670fc4SToomas Soome } multiboot_header_tag_framebuffer_t;
183*d2670fc4SToomas Soome 
184*d2670fc4SToomas Soome typedef struct multiboot_header_tag_module_align {
185*d2670fc4SToomas Soome 	uint16_t mbh_type;
186*d2670fc4SToomas Soome 	uint16_t mbh_flags;
187*d2670fc4SToomas Soome 	uint32_t mbh_size;
188*d2670fc4SToomas Soome } multiboot_header_tag_module_align_t;
189*d2670fc4SToomas Soome 
190*d2670fc4SToomas Soome typedef struct multiboot_header_tag_relocatable {
191*d2670fc4SToomas Soome 	uint16_t mbh_type;
192*d2670fc4SToomas Soome 	uint16_t mbh_flags;
193*d2670fc4SToomas Soome 	uint32_t mbh_size;
194*d2670fc4SToomas Soome 	uint32_t mbh_min_addr;
195*d2670fc4SToomas Soome 	uint32_t mbh_max_addr;
196*d2670fc4SToomas Soome 	uint32_t mbh_align;
197*d2670fc4SToomas Soome 	uint32_t mbh_preference;
198*d2670fc4SToomas Soome } multiboot_header_tag_relocatable_t;
199*d2670fc4SToomas Soome 
200*d2670fc4SToomas Soome typedef struct multiboot_color {
201*d2670fc4SToomas Soome 	uint8_t mb_red;
202*d2670fc4SToomas Soome 	uint8_t mb_green;
203*d2670fc4SToomas Soome 	uint8_t mb_blue;
204*d2670fc4SToomas Soome } multiboot_color_t;
205*d2670fc4SToomas Soome 
206*d2670fc4SToomas Soome typedef struct multiboot_mmap_entry {
207*d2670fc4SToomas Soome 	uint64_t mmap_addr;
208*d2670fc4SToomas Soome 	uint64_t mmap_len;
209*d2670fc4SToomas Soome #define	MULTIBOOT_MEMORY_AVAILABLE		1
210*d2670fc4SToomas Soome #define	MULTIBOOT_MEMORY_RESERVED		2
211*d2670fc4SToomas Soome #define	MULTIBOOT_MEMORY_ACPI_RECLAIMABLE	3
212*d2670fc4SToomas Soome #define	MULTIBOOT_MEMORY_NVS			4
213*d2670fc4SToomas Soome #define	MULTIBOOT_MEMORY_BADRAM			5
214*d2670fc4SToomas Soome 	uint32_t mmap_type;
215*d2670fc4SToomas Soome 	uint32_t mmap_reserved;
216*d2670fc4SToomas Soome } multiboot_mmap_entry_t;
217*d2670fc4SToomas Soome 
218*d2670fc4SToomas Soome typedef struct multiboot_tag {
219*d2670fc4SToomas Soome 	uint32_t mb_type;
220*d2670fc4SToomas Soome 	uint32_t mb_size;
221*d2670fc4SToomas Soome } multiboot_tag_t;
222*d2670fc4SToomas Soome 
223*d2670fc4SToomas Soome typedef struct multiboot2_info_header {
224*d2670fc4SToomas Soome 	uint32_t mbi_total_size;
225*d2670fc4SToomas Soome 	uint32_t mbi_reserved;
226*d2670fc4SToomas Soome 	multiboot_tag_t mbi_tags[];
227*d2670fc4SToomas Soome } multiboot2_info_header_t;
228*d2670fc4SToomas Soome 
229*d2670fc4SToomas Soome typedef struct multiboot_tag_string {
230*d2670fc4SToomas Soome 	uint32_t mb_type;
231*d2670fc4SToomas Soome 	uint32_t mb_size;
232*d2670fc4SToomas Soome 	char mb_string[];
233*d2670fc4SToomas Soome } multiboot_tag_string_t;
234*d2670fc4SToomas Soome 
235*d2670fc4SToomas Soome typedef struct multiboot_tag_module {
236*d2670fc4SToomas Soome 	uint32_t mb_type;
237*d2670fc4SToomas Soome 	uint32_t mb_size;
238*d2670fc4SToomas Soome 	uint32_t mb_mod_start;
239*d2670fc4SToomas Soome 	uint32_t mb_mod_end;
240*d2670fc4SToomas Soome 	char mb_cmdline[];
241*d2670fc4SToomas Soome } multiboot_tag_module_t;
242*d2670fc4SToomas Soome 
243*d2670fc4SToomas Soome typedef struct multiboot_tag_basic_meminfo {
244*d2670fc4SToomas Soome 	uint32_t mb_type;
245*d2670fc4SToomas Soome 	uint32_t mb_size;
246*d2670fc4SToomas Soome 	uint32_t mb_mem_lower;
247*d2670fc4SToomas Soome 	uint32_t mb_mem_upper;
248*d2670fc4SToomas Soome } multiboot_tag_basic_meminfo_t;
249*d2670fc4SToomas Soome 
250*d2670fc4SToomas Soome typedef struct multiboot_tag_bootdev {
251*d2670fc4SToomas Soome 	uint32_t mb_type;
252*d2670fc4SToomas Soome 	uint32_t mb_size;
253*d2670fc4SToomas Soome 	uint32_t mb_biosdev;
254*d2670fc4SToomas Soome 	uint32_t mb_slice;
255*d2670fc4SToomas Soome 	uint32_t mb_part;
256*d2670fc4SToomas Soome } multiboot_tag_bootdev_t;
257*d2670fc4SToomas Soome 
258*d2670fc4SToomas Soome typedef struct multiboot_tag_mmap {
259*d2670fc4SToomas Soome 	uint32_t mb_type;
260*d2670fc4SToomas Soome 	uint32_t mb_size;
261*d2670fc4SToomas Soome 	uint32_t mb_entry_size;
262*d2670fc4SToomas Soome 	uint32_t mb_entry_version;
263*d2670fc4SToomas Soome 	uint8_t mb_entries[];
264*d2670fc4SToomas Soome } multiboot_tag_mmap_t;
265*d2670fc4SToomas Soome 
266*d2670fc4SToomas Soome struct multiboot_vbe_info_block {
267*d2670fc4SToomas Soome 	uint8_t vbe_external_specification[512];
268*d2670fc4SToomas Soome };
269*d2670fc4SToomas Soome 
270*d2670fc4SToomas Soome struct multiboot_vbe_mode_info_block {
271*d2670fc4SToomas Soome 	uint8_t vbe_external_specification[256];
272*d2670fc4SToomas Soome };
273*d2670fc4SToomas Soome 
274*d2670fc4SToomas Soome typedef struct multiboot_tag_vbe {
275*d2670fc4SToomas Soome 	uint32_t mb_type;
276*d2670fc4SToomas Soome 	uint32_t mb_size;
277*d2670fc4SToomas Soome 
278*d2670fc4SToomas Soome 	uint16_t vbe_mode;
279*d2670fc4SToomas Soome 	uint16_t vbe_interface_seg;
280*d2670fc4SToomas Soome 	uint16_t vbe_interface_off;
281*d2670fc4SToomas Soome 	uint16_t vbe_interface_len;
282*d2670fc4SToomas Soome 
283*d2670fc4SToomas Soome 	struct multiboot_vbe_info_block vbe_control_info;
284*d2670fc4SToomas Soome 	struct multiboot_vbe_mode_info_block vbe_mode_info;
285*d2670fc4SToomas Soome } multiboot_tag_vbe_t;
286*d2670fc4SToomas Soome 
287*d2670fc4SToomas Soome struct multiboot_tag_framebuffer_common {
288*d2670fc4SToomas Soome 	uint32_t mb_type;
289*d2670fc4SToomas Soome 	uint32_t mb_size;
290*d2670fc4SToomas Soome 
291*d2670fc4SToomas Soome 	uint64_t framebuffer_addr;
292*d2670fc4SToomas Soome 	uint32_t framebuffer_pitch;
293*d2670fc4SToomas Soome 	uint32_t framebuffer_width;
294*d2670fc4SToomas Soome 	uint32_t framebuffer_height;
295*d2670fc4SToomas Soome 	uint8_t framebuffer_bpp;
296*d2670fc4SToomas Soome #define	MULTIBOOT_FRAMEBUFFER_TYPE_INDEXED	0
297*d2670fc4SToomas Soome #define	MULTIBOOT_FRAMEBUFFER_TYPE_RGB		1
298*d2670fc4SToomas Soome #define	MULTIBOOT_FRAMEBUFFER_TYPE_EGA_TEXT	2
299*d2670fc4SToomas Soome 	uint8_t framebuffer_type;
300*d2670fc4SToomas Soome 	uint16_t mb_reserved;
301*d2670fc4SToomas Soome };
302*d2670fc4SToomas Soome 
303*d2670fc4SToomas Soome typedef struct multiboot_tag_framebuffer {
304*d2670fc4SToomas Soome 	struct multiboot_tag_framebuffer_common framebuffer_common;
305*d2670fc4SToomas Soome 
306*d2670fc4SToomas Soome 	union {
307*d2670fc4SToomas Soome 		struct {
308*d2670fc4SToomas Soome 			uint16_t framebuffer_palette_num_colors;
309*d2670fc4SToomas Soome 			multiboot_color_t framebuffer_palette[];
310*d2670fc4SToomas Soome 		} fb1;
311*d2670fc4SToomas Soome 		struct {
312*d2670fc4SToomas Soome 			uint8_t framebuffer_red_field_position;
313*d2670fc4SToomas Soome 			uint8_t framebuffer_red_mask_size;
314*d2670fc4SToomas Soome 			uint8_t framebuffer_green_field_position;
315*d2670fc4SToomas Soome 			uint8_t framebuffer_green_mask_size;
316*d2670fc4SToomas Soome 			uint8_t framebuffer_blue_field_position;
317*d2670fc4SToomas Soome 			uint8_t framebuffer_blue_mask_size;
318*d2670fc4SToomas Soome 		} fb2;
319*d2670fc4SToomas Soome 	} u;
320*d2670fc4SToomas Soome } multiboot_tag_framebuffer_t;
321*d2670fc4SToomas Soome 
322*d2670fc4SToomas Soome typedef struct multiboot_tag_elf_sections {
323*d2670fc4SToomas Soome 	uint32_t mb_type;
324*d2670fc4SToomas Soome 	uint32_t mb_size;
325*d2670fc4SToomas Soome 	uint32_t mb_num;
326*d2670fc4SToomas Soome 	uint32_t mb_entsize;
327*d2670fc4SToomas Soome 	uint32_t mb_shndx;
328*d2670fc4SToomas Soome 	char mb_sections[];
329*d2670fc4SToomas Soome } multiboot_tag_elf_sections_t;
330*d2670fc4SToomas Soome 
331*d2670fc4SToomas Soome typedef struct multiboot_tag_apm {
332*d2670fc4SToomas Soome 	uint32_t mb_type;
333*d2670fc4SToomas Soome 	uint32_t mb_size;
334*d2670fc4SToomas Soome 	uint16_t mb_version;
335*d2670fc4SToomas Soome 	uint16_t mb_cseg;
336*d2670fc4SToomas Soome 	uint32_t mb_offset;
337*d2670fc4SToomas Soome 	uint16_t mb_cseg_16;
338*d2670fc4SToomas Soome 	uint16_t mb_dseg;
339*d2670fc4SToomas Soome 	uint16_t mb_flags;
340*d2670fc4SToomas Soome 	uint16_t mb_cseg_len;
341*d2670fc4SToomas Soome 	uint16_t mb_cseg_16_len;
342*d2670fc4SToomas Soome 	uint16_t mb_dseg_len;
343*d2670fc4SToomas Soome } multiboot_tag_apm_t;
344*d2670fc4SToomas Soome 
345*d2670fc4SToomas Soome typedef struct multiboot_tag_efi32 {
346*d2670fc4SToomas Soome 	uint32_t mb_type;
347*d2670fc4SToomas Soome 	uint32_t mb_size;
348*d2670fc4SToomas Soome 	uint32_t mb_pointer;
349*d2670fc4SToomas Soome } multiboot_tag_efi32_t;
350*d2670fc4SToomas Soome 
351*d2670fc4SToomas Soome typedef struct multiboot_tag_efi64 {
352*d2670fc4SToomas Soome 	uint32_t mb_type;
353*d2670fc4SToomas Soome 	uint32_t mb_size;
354*d2670fc4SToomas Soome 	uint64_t mb_pointer;
355*d2670fc4SToomas Soome } multiboot_tag_efi64_t;
356*d2670fc4SToomas Soome 
357*d2670fc4SToomas Soome typedef struct multiboot_tag_smbios {
358*d2670fc4SToomas Soome 	uint32_t mb_type;
359*d2670fc4SToomas Soome 	uint32_t mb_size;
360*d2670fc4SToomas Soome 	uint8_t mb_major;
361*d2670fc4SToomas Soome 	uint8_t mb_minor;
362*d2670fc4SToomas Soome 	uint8_t mb_reserved[6];
363*d2670fc4SToomas Soome 	uint8_t mb_tables[];
364*d2670fc4SToomas Soome } multiboot_tag_smbios_t;
365*d2670fc4SToomas Soome 
366*d2670fc4SToomas Soome typedef struct multiboot_tag_old_acpi {
367*d2670fc4SToomas Soome 	uint32_t mb_type;
368*d2670fc4SToomas Soome 	uint32_t mb_size;
369*d2670fc4SToomas Soome 	uint8_t mb_rsdp[];
370*d2670fc4SToomas Soome } multiboot_tag_old_acpi_t;
371*d2670fc4SToomas Soome 
372*d2670fc4SToomas Soome typedef struct multiboot_tag_new_acpi {
373*d2670fc4SToomas Soome 	uint32_t mb_type;
374*d2670fc4SToomas Soome 	uint32_t mb_size;
375*d2670fc4SToomas Soome 	uint8_t mb_rsdp[];
376*d2670fc4SToomas Soome } multiboot_tag_new_acpi_t;
377*d2670fc4SToomas Soome 
378*d2670fc4SToomas Soome typedef struct multiboot_tag_network {
379*d2670fc4SToomas Soome 	uint32_t mb_type;
380*d2670fc4SToomas Soome 	uint32_t mb_size;
381*d2670fc4SToomas Soome 	uint8_t mb_dhcpack[];
382*d2670fc4SToomas Soome } multiboot_tag_network_t;
383*d2670fc4SToomas Soome 
384*d2670fc4SToomas Soome typedef struct multiboot_tag_efi_mmap {
385*d2670fc4SToomas Soome 	uint32_t mb_type;
386*d2670fc4SToomas Soome 	uint32_t mb_size;
387*d2670fc4SToomas Soome 	uint32_t mb_descr_size;
388*d2670fc4SToomas Soome 	uint32_t mb_descr_vers;
389*d2670fc4SToomas Soome 	uint8_t mb_efi_mmap[];
390*d2670fc4SToomas Soome } multiboot_tag_efi_mmap_t;
391*d2670fc4SToomas Soome 
392*d2670fc4SToomas Soome typedef struct multiboot_tag_efi32_ih {
393*d2670fc4SToomas Soome 	uint32_t mb_type;
394*d2670fc4SToomas Soome 	uint32_t mb_size;
395*d2670fc4SToomas Soome 	uint32_t mb_pointer;
396*d2670fc4SToomas Soome } multiboot_tag_efi32_ih_t;
397*d2670fc4SToomas Soome 
398*d2670fc4SToomas Soome typedef struct multiboot_tag_efi64_ih {
399*d2670fc4SToomas Soome 	uint32_t mb_type;
400*d2670fc4SToomas Soome 	uint32_t mb_size;
401*d2670fc4SToomas Soome 	uint64_t mb_pointer;
402*d2670fc4SToomas Soome } multiboot_tag_efi64_ih_t;
403*d2670fc4SToomas Soome 
404*d2670fc4SToomas Soome typedef struct multiboot_tag_load_base_addr {
405*d2670fc4SToomas Soome 	uint32_t mb_type;
406*d2670fc4SToomas Soome 	uint32_t mb_size;
407*d2670fc4SToomas Soome 	uint32_t mb_load_base_addr;
408*d2670fc4SToomas Soome } multiboot_tag_load_base_addr_t;
409*d2670fc4SToomas Soome 
410*d2670fc4SToomas Soome #pragma pack()
411*d2670fc4SToomas Soome 
412*d2670fc4SToomas Soome #endif /* !_ASM */
413*d2670fc4SToomas Soome 
414*d2670fc4SToomas Soome #ifdef	__cplusplus
415*d2670fc4SToomas Soome }
416*d2670fc4SToomas Soome #endif
417*d2670fc4SToomas Soome 
418*d2670fc4SToomas Soome #endif /* !_SYS_MULTIBOOT2_H */
419