sysconf.h revision 1.7
11.7Ssimonb/* $NetBSD: sysconf.h,v 1.7 2000/01/14 13:45:22 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.6Sad 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.2Sthorpej#ifndef _PMAX_SYSCONF_H_ 461.2Sthorpej#define _PMAX_SYSCONF_H_ 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.7Ssimonb * intr_establish - establish interrupt handler 661.7Ssimonb * intr_disestablish - disestablish interrupt handler 671.4Snisimura * clkread - interporate HZ with hi-resolution timer 681.1Sjonathan */ 691.1Sjonathan void (*bus_reset) __P((void)); 701.1Sjonathan void (*cons_init) __P((void)); 711.1Sjonathan void (*device_register) __P((struct device *, void *)); 721.4Snisimura int (*iointr) __P((unsigned, unsigned, unsigned, unsigned)); 731.7Ssimonb void (*intr_establish) __P((struct device *, void *, int, 741.7Ssimonb int (*)(void *), void *)); 751.7Ssimonb void (*intr_disestablish) __P((struct device *, void *)); 761.5Ssimonb int (*memsize) __P((caddr_t)); 771.4Snisimura unsigned (*clkread) __P((void)); 781.4Snisimura}; 791.1Sjonathan 801.1Sjonathan/* 811.4Snisimura * An array of functions to initialize the platform structure. 821.1Sjonathan */ 831.1Sjonathanstruct sysinit { 841.1Sjonathan void (*init) __P((void)); 851.1Sjonathan const char *option; 861.1Sjonathan}; 871.1Sjonathan 881.1Sjonathan#define sys_notsupp(st) { platform_not_supported, st } 891.1Sjonathan#define sys_init(fn, opt) { fn, opt } 901.1Sjonathan 911.4Snisimuraextern struct platform platform; 921.1Sjonathanextern struct sysinit sysinit[]; 931.1Sjonathanextern int nsysinit; 941.5Ssimonb 951.5Ssimonbint memsize_scan __P((caddr_t)); 961.5Ssimonbint memsize_bitmap __P((caddr_t)); 971.5Ssimonbvoid platform_not_configured __P((void)); 981.5Ssimonbvoid platform_not_supported __P((void)); 991.5Ssimonb 1001.6Sad#endif /* _KERNEL */ 1011.1Sjonathan 1021.6Sad#endif /* !_PMAX_SYSCONF_H_ */ 103