xref: /netbsd-src/sys/arch/sparc/include/bootinfo.h (revision a47afdb76c8b6e4f81ea28fd7652ac937d61a6c7)
1*a47afdb7Smartin /*	$NetBSD: bootinfo.h,v 1.6 2012/05/28 19:24:29 martin Exp $	*/
2797c581bSchristos 
3797c581bSchristos /*
4797c581bSchristos  * Copyright (c) 1997
5797c581bSchristos  *	Matthias Drochner.  All rights reserved.
6797c581bSchristos  *
7797c581bSchristos  * Redistribution and use in source and binary forms, with or without
8797c581bSchristos  * modification, are permitted provided that the following conditions
9797c581bSchristos  * are met:
10797c581bSchristos  * 1. Redistributions of source code must retain the above copyright
11797c581bSchristos  *    notice, this list of conditions and the following disclaimer.
12797c581bSchristos  * 2. Redistributions in binary form must reproduce the above copyright
13797c581bSchristos  *    notice, this list of conditions and the following disclaimer in the
14797c581bSchristos  *    documentation and/or other materials provided with the distribution.
15797c581bSchristos  *
16797c581bSchristos  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17797c581bSchristos  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18797c581bSchristos  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19797c581bSchristos  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20797c581bSchristos  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21797c581bSchristos  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22797c581bSchristos  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23797c581bSchristos  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24797c581bSchristos  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25797c581bSchristos  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26797c581bSchristos  *
27797c581bSchristos  */
28797c581bSchristos 
29797c581bSchristos #define BOOTINFO_MAGIC	0xb007babe
30797c581bSchristos #define BOOTINFO_SIZE	1024
31797c581bSchristos 
32797c581bSchristos /*
33797c581bSchristos  * The bootinfo structure is placed at the end of the kernel, aligned
34797c581bSchristos  * to a page.
35797c581bSchristos  */
36797c581bSchristos 
37797c581bSchristos struct btinfo_common {
38797c581bSchristos 	int next;		/* offset of next item, or zero */
39797c581bSchristos 	int type;
40797c581bSchristos };
41797c581bSchristos 
42797c581bSchristos #define BTINFO_MAGIC		1
43797c581bSchristos #define BTINFO_SYMTAB		2
44945536cfSpk #define BTINFO_KERNELFILE	3
45*a47afdb7Smartin #define BTINFO_BOOTHOWTO	4
46797c581bSchristos 
47797c581bSchristos struct btinfo_magic {
48797c581bSchristos 	struct btinfo_common common;
49797c581bSchristos 	int magic;
50797c581bSchristos };
51797c581bSchristos 
52797c581bSchristos struct btinfo_symtab {
53797c581bSchristos 	struct btinfo_common common;
54797c581bSchristos 	int nsym;
55797c581bSchristos 	int ssym;
56797c581bSchristos 	int esym;
57797c581bSchristos };
58797c581bSchristos 
59945536cfSpk struct btinfo_kernelfile {
60945536cfSpk 	struct btinfo_common common;
61945536cfSpk 	char name[1];	/* variable length */
62945536cfSpk };
63945536cfSpk 
64*a47afdb7Smartin struct btinfo_boothowto {
65*a47afdb7Smartin 	struct btinfo_common common;
66*a47afdb7Smartin 	int boothowto;
67*a47afdb7Smartin };
68*a47afdb7Smartin 
69797c581bSchristos #ifdef _KERNEL
708ea3cb44Suwe void *lookup_bootinfo(int);
71797c581bSchristos #endif
72