xref: /freebsd/sys/i386/include/bootinfo.h (revision 7877a80abd46a959310dfdf400aece20c2472ffb)
176b993fbSRodney W. Grimes /*-
276b993fbSRodney W. Grimes  * Copyright (C) 1994 by Rodney W. Grimes, Milwaukie, Oregon  97222
376b993fbSRodney W. Grimes  * All rights reserved.
476b993fbSRodney W. Grimes  *
576b993fbSRodney W. Grimes  * Redistribution and use in source and binary forms, with or without
676b993fbSRodney W. Grimes  * modification, are permitted provided that the following conditions
776b993fbSRodney W. Grimes  * are met:
876b993fbSRodney W. Grimes  * 1. Redistributions of source code must retain the above copyright
976b993fbSRodney W. Grimes  *    notice, this list of conditions and the following disclaimer as
1076b993fbSRodney W. Grimes  *    the first lines of this file unmodified.
1176b993fbSRodney W. Grimes  * 2. Redistributions in binary form must reproduce the above copyright
1276b993fbSRodney W. Grimes  *    notice, this list of conditions and the following disclaimer in the
1376b993fbSRodney W. Grimes  *    documentation and/or other materials provided with the distribution.
1476b993fbSRodney W. Grimes  * 3. All advertising materials mentioning features or use of this software
1576b993fbSRodney W. Grimes  *    must display the following acknowledgement:
1676b993fbSRodney W. Grimes  *	This product includes software developed by Rodney W. Grimes.
1776b993fbSRodney W. Grimes  * 4. The name of the author may not be used to endorse or promote products
1876b993fbSRodney W. Grimes  *    derived from this software without specific prior written permission.
1976b993fbSRodney W. Grimes  *
2076b993fbSRodney W. Grimes  * THIS SOFTWARE IS PROVIDED BY RODNEY W. GRIMES ``AS IS'' AND
2176b993fbSRodney W. Grimes  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
2276b993fbSRodney W. Grimes  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
2376b993fbSRodney W. Grimes  * ARE DISCLAIMED.  IN NO EVENT SHALL RODNEY W. GRIMES BE LIABLE
2476b993fbSRodney W. Grimes  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
2576b993fbSRodney W. Grimes  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
2676b993fbSRodney W. Grimes  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
2776b993fbSRodney W. Grimes  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
2876b993fbSRodney W. Grimes  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
2976b993fbSRodney W. Grimes  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
3076b993fbSRodney W. Grimes  * SUCH DAMAGE.
3176b993fbSRodney W. Grimes  *
327877a80aSMike Smith  *	$Id: bootinfo.h,v 1.9 1998/07/11 04:02:49 bde Exp $
3376b993fbSRodney W. Grimes  */
3476b993fbSRodney W. Grimes 
3576b993fbSRodney W. Grimes #ifndef	_MACHINE_BOOTINFO_H_
3676b993fbSRodney W. Grimes #define	_MACHINE_BOOTINFO_H_
3776b993fbSRodney W. Grimes 
38b5d89ca8SBruce Evans /* Only change the version number if you break compatibility. */
39b5d89ca8SBruce Evans #define	BOOTINFO_VERSION	1
40b5d89ca8SBruce Evans 
41fbc5b307SPoul-Henning Kamp #define	N_BIOS_GEOM		8
42b5d89ca8SBruce Evans 
43b5d89ca8SBruce Evans /*
44b5d89ca8SBruce Evans  * A zero bootinfo field often means that there is no info available.
45b5d89ca8SBruce Evans  * Flags are used to indicate the validity of fields where zero is a
46b5d89ca8SBruce Evans  * normal value.
47b5d89ca8SBruce Evans  */
48b5d89ca8SBruce Evans struct bootinfo {
499d508ad2SBruce Evans 	u_int32_t	bi_version;
509d508ad2SBruce Evans 	u_int32_t	bi_kernelname;		/* represents a char * */
519d508ad2SBruce Evans 	u_int32_t	bi_nfs_diskless;	/* struct nfs_diskless * */
52b5d89ca8SBruce Evans 				/* End of fields that are always present. */
53b5d89ca8SBruce Evans #define	bi_endcommon	bi_n_bios_used
549d508ad2SBruce Evans 	u_int32_t	bi_n_bios_used;
559d508ad2SBruce Evans 	u_int32_t	bi_bios_geom[N_BIOS_GEOM];
569d508ad2SBruce Evans 	u_int32_t	bi_size;
579d508ad2SBruce Evans 	u_int8_t	bi_memsizes_valid;
589d508ad2SBruce Evans 	u_int8_t	bi_pad[1];
599d508ad2SBruce Evans 	u_int16_t	bi_vesa;
609d508ad2SBruce Evans 	u_int32_t	bi_basemem;
619d508ad2SBruce Evans 	u_int32_t	bi_extmem;
629d508ad2SBruce Evans 	u_int32_t	bi_symtab;		/* struct symtab * */
639d508ad2SBruce Evans 	u_int32_t	bi_esymtab;		/* struct symtab * */
647877a80aSMike Smith 				/* Items below only from advanced bootloader */
657877a80aSMike Smith 	u_int32_t	bi_kernend;		/* end of kernel space */
667877a80aSMike Smith 	u_int32_t	bi_envp;		/* environment */
677877a80aSMike Smith 	u_int32_t	bi_modulep;		/* preloaded modules */
6876b993fbSRodney W. Grimes };
6976b993fbSRodney W. Grimes 
70e0abbebfSPoul-Henning Kamp #ifdef KERNEL
71b5d89ca8SBruce Evans extern struct bootinfo	bootinfo;
72e0abbebfSPoul-Henning Kamp #endif
73b5d89ca8SBruce Evans 
74b5d89ca8SBruce Evans #endif	/* !_MACHINE_BOOTINFO_H_ */
75