Module Name: src Committed By: matt Date: Mon Feb 1 06:09:21 UTC 2010
Modified Files: src/sys/arch/pmax/pmax [matt-nb5-mips64]: bus_dma.c dec_3100.c dec_3max.c dec_3min.c dec_maxine.c interrupt.c machdep.c Log Message: Update to reflect mips tree changes. To generate a diff of this commit: cvs rdiff -u -r1.49.16.1 -r1.49.16.2 src/sys/arch/pmax/pmax/bus_dma.c cvs rdiff -u -r1.44 -r1.44.36.1 src/sys/arch/pmax/pmax/dec_3100.c cvs rdiff -u -r1.45 -r1.45.36.1 src/sys/arch/pmax/pmax/dec_3max.c cvs rdiff -u -r1.60.22.1 -r1.60.22.2 src/sys/arch/pmax/pmax/dec_3min.c cvs rdiff -u -r1.52.28.1 -r1.52.28.2 src/sys/arch/pmax/pmax/dec_maxine.c cvs rdiff -u -r1.15 -r1.15.18.1 src/sys/arch/pmax/pmax/interrupt.c cvs rdiff -u -r1.223.8.1.2.4 -r1.223.8.1.2.5 src/sys/arch/pmax/pmax/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/pmax/pmax/bus_dma.c diff -u src/sys/arch/pmax/pmax/bus_dma.c:1.49.16.1 src/sys/arch/pmax/pmax/bus_dma.c:1.49.16.2 --- src/sys/arch/pmax/pmax/bus_dma.c:1.49.16.1 Wed Aug 26 03:46:40 2009 +++ src/sys/arch/pmax/pmax/bus_dma.c Mon Feb 1 06:09:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.49.16.1 2009/08/26 03:46:40 matt Exp $ */ +/* $NetBSD: bus_dma.c,v 1.49.16.2 2010/02/01 06:09:21 matt Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.49.16.1 2009/08/26 03:46:40 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.49.16.2 2010/02/01 06:09:21 matt Exp $"); #include "opt_cputype.h" @@ -506,7 +506,7 @@ * NOTE: Even though this is `wbinv_all', since the cache is * write-though, it just invalidates it. */ - if (len >= mips_pdcache_size) { + if (len >= mips_cache_info.mci_pdcache_size) { mips_dcache_wbinv_all(); return; } @@ -702,7 +702,6 @@ int *rsegs; int flags; { - extern paddr_t avail_start, avail_end; /* XXX */ vaddr_t curaddr, lastaddr; psize_t high; struct vm_page *m; @@ -712,12 +711,12 @@ /* Always round the size. */ size = round_page(size); - high = avail_end - PAGE_SIZE; + high = mips_avail_end - PAGE_SIZE; /* * Allocate pages from the VM system. */ - error = uvm_pglistalloc(size, avail_start, high, alignment, boundary, + error = uvm_pglistalloc(size, mips_avail_start, high, alignment, boundary, &mlist, nsegs, (flags & BUS_DMA_NOWAIT) == 0); if (error) return (error); @@ -735,7 +734,7 @@ for (; m != NULL; m = m->pageq.queue.tqe_next) { curaddr = VM_PAGE_TO_PHYS(m); #ifdef DIAGNOSTIC - if (curaddr < avail_start || curaddr >= high) { + if (curaddr < mips_avail_start || curaddr >= high) { printf("uvm_pglistalloc returned non-sensical" " address 0x%lx\n", curaddr); panic("_bus_dmamem_alloc"); Index: src/sys/arch/pmax/pmax/dec_3100.c diff -u src/sys/arch/pmax/pmax/dec_3100.c:1.44 src/sys/arch/pmax/pmax/dec_3100.c:1.44.36.1 --- src/sys/arch/pmax/pmax/dec_3100.c:1.44 Mon Dec 3 15:34:09 2007 +++ src/sys/arch/pmax/pmax/dec_3100.c Mon Feb 1 06:09:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3100.c,v 1.44 2007/12/03 15:34:09 ad Exp $ */ +/* $NetBSD: dec_3100.c,v 1.44.36.1 2010/02/01 06:09:21 matt Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -105,7 +105,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: dec_3100.c,v 1.44 2007/12/03 15:34:09 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3100.c,v 1.44.36.1 2010/02/01 06:09:21 matt Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -169,7 +169,7 @@ /* calibrate cpu_mhz value */ mc_cpuspeed(MIPS_PHYS_TO_KSEG1(KN01_SYS_CLOCK), MIPS_INT_MASK_3); - if (cpu_mhz < 15) + if (mips_options.mips_cpu_mhz < 15) submodel = "2100 (PMIN)"; else submodel = "3100 (PMAX)"; Index: src/sys/arch/pmax/pmax/dec_3max.c diff -u src/sys/arch/pmax/pmax/dec_3max.c:1.45 src/sys/arch/pmax/pmax/dec_3max.c:1.45.36.1 --- src/sys/arch/pmax/pmax/dec_3max.c:1.45 Mon Dec 3 15:34:09 2007 +++ src/sys/arch/pmax/pmax/dec_3max.c Mon Feb 1 06:09:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3max.c,v 1.45 2007/12/03 15:34:09 ad Exp $ */ +/* $NetBSD: dec_3max.c,v 1.45.36.1 2010/02/01 06:09:21 matt Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -106,7 +106,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: dec_3max.c,v 1.45 2007/12/03 15:34:09 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3max.c,v 1.45.36.1 2010/02/01 06:09:21 matt Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -132,14 +132,14 @@ #include <pmax/pmax/cons.h> #include "wsdisplay.h" -void dec_3max_init __P((void)); /* XXX */ -static void dec_3max_bus_reset __P((void)); +void dec_3max_init(void); /* XXX */ +static void dec_3max_bus_reset(void); -static void dec_3max_cons_init __P((void)); -static void dec_3max_errintr __P((void)); -static void dec_3max_intr __P((unsigned, unsigned, unsigned, unsigned)); -static void dec_3max_intr_establish __P((struct device *, void *, - int, int (*)(void *), void *)); +static void dec_3max_cons_init(void); +static void dec_3max_errintr(void); +static void dec_3max_intr(uint32_t, uint32_t, vaddr_t, uint32_t); +static void dec_3max_intr_establish(device_t, void *, + int, int (*)(void *), void *); #define kn02_wbflush() mips1_wbflush() /* XXX to be corrected XXX */ @@ -154,9 +154,9 @@ }; void -dec_3max_init() +dec_3max_init(void) { - u_int32_t csr; + uint32_t csr; platform.iobus = "tcbus"; platform.bus_reset = dec_3max_bus_reset; @@ -167,7 +167,7 @@ /* no high resolution timer available */ /* clear any memory errors */ - *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_ERRADR) = 0; + *(uint32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_ERRADR) = 0; kn02_wbflush(); ipl2spl_table = dec_3max_ipl2spl_table; @@ -179,9 +179,9 @@ * Enable ECC memory correction, turn off LEDs, and * disable all TURBOchannel interrupts. */ - csr = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR); + csr = *(uint32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR); csr &= ~(KN02_CSR_WRESERVED|KN02_CSR_IOINTEN|KN02_CSR_CORRECT|0xff); - *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR) = csr; + *(uint32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR) = csr; kn02_wbflush(); strcpy(cpu_model, "DECstation 5000/200 (3MAX)"); @@ -197,10 +197,10 @@ * Reset interrupts, clear any errors from newconf probes */ - *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_ERRADR) = 0; + *(uint32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_ERRADR) = 0; kn02_wbflush(); - *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CHKSYN) = 0; + *(uint32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CHKSYN) = 0; kn02_wbflush(); } @@ -208,7 +208,7 @@ dec_3max_cons_init() { int kbd, crt, screen; - extern int tcfb_cnattach __P((int)); /* XXX */ + extern int tcfb_cnattach(int); /* XXX */ kbd = crt = screen = 0; prom_findcons(&kbd, &crt, &screen); @@ -249,14 +249,14 @@ static void dec_3max_intr_establish(dev, cookie, level, handler, arg) - struct device *dev; + device_t dev; void *cookie; int level; - int (*handler) __P((void *)); + int (*handler)(void *); void *arg; { int i; - u_int32_t csr; + uint32_t csr; for (i = 0; i < sizeof(kn02intrs)/sizeof(kn02intrs[0]); i++) { if (kn02intrs[i].cookie == (int)cookie) @@ -268,9 +268,9 @@ intrtab[(int)cookie].ih_func = handler; intrtab[(int)cookie].ih_arg = arg; - csr = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR) & 0x00ffff00; + csr = *(uint32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR) & 0x00ffff00; csr |= (kn02intrs[i].intrbit << 16); - *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR) = csr; + *(uint32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR) = csr; kn02_wbflush(); } @@ -282,20 +282,16 @@ } while (0) static void -dec_3max_intr(status, cause, pc, ipending) - unsigned status; - unsigned cause; - unsigned pc; - unsigned ipending; +dec_3max_intr(uint32_t status, uint32_t cause, vaddr_t pc, uint32_t ipending) { static int warned = 0; - u_int32_t csr; + uint32_t csr; /* handle clock interrupts ASAP */ if (ipending & MIPS_INT_MASK_1) { struct clockframe cf; - csr = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR); + csr = *(uint32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR); if ((csr & KN02_CSR_PSWARN) && !warned) { warned = 1; printf("WARNING: power supply is overheating!\n"); @@ -319,7 +315,7 @@ _splset(MIPS_SR_INT_IE | (status & MIPS_INT_MASK_1)); if (ipending & MIPS_INT_MASK_0) { - csr = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR); + csr = *(uint32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR); csr &= (csr >> KN02_CSR_IOINTEN_SHIFT); if (csr & (KN02_IP_DZ | KN02_IP_LANCE | KN02_IP_SCSI)) { if (csr & KN02_IP_DZ) @@ -355,14 +351,14 @@ static void dec_3max_errintr() { - u_int32_t erradr, errsyn, csr; + uint32_t erradr, errsyn, csr; /* Fetch error address, ECC chk/syn bits, clear interrupt */ - erradr = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_ERRADR); + erradr = *(uint32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_ERRADR); errsyn = MIPS_PHYS_TO_KSEG1(KN02_SYS_CHKSYN); - *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_ERRADR) = 0; + *(uint32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_ERRADR) = 0; kn02_wbflush(); - csr = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR); + csr = *(uint32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR); /* Send to kn02/kn03 memory subsystem handler */ dec_mtasic_err(erradr, errsyn, csr & KN02_CSR_BNK32M); Index: src/sys/arch/pmax/pmax/dec_3min.c diff -u src/sys/arch/pmax/pmax/dec_3min.c:1.60.22.1 src/sys/arch/pmax/pmax/dec_3min.c:1.60.22.2 --- src/sys/arch/pmax/pmax/dec_3min.c:1.60.22.1 Tue Sep 8 17:24:09 2009 +++ src/sys/arch/pmax/pmax/dec_3min.c Mon Feb 1 06:09:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3min.c,v 1.60.22.1 2009/09/08 17:24:09 matt Exp $ */ +/* $NetBSD: dec_3min.c,v 1.60.22.2 2010/02/01 06:09:21 matt Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -106,7 +106,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: dec_3min.c,v 1.60.22.1 2009/09/08 17:24:09 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3min.c,v 1.60.22.2 2010/02/01 06:09:21 matt Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -214,7 +214,7 @@ physmem_boardmax = physmem_boardmax >> 2; physmem_boardmax = MIPS_PHYS_TO_KSEG1(physmem_boardmax); - sprintf(cpu_model, "DECstation 5000/1%d (3MIN)", cpu_mhz); + sprintf(cpu_model, "DECstation 5000/1%d (3MIN)", mips_options.mips_cpu_mhz); } /* @@ -511,8 +511,8 @@ }; if (MIPS_HAS_CLOCK) { - tc.tc_frequency = cpu_mhz * 1000000; - if (mips_cpu_flags & CPU_MIPS_DOUBLE_COUNT) { + tc.tc_frequency = mips_options.mips_cpu_mhz * 1000000; + if (mips_options.mips_cpu_flags & CPU_MIPS_DOUBLE_COUNT) { tc.tc_frequency /= 2; } Index: src/sys/arch/pmax/pmax/dec_maxine.c diff -u src/sys/arch/pmax/pmax/dec_maxine.c:1.52.28.1 src/sys/arch/pmax/pmax/dec_maxine.c:1.52.28.2 --- src/sys/arch/pmax/pmax/dec_maxine.c:1.52.28.1 Tue Sep 8 17:24:09 2009 +++ src/sys/arch/pmax/pmax/dec_maxine.c Mon Feb 1 06:09:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_maxine.c,v 1.52.28.1 2009/09/08 17:24:09 matt Exp $ */ +/* $NetBSD: dec_maxine.c,v 1.52.28.2 2010/02/01 06:09:21 matt Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -106,7 +106,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: dec_maxine.c,v 1.52.28.1 2009/09/08 17:24:09 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_maxine.c,v 1.52.28.2 2010/02/01 06:09:21 matt Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -199,7 +199,7 @@ *(uint32_t *)(ioasic_base + IOASIC_IMSK) = xine_tc3_imask; kn02ca_wbflush(); - sprintf(cpu_model, "Personal DECstation 5000/%d (MAXINE)", cpu_mhz); + sprintf(cpu_model, "Personal DECstation 5000/%d (MAXINE)", mips_options.mips_cpu_mhz); } /* Index: src/sys/arch/pmax/pmax/interrupt.c diff -u src/sys/arch/pmax/pmax/interrupt.c:1.15 src/sys/arch/pmax/pmax/interrupt.c:1.15.18.1 --- src/sys/arch/pmax/pmax/interrupt.c:1.15 Mon Apr 28 20:23:31 2008 +++ src/sys/arch/pmax/pmax/interrupt.c Mon Feb 1 06:09:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: interrupt.c,v 1.15 2008/04/28 20:23:31 martin Exp $ */ +/* $NetBSD: interrupt.c,v 1.15.18.1 2010/02/01 06:09:21 matt Exp $ */ /*- * Copyright (c) 2001, 2008 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.15 2008/04/28 20:23:31 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.15.18.1 2010/02/01 06:09:21 matt Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -52,7 +52,7 @@ struct evcnt pmax_memerr_evcnt = EVCNT_INITIALIZER(EVCNT_TYPE_INTR, NULL, "memerr", "intr"); -extern void MachFPInterrupt(unsigned, unsigned, unsigned, struct frame *); +void MachFPInterrupt(unsigned, unsigned, unsigned, struct trapframe *); static const char * const intrnames[] = { "serial0", @@ -94,15 +94,15 @@ MIPS_INT_MASK_3|MIPS_INT_MASK_4)) { (*platform.iointr)(status, cause, pc, ipending); } +#if !defined(NOFPU) /* FPU notification */ if (ipending & MIPS_INT_MASK_5) { if (!USERMODE(status)) goto kerneltouchedFPU; pmax_fpu_evcnt.ev_count++; -#if !defined(SOFTFLOAT) - MachFPInterrupt(status, cause, pc, curlwp->l_md.md_regs); -#endif + MachFPInterrupt(status, cause, pc, curlwp->l_md.md_utf); } +#endif ci->ci_idepth--; Index: src/sys/arch/pmax/pmax/machdep.c diff -u src/sys/arch/pmax/pmax/machdep.c:1.223.8.1.2.4 src/sys/arch/pmax/pmax/machdep.c:1.223.8.1.2.5 --- src/sys/arch/pmax/pmax/machdep.c:1.223.8.1.2.4 Thu Dec 31 00:54:09 2009 +++ src/sys/arch/pmax/pmax/machdep.c Mon Feb 1 06:09:21 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.223.8.1.2.4 2009/12/31 00:54:09 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.223.8.1.2.5 2010/02/01 06:09:21 matt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -77,7 +77,7 @@ */ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.223.8.1.2.4 2009/12/31 00:54:09 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.223.8.1.2.5 2010/02/01 06:09:21 matt Exp $"); #include "fs_mfs.h" #include "opt_ddb.h" @@ -128,9 +128,6 @@ unsigned int ssir; /* simulated interrupt register */ -/* Our exported CPU info; we can have only one. */ -struct cpu_info cpu_info_store; - /* maps for VM objects */ struct vm_map *mb_map = NULL; struct vm_map *phys_map = NULL; @@ -418,7 +415,7 @@ { /* All r4k pmaxen have a 1MB L2 cache. */ if (CPUISMIPS3) - mips_sdcache_size = 1024 * 1024; + mips_cache_info.mci_sdcache_size = 1024 * 1024; } void @@ -505,8 +502,7 @@ { /* take a snap shot before clobbering any registers */ - if (curlwp) - savectx((struct user *)curpcb); + savectx(curlwp->l_addr); #ifdef DEBUG if (panicstr)