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