xref: /illumos-gate/usr/src/uts/common/sys/multiboot2_impl.h (revision 99ea293e719ac006d413e4fde6ac0d5cd4dd6c59)
1 /*
2  * This file and its contents are supplied under the terms of the
3  * Common Development and Distribution License ("CDDL"), version 1.0.
4  * You may only use this file in accordance with the terms of version
5  * 1.0 of the CDDL.
6  *
7  * A full copy of the text of the CDDL should have accompanied this
8  * source.  A copy of the CDDL is also available via the Internet at
9  * http://www.illumos.org/license/CDDL.
10  */
11 
12 /*
13  * Copyright 2016 Toomas Soome <tsoome@me.com>
14  */
15 
16 #ifndef _SYS_MULTIBOOT2_IMPL_H
17 #define	_SYS_MULTIBOOT2_IMPL_H
18 
19 /*
20  * Multiboot 2 protocol implementation for dboot.
21  */
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
27 #include <sys/multiboot2.h>
28 
29 extern void *dboot_multiboot2_find_tag(multiboot2_info_header_t *, uint32_t);
30 extern char *dboot_multiboot2_cmdline(multiboot2_info_header_t *);
31 extern int dboot_multiboot2_modcount(multiboot2_info_header_t *);
32 extern uint32_t dboot_multiboot2_modstart(multiboot2_info_header_t *, int);
33 extern uint32_t dboot_multiboot2_modend(multiboot2_info_header_t *, int);
34 extern char *dboot_multiboot2_modcmdline(multiboot2_info_header_t *, int);
35 extern multiboot_tag_mmap_t *
36     dboot_multiboot2_get_mmap_tagp(multiboot2_info_header_t *);
37 extern boolean_t dboot_multiboot2_basicmeminfo(multiboot2_info_header_t *,
38     uint32_t *, uint32_t *);
39 extern uint64_t dboot_multiboot2_mmap_get_length(multiboot2_info_header_t *,
40     multiboot_tag_mmap_t *, int);
41 extern uint64_t dboot_multiboot2_mmap_get_base(multiboot2_info_header_t *,
42     multiboot_tag_mmap_t *, int);
43 extern uint32_t dboot_multiboot2_mmap_get_type(multiboot2_info_header_t *,
44     multiboot_tag_mmap_t *, int);
45 extern int dboot_multiboot2_mmap_nentries(multiboot2_info_header_t *,
46     multiboot_tag_mmap_t *);
47 extern paddr_t dboot_multiboot2_highest_addr(multiboot2_info_header_t *);
48 
49 #ifdef __cplusplus
50 }
51 #endif
52 
53 #endif /* _SYS_MULTIBOOT2_IMPL_H */
54