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