xref: /netbsd-src/sys/arch/i386/stand/lib/bootmod.h (revision 1265ac6952fe1899e7c9641b53b1c29af02d44fd)
1*1265ac69Sjmcneill /*	$NetBSD: bootmod.h,v 1.6 2013/08/30 16:42:17 jmcneill Exp $	*/
231d4b628Sad 
331d4b628Sad /*-
431d4b628Sad  * Copyright (c) 2008 Jared D. McNeill <jmcneill@invisible.ca>
531d4b628Sad  * All rights reserved.
631d4b628Sad  *
731d4b628Sad  * Redistribution and use in source and binary forms, with or without
831d4b628Sad  * modification, are permitted provided that the following conditions
931d4b628Sad  * are met:
1031d4b628Sad  * 1. Redistributions of source code must retain the above copyright
1131d4b628Sad  *    notice, this list of conditions and the following disclaimer.
1231d4b628Sad  * 2. Redistributions in binary form must reproduce the above copyright
1331d4b628Sad  *    notice, this list of conditions and the following disclaimer in the
1431d4b628Sad  *    documentation and/or other materials provided with the distribution.
1531d4b628Sad  *
1631d4b628Sad  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
1731d4b628Sad  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
1831d4b628Sad  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
1931d4b628Sad  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
2031d4b628Sad  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
2131d4b628Sad  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
2231d4b628Sad  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
2331d4b628Sad  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
2431d4b628Sad  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
2531d4b628Sad  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
2631d4b628Sad  * POSSIBILITY OF SUCH DAMAGE.
2731d4b628Sad  */
2831d4b628Sad 
2931d4b628Sad #ifndef _BOOTMOD_H
3031d4b628Sad #define _BOOTMOD_H
3131d4b628Sad 
3231d4b628Sad typedef struct boot_module {
3331d4b628Sad 	char			*bm_path;
3431d4b628Sad 	ssize_t			bm_len;
3586ef6444Sjmcneill 	uint8_t			bm_type;
3686ef6444Sjmcneill #define	BM_TYPE_KMOD		0x00
3786ef6444Sjmcneill #define	BM_TYPE_IMAGE		0x01
38a031ce71Stls #define BM_TYPE_RND		0x02
39*1265ac69Sjmcneill #define BM_TYPE_FS		0x03
4031d4b628Sad 	struct boot_module	*bm_next;
4131d4b628Sad } boot_module_t;
4231d4b628Sad 
4331d4b628Sad extern boot_module_t *boot_modules;
4431d4b628Sad extern bool boot_modules_enabled;
4531d4b628Sad 
4631d4b628Sad #endif /* !_BOOTMOD_H */
47