xref: /minix3/sys/arch/i386/stand/lib/bootmod.h (revision 84d9c625bfea59e274550651111ae9edfdc40fbd)
1*84d9c625SLionel Sambuc /*	$NetBSD: bootmod.h,v 1.6 2013/08/30 16:42:17 jmcneill Exp $	*/
258a2b000SEvgeniy Ivanov 
358a2b000SEvgeniy Ivanov /*-
458a2b000SEvgeniy Ivanov  * Copyright (c) 2008 Jared D. McNeill <jmcneill@invisible.ca>
558a2b000SEvgeniy Ivanov  * All rights reserved.
658a2b000SEvgeniy Ivanov  *
758a2b000SEvgeniy Ivanov  * Redistribution and use in source and binary forms, with or without
858a2b000SEvgeniy Ivanov  * modification, are permitted provided that the following conditions
958a2b000SEvgeniy Ivanov  * are met:
1058a2b000SEvgeniy Ivanov  * 1. Redistributions of source code must retain the above copyright
1158a2b000SEvgeniy Ivanov  *    notice, this list of conditions and the following disclaimer.
1258a2b000SEvgeniy Ivanov  * 2. Redistributions in binary form must reproduce the above copyright
1358a2b000SEvgeniy Ivanov  *    notice, this list of conditions and the following disclaimer in the
1458a2b000SEvgeniy Ivanov  *    documentation and/or other materials provided with the distribution.
1558a2b000SEvgeniy Ivanov  *
1658a2b000SEvgeniy Ivanov  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
1758a2b000SEvgeniy Ivanov  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
1858a2b000SEvgeniy Ivanov  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1958a2b000SEvgeniy Ivanov  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
2058a2b000SEvgeniy Ivanov  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2158a2b000SEvgeniy Ivanov  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2258a2b000SEvgeniy Ivanov  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2358a2b000SEvgeniy Ivanov  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2458a2b000SEvgeniy Ivanov  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2558a2b000SEvgeniy Ivanov  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2658a2b000SEvgeniy Ivanov  * POSSIBILITY OF SUCH DAMAGE.
2758a2b000SEvgeniy Ivanov  */
2858a2b000SEvgeniy Ivanov 
2958a2b000SEvgeniy Ivanov #ifndef _BOOTMOD_H
3058a2b000SEvgeniy Ivanov #define _BOOTMOD_H
3158a2b000SEvgeniy Ivanov 
3258a2b000SEvgeniy Ivanov typedef struct boot_module {
3358a2b000SEvgeniy Ivanov 	char			*bm_path;
3458a2b000SEvgeniy Ivanov 	ssize_t			bm_len;
3558a2b000SEvgeniy Ivanov 	uint8_t			bm_type;
3658a2b000SEvgeniy Ivanov #define	BM_TYPE_KMOD		0x00
3758a2b000SEvgeniy Ivanov #define	BM_TYPE_IMAGE		0x01
3858a2b000SEvgeniy Ivanov #define BM_TYPE_RND		0x02
39*84d9c625SLionel Sambuc #define BM_TYPE_FS		0x03
4058a2b000SEvgeniy Ivanov 	struct boot_module	*bm_next;
4158a2b000SEvgeniy Ivanov } boot_module_t;
4258a2b000SEvgeniy Ivanov 
4358a2b000SEvgeniy Ivanov extern boot_module_t *boot_modules;
4458a2b000SEvgeniy Ivanov extern bool boot_modules_enabled;
4558a2b000SEvgeniy Ivanov 
4658a2b000SEvgeniy Ivanov #endif /* !_BOOTMOD_H */
47