Module Name: src Committed By: matt Date: Tue Sep 8 17:24:09 UTC 2009
Modified Files: src/sys/arch/pmax/include [matt-nb5-mips64]: loadfile_machdep.h tc_machdep.h src/sys/arch/pmax/pmax [matt-nb5-mips64]: dec_3maxplus.c dec_3min.c dec_maxine.c machdep.c machdep.h memc.h memc_3max.c memc_3min.c src/sys/arch/pmax/tc [matt-nb5-mips64]: asc_ioasic.c Added Files: src/sys/arch/pmax/conf [matt-nb5-mips64]: GENERIC64 INSTALL64 RAMDISK64 std.pmax64 Log Message: Enable building LP64 kernels for 3min, maxine, and 3maxplus. Fix various LP64 bugs. XXX still invoked via O32 call args To generate a diff of this commit: cvs rdiff -u -r0 -r1.1.2.1 src/sys/arch/pmax/conf/GENERIC64 \ src/sys/arch/pmax/conf/INSTALL64 src/sys/arch/pmax/conf/RAMDISK64 \ src/sys/arch/pmax/conf/std.pmax64 cvs rdiff -u -r1.6 -r1.6.18.1 src/sys/arch/pmax/include/loadfile_machdep.h cvs rdiff -u -r1.17 -r1.17.154.1 src/sys/arch/pmax/include/tc_machdep.h cvs rdiff -u -r1.58 -r1.58.28.1 src/sys/arch/pmax/pmax/dec_3maxplus.c cvs rdiff -u -r1.60 -r1.60.22.1 src/sys/arch/pmax/pmax/dec_3min.c cvs rdiff -u -r1.52 -r1.52.28.1 src/sys/arch/pmax/pmax/dec_maxine.c cvs rdiff -u -r1.223.8.1.2.1 -r1.223.8.1.2.2 src/sys/arch/pmax/pmax/machdep.c cvs rdiff -u -r1.11 -r1.11.96.1 src/sys/arch/pmax/pmax/machdep.h cvs rdiff -u -r1.3 -r1.3.154.1 src/sys/arch/pmax/pmax/memc.h cvs rdiff -u -r1.13 -r1.13.130.1 src/sys/arch/pmax/pmax/memc_3max.c cvs rdiff -u -r1.10 -r1.10.96.1 src/sys/arch/pmax/pmax/memc_3min.c cvs rdiff -u -r1.20 -r1.20.18.1 src/sys/arch/pmax/tc/asc_ioasic.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/include/loadfile_machdep.h diff -u src/sys/arch/pmax/include/loadfile_machdep.h:1.6 src/sys/arch/pmax/include/loadfile_machdep.h:1.6.18.1 --- src/sys/arch/pmax/include/loadfile_machdep.h:1.6 Mon Apr 28 20:23:31 2008 +++ src/sys/arch/pmax/include/loadfile_machdep.h Tue Sep 8 17:24:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: loadfile_machdep.h,v 1.6 2008/04/28 20:23:31 martin Exp $ */ +/* $NetBSD: loadfile_machdep.h,v 1.6.18.1 2009/09/08 17:24:09 matt Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -35,6 +35,7 @@ #define BOOT_AOUT #define BOOT_ECOFF #define BOOT_ELF32 +#define BOOT_ELF64 #define LOAD_KERNEL (LOAD_ALL & ~LOAD_TEXTA) #define COUNT_KERNEL (COUNT_ALL & ~COUNT_TEXTA) Index: src/sys/arch/pmax/include/tc_machdep.h diff -u src/sys/arch/pmax/include/tc_machdep.h:1.17 src/sys/arch/pmax/include/tc_machdep.h:1.17.154.1 --- src/sys/arch/pmax/include/tc_machdep.h:1.17 Tue Feb 29 04:41:59 2000 +++ src/sys/arch/pmax/include/tc_machdep.h Tue Sep 8 17:24:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: tc_machdep.h,v 1.17 2000/02/29 04:41:59 nisimura Exp $ */ +/* $NetBSD: tc_machdep.h,v 1.17.154.1 2009/09/08 17:24:09 matt Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -62,14 +62,14 @@ #include <mips/cpuregs.h> /* defines MIPS_PHYS_TO_KSEG1 */ -typedef int32_t tc_addr_t; +typedef paddr_t tc_addr_t; typedef int32_t tc_offset_t; #define tc_mb() wbflush() #define tc_wmb() wbflush() #define tc_syncbus() wbflush() /* XXX how to do this on a DECstation ? */ -#define tc_badaddr(tcaddr) badaddr((void *)(tcaddr), sizeof (u_int32_t)) +#define tc_badaddr(tcaddr) badaddr((void *)(tcaddr), sizeof (uint32_t)) #define TC_DENSE_TO_SPARSE(addr) (addr) Index: src/sys/arch/pmax/pmax/dec_3maxplus.c diff -u src/sys/arch/pmax/pmax/dec_3maxplus.c:1.58 src/sys/arch/pmax/pmax/dec_3maxplus.c:1.58.28.1 --- src/sys/arch/pmax/pmax/dec_3maxplus.c:1.58 Thu Jan 3 23:02:24 2008 +++ src/sys/arch/pmax/pmax/dec_3maxplus.c Tue Sep 8 17:24:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3maxplus.c,v 1.58 2008/01/03 23:02:24 joerg Exp $ */ +/* $NetBSD: dec_3maxplus.c,v 1.58.28.1 2009/09/08 17:24:09 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_3maxplus.c,v 1.58 2008/01/03 23:02:24 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3maxplus.c,v 1.58.28.1 2009/09/08 17:24:09 matt Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -147,7 +147,7 @@ /* * Local declarations */ -static u_int32_t kn03_tc3_imask; +static uint32_t kn03_tc3_imask; static unsigned latched_cycle_cnt; static const int dec_3maxplus_ipl2spl_table[] = { @@ -167,7 +167,7 @@ void dec_3maxplus_init() { - u_int32_t prodtype; + uint32_t prodtype; platform.iobus = "tcbus"; platform.bus_reset = dec_3maxplus_bus_reset; @@ -179,7 +179,7 @@ platform.tc_init = dec_3maxplus_tc_init; /* clear any memory errors */ - *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN03_SYS_ERRADR) = 0; + *(uint32_t *)MIPS_PHYS_TO_KSEG1(KN03_SYS_ERRADR) = 0; kn03_wbflush(); ioasic_base = MIPS_PHYS_TO_KSEG1(KN03_SYS_ASIC); @@ -189,24 +189,24 @@ /* calibrate cpu_mhz value */ mc_cpuspeed(ioasic_base+IOASIC_SLOT_8_START, MIPS_INT_MASK_1); - *(u_int32_t *)(ioasic_base + IOASIC_LANCE_DECODE) = 0x3; - *(u_int32_t *)(ioasic_base + IOASIC_SCSI_DECODE) = 0xe; + *(uint32_t *)(ioasic_base + IOASIC_LANCE_DECODE) = 0x3; + *(uint32_t *)(ioasic_base + IOASIC_SCSI_DECODE) = 0xe; #if 0 - *(u_int32_t *)(ioasic_base + IOASIC_SCC0_DECODE) = (0x10|4); - *(u_int32_t *)(ioasic_base + IOASIC_SCC1_DECODE) = (0x10|6); - *(u_int32_t *)(ioasic_base + IOASIC_CSR) = 0x00000f00; + *(uint32_t *)(ioasic_base + IOASIC_SCC0_DECODE) = (0x10|4); + *(uint32_t *)(ioasic_base + IOASIC_SCC1_DECODE) = (0x10|6); + *(uint32_t *)(ioasic_base + IOASIC_CSR) = 0x00000f00; #endif /* XXX hard-reset LANCE */ - *(u_int32_t *)(ioasic_base + IOASIC_CSR) |= 0x100; + *(uint32_t *)(ioasic_base + IOASIC_CSR) |= 0x100; /* sanitize interrupt mask */ kn03_tc3_imask = KN03_INTR_PSWARN; - *(u_int32_t *)(ioasic_base + IOASIC_INTR) = 0; - *(u_int32_t *)(ioasic_base + IOASIC_IMSK) = kn03_tc3_imask; + *(uint32_t *)(ioasic_base + IOASIC_INTR) = 0; + *(uint32_t *)(ioasic_base + IOASIC_IMSK) = kn03_tc3_imask; kn03_wbflush(); - prodtype = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN03_REG_INTR); + prodtype = *(uint32_t *)MIPS_PHYS_TO_KSEG1(KN03_REG_INTR); prodtype &= KN03_INTR_PROD_JUMPER; /* the bit persists even if INTR register is assigned value 0 */ if (prodtype) @@ -227,10 +227,10 @@ * Reset interrupts, clear any errors from newconf probes */ - *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN03_SYS_ERRADR) = 0; + *(uint32_t *)MIPS_PHYS_TO_KSEG1(KN03_SYS_ERRADR) = 0; kn03_wbflush(); - *(u_int32_t *)(ioasic_base + IOASIC_INTR) = 0; + *(uint32_t *)(ioasic_base + IOASIC_INTR) = 0; kn03_wbflush(); } @@ -272,7 +272,7 @@ { unsigned mask; - switch ((int)cookie) { + switch ((uintptr_t)cookie) { case SYS_DEV_OPT0: mask = KN03_INTR_TC_0; break; @@ -303,10 +303,10 @@ } kn03_tc3_imask |= mask; - intrtab[(int)cookie].ih_func = handler; - intrtab[(int)cookie].ih_arg = arg; + intrtab[(uintptr_t)cookie].ih_func = handler; + intrtab[(uintptr_t)cookie].ih_arg = arg; - *(u_int32_t *)(ioasic_base + IOASIC_IMSK) = kn03_tc3_imask; + *(uint32_t *)(ioasic_base + IOASIC_IMSK) = kn03_tc3_imask; kn03_wbflush(); } @@ -367,12 +367,12 @@ #endif if (ipending & MIPS_INT_MASK_0) { int ifound; - u_int32_t imsk, intr, can_serve, xxxintr; + uint32_t imsk, intr, can_serve, xxxintr; do { ifound = 0; - imsk = *(u_int32_t *)(ioasic_base + IOASIC_IMSK); - intr = *(u_int32_t *)(ioasic_base + IOASIC_INTR); + imsk = *(uint32_t *)(ioasic_base + IOASIC_IMSK); + intr = *(uint32_t *)(ioasic_base + IOASIC_INTR); can_serve = intr & imsk; CHECKINTR(SYS_DEV_SCC0, IOASIC_INTR_SCC_0); @@ -414,7 +414,7 @@ xxxintr = can_serve & (ERRORS | PTRLOAD); if (xxxintr) { ifound = 1; - *(u_int32_t *)(ioasic_base + IOASIC_INTR) + *(uint32_t *)(ioasic_base + IOASIC_INTR) = intr &~ xxxintr; } } while (ifound); @@ -435,14 +435,15 @@ static void dec_3maxplus_errintr() { - u_int32_t erradr, errsyn, csr; + uint32_t erradr, csr; + vaddr_t errsyn; /* Fetch error address, ECC chk/syn bits, clear interrupt */ - erradr = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN03_SYS_ERRADR); + erradr = *(uint32_t *)MIPS_PHYS_TO_KSEG1(KN03_SYS_ERRADR); errsyn = MIPS_PHYS_TO_KSEG1(KN03_SYS_ERRSYN); - *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN03_SYS_ERRADR) = 0; + *(uint32_t *)MIPS_PHYS_TO_KSEG1(KN03_SYS_ERRADR) = 0; kn03_wbflush(); - csr = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN03_SYS_CSR); + csr = *(uint32_t *)MIPS_PHYS_TO_KSEG1(KN03_SYS_CSR); /* Send to kn02/kn03 memory subsystem handler */ dec_mtasic_err(erradr, errsyn, csr & KN03_CSR_BNK32M); @@ -462,7 +463,7 @@ static unsigned dec_3maxplus_get_timecount(struct timecounter *tc) { - return *(u_int32_t*)(ioasic_base + IOASIC_CTR); + return *(uint32_t*)(ioasic_base + IOASIC_CTR); } static void Index: src/sys/arch/pmax/pmax/dec_3min.c diff -u src/sys/arch/pmax/pmax/dec_3min.c:1.60 src/sys/arch/pmax/pmax/dec_3min.c:1.60.22.1 --- src/sys/arch/pmax/pmax/dec_3min.c:1.60 Sat Mar 15 08:50:08 2008 +++ src/sys/arch/pmax/pmax/dec_3min.c Tue Sep 8 17:24:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3min.c,v 1.60 2008/03/15 08:50:08 tsutsui Exp $ */ +/* $NetBSD: dec_3min.c,v 1.60.22.1 2009/09/08 17:24:09 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 2008/03/15 08:50:08 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3min.c,v 1.60.22.1 2009/09/08 17:24:09 matt Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -147,7 +147,7 @@ /* * Local declarations. */ -static u_int32_t kmin_tc3_imask; +static uint32_t kmin_tc3_imask; static const int dec_3min_ipl2spl_table[] = { [IPL_NONE] = 0, @@ -176,7 +176,7 @@ platform.tc_init = dec_3min_tc_init; /* clear any memory errors */ - *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_TIMEOUT) = 0; + *(uint32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_TIMEOUT) = 0; kn02ba_wbflush(); ioasic_base = MIPS_PHYS_TO_KSEG1(KMIN_SYS_ASIC); @@ -184,22 +184,22 @@ ipl2spl_table = dec_3min_ipl2spl_table; /* enable posting of MIPS_INT_MASK_3 to CAUSE register */ - *(u_int32_t *)(ioasic_base + IOASIC_IMSK) = KMIN_INTR_CLOCK; + *(uint32_t *)(ioasic_base + IOASIC_IMSK) = KMIN_INTR_CLOCK; /* calibrate cpu_mhz value */ mc_cpuspeed(ioasic_base+IOASIC_SLOT_8_START, MIPS_INT_MASK_3); - *(u_int32_t *)(ioasic_base + IOASIC_LANCE_DECODE) = 0x3; - *(u_int32_t *)(ioasic_base + IOASIC_SCSI_DECODE) = 0xe; + *(uint32_t *)(ioasic_base + IOASIC_LANCE_DECODE) = 0x3; + *(uint32_t *)(ioasic_base + IOASIC_SCSI_DECODE) = 0xe; #if 0 - *(u_int32_t *)(ioasic_base + IOASIC_SCC0_DECODE) = (0x10|4); - *(u_int32_t *)(ioasic_base + IOASIC_SCC1_DECODE) = (0x10|6); - *(u_int32_t *)(ioasic_base + IOASIC_CSR) = 0x00000f00; + *(uint32_t *)(ioasic_base + IOASIC_SCC0_DECODE) = (0x10|4); + *(uint32_t *)(ioasic_base + IOASIC_SCC1_DECODE) = (0x10|6); + *(uint32_t *)(ioasic_base + IOASIC_CSR) = 0x00000f00; #endif /* sanitize interrupt mask */ kmin_tc3_imask = (KMIN_INTR_CLOCK|KMIN_INTR_PSWARN|KMIN_INTR_TIMEOUT); - *(u_int32_t *)(ioasic_base + IOASIC_INTR) = 0; - *(u_int32_t *)(ioasic_base + IOASIC_IMSK) = kmin_tc3_imask; + *(uint32_t *)(ioasic_base + IOASIC_INTR) = 0; + *(uint32_t *)(ioasic_base + IOASIC_IMSK) = kmin_tc3_imask; /* * The kmin memory hardware seems to wrap memory addresses @@ -228,10 +228,10 @@ * Reset interrupts, clear any errors from newconf probes */ - *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_TIMEOUT) = 0; + *(uint32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_TIMEOUT) = 0; kn02ba_wbflush(); - *(u_int32_t *)(ioasic_base + IOASIC_INTR) = 0; + *(uint32_t *)(ioasic_base + IOASIC_INTR) = 0; kn02ba_wbflush(); } @@ -273,7 +273,7 @@ { unsigned mask; - switch ((int)cookie) { + switch ((uintptr_t)cookie) { /* slots 0-2 don't interrupt through the IOASIC. */ case SYS_DEV_OPT0: mask = MIPS_INT_MASK_0; @@ -300,14 +300,14 @@ break; default: #ifdef DIAGNOSTIC - printf("warning: enabling unknown intr %x\n", (int)cookie); + printf("warning: enabling unknown intr %p\n", cookie); #endif return; } #if defined(DEBUG) - printf("3MIN: imask %x, enabling slot %d, dev %p handler %p\n", - kmin_tc3_imask, (int)cookie, dev, handler); + printf("3MIN: imask %x, enabling slot %p, dev %p handler %p\n", + kmin_tc3_imask, cookie, dev, handler); #endif /* @@ -320,10 +320,10 @@ */ /* Set the interrupt handler and argument ... */ - intrtab[(int)cookie].ih_func = handler; - intrtab[(int)cookie].ih_arg = arg; + intrtab[(uintptr_t)cookie].ih_func = handler; + intrtab[(uintptr_t)cookie].ih_arg = arg; /* ... and set the relevant mask */ - switch ((int)cookie) { + switch ((uintptr_t)cookie) { case SYS_DEV_OPT0: case SYS_DEV_OPT1: case SYS_DEV_OPT2: @@ -340,7 +340,7 @@ break; } - *(u_int32_t *)(ioasic_base + IOASIC_IMSK) = kmin_tc3_imask; + *(uint32_t *)(ioasic_base + IOASIC_IMSK) = kmin_tc3_imask; kn02ba_wbflush(); } @@ -362,10 +362,10 @@ { static int user_warned = 0; static int intr_depth = 0; - u_int32_t old_mask; + uint32_t old_mask; intr_depth++; - old_mask = *(u_int32_t *)(ioasic_base + IOASIC_IMSK); + old_mask = *(uint32_t *)(ioasic_base + IOASIC_IMSK); if (ipending & MIPS_INT_MASK_4) prom_haltbutton(); @@ -373,11 +373,11 @@ if (ipending & MIPS_INT_MASK_3) { /* NB: status & MIPS_INT_MASK3 must also be set */ /* masked interrupts are still observable */ - u_int32_t intr, imsk, can_serve, turnoff; + uint32_t intr, imsk, can_serve, turnoff; turnoff = 0; - intr = *(u_int32_t *)(ioasic_base + IOASIC_INTR); - imsk = *(u_int32_t *)(ioasic_base + IOASIC_IMSK); + intr = *(uint32_t *)(ioasic_base + IOASIC_INTR); + imsk = *(uint32_t *)(ioasic_base + IOASIC_IMSK); can_serve = intr & imsk; if (intr & IOASIC_INTR_SCSI_PTR_LOAD) { @@ -394,7 +394,7 @@ turnoff |= IOASIC_INTR_LANCE_READ_E; if (turnoff) - *(u_int32_t *)(ioasic_base + IOASIC_INTR) = ~turnoff; + *(uint32_t *)(ioasic_base + IOASIC_INTR) = ~turnoff; if (intr & KMIN_INTR_TIMEOUT) { kn02ba_errintr(); @@ -416,7 +416,7 @@ /* If clock interrupts were enabled, re-enable them ASAP. */ if (old_mask & KMIN_INTR_CLOCK) { /* ioctl interrupt mask to splclock and higher */ - *(u_int32_t *)(ioasic_base + IOASIC_IMSK) + *(uint32_t *)(ioasic_base + IOASIC_IMSK) = old_mask & ~(KMIN_INTR_SCC_0|KMIN_INTR_SCC_1 | IOASIC_INTR_LANCE|IOASIC_INTR_SCSI); @@ -474,7 +474,7 @@ /* restore entry state */ splhigh(); intr_depth--; - *(u_int32_t *)(ioasic_base + IOASIC_IMSK) = old_mask; + *(uint32_t *)(ioasic_base + IOASIC_IMSK) = old_mask; _splset(MIPS_SR_INT_IE | (status & ~cause & MIPS_HARD_INT_MASK)); } Index: src/sys/arch/pmax/pmax/dec_maxine.c diff -u src/sys/arch/pmax/pmax/dec_maxine.c:1.52 src/sys/arch/pmax/pmax/dec_maxine.c:1.52.28.1 --- src/sys/arch/pmax/pmax/dec_maxine.c:1.52 Thu Jan 3 23:02:25 2008 +++ src/sys/arch/pmax/pmax/dec_maxine.c Tue Sep 8 17:24:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_maxine.c,v 1.52 2008/01/03 23:02:25 joerg Exp $ */ +/* $NetBSD: dec_maxine.c,v 1.52.28.1 2009/09/08 17:24:09 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 2008/01/03 23:02:25 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_maxine.c,v 1.52.28.1 2009/09/08 17:24:09 matt Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -145,7 +145,7 @@ /* * local declarations */ -static u_int32_t xine_tc3_imask; +static uint32_t xine_tc3_imask; static const int dec_maxine_ipl2spl_table[] = { [IPL_NONE] = 0, @@ -174,7 +174,7 @@ /* MAXINE has 1 microsec. free-running high resolution timer */ /* clear any memory errors */ - *(u_int32_t *)MIPS_PHYS_TO_KSEG1(XINE_REG_TIMEOUT) = 0; + *(uint32_t *)MIPS_PHYS_TO_KSEG1(XINE_REG_TIMEOUT) = 0; kn02ca_wbflush(); ioasic_base = MIPS_PHYS_TO_KSEG1(XINE_SYS_ASIC); @@ -184,19 +184,19 @@ /* calibrate cpu_mhz value */ mc_cpuspeed(ioasic_base+IOASIC_SLOT_8_START, MIPS_INT_MASK_1); - *(u_int32_t *)(ioasic_base + IOASIC_LANCE_DECODE) = 0x3; - *(u_int32_t *)(ioasic_base + IOASIC_SCSI_DECODE) = 0xe; + *(uint32_t *)(ioasic_base + IOASIC_LANCE_DECODE) = 0x3; + *(uint32_t *)(ioasic_base + IOASIC_SCSI_DECODE) = 0xe; #if 0 - *(u_int32_t *)(ioasic_base + IOASIC_SCC0_DECODE) = (0x10|4); - *(u_int32_t *)(ioasic_base + IOASIC_DTOP_DECODE) = 10; - *(u_int32_t *)(ioasic_base + IOASIC_FLOPPY_DECODE) = 13; - *(u_int32_t *)(ioasic_base + IOASIC_CSR) = 0x00001fc1; + *(uint32_t *)(ioasic_base + IOASIC_SCC0_DECODE) = (0x10|4); + *(uint32_t *)(ioasic_base + IOASIC_DTOP_DECODE) = 10; + *(uint32_t *)(ioasic_base + IOASIC_FLOPPY_DECODE) = 13; + *(uint32_t *)(ioasic_base + IOASIC_CSR) = 0x00001fc1; #endif /* sanitize interrupt mask */ xine_tc3_imask = 0; - *(u_int32_t *)(ioasic_base + IOASIC_INTR) = 0; - *(u_int32_t *)(ioasic_base + IOASIC_IMSK) = xine_tc3_imask; + *(uint32_t *)(ioasic_base + IOASIC_INTR) = 0; + *(uint32_t *)(ioasic_base + IOASIC_IMSK) = xine_tc3_imask; kn02ca_wbflush(); sprintf(cpu_model, "Personal DECstation 5000/%d (MAXINE)", cpu_mhz); @@ -212,10 +212,10 @@ * Reset interrupts, clear any errors from newconf probes */ - *(u_int32_t *)MIPS_PHYS_TO_KSEG1(XINE_REG_TIMEOUT) = 0; + *(uint32_t *)MIPS_PHYS_TO_KSEG1(XINE_REG_TIMEOUT) = 0; kn02ca_wbflush(); - *(u_int32_t *)(ioasic_base + IOASIC_INTR) = 0; + *(uint32_t *)(ioasic_base + IOASIC_INTR) = 0; kn02ca_wbflush(); } @@ -265,7 +265,7 @@ { unsigned mask; - switch ((int)cookie) { + switch ((uintptr_t)cookie) { case SYS_DEV_OPT0: mask = XINE_INTR_TC_0; break; @@ -294,16 +294,16 @@ break; default: #ifdef DIAGNOSTIC - printf("warning: enabling unknown intr %x\n", (int)cookie); + printf("warning: enabling unknown intr %p\n", cookie); #endif return; } xine_tc3_imask |= mask; - intrtab[(int)cookie].ih_func = handler; - intrtab[(int)cookie].ih_arg = arg; + intrtab[(uintptr_t)cookie].ih_func = handler; + intrtab[(uintptr_t)cookie].ih_arg = arg; - *(u_int32_t *)(ioasic_base + IOASIC_IMSK) = xine_tc3_imask; + *(uint32_t *)(ioasic_base + IOASIC_IMSK) = xine_tc3_imask; kn02ca_wbflush(); } @@ -345,12 +345,12 @@ if (ipending & MIPS_INT_MASK_3) { int ifound; - u_int32_t imsk, intr, can_serve, xxxintr; + uint32_t imsk, intr, can_serve, xxxintr; do { ifound = 0; - intr = *(u_int32_t *)(ioasic_base + IOASIC_INTR); - imsk = *(u_int32_t *)(ioasic_base + IOASIC_IMSK); + intr = *(uint32_t *)(ioasic_base + IOASIC_INTR); + imsk = *(uint32_t *)(ioasic_base + IOASIC_IMSK); can_serve = intr & imsk; CHECKINTR(SYS_DEV_DTOP, XINE_INTR_DTOP); @@ -386,7 +386,7 @@ xxxintr = can_serve & (ERRORS | PTRLOAD); if (xxxintr) { ifound = 1; - *(u_int32_t *)(ioasic_base + IOASIC_INTR) + *(uint32_t *)(ioasic_base + IOASIC_INTR) = intr &~ xxxintr; } } while (ifound); @@ -410,7 +410,7 @@ static uint32_t dec_maxine_get_timecount(struct timecounter *tc) { - return *(u_int32_t *)MIPS_PHYS_TO_KSEG1(XINE_REG_FCTR); + return *(uint32_t *)MIPS_PHYS_TO_KSEG1(XINE_REG_FCTR); } static void Index: src/sys/arch/pmax/pmax/machdep.c diff -u src/sys/arch/pmax/pmax/machdep.c:1.223.8.1.2.1 src/sys/arch/pmax/pmax/machdep.c:1.223.8.1.2.2 --- src/sys/arch/pmax/pmax/machdep.c:1.223.8.1.2.1 Mon Sep 7 23:46:46 2009 +++ src/sys/arch/pmax/pmax/machdep.c Tue Sep 8 17:24:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.223.8.1.2.1 2009/09/07 23:46:46 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.223.8.1.2.2 2009/09/08 17:24:09 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.1 2009/09/07 23:46:46 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.223.8.1.2.2 2009/09/08 17:24:09 matt Exp $"); #include "fs_mfs.h" #include "opt_ddb.h" @@ -123,7 +123,7 @@ #include "opt_dec_3maxplus.h" #include "ksyms.h" -unsigned ssir; /* simulated interrupt register */ +unsigned int ssir; /* simulated interrupt register */ /* Our exported CPU info; we can have only one. */ struct cpu_info cpu_info_store; @@ -136,7 +136,7 @@ char *bootinfo = NULL; /* pointer to bootinfo structure */ int cpuspeed = 30; /* approx # instr per usec. */ int physmem; /* max supported memory, changes to actual */ -int physmem_boardmax; /* {model,SIMM}-specific bound on physmem */ +intptr_t physmem_boardmax; /* {model,SIMM}-specific bound on physmem */ int mem_cluster_cnt; phys_ram_seg_t mem_clusters[VM_PHYSSEG_MAX]; @@ -158,7 +158,7 @@ */ int safepri = MIPS3_PSL_LOWIPL; /* XXX */ -void mach_init __P((int, char *[], int, int, u_int, char *)); /* XXX */ +void mach_init __P((int, char *[], int, intptr_t, u_int, char *)); /* XXX */ /* Motherboard or system-specific initialization vector */ static void unimpl_bus_reset __P((void)); @@ -192,7 +192,8 @@ mach_init(argc, argv, code, cv, bim, bip) int argc; char *argv[]; - int code, cv; + int code; + intptr_t cv; u_int bim; char *bip; { @@ -230,8 +231,8 @@ /* Was it a valid bootinfo symtab info? */ if (bi_syms != NULL) { - ssym = (void *)bi_syms->ssym; - esym = (void *)bi_syms->esym; + ssym = (void *)(intptr_t)bi_syms->ssym; + esym = (void *)(intptr_t)bi_syms->esym; kernend = (void *)mips_round_page(esym); memset(edata, 0, end - edata); } else @@ -346,7 +347,7 @@ lwp0.l_md.md_regs = (struct frame *)(kernend + USPACE) - 1; memset(lwp0.l_addr, 0, USPACE); #ifdef _LP64 - lwp0.l_md.md_regs->f_regs[_R_SR] = MIPS_SR_KX; + lwp0.l_md.md_regs->f_regs[_L_SR] = MIPS_SR_KX; #endif lwp0.l_addr->u_pcb.pcb_context.val[_L_SR] = #ifdef _LP64 Index: src/sys/arch/pmax/pmax/machdep.h diff -u src/sys/arch/pmax/pmax/machdep.h:1.11 src/sys/arch/pmax/pmax/machdep.h:1.11.96.1 --- src/sys/arch/pmax/pmax/machdep.h:1.11 Sun Dec 11 12:18:39 2005 +++ src/sys/arch/pmax/pmax/machdep.h Tue Sep 8 17:24:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.h,v 1.11 2005/12/11 12:18:39 christos Exp $ */ +/* $NetBSD: machdep.h,v 1.11.96.1 2009/09/08 17:24:09 matt Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -31,15 +31,15 @@ */ /* max memory for a model */ -extern int physmem_boardmax; /* {model,simm}-specific bound on physmem */ +extern intptr_t physmem_boardmax; /* {model,simm}-specific bound on physmem */ struct memmap; /* PROM callback routines - see pmax/promcall.c */ -void prom_findcons __P((int *, int *, int *)); -void prom_halt __P((int, char *)) __attribute__((__noreturn__)); -void prom_haltbutton __P((void)); -int prom_scsiid __P((int)); -char *prom_getenv __P((const char *)); -int prom_systype __P((void)); -int prom_getbitmap __P((struct memmap *)); +void prom_findcons(int *, int *, int *); +void prom_halt(int, char *) __dead; +void prom_haltbutton(void); +int prom_scsiid(int); +char *prom_getenv(const char *); +int prom_systype(void); +int prom_getbitmap(struct memmap *); Index: src/sys/arch/pmax/pmax/memc.h diff -u src/sys/arch/pmax/pmax/memc.h:1.3 src/sys/arch/pmax/pmax/memc.h:1.3.154.1 --- src/sys/arch/pmax/pmax/memc.h:1.3 Sat Jan 8 01:02:39 2000 +++ src/sys/arch/pmax/pmax/memc.h Tue Sep 8 17:24:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: memc.h,v 1.3 2000/01/08 01:02:39 simonb Exp $ */ +/* $NetBSD: memc.h,v 1.3.154.1 2009/09/08 17:24:09 matt Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -35,8 +35,7 @@ #ifndef __PMAX_MEMC_H #define __PMAX_MEMC_H -void dec_mtasic_err __P((u_int32_t erradr, u_int32_t errsyn, - u_int32_t bnk32m)); -void kn02ba_errintr __P((void)); +void dec_mtasic_err(u_int32_t erradr, vaddr_t errsyn, uint32_t bnk32m); +void kn02ba_errintr(void); #endif Index: src/sys/arch/pmax/pmax/memc_3max.c diff -u src/sys/arch/pmax/pmax/memc_3max.c:1.13 src/sys/arch/pmax/pmax/memc_3max.c:1.13.130.1 --- src/sys/arch/pmax/pmax/memc_3max.c:1.13 Sun Sep 29 15:11:14 2002 +++ src/sys/arch/pmax/pmax/memc_3max.c Tue Sep 8 17:24:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: memc_3max.c,v 1.13 2002/09/29 15:11:14 wiz Exp $ */ +/* $NetBSD: memc_3max.c,v 1.13.130.1 2009/09/08 17:24:09 matt Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -32,7 +32,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: memc_3max.c,v 1.13 2002/09/29 15:11:14 wiz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: memc_3max.c,v 1.13.130.1 2009/09/08 17:24:09 matt Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -49,10 +49,9 @@ void -dec_mtasic_err(erradr, errsyn, bnk32m) - u_int32_t erradr, errsyn, bnk32m; +dec_mtasic_err(uint32_t erradr, vaddr_t errsyn, uint32_t bnk32m) { - u_int32_t physadr; + uint32_t physadr; int module; if (!(erradr & KN02_ERR_VALID)) @@ -80,8 +79,8 @@ } printf("\n"); if (erradr & KN02_ERR_ECCERR) { - u_int32_t errsyn_value = *(u_int32_t *)errsyn; - *(u_int32_t *)errsyn = 0; + uint32_t errsyn_value = *(uint32_t *)errsyn; + *(uint32_t *)errsyn = 0; wbflush(); printf(" ECC 0x%08x\n", errsyn_value); Index: src/sys/arch/pmax/pmax/memc_3min.c diff -u src/sys/arch/pmax/pmax/memc_3min.c:1.10 src/sys/arch/pmax/pmax/memc_3min.c:1.10.96.1 --- src/sys/arch/pmax/pmax/memc_3min.c:1.10 Sun Dec 11 12:18:39 2005 +++ src/sys/arch/pmax/pmax/memc_3min.c Tue Sep 8 17:24:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: memc_3min.c,v 1.10 2005/12/11 12:18:39 christos Exp $ */ +/* $NetBSD: memc_3min.c,v 1.10.96.1 2009/09/08 17:24:09 matt Exp $ */ /* * Copyright (c) 1992, 1993 @@ -79,7 +79,7 @@ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: memc_3min.c,v 1.10 2005/12/11 12:18:39 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: memc_3min.c,v 1.10.96.1 2009/09/08 17:24:09 matt Exp $"); /* * Motherboard memory error contoller used in both @@ -100,17 +100,19 @@ * XXX check for clean user pages, replace frame, and reload ? */ void -kn02ba_errintr() +kn02ba_errintr(void) { - int mer, adr, siz, err; - static int errintr_cnt = 0; - - siz = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_MSR); - mer = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_MER); - adr = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_AER); + paddr_t err, adr; + size_t siz; + uint32_t mer; + static unsigned int errintr_cnt = 0; + + siz = *(uint32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_MSR); + mer = *(uint32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_MER); + adr = *(uint32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_AER); /* clear interrupt bit */ - *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_TIMEOUT) = 0; + *(uint32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_TIMEOUT) = 0; err = 0; /* XXX gcc */ switch (mer & KMIN_MER_LASTBYTE) { @@ -126,6 +128,7 @@ err |= (adr & KMIN_AER_ADDR_MASK); errintr_cnt++; - printf("(%d)Bad memory chip at phys %x [%x %x %x]\n", - errintr_cnt, err, mer, siz, adr); + printf("(%u)Bad memory chip at phys %#"PRIxPADDR + " [%x %zx %#"PRIxPADDR"]\n", + errintr_cnt, err, mer, siz, adr); } Index: src/sys/arch/pmax/tc/asc_ioasic.c diff -u src/sys/arch/pmax/tc/asc_ioasic.c:1.20 src/sys/arch/pmax/tc/asc_ioasic.c:1.20.18.1 --- src/sys/arch/pmax/tc/asc_ioasic.c:1.20 Mon Apr 28 20:23:31 2008 +++ src/sys/arch/pmax/tc/asc_ioasic.c Tue Sep 8 17:24:09 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: asc_ioasic.c,v 1.20 2008/04/28 20:23:31 martin Exp $ */ +/* $NetBSD: asc_ioasic.c,v 1.20.18.1 2009/09/08 17:24:09 matt Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: asc_ioasic.c,v 1.20 2008/04/28 20:23:31 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: asc_ioasic.c,v 1.20.18.1 2009/09/08 17:24:09 matt Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -304,7 +304,7 @@ asc_ioasic_intr(struct ncr53c9x_softc *sc) { struct asc_softc *asc = (struct asc_softc *)sc; - int trans, resid; + ssize_t trans, resid; u_int tcl, tcm, ssr, scr, intr; if ((asc->sc_flags & ASC_DMAACTIVE) == 0) @@ -352,7 +352,7 @@ trans = asc->sc_dmasize - resid; if (trans < 0) { /* transferred < 0 ? */ - printf("ioasic_intr: xfer (%d) > req (%d)\n", + printf("ioasic_intr: xfer (%zd) > req (%zu)\n", trans, asc->sc_dmasize); trans = asc->sc_dmasize; } Added files: Index: src/sys/arch/pmax/conf/GENERIC64 diff -u /dev/null src/sys/arch/pmax/conf/GENERIC64:1.1.2.1 --- /dev/null Tue Sep 8 17:24:10 2009 +++ src/sys/arch/pmax/conf/GENERIC64 Tue Sep 8 17:24:08 2009 @@ -0,0 +1,309 @@ +# $NetBSD: GENERIC64,v 1.1.2.1 2009/09/08 17:24:08 matt Exp $ +# +# GENERIC machine description file +# +# This machine description file is used to generate the default NetBSD +# kernel. The generic kernel does not include all options, subsystems +# and device drivers, but should be useful for most applications. +# +# The machine description file can be customised for your specific +# machine to reduce the kernel size and improve its performance. +# +# For further information on compiling NetBSD kernels, see the config(8) +# man page. +# +# For further information on hardware support for this architecture, see +# the intro(4) man page. For further information about kernel options +# for this architecture, see the options(4) man page. For an explanation +# of each device driver in this file see the section 4 man page for the +# device. + +include "arch/pmax/conf/std.pmax64" + +options INCLUDE_CONFIG_FILE # embed config file in kernel binary + +#ident "GENERIC-$Revision: 1.1.2.1 $" + +maxusers 64 + +options MIPS3 # R4000/R4400 CPUs + +# Support for specific models of DECstation +options DEC_3MIN # DECstation 5000/1xx (kn02ba), 5000/150 (kn04) +options DEC_MAXINE # Personal DECstation 5000/xx (kn02ca) +options DEC_3MAXPLUS # DECstation 5000/240 (kn03), 5000/260 (kn05) + +# Standard system options +options DDB # in-kernel debugger +#options DDB_HISTORY_SIZE=100 # enable history editing in DDB +options DDB_ONPANIC=0 # don't enter debugger on panic +#options DIAGNOSTIC # extra kernel debugging checks +#options DEBUG # extra kernel debugging support +options COMPAT_43 # compatibility with 4.3BSD binaries +options KTRACE # system call tracing support + +options SYSVMSG # System V-like message queues +options SYSVSEM # System V-like semaphores +options SYSVSHM # System V-like memory sharing +options P1003_1B_SEMAPHORE # p1003.1b semaphore support + +options LKM # loadable kernel modules + +options USERCONF # userconf(4) support +#options PIPE_SOCKETPAIR # smaller, but slower pipe(2) +options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel + +# Enable experimental buffer queue strategy for better responsiveness under +# high disk I/O load. Use it with caution - it's not proven to be stable yet. +#options BUFQ_READPRIO +#options BUFQ_PRIOCSCAN + +#options SCSIVERBOSE # Verbose SCSI errors +#options TCVERBOSE # recognize "unknown" TC devices + +# Old 4.4BSD/pmax kgdb options +#options KGDB # support for kernel gdb +#options KGDB_DEVRATE=19200 # kernel gdb port rate (default 9600) +#options KGDB_DEV="15*256+0" # device for kernel gdb + +options NTP # network time protocol + + +# Filesystem options +file-system FFS # fast filesystem with user and group quotas +file-system MFS # memory-based filesystem +file-system NFS # Sun NFS-compatible filesystem (client) +file-system LFS # Log-based filesystem (still experimental) +file-system CD9660 # ISO 9660 + Rock Ridge file system +file-system FDESC # /dev/fd +file-system KERNFS # /kern (kernel informational filesystem) +file-system NULLFS # loopback file system +file-system OVERLAY # overlay file system +file-system PORTAL # portal filesystem (still experimental) +file-system PROCFS # /proc +file-system UMAPFS # NULLFS + uid and gid remapping +file-system UNION +file-system PTYFS # /dev/pts/N support +#file-system TMPFS # Efficient memory file-system +#file-system UDF # experimental - OSTA UDF CD/DVD file-system + +options NFSSERVER # Sun NFS-compatible filesystem (server) +options QUOTA # UFS quotas +#options FFS_EI # FFS Endian Independant support +options SOFTDEP # FFS soft updates support. +options WAPBL # File system journaling support - Experimental +#options FFS_NO_SNAPSHOT # No FFS snapshot support +#options UFS_DIRHASH # UFS Large Directory Hashing - Experimental + +# Networking options +options INET # Internet protocols +options INET6 # IPV6 +#options IPSEC # IP security +#options IPSEC_ESP # IP security (encryption part; define w/IPSEC) +#options IPSEC_NAT_T # IPsec NAT traversal (NAT-T) +#options IPSEC_DEBUG # debug for IP security +options GATEWAY # IP packet forwarding +#options MROUTING # Multicast routing support +#options PIM # Protocol Independent Multicast +#options ISO # OSI networking +#options TPIP # TPIP +#options EON # OSI tunneling over IP +options NETATALK # AppleTalk networking protocols +options PPP_BSDCOMP # BSD-Compress compression support for PPP +options PPP_DEFLATE # Deflate compression support for PPP +options PPP_FILTER # Active filter support for PPP (requires bpf) +options PFIL_HOOKS # pfil(9) packet filter hooks +options IPFILTER_LOG # ipmon(8) log support +options IPFILTER_LOOKUP # ippool(8) support +#options IPFILTER_DEFAULT_BLOCK # block all packets by default +#options TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG + +#options ALTQ # Manipulate network interfaces' output queues +#options ALTQ_BLUE # Stochastic Fair Blue +#options ALTQ_CBQ # Class-Based Queueing +#options ALTQ_CDNR # Diffserv Traffic Conditioner +#options ALTQ_FIFOQ # First-In First-Out Queue +#options ALTQ_FLOWVALVE # RED/flow-valve (red-penalty-box) +#options ALTQ_HFSC # Hierarchical Fair Service Curve +#options ALTQ_LOCALQ # Local queueing discipline +#options ALTQ_PRIQ # Priority Queueing +#options ALTQ_RED # Random Early Detection +#options ALTQ_RIO # RED with IN/OUT +#options ALTQ_WFQ # Weighted Fair Queueing + +# NetBSD backwards compatibility +#options COMPAT_10 # NetBSD 1.0, (needed for X on 386?) +#options COMPAT_11 # NetBSD 1.1, EXEC_ELF_NOTELESS +options COMPAT_12 # NetBSD 1.2 reboot(), EXEC_ELF_NOTELESS +options COMPAT_13 # NetBSD 1.3 +options COMPAT_14 # NetBSD 1.4 +options COMPAT_15 # NetBSD 1.5 +options COMPAT_16 # NetBSD 1.6 +options COMPAT_20 # NetBSD 2.0 +options COMPAT_30 # NetBSD 3.0 +options COMPAT_40 # NetBSD 4.0 compatibility. +#options TCP_COMPAT_42 # 4.2BSD TCP/IP bug compat. Not recommended. +options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. + +# Workstation console options +options FONT_BOLD8x16 +options FONT_GALLANT12x22 + +options WSEMUL_VT100 +options WS_KERNEL_FG=WSCOL_GREEN +options WS_KERNEL_BG=WSCOL_BLACK + +# Disable kernel security levels. Needed for X with a PX or PXG. +#options INSECURE + +# pmax specific +#options COMPAT_ULTRIX # Ultrix compatibility +#options EXEC_AOUT # Old NetBSD/pmax a.out compatibility +#options EXEC_ECOFF # Ultrix RISC binaries are ECOFF format +options HZ=256 # RTC rate required + +options NFS_BOOT_DHCP # superset of BOOTP + +config netbsd root on ? type ? +#config nfsnetbsd root on ? type nfs + + +mainbus0 at root +cpu* at mainbus0 + +## Peripheral Bus Support (for devices to attach to) +## ---------------------------------------------------------------------------- + +# TURBOchannel bus support +tc* at mainbus0 + +# 3MIN, 3MAX+ and MAXINE have IOASIC in system slot +ioasic0 at tc? +mcclock* at ioasic? offset ? # DS1287 RTC +le* at ioasic? offset ? # LANCE +dt* at ioasic? offset ? # MAXINE kbd and mouse +bba* at ioasic? offset ? # MAXINE baseboard audio +#fdc at ioasic? offset ? # MAXINE floppy disk (not supported) +zsc0 at ioasic? offset 0x100000 # Z85C30 +zsc1 at ioasic? offset 0x180000 # Z85C30 +asc* at ioasic? offset ? # NCR53C94 SCSI with IOASIC + +zstty* at zsc? channel ? # serial ports on B/A channels +lkkbd* at zsc1 channel ? # keyboard port on A channels +vsms* at zsc0 channel ? # mouse port on A channels + +audio* at bba? + +dtkbd* at dt? addr ? +dtms* at dt? addr ? + +# TURBOchannel devices +mfb* at tc? slot ? offset ? # PMAG-A MX Monochrome Framebuffer +cfb* at tc? slot ? offset ? # PMAG-B CX Color Framebuffer +tfb* at tc? slot ? offset ? # PMAG-RO TX True Color Framebuffer +sfb* at tc? slot ? offset ? # PMAGB-B HX Smart Framebuffer +px* at tc? slot ? offset ? # PMAG-C 2D accelerator +pxg* at tc? slot ? offset ? # PMAG-D,E,F 3D accelerator +#sfbp* at tc? slot ? offset ? # PMAGD HX+ Smart Framebuffer +xcfb* at tc? slot ? offset ? # PMAG-DV Color Framebuffer at MAXINE +asc* at tc? slot ? offset ? # PMAZ-A single channel SCSI +le* at tc? slot ? offset ? # PMAD-A LANCE +fta* at tc? slot ? offset ? # PMAF-F FDDI +tcds* at tc? slot ? offset ? # PMAZB/PMAZC dual channel SCSI +asc* at tcds? chip ? + +# Workstation console + +wskbd* at lkkbd? console ? +wskbd* at dtkbd? console ? +wsmouse* at vsms? +wsmouse* at dtms? + +wsdisplay* at mfb? +wsdisplay* at cfb? +wsdisplay* at px? +wsdisplay* at pxg? +wsdisplay* at sfb? +#wsdisplay* at sfbp? +wsdisplay* at tfb? +wsdisplay* at xcfb? + + +######################################################################### +# SCSI configuration # +######################################################################### + +scsibus* at asc? + +sd* at scsibus? target ? lun ? # SCSI disks +st* at scsibus? target ? lun ? # SCSI tapes +cd* at scsibus? target ? lun ? # SCSI CD-ROMs +ch* at scsibus? target ? lun ? # SCSI changer devices +ss* at scsibus? target ? lun ? # SCSI scanners +uk* at scsibus? target ? lun ? # unknown SCSI + +######################################################################### +# Pseudo-devices # +######################################################################### + +# +# accept filters +pseudo-device accf_data # "dataready" accept filter +pseudo-device accf_http # "httpready" accept filter + +pseudo-device loop 1 # network loopback +pseudo-device sl # serial-line IP ports +pseudo-device ppp # serial-line IP ports +pseudo-device pppoe # PPP over Ethernet (RFC 2516) +pseudo-device pty # pseudo-terminals +pseudo-device bpfilter # packet filter ports +#pseudo-device carp # Common Address Redundancy Protocol +pseudo-device ipfilter # IP filter, NAT +#pseudo-device gre # generic L3 over IP tunnel +pseudo-device gif # IPv[46] over IPv[46] tunnel (RFC1933) +#pseudo-device faith # IPv[46] tcp relay translation i/f +pseudo-device stf # 6to4 IPv6 over IPv4 encapsulation +pseudo-device vlan # IEEE 802.1q encapsulation +pseudo-device bridge # simple inter-network bridging +#options BRIDGE_IPF # bridge uses IP/IPv6 pfil hooks too +pseudo-device agr # IEEE 802.3ad link aggregation + +pseudo-device vnd # virtual disk ick +#options VND_COMPRESSION # compressed vnd(4) +pseudo-device ccd 4 # concatenated disks +#pseudo-device cgd 4 # cryptographic disk devices +pseudo-device raid 8 # RAIDframe disk driver +options RAID_AUTOCONFIG # auto-configuration of RAID components +# Options to enable various other RAIDframe RAID types. +#options RF_INCLUDE_EVENODD=1 +#options RF_INCLUDE_RAID5_RS=1 +#options RF_INCLUDE_PARITYLOGGING=1 +#options RF_INCLUDE_CHAINDECLUSTER=1 +#options RF_INCLUDE_INTERDECLUSTER=1 +#options RF_INCLUDE_PARITY_DECLUSTERING=1 +#options RF_INCLUDE_PARITY_DECLUSTERING_DS=1 +pseudo-device fss 4 # file system snapshot device + +pseudo-device rnd # /dev/random and in-kernel generator +pseudo-device clockctl # user control of clock subsystem +pseudo-device ksyms # /dev/ksyms +#pseudo-device pf # PF packet filter +#pseudo-device pflog # PF log if +pseudo-device wsfont # wsfont control device +pseudo-device wsmux # wsmux control device + +# Veriexec +# +# a pseudo device needed for veriexec +#pseudo-device veriexec 1 +# +# Uncomment the fingerprint methods below that are desired. Note that +# removing fingerprint methods will have almost no impact on the kernel +# code size. +# +#options VERIFIED_EXEC_FP_RMD160 +#options VERIFIED_EXEC_FP_SHA256 +#options VERIFIED_EXEC_FP_SHA384 +#options VERIFIED_EXEC_FP_SHA512 +#options VERIFIED_EXEC_FP_SHA1 +#options VERIFIED_EXEC_FP_MD5 Index: src/sys/arch/pmax/conf/INSTALL64 diff -u /dev/null src/sys/arch/pmax/conf/INSTALL64:1.1.2.1 --- /dev/null Tue Sep 8 17:24:10 2009 +++ src/sys/arch/pmax/conf/INSTALL64 Tue Sep 8 17:24:08 2009 @@ -0,0 +1,158 @@ +# $NetBSD: INSTALL64,v 1.1.2.1 2009/09/08 17:24:08 matt Exp $ +# +# Distribution install kernel (any model) +# netbsd: cut-down kernel for miniroots. +# nfsnetbsd: root on NFS to boot diskless for installation, +# disk drivers for labelling disks and installation on local disk. +# +# Kernel must be under 1Mbyte to net-boot on 3100s with old PROMs. +# +# +include "arch/pmax/conf/std.pmax64" + +#options INCLUDE_CONFIG_FILE # embed config file in kernel binary + +makeoptions COPTS="-Os -mmemcpy" # Optimise for space. Implies -O2 + +maxusers 8 + +# CPU options +options MIPS3 # R4000/R4400 support + + +# Support for specific models of DECstation +options DEC_MAXINE # kn02ca: 5000/xx (Personal DECstation) +options DEC_3MIN # 5000/1xx (kn02ba), 5000/150 (kn04) +options DEC_3MAXPLUS # 5000/240 (kn03), 5000/260 (kn05) + +# Standard system options +#options DIAGNOSTIC # extra kernel debugging checks +#options DEBUG # extra kernel debugging support +#options KTRACE # system call tracing support +#options LKM # loadable kernel modules +options USERCONF # userconf(4) support +options PIPE_SOCKETPAIR # smaller, but slower pipe(2) +#options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel + +#options NTP # network time protocol + + +# File systems +file-system FFS # BSD fast filesystem +file-system NFS # Sun NFS-compatible filesystem (client) +file-system CD9660 # ISO 9660 + Rock Ridge file system +file-system KERNFS # kernel data-structure filesystem +#file-system PTYFS # /dev/pts/N support + +# Filesystem options +#options NFS_V2_ONLY # Exclude NFS3 code to save space +options FFS_NO_SNAPSHOT # No FFS snapshot support +options WAPBL # File system journaling support - Experimental + + +# Networking options +options INET # Internet protocols +#options TCP_DEBUG # Record last TCP_NDEBUG packets with SO_DEBUG + + +# Workstation console options +options FONT_BOLD8x16 # Font for fb devices +options FONT_GALLANT12x22 + +options WSEMUL_VT100 +options WS_KERNEL_FG=WSCOL_GREEN +options WS_KERNEL_BG=WSCOL_BLACK + +# Disable kernel security levels. Needed for X with a PX or PXG. +#options INSECURE + +# pmax specific +options HZ=256 # RTC rate required + +options NFS_BOOT_DHCP # superset of BOOTP + +config netbsd root on ? type ? +config nfsnetbsd root on ? type nfs + +mainbus0 at root +cpu* at mainbus0 + +## Peripheral Bus Support (for devices to attach to) +## ---------------------------------------------------------------------------- + +# TURBOchannel bus support +tc* at mainbus0 + +# 3MIN, 3MAX+ and MAXINE have IOASIC in system slot +ioasic0 at tc? +mcclock* at ioasic? offset ? # DS1287 RTC +le* at ioasic? offset ? # LANCE +dt* at ioasic? offset ? # MAXINE kbd and mouse +#bba* at ioasic? offset ? # MAXINE baseboard audio +#fdc at ioasic? offset ? # MAXINE floppy disk (not supported) +zsc0 at ioasic? offset 0x100000 # Z85C30 +zsc1 at ioasic? offset 0x180000 # Z85C30 +asc* at ioasic? offset ? # NCR53C94 SCSI with IOASIC + +zstty* at zsc? channel ? # serial ports on B/A channels +lkkbd* at zsc1 channel ? # keyboard port on A channels +#vsms* at zsc0 channel ? # mouse port on A channels + +#audio* at bba? + +dtkbd* at dt? addr ? +#dtms* at dt? addr ? + +# TURBOchannel devices +mfb* at tc? slot ? offset ? # PMAG-A MX Monochrome Framebuffer +cfb* at tc? slot ? offset ? # PMAG-B CX Color Framebuffer +tfb* at tc? slot ? offset ? # PMAG-RO TX True Color Framebuffer +sfb* at tc? slot ? offset ? # PMAGB-B HX Smart Framebuffer +px* at tc? slot ? offset ? # PMAG-C 2D accelerator +pxg* at tc? slot ? offset ? # PMAG-D,E,F 3D accelerator +#sfbp* at tc? slot ? offset ? # PMAGD HX+ Smart Framebuffer +xcfb* at tc? slot ? offset ? # PMAG-DV Color Framebuffer at MAXINE +asc* at tc? slot ? offset ? # PMAZ-A single channel SCSI +le* at tc? slot ? offset ? # PMAD-A LANCE +fta* at tc? slot ? offset ? # PMAF-F FDDI +tcds* at tc? slot ? offset ? # PMAZB/PMAZC dual channel SCSI +asc* at tcds? chip ? + +# Workstation console + +wskbd* at lkkbd? console ? +wskbd* at dtkbd? console ? +#wsmouse* at vsms? +#wsmouse* at dtms? + +wsdisplay* at mfb? +wsdisplay* at cfb? +wsdisplay* at px? +wsdisplay* at pxg? +wsdisplay* at sfb? +#wsdisplay* at sfbp? +wsdisplay* at tfb? +wsdisplay* at xcfb? + + +######################################################################### +# SCSI configuration # +######################################################################### + +scsibus* at asc? +sd* at scsibus? target ? lun ? # SCSI disks +st* at scsibus? target ? lun ? # SCSI tapes +cd* at scsibus? target ? lun ? # SCSI CD-ROMs + +######################################################################### +# Pseudo-devices # +######################################################################### + +pseudo-device pty 2 # pseudo-terminals (Sysinst needs two) +pseudo-device bpfilter # packet filter ports +pseudo-device loop +pseudo-device ccd 4 # concatenated disks +#pseudo-device fss 4 # file system snapshot device +pseudo-device rnd # /dev/random and in-kernel generator +#pseudo-device wsfont # wsfont control device +pseudo-device wsmux # wsmux control device Index: src/sys/arch/pmax/conf/RAMDISK64 diff -u /dev/null src/sys/arch/pmax/conf/RAMDISK64:1.1.2.1 --- /dev/null Tue Sep 8 17:24:10 2009 +++ src/sys/arch/pmax/conf/RAMDISK64 Tue Sep 8 17:24:08 2009 @@ -0,0 +1,25 @@ +# $NetBSD: RAMDISK64,v 1.1.2.1 2009/09/08 17:24:08 matt Exp $ +# +# Install kernel with ramdisk added. +# The ramdisk is be too big to netboot directly via ECOFF on some machines, +# so keep it otherise identical to INSTALL. +# + +# Pull in standard `install' config +include "arch/pmax/conf/INSTALL64" + + +# Enable the hooks used for initializing the root memory-disk. +options MEMORY_DISK_HOOKS +options MEMORY_DISK_IS_ROOT # force root on memory disk +options MEMORY_DISK_SERVER=0 # no userspace memory disk support +options MEMORY_DISK_ROOT_SIZE=6600 # size of memory disk, in blocks (3300kB) +#options MEMORY_DISK_ROOT_SIZE=2880 # 1.44M, same as a floppy + +# File systems: need MFS +file-system MFS # memory file system + +# Extra Pseudo-Devices + +# disk/mass storage pseudo-devices +pseudo-device md 1 # memory disk device (ramdisk) Index: src/sys/arch/pmax/conf/std.pmax64 diff -u /dev/null src/sys/arch/pmax/conf/std.pmax64:1.1.2.1 --- /dev/null Tue Sep 8 17:24:10 2009 +++ src/sys/arch/pmax/conf/std.pmax64 Tue Sep 8 17:24:08 2009 @@ -0,0 +1,14 @@ +# $NetBSD: std.pmax64,v 1.1.2.1 2009/09/08 17:24:08 matt Exp $ +# standard, required pmax info + +machine pmax mips +include "conf/std" # MI standard options +makeoptions MACHINE_ARCH="mips64el" + +# Standard exec-package options +options EXEC_ELF64 +#options EXEC_ELF32 # 32-bit ELF support (native format) +options EXEC_SCRIPT # exec of #! scripts + +makeoptions DEFTEXTADDR="0x80030000" +makeoptions LP64="yes"