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