sysconf.h revision 1.5
11.5Ssimonb/* $NetBSD: sysconf.h,v 1.5 1999/11/25 01:40:23 simonb 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.4Snisimura * The tag iobus describes the primary iobus for the platform, primarily
531.4Snisimura * to give a hint as to where to start configuring.
541.1Sjonathan */
551.1Sjonathan
561.4Snisimurastruct platform {
571.1Sjonathan	const char	*iobus;		/* Primary iobus name */
581.1Sjonathan
591.1Sjonathan	/*
601.1Sjonathan	 * Platform Specific Function Hooks
611.4Snisimura	 *	bus_reset	-	clear memory error condition
621.4Snisimura	 *	cons_init	-	console initialization
631.4Snisimura	 *	device_register -	boot configuration aid
641.1Sjonathan	 *	iointr		-	I/O interrupt handler
651.4Snisimura	 *	clkread		-	interporate HZ with hi-resolution timer
661.1Sjonathan	 */
671.1Sjonathan	void	(*bus_reset) __P((void));
681.1Sjonathan	void	(*cons_init) __P((void));
691.1Sjonathan	void	(*device_register) __P((struct device *, void *));
701.4Snisimura	int	(*iointr) __P((unsigned, unsigned, unsigned, unsigned));
711.5Ssimonb	int	(*memsize) __P((caddr_t));
721.4Snisimura	unsigned (*clkread) __P((void));
731.4Snisimura};
741.1Sjonathan
751.1Sjonathan/*
761.4Snisimura * An array of functions to initialize the platform structure.
771.1Sjonathan */
781.1Sjonathanstruct sysinit {
791.1Sjonathan	void	(*init) __P((void));
801.1Sjonathan	const char *option;
811.1Sjonathan};
821.1Sjonathan
831.1Sjonathan#define	sys_notsupp(st)		{ platform_not_supported, st }
841.1Sjonathan#define	sys_init(fn, opt)	{ fn, opt }
851.1Sjonathan
861.4Snisimuraextern struct platform platform;
871.1Sjonathanextern struct sysinit sysinit[];
881.1Sjonathanextern int nsysinit;
891.5Ssimonb
901.5Ssimonbint	memsize_scan __P((caddr_t));
911.5Ssimonbint	memsize_bitmap __P((caddr_t));
921.5Ssimonbvoid	platform_not_configured __P((void));
931.5Ssimonbvoid	platform_not_supported __P((void));
941.5Ssimonb
951.1Sjonathan
961.1Sjonathan#endif /* _KERNEL */
971.2Sthorpej#endif /* !_PMAX_SYSCONF_H_ */
98