xref: /netbsd-src/sys/arch/sgimips/include/bootinfo.h (revision 42d0c1b9d05b9a89e81a9a0f38f43be1cb2fa32d)
1*42d0c1b9Stsutsui /*	$NetBSD: bootinfo.h,v 1.6 2008/08/08 15:07:52 tsutsui Exp $	*/
24b1d2d4cSthorpej 
34b1d2d4cSthorpej /*
44b1d2d4cSthorpej  * Copyright (c) 1997
54b1d2d4cSthorpej  *	Matthias Drochner.  All rights reserved.
64b1d2d4cSthorpej  *
74b1d2d4cSthorpej  * Redistribution and use in source and binary forms, with or without
84b1d2d4cSthorpej  * modification, are permitted provided that the following conditions
94b1d2d4cSthorpej  * are met:
104b1d2d4cSthorpej  * 1. Redistributions of source code must retain the above copyright
114b1d2d4cSthorpej  *    notice, this list of conditions and the following disclaimer.
124b1d2d4cSthorpej  * 2. Redistributions in binary form must reproduce the above copyright
134b1d2d4cSthorpej  *    notice, this list of conditions and the following disclaimer in the
144b1d2d4cSthorpej  *    documentation and/or other materials provided with the distribution.
154b1d2d4cSthorpej  *
164b1d2d4cSthorpej  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
174b1d2d4cSthorpej  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
184b1d2d4cSthorpej  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
194b1d2d4cSthorpej  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
204b1d2d4cSthorpej  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
214b1d2d4cSthorpej  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
224b1d2d4cSthorpej  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
234b1d2d4cSthorpej  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
244b1d2d4cSthorpej  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
254b1d2d4cSthorpej  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
264b1d2d4cSthorpej  *
274b1d2d4cSthorpej  */
284b1d2d4cSthorpej 
294b1d2d4cSthorpej #ifndef _SGIMIPS_BOOTINFO_H_
304b1d2d4cSthorpej #define _SGIMIPS_BOOTINFO_H_
314b1d2d4cSthorpej 
32*42d0c1b9Stsutsui #define	BOOTINFO_MAGIC		0x20080808
33de92c0b2Stsutsui #define	BOOTINFO_SIZE		1024
344b1d2d4cSthorpej 
354b1d2d4cSthorpej struct btinfo_common {
36de92c0b2Stsutsui 	size_t next;	/* offset of next item, or zero if end of data */
37de92c0b2Stsutsui 	int type;	/* type of bootinfo item */
38de92c0b2Stsutsui #define BTINFO_NONE	0
394b1d2d4cSthorpej #define BTINFO_MAGIC	1
404b1d2d4cSthorpej #define BTINFO_BOOTPATH 2
414b1d2d4cSthorpej #define BTINFO_SYMTAB	3
42de92c0b2Stsutsui };
434b1d2d4cSthorpej 
444b1d2d4cSthorpej struct btinfo_magic {
454b1d2d4cSthorpej 	struct btinfo_common common;
464b1d2d4cSthorpej 	int magic;
474b1d2d4cSthorpej };
484b1d2d4cSthorpej 
494b1d2d4cSthorpej #define BTINFO_BOOTPATH_LEN	80
504b1d2d4cSthorpej struct btinfo_bootpath {
514b1d2d4cSthorpej 	struct btinfo_common common;
524b1d2d4cSthorpej 	char bootpath[BTINFO_BOOTPATH_LEN];
534b1d2d4cSthorpej };
544b1d2d4cSthorpej 
554b1d2d4cSthorpej struct btinfo_symtab {
564b1d2d4cSthorpej 	struct btinfo_common common;
57e2397b7fSthorpej 	unsigned long nsym;
58e2397b7fSthorpej 	unsigned long ssym;
59e2397b7fSthorpej 	unsigned long esym;
604b1d2d4cSthorpej };
614b1d2d4cSthorpej 
624b1d2d4cSthorpej #ifdef _KERNEL
634b1d2d4cSthorpej void	*lookup_bootinfo(int);
644b1d2d4cSthorpej #endif
654b1d2d4cSthorpej 
664b1d2d4cSthorpej #endif	/* !_SGIMIPS_BOOTINFO_H_ */
67