Home | History | Annotate | Line # | Download | only in alpha
      1 /* $NetBSD: dec_eb164.c,v 1.65 2025/03/09 01:06:41 thorpej Exp $ */
      2 
      3 /*
      4  * Copyright (c) 1995, 1996, 1997 Carnegie-Mellon University.
      5  * All rights reserved.
      6  *
      7  * Author: Chris G. Demetriou
      8  *
      9  * Permission to use, copy, modify and distribute this software and
     10  * its documentation is hereby granted, provided that both the copyright
     11  * notice and this permission notice appear in all copies of the
     12  * software, derivative works or modified versions, and any portions
     13  * thereof, and that both notices appear in supporting documentation.
     14  *
     15  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
     16  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND
     17  * FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
     18  *
     19  * Carnegie Mellon requests users of this software to return to
     20  *
     21  *  Software Distribution Coordinator  or  Software.Distribution (at) CS.CMU.EDU
     22  *  School of Computer Science
     23  *  Carnegie Mellon University
     24  *  Pittsburgh PA 15213-3890
     25  *
     26  * any improvements or extensions that they make and grant Carnegie the
     27  * rights to redistribute these changes.
     28  */
     29 /*
     30  * Additional Copyright (c) 1997 by Matthew Jacob for NASA/Ames Research Center
     31  */
     32 
     33 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
     34 
     35 __KERNEL_RCSID(0, "$NetBSD: dec_eb164.c,v 1.65 2025/03/09 01:06:41 thorpej Exp $");
     36 
     37 #include <sys/param.h>
     38 #include <sys/systm.h>
     39 #include <sys/device.h>
     40 
     41 #include <uvm/uvm_extern.h>
     42 
     43 #include <machine/rpb.h>
     44 #include <machine/autoconf.h>
     45 #include <machine/cpuconf.h>
     46 
     47 #include <dev/pci/pcivar.h>
     48 
     49 #include <alpha/pci/ciareg.h>
     50 #include <alpha/pci/ciavar.h>
     51 
     52 void dec_eb164_init(void);
     53 static void dec_eb164_cons_init(void);
     54 static void dec_eb164_device_register(device_t, void *);
     55 
     56 void
     57 dec_eb164_init(void)
     58 {
     59 
     60 	platform.family = "EB164";
     61 
     62 	if ((platform.model = alpha_dsr_sysname()) == NULL) {
     63 		/* XXX Don't know the system variations, yet. */
     64 		platform.model = alpha_unknown_sysname();
     65 	}
     66 
     67 	platform.iobus = "cia";
     68 	platform.cons_init = dec_eb164_cons_init;
     69 	platform.device_register = dec_eb164_device_register;
     70 
     71 	/*
     72 	 * EB164 systems have a 2MB secondary cache.
     73 	 */
     74 	uvmexp.ncolors = atop(2 * 1024 * 1024);
     75 }
     76 
     77 static void
     78 dec_eb164_cons_init(void)
     79 {
     80 	struct cia_config *ccp;
     81 	extern struct cia_config cia_configuration;
     82 
     83 	ccp = &cia_configuration;
     84 	cia_init(ccp);
     85 
     86 	pci_consinit(&ccp->cc_pc, &ccp->cc_iot, &ccp->cc_memt,
     87 	    &ccp->cc_iot, &ccp->cc_memt);
     88 }
     89 
     90 static void
     91 dec_eb164_device_register(device_t dev, void *aux)
     92 {
     93 	pci_find_bootdev(NULL, dev, aux);
     94 }
     95