1*5e124f3aSmatt /* $NetBSD: sysconf.h,v 1.14 2011/02/20 07:50:25 matt Exp $ */ 2b6fca1a9Sthorpej 36975dc93Sjonathan /* 46975dc93Sjonathan * Copyright (c) 1996 Christopher G. Demetriou. All rights reserved. 56975dc93Sjonathan * 66975dc93Sjonathan * Redistribution and use in source and binary forms, with or without 76975dc93Sjonathan * modification, are permitted provided that the following conditions 86975dc93Sjonathan * are met: 96975dc93Sjonathan * 1. Redistributions of source code must retain the above copyright 106975dc93Sjonathan * notice, this list of conditions and the following disclaimer. 116975dc93Sjonathan * 2. Redistributions in binary form must reproduce the above copyright 126975dc93Sjonathan * notice, this list of conditions and the following disclaimer in the 136975dc93Sjonathan * documentation and/or other materials provided with the distribution. 146975dc93Sjonathan * 3. All advertising materials mentioning features or use of this software 156975dc93Sjonathan * must display the following acknowledgement: 166975dc93Sjonathan * This product includes software developed by Christopher G. Demetriou 176975dc93Sjonathan * for the NetBSD Project. 186975dc93Sjonathan * 4. The name of the author may not be used to endorse or promote products 196975dc93Sjonathan * derived from this software without specific prior written permission 206975dc93Sjonathan * 216975dc93Sjonathan * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 226975dc93Sjonathan * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 236975dc93Sjonathan * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 246975dc93Sjonathan * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 256975dc93Sjonathan * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 266975dc93Sjonathan * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 276975dc93Sjonathan * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 286975dc93Sjonathan * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 296975dc93Sjonathan * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 306975dc93Sjonathan * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 316975dc93Sjonathan */ 32838b5e08Sad 336975dc93Sjonathan /* 346975dc93Sjonathan * Additional reworking by Matthew Jacob for NASA/Ames Research Center. 356975dc93Sjonathan * Copyright (c) 1997 366975dc93Sjonathan */ 376975dc93Sjonathan 386975dc93Sjonathan /* 396975dc93Sjonathan * Copyright (c) 1998 Jonathan Stone. All rights reserved. 406975dc93Sjonathan * Additional reworking for pmaxes. 416975dc93Sjonathan * Since pmax mboard support different CPU daughterboards, 426975dc93Sjonathan * and others are mmultiprocessors, rename from cpu_* to sys_*. 436975dc93Sjonathan */ 446975dc93Sjonathan 45b6fca1a9Sthorpej #ifndef _PMAX_SYSCONF_H_ 46b6fca1a9Sthorpej #define _PMAX_SYSCONF_H_ 47b6fca1a9Sthorpej 486975dc93Sjonathan #ifdef _KERNEL 496975dc93Sjonathan /* 506975dc93Sjonathan * Platform Specific Information and Function Hooks. 516975dc93Sjonathan * 5291fd0218Snisimura * The tag iobus describes the primary iobus for the platform, primarily 5391fd0218Snisimura * to give a hint as to where to start configuring. 546975dc93Sjonathan */ 556975dc93Sjonathan 5691fd0218Snisimura struct platform { 576975dc93Sjonathan const char *iobus; /* Primary iobus name */ 586975dc93Sjonathan 596975dc93Sjonathan /* 606975dc93Sjonathan * Platform Specific Function Hooks 6191fd0218Snisimura * bus_reset - clear memory error condition 626975dc93Sjonathan * cons_init - console initialization 636975dc93Sjonathan * iointr - I/O interrupt handler 64bdf420bdSsimonb * intr_establish - establish interrupt handler 65bdf420bdSsimonb * intr_disestablish - disestablish interrupt handler 6628b31e73Sjoerg * tc_init - initialize timecounters 676975dc93Sjonathan */ 6802cdf4d2Sdsl void (*bus_reset)(void); 6902cdf4d2Sdsl void (*cons_init)(void); 70*5e124f3aSmatt void (*iointr)(uint32_t, vaddr_t, uint32_t); 71*5e124f3aSmatt void (*intr_establish)(device_t, void *, int, int (*)(void *), 72*5e124f3aSmatt void *); 7302cdf4d2Sdsl int (*memsize)(void *); 7428b31e73Sjoerg void (*tc_init)(void); 7591fd0218Snisimura }; 766975dc93Sjonathan 776975dc93Sjonathan /* 7891fd0218Snisimura * An array of functions to initialize the platform structure. 796975dc93Sjonathan */ 806975dc93Sjonathan struct sysinit { 8102cdf4d2Sdsl void (*init)(void); 826975dc93Sjonathan const char *option; 836975dc93Sjonathan }; 846975dc93Sjonathan 856975dc93Sjonathan #define sys_notsupp(st) { platform_not_supported, st } 866975dc93Sjonathan #define sys_init(fn, opt) { fn, opt } 876975dc93Sjonathan 8891fd0218Snisimura extern struct platform platform; 89*5e124f3aSmatt extern const struct sysinit sysinit[]; 90*5e124f3aSmatt extern const int nsysinit; 91353ca540Ssimonb 9202cdf4d2Sdsl int memsize_scan(void *); 9302cdf4d2Sdsl int memsize_bitmap(void *); 9402cdf4d2Sdsl void platform_not_configured(void); 9502cdf4d2Sdsl void platform_not_supported(void); 96353ca540Ssimonb 976975dc93Sjonathan #endif /* _KERNEL */ 98838b5e08Sad 99b6fca1a9Sthorpej #endif /* !_PMAX_SYSCONF_H_ */ 100