sysconf.h revision 1.1
1/*	$NetBSD: sysconf.h,v 1.1 1998/03/25 03:57:53 jonathan Exp $	*/
2#ifndef	_PMAX_SYSCONF_H
3#define	_PMAX_SYSCONF_H
4/*
5 * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions
9 * are met:
10 * 1. Redistributions of source code must retain the above copyright
11 *    notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright
13 *    notice, this list of conditions and the following disclaimer in the
14 *    documentation and/or other materials provided with the distribution.
15 * 3. All advertising materials mentioning features or use of this software
16 *    must display the following acknowledgement:
17 *      This product includes software developed by Christopher G. Demetriou
18 *	for the NetBSD Project.
19 * 4. The name of the author may not be used to endorse or promote products
20 *    derived from this software without specific prior written permission
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
23 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
24 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
25 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
26 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
27 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
31 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 */
33/*
34 * Additional reworking by Matthew Jacob for NASA/Ames Research Center.
35 * Copyright (c) 1997
36 */
37
38/*
39 * Copyright (c) 1998 Jonathan Stone.  All rights reserved.
40 * Additional reworking for pmaxes.
41 * Since pmax mboard support different CPU daughterboards,
42 * and others are mmultiprocessors, rename from cpu_* to sys_*.
43 */
44
45#ifdef _KERNEL
46/*
47 * Platform Specific Information and Function Hooks.
48 *
49 * The tags family and model information are strings describing the platform.
50 *
51 * The tag iobus describes the primary iobus for the platform- primarily
52 * to give a hint as to where to start configuring. The likely choices
53 * are one of tcasic, lca, apecs, cia, or tlsb.
54 *
55 */
56
57extern struct platform {
58	/*
59	 * Platform Information.
60	 */
61	const char	*family;	/* Family Name */
62	const char	*model;		/* Model (variant) Name */
63	const char	*iobus;		/* Primary iobus name */
64
65	/*
66	 * Platform Specific Function Hooks
67	 *	cons_init 	-	console initialization
68	 *	device_register	-	boot configuration aid
69	 *	iointr		-	I/O interrupt handler
70	 *	clockintr	-	Clock Interrupt Handler
71	 *	mcheck_handler	-	Platform Specific Machine Check Handler
72	 */
73	void	(*os_init) __P((void));
74	void	(*bus_reset) __P((void));
75	void	(*cons_init) __P((void));
76	void	(*device_register) __P((struct device *, void *));
77	void	(*iointr) __P((void *, unsigned long));
78	void	(*clockintr) __P((void *));
79#ifdef notyet
80	void	(*mcheck_handler) __P((unsigned long, struct trapframe *,
81		unsigned long, unsigned long));
82#endif
83} platform;
84
85extern struct platform unimpl_platform;
86
87/*
88 * There is an array of functions to initialize the platform structure.
89 *
90 * It's responsible for filling in the family, model_name and iobus
91 * tags. It may optionally fill in the cons_init, device_register and
92 * mcheck_handler tags.
93 *
94 * The iointr tag is filled in by set_iointr (in interrupt.c).
95 * The clockintr tag is filled in by sys_initclocks (in clock.c).
96 *
97 * nocpu is function to call when you can't figure what platform you're on.
98 * There's no return from this function.
99 */
100
101struct sysinit {
102	void	(*init) __P((void));
103	const char *option;
104};
105
106#define	sys_notsupp(st)		{ platform_not_supported, st }
107#define	sys_init(fn, opt)	{ fn, opt }
108
109extern struct sysinit sysinit[];
110extern int nsysinit;
111extern void platform_not_configured __P((void));
112extern void platform_not_supported __P((void));
113
114#endif /* _KERNEL */
115#endif /* !_PMAX_SYSCONF_H */
116