CVS commit: src/sys/arch/ofppc/conf
Module Name:src Committed By: phx Date: Sun Nov 29 12:38:44 UTC 2020 Modified Files: src/sys/arch/ofppc/conf: GENERIC Log Message: Message buffer is too small, since timestamps were enforced. To generate a diff of this commit: cvs rdiff -u -r1.173 -r1.174 src/sys/arch/ofppc/conf/GENERIC 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/ofppc/conf/GENERIC diff -u src/sys/arch/ofppc/conf/GENERIC:1.173 src/sys/arch/ofppc/conf/GENERIC:1.174 --- src/sys/arch/ofppc/conf/GENERIC:1.173 Sun Sep 27 13:48:53 2020 +++ src/sys/arch/ofppc/conf/GENERIC Sun Nov 29 12:38:44 2020 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.173 2020/09/27 13:48:53 roy Exp $ +# $NetBSD: GENERIC,v 1.174 2020/11/29 12:38:44 phx Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/ofppc/conf/std.ofppc" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.173 $" +#ident "GENERIC-$Revision: 1.174 $" maxusers 32 @@ -60,6 +60,7 @@ options DDB # in-kernel debugger options DDB_HISTORY_SIZE=512 # enable history editing in DDB options DDB_VERBOSE_HELP options TRAP_PANICWAIT +options MSGBUFSIZE=32768 makeoptions DEBUG="-g" # compile full symbol table
CVS commit: sunscripts
Module Name:sunscripts Committed By: phx Date: Tue Jun 30 12:35:50 UTC 2020 Removed Files: sunscripts: LICENSE.vasm LICENSE.vlink buildvasm.sh buildvlink.sh lastversion.sh srcexport.sh Log Message: erroneously committed To generate a diff of this commit: cvs rdiff -u -r1.1.1.1 -r0 sunscripts/LICENSE.vasm sunscripts/LICENSE.vlink \ sunscripts/buildvasm.sh sunscripts/buildvlink.sh \ sunscripts/lastversion.sh sunscripts/srcexport.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS import: sunscripts
Module Name:sunscripts Committed By: phx Date: Tue Jun 30 12:25:49 UTC 2020 Update of /cvsroot/sunscripts In directory ivanova.netbsd.org:/tmp/cvs-serv10195 Log Message: initial Status: Vendor Tag: sun Release Tags: initial N sunscripts/buildvasm.sh N sunscripts/buildvlink.sh N sunscripts/lastversion.sh N sunscripts/srcexport.sh N sunscripts/LICENSE.vasm N sunscripts/LICENSE.vlink No conflicts created by this import
CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: phx Date: Sun Jan 6 11:20:53 UTC 2019 Modified Files: src/sys/arch/powerpc/oea: cpu_subr.c Log Message: Only execute dssall when the CPU has the Altivec instruction set extension. To generate a diff of this commit: cvs rdiff -u -r1.97 -r1.98 src/sys/arch/powerpc/oea/cpu_subr.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/powerpc/oea/cpu_subr.c diff -u src/sys/arch/powerpc/oea/cpu_subr.c:1.97 src/sys/arch/powerpc/oea/cpu_subr.c:1.98 --- src/sys/arch/powerpc/oea/cpu_subr.c:1.97 Fri Jun 15 23:11:39 2018 +++ src/sys/arch/powerpc/oea/cpu_subr.c Sun Jan 6 11:20:53 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu_subr.c,v 1.97 2018/06/15 23:11:39 uwe Exp $ */ +/* $NetBSD: cpu_subr.c,v 1.98 2019/01/06 11:20:53 phx Exp $ */ /*- * Copyright (c) 2001 Matt Thomas. @@ -34,7 +34,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.97 2018/06/15 23:11:39 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.98 2019/01/06 11:20:53 phx Exp $"); #include "opt_ppcparam.h" #include "opt_ppccache.h" @@ -329,10 +329,12 @@ cpu_idlespin(void) if (powersave <= 0) return; - __asm volatile( #if defined(_ARCH_PPC64) || defined (PPC_OEA64_BRIDGE) - "dssall;" + if (cpu_altivec) + __asm volatile("dssall"); #endif + + __asm volatile( "sync;" "mfmsr %0;" "oris %0,%0,%1@h;" /* enter power saving mode */
CVS commit: src/sys/arch/powerpc/powerpc
Module Name:src Committed By: phx Date: Wed May 2 08:24:40 UTC 2018 Modified Files: src/sys/arch/powerpc/powerpc: trap_subr.S Log Message: Fixed non-critical typo in tlbdsmiss: %r8 -> 8. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/sys/arch/powerpc/powerpc/trap_subr.S 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/powerpc/powerpc/trap_subr.S diff -u src/sys/arch/powerpc/powerpc/trap_subr.S:1.78 src/sys/arch/powerpc/powerpc/trap_subr.S:1.79 --- src/sys/arch/powerpc/powerpc/trap_subr.S:1.78 Tue Jul 29 16:19:45 2014 +++ src/sys/arch/powerpc/powerpc/trap_subr.S Wed May 2 08:24:40 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: trap_subr.S,v 1.78 2014/07/29 16:19:45 joerg Exp $ */ +/* $NetBSD: trap_subr.S,v 1.79 2018/05/02 08:24:40 phx Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -598,7 +598,7 @@ _C_LABEL(tlbdlmsize) = .-_C_LABEL(tlbdlm .globl _C_LABEL(tlbdsmiss),_C_LABEL(tlbdsmsize) _C_LABEL(tlbdsmiss): mfspr %r2,SPR_HASH1 /* get first pointer */ - li %r1,%r8 + li %r1,8 mfctr %r0 /* save counter */ mfspr %r3,SPR_DCMP /* get first compare value */ addi %r2,%r2,-8 /* predec pointer */
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: phx Date: Mon Sep 18 23:21:15 UTC 2017 Modified Files: src/sys/arch/powerpc/include: fenv.h Log Message: Fixed feholdexcept() by copying the actual contents of FPSCR to the fenv_t instead of a double precision floating point representation of it. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/include/fenv.h 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/powerpc/include/fenv.h diff -u src/sys/arch/powerpc/include/fenv.h:1.3 src/sys/arch/powerpc/include/fenv.h:1.4 --- src/sys/arch/powerpc/include/fenv.h:1.3 Wed Mar 22 23:11:09 2017 +++ src/sys/arch/powerpc/include/fenv.h Mon Sep 18 23:21:15 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fenv.h,v 1.3 2017/03/22 23:11:09 chs Exp $ */ +/* $NetBSD: fenv.h,v 1.4 2017/09/18 23:21:15 phx Exp $ */ /*- * Copyright (c) 2004-2005 David Schultz @@ -242,7 +242,7 @@ feholdexcept(fenv_t *__envp) uint32_t msr; __mffs(&__r.__d); - *__envp = __r.__d; + *__envp = __r.__bits.__reg; __r.__bits.__reg &= ~(FE_ALL_EXCEPT | _ENABLE_MASK); __mtfsf(__r.__d); __updatemsr(__r.__bits.__reg);
CVS commit: src/sys/arch/m68k/include
Module Name:src Committed By: phx Date: Wed Sep 13 09:55:35 UTC 2017 Modified Files: src/sys/arch/m68k/include: fenv.h Log Message: The __fgetenv() macro operates on a fenv_t, not on a fenv_t *. Fixes a segfault in fegetenv() and feholdexcept(). To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/m68k/include/fenv.h 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/m68k/include/fenv.h diff -u src/sys/arch/m68k/include/fenv.h:1.6 src/sys/arch/m68k/include/fenv.h:1.7 --- src/sys/arch/m68k/include/fenv.h:1.6 Wed Mar 22 23:11:09 2017 +++ src/sys/arch/m68k/include/fenv.h Wed Sep 13 09:55:35 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: fenv.h,v 1.6 2017/03/22 23:11:09 chs Exp $ */ +/* $NetBSD: fenv.h,v 1.7 2017/09/13 09:55:35 phx Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -210,7 +210,7 @@ fesetround(int __round) __fenv_static inline int fegetenv(fenv_t *__envp) { - __fgetenv(__envp); + __fgetenv(*__envp); return 0; } @@ -220,7 +220,7 @@ feholdexcept(fenv_t *__envp) { fexcept_t __fpcr, __fpsr; - __fgetenv(__envp); + __fgetenv(*__envp); __fpsr = __envp->fpsr & ~FE_ALL_EXCEPT; __set_fpsr(__fpsr); /* clear all */ __fpcr = __envp->fpcr & ~(FE_ALL_EXCEPT << 6);
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: phx Date: Mon Sep 4 17:26:06 UTC 2017 Modified Files: src/sys/arch/amiga/dev: efa.c efavar.h wdc_acafh.c wdc_xsurf.c Log Message: Remove double device pointers. The pointer is already part of sc_wdcdev. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/amiga/dev/efa.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amiga/dev/efavar.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/amiga/dev/wdc_acafh.c \ src/sys/arch/amiga/dev/wdc_xsurf.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/amiga/dev/efa.c diff -u src/sys/arch/amiga/dev/efa.c:1.12 src/sys/arch/amiga/dev/efa.c:1.13 --- src/sys/arch/amiga/dev/efa.c:1.12 Fri Jan 3 00:33:06 2014 +++ src/sys/arch/amiga/dev/efa.c Mon Sep 4 17:26:06 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: efa.c,v 1.12 2014/01/03 00:33:06 rkujawa Exp $ */ +/* $NetBSD: efa.c,v 1.13 2017/09/04 17:26:06 phx Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -136,8 +136,6 @@ efa_attach(device_t parent, device_t sel gayle_init(); - sc->sc_dev = self; - efa_set_opts(sc); if (!efa_mapbase(sc)) { @@ -200,6 +198,12 @@ efa_attach(device_t parent, device_t sel static void efa_attach_channel(struct efa_softc *sc, int chnum) { +#ifdef EFA_DEBUG + device_t self; + + self = sc->sc_wdcdev.sc_atac.atac_dev; +#endif /* EFA_DEBUG */ + sc->sc_chanlist[chnum] = &sc->sc_ports[chnum].chan; sc->sc_ports[chnum].chan.ch_channel = chnum; @@ -216,7 +220,7 @@ efa_attach_channel(struct efa_softc *sc, wdcattach(&sc->sc_ports[chnum].chan); #ifdef EFA_DEBUG - aprint_normal_dev(sc->sc_dev, "done init for channel %d\n", chnum); + aprint_normal_dev(self, "done init for channel %d\n", chnum); #endif } @@ -238,6 +242,10 @@ efa_poll_kthread(void *arg) static void efa_set_opts(struct efa_softc *sc) { + device_t self; + + self = sc->sc_wdcdev.sc_atac.atac_dev; + #ifdef EFA_32BIT_IO sc->sc_32bit_io = true; #else @@ -251,10 +259,10 @@ efa_set_opts(struct efa_softc *sc) #endif /* EFA_NO_INTR */ if (sc->sc_no_intr) - aprint_verbose_dev(sc->sc_dev, "hardware interrupt disabled\n"); + aprint_verbose_dev(self, "hardware interrupt disabled\n"); if (sc->sc_32bit_io) - aprint_verbose_dev(sc->sc_dev, "32-bit I/O enabled\n"); + aprint_verbose_dev(self, "32-bit I/O enabled\n"); } int @@ -301,9 +309,14 @@ efa_intr(void *arg) static bool efa_mapbase(struct efa_softc *sc) { - int i, j; static struct bus_space_tag fata_cmd_iot; static struct bus_space_tag gayle_cmd_iot; + int i, j; +#ifdef EFA_DEBUG + device_t self; + + self = sc->sc_wdcdev.sc_atac.atac_dev; +#endif /* EFA_DEBUG */ gayle_cmd_iot.base = (bus_addr_t) ztwomap(GAYLE_IDE_BASE + 2); gayle_cmd_iot.absm = &amiga_bus_stride_4swap; @@ -311,7 +324,7 @@ efa_mapbase(struct efa_softc *sc) fata_cmd_iot.absm = &amiga_bus_stride_4swap; #ifdef EFA_DEBUG - aprint_normal_dev(sc->sc_dev, "Gayle %x -> %x, FastATA %x -> %x\n", + aprint_normal_dev(self, "Gayle %x -> %x, FastATA %x -> %x\n", GAYLE_IDE_BASE, gayle_cmd_iot.base, FATA1_BASE, fata_cmd_iot.base); #endif @@ -370,9 +383,14 @@ efa_mapreg_gayle(struct efa_softc *sc) static bool efa_mapreg_native(struct efa_softc *sc) { - int i,j; struct wdc_regs *wdr_gayle = &sc->sc_gayle_wdc_regs; struct wdc_regs *wdr_fata; + int i,j; +#ifdef EFA_DEBUG + device_t self; + + self = sc->sc_wdcdev.sc_atac.atac_dev; +#endif /* EFA_DEBUG */ for (i = 0; i < FATA1_CHANNELS; i++) { @@ -383,7 +401,7 @@ efa_mapreg_native(struct efa_softc *sc) if (pio_offsets[j] == PIO_NSUPP) { #ifdef EFA_DEBUG -aprint_normal_dev(sc->sc_dev, +aprint_normal_dev(self, "Skipping mapping for PIO mode %x\n", j); #endif continue; @@ -395,7 +413,7 @@ efa_mapreg_native(struct efa_softc *sc) return false; } #ifdef EFA_DEBUG - aprint_normal_dev(sc->sc_dev, + aprint_normal_dev(self, "Chan %x PIO mode %x mapped %x -> %x\n", i, j, (bus_addr_t) kvtop((void*) wdr_fata->cmd_baseioh), (unsigned int) @@ -465,15 +483,20 @@ efa_setup_channel(struct ata_channel *ch struct ata_drive_datas *drvp; struct efa_softc *sc; int ipl; +#ifdef EFA_DEBUG + device_t self; +#endif /* EFA_DEBUG */ chnum = chp->ch_channel; atac = chp->ch_atac; + sc = device_private(atac->atac_dev); mode = 5; /* start with fastest possible setting */ #ifdef EFA_DEBUG - aprint_normal_dev(sc->sc_dev, "efa_setup_channel for ch %d\n", + self = sc->sc_wdcdev.sc_atac.atac_dev; + aprint_normal_dev(self, "efa_setup_channel for ch %d\n", chnum); #endif /* EFA_DEBUG */ @@ -492,7 +515,7 @@ efa_setup_channel(struct ata_channel *ch /* TODO: check if sc_ports->mode_ok */ #ifdef EFA_DEBUG - aprint_normal_dev(sc->sc_dev, "drive %d supports %d\n", + aprint_normal_dev(self, "drive %d supports %d\n", drive, drvp->PIO_cap); #endif /* EFA_DEBUG */ @@ -511
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: phx Date: Mon Sep 4 14:39:00 UTC 2017 Modified Files: src/sys/arch/amiga/dev: wdc_xsurf.c Log Message: Set the correct device data size wdc_xsurf_softc instead of wdc_softc. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amiga/dev/wdc_xsurf.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/amiga/dev/wdc_xsurf.c diff -u src/sys/arch/amiga/dev/wdc_xsurf.c:1.2 src/sys/arch/amiga/dev/wdc_xsurf.c:1.3 --- src/sys/arch/amiga/dev/wdc_xsurf.c:1.2 Wed Nov 21 22:37:03 2012 +++ src/sys/arch/amiga/dev/wdc_xsurf.c Mon Sep 4 14:39:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: wdc_xsurf.c,v 1.2 2012/11/21 22:37:03 rkujawa Exp $ */ +/* $NetBSD: wdc_xsurf.c,v 1.3 2017/09/04 14:39:00 phx Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -92,7 +92,7 @@ void wdc_xsurf_attach_channel(struct wd void wdc_xsurf_map_channel(struct wdc_xsurf_softc *, int); int wdc_xsurf_intr(void *arg); -CFATTACH_DECL_NEW(wdc_xsurf, sizeof(struct wdc_softc), +CFATTACH_DECL_NEW(wdc_xsurf, sizeof(struct wdc_xsurf_softc), wdc_xsurf_match, wdc_xsurf_attach, NULL, NULL); static const unsigned int wdc_xsurf_wdr_offsets[] = {
CVS commit: src/sys/arch/sandpoint/stand/altboot
Module Name:src Committed By: phx Date: Thu Aug 3 19:51:00 UTC 2017 Modified Files: src/sys/arch/sandpoint/stand/altboot: skg.c Log Message: This driver should also support Schneider & Koch SK-9821 v2.0, besides Marvell SKnet. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/sandpoint/stand/altboot/skg.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/sandpoint/stand/altboot/skg.c diff -u src/sys/arch/sandpoint/stand/altboot/skg.c:1.4 src/sys/arch/sandpoint/stand/altboot/skg.c:1.5 --- src/sys/arch/sandpoint/stand/altboot/skg.c:1.4 Sun Oct 30 21:08:33 2011 +++ src/sys/arch/sandpoint/stand/altboot/skg.c Thu Aug 3 19:51:00 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: skg.c,v 1.4 2011/10/30 21:08:33 phx Exp $ */ +/* $NetBSD: skg.c,v 1.5 2017/08/03 19:51:00 phx Exp $ */ /*- * Copyright (c) 2010 Frank Wille. @@ -193,6 +193,7 @@ skg_match(unsigned tag, void *data) v = pcicfgread(tag, PCI_ID_REG); switch (v) { + case PCI_DEVICE(0x1148, 0x4320): case PCI_DEVICE(0x11ab, 0x4320): return 1; }
CVS commit: src/sys/arch/sandpoint/stand/altboot
Module Name:src Committed By: phx Date: Thu Aug 3 19:22:15 UTC 2017 Modified Files: src/sys/arch/sandpoint/stand/altboot: brdsetup.c siisata.c version Log Message: Some Synology network devices show vendor 0x1148 (Schneider & Koch) instead of 0x11ab (Marvell). Detect both. Improve spinning up of both disk drives on Synology DS20x by adding some more delays (directly at the start and after powering up the second drive). To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/sandpoint/stand/altboot/brdsetup.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sandpoint/stand/altboot/siisata.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sandpoint/stand/altboot/version 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/sandpoint/stand/altboot/brdsetup.c diff -u src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.38 src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.39 --- src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.38 Thu Aug 3 09:42:34 2017 +++ src/sys/arch/sandpoint/stand/altboot/brdsetup.c Thu Aug 3 19:22:15 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: brdsetup.c,v 1.38 2017/08/03 09:42:34 phx Exp $ */ +/* $NetBSD: brdsetup.c,v 1.39 2017/08/03 19:22:15 phx Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -269,7 +269,8 @@ brdsetup(void) brdtype = BRD_KUROBOXT4; } } - else if (PCI_VENDOR(pcicfgread(dev15, PCI_ID_REG)) == 0x11ab) { + else if (PCI_VENDOR(pcicfgread(dev15, PCI_ID_REG)) == 0x1148 + || PCI_VENDOR(pcicfgread(dev15, PCI_ID_REG)) == 0x11ab) { /* SKnet/Marvell (sk) at dev 15 */ brdtype = BRD_SYNOLOGY; } @@ -873,8 +874,11 @@ synopcifix(struct brdprop *brd) * with several seconds delay, but no CPLD register to * monitor the power state. So all we can do is to * wait some more seconds during SATA-init. + * Also wait some seconds now, to make sure the first + * disk is ready after a cold start. */ sata_delay[1] = SYNO_DISK_DELAY; + delay(10 * 1024 * 1024); } cpld_done: Index: src/sys/arch/sandpoint/stand/altboot/siisata.c diff -u src/sys/arch/sandpoint/stand/altboot/siisata.c:1.6 src/sys/arch/sandpoint/stand/altboot/siisata.c:1.7 --- src/sys/arch/sandpoint/stand/altboot/siisata.c:1.6 Wed Sep 30 14:14:32 2015 +++ src/sys/arch/sandpoint/stand/altboot/siisata.c Thu Aug 3 19:22:15 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: siisata.c,v 1.6 2015/09/30 14:14:32 phx Exp $ */ +/* $NetBSD: siisata.c,v 1.7 2017/08/03 19:22:15 phx Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -125,6 +125,15 @@ siisata_init(unsigned tag, void *data) if (l->presense[n] == 0) { DPRINTF(("port %d not present\n", n)); continue; + } else { +/* + * XXX perform_atareset() does not work + * when the drive is not completely spun up? + * So insert another delay here. + */ +printf("Waiting 15 seconds for port %d " +"to spin up.\n", n); +delay(15 * 1000 * 1000); } } if (atachkpwr(l, n) != ATA_PWR_ACTIVE) { Index: src/sys/arch/sandpoint/stand/altboot/version diff -u src/sys/arch/sandpoint/stand/altboot/version:1.8 src/sys/arch/sandpoint/stand/altboot/version:1.9 --- src/sys/arch/sandpoint/stand/altboot/version:1.8 Wed Sep 30 14:14:32 2015 +++ src/sys/arch/sandpoint/stand/altboot/version Thu Aug 3 19:22:15 2017 @@ -18,3 +18,5 @@ NIC. 1.11: Pass precise model information and flags with bootinfo. Synology DS207/209 LED and 2nd disk power-up support. +1.12: Some more Synology DS20x fixes, to make sure both drives have been + spun up. Also detect PCI-vendor 0x1148 (S&K) as Synology.
CVS commit: src/sys/arch/sandpoint/stand/altboot
Module Name:src Committed By: phx Date: Thu Aug 3 09:42:34 UTC 2017 Modified Files: src/sys/arch/sandpoint/stand/altboot: brdsetup.c Log Message: Fixed overflow in delay() for delays greater than 2 seconds. Replaced u_long by uint32_t and u_quad by uint64_t whenever the exact 32- or 64-bit word is needed. To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/sys/arch/sandpoint/stand/altboot/brdsetup.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/sandpoint/stand/altboot/brdsetup.c diff -u src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.37 src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.38 --- src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.37 Thu Oct 15 12:00:02 2015 +++ src/sys/arch/sandpoint/stand/altboot/brdsetup.c Thu Aug 3 09:42:34 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: brdsetup.c,v 1.37 2015/10/15 12:00:02 nisimura Exp $ */ +/* $NetBSD: brdsetup.c,v 1.38 2017/08/03 09:42:34 phx Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -65,7 +65,7 @@ static void send_iomega(int, int, int, i static inline uint32_t mfmsr(void); static inline void mtmsr(uint32_t); static inline uint32_t cputype(void); -static inline u_quad_t mftb(void); +static inline uint64_t mftb(void); static void init_uart(unsigned, unsigned, uint8_t); static void send_sat(char *); static unsigned mpc107memsize(void); @@ -1012,7 +1012,7 @@ _rtt(void) satime_t getsecs(void) { - u_quad_t tb = mftb(); + uint64_t tb = mftb(); return (tb / ticks_per_sec); } @@ -1021,13 +1021,13 @@ getsecs(void) * Wait for about n microseconds (at least!). */ void -delay(u_int n) +delay(unsigned n) { - u_quad_t tb; - u_long scratch, tbh, tbl; + uint64_t tb; + uint32_t scratch, tbh, tbl; tb = mftb(); - tb += (n * 1000 + ns_per_tick - 1) / ns_per_tick; + tb += ((uint64_t)n * 1000 + ns_per_tick - 1) / ns_per_tick; tbh = tb >> 32; tbl = tb; asm volatile ("1: mftbu %0; cmpw %0,%1; blt 1b; bgt 2f; mftb %0; cmpw 0, %0,%2; blt 1b; 2:" : "=&r"(scratch) : "r"(tbh), "r"(tbl)); @@ -1113,11 +1113,11 @@ cputype(void) return pvr >> 16; } -static inline u_quad_t +static inline uint64_t mftb(void) { - u_long scratch; - u_quad_t tb; + uint32_t scratch; + uint64_t tb; asm ("1: mftbu %0; mftb %0+1; mftbu %1; cmpw %0,%1; bne 1b" : "=r"(tb), "=r"(scratch));
CVS commit: src/sys/dev/spi
Module Name:src Committed By: phx Date: Sun Nov 20 12:38:04 UTC 2016 Modified Files: src/sys/dev/spi: mcp3k.c Log Message: Fixed typo in name for MCP3304. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/spi/mcp3k.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/dev/spi/mcp3k.c diff -u src/sys/dev/spi/mcp3k.c:1.1 src/sys/dev/spi/mcp3k.c:1.2 --- src/sys/dev/spi/mcp3k.c:1.1 Tue Aug 18 15:54:20 2015 +++ src/sys/dev/spi/mcp3k.c Sun Nov 20 12:38:04 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mcp3k.c,v 1.1 2015/08/18 15:54:20 phx Exp $ */ +/* $NetBSD: mcp3k.c,v 1.2 2016/11/20 12:38:04 phx Exp $ */ /*- * Copyright (c) 2015 The NetBSD Foundation, Inc. @@ -163,7 +163,7 @@ static struct mcp3kadc_model mcp3k_model .flags = M3K_SIGNED | M3K_SGLDIFF | M3K_D2D1D0 }, { - .name = 3204, + .name = 3304, .bits = 13, .channels = 8, .lead = 2,
CVS commit: src/sys/arch/amiga
Module Name:src Committed By: phx Date: Fri Nov 4 18:06:08 UTC 2016 Modified Files: src/sys/arch/amiga/conf: WSCONS src/sys/arch/amiga/dev: grf_et.c Log Message: wscons and Xorg support for Tseng ET4000/W32 based boards (grf6). To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/arch/amiga/conf/WSCONS cvs rdiff -u -r1.32 -r1.33 src/sys/arch/amiga/dev/grf_et.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/amiga/conf/WSCONS diff -u src/sys/arch/amiga/conf/WSCONS:1.70 src/sys/arch/amiga/conf/WSCONS:1.71 --- src/sys/arch/amiga/conf/WSCONS:1.70 Mon Oct 3 14:26:02 2016 +++ src/sys/arch/amiga/conf/WSCONS Fri Nov 4 18:06:08 2016 @@ -1,4 +1,4 @@ -# $NetBSD: WSCONS,v 1.70 2016/10/03 14:26:02 rkujawa Exp $ +# $NetBSD: WSCONS,v 1.71 2016/11/04 18:06:08 phx Exp $ # GENERIC with wscons(4) # @@ -28,12 +28,10 @@ no grfcc0 at mainbus0 no grfrt0 at zbus0 no grfrh0 at zbus0 no grful0 at zbus0 -no grfet* at zbus0 no grf0 at grfcc0 no grf1 at grfrt0 no grf2 at grfrh0 no grf4 at grful0 -no grf6 at grfet? # Disable ite(4) for all grf(4) drivers. no ite0 at grf0 Index: src/sys/arch/amiga/dev/grf_et.c diff -u src/sys/arch/amiga/dev/grf_et.c:1.32 src/sys/arch/amiga/dev/grf_et.c:1.33 --- src/sys/arch/amiga/dev/grf_et.c:1.32 Wed Jan 22 00:25:16 2014 +++ src/sys/arch/amiga/dev/grf_et.c Fri Nov 4 18:06:08 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: grf_et.c,v 1.32 2014/01/22 00:25:16 christos Exp $ */ +/* $NetBSD: grf_et.c,v 1.33 2016/11/04 18:06:08 phx Exp $ */ /* * Copyright (c) 1997 Klaus Burkert @@ -37,10 +37,11 @@ #include "opt_amigacons.h" #include -__KERNEL_RCSID(0, "$NetBSD: grf_et.c,v 1.32 2014/01/22 00:25:16 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grf_et.c,v 1.33 2016/11/04 18:06:08 phx Exp $"); #include "grfet.h" #include "ite.h" +#include "wsdisplay.h" #if NGRFET > 0 /* @@ -72,6 +73,12 @@ __KERNEL_RCSID(0, "$NetBSD: grf_et.c,v 1 #include #include +#if NWSDISPLAY > 0 +#include +#include +#include +#include +#endif #ifdef TSENGCONSOLE #include #endif @@ -81,34 +88,50 @@ __KERNEL_RCSID(0, "$NetBSD: grf_et.c,v 1 #include #include -int et_mondefok(struct grfvideo_mode *gv); -void et_boardinit(struct grf_softc *gp); -static void et_CompFQ(u_int fq, u_char *num, u_char *denom); -int et_getvmode(struct grf_softc *gp, struct grfvideo_mode *vm); -int et_setvmode(struct grf_softc *gp, unsigned int mode); -int et_toggle(struct grf_softc *gp, unsigned short); -int et_getcmap(struct grf_softc *gfp, struct grf_colormap *cmap); -int et_putcmap(struct grf_softc *gfp, struct grf_colormap *cmap); +int et_mondefok(struct grfvideo_mode *); +void et_boardinit(struct grf_softc *); +static void et_CompFQ(u_int fq, u_char *, u_char *); +int et_getvmode(struct grf_softc *, struct grfvideo_mode *); +int et_setvmode(struct grf_softc *, unsigned int); +int et_toggle(struct grf_softc *, unsigned short); +int et_getcmap(struct grf_softc *, struct grf_colormap *); +int et_putcmap(struct grf_softc *, struct grf_colormap *); #ifndef TSENGCONSOLE -void et_off(struct grf_softc *gp); +void et_off(struct grf_softc *); #endif -void et_inittextmode(struct grf_softc *gp); -int et_ioctl(register struct grf_softc *gp, u_long cmd, void *data); -int et_getmousepos(struct grf_softc *gp, struct grf_position *data); -void et_writesprpos(volatile char *ba, short x, short y); -int et_setmousepos(struct grf_softc *gp, struct grf_position *data); -static int et_setspriteinfo(struct grf_softc *gp, struct grf_spriteinfo *data); -int et_getspriteinfo(struct grf_softc *gp, struct grf_spriteinfo *data); -static int et_getspritemax(struct grf_softc *gp, struct grf_position *data); -int et_setmonitor(struct grf_softc *gp, struct grfvideo_mode *gv); -int et_blank(struct grf_softc *gp, int *on); -static int et_getControllerType(struct grf_softc *gp); -static int et_getDACType(struct grf_softc *gp); +void et_inittextmode(struct grf_softc *); +int et_ioctl(register struct grf_softc *, u_long cmd, void *); +int et_getmousepos(struct grf_softc *, struct grf_position *); +void et_writesprpos(volatile char *ba, short, short); +int et_setmousepos(struct grf_softc *, struct grf_position *); +static int et_setspriteinfo(struct grf_softc *, struct grf_spriteinfo *); +int et_getspriteinfo(struct grf_softc *, struct grf_spriteinfo *); +static int et_getspritemax(struct grf_softc *, struct grf_position *); +int et_setmonitor(struct grf_softc *, struct grfvideo_mode *); +int et_blank(struct grf_softc *, int); +int et_isblank(struct grf_softc *); +static int et_getControllerType(struct grf_softc *); +static int et_getDACType(struct grf_softc *); int grfetmatch(device_t, cfdata_t, void *); void grfetattach(device_t, device_t, void *); int grfetprint(void *, const char *); -void et_memset(volatile unsigned char *d, unsigned char c, int l); +void et_memset(volatile unsigned char
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: phx Date: Sun Oct 23 18:40:52 UTC 2016 Modified Files: src/sys/arch/amiga/dev: mntva.c Log Message: Fixed WSCONS kernels. The cnprobe function must only be called when MNTVA_CONSOLE is defined. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amiga/dev/mntva.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/amiga/dev/mntva.c diff -u src/sys/arch/amiga/dev/mntva.c:1.1 src/sys/arch/amiga/dev/mntva.c:1.2 --- src/sys/arch/amiga/dev/mntva.c:1.1 Mon Oct 3 14:26:02 2016 +++ src/sys/arch/amiga/dev/mntva.c Sun Oct 23 18:40:52 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: mntva.c,v 1.1 2016/10/03 14:26:02 rkujawa Exp $ */ +/* $NetBSD: mntva.c,v 1.2 2016/10/23 18:40:52 phx Exp $ */ /* * Copyright (c) 2012, 2016 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mntva.c,v 1.1 2016/10/03 14:26:02 rkujawa Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mntva.c,v 1.2 2016/10/23 18:40:52 phx Exp $"); #include #include @@ -593,6 +593,7 @@ mntvacninit(struct consdev *cd) void mntvacnprobe(struct consdev *cd) { +#ifdef MNTVA_CONSOLE /* * This isn't exactly true, but cons.h does not define anything * that would fit our case exactly. @@ -600,6 +601,7 @@ mntvacnprobe(struct consdev *cd) cd->cn_pri = CN_INTERNAL; cd->cn_dev = NODEV; /* Filled later by wscons. */ +#endif /* MNTVA_CONSOLE */ } /* ARGSUSED */
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: phx Date: Fri Jun 17 07:41:56 UTC 2016 Modified Files: src/sys/arch/amiga/dev: grf_cv3d.c grf_cv3dreg.h Log Message: Remove the "totally untested" comments for the ZorroII frame buffer select macro. The card is confirmed to work in an A2000. To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/amiga/dev/grf_cv3d.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/amiga/dev/grf_cv3dreg.h 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/amiga/dev/grf_cv3d.c diff -u src/sys/arch/amiga/dev/grf_cv3d.c:1.33 src/sys/arch/amiga/dev/grf_cv3d.c:1.34 --- src/sys/arch/amiga/dev/grf_cv3d.c:1.33 Mon Nov 16 21:24:06 2015 +++ src/sys/arch/amiga/dev/grf_cv3d.c Fri Jun 17 07:41:56 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: grf_cv3d.c,v 1.33 2015/11/16 21:24:06 phx Exp $ */ +/* $NetBSD: grf_cv3d.c,v 1.34 2016/06/17 07:41:56 phx Exp $ */ /* * Copyright (c) 1995 Michael Teske @@ -33,7 +33,7 @@ #include "opt_amigacons.h" #include -__KERNEL_RCSID(0, "$NetBSD: grf_cv3d.c,v 1.33 2015/11/16 21:24:06 phx Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grf_cv3d.c,v 1.34 2016/06/17 07:41:56 phx Exp $"); #include "grfcv3d.h" #include "ite.h" @@ -1490,7 +1490,6 @@ cv3d_load_mon(struct grf_softc *gp, stru gp->g_fbkva = (volatile char *)cv3d_boardaddr + 0x0400 + (0x0040 * fb_flag); } else { - /* XXX This is totaly untested */ Select_Zorro2_FrameBuffer(fb_flag); } Index: src/sys/arch/amiga/dev/grf_cv3dreg.h diff -u src/sys/arch/amiga/dev/grf_cv3dreg.h:1.12 src/sys/arch/amiga/dev/grf_cv3dreg.h:1.13 --- src/sys/arch/amiga/dev/grf_cv3dreg.h:1.12 Wed Jan 22 00:25:16 2014 +++ src/sys/arch/amiga/dev/grf_cv3dreg.h Fri Jun 17 07:41:56 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: grf_cv3dreg.h,v 1.12 2014/01/22 00:25:16 christos Exp $ */ +/* $NetBSD: grf_cv3dreg.h,v 1.13 2016/06/17 07:41:56 phx Exp $ */ /* * Copyright (c) 1995 Michael Teske @@ -101,7 +101,6 @@ struct grfcv3dtext_mode { #define vgaw16(ba, reg, val) \ *((volatile unsigned short *) (((volatile char *)ba)+reg)) = val -/* XXX This is totaly untested */ #define Select_Zorro2_FrameBuffer(flag) \ do { \ *(((volatile char *)cv3d_vcode_switch_base) + \
CVS commit: src/sys/arch/amiga/stand/bootblock/boot
Module Name:src Committed By: phx Date: Mon Jan 4 14:10:15 UTC 2016 Modified Files: src/sys/arch/amiga/stand/bootblock/boot: amigatypes.h main.c Log Message: Make the -p option work, like with loadbsd. Otherwise the kernel could load into a low-priority 512MB Z3 RAM segment. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amiga/stand/bootblock/boot/amigatypes.h cvs rdiff -u -r1.29 -r1.30 src/sys/arch/amiga/stand/bootblock/boot/main.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/amiga/stand/bootblock/boot/amigatypes.h diff -u src/sys/arch/amiga/stand/bootblock/boot/amigatypes.h:1.7 src/sys/arch/amiga/stand/bootblock/boot/amigatypes.h:1.8 --- src/sys/arch/amiga/stand/bootblock/boot/amigatypes.h:1.7 Mon Apr 28 20:23:13 2008 +++ src/sys/arch/amiga/stand/bootblock/boot/amigatypes.h Mon Jan 4 14:10:15 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: amigatypes.h,v 1.7 2008/04/28 20:23:13 martin Exp $ */ +/* $NetBSD: amigatypes.h,v 1.8 2016/01/04 14:10:15 phx Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -54,7 +54,7 @@ struct Library { struct MemHead { struct MemHead *next; u_int8_t Dmy1[ 9- 4]; - u_int8_t Pri; + int8_t Pri; u_int8_t Dmy2[ 14- 10]; u_int16_t Attribs; u_int32_t First, Lower, Upper, Free; Index: src/sys/arch/amiga/stand/bootblock/boot/main.c diff -u src/sys/arch/amiga/stand/bootblock/boot/main.c:1.29 src/sys/arch/amiga/stand/bootblock/boot/main.c:1.30 --- src/sys/arch/amiga/stand/bootblock/boot/main.c:1.29 Sat Mar 29 12:49:15 2014 +++ src/sys/arch/amiga/stand/bootblock/boot/main.c Mon Jan 4 14:10:15 2016 @@ -1,5 +1,5 @@ /* - * $NetBSD: main.c,v 1.29 2014/03/29 12:49:15 mlelstv Exp $ + * $NetBSD: main.c,v 1.30 2016/01/04 14:10:15 phx Exp $ * * * Copyright (c) 1996,1999 Ignatios Souvatzis @@ -122,6 +122,7 @@ pain(void *aio, void *cons) struct MemHead *mh; u_int32_t from, size, vfrom, vsize; int contflag, mapped1to1; + int8_t mempri; int ncd, nseg; char c; @@ -200,7 +201,7 @@ again: (get_number(&path) & 3) << 1; break; case 'p': /* Select fastmem by priority */ - p_flag++; + p_flag = 1; break; case 'q': boothowto |= AB_QUIET; @@ -274,6 +275,7 @@ again: vfrom = mh->Lower & -__PGSZ; vsize = (mh->Upper & -__PGSZ) - vfrom; contflag = mapped1to1 = 0; + mempri = -128; do { size = vsize; @@ -318,9 +320,12 @@ again: size += from; cmemsz = size; from = 0; - } else if ((fmemsz < size) && mapped1to1) { + } else if (mapped1to1 && ((!p_flag && fmemsz < size) || + (p_flag && (mempri < mh->Pri || + (mempri == mh->Pri && fmemsz < size) { fmem = from; fmemsz = size; + mempri = mh->Pri; } memseg[nseg].ms_start = from;
CVS commit: src/sys/fs/adosfs
Module Name:src Committed By: phx Date: Wed Nov 18 22:06:25 UTC 2015 Modified Files: src/sys/fs/adosfs: advfsops.c Log Message: Patch by hannken@ to fix a bug which has been introduced with 1.71. The kernel crashed with uvm fault when mounting an ados file system. To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/fs/adosfs/advfsops.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/fs/adosfs/advfsops.c diff -u src/sys/fs/adosfs/advfsops.c:1.74 src/sys/fs/adosfs/advfsops.c:1.75 --- src/sys/fs/adosfs/advfsops.c:1.74 Mon Apr 20 13:44:16 2015 +++ src/sys/fs/adosfs/advfsops.c Wed Nov 18 22:06:25 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: advfsops.c,v 1.74 2015/04/20 13:44:16 riastradh Exp $ */ +/* $NetBSD: advfsops.c,v 1.75 2015/11/18 22:06:25 phx Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.74 2015/04/20 13:44:16 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: advfsops.c,v 1.75 2015/11/18 22:06:25 phx Exp $"); #if defined(_KERNEL_OPT) #include "opt_compat_netbsd.h" @@ -369,9 +369,12 @@ adosfs_statvfs(struct mount *mp, struct int adosfs_vget(struct mount *mp, ino_t an, struct vnode **vpp) { + u_long block; int error; - error = vcache_get(mp, &an, sizeof(an), vpp); + block = an; + KASSERT(block == an); + error = vcache_get(mp, &block, sizeof(block), vpp); if (error) return error; error = vn_lock(*vpp, LK_EXCLUSIVE); @@ -394,7 +397,7 @@ adosfs_loadvnode(struct mount *mp, struc struct adosfsmount *amp; struct anode *ap; struct buf *bp; - ino_t an; + u_long an; char *nam, *tmp; int namlen, error;
CVS commit: src/sys/arch/amiga
Module Name:src Committed By: phx Date: Mon Nov 16 21:25:34 UTC 2015 Modified Files: src/sys/arch/amiga/conf: WSCONS src/sys/arch/amiga/dev: grf_cl.c Log Message: wscons and Xorg support for CirrusLogic GD542x based boards (grf3). To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/arch/amiga/conf/WSCONS cvs rdiff -u -r1.49 -r1.50 src/sys/arch/amiga/dev/grf_cl.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/amiga/conf/WSCONS diff -u src/sys/arch/amiga/conf/WSCONS:1.68 src/sys/arch/amiga/conf/WSCONS:1.69 --- src/sys/arch/amiga/conf/WSCONS:1.68 Fri Nov 13 16:04:07 2015 +++ src/sys/arch/amiga/conf/WSCONS Mon Nov 16 21:25:34 2015 @@ -1,4 +1,4 @@ -# $NetBSD: WSCONS,v 1.68 2015/11/13 16:04:07 phx Exp $ +# $NetBSD: WSCONS,v 1.69 2015/11/16 21:25:34 phx Exp $ # GENERIC with wscons(4) # @@ -27,13 +27,11 @@ amidisplaycc0 at mainbus0 # wscons inte no grfcc0 at mainbus0 no grfrt0 at zbus0 no grfrh0 at zbus0 -no grfcl* at zbus0 no grful0 at zbus0 no grfet* at zbus0 no grf0 at grfcc0 no grf1 at grfrt0 no grf2 at grfrh0 -no grf3 at grfcl? no grf4 at grful0 no grf6 at grfet? Index: src/sys/arch/amiga/dev/grf_cl.c diff -u src/sys/arch/amiga/dev/grf_cl.c:1.49 src/sys/arch/amiga/dev/grf_cl.c:1.50 --- src/sys/arch/amiga/dev/grf_cl.c:1.49 Wed Jan 22 00:25:16 2014 +++ src/sys/arch/amiga/dev/grf_cl.c Mon Nov 16 21:25:34 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: grf_cl.c,v 1.49 2014/01/22 00:25:16 christos Exp $ */ +/* $NetBSD: grf_cl.c,v 1.50 2015/11/16 21:25:34 phx Exp $ */ /* * Copyright (c) 1997 Klaus Burkert @@ -36,10 +36,11 @@ #include "opt_amigacons.h" #include -__KERNEL_RCSID(0, "$NetBSD: grf_cl.c,v 1.49 2014/01/22 00:25:16 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grf_cl.c,v 1.50 2015/11/16 21:25:34 phx Exp $"); #include "grfcl.h" #include "ite.h" +#include "wsdisplay.h" #if NGRFCL > 0 /* @@ -81,6 +82,12 @@ __KERNEL_RCSID(0, "$NetBSD: grf_cl.c,v 1 #include #include +#if NWSDISPLAY > 0 +#include +#include +#include +#include +#endif #include #include #include @@ -106,7 +113,8 @@ int cl_setmousepos(struct grf_softc *, s static int cl_setspriteinfo(struct grf_softc *, struct grf_spriteinfo *); int cl_getspriteinfo(struct grf_softc *, struct grf_spriteinfo *); static int cl_getspritemax(struct grf_softc *, struct grf_position *); -int cl_blank(struct grf_softc *, int *); +int cl_blank(struct grf_softc *, int); +int cl_isblank(struct grf_softc *); int cl_setmonitor(struct grf_softc *, struct grfvideo_mode *); void cl_writesprpos(volatile char *, short, short); void writeshifted(volatile char *, signed char, signed char); @@ -120,6 +128,21 @@ int grfclprint(void *, const char *); int grfclmatch(device_t, cfdata_t, void *); void cl_memset(unsigned char *, unsigned char, int); +#if NWSDISPLAY > 0 +/* wsdisplay acessops, emulops */ +static int cl_wsioctl(void *, void *, u_long, void *, int, struct lwp *); +static int cl_get_fbinfo(struct grf_softc *, struct wsdisplayio_fbinfo *); + +static void cl_wscursor(void *, int, int, int); +static void cl_wsputchar(void *, int, int, u_int, long); +static void cl_wscopycols(void *, int, int, int, int); +static void cl_wserasecols(void *, int, int, int, long); +static void cl_wscopyrows(void *, int, int, int); +static void cl_wseraserows(void *, int, int, long); +static int cl_wsallocattr(void *, int, int, int, long *); +static int cl_wsmapchar(void *, int, unsigned int *); +#endif /* NWSDISPLAY > 0 */ + /* Graphics display definitions. * These are filled by 'grfconfig' using GRFIOCSETMON. */ @@ -162,6 +185,7 @@ unsigned char clconscolors[3][3] = { /* int cltype = 0; /* Picasso, Spectrum or Piccolo */ int cl_64bit = 0; /* PiccoloSD64 or PicassoIV */ unsigned char cl_pass_toggle; /* passthru status tracker */ +static int cl_blanked; /* true when video is currently blanked out */ /* * because all 542x-boards have 2 configdev entries, one for @@ -188,6 +212,41 @@ struct grf_spriteinfo cl_cursprite; static unsigned char cl_imageptr[8 * 64], cl_maskptr[8 * 64]; static unsigned char cl_sprred[2], cl_sprgreen[2], cl_sprblue[2]; +#if NWSDISPLAY > 0 +static struct wsdisplay_accessops cl_accessops = { + .ioctl = cl_wsioctl, + .mmap = grf_wsmmap +}; + +static struct wsdisplay_emulops cl_textops = { + .cursor = cl_wscursor, + .mapchar = cl_wsmapchar, + .putchar = cl_wsputchar, + .copycols = cl_wscopycols, + .erasecols = cl_wserasecols, + .copyrows = cl_wscopyrows, + .eraserows = cl_wseraserows, + .allocattr = cl_wsallocattr +}; + +static struct wsscreen_descr cl_defaultscreen = { + .name = "default", + .textops = &cl_textops, + .fontwidth = 8, + .fontheight = CIRRUSFONTY, + .capabilities = WSSCREEN_HILIT | WSSCREEN_BLINK | + WSSCREEN_REVERSE | WSSCREEN_UNDERLINE +}; + +static const struct wsscreen_descr *cl_screens[] = { + &cl_defaultscreen, +}; + +static
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: phx Date: Mon Nov 16 21:24:06 UTC 2015 Modified Files: src/sys/arch/amiga/dev: grf_cv.c grf_cv3d.c Log Message: Fixed bug in wsdisplay copyrows textop. Fixed WSDISPLAYIO_SVIDEO, which had inverted functionality. Improved FBINFO setup. 15 and 16 bits depth both have 16bpp now. To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/sys/arch/amiga/dev/grf_cv.c cvs rdiff -u -r1.32 -r1.33 src/sys/arch/amiga/dev/grf_cv3d.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/amiga/dev/grf_cv.c diff -u src/sys/arch/amiga/dev/grf_cv.c:1.58 src/sys/arch/amiga/dev/grf_cv.c:1.59 --- src/sys/arch/amiga/dev/grf_cv.c:1.58 Thu Nov 12 12:01:53 2015 +++ src/sys/arch/amiga/dev/grf_cv.c Mon Nov 16 21:24:06 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: grf_cv.c,v 1.58 2015/11/12 12:01:53 phx Exp $ */ +/* $NetBSD: grf_cv.c,v 1.59 2015/11/16 21:24:06 phx Exp $ */ /* * Copyright (c) 1995 Michael Teske @@ -33,7 +33,7 @@ #include "opt_amigacons.h" #include -__KERNEL_RCSID(0, "$NetBSD: grf_cv.c,v 1.58 2015/11/12 12:01:53 phx Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grf_cv.c,v 1.59 2015/11/16 21:24:06 phx Exp $"); #include "grfcv.h" #include "ite.h" @@ -543,8 +543,10 @@ grfcvattach(device_t parent, device_t se gp->g_defaultscr = &cv_defaultscreen; gp->g_scrlist = &cv_screenlist; #else +#if NITE > 0 grfcv_iteinit(gp); #endif +#endif /* NWSDISPLAY > 0 */ (void)cv_load_mon(gp, &cvconsole_mode); #endif } @@ -2387,7 +2389,7 @@ cv_wscopyrows(void *c, int srcrow, int d gp = scr->scr_cookie; src = dst = gp->g_fbkva; n = ri->ri_cols * nrows; - if (src < dst) { + if (srcrow < dstrow) { /* need to copy backwards */ src += gp->g_rowoffset[srcrow + nrows] << 1; dst += gp->g_rowoffset[dstrow + nrows] << 1; @@ -2485,7 +2487,7 @@ cv_wsioctl(void *v, void *vs, u_long cmd return 0; case WSDISPLAYIO_SVIDEO: - return cv_blank(gp, *(u_int *)data == WSDISPLAYIO_VIDEO_OFF); + return cv_blank(gp, *(u_int *)data == WSDISPLAYIO_VIDEO_ON); case WSDISPLAYIO_SMODE: if ((*(int *)data) != gp->g_wsmode) { @@ -2525,34 +2527,34 @@ cv_get_fbinfo(struct grf_softc *gp, stru md = monitor_current; abits = 0; - fbi->fbi_width = md->disp_width; - fbi->fbi_height = md->disp_height; - fbi->fbi_bitsperpixel = md->depth; - switch (md->depth) { case 8: - fbi->fbi_stride = md->disp_width; + fbi->fbi_bitsperpixel = 8; rbits = gbits = bbits = 6; /* keep gcc happy */ break; case 15: - fbi->fbi_stride = md->disp_width * 2; + fbi->fbi_bitsperpixel = 16; rbits = gbits = bbits = 5; break; case 16: - fbi->fbi_stride = md->disp_width * 2; + fbi->fbi_bitsperpixel = 16; rbits = bbits = 5; gbits = 6; break; case 32: abits = 8; case 24: - fbi->fbi_stride = md->disp_width * 4; + fbi->fbi_bitsperpixel = 32; rbits = gbits = bbits = 8; break; default: return EINVAL; } + fbi->fbi_stride = (fbi->fbi_bitsperpixel / 8) * md->disp_width; + fbi->fbi_width = md->disp_width; + fbi->fbi_height = md->disp_height; + if (md->depth > 8) { fbi->fbi_pixeltype = WSFB_RGB; fbi->fbi_subtype.fbi_rgbmasks.red_offset = bbits + gbits; Index: src/sys/arch/amiga/dev/grf_cv3d.c diff -u src/sys/arch/amiga/dev/grf_cv3d.c:1.32 src/sys/arch/amiga/dev/grf_cv3d.c:1.33 --- src/sys/arch/amiga/dev/grf_cv3d.c:1.32 Thu Nov 12 12:01:53 2015 +++ src/sys/arch/amiga/dev/grf_cv3d.c Mon Nov 16 21:24:06 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: grf_cv3d.c,v 1.32 2015/11/12 12:01:53 phx Exp $ */ +/* $NetBSD: grf_cv3d.c,v 1.33 2015/11/16 21:24:06 phx Exp $ */ /* * Copyright (c) 1995 Michael Teske @@ -33,11 +33,11 @@ #include "opt_amigacons.h" #include -__KERNEL_RCSID(0, "$NetBSD: grf_cv3d.c,v 1.32 2015/11/12 12:01:53 phx Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grf_cv3d.c,v 1.33 2015/11/16 21:24:06 phx Exp $"); +#include "grfcv3d.h" #include "ite.h" #include "wsdisplay.h" -#include "grfcv3d.h" #if NGRFCV3D > 0 /* @@ -493,7 +493,9 @@ grfcv3dattach(device_t parent, device_t gp->g_defaultscr = &cv3d_defaultscreen; gp->g_scrlist = &cv3d_screenlist; #else +#if NITE > 0 grfcv3d_iteinit(gp); +#endif #endif /* NWSDISPLAY > 0 */ (void)cv3d_load_mon(gp, &cv3dconsole_mode); #endif @@ -2242,7 +2244,7 @@ cv3d_wscopyrows(void *c, int srcrow, int gp = scr->scr_cookie; src = dst = gp->g_fbkva; n = ri->ri_cols * nrows; - if (src < dst) { + if (srcrow < dstrow) { /* need to copy backwards */ src += gp->g_rowoffset[srcrow + nrows] << 1; dst += gp->g_rowoffset[dstrow + nrows] << 1; @@ -2340,7 +2342,7 @@ cv3d_wsioctl(void *v, void *vs, u_long c return 0; case WSDISPLAYIO_SVIDEO: - return cv3d_blank(gp, *(u_int *)data == WSDISPLAYIO_VIDEO_OFF); + return cv3d_blank(gp, *(u_int *)data == WSDISPLAYIO_VIDEO_ON); case WSDISPLAYIO_SMODE: if ((*(int *)data) != gp->g_wsmode) { @@ -2380,34 +2382,34 @@ cv3d_get_fbinfo(struct grf_soft
CVS commit: src/sys/arch/amiga/conf
Module Name:src Committed By: phx Date: Fri Nov 13 16:04:07 UTC 2015 Modified Files: src/sys/arch/amiga/conf: WSCONS Log Message: Make sure the graphics device which has the console gets wsdisplay0, otherwise neither virtual terminals nor Xorg's wsfb driver will work. To generate a diff of this commit: cvs rdiff -u -r1.67 -r1.68 src/sys/arch/amiga/conf/WSCONS 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/amiga/conf/WSCONS diff -u src/sys/arch/amiga/conf/WSCONS:1.67 src/sys/arch/amiga/conf/WSCONS:1.68 --- src/sys/arch/amiga/conf/WSCONS:1.67 Thu Oct 3 13:40:26 2013 +++ src/sys/arch/amiga/conf/WSCONS Fri Nov 13 16:04:07 2015 @@ -1,4 +1,4 @@ -# $NetBSD: WSCONS,v 1.67 2013/10/03 13:40:26 rkujawa Exp $ +# $NetBSD: WSCONS,v 1.68 2015/11/13 16:04:07 phx Exp $ # GENERIC with wscons(4) # @@ -6,8 +6,6 @@ include "arch/amiga/conf/GENERIC" # wscons(4)-aware interface to amiga custom chips. # -amidisplaycc0 at mainbus0 # wscons interface to custom chips -wsdisplay0 at amidisplaycc0 console ? options WSEMUL_VT100 options WSDISPLAY_COMPAT_USL # wsconscfg VT handling options FONT_VT220L8x10 @@ -23,29 +21,23 @@ wsmouse* at ms? ums* at uhidev? reportid ? wsmouse* at ums? +amidisplaycc0 at mainbus0 # wscons interface to custom chips + +# Disable grf(4) devices without wsdisplay support. no grfcc0 at mainbus0 no grfrt0 at zbus0 no grfrh0 at zbus0 no grfcl* at zbus0 no grful0 at zbus0 no grfet* at zbus0 -#no grfcv0 at zbus0 -#no grfcv3d0 at zbus0 - -# Disable grf(4) devices for non-wsdisplay drivers. no grf0 at grfcc0 no grf1 at grfrt0 no grf2 at grfrh0 no grf3 at grfcl? no grf4 at grful0 no grf6 at grfet? -#no grf5 at grfcv0 -#no grf7 at grfcv3d0 - -wsdisplay* at grf5 console ? # wsdisplay on top of grf (CV64) -wsdisplay* at grf7 console ? # wsdisplay on top of grf (CV64/3D) -# Disable ite(4) for all drivers. +# Disable ite(4) for all grf(4) drivers. no ite0 at grf0 no ite1 at grf1 no ite2 at grf2 @@ -64,8 +56,8 @@ voodoofb* at pci? # 3Dfx Voodoo 3 in G # G-REX. #options P5PB_CONSOLE +wsdisplay0 at wsemuldisplaydev? console 1 wsdisplay* at wsemuldisplaydev? console ? pseudo-device wsfont # wsfont(4) dynamic font loading support pseudo-device wsmux # mouse & keyboard multiplexor -
CVS commit: src/share/man/man4
Module Name:src Committed By: phx Date: Thu Nov 12 17:45:12 UTC 2015 Modified Files: src/share/man/man4: ddb.4 Log Message: Add sandpoint ddb-entry method. To generate a diff of this commit: cvs rdiff -u -r1.156 -r1.157 src/share/man/man4/ddb.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/ddb.4 diff -u src/share/man/man4/ddb.4:1.156 src/share/man/man4/ddb.4:1.157 --- src/share/man/man4/ddb.4:1.156 Thu Jun 12 13:47:58 2014 +++ src/share/man/man4/ddb.4 Thu Nov 12 17:45:12 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: ddb.4,v 1.156 2014/06/12 13:47:58 christos Exp $ +.\" $NetBSD: ddb.4,v 1.157 2015/11/12 17:45:12 phx Exp $ .\" .\" Copyright (c) 1997 - 2009 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -149,6 +149,8 @@ Abort switch on CPU card. rcons console. .It "" \*[Lt]Break\*[Gt] on serial console. +.It sandpoint +\*[Lt]Break\*[Gt] on serial console. .It sparc \*[Lt]L1\*[Gt]-A, or \*[Lt]Stop\*[Gt]-A on a .Tn Sun
CVS commit: src/doc
Module Name:src Committed By: phx Date: Thu Nov 12 15:13:03 UTC 2015 Modified Files: src/doc: CHANGES Log Message: Amiga Xorg support. To generate a diff of this commit: cvs rdiff -u -r1.2112 -r1.2113 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2112 src/doc/CHANGES:1.2113 --- src/doc/CHANGES:1.2112 Sat Nov 7 23:16:00 2015 +++ src/doc/CHANGES Thu Nov 12 15:13:03 2015 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2112 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2113 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -215,3 +215,8 @@ Changes from NetBSD 7.0 to NetBSD 8.0: created. Provide support for a poll based svc_run() and the global variables svc_pollfd and svc_pollfd_max. [christos 20151107] + amiga: wsdisplay(4) virtual terminals are working on CV64 and + CV64/3D. [phx 20151112] + amiga: Build the Xorg server with wsfb(4) driver. + Added wsfb(4) support for CV64 and CV64/3D graphics cards. + [phx 20151112]
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: phx Date: Thu Nov 12 12:19:50 UTC 2015 Modified Files: src/sys/arch/amiga/dev: amidisplaycc.c clock.c view.c Log Message: Use the MD_BTOP() macro as replacement for m68k_btop() in all device drivers which are shared with amigappc. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/amiga/dev/amidisplaycc.c cvs rdiff -u -r1.54 -r1.55 src/sys/arch/amiga/dev/clock.c cvs rdiff -u -r1.32 -r1.33 src/sys/arch/amiga/dev/view.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/amiga/dev/amidisplaycc.c diff -u src/sys/arch/amiga/dev/amidisplaycc.c:1.28 src/sys/arch/amiga/dev/amidisplaycc.c:1.29 --- src/sys/arch/amiga/dev/amidisplaycc.c:1.28 Wed Aug 5 07:02:20 2015 +++ src/sys/arch/amiga/dev/amidisplaycc.c Thu Nov 12 12:19:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: amidisplaycc.c,v 1.28 2015/08/05 07:02:20 mrg Exp $ */ +/* $NetBSD: amidisplaycc.c,v 1.29 2015/11/12 12:19:49 phx Exp $ */ /*- * Copyright (c) 2000 Jukka Andberg. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: amidisplaycc.c,v 1.28 2015/08/05 07:02:20 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: amidisplaycc.c,v 1.29 2015/11/12 12:19:49 phx Exp $"); /* * wscons interface to amiga custom chips. Contains the necessary functions @@ -1183,7 +1183,7 @@ amidisplaycc_mmap(void *dp, void *vs, of rv = (paddr_t)bm->hardware_address; rv += off; - return (rv >> PGSHIFT); + return MD_BTOP(rv); } Index: src/sys/arch/amiga/dev/clock.c diff -u src/sys/arch/amiga/dev/clock.c:1.54 src/sys/arch/amiga/dev/clock.c:1.55 --- src/sys/arch/amiga/dev/clock.c:1.54 Sat Oct 27 17:17:28 2012 +++ src/sys/arch/amiga/dev/clock.c Thu Nov 12 12:19:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.54 2012/10/27 17:17:28 chs Exp $ */ +/* $NetBSD: clock.c,v 1.55 2015/11/12 12:19:49 phx Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.54 2012/10/27 17:17:28 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.55 2015/11/12 12:19:49 phx Exp $"); #include #include @@ -475,7 +475,7 @@ clockioctl(dev_t dev, u_long cmd, void * void clockmap(dev_t dev, int off, int prot) { - return((off + (INTIOBASE+CLKBASE+CLKSR-1)) >> PGSHIFT); + return MD_BTOP(off + (INTIOBASE+CLKBASE+CLKSR-1)); } int Index: src/sys/arch/amiga/dev/view.c diff -u src/sys/arch/amiga/dev/view.c:1.32 src/sys/arch/amiga/dev/view.c:1.33 --- src/sys/arch/amiga/dev/view.c:1.32 Thu Aug 20 14:40:16 2015 +++ src/sys/arch/amiga/dev/view.c Thu Nov 12 12:19:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: view.c,v 1.32 2015/08/20 14:40:16 christos Exp $ */ +/* $NetBSD: view.c,v 1.33 2015/11/12 12:19:49 phx Exp $ */ /* * Copyright (c) 1994 Christian E. Hopps @@ -38,7 +38,7 @@ * a interface to graphics. */ #include -__KERNEL_RCSID(0, "$NetBSD: view.c,v 1.32 2015/08/20 14:40:16 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: view.c,v 1.33 2015/11/12 12:19:49 phx Exp $"); #include #include @@ -405,7 +405,7 @@ viewmmap(dev_t dev, off_t off, int prot) bmd_size = bm->bytes_per_row*bm->rows*bm->depth; if (off >= 0 && off < bmd_size) - return(((paddr_t)bmd_start + off) >> PGSHIFT); + return MD_BTOP((paddr_t)bmd_start + off); return(-1); }
CVS commit: xsrc/external/mit/xf86-input-keyboard/dist/src
Module Name:xsrc Committed By: phx Date: Thu Nov 12 12:03:58 UTC 2015 Modified Files: xsrc/external/mit/xf86-input-keyboard/dist/src: bsd_KbdMap.c bsd_kbd.c Log Message: Scancode translation table for wskbd on Amiga keyboards. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_KbdMap.c cvs rdiff -u -r1.20 -r1.21 \ xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_KbdMap.c diff -u xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_KbdMap.c:1.10 xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_KbdMap.c:1.11 --- xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_KbdMap.c:1.10 Fri Apr 4 12:50:09 2014 +++ xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_KbdMap.c Thu Nov 12 12:03:58 2015 @@ -841,6 +841,122 @@ TransMapRec wsAdb = { wsAdbMap }; +/* Map for amiga keyboards */ +static CARD8 wsAmigaMap[] = { + /* 0 */ KEY_Tilde, + /* 1 */ KEY_1, + /* 2 */ KEY_2, + /* 3 */ KEY_3, + /* 4 */ KEY_4, + /* 5 */ KEY_5, + /* 6 */ KEY_6, + /* 7 */ KEY_7, + /* 8 */ KEY_8, + /* 9 */ KEY_9, + /* 10 */ KEY_0, + /* 11 */ KEY_Minus, + /* 12 */ KEY_Equal, + /* 13 */ KEY_BSlash, /* key in this position only on Amiga */ + /* 14 */ KEY_NOTUSED, + /* 15 */ KEY_KP_0, + /* 16 */ KEY_Q, + /* 17 */ KEY_W, + /* 18 */ KEY_E, + /* 19 */ KEY_R, + /* 20 */ KEY_T, + /* 21 */ KEY_Y, + /* 22 */ KEY_U, + /* 23 */ KEY_I, + /* 24 */ KEY_O, + /* 25 */ KEY_P, + /* 26 */ KEY_LBrace, + /* 27 */ KEY_RBrace, + /* 28 */ KEY_NOTUSED, + /* 29 */ KEY_KP_1, + /* 30 */ KEY_KP_2, + /* 31 */ KEY_KP_3, + /* 32 */ KEY_A, + /* 33 */ KEY_S, + /* 34 */ KEY_D, + /* 35 */ KEY_F, + /* 36 */ KEY_G, + /* 37 */ KEY_H, + /* 38 */ KEY_J, + /* 39 */ KEY_K, + /* 40 */ KEY_L, + /* 41 */ KEY_SemiColon, + /* 42 */ KEY_Quote, + /* 43 */ KEY_BSlash, /* # on international keyboards */ + /* 44 */ KEY_NOTUSED, + /* 45 */ KEY_KP_4, + /* 46 */ KEY_KP_5, + /* 47 */ KEY_KP_6, + /* 48 */ KEY_Less, + /* 49 */ KEY_Z, + /* 50 */ KEY_X, + /* 51 */ KEY_C, + /* 52 */ KEY_V, + /* 53 */ KEY_B, + /* 54 */ KEY_N, + /* 55 */ KEY_M, + /* 56 */ KEY_Comma, + /* 57 */ KEY_Period, + /* 58 */ KEY_Slash, + /* 59 */ KEY_NOTUSED, + /* 60 */ KEY_KP_Decimal, + /* 61 */ KEY_KP_7, + /* 62 */ KEY_KP_8, + /* 63 */ KEY_KP_9, + /* 64 */ KEY_Space, + /* 65 */ KEY_BackSpace, + /* 66 */ KEY_Tab, + /* 67 */ KEY_KP_Enter, + /* 68 */ KEY_Enter, + /* 69 */ KEY_Escape, + /* 70 */ KEY_Delete, + /* 71 */ KEY_NOTUSED, + /* 72 */ KEY_NOTUSED, + /* 73 */ KEY_NOTUSED, + /* 74 */ KEY_KP_Minus, + /* 75 */ KEY_NOTUSED, + /* 76 */ KEY_Up, + /* 77 */ KEY_Down, + /* 78 */ KEY_Right, + /* 79 */ KEY_Left, + /* 80 */ KEY_F1, + /* 81 */ KEY_F2, + /* 82 */ KEY_F3, + /* 83 */ KEY_F4, + /* 84 */ KEY_F5, + /* 85 */ KEY_F6, + /* 86 */ KEY_F7, + /* 87 */ KEY_F8, + /* 88 */ KEY_F9, + /* 89 */ KEY_F10, + /* 90 */ KEY_UNKNOWN, /* Keypad [ */ + /* 91 */ KEY_UNKNOWN, /* Keypad ] */ + /* 92 */ KEY_KP_Divide, + /* 93 */ KEY_KP_Multiply, + /* 94 */ KEY_KP_Plus, + /* 95 */ KEY_Help, + /* 96 */ KEY_ShiftL, + /* 97 */ KEY_ShiftR, + /* 98 */ KEY_NOTUSED, + /* 99 */ KEY_LCtrl, + /* 100 */ KEY_Alt, + /* 101 */ KEY_AltLang, + /* 102 */ KEY_LMeta, + /* 103 */ KEY_RMeta +}; +#define WS_AMIGA_MAP_SIZE (sizeof(wsAmigaMap)/sizeof(*wsAmigaMap)) + +static +TransMapRec wsAmiga = { +0, +WS_AMIGA_MAP_SIZE, +wsAmigaMap +}; + /* Map for LK201 keyboards */ static CARD8 wsLk201Map[] = { /* 0 */ KEY_F1, @@ -1386,6 +1502,11 @@ KbdGetMapping (InputInfoPtr pInfo, KeySy pKbd->scancodeMap = &wsAdb; break; #endif +#ifdef WSKBD_TYPE_AMIGA + case WSKBD_TYPE_AMIGA: +pKbd->scancodeMap = &wsAmiga; +break; +#endif #ifdef WSKBD_TYPE_LK201 case WSKBD_TYPE_LK201: pKbd->scancodeMap = &wsLk201; Index: xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c diff -u xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c:1.20 xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c:1.21 --- xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c:1.20 Thu Mar 20 10:27:39 2014 +++ xsrc/external/mit/xf86-input-keyboard/dist/src/bsd_kbd.c Thu Nov 12 12:03:58 2015 @@ -459,6 +459,11 @@ OpenKeyboard(InputInfoPtr pInfo) printWsType("ADB", pInfo->name); break; #endif +#ifdef WSKBD_TYPE_AMIGA + case WSKBD_TYPE_AMIGA: + printWsType("Amiga", pInfo->name); + break; +#endif #ifdef WSKBD_TYPE_LK201 case WSKBD_TYPE_LK201: printWsType("LK201", pInfo->name);
CVS commit: src/sys/arch
Module Name:src Committed By: phx Date: Thu Nov 12 12:01:53 UTC 2015 Modified Files: src/sys/arch/amiga/amiga: bus.c src/sys/arch/amiga/dev: grf.c grf_cv.c grf_cv3d.c src/sys/arch/amiga/include: param.h src/sys/arch/amigappc/include: param.h Log Message: Xorg for amiga via wsfb. Currently available on CV64 and CV64/3D. More graphics cards will follow, when adding wscons support to them. I didn't manage to make the "wskbd" protocol the default in the X server, so you have to provide a small xorg.conf with Option "Protocol" "wskbd". The standard protocol will not work as the Amiga wskbd cannot be switched into raw mode and has no AT-scancode translation in the kernel. On the positive side, wskbd also works with national keymaps under X. The graphics modes can still be defined via grfconfig(8). Xorg's wsfb driver uses the current grf video mode, which is usually mode #1. All resolutions and depths seem to work (tested on CV64). To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amiga/amiga/bus.c cvs rdiff -u -r1.63 -r1.64 src/sys/arch/amiga/dev/grf.c cvs rdiff -u -r1.57 -r1.58 src/sys/arch/amiga/dev/grf_cv.c cvs rdiff -u -r1.31 -r1.32 src/sys/arch/amiga/dev/grf_cv3d.c cvs rdiff -u -r1.49 -r1.50 src/sys/arch/amiga/include/param.h cvs rdiff -u -r1.13 -r1.14 src/sys/arch/amigappc/include/param.h 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/amiga/amiga/bus.c diff -u src/sys/arch/amiga/amiga/bus.c:1.1 src/sys/arch/amiga/amiga/bus.c:1.2 --- src/sys/arch/amiga/amiga/bus.c:1.1 Thu Aug 4 17:48:50 2011 +++ src/sys/arch/amiga/amiga/bus.c Thu Nov 12 12:01:53 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.c,v 1.1 2011/08/04 17:48:50 rkujawa Exp $ */ +/* $NetBSD: bus.c,v 1.2 2015/11/12 12:01:53 phx Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -48,11 +48,7 @@ paddr_t bus_space_mmap(bus_space_tag_t t, bus_addr_t addr, off_t off, int prot, int flags) { -#if defined(__m68k__) - return m68k_btop(addr + off); -#else - return -1; /* FIXME */ -#endif + return MD_BTOP(addr + off); } void * @@ -63,4 +59,3 @@ bus_space_vaddr(bus_space_tag_t space, b return va; } - Index: src/sys/arch/amiga/dev/grf.c diff -u src/sys/arch/amiga/dev/grf.c:1.63 src/sys/arch/amiga/dev/grf.c:1.64 --- src/sys/arch/amiga/dev/grf.c:1.63 Sat Nov 7 14:29:10 2015 +++ src/sys/arch/amiga/dev/grf.c Thu Nov 12 12:01:53 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: grf.c,v 1.63 2015/11/07 14:29:10 phx Exp $ */ +/* $NetBSD: grf.c,v 1.64 2015/11/12 12:01:53 phx Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.63 2015/11/07 14:29:10 phx Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.64 2015/11/12 12:01:53 phx Exp $"); /* * Graphics display driver for the Amiga @@ -140,7 +140,6 @@ static struct vcons_screen console_vcons static void grf_init_screen(void *, struct vcons_screen *, int, long *); static struct rasops_info *grf_setup_rasops(struct grf_softc *, struct vcons_screen *); -static paddr_t grf_wsmmap_md(off_t off); cons_decl(grf); #endif @@ -369,14 +368,14 @@ grfmmap(dev_t dev, off_t off, int prot) * control registers */ if (off >= 0 && off < gi->gd_regsize) - return(((paddr_t)gi->gd_regaddr + off) >> PGSHIFT); + return MD_BTOP((paddr_t)gi->gd_regaddr + off); /* * frame buffer */ if (off >= gi->gd_regsize && off < gi->gd_regsize+gi->gd_fbsize) { off -= gi->gd_regsize; - return(((paddr_t)gi->gd_fbaddr + off) >> PGSHIFT); + return MD_BTOP((paddr_t)gi->gd_fbaddr + off); } /* bogus */ return(-1); @@ -613,8 +612,12 @@ grf_wsmmap(void *v, void *vs, off_t off, /* Normal fb mapping */ if (off < gi->gd_fbsize) - return grf_wsmmap_md(((bus_addr_t)gp->g_fbkva) + off); + return MD_BTOP(((paddr_t)gi->gd_fbaddr) + off); + /* + * restrict all other mappings to processes with superuser privileges + * or the kernel itself + */ if (kauth_authorize_machdep(kauth_cred_get(), KAUTH_MACHDEP_UNMANAGEDMEM, NULL, NULL, NULL, NULL) != 0) { aprint_normal("%s: permission to mmap denied.\n", @@ -622,28 +625,18 @@ grf_wsmmap(void *v, void *vs, off_t off, return -1; } - if ((off >= (bus_addr_t)gp->g_fbkva ) && - (off < ( (bus_addr_t)gp->g_fbkva + (size_t)gi->gd_fbsize))) - return grf_wsmmap_md(off); - /* Handle register mapping */ - if ((off >= (bus_addr_t)gi->gd_regaddr) && - (off < ((bus_addr_t)gi->gd_regaddr + (size_t)gi->gd_regsize))) - return grf_wsmmap_md(off); + if ((off >= (paddr_t)gi->gd_regaddr) && + (off < ((paddr_t)gi->gd_regaddr + (size_t)gi->gd_regsize))) + return MD_BTOP(off); + + if ((off >= (paddr_t)gi->gd_fbaddr) && + (off < ((paddr_t)gi->gd_fbaddr + (size_t)gi->gd_fbsize))) + return MD_BTOP(off); return -1; } -static paddr_t -grf_wsmmap_md(off_t off) -{ -#if defined(__m68k__) - return (pa
CVS commit: src/distrib/amiga/stand
Module Name:src Committed By: phx Date: Wed Nov 11 16:13:55 UTC 2015 Modified Files: src/distrib/amiga/stand: Makefile loadbsd.uue Removed Files: src/distrib/amiga/stand: loadbsd-2.14.uue loadbsd-2.16.uue loadbsd.gz.uue Log Message: Update loadbsd to 2.17, which can load ELF kernels. Remove obsolete loadbsd binaries from installation/misc as they have become useless (and can only load a.out kernels). To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/distrib/amiga/stand/Makefile cvs rdiff -u -r1.1 -r0 src/distrib/amiga/stand/loadbsd-2.14.uue \ src/distrib/amiga/stand/loadbsd-2.16.uue \ src/distrib/amiga/stand/loadbsd.gz.uue cvs rdiff -u -r1.1 -r1.2 src/distrib/amiga/stand/loadbsd.uue Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/amiga/stand/Makefile diff -u src/distrib/amiga/stand/Makefile:1.3 src/distrib/amiga/stand/Makefile:1.4 --- src/distrib/amiga/stand/Makefile:1.3 Mon Jun 23 02:16:53 2008 +++ src/distrib/amiga/stand/Makefile Wed Nov 11 16:13:55 2015 @@ -1,10 +1,9 @@ -# $NetBSD: Makefile,v 1.3 2008/06/23 02:16:53 matt Exp $ +# $NetBSD: Makefile,v 1.4 2015/11/11 16:13:55 phx Exp $ # MISC_FILES= runbootblock.README UUDECODE_FILES= device-streams.tar.gz \ - loadbsd loadbsd-2.14 loadbsd-2.16 \ - rdbinfo runbootblock xstreamtodev + loadbsd rdbinfo runbootblock xstreamtodev .include .include Index: src/distrib/amiga/stand/loadbsd.uue diff -u src/distrib/amiga/stand/loadbsd.uue:1.1 src/distrib/amiga/stand/loadbsd.uue:1.2 --- src/distrib/amiga/stand/loadbsd.uue:1.1 Wed Jun 16 02:31:27 2004 +++ src/distrib/amiga/stand/loadbsd.uue Wed Nov 11 16:13:55 2015 @@ -1,203 +1,484 @@ begin 755 loadbsd -M```#\P`#``(```=["0```)/I```'>T[Z`.`` -M`0$'```=["0```)``"0``"\")"\`#"(O`!`@+P`4 -M(^\`"@!(>0```?A(>0```BPO`"\!+P).N0``'3C>_``4)!].=6EX96UU -M;"YL:6)R87)Y`$-O;G1I;G5E`&EX96UU;"YL:6)R87)Y('=A09.N0``&EY0 -M3TAY```"+$AY```!^"\Y'"\Y&"\"+PI.N0``'5`D`-[\`!@L>``$ -M(GD```(`3J[^8B`"8$H@>``$)&@!%$AYL$AYMDZY```:7E!/2JH` -MK&8F+'@`!$ZN_WQT7-2*($).KOZ`+'@`!"!"3J[^C"QX``0B0$ZN_H9P%$S? -M1`1.=4CG.``H+P`0)B\`%"0O`!A(>0```"!(>0```AA(>0```?A(>0```21( -M>0```?!(>0```@A(>``&3KD``!U$(\(@+P(O`R\$3KD```7*WOP`*$S? -M`!Q.=4YU)%9%4CH@3&]A9$)31"`R+C$S("@R+C4N.38I`&=R87!H:6-S+FQI -M8G)AF4])3`X -M;'@@871TF4Z("5D"@!F -M86EL960@;6%L;&]C("5D"@!U;F%B;&4@=&\@6]U('-H;W5L9`H`*BHJ('5P -M9&%T92!T;R!A(&YE=V5R('9E"!T;R!&87-T;65M("4P -M.&QX("HJ*@H`2V5R;F5L('-I>F4@)60@97AC965D2!O -M9B`E9`H`26YS=69F:6-I96YT($-H:7`@365M;W)Y(&9O"!T;R!#:&EP;65M("HJ*@H``$Y5_[Q(YS\Z -M)BT`""1M``Q.N0``&C(K?```$1C_Q"/2```"''H"?@&^@VT$80`,1"QY```! -M)$/Y```"<'``3J[]V"/"%&802'D```*!2'@`%&$`$Q!03RQY```!)$/Y -M```"G7``3J[]V"/!$&802'D```*O2'@`%&$`$N903TAY```"S"\*+P-. -MN0``&X;>_``,?O^^@&<``9Q^O]"'?C.^@&4``8C0@#`["`9.^P`"`10!?`%\ -M`/`!?`%\`7P!?`%,`7P!?`%\`7P!?`%\`7P!?`%\`.0!?`%\`,`!?`%\`7P! -M;`%\`7P!?`%\`7P!?`!T`'P`^`%\`7P!?`%\`7@!?`%\`&@!?`"<`2`!?`"$ -M`7P!?`"X`)!^`2/'```!]&``_UQ^_``00J_``,(\$H8`#^9'X! -M(\<```(P8`#^6&$`#_9A``H^8`#^3):Y$"`Y$.6`U0```P5(>``480`0[%!/ -M2'@`($AM_^`O!DZY```=C-[\``Q^(+Z`9Q!(>0```PI(>``480`0PE!/#&T! -M"/_B9Q!(>0```Q=(>``480`0JE!/>`!"K?^\+'D```$0($1P_W+_3J[_N"@` -M9P92K?^\8.9(;?_42&W_V$AM_]QA``4DWOP`#&$`!MQA``@680`(3B`M_^0& -M@```'_\"0.``*T#_S$*M_\@@.0```2PB`-*!TH#E@2`M_[SI@-"M_[SE@"!M -M_\S1[?_HT>W_[$'P"`!)\!@(2KD```(09WI*K?_P9W1(>``!(&W_Y-'M_^C1 -M[?_P+P@O!D7Y```=7$Z2WOP`#$J`;RQ(>``$2&W_T"\&3KD``!V,WOP`#'X$ -MOH!F$D*G2'@`("\&3I+>_``,2H!L$$AY```#)DAX`!1A``^X4$\@+?_05H!^ -M_,"'($#1[?_P2?2(!$'Y```1Z)'\```1&-#\`0!(<,@`3KD``!UH6$\K0/_` -M2KD```(@9UIT`+2Y```!+&1`1?D```$P=@`@`M"`T(+E@#9R"`HO"S8R"`@O -M`R\R"`0O,@@`4H(O`DAY```#.$ZY```=@-[\`!BTN0```2QER"\,2'D```-W -M3KD``!V`4$]*K?_`9A0O#$AY```#B$AX`!1A``\*WOP`#"\M_^0O+?_`+P9% -M^0``'8Q.DM[\``RPK?_D9AXO+?_H+BW_P"9M_\Q(0```YI(>``480`.OE!/2KD```'T9Q`&K0!```#_W`:M_\```/_82KD` -M``'\9Q0F>0```?RW[?_88@@K>0```?S_V`@%``!G#DAY```#QDZY```=@%A/ -M("W_U$)`2$#H2"\`+RW_W"(M_]@"@0`/__]P34J!9P)P2R\`2H%G"B`M_]A^ -M"NZH8`H@+?_80D!(0.A(+P!(>0```]%.N0``'8#>_``4)BW_P-:M__15@R9# -M#%,`"6,@)D,,4TYS9QA"@#`3+P!(>0```_I(>``480`-^-[\``PF0PQ3``-C -M1$AY```$%D7Y```=@$Z2+KP```1,3I(NO```!(%.DBZ\```$MTZ2+KP```3K -M3I(NO```!!9.DBZ\`TZY```=L%A/"#D``BMF$$AY```%%4AX`!1A -M``V04$](>``"3KD``!VP+JW_["0M_\#4K?_,+@+>K?_H+P=.N0``&R!03]2M -M_^@L0MWM_^PF0PQ33G-G8@Q3``%C7$JY```"$&=42JW_\&=.+.W_\"\M__`O -M#B\&1?D``!V,3I+>_``,W>W_\"\M_]`O#B\&3I+>_``,("W_T%:`?OS`A]W` -M(&W_S-'M_^C1[?_LT>W_\$'P"`0K2/_(+.W_O"1.+'D```$0($1P_W+_3J[_ -MN"@`9QA(>`!$+PHO!-3\`$1.N0``&Q3>_``,8-0CR@```@Q-^0```2PDEG`` -ML)9D)B(\```!,)7*(DK3^0```@Q824'R&``BV"+8(I#4_``,4H"PEF7B)D,, -M4P`"8V1*N0```C!F7"0M_\#4C`:"```!`"`\```1&"X\```1Z)Z`+P0``!2=.N0``'8!0 -M3RZ\`DZY```=L&`^N>W_U&4D+RW_U"\,2'D```543KD``!V`4$\NO``` -M!7Y(>``480`+]%!/?@$CQP```C!(>0``!:).N0``'8!83TJY```"(&<(0J=. -MN0``&RPL>0```A23R4ZN_R)*N0
CVS commit: src/sys/arch/amiga/stand/loadbsd
Module Name:src Committed By: phx Date: Wed Nov 11 16:08:52 UTC 2015 Modified Files: src/sys/arch/amiga/stand/loadbsd: Makefile README Log Message: Build instructions and Makefile for loadbsd 3.0. Submitted by Gunther Nikl. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amiga/stand/loadbsd/Makefile \ src/sys/arch/amiga/stand/loadbsd/README 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/amiga/stand/loadbsd/Makefile diff -u src/sys/arch/amiga/stand/loadbsd/Makefile:1.2 src/sys/arch/amiga/stand/loadbsd/Makefile:1.3 --- src/sys/arch/amiga/stand/loadbsd/Makefile:1.2 Mon Jan 5 20:51:30 1998 +++ src/sys/arch/amiga/stand/loadbsd/Makefile Wed Nov 11 16:08:52 2015 @@ -1,13 +1,13 @@ -# $NetBSD: Makefile,v 1.2 1998/01/05 20:51:30 perry Exp $ +# $NetBSD: Makefile,v 1.3 2015/11/11 16:08:52 phx Exp $ # -CC = gcc -CFLAGS = -m68030 -O2 -D__progname=program_name -noixemul +TARGET = loadbsd -OBJS = loadbsd.o getopt.o -LIBS = -lamiga +CC = gcc +CFLAGS = -D_STANDALONE -I./include -O -fomit-frame-pointer -msmall-code +LDFLAGS = -noixemul +LDLIBS = -loadbsd: $(OBJS) - $(CC) $(CFLAGS) $(LDFLAGS) -o loadbsd $(OBJS) $(LIBS) +OBJS = loadbsd.o loadfile.o loadfile_aout.o loadfile_elf32.o getopt.o -clean: - delete $(OBJS) loadbsd +$(TARGET): $(OBJS) + $(CC) $(LDFLAGS) -o $@ $(OBJS) $(LDLIBS) Index: src/sys/arch/amiga/stand/loadbsd/README diff -u src/sys/arch/amiga/stand/loadbsd/README:1.2 src/sys/arch/amiga/stand/loadbsd/README:1.3 --- src/sys/arch/amiga/stand/loadbsd/README:1.2 Mon Jan 5 20:51:31 1998 +++ src/sys/arch/amiga/stand/loadbsd/README Wed Nov 11 16:08:52 2015 @@ -1,22 +1,167 @@ -# $NetBSD: README,v 1.2 1998/01/05 20:51:31 perry Exp $ +# $NetBSD: README,v 1.3 2015/11/11 16:08:52 phx Exp $ -This was prepared to compile with gcc 2.7.0 for AmigaOS and -libnix 1.0. You don't need ixemul or special directories to run the -binary, if compiled that way. +BUILD INSTRUCTIONS -With very old versions of gcc, you might need to add +2-. to relative -offsets in the assembler part, but honestly, I suggest you upgrade your -assembler (and compiler) instead, even if you know what I'm talking about -and how to identify the lines. - -You'll need the (unchanged) getopt.c from src/lib/libc/stdlib, too. - -With newer libnix or the ADE version of gcc, or when removing the --noixemul option from CFLAGS, you might need (or want) to delete the -sleep() function at the bottom of loadbsd, or getopt.o from the -"OBJS =" line of Makefile. - -[Sorry, but I didn't dare to risk my gcc installation a few weeks - before the release by trying to install ADE] - - Ignatios Souvatzis +Building LoadBSD isn't easy since several sources from the NetBSD repository +are required. Compiling these sources under AmigaOS without clashes with the +native GCC headers requires some knowledge. This document tries to describe +the steps necessary to rebuild LoadBSD with an AmigaOS gcc. These instructions +do only apply for LoadBSD versions using the loadfile() interface. Previous +version do only require getopt.c and reboot.h. + +Note: Its not possible to build LoadBSD with the native NetBSD compiler! + LoadBSD is an *AmigaOS* program and must be built with an AmigaOS + compiler. Of course, a properly setup cross-compiler does work. + +Required sources from NetBSD (either HEAD or from a release branch) + + From src/sys/lib/libsa: loadfile.h,loadfile.c,loadfile_elf32.c,loadfile_aout.c + From src/lib/libc/stdlib: getopt.c + + place these files in the directory where you have loadbsd.c + + From src/sys/arch/m68k/include: aout_machdep.h,elf_machdep.h + + place these files in: /include/m68k + + From src/sys/arch/amiga/include: aout_machdep.h,elf_machdep.h,loadfile_machdep.h + + place these files in: /include/machine + + From src/sys/sys: exec.h,exec_elf.h,exec_aout.h,reboot.h + + place these files in: /include/sys + + Additional headers (see below): inttypes.h,namespace.h,lib/libsa/stand.h,lib/libkern/libkern.h + + place these files in: /include + +If all the mentioned files are placed at the correct place, loadfile_machdep.h +must be modfied. The patch is included below. Another small patch to +loadfile_aout.c must be applied to fix an incompatibility for LoadBSD. +However, that patch breaks loadfile() for other architectures using a.out! +Note: This patch is required to be able to suppress loaded symbols when + booting ancient a.out kernels that don't support them. Without the + patch symbol suppressing doesn't work! That also means ELF isn't + affected and LoadBSD could handle it differently but then it could + probably break in other unpredictable ways... + +Then it should be possible to recompile LoadBSD by typing "make". If make +fails, fix the problem and try again :-P + +Good luck! + +--- Missing files/patches --- + + loadfile_a
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: phx Date: Sat Nov 7 14:29:10 UTC 2015 Modified Files: src/sys/arch/amiga/dev: grf.c grf_cv.c grf_cv3d.c grfvar.h Removed Files: src/sys/arch/amiga/dev: grfws.h Log Message: Improved wscons support. Virtual screens are now working. To generate a diff of this commit: cvs rdiff -u -r1.62 -r1.63 src/sys/arch/amiga/dev/grf.c cvs rdiff -u -r1.56 -r1.57 src/sys/arch/amiga/dev/grf_cv.c cvs rdiff -u -r1.30 -r1.31 src/sys/arch/amiga/dev/grf_cv3d.c cvs rdiff -u -r1.24 -r1.25 src/sys/arch/amiga/dev/grfvar.h cvs rdiff -u -r1.1 -r0 src/sys/arch/amiga/dev/grfws.h 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/amiga/dev/grf.c diff -u src/sys/arch/amiga/dev/grf.c:1.62 src/sys/arch/amiga/dev/grf.c:1.63 --- src/sys/arch/amiga/dev/grf.c:1.62 Fri Jul 25 08:10:31 2014 +++ src/sys/arch/amiga/dev/grf.c Sat Nov 7 14:29:10 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: grf.c,v 1.62 2014/07/25 08:10:31 dholland Exp $ */ +/* $NetBSD: grf.c,v 1.63 2015/11/07 14:29:10 phx Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.62 2014/07/25 08:10:31 dholland Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.63 2015/11/07 14:29:10 phx Exp $"); /* * Graphics display driver for the Amiga @@ -76,7 +76,6 @@ __KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.62 #include /* DEBUG */ #include #include -#include #include #include #include @@ -182,11 +181,11 @@ grfattach(device_t parent, device_t self grfsp[gp->g_unit] = gp; /* - * find our major device number + * find our major device number, make device */ maj = cdevsw_lookup_major(&grf_cdevsw); - gp->g_grfdev = makedev(maj, gp->g_unit); + if (self != NULL) { printf(": width %d height %d", gp->g_display.gd_dwidth, gp->g_display.gd_dheight); @@ -194,23 +193,25 @@ grfattach(device_t parent, device_t self printf(" monochrome\n"); else printf(" colors %d\n", gp->g_display.gd_colors); + #if NWSDISPLAY > 0 - vcons_init(&gp->g_vd, gp, gp->g_screens[0], gp->g_accessops); + vcons_init(&gp->g_vd, gp, gp->g_defaultscr, gp->g_accessops); gp->g_vd.init_screen = grf_init_screen; + if (gp->g_flags & GF_CONSOLE) { console_vcons.scr_flags |= VCONS_SCREEN_IS_STATIC; vcons_init_screen(&gp->g_vd, &console_vcons, 1, &defattr); - gp->g_screens[0]->textops = + gp->g_defaultscr->textops = &console_vcons.scr_ri.ri_ops; - wsdisplay_cnattach(gp->g_screens[0], + wsdisplay_cnattach(gp->g_defaultscr, &console_vcons.scr_ri, 0, 0, defattr); vcons_replay_msgbuf(&console_vcons); } /* attach wsdisplay */ wa.console = (gp->g_flags & GF_CONSOLE) != 0; - wa.scrdata = &gp->g_screenlist; + wa.scrdata = gp->g_scrlist; wa.accessops = gp->g_accessops; wa.accesscookie = &gp->g_vd; config_found(self, &wa, wsemuldisplaydevprint); @@ -477,16 +478,17 @@ grfcninit(struct consdev *cd) gp = grfsp[unit]; if (gp != NULL && (gp->g_flags & GF_ALIVE)) { gp->g_flags |= GF_CONSOLE; /* we are console! */ - gp->g_screens[0]->ncols = gp->g_display.gd_fbwidth / - gp->g_screens[0]->fontwidth; - gp->g_screens[0]->nrows = gp->g_display.gd_fbheight / - gp->g_screens[0]->fontheight; + + gp->g_defaultscr->ncols = gp->g_display.gd_fbwidth / + gp->g_defaultscr->fontwidth; + gp->g_defaultscr->nrows = gp->g_display.gd_fbheight / + gp->g_defaultscr->fontheight; ri = grf_setup_rasops(gp, &console_vcons); console_vcons.scr_cookie = gp; defattr = 0; /* XXX */ - wsdisplay_preattach(gp->g_screens[0], ri, 0, 0, + wsdisplay_preattach(gp->g_defaultscr, ri, 0, 0, defattr); #if NKBD > 0 /* tell kbd device it is used as console keyboard */ @@ -519,8 +521,8 @@ grf_setup_rasops(struct grf_softc *gp, s scr->scr_flags |= VCONS_DONT_READ; memset(ri, 0, sizeof(struct rasops_info)); - ri->ri_rows = gp->g_screens[0]->nrows; - ri->ri_cols = gp->g_screens[0]->ncols; + ri->ri_rows = gp->g_defaultscr->nrows; + ri->ri_cols = gp->g_defaultscr->ncols; ri->ri_hw = scr; ri->ri_ops.cursor= gp->g_emulops->cursor; ri->ri_ops.mapchar = gp->g_emulops->mapchar; @@ -538,6 +540,66 @@ grf_setup_rasops(struct grf_softc *gp, s return ri; } +/* + * Called as fallback for ioctls which are not handled by the specific + * grf driver. + */ +int +grf_wsioctl(void *v, void *vs, u_long cmd, void *data, int flag, struct lwp *l) +{ + struct wsdisplayio_fbinfo *iofbi; + struct wsdisplay_fbinfo *fbinfo; + struct vcons_data *vd; + struct grf_softc *gp; + struct vcons_screen *scr; + struct grfinfo *gi; + + vd = v; + gp = vd->cookie; + scr = vd->active; + + switch (cmd) { + case WSDISPLAYIO_GET_FBINFO: + if (scr != NULL) { + iofbi = data; + return wsdisplayio_get_fbinfo(&scr->scr_ri, iofbi); + } + return ENODEV; + + case WSDISPLAYIO_GINFO: + if (scr != NULL) { + fbi
CVS commit: src
Module Name:src Committed By: phx Date: Wed Nov 4 17:06:23 UTC 2015 Modified Files: src/distrib/sets/lists/xdebug: md.amiga src/distrib/sets/lists/xserver: md.amiga src/external/mit/xorg/server/drivers: Makefile src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos: Makefile src/share/mk: bsd.own.mk Log Message: Build a wsfb Xorg server for amiga. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/distrib/sets/lists/xdebug/md.amiga cvs rdiff -u -r1.21 -r1.22 src/distrib/sets/lists/xserver/md.amiga cvs rdiff -u -r1.72 -r1.73 src/external/mit/xorg/server/drivers/Makefile cvs rdiff -u -r1.39 -r1.40 \ src/external/mit/xorg/server/xorg-server/hw/xfree86/xorgos/Makefile cvs rdiff -u -r1.877 -r1.878 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/xdebug/md.amiga diff -u src/distrib/sets/lists/xdebug/md.amiga:1.2 src/distrib/sets/lists/xdebug/md.amiga:1.3 --- src/distrib/sets/lists/xdebug/md.amiga:1.2 Mon Aug 10 19:23:32 2015 +++ src/distrib/sets/lists/xdebug/md.amiga Wed Nov 4 17:06:23 2015 @@ -1,3 +1,23 @@ -# $NetBSD: md.amiga,v 1.2 2015/08/10 19:23:32 mlelstv Exp $ +# $NetBSD: md.amiga,v 1.3 2015/11/04 17:06:23 phx Exp $ ./usr/libdata/debug/usr/X11R6/bin/Xamiga.debug -unknown- x11,debug ./usr/libdata/debug/usr/X11R6/bin/Xvfb.debug -unknown- x11,debug +./usr/libdata/debug/usr/X11R7/bin/Xorg.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/bin/cvt.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/bin/gtf.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/drivers/kbd_drv.so.1.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/drivers/mouse_drv.so.1.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/drivers/ws_drv.so.1.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/drivers/wsfb_drv.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libdbe.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libdri.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libdri2.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libextmod.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libglx.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/extensions/librecord.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/extensions/libshadow.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/libexa.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/libfb.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/libshadowfb.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/libvbe.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/libvgahw.so.0.debug -unknown- debug,xorg +./usr/libdata/debug/usr/X11R7/lib/modules/libxaa.so.0.debug -unknown- debug,xorg Index: src/distrib/sets/lists/xserver/md.amiga diff -u src/distrib/sets/lists/xserver/md.amiga:1.21 src/distrib/sets/lists/xserver/md.amiga:1.22 --- src/distrib/sets/lists/xserver/md.amiga:1.21 Mon Feb 9 16:28:54 2009 +++ src/distrib/sets/lists/xserver/md.amiga Wed Nov 4 17:06:23 2015 @@ -1,4 +1,4 @@ -# $NetBSD: md.amiga,v 1.21 2009/02/09 16:28:54 abs Exp $ +# $NetBSD: md.amiga,v 1.22 2015/11/04 17:06:23 phx Exp $ ./usr/X11R6/bin/X -unknown- x11 ./usr/X11R6/bin/Xamiga -unknown- x11 ./usr/X11R6/lib/modules/libafb.a -obsolete- obsolete @@ -8,3 +8,104 @@ ./usr/X11R6/man/html1/Xamiga24.html -unknown- html,x11 ./usr/X11R6/man/man1/Xamiga.1-unknown- .man,x11 ./usr/X11R6/man/man1/Xamiga24.1-unknown- .man,x11 +./usr/X11R7/bin/X -unknown- xorg +./usr/X11R7/bin/Xorg -unknown- xorg +./usr/X11R7/bin/cvt -unknown- xorg +./usr/X11R7/bin/gtf -unknown- xorg +./usr/X11R7/lib/X11/doc/README.modes -unknown- xorg +./usr/X11R7/lib/modules/drivers/kbd_drv.so -unknown- xorg +./usr/X11R7/lib/modules/drivers/kbd_drv.so.1 -unknown- xorg +./usr/X11R7/lib/modules/drivers/mouse_drv.so -unknown- xorg +./usr/X11R7/lib/modules/drivers/mouse_drv.so.1 -unknown- xorg +./usr/X11R7/lib/modules/drivers/ws_drv.so -unknown- xorg +./usr/X11R7/lib/modules/drivers/ws_drv.so.1 -unknown- xorg +./usr/X11R7/lib/modules/drivers/wsfb_drv.so -unknown- xorg +./usr/X11R7/lib/modules/drivers/wsfb_drv.so.0 -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdbe.a -unknown- xorg,obsolete +./usr/X11R7/lib/modules/extensions/libdbe.so -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdbe.so.0 -unknown- xorg +./usr/X11R7/lib/modules/extensions/libdbe_pic.a -unknown- xorg,picinstall,obsolete +./usr/X11R7/lib/modules/extensions/libdri.a -unknown- xo
CVS commit: src/etc
Module Name:src Committed By: phx Date: Sat Oct 31 12:31:37 UTC 2015 Modified Files: src/etc: rc.subr Log Message: PR misc/50046 Remove the expensive tests in _have_rc_postprocessor(), as proposed by apb@. It more than halves the multiuser boot time on slow machines and brings it back near to the previous level. To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/etc/rc.subr Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/rc.subr diff -u src/etc/rc.subr:1.96 src/etc/rc.subr:1.97 --- src/etc/rc.subr:1.96 Tue Oct 7 19:09:45 2014 +++ src/etc/rc.subr Sat Oct 31 12:31:37 2015 @@ -1,4 +1,4 @@ -# $NetBSD: rc.subr,v 1.96 2014/10/07 19:09:45 roy Exp $ +# $NetBSD: rc.subr,v 1.97 2015/10/31 12:31:37 phx Exp $ # # Copyright (c) 1997-2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -814,19 +814,9 @@ $command $rc_flags $command_args" _have_rc_postprocessor() { # Cheap tests that fd and pid are set, fd is writable. - [ -n "${_rc_postprocessor_fd}" ] || return 1 - [ -n "${_rc_pid}" ] || return 1 - eval ": >&${_rc_postprocessor_fd}" 2>/dev/null || return 1 - - # More expensive test that pid is running. - # Unset _rc_pid if this fails. - kill -0 "${_rc_pid}" 2>/dev/null \ - || { unset _rc_pid; return 1; } - - # More expensive test that pid appears to be - # a shell running an rc script. - # Unset _rc_pid if this fails. - expr "$(ps -p "${_rc_pid}" -o command=)" : ".*sh .*/rc.*" >/dev/null \ + [ -n "${_rc_pid}" ] || { unset _rc_pid; return 1; } + [ -n "${_rc_postprocessor_fd}" ] || { unset _rc_pid; return 1; } + eval ": >&${_rc_postprocessor_fd}" 2>/dev/null \ || { unset _rc_pid; return 1; } return 0
CVS commit: src/sys
Module Name:src Committed By: phx Date: Fri Oct 30 12:19:08 UTC 2015 Modified Files: src/sys/arch/amiga/dev: if_bah_zbus.c src/sys/dev/ic: smc90cx6.c Log Message: Fixed format string types to make it compile with BAH_DEBUG again. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/amiga/dev/if_bah_zbus.c cvs rdiff -u -r1.64 -r1.65 src/sys/dev/ic/smc90cx6.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/amiga/dev/if_bah_zbus.c diff -u src/sys/arch/amiga/dev/if_bah_zbus.c:1.15 src/sys/arch/amiga/dev/if_bah_zbus.c:1.16 --- src/sys/arch/amiga/dev/if_bah_zbus.c:1.15 Sat Oct 27 17:17:29 2012 +++ src/sys/arch/amiga/dev/if_bah_zbus.c Fri Oct 30 12:19:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_bah_zbus.c,v 1.15 2012/10/27 17:17:29 chs Exp $ */ +/* $NetBSD: if_bah_zbus.c,v 1.16 2015/10/30 12:19:08 phx Exp $ */ /*- * Copyright (c) 1994, 1995, 1998 The NetBSD Foundation, Inc. @@ -34,7 +34,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: if_bah_zbus.c,v 1.15 2012/10/27 17:17:29 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_bah_zbus.c,v 1.16 2015/10/30 12:19:08 phx Exp $"); /* * Driver frontend for the Commodore Busines Machines and the @@ -101,7 +101,7 @@ bah_zbus_attach(device_t parent, device_ sc->sc_dev = self; #if (defined(BAH_DEBUG) && (BAH_DEBUG > 2)) - printf("\n%s: attach(0x%x, 0x%x, 0x%x)\n", + printf("\n%s: attach(0x%p, 0x%p, 0x%p)\n", device_xname(self), parent, self, aux); #endif bsc->sc_bst.base = (bus_addr_t)zap->va; Index: src/sys/dev/ic/smc90cx6.c diff -u src/sys/dev/ic/smc90cx6.c:1.64 src/sys/dev/ic/smc90cx6.c:1.65 --- src/sys/dev/ic/smc90cx6.c:1.64 Sat Oct 27 17:18:22 2012 +++ src/sys/dev/ic/smc90cx6.c Fri Oct 30 12:19:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: smc90cx6.c,v 1.64 2012/10/27 17:18:22 chs Exp $ */ +/* $NetBSD: smc90cx6.c,v 1.65 2015/10/30 12:19:08 phx Exp $ */ /*- * Copyright (c) 1994, 1995, 1998 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: smc90cx6.c,v 1.64 2012/10/27 17:18:22 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smc90cx6.c,v 1.65 2015/10/30 12:19:08 phx Exp $"); /* #define BAHSOFTCOPY */ #define BAHRETRANSMIT /**/ @@ -152,10 +152,6 @@ bah_attach_subr(struct bah_softc *sc) bus_space_handle_t regs = sc->sc_regs; bus_space_handle_t mem = sc->sc_mem; -#if (defined(BAH_DEBUG) && (BAH_DEBUG > 2)) - printf("\n%s: attach(0x%x, 0x%x, 0x%x)\n", - device_xname(sc->sc_dev), parent, self, aux); -#endif s = splhigh(); /* @@ -265,7 +261,7 @@ bah_reset(struct bah_softc *sc) linkaddress = GETMEM(BAHMACOFF); #if defined(BAH_DEBUG) && (BAH_DEBUG > 2) - printf("%s: reset: card reset, link addr = 0x%02x (%ld)\n", + printf("%s: reset: card reset, link addr = 0x%02x (%u)\n", device_xname(sc->sc_dev), linkaddress, linkaddress); #endif @@ -393,7 +389,7 @@ bah_start(struct ifnet *ifp) #ifdef BAH_DEBUG if (m->m_len < ARC_HDRLEN) m = m_pullup(m, ARC_HDRLEN);/* gcc does structure padding */ - printf("%s: start: filling %ld from %ld to %ld type %ld\n", + printf("%s: start: filling %d from %u to %u type %u\n", device_xname(sc->sc_dev), buffer, mtod(m, u_char *)[0], mtod(m, u_char *)[1], mtod(m, u_char *)[2]); #else @@ -627,7 +623,7 @@ cleanup: PUTREG(BAHSTAT, sc->sc_intmask); #ifdef BAH_DEBUG - printf("%s: srint: restarted rx on buf %ld\n", + printf("%s: srint: restarted rx on buf %d\n", device_xname(sc->sc_dev), buffer); #endif } @@ -797,7 +793,7 @@ bahintr(void *arg) if (maskedisr & BAH_RI) { #if defined(BAH_DEBUG) && (BAH_DEBUG > 1) - printf("%s: intr: hard rint, act %ld\n", + printf("%s: intr: hard rint, act %d\n", device_xname(sc->sc_dev), sc->sc_rx_act); #endif @@ -833,7 +829,7 @@ bahintr(void *arg) /* in RX intr, so mask is ok for RX */ #ifdef BAH_DEBUG - printf("%s: strt rx for buf %ld, " + printf("%s: strt rx for buf %u, " "stat 0x%02x\n", device_xname(sc->sc_dev), sc->sc_rx_act, GETREG(BAHSTAT)); @@ -895,7 +891,7 @@ bah_ioctl(struct ifnet *ifp, u_long cmd, s = splnet(); #if defined(BAH_DEBUG) && (BAH_DEBUG > 2) - printf("%s: ioctl() called, cmd = 0x%x\n", + printf("%s: ioctl() called, cmd = 0x%lx\n", device_xname(sc->sc_dev), cmd); #endif
CVS commit: src/sys/arch/amiga/pci
Module Name:src Committed By: phx Date: Fri Oct 30 12:14:33 UTC 2015 Modified Files: src/sys/arch/amiga/pci: p5pb.c Log Message: Include genfb.h for NGENFB. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/amiga/pci/p5pb.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/amiga/pci/p5pb.c diff -u src/sys/arch/amiga/pci/p5pb.c:1.14 src/sys/arch/amiga/pci/p5pb.c:1.15 --- src/sys/arch/amiga/pci/p5pb.c:1.14 Fri Oct 2 05:22:49 2015 +++ src/sys/arch/amiga/pci/p5pb.c Fri Oct 30 12:14:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: p5pb.c,v 1.14 2015/10/02 05:22:49 msaitoh Exp $ */ +/* $NetBSD: p5pb.c,v 1.15 2015/10/30 12:14:32 phx Exp $ */ /*- * Copyright (c) 2011, 2012 The NetBSD Foundation, Inc. @@ -61,6 +61,7 @@ #include "opt_p5pb.h" #include "opt_pci.h" +#include "genfb.h" /* Initial CVPPC/BVPPC resolution as configured by the firmware */ #define P5GFX_WIDTH 640 @@ -692,7 +693,7 @@ p5pb_device_register(device_t dev, void prop_dictionary_set_uint32(dict, "depth", P5GFX_DEPTH); -#if (NGENFB > 0) +#if NGENFB > 0 prop_dictionary_set_uint32(dict, "linebytes", P5GFX_LINEBYTES);
CVS commit: src/sys/arch/amiga/include
Module Name:src Committed By: phx Date: Wed Sep 30 20:36:28 UTC 2015 Modified Files: src/sys/arch/amiga/include: vmparam.h Log Message: Reduce MAXDSIZ from 416MB back to 224MB. Due to limitations by the current pmap implementation our virtual address space is limited to 512MB. A MAXDSIZ of 416MB would leave only a little bit more than 30MB for shared objects and heap allocations, so 224MB seems like a good compromise. To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/amiga/include/vmparam.h 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/amiga/include/vmparam.h diff -u src/sys/arch/amiga/include/vmparam.h:1.45 src/sys/arch/amiga/include/vmparam.h:1.46 --- src/sys/arch/amiga/include/vmparam.h:1.45 Fri Jun 19 14:55:51 2015 +++ src/sys/arch/amiga/include/vmparam.h Wed Sep 30 20:36:28 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.45 2015/06/19 14:55:51 mlelstv Exp $ */ +/* $NetBSD: vmparam.h,v 1.46 2015/09/30 20:36:28 phx Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -74,7 +74,7 @@ #define DFLDSIZ (64*1024*1024) /* initial data size limit */ #endif #ifndef MAXDSIZ -#define MAXDSIZ (416*1024*1024) /* max data size */ +#define MAXDSIZ (224*1024*1024) /* max data size */ #endif #ifndef DFLSSIZ #define DFLSSIZ (2*1024*1024) /* initial stack size limit */
CVS commit: src/sys/arch/sandpoint/conf
Module Name:src Committed By: phx Date: Wed Sep 30 14:22:02 UTC 2015 Modified Files: src/sys/arch/sandpoint/conf: GENERIC Log Message: Disable CFI in the GENERIC kernel again, as currently only cmdset 1.3 is supported, which is not present in all flash chips. Add lmtemp(4), an LM75 temperature sensor, which is found in some Synology NAS models. To generate a diff of this commit: cvs rdiff -u -r1.90 -r1.91 src/sys/arch/sandpoint/conf/GENERIC 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/sandpoint/conf/GENERIC diff -u src/sys/arch/sandpoint/conf/GENERIC:1.90 src/sys/arch/sandpoint/conf/GENERIC:1.91 --- src/sys/arch/sandpoint/conf/GENERIC:1.90 Mon Sep 21 23:31:41 2015 +++ src/sys/arch/sandpoint/conf/GENERIC Wed Sep 30 14:22:02 2015 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.90 2015/09/21 23:31:41 phx Exp $ +# $NetBSD: GENERIC,v 1.91 2015/09/30 14:22:02 phx Exp $ # # machine description file for GENERIC NAS # @@ -22,7 +22,7 @@ include "arch/sandpoint/conf/std.sandpo options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.90 $" +#ident "GENERIC-$Revision: 1.91 $" maxusers 32 @@ -173,9 +173,9 @@ config netbsd root on ? type ? mainbus0 at root cpu* at mainbus0 -cfi0 at mainbus0 -nor* at cfi? -flash* at nor? +#cfi0 at mainbus0 +#nor* at cfi? +#flash* at nor? nhpow0 at mainbus0 # NH230/231 power,LED,buttons @@ -189,6 +189,7 @@ com0 at eumb? unit 0 # console at 0x4 satmgr0 at eumb? unit 1 # satmgr at 0x4600 ociic* at eumb? iic* at ociic? +lmtemp* at iic? addr 0x48 # LM75 temperature sensor rs5c372rtc* at iic? addr 0x32 s390rtc* at iic? addr 0x30 pcf8563rtc* at iic? addr 0x51
CVS commit: src/sys/arch/sandpoint/sandpoint
Module Name:src Committed By: phx Date: Wed Sep 30 14:18:54 UTC 2015 Modified Files: src/sys/arch/sandpoint/sandpoint: autoconf.c machdep.c Log Message: Now more than a single I2C device per model may be configured directly. An additional flags argument makes the configuration depend on the model- flags in an optional BTINFO_MODEL bootinfo node. Print the model name together with the vendor name, when known. To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sys/arch/sandpoint/sandpoint/autoconf.c cvs rdiff -u -r1.64 -r1.65 src/sys/arch/sandpoint/sandpoint/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/sandpoint/sandpoint/autoconf.c diff -u src/sys/arch/sandpoint/sandpoint/autoconf.c:1.27 src/sys/arch/sandpoint/sandpoint/autoconf.c:1.28 --- src/sys/arch/sandpoint/sandpoint/autoconf.c:1.27 Sun Jul 29 18:05:45 2012 +++ src/sys/arch/sandpoint/sandpoint/autoconf.c Wed Sep 30 14:18:54 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.27 2012/07/29 18:05:45 mlelstv Exp $ */ +/* $NetBSD: autoconf.c,v 1.28 2015/09/30 14:18:54 phx Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.27 2012/07/29 18:05:45 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.28 2015/09/30 14:18:54 phx Exp $"); #include #include @@ -55,21 +55,30 @@ static struct btinfo_rootdevice *bi_rdev static struct btinfo_bootpath *bi_path; static struct btinfo_net *bi_net; static struct btinfo_prodfamily *bi_pfam; +static struct btinfo_model *bi_model; -struct i2cdev { - const char *family; - const char *name; - int addr; +struct i2c_dev { + const char *name; + unsigned addr; + /* only attach when one of these bits in the model flags is set */ + uint32_t model_mask; }; -static struct i2cdev rtcmodel[] = { -{ "dlink","strtc", 0x68 }, -{ "iomega", "dsrtc", 0x68 }, -{ "kurobox", "rs5c372rtc", 0x32 }, -{ "kurot4", "rs5c372rtc", 0x32 }, -{ "nhnas","pcf8563rtc", 0x51 }, -{ "qnap", "s390rtc",0x30 }, -{ "synology", "rs5c372rtc", 0x32 }, +#define MAXI2CDEVS 4 +struct model_i2c { + const char *family; + struct i2c_dev i2c_devs[MAXI2CDEVS]; +}; + +static struct model_i2c model_i2c_list[] = { + { "dlink", { { "strtc", 0x68, 0 } } }, + { "iomega", { { "dsrtc", 0x68, 0 } } }, + { "kurobox", { { "rs5c372rtc", 0x32, 0 } } }, + { "kurot4", { { "rs5c372rtc", 0x32, 0 } } }, + { "nhnas", { { "pcf8563rtc", 0x51, 0 } } }, + { "qnap", { { "s390rtc",0x30, 0 } } }, + { "synology", { { "rs5c372rtc", 0x32, 0 }, +{ "lmtemp", 0x48, BI_MODEL_THERMAL } } }, }; static void add_i2c_child_devices(device_t, const char *); @@ -85,6 +94,7 @@ cpu_configure(void) bi_path = lookup_bootinfo(BTINFO_BOOTPATH); bi_net = lookup_bootinfo(BTINFO_NET); bi_pfam = lookup_bootinfo(BTINFO_PRODFAMILY); + bi_model = lookup_bootinfo(BTINFO_MODEL); if (config_rootfound("mainbus", NULL) == NULL) panic("configure: mainbus not configured"); @@ -167,27 +177,38 @@ device_register(device_t dev, void *aux) static void add_i2c_child_devices(device_t self, const char *family) { - struct i2cdev *rtc; + struct i2c_dev *model_i2c_devs; prop_dictionary_t pd; prop_array_t pa; int i; - rtc = NULL; - for (i = 0; i < (int)(sizeof(rtcmodel)/sizeof(rtcmodel[0])); i++) { - if (strcmp(family, rtcmodel[i].family) == 0) { - rtc = &rtcmodel[i]; + for (i = 0; + i < (int)(sizeof(model_i2c_list) / sizeof(model_i2c_list[0])); + i++) { + if (strcmp(family, model_i2c_list[i].family) == 0) { + model_i2c_devs = model_i2c_list[i].i2c_devs; goto found; } } return; found: - pd = prop_dictionary_create(); + /* make an i2c-child-devices property list with for direct config. */ pa = prop_array_create(); - prop_dictionary_set_cstring_nocopy(pd, "name", rtc->name); - prop_dictionary_set_uint32(pd, "addr", rtc->addr); - prop_array_add(pa, pd); + + for (i = 0; i < MAXI2CDEVS && model_i2c_devs[i].name != NULL; i++) { + if (model_i2c_devs[i].model_mask != 0 && + !(bi_model->flags & model_i2c_devs[i].model_mask)) + continue; + pd = prop_dictionary_create(); + prop_dictionary_set_cstring_nocopy(pd, "name", + model_i2c_devs[i].name); + prop_dictionary_set_uint32(pd, "addr", + model_i2c_devs[i].addr); + prop_array_add(pa, pd); + prop_object_release(pd); + } + prop_dictionary_set(device_properties(self), "i2c-child-devices", pa); - prop_object_release(pd); prop_object_release(pa); } Index: src/sys/arch/sandpoint/sandpoint/machdep.c diff -u src/sys/arch/sandpoint/sandpoint/machdep.c:1.64 src/sys/arch/sandpoint/sandpoint/machdep.c:1.65 --- src/sys/arch/sandpoint/sandpoint/machdep.c:1.64 Mon Sep 7 23:00:08 2015 +++ src/sys/arch/sandpoint/sandpoint/machdep.c Wed Sep 30 14:18:54 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: machd
CVS commit: src/sys/arch/sandpoint
Module Name:src Committed By: phx Date: Wed Sep 30 14:14:32 UTC 2015 Modified Files: src/sys/arch/sandpoint/include: bootinfo.h src/sys/arch/sandpoint/stand/altboot: brdsetup.c globals.h main.c siisata.c version Log Message: Pass a name and flags precisely describing the current model and its features via a new bootinfo node (currently Synology only). This allows for example the configuration of model-specific temperature I2C sensors and fan control. Support for the Synology DS207 and DS209 drive LEDs and wait until the 2nd drive is completely powered up. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/sandpoint/include/bootinfo.h cvs rdiff -u -r1.35 -r1.36 src/sys/arch/sandpoint/stand/altboot/brdsetup.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/sandpoint/stand/altboot/globals.h cvs rdiff -u -r1.26 -r1.27 src/sys/arch/sandpoint/stand/altboot/main.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sandpoint/stand/altboot/siisata.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/sandpoint/stand/altboot/version 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/sandpoint/include/bootinfo.h diff -u src/sys/arch/sandpoint/include/bootinfo.h:1.8 src/sys/arch/sandpoint/include/bootinfo.h:1.9 --- src/sys/arch/sandpoint/include/bootinfo.h:1.8 Tue Jan 11 06:57:35 2011 +++ src/sys/arch/sandpoint/include/bootinfo.h Wed Sep 30 14:14:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: bootinfo.h,v 1.8 2011/01/11 06:57:35 nisimura Exp $ */ +/* $NetBSD: bootinfo.h,v 1.9 2015/09/30 14:14:32 phx Exp $ */ /* * Copyright (c) 1997 @@ -45,6 +45,7 @@ struct btinfo_common { #define BTINFO_NET 7 #define BTINFO_PRODFAMILY 8 #define BTINFO_MODULELIST 9 +#define BTINFO_MODEL 10 struct btinfo_magic { struct btinfo_common common; @@ -91,6 +92,20 @@ struct btinfo_prodfamily { char name[24]; }; +struct btinfo_model { + struct btinfo_common common; + char name[28]; + unsigned flags; /* model specific flags */ +/* Synology flags: */ +#define BI_MODEL_CPLDVER_MASK 0x07 +#define BI_MODEL_CPLD207 0x08 +#define BI_MODEL_CPLD209 0x10 +#define BI_MODEL_CPLD406 0x18 +#define BI_MODEL_CPLD407 0x20 +#define BI_MODEL_CPLD_MASK 0x38 +#define BI_MODEL_THERMAL 0x40 +}; + struct btinfo_modulelist { struct btinfo_common common; int num; Index: src/sys/arch/sandpoint/stand/altboot/brdsetup.c diff -u src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.35 src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.36 --- src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.35 Fri Aug 8 21:18:10 2014 +++ src/sys/arch/sandpoint/stand/altboot/brdsetup.c Wed Sep 30 14:14:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: brdsetup.c,v 1.35 2014/08/08 21:18:10 joerg Exp $ */ +/* $NetBSD: brdsetup.c,v 1.36 2015/09/30 14:14:32 phx Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -111,7 +111,14 @@ static unsigned mpc107memsize(void); #define IOMEGA_PACKETSIZE 8 /* NH230/231 GPIO */ -#define NHGPIO_WRITE(x) *((uint8_t *)0x7000) = x +#define NHGPIO_WRITE(x) *((volatile uint8_t *)0x7000) = (x) + +/* Synology CPLD (2007 and newer models) */ +#define SYNOCPLD_READ(r) *((volatile uint8_t *)0xff00 + (r)) +#define SYNOCPLD_WRITE(r,x) do { \ +*((volatile uint8_t *)0xff00 + (r)) = (x); \ +delay(10); \ +} while(0) static struct brdprop brdlist[] = { { @@ -719,47 +726,183 @@ synobrdfix(struct brdprop *brd) send_sat("247"); } +#define SYNO_FAN_TIMEOUT 500 /* 500ms to turn the fan off */ +#define SYNO_DISK_DELAY 30 /* 30 seconds to power up 2nd disk */ + void synopcifix(struct brdprop *brd) { - static const char csmodel[4][7] = { - "CS406e", "CS406", "RS406", "CS407e" + static const char models207[4][7] = { + "???", "DS107e", "DS107", "DS207" + }; + static const char models209[2][7] = { + "DS109j", "DS209j" + }; + static const char models406[3][7] = { + "CS406e", "CS406", "RS406" }; - volatile uint8_t *cpld = (volatile uint8_t *)0xff00; - uint8_t pwrstate; + static const char models407[4][7] = { + "???", "CS407e", "CS407", "RS407" + }; + extern struct btinfo_model bi_model; + const char *model_name; + unsigned cpld, version, flags; + uint8_t v, status; + int i; + + /* + * Determine if a CPLD is present and whether is has 4-bit + * (models 107, 207, 209) or 8-bit (models 406, 407) registers. + * The register set repeats every 16 bytes. + */ + cpld = 0; + flags = 0; + version = 0; + model_name = NULL; + + SYNOCPLD_WRITE(0, 0x00); /* LEDs blinking yellow (default) */ + v = SYNOCPLD_READ(0); + + if (v != 0x00) { + v &= 0xf0; + if (v != 0x00 || (SYNOCPLD_READ(16 + 0) & 0xf0) != v) + goto cpld_done; + + cpld4bits: + /* 4-bit registers assumed, make LEDs solid yellow */ + SYNOCPLD_WRITE(0, 0x50); + v = SYNOCPLD_READ(0) & 0xf0; + if (v != 0x50 || (SYNOCPLD_READ(32 + 0) & 0xf0) != v) + goto cpld_done; + + v = SYNOCPLD_READ(2) & 0xf0; + if ((SYNOCPLD_READ(48
CVS commit: src/sys/arch/sandpoint/stand/altboot
Module Name:src Committed By: phx Date: Tue Sep 29 15:12:53 UTC 2015 Modified Files: src/sys/arch/sandpoint/stand/altboot: dsk.c globals.h Log Message: The disk's unittag is not equal to the channel, so we need an additional unitchan entry to make lba_read() work in all cases. The libsa-printf() does not seem to support 64-bit output, so cast the block number to unsigned when printing an error message. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sandpoint/stand/altboot/dsk.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/sandpoint/stand/altboot/globals.h 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/sandpoint/stand/altboot/dsk.c diff -u src/sys/arch/sandpoint/stand/altboot/dsk.c:1.17 src/sys/arch/sandpoint/stand/altboot/dsk.c:1.18 --- src/sys/arch/sandpoint/stand/altboot/dsk.c:1.17 Tue Aug 5 17:55:20 2014 +++ src/sys/arch/sandpoint/stand/altboot/dsk.c Tue Sep 29 15:12:52 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: dsk.c,v 1.17 2014/08/05 17:55:20 joerg Exp $ */ +/* $NetBSD: dsk.c,v 1.18 2015/09/29 15:12:52 phx Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -125,6 +125,7 @@ disk_scan(void *drv) } d = &ldisk[ndrive]; d->dvops = l; + d->unitchan = n; d->unittag = ndrive; snprintf(d->xname, sizeof(d->xname), "wd%d", d->unittag); set_xfermode(l, n); @@ -404,7 +405,7 @@ lba_read(struct disk *d, int64_t bno, in int error; l = d->dvops; - n = d->unittag; + n = d->unitchan; p = (uint16_t *)buf; chan = &l->chan[n]; error = 0; @@ -414,7 +415,8 @@ lba_read(struct disk *d, int64_t bno, in (*issue)(chan, bno, rdcnt); for (k = 0; k < rdcnt; k++) { if (spinwait_unbusy(l, n, 1000, &err) == 0) { -printf("%s blk %lld %s\n", d->xname, bno, err); +printf("%s blk %u %s\n", + d->xname, (unsigned)bno, err); error = EIO; break; } Index: src/sys/arch/sandpoint/stand/altboot/globals.h diff -u src/sys/arch/sandpoint/stand/altboot/globals.h:1.19 src/sys/arch/sandpoint/stand/altboot/globals.h:1.20 --- src/sys/arch/sandpoint/stand/altboot/globals.h:1.19 Thu Apr 26 19:59:37 2012 +++ src/sys/arch/sandpoint/stand/altboot/globals.h Tue Sep 29 15:12:52 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: globals.h,v 1.19 2012/04/26 19:59:37 phx Exp $ */ +/* $NetBSD: globals.h,v 1.20 2015/09/29 15:12:52 phx Exp $ */ #ifdef DEBUG #define DPRINTF(x) printf x @@ -172,6 +172,7 @@ NIF_DECL(stg); struct disk { char xname[8]; void *dvops; + unsigned unitchan; unsigned unittag; uint16_t ident[128]; uint64_t nsect;
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: phx Date: Sun Sep 27 13:02:21 UTC 2015 Modified Files: src/sys/dev/i2c: adm1021.c at24cxx.c lm75.c lm87.c Log Message: Direct config: Only match via the list of compatible hardware when we have such a list available (ia_ncompat > 0). Otherwise fall back to matching the device name with ia_name. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/dev/i2c/adm1021.c cvs rdiff -u -r1.19 -r1.20 src/sys/dev/i2c/at24cxx.c cvs rdiff -u -r1.25 -r1.26 src/sys/dev/i2c/lm75.c cvs rdiff -u -r1.4 -r1.5 src/sys/dev/i2c/lm87.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/dev/i2c/adm1021.c diff -u src/sys/dev/i2c/adm1021.c:1.8 src/sys/dev/i2c/adm1021.c:1.9 --- src/sys/dev/i2c/adm1021.c:1.8 Sat Oct 27 17:18:17 2012 +++ src/sys/dev/i2c/adm1021.c Sun Sep 27 13:02:21 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: adm1021.c,v 1.8 2012/10/27 17:18:17 chs Exp $ */ +/* $NetBSD: adm1021.c,v 1.9 2015/09/27 13:02:21 phx Exp $ */ /* $OpenBSD: adm1021.c,v 1.27 2007/06/24 05:34:35 dlg Exp $ */ /* @@ -18,7 +18,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: adm1021.c,v 1.8 2012/10/27 17:18:17 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: adm1021.c,v 1.9 2015/09/27 13:02:21 phx Exp $"); #include #include @@ -83,10 +83,15 @@ admtemp_match(device_t parent, cfdata_t } else { /* * Direct config - match via the list of compatible - * hardware. + * hardware or simply match the device name. */ - if (iic_compat_match(ia, admtemp_compats)) - return 1; + if (ia->ia_ncompat > 0) { + if (iic_compat_match(ia, admtemp_compats)) +return 1; + } else { + if (strcmp(ia->ia_name, "admtemp") == 0) +return 1; + } } return 0; Index: src/sys/dev/i2c/at24cxx.c diff -u src/sys/dev/i2c/at24cxx.c:1.19 src/sys/dev/i2c/at24cxx.c:1.20 --- src/sys/dev/i2c/at24cxx.c:1.19 Sun May 10 22:54:06 2015 +++ src/sys/dev/i2c/at24cxx.c Sun Sep 27 13:02:21 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: at24cxx.c,v 1.19 2015/05/10 22:54:06 jmcneill Exp $ */ +/* $NetBSD: at24cxx.c,v 1.20 2015/09/27 13:02:21 phx Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.19 2015/05/10 22:54:06 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: at24cxx.c,v 1.20 2015/09/27 13:02:21 phx Exp $"); #include #include @@ -122,8 +122,13 @@ seeprom_match(device_t parent, cfdata_t struct i2c_attach_args *ia = aux; if (ia->ia_name) { - if (iic_compat_match(ia, seeprom_compats)) - return (1); + if (ia->ia_ncompat > 0) { + if (iic_compat_match(ia, seeprom_compats)) +return (1); + } else { + if (strcmp(ia->ia_name, "seeprom") == 0) +return (1); + } } else { if ((ia->ia_addr & AT24CXX_ADDRMASK) == AT24CXX_ADDR) return (1); Index: src/sys/dev/i2c/lm75.c diff -u src/sys/dev/i2c/lm75.c:1.25 src/sys/dev/i2c/lm75.c:1.26 --- src/sys/dev/i2c/lm75.c:1.25 Sat Oct 27 17:18:17 2012 +++ src/sys/dev/i2c/lm75.c Sun Sep 27 13:02:21 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: lm75.c,v 1.25 2012/10/27 17:18:17 chs Exp $ */ +/* $NetBSD: lm75.c,v 1.26 2015/09/27 13:02:21 phx Exp $ */ /* * Copyright (c) 2003 Wasabi Systems, Inc. @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: lm75.c,v 1.25 2012/10/27 17:18:17 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lm75.c,v 1.26 2015/09/27 13:02:21 phx Exp $"); #include #include @@ -132,10 +132,15 @@ lmtemp_match(device_t parent, cfdata_t c } else { /* * Direct config - match via the list of compatible - * hardware. + * hardware or simply match the device name. */ - if (iic_compat_match(ia, lmtemp_compats)) - return 1; + if (ia->ia_ncompat > 0) { + if (iic_compat_match(ia, lmtemp_compats)) +return 1; + } else { + if (strcmp(ia->ia_name, "lmtemp") == 0) +return 1; + } } Index: src/sys/dev/i2c/lm87.c diff -u src/sys/dev/i2c/lm87.c:1.4 src/sys/dev/i2c/lm87.c:1.5 --- src/sys/dev/i2c/lm87.c:1.4 Mon Nov 4 15:06:26 2013 +++ src/sys/dev/i2c/lm87.c Sun Sep 27 13:02:21 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: lm87.c,v 1.4 2013/11/04 15:06:26 jdc Exp $ */ +/* $NetBSD: lm87.c,v 1.5 2015/09/27 13:02:21 phx Exp $ */ /* $OpenBSD: lm87.c,v 1.20 2008/11/10 05:19:48 cnst Exp $ */ /* @@ -18,7 +18,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: lm87.c,v 1.4 2013/11/04 15:06:26 jdc Exp $"); +__KERNEL_RCSID(0, "$NetBSD: lm87.c,v 1.5 2015/09/27 13:02:21 phx Exp $"); #include #include @@ -132,10 +132,15 @@ lmenv_match(device_t parent, cfdata_t ma } else { /* * Direct config - match via the list of compatible - * hardware. + * hardware or simply match the device name. */ - if (iic_compat_match(ia, lmenv_compats)) - return 1; + if (ia->ia_ncompat > 0) { + if (iic_compat_match(ia, lmenv_compats)) +return 1; + } else { + if (strcmp(ia->ia_name, "lmenv") == 0) +return 1; + } } return 0;
CVS commit: src/sys/arch/sandpoint/conf
Module Name:src Committed By: phx Date: Mon Sep 21 23:34:21 UTC 2015 Modified Files: src/sys/arch/sandpoint/conf: KUROBOX Log Message: Remove erroneously entered debug options. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sandpoint/conf/KUROBOX 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/sandpoint/conf/KUROBOX diff -u src/sys/arch/sandpoint/conf/KUROBOX:1.6 src/sys/arch/sandpoint/conf/KUROBOX:1.7 --- src/sys/arch/sandpoint/conf/KUROBOX:1.6 Mon Sep 21 23:31:41 2015 +++ src/sys/arch/sandpoint/conf/KUROBOX Mon Sep 21 23:34:21 2015 @@ -1,17 +1,10 @@ -# $NetBSD: KUROBOX,v 1.6 2015/09/21 23:31:41 phx Exp $ +# $NetBSD: KUROBOX,v 1.7 2015/09/21 23:34:21 phx Exp $ # # KuroBox/LinkStation support # include "arch/sandpoint/conf/GENERIC" -options DIAGNOSTIC # cheap kernel consistency checks -options DEBUG # expensive debugging checks/support -makeoptions DEBUG="-g" - -options NOR_DEBUG -options NOR_VERBOSE - no com0 no satmgr0 com0 at eumb? unit 1 # console at 0x4600
CVS commit: src/sys/arch/sandpoint/conf
Module Name:src Committed By: phx Date: Mon Sep 21 23:31:41 UTC 2015 Modified Files: src/sys/arch/sandpoint/conf: GENERIC KUROBOX Log Message: double vlan pseudo-device removed To generate a diff of this commit: cvs rdiff -u -r1.89 -r1.90 src/sys/arch/sandpoint/conf/GENERIC cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sandpoint/conf/KUROBOX 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/sandpoint/conf/GENERIC diff -u src/sys/arch/sandpoint/conf/GENERIC:1.89 src/sys/arch/sandpoint/conf/GENERIC:1.90 --- src/sys/arch/sandpoint/conf/GENERIC:1.89 Mon Sep 7 23:01:08 2015 +++ src/sys/arch/sandpoint/conf/GENERIC Mon Sep 21 23:31:41 2015 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.89 2015/09/07 23:01:08 phx Exp $ +# $NetBSD: GENERIC,v 1.90 2015/09/21 23:31:41 phx Exp $ # # machine description file for GENERIC NAS # @@ -22,7 +22,7 @@ include "arch/sandpoint/conf/std.sandpo options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.89 $" +#ident "GENERIC-$Revision: 1.90 $" maxusers 32 @@ -323,7 +323,6 @@ pseudo-device bpfilter # packet filter #pseudo-device pf # PF packet filter #pseudo-device pflog # PF log if #pseudo-device sl # Serial Line IP -#pseudo-device vlan # IEEE 802.1q encapsulation #pseudo-device tun # network tunneling over tty #pseudo-device tap # virtual Ethernet #pseudo-device gre # generic L3 over IP tunnel Index: src/sys/arch/sandpoint/conf/KUROBOX diff -u src/sys/arch/sandpoint/conf/KUROBOX:1.5 src/sys/arch/sandpoint/conf/KUROBOX:1.6 --- src/sys/arch/sandpoint/conf/KUROBOX:1.5 Sat May 12 10:27:17 2012 +++ src/sys/arch/sandpoint/conf/KUROBOX Mon Sep 21 23:31:41 2015 @@ -1,10 +1,17 @@ -# $NetBSD: KUROBOX,v 1.5 2012/05/12 10:27:17 nisimura Exp $ +# $NetBSD: KUROBOX,v 1.6 2015/09/21 23:31:41 phx Exp $ # # KuroBox/LinkStation support # include "arch/sandpoint/conf/GENERIC" +options DIAGNOSTIC # cheap kernel consistency checks +options DEBUG # expensive debugging checks/support +makeoptions DEBUG="-g" + +options NOR_DEBUG +options NOR_VERBOSE + no com0 no satmgr0 com0 at eumb? unit 1 # console at 0x4600
CVS commit: src/sys/dev/nor
Module Name:src Committed By: phx Date: Fri Sep 18 21:30:02 UTC 2015 Modified Files: src/sys/dev/nor: cfi.c Log Message: Size of erase block is 128 bytes when sector density (z) is zero. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/nor/cfi.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/dev/nor/cfi.c diff -u src/sys/dev/nor/cfi.c:1.7 src/sys/dev/nor/cfi.c:1.8 --- src/sys/dev/nor/cfi.c:1.7 Sat Dec 17 19:42:41 2011 +++ src/sys/dev/nor/cfi.c Fri Sep 18 21:30:02 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: cfi.c,v 1.7 2011/12/17 19:42:41 phx Exp $ */ +/* $NetBSD: cfi.c,v 1.8 2015/09/18 21:30:02 phx Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -33,7 +33,7 @@ #include "opt_cfi.h" #include -__KERNEL_RCSID(0, "$NetBSD: cfi.c,v 1.7 2011/12/17 19:42:41 phx Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cfi.c,v 1.8 2015/09/18 21:30:02 phx Exp $"); #include #include @@ -476,7 +476,8 @@ cfi_scan_media(device_t self, struct nor */ chip->nc_num_luns = 1; chip->nc_lun_blocks = cfi->cfi_qry_data.erase_blk_info[0].y + 1; - chip->nc_block_size = cfi->cfi_qry_data.erase_blk_info[0].z * 256; + chip->nc_block_size = cfi->cfi_qry_data.erase_blk_info[0].z ? + cfi->cfi_qry_data.erase_blk_info[0].z * 256 : 128; switch (cfi->cfi_qry_data.id_pri) { case 0x0002: @@ -880,7 +881,8 @@ cfi_print(device_t self, struct cfi * co aprint_normal_dev(self, "%d Erase Block Region(s)\n", qryp->erase_blk_regions); for (u_int r=0; r < qryp->erase_blk_regions; r++) { - size_t sz = qryp->erase_blk_info[r].z * 256; + size_t sz = qryp->erase_blk_info[r].z ? + qryp->erase_blk_info[r].z * 256 : 128; format_bytes(pbuf, sizeof(pbuf), sz); aprint_normal("%d: %d blocks, size %s\n", r, qryp->erase_blk_info[r].y + 1, pbuf);
CVS commit: src/sys/dev/i2c
Module Name:src Committed By: phx Date: Fri Sep 18 17:21:43 UTC 2015 Modified Files: src/sys/dev/i2c: hytp14.c Log Message: Declare sensor data invalid when reading the sensor failed (device is gone). To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/i2c/hytp14.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/dev/i2c/hytp14.c diff -u src/sys/dev/i2c/hytp14.c:1.5 src/sys/dev/i2c/hytp14.c:1.6 --- src/sys/dev/i2c/hytp14.c:1.5 Wed Sep 9 17:16:20 2015 +++ src/sys/dev/i2c/hytp14.c Fri Sep 18 17:21:43 2015 @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hytp14.c,v 1.5 2015/09/09 17:16:20 phx Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hytp14.c,v 1.6 2015/09/18 17:21:43 phx Exp $"); #include #include @@ -230,6 +230,7 @@ hytp14_measurement_request(void *aux) DPRINTF(2, ("%s: %s: failed read from 0x%02x - error %d\n", device_xname(sc->sc_dev), __func__, sc->sc_addr, error)); + sc->sc_valid = ENVSYS_SINVALID; } else { DPRINTF(3, ("%s(%s): DF success : " "0x%02x%02x%02x%02x\n", @@ -288,6 +289,7 @@ hytp14_refresh_sensor(struct hytp14_sc * DPRINTF(2, ("%s: %s: failed read from 0x%02x - error %d\n", device_xname(sc->sc_dev), __func__, sc->sc_addr, error)); + sc->sc_valid = ENVSYS_SINVALID; } else { DPRINTF(3, ("%s(%s): DF success : " "0x%02x%02x%02x%02x\n", @@ -317,7 +319,7 @@ hytp14_refresh_sensor(struct hytp14_sc * DPRINTF(2, ("%s: %s: failed acquire i2c bus - error %d\n", device_xname(sc->sc_dev), __func__, error)); } - + return sc->sc_valid; }
CVS commit: src
Module Name:src Committed By: phx Date: Wed Sep 9 17:16:20 UTC 2015 Modified Files: src/share/man/man4: hythygtemp.4 src/sys/dev/i2c: hytp14.c hytp14var.h Log Message: Tests showed that the sensor needs at least 30ms after a MR (measurement request) to have valid data ready, so the driver didn't work very well. Now the MR is sent in configurable intervals (hw.hythygtemp0.interval) using callout(9), so that valid data is immediately available for sysmon's sensor refresh. When the refresh comes too close after the last MR, then the previous values are used. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man4/hythygtemp.4 cvs rdiff -u -r1.4 -r1.5 src/sys/dev/i2c/hytp14.c cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/hytp14var.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/hythygtemp.4 diff -u src/share/man/man4/hythygtemp.4:1.2 src/share/man/man4/hythygtemp.4:1.3 --- src/share/man/man4/hythygtemp.4:1.2 Sun May 18 12:45:03 2014 +++ src/share/man/man4/hythygtemp.4 Wed Sep 9 17:16:20 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: hythygtemp.4,v 1.2 2014/05/18 12:45:03 wiz Exp $ +.\" $NetBSD: hythygtemp.4,v 1.3 2015/09/09 17:16:20 phx Exp $ .\" .\" Copyright (c) 2014 Frank Kardel .\" All rights reserved. @@ -44,13 +44,28 @@ The .Ar addr argument selects the address at the .Xr iic 4 -bus. +bus. The sampling interval can be changed through the +.Xr sysctl 8 +node +.Li hw.hythygtemp0.interval . +.Pp The sensor chips can be reconfigured to respond to other addresses than the -default value of 0x28. +default value of 0x28 by external utilities, like for example the +.Pa pkgsrc/sysutils/hytctl +package. +.Sh SYSCTL VARIABLES +The following +.Xr sysctl 3 +variables are provided: +.Bl -tag -width indent +.It hw.hythygtemp0.interval +Defines the sensor's sampling interval in seconds. It defaults to 50 seconds. +.El .Sh SEE ALSO .Xr envsys 4 , .Xr iic 4 , -.Xr envstat 8 +.Xr envstat 8 , +.Xr sysctl 8 .Sh HISTORY The .Nm @@ -61,4 +76,6 @@ driver first appeared in The .Nm driver was written by -.An Frank Kardel Aq Mt kar...@netbsd.org . +.An Frank Kardel Aq Mt kar...@netbsd.org +and +.An Frank Wille Aq p...@netbsd.org . Index: src/sys/dev/i2c/hytp14.c diff -u src/sys/dev/i2c/hytp14.c:1.4 src/sys/dev/i2c/hytp14.c:1.5 --- src/sys/dev/i2c/hytp14.c:1.4 Thu Apr 23 23:23:00 2015 +++ src/sys/dev/i2c/hytp14.c Wed Sep 9 17:16:20 2015 @@ -37,16 +37,16 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: hytp14.c,v 1.4 2015/04/23 23:23:00 pgoyette Exp $"); +__KERNEL_RCSID(0, "$NetBSD: hytp14.c,v 1.5 2015/09/09 17:16:20 phx Exp $"); #include #include #include #include #include +#include #include - #include #include #include @@ -54,12 +54,14 @@ __KERNEL_RCSID(0, "$NetBSD: hytp14.c,v 1 static int hytp14_match(device_t, cfdata_t, void *); static void hytp14_attach(device_t, device_t, void *); static int hytp14_detach(device_t, int); +static void hytp14_measurement_request(void *); static int hytp14_refresh_sensor(struct hytp14_sc *sc); static void hytp14_refresh(struct sysmon_envsys *, envsys_data_t *); static void hytp14_refresh_humidity(struct hytp14_sc *, envsys_data_t *); static void hytp14_refresh_temp(struct hytp14_sc *, envsys_data_t *); +static int sysctl_hytp14_interval(SYSCTLFN_ARGS); -/* #define HYT_DEBUG 3 */ +/*#define HYT_DEBUG 3*/ #ifdef HYT_DEBUG volatile int hythygtemp_debug = HYT_DEBUG; @@ -91,7 +93,9 @@ static struct hytp14_sensor hytp14_senso static int hytp14_match(device_t parent, cfdata_t match, void *aux) { - struct i2c_attach_args *ia = aux; + struct i2c_attach_args *ia; + + ia = aux; if (ia->ia_name) { /* direct config - check name */ @@ -108,14 +112,17 @@ hytp14_match(device_t parent, cfdata_t m static void hytp14_attach(device_t parent, device_t self, void *aux) { - struct hytp14_sc *sc = device_private(self); - struct i2c_attach_args *ia = aux; + const struct sysctlnode *rnode, *node; + struct hytp14_sc *sc; + struct i2c_attach_args *ia; int i; + ia = aux; + sc = device_private(self); + sc->sc_dev = self; sc->sc_tag = ia->ia_tag; sc->sc_addr = ia->ia_addr; - sc->sc_refresh = 0; sc->sc_valid = ENVSYS_SINVALID; sc->sc_numsensors = __arraycount(hytp14_sensors); @@ -134,7 +141,7 @@ hytp14_attach(device_t parent, device_t sc->sc_sensors[i].state = ENVSYS_SINVALID; DPRINTF(2, ("hytp14_attach: registering sensor %d (%s)\n", i, - sc->sc_sensors[i].desc)); + sc->sc_sensors[i].desc)); if (sysmon_envsys_sensor_attach(sc->sc_sme, &sc->sc_sensors[i])) { aprint_error_dev(sc->sc_dev, @@ -157,80 +164,158 @@ hytp14_attach(device_t parent, device_t return; } + /* create a sysctl node for setting the measurement interval */ + rnode
CVS commit: src/sys/arch/sandpoint/sandpoint
Module Name:src Committed By: phx Date: Mon Sep 7 23:00:08 UTC 2015 Modified Files: src/sys/arch/sandpoint/sandpoint: flash_cfi.c machdep.c mainbus.c Log Message: Fix nor-flash bus space: extent limit should not be zero and bus space is definitely big-endian. Reading the flash via /dev/flash0 works now. Writing is untested. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/sandpoint/sandpoint/flash_cfi.c cvs rdiff -u -r1.63 -r1.64 src/sys/arch/sandpoint/sandpoint/machdep.c cvs rdiff -u -r1.29 -r1.30 src/sys/arch/sandpoint/sandpoint/mainbus.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/sandpoint/sandpoint/flash_cfi.c diff -u src/sys/arch/sandpoint/sandpoint/flash_cfi.c:1.3 src/sys/arch/sandpoint/sandpoint/flash_cfi.c:1.4 --- src/sys/arch/sandpoint/sandpoint/flash_cfi.c:1.3 Mon Jan 30 15:47:01 2012 +++ src/sys/arch/sandpoint/sandpoint/flash_cfi.c Mon Sep 7 23:00:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: flash_cfi.c,v 1.3 2012/01/30 15:47:01 phx Exp $ */ +/* $NetBSD: flash_cfi.c,v 1.4 2015/09/07 23:00:08 phx Exp $ */ /*- * Copyright (c) 2011 Frank Wille. @@ -32,7 +32,7 @@ * NOR CFI driver support for sandpoint */ #include -__KERNEL_RCSID(0, "$NetBSD: flash_cfi.c,v 1.3 2012/01/30 15:47:01 phx Exp $"); +__KERNEL_RCSID(0, "$NetBSD: flash_cfi.c,v 1.4 2015/09/07 23:00:08 phx Exp $"); #include #include @@ -63,7 +63,7 @@ sandpointcfi_probe(device_t parent, cfda { extern struct cfdriver cfi_cd; struct mainbus_attach_args *ma = aux; - const bus_size_t tmpsize = CFI_QRY_MIN_MAP_SIZE; + const bus_size_t qrysize = CFI_QRY_MIN_MAP_SIZE; struct cfi cfi; int error, rv; @@ -74,11 +74,12 @@ sandpointcfi_probe(device_t parent, cfda cfi.cfi_bst = ma->ma_bst; - error = bus_space_map(cfi.cfi_bst, ma->ma_addr, tmpsize, 0, + /* flash should be at least 2 MiB in size at 0xffe0 */ + error = bus_space_map(cfi.cfi_bst, 0xffe0, qrysize, 0, &cfi.cfi_bsh); if (error != 0) { aprint_error("%s: cannot map %d at offset %#x, error %d\n", - __func__, tmpsize, ma->ma_addr, error); + __func__, qrysize, ma->ma_addr, error); return 0; } @@ -90,7 +91,7 @@ sandpointcfi_probe(device_t parent, cfda } else rv = 1; - bus_space_unmap(cfi.cfi_bst, cfi.cfi_bsh, tmpsize); + bus_space_unmap(cfi.cfi_bst, cfi.cfi_bsh, qrysize); return rv; } @@ -99,7 +100,7 @@ sandpointcfi_attach(device_t parent, dev { struct mainbus_attach_args *ma = aux; struct sandpointcfi_softc *sc; - const bus_size_t tmpsize = CFI_QRY_MIN_MAP_SIZE; + const bus_size_t qrysize = CFI_QRY_MIN_MAP_SIZE; bus_addr_t addr; bool found; int error; @@ -112,7 +113,7 @@ sandpointcfi_attach(device_t parent, dev sc->sc_cfi.cfi_bst = ma->ma_bst; /* map enough to identify, remap later when size is known */ - error = bus_space_map(sc->sc_cfi.cfi_bst, ma->ma_addr, tmpsize, 0, + error = bus_space_map(sc->sc_cfi.cfi_bst, 0xffe0, qrysize, 0, &sc->sc_cfi.cfi_bsh); if (error != 0) { aprint_error_dev(self, "could not map error %d\n", error); @@ -122,7 +123,7 @@ sandpointcfi_attach(device_t parent, dev /* identify the NOR flash */ found = cfi_identify(&sc->sc_cfi); - bus_space_unmap(sc->sc_cfi.cfi_bst, sc->sc_cfi.cfi_bsh, tmpsize); + bus_space_unmap(sc->sc_cfi.cfi_bst, sc->sc_cfi.cfi_bsh, qrysize); if (!found) { /* should not happen, we already probed OK in match */ aprint_error_dev(self, "could not map error %d\n", error); @@ -132,7 +133,7 @@ sandpointcfi_attach(device_t parent, dev /* get size of flash in bytes */ sc->sc_size = 1 << sc->sc_cfi.cfi_qry_data.device_size; - /* real base address */ + /* determine real base address */ addr = (0x - sc->sc_size) + 1; sc->sc_nor_if = nor_interface_cfi; Index: src/sys/arch/sandpoint/sandpoint/machdep.c diff -u src/sys/arch/sandpoint/sandpoint/machdep.c:1.63 src/sys/arch/sandpoint/sandpoint/machdep.c:1.64 --- src/sys/arch/sandpoint/sandpoint/machdep.c:1.63 Sun Apr 21 15:42:12 2013 +++ src/sys/arch/sandpoint/sandpoint/machdep.c Mon Sep 7 23:00:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.63 2013/04/21 15:42:12 kiyohara Exp $ */ +/* $NetBSD: machdep.c,v 1.64 2015/09/07 23:00:08 phx Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.63 2013/04/21 15:42:12 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.64 2015/09/07 23:00:08 phx Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -450,8 +450,8 @@ struct powerpc_bus_space sandpoint_eumb_ 0xfc00, 0x, 0x0010, }; struct powerpc_bus_space sandpoint_flash_space_tag = { - _BUS_SPACE_LITTLE_ENDIAN|_BUS_SPACE_MEM_TYPE, - 0x
CVS commit: src/etc/etc.sandpoint
Module Name:src Committed By: phx Date: Mon Sep 7 23:02:07 UTC 2015 Modified Files: src/etc/etc.sandpoint: MAKEDEV.conf Log Message: Create /dev/flashN device nodes for all_md. To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/etc/etc.sandpoint/MAKEDEV.conf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/etc.sandpoint/MAKEDEV.conf diff -u src/etc/etc.sandpoint/MAKEDEV.conf:1.16 src/etc/etc.sandpoint/MAKEDEV.conf:1.17 --- src/etc/etc.sandpoint/MAKEDEV.conf:1.16 Thu Aug 16 13:31:26 2012 +++ src/etc/etc.sandpoint/MAKEDEV.conf Mon Sep 7 23:02:07 2015 @@ -1,4 +1,4 @@ -# $NetBSD: MAKEDEV.conf,v 1.16 2012/08/16 13:31:26 abs Exp $ +# $NetBSD: MAKEDEV.conf,v 1.17 2015/09/07 23:02:07 phx Exp $ init) makedev std bpf tty00 tty01 opty ptm pty0 @@ -14,6 +14,7 @@ all_md) makedev usbs makedev scsibus0 scsibus1 makedev pci0 altq sysmon kttcp cfs satmgr + makedev flash0 flash1 flash2 flash3 flash4 flash5 flash6 flash7 ;; ramdisk|floppy)
CVS commit: src/sys/arch/sandpoint/conf
Module Name:src Committed By: phx Date: Mon Sep 7 23:01:08 UTC 2015 Modified Files: src/sys/arch/sandpoint/conf: GENERIC Log Message: Enable cfi/nor/flash devices as reading from flash seems to work now. To generate a diff of this commit: cvs rdiff -u -r1.88 -r1.89 src/sys/arch/sandpoint/conf/GENERIC 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/sandpoint/conf/GENERIC diff -u src/sys/arch/sandpoint/conf/GENERIC:1.88 src/sys/arch/sandpoint/conf/GENERIC:1.89 --- src/sys/arch/sandpoint/conf/GENERIC:1.88 Sun Nov 16 16:01:42 2014 +++ src/sys/arch/sandpoint/conf/GENERIC Mon Sep 7 23:01:08 2015 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.88 2014/11/16 16:01:42 manu Exp $ +# $NetBSD: GENERIC,v 1.89 2015/09/07 23:01:08 phx Exp $ # # machine description file for GENERIC NAS # @@ -22,7 +22,7 @@ include "arch/sandpoint/conf/std.sandpo options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.88 $" +#ident "GENERIC-$Revision: 1.89 $" maxusers 32 @@ -173,9 +173,9 @@ config netbsd root on ? type ? mainbus0 at root cpu* at mainbus0 -#cfi0 at mainbus0 -#nor* at cfi? -#flash* at nor? +cfi0 at mainbus0 +nor* at cfi? +flash* at nor? nhpow0 at mainbus0 # NH230/231 power,LED,buttons
CVS commit: src/sys/dev/gpio
Module Name:src Committed By: phx Date: Tue Sep 1 19:25:32 UTC 2015 Modified Files: src/sys/dev/gpio: gpioiic.c Log Message: i2c_acquire_bus() should return 0 on success. Fixed bug in gpioiic_bb_set_bits(), which was introduced with the SDA/SCL- reverse feature. Now the driver is confirmed to work. Tested with Raspberry Pi GPIO. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/dev/gpio/gpioiic.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/dev/gpio/gpioiic.c diff -u src/sys/dev/gpio/gpioiic.c:1.6 src/sys/dev/gpio/gpioiic.c:1.7 --- src/sys/dev/gpio/gpioiic.c:1.6 Sat Oct 27 17:18:16 2012 +++ src/sys/dev/gpio/gpioiic.c Tue Sep 1 19:25:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: gpioiic.c,v 1.6 2012/10/27 17:18:16 chs Exp $ */ +/* $NetBSD: gpioiic.c,v 1.7 2015/09/01 19:25:32 phx Exp $ */ /* $OpenBSD: gpioiic.c,v 1.8 2008/11/24 12:12:12 mbalmer Exp $ */ /* @@ -18,7 +18,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gpioiic.c,v 1.6 2012/10/27 17:18:16 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gpioiic.c,v 1.7 2015/09/01 19:25:32 phx Exp $"); /* * I2C bus bit-banging through GPIO pins. @@ -232,10 +232,10 @@ gpioiic_i2c_acquire_bus(void *cookie, in struct gpioiic_softc *sc = cookie; if (flags & I2C_F_POLL) - return 0; + return 1; rw_enter(&sc->sc_i2c_lock, RW_WRITER); - return 1; + return 0; } void @@ -286,8 +286,8 @@ gpioiic_bb_set_bits(void *cookie, uint32 gpio_pin_write(sc->sc_gpio, &sc->sc_map, sc->sc_pin_sda, bits & GPIOIIC_SDA ? GPIO_PIN_HIGH : GPIO_PIN_LOW); - gpio_pin_write(sc->sc_gpio, &sc->sc_map, GPIOIIC_PIN_SCL, - bits & GPIOIIC_SCL ? GPIO_PIN_HIGH : sc->sc_pin_scl); + gpio_pin_write(sc->sc_gpio, &sc->sc_map, sc->sc_pin_scl, + bits & GPIOIIC_SCL ? GPIO_PIN_HIGH : GPIO_PIN_LOW); } void
CVS commit: src/sys/dev
Module Name:src Committed By: phx Date: Thu Aug 27 09:59:07 UTC 2015 Modified Files: src/sys/dev: DEVNAMES Log Message: Added some missing SPI device names. To generate a diff of this commit: cvs rdiff -u -r1.292 -r1.293 src/sys/dev/DEVNAMES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/DEVNAMES diff -u src/sys/dev/DEVNAMES:1.292 src/sys/dev/DEVNAMES:1.293 --- src/sys/dev/DEVNAMES:1.292 Fri Oct 17 14:38:43 2014 +++ src/sys/dev/DEVNAMES Thu Aug 27 09:59:06 2015 @@ -1,4 +1,4 @@ -# $NetBSD: DEVNAMES,v 1.292 2014/10/17 14:38:43 phx Exp $ +# $NetBSD: DEVNAMES,v 1.293 2015/08/27 09:59:06 phx Exp $ # # This file contains all used device names and defined attributes in # alphabetical order. New devices added to the system somewhere should first @@ -784,6 +784,7 @@ lpt sgimips lpt sparc64 lsi64854 MI Attribute lxtphy MI +m25p MI m38813c hpcmips mace sgimips macepci sgimips @@ -859,6 +860,9 @@ mcclock pmax mcclock prep mcd MI mcmem alpha +mcp23s17gpio MI +mcp3kadc MI +mcp48x1dac MI mcpcia alpha mdio evbppc mec sgimips @@ -1003,6 +1007,7 @@ ofppb sparc64 ofrom shark ofrtc MI ohci MI +oj6sh MI oldscsi pmax Attribute oldscsibus pmax oosiop MI
CVS commit: src/common/lib/libprop
Module Name:src Committed By: phx Date: Thu Aug 20 15:55:09 UTC 2015 Modified Files: src/common/lib/libprop: prop_send_ioctl.3 Log Message: Fixed typo: propertly -> property. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/common/lib/libprop/prop_send_ioctl.3 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/common/lib/libprop/prop_send_ioctl.3 diff -u src/common/lib/libprop/prop_send_ioctl.3:1.8 src/common/lib/libprop/prop_send_ioctl.3:1.9 --- src/common/lib/libprop/prop_send_ioctl.3:1.8 Tue Sep 27 11:12:49 2011 +++ src/common/lib/libprop/prop_send_ioctl.3 Thu Aug 20 15:55:09 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: prop_send_ioctl.3,v 1.8 2011/09/27 11:12:49 jym Exp $ +.\" $NetBSD: prop_send_ioctl.3,v 1.9 2015/08/20 15:55:09 phx Exp $ .\" .\" Copyright (c) 2006 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -36,7 +36,7 @@ .Nm prop_dictionary_send_ioctl , .Nm prop_dictionary_recv_ioctl , .Nm prop_dictionary_sendrecv_ioctl -.Nd Send and receive propertly lists to and from the kernel using ioctl +.Nd Send and receive property lists to and from the kernel using ioctl .Sh SYNOPSIS .In prop/proplib.h .Ft int
CVS commit: src/share/man/man4
Module Name:src Committed By: phx Date: Tue Aug 18 19:40:21 UTC 2015 Modified Files: src/share/man/man4: spi.4 Log Message: Add some more MI SPI drivers to the list: mcp23s17gpio(4), mcp3kadc(4), mcp48x1dac(4). To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/share/man/man4/spi.4 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man4/spi.4 diff -u src/share/man/man4/spi.4:1.4 src/share/man/man4/spi.4:1.5 --- src/share/man/man4/spi.4:1.4 Wed May 27 19:24:00 2009 +++ src/share/man/man4/spi.4 Tue Aug 18 19:40:21 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: spi.4,v 1.4 2009/05/27 19:24:00 snj Exp $ +.\" $NetBSD: spi.4,v 1.5 2015/08/18 19:40:21 phx Exp $ .\" .\" Copyright (c) 2006 Urbana-Champaign Independent Media Center. .\" Copyright (c) 2006 Garrett D'Amore. @@ -97,11 +97,20 @@ drivers .Bl -tag -width pcdisplay -offset indent .It m25p STMicroelectronics M25P family of NOR flash devices. +.It mcp23s17gpio +Microchip MCP23S17 16-bit GPIO chip. +.It mcp3kadc +Microchip MCP3x0x SAR analog to digital converter. +.It mcp48x1dac +Microchip MCP4801/MCP4811/MCP4821 digital to analog converter. .It tm121temp Texas Instruments TMP121 temperature sensor. .El .Sh SEE ALSO .Xr m25p 4 , +.Xr mcp23s17gpio 4 , +.Xr mcp3kadc 4 , +.Xr mcp48x1dac 4 , .Xr tm121temp 4 .Sh HISTORY The machine-independent
CVS commit: src
39 2014 +++ src/sys/dev/spi/files.spi Tue Aug 18 15:54:20 2015 @@ -1,4 +1,4 @@ -# $NetBSD: files.spi,v 1.4 2014/04/06 17:59:39 kardel Exp $ +# $NetBSD: files.spi,v 1.5 2015/08/18 15:54:20 phx Exp $ define spibus { } @@ -35,3 +35,8 @@ file dev/spi/mcp48x1.c mcp48x1dac device mcp23s17gpio: gpiobus attach mcp23s17gpio at spi file dev/spi/mcp23s17.c mcp23s17gpio + +# MCP3x0x ADC +device mcp3kadc: sysmon_envsys +attach mcp3kadc at spi +file dev/spi/mcp3k.c mcp3kadc Added files: Index: src/share/man/man4/mcp3kadc.4 diff -u /dev/null src/share/man/man4/mcp3kadc.4:1.1 --- /dev/null Tue Aug 18 15:54:20 2015 +++ src/share/man/man4/mcp3kadc.4 Tue Aug 18 15:54:20 2015 @@ -0,0 +1,94 @@ +.\" $NetBSD: mcp3kadc.4,v 1.1 2015/08/18 15:54:20 phx Exp $ +.\" +.\" Copyright (c) 2015 The NetBSD Foundation, Inc. +.\" All rights reserved. +.\" +.\" This code is derived from software contributed to The NetBSD Foundation +.\" by Frank Wille. +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\"notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\"notice, this list of conditions and the following disclaimer in the +.\"documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS +.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED +.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +.\" PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS +.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF +.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +.\" POSSIBILITY OF SUCH DAMAGE. +.\" +.Dd August 18, 2015 +.Dt MCP3KADC 4 +.Os +.Sh NAME +.Nm mcp3kadc +.Nd Microchip 3x0x SAR analog to digital converter +.Sh SYNOPSIS +.Cd "mcp3kadc* at spi? slave ? flags N" +.Sh DESCRIPTION +The +.Nm +driver reports the current voltage on the chip's ADC channels through the +.Xr envsys 4 +API. The driver calculates these values according to the currently selected +reference voltage ( +.Li Vref +). It can be changed +through the +.Xr sysctl 8 +node +.Li hw.mcp3kadc0.vref . +.Pp +The following table shows the supported chips. The type of the chip can +be selected with the +.Ar flags +argument in the config file. +.Bl -column "Designation" "Resolution" "Input Channels" "flags" -offset indent +.It Sy "Designation" Ta Sy "Resolution" Ta Sy "Input Channels" Ta Sy "flags" +.It Li "MCP3001" Ta "10 bits" Ta "1" Ta "0" +.It Li "MCP3002" Ta "10 bits" Ta "2" Ta "1" +.It Li "MCP3004" Ta "10 bits" Ta "4" Ta "2" +.It Li "MCP3008" Ta "10 bits" Ta "8" Ta "3" +.It Li "MCP3201" Ta "12 bits" Ta "1" Ta "4" +.It Li "MCP3202" Ta "12 bits" Ta "2" Ta "5" +.It Li "MCP3204" Ta "12 bits" Ta "4" Ta "6" +.It Li "MCP3208" Ta "12 bits" Ta "8" Ta "7" +.It Li "MCP3301" Ta "13 bits" Ta "1" Ta "8" +.It Li "MCP3302" Ta "13 bits" Ta "4" Ta "9" +.It Li "MCP3304" Ta "13 bits" Ta "8" Ta "10" +.El +.Sh SYSCTL VARIABLES +The following +.Xr sysctl 3 +variables are provided: +.Bl -tag -width indent +.It hw.mcp3kadc0.vref +Defines the reference voltage on the chip's +.Li Vref +pin in millivolts (mV). It defaults to the ADC's maximum output value + 1 +in millivolts (e.g., 4096 for a 12-bit ADC). +.El +.Sh SEE ALSO +.Xr spi 4 , +.Xr envsys 4 , +.Xr sysctl 8 +.Sh HISTORY +The +.Nm +driver first appeared in +.Nx 8.0 . +.Sh AUTHORS +The +.Nm +driver was written by +.An Frank Wille . Index: src/sys/dev/spi/mcp3k.c diff -u /dev/null src/sys/dev/spi/mcp3k.c:1.1 --- /dev/null Tue Aug 18 15:54:20 2015 +++ src/sys/dev/spi/mcp3k.c Tue Aug 18 15:54:20 2015 @@ -0,0 +1,368 @@ +/* $NetBSD: mcp3k.c,v 1.1 2015/08/18 15:54:20 phx
CVS commit: src/sys/arch/amiga/include
Module Name:src Committed By: phx Date: Sat Jun 13 23:55:18 UTC 2015 Modified Files: src/sys/arch/amiga/include: vmparam.h Log Message: Use all the changes from http://ftp.netbsd.org/pub/NetBSD/misc/mlelstv/vmparam.diff after a discussion on port-m68k. I tested them on several Amiga models and they seem to work fine. This gives us the maximum virtual memory space for a process under the current 512MB pmap limitation. Also bump VM_KERNEL_PT_PAGES to allow up to 2 GB RAM. To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/arch/amiga/include/vmparam.h 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/amiga/include/vmparam.h diff -u src/sys/arch/amiga/include/vmparam.h:1.43 src/sys/arch/amiga/include/vmparam.h:1.44 --- src/sys/arch/amiga/include/vmparam.h:1.43 Mon Jun 1 17:16:56 2015 +++ src/sys/arch/amiga/include/vmparam.h Sat Jun 13 23:55:18 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.43 2015/06/01 17:16:56 phx Exp $ */ +/* $NetBSD: vmparam.h,v 1.44 2015/06/13 23:55:18 phx Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -70,13 +70,13 @@ */ #ifndef MAXTSIZ -#define MAXTSIZ (16*1024*1024) /* max text size */ +#define MAXTSIZ (32*1024*1024) /* max text size */ #endif #ifndef DFLDSIZ -#define DFLDSIZ (32*1024*1024) /* initial data size limit */ +#define DFLDSIZ (64*1024*1024) /* initial data size limit */ #endif #ifndef MAXDSIZ -#define MAXDSIZ (256*1024*1024) /* max data size */ +#define MAXDSIZ (416*1024*1024) /* max data size */ #endif #ifndef DFLSSIZ #define DFLSSIZ (2*1024*1024) /* initial stack size limit */ @@ -138,5 +138,5 @@ struct pmap_physseg { /* * number of kernel PT pages (initial only, can grow dynamically) */ -#define VM_KERNEL_PT_PAGES ((vm_size_t)8) /* XXX: SYSPTSIZE */ +#define VM_KERNEL_PT_PAGES ((vm_size_t)10) /* XXX: SYSPTSIZE */ #endif /* !_MACHINE_VMPARAM_H_ */
CVS commit: src/sys/arch/amiga/include
Module Name:src Committed By: phx Date: Mon Jun 1 17:16:57 UTC 2015 Modified Files: src/sys/arch/amiga/include: vmparam.h Log Message: Remove unused KUSER_AREA, SYSPTSIZE, USRPTSIZE. Bump MAXTSIZ and MAXDSIZ to the same values atari is using. This makes gcc 4.8 (/usr/libexec/cc1) load and execute. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/amiga/include/vmparam.h 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/amiga/include/vmparam.h diff -u src/sys/arch/amiga/include/vmparam.h:1.42 src/sys/arch/amiga/include/vmparam.h:1.43 --- src/sys/arch/amiga/include/vmparam.h:1.42 Tue Feb 8 20:20:08 2011 +++ src/sys/arch/amiga/include/vmparam.h Mon Jun 1 17:16:56 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.42 2011/02/08 20:20:08 rmind Exp $ */ +/* $NetBSD: vmparam.h,v 1.43 2015/06/01 17:16:56 phx Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -64,19 +64,19 @@ #ifndef USRSTACK #define USRSTACK 0x1E00 #endif -#define KUSER_AREA (-UPAGES*PAGE_SIZE) + /* * Virtual memory related constants, all in bytes */ #ifndef MAXTSIZ -#define MAXTSIZ (6*1024*1024) /* max text size */ +#define MAXTSIZ (16*1024*1024) /* max text size */ #endif #ifndef DFLDSIZ #define DFLDSIZ (32*1024*1024) /* initial data size limit */ #endif #ifndef MAXDSIZ -#define MAXDSIZ (128*1024*1024) /* max data size */ +#define MAXDSIZ (256*1024*1024) /* max data size */ #endif #ifndef DFLSSIZ #define DFLSSIZ (2*1024*1024) /* initial stack size limit */ @@ -86,13 +86,6 @@ #endif /* - * Sizes of the system and user portions of the system page table. - */ -/* SYSPTSIZE IS SILLY; IT SHOULD BE COMPUTED AT BOOT TIME */ -#define SYSPTSIZE (2 * NPTEPG) /* 16mb */ -#define USRPTSIZE (1 * NPTEPG) /* 16mb */ - -/* * PTEs for mapping user space into the kernel for phyio operations. * One page is enough to handle 16Mb of simultaneous raw IO operations. */
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: phx Date: Mon Jun 1 17:09:46 UTC 2015 Modified Files: src/sys/arch/amiga/dev: z3rambd.c Log Message: Removed unused variable to make it compile again. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amiga/dev/z3rambd.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/amiga/dev/z3rambd.c diff -u src/sys/arch/amiga/dev/z3rambd.c:1.2 src/sys/arch/amiga/dev/z3rambd.c:1.3 --- src/sys/arch/amiga/dev/z3rambd.c:1.2 Mon Nov 26 22:58:24 2012 +++ src/sys/arch/amiga/dev/z3rambd.c Mon Jun 1 17:09:46 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: z3rambd.c,v 1.2 2012/11/26 22:58:24 rkujawa Exp $ */ +/* $NetBSD: z3rambd.c,v 1.3 2015/06/01 17:09:46 phx Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: z3rambd.c,v 1.2 2012/11/26 22:58:24 rkujawa Exp $"); +__KERNEL_RCSID(0, "$NetBSD: z3rambd.c,v 1.3 2015/06/01 17:09:46 phx Exp $"); /* * Z3 RAM virtual block device. Supports ZorRAM, BigRamPlus and FastLane Z3 so @@ -132,11 +132,9 @@ z3rambd_altmem_strategy(void *aux, struc { struct z3rambd_softc *sc = aux; void *addr; - size_t off, bpos; + size_t off; int s; - bpos = 0; - bp->b_resid = bp->b_bcount; off = bp->b_blkno << DEV_BSHIFT; @@ -162,4 +160,3 @@ z3rambd_altmem_getsize(void *aux) struct z3rambd_softc *sc = aux; return sc->sc_size; } -
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: phx Date: Mon Jan 19 20:10:27 UTC 2015 Modified Files: src/sys/arch/amiga/dev: sbic.c Log Message: Make it compile with -DDEBUG again. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/arch/amiga/dev/sbic.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/amiga/dev/sbic.c diff -u src/sys/arch/amiga/dev/sbic.c:1.73 src/sys/arch/amiga/dev/sbic.c:1.74 --- src/sys/arch/amiga/dev/sbic.c:1.73 Thu Aug 7 08:59:42 2014 +++ src/sys/arch/amiga/dev/sbic.c Mon Jan 19 20:10:27 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: sbic.c,v 1.73 2014/08/07 08:59:42 joerg Exp $ */ +/* $NetBSD: sbic.c,v 1.74 2015/01/19 20:10:27 phx Exp $ */ /* * Copyright (c) 1990 The Regents of the University of California. @@ -81,7 +81,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: sbic.c,v 1.73 2014/08/07 08:59:42 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sbic.c,v 1.74 2015/01/19 20:10:27 phx Exp $"); #include #include @@ -1231,11 +1231,17 @@ int sbicxfin(sbic_regmap_t regs, int len, void *bp) { int wait; - u_char *buf; u_char orig_csr, csr, asr; + u_char *buf; +#ifdef DEBUG + u_char *obp; +#endif wait = sbic_data_wait; buf = bp; +#ifdef DEBUG + obp = bp; +#endif GET_SBIC_csr (regs, orig_csr); __USE(orig_csr);
CVS commit: src/sys/arch/amiga/amiga
Module Name:src Committed By: phx Date: Fri Jan 16 23:34:11 UTC 2015 Modified Files: src/sys/arch/amiga/amiga: gayle.c Log Message: Fixed crash of A4000 IDE due to uninitialised bus_space_tag and bus_space handle for the interrupt status register. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/amiga/amiga/gayle.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/amiga/amiga/gayle.c diff -u src/sys/arch/amiga/amiga/gayle.c:1.7 src/sys/arch/amiga/amiga/gayle.c:1.8 --- src/sys/arch/amiga/amiga/gayle.c:1.7 Fri Jan 3 00:33:06 2014 +++ src/sys/arch/amiga/amiga/gayle.c Fri Jan 16 23:34:11 2015 @@ -1,9 +1,9 @@ -/* $NetBSD: gayle.c,v 1.7 2014/01/03 00:33:06 rkujawa Exp $ */ +/* $NetBSD: gayle.c,v 1.8 2015/01/16 23:34:11 phx Exp $ */ /* public domain */ #include -__KERNEL_RCSID(0, "$NetBSD: gayle.c,v 1.7 2014/01/03 00:33:06 rkujawa Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gayle.c,v 1.8 2015/01/16 23:34:11 phx Exp $"); /* * Gayle management - provide functions for use in the drivers that utilise @@ -75,9 +75,11 @@ gayle_init(void) { if (is_a4000()) { gayle_t->gayle_isr_bst.base = (bus_addr_t) __UNVOLATILE(ztwomap( GAYLE_IDE_BASE_A4000+GAYLE_IDE_INTREQ_A4000)); - - gayle_t->gayle_io_bst.absm = &amiga_bus_stride_1; + gayle_t->gayle_isr_bst.absm = &amiga_bus_stride_1; gayle_t->gayle_isr_t = &(gayle_t->gayle_isr_bst); + + bus_space_map(gayle_t->gayle_isr_t, 0, 0x1, 0, + &(gayle_t->gayle_isr_h)); } else { bus_space_subregion(gayle_t->gayle_io_t, gayle_t->gayle_io_h, GAYLE_INTREQ, 0x1, &(gayle_t->gayle_isr_h));
CVS commit: src/sys/arch/ofppc/ofppc
Module Name:src Committed By: phx Date: Wed Dec 31 18:43:18 UTC 2014 Modified Files: src/sys/arch/ofppc/ofppc: mainbus.c Log Message: Make it compile with GCC48. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/ofppc/ofppc/mainbus.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/ofppc/ofppc/mainbus.c diff -u src/sys/arch/ofppc/ofppc/mainbus.c:1.29 src/sys/arch/ofppc/ofppc/mainbus.c:1.30 --- src/sys/arch/ofppc/ofppc/mainbus.c:1.29 Sun Apr 21 15:42:11 2013 +++ src/sys/arch/ofppc/ofppc/mainbus.c Wed Dec 31 18:43:18 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.29 2013/04/21 15:42:11 kiyohara Exp $ */ +/* $NetBSD: mainbus.c,v 1.30 2014/12/31 18:43:18 phx Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.29 2013/04/21 15:42:11 kiyohara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.30 2014/12/31 18:43:18 phx Exp $"); #include "opt_interrupt.h" #include "opt_multiprocessor.h" @@ -100,10 +100,15 @@ init_openpic(int node) uint32_t pci_hi, pci_mid, pci_lo; uint32_t host; uint32_t size_hi, size_lo; - } ranges[6], *rp = ranges; - unsigned char *baseaddr = NULL; + } ranges[6]; uint32_t reg[12]; int parent, len; +#if defined(PIC_OPENPIC) || defined(PIC_DISTOPENPIC) + unsigned char *baseaddr; +#endif +#ifdef PIC_OPENPIC + struct ranges *rp = ranges; +#endif #ifdef PIC_DISTOPENPIC unsigned char *isu[OPENPIC_MAX_ISUS]; int i, j; @@ -144,7 +149,6 @@ init_openpic(int node) len -= sizeof(ranges[0]); } #endif - rp = 0; /* satisfy -Wall */ return FALSE; noaadr: /* this isn't a PCI-attached openpic */ @@ -153,9 +157,9 @@ init_openpic(int node) return FALSE; if (len == sizeof(int)*2) { - baseaddr = (unsigned char *)mapiodev(reg[0], reg[1], false); aprint_verbose("Found openpic at %08x\n", reg[0]); #ifdef PIC_OPENPIC + baseaddr = (unsigned char *)mapiodev(reg[0], reg[1], false); (void)setup_openpic(baseaddr, 0); #ifdef MULTIPROCESSOR setup_openpic_ipi();
CVS commit: src/distrib/amiga/miniroot
Module Name:src Committed By: phx Date: Sat Dec 13 15:51:18 UTC 2014 Modified Files: src/distrib/amiga/miniroot: Makefile.inc Log Message: Extend size of miniroot.fs from 6m to 7m. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/distrib/amiga/miniroot/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/amiga/miniroot/Makefile.inc diff -u src/distrib/amiga/miniroot/Makefile.inc:1.18 src/distrib/amiga/miniroot/Makefile.inc:1.19 --- src/distrib/amiga/miniroot/Makefile.inc:1.18 Thu Feb 11 09:06:47 2010 +++ src/distrib/amiga/miniroot/Makefile.inc Sat Dec 13 15:51:18 2014 @@ -1,6 +1,6 @@ -# $NetBSD: Makefile.inc,v 1.18 2010/02/11 09:06:47 roy Exp $ +# $NetBSD: Makefile.inc,v 1.19 2014/12/13 15:51:18 phx Exp $ -IMAGESIZE= 6m +IMAGESIZE= 7m MAKEFS_FLAGS= -o density=4k IMAGEENDIAN= be MAKEDEVTARGETS= floppy
CVS commit: src/sys/arch/bebox/stand/boot
Module Name:src Committed By: phx Date: Fri Dec 12 15:57:30 UTC 2014 Modified Files: src/sys/arch/bebox/stand/boot: fd.c siop.c vreset.c Log Message: Fix all warnings when compiling with gcc 4.8. BeBox should be ready for 4.8 now. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/bebox/stand/boot/fd.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/bebox/stand/boot/siop.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/bebox/stand/boot/vreset.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/bebox/stand/boot/fd.c diff -u src/sys/arch/bebox/stand/boot/fd.c:1.10 src/sys/arch/bebox/stand/boot/fd.c:1.11 --- src/sys/arch/bebox/stand/boot/fd.c:1.10 Thu Oct 14 06:39:52 2010 +++ src/sys/arch/bebox/stand/boot/fd.c Fri Dec 12 15:57:30 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: fd.c,v 1.10 2010/10/14 06:39:52 kiyohara Exp $ */ +/* $NetBSD: fd.c,v 1.11 2014/12/12 15:57:30 phx Exp $ */ /*- * Copyright (C) 1997-1998 Kazuki Sakamoto (sakam...@netbsd.org) @@ -297,7 +297,7 @@ fdstrategy(void *devdata, int func, dadd int ctlr = un->ctlr; int unit = un->unit; int *stat = un->stat; - long nblock, blknum; + long blknum; int fd_skip = 0; u_char *cbuf = (u_char *)buf; @@ -306,7 +306,6 @@ fdstrategy(void *devdata, int func, dadd } fdDriveStatus(ctlr, unit, 0, stat); - nblock = un->un_type->maxseccount; sectrac = un->un_type->seccount; /* sector per track */ *rsize = 0; Index: src/sys/arch/bebox/stand/boot/siop.c diff -u src/sys/arch/bebox/stand/boot/siop.c:1.4 src/sys/arch/bebox/stand/boot/siop.c:1.5 --- src/sys/arch/bebox/stand/boot/siop.c:1.4 Sat Jun 14 20:50:12 2014 +++ src/sys/arch/bebox/stand/boot/siop.c Fri Dec 12 15:57:30 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: siop.c,v 1.4 2014/06/14 20:50:12 phx Exp $ */ +/* $NetBSD: siop.c,v 1.5 2014/12/12 15:57:30 phx Exp $ */ /* * Copyright (c) 2010 KIYOHARA Takashi * All rights reserved. @@ -625,7 +625,7 @@ siop_start(struct siop_adapter *adp, str { struct siop_xfer *siop_xfer = adp->xfer; uint32_t dsa, *script = adp->script; - int target, lun, slot; + int slot; void *scriptaddr = (void *)local_to_PCI((u_long)script); const int siop_common_xfer_size = sizeof(struct siop_common_xfer); @@ -652,8 +652,6 @@ siop_start(struct siop_adapter *adp, str } else { slot++; } - target = xs->target; - lun = xs->lun; /* * find a free scheduler slot and load it. */ Index: src/sys/arch/bebox/stand/boot/vreset.c diff -u src/sys/arch/bebox/stand/boot/vreset.c:1.13 src/sys/arch/bebox/stand/boot/vreset.c:1.14 --- src/sys/arch/bebox/stand/boot/vreset.c:1.13 Fri Oct 15 20:01:03 2010 +++ src/sys/arch/bebox/stand/boot/vreset.c Fri Dec 12 15:57:30 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: vreset.c,v 1.13 2010/10/15 20:01:03 he Exp $ */ +/* $NetBSD: vreset.c,v 1.14 2014/12/12 15:57:30 phx Exp $ */ /* * Copyright (C) 1995-1997 Gary Thomas (g...@linuxppc.org) @@ -547,8 +547,8 @@ delayLoop(int k) static void writeAttr(u_char index, u_char data, u_char videoOn) { - u_char v; - v = inb(0x3da); /* reset attr. address toggle */ + + (void)inb(0x3da); /* reset attr. address toggle */ if (videoOn) outb(0x3c0, (index & 0x1F) | 0x20); else
CVS commit: src/sys/dev
Module Name:src Committed By: phx Date: Fri Oct 17 14:38:43 UTC 2014 Modified Files: src/sys/dev: DEVNAMES Log Message: Add s390rtc(4). To generate a diff of this commit: cvs rdiff -u -r1.291 -r1.292 src/sys/dev/DEVNAMES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/DEVNAMES diff -u src/sys/dev/DEVNAMES:1.291 src/sys/dev/DEVNAMES:1.292 --- src/sys/dev/DEVNAMES:1.291 Wed Jul 16 18:32:21 2014 +++ src/sys/dev/DEVNAMES Fri Oct 17 14:38:43 2014 @@ -1,4 +1,4 @@ -# $NetBSD: DEVNAMES,v 1.291 2014/07/16 18:32:21 bouyer Exp $ +# $NetBSD: DEVNAMES,v 1.292 2014/10/17 14:38:43 phx Exp $ # # This file contains all used device names and defined attributes in # alphabetical order. New devices added to the system somewhere should first @@ -1187,6 +1187,7 @@ run MI rx MI ry vax rz pmax +s390rtc MI sab MI sableio alpha sacc hpcarm
CVS commit: src/sys/arch/ofppc/stand/ofwboot
Module Name:src Committed By: phx Date: Sat Sep 20 23:10:46 UTC 2014 Modified Files: src/sys/arch/ofppc/stand/ofwboot: Locore.c ofwstart.S version Log Message: A stack size of 8K is too small for a block buffer of 65536 bytes. Increased the stack size to 128K. This makes ofwboot work with FirmWorks OpenFirmware systems again (tested with Motorola PowerStack II). To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/ofppc/stand/ofwboot/Locore.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/ofppc/stand/ofwboot/ofwstart.S cvs rdiff -u -r1.12 -r1.13 src/sys/arch/ofppc/stand/ofwboot/version 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/ofppc/stand/ofwboot/Locore.c diff -u src/sys/arch/ofppc/stand/ofwboot/Locore.c:1.22 src/sys/arch/ofppc/stand/ofwboot/Locore.c:1.23 --- src/sys/arch/ofppc/stand/ofwboot/Locore.c:1.22 Mon Jan 12 07:49:57 2009 +++ src/sys/arch/ofppc/stand/ofwboot/Locore.c Sat Sep 20 23:10:46 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: Locore.c,v 1.22 2009/01/12 07:49:57 tsutsui Exp $ */ +/* $NetBSD: Locore.c,v 1.23 2014/09/20 23:10:46 phx Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -46,7 +46,7 @@ static void setup(void); /* this pad gets the rodata laignment right, don't EVER fiddle it */ char *pad __attribute__((__aligned__ (8))) = "pad"; -int stack[8192/4 + 4] __attribute__((__aligned__ (4), __used__)); +int stack[0x2/4 + 4] __attribute__((__aligned__ (4), __used__)); char *heapspace __attribute__((__aligned__ (4))); char altheap[0x2] __attribute__((__aligned__ (4))); Index: src/sys/arch/ofppc/stand/ofwboot/ofwstart.S diff -u src/sys/arch/ofppc/stand/ofwboot/ofwstart.S:1.3 src/sys/arch/ofppc/stand/ofwboot/ofwstart.S:1.4 --- src/sys/arch/ofppc/stand/ofwboot/ofwstart.S:1.3 Mon Apr 28 20:23:31 2008 +++ src/sys/arch/ofppc/stand/ofwboot/ofwstart.S Sat Sep 20 23:10:46 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ofwstart.S,v 1.3 2008/04/28 20:23:31 martin Exp $ */ +/* $NetBSD: ofwstart.S,v 1.4 2014/09/20 23:10:46 phx Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -95,9 +95,8 @@ _entry: _start: sync isync - lis %r1,stack@ha - addi %r1,%r1,stack@l - addi %r1,%r1,8192 + lis %r1,stack+0x2@ha + addi %r1,%r1,stack+0x2@l mfmsr %r8 li %r0,0 Index: src/sys/arch/ofppc/stand/ofwboot/version diff -u src/sys/arch/ofppc/stand/ofwboot/version:1.12 src/sys/arch/ofppc/stand/ofwboot/version:1.13 --- src/sys/arch/ofppc/stand/ofwboot/version:1.12 Thu Aug 18 09:03:28 2011 +++ src/sys/arch/ofppc/stand/ofwboot/version Sat Sep 20 23:10:46 2014 @@ -1,4 +1,4 @@ -$NetBSD: version,v 1.12 2011/08/18 09:03:28 phx Exp $ +$NetBSD: version,v 1.13 2014/09/20 23:10:46 phx Exp $ 1.1: Boot program for OpenFirmware; initial revision 1.2: Boot program rearrangement @@ -12,3 +12,4 @@ $NetBSD: version,v 1.12 2011/08/18 09:03 1.10: Change note to indicate real mode, add ldscript to support 7046 1.11: Support for RDB partitions. 1.12: Fixed MBR support, which had been broken in 1.11. +1.13: Fixed stack size. Make it work with FirmWorks again.
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: phx Date: Sun Sep 7 22:24:40 UTC 2014 Modified Files: src/sys/arch/amiga/dev: gayle_pcmcia.c Log Message: According to http://eab.abime.net/showpost.php?p=782840&postcount=115 there are two methods for a Gayle PCMCIA soft-reset. pccard_attach() only implemented a method with works on A600 and some older (?) A1200 models. I added the second method as well, to make the reset work in any case. Tested on the latest A1200 model, which failed before. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/amiga/dev/gayle_pcmcia.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/amiga/dev/gayle_pcmcia.c diff -u src/sys/arch/amiga/dev/gayle_pcmcia.c:1.29 src/sys/arch/amiga/dev/gayle_pcmcia.c:1.30 --- src/sys/arch/amiga/dev/gayle_pcmcia.c:1.29 Wed Jan 22 00:25:16 2014 +++ src/sys/arch/amiga/dev/gayle_pcmcia.c Sun Sep 7 22:24:40 2014 @@ -1,9 +1,9 @@ -/* $NetBSD: gayle_pcmcia.c,v 1.29 2014/01/22 00:25:16 christos Exp $ */ +/* $NetBSD: gayle_pcmcia.c,v 1.30 2014/09/07 22:24:40 phx Exp $ */ /* public domain */ #include -__KERNEL_RCSID(0, "$NetBSD: gayle_pcmcia.c,v 1.29 2014/01/22 00:25:16 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gayle_pcmcia.c,v 1.30 2014/09/07 22:24:40 phx Exp $"); /* PCMCIA front-end driver for A1200's and A600's. */ @@ -206,6 +206,11 @@ pccard_attach(device_t parent, device_t /* reset the card if it's already there */ if (gayle_pcmcia_status_read() & GAYLE_CCMEM_DETECT) { volatile u_int8_t x; + + gayle_intr_ack(0xff); + delay(500); + gayle_intr_ack(0xfc); + *reset_card_reg = 0x0; delay(1000); x = *reset_card_reg;
CVS commit: src/sys/arch
Module Name:src Committed By: phx Date: Fri Jun 20 09:47:15 UTC 2014 Modified Files: src/sys/arch/bebox/isa: mcclock_isa.c src/sys/arch/sandpoint/isa: mcclock_isa.c Log Message: mc146818's sc_flag indicates the time is stored in binary format, not BCD. So we should configure the chip's REGB for binary format as well. This makes the BeBox RTC finally work reliable for me. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/bebox/isa/mcclock_isa.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/sandpoint/isa/mcclock_isa.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/bebox/isa/mcclock_isa.c diff -u src/sys/arch/bebox/isa/mcclock_isa.c:1.5 src/sys/arch/bebox/isa/mcclock_isa.c:1.6 --- src/sys/arch/bebox/isa/mcclock_isa.c:1.5 Fri Jul 1 20:34:53 2011 +++ src/sys/arch/bebox/isa/mcclock_isa.c Fri Jun 20 09:47:15 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mcclock_isa.c,v 1.5 2011/07/01 20:34:53 dyoung Exp $ */ +/* $NetBSD: mcclock_isa.c,v 1.6 2014/06/20 09:47:15 phx Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -117,7 +117,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFT */ #include -__KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.5 2011/07/01 20:34:53 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.6 2014/06/20 09:47:15 phx Exp $"); #include #include @@ -225,9 +225,9 @@ mcclock_isa_attach(device_t parent, devi mcclock_isa_write(sc, MC_REGA, MC_BASE_32_KHz | MC_RATE_1024_Hz); /* - * 24 Hour clock, no interrupts please. + * 24 Hour clock, binary-format, no auto-DST and no interrupts please. */ - mcclock_isa_write(sc, MC_REGB, MC_REGB_24HR); + mcclock_isa_write(sc, MC_REGB, MC_REGB_24HR | MC_REGB_BINARY); sc->sc_year0 = 1900; sc->sc_flag = 0; Index: src/sys/arch/sandpoint/isa/mcclock_isa.c diff -u src/sys/arch/sandpoint/isa/mcclock_isa.c:1.5 src/sys/arch/sandpoint/isa/mcclock_isa.c:1.6 --- src/sys/arch/sandpoint/isa/mcclock_isa.c:1.5 Fri Jul 1 19:16:41 2011 +++ src/sys/arch/sandpoint/isa/mcclock_isa.c Fri Jun 20 09:47:15 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mcclock_isa.c,v 1.5 2011/07/01 19:16:41 dyoung Exp $ */ +/* $NetBSD: mcclock_isa.c,v 1.6 2014/06/20 09:47:15 phx Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -117,7 +117,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFT */ #include -__KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.5 2011/07/01 19:16:41 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcclock_isa.c,v 1.6 2014/06/20 09:47:15 phx Exp $"); #include #include @@ -225,9 +225,9 @@ mcclock_isa_attach(device_t parent, devi mcclock_isa_write(sc, MC_REGA, MC_BASE_32_KHz | MC_RATE_1024_Hz); /* - * 24 Hour clock, no interrupts please. + * 24 Hour clock, binary-format, no auto-DST and no interrupts please. */ - mcclock_isa_write(sc, MC_REGB, MC_REGB_24HR); + mcclock_isa_write(sc, MC_REGB, MC_REGB_24HR | MC_REGB_BINARY); sc->sc_year0 = 1900; sc->sc_flag = 0;
CVS commit: src/sys/arch/bebox/stand/boot
Module Name:src Committed By: phx Date: Sat Jun 14 20:50:12 UTC 2014 Modified Files: src/sys/arch/bebox/stand/boot: siop.c Log Message: Add missing siop_clearfifo() and some debugging output (-DDEBUG). To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/bebox/stand/boot/siop.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/bebox/stand/boot/siop.c diff -u src/sys/arch/bebox/stand/boot/siop.c:1.3 src/sys/arch/bebox/stand/boot/siop.c:1.4 --- src/sys/arch/bebox/stand/boot/siop.c:1.3 Thu Jan 3 14:03:39 2013 +++ src/sys/arch/bebox/stand/boot/siop.c Sat Jun 14 20:50:12 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: siop.c,v 1.3 2013/01/03 14:03:39 kiyohara Exp $ */ +/* $NetBSD: siop.c,v 1.4 2014/06/14 20:50:12 phx Exp $ */ /* * Copyright (c) 2010 KIYOHARA Takashi * All rights reserved. @@ -33,6 +33,12 @@ #include "boot.h" #include "sdvar.h" +#ifdef DEBUG +#define DPRINTF(x) printf x +#else +#define DPRINTF(x) +#endif + #define ALLOC(T, A) \ (T *)(((uint32_t)alloc(sizeof(T) + (A)) + (A)) & ~((A) - 1)) #define VTOPHYS(va) (uint32_t)(va) @@ -142,6 +148,25 @@ siop_ma(struct siop_adapter *adp, struct } static void +siop_clearfifo(struct siop_adapter *adp) +{ + int timo = 0; + uint8_t ctest3 = readb(adp->addr + SIOP_CTEST3); + + DPRINTF(("DMA FIFO not empty!\n")); + writeb(adp->addr + SIOP_CTEST3, ctest3 | CTEST3_CLF); + while ((readb(adp->addr + SIOP_CTEST3) & CTEST3_CLF) != 0) { + delay(1); + if (++timo > 1000) { + printf("Clear FIFO failed!\n"); + writeb(adp->addr + SIOP_CTEST3, + readb(adp->addr + SIOP_CTEST3) & ~CTEST3_CLF); + return; + } + } +} + +static void siop_sdp(struct siop_adapter *adp, struct siop_xfer *xfer, struct scsi_xfer *xs, int offset) { @@ -296,8 +321,7 @@ siop_intr(struct siop_adapter *adp) if (scratcha0 & A_flag_data) siop_ma(adp, xs); else if ((dstat & DSTAT_DFE) == 0) -printf("PHASE STATUS: siop_clearfifo...\n"); -// siop_clearfifo(adp); + siop_clearfifo(adp); CALL_SCRIPT(Ent_status); return 1; case SSTAT1_PHASE_MSGIN: @@ -309,8 +333,7 @@ printf("PHASE STATUS: siop_clearfifo...\ if (scratcha0 & A_flag_data) siop_ma(adp, xs); else if ((dstat & DSTAT_DFE) == 0) -printf("PHASE MSGIN: siop_clearfifo...\n"); -// siop_clearfifo(adp); + siop_clearfifo(adp); writeb(adp->addr + SIOP_SCRATCHA, scratcha0 & ~A_flag_data); CALL_SCRIPT(Ent_msgin); @@ -879,7 +902,24 @@ scsi_interpret_sense(struct siop_adapter sense = (struct scsi_sense_data *)xs->data; - /* otherwise use the default */ + DPRINTF((" sense debug information:\n")); + DPRINTF(("\tcode 0x%x valid %d\n", + SSD_RCODE(sense->response_code), + sense->response_code & SSD_RCODE_VALID ? 1 : 0)); + DPRINTF(("\tseg 0x%x key 0x%x ili 0x%x eom 0x%x fmark 0x%x\n", + sense->segment, + SSD_SENSE_KEY(sense->flags), + sense->flags & SSD_ILI ? 1 : 0, + sense->flags & SSD_EOM ? 1 : 0, + sense->flags & SSD_FILEMARK ? 1 : 0)); + DPRINTF(("\ninfo: 0x%x 0x%x 0x%x 0x%x followed by %d " + "extra bytes\n", + sense->info[0], + sense->info[1], + sense->info[2], + sense->info[3], + sense->extra_len)); + switch (SSD_RCODE(sense->response_code)) { /*
CVS commit: src/sys/arch
Module Name:src Committed By: phx Date: Tue Jun 10 18:37:26 UTC 2014 Modified Files: src/sys/arch/bebox/stand/boot: sd.c src/sys/arch/prep/stand/boot: sd.c Log Message: Fix SCSI reads beyond block 0x1f, by writing the READ_10/READ_16 opcode into the correct scsipi_rw_10/scsipi_rw_16 command structure. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/bebox/stand/boot/sd.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/prep/stand/boot/sd.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/bebox/stand/boot/sd.c diff -u src/sys/arch/bebox/stand/boot/sd.c:1.3 src/sys/arch/bebox/stand/boot/sd.c:1.4 --- src/sys/arch/bebox/stand/boot/sd.c:1.3 Wed Dec 19 13:53:47 2012 +++ src/sys/arch/bebox/stand/boot/sd.c Tue Jun 10 18:37:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: sd.c,v 1.3 2012/12/19 13:53:47 kiyohara Exp $ */ +/* $NetBSD: sd.c,v 1.4 2014/06/10 18:37:26 phx Exp $ */ /* * Copyright (c) 2010 KIYOHARA Takashi * All rights reserved. @@ -713,7 +713,7 @@ sdstrategy(void *f, int rw, daddr_t dblk } else if ((blkno & 0x) == blkno) { /* 10-byte CDB */ memset(&cmd_big, 0, sizeof(cmd_big)); - cmd_small.opcode = READ_10; + cmd_big.opcode = READ_10; _lto4b(blkno, cmd_big.addr); _lto2b(1, cmd_big.length); cmdlen = sizeof(cmd_big); @@ -721,7 +721,7 @@ sdstrategy(void *f, int rw, daddr_t dblk } else { /* 16-byte CDB */ memset(&cmd16, 0, sizeof(cmd16)); - cmd_small.opcode = READ_16; + cmd16.opcode = READ_16; _lto8b(blkno, cmd16.addr); _lto4b(1, cmd16.length); cmdlen = sizeof(cmd16); Index: src/sys/arch/prep/stand/boot/sd.c diff -u src/sys/arch/prep/stand/boot/sd.c:1.1 src/sys/arch/prep/stand/boot/sd.c:1.2 --- src/sys/arch/prep/stand/boot/sd.c:1.1 Sat May 19 14:40:13 2012 +++ src/sys/arch/prep/stand/boot/sd.c Tue Jun 10 18:37:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: sd.c,v 1.1 2012/05/19 14:40:13 kiyohara Exp $ */ +/* $NetBSD: sd.c,v 1.2 2014/06/10 18:37:26 phx Exp $ */ /* * Copyright (c) 2010 KIYOHARA Takashi * All rights reserved. @@ -713,7 +713,7 @@ sdstrategy(void *f, int rw, daddr_t dblk } else if ((blkno & 0x) == blkno) { /* 10-byte CDB */ memset(&cmd_big, 0, sizeof(cmd_big)); - cmd_small.opcode = READ_10; + cmd_big.opcode = READ_10; _lto4b(blkno, cmd_big.addr); _lto2b(1, cmd_big.length); cmdlen = sizeof(cmd_big); @@ -721,7 +721,7 @@ sdstrategy(void *f, int rw, daddr_t dblk } else { /* 16-byte CDB */ memset(&cmd16, 0, sizeof(cmd16)); - cmd_small.opcode = READ_16; + cmd16.opcode = READ_16; _lto8b(blkno, cmd16.addr); _lto4b(1, cmd16.length); cmdlen = sizeof(cmd16);
CVS commit: src/sys/arch/bebox/stand/boot
Module Name:src Committed By: phx Date: Mon Jun 9 17:35:01 UTC 2014 Modified Files: src/sys/arch/bebox/stand/boot: boot.h Log Message: printslots() -> printPCIslots(). Make it compile with -DDEBUG. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/bebox/stand/boot/boot.h 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/bebox/stand/boot/boot.h diff -u src/sys/arch/bebox/stand/boot/boot.h:1.9 src/sys/arch/bebox/stand/boot/boot.h:1.10 --- src/sys/arch/bebox/stand/boot/boot.h:1.9 Thu Oct 14 06:12:54 2010 +++ src/sys/arch/bebox/stand/boot/boot.h Mon Jun 9 17:35:01 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: boot.h,v 1.9 2010/10/14 06:12:54 kiyohara Exp $ */ +/* $NetBSD: boot.h,v 1.10 2014/06/09 17:35:01 phx Exp $ */ #define TICKS_PER_SEC (3300 / 4) /* 33MHz */ #define NS_PER_TICK (10 / TICKS_PER_SEC) @@ -84,7 +84,7 @@ int PCISlotnum(u_int, u_int, u_int); int PCIVendor(int); u_long PCIAddress(int, u_int, int); #ifdef DEBUG -void printslots(void); +void printPCIslots(void); #endif /*
CVS commit: src/sys/arch/bebox/stand/boot
Module Name:src Committed By: phx Date: Sun Jun 1 17:21:50 UTC 2014 Modified Files: src/sys/arch/bebox/stand/boot: monitor.c Log Message: Use int32_t, int16_t, int8_t. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/bebox/stand/boot/monitor.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/bebox/stand/boot/monitor.c diff -u src/sys/arch/bebox/stand/boot/monitor.c:1.9 src/sys/arch/bebox/stand/boot/monitor.c:1.10 --- src/sys/arch/bebox/stand/boot/monitor.c:1.9 Mon May 26 16:28:39 2008 +++ src/sys/arch/bebox/stand/boot/monitor.c Sun Jun 1 17:21:50 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: monitor.c,v 1.9 2008/05/26 16:28:39 kiyohara Exp $ */ +/* $NetBSD: monitor.c,v 1.10 2014/06/01 17:21:50 phx Exp $ */ /*- * Copyright (c) 1996, 1997 The NetBSD Foundation, Inc. @@ -44,7 +44,7 @@ void db_cmd_mt(int, char **); void db_cmd_put(int, char **); void db_cmd_help(int, char **); -int db_atob(char *); +uint32_t db_atob(char *); struct { char *name; @@ -105,10 +105,11 @@ db_monitor(void) return 0; } -int +uint32_t db_atob(char *p) { - int b = 0, width, tmp, exp, x = 0; + uint32_t b = 0; + int width, tmp, exp, x = 0; if (p[1] == 'x') { p += 2; @@ -134,7 +135,8 @@ void db_cmd_dump(int argc, char **argv) { char *p, *r, *pp; - int mode, add, size, i; + int mode, size, i; + uint32_t add; switch (argc) { case 4: @@ -172,21 +174,21 @@ db_cmd_dump(int argc, char **argv) printf("\n0x%x:", add); switch (mode) { case 1: - printf(" %x", *(unsigned char *)add); + printf(" %x", *(uint8_t *)add); add += 1; size -= 1; if (++i == 16) i = 0; break; case 2: - printf(" %x", *(unsigned short *)add); + printf(" %x", *(uint16_t *)add); add += 2; size -= 2; if (++i == 8) i = 0; break; case 4: - printf(" %x", *(unsigned int *)add); + printf(" %x", *(uint32_t *)add); add += 4; size -= 4; if (++i == 4) @@ -206,7 +208,8 @@ void db_cmd_get(int argc, char **argv) { char *p, *r; - int mode, add; + uint32_t add; + int mode; switch (argc) { case 3: @@ -238,13 +241,13 @@ db_cmd_get(int argc, char **argv) printf("0x%x: ", add); switch (mode) { case 1: - printf("0x%x", *(char *)add); + printf("0x%x", *(uint8_t *)add); break; case 2: - printf("0x%x", *(short *)add); + printf("0x%x", *(uint16_t *)add); break; case 4: - printf("0x%x", *(int *)add); + printf("0x%x", *(uint32_t *)add); break; } printf("\n"); @@ -259,7 +262,8 @@ void db_cmd_put(int argc, char **argv) { char *p, *r, *pp; - int mode, add, data; + uint32_t add, data; + int mode; switch (argc) { case 4: @@ -294,13 +298,13 @@ db_cmd_put(int argc, char **argv) printf("0x%x: 0x%x", add, data); switch (mode) { case 1: - *(char *)add = data; + *(uint8_t *)add = data; break; case 2: - *(short *)add = data; + *(uint16_t *)add = data; break; case 4: - *(int *)add = data; + *(uint32_t *)add = data; break; } printf("\n"); @@ -314,14 +318,14 @@ out: #define STR(x) #x #define FUNC(x) \ -unsigned int mf ## x(void); \ -void mt ## x(unsigned int); \ -unsigned int mf ## x() { \ - unsigned int tmp; \ +uint32_t mf ## x(void); \ +void mt ## x(uint32_t); \ +uint32_t mf ## x() { \ + uint32_t tmp; \ __asm volatile (STR(mf ## x %0) : STR(=r)(tmp)); \ return (tmp); \ } \ -void mt ## x(unsigned int data) \ +void mt ## x(uint32_t data) \ { \ __asm volatile (STR(mt ## x %0) :: STR(r)(data)); \ } \ @@ -333,8 +337,8 @@ FUNC(msr) struct { char *op; - unsigned int (*mf)(void); - void (*mt)(unsigned int); + uint32_t (*mf)(void); + void (*mt)(uint32_t); } mreg [] = { DEF(msr), { NULL, NULL, NULL }, @@ -377,7 +381,7 @@ db_cmd_mt(int argc, char **argv) while (mreg[i].op != NULL) { if (!strcmp(mreg[i].op, argv[1])) { - (mreg[i].mt)((unsigned int)db_atob(argv[2])); + (mreg[i].mt)(db_atob(argv[2])); printf(" 0x%x\n", db_atob(argv[2])); break; }
CVS commit: src
Module Name:src Committed By: phx Date: Thu May 8 13:58:34 UTC 2014 Modified Files: src/share/mk: bsd.README bsd.own.mk Added Files: src/sys/arch/ibmnws/conf: Makefile.ibmnws.inc Log Message: Use TOOL_NCDCS to turn an ibmnws kernel automatically into a valid NCD firmware image for netbooting. This is still a valid ELF kernel, but with a patched CRC checksum and image size included. To generate a diff of this commit: cvs rdiff -u -r1.331 -r1.332 src/share/mk/bsd.README cvs rdiff -u -r1.802 -r1.803 src/share/mk/bsd.own.mk cvs rdiff -u -r0 -r1.1 src/sys/arch/ibmnws/conf/Makefile.ibmnws.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.README diff -u src/share/mk/bsd.README:1.331 src/share/mk/bsd.README:1.332 --- src/share/mk/bsd.README:1.331 Mon May 5 19:06:29 2014 +++ src/share/mk/bsd.README Thu May 8 13:58:34 2014 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.README,v 1.331 2014/05/05 19:06:29 martin Exp $ +# $NetBSD: bsd.README,v 1.332 2014/05/08 13:58:34 phx Exp $ # @(#)bsd.README 8.2 (Berkeley) 4/2/94 This is the README file for the make "include" files for the NetBSD @@ -844,6 +844,8 @@ TOOL_MSGC Simple message list compiler. TOOL_MTREE Map a directory hierarchy. [mtree] +TOOL_NCDCS Turn ELF kernel into a NCD firmware image. [ncdcs] + TOOL_PAX Manipulate file archives and copy directories. [pax] TOOL_PIC Compile pictures for groff. [pic] Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.802 src/share/mk/bsd.own.mk:1.803 --- src/share/mk/bsd.own.mk:1.802 Sat Apr 26 20:25:07 2014 +++ src/share/mk/bsd.own.mk Thu May 8 13:58:34 2014 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.802 2014/04/26 20:25:07 wiz Exp $ +# $NetBSD: bsd.own.mk,v 1.803 2014/05/08 13:58:34 phx Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -361,6 +361,7 @@ TOOL_ELFTOSB= ${TOOLDIR}/bin/${_TOOL_PR TOOL_MSGC= MSGDEF=${TOOLDIR}/share/misc ${TOOLDIR}/bin/${_TOOL_PREFIX}msgc TOOL_MTREE= ${TOOLDIR}/bin/${_TOOL_PREFIX}mtree TOOL_NBPERF= ${TOOLDIR}/bin/${_TOOL_PREFIX}perf +TOOL_NCDCS= ${TOOLDIR}/bin/${_TOOL_PREFIX}ibmnws-ncdcs TOOL_PAX= ${TOOLDIR}/bin/${_TOOL_PREFIX}pax TOOL_PIC= ${TOOLDIR}/bin/${_TOOL_PREFIX}pic TOOL_PIGZ= ${TOOLDIR}/bin/${_TOOL_PREFIX}pigz @@ -462,6 +463,7 @@ TOOL_ELFTOSB= elftosb TOOL_MSGC= msgc TOOL_MTREE= mtree TOOL_NBPERF= nbperf +TOOL_NCDCS= ncdcs TOOL_PAX= pax TOOL_PIC= pic TOOL_PIGZ= pigz Added files: Index: src/sys/arch/ibmnws/conf/Makefile.ibmnws.inc diff -u /dev/null src/sys/arch/ibmnws/conf/Makefile.ibmnws.inc:1.1 --- /dev/null Thu May 8 13:58:34 2014 +++ src/sys/arch/ibmnws/conf/Makefile.ibmnws.inc Thu May 8 13:58:34 2014 @@ -0,0 +1,6 @@ +# $NetBSD: Makefile.ibmnws.inc,v 1.1 2014/05/08 13:58:34 phx Exp $ + +SYSTEM_LD_TAIL_EXTRA=; \ + echo "Convert kernel $@ into NCD firmware image."; \ + ${TOOL_NCDCS} $@ $@.ncd; \ + mv $@.ncd $@
CVS commit: src/sys/arch/powerpc/stand/mkbootimage
Module Name:src Committed By: phx Date: Tue Apr 22 21:37:52 UTC 2014 Modified Files: src/sys/arch/powerpc/stand/mkbootimage: bebox_bootrec.h mkbootimage.c pef.h Log Message: Fixed mkbootimage for 64-bit architectures. Now I can create a working BeBox boot.fs under NetBSD/amd64. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 \ src/sys/arch/powerpc/stand/mkbootimage/bebox_bootrec.h cvs rdiff -u -r1.17 -r1.18 \ src/sys/arch/powerpc/stand/mkbootimage/mkbootimage.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/powerpc/stand/mkbootimage/pef.h 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/powerpc/stand/mkbootimage/bebox_bootrec.h diff -u src/sys/arch/powerpc/stand/mkbootimage/bebox_bootrec.h:1.3 src/sys/arch/powerpc/stand/mkbootimage/bebox_bootrec.h:1.4 --- src/sys/arch/powerpc/stand/mkbootimage/bebox_bootrec.h:1.3 Mon Dec 24 14:01:24 2012 +++ src/sys/arch/powerpc/stand/mkbootimage/bebox_bootrec.h Tue Apr 22 21:37:52 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bebox_bootrec.h,v 1.3 2012/12/24 14:01:24 kiyohara Exp $ */ +/* $NetBSD: bebox_bootrec.h,v 1.4 2014/04/22 21:37:52 phx Exp $ */ #define BEBOX_HEADER_SIZE 0x6400 #define BEBOX_BLOCK_SIZE 0x200 @@ -136,9 +136,9 @@ u_char bebox_image_data12[] = { }; struct bebox_image_block { - long offset; + int32_t offset; u_char *data; - int size; + int32_t size; }; #define BEBOX_IMG(x) __CONCAT(bebox_image_data,x) @@ -162,7 +162,7 @@ struct bebox_image_block bebox_image_blo { -1 } }; -long bebox_mtime_offset[] = { +int32_t bebox_mtime_offset[] = { 0x0004, 0x048c, 0x0490, Index: src/sys/arch/powerpc/stand/mkbootimage/mkbootimage.c diff -u src/sys/arch/powerpc/stand/mkbootimage/mkbootimage.c:1.17 src/sys/arch/powerpc/stand/mkbootimage/mkbootimage.c:1.18 --- src/sys/arch/powerpc/stand/mkbootimage/mkbootimage.c:1.17 Tue Jul 9 13:10:33 2013 +++ src/sys/arch/powerpc/stand/mkbootimage/mkbootimage.c Tue Apr 22 21:37:52 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: mkbootimage.c,v 1.17 2013/07/09 13:10:33 joerg Exp $ */ +/* $NetBSD: mkbootimage.c,v 1.18 2014/04/22 21:37:52 phx Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -685,10 +685,9 @@ bebox_build_image(char *kernel, char *bo unsigned char *elf_img = NULL, *kern_img = NULL, *header_img = NULL; int i, ch, tmp, kgzlen, err, hsize = BEBOX_HEADER_SIZE; int elf_fd, bebox_fd, kern_fd, elf_img_len = 0; + off_t lenpos, kstart, kend, toff, endoff, flength; uint32_t swapped[128]; - off_t lenpos, kstart, kend, toff, endoff; - unsigned long length; - long flength, *offset; + int32_t *offset; gzFile gzf; struct stat kern_stat; struct bebox_image_block *p; @@ -818,14 +817,15 @@ bebox_build_image(char *kernel, char *bo /* fix the file size in the header */ tmp = endoff - BEBOX_HEADER_SIZE; - *(long *)(header_img + BEBOX_FILE_SIZE_OFFSET) = - (long)sa_htobe32(tmp); - *(long *)(header_img + BEBOX_FILE_SIZE_ALIGN_OFFSET) = - (long)sa_htobe32(roundup(tmp, BEBOX_FILE_BLOCK_SIZE)); + *(int32_t *)(header_img + BEBOX_FILE_SIZE_OFFSET) = + (int32_t)sa_htobe32(tmp); + *(int32_t *)(header_img + BEBOX_FILE_SIZE_ALIGN_OFFSET) = + (int32_t)sa_htobe32(roundup(tmp, BEBOX_FILE_BLOCK_SIZE)); gettimeofday(&tp, 0); for (offset = bebox_mtime_offset; *offset != -1; offset++) - *(long *)(header_img + *offset) = (long)sa_htobe32(tp.tv_sec); + *(int32_t *)(header_img + *offset) = + (int32_t)sa_htobe32(tp.tv_sec); write(bebox_fd, header_img, BEBOX_HEADER_SIZE); Index: src/sys/arch/powerpc/stand/mkbootimage/pef.h diff -u src/sys/arch/powerpc/stand/mkbootimage/pef.h:1.2 src/sys/arch/powerpc/stand/mkbootimage/pef.h:1.3 --- src/sys/arch/powerpc/stand/mkbootimage/pef.h:1.2 Sat Oct 16 05:05:09 2010 +++ src/sys/arch/powerpc/stand/mkbootimage/pef.h Tue Apr 22 21:37:52 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pef.h,v 1.2 2010/10/16 05:05:09 kiyohara Exp $ */ +/* $NetBSD: pef.h,v 1.3 2014/04/22 21:37:52 phx Exp $ */ /*- * Copyright (C) 1995-1997 Gary Thomas (g...@linuxppc.org) @@ -34,17 +34,17 @@ struct FileHeader { - unsigned long magic; - unsigned long fileTypeID; - unsigned long archID; - unsigned long versionNumber; - unsigned long dateTimeStamp; - unsigned long definVersion; - unsigned long implVersion; - unsigned long currentVersion; - unsigned short numSections; - unsigned short loadableSections; - unsigned long memoryAddress; + uint32_t magic; + uint32_t fileTypeID; + uint32_t archID; + uint32_t versionNumber; + uint32_t dateTimeStamp; + uint32_t definVersion; + uint32_t implVersion; + uint32_t currentVersion; + uint16_t numSections; + uint16_t loadableSections; + uint32_t memoryAddress; }; #define PEF_MAGIC 0x4A6F7921 /* Joy! */ @@ -53,16 +53,16 @@ struct FileHeader struct SectionHeader { - unsigned long sectionName; - unsigned long sectionAddress; - unsigned long execSize; - unsigned long initSize; - unsi
CVS commit: src/sys/arch/sandpoint/conf
Module Name:src Committed By: phx Date: Wed Mar 5 14:13:20 UTC 2014 Modified Files: src/sys/arch/sandpoint/conf: GENERIC Log Message: Enabled SYSV* options, which all ports have (and which is needed by 3rd party software like SANE, e.g.). Added ugen*. To generate a diff of this commit: cvs rdiff -u -r1.80 -r1.81 src/sys/arch/sandpoint/conf/GENERIC 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/sandpoint/conf/GENERIC diff -u src/sys/arch/sandpoint/conf/GENERIC:1.80 src/sys/arch/sandpoint/conf/GENERIC:1.81 --- src/sys/arch/sandpoint/conf/GENERIC:1.80 Sun Jun 30 21:38:58 2013 +++ src/sys/arch/sandpoint/conf/GENERIC Wed Mar 5 14:13:20 2014 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.80 2013/06/30 21:38:58 rmind Exp $ +# $NetBSD: GENERIC,v 1.81 2014/03/05 14:13:20 phx Exp $ # # machine description file for GENERIC NAS # @@ -22,7 +22,7 @@ include "arch/sandpoint/conf/std.sandpo options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.80 $" +#ident "GENERIC-$Revision: 1.81 $" maxusers 32 @@ -34,9 +34,9 @@ maxusers 32 options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT options KTRACE -#options SYSVMSG # System V message queues -#options SYSVSEM # System V semaphores -#options SYSVSHM # System V shared memory +options SYSVMSG # System V message queues +options SYSVSEM # System V semaphores +options SYSVSHM # System V shared memory #options MODULAR # module(7) support #options USERCONF # userconf(4) support @@ -205,7 +205,26 @@ viaide* at pci? dev ? function ? # VIA atabus* at ata? # IDE drives -wd* at atabus? drive ? flags 0x # the drives themselves +# Flags are used only with controllers that support DMA operations +# and mode settings (e.g. some pciide controllers) +# The lowest order four bits (rightmost digit) of the flags define the PIO +# mode to use, the next set of four bits the DMA mode and the third set the +# UltraDMA mode. For each set of four bits, the 3 lower bits define the mode +# to use, and the last bit must be 1 for this setting to be used. +# For DMA and UDMA, 0xf () means 'disable'. +# 0x0fac means 'use PIO mode 4, DMA mode 2, disable UltraDMA'. +# (0xc=1100, 0xa=1010, 0xf=) +# 0x means "use whatever the drive claims to support". +wd* at atabus? drive ? flags 0x + +# ATAPI bus support +atapibus* at atapi? + +# ATAPI devices +# flags have the same meaning as for IDE drives. +cd* at atapibus? drive ? flags 0x # ATAPI CD-ROM drives +sd* at atapibus? drive ? flags 0x # ATAPI disk drives +uk* at atapibus? drive ? flags 0x # ATAPI unknown # PCI network interfaces ral* at pci? dev ? function ? # Ralink Technology RT25x0 802.11a/b/g @@ -247,19 +266,23 @@ uvideo* at uhub? # USB Video Class cap video* at videobus? # USB printer -ulpt* at uhub? port ? configuration ? interface ? # USB Printer +ulpt* at uhub? port ? configuration ? interface ? # USB Mass Storage umass* at uhub? port ? configuration ? interface ? wd* at umass? -scsibus* at umass? -sd* at scsibus? target ? lun ? # SCSI disk drives -cd* at scsibus? target ? lun ? # SCSI CD-ROM drives +# USB scanners +#uscanner* at uhub? port ? +ugen* at uhub? port ? configuration ? interface ? # USB Generic driver + +# SCSI bus support +scsibus* at umass? + +# SCSI devices +sd* at scsibus? target ? lun ? # SCSI disk drives +cd* at scsibus? target ? lun ? # SCSI CD-ROM drives -atapibus* at atapi? -sd* at atapibus? drive ? flags 0x # ATAPI disk drives -cd* at atapibus? drive ? flags 0x # ATAPI CD-ROM drives # # Pseudo-Devices
CVS commit: src/sys/arch/sandpoint/isa
Module Name:src Committed By: phx Date: Fri Feb 7 09:22:02 UTC 2014 Modified Files: src/sys/arch/sandpoint/isa: isaclock.c Log Message: Replaced enable/disable_intr by splhigh/splx. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/sandpoint/isa/isaclock.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/sandpoint/isa/isaclock.c diff -u src/sys/arch/sandpoint/isa/isaclock.c:1.13 src/sys/arch/sandpoint/isa/isaclock.c:1.14 --- src/sys/arch/sandpoint/isa/isaclock.c:1.13 Sat Mar 14 21:04:15 2009 +++ src/sys/arch/sandpoint/isa/isaclock.c Fri Feb 7 09:22:02 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: isaclock.c,v 1.13 2009/03/14 21:04:15 dsl Exp $ */ +/* $NetBSD: isaclock.c,v 1.14 2014/02/07 09:22:02 phx Exp $ */ /*- * Copyright (c) 1990 The Regents of the University of California. @@ -121,7 +121,7 @@ WITH THE USE OR PERFORMANCE OF THIS SOFT */ #include -__KERNEL_RCSID(0, "$NetBSD: isaclock.c,v 1.13 2009/03/14 21:04:15 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: isaclock.c,v 1.14 2014/02/07 09:22:02 phx Exp $"); #include #include @@ -140,9 +140,6 @@ __KERNEL_RCSID(0, "$NetBSD: isaclock.c,v #include #include -extern void disable_intr(void); /* In locore.S */ -extern void enable_intr(void); /* In locore.S */ - void sysbeepstop(void *); void sysbeep(int, int); @@ -151,10 +148,12 @@ static int beeping; void sysbeepstop(void *arg) { + int s; + /* disable counter 2 */ - disable_intr(); + s = splhigh(); /* FIXME */ isa_outb(PITAUX_PORT, isa_inb(PITAUX_PORT) & ~PIT_SPKR); - enable_intr(); + splx(s); beeping = 0; } @@ -164,6 +163,7 @@ sysbeep(int pitch, int period) static callout_t sysbeep_ch; static int last_pitch; static bool again; + int s; if (!again) { callout_init(&sysbeep_ch, 0); @@ -178,13 +178,13 @@ sysbeep(int pitch, int period) return; } if (!beeping || last_pitch != pitch) { - disable_intr(); + s = splhigh(); /* FIXME */ isa_outb(IO_TIMER1 + TIMER_MODE, TIMER_SEL2 | TIMER_16BIT | TIMER_SQWAVE); isa_outb(IO_TIMER1 + TIMER_CNTR2, TIMER_DIV(pitch) % 256); isa_outb(IO_TIMER1 + TIMER_CNTR2, TIMER_DIV(pitch) / 256); isa_outb(PITAUX_PORT, isa_inb(PITAUX_PORT) | PIT_SPKR); /* enable counter 2 */ - enable_intr(); + splx(s); } last_pitch = pitch; beeping = 1;
CVS commit: src/sys/arch/sandpoint/sandpoint
Module Name:src Committed By: phx Date: Fri Feb 7 08:51:34 UTC 2014 Modified Files: src/sys/arch/sandpoint/sandpoint: locore.S Log Message: Remove enable_intr() and disable_intr(), which are unused. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sandpoint/sandpoint/locore.S 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/sandpoint/sandpoint/locore.S diff -u src/sys/arch/sandpoint/sandpoint/locore.S:1.23 src/sys/arch/sandpoint/sandpoint/locore.S:1.24 --- src/sys/arch/sandpoint/sandpoint/locore.S:1.23 Mon Jun 20 19:56:13 2011 +++ src/sys/arch/sandpoint/sandpoint/locore.S Fri Feb 7 08:51:34 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.23 2011/06/20 19:56:13 matt Exp $ */ +/* $NetBSD: locore.S,v 1.24 2014/02/07 08:51:34 phx Exp $ */ /* $OpenBSD: locore.S,v 1.4 1997/01/26 09:06:38 rahnds Exp $ */ /* @@ -129,20 +129,6 @@ __start: loop: b loop /* not reached */ - .globl _C_LABEL(enable_intr) -_C_LABEL(enable_intr): - mfmsr 3 - ori 3,3,PSL_EE@l - mtmsr 3 - blr - - .globl _C_LABEL(disable_intr) -_C_LABEL(disable_intr): - mfmsr 3 - andi. 3,3,~PSL_EE@l - mtmsr 3 - blr - .globl _C_LABEL(jump_to_ppc_reset_entry) _C_LABEL(jump_to_ppc_reset_entry): mfmsr 3
CVS commit: src/sys/arch/sandpoint/stand/altboot
Module Name:src Committed By: phx Date: Sun Sep 15 18:22:57 UTC 2013 Modified Files: src/sys/arch/sandpoint/stand/altboot: version Log Message: New version can read the MAC address for QNAP systems from flash. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sandpoint/stand/altboot/version 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/sandpoint/stand/altboot/version diff -u src/sys/arch/sandpoint/stand/altboot/version:1.6 src/sys/arch/sandpoint/stand/altboot/version:1.7 --- src/sys/arch/sandpoint/stand/altboot/version:1.6 Sun Jan 22 13:08:17 2012 +++ src/sys/arch/sandpoint/stand/altboot/version Sun Sep 15 18:22:57 2013 @@ -14,3 +14,5 @@ 1.9: Support PATA drive configuration option. Wait until drives are ready after cold-start. Wake up drives from standby mode. A default command line can be saved to flash as initrd image. +1.10: Read correct MAC address from flash on QNAP-TS systems with re(4) + NIC.
CVS commit: src/sys/arch/sandpoint
Module Name:src Committed By: phx Date: Sat May 25 15:07:49 UTC 2013 Modified Files: src/sys/arch/sandpoint: README.NAS Log Message: Added another three NH23x compatible products. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/sandpoint/README.NAS 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/sandpoint/README.NAS diff -u src/sys/arch/sandpoint/README.NAS:1.22 src/sys/arch/sandpoint/README.NAS:1.23 --- src/sys/arch/sandpoint/README.NAS:1.22 Mon Nov 26 17:56:17 2012 +++ src/sys/arch/sandpoint/README.NAS Sat May 25 15:07:49 2013 @@ -1,4 +1,4 @@ -$NetBSD: README.NAS,v 1.22 2012/11/26 17:56:17 phx Exp $ +$NetBSD: README.NAS,v 1.23 2013/05/25 15:07:49 phx Exp $ MPC8241/8245 NAS products @@ -31,10 +31,11 @@ stge.15 acardide.16 D-Link DSM-G600 (Rev >> Board type BRD_NH230NAS << re.15 iteide.16 Netronix NH-230, Allnet ALL6250, Encore ENNHD-1000, - Planex NAS-01G + Planex NAS-01G, Lindy NAS Personal Server Premium - IDE re.15 satalink.16 Netronix NH-231, Allnet ALL6260, Longshine LCS-8311, Fujitsu-Siemens AMS150, Fujitsu-Siemens SBLAN2, - Vibe NS-349-S + Vibe NS-349-S, SinanPower GigaBit LAN NAS-349, + Lindy NAS Personal Server Premium - SATA PCI line/pin and EPIC IRQ assignments
CVS commit: src/sys/arch/sandpoint/sandpoint
Module Name:src Committed By: phx Date: Tue Feb 19 15:58:19 UTC 2013 Modified Files: src/sys/arch/sandpoint/sandpoint: satmgr.c Log Message: Implement real hardware power-off for DSM-G600 using the "ZWC" command. It seems that not all microcontrollers support the command, though, so the old solution to flash the power LED is still present as a fallback. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/sandpoint/sandpoint/satmgr.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/sandpoint/sandpoint/satmgr.c diff -u src/sys/arch/sandpoint/sandpoint/satmgr.c:1.23 src/sys/arch/sandpoint/sandpoint/satmgr.c:1.24 --- src/sys/arch/sandpoint/sandpoint/satmgr.c:1.23 Tue May 15 02:14:13 2012 +++ src/sys/arch/sandpoint/sandpoint/satmgr.c Tue Feb 19 15:58:19 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: satmgr.c,v 1.23 2012/05/15 02:14:13 nisimura Exp $ */ +/* $NetBSD: satmgr.c,v 1.24 2013/02/19 15:58:19 phx Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -847,8 +847,11 @@ static void dpwroff(struct satmgr_softc *sc) { + send_sat(sc, "ZWC\n"); + /* - * The DSM-G600 has no hardware-shutdown, so we flash the power LED + * When this line is reached, then this board revision doesn't + * support hardware-shutdown, so we flash the power LED * to indicate that the device can be switched off. */ send_sat(sc, "SYN\nSYN\n");
CVS commit: src/sys/dev/ic
Module Name:src Committed By: phx Date: Mon Feb 4 17:19:18 UTC 2013 Modified Files: src/sys/dev/ic: msm6242breg.h Log Message: 24h-mode is indicated by bit 2 of control register F. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/dev/ic/msm6242breg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/msm6242breg.h diff -u src/sys/dev/ic/msm6242breg.h:1.1 src/sys/dev/ic/msm6242breg.h:1.2 --- src/sys/dev/ic/msm6242breg.h:1.1 Wed Nov 14 01:52:48 2012 +++ src/sys/dev/ic/msm6242breg.h Mon Feb 4 17:19:17 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: msm6242breg.h,v 1.1 2012/11/14 01:52:48 rkujawa Exp $ */ +/* $NetBSD: msm6242breg.h,v 1.2 2013/02/04 17:19:17 phx Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -59,7 +59,7 @@ #define MSM6242B_CONTROL_E 0xE #define MSM6242B_CONTROL_F 0xF -#define MSM6242B_CONTROL_F_24H __BIT(3) +#define MSM6242B_CONTROL_F_24H __BIT(2) #define MSM6242B_MASK 0xF /* 4 significant bits only */ #define MSM6242B_SIZE 0x10 @@ -67,4 +67,3 @@ #define MSM6242B_BASE_YEAR 1900 #endif /* _MSM6242BREG_H_ */ -
CVS commit: src/sys/arch/amiga/conf
Module Name:src Committed By: phx Date: Fri Feb 1 14:48:16 UTC 2013 Modified Files: src/sys/arch/amiga/conf: DRACO GENERIC GENERIC.in INSTALL Log Message: Include two MII PHY drivers, as needed by certain PCMCIA network cards. More PHY drivers should be added when needed. To generate a diff of this commit: cvs rdiff -u -r1.164 -r1.165 src/sys/arch/amiga/conf/DRACO cvs rdiff -u -r1.296 -r1.297 src/sys/arch/amiga/conf/GENERIC cvs rdiff -u -r1.110 -r1.111 src/sys/arch/amiga/conf/GENERIC.in cvs rdiff -u -r1.115 -r1.116 src/sys/arch/amiga/conf/INSTALL 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/amiga/conf/DRACO diff -u src/sys/arch/amiga/conf/DRACO:1.164 src/sys/arch/amiga/conf/DRACO:1.165 --- src/sys/arch/amiga/conf/DRACO:1.164 Tue Jan 29 21:06:15 2013 +++ src/sys/arch/amiga/conf/DRACO Fri Feb 1 14:48:15 2013 @@ -1,4 +1,4 @@ -# $NetBSD: DRACO,v 1.164 2013/01/29 21:06:15 rkujawa Exp $ +# $NetBSD: DRACO,v 1.165 2013/02/01 14:48:15 phx Exp $ # # This file was automatically created. # Changes will be lost when make is run in this directory. @@ -29,7 +29,7 @@ include "arch/amiga/conf/std.amiga" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.164 $" +#ident "GENERIC-$Revision: 1.165 $" maxusers 8 Index: src/sys/arch/amiga/conf/GENERIC diff -u src/sys/arch/amiga/conf/GENERIC:1.296 src/sys/arch/amiga/conf/GENERIC:1.297 --- src/sys/arch/amiga/conf/GENERIC:1.296 Tue Jan 29 21:06:16 2013 +++ src/sys/arch/amiga/conf/GENERIC Fri Feb 1 14:48:15 2013 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.296 2013/01/29 21:06:16 rkujawa Exp $ +# $NetBSD: GENERIC,v 1.297 2013/02/01 14:48:15 phx Exp $ # # This file was automatically created. # Changes will be lost when make is run in this directory. @@ -29,7 +29,7 @@ include "arch/amiga/conf/std.amiga" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.296 $" +#ident "GENERIC-$Revision: 1.297 $" maxusers 8 @@ -456,19 +456,21 @@ sd* at atapibus? drive ? # ATAPI disk d pccard0 at mainbus0 pcmcia* at pccard0 -com* at pcmcia? function ? # Modems and serial cards -pcmcom* at pcmcia? function ? # PCMCIA multi-port serial cards -aic* at pcmcia? function ? # Adaptec APA-1460 SCSI +com* at pcmcia? function ? # Modems and serial cards +pcmcom* at pcmcia? function ? # PCMCIA multi-port serial cards +aic* at pcmcia? function ? # Adaptec APA-1460 SCSI wdc* at pcmcia? function ? -awi* at pcmcia? function ? # BayStack 650 (802.11FH) -ep* at pcmcia? function ? # 3Com 3c589 and 3c562 Ethernet -mbe* at pcmcia? function ? # MB8696x based Ethernet -ne* at pcmcia? function ? # NE2000-compatible Ethernet -sm* at pcmcia? function ? # Megahertz Ethernet +awi* at pcmcia? function ? # BayStack 650 (802.11FH) +ep* at pcmcia? function ? # 3Com 3c589 and 3c562 Ethernet +mbe* at pcmcia? function ? # MB8696x based Ethernet +ne* at pcmcia? function ? # NE2000-compatible Ethernet +sm* at pcmcia? function ? # Megahertz Ethernet mhzc* at pcmcia? function ? # Megahertz Ethernet/Modem combo cards com* at mhzc? sm* at mhzc? +nsphyter* at mii? phy ? # NS83843 PHYs +ukphy* at mii? phy ? # generic unknown PHYs drsc0 at mainbus0 # DraCo scsi scsibus* at drsc0 Index: src/sys/arch/amiga/conf/GENERIC.in diff -u src/sys/arch/amiga/conf/GENERIC.in:1.110 src/sys/arch/amiga/conf/GENERIC.in:1.111 --- src/sys/arch/amiga/conf/GENERIC.in:1.110 Tue Jan 29 21:04:55 2013 +++ src/sys/arch/amiga/conf/GENERIC.in Fri Feb 1 14:48:15 2013 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC.in,v 1.110 2013/01/29 21:04:55 rkujawa Exp $ +# $NetBSD: GENERIC.in,v 1.111 2013/02/01 14:48:15 phx Exp $ # ## # GENERIC machine description file @@ -52,7 +52,7 @@ include "arch/amiga/conf/std.amiga" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.110 $" +#ident "GENERIC-$Revision: 1.111 $" m4_ifdef(`INSTALL_CONFIGURATION', `m4_dnl makeoptions COPTS="-Os" @@ -537,19 +537,21 @@ sd* at atapibus? drive ? # ATAPI disk d pccard0 at mainbus0 pcmcia* at pccard0 -com* at pcmcia? function ? # Modems and serial cards -pcmcom* at pcmcia? function ? # PCMCIA multi-port serial cards -aic* at pcmcia? function ? # Adaptec APA-1460 SCSI +com* at pcmcia? function ? # Modems and serial cards +pcmcom* at pcmcia? function ? # PCMCIA multi-port serial cards +aic* at pcmcia? function ? # Adaptec APA-1460 SCSI wdc* at pcmcia? function ? -awi* at pcmcia? function ? # BayStack 650 (802.11FH) -ep* at pcmcia? function ? # 3Com 3c589 and 3c562 Ethernet -mbe* at pcmcia? function ? # MB8696x based Ethernet -ne* at pcmcia? function ? # NE2000-compatible Ethernet -sm* at pcmcia? function ? # Megahertz Ethernet +awi* at pcmcia? function ? # BayStack 650 (802.11FH) +ep* at pcmcia? function ? # 3Com 3c589 and 3c562
CVS commit: src/sys/arch/sandpoint/stand/altboot
Module Name:src Committed By: phx Date: Tue Dec 25 17:07:07 UTC 2012 Modified Files: src/sys/arch/sandpoint/stand/altboot: brdsetup.c rge.c Log Message: QNAP V200 boards have no EEPROM for the MAC address, so all devices default to the same address (00:e0:4c:69:20:01). Now we read the real MAC address from the flash ROM. It is stored at the beginning of a 512-byte block in ASCII format. Some QNAP's have a broken ext2 file system, so we cannot look for the file ETH0.MAC_ADDR therein, but have to search the whole flash in 512-byte steps for candidates... To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/sandpoint/stand/altboot/brdsetup.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/sandpoint/stand/altboot/rge.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/sandpoint/stand/altboot/brdsetup.c diff -u src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.31 src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.32 --- src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.31 Mon Apr 16 16:55:29 2012 +++ src/sys/arch/sandpoint/stand/altboot/brdsetup.c Tue Dec 25 17:07:06 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: brdsetup.c,v 1.31 2012/04/16 16:55:29 phx Exp $ */ +/* $NetBSD: brdsetup.c,v 1.32 2012/12/25 17:07:06 phx Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -1254,6 +1254,41 @@ read_mac_string(uint8_t *mac, char *p) } /* + * Scan through the Flash memory and look for a string starting at 512 bytes + * block boundaries, matching the format: xx:xx:xx:xx:xx:xx, where "x" + * are hexadecimal digits. + * Read the first match as our MAC address. + * The start address of the search, p, *must* be dividable by 512! + * Return false when no suitable MAC string was found. + */ +static int +find_mac_string(uint8_t *mac, char *p) +{ + int i; + + for (;;) { + for (i = 0; i < 3 * 6; i += 3) { + if (!isxdigit((unsigned)p[i]) || + !isxdigit((unsigned)p[i + 1])) +break; + if ((i < 5 && p[i + 2] != ':') || + (i >= 5 && p[i + 2] != '\0')) +break; + } + if (i >= 6) { + /* found a valid MAC address */ + read_mac_string(mac, p); + return 1; + } + if (p >= (char *)0xfe00) + break; + p += 0x200; + } + return 0; +} + + +/* * For cost saving reasons some NAS boxes lack SEEPROM for NIC's * ethernet address and keep it in their Flash memory instead. */ @@ -1272,6 +1307,10 @@ read_mac_from_flash(uint8_t *mac) case BRD_DLINKDSM: read_mac_string(mac, (char *)0xfff0ff80); return; + case BRD_QNAPTS: + if (find_mac_string(mac, (char *)0xfff0)) + return; + break; default: printf("Warning: This board has no known method defined " "to determine its MAC address!\n"); Index: src/sys/arch/sandpoint/stand/altboot/rge.c diff -u src/sys/arch/sandpoint/stand/altboot/rge.c:1.6 src/sys/arch/sandpoint/stand/altboot/rge.c:1.7 --- src/sys/arch/sandpoint/stand/altboot/rge.c:1.6 Sun Oct 30 21:08:33 2011 +++ src/sys/arch/sandpoint/stand/altboot/rge.c Tue Dec 25 17:07:06 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: rge.c,v 1.6 2011/10/30 21:08:33 phx Exp $ */ +/* $NetBSD: rge.c,v 1.7 2012/12/25 17:07:06 phx Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -102,6 +102,9 @@ struct desc { #define RCR_AM (1U << 2) /* accept multicast frame */ #define RCR_APM (1U << 1) /* accept unicast frame */ #define RCR_AAP (1U << 0) /* promiscuous */ +#define RGE_EECMD 0x50 /* EEPROM command register */ +#define EECMD_LOCK 0x00 +#define EECMD_UNLOCK 0xc0 #define RGE_PHYAR 0x60 /* PHY access */ #define RGE_PHYSR 0x6c /* PHY status */ #define RGE_RMS 0xda /* Rx maximum frame size */ @@ -146,7 +149,8 @@ rge_init(unsigned tag, void *data) unsigned val; struct local *l; struct desc *txd, *rxd; - uint8_t *en = data; + uint32_t reg; + uint8_t *en; l = ALLOC(struct local, 256); /* desc alignment */ memset(l, 0, sizeof(struct local)); @@ -158,14 +162,27 @@ rge_init(unsigned tag, void *data) } while (val & CR_RESET); mii_initphy(l); - en = data; - en[0] = CSR_READ_1(l, RGE_IDR0); - en[1] = CSR_READ_1(l, RGE_IDR1); - en[2] = CSR_READ_1(l, RGE_IDR2); - en[3] = CSR_READ_1(l, RGE_IDR3); - en[4] = CSR_READ_1(l, RGE_IDR4); - en[5] = CSR_READ_1(l, RGE_IDR5); + + if (brdtype == BRD_QNAPTS) { + /* read the MAC from flash and write it into the ID-Regs */ + read_mac_from_flash(en); + + CSR_WRITE_1(l, RGE_EECMD, EECMD_UNLOCK); + reg = en[0] | (en[1] << 8) | (en[2] << 16) | (en[3] << 24); + CSR_WRITE_4(l, RGE_IDR0, reg); + reg = en[4] | (en[5] << 8); + CSR_WRITE_4(l, RGE_IDR4, reg); + CSR_WRITE_1(l, RGE_EECMD, EECMD_LOCK); + } else { + /* pretent the ID-Regs have the correct address */ + en[0] = CSR_READ_1(l, RGE_IDR0); + en[1] = CSR_READ_1(l, RGE_IDR1); + en[2] = CSR_READ_1(l, RGE_IDR2); + en[3] = CSR_READ_1(l, RGE_IDR3); + en[4] = CSR_READ_1(l, RGE_IDR4); + en[5] = CSR_READ_1(l, RGE_IDR5); + } printf("MAC
CVS commit: src/sys/arch/sandpoint/stand/altboot
Module Name:src Committed By: phx Date: Tue Dec 25 17:02:35 UTC 2012 Modified Files: src/sys/arch/sandpoint/stand/altboot: main.c Log Message: Add a DEBUG function to search the Flash for byte-streams, as U-Boot usually doesn't offer a search function. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sandpoint/stand/altboot/main.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/sandpoint/stand/altboot/main.c diff -u src/sys/arch/sandpoint/stand/altboot/main.c:1.21 src/sys/arch/sandpoint/stand/altboot/main.c:1.22 --- src/sys/arch/sandpoint/stand/altboot/main.c:1.21 Mon May 21 21:34:16 2012 +++ src/sys/arch/sandpoint/stand/altboot/main.c Tue Dec 25 17:02:35 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.21 2012/05/21 21:34:16 dsl Exp $ */ +/* $NetBSD: main.c,v 1.22 2012/12/25 17:02:35 phx Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -111,6 +111,7 @@ static int parse_cmdline(char **, int, c static int is_space(char); #ifdef DEBUG static void sat_test(void); +static void findflash(void); #endif #define BNAME_DEFAULT "wd0:" @@ -236,12 +237,21 @@ main(int argc, char *argv[], char *boota n / 100); if (tstchar()) { #ifdef DEBUG - if (toupper(getchar()) == 'C') { + unsigned c; + + c = toupper(getchar()); + if (c == 'C') { /* controller test terminal */ sat_test(); n = 200; continue; } + else if (c == 'F') { +/* find strings in Flash ROM */ +findflash(); +n = 200; +continue; + } #else (void)getchar(); #endif @@ -665,6 +675,40 @@ is_space(char c) #ifdef DEBUG static void +findflash(void) +{ + char buf[256]; + int i, n; + unsigned char c, *p; + + for (;;) { + printf("\nfind> "); + gets(buf); + if (tolower((unsigned)buf[0]) == 'x') + break; + for (i = 0, n = 0, c = 0; buf[i]; i++) { + c <<= 4; + c |= hex2nibble(buf[i]); + if (i & 1) +buf[n++] = c; + } + printf("Searching for:"); + for (i = 0; i < n; i++) + printf(" %02x", buf[i]); + printf("\n"); + for (p = (unsigned char *)0xff00; + p <= (unsigned char *)(0x-n); p++) { + for (i = 0; i < n; i++) { +if (p[i] != buf[i]) + break; + } + if (i >= n) +printf("Found at %08x\n", (unsigned)p); + } + } +} + +static void sat_test(void) { char buf[1024];
CVS commit: src/share/man/man8/man8.sandpoint
Module Name:src Committed By: phx Date: Thu Nov 29 10:44:37 UTC 2012 Modified Files: src/share/man/man8/man8.sandpoint: altboot.8 Log Message: Mention Realtek driver bugs in the BUGS section. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/share/man/man8/man8.sandpoint/altboot.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man8/man8.sandpoint/altboot.8 diff -u src/share/man/man8/man8.sandpoint/altboot.8:1.7 src/share/man/man8/man8.sandpoint/altboot.8:1.8 --- src/share/man/man8/man8.sandpoint/altboot.8:1.7 Sun Jan 22 16:41:42 2012 +++ src/share/man/man8/man8.sandpoint/altboot.8 Thu Nov 29 10:44:37 2012 @@ -1,4 +1,4 @@ -.\" $NetBSD: altboot.8,v 1.7 2012/01/22 16:41:42 wiz Exp $ +.\" $NetBSD: altboot.8,v 1.8 2012/11/29 10:44:37 phx Exp $ .\" .\" Copyright (c) 2011 The NetBSD Foundation, Inc. .\" All rights reserved. @@ -276,3 +276,7 @@ The .Nm first appeared in .Nx 6.0 . +.Sh BUGS +The Realtek Gigabit Ethernet driver does not work correctly at 1000 Mbps. +Another known problem of this driver is that it runs into a timeout after +a coldstart. The system has to be rebooted at least once to make it work.
CVS commit: src/sys/arch/sandpoint
Module Name:src Committed By: phx Date: Mon Nov 26 17:56:17 UTC 2012 Modified Files: src/sys/arch/sandpoint: README.NAS Log Message: Add another NH-231 clone to the list: Vibe NS-349-S To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/sandpoint/README.NAS 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/sandpoint/README.NAS diff -u src/sys/arch/sandpoint/README.NAS:1.21 src/sys/arch/sandpoint/README.NAS:1.22 --- src/sys/arch/sandpoint/README.NAS:1.21 Sun Nov 6 00:28:12 2011 +++ src/sys/arch/sandpoint/README.NAS Mon Nov 26 17:56:17 2012 @@ -1,4 +1,4 @@ -$NetBSD: README.NAS,v 1.21 2011/11/06 00:28:12 phx Exp $ +$NetBSD: README.NAS,v 1.22 2012/11/26 17:56:17 phx Exp $ MPC8241/8245 NAS products @@ -33,7 +33,8 @@ stge.15 acardide.16 D-Link DSM-G600 (Rev re.15 iteide.16 Netronix NH-230, Allnet ALL6250, Encore ENNHD-1000, Planex NAS-01G re.15 satalink.16 Netronix NH-231, Allnet ALL6260, Longshine LCS-8311, - Fujitsu-Siemens AMS150, Fujitsu-Siemens SBLAN2 + Fujitsu-Siemens AMS150, Fujitsu-Siemens SBLAN2, + Vibe NS-349-S PCI line/pin and EPIC IRQ assignments
CVS commit: src/sys/arch/macppc/dev
Module Name:src Committed By: phx Date: Fri Nov 2 20:09:02 UTC 2012 Modified Files: src/sys/arch/macppc/dev: awacs.c Log Message: My PowerMac3,1 is using gpio4 to detect a connected headphone, and I would bet that the same is true for PowerMac3,2. To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/macppc/dev/awacs.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/macppc/dev/awacs.c diff -u src/sys/arch/macppc/dev/awacs.c:1.42 src/sys/arch/macppc/dev/awacs.c:1.43 --- src/sys/arch/macppc/dev/awacs.c:1.42 Thu Nov 24 03:35:57 2011 +++ src/sys/arch/macppc/dev/awacs.c Fri Nov 2 20:09:02 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: awacs.c,v 1.42 2011/11/24 03:35:57 mrg Exp $ */ +/* $NetBSD: awacs.c,v 1.43 2012/11/02 20:09:02 phx Exp $ */ /*- * Copyright (c) 2000 Tsubai Masanari. All rights reserved. @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: awacs.c,v 1.42 2011/11/24 03:35:57 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: awacs.c,v 1.43 2012/11/02 20:09:02 phx Exp $"); #include #include @@ -288,7 +288,9 @@ static const char *detect_reversed[] = { "AAPL,3500", NULL}; -static const char *use_gpio4[] = { "PowerMac3,3", +static const char *use_gpio4[] = { "PowerMac3,1", + "PowerMac3,2", + "PowerMac3,3", NULL}; /*
CVS commit: src/sys/arch/amiga/dev
Module Name:src Committed By: phx Date: Sat Oct 27 21:13:03 UTC 2012 Modified Files: src/sys/arch/amiga/dev: if_ed_zbus.c Log Message: Fixed receiving of odd-length packets. Driver works now perfectly. Thanks to Harald Meinzer for providing me with a Hydra for a few days. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/amiga/dev/if_ed_zbus.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/amiga/dev/if_ed_zbus.c diff -u src/sys/arch/amiga/dev/if_ed_zbus.c:1.1 src/sys/arch/amiga/dev/if_ed_zbus.c:1.2 --- src/sys/arch/amiga/dev/if_ed_zbus.c:1.1 Sun Oct 14 13:36:07 2012 +++ src/sys/arch/amiga/dev/if_ed_zbus.c Sat Oct 27 21:13:03 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ed_zbus.c,v 1.1 2012/10/14 13:36:07 phx Exp $ */ +/* $NetBSD: if_ed_zbus.c,v 1.2 2012/10/27 21:13:03 phx Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ed_zbus.c,v 1.1 2012/10/14 13:36:07 phx Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ed_zbus.c,v 1.2 2012/10/27 21:13:03 phx Exp $"); #include #include @@ -208,9 +208,10 @@ ed_zbus_test_mem(struct dp8390_softc *sc bus_space_handle_t bufh = sc->sc_bufh; int i; - bus_space_set_region_2(buft, bufh, sc->mem_start, 0, sc->mem_size >> 1); + bus_space_set_region_2(buft, bufh, sc->mem_start, 0, + sc->mem_size >> 1); - for (i = 0; i < sc->mem_size >> 1; i += 2) { + for (i = 0; i < sc->mem_size; i += 2) { if (bus_space_read_2(sc->sc_buft, sc->sc_bufh, i)) { printf(": failed to clear NIC buffer at offset %x - " "check configuration\n", (sc->mem_start + i)); @@ -225,16 +226,16 @@ ed_zbus_read_hdr(struct dp8390_softc *sc { bus_space_tag_t buft = sc->sc_buft; bus_space_handle_t bufh = sc->sc_bufh; - uint16_t wrd; + uint16_t wrd[2]; /* * Read the 4-byte header as two 16-bit words in little-endian * format. Convert into big-endian and put them into hdrp. */ - wrd = bus_space_read_2(buft, bufh, src); - hdrp->rsr = wrd & 0xff; - hdrp->next_packet = wrd >> 8; - hdrp->count = bswap16(bus_space_read_2(buft, bufh, src + 2)); + bus_space_read_region_stream_2(buft, bufh, src, wrd, 2); + hdrp->rsr = wrd[0] & 0xff; + hdrp->next_packet = wrd[0] >> 8; + hdrp->count = bswap16(wrd[1]); } /* @@ -248,19 +249,30 @@ ed_zbus_ring_copy(struct dp8390_softc *s bus_space_tag_t buft = sc->sc_buft; bus_space_handle_t bufh = sc->sc_bufh; u_short tmp_amount; + u_char readbyte[2]; /* Does copy wrap to lower addr in ring buffer? */ if (src + amount > sc->mem_end) { tmp_amount = sc->mem_end - src; - /* Copy amount up to end of NIC memory. */ - bus_space_read_region_2(buft, bufh, src, dst, tmp_amount >> 1); + /* copy amount up to end of NIC memory */ + bus_space_read_region_stream_2(buft, bufh, src, dst, + tmp_amount >> 1); amount -= tmp_amount; src = sc->mem_ring; - dst = (char *)dst + tmp_amount; + dst = (u_char *)dst + tmp_amount; + } + + bus_space_read_region_stream_2(buft, bufh, src, dst, amount >> 1); + + /* handle odd length packet */ + if (amount & 1) { + bus_space_read_region_stream_2(buft, bufh, src + amount - 1, + (u_int16_t *)readbyte, 1); + *((u_char *)dst + amount - 1) = readbyte[0]; + amount++; } - bus_space_read_region_2(buft, bufh, src, dst, amount >> 1); return src + amount; } @@ -287,8 +299,9 @@ ed_zbus_write_mbuf(struct dp8390_softc * /* Finish the last word. */ if (wantbyte) { savebyte[1] = *data; -bus_space_write_region_2(sc->sc_buft, -sc->sc_bufh, buf, (u_int16_t *)savebyte, 1); +bus_space_write_region_stream_2(sc->sc_buft, +sc->sc_bufh, buf, +(u_int16_t *)savebyte, 1); buf += 2; data++; len--; @@ -296,9 +309,9 @@ ed_zbus_write_mbuf(struct dp8390_softc * } /* Output contiguous words. */ if (len > 1) { -bus_space_write_region_2( -sc->sc_buft, sc->sc_bufh, -buf, (u_int16_t *)data, len >> 1); +bus_space_write_region_stream_2(sc->sc_buft, +sc->sc_bufh, buf, +(u_int16_t *)data, len >> 1); buf += len & ~1; data += len & ~1; len &= 1; @@ -314,7 +327,7 @@ ed_zbus_write_mbuf(struct dp8390_softc * len = ETHER_PAD_LEN - totlen; if (wantbyte) { savebyte[1] = 0; - bus_space_write_region_2(sc->sc_buft, sc->sc_bufh, + bus_space_write_region_stream_2(sc->sc_buft, sc->sc_bufh, buf, (u_int16_t *)savebyte, 1); buf += 2; totlen++;
CVS commit: src/sys/arch/amiga
Module Name:src Committed By: phx Date: Sat Oct 27 11:54:21 UTC 2012 Modified Files: src/sys/arch/amiga/clockport: files.clockport src/sys/arch/amiga/conf: files.amiga Log Message: Fixed dependencies for some new PCI and clockport devices, to make a kernel compile without them. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/amiga/clockport/files.clockport cvs rdiff -u -r1.162 -r1.163 src/sys/arch/amiga/conf/files.amiga 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/amiga/clockport/files.clockport diff -u src/sys/arch/amiga/clockport/files.clockport:1.2 src/sys/arch/amiga/clockport/files.clockport:1.3 --- src/sys/arch/amiga/clockport/files.clockport:1.2 Tue May 15 17:35:43 2012 +++ src/sys/arch/amiga/clockport/files.clockport Sat Oct 27 11:54:21 2012 @@ -1,4 +1,4 @@ -# $NetBSD: files.clockport,v 1.2 2012/05/15 17:35:43 rkujawa Exp $ +# $NetBSD: files.clockport,v 1.3 2012/10/27 11:54:21 phx Exp $ define clockportbus {} @@ -36,6 +36,4 @@ file arch/amiga/clockport/clockport.c cl # Individual Computers SilverSurfer serial attach com at clockport with com_ss -file arch/amiga/clockport/com_ss.c - - +file arch/amiga/clockport/com_ss.c com_ss Index: src/sys/arch/amiga/conf/files.amiga diff -u src/sys/arch/amiga/conf/files.amiga:1.162 src/sys/arch/amiga/conf/files.amiga:1.163 --- src/sys/arch/amiga/conf/files.amiga:1.162 Sun Oct 14 20:33:17 2012 +++ src/sys/arch/amiga/conf/files.amiga Sat Oct 27 11:54:21 2012 @@ -1,4 +1,4 @@ -# $NetBSD: files.amiga,v 1.162 2012/10/14 20:33:17 phx Exp $ +# $NetBSD: files.amiga,v 1.163 2012/10/27 11:54:21 phx Exp $ # maxpartitions must be first item in files.${ARCH}.newconf maxpartitions 16 # NOTE THAT AMIGA IS SPECIAL! @@ -527,19 +527,19 @@ file arch/amiga/pci/pci_machdep.c pci device p5pb: pcibus attach p5pb at p5bus -file arch/amiga/pci/p5pb.c pci +file arch/amiga/pci/p5pb.c p5pb & pci device mppb: pcibus attach mppb at zbus -file arch/amiga/pci/mppb.c pci +file arch/amiga/pci/mppb.c mppb & pci device cv3dpb: pcibus attach cv3dpb at zbus -file arch/amiga/pci/cv3dpb.c pci +file arch/amiga/pci/cv3dpb.c cv3dpb & pci device empb: pcibus, amibus_empb attach empb at zbus -file arch/amiga/pci/empb.c pci +file arch/amiga/pci/empb.c empb & pci device emmem {} attach emmem at zbus
CVS commit: src/sys/arch/amiga
Module Name:src Committed By: phx Date: Sun Oct 14 20:33:18 UTC 2012 Modified Files: src/sys/arch/amiga/conf: files.amiga src/sys/arch/amiga/dev: grf_cv3d.c Log Message: CV3DONZORRO2 option is no longer needed. grf_cv3d.c was successfully tested running in a Zorro2 slot. To generate a diff of this commit: cvs rdiff -u -r1.161 -r1.162 src/sys/arch/amiga/conf/files.amiga cvs rdiff -u -r1.26 -r1.27 src/sys/arch/amiga/dev/grf_cv3d.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/amiga/conf/files.amiga diff -u src/sys/arch/amiga/conf/files.amiga:1.161 src/sys/arch/amiga/conf/files.amiga:1.162 --- src/sys/arch/amiga/conf/files.amiga:1.161 Sun Oct 14 13:36:07 2012 +++ src/sys/arch/amiga/conf/files.amiga Sun Oct 14 20:33:17 2012 @@ -1,4 +1,4 @@ -# $NetBSD: files.amiga,v 1.161 2012/10/14 13:36:07 phx Exp $ +# $NetBSD: files.amiga,v 1.162 2012/10/14 20:33:17 phx Exp $ # maxpartitions must be first item in files.${ARCH}.newconf maxpartitions 16 # NOTE THAT AMIGA IS SPECIAL! @@ -18,7 +18,6 @@ defflag opt_amigaccgrf.h USE_C_BFOPS defflag opt_amigacons.h RETINACONSOLE ULOWELLCONSOLE CL5426CONSOLE defflag opt_amigacons.h CV64CONSOLE CV3DCONSOLE TSENGCONSOLE -defflag opt_amigacons.h CV3DONZORRO2 defflag opt_amigacons.h SERCONSOLE defflag opt_kfont.h KFONT_CONS_ISO8859_1 Index: src/sys/arch/amiga/dev/grf_cv3d.c diff -u src/sys/arch/amiga/dev/grf_cv3d.c:1.26 src/sys/arch/amiga/dev/grf_cv3d.c:1.27 --- src/sys/arch/amiga/dev/grf_cv3d.c:1.26 Thu Dec 15 14:25:13 2011 +++ src/sys/arch/amiga/dev/grf_cv3d.c Sun Oct 14 20:33:17 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: grf_cv3d.c,v 1.26 2011/12/15 14:25:13 phx Exp $ */ +/* $NetBSD: grf_cv3d.c,v 1.27 2012/10/14 20:33:17 phx Exp $ */ /* * Copyright (c) 1995 Michael Teske @@ -33,7 +33,7 @@ #include "opt_amigacons.h" #include -__KERNEL_RCSID(0, "$NetBSD: grf_cv3d.c,v 1.26 2011/12/15 14:25:13 phx Exp $"); +__KERNEL_RCSID(0, "$NetBSD: grf_cv3d.c,v 1.27 2012/10/14 20:33:17 phx Exp $"); #include "ite.h" #include "wsdisplay.h" @@ -406,12 +406,6 @@ grfcv3dmatch(struct device *pdp, struct if (zap->manid != 8512 || zap->prodid != 67) return (0); -#ifndef CV3DONZORRO2 - if (!cv3d_zorroIII) { - return (0); - } -#endif - cv3d_boardaddr = zap->va; #ifdef CV3DCONSOLE
CVS commit: src/sys/dev/ic
Module Name:src Committed By: phx Date: Sun Oct 14 13:38:13 UTC 2012 Modified Files: src/sys/dev/ic: dp8390reg.h Log Message: ed_ring structure is no longer needed for compatibility, as the last device driver using it (amiga/ed(4)) has been converted now. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/dev/ic/dp8390reg.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/ic/dp8390reg.h diff -u src/sys/dev/ic/dp8390reg.h:1.8 src/sys/dev/ic/dp8390reg.h:1.9 --- src/sys/dev/ic/dp8390reg.h:1.8 Sun Dec 11 12:21:26 2005 +++ src/sys/dev/ic/dp8390reg.h Sun Oct 14 13:38:13 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: dp8390reg.h,v 1.8 2005/12/11 12:21:26 christos Exp $ */ +/* $NetBSD: dp8390reg.h,v 1.9 2012/10/14 13:38:13 phx Exp $ */ /* * National Semiconductor DS8390 NIC register definitions. @@ -542,21 +542,6 @@ struct dp8390_ring { }; /* - * XXX For compatibility only! This needs to die when all drivers have - * been converted to be front ends to the MI driver. - */ -struct ed_ring { -#if BYTE_ORDER == BIG_ENDIAN - u_char next_packet; /* pointer to next packet */ - u_char rsr; /* receiver status */ -#else - u_char rsr; /* receiver status */ - u_char next_packet; /* pointer to next packet */ -#endif - u_short count; /* bytes in packet (length + 4) */ -}; - -/* * Common constants */ #define ED_PAGE_SIZE 256 /* Size of RAM pages in bytes */
CVS commit: src/sys/arch/amiga
Module Name:src Committed By: phx Date: Sun Oct 14 13:36:07 UTC 2012 Modified Files: src/sys/arch/amiga/conf: files.amiga Added Files: src/sys/arch/amiga/dev: if_ed_zbus.c Removed Files: src/sys/arch/amiga/dev: if_ed.c if_edreg.h Log Message: New ed(4) device driver for Hydra and ASDG Zorro2 bus network cards. This driver is based on the MI dp8390 backend. To generate a diff of this commit: cvs rdiff -u -r1.160 -r1.161 src/sys/arch/amiga/conf/files.amiga cvs rdiff -u -r1.62 -r0 src/sys/arch/amiga/dev/if_ed.c cvs rdiff -u -r0 -r1.1 src/sys/arch/amiga/dev/if_ed_zbus.c cvs rdiff -u -r1.4 -r0 src/sys/arch/amiga/dev/if_edreg.h 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/amiga/conf/files.amiga diff -u src/sys/arch/amiga/conf/files.amiga:1.160 src/sys/arch/amiga/conf/files.amiga:1.161 --- src/sys/arch/amiga/conf/files.amiga:1.160 Wed Jul 11 17:13:31 2012 +++ src/sys/arch/amiga/conf/files.amiga Sun Oct 14 13:36:07 2012 @@ -1,4 +1,4 @@ -# $NetBSD: files.amiga,v 1.160 2012/07/11 17:13:31 rkujawa Exp $ +# $NetBSD: files.amiga,v 1.161 2012/10/14 13:36:07 phx Exp $ # maxpartitions must be first item in files.${ARCH}.newconf maxpartitions 16 # NOTE THAT AMIGA IS SPECIAL! @@ -235,8 +235,8 @@ file arch/amiga/dev/if_ne_xsurf.c ne_xsu # Hydra ethernet card device ed: ifnet, ether, arp -attach ed at zbus with ed_zbus -file arch/amiga/dev/if_ed.c ed_zbus needs-flag +attach ed at zbus with ed_zbus: dp8390nic +file arch/amiga/dev/if_ed_zbus.c ed_zbus needs-flag # C=/Ameristar A2060 / 560 attach bah at zbus with bah_zbus Added files: Index: src/sys/arch/amiga/dev/if_ed_zbus.c diff -u /dev/null src/sys/arch/amiga/dev/if_ed_zbus.c:1.1 --- /dev/null Sun Oct 14 13:36:07 2012 +++ src/sys/arch/amiga/dev/if_ed_zbus.c Sun Oct 14 13:36:07 2012 @@ -0,0 +1,330 @@ +/* $NetBSD: if_ed_zbus.c,v 1.1 2012/10/14 13:36:07 phx Exp $ */ + +/*- + * Copyright (c) 2012 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Frank Wille. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +/* + * Device driver for the Hydra Systems and ASDG ethernet cards. + * Based on the National Semiconductor DS8390/WD83C690. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: if_ed_zbus.c,v 1.1 2012/10/14 13:36:07 phx Exp $"); + +#include +#include +#include + +#include +#include +#include + +#include +#include + +#include +#include +#include + +#define ETHER_PAD_LEN (ETHER_MIN_LEN - ETHER_CRC_LEN) + +/* Hydra Systems AmigaNet */ +#define HYDRA_MANID 2121 +#define HYDRA_PRODID 1 +#define HYDRA_REGADDR 0xffe1 +#define HYDRA_MEMADDR 0 +#define HYDRA_PROMADDR 0xffc0 + +/* ASDG LANRover */ +#define ASDG_MANID 1023 +#define ASDG_PRODID 254 +#define ASDG_REGADDR 0x1 +#define ASDG_MEMADDR 0x8000 +#define ASDG_PROMADDR 0x100 + +/* Buffer size is always 16k */ +#define ED_ZBUS_MEMSIZE 0x4000 + +int ed_zbus_match(device_t, cfdata_t , void *); +void ed_zbus_attach(device_t, device_t, void *); +int ed_zbus_test_mem(struct dp8390_softc *); +void ed_zbus_read_hdr(struct dp8390_softc *, int, struct dp8390_ring *); +int ed_zbus_ring_copy(struct dp8390_softc *, int, void *, u_short); +int ed_zbus_write_mbuf(struct dp8390_softc *, struct mbuf *, int); + +struct ed_zbus_softc { + struct dp8390_softc sc_dp8390; + struct bus_space_tag sc_bst; + struct isr sc_isr; +}; + +CFATTACH_DECL_NEW(ed_zbus, sizeof(struct ed_zbus_softc), +ed_zbus_match, ed_zbus_attach, NULL, NULL); + + +int +ed_zbus_match(device_t parent, cfdata_t cf, void *aux) +{ + struct
CVS commit: src/sys/arch/sandpoint/conf
Module Name:src Committed By: phx Date: Sun Apr 29 15:59:32 UTC 2012 Modified Files: src/sys/arch/sandpoint/conf: GENERIC Log Message: Add driver for ATAPI disk drives. To generate a diff of this commit: cvs rdiff -u -r1.72 -r1.73 src/sys/arch/sandpoint/conf/GENERIC 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/sandpoint/conf/GENERIC diff -u src/sys/arch/sandpoint/conf/GENERIC:1.72 src/sys/arch/sandpoint/conf/GENERIC:1.73 --- src/sys/arch/sandpoint/conf/GENERIC:1.72 Sat Mar 10 21:51:55 2012 +++ src/sys/arch/sandpoint/conf/GENERIC Sun Apr 29 15:59:32 2012 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.72 2012/03/10 21:51:55 joerg Exp $ +# $NetBSD: GENERIC,v 1.73 2012/04/29 15:59:32 phx Exp $ # # machine description file for GENERIC NAS # @@ -22,7 +22,7 @@ include "arch/sandpoint/conf/std.sandpo options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.72 $" +#ident "GENERIC-$Revision: 1.73 $" maxusers 32 @@ -262,6 +262,7 @@ sd* at scsibus? target ? lun ? # SCSI di cd* at scsibus? target ? lun ? # SCSI CD-ROM drives atapibus* at atapi? +sd* at atapibus? drive ? flags 0x # ATAPI disk drives cd* at atapibus? drive ? flags 0x # ATAPI CD-ROM drives #
CVS commit: src/sys/arch/sandpoint/stand/altboot
Module Name:src Committed By: phx Date: Thu Apr 26 19:59:37 UTC 2012 Modified Files: src/sys/arch/sandpoint/stand/altboot: README.altboot dsk.c globals.h main.c Log Message: Multiple boot devices and/or paths may be specified, which are booted one after another until success. When no boot device is specified altboot tries to boot from all disk devices with a valid NetBSD disklabel, starting with unit 0. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ src/sys/arch/sandpoint/stand/altboot/README.altboot cvs rdiff -u -r1.15 -r1.16 src/sys/arch/sandpoint/stand/altboot/dsk.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/sandpoint/stand/altboot/globals.h \ src/sys/arch/sandpoint/stand/altboot/main.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/sandpoint/stand/altboot/README.altboot diff -u src/sys/arch/sandpoint/stand/altboot/README.altboot:1.10 src/sys/arch/sandpoint/stand/altboot/README.altboot:1.11 --- src/sys/arch/sandpoint/stand/altboot/README.altboot:1.10 Tue Apr 24 14:56:07 2012 +++ src/sys/arch/sandpoint/stand/altboot/README.altboot Thu Apr 26 19:59:36 2012 @@ -1,6 +1,6 @@ /// notes about altboot /// -$NetBSD: README.altboot,v 1.10 2012/04/24 14:56:07 nisimura Exp $ +$NetBSD: README.altboot,v 1.11 2012/04/26 19:59:36 phx Exp $ Altboot is a functional bridge to fill the gap between a NAS product custom bootloader and the NetBSD kernel startup environment. Altboot @@ -61,11 +61,11 @@ that the original U-Boot/PPCboot still r as a functional extension for them. In case the firmware was crippled by the vendor so that it only boots -Linux U-Boot images (D-Link), you can still use altboot by uploading -altboot.img instead of the Linux kernel. +Linux U-Boot images (D-Link, Synology 2007), you can still use altboot by +overwriting the Linux kernel with altboot.img. Altboot passes the following bootinfo records to the NetBSD/sandpoint -kernel. +kernel: - processor clock tick value driving MPC8241/8245. - serial console selection. - booted kernel filename and which device it was fetched from. @@ -104,7 +104,12 @@ restarts itself. Mainly useful for altbo Multiple arguments may be specified at once, although not all combinations make sense. The format of an altboot command line is: - [[ ...] :[]] + [[ ...] :[] ...] + +Multiple boot devices and/or paths may be specified, which are booted one +after another until success. When no boot device is specified altboot tries +to boot from all disk devices with a valid NetBSD disklabel, starting with +unit 0. The following device names are supported: - tftp boot from TFTP (address retrieved by DHCP) Index: src/sys/arch/sandpoint/stand/altboot/dsk.c diff -u src/sys/arch/sandpoint/stand/altboot/dsk.c:1.15 src/sys/arch/sandpoint/stand/altboot/dsk.c:1.16 --- src/sys/arch/sandpoint/stand/altboot/dsk.c:1.15 Mon Apr 9 12:40:55 2012 +++ src/sys/arch/sandpoint/stand/altboot/dsk.c Thu Apr 26 19:59:37 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: dsk.c,v 1.15 2012/04/09 12:40:55 nisimura Exp $ */ +/* $NetBSD: dsk.c,v 1.16 2012/04/26 19:59:37 phx Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -83,7 +83,6 @@ static void issue48(struct dvata_chan *, static void issue28(struct dvata_chan *, int64_t, int); static struct disk *lookup_disk(int); -#define MAX_UNITS 8 static struct disk ldisk[MAX_UNITS]; int @@ -462,7 +461,18 @@ static struct disk * lookup_disk(int unit) { - return &ldisk[unit]; + return (unit >= 0 && unit < MAX_UNITS) ? &ldisk[unit] : NULL; +} + +int +dlabel_valid(int unit) +{ + struct disk *dsk; + + dsk = lookup_disk(unit); + if (dsk == NULL) + return NULL; + return dsk->dlabel != NULL; } int @@ -487,10 +497,10 @@ dsk_open(struct open_file *f, ...) if ((d = lookup_disk(unit)) == NULL) return ENXIO; - f->f_devdata = d; if ((dlp = d->dlabel) == NULL || part >= dlp->d_npartitions) return ENXIO; d->part = part; + f->f_devdata = d; snprintf(bi_path.bootpath, sizeof(bi_path.bootpath), name); if (dlp->d_partitions[part].p_fstype == FS_BSDFFS) { Index: src/sys/arch/sandpoint/stand/altboot/globals.h diff -u src/sys/arch/sandpoint/stand/altboot/globals.h:1.18 src/sys/arch/sandpoint/stand/altboot/globals.h:1.19 --- src/sys/arch/sandpoint/stand/altboot/globals.h:1.18 Mon Apr 16 16:55:29 2012 +++ src/sys/arch/sandpoint/stand/altboot/globals.h Thu Apr 26 19:59:37 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: globals.h,v 1.18 2012/04/16 16:55:29 phx Exp $ */ +/* $NetBSD: globals.h,v 1.19 2012/04/26 19:59:37 phx Exp $ */ #ifdef DEBUG #define DPRINTF(x) printf x @@ -167,8 +167,23 @@ NIF_DECL(skg); NIF_DECL(stg); /* DSK support */ -int dskdv_init(void *); +#define MAX_UNITS 4 + +struct disk { + char xname[8]; + void *dvops; + unsigned unittag; + uint16_t ident[128]; + uint64_t nsect; + uint64_t first; + void *dlabel; + int part; + void *fsops; + int (*lba_read
CVS commit: src/sys/arch/sandpoint/stand/altboot
Module Name:src Committed By: phx Date: Mon Apr 16 16:55:29 UTC 2012 Modified Files: src/sys/arch/sandpoint/stand/altboot: brdsetup.c globals.h main.c Log Message: Improved Synology CS/RS support: watch power-state of all SATA drives before initializing them, configure drive LEDs to reflect SATA activity. Configure drives on all ATA PCI devices, not only on the first one. To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/sandpoint/stand/altboot/brdsetup.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/sandpoint/stand/altboot/globals.h \ src/sys/arch/sandpoint/stand/altboot/main.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/sandpoint/stand/altboot/brdsetup.c diff -u src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.30 src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.31 --- src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.30 Mon Apr 9 14:02:04 2012 +++ src/sys/arch/sandpoint/stand/altboot/brdsetup.c Mon Apr 16 16:55:29 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: brdsetup.c,v 1.30 2012/04/09 14:02:04 nisimura Exp $ */ +/* $NetBSD: brdsetup.c,v 1.31 2012/04/16 16:55:29 phx Exp $ */ /*- * Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -46,6 +46,7 @@ void xxx ## setup(struct brdprop *); \ void xxx ## brdfix(struct brdprop *); \ void xxx ## pcifix(struct brdprop *); \ +void xxx ## launch(struct brdprop *); \ void xxx ## reset(void) BRD_DECL(mot); @@ -119,28 +120,28 @@ static struct brdprop brdlist[] = { BRD_SANDPOINTX3, 0, "com", 0x3f8, 115200, - motsetup, motbrdfix, motpcifix, NULL }, + motsetup, motbrdfix, motpcifix, NULL, NULL }, { "encpp1", "EnCore PP1", BRD_ENCOREPP1, 0, "com", 0x3f8, 115200, - encsetup, encbrdfix, encpcifix, NULL }, + encsetup, encbrdfix, encpcifix, NULL, NULL }, { "kurobox", "KuroBox", BRD_KUROBOX, 0, "eumb", 0x4600, 57600, - kurosetup, kurobrdfix, NULL, kuroreset }, + kurosetup, kurobrdfix, NULL, NULL, kuroreset }, { "synology", - "Synology DS", + "Synology CS/DS/RS", BRD_SYNOLOGY, 0, "eumb", 0x4500, 115200, - synosetup, synobrdfix, NULL, synoreset }, + synosetup, synobrdfix, synopcifix, synolaunch, synoreset }, { "qnap", "QNAP TS", @@ -148,42 +149,42 @@ static struct brdprop brdlist[] = { 33164691, /* Linux source says 3300, but the Synology */ /* clock value delivers a much better precision. */ "eumb", 0x4500, 115200, - NULL, qnapbrdfix, NULL, qnapreset }, + NULL, qnapbrdfix, NULL, NULL, qnapreset }, { "iomega", "IOMEGA StorCenter G2", BRD_STORCENTER, 0, "eumb", 0x4500, 115200, - NULL, iomegabrdfix, NULL, iomegareset }, + NULL, iomegabrdfix, NULL, NULL, iomegareset }, { "dlink", "D-Link DSM-G600", BRD_DLINKDSM, 3300, "eumb", 0x4500, 9600, - NULL, dlinkbrdfix, NULL, NULL }, + NULL, dlinkbrdfix, NULL, NULL, NULL }, { "nhnas", "Netronix NH-230/231", BRD_NH230NAS, 3300, "eumb", 0x4500, 9600, - NULL, nhnasbrdfix, NULL, nhnasreset }, + NULL, nhnasbrdfix, NULL, NULL, nhnasreset }, { "kurot4", "KuroBox/T4", BRD_KUROBOXT4, 32768000, "eumb", 0x4600, 57600, - NULL, kurot4brdfix, NULL, NULL }, + NULL, kurot4brdfix, NULL, NULL, NULL }, { "unknown", "Unknown board", BRD_UNKNOWN, 0, "eumb", 0x4500, 115200, - NULL, NULL, NULL, NULL }, /* must be the last */ + NULL, NULL, NULL, NULL, NULL }, /* must be the last */ }; static struct brdprop *brdprop; @@ -365,6 +366,15 @@ pcifixup() } void +launchfixup() +{ + + if (brdprop->launch == NULL) + return; + (*brdprop->launch)(brdprop); +} + +void encsetup(struct brdprop *brd) { @@ -707,6 +717,50 @@ synobrdfix(struct brdprop *brd) } void +synopcifix(struct brdprop *brd) +{ + static const char csmodel[4][7] = { + "CS406e", "CS406", "RS406", "CS407e" + }; + volatile uint8_t *cpld = (volatile uint8_t *)0xff00; + uint8_t pwrstate; + + if (nata > 1) { + /* + * CS/RS stations power-up their disks one after another. + * We have to watch over the current power state in a CPLD + * register, until all disks become available. + */ + printf("CPLD V1.%d for model %s\n", cpld[2] & 3, + csmodel[(cpld[2] & 0x0c) >> 2]); + cpld[0] = 0x00; /* all drive LEDs blinking yellow */ + do { + delay(1000 * 1000); + pwrstate = cpld[1]; + printf("Power state: %02x\r", pwrstate); + } while (pwrstate != 0xff); + putchar('\n'); + } +} + +void +synolaunch(struct brdprop *brd) +{ + volatile uint8_t *cpld = (volatile uint8_t *)0xff00; + struct dkdev_ata *sata1, *sata2; + + if (nata > 1) { + /* enable drive LEDs for active disk drives on CS/RS models */ + sata1 = lata[0].drv; + sata2 = lata[1].drv; + cpld[0] = (sata1->presense[0] ? 0x80 : 0xc0) | + (sata1->presense[1] ? 0x20 : 0x30) | + (sata2->presense[0] ? 0x08 : 0x0c) | + (sata2->presense[1] ? 0x02 : 0x03); + } +} + +void synoreset() { Inde
CVS commit: src/sys/arch/ofppc/conf
Module Name:src Committed By: phx Date: Thu Mar 8 14:18:04 UTC 2012 Modified Files: src/sys/arch/ofppc/conf: GENERIC Log Message: When detecting a new USB device on the bus ofppc panics in usb_allocmem(). Although the problem doesn't seem to affect other PPC ports, it causes big trouble for my Pegasos2. So as long as there is no real solution we should add the option USB_FRAG_DMA_WORKAROUND to the GENERIC config file. To generate a diff of this commit: cvs rdiff -u -r1.139 -r1.140 src/sys/arch/ofppc/conf/GENERIC 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/ofppc/conf/GENERIC diff -u src/sys/arch/ofppc/conf/GENERIC:1.139 src/sys/arch/ofppc/conf/GENERIC:1.140 --- src/sys/arch/ofppc/conf/GENERIC:1.139 Sun Dec 18 05:49:31 2011 +++ src/sys/arch/ofppc/conf/GENERIC Thu Mar 8 14:18:04 2012 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.139 2011/12/18 05:49:31 dholland Exp $ +# $NetBSD: GENERIC,v 1.140 2012/03/08 14:18:04 phx Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/ofppc/conf/std.ofppc" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.139 $" +#ident "GENERIC-$Revision: 1.140 $" maxusers 32 @@ -339,6 +339,7 @@ urlphy* at mii? phy ? # Realtek RTL815 uhci* at pci? dev ? function ? # USB Universal Host Controller ohci* at pci? dev ? function ? # USB Open Host Controller ehci* at pci? dev ? function ? # USB Enhanced Host Controller +options USB_FRAG_DMA_WORKAROUND # Workaround panic in usb_allocmem() usb* at uhci? # USB bus support usb* at ohci? # USB bus support
CVS commit: src/sys/arch/amigappc
Module Name:src Committed By: phx Date: Wed Feb 15 12:11:43 UTC 2012 Modified Files: src/sys/arch/amigappc/amigappc: machdep.c src/sys/arch/amigappc/conf: files.amigappc Log Message: Port amiga calls config_console() from machdep.c now, so we have to do the same. Otherwise no console is configured anymore. While being at it adapt files.amigappc to the latest changes in files.amiga. Ok by releng@. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/arch/amigappc/amigappc/machdep.c cvs rdiff -u -r1.24 -r1.25 src/sys/arch/amigappc/conf/files.amigappc 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/amigappc/amigappc/machdep.c diff -u src/sys/arch/amigappc/amigappc/machdep.c:1.50 src/sys/arch/amigappc/amigappc/machdep.c:1.51 --- src/sys/arch/amigappc/amigappc/machdep.c:1.50 Thu Nov 24 03:35:56 2011 +++ src/sys/arch/amigappc/amigappc/machdep.c Wed Feb 15 12:11:42 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.50 2011/11/24 03:35:56 mrg Exp $ */ +/* $NetBSD: machdep.c,v 1.51 2012/02/15 12:11:42 phx Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,9 +32,10 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.50 2011/11/24 03:35:56 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.51 2012/02/15 12:11:42 phx Exp $"); #include +#include #include #include #include @@ -54,6 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v #include #include #include +#include #include #include #include @@ -642,10 +644,11 @@ void consinit(void) { + /* preconfigure graphics cards */ custom_chips_init(); - /* - ** Initialize the console before we print anything out. - */ + config_console(); + + /* Initialize the console before we print anything out. */ cninit(); } Index: src/sys/arch/amigappc/conf/files.amigappc diff -u src/sys/arch/amigappc/conf/files.amigappc:1.24 src/sys/arch/amigappc/conf/files.amigappc:1.25 --- src/sys/arch/amigappc/conf/files.amigappc:1.24 Fri Jan 14 12:54:39 2011 +++ src/sys/arch/amigappc/conf/files.amigappc Wed Feb 15 12:11:43 2012 @@ -1,4 +1,4 @@ -# $NetBSD: files.amigappc,v 1.24 2011/01/14 12:54:39 phx Exp $ +# $NetBSD: files.amigappc,v 1.25 2012/02/15 12:11:43 phx Exp $ # maxpartitions must be first item in files.${ARCH}.newconf maxpartitions 16 # NOTE THAT AMIGA IS SPECIAL! @@ -33,8 +33,8 @@ defflagLEV6_DEFER defparam IOBZCLOCK -file dev/cons.cite | ser -file dev/cninit.cite | ser +file dev/cons.c +file dev/cninit.c file arch/amigappc/amigappc/amiga_init.c file arch/amigappc/amigappc/autoconf.c file arch/amigappc/amigappc/machdep.c @@ -149,11 +149,11 @@ file arch/amiga/dev/ite.c ite needs-fla file arch/amiga/dev/kbdmap.c ite file arch/amiga/dev/kf_custom.c kfont_custom file arch/amiga/dev/kf_iso8859_1_8x8.c kfont_cons_iso8859_1 & - ( ite | amidisplaycc ) + ( ite | wsdisplay ) file arch/amiga/dev/kf_iso8859_1_8x11.c kfont_cons_iso8859_1 & kfont_8x11 file arch/amiga/dev/kf_iso8859_2_8x8.c kfont_cons_iso8859_2 & - ( ite | amidisplaycc ) + ( ite | wsdisplay ) file arch/amiga/dev/kf_iso8859_2_8x11.c kfont_cons_iso8859_2 & kfont_8x11
CVS commit: src/sys/arch/powerpc/powerpc
Module Name:src Committed By: phx Date: Mon Feb 13 13:44:14 UTC 2012 Modified Files: src/sys/arch/powerpc/powerpc: vm_machdep.c Log Message: Allow all physical addresses from 0 to 0x in cpu_uarea_alloc(). This fixes a panic with amigappc, which has RAM starting at 0x0800. Ok by releng@. To generate a diff of this commit: cvs rdiff -u -r1.93 -r1.94 src/sys/arch/powerpc/powerpc/vm_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/powerpc/powerpc/vm_machdep.c diff -u src/sys/arch/powerpc/powerpc/vm_machdep.c:1.93 src/sys/arch/powerpc/powerpc/vm_machdep.c:1.94 --- src/sys/arch/powerpc/powerpc/vm_machdep.c:1.93 Sat Jan 28 16:30:23 2012 +++ src/sys/arch/powerpc/powerpc/vm_machdep.c Mon Feb 13 13:44:14 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.93 2012/01/28 16:30:23 skrll Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.94 2012/02/13 13:44:14 phx Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.93 2012/01/28 16:30:23 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.94 2012/02/13 13:44:14 phx Exp $"); #include "opt_altivec.h" #include "opt_multiprocessor.h" @@ -295,7 +295,7 @@ cpu_uarea_alloc(bool system) * Allocate a new physically contiguous uarea which can be * direct-mapped. */ - error = uvm_pglistalloc(USPACE, 0, ptoa(physmem), 0, 0, &pglist, 1, 1); + error = uvm_pglistalloc(USPACE, 0, ~0UL, 0, 0, &pglist, 1, 1); if (error) { if (!system) return NULL;
CVS commit: src/sys/arch/sandpoint/conf
Module Name:src Committed By: phx Date: Sat Feb 11 12:31:47 UTC 2012 Modified Files: src/sys/arch/sandpoint/conf: GENERIC Log Message: Add support for ATAPI CD/DVD drives as well. To generate a diff of this commit: cvs rdiff -u -r1.69 -r1.70 src/sys/arch/sandpoint/conf/GENERIC 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/sandpoint/conf/GENERIC diff -u src/sys/arch/sandpoint/conf/GENERIC:1.69 src/sys/arch/sandpoint/conf/GENERIC:1.70 --- src/sys/arch/sandpoint/conf/GENERIC:1.69 Fri Feb 10 21:09:19 2012 +++ src/sys/arch/sandpoint/conf/GENERIC Sat Feb 11 12:31:47 2012 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.69 2012/02/10 21:09:19 phx Exp $ +# $NetBSD: GENERIC,v 1.70 2012/02/11 12:31:47 phx Exp $ # # machine description file for GENERIC NAS # @@ -22,7 +22,7 @@ include "arch/sandpoint/conf/std.sandpo options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.69 $" +#ident "GENERIC-$Revision: 1.70 $" maxusers 32 @@ -264,6 +264,9 @@ scsibus* at umass? sd* at scsibus? target ? lun ? # SCSI disk drives cd* at scsibus? target ? lun ? # SCSI CD-ROM drives +atapibus* at atapi? +cd* at atapibus? drive ? flags 0x # ATAPI CD-ROM drives + # # Pseudo-Devices #
CVS commit: src/sys/arch/sandpoint/conf
Module Name:src Committed By: phx Date: Fri Feb 10 21:09:20 UTC 2012 Modified Files: src/sys/arch/sandpoint/conf: GENERIC Log Message: Enable support for USB CD/DVD drives. OK releng@. To generate a diff of this commit: cvs rdiff -u -r1.68 -r1.69 src/sys/arch/sandpoint/conf/GENERIC 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/sandpoint/conf/GENERIC diff -u src/sys/arch/sandpoint/conf/GENERIC:1.68 src/sys/arch/sandpoint/conf/GENERIC:1.69 --- src/sys/arch/sandpoint/conf/GENERIC:1.68 Mon Jan 23 14:13:51 2012 +++ src/sys/arch/sandpoint/conf/GENERIC Fri Feb 10 21:09:19 2012 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.68 2012/01/23 14:13:51 phx Exp $ +# $NetBSD: GENERIC,v 1.69 2012/02/10 21:09:19 phx Exp $ # # machine description file for GENERIC NAS # @@ -22,7 +22,7 @@ include "arch/sandpoint/conf/std.sandpo options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.68 $" +#ident "GENERIC-$Revision: 1.69 $" maxusers 32 @@ -97,7 +97,7 @@ file-system EXT2FS # second extended f file-system MFS # memory file system file-system NFS # Network File System client #file-system NTFS # Windows/NT file system (experimental) -#file-system CD9660 # ISO 9660 + Rock Ridge file system +file-system CD9660 # ISO 9660 + Rock Ridge file system file-system MSDOSFS # MS-DOS file system file-system FDESC # /dev/fd file-system KERNFS # /kern @@ -262,6 +262,7 @@ wd* at umass? scsibus* at umass? sd* at scsibus? target ? lun ? # SCSI disk drives +cd* at scsibus? target ? lun ? # SCSI CD-ROM drives # # Pseudo-Devices
CVS commit: src/sys/arch/sandpoint/sandpoint
Module Name:src Committed By: phx Date: Fri Feb 10 12:02:33 UTC 2012 Modified Files: src/sys/arch/sandpoint/sandpoint: machdep.c Log Message: oea_batinit() demands a minimum block size of 8M now. OK by releng@. To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/arch/sandpoint/sandpoint/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/sandpoint/sandpoint/machdep.c diff -u src/sys/arch/sandpoint/sandpoint/machdep.c:1.61 src/sys/arch/sandpoint/sandpoint/machdep.c:1.62 --- src/sys/arch/sandpoint/sandpoint/machdep.c:1.61 Sat Jan 14 19:39:25 2012 +++ src/sys/arch/sandpoint/sandpoint/machdep.c Fri Feb 10 12:02:33 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.61 2012/01/14 19:39:25 phx Exp $ */ +/* $NetBSD: machdep.c,v 1.62 2012/02/10 12:02:33 phx Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.61 2012/01/14 19:39:25 phx Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.62 2012/02/10 12:02:33 phx Exp $"); #include "opt_compat_netbsd.h" #include "opt_ddb.h" @@ -173,7 +173,7 @@ initppc(u_int startkernel, u_int endkern oea_batinit( 0x8000, BAT_BL_256M, /* SANDPOINT_BUS_SPACE_MEM */ 0xfc00, BAT_BL_64M, /* _EUMB|_IO */ - 0x7000, BAT_BL_128K, /* only for NH230 board control */ + 0x7000, BAT_BL_8M, /* only for NH230 board control */ 0); /* Install vectors and interrupt handler */
CVS commit: src/sys/dev/wsfb
Module Name:src Committed By: phx Date: Tue Feb 7 18:48:20 UTC 2012 Modified Files: src/sys/dev/wsfb: genfb.c Log Message: On 8-bit screens only enable font anti-aliasing when the cmap_callback property is defined. It is needed for a suitable R3G3B2 color map. Ok by releng@ To generate a diff of this commit: cvs rdiff -u -r1.46 -r1.47 src/sys/dev/wsfb/genfb.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/dev/wsfb/genfb.c diff -u src/sys/dev/wsfb/genfb.c:1.46 src/sys/dev/wsfb/genfb.c:1.47 --- src/sys/dev/wsfb/genfb.c:1.46 Wed Jan 11 16:13:11 2012 +++ src/sys/dev/wsfb/genfb.c Tue Feb 7 18:48:19 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: genfb.c,v 1.46 2012/01/11 16:13:11 macallan Exp $ */ +/* $NetBSD: genfb.c,v 1.47 2012/02/07 18:48:19 phx Exp $ */ /*- * Copyright (c) 2007 Michael Lorenz @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.46 2012/01/11 16:13:11 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: genfb.c,v 1.47 2012/02/07 18:48:19 phx Exp $"); #include #include @@ -510,7 +510,7 @@ genfb_init_screen(void *cookie, struct v if (ri->ri_depth == 32) ri->ri_flg |= RI_ENABLE_ALPHA; - if (ri->ri_depth == 8) + if (ri->ri_depth == 8 && sc->sc_cmcb != NULL) ri->ri_flg |= RI_ENABLE_ALPHA | RI_8BIT_IS_RGB;
CVS commit: src/distrib/utils/sysinst/arch/ofppc
Module Name:src Committed By: phx Date: Thu Feb 2 22:15:05 UTC 2012 Modified Files: src/distrib/utils/sysinst/arch/ofppc: msg.md.de Log Message: Translate some new messages into german. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/distrib/utils/sysinst/arch/ofppc/msg.md.de Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/sysinst/arch/ofppc/msg.md.de diff -u src/distrib/utils/sysinst/arch/ofppc/msg.md.de:1.7 src/distrib/utils/sysinst/arch/ofppc/msg.md.de:1.8 --- src/distrib/utils/sysinst/arch/ofppc/msg.md.de:1.7 Mon Apr 4 08:30:39 2011 +++ src/distrib/utils/sysinst/arch/ofppc/msg.md.de Thu Feb 2 22:15:04 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: msg.md.de,v 1.7 2011/04/04 08:30:39 mbalmer Exp $ */ +/* $NetBSD: msg.md.de,v 1.8 2012/02/02 22:15:04 phx Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -64,25 +64,26 @@ message set_kernel_1 {Kernel (GENERIC)} message nobootpart -{There is no boot partition in the MBR partition table.} +{Es gibt keine Boot Partition in der MBR Partitionstabelle.} message boottoosmall -{The boot partition is too small. It needs to be at least 2MB in size, -however a size of at least 100MB is recommended.} +{Die Boot Partition ist zu klein. Sie benötigt mindestens 2MB, +wobei eine Größe von 100MB empfohlen wird.} message nobootpartdisklabel -{There is no boot partition in the disklabel. The boot partition should -match the boot partition you set up in the MBR partition table.} +{Es gibt keine Boot Partition im Disklabel. Die Boot Partition sollte +zu derjenigen passen, die Sie in der MBR Partitionstabelle angelegt haben.} message preptoosmall -{You need to have two PReP partitions to boot an IBM RS/6000. One needs to -be at least 1MB in size, and the other must be at least 1KB in size.} +{Sie benötigen zwei PReP Partitionen, um unter IBM RS/6000 booten zu können. +Eine sollte mindestens 1MB groß sein, und die andere mindestens 1KB.} message bootnotright -{In order to boot ofppc, you need either a FAT12 partition of at least 2MB -in size, or a pair of PReP partitions. The PReP partitions need to be at -least 1KB, and 1MB in size. IBM RS/6000 machines generally need the PReP -partitions, however some can utilize the FAT12. Most other machines require -the FAT12 partition. If you are not sure which to choose, accept the -defaults, and install all three. You do not currently have any partitions -that meet the minimum requirements.} +{Um ofppc booten zu können benötigen Sie entweder eine 2MB große FAT12 +Partition oder zwei PReP Partitionen. Die PReP Partitionen sollten +mindestens eine Größe von 1KB und 1MB haben. IBM/RS6000 Maschinen benötigen +meistens die PReP Partitionen, obwohl einige auch mit FAT12 zurecht kommen. +Alle anderen Maschinen benötigen meistens die FAT12 Partition. Wenn Sie +nicht sicher sind welche Sie benötigen, so akzeptieren Sie die Standard +Einstellungen und installieren alle drei. Momentan haben Sie noch nicht +genügend Partitionen um die Minimalanforderungen zu erfüllen.}
CVS commit: src/distrib/utils/sysinst/arch/ofppc
Module Name:src Committed By: phx Date: Thu Feb 2 21:58:31 UTC 2012 Modified Files: src/distrib/utils/sysinst/arch/ofppc: md.c Log Message: Use sync(8) instead of echo(1) to avoid writing an RDB disklabel. echo(1) is not part of the miniroot file system. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/distrib/utils/sysinst/arch/ofppc/md.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/utils/sysinst/arch/ofppc/md.c diff -u src/distrib/utils/sysinst/arch/ofppc/md.c:1.11 src/distrib/utils/sysinst/arch/ofppc/md.c:1.12 --- src/distrib/utils/sysinst/arch/ofppc/md.c:1.11 Sun Jan 29 16:01:36 2012 +++ src/distrib/utils/sysinst/arch/ofppc/md.c Thu Feb 2 21:58:31 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: md.c,v 1.11 2012/01/29 16:01:36 phx Exp $ */ +/* $NetBSD: md.c,v 1.12 2012/02/02 21:58:31 phx Exp $ */ /* * Copyright 1997 Piermont Information Systems Inc. @@ -605,7 +605,7 @@ const char *md_disklabel_cmd(void) /* we cannot rewrite an RDB disklabel */ if (rdb_found) - return "echo No disklabel"; + return "sync No disklabel"; return "disklabel -w -r"; }