sysconf.h revision 1.14
11.14Smatt/* $NetBSD: sysconf.h,v 1.14 2011/02/20 07:50:25 matt 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.1Sjonathan * iointr - I/O interrupt handler 641.7Ssimonb * intr_establish - establish interrupt handler 651.7Ssimonb * intr_disestablish - disestablish interrupt handler 661.12Sjoerg * tc_init - initialize timecounters 671.1Sjonathan */ 681.13Sdsl void (*bus_reset)(void); 691.13Sdsl void (*cons_init)(void); 701.14Smatt void (*iointr)(uint32_t, vaddr_t, uint32_t); 711.14Smatt void (*intr_establish)(device_t, void *, int, int (*)(void *), 721.14Smatt void *); 731.13Sdsl int (*memsize)(void *); 741.12Sjoerg void (*tc_init)(void); 751.4Snisimura}; 761.1Sjonathan 771.1Sjonathan/* 781.4Snisimura * An array of functions to initialize the platform structure. 791.1Sjonathan */ 801.1Sjonathanstruct sysinit { 811.13Sdsl void (*init)(void); 821.1Sjonathan const char *option; 831.1Sjonathan}; 841.1Sjonathan 851.1Sjonathan#define sys_notsupp(st) { platform_not_supported, st } 861.1Sjonathan#define sys_init(fn, opt) { fn, opt } 871.1Sjonathan 881.4Snisimuraextern struct platform platform; 891.14Smattextern const struct sysinit sysinit[]; 901.14Smattextern const int nsysinit; 911.5Ssimonb 921.13Sdslint memsize_scan(void *); 931.13Sdslint memsize_bitmap(void *); 941.13Sdslvoid platform_not_configured(void); 951.13Sdslvoid platform_not_supported(void); 961.5Ssimonb 971.6Sad#endif /* _KERNEL */ 981.1Sjonathan 991.6Sad#endif /* !_PMAX_SYSCONF_H_ */ 100