1 /* $NetBSD: api_up1000.c,v 1.34 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: api_up1000.c,v 1.34 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 <machine/alpha.h> 42 #include <machine/rpb.h> 43 #include <machine/autoconf.h> 44 #include <machine/cpuconf.h> 45 46 #include <dev/pci/pcivar.h> 47 48 #include <alpha/pci/irongatereg.h> 49 #include <alpha/pci/irongatevar.h> 50 51 void api_up1000_init(void); 52 static void api_up1000_cons_init(void); 53 static void api_up1000_device_register(device_t, void *); 54 55 void 56 api_up1000_init(void) 57 { 58 59 platform.family = "Alpha Processor, Inc. UP1000"; 60 61 if ((platform.model = alpha_dsr_sysname()) == NULL) { 62 /* XXX Don't know the system variations, yet. */ 63 platform.model = alpha_unknown_sysname(); 64 } 65 66 platform.iobus = "irongate"; 67 platform.cons_init = api_up1000_cons_init; 68 platform.device_register = api_up1000_device_register; 69 platform.page_physload = irongate_page_physload; 70 } 71 72 static void 73 api_up1000_cons_init(void) 74 { 75 struct irongate_config *icp; 76 extern struct irongate_config irongate_configuration; 77 78 icp = &irongate_configuration; 79 irongate_init(icp); 80 81 pci_consinit(&icp->ic_pc, &icp->ic_iot, &icp->ic_memt, 82 &icp->ic_iot, &icp->ic_memt); 83 } 84 85 static void 86 api_up1000_device_register(device_t dev, void *aux) 87 { 88 pci_find_bootdev(NULL, dev, aux); 89 } 90