xref: /netbsd-src/sys/arch/cobalt/include/bootinfo.h (revision c9fc40b4be5fc5b115deb497c8b92e9c9a7e63e3)
1*c9fc40b4Smatt /*	$NetBSD: bootinfo.h,v 1.10 2011/02/20 07:54:11 matt Exp $	*/
2ceb721fdScdi 
3ceb721fdScdi /*
4ceb721fdScdi  * Copyright (c) 1997, 2000-2004
5ceb721fdScdi  *	Matthias Drochner.  All rights reserved.
6ceb721fdScdi  *
7ceb721fdScdi  * Redistribution and use in source and binary forms, with or without
8ceb721fdScdi  * modification, are permitted provided that the following conditions
9ceb721fdScdi  * are met:
10ceb721fdScdi  * 1. Redistributions of source code must retain the above copyright
11ceb721fdScdi  *    notice, this list of conditions and the following disclaimer.
12ceb721fdScdi  * 2. Redistributions in binary form must reproduce the above copyright
13ceb721fdScdi  *    notice, this list of conditions and the following disclaimer in the
14ceb721fdScdi  *    documentation and/or other materials provided with the distribution.
15ceb721fdScdi  *
16ceb721fdScdi  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
17ceb721fdScdi  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
18ceb721fdScdi  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19ceb721fdScdi  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20ceb721fdScdi  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21ceb721fdScdi  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22ceb721fdScdi  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23ceb721fdScdi  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24ceb721fdScdi  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25ceb721fdScdi  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26ceb721fdScdi  *
27ceb721fdScdi  */
28ceb721fdScdi 
29ceb721fdScdi #ifndef _COBALT_BOOTINFO_H_
30ceb721fdScdi #define _COBALT_BOOTINFO_H_
31ceb721fdScdi 
32ceb721fdScdi #define BOOTINFO_MAGIC	0xb007babe
33ceb721fdScdi #define BOOTINFO_SIZE	1024
34ceb721fdScdi 
35ceb721fdScdi struct btinfo_common {
364c499c34Smatt 	int32_t next;		/* offset of next item, or zero */
37*c9fc40b4Smatt 	uint32_t type;
38ceb721fdScdi };
39ceb721fdScdi 
40ceb721fdScdi #define BTINFO_MAGIC	1
41ceb721fdScdi #define BTINFO_BOOTPATH 2
42ceb721fdScdi #define BTINFO_SYMTAB	3
43ceb721fdScdi #define BTINFO_FLAGS	4
4417c3dbc6Stsutsui #define BTINFO_HOWTO	5
45ceb721fdScdi 
46ceb721fdScdi struct btinfo_magic {
47ceb721fdScdi 	struct btinfo_common common;
48*c9fc40b4Smatt 	uint32_t magic;
49ceb721fdScdi };
50ceb721fdScdi 
51ceb721fdScdi #define BTINFO_BOOTPATH_LEN	80
52ceb721fdScdi struct btinfo_bootpath {
53ceb721fdScdi 	struct btinfo_common common;
54ceb721fdScdi 	char bootpath[BTINFO_BOOTPATH_LEN];
55ceb721fdScdi };
56ceb721fdScdi 
57ceb721fdScdi struct btinfo_symtab {
58ceb721fdScdi 	struct btinfo_common common;
594c499c34Smatt 	int32_t nsym;
604c499c34Smatt 	int32_t ssym;
614c499c34Smatt 	int32_t esym;
62ceb721fdScdi };
63ceb721fdScdi 
64ceb721fdScdi struct btinfo_flags {
65ceb721fdScdi 	struct btinfo_common common;
66ceb721fdScdi 
67ceb721fdScdi #define	BI_SERIAL_CONSOLE	0x1
686abe9ac9Stsutsui 	uint32_t bi_flags;
69ceb721fdScdi };
70ceb721fdScdi 
7117c3dbc6Stsutsui struct btinfo_howto {
7217c3dbc6Stsutsui 	struct btinfo_common common;
7317c3dbc6Stsutsui 
7417c3dbc6Stsutsui 	uint32_t bi_howto;
7517c3dbc6Stsutsui };
7617c3dbc6Stsutsui 
77ceb721fdScdi #ifdef _KERNEL
7809583f6eShe void	*lookup_bootinfo(unsigned int);
79ceb721fdScdi #endif
80ceb721fdScdi 
81ceb721fdScdi #endif	/* !_COBALT_BOOTINFO_H_ */
82