Home | History | Annotate | Line # | Download | only in include
platform.h revision 1.2
      1 /*	$NetBSD: platform.h,v 1.2 2002/11/30 19:23:47 tsutsui Exp $	*/
      2 /*	NetBSD: cpuconf.h,v 1.12 2000/06/08 03:10:06 thorpej Exp 	*/
      3 
      4 /*
      5  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
      6  *
      7  * Redistribution and use in source and binary forms, with or without
      8  * modification, are permitted provided that the following conditions
      9  * are met:
     10  * 1. Redistributions of source code must retain the above copyright
     11  *    notice, this list of conditions and the following disclaimer.
     12  * 2. Redistributions in binary form must reproduce the above copyright
     13  *    notice, this list of conditions and the following disclaimer in the
     14  *    documentation and/or other materials provided with the distribution.
     15  * 3. All advertising materials mentioning features or use of this software
     16  *    must display the following acknowledgement:
     17  *      This product includes software developed by Christopher G. Demetriou
     18  *	for the NetBSD Project.
     19  * 4. The name of the author may not be used to endorse or promote products
     20  *    derived from this software without specific prior written permission
     21  *
     22  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
     23  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
     24  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     25  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
     26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
     27  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
     28  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
     29  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
     30  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
     31  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
     32  */
     33 
     34 struct platform {
     35 	/*
     36 	 * Platform Information.
     37 	 */
     38 	const char	*system_id;	/* from root of configuration tree */
     39 	const char	*vendor_id;	/* vendor id from GetSystemId() */
     40 	const char	*variant;	/* Variant Name */
     41 	const char	*model;		/* Model Name */
     42 	const char	*vendor;	/* Vendor Name */
     43 	int		clock;		/* CPU clock [MHz] */
     44 
     45 	char	**mainbusdevs;
     46 
     47 	/*
     48 	 * Platform Specific Function Hooks
     49 	 */
     50 	int	(*match) __P((struct platform *));
     51 	void	(*init) __P((void));
     52 	void	(*cons_init) __P((void));
     53 	void	(*reset) __P((void));
     54 	void	(*set_intr) __P((int,
     55 		    int (*) __P((u_int, struct clockframe *)), int));
     56 };
     57 
     58 int ident_platform __P((void));
     59 int platform_generic_match __P((struct platform *));
     60 void platform_nop __P((void));
     61 
     62 extern struct platform *platform;
     63 
     64 extern struct platform *const plattab[];
     65 extern const int nplattab;
     66 
     67 /*
     68  * supported platforms, sorted by alphabetic order of p_*.c filename.
     69  */
     70 extern struct platform platform_acer_pica_61;
     71 extern struct platform platform_desktech_arcstation_i;
     72 extern struct platform platform_desktech_tyne;
     73 extern struct platform platform_microsoft_jazz;
     74 extern struct platform platform_nec_j96a;
     75 extern struct platform platform_nec_jc94;
     76 extern struct platform platform_nec_r94;
     77 extern struct platform platform_nec_r96;
     78 extern struct platform platform_nec_riscserver_2200;
     79 extern struct platform platform_nec_rax94;
     80 extern struct platform platform_nec_rd94;
     81 extern struct platform platform_sni_rm200pci;
     82 
     83 void c_isa_init __P((void));
     84 void c_isa_cons_init __P((void));
     85 
     86 extern char *c_jazz_eisa_mainbusdevs[];
     87 void c_jazz_eisa_init __P((void));
     88 void c_jazz_eisa_cons_init __P((void));
     89 
     90 void c_magnum_set_intr __P((int, int (*) __P((u_int, struct clockframe *)),
     91     int));
     92 void c_magnum_init __P((void));
     93 
     94 void c_nec_eisa_init __P((void));
     95 
     96 void c_nec_jazz_set_intr __P((int, int (*) __P((u_int, struct clockframe *)),
     97     int));
     98 void c_nec_jazz_init __P((void));
     99 
    100 extern char *c_nec_pci_mainbusdevs[];
    101 void c_nec_pci_init __P((void));
    102 void c_nec_pci_cons_init __P((void));
    103 
    104 
    105