sysconf.h revision 1.2
11.2Sthorpej/*	$NetBSD: sysconf.h,v 1.2 1998/03/26 06:27:57 thorpej Exp $	*/
21.2Sthorpej
31.1Sjonathan/*
41.1Sjonathan * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
51.1Sjonathan *
61.1Sjonathan * Redistribution and use in source and binary forms, with or without
71.1Sjonathan * modification, are permitted provided that the following conditions
81.1Sjonathan * are met:
91.1Sjonathan * 1. Redistributions of source code must retain the above copyright
101.1Sjonathan *    notice, this list of conditions and the following disclaimer.
111.1Sjonathan * 2. Redistributions in binary form must reproduce the above copyright
121.1Sjonathan *    notice, this list of conditions and the following disclaimer in the
131.1Sjonathan *    documentation and/or other materials provided with the distribution.
141.1Sjonathan * 3. All advertising materials mentioning features or use of this software
151.1Sjonathan *    must display the following acknowledgement:
161.1Sjonathan *      This product includes software developed by Christopher G. Demetriou
171.1Sjonathan *	for the NetBSD Project.
181.1Sjonathan * 4. The name of the author may not be used to endorse or promote products
191.1Sjonathan *    derived from this software without specific prior written permission
201.1Sjonathan *
211.1Sjonathan * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
221.1Sjonathan * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
231.1Sjonathan * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
241.1Sjonathan * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
251.1Sjonathan * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
261.1Sjonathan * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
271.1Sjonathan * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
281.1Sjonathan * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
291.1Sjonathan * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
301.1Sjonathan * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
311.1Sjonathan */
321.1Sjonathan/*
331.1Sjonathan * Additional reworking by Matthew Jacob for NASA/Ames Research Center.
341.1Sjonathan * Copyright (c) 1997
351.1Sjonathan */
361.1Sjonathan
371.1Sjonathan/*
381.1Sjonathan * Copyright (c) 1998 Jonathan Stone.  All rights reserved.
391.1Sjonathan * Additional reworking for pmaxes.
401.1Sjonathan * Since pmax mboard support different CPU daughterboards,
411.1Sjonathan * and others are mmultiprocessors, rename from cpu_* to sys_*.
421.1Sjonathan */
431.1Sjonathan
441.2Sthorpej#ifndef	_PMAX_SYSCONF_H_
451.2Sthorpej#define	_PMAX_SYSCONF_H_
461.2Sthorpej
471.2Sthorpej
481.1Sjonathan#ifdef _KERNEL
491.1Sjonathan/*
501.1Sjonathan * Platform Specific Information and Function Hooks.
511.1Sjonathan *
521.1Sjonathan * The tags family and model information are strings describing the platform.
531.1Sjonathan *
541.1Sjonathan * The tag iobus describes the primary iobus for the platform- primarily
551.1Sjonathan * to give a hint as to where to start configuring. The likely choices
561.1Sjonathan * are one of tcasic, lca, apecs, cia, or tlsb.
571.1Sjonathan *
581.1Sjonathan */
591.1Sjonathan
601.1Sjonathanextern struct platform {
611.1Sjonathan	/*
621.1Sjonathan	 * Platform Information.
631.1Sjonathan	 */
641.1Sjonathan	const char	*iobus;		/* Primary iobus name */
651.1Sjonathan
661.1Sjonathan	/*
671.1Sjonathan	 * Platform Specific Function Hooks
681.1Sjonathan	 *	cons_init 	-	console initialization
691.1Sjonathan	 *	device_register	-	boot configuration aid
701.1Sjonathan	 *	iointr		-	I/O interrupt handler
711.1Sjonathan	 *	clockintr	-	Clock Interrupt Handler
721.1Sjonathan	 *	mcheck_handler	-	Platform Specific Machine Check Handler
731.1Sjonathan	 */
741.1Sjonathan	void	(*os_init) __P((void));
751.1Sjonathan	void	(*bus_reset) __P((void));
761.1Sjonathan	void	(*cons_init) __P((void));
771.1Sjonathan	void	(*device_register) __P((struct device *, void *));
781.1Sjonathan	void	(*iointr) __P((void *, unsigned long));
791.1Sjonathan	void	(*clockintr) __P((void *));
801.1Sjonathan#ifdef notyet
811.1Sjonathan	void	(*mcheck_handler) __P((unsigned long, struct trapframe *,
821.1Sjonathan		unsigned long, unsigned long));
831.1Sjonathan#endif
841.1Sjonathan} platform;
851.1Sjonathan
861.1Sjonathanextern struct platform unimpl_platform;
871.1Sjonathan
881.1Sjonathan/*
891.1Sjonathan * There is an array of functions to initialize the platform structure.
901.1Sjonathan *
911.1Sjonathan * It's responsible for filling in the family, model_name and iobus
921.1Sjonathan * tags. It may optionally fill in the cons_init, device_register and
931.1Sjonathan * mcheck_handler tags.
941.1Sjonathan *
951.1Sjonathan * The iointr tag is filled in by set_iointr (in interrupt.c).
961.1Sjonathan * The clockintr tag is filled in by sys_initclocks (in clock.c).
971.1Sjonathan *
981.1Sjonathan * nocpu is function to call when you can't figure what platform you're on.
991.1Sjonathan * There's no return from this function.
1001.1Sjonathan */
1011.1Sjonathan
1021.1Sjonathanstruct sysinit {
1031.1Sjonathan	void	(*init) __P((void));
1041.1Sjonathan	const char *option;
1051.1Sjonathan};
1061.1Sjonathan
1071.1Sjonathan#define	sys_notsupp(st)		{ platform_not_supported, st }
1081.1Sjonathan#define	sys_init(fn, opt)	{ fn, opt }
1091.1Sjonathan
1101.1Sjonathanextern struct sysinit sysinit[];
1111.1Sjonathanextern int nsysinit;
1121.1Sjonathanextern void platform_not_configured __P((void));
1131.1Sjonathanextern void platform_not_supported __P((void));
1141.1Sjonathan
1151.1Sjonathan#endif /* _KERNEL */
1161.2Sthorpej#endif /* !_PMAX_SYSCONF_H_ */
117