xref: /netbsd-src/sys/arch/mipsco/include/bootinfo.h (revision 02cdf4d2c869ecfa1ae5484cf77eefe2fbcc6d94)
1*02cdf4d2Sdsl /*	$NetBSD: bootinfo.h,v 1.4 2009/03/14 14:46:02 dsl Exp $	*/
2da962aaaSwdk 
3da962aaaSwdk /*
4da962aaaSwdk  * Copyright (c) 1997, 2000
5da962aaaSwdk  *	Matthias Drochner.  All rights reserved.
6da962aaaSwdk  *
7da962aaaSwdk  * Redistribution and use in source and binary forms, with or without
8da962aaaSwdk  * modification, are permitted provided that the following conditions
9da962aaaSwdk  * are met:
10da962aaaSwdk  * 1. Redistributions of source code must retain the above copyright
11da962aaaSwdk  *    notice, this list of conditions and the following disclaimer.
12da962aaaSwdk  * 2. Redistributions in binary form must reproduce the above copyright
13da962aaaSwdk  *    notice, this list of conditions and the following disclaimer in the
14da962aaaSwdk  *    documentation and/or other materials provided with the distribution.
15da962aaaSwdk  *
16da962aaaSwdk  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17da962aaaSwdk  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18da962aaaSwdk  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19da962aaaSwdk  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20da962aaaSwdk  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21da962aaaSwdk  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22da962aaaSwdk  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23da962aaaSwdk  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24da962aaaSwdk  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25da962aaaSwdk  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26da962aaaSwdk  *
27da962aaaSwdk  */
28da962aaaSwdk 
29da962aaaSwdk #ifndef _MIPSCO_BOOTINFO_H_
30da962aaaSwdk #define _MIPSCO_BOOTINFO_H_
31da962aaaSwdk 
32da962aaaSwdk #define BOOTINFO_MAGIC	0xb007babe
33da962aaaSwdk #define BOOTINFO_SIZE	1024
34da962aaaSwdk 
35da962aaaSwdk /*
36da962aaaSwdk  * The bootinfo structure is at the end of the 64kB hole between
37da962aaaSwdk  * 0x80010000 to 0x8001ffff that neither NetBSD nor the PROM uses.
38da962aaaSwdk  */
39da962aaaSwdk #define BOOTINFO_ADDR	0x8001fc00
40da962aaaSwdk 
41da962aaaSwdk struct btinfo_common {
42da962aaaSwdk 	int next;		/* offset of next item, or zero */
43da962aaaSwdk 	int type;
44da962aaaSwdk };
45da962aaaSwdk 
46da962aaaSwdk #define BTINFO_MAGIC	1
47da962aaaSwdk #define BTINFO_BOOTPATH 2
48da962aaaSwdk #define BTINFO_SYMTAB	3
49da962aaaSwdk 
50da962aaaSwdk struct btinfo_magic {
51da962aaaSwdk 	struct btinfo_common common;
52da962aaaSwdk 	int magic;
53da962aaaSwdk };
54da962aaaSwdk 
55da962aaaSwdk #define BTINFO_BOOTPATH_LEN	80
56da962aaaSwdk struct btinfo_bootpath {
57da962aaaSwdk 	struct btinfo_common common;
58da962aaaSwdk 	char bootpath[BTINFO_BOOTPATH_LEN];
59da962aaaSwdk };
60da962aaaSwdk 
61da962aaaSwdk struct btinfo_symtab {
62da962aaaSwdk 	struct btinfo_common common;
63da962aaaSwdk 	int nsym;
64da962aaaSwdk 	int ssym;
65da962aaaSwdk 	int esym;
66da962aaaSwdk };
67da962aaaSwdk 
68da962aaaSwdk #ifdef _KERNEL
69*02cdf4d2Sdsl void	*lookup_bootinfo(int);
70da962aaaSwdk #endif
71da962aaaSwdk 
72da962aaaSwdk #endif	/* !_MIPSCO_BOOTINFO_H_ */
73