CVS commit: src/sys/arch/pmax/stand
Module Name:src Committed By: christos Date: Sun Apr 25 23:42:08 UTC 2021 Modified Files: src/sys/arch/pmax/stand: Makefile.booters Log Message: Handle mipsn64 To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/sys/arch/pmax/stand/Makefile.booters Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/stand/Makefile.booters diff -u src/sys/arch/pmax/stand/Makefile.booters:1.64 src/sys/arch/pmax/stand/Makefile.booters:1.65 --- src/sys/arch/pmax/stand/Makefile.booters:1.64 Tue Jan 1 14:41:04 2019 +++ src/sys/arch/pmax/stand/Makefile.booters Sun Apr 25 19:42:08 2021 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.booters,v 1.64 2019/01/01 19:41:04 christos Exp $ +# $NetBSD: Makefile.booters,v 1.65 2021/04/25 23:42:08 christos Exp $ NOMAN= # defined NOPIE= # defined @@ -29,7 +29,7 @@ CFLAGS+= -Wall -Wmissing-prototypes -Wst CFLAGS+= -Werror LDBUG= -T $S/arch/mips/conf/stand.ldscript -.if ${MACHINE_ARCH} == "mips64el" +.if !empty(MACHINE_ARCH:Mmips*64el) AFLAGS+= -mips3 -mabi=32 CFLAGS+= -mips3 -mabi=32 LDBUG+= -m elf32ltsmip
CVS commit: src/sys/arch/pmax
Module Name:src Committed By: thorpej Date: Sat Nov 21 16:07:18 UTC 2020 Modified Files: src/sys/arch/pmax/pmax: bus_dma.c src/sys/arch/pmax/tc: dt.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/sys/arch/pmax/pmax/bus_dma.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/pmax/tc/dt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/bus_dma.c diff -u src/sys/arch/pmax/pmax/bus_dma.c:1.59 src/sys/arch/pmax/pmax/bus_dma.c:1.60 --- src/sys/arch/pmax/pmax/bus_dma.c:1.59 Thu May 18 16:34:56 2017 +++ src/sys/arch/pmax/pmax/bus_dma.c Sat Nov 21 16:07:18 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.59 2017/05/18 16:34:56 christos Exp $ */ +/* $NetBSD: bus_dma.c,v 1.60 2020/11/21 16:07:18 thorpej Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.59 2017/05/18 16:34:56 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.60 2020/11/21 16:07:18 thorpej Exp $"); #include "opt_cputype.h" @@ -42,6 +42,7 @@ __KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v #include #include #include +#include #include @@ -87,6 +88,14 @@ pmax_bus_dma_init(void) #endif } +static size_t +_bus_dmamap_mapsize(int const nsegments) +{ + KASSERT(nsegments > 0); + return sizeof(struct pmax_bus_dmamap) + + (sizeof(bus_dma_segment_t) * (nsegments - 1)); +} + /* * Common function for DMA map creation. May be called by bus-specific * DMA map creation functions. @@ -97,7 +106,6 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_ { struct pmax_bus_dmamap *map; void *mapstore; - size_t mapsize; /* * Allocate and initialize the DMA map. The end of the map @@ -111,13 +119,10 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_ * The bus_dmamap_t includes one bus_dma_segment_t, hence * the (nsegments - 1). */ - mapsize = sizeof(struct pmax_bus_dmamap) + - (sizeof(bus_dma_segment_t) * (nsegments - 1)); - if ((mapstore = malloc(mapsize, M_DMAMAP, - (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL) + if ((mapstore = kmem_zalloc(_bus_dmamap_mapsize(nsegments), + (flags & BUS_DMA_NOWAIT) ? KM_NOSLEEP : KM_SLEEP)) == NULL) return (ENOMEM); - memset(mapstore, 0, mapsize); map = (struct pmax_bus_dmamap *)mapstore; map->_dm_size = size; map->_dm_segcnt = nsegments; @@ -141,7 +146,7 @@ void _bus_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map) { - free(map, M_DMAMAP); + kmem_free(map, _bus_dmamap_mapsize(map->_dm_segcnt)); } /* Index: src/sys/arch/pmax/tc/dt.c diff -u src/sys/arch/pmax/tc/dt.c:1.13 src/sys/arch/pmax/tc/dt.c:1.14 --- src/sys/arch/pmax/tc/dt.c:1.13 Sun Nov 10 21:16:31 2019 +++ src/sys/arch/pmax/tc/dt.c Sat Nov 21 16:07:18 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: dt.c,v 1.13 2019/11/10 21:16:31 chs Exp $ */ +/* $NetBSD: dt.c,v 1.14 2020/11/21 16:07:18 thorpej Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -133,7 +133,7 @@ SOFTWARE. */ #include -__KERNEL_RCSID(0, "$NetBSD: dt.c,v 1.13 2019/11/10 21:16:31 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dt.c,v 1.14 2020/11/21 16:07:18 thorpej Exp $"); #include #include @@ -143,7 +143,7 @@ __KERNEL_RCSID(0, "$NetBSD: dt.c,v 1.13 #include #include #include -#include +#include #include #include @@ -215,11 +215,11 @@ dt_attach(device_t parent, device_t self dt_cninit(); - msg = malloc(sizeof(*msg) * DT_BUF_CNT, M_DEVBUF, M_WAITOK); + msg = kmem_alloc(sizeof(*msg) * DT_BUF_CNT, KM_SLEEP); sc->sc_sih = softint_establish(SOFTINT_SERIAL, dt_dispatch, sc); if (sc->sc_sih == NULL) { printf("%s: memory exhausted\n", device_xname(self)); - free(msg, M_DEVBUF); + kmem_free(msg, sizeof(*msg) * DT_BUF_CNT); return; }
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: simonb Date: Mon Sep 28 01:20:29 UTC 2020 Modified Files: src/sys/arch/pmax/pmax: machdep.c Log Message: Protect where the bootinfo esym value is less than the kernel "end" symbol by setting the end of kernel marker to the greater of these two values. XXX: elf2ecoff bug?? To generate a diff of this commit: cvs rdiff -u -r1.253 -r1.254 src/sys/arch/pmax/pmax/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/machdep.c diff -u src/sys/arch/pmax/pmax/machdep.c:1.253 src/sys/arch/pmax/pmax/machdep.c:1.254 --- src/sys/arch/pmax/pmax/machdep.c:1.253 Fri Sep 4 06:12:16 2020 +++ src/sys/arch/pmax/pmax/machdep.c Mon Sep 28 01:20:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.253 2020/09/04 06:12:16 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.254 2020/09/28 01:20:29 simonb Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.253 2020/09/04 06:12:16 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.254 2020/09/28 01:20:29 simonb Exp $"); #include "opt_ddb.h" #include "opt_modular.h" @@ -170,7 +170,14 @@ mach_init(int argc, int32_t *argv32, int if (bi_syms != NULL) { ssym = (void *)(intptr_t)bi_syms->ssym; esym = (void *)(intptr_t)bi_syms->esym; - kernend = (void *)mips_round_page(esym); + + if (esym < (void *)end) { + /* protect against bogus bootinfo data */ + kernend = end; + } else { + kernend = esym; + } + kernend = (void *)mips_round_page(kernend); #if 0 /* our bootloader clears BSS properly */ memset(edata, 0, end - edata); #endif
CVS commit: src/sys/arch/pmax/conf
Module Name:src Committed By: mrg Date: Mon Sep 7 09:14:48 UTC 2020 Modified Files: src/sys/arch/pmax/conf: RAMDISK64 Log Message: bump ramdisk image size to match build size. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/pmax/conf/RAMDISK64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/conf/RAMDISK64 diff -u src/sys/arch/pmax/conf/RAMDISK64:1.6 src/sys/arch/pmax/conf/RAMDISK64:1.7 --- src/sys/arch/pmax/conf/RAMDISK64:1.6 Wed Apr 3 11:30:28 2019 +++ src/sys/arch/pmax/conf/RAMDISK64 Mon Sep 7 09:14:47 2020 @@ -1,4 +1,4 @@ -# $NetBSD: RAMDISK64,v 1.6 2019/04/03 11:30:28 christos Exp $ +# $NetBSD: RAMDISK64,v 1.7 2020/09/07 09:14:47 mrg Exp $ # # Install kernel with ramdisk added. # The ramdisk is be too big to netboot directly via ECOFF on some machines, @@ -13,7 +13,7 @@ include "arch/pmax/conf/INSTALL64" options MEMORY_DISK_HOOKS options MEMORY_DISK_IS_ROOT # force root on memory disk options MEMORY_DISK_SERVER=0 # no userspace memory disk support -options MEMORY_DISK_ROOT_SIZE=8200 # size of memory disk, in blocks (4100kB) +options MEMORY_DISK_ROOT_SIZE=9000 # size of memory disk, in blocks (4500kB) # File systems: need MFS file-system MFS # memory file system
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: skrll Date: Fri Sep 4 06:12:16 UTC 2020 Modified Files: src/sys/arch/pmax/pmax: machdep.c Log Message: Fix build of INSTALL kernel which doesn't have DDB To generate a diff of this commit: cvs rdiff -u -r1.252 -r1.253 src/sys/arch/pmax/pmax/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/machdep.c diff -u src/sys/arch/pmax/pmax/machdep.c:1.252 src/sys/arch/pmax/pmax/machdep.c:1.253 --- src/sys/arch/pmax/pmax/machdep.c:1.252 Thu Sep 3 07:05:30 2020 +++ src/sys/arch/pmax/pmax/machdep.c Fri Sep 4 06:12:16 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.252 2020/09/03 07:05:30 simonb Exp $ */ +/* $NetBSD: machdep.c,v 1.253 2020/09/04 06:12:16 skrll Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.252 2020/09/03 07:05:30 simonb Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.253 2020/09/04 06:12:16 skrll Exp $"); #include "opt_ddb.h" #include "opt_modular.h" @@ -211,8 +211,10 @@ mach_init(int argc, int32_t *argv32, int callv = &callvec; } +#ifdef DDB /* Make DDB "machine reset" call emulate pushing the HALT button. */ cpu_reset_address = prom_haltbutton; +#endif /* Use PROM console output until we initialize a console driver. */ cn_tab = &promcd;
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: simonb Date: Thu Sep 3 07:05:30 UTC 2020 Modified Files: src/sys/arch/pmax/pmax: machdep.c Log Message: Make DDB "machine reset" call emulate pushing the HALT button. Useful if DDB gets confused and "reboot" doesn't work. To generate a diff of this commit: cvs rdiff -u -r1.251 -r1.252 src/sys/arch/pmax/pmax/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/machdep.c diff -u src/sys/arch/pmax/pmax/machdep.c:1.251 src/sys/arch/pmax/pmax/machdep.c:1.252 --- src/sys/arch/pmax/pmax/machdep.c:1.251 Thu Dec 22 14:47:58 2016 +++ src/sys/arch/pmax/pmax/machdep.c Thu Sep 3 07:05:30 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.251 2016/12/22 14:47:58 cherry Exp $ */ +/* $NetBSD: machdep.c,v 1.252 2020/09/03 07:05:30 simonb Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.251 2016/12/22 14:47:58 cherry Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.252 2020/09/03 07:05:30 simonb Exp $"); #include "opt_ddb.h" #include "opt_modular.h" @@ -211,6 +211,9 @@ mach_init(int argc, int32_t *argv32, int callv = &callvec; } + /* Make DDB "machine reset" call emulate pushing the HALT button. */ + cpu_reset_address = prom_haltbutton; + /* Use PROM console output until we initialize a console driver. */ cn_tab = &promcd;
CVS commit: src/sys/arch/pmax/tc
Module Name:src Committed By: simonb Date: Thu Sep 3 06:42:29 UTC 2020 Modified Files: src/sys/arch/pmax/tc: ioasic.c Log Message: The TC device addresses are defined in KSEG1, but this confuses bus_space(9) which expects bus addresses and not kernel virtual addresses. Pull the addresses back to bus addresses with MIPS_KSEG1_TO_PHYS(). XXX: Fix this properly one day (without storing KSEG1 addrs in the TC device configuration). Fixes problem with TURBOchannel pmaxes panicing during autoconfiguartion. To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.23 src/sys/arch/pmax/tc/ioasic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/tc/ioasic.c diff -u src/sys/arch/pmax/tc/ioasic.c:1.22 src/sys/arch/pmax/tc/ioasic.c:1.23 --- src/sys/arch/pmax/tc/ioasic.c:1.22 Sun Nov 10 20:09:53 2013 +++ src/sys/arch/pmax/tc/ioasic.c Thu Sep 3 06:42:29 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: ioasic.c,v 1.22 2013/11/10 20:09:53 christos Exp $ */ +/* $NetBSD: ioasic.c,v 1.23 2020/09/03 06:42:29 simonb Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: ioasic.c,v 1.22 2013/11/10 20:09:53 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ioasic.c,v 1.23 2020/09/03 06:42:29 simonb Exp $"); #include #include @@ -133,7 +133,14 @@ ioasicattach(device_t parent, device_t s sc->sc_dev = self; sc->sc_bst = ta->ta_memt; - if (bus_space_map(ta->ta_memt, ta->ta_addr, + /* + * XXX + * The TC device addresses are defined in KSEG1, but this + * confuses bus_space(9) which expects bus addresses and + * not kernel virtual addresses. Pull the addresses back + * to bus addresses with MIPS_KSEG1_TO_PHYS(). + */ + if (bus_space_map(ta->ta_memt, MIPS_KSEG1_TO_PHYS(ta->ta_addr), 0x40, 0, &sc->sc_bsh)) { printf("%s: unable to map device\n", device_xname(self)); return;
CVS commit: src/sys/arch/pmax/conf
Module Name:src Committed By: skrll Date: Sun Aug 30 07:09:02 UTC 2020 Modified Files: src/sys/arch/pmax/conf: GENERIC Log Message: Add some debug options to help find why the automated tests are failing. XXX turn off on release branch To generate a diff of this commit: cvs rdiff -u -r1.202 -r1.203 src/sys/arch/pmax/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/pmax/conf/GENERIC diff -u src/sys/arch/pmax/conf/GENERIC:1.202 src/sys/arch/pmax/conf/GENERIC:1.203 --- src/sys/arch/pmax/conf/GENERIC:1.202 Sun Aug 30 07:08:13 2020 +++ src/sys/arch/pmax/conf/GENERIC Sun Aug 30 07:09:02 2020 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.202 2020/08/30 07:08:13 skrll Exp $ +# $NetBSD: GENERIC,v 1.203 2020/08/30 07:09:02 skrll Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/pmax/conf/std.pmax" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.202 $" +#ident "GENERIC-$Revision: 1.203 $" maxusers 64 @@ -46,9 +46,10 @@ makeoptions DEBUG="-g" # Standard system options options DDB # in-kernel debugger options DDB_HISTORY_SIZE=512 # enable history editing in DDB -options DDB_ONPANIC=0 # don't enter debugger on panic -#options DIAGNOSTIC # extra kernel debugging checks -#options DEBUG # extra kernel debugging support +options DDB_ONPANIC=1 # don't enter debugger on panic +options DDB_COMMANDONENTER="trace;show registers" +options DIAGNOSTIC # extra kernel debugging checks +options DEBUG # extra kernel debugging support #options LOCKDEBUG #options VMFAULT_TRACE #options PMAP_FAULTINFO
CVS commit: src/sys/arch/pmax/conf
Module Name:src Committed By: skrll Date: Sun Aug 30 07:08:13 UTC 2020 Modified Files: src/sys/arch/pmax/conf: GENERIC Log Message: Trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.201 -r1.202 src/sys/arch/pmax/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/pmax/conf/GENERIC diff -u src/sys/arch/pmax/conf/GENERIC:1.201 src/sys/arch/pmax/conf/GENERIC:1.202 --- src/sys/arch/pmax/conf/GENERIC:1.201 Sat Aug 1 08:20:51 2020 +++ src/sys/arch/pmax/conf/GENERIC Sun Aug 30 07:08:13 2020 @@ -1,7 +1,7 @@ -# $NetBSD: GENERIC,v 1.201 2020/08/01 08:20:51 maxv Exp $ +# $NetBSD: GENERIC,v 1.202 2020/08/30 07:08:13 skrll Exp $ # # GENERIC machine description file -# +# # This machine description file is used to generate the default NetBSD # kernel. The generic kernel does not include all options, subsystems # and device drivers, but should be useful for most applications. @@ -22,7 +22,7 @@ include "arch/pmax/conf/std.pmax" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.201 $" +#ident "GENERIC-$Revision: 1.202 $" maxusers 64 @@ -185,7 +185,7 @@ asc* at ioasic? offset ? # NCR53C94 SCSI zstty* at zsc? channel ? # serial ports on B/A channels lkkbd* at zsc1 channel ? # keyboard port on A channels -vsms* at zsc0 channel ? # mouse port on A channels +vsms* at zsc0 channel ? # mouse port on A channels audio* at bba?
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: martin Date: Sun Dec 15 12:50:39 UTC 2019 Modified Files: src/sys/arch/pmax/pmax: disksubr.c Log Message: Disable (pretty useless and obscure) message when checking for Ultrix comaptible labels. To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/arch/pmax/pmax/disksubr.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/disksubr.c diff -u src/sys/arch/pmax/pmax/disksubr.c:1.55 src/sys/arch/pmax/pmax/disksubr.c:1.56 --- src/sys/arch/pmax/pmax/disksubr.c:1.55 Wed Apr 3 22:10:51 2019 +++ src/sys/arch/pmax/pmax/disksubr.c Sun Dec 15 12:50:39 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: disksubr.c,v 1.55 2019/04/03 22:10:51 christos Exp $ */ +/* $NetBSD: disksubr.c,v 1.56 2019/12/15 12:50:39 martin Exp $ */ /* * Copyright (c) 1982, 1986, 1988 Regents of the University of California. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.55 2019/04/03 22:10:51 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: disksubr.c,v 1.56 2019/12/15 12:50:39 martin Exp $"); #include "opt_compat_ultrix.h" @@ -146,7 +146,9 @@ compat_label(dev_t dev, void (*strat)(st int part; if (dlp->magic != DEC_LABEL_MAGIC) { +#if 0 printf("label: %x\n",dlp->magic); +#endif msg = ((msg != NULL) ? msg: "no disk label"); goto done; }
CVS commit: src/sys/arch/pmax/conf
Module Name:src Committed By: sevan Date: Fri Apr 26 22:29:20 UTC 2019 Modified Files: src/sys/arch/pmax/conf: GENERIC64 Log Message: typo To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/sys/arch/pmax/conf/GENERIC64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/conf/GENERIC64 diff -u src/sys/arch/pmax/conf/GENERIC64:1.31 src/sys/arch/pmax/conf/GENERIC64:1.32 --- src/sys/arch/pmax/conf/GENERIC64:1.31 Fri Apr 26 22:28:41 2019 +++ src/sys/arch/pmax/conf/GENERIC64 Fri Apr 26 22:29:20 2019 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC64,v 1.31 2019/04/26 22:28:41 sevan Exp $ +# $NetBSD: GENERIC64,v 1.32 2019/04/26 22:29:20 sevan Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/pmax/conf/std.pmax64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.31 $" +#ident "GENERIC-$Revision: 1.32 $" maxusers 64 @@ -289,4 +289,4 @@ pseudo-device wsfont # wsfont control pseudo-device wsmux # wsmux control device # Veriexec -# include "dev/veriexec.config" +include "dev/veriexec.config"
CVS commit: src/sys/arch/pmax/conf
Module Name:src Committed By: sevan Date: Fri Apr 26 22:28:41 UTC 2019 Modified Files: src/sys/arch/pmax/conf: GENERIC64 Log Message: Enable BUFQ_PRIOCSCAN, CARP, Veriexec To generate a diff of this commit: cvs rdiff -u -r1.30 -r1.31 src/sys/arch/pmax/conf/GENERIC64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/conf/GENERIC64 diff -u src/sys/arch/pmax/conf/GENERIC64:1.30 src/sys/arch/pmax/conf/GENERIC64:1.31 --- src/sys/arch/pmax/conf/GENERIC64:1.30 Sat Apr 13 08:23:00 2019 +++ src/sys/arch/pmax/conf/GENERIC64 Fri Apr 26 22:28:41 2019 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC64,v 1.30 2019/04/13 08:23:00 isaki Exp $ +# $NetBSD: GENERIC64,v 1.31 2019/04/26 22:28:41 sevan Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/pmax/conf/std.pmax64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.30 $" +#ident "GENERIC-$Revision: 1.31 $" maxusers 64 @@ -55,7 +55,7 @@ options SYSCTL_INCLUDE_DESCR # Include # Alternate buffer queue strategies for better responsiveness under high # disk I/O load. #options BUFQ_READPRIO -#options BUFQ_PRIOCSCAN +options BUFQ_PRIOCSCAN #options SCSIVERBOSE # Verbose SCSI errors #options TCVERBOSE # recognize "unknown" TC devices @@ -255,7 +255,7 @@ pseudo-device ppp # serial-line IP po pseudo-device pppoe # PPP over Ethernet (RFC 2516) pseudo-device pty # pseudo-terminals pseudo-device bpfilter # packet filter ports -#pseudo-device carp # Common Address Redundancy Protocol +pseudo-device carp # Common Address Redundancy Protocol pseudo-device npf # NPF packet filter #pseudo-device gre # generic L3 over IP tunnel pseudo-device gif # IPv[46] over IPv[46] tunnel (RFC1933) @@ -289,14 +289,4 @@ pseudo-device wsfont # wsfont control pseudo-device wsmux # wsmux control device # Veriexec -# -# a pseudo device needed for veriexec -#pseudo-device veriexec -# -# Uncomment the fingerprint methods below that are desired. Note that -# removing fingerprint methods will have almost no impact on the kernel -# code size. -# -#options VERIFIED_EXEC_FP_SHA256 -#options VERIFIED_EXEC_FP_SHA384 -#options VERIFIED_EXEC_FP_SHA512 +# include "dev/veriexec.config"
CVS commit: src/sys/arch/pmax/conf
Module Name:src Committed By: christos Date: Wed Apr 3 11:30:28 UTC 2019 Modified Files: src/sys/arch/pmax/conf: RAMDISK RAMDISK64 Log Message: Adjust for bigger ramdisk To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/pmax/conf/RAMDISK cvs rdiff -u -r1.5 -r1.6 src/sys/arch/pmax/conf/RAMDISK64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/conf/RAMDISK diff -u src/sys/arch/pmax/conf/RAMDISK:1.16 src/sys/arch/pmax/conf/RAMDISK:1.17 --- src/sys/arch/pmax/conf/RAMDISK:1.16 Sun Mar 31 12:11:57 2019 +++ src/sys/arch/pmax/conf/RAMDISK Wed Apr 3 07:30:28 2019 @@ -1,4 +1,4 @@ -# $NetBSD: RAMDISK,v 1.16 2019/03/31 16:11:57 christos Exp $ +# $NetBSD: RAMDISK,v 1.17 2019/04/03 11:30:28 christos Exp $ # # Install kernel with ramdisk added. # The ramdisk is be too big to netboot directly via ECOFF on some machines, @@ -13,7 +13,7 @@ include "arch/pmax/conf/INSTALL" options MEMORY_DISK_HOOKS options MEMORY_DISK_IS_ROOT # force root on memory disk options MEMORY_DISK_SERVER=0 # no userspace memory disk support -options MEMORY_DISK_ROOT_SIZE=8000 # size of memory disk, in blocks (4000kB) +options MEMORY_DISK_ROOT_SIZE=8200 # size of memory disk, in blocks (4100kB) #options MEMORY_DISK_ROOT_SIZE=2880 # 1.44M, same as a floppy options MEMORY_DISK_RBFLAGS=RB_SINGLE # boot in single-user mode Index: src/sys/arch/pmax/conf/RAMDISK64 diff -u src/sys/arch/pmax/conf/RAMDISK64:1.5 src/sys/arch/pmax/conf/RAMDISK64:1.6 --- src/sys/arch/pmax/conf/RAMDISK64:1.5 Sun Mar 31 12:11:57 2019 +++ src/sys/arch/pmax/conf/RAMDISK64 Wed Apr 3 07:30:28 2019 @@ -1,4 +1,4 @@ -# $NetBSD: RAMDISK64,v 1.5 2019/03/31 16:11:57 christos Exp $ +# $NetBSD: RAMDISK64,v 1.6 2019/04/03 11:30:28 christos Exp $ # # Install kernel with ramdisk added. # The ramdisk is be too big to netboot directly via ECOFF on some machines, @@ -13,7 +13,7 @@ include "arch/pmax/conf/INSTALL64" options MEMORY_DISK_HOOKS options MEMORY_DISK_IS_ROOT # force root on memory disk options MEMORY_DISK_SERVER=0 # no userspace memory disk support -options MEMORY_DISK_ROOT_SIZE=8000 # size of memory disk, in blocks (4000kB) +options MEMORY_DISK_ROOT_SIZE=8200 # size of memory disk, in blocks (4100kB) # File systems: need MFS file-system MFS # memory file system
CVS commit: src/sys/arch/pmax/conf
Module Name:src Committed By: christos Date: Sun Mar 31 16:11:57 UTC 2019 Modified Files: src/sys/arch/pmax/conf: RAMDISK RAMDISK64 Log Message: bump To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/pmax/conf/RAMDISK cvs rdiff -u -r1.4 -r1.5 src/sys/arch/pmax/conf/RAMDISK64 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/conf/RAMDISK diff -u src/sys/arch/pmax/conf/RAMDISK:1.15 src/sys/arch/pmax/conf/RAMDISK:1.16 --- src/sys/arch/pmax/conf/RAMDISK:1.15 Wed Feb 13 02:55:33 2019 +++ src/sys/arch/pmax/conf/RAMDISK Sun Mar 31 12:11:57 2019 @@ -1,4 +1,4 @@ -# $NetBSD: RAMDISK,v 1.15 2019/02/13 07:55:33 gson Exp $ +# $NetBSD: RAMDISK,v 1.16 2019/03/31 16:11:57 christos Exp $ # # Install kernel with ramdisk added. # The ramdisk is be too big to netboot directly via ECOFF on some machines, @@ -13,7 +13,7 @@ include "arch/pmax/conf/INSTALL" options MEMORY_DISK_HOOKS options MEMORY_DISK_IS_ROOT # force root on memory disk options MEMORY_DISK_SERVER=0 # no userspace memory disk support -options MEMORY_DISK_ROOT_SIZE=7200 # size of memory disk, in blocks (3500kB) +options MEMORY_DISK_ROOT_SIZE=8000 # size of memory disk, in blocks (4000kB) #options MEMORY_DISK_ROOT_SIZE=2880 # 1.44M, same as a floppy options MEMORY_DISK_RBFLAGS=RB_SINGLE # boot in single-user mode Index: src/sys/arch/pmax/conf/RAMDISK64 diff -u src/sys/arch/pmax/conf/RAMDISK64:1.4 src/sys/arch/pmax/conf/RAMDISK64:1.5 --- src/sys/arch/pmax/conf/RAMDISK64:1.4 Sun Feb 20 02:50:24 2011 +++ src/sys/arch/pmax/conf/RAMDISK64 Sun Mar 31 12:11:57 2019 @@ -1,4 +1,4 @@ -# $NetBSD: RAMDISK64,v 1.4 2011/02/20 07:50:24 matt Exp $ +# $NetBSD: RAMDISK64,v 1.5 2019/03/31 16:11:57 christos Exp $ # # Install kernel with ramdisk added. # The ramdisk is be too big to netboot directly via ECOFF on some machines, @@ -13,7 +13,7 @@ include "arch/pmax/conf/INSTALL64" options MEMORY_DISK_HOOKS options MEMORY_DISK_IS_ROOT # force root on memory disk options MEMORY_DISK_SERVER=0 # no userspace memory disk support -options MEMORY_DISK_ROOT_SIZE=7168 # size of memory disk, in blocks (3500kB) +options MEMORY_DISK_ROOT_SIZE=8000 # size of memory disk, in blocks (4000kB) # File systems: need MFS file-system MFS # memory file system
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: mrg Date: Thu Feb 7 04:32:38 UTC 2019 Modified Files: src/sys/arch/pmax/pmax: bus.c Log Message: #if 0 the same code as already done To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/pmax/pmax/bus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/bus.c diff -u src/sys/arch/pmax/pmax/bus.c:1.3 src/sys/arch/pmax/pmax/bus.c:1.4 --- src/sys/arch/pmax/pmax/bus.c:1.3 Sun Jul 16 17:35:20 2017 +++ src/sys/arch/pmax/pmax/bus.c Thu Feb 7 04:32:38 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.c,v 1.3 2017/07/16 17:35:20 christos Exp $ */ +/* $NetBSD: bus.c,v 1.4 2019/02/07 04:32:38 mrg Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.3 2017/07/16 17:35:20 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.4 2019/02/07 04:32:38 mrg Exp $"); #include "opt_cputype.h" @@ -62,8 +62,10 @@ struct mips_bus_dma_tag pmax_default_bus }; static void normal_bus_mem_init(bus_space_tag_t, void *); +#ifdef MIPS1 static void _bus_dmamap_sync_r3k(bus_dma_tag_t, bus_dmamap_t, bus_addr_t, bus_size_t, int); +#endif #if 0 static void _bus_dmamap_sync_r4k(bus_dma_tag_t, bus_dmamap_t, bus_addr_t, bus_size_t, int);
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: tsutsui Date: Mon Sep 17 16:52:29 UTC 2018 Modified Files: src/sys/arch/pmax/pmax: dec_3min.c Log Message: Fix hangup after framebuffers are attached on 3MIN. PR port-pmax/53611 Ok'ed by mrg@. Should be pulled up to netbsd-7 and netbsd-8. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/arch/pmax/pmax/dec_3min.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/dec_3min.c diff -u src/sys/arch/pmax/pmax/dec_3min.c:1.73 src/sys/arch/pmax/pmax/dec_3min.c:1.74 --- src/sys/arch/pmax/pmax/dec_3min.c:1.73 Mon Mar 24 19:31:40 2014 +++ src/sys/arch/pmax/pmax/dec_3min.c Mon Sep 17 16:52:28 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3min.c,v 1.73 2014/03/24 19:31:40 christos Exp $ */ +/* $NetBSD: dec_3min.c,v 1.74 2018/09/17 16:52:28 tsutsui Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -70,7 +70,7 @@ #define __INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: dec_3min.c,v 1.73 2014/03/24 19:31:40 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3min.c,v 1.74 2018/09/17 16:52:28 tsutsui Exp $"); #include #include @@ -292,12 +292,7 @@ dec_3min_intr_establish(device_t dev, vo case SYS_DEV_OPT0: case SYS_DEV_OPT1: case SYS_DEV_OPT2: - /* it's an option slot */ - { - int s = splhigh(); - s |= mask; - splx(s); - } + /* it's an option slot and handled via MIPS_INT_MASK_[012] */ break; default: /* it's a baseboard device going via the IOASIC */
CVS commit: src/sys/arch/pmax/conf
Module Name:src Committed By: flxd Date: Fri Jan 5 13:20:46 UTC 2018 Modified Files: src/sys/arch/pmax/conf: GENERIC Log Message: Comment out DIAGNOSTIC/DEBUG/LOCKDEBUG from r1.192 slowing down real machines. OK christos@ To generate a diff of this commit: cvs rdiff -u -r1.194 -r1.195 src/sys/arch/pmax/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/pmax/conf/GENERIC diff -u src/sys/arch/pmax/conf/GENERIC:1.194 src/sys/arch/pmax/conf/GENERIC:1.195 --- src/sys/arch/pmax/conf/GENERIC:1.194 Thu Sep 14 07:58:42 2017 +++ src/sys/arch/pmax/conf/GENERIC Fri Jan 5 13:20:45 2018 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.194 2017/09/14 07:58:42 mrg Exp $ +# $NetBSD: GENERIC,v 1.195 2018/01/05 13:20:45 flxd Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/pmax/conf/std.pmax" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.194 $" +#ident "GENERIC-$Revision: 1.195 $" maxusers 64 @@ -47,9 +47,9 @@ makeoptions DEBUG="-g" options DDB # in-kernel debugger options DDB_HISTORY_SIZE=512 # enable history editing in DDB options DDB_ONPANIC=0 # don't enter debugger on panic -options DIAGNOSTIC # extra kernel debugging checks -options DEBUG # extra kernel debugging support -options LOCKDEBUG +#options DIAGNOSTIC # extra kernel debugging checks +#options DEBUG # extra kernel debugging support +#options LOCKDEBUG #options VMFAULT_TRACE #options PMAP_FAULTINFO options KTRACE # system call tracing support
CVS commit: src/sys/arch/pmax/ibus
Module Name:src Committed By: flxd Date: Fri Jan 5 13:11:32 UTC 2018 Modified Files: src/sys/arch/pmax/ibus: pm.c Log Message: Check presence of VFB01/VFB02 frame buffer option on DEC(station|system) 3100. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/pmax/ibus/pm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/ibus/pm.c diff -u src/sys/arch/pmax/ibus/pm.c:1.13 src/sys/arch/pmax/ibus/pm.c:1.14 --- src/sys/arch/pmax/ibus/pm.c:1.13 Tue Jun 13 19:13:55 2017 +++ src/sys/arch/pmax/ibus/pm.c Fri Jan 5 13:11:32 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: pm.c,v 1.13 2017/06/13 19:13:55 spz Exp $ */ +/* $NetBSD: pm.c,v 1.14 2018/01/05 13:11:32 flxd Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pm.c,v 1.13 2017/06/13 19:13:55 spz Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pm.c,v 1.14 2018/01/05 13:11:32 flxd Exp $"); #include #include @@ -90,6 +90,7 @@ struct pm_softc { int pm_match(device_t, cfdata_t, void *); void pm_attach(device_t, device_t, void *); +int pm_check_vfb(void); int pm_ioctl(void *, void *, u_long, void *, int, struct lwp *); paddr_t pm_mmap(void *, void *, off_t, int); int pm_alloc_screen(void *, const struct wsscreen_descr *, @@ -174,6 +175,9 @@ pm_attach(device_t parent, device_t self if (console) { sc->sc_nscreens = 1; ri->ri_flg &= ~RI_NO_AUTO; + } else if (!pm_check_vfb()) { + printf(": VFB01/VFB02 frame buffer option not found\n"); + return; } else pm_common_init(); @@ -192,6 +196,27 @@ pm_attach(device_t parent, device_t self config_found(self, &waa, wsemuldisplaydevprint); } +int +pm_check_vfb(void) +{ + int *mem; + const int magic = 0xcafebabe; + + mem = (void *)MIPS_PHYS_TO_KSEG1(KN01_PHYS_FBUF_START); + + *mem = magic; + wbflush(); + if (*mem != magic) + return 0; + + *mem = ~magic; + wbflush(); + if (*mem != ~magic) + return 0; + + return 1; +} + void pm_init_cmap(struct pm_softc *sc) {
CVS commit: src/sys/arch/pmax/conf
Module Name:src Committed By: christos Date: Sun Aug 6 11:50:21 UTC 2017 Modified Files: src/sys/arch/pmax/conf: GENERIC Log Message: Turn on DIAGNOSTIC and DEBUG. To generate a diff of this commit: cvs rdiff -u -r1.191 -r1.192 src/sys/arch/pmax/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/pmax/conf/GENERIC diff -u src/sys/arch/pmax/conf/GENERIC:1.191 src/sys/arch/pmax/conf/GENERIC:1.192 --- src/sys/arch/pmax/conf/GENERIC:1.191 Fri Jul 28 15:26:16 2017 +++ src/sys/arch/pmax/conf/GENERIC Sun Aug 6 07:50:21 2017 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.191 2017/07/28 19:26:16 maxv Exp $ +# $NetBSD: GENERIC,v 1.192 2017/08/06 11:50:21 christos Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/pmax/conf/std.pmax" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.191 $" +#ident "GENERIC-$Revision: 1.192 $" maxusers 64 @@ -47,8 +47,11 @@ makeoptions DEBUG="-g" options DDB # in-kernel debugger options DDB_HISTORY_SIZE=512 # enable history editing in DDB options DDB_ONPANIC=0 # don't enter debugger on panic -#options DIAGNOSTIC # extra kernel debugging checks -#options DEBUG # extra kernel debugging support +options DIAGNOSTIC # extra kernel debugging checks +options DEBUG # extra kernel debugging support +options LOCKDEBUG +#options VMFAULT_TRACE +#options PMAP_FAULTINFO options COMPAT_43 # compatibility with 4.3BSD binaries options KTRACE # system call tracing support
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: christos Date: Sun Jul 16 17:35:20 UTC 2017 Modified Files: src/sys/arch/pmax/pmax: bus.c Log Message: fix printf formats. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/pmax/pmax/bus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/bus.c diff -u src/sys/arch/pmax/pmax/bus.c:1.2 src/sys/arch/pmax/pmax/bus.c:1.3 --- src/sys/arch/pmax/pmax/bus.c:1.2 Thu May 18 12:34:56 2017 +++ src/sys/arch/pmax/pmax/bus.c Sun Jul 16 13:35:20 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.c,v 1.2 2017/05/18 16:34:56 christos Exp $ */ +/* $NetBSD: bus.c,v 1.3 2017/07/16 17:35:20 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.2 2017/05/18 16:34:56 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.3 2017/07/16 17:35:20 christos Exp $"); #include "opt_cputype.h" @@ -117,10 +117,10 @@ _bus_dmamap_sync_r3k(bus_dma_tag_t t, bu #ifdef DIAGNOSTIC if (offset >= map->dm_mapsize) - panic("_bus_dmamap_sync_r3k: bad offset %lu (map size is %lu)", - offset, map->dm_mapsize); + panic("%s: bad offset %ju (map size is %ju)", __func__, + (uintmax_t)offset, (uintmax_t)map->dm_mapsize); if (len == 0 || (offset + len) > map->dm_mapsize) - panic("_bus_dmamap_sync_r3k: bad length"); + panic("%s: bad length", __func__); #endif /* @@ -222,10 +222,10 @@ _bus_dmamap_sync_r4k(bus_dma_tag_t t, bu #ifdef DIAGNOSTIC if (offset >= map->dm_mapsize) - panic("_bus_dmamap_sync_r4k: bad offset %lu (map size is %lu)", - offset, map->dm_mapsize); + panic("%s: bad offset %ju (map size is %ju)", __func__, + (uintmax_t)offset, (uintmax_t)map->dm_mapsize); if (len == 0 || (offset + len) > map->dm_mapsize) - panic("_bus_dmamap_sync_r4k: bad length"); + panic("%s: bad length", __func__); #endif /*
CVS commit: src/sys/arch/pmax/conf
Module Name:src Committed By: christos Date: Fri Jul 14 12:27:55 UTC 2017 Modified Files: src/sys/arch/pmax/conf: RAMDISK Log Message: make the comment match To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/pmax/conf/RAMDISK Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/conf/RAMDISK diff -u src/sys/arch/pmax/conf/RAMDISK:1.13 src/sys/arch/pmax/conf/RAMDISK:1.14 --- src/sys/arch/pmax/conf/RAMDISK:1.13 Thu Jul 13 17:14:41 2017 +++ src/sys/arch/pmax/conf/RAMDISK Fri Jul 14 08:27:55 2017 @@ -1,4 +1,4 @@ -# $NetBSD: RAMDISK,v 1.13 2017/07/13 21:14:41 christos Exp $ +# $NetBSD: RAMDISK,v 1.14 2017/07/14 12:27:55 christos Exp $ # # Install kernel with ramdisk added. # The ramdisk is be too big to netboot directly via ECOFF on some machines, @@ -13,7 +13,7 @@ include "arch/pmax/conf/INSTALL" options MEMORY_DISK_HOOKS options MEMORY_DISK_IS_ROOT # force root on memory disk options MEMORY_DISK_SERVER=0 # no userspace memory disk support -options MEMORY_DISK_ROOT_SIZE=7000 # size of memory disk, in blocks (3400kB) +options MEMORY_DISK_ROOT_SIZE=7000 # size of memory disk, in blocks (3500kB) #options MEMORY_DISK_ROOT_SIZE=2880 # 1.44M, same as a floppy options MEMORY_DISK_RBFLAGS=RB_SINGLE # boot in single-user mode
CVS commit: src/sys/arch/pmax/conf
Module Name:src Committed By: christos Date: Thu Jul 13 21:14:41 UTC 2017 Modified Files: src/sys/arch/pmax/conf: RAMDISK Log Message: ramdisk ate too much ice cream, compensate. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/pmax/conf/RAMDISK Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/conf/RAMDISK diff -u src/sys/arch/pmax/conf/RAMDISK:1.12 src/sys/arch/pmax/conf/RAMDISK:1.13 --- src/sys/arch/pmax/conf/RAMDISK:1.12 Tue Nov 23 06:14:04 2010 +++ src/sys/arch/pmax/conf/RAMDISK Thu Jul 13 17:14:41 2017 @@ -1,4 +1,4 @@ -# $NetBSD: RAMDISK,v 1.12 2010/11/23 11:14:04 hannken Exp $ +# $NetBSD: RAMDISK,v 1.13 2017/07/13 21:14:41 christos Exp $ # # Install kernel with ramdisk added. # The ramdisk is be too big to netboot directly via ECOFF on some machines, @@ -13,7 +13,7 @@ include "arch/pmax/conf/INSTALL" options MEMORY_DISK_HOOKS options MEMORY_DISK_IS_ROOT # force root on memory disk options MEMORY_DISK_SERVER=0 # no userspace memory disk support -options MEMORY_DISK_ROOT_SIZE=6800 # size of memory disk, in blocks (3400kB) +options MEMORY_DISK_ROOT_SIZE=7000 # size of memory disk, in blocks (3400kB) #options MEMORY_DISK_ROOT_SIZE=2880 # 1.44M, same as a floppy options MEMORY_DISK_RBFLAGS=RB_SINGLE # boot in single-user mode
CVS commit: src/sys/arch/pmax/ibus
Module Name:src Committed By: christos Date: Thu May 18 16:37:06 UTC 2017 Modified Files: src/sys/arch/pmax/ibus: dz_ibus.c Log Message: PR/52242: Utkarsh Anand: Minimal fix for fallout from moving to the common mips bus_space code. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/pmax/ibus/dz_ibus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/ibus/dz_ibus.c diff -u src/sys/arch/pmax/ibus/dz_ibus.c:1.11 src/sys/arch/pmax/ibus/dz_ibus.c:1.12 --- src/sys/arch/pmax/ibus/dz_ibus.c:1.11 Sat Jul 9 13:32:29 2011 +++ src/sys/arch/pmax/ibus/dz_ibus.c Thu May 18 12:37:06 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: dz_ibus.c,v 1.11 2011/07/09 17:32:29 matt Exp $ */ +/* $NetBSD: dz_ibus.c,v 1.12 2017/05/18 16:37:06 christos Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -61,7 +61,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dz_ibus.c,v 1.11 2011/07/09 17:32:29 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dz_ibus.c,v 1.12 2017/05/18 16:37:06 christos Exp $"); #include "dzkbd.h" #include "dzms.h" @@ -168,6 +168,7 @@ dz_ibus_attach(device_t parent, device_t * XXX - This is evil and ugly, but... due to the nature of how * bus_space_* works on pmax it will do for the time being. */ + sc->sc_iot = normal_memt; sc->sc_ioh = (bus_space_handle_t)MIPS_PHYS_TO_KSEG1(iba->ia_addr); sc->sc_dr.dr_csr = 0;
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: christos Date: Thu May 18 16:34:56 UTC 2017 Modified Files: src/sys/arch/pmax/pmax: bus.c bus_dma.c Log Message: Fix debug (make it compile) To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/pmax/pmax/bus.c cvs rdiff -u -r1.58 -r1.59 src/sys/arch/pmax/pmax/bus_dma.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/bus.c diff -u src/sys/arch/pmax/pmax/bus.c:1.1 src/sys/arch/pmax/pmax/bus.c:1.2 --- src/sys/arch/pmax/pmax/bus.c:1.1 Wed Nov 16 14:37:06 2016 +++ src/sys/arch/pmax/pmax/bus.c Thu May 18 12:34:56 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.c,v 1.1 2016/11/16 19:37:06 macallan Exp $ */ +/* $NetBSD: bus.c,v 1.2 2017/05/18 16:34:56 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.1 2016/11/16 19:37:06 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.2 2017/05/18 16:34:56 christos Exp $"); #include "opt_cputype.h" @@ -182,9 +182,9 @@ _bus_dmamap_sync_r3k(bus_dma_tag_t t, bu addr = map->dm_segs[i].ds_addr; #ifdef BUS_DMA_DEBUG - printf("bus_dmamap_sync_r3k: flushing segment %d " - "(0x%lx..0x%lx) ...", i, addr + offset, - addr + offset + minlen - 1); + printf("%s: flushing segment %d (%#jx..%#jx) ...", __func__, i, + (intmax_t)addr + offset, + (intmax_t)addr + offset + minlen - 1); #endif mips_dcache_inv_range( MIPS_PHYS_TO_KSEG0(addr + offset), minlen); @@ -294,9 +294,9 @@ _bus_dmamap_sync_r4k(bus_dma_tag_t t, bu addr = map->dm_segs[i]._ds_vaddr; #ifdef BUS_DMA_DEBUG - printf("bus_dmamap_sync: flushing segment %d " - "(0x%lx..0x%lx) ...", i, addr + offset, - addr + offset + minlen - 1); + printf("%s: flushing segment %d (%#jx..%#jx) ...", + __func__, i, (intmax_t)addr + offset, + (intmax_t)ddr + offset + minlen - 1); #endif /* Index: src/sys/arch/pmax/pmax/bus_dma.c diff -u src/sys/arch/pmax/pmax/bus_dma.c:1.58 src/sys/arch/pmax/pmax/bus_dma.c:1.59 --- src/sys/arch/pmax/pmax/bus_dma.c:1.58 Thu Jun 11 04:22:09 2015 +++ src/sys/arch/pmax/pmax/bus_dma.c Thu May 18 12:34:56 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.58 2015/06/11 08:22:09 matt Exp $ */ +/* $NetBSD: bus_dma.c,v 1.59 2017/05/18 16:34:56 christos Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.58 2015/06/11 08:22:09 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.59 2017/05/18 16:34:56 christos Exp $"); #include "opt_cputype.h" @@ -493,9 +493,9 @@ _bus_dmamap_sync_r3k(bus_dma_tag_t t, bu addr = map->dm_segs[i].ds_addr; #ifdef BUS_DMA_DEBUG - printf("bus_dmamap_sync_r3k: flushing segment %d " - "(0x%lx..0x%lx) ...", i, addr + offset, - addr + offset + minlen - 1); + printf("%s: flushing segment %d (%#jx..%#jx) ...", __func__, + i, (intmax_t)addr + offset, + (intmax_t)addr + offset + minlen - 1); #endif mips_dcache_inv_range( MIPS_PHYS_TO_KSEG0(addr + offset), minlen); @@ -604,9 +604,9 @@ _bus_dmamap_sync_r4k(bus_dma_tag_t t, bu addr = map->dm_segs[i]._ds_vaddr; #ifdef BUS_DMA_DEBUG - printf("bus_dmamap_sync: flushing segment %d " - "(0x%lx..0x%lx) ...", i, addr + offset, - addr + offset + minlen - 1); + printf("%s: flushing segment %d (%#jx..%#jx) ...", __func__, + i, (intmax_t)addr + offset, + (intmax_t)addr + offset + minlen - 1); #endif /*
CVS commit: src/sys/arch/pmax
Module Name:src Committed By: macallan Date: Wed Nov 16 19:37:06 UTC 2016 Modified Files: src/sys/arch/pmax/conf: files.pmax src/sys/arch/pmax/ibus: ibus_3max.c ibus_pmax.c src/sys/arch/pmax/include: bus.h src/sys/arch/pmax/tc: tcbus.c Added Files: src/sys/arch/pmax/pmax: bus.c Log Message: switch to common MIPS bus_space and bus_dma tested by flxd@ To generate a diff of this commit: cvs rdiff -u -r1.117 -r1.118 src/sys/arch/pmax/conf/files.pmax cvs rdiff -u -r1.15 -r1.16 src/sys/arch/pmax/ibus/ibus_3max.c cvs rdiff -u -r1.23 -r1.24 src/sys/arch/pmax/ibus/ibus_pmax.c cvs rdiff -u -r1.30 -r1.31 src/sys/arch/pmax/include/bus.h cvs rdiff -u -r0 -r1.1 src/sys/arch/pmax/pmax/bus.c cvs rdiff -u -r1.30 -r1.31 src/sys/arch/pmax/tc/tcbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/conf/files.pmax diff -u src/sys/arch/pmax/conf/files.pmax:1.117 src/sys/arch/pmax/conf/files.pmax:1.118 --- src/sys/arch/pmax/conf/files.pmax:1.117 Fri Nov 4 19:18:50 2016 +++ src/sys/arch/pmax/conf/files.pmax Wed Nov 16 19:37:06 2016 @@ -1,4 +1,4 @@ -# $NetBSD: files.pmax,v 1.117 2016/11/04 19:18:50 flxd Exp $ +# $NetBSD: files.pmax,v 1.118 2016/11/16 19:37:06 macallan Exp $ # DECstation-specific configuration info # maxpartitions must be first item in files.${ARCH}. @@ -16,6 +16,12 @@ device cpu# not optional attach cpu at mainbus file arch/pmax/pmax/cpu.c cpu +# +# common mips stuff +# +file arch/mips/mips/bus_dma.c + + # Model support option headers defflag DEC_3100 # DECstation 2100, 3100 (kn01) defflag DEC_5100 # DECsystem 5100 (kn230) @@ -122,8 +128,7 @@ attach le at ibus with le_pmax: le24, l file arch/pmax/ibus/if_le_ibus.c le_pmax file arch/pmax/pmax/autoconf.c -file arch/pmax/pmax/bus_dma.c -file arch/pmax/pmax/bus_space.c +file arch/pmax/pmax/bus.c file arch/pmax/pmax/disksubr.c file arch/pmax/pmax/machdep.c file arch/pmax/pmax/mainbus.c @@ -133,7 +138,6 @@ file arch/pmax/pmax/sysconf.c file arch/pmax/stand/common/callvec.c file dev/cons.c -file dev/bus_dma/bus_dmamem_common.c # # Workstation console devices Index: src/sys/arch/pmax/ibus/ibus_3max.c diff -u src/sys/arch/pmax/ibus/ibus_3max.c:1.15 src/sys/arch/pmax/ibus/ibus_3max.c:1.16 --- src/sys/arch/pmax/ibus/ibus_3max.c:1.15 Sat Jul 9 17:32:29 2011 +++ src/sys/arch/pmax/ibus/ibus_3max.c Wed Nov 16 19:37:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ibus_3max.c,v 1.15 2011/07/09 17:32:29 matt Exp $ */ +/* $NetBSD: ibus_3max.c,v 1.16 2016/11/16 19:37:06 macallan Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ibus_3max.c,v 1.15 2011/07/09 17:32:29 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ibus_3max.c,v 1.16 2016/11/16 19:37:06 macallan Exp $"); #include #include @@ -68,6 +68,7 @@ kn02sys_attach(device_t parent, device_t ida.ida_busname = "ibus"; ida.ida_devs = kn02sys_devs; ida.ida_ndevs = __arraycount(kn02sys_devs); + ida.ida_memt = normal_memt; ibusattach(parent, self, &ida); } Index: src/sys/arch/pmax/ibus/ibus_pmax.c diff -u src/sys/arch/pmax/ibus/ibus_pmax.c:1.23 src/sys/arch/pmax/ibus/ibus_pmax.c:1.24 --- src/sys/arch/pmax/ibus/ibus_pmax.c:1.23 Sat Jul 9 17:32:29 2011 +++ src/sys/arch/pmax/ibus/ibus_pmax.c Wed Nov 16 19:37:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: ibus_pmax.c,v 1.23 2011/07/09 17:32:29 matt Exp $ */ +/* $NetBSD: ibus_pmax.c,v 1.24 2016/11/16 19:37:06 macallan Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -31,7 +31,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: ibus_pmax.c,v 1.23 2011/07/09 17:32:29 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ibus_pmax.c,v 1.24 2016/11/16 19:37:06 macallan Exp $"); #include "opt_dec_3100.h" #include "opt_dec_5100.h" @@ -113,6 +113,7 @@ ibus_pmax_attach(device_t parent, device ibus_attached = 1; ida.ida_busname = "ibus"; + ida.ida_memt = normal_memt; switch (systype) { #ifdef DEC_3100 case DS_PMAX: Index: src/sys/arch/pmax/include/bus.h diff -u src/sys/arch/pmax/include/bus.h:1.30 src/sys/arch/pmax/include/bus.h:1.31 --- src/sys/arch/pmax/include/bus.h:1.30 Sun Feb 20 07:50:25 2011 +++ src/sys/arch/pmax/include/bus.h Wed Nov 16 19:37:06 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.30 2011/02/20 07:50:25 matt Exp $ */ +/* $NetBSD: bus.h,v 1.31 2016/11/16 19:37:06 macallan Exp $ */ /*- * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -41,626 +41,13 @@ #define __PB_TYPENAME_PREFIX(BITS) ___CONCAT(u_int,BITS) #define __PB_TYPENAME(BITS) ___CONCAT(__PB_TYPENAME_PREFIX(BITS),_t) -/* - * Bus address and size types - */ -typedef u_long bus_addr_t; -typedef u_long bus_size_t; - -/* - * Access methods for bus resources and address space. - */ -typedef int bus_space_tag_t; -typedef u_long bus_space_handle_t; - -/* - * i
CVS commit: src/sys/arch/pmax/conf
Module Name:src Committed By: christos Date: Sat Sep 3 12:27:35 UTC 2016 Modified Files: src/sys/arch/pmax/conf: GENERIC Log Message: add aslr/mprotect et.al. To generate a diff of this commit: cvs rdiff -u -r1.185 -r1.186 src/sys/arch/pmax/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/pmax/conf/GENERIC diff -u src/sys/arch/pmax/conf/GENERIC:1.185 src/sys/arch/pmax/conf/GENERIC:1.186 --- src/sys/arch/pmax/conf/GENERIC:1.185 Sun Nov 16 11:01:42 2014 +++ src/sys/arch/pmax/conf/GENERIC Sat Sep 3 08:27:35 2016 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.185 2014/11/16 16:01:42 manu Exp $ +# $NetBSD: GENERIC,v 1.186 2016/09/03 12:27:35 christos Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/pmax/conf/std.pmax" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.185 $" +#ident "GENERIC-$Revision: 1.186 $" maxusers 64 @@ -321,18 +321,24 @@ pseudo-device ksyms # /dev/ksyms pseudo-device wsfont # wsfont control device pseudo-device wsmux # wsmux control device +options FILEASSOC # fileassoc(9) - required for Veriexec + # Veriexec -# -# a pseudo device needed for veriexec -#pseudo-device veriexec +pseudo-device veriexec # # Uncomment the fingerprint methods below that are desired. Note that # removing fingerprint methods will have almost no impact on the kernel # code size. # -#options VERIFIED_EXEC_FP_RMD160 -#options VERIFIED_EXEC_FP_SHA256 -#options VERIFIED_EXEC_FP_SHA384 -#options VERIFIED_EXEC_FP_SHA512 -#options VERIFIED_EXEC_FP_SHA1 -#options VERIFIED_EXEC_FP_MD5 +options VERIFIED_EXEC_FP_RMD160 +options VERIFIED_EXEC_FP_SHA256 +options VERIFIED_EXEC_FP_SHA384 +options VERIFIED_EXEC_FP_SHA512 +options VERIFIED_EXEC_FP_SHA1 +options VERIFIED_EXEC_FP_MD5 + +options PAX_ASLR_DEBUG=1 # PaX ASLR debug +options PAX_SEGVGUARD=0 # PaX Segmentation fault guard +options PAX_MPROTECT=1 # PaX mprotect(2) restrictions +options PAX_MPROTECT_DEBUG=1 # PaX mprotect debug +options PAX_ASLR=1 # PaX Address Space Layout Randomization
CVS commit: src/sys/arch/pmax/stand
Module Name:src Committed By: christos Date: Sat Sep 3 11:34:47 UTC 2016 Modified Files: src/sys/arch/pmax/stand: Makefile.booters Log Message: Add NOPIE To generate a diff of this commit: cvs rdiff -u -r1.61 -r1.62 src/sys/arch/pmax/stand/Makefile.booters Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/stand/Makefile.booters diff -u src/sys/arch/pmax/stand/Makefile.booters:1.61 src/sys/arch/pmax/stand/Makefile.booters:1.62 --- src/sys/arch/pmax/stand/Makefile.booters:1.61 Tue Mar 22 04:25:22 2016 +++ src/sys/arch/pmax/stand/Makefile.booters Sat Sep 3 07:34:47 2016 @@ -1,6 +1,7 @@ -# $NetBSD: Makefile.booters,v 1.61 2016/03/22 08:25:22 mrg Exp $ +# $NetBSD: Makefile.booters,v 1.62 2016/09/03 11:34:47 christos Exp $ NOMAN= # defined +NOPIE= # defined .include
CVS commit: src/sys/arch/pmax/ibus
Module Name:src Committed By: maya Date: Mon Jun 20 20:19:43 UTC 2016 Modified Files: src/sys/arch/pmax/ibus: sii.c Log Message: Fix DEBUG build While here, if DIAGNOSTIC panic to KASSERTMSG. ok mlelstv@ To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/pmax/ibus/sii.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/ibus/sii.c diff -u src/sys/arch/pmax/ibus/sii.c:1.11 src/sys/arch/pmax/ibus/sii.c:1.12 --- src/sys/arch/pmax/ibus/sii.c:1.11 Sun Nov 10 20:09:52 2013 +++ src/sys/arch/pmax/ibus/sii.c Mon Jun 20 20:19:43 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: sii.c,v 1.11 2013/11/10 20:09:52 christos Exp $ */ +/* $NetBSD: sii.c,v 1.12 2016/06/20 20:19:43 maya Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sii.c,v 1.11 2013/11/10 20:09:52 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sii.c,v 1.12 2016/06/20 20:19:43 maya Exp $"); #include "sii.h" /* @@ -1759,11 +1759,8 @@ sii_CmdDone(struct siisoftc *sc, int tar { int i; -#ifdef DIAGNOSTIC - ScsiCmd *scsicmd = sc->sc_cmd[target]; - if (target < 0 || !scsicmd) - panic("sii_CmdDone"); -#endif + ScsiCmd *scsicmd __unused = sc->sc_cmd[target]; + KASSERTMSG(target >= 0 && scsicmd, "sii_CmdDone"); sc->sc_cmd[target] = (ScsiCmd *)0; #ifdef DEBUG if (sii_debug > 1) {
CVS commit: src/sys/arch/pmax/stand/common
Module Name:src Committed By: dholland Date: Sat Jun 11 19:11:20 UTC 2016 Modified Files: src/sys/arch/pmax/stand/common: callvec.c Log Message: Update to match change to dec_prom.h. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/pmax/stand/common/callvec.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/stand/common/callvec.c diff -u src/sys/arch/pmax/stand/common/callvec.c:1.18 src/sys/arch/pmax/stand/common/callvec.c:1.19 --- src/sys/arch/pmax/stand/common/callvec.c:1.18 Mon Dec 14 00:46:11 2009 +++ src/sys/arch/pmax/stand/common/callvec.c Sat Jun 11 19:11:20 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: callvec.c,v 1.18 2009/12/14 00:46:11 matt Exp $ */ +/* $NetBSD: callvec.c,v 1.19 2016/06/11 19:11:20 dholland Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -45,7 +45,7 @@ struct callback callvec = { ._strcpy = (void *)DEC_PROM_STRCPY, ._strlen = (void *)DEC_PROM_STRLEN, ._getchar = (void *)DEC_PROM_GETCHAR, - ._gets = (void *)DEC_PROM_GETS, + ._unsafe_gets = (void *)DEC_PROM_GETS, ._puts = (void *)DEC_PROM_PUTS, ._printf = (void *)DEC_PROM_PRINTF, ._setenv = (void *)DEC_PROM_SETENV2,
CVS commit: src/sys/arch/pmax/include
Module Name:src Committed By: dholland Date: Sat Jun 11 06:38:18 UTC 2016 Modified Files: src/sys/arch/pmax/include: dec_prom.h Log Message: gets -> unsafe_gets; nothing uses this but let's not start by accident. (related to PR 51200) To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/pmax/include/dec_prom.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/pmax/include/dec_prom.h diff -u src/sys/arch/pmax/include/dec_prom.h:1.23 src/sys/arch/pmax/include/dec_prom.h:1.24 --- src/sys/arch/pmax/include/dec_prom.h:1.23 Sun Feb 20 07:50:25 2011 +++ src/sys/arch/pmax/include/dec_prom.h Sat Jun 11 06:38:18 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_prom.h,v 1.23 2011/02/20 07:50:25 matt Exp $ */ +/* $NetBSD: dec_prom.h,v 1.24 2016/06/11 06:38:18 dholland Exp $ */ /* * Copyright (c) 1992, 1993 @@ -103,7 +103,7 @@ struct callback { char *(*_strncpy)(char *, char *, int); /* 1c */ int (*_strncmp)(char *, char *, int); /* 20 */ int (*_getchar)(void);/* 24 */ - char *(*_gets)(char *);/* 28 */ + char *(*_unsafe_gets)(char *); /* 28 */ int (*_puts)(char *);/* 2c */ int (*_printf)(const char *, ...); /* 30 */ int (*_sprintf)(char *, char *, ...); /* 34 */ @@ -162,7 +162,7 @@ intptr_t promcall(void *, ...); #define strncpy (*callv -> _strncpy) #define strncmp (*callv -> _strncmp) #define getchar (*callv -> _getchar) -#define gets (*callv -> _gets) +#define unsafe_gets (*callv -> _unsafe_gets) #define puts (*callv -> _puts) #define printf (*callv -> _printf) #define sprintf (*callv -> _sprintf)
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: mrg Date: Tue Mar 22 04:48:25 UTC 2016 Modified Files: src/sys/arch/pmax/pmax: dec_3maxplus.c Log Message: revert part of rev 1.66 that converted a tri-state variable into a bool while leaving a comparision against "< 3". To generate a diff of this commit: cvs rdiff -u -r1.70 -r1.71 src/sys/arch/pmax/pmax/dec_3maxplus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/dec_3maxplus.c diff -u src/sys/arch/pmax/pmax/dec_3maxplus.c:1.70 src/sys/arch/pmax/pmax/dec_3maxplus.c:1.71 --- src/sys/arch/pmax/pmax/dec_3maxplus.c:1.70 Mon Mar 24 19:31:40 2014 +++ src/sys/arch/pmax/pmax/dec_3maxplus.c Tue Mar 22 04:48:25 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3maxplus.c,v 1.70 2014/03/24 19:31:40 christos Exp $ */ +/* $NetBSD: dec_3maxplus.c,v 1.71 2016/03/22 04:48:25 mrg Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -70,7 +70,7 @@ #define __INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: dec_3maxplus.c,v 1.70 2014/03/24 19:31:40 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3maxplus.c,v 1.71 2016/03/22 04:48:25 mrg Exp $"); #include #include @@ -289,7 +289,7 @@ dec_3maxplus_intr_establish(device_t dev static void dec_3maxplus_ioasic_intr(void) { - static bool warned = false; + static int warned = 0; bool ifound; uint32_t imsk, intr, can_serve, xxxintr; @@ -309,10 +309,10 @@ dec_3maxplus_ioasic_intr(void) if (warned && !(can_serve & KN03_INTR_PSWARN)) { printf("%s\n", "Power supply ok now."); - warned = false; + warned = 0; } if ((can_serve & KN03_INTR_PSWARN) && (warned < 3)) { - warned = true; + warned++; printf("%s\n", "Power supply overheating"); }
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: christos Date: Mon Feb 1 17:39:41 UTC 2016 Modified Files: src/sys/arch/pmax/pmax: machdep.c Log Message: PR/50737: David Binderman: Check bounds before dereferencing. To generate a diff of this commit: cvs rdiff -u -r1.249 -r1.250 src/sys/arch/pmax/pmax/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/machdep.c diff -u src/sys/arch/pmax/pmax/machdep.c:1.249 src/sys/arch/pmax/pmax/machdep.c:1.250 --- src/sys/arch/pmax/pmax/machdep.c:1.249 Mon Jun 29 22:39:04 2015 +++ src/sys/arch/pmax/pmax/machdep.c Mon Feb 1 12:39:41 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.249 2015/06/30 02:39:04 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.250 2016/02/01 17:39:41 christos Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.249 2015/06/30 02:39:04 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.250 2016/02/01 17:39:41 christos Exp $"); #include "opt_ddb.h" #include "opt_modular.h" @@ -524,7 +524,7 @@ memsize_bitmap(void *first) segstart = curaddr = i = segnum = 0; xsize = prom_memmap->pagesize * 8; while (i < mapbytes) { - while (prom_memmap->bitmap[i] == 0xff && i < mapbytes) { + while (i < mapbytes && prom_memmap->bitmap[i] == 0xff) { ++i; curaddr += xsize; }
CVS commit: src/sys/arch/pmax/tc
Module Name:src Committed By: maxv Date: Sun Jun 28 09:15:45 UTC 2015 Modified Files: src/sys/arch/pmax/tc: dt.c Log Message: Use-after-free. ok christos@ Found by The Brainy Code Scanner. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/pmax/tc/dt.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/tc/dt.c diff -u src/sys/arch/pmax/tc/dt.c:1.11 src/sys/arch/pmax/tc/dt.c:1.12 --- src/sys/arch/pmax/tc/dt.c:1.11 Sat Jun 4 01:37:36 2011 +++ src/sys/arch/pmax/tc/dt.c Sun Jun 28 09:15:45 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: dt.c,v 1.11 2011/06/04 01:37:36 tsutsui Exp $ */ +/* $NetBSD: dt.c,v 1.12 2015/06/28 09:15:45 maxv Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -133,7 +133,7 @@ SOFTWARE. */ #include -__KERNEL_RCSID(0, "$NetBSD: dt.c,v 1.11 2011/06/04 01:37:36 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dt.c,v 1.12 2015/06/28 09:15:45 maxv Exp $"); #include #include @@ -225,6 +225,7 @@ dt_attach(device_t parent, device_t self if (sc->sc_sih == NULL) { printf("%s: memory exhausted\n", device_xname(self)); free(msg, M_DEVBUF); + return; } SIMPLEQ_INIT(&sc->sc_queue);
CVS commit: src/sys/arch/pmax
Module Name:src Committed By: matt Date: Tue Jun 9 20:23:53 UTC 2015 Modified Files: src/sys/arch/pmax/ibus: ibus.c mcclock_ibus.c sii_ds.c src/sys/arch/pmax/tc: mcclock_ioasic.c tcbus.c Log Message: #include either or as needed To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/pmax/ibus/ibus.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/pmax/ibus/mcclock_ibus.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/pmax/ibus/sii_ds.c cvs rdiff -u -r1.23 -r1.24 src/sys/arch/pmax/tc/mcclock_ioasic.c cvs rdiff -u -r1.29 -r1.30 src/sys/arch/pmax/tc/tcbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/ibus/ibus.c diff -u src/sys/arch/pmax/ibus/ibus.c:1.20 src/sys/arch/pmax/ibus/ibus.c:1.21 --- src/sys/arch/pmax/ibus/ibus.c:1.20 Sat Jul 9 17:32:29 2011 +++ src/sys/arch/pmax/ibus/ibus.c Tue Jun 9 20:23:53 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ibus.c,v 1.20 2011/07/09 17:32:29 matt Exp $ */ +/* $NetBSD: ibus.c,v 1.21 2015/06/09 20:23:53 matt Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -31,9 +31,10 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: ibus.c,v 1.20 2011/07/09 17:32:29 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ibus.c,v 1.21 2015/06/09 20:23:53 matt Exp $"); #include +#include #include #include Index: src/sys/arch/pmax/ibus/mcclock_ibus.c diff -u src/sys/arch/pmax/ibus/mcclock_ibus.c:1.18 src/sys/arch/pmax/ibus/mcclock_ibus.c:1.19 --- src/sys/arch/pmax/ibus/mcclock_ibus.c:1.18 Sat Jun 4 01:43:56 2011 +++ src/sys/arch/pmax/ibus/mcclock_ibus.c Tue Jun 9 20:23:53 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mcclock_ibus.c,v 1.18 2011/06/04 01:43:56 tsutsui Exp $ */ +/* $NetBSD: mcclock_ibus.c,v 1.19 2015/06/09 20:23:53 matt Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. @@ -28,12 +28,14 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: mcclock_ibus.c,v 1.18 2011/06/04 01:43:56 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcclock_ibus.c,v 1.19 2015/06/09 20:23:53 matt Exp $"); #include -#include +#include #include +#include #include + #include #include Index: src/sys/arch/pmax/ibus/sii_ds.c diff -u src/sys/arch/pmax/ibus/sii_ds.c:1.9 src/sys/arch/pmax/ibus/sii_ds.c:1.10 --- src/sys/arch/pmax/ibus/sii_ds.c:1.9 Sat Jul 9 17:32:30 2011 +++ src/sys/arch/pmax/ibus/sii_ds.c Tue Jun 9 20:23:53 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: sii_ds.c,v 1.9 2011/07/09 17:32:30 matt Exp $ */ +/* $NetBSD: sii_ds.c,v 1.10 2015/06/09 20:23:53 matt Exp $ */ /* * Copyright 1996 The Board of Trustees of The Leland Stanford @@ -16,13 +16,14 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sii_ds.c,v 1.9 2011/07/09 17:32:30 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sii_ds.c,v 1.10 2015/06/09 20:23:53 matt Exp $"); #include "sii.h" #include #include #include +#include #include #include Index: src/sys/arch/pmax/tc/mcclock_ioasic.c diff -u src/sys/arch/pmax/tc/mcclock_ioasic.c:1.23 src/sys/arch/pmax/tc/mcclock_ioasic.c:1.24 --- src/sys/arch/pmax/tc/mcclock_ioasic.c:1.23 Sat Jun 4 01:43:56 2011 +++ src/sys/arch/pmax/tc/mcclock_ioasic.c Tue Jun 9 20:23:53 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: mcclock_ioasic.c,v 1.23 2011/06/04 01:43:56 tsutsui Exp $ */ +/* $NetBSD: mcclock_ioasic.c,v 1.24 2015/06/09 20:23:53 matt Exp $ */ /* * Copyright (c) 1994, 1995, 1996 Carnegie-Mellon University. @@ -28,9 +28,10 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mcclock_ioasic.c,v 1.23 2011/06/04 01:43:56 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcclock_ioasic.c,v 1.24 2015/06/09 20:23:53 matt Exp $"); #include +#include #include #include #include Index: src/sys/arch/pmax/tc/tcbus.c diff -u src/sys/arch/pmax/tc/tcbus.c:1.29 src/sys/arch/pmax/tc/tcbus.c:1.30 --- src/sys/arch/pmax/tc/tcbus.c:1.29 Sat Oct 13 06:51:23 2012 +++ src/sys/arch/pmax/tc/tcbus.c Tue Jun 9 20:23:53 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tcbus.c,v 1.29 2012/10/13 06:51:23 tsutsui Exp $ */ +/* $NetBSD: tcbus.c,v 1.30 2015/06/09 20:23:53 matt Exp $ */ /*- * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tcbus.c,v 1.29 2012/10/13 06:51:23 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tcbus.c,v 1.30 2015/06/09 20:23:53 matt Exp $"); #define _PMAX_BUS_DMA_PRIVATE /* @@ -43,6 +43,7 @@ __KERNEL_RCSID(0, "$NetBSD: tcbus.c,v 1. #include #include +#include #include #include
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: christos Date: Mon Mar 24 19:31:40 UTC 2014 Modified Files: src/sys/arch/pmax/pmax: dec_3100.c dec_3max.c dec_3maxplus.c dec_3min.c dec_5100.c dec_maxine.c machdep.c Log Message: use cpu_{g,s}etmodel To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/arch/pmax/pmax/dec_3100.c cvs rdiff -u -r1.55 -r1.56 src/sys/arch/pmax/pmax/dec_3max.c cvs rdiff -u -r1.69 -r1.70 src/sys/arch/pmax/pmax/dec_3maxplus.c cvs rdiff -u -r1.72 -r1.73 src/sys/arch/pmax/pmax/dec_3min.c cvs rdiff -u -r1.47 -r1.48 src/sys/arch/pmax/pmax/dec_5100.c cvs rdiff -u -r1.64 -r1.65 src/sys/arch/pmax/pmax/dec_maxine.c cvs rdiff -u -r1.247 -r1.248 src/sys/arch/pmax/pmax/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/dec_3100.c diff -u src/sys/arch/pmax/pmax/dec_3100.c:1.53 src/sys/arch/pmax/pmax/dec_3100.c:1.54 --- src/sys/arch/pmax/pmax/dec_3100.c:1.53 Sat Oct 13 02:51:22 2012 +++ src/sys/arch/pmax/pmax/dec_3100.c Mon Mar 24 15:31:39 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3100.c,v 1.53 2012/10/13 06:51:22 tsutsui Exp $ */ +/* $NetBSD: dec_3100.c,v 1.54 2014/03/24 19:31:39 christos Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -69,7 +69,7 @@ #define __INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: dec_3100.c,v 1.53 2012/10/13 06:51:22 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3100.c,v 1.54 2014/03/24 19:31:39 christos Exp $"); #include #include @@ -141,7 +141,7 @@ dec_3100_init(void) submodel = "2100 (PMIN)"; else submodel = "3100 (PMAX)"; - sprintf(cpu_model, "DECstation %s", submodel); + cpu_setmodel("DECstation %s", submodel); } /* Index: src/sys/arch/pmax/pmax/dec_3max.c diff -u src/sys/arch/pmax/pmax/dec_3max.c:1.55 src/sys/arch/pmax/pmax/dec_3max.c:1.56 --- src/sys/arch/pmax/pmax/dec_3max.c:1.55 Sat Oct 13 02:51:22 2012 +++ src/sys/arch/pmax/pmax/dec_3max.c Mon Mar 24 15:31:39 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3max.c,v 1.55 2012/10/13 06:51:22 tsutsui Exp $ */ +/* $NetBSD: dec_3max.c,v 1.56 2014/03/24 19:31:39 christos Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -70,7 +70,7 @@ #define __INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: dec_3max.c,v 1.55 2012/10/13 06:51:22 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3max.c,v 1.56 2014/03/24 19:31:39 christos Exp $"); #include "dzkbd.h" @@ -155,7 +155,7 @@ dec_3max_init(void) *(volatile uint32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR) = csr; kn02_wbflush(); - strcpy(cpu_model, "DECstation 5000/200 (3MAX)"); + cpu_setmodel("DECstation 5000/200 (3MAX)"); } /* Index: src/sys/arch/pmax/pmax/dec_3maxplus.c diff -u src/sys/arch/pmax/pmax/dec_3maxplus.c:1.69 src/sys/arch/pmax/pmax/dec_3maxplus.c:1.70 --- src/sys/arch/pmax/pmax/dec_3maxplus.c:1.69 Sat Oct 13 02:51:22 2012 +++ src/sys/arch/pmax/pmax/dec_3maxplus.c Mon Mar 24 15:31:40 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3maxplus.c,v 1.69 2012/10/13 06:51:22 tsutsui Exp $ */ +/* $NetBSD: dec_3maxplus.c,v 1.70 2014/03/24 19:31:40 christos Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -70,7 +70,7 @@ #define __INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: dec_3maxplus.c,v 1.69 2012/10/13 06:51:22 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3maxplus.c,v 1.70 2014/03/24 19:31:40 christos Exp $"); #include #include @@ -180,10 +180,10 @@ dec_3maxplus_init(void) prodtype &= KN03_INTR_PROD_JUMPER; /* the bit persists even if INTR register is assigned value 0 */ if (prodtype) - sprintf(cpu_model, "DECstation 5000/%s (3MAXPLUS)", + cpu_setmodel("DECstation 5000/%s (3MAXPLUS)", (CPUISMIPS3) ? "260" : "240"); else - sprintf(cpu_model, "DECsystem 5900%s (3MAXPLUS)", + cpu_setmodel("DECsystem 5900%s (3MAXPLUS)", (CPUISMIPS3) ? "-260" : ""); } Index: src/sys/arch/pmax/pmax/dec_3min.c diff -u src/sys/arch/pmax/pmax/dec_3min.c:1.72 src/sys/arch/pmax/pmax/dec_3min.c:1.73 --- src/sys/arch/pmax/pmax/dec_3min.c:1.72 Sat Oct 13 02:51:23 2012 +++ src/sys/arch/pmax/pmax/dec_3min.c Mon Mar 24 15:31:40 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3min.c,v 1.72 2012/10/13 06:51:23 tsutsui Exp $ */ +/* $NetBSD: dec_3min.c,v 1.73 2014/03/24 19:31:40 christos Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -70,7 +70,7 @@ #define __INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: dec_3min.c,v 1.72 2012/10/13 06:51:23 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3min.c,v 1.73 2014/03/24 19:31:40 christos Exp $"); #include #include @@ -183,7 +183,7 @@ dec_3min_init(void) physmem_boardmax = physmem_boardmax >> 2; physmem_boardmax = MIPS_PHYS_TO_KSEG1(physmem_boardmax); - sprintf(cpu_model, "DECstation 5000/1%d (3MIN)", mips_options.mips_cpu_mhz); + cpu_setmodel("DECstation 5000/1%d (3MIN)", mips_options.mips_cpu_mhz
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: christos Date: Sun Nov 10 20:18:51 UTC 2013 Modified Files: src/sys/arch/pmax/pmax: machdep.c Log Message: more unused variable fixes To generate a diff of this commit: cvs rdiff -u -r1.246 -r1.247 src/sys/arch/pmax/pmax/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/machdep.c diff -u src/sys/arch/pmax/pmax/machdep.c:1.246 src/sys/arch/pmax/pmax/machdep.c:1.247 --- src/sys/arch/pmax/pmax/machdep.c:1.246 Sun Nov 10 15:09:52 2013 +++ src/sys/arch/pmax/pmax/machdep.c Sun Nov 10 15:18:51 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.246 2013/11/10 20:09:52 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.247 2013/11/10 20:18:51 christos Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.246 2013/11/10 20:09:52 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.247 2013/11/10 20:18:51 christos Exp $"); #include "opt_ddb.h" #include "opt_modular.h" @@ -134,14 +134,12 @@ void mach_init(int argc, int32_t *argv32, int code, intptr_t cv, u_int bim, char *bip) { char *cp; -/*###137 [cc] error: variable 'bootinfo_msg' set but not used [-Werror=unused-but-set-variable]%%%*/ const char *bootinfo_msg; int i; char *kernend; #if NKSYMS || defined(DDB) || defined(MODULAR) void *ssym = 0; struct btinfo_symtab *bi_syms; - struct exec *aout; /* XXX backwards compatilbity for DDB */ #endif extern char edata[], end[]; /* XXX */ @@ -163,7 +161,9 @@ mach_init(int argc, int32_t *argv32, int /* clear the BSS segment */ #if NKSYMS || defined(DDB) || defined(MODULAR) bi_syms = lookup_bootinfo(BTINFO_SYMTAB); - aout = (struct exec *)edata; +#ifdef EXEC_AOUT + struct exec *aout = (struct exec *)edata; +#endif /* Was it a valid bootinfo symtab info? */ if (bi_syms != NULL) {
CVS commit: src/sys/arch/pmax
Module Name:src Committed By: christos Date: Sun Nov 10 20:09:53 UTC 2013 Modified Files: src/sys/arch/pmax/ibus: pm.c sii.c src/sys/arch/pmax/pmax: machdep.c src/sys/arch/pmax/tc: dtkbd.c ioasic.c Log Message: fix unused variable warnings To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/pmax/ibus/pm.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/pmax/ibus/sii.c cvs rdiff -u -r1.245 -r1.246 src/sys/arch/pmax/pmax/machdep.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/pmax/tc/dtkbd.c cvs rdiff -u -r1.21 -r1.22 src/sys/arch/pmax/tc/ioasic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/ibus/pm.c diff -u src/sys/arch/pmax/ibus/pm.c:1.11 src/sys/arch/pmax/ibus/pm.c:1.12 --- src/sys/arch/pmax/ibus/pm.c:1.11 Wed Jan 11 16:17:33 2012 +++ src/sys/arch/pmax/ibus/pm.c Sun Nov 10 15:09:52 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: pm.c,v 1.11 2012/01/11 21:17:33 macallan Exp $ */ +/* $NetBSD: pm.c,v 1.12 2013/11/10 20:09:52 christos Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pm.c,v 1.11 2012/01/11 21:17:33 macallan Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pm.c,v 1.12 2013/11/10 20:09:52 christos Exp $"); #include #include @@ -555,14 +555,12 @@ pm_flush(struct pm_softc *sc) int v, i, x, y; u_short *p, *pe; struct hwcmap256 *cm; - struct rasops_info *ri; if (sc->sc_changed == 0) return (1); vdac = (void *)MIPS_PHYS_TO_KSEG1(KN01_SYS_VDAC); pcc = (void *)MIPS_PHYS_TO_KSEG1(KN01_SYS_PCC); - ri = &pm_ri; v = sc->sc_changed; if ((v & WSDISPLAY_CURSOR_DOCUR) != 0) { Index: src/sys/arch/pmax/ibus/sii.c diff -u src/sys/arch/pmax/ibus/sii.c:1.10 src/sys/arch/pmax/ibus/sii.c:1.11 --- src/sys/arch/pmax/ibus/sii.c:1.10 Sat Jul 9 13:32:30 2011 +++ src/sys/arch/pmax/ibus/sii.c Sun Nov 10 15:09:52 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: sii.c,v 1.10 2011/07/09 17:32:30 matt Exp $ */ +/* $NetBSD: sii.c,v 1.11 2013/11/10 20:09:52 christos Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sii.c,v 1.10 2011/07/09 17:32:30 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sii.c,v 1.11 2013/11/10 20:09:52 christos Exp $"); #include "sii.h" /* @@ -1757,11 +1757,10 @@ sii_CmdDone(struct siisoftc *sc, int tar /* target: which device is done */ /* error: error code if any errors */ { - ScsiCmd *scsicmd; int i; - scsicmd = sc->sc_cmd[target]; #ifdef DIAGNOSTIC + ScsiCmd *scsicmd = sc->sc_cmd[target]; if (target < 0 || !scsicmd) panic("sii_CmdDone"); #endif Index: src/sys/arch/pmax/pmax/machdep.c diff -u src/sys/arch/pmax/pmax/machdep.c:1.245 src/sys/arch/pmax/pmax/machdep.c:1.246 --- src/sys/arch/pmax/pmax/machdep.c:1.245 Sat Jul 28 19:08:57 2012 +++ src/sys/arch/pmax/pmax/machdep.c Sun Nov 10 15:09:52 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.245 2012/07/28 23:08:57 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.246 2013/11/10 20:09:52 christos Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.245 2012/07/28 23:08:57 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.246 2013/11/10 20:09:52 christos Exp $"); #include "opt_ddb.h" #include "opt_modular.h" @@ -134,6 +134,7 @@ void mach_init(int argc, int32_t *argv32, int code, intptr_t cv, u_int bim, char *bip) { char *cp; +/*###137 [cc] error: variable 'bootinfo_msg' set but not used [-Werror=unused-but-set-variable]%%%*/ const char *bootinfo_msg; int i; char *kernend; @@ -215,6 +216,8 @@ mach_init(int argc, int32_t *argv32, int #if 0 if (bootinfo_msg != NULL) printf(bootinfo_msg); +#else + __USE(bootinfo_msg); #endif /* * Set the VM page size. Index: src/sys/arch/pmax/tc/dtkbd.c diff -u src/sys/arch/pmax/tc/dtkbd.c:1.10 src/sys/arch/pmax/tc/dtkbd.c:1.11 --- src/sys/arch/pmax/tc/dtkbd.c:1.10 Sat Jul 9 13:32:31 2011 +++ src/sys/arch/pmax/tc/dtkbd.c Sun Nov 10 15:09:53 2013 @@ -1,4 +1,4 @@ -/* $NetBSD: dtkbd.c,v 1.10 2011/07/09 17:32:31 matt Exp $ */ +/* $NetBSD: dtkbd.c,v 1.11 2013/11/10 20:09:53 christos Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dtkbd.c,v 1.10 2011/07/09 17:32:31 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dtkbd.c,v 1.11 2013/11/10 20:09:53 christos Exp $"); #include "locators.h" @@ -187,9 +187,6 @@ dtkbd_cnpollc(void *v, int on) int dtkbd_ioctl(void *v, u_long cmd, void *data, int flag, struct lwp *l) { - struct dtkbd_softc *sc; - - sc = v; switch (cmd) { case WSKBDIO_GTYPE: Index: src/sys/arch/pmax/tc/ioasic.c diff -u src/sys/arch/pmax/tc/ioasic.c:1.21 src/sys/arch/pmax/tc/ioasic.c:1.22 --- src/sys/arch/pmax/tc/ioasic.c:1.21 Sat Jul 9 13:32:31 2011 +++ src/sys/arch/pmax/tc/ioasic.c Sun Nov 10 15:
CVS commit: src/sys/arch/pmax
Module Name:src Committed By: tsutsui Date: Sat Oct 13 06:51:23 UTC 2012 Modified Files: src/sys/arch/pmax/pmax: autoconf.c dec_3100.c dec_3max.c dec_3maxplus.c dec_3min.c dec_5100.c dec_maxine.c src/sys/arch/pmax/tc: tcbus.c Log Message: struct device * -> device_t, use device_xname() (from chs@) To generate a diff of this commit: cvs rdiff -u -r1.79 -r1.80 src/sys/arch/pmax/pmax/autoconf.c cvs rdiff -u -r1.52 -r1.53 src/sys/arch/pmax/pmax/dec_3100.c cvs rdiff -u -r1.54 -r1.55 src/sys/arch/pmax/pmax/dec_3max.c cvs rdiff -u -r1.68 -r1.69 src/sys/arch/pmax/pmax/dec_3maxplus.c cvs rdiff -u -r1.71 -r1.72 src/sys/arch/pmax/pmax/dec_3min.c cvs rdiff -u -r1.46 -r1.47 src/sys/arch/pmax/pmax/dec_5100.c cvs rdiff -u -r1.63 -r1.64 src/sys/arch/pmax/pmax/dec_maxine.c cvs rdiff -u -r1.28 -r1.29 src/sys/arch/pmax/tc/tcbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/autoconf.c diff -u src/sys/arch/pmax/pmax/autoconf.c:1.79 src/sys/arch/pmax/pmax/autoconf.c:1.80 --- src/sys/arch/pmax/pmax/autoconf.c:1.79 Sun Jul 29 18:05:45 2012 +++ src/sys/arch/pmax/pmax/autoconf.c Sat Oct 13 06:51:22 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.79 2012/07/29 18:05:45 mlelstv Exp $ */ +/* $NetBSD: autoconf.c,v 1.80 2012/10/13 06:51:22 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.79 2012/07/29 18:05:45 mlelstv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.80 2012/10/13 06:51:22 tsutsui Exp $"); #include #include @@ -62,9 +62,9 @@ __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v #include "opt_dec_3100.h" #include "opt_dec_5100.h" -struct intrhand intrtab[MAX_DEV_NCOOKIES]; -static struct device *booted_controller; -static int booted_slot, booted_unit; +struct intrhand intrtab[MAX_DEV_NCOOKIES]; +static device_t booted_controller; +static int booted_slot, booted_unit; static const char *booted_protocol; /* @@ -149,7 +149,7 @@ cpu_rootconf(void) { printf("boot device: %s\n", - booted_device ? booted_device->dv_xname : ""); + booted_device ? device_xname(booted_device) : ""); rootconf(); } @@ -158,11 +158,11 @@ cpu_rootconf(void) * Try to determine the boot device. */ void -device_register(struct device *dev, void *aux) +device_register(device_t dev, void *aux) { static int found, initted, scsiboot, netboot; - static struct device *ioasicdev; - struct device *parent = device_parent(dev); + static device_t ioasicdev; + device_t parent = device_parent(dev); if (found) return; Index: src/sys/arch/pmax/pmax/dec_3100.c diff -u src/sys/arch/pmax/pmax/dec_3100.c:1.52 src/sys/arch/pmax/pmax/dec_3100.c:1.53 --- src/sys/arch/pmax/pmax/dec_3100.c:1.52 Sat Jul 9 17:32:30 2011 +++ src/sys/arch/pmax/pmax/dec_3100.c Sat Oct 13 06:51:22 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3100.c,v 1.52 2011/07/09 17:32:30 matt Exp $ */ +/* $NetBSD: dec_3100.c,v 1.53 2012/10/13 06:51:22 tsutsui Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -69,7 +69,7 @@ #define __INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: dec_3100.c,v 1.52 2011/07/09 17:32:30 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3100.c,v 1.53 2012/10/13 06:51:22 tsutsui Exp $"); #include #include @@ -102,7 +102,7 @@ static void dec_3100_bus_reset(void); static void dec_3100_cons_init(void); static void dec_3100_errintr(void); static void dec_3100_intr(uint32_t, vaddr_t, uint32_t); -static void dec_3100_intr_establish(struct device *, void *, +static void dec_3100_intr_establish(device_t, void *, int, int (*)(void *), void *); #define kn01_wbflush() wbflush() /* XXX to be corrected XXX */ @@ -221,7 +221,7 @@ dec_3100_intr(uint32_t status, vaddr_t p } static void -dec_3100_intr_establish(struct device *dev, void *cookie, int level, +dec_3100_intr_establish(device_t dev, void *cookie, int level, int (*handler)(void *), void *arg) { Index: src/sys/arch/pmax/pmax/dec_3max.c diff -u src/sys/arch/pmax/pmax/dec_3max.c:1.54 src/sys/arch/pmax/pmax/dec_3max.c:1.55 --- src/sys/arch/pmax/pmax/dec_3max.c:1.54 Sat Jul 9 17:32:30 2011 +++ src/sys/arch/pmax/pmax/dec_3max.c Sat Oct 13 06:51:22 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3max.c,v 1.54 2011/07/09 17:32:30 matt Exp $ */ +/* $NetBSD: dec_3max.c,v 1.55 2012/10/13 06:51:22 tsutsui Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -70,7 +70,7 @@ #define __INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: dec_3max.c,v 1.54 2011/07/09 17:32:30 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3max.c,v 1.55 2012/10/13 06:51:22 tsutsui Exp $"); #include "dzkbd.h" @@ -220,7 +220,7 @@ static const struct { }; static void -dec_3max_intr_establish(struct device *dev, void *cookie, int level, +dec_3max_intr_establish(device_t dev, void *cookie, i
CVS commit: src/sys/arch/pmax/tc
Module Name:src Committed By: tsutsui Date: Sat Oct 13 06:49:27 UTC 2012 Modified Files: src/sys/arch/pmax/tc: asc_ioasic.c Log Message: Fix botch on device_t/softc split in debug printf macro. from chs@ To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/pmax/tc/asc_ioasic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/tc/asc_ioasic.c diff -u src/sys/arch/pmax/tc/asc_ioasic.c:1.24 src/sys/arch/pmax/tc/asc_ioasic.c:1.25 --- src/sys/arch/pmax/tc/asc_ioasic.c:1.24 Sat Jul 9 17:32:31 2011 +++ src/sys/arch/pmax/tc/asc_ioasic.c Sat Oct 13 06:49:26 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: asc_ioasic.c,v 1.24 2011/07/09 17:32:31 matt Exp $ */ +/* $NetBSD: asc_ioasic.c,v 1.25 2012/10/13 06:49:26 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: asc_ioasic.c,v 1.24 2011/07/09 17:32:31 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: asc_ioasic.c,v 1.25 2012/10/13 06:49:26 tsutsui Exp $"); #include #include @@ -218,7 +218,7 @@ asc_ioasic_setup(struct ncr53c9x_softc * size_t size; vaddr_t cp; - NCR_DMA(("%s: start %d@%p,%s\n", sc->sc_dev.dv_xname, + NCR_DMA(("%s: start %d@%p,%s\n", device_xname(sc->sc_dev), *asc->sc_dmalen, *asc->sc_dmaaddr, ispullup ? "IN" : "OUT")); /* upto two 4KB pages */
CVS commit: src/sys/arch/pmax
Module Name:src Committed By: matt Date: Sat Jul 9 17:32:31 UTC 2011 Modified Files: src/sys/arch/pmax/ibus: dz_ibus.c ibus.c ibus_3max.c ibus_pmax.c ibusvar.h pm.c sii.c sii_ds.c src/sys/arch/pmax/include: locore.h src/sys/arch/pmax/pmax: autoconf.c bus_dma.c bus_space.c clock.c cpu.c dec_3100.c dec_3max.c dec_3maxplus.c dec_3min.c dec_5100.c dec_maxine.c interrupt.c machdep.c mainbus.c memc_3max.c promcall.c sysconf.c src/sys/arch/pmax/tc: asc_ioasic.c dtkbd.c dtms.c ioasic.c tcbus.c Log Message: Cleanu includes To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/pmax/ibus/dz_ibus.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/pmax/ibus/ibus.c \ src/sys/arch/pmax/ibus/ibusvar.h cvs rdiff -u -r1.14 -r1.15 src/sys/arch/pmax/ibus/ibus_3max.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/pmax/ibus/ibus_pmax.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/pmax/ibus/pm.c \ src/sys/arch/pmax/ibus/sii.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/pmax/ibus/sii_ds.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/pmax/include/locore.h cvs rdiff -u -r1.77 -r1.78 src/sys/arch/pmax/pmax/autoconf.c cvs rdiff -u -r1.55 -r1.56 src/sys/arch/pmax/pmax/bus_dma.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/pmax/pmax/bus_space.c cvs rdiff -u -r1.39 -r1.40 src/sys/arch/pmax/pmax/clock.c cvs rdiff -u -r1.30 -r1.31 src/sys/arch/pmax/pmax/cpu.c cvs rdiff -u -r1.51 -r1.52 src/sys/arch/pmax/pmax/dec_3100.c cvs rdiff -u -r1.53 -r1.54 src/sys/arch/pmax/pmax/dec_3max.c cvs rdiff -u -r1.67 -r1.68 src/sys/arch/pmax/pmax/dec_3maxplus.c cvs rdiff -u -r1.70 -r1.71 src/sys/arch/pmax/pmax/dec_3min.c cvs rdiff -u -r1.45 -r1.46 src/sys/arch/pmax/pmax/dec_5100.c cvs rdiff -u -r1.62 -r1.63 src/sys/arch/pmax/pmax/dec_maxine.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/pmax/pmax/interrupt.c cvs rdiff -u -r1.243 -r1.244 src/sys/arch/pmax/pmax/machdep.c cvs rdiff -u -r1.41 -r1.42 src/sys/arch/pmax/pmax/mainbus.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/pmax/pmax/memc_3max.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/pmax/pmax/promcall.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/pmax/pmax/sysconf.c cvs rdiff -u -r1.23 -r1.24 src/sys/arch/pmax/tc/asc_ioasic.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/pmax/tc/dtkbd.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/pmax/tc/dtms.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/pmax/tc/ioasic.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/pmax/tc/tcbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/ibus/dz_ibus.c diff -u src/sys/arch/pmax/ibus/dz_ibus.c:1.10 src/sys/arch/pmax/ibus/dz_ibus.c:1.11 --- src/sys/arch/pmax/ibus/dz_ibus.c:1.10 Sun Feb 20 07:50:24 2011 +++ src/sys/arch/pmax/ibus/dz_ibus.c Sat Jul 9 17:32:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: dz_ibus.c,v 1.10 2011/02/20 07:50:24 matt Exp $ */ +/* $NetBSD: dz_ibus.c,v 1.11 2011/07/09 17:32:29 matt Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -61,22 +61,21 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dz_ibus.c,v 1.10 2011/02/20 07:50:24 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dz_ibus.c,v 1.11 2011/07/09 17:32:29 matt Exp $"); #include "dzkbd.h" #include "dzms.h" #include -#include -#include -#include -#include -#include +#include #include #include +#include +#include +#include #include - -#include +#include +#include #include Index: src/sys/arch/pmax/ibus/ibus.c diff -u src/sys/arch/pmax/ibus/ibus.c:1.19 src/sys/arch/pmax/ibus/ibus.c:1.20 --- src/sys/arch/pmax/ibus/ibus.c:1.19 Sun Feb 20 07:50:24 2011 +++ src/sys/arch/pmax/ibus/ibus.c Sat Jul 9 17:32:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: ibus.c,v 1.19 2011/02/20 07:50:24 matt Exp $ */ +/* $NetBSD: ibus.c,v 1.20 2011/07/09 17:32:29 matt Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -31,13 +31,13 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: ibus.c,v 1.19 2011/02/20 07:50:24 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ibus.c,v 1.20 2011/07/09 17:32:29 matt Exp $"); #include -#include #include +#include -#include +#include #include #include "locators.h" Index: src/sys/arch/pmax/ibus/ibusvar.h diff -u src/sys/arch/pmax/ibus/ibusvar.h:1.19 src/sys/arch/pmax/ibus/ibusvar.h:1.20 --- src/sys/arch/pmax/ibus/ibusvar.h:1.19 Sun Feb 20 07:50:24 2011 +++ src/sys/arch/pmax/ibus/ibusvar.h Sat Jul 9 17:32:29 2011 @@ -1,9 +1,9 @@ -/* $NetBSD: ibusvar.h,v 1.19 2011/02/20 07:50:24 matt Exp $ */ +/* $NetBSD: ibusvar.h,v 1.20 2011/07/09 17:32:29 matt Exp $ */ #ifndef _PMAX_IBUS_IBUSVAR_H_ #define _PMAX_IBUS_IBUSVAR_H_ -#include +#include struct ibus_attach_args; Index: src/sys/arch/pmax/ibus/ibus_3max.c diff -u src/sys/arch/pmax/ibus/ibus_3max.c:1.14 src/sys/arch/pmax/ibus/ibus_3max.c:1.15 --- src/sys/arch/pmax/ibus/ibus_3max.c:1.14 Sun Feb 20 07:50:24 2011 +++ src/sys/arch/
CVS commit: src/sys/arch/pmax/tc
Module Name:src Committed By: tsutsui Date: Sat Jun 4 01:37:36 UTC 2011 Modified Files: src/sys/arch/pmax/tc: dt.c dtkbd.c dtms.c dtvar.h Log Message: - split device_t/softc - make sure that *(dtdv_handler)() registered via dt_establish_handler() takes softc, not device_t as other interrupt handlers No crash during device attach on GXemul. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/pmax/tc/dt.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/pmax/tc/dtkbd.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/pmax/tc/dtms.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/pmax/tc/dtvar.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/pmax/tc/dt.c diff -u src/sys/arch/pmax/tc/dt.c:1.10 src/sys/arch/pmax/tc/dt.c:1.11 --- src/sys/arch/pmax/tc/dt.c:1.10 Mon Apr 28 20:23:31 2008 +++ src/sys/arch/pmax/tc/dt.c Sat Jun 4 01:37:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: dt.c,v 1.10 2008/04/28 20:23:31 martin Exp $ */ +/* $NetBSD: dt.c,v 1.11 2011/06/04 01:37:36 tsutsui Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -133,7 +133,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dt.c,v 1.10 2008/04/28 20:23:31 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dt.c,v 1.11 2011/06/04 01:37:36 tsutsui Exp $"); #include #include @@ -168,10 +168,9 @@ #define DT_RX_AVAIL(poll) ((*(poll) & 1) != 0) #define DT_TX_AVAIL(poll) ((*(poll) & 2) != 0) -int dt_match(struct device *, struct cfdata *, void *); -void dt_attach(struct device *, struct device *, void *); +int dt_match(device_t, cfdata_t, void *); +void dt_attach(device_t, device_t, void *); int dt_intr(void *); -int dt_null_handler(struct device *, struct dt_msg *, int); int dt_print(void *, const char *); void dt_strvis(uint8_t *, char *, int); void dt_dispatch(void *); @@ -182,11 +181,11 @@ struct dt_device dt_ms_dv; struct dt_state dt_state; -CFATTACH_DECL(dt, sizeof(struct dt_softc), +CFATTACH_DECL_NEW(dt, sizeof(struct dt_softc), dt_match, dt_attach, NULL, NULL); int -dt_match(struct device *parent, struct cfdata *match, void *aux) +dt_match(device_t parent, cfdata_t cf, void *aux) { struct ioasicdev_attach_args *d; @@ -202,7 +201,7 @@ } void -dt_attach(struct device *parent, struct device *self, void *aux) +dt_attach(device_t parent, device_t self, void *aux) { struct ioasicdev_attach_args *d; struct dt_attach_args dta; @@ -211,19 +210,20 @@ int i; d = aux; - sc = (struct dt_softc*)self; + sc = device_private(self); + sc->sc_dev = self; dt_cninit(); msg = malloc(sizeof(*msg) * DT_BUF_CNT, M_DEVBUF, M_NOWAIT); if (msg == NULL) { - printf("%s: memory exhausted\n", sc->sc_dv.dv_xname); + printf("%s: memory exhausted\n", device_xname(self)); return; } sc->sc_sih = softint_establish(SOFTINT_SERIAL, dt_dispatch, sc); if (sc->sc_sih == NULL) { - printf("%s: memory exhausted\n", sc->sc_dv.dv_xname); + printf("%s: memory exhausted\n", device_xname(self)); free(msg, M_DEVBUF); } @@ -260,10 +260,10 @@ int dt_establish_handler(struct dt_softc *sc, struct dt_device *dtdv, -struct device *dv, void (*hdlr)(void *, struct dt_msg *)) +void *arg, void (*hdlr)(void *, struct dt_msg *)) { - dtdv->dtdv_dv = dv; + dtdv->dtdv_arg = arg; dtdv->dtdv_handler = hdlr; return (0); } @@ -289,7 +289,7 @@ sc->sc_msg.body[0] = DT_KBD_EMPTY; #ifdef DIAGNOSTIC printf("%s: data overrun or stray interrupt\n", - sc->sc_dv.dv_xname); + device_xname(sc->sc_dev)); #endif break; @@ -301,7 +301,7 @@ } if ((msg = SLIST_FIRST(&sc->sc_free)) == NULL) { - printf("%s: input overflow\n", sc->sc_dv.dv_xname); + printf("%s: input overflow\n", device_xname(sc->sc_dev)); return (1); } SLIST_REMOVE_HEAD(&sc->sc_free, chain.slist); @@ -339,13 +339,13 @@ if (msg->src != DT_ADDR_MOUSE && msg->src != DT_ADDR_KBD) { printf("%s: message from unknown dev 0x%x\n", - sc->sc_dv.dv_xname, sc->sc_msg.src); + device_xname(sc->sc_dev), sc->sc_msg.src); dt_msg_dump(msg); continue; } if (DT_CTL_P(msg->ctl) != 0) { printf("%s: received control message\n", - sc->sc_dv.dv_xname); + device_xname(sc->sc_dev)); dt_msg_dump(msg); continue; } @@ -375,7 +375,7 @@ dtdv = &dt_ms_dv; if (dtdv->dtdv_handler != NULL) - (*dtdv->dtdv_handler)(dtdv->dtdv_dv, msg); + (*dtdv->dtdv_handler)(dtdv->dtdv_arg, msg); } } Index: src/sys/arch/pmax/tc/dtkbd.c diff -u src/sys/arch/pmax/tc/dtkbd.c:1.8 src/sys/arch/pmax/tc/dtkbd.c:1.9 --- src/sys/arch/pmax/tc/dtkbd.c:1.8 Mon Apr 28 20:23:31 2008 +++ src/sys/arch/pmax/tc/dtkbd.c Sat Jun 4 01:37:36 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: dtkbd.c,v 1.8 2008/04/28 20:23:31 martin Exp $ */ +/* $NetBSD: dtkbd.c,v 1.9 2011/06/04 01:37:36 tsutsui Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_
CVS commit: src/sys/arch/pmax/ibus
Module Name:src Committed By: tsutsui Date: Sat Jun 4 01:31:24 UTC 2011 Modified Files: src/sys/arch/pmax/ibus: pm.c sii.c sii_ds.c siivar.h Log Message: Split device_t/softc. No crash during device attach on GXemul. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/pmax/ibus/pm.c \ src/sys/arch/pmax/ibus/sii.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/pmax/ibus/sii_ds.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/pmax/ibus/siivar.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/pmax/ibus/pm.c diff -u src/sys/arch/pmax/ibus/pm.c:1.8 src/sys/arch/pmax/ibus/pm.c:1.9 --- src/sys/arch/pmax/ibus/pm.c:1.8 Sat May 15 20:31:10 2010 +++ src/sys/arch/pmax/ibus/pm.c Sat Jun 4 01:31:23 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pm.c,v 1.8 2010/05/15 20:31:10 tsutsui Exp $ */ +/* $NetBSD: pm.c,v 1.9 2011/06/04 01:31:23 tsutsui Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pm.c,v 1.8 2010/05/15 20:31:10 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pm.c,v 1.9 2011/06/04 01:31:23 tsutsui Exp $"); #include #include @@ -76,7 +76,7 @@ }; struct pm_softc { - struct device sc_dev; + device_t sc_dev; size_t sc_cmap_size; size_t sc_fb_size; int sc_type; @@ -89,8 +89,8 @@ }; #define WSDISPLAY_CMAP_DOLUT 0x20 -int pm_match(struct device *, struct cfdata *, void *); -void pm_attach(struct device *, struct device *, void *); +int pm_match(device_t, cfdata_t, void *); +void pm_attach(device_t, device_t, void *); int pm_ioctl(void *, void *, u_long, void *, int, struct lwp *); paddr_t pm_mmap(void *, void *, off_t, int); int pm_alloc_screen(void *, const struct wsscreen_descr *, @@ -110,7 +110,7 @@ void pm_set_curpos(struct pm_softc *, struct wsdisplay_curpos *); void pm_init_cmap(struct pm_softc *); -CFATTACH_DECL(pm, sizeof(struct pm_softc), +CFATTACH_DECL_NEW(pm, sizeof(struct pm_softc), pm_match, pm_attach, NULL, NULL); struct rasops_info pm_ri; @@ -142,7 +142,7 @@ u_int pm_creg; int -pm_match(struct device *parent, struct cfdata *match, void *aux) +pm_match(device_t parent, cfdata_t cf, void *aux) { struct ibus_attach_args *ia; void *pmaddr; @@ -160,14 +160,15 @@ } void -pm_attach(struct device *parent, struct device *self, void *aux) +pm_attach(device_t parent, device_t self, void *aux) { struct pm_softc *sc; struct rasops_info *ri; struct wsemuldisplaydev_attach_args waa; int console; - sc = (struct pm_softc *)self; + sc = device_private(self); + sc->sc_dev = self; ri = &pm_ri; console = (ri->ri_bits != NULL); Index: src/sys/arch/pmax/ibus/sii.c diff -u src/sys/arch/pmax/ibus/sii.c:1.8 src/sys/arch/pmax/ibus/sii.c:1.9 --- src/sys/arch/pmax/ibus/sii.c:1.8 Wed Mar 18 10:22:33 2009 +++ src/sys/arch/pmax/ibus/sii.c Sat Jun 4 01:31:23 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: sii.c,v 1.8 2009/03/18 10:22:33 cegger Exp $ */ +/* $NetBSD: sii.c,v 1.9 2011/06/04 01:31:23 tsutsui Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -38,7 +38,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sii.c,v 1.8 2009/03/18 10:22:33 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sii.c,v 1.9 2011/06/04 01:31:23 tsutsui Exp $"); #include "sii.h" /* @@ -172,7 +172,7 @@ sii_Reset(sc, RESET); printf(": target %d\n", sc->sc_regs->id & SII_IDMSK); - sc->sc_adapter.adapt_dev = &sc->sc_dev; + sc->sc_adapter.adapt_dev = sc->sc_dev; sc->sc_adapter.adapt_nchannels = 1; sc->sc_adapter.adapt_openings = 7; sc->sc_adapter.adapt_max_periph = 1; @@ -191,7 +191,7 @@ /* * Now try to attach all the sub-devices */ - config_found(&sc->sc_dev, &sc->sc_channel, scsiprint); + config_found(sc->sc_dev, &sc->sc_channel, scsiprint); } /* @@ -205,11 +205,13 @@ { struct scsipi_xfer *xs; struct scsipi_periph *periph; - struct siisoftc *sc = (void *)chan->chan_adapter->adapt_dev; + struct siisoftc *sc; int target; int s; int count; + sc = device_private(chan->chan_adapter->adapt_dev); + switch (req) { case ADAPTER_REQ_RUN_XFER: xs = arg; @@ -310,7 +312,7 @@ * Set host adapter ID (from PROM sciiidN variable). */ /* XXX device_unit() abuse */ - regs->id = SII_ID_IO | prom_scsiid(device_unit(&sc->sc_dev)); + regs->id = SII_ID_IO | prom_scsiid(device_unit(sc->sc_dev)); /* * Enable SII to drive the SCSI bus. */ @@ -389,9 +391,9 @@ #ifdef DEBUG if (sii_debug > 1) { printf("sii_StartCmd: %s target %d cmd 0x%x addr %p size %d DMA %d\n", - sc->sc_dev.dv_xname, - target, scsicmd->cmd[0], scsicmd->buf, scsicmd->buflen, - state->dmaDataPhase); + device_xname(sc->sc_dev), + target, scsicmd->cmd[0], scsicmd->buf, scsicmd->buflen, + state->dmaDataPhase); } sii_debug_cmd = scsicmd->cmd[0]; if (scsicmd->cmd[0] == READ_10 || @@ -612,7 +614,8 @@ /* check for a BUS RESET */ if (cstat & SII_RST) { - printf(
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: tsutsui Date: Wed Apr 6 15:31:48 UTC 2011 Modified Files: src/sys/arch/pmax/pmax: autoconf.c Log Message: Move intr_init() (which initializes evcnt(9) for interrupts) from early machdep.c:mach_init() to autoconf.c:cpu_configure(). evcnt_init() isn't called yet when mach_init() is invoked from locore.S and interrupts won't be enabled before cpu_configure(9). Problem reported by Erik Bertelsen on port-pmax: http://mail-index.NetBSD.org/port-pmax/2011/04/06/msg93.html To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/sys/arch/pmax/pmax/autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/autoconf.c diff -u src/sys/arch/pmax/pmax/autoconf.c:1.76 src/sys/arch/pmax/pmax/autoconf.c:1.77 --- src/sys/arch/pmax/pmax/autoconf.c:1.76 Sun Feb 20 07:50:25 2011 +++ src/sys/arch/pmax/pmax/autoconf.c Wed Apr 6 15:31:48 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.76 2011/02/20 07:50:25 matt Exp $ */ +/* $NetBSD: autoconf.c,v 1.77 2011/04/06 15:31:48 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.76 2011/02/20 07:50:25 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.77 2011/04/06 15:31:48 tsutsui Exp $"); #include #include @@ -77,6 +77,9 @@ /* Kick off autoconfiguration. */ (void)splhigh(); + /* Interrupt initialization. */ + intr_init(); + if (config_rootfound("mainbus", NULL) == NULL) panic("no mainbus found");
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: tsutsui Date: Wed Apr 6 15:31:08 UTC 2011 Modified Files: src/sys/arch/pmax/pmax: machdep.c Log Message: Move intr_init() (which initializes evcnt(9) for interrupts) from early machdep.c:mach_init() to autoconf.c:cpu_configure(). evcnt_init() isn't called yet when mach_init() is invoked from locore.S and interrupts won't be enabled before cpu_configure(9). Problem reported by Erik Bertelsen on port-pmax: http://mail-index.NetBSD.org/port-pmax/2011/04/06/msg93.html To generate a diff of this commit: cvs rdiff -u -r1.242 -r1.243 src/sys/arch/pmax/pmax/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/machdep.c diff -u src/sys/arch/pmax/pmax/machdep.c:1.242 src/sys/arch/pmax/pmax/machdep.c:1.243 --- src/sys/arch/pmax/pmax/machdep.c:1.242 Sun Feb 20 07:50:25 2011 +++ src/sys/arch/pmax/pmax/machdep.c Wed Apr 6 15:31:08 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.242 2011/02/20 07:50:25 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.243 2011/04/06 15:31:08 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.242 2011/02/20 07:50:25 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.243 2011/04/06 15:31:08 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_modular.h" @@ -315,9 +315,6 @@ /* Machine specific initialization. */ (*sysinit[systype].init)(); - /* Interrupt initialization. */ - intr_init(); - /* Find out how much memory is available. */ physmem = (*platform.memsize)(kernend);
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: mhitch Date: Sun Apr 3 03:19:52 UTC 2011 Modified Files: src/sys/arch/pmax/pmax: dec_3maxplus.c dec_3min.c dec_maxine.c Log Message: Fix pmax timecounters for mips3-class machines. Apparently no one else has run a 5000/150 with 5.0 or later - I booted 5.0 a couple of time, but clamd caused a hard hang. Now that I've given up trying to run clamd on my 5000/150, I noticed that time ran too fast while using the mips3_cp0_counter source. The cpu_mhz computed in mc_cpuspeed is the CP0 clock speed, not the doubled CPU clock. Also add the mips3_cp0_counter timecounters for the 5000/50 (maxine) and 5000/260 (3maxplus). To generate a diff of this commit: cvs rdiff -u -r1.66 -r1.67 src/sys/arch/pmax/pmax/dec_3maxplus.c cvs rdiff -u -r1.69 -r1.70 src/sys/arch/pmax/pmax/dec_3min.c cvs rdiff -u -r1.61 -r1.62 src/sys/arch/pmax/pmax/dec_maxine.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/dec_3maxplus.c diff -u src/sys/arch/pmax/pmax/dec_3maxplus.c:1.66 src/sys/arch/pmax/pmax/dec_3maxplus.c:1.67 --- src/sys/arch/pmax/pmax/dec_3maxplus.c:1.66 Sun Feb 20 07:50:25 2011 +++ src/sys/arch/pmax/pmax/dec_3maxplus.c Sun Apr 3 03:19:52 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3maxplus.c,v 1.66 2011/02/20 07:50:25 matt Exp $ */ +/* $NetBSD: dec_3maxplus.c,v 1.67 2011/04/03 03:19:52 mhitch Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -70,7 +70,7 @@ #define __INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: dec_3maxplus.c,v 1.66 2011/02/20 07:50:25 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3maxplus.c,v 1.67 2011/04/03 03:19:52 mhitch Exp $"); #include #include @@ -433,6 +433,14 @@ static void dec_3maxplus_tc_init(void) { +#if defined(MIPS3) + static struct timecounter tc3 = { + .tc_get_timecount = (timecounter_get_t *)mips3_cp0_count_read, + .tc_counter_mask = ~0u, + .tc_name = "mips3_cp0_counter", + .tc_quality = 200, + }; +#endif static struct timecounter tc = { .tc_get_timecount = dec_3maxplus_get_timecount, .tc_quality = 100, @@ -442,4 +450,12 @@ }; tc_init(&tc); + +#if defined(MIPS3) + if (MIPS_HAS_CLOCK) { + tc3.tc_frequency = mips_options.mips_cpu_mhz * 100; + + tc_init(&tc3); + } +#endif } Index: src/sys/arch/pmax/pmax/dec_3min.c diff -u src/sys/arch/pmax/pmax/dec_3min.c:1.69 src/sys/arch/pmax/pmax/dec_3min.c:1.70 --- src/sys/arch/pmax/pmax/dec_3min.c:1.69 Thu Mar 10 17:13:13 2011 +++ src/sys/arch/pmax/pmax/dec_3min.c Sun Apr 3 03:19:52 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3min.c,v 1.69 2011/03/10 17:13:13 tsutsui Exp $ */ +/* $NetBSD: dec_3min.c,v 1.70 2011/04/03 03:19:52 mhitch Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -70,7 +70,7 @@ #define __INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: dec_3min.c,v 1.69 2011/03/10 17:13:13 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3min.c,v 1.70 2011/04/03 03:19:52 mhitch Exp $"); #include #include @@ -469,9 +469,6 @@ if (MIPS_HAS_CLOCK) { tc.tc_frequency = mips_options.mips_cpu_mhz * 100; - if (mips_options.mips_cpu_flags & CPU_MIPS_DOUBLE_COUNT) { - tc.tc_frequency /= 2; - } tc_init(&tc); } Index: src/sys/arch/pmax/pmax/dec_maxine.c diff -u src/sys/arch/pmax/pmax/dec_maxine.c:1.61 src/sys/arch/pmax/pmax/dec_maxine.c:1.62 --- src/sys/arch/pmax/pmax/dec_maxine.c:1.61 Sun Feb 20 07:50:25 2011 +++ src/sys/arch/pmax/pmax/dec_maxine.c Sun Apr 3 03:19:52 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_maxine.c,v 1.61 2011/02/20 07:50:25 matt Exp $ */ +/* $NetBSD: dec_maxine.c,v 1.62 2011/04/03 03:19:52 mhitch Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -70,7 +70,7 @@ #define __INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: dec_maxine.c,v 1.61 2011/02/20 07:50:25 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_maxine.c,v 1.62 2011/04/03 03:19:52 mhitch Exp $"); #include #include @@ -380,6 +380,14 @@ static void dec_maxine_tc_init(void) { +#if defined(MIPS3) + static struct timecounter tc3 = { + .tc_get_timecount = (timecounter_get_t *)mips3_cp0_count_read, + .tc_counter_mask = ~0u, + .tc_name = "mips3_cp0_counter", + .tc_quality = 200, + }; +#endif static struct timecounter tc = { .tc_get_timecount = dec_maxine_get_timecount, .tc_quality = 100, @@ -389,4 +397,12 @@ }; tc_init(&tc); + +#if defined(MIPS3) + if (MIPS_HAS_CLOCK) { + tc3.tc_frequency = mips_options.mips_cpu_mhz * 100; + + tc_init(&tc3); + } +#endif }
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: tsutsui Date: Mon Mar 28 14:40:01 UTC 2011 Modified Files: src/sys/arch/pmax/pmax: locore_machdep.S Log Message: Use CALLFRAME_SP(sp) instead of CALLFRAME_S0(sp) to save s0. At least PROM's _getenv() on 3MIN doesn't preserve CALLFRAME_S0(s0) and prom_findcons() returns bogus console after mips64 merge. XXX: I wonder if it's safe to use CALLFRAME_S0(sp) (== 0(sp)) on O32/O64.. To generate a diff of this commit: cvs rdiff -u -r1.24 -r1.25 src/sys/arch/pmax/pmax/locore_machdep.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/pmax/pmax/locore_machdep.S diff -u src/sys/arch/pmax/pmax/locore_machdep.S:1.24 src/sys/arch/pmax/pmax/locore_machdep.S:1.25 --- src/sys/arch/pmax/pmax/locore_machdep.S:1.24 Sun Feb 20 07:50:25 2011 +++ src/sys/arch/pmax/pmax/locore_machdep.S Mon Mar 28 14:40:00 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: locore_machdep.S,v 1.24 2011/02/20 07:50:25 matt Exp $ */ +/* $NetBSD: locore_machdep.S,v 1.25 2011/03/28 14:40:00 tsutsui Exp $ */ /* * Copyright (c) 1992, 1993 @@ -168,7 +168,7 @@ NESTED(promcall, CALLFRAME_SIZ, ra) PTR_SUBU sp, CALLFRAME_SIZ REG_S ra, CALLFRAME_RA(sp) - REG_S s0, CALLFRAME_S0(sp) + REG_S s0, CALLFRAME_SP(sp) move s0, t8 /* save MIPS_CURLWP */ @@ -183,7 +183,7 @@ move t8, s0 /* restore MIPS_CURLWP */ REG_L ra, CALLFRAME_RA(sp) - REG_L s0, CALLFRAME_S0(sp) + REG_L s0, CALLFRAME_SP(sp) jr ra PTR_ADDU sp, CALLFRAME_SIZ
CVS commit: src/sys/arch/pmax/stand/common
Module Name:src Committed By: tsutsui Date: Sat Mar 26 15:49:27 UTC 2011 Modified Files: src/sys/arch/pmax/stand/common: bootinit.S bootread.S clear_cache.S getchar.S printf.S start.S Log Message: Use .set reorder to entrust compiler hazards and BDslots to avoid future botch since there is no critical instructions in these sources. Tested on 3MIN. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/pmax/stand/common/bootinit.S \ src/sys/arch/pmax/stand/common/bootread.S cvs rdiff -u -r1.8 -r1.9 src/sys/arch/pmax/stand/common/clear_cache.S \ src/sys/arch/pmax/stand/common/printf.S cvs rdiff -u -r1.4 -r1.5 src/sys/arch/pmax/stand/common/getchar.S cvs rdiff -u -r1.22 -r1.23 src/sys/arch/pmax/stand/common/start.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/pmax/stand/common/bootinit.S diff -u src/sys/arch/pmax/stand/common/bootinit.S:1.7 src/sys/arch/pmax/stand/common/bootinit.S:1.8 --- src/sys/arch/pmax/stand/common/bootinit.S:1.7 Mon Jan 10 16:43:29 2011 +++ src/sys/arch/pmax/stand/common/bootinit.S Sat Mar 26 15:49:26 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bootinit.S,v 1.7 2011/01/10 16:43:29 tsutsui Exp $ */ +/* $NetBSD: bootinit.S,v 1.8 2011/03/26 15:49:26 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -33,12 +33,9 @@ #include #include - .set noreorder + .set reorder # make as(1) handle hazard and BDslot LEAF(bootinit) lw v0, _C_LABEL(callv) # get pointer to call back vectors - nop lw v0, 0x54(v0) # offset for callv->_bootinit - nop j v0 # call PROM bootinit - nop END(bootinit) Index: src/sys/arch/pmax/stand/common/bootread.S diff -u src/sys/arch/pmax/stand/common/bootread.S:1.7 src/sys/arch/pmax/stand/common/bootread.S:1.8 --- src/sys/arch/pmax/stand/common/bootread.S:1.7 Mon Jan 10 16:43:29 2011 +++ src/sys/arch/pmax/stand/common/bootread.S Sat Mar 26 15:49:26 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bootread.S,v 1.7 2011/01/10 16:43:29 tsutsui Exp $ */ +/* $NetBSD: bootread.S,v 1.8 2011/03/26 15:49:26 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -33,12 +33,9 @@ #include #include - .set noreorder + .set reorder # make as(1) handle hazard and BDslot LEAF(bootread) lw v0, _C_LABEL(callv) # get pointer to call back vectors - nop lw v0, 0x58(v0) # offset for callv->_bootread - nop j v0 # call PROM bootread - nop END(bootread) Index: src/sys/arch/pmax/stand/common/clear_cache.S diff -u src/sys/arch/pmax/stand/common/clear_cache.S:1.8 src/sys/arch/pmax/stand/common/clear_cache.S:1.9 --- src/sys/arch/pmax/stand/common/clear_cache.S:1.8 Mon Jan 10 16:43:29 2011 +++ src/sys/arch/pmax/stand/common/clear_cache.S Sat Mar 26 15:49:26 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: clear_cache.S,v 1.8 2011/01/10 16:43:29 tsutsui Exp $ */ +/* $NetBSD: clear_cache.S,v 1.9 2011/03/26 15:49:26 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -33,12 +33,9 @@ #include #include - .set noreorder + .set reorder # make as(1) handle hazard and BDslot LEAF(clear_cache) lw v0, _C_LABEL(callv) # get pointer to call back vectors - nop lw v0, 0x7c(v0) # offset for callv->_clear_cache - nop j v0 # call PROM clear_cache - nop END(clear_cache) Index: src/sys/arch/pmax/stand/common/printf.S diff -u src/sys/arch/pmax/stand/common/printf.S:1.8 src/sys/arch/pmax/stand/common/printf.S:1.9 --- src/sys/arch/pmax/stand/common/printf.S:1.8 Mon Jan 10 16:43:29 2011 +++ src/sys/arch/pmax/stand/common/printf.S Sat Mar 26 15:49:26 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: printf.S,v 1.8 2011/01/10 16:43:29 tsutsui Exp $ */ +/* $NetBSD: printf.S,v 1.9 2011/03/26 15:49:26 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -33,12 +33,10 @@ #include #include - .set noreorder + .set reorder # make as(1) handle hazard and BDslot LEAF(printf) lw v0, _C_LABEL(callv) # get pointer to call back vectors - nop lw t9, 0x30(v0) # offset for callv->_printf - nop #ifdef __mips_n32 /* * If someone calls printf with more than 4 args on n32, @@ -52,12 +50,10 @@ sw a7, 28(sp) sw ra, 44(sp) jalr t9 # call PROM printf - nop lw ra, 44(sp) + addu sp, sp, 48 j ra - addu sp, sp, 48 #else j t9 # call PROM printf - nop #endif END(printf) Index: src/sys/arch/pmax/stand/common/getchar.S diff -u src/sys/arch/pmax/stand/common/getchar.S:1.4 src/sys/arch/pmax/stand/common/getchar.S:1.5 --- src/sys/arch/pmax/stand/common/getchar.S:1.4 Mon Jan 10 16:43:29 2011 +++ src/sys/arch/pmax/stand/common/getchar.S Sat Mar 26 15:49:26 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: getchar.S,v 1.4 2011/01/10 16:43:29 tsutsui Exp $ */ +/* $NetBSD: getchar.S,v 1.5 2011/03/26 15:49:26 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -33,12 +33,9 @@ #include #include - .set noreorder + .set reorder # make as(1) handle hazard and
CVS commit: src/sys/arch/pmax/include
Module Name:src Committed By: tsutsui Date: Fri Mar 18 16:28:51 UTC 2011 Modified Files: src/sys/arch/pmax/include: param.h Log Message: - include after MACHINE is defined - remove redundant comment To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/pmax/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/pmax/include/param.h diff -u src/sys/arch/pmax/include/param.h:1.44 src/sys/arch/pmax/include/param.h:1.45 --- src/sys/arch/pmax/include/param.h:1.44 Sun Mar 6 20:34:56 2011 +++ src/sys/arch/pmax/include/param.h Fri Mar 18 16:28:51 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.44 2011/03/06 20:34:56 he Exp $ */ +/* $NetBSD: param.h,v 1.45 2011/03/18 16:28:51 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -42,19 +42,13 @@ #define _PMAX_PARAM_H_ /* - * Machine-dependent constants (VM, etc) common across MIPS cpus - */ - -#include - -/* * Machine dependent constants for mips-based DECstations. */ #define _MACHINE pmax -#ifdef _KERNEL #define MACHINE "pmax" -#endif + +#include #define DEV_BSIZE 512 #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: tsutsui Date: Thu Mar 10 17:13:13 UTC 2011 Modified Files: src/sys/arch/pmax/pmax: dec_3max.c dec_3min.c Log Message: Set correct struct clockframe .intr value for hardclock(9). To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/sys/arch/pmax/pmax/dec_3max.c cvs rdiff -u -r1.68 -r1.69 src/sys/arch/pmax/pmax/dec_3min.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/dec_3max.c diff -u src/sys/arch/pmax/pmax/dec_3max.c:1.52 src/sys/arch/pmax/pmax/dec_3max.c:1.53 --- src/sys/arch/pmax/pmax/dec_3max.c:1.52 Sun Feb 20 07:50:25 2011 +++ src/sys/arch/pmax/pmax/dec_3max.c Thu Mar 10 17:13:13 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3max.c,v 1.52 2011/02/20 07:50:25 matt Exp $ */ +/* $NetBSD: dec_3max.c,v 1.53 2011/03/10 17:13:13 tsutsui Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -70,7 +70,7 @@ #define __INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: dec_3max.c,v 1.52 2011/02/20 07:50:25 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3max.c,v 1.53 2011/03/10 17:13:13 tsutsui Exp $"); #include "dzkbd.h" @@ -271,6 +271,7 @@ "r"(MIPS_PHYS_TO_KSEG1(KN02_SYS_CLOCK))); cf.pc = pc; cf.sr = status; + cf.intr = (curcpu()->ci_idepth > 1); hardclock(&cf); pmax_clock_evcnt.ev_count++; Index: src/sys/arch/pmax/pmax/dec_3min.c diff -u src/sys/arch/pmax/pmax/dec_3min.c:1.68 src/sys/arch/pmax/pmax/dec_3min.c:1.69 --- src/sys/arch/pmax/pmax/dec_3min.c:1.68 Sun Feb 20 07:50:25 2011 +++ src/sys/arch/pmax/pmax/dec_3min.c Thu Mar 10 17:13:13 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3min.c,v 1.68 2011/02/20 07:50:25 matt Exp $ */ +/* $NetBSD: dec_3min.c,v 1.69 2011/03/10 17:13:13 tsutsui Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -70,7 +70,7 @@ #define __INTR_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: dec_3min.c,v 1.68 2011/02/20 07:50:25 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3min.c,v 1.69 2011/03/10 17:13:13 tsutsui Exp $"); #include #include @@ -369,6 +369,7 @@ cf.pc = pc; cf.sr = status; +cf.intr = (curcpu()->ci_idepth > 1); hardclock(&cf); pmax_clock_evcnt.ev_count++; }
CVS commit: src/sys/arch/pmax/stand
Module Name:src Committed By: tsutsui Date: Fri Jan 28 11:58:39 UTC 2011 Modified Files: src/sys/arch/pmax/stand: Makefile.booters Log Message: typo To generate a diff of this commit: cvs rdiff -u -r1.54 -r1.55 src/sys/arch/pmax/stand/Makefile.booters Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/stand/Makefile.booters diff -u src/sys/arch/pmax/stand/Makefile.booters:1.54 src/sys/arch/pmax/stand/Makefile.booters:1.55 --- src/sys/arch/pmax/stand/Makefile.booters:1.54 Sun Jan 23 13:18:57 2011 +++ src/sys/arch/pmax/stand/Makefile.booters Fri Jan 28 11:58:38 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.booters,v 1.54 2011/01/23 13:18:57 joerg Exp $ +# $NetBSD: Makefile.booters,v 1.55 2011/01/28 11:58:38 tsutsui Exp $ NOMAN= # defined @@ -99,7 +99,7 @@ LIBS= ${LIBSA} ${LIBZ} ${LIBSA} ${LIBKERN} vers.c: ${.CURDIR}/version - ${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-Do} \ + ${HOST_SH} ${S}/conf/newvers_stand.sh ${${MKREPRO} == "yes" :?:-D} \ -N ${.CURDIR}/version "pmax" ${PROG}: ${OBJS} ${LIBS}
CVS commit: src/sys/arch/pmax/stand
Module Name:src Committed By: joerg Date: Sun Jan 23 13:18:58 UTC 2011 Modified Files: src/sys/arch/pmax/stand: Makefile.booters Log Message: Define NOMAN earlier To generate a diff of this commit: cvs rdiff -u -r1.53 -r1.54 src/sys/arch/pmax/stand/Makefile.booters Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/stand/Makefile.booters diff -u src/sys/arch/pmax/stand/Makefile.booters:1.53 src/sys/arch/pmax/stand/Makefile.booters:1.54 --- src/sys/arch/pmax/stand/Makefile.booters:1.53 Sat Jan 22 19:19:21 2011 +++ src/sys/arch/pmax/stand/Makefile.booters Sun Jan 23 13:18:57 2011 @@ -1,4 +1,6 @@ -# $NetBSD: Makefile.booters,v 1.53 2011/01/22 19:19:21 joerg Exp $ +# $NetBSD: Makefile.booters,v 1.54 2011/01/23 13:18:57 joerg Exp $ + +NOMAN= # defined .include .include # for HOST_SH @@ -31,8 +33,6 @@ PRIMARY_LOAD_ADDRESS?= 0x8070 SECONDARY_LOAD_ADDRESS?=0x8071 -NOMAN= # defined - .if defined(PRIMARY_PROG) PROG= ${PRIMARY_PROG} SRCS = start.S bootxx.c callvec.c
CVS commit: src/sys/arch/pmax/stand/common
Module Name:src Committed By: tsutsui Date: Wed Jan 12 15:32:43 UTC 2011 Modified Files: src/sys/arch/pmax/stand/common: if_prom.c Log Message: Pull a fix from src/sys/net/if_ethersubr.c rev. 1.185: Fix off by one. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/pmax/stand/common/if_prom.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/stand/common/if_prom.c diff -u src/sys/arch/pmax/stand/common/if_prom.c:1.10 src/sys/arch/pmax/stand/common/if_prom.c:1.11 --- src/sys/arch/pmax/stand/common/if_prom.c:1.10 Mon Jan 10 17:01:17 2011 +++ src/sys/arch/pmax/stand/common/if_prom.c Wed Jan 12 15:32:43 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: if_prom.c,v 1.10 2011/01/10 17:01:17 tsutsui Exp $ */ +/* $NetBSD: if_prom.c,v 1.11 2011/01/12 15:32:43 tsutsui Exp $ */ /* Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -150,7 +150,7 @@ printf("enet=%s\n", enet); #endif -#define atox(c) (((c) < '9') ? ((c) - '0') : ((toupper(c) - 'A') + 10)) +#define atox(c) (((c) <= '9') ? ((c) - '0') : ((toupper(c) - 'A') + 10)) cp = (uint8_t *)enet; dest = desc->myea;
CVS commit: src/sys/arch/pmax/stand/common
Module Name:src Committed By: tsutsui Date: Tue Jan 11 16:19:38 UTC 2011 Modified Files: src/sys/arch/pmax/stand/common: bootinfo.c Log Message: ANSIfy. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/pmax/stand/common/bootinfo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/stand/common/bootinfo.c diff -u src/sys/arch/pmax/stand/common/bootinfo.c:1.8 src/sys/arch/pmax/stand/common/bootinfo.c:1.9 --- src/sys/arch/pmax/stand/common/bootinfo.c:1.8 Mon Apr 28 20:23:31 2008 +++ src/sys/arch/pmax/stand/common/bootinfo.c Tue Jan 11 16:19:38 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bootinfo.c,v 1.8 2008/04/28 20:23:31 martin Exp $ */ +/* $NetBSD: bootinfo.c,v 1.9 2011/01/11 16:19:38 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -39,8 +39,7 @@ static char *bi_next; static int bi_size; -void bi_init(addr) - paddr_t addr; +void bi_init(paddr_t addr) { struct btinfo_common *bi; struct btinfo_magic bi_magic; @@ -55,9 +54,7 @@ bi_add(&bi_magic, BTINFO_MAGIC, sizeof(bi_magic)); } -void bi_add(new, type, size) - void *new; - int type, size; +void bi_add(void *new, int type, int size) { struct btinfo_common *bi;
CVS commit: src/sys/arch/pmax/stand/common
Module Name:src Committed By: tsutsui Date: Mon Jan 10 17:01:17 UTC 2011 Modified Files: src/sys/arch/pmax/stand/common: common.h if_prom.c start.S Log Message: - start.S add a hazard nop so that prom_restart() works properly on MIPS1 (it seems broken since initial revision and had been restarted by fault?) - common.h export prom_restart() - if_prom.c use prom_restart() instead of a direct PROM call (that should be equivalent) To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/pmax/stand/common/common.h \ src/sys/arch/pmax/stand/common/if_prom.c cvs rdiff -u -r1.21 -r1.22 src/sys/arch/pmax/stand/common/start.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/pmax/stand/common/common.h diff -u src/sys/arch/pmax/stand/common/common.h:1.9 src/sys/arch/pmax/stand/common/common.h:1.10 --- src/sys/arch/pmax/stand/common/common.h:1.9 Sat Mar 14 14:46:04 2009 +++ src/sys/arch/pmax/stand/common/common.h Mon Jan 10 17:01:17 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: common.h,v 1.9 2009/03/14 14:46:04 dsl Exp $ */ +/* $NetBSD: common.h,v 1.10 2011/01/10 17:01:17 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -45,6 +45,7 @@ int prom_lseek(int, int, int); int prom_open(const char *, int); int prom_read(int, void *, int); +void __dead prom_restart(void); int prom_write(int, void *, int); Index: src/sys/arch/pmax/stand/common/if_prom.c diff -u src/sys/arch/pmax/stand/common/if_prom.c:1.9 src/sys/arch/pmax/stand/common/if_prom.c:1.10 --- src/sys/arch/pmax/stand/common/if_prom.c:1.9 Sun Jan 9 16:55:13 2011 +++ src/sys/arch/pmax/stand/common/if_prom.c Mon Jan 10 17:01:17 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: if_prom.c,v 1.9 2011/01/09 16:55:13 tsutsui Exp $ */ +/* $NetBSD: if_prom.c,v 1.10 2011/01/10 17:01:17 tsutsui Exp $ */ /* Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -141,7 +141,7 @@ if (enet == NULL) { printf("No `enet' environment variable found.\n" "Set MAC address to `enet' manually by setenv command.\n"); - (*callv->_halt)((int *)0, 0); /* XXX */ + prom_restart(); /* NOTREACHED */ } Index: src/sys/arch/pmax/stand/common/start.S diff -u src/sys/arch/pmax/stand/common/start.S:1.21 src/sys/arch/pmax/stand/common/start.S:1.22 --- src/sys/arch/pmax/stand/common/start.S:1.21 Mon Jan 10 15:25:44 2011 +++ src/sys/arch/pmax/stand/common/start.S Mon Jan 10 17:01:17 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: start.S,v 1.21 2011/01/10 15:25:44 tsutsui Exp $ */ +/* $NetBSD: start.S,v 1.22 2011/01/10 17:01:17 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -116,6 +116,7 @@ LEAF(prom_restart) XLEAF(_rtt) lw v0, _C_LABEL (callv) + nop lw v0, 0x9C(v0) /* halt */ move a0, zero /* Don't print anything. */ j v0
CVS commit: src/sys/arch/pmax/stand/common
Module Name:src Committed By: tsutsui Date: Mon Jan 10 16:43:30 UTC 2011 Modified Files: src/sys/arch/pmax/stand/common: bootinit.S bootread.S clear_cache.S getchar.S printf.S Log Message: Add hazard nops required by MIPS1 in noreorder case. (Umm, is it easier to remove noreorder and all BDslot insns?) To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/pmax/stand/common/bootinit.S \ src/sys/arch/pmax/stand/common/bootread.S cvs rdiff -u -r1.7 -r1.8 src/sys/arch/pmax/stand/common/clear_cache.S \ src/sys/arch/pmax/stand/common/printf.S cvs rdiff -u -r1.3 -r1.4 src/sys/arch/pmax/stand/common/getchar.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/pmax/stand/common/bootinit.S diff -u src/sys/arch/pmax/stand/common/bootinit.S:1.6 src/sys/arch/pmax/stand/common/bootinit.S:1.7 --- src/sys/arch/pmax/stand/common/bootinit.S:1.6 Mon Jan 10 15:25:15 2011 +++ src/sys/arch/pmax/stand/common/bootinit.S Mon Jan 10 16:43:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bootinit.S,v 1.6 2011/01/10 15:25:15 tsutsui Exp $ */ +/* $NetBSD: bootinit.S,v 1.7 2011/01/10 16:43:29 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -36,6 +36,7 @@ .set noreorder LEAF(bootinit) lw v0, _C_LABEL(callv) # get pointer to call back vectors + nop lw v0, 0x54(v0) # offset for callv->_bootinit nop j v0 # call PROM bootinit Index: src/sys/arch/pmax/stand/common/bootread.S diff -u src/sys/arch/pmax/stand/common/bootread.S:1.6 src/sys/arch/pmax/stand/common/bootread.S:1.7 --- src/sys/arch/pmax/stand/common/bootread.S:1.6 Mon Jan 10 15:25:15 2011 +++ src/sys/arch/pmax/stand/common/bootread.S Mon Jan 10 16:43:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bootread.S,v 1.6 2011/01/10 15:25:15 tsutsui Exp $ */ +/* $NetBSD: bootread.S,v 1.7 2011/01/10 16:43:29 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -36,6 +36,7 @@ .set noreorder LEAF(bootread) lw v0, _C_LABEL(callv) # get pointer to call back vectors + nop lw v0, 0x58(v0) # offset for callv->_bootread nop j v0 # call PROM bootread Index: src/sys/arch/pmax/stand/common/clear_cache.S diff -u src/sys/arch/pmax/stand/common/clear_cache.S:1.7 src/sys/arch/pmax/stand/common/clear_cache.S:1.8 --- src/sys/arch/pmax/stand/common/clear_cache.S:1.7 Mon Jan 10 15:25:15 2011 +++ src/sys/arch/pmax/stand/common/clear_cache.S Mon Jan 10 16:43:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: clear_cache.S,v 1.7 2011/01/10 15:25:15 tsutsui Exp $ */ +/* $NetBSD: clear_cache.S,v 1.8 2011/01/10 16:43:29 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -36,6 +36,7 @@ .set noreorder LEAF(clear_cache) lw v0, _C_LABEL(callv) # get pointer to call back vectors + nop lw v0, 0x7c(v0) # offset for callv->_clear_cache nop j v0 # call PROM clear_cache Index: src/sys/arch/pmax/stand/common/printf.S diff -u src/sys/arch/pmax/stand/common/printf.S:1.7 src/sys/arch/pmax/stand/common/printf.S:1.8 --- src/sys/arch/pmax/stand/common/printf.S:1.7 Mon Jan 10 15:25:15 2011 +++ src/sys/arch/pmax/stand/common/printf.S Mon Jan 10 16:43:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: printf.S,v 1.7 2011/01/10 15:25:15 tsutsui Exp $ */ +/* $NetBSD: printf.S,v 1.8 2011/01/10 16:43:29 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -36,6 +36,7 @@ .set noreorder LEAF(printf) lw v0, _C_LABEL(callv) # get pointer to call back vectors + nop lw t9, 0x30(v0) # offset for callv->_printf nop #ifdef __mips_n32 Index: src/sys/arch/pmax/stand/common/getchar.S diff -u src/sys/arch/pmax/stand/common/getchar.S:1.3 src/sys/arch/pmax/stand/common/getchar.S:1.4 --- src/sys/arch/pmax/stand/common/getchar.S:1.3 Mon Jan 10 15:25:15 2011 +++ src/sys/arch/pmax/stand/common/getchar.S Mon Jan 10 16:43:29 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: getchar.S,v 1.3 2011/01/10 15:25:15 tsutsui Exp $ */ +/* $NetBSD: getchar.S,v 1.4 2011/01/10 16:43:29 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -36,6 +36,7 @@ .set noreorder LEAF(getchar) lw v0, _C_LABEL(callv) # get pointer to call back vectors + nop lw v0, 0x24(v0) # offset for callv->_getchar nop j v0 # call PROM getchar
CVS commit: src/sys/arch/pmax/stand/common
Module Name:src Committed By: tsutsui Date: Mon Jan 10 15:25:44 UTC 2011 Modified Files: src/sys/arch/pmax/stand/common: start.S startprog.S Log Message: Indent instructions in BDslots. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/pmax/stand/common/start.S cvs rdiff -u -r1.7 -r1.8 src/sys/arch/pmax/stand/common/startprog.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/pmax/stand/common/start.S diff -u src/sys/arch/pmax/stand/common/start.S:1.20 src/sys/arch/pmax/stand/common/start.S:1.21 --- src/sys/arch/pmax/stand/common/start.S:1.20 Mon Apr 28 20:23:31 2008 +++ src/sys/arch/pmax/stand/common/start.S Mon Jan 10 15:25:44 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: start.S,v 1.20 2008/04/28 20:23:31 martin Exp $ */ +/* $NetBSD: start.S,v 1.21 2011/01/10 15:25:44 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -98,20 +98,20 @@ move s0, a0# save argc move s1, a1# save argv beq a2, DEC_REX_MAGIC, 1f # jump if boot from DS5000 - move s3, a3# BDslot: save call vector + move s3, a3# BDslot: save call vector la s3, _C_LABEL(callvec) # init call vector 1: la a0, _C_LABEL (edata) # clear BSS move a1, zero la a2, _C_LABEL (end) jal _C_LABEL(memset) # memset(edata, 0, end - edata) - subu a2, a2, a0 + subu a2, a2, a0 sw s3, _C_LABEL(callv) # save call vector move a0, s0# restore argc jal _C_LABEL(main) # main(argc, argv) - move a1, s1# restore argv + move a1, s1# restore argv j _C_LABEL(prom_restart) # restart... - nop + nop LEAF(prom_restart) XLEAF(_rtt) @@ -119,37 +119,37 @@ lw v0, 0x9C(v0) /* halt */ move a0, zero /* Don't print anything. */ j v0 - move a1, zero + move a1, zero END(prom_restart) LEAF(prom_open) li v0, DEC_PROM_OPEN j v0 - nop + nop END(prom_open) #ifndef LIBSA_NO_DEV_CLOSE LEAF(prom_close) li v0, DEC_PROM_CLOSE j v0 - nop + nop END(prom_close) #endif LEAF(prom_lseek) li v0, DEC_PROM_LSEEK j v0 - nop + nop END(prom_lseek) LEAF(prom_read) li v0, DEC_PROM_READ j v0 - nop + nop END(prom_read) LEAF(prom_write) li v0, DEC_PROM_WRITE j v0 - nop + nop END(prom_write) Index: src/sys/arch/pmax/stand/common/startprog.S diff -u src/sys/arch/pmax/stand/common/startprog.S:1.7 src/sys/arch/pmax/stand/common/startprog.S:1.8 --- src/sys/arch/pmax/stand/common/startprog.S:1.7 Fri Jan 7 14:50:27 2011 +++ src/sys/arch/pmax/stand/common/startprog.S Mon Jan 10 15:25:44 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: startprog.S,v 1.7 2011/01/07 14:50:27 tsutsui Exp $ */ +/* $NetBSD: startprog.S,v 1.8 2011/01/10 15:25:44 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -64,9 +64,9 @@ sw $8,16(sp) # save on stack for O32 sw $9,20(sp) # save on stack for O32 jal ra,t9 - nop# BDslot + nop# BDslot lw ra,CALLFRAME_RA(sp) # should not get back here! j ra - addu sp,sp,CALLFRAME_SIZ + addu sp,sp,CALLFRAME_SIZ END(startprog)
CVS commit: src/sys/arch/pmax/stand/common
Module Name:src Committed By: tsutsui Date: Mon Jan 10 15:25:15 UTC 2011 Modified Files: src/sys/arch/pmax/stand/common: bootinit.S bootread.S clear_cache.S getchar.S printf.S Log Message: - specify .set noreorder to fill BDslots properly - indent instructions in BDslots To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/pmax/stand/common/bootinit.S \ src/sys/arch/pmax/stand/common/bootread.S cvs rdiff -u -r1.6 -r1.7 src/sys/arch/pmax/stand/common/clear_cache.S \ src/sys/arch/pmax/stand/common/printf.S cvs rdiff -u -r1.2 -r1.3 src/sys/arch/pmax/stand/common/getchar.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/pmax/stand/common/bootinit.S diff -u src/sys/arch/pmax/stand/common/bootinit.S:1.5 src/sys/arch/pmax/stand/common/bootinit.S:1.6 --- src/sys/arch/pmax/stand/common/bootinit.S:1.5 Mon Apr 28 20:23:31 2008 +++ src/sys/arch/pmax/stand/common/bootinit.S Mon Jan 10 15:25:15 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bootinit.S,v 1.5 2008/04/28 20:23:31 martin Exp $ */ +/* $NetBSD: bootinit.S,v 1.6 2011/01/10 15:25:15 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -33,10 +33,11 @@ #include #include + .set noreorder LEAF(bootinit) lw v0, _C_LABEL(callv) # get pointer to call back vectors lw v0, 0x54(v0) # offset for callv->_bootinit nop j v0 # call PROM bootinit - nop + nop END(bootinit) Index: src/sys/arch/pmax/stand/common/bootread.S diff -u src/sys/arch/pmax/stand/common/bootread.S:1.5 src/sys/arch/pmax/stand/common/bootread.S:1.6 --- src/sys/arch/pmax/stand/common/bootread.S:1.5 Mon Apr 28 20:23:31 2008 +++ src/sys/arch/pmax/stand/common/bootread.S Mon Jan 10 15:25:15 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bootread.S,v 1.5 2008/04/28 20:23:31 martin Exp $ */ +/* $NetBSD: bootread.S,v 1.6 2011/01/10 15:25:15 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -33,10 +33,11 @@ #include #include + .set noreorder LEAF(bootread) lw v0, _C_LABEL(callv) # get pointer to call back vectors lw v0, 0x58(v0) # offset for callv->_bootread nop j v0 # call PROM bootread - nop + nop END(bootread) Index: src/sys/arch/pmax/stand/common/clear_cache.S diff -u src/sys/arch/pmax/stand/common/clear_cache.S:1.6 src/sys/arch/pmax/stand/common/clear_cache.S:1.7 --- src/sys/arch/pmax/stand/common/clear_cache.S:1.6 Mon Apr 28 20:23:31 2008 +++ src/sys/arch/pmax/stand/common/clear_cache.S Mon Jan 10 15:25:15 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: clear_cache.S,v 1.6 2008/04/28 20:23:31 martin Exp $ */ +/* $NetBSD: clear_cache.S,v 1.7 2011/01/10 15:25:15 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -33,10 +33,11 @@ #include #include + .set noreorder LEAF(clear_cache) lw v0, _C_LABEL(callv) # get pointer to call back vectors lw v0, 0x7c(v0) # offset for callv->_clear_cache nop j v0 # call PROM clear_cache - nop + nop END(clear_cache) Index: src/sys/arch/pmax/stand/common/printf.S diff -u src/sys/arch/pmax/stand/common/printf.S:1.6 src/sys/arch/pmax/stand/common/printf.S:1.7 --- src/sys/arch/pmax/stand/common/printf.S:1.6 Mon Dec 14 00:46:11 2009 +++ src/sys/arch/pmax/stand/common/printf.S Mon Jan 10 15:25:15 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: printf.S,v 1.6 2009/12/14 00:46:11 matt Exp $ */ +/* $NetBSD: printf.S,v 1.7 2011/01/10 15:25:15 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -33,6 +33,7 @@ #include #include + .set noreorder LEAF(printf) lw v0, _C_LABEL(callv) # get pointer to call back vectors lw t9, 0x30(v0) # offset for callv->_printf @@ -56,6 +57,6 @@ addu sp, sp, 48 #else j t9 # call PROM printf - nop + nop #endif END(printf) Index: src/sys/arch/pmax/stand/common/getchar.S diff -u src/sys/arch/pmax/stand/common/getchar.S:1.2 src/sys/arch/pmax/stand/common/getchar.S:1.3 --- src/sys/arch/pmax/stand/common/getchar.S:1.2 Mon Apr 28 20:23:31 2008 +++ src/sys/arch/pmax/stand/common/getchar.S Mon Jan 10 15:25:15 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: getchar.S,v 1.2 2008/04/28 20:23:31 martin Exp $ */ +/* $NetBSD: getchar.S,v 1.3 2011/01/10 15:25:15 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -33,10 +33,11 @@ #include #include + .set noreorder LEAF(getchar) lw v0, _C_LABEL(callv) # get pointer to call back vectors lw v0, 0x24(v0) # offset for callv->_getchar nop j v0 # call PROM getchar - nop + nop END(getchar)
CVS commit: src/sys/arch/pmax/stand/common
Module Name:src Committed By: tsutsui Date: Sun Jan 9 16:55:13 UTC 2011 Modified Files: src/sys/arch/pmax/stand/common: if_prom.c Log Message: Misc cleanup: - use DPRINTF() style debug printf - KNF and ANSIfy - fix space/TAB botch - remove extra newlines To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/pmax/stand/common/if_prom.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/stand/common/if_prom.c diff -u src/sys/arch/pmax/stand/common/if_prom.c:1.8 src/sys/arch/pmax/stand/common/if_prom.c:1.9 --- src/sys/arch/pmax/stand/common/if_prom.c:1.8 Sun Jan 9 16:28:40 2011 +++ src/sys/arch/pmax/stand/common/if_prom.c Sun Jan 9 16:55:13 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: if_prom.c,v 1.8 2011/01/09 16:28:40 tsutsui Exp $ */ +/* $NetBSD: if_prom.c,v 1.9 2011/01/09 16:55:13 tsutsui Exp $ */ /* Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -46,6 +46,12 @@ #include #ifdef NET_DEBUG +#define DPRINTF(x) printf(x) +#else +#define DPRINTF(x) +#endif + +#ifdef NET_DEBUG void dump_packet_info(void *, int); #endif @@ -100,10 +106,8 @@ prom_match(struct netif *nif, void *machdep_hint) { -#ifdef NET_DEBUG - printf("prom_match: called\n"); -#endif - return (1); + DPRINTF(("prom_match: called\n")); + return 1; } @@ -111,9 +115,7 @@ prom_probe(struct netif *nif, void *machdep_hint) { -#ifdef NET_DEBUG - printf("prom_probe: called\n"); -#endif + DPRINTF(("prom_probe: called\n")); return 0; } @@ -121,22 +123,19 @@ void prom_init(struct iodesc *desc, void *machdep_hint) { - char *device = - ((struct netif *)desc->io_netif)->nif_driver->netif_bname; - char *enet; + struct netif *nif; + char *device, *enet; uint8_t *cp, *dest; int i; -#ifdef NET_DEBUG - printf("prom_init: called\n"); -#endif + DPRINTF(("prom_init: called\n")); try_bootp = 1; /* * Get our hardware address (this prom call is one of the rare ones - * which is the same for new and old proms) - */ + * which is the same for new and old proms) + */ enet = (*callv->_getenv)("enet"); if (enet == NULL) { @@ -170,6 +169,8 @@ desc->xid = 0x66d3; + nif = desc->io_netif; + device = nif->nif_driver->netif_bname; if (callv == &callvec) sc_fd = prom_open(device, 0); else @@ -185,9 +186,7 @@ { int s; -#ifdef NET_DEBUG - printf("prom_put: called\n"); -#endif + DPRINTF(("prom_put: called\n")); #ifdef NET_DEBUG if (debug) @@ -201,7 +200,7 @@ (*callv->_wbflush)(); /* didn't really make a difference */ } if (s < 0) - return (EIO); + return EIO; return s; } @@ -212,9 +211,7 @@ int s; satime_t t; -#ifdef NET_DEBUG - printf("prom_get: called\n"); -#endif + DPRINTF(("prom_get: called\n")); t = getsecs(); s = 0; @@ -231,7 +228,6 @@ #endif return s; - } @@ -239,9 +235,7 @@ prom_end(struct netif *nif) { -#ifdef NET_DEBUG - printf("prom_end: called\n"); -#endif + DPRINTF(("prom_end: called\n")); if (callv == &callvec) prom_close(sc_fd); @@ -249,9 +243,8 @@ #ifdef FILL_ARPCACHE -void fill_arpcache (pkt, len) - void *pkt; - int len; +void +fill_arpcache(void *pkt, int len) { int i; struct arp_list *al; @@ -272,21 +265,19 @@ return; } } - if (arp_num > 7) - arp_num = 1;/* recycle */ + if (arp_num > 7) + arp_num = 1; /* recycle */ al->addr.s_addr = ih->ip_src.s_addr; - for (i=0; i<6; i++) + for (i = 0; i < 6; i++) al->ea[i] = eh->ether_shost[i]; ++arp_num; } - } #endif #ifdef NET_DEBUG -void dump_packet_info(pkt, len) - void *pkt; - int len; +void +dump_packet_info(void *pkt, int len) { struct ether_header *eh = (struct ether_header *)pkt; struct ip *ih = (struct ip *)(eh + 1); @@ -299,8 +290,6 @@ printf("ip packet version %d\n", ih->ip_v); printf("source ip: 0x%x\n", ih->ip_src.s_addr); printf("dest ip: 0x%x\n", ih->ip_dst.s_addr); - } - } #endif
CVS commit: src/sys/arch/pmax/stand/common
Module Name:src Committed By: tsutsui Date: Sun Jan 9 16:28:40 UTC 2011 Modified Files: src/sys/arch/pmax/stand/common: if_prom.c Log Message: Check if `enet' environment variable is available before reference to get MAC address, and exit with appropriate warning messages if it isn't. My 3MIN doesn't set the variable by default and netboot fails silently. Also tidy up code that converts strings to enaddr. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/pmax/stand/common/if_prom.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/stand/common/if_prom.c diff -u src/sys/arch/pmax/stand/common/if_prom.c:1.7 src/sys/arch/pmax/stand/common/if_prom.c:1.8 --- src/sys/arch/pmax/stand/common/if_prom.c:1.7 Sat Mar 14 15:36:12 2009 +++ src/sys/arch/pmax/stand/common/if_prom.c Sun Jan 9 16:28:40 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: if_prom.c,v 1.7 2009/03/14 15:36:12 dsl Exp $ */ +/* $NetBSD: if_prom.c,v 1.8 2011/01/09 16:28:40 tsutsui Exp $ */ /* Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. @@ -123,8 +123,9 @@ { char *device = ((struct netif *)desc->io_netif)->nif_driver->netif_bname; - char *c, *enet; - int i, j, num; + char *enet; + uint8_t *cp, *dest; + int i; #ifdef NET_DEBUG printf("prom_init: called\n"); @@ -138,23 +139,33 @@ */ enet = (*callv->_getenv)("enet"); + if (enet == NULL) { + printf("No `enet' environment variable found.\n" + "Set MAC address to `enet' manually by setenv command.\n"); + (*callv->_halt)((int *)0, 0); /* XXX */ + /* NOTREACHED */ + } + #ifdef NET_DEBUG if (debug) printf("enet=%s\n", enet); #endif - i=0; - c = enet; - for (i=0; i<6; i++) { - j = *c - '0'; - num = (j<10?j:j-39); - num <<= 4; - c++; - j = *c - '0'; - num += (j<10?j:j-39); - desc->myea[i] = num; - c++; - c++; /* skip '-' */ +#define atox(c) (((c) < '9') ? ((c) - '0') : ((toupper(c) - 'A') + 10)) + + cp = (uint8_t *)enet; + dest = desc->myea; + for (i = 0; i < 6; i++) { + if (isxdigit(*cp)) { + *dest = atox(*cp); + cp++; + if (isxdigit(*cp)) { +*dest = (*dest << 4) | atox(*cp); +cp++; + } + } + dest++; + cp++; /* skip '-' or ':' etc. */ } desc->xid = 0x66d3;
CVS commit: src/sys/arch/pmax/stand/common
Module Name:src Committed By: tsutsui Date: Fri Jan 7 14:50:27 UTC 2011 Modified Files: src/sys/arch/pmax/stand/common: startprog.S Log Message: Put .set noreorder so that BDslots are properly filled. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/pmax/stand/common/startprog.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/pmax/stand/common/startprog.S diff -u src/sys/arch/pmax/stand/common/startprog.S:1.6 src/sys/arch/pmax/stand/common/startprog.S:1.7 --- src/sys/arch/pmax/stand/common/startprog.S:1.6 Thu Nov 25 14:05:27 2010 +++ src/sys/arch/pmax/stand/common/startprog.S Fri Jan 7 14:50:27 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: startprog.S,v 1.6 2010/11/25 14:05:27 tsutsui Exp $ */ +/* $NetBSD: startprog.S,v 1.7 2011/01/07 14:50:27 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -38,6 +38,7 @@ #include + .set noreorder LEAF(startprog) subusp,sp,CALLFRAME_SIZ addu t2,a1,-CALLFRAME_SIZ # new stack value
CVS commit: src/sys/arch/pmax/stand/common
Module Name:src Committed By: tsutsui Date: Thu Nov 25 14:05:28 UTC 2010 Modified Files: src/sys/arch/pmax/stand/common: startprog.S Log Message: Fix botch on mips64 merge: - use correct offsets to pass args to loaded kernel in __mips_o32 case Now NetBSD/pmax kernel properly boots, but init(8) still doesn't start on GXemul emulating R3000 3MAX. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/pmax/stand/common/startprog.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/pmax/stand/common/startprog.S diff -u src/sys/arch/pmax/stand/common/startprog.S:1.5 src/sys/arch/pmax/stand/common/startprog.S:1.6 --- src/sys/arch/pmax/stand/common/startprog.S:1.5 Mon Dec 14 00:46:11 2009 +++ src/sys/arch/pmax/stand/common/startprog.S Thu Nov 25 14:05:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: startprog.S,v 1.5 2009/12/14 00:46:11 matt Exp $ */ +/* $NetBSD: startprog.S,v 1.6 2010/11/25 14:05:27 tsutsui Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -46,10 +46,10 @@ move a1,a3 #ifdef __mips_o32 - lw a2,48(sp) # load everything from old stack we need - lw a3,52(sp) - lw $8,56(sp) # use a4/t0 in case N32/N64 kernel - lw $9,60(sp) # use a5/t1 in case N32/N64 kernel + lw a2,CALLFRAME_SIZ+16(sp) # load everything from old stack we need + lw a3,CALLFRAME_SIZ+20(sp) + lw $8,CALLFRAME_SIZ+24(sp) # use a4/t0 in case N32/N64 kernel + lw $9,CALLFRAME_SIZ+28(sp) # use a5/t1 in case N32/N64 kernel #else move a2,a4 move a3,a5
CVS commit: src/sys/arch/pmax/ibus
Module Name:src Committed By: tsutsui Date: Sat May 15 20:31:10 UTC 2010 Modified Files: src/sys/arch/pmax/ibus: pm.c Log Message: Set RI_NO_AUTO in ri_flg if init function is invoked from cnattach. Untested. (3100 support seems somewhat broken, per gxemul output) To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/pmax/ibus/pm.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/ibus/pm.c diff -u src/sys/arch/pmax/ibus/pm.c:1.7 src/sys/arch/pmax/ibus/pm.c:1.8 --- src/sys/arch/pmax/ibus/pm.c:1.7 Mon May 26 10:31:22 2008 +++ src/sys/arch/pmax/ibus/pm.c Sat May 15 20:31:10 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: pm.c,v 1.7 2008/05/26 10:31:22 nisimura Exp $ */ +/* $NetBSD: pm.c,v 1.8 2010/05/15 20:31:10 tsutsui Exp $ */ /*- * Copyright (c) 2002, 2003 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pm.c,v 1.7 2008/05/26 10:31:22 nisimura Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pm.c,v 1.8 2010/05/15 20:31:10 tsutsui Exp $"); #include #include @@ -171,9 +171,10 @@ ri = &pm_ri; console = (ri->ri_bits != NULL); - if (console) + if (console) { sc->sc_nscreens = 1; - else + ri->ri_flg &= ~RI_NO_AUTO; + } else pm_common_init(); printf(": %dx%d, %dbpp\n", ri->ri_width, ri->ri_height, ri->ri_depth); @@ -243,6 +244,8 @@ ri = &pm_ri; ri->ri_flg = RI_CENTER; + if (ri->ri_bits == NULL) + ri->ri_flg |= RI_NO_AUTO; ri->ri_depth = ((kn01csr & KN01_CSR_MONO) != 0 ? 1 : 8); ri->ri_width = 1024; ri->ri_height = 864;
CVS commit: src/sys/arch/pmax/include
Module Name:src Committed By: he Date: Sat Aug 22 23:08:01 UTC 2009 Modified Files: src/sys/arch/pmax/include: loadfile_machdep.h Log Message: Remove BOOT_AOUT, since our mips ports no longer deal with a.out. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/pmax/include/loadfile_machdep.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/pmax/include/loadfile_machdep.h diff -u src/sys/arch/pmax/include/loadfile_machdep.h:1.6 src/sys/arch/pmax/include/loadfile_machdep.h:1.7 --- src/sys/arch/pmax/include/loadfile_machdep.h:1.6 Mon Apr 28 20:23:31 2008 +++ src/sys/arch/pmax/include/loadfile_machdep.h Sat Aug 22 23:08:01 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: loadfile_machdep.h,v 1.6 2008/04/28 20:23:31 martin Exp $ */ +/* $NetBSD: loadfile_machdep.h,v 1.7 2009/08/22 23:08:01 he Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -32,7 +32,6 @@ #ifndef _PMAX_LOADFILE_MACHDEP_H_ #define _PMAX_LOADFILE_MACHDEP_H_ -#define BOOT_AOUT #define BOOT_ECOFF #define BOOT_ELF32
CVS commit: src/sys/arch/pmax
Module Name:src Committed By: thorpej Date: Fri Aug 21 04:05:20 UTC 2009 Modified Files: src/sys/arch/pmax/conf: files.pmax src/sys/arch/pmax/pmax: bus_dma.c Log Message: Use bus_dmamem_common. To generate a diff of this commit: cvs rdiff -u -r1.111 -r1.112 src/sys/arch/pmax/conf/files.pmax cvs rdiff -u -r1.52 -r1.53 src/sys/arch/pmax/pmax/bus_dma.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/conf/files.pmax diff -u src/sys/arch/pmax/conf/files.pmax:1.111 src/sys/arch/pmax/conf/files.pmax:1.112 --- src/sys/arch/pmax/conf/files.pmax:1.111 Wed Feb 20 21:43:35 2008 +++ src/sys/arch/pmax/conf/files.pmax Fri Aug 21 04:05:20 2009 @@ -1,4 +1,4 @@ -# $NetBSD: files.pmax,v 1.111 2008/02/20 21:43:35 drochner Exp $ +# $NetBSD: files.pmax,v 1.112 2009/08/21 04:05:20 thorpej Exp $ # DECstation-specific configuration info # maxpartitions must be first item in files.${ARCH}. @@ -122,6 +122,8 @@ file arch/pmax/stand/common/callvec.c file dev/cons.c +file common/bus_dma/bus_dmamem_common.c + file arch/mips/mips/softintr.c # Index: src/sys/arch/pmax/pmax/bus_dma.c diff -u src/sys/arch/pmax/pmax/bus_dma.c:1.52 src/sys/arch/pmax/pmax/bus_dma.c:1.53 --- src/sys/arch/pmax/pmax/bus_dma.c:1.52 Mon Jul 20 17:05:13 2009 +++ src/sys/arch/pmax/pmax/bus_dma.c Fri Aug 21 04:05:20 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.52 2009/07/20 17:05:13 tsutsui Exp $ */ +/* $NetBSD: bus_dma.c,v 1.53 2009/08/21 04:05:20 thorpej Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.52 2009/07/20 17:05:13 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.53 2009/08/21 04:05:20 thorpej Exp $"); #include "opt_cputype.h" @@ -45,6 +45,8 @@ #define _PMAX_BUS_DMA_PRIVATE #include +#include + #include static int _bus_dmamap_load_buffer(bus_dmamap_t, @@ -655,57 +657,11 @@ int flags) { extern paddr_t avail_start, avail_end; /* XXX */ - vaddr_t curaddr, lastaddr; - psize_t high; - struct vm_page *m; - struct pglist mlist; - int curseg, error; - - /* Always round the size. */ - size = round_page(size); - - high = avail_end - PAGE_SIZE; - - /* - * Allocate pages from the VM system. - */ - error = uvm_pglistalloc(size, avail_start, high, alignment, boundary, - &mlist, nsegs, (flags & BUS_DMA_NOWAIT) == 0); - if (error) - return (error); - - /* - * Compute the location, size, and number of segments actually - * returned by the VM code. - */ - m = mlist.tqh_first; - curseg = 0; - lastaddr = segs[curseg].ds_addr = VM_PAGE_TO_PHYS(m); - segs[curseg].ds_len = PAGE_SIZE; - m = m->pageq.queue.tqe_next; - - for (; m != NULL; m = m->pageq.queue.tqe_next) { - curaddr = VM_PAGE_TO_PHYS(m); -#ifdef DIAGNOSTIC - if (curaddr < avail_start || curaddr >= high) { - printf("uvm_pglistalloc returned non-sensical" - " address 0x%lx\n", curaddr); - panic("_bus_dmamem_alloc"); - } -#endif - if (curaddr == (lastaddr + PAGE_SIZE)) - segs[curseg].ds_len += PAGE_SIZE; - else { - curseg++; - segs[curseg].ds_addr = curaddr; - segs[curseg].ds_len = PAGE_SIZE; - } - lastaddr = curaddr; - } - - *rsegs = curseg + 1; - return 0; + return (_bus_dmamem_alloc_range_common(t, size, alignment, boundary, + segs, nsegs, rsegs, flags, + avail_start /*low*/, + avail_end - PAGE_SIZE /*high*/)); } /* @@ -715,25 +671,8 @@ void _bus_dmamem_free(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs) { - struct vm_page *m; - bus_addr_t addr; - struct pglist mlist; - int curseg; - - /* - * Build a list of pages to free back to the VM system. - */ - TAILQ_INIT(&mlist); - for (curseg = 0; curseg < nsegs; curseg++) { - for (addr = segs[curseg].ds_addr; - addr < (segs[curseg].ds_addr + segs[curseg].ds_len); - addr += PAGE_SIZE) { - m = PHYS_TO_VM_PAGE(addr); - TAILQ_INSERT_TAIL(&mlist, m, pageq.queue); - } - } - uvm_pglistfree(&mlist); + _bus_dmamem_free_common(t, segs, nsegs); } /* @@ -744,11 +683,6 @@ _bus_dmamem_map(bus_dma_tag_t t, bus_dma_segment_t *segs, int nsegs, size_t size, void **kvap, int flags) { - vaddr_t va; - bus_addr_t addr; - int curseg; - const uvm_flag_t kmflags = - (flags & BUS_DMA_NOWAIT) != 0 ? UVM_KMF_NOWAIT : 0; /* * If we're only mapping 1 segment, use KSEG0 or KSEG1, to avoid @@ -762,31 +696,7 @@ return 0; } - size = round_page(size); - - va = uvm_km_alloc(kernel_map, size, 0, UVM_KMF_VAONLY | kmflags); - - if (va == 0) - return ENOMEM; - - *kvap = (void *)va; - - for (curseg = 0; curseg < nsegs; curseg++) { - for (addr = segs[curseg].ds_addr; - addr < (segs[curseg].ds_addr + segs[curseg].ds_len); - addr += PAGE_SIZE, va += PAGE_SIZE, size -= PAGE_SIZE) { - if (size == 0) -panic("_bus_dmamem_map: size botch"); - pmap_enter(pmap_kernel(), va, addr, -
CVS commit: src/sys/arch/pmax/tc
Module Name:src Committed By: tsutsui Date: Wed Aug 12 14:06:13 UTC 2009 Modified Files: src/sys/arch/pmax/tc: asc_ioasic.c Log Message: Fix a botch in the previous rev 1.21: We have to mask higher bits on NCR register access via bus_space_read_4(9), as the previous NCR_READ_REG() does. Problem reported by Erik Bertelsen on port-p...@. I tested a different version on 3MIN and I also tested committed version on gxemul, but 3MAX doesn't have asc_ioasic but asc_tc.. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 src/sys/arch/pmax/tc/asc_ioasic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/tc/asc_ioasic.c diff -u src/sys/arch/pmax/tc/asc_ioasic.c:1.21 src/sys/arch/pmax/tc/asc_ioasic.c:1.22 --- src/sys/arch/pmax/tc/asc_ioasic.c:1.21 Sat Aug 1 08:20:36 2009 +++ src/sys/arch/pmax/tc/asc_ioasic.c Wed Aug 12 14:06:13 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: asc_ioasic.c,v 1.21 2009/08/01 08:20:36 tsutsui Exp $ */ +/* $NetBSD: asc_ioasic.c,v 1.22 2009/08/12 14:06:13 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: asc_ioasic.c,v 1.21 2009/08/01 08:20:36 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: asc_ioasic.c,v 1.22 2009/08/12 14:06:13 tsutsui Exp $"); #include #include @@ -71,11 +71,11 @@ }; #define ASC_READ_REG(asc, reg) \ - bus_space_read_4((asc)->sc_bst, (asc)->sc_scsi_bsh, \ - (reg) * sizeof(uint32_t)) + ((uint8_t)bus_space_read_4((asc)->sc_bst, (asc)->sc_scsi_bsh, \ + (reg) * sizeof(uint32_t))) #define ASC_WRITE_REG(asc, reg, val) \ bus_space_write_4((asc)->sc_bst, (asc)->sc_scsi_bsh, \ - (reg) * sizeof(uint32_t), (val)) + (reg) * sizeof(uint32_t), (uint8_t)(val)) static int asc_ioasic_match(device_t, cfdata_t, void *); static void asc_ioasic_attach(device_t, device_t, void *); @@ -421,11 +421,8 @@ asc_read_reg(struct ncr53c9x_softc *sc, int reg) { struct asc_softc *asc = (struct asc_softc *)sc; - uint32_t v; - v = ASC_READ_REG(asc, reg); - - return v & 0xff; + return ASC_READ_REG(asc, reg); } static void
CVS commit: src/sys/arch/pmax/tc
Module Name:src Committed By: tsutsui Date: Sat Aug 1 08:20:36 UTC 2009 Modified Files: src/sys/arch/pmax/tc: asc_ioasic.c Log Message: Micro optimization around ncr53c9x register accesses. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/sys/arch/pmax/tc/asc_ioasic.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/tc/asc_ioasic.c diff -u src/sys/arch/pmax/tc/asc_ioasic.c:1.20 src/sys/arch/pmax/tc/asc_ioasic.c:1.21 --- src/sys/arch/pmax/tc/asc_ioasic.c:1.20 Mon Apr 28 20:23:31 2008 +++ src/sys/arch/pmax/tc/asc_ioasic.c Sat Aug 1 08:20:36 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: asc_ioasic.c,v 1.20 2008/04/28 20:23:31 martin Exp $ */ +/* $NetBSD: asc_ioasic.c,v 1.21 2009/08/01 08:20:36 tsutsui Exp $ */ /*- * Copyright (c) 2000 The NetBSD Foundation, Inc. @@ -30,7 +30,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: asc_ioasic.c,v 1.20 2008/04/28 20:23:31 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: asc_ioasic.c,v 1.21 2009/08/01 08:20:36 tsutsui Exp $"); #include #include @@ -70,6 +70,13 @@ #define ASC_MAPLOADED 0x0004 }; +#define ASC_READ_REG(asc, reg) \ + bus_space_read_4((asc)->sc_bst, (asc)->sc_scsi_bsh, \ + (reg) * sizeof(uint32_t)) +#define ASC_WRITE_REG(asc, reg, val) \ + bus_space_write_4((asc)->sc_bst, (asc)->sc_scsi_bsh, \ + (reg) * sizeof(uint32_t), (val)) + static int asc_ioasic_match(device_t, cfdata_t, void *); static void asc_ioasic_attach(device_t, device_t, void *); @@ -333,8 +340,8 @@ if (asc->sc_dmasize == 0) { /* A "Transfer Pad" operation completed */ - tcl = NCR_READ_REG(sc, NCR_TCL); - tcm = NCR_READ_REG(sc, NCR_TCM); + tcl = ASC_READ_REG(asc, NCR_TCL); + tcm = ASC_READ_REG(asc, NCR_TCM); NCR_DMA(("ioasic_intr: discarded %d bytes (tcl=%d, tcm=%d)\n", tcl | (tcm << 8), tcl, tcm)); return 0; @@ -342,13 +349,13 @@ resid = 0; if ((asc->sc_flags & ASC_ISPULLUP) == 0 && - (resid = (NCR_READ_REG(sc, NCR_FFLAG) & NCRFIFO_FF)) != 0) { + (resid = (ASC_READ_REG(asc, NCR_FFLAG) & NCRFIFO_FF)) != 0) { NCR_DMA(("ioasic_intr: empty FIFO of %d ", resid)); DELAY(1); } - resid += (tcl = NCR_READ_REG(sc, NCR_TCL)); - resid += (tcm = NCR_READ_REG(sc, NCR_TCM)) << 8; + resid += (tcl = ASC_READ_REG(asc, NCR_TCL)); + resid += (tcm = ASC_READ_REG(asc, NCR_TCM)) << 8; trans = asc->sc_dmasize - resid; if (trans < 0) { /* transferred < 0 ? */ @@ -416,8 +423,7 @@ struct asc_softc *asc = (struct asc_softc *)sc; uint32_t v; - v = bus_space_read_4(asc->sc_bst, asc->sc_scsi_bsh, - reg * sizeof(uint32_t)); + v = ASC_READ_REG(asc, reg); return v & 0xff; } @@ -427,15 +433,15 @@ { struct asc_softc *asc = (struct asc_softc *)sc; - bus_space_write_4(asc->sc_bst, asc->sc_scsi_bsh, - reg * sizeof(uint32_t), val); + ASC_WRITE_REG(asc, reg, val); } static int asc_dma_isintr(struct ncr53c9x_softc *sc) { + struct asc_softc *asc = (struct asc_softc *)sc; - return (NCR_READ_REG(sc, NCR_STAT) & NCRSTAT_INT) != 0; + return (ASC_READ_REG(asc, NCR_STAT) & NCRSTAT_INT) != 0; } static int
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: tsutsui Date: Tue Jul 21 15:10:39 UTC 2009 Modified Files: src/sys/arch/pmax/pmax: machdep.c Log Message: No need to clear BSS in kernel itself if there is valid bootinfo, i.e. it's loaded by our native bootloader. To generate a diff of this commit: cvs rdiff -u -r1.233 -r1.234 src/sys/arch/pmax/pmax/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/machdep.c diff -u src/sys/arch/pmax/pmax/machdep.c:1.233 src/sys/arch/pmax/pmax/machdep.c:1.234 --- src/sys/arch/pmax/pmax/machdep.c:1.233 Tue Jul 21 14:26:48 2009 +++ src/sys/arch/pmax/pmax/machdep.c Tue Jul 21 15:10:39 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.233 2009/07/21 14:26:48 tsutsui Exp $ */ +/* $NetBSD: machdep.c,v 1.234 2009/07/21 15:10:39 tsutsui Exp $ */ /* * Copyright (c) 1992, 1993 @@ -77,7 +77,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.233 2009/07/21 14:26:48 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.234 2009/07/21 15:10:39 tsutsui Exp $"); #include "fs_mfs.h" #include "opt_ddb.h" @@ -230,7 +230,9 @@ ssym = (void *)bi_syms->ssym; esym = (void *)bi_syms->esym; kernend = (void *)mips_round_page(esym); +#if 0 /* our bootloader clears BSS properly */ memset(edata, 0, end - edata); +#endif } else #ifdef EXEC_AOUT /* XXX: Backwards compatibility with old bootblocks - this should
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: tsutsui Date: Tue Jul 21 14:26:48 UTC 2009 Modified Files: src/sys/arch/pmax/pmax: machdep.c Log Message: Fix an #ifdef botch in rev 1.214 that causes [ Kernel symbol table invalid! ] message at boot, which means no ksyms(4) support even on GENERIC kernel. Should be pulled up to netbsd-4 and netbsd-5. To generate a diff of this commit: cvs rdiff -u -r1.232 -r1.233 src/sys/arch/pmax/pmax/machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/machdep.c diff -u src/sys/arch/pmax/pmax/machdep.c:1.232 src/sys/arch/pmax/pmax/machdep.c:1.233 --- src/sys/arch/pmax/pmax/machdep.c:1.232 Wed Mar 18 10:22:33 2009 +++ src/sys/arch/pmax/pmax/machdep.c Tue Jul 21 14:26:48 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.232 2009/03/18 10:22:33 cegger Exp $ */ +/* $NetBSD: machdep.c,v 1.233 2009/07/21 14:26:48 tsutsui Exp $ */ /* * Copyright (c) 1992, 1993 @@ -77,7 +77,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.232 2009/03/18 10:22:33 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.233 2009/07/21 14:26:48 tsutsui Exp $"); #include "fs_mfs.h" #include "opt_ddb.h" @@ -231,13 +231,13 @@ esym = (void *)bi_syms->esym; kernend = (void *)mips_round_page(esym); memset(edata, 0, end - edata); - } + } else +#ifdef EXEC_AOUT /* XXX: Backwards compatibility with old bootblocks - this should * go soon... */ -#ifdef EXEC_AOUT /* Exec header and symbols? */ - else if (aout->a_midmag == 0x07018b00 && (i = aout->a_syms) != 0) { + if (aout->a_midmag == 0x07018b00 && (i = aout->a_syms) != 0) { ssym = end; i += (*(long *)(end + i + 4) + 3) & ~3; /* strings */ esym = end + i + 4;
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: tsutsui Date: Mon Jul 20 17:22:29 UTC 2009 Modified Files: src/sys/arch/pmax/pmax: cpu.c Log Message: - use CFATTACH_DECL_NEW() - include "ioconf.h" for declaration of struct cfdriver. To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/pmax/pmax/cpu.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/cpu.c diff -u src/sys/arch/pmax/pmax/cpu.c:1.28 src/sys/arch/pmax/pmax/cpu.c:1.29 --- src/sys/arch/pmax/pmax/cpu.c:1.28 Mon Jul 20 17:05:13 2009 +++ src/sys/arch/pmax/pmax/cpu.c Mon Jul 20 17:22:28 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.28 2009/07/20 17:05:13 tsutsui Exp $ */ +/* $NetBSD: cpu.c,v 1.29 2009/07/20 17:22:28 tsutsui Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.28 2009/07/20 17:05:13 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.29 2009/07/20 17:22:28 tsutsui Exp $"); #include #include @@ -38,15 +38,16 @@ #include -static int cpumatch(struct device *, struct cfdata *, void *); -static void cpuattach(struct device *, struct device *, void *); +#include "ioconf.h" -CFATTACH_DECL(cpu, sizeof (struct device), +static int cpumatch(device_t, cfdata_t, void *); +static void cpuattach(device_t, device_t, void *); + +CFATTACH_DECL_NEW(cpu, 0, cpumatch, cpuattach, NULL, NULL); -extern struct cfdriver cpu_cd; static int -cpumatch(struct device *parent, struct cfdata *cf, void *aux) +cpumatch(device_t parent, cfdata_t cf, void *aux) { struct mainbus_attach_args *ma = aux; @@ -58,9 +59,9 @@ } static void -cpuattach(struct device *parent, struct device *dev, void *aux) +cpuattach(device_t parent, device_t self, void *aux) { - printf(": "); + aprint_normal(": "); cpu_identify(); }
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: tsutsui Date: Mon Jul 20 17:21:31 UTC 2009 Modified Files: src/sys/arch/pmax/pmax: mainbus.c Log Message: Use CFATTACH_DECL_NEW(). (no softc) To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/arch/pmax/pmax/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/pmax/pmax/mainbus.c diff -u src/sys/arch/pmax/pmax/mainbus.c:1.39 src/sys/arch/pmax/pmax/mainbus.c:1.40 --- src/sys/arch/pmax/pmax/mainbus.c:1.39 Mon Jul 20 17:05:13 2009 +++ src/sys/arch/pmax/pmax/mainbus.c Mon Jul 20 17:21:31 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: mainbus.c,v 1.39 2009/07/20 17:05:13 tsutsui Exp $ */ +/* $NetBSD: mainbus.c,v 1.40 2009/07/20 17:21:31 tsutsui Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.39 2009/07/20 17:05:13 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mainbus.c,v 1.40 2009/07/20 17:21:31 tsutsui Exp $"); #include #include @@ -39,17 +39,17 @@ #include /* Definition of the mainbus driver. */ -static int mbmatch(struct device *, struct cfdata *, void *); -static void mbattach(struct device *, struct device *, void *); +static int mbmatch(device_t, cfdata_t, void *); +static void mbattach(device_t, device_t, void *); static int mbprint(void *, const char *); -CFATTACH_DECL(mainbus, sizeof(struct device), +CFATTACH_DECL_NEW(mainbus, 0, mbmatch, mbattach, NULL, NULL); static int mainbus_found; static int -mbmatch(struct device *parent, struct cfdata *cf, void *aux) +mbmatch(device_t parent, cfdata_t cf, void *aux) { if (mainbus_found) @@ -61,13 +61,13 @@ int ncpus = 0; /* only support uniprocessors, for now */ static void -mbattach(struct device *parent, struct device *self, void *aux) +mbattach(device_t parent, device_t self, void *aux) { struct mainbus_attach_args ma; mainbus_found = 1; - printf("\n"); + aprint_normal("\n"); /* * if we ever support multi-processor DECsystem (5800 family),
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: tsutsui Date: Mon Jul 20 17:05:13 UTC 2009 Modified Files: src/sys/arch/pmax/pmax: autoconf.c bus_dma.c bus_space.c cpu.c dec_3100.c dec_3max.c dec_3maxplus.c dec_3min.c dec_5100.c dec_maxine.c disksubr.c mainbus.c memc.h memc_3max.c memc_3min.c promcall.c Log Message: KNF, ANSIfy, and misc cosmetics. To generate a diff of this commit: cvs rdiff -u -r1.73 -r1.74 src/sys/arch/pmax/pmax/autoconf.c cvs rdiff -u -r1.51 -r1.52 src/sys/arch/pmax/pmax/bus_dma.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/pmax/pmax/bus_space.c cvs rdiff -u -r1.27 -r1.28 src/sys/arch/pmax/pmax/cpu.c cvs rdiff -u -r1.48 -r1.49 src/sys/arch/pmax/pmax/dec_3100.c cvs rdiff -u -r1.49 -r1.50 src/sys/arch/pmax/pmax/dec_3max.c cvs rdiff -u -r1.62 -r1.63 src/sys/arch/pmax/pmax/dec_3maxplus.c cvs rdiff -u -r1.64 -r1.65 src/sys/arch/pmax/pmax/dec_3min.c cvs rdiff -u -r1.43 -r1.44 src/sys/arch/pmax/pmax/dec_5100.c cvs rdiff -u -r1.57 -r1.58 src/sys/arch/pmax/pmax/dec_maxine.c cvs rdiff -u -r1.52 -r1.53 src/sys/arch/pmax/pmax/disksubr.c cvs rdiff -u -r1.38 -r1.39 src/sys/arch/pmax/pmax/mainbus.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/pmax/pmax/memc.h cvs rdiff -u -r1.14 -r1.15 src/sys/arch/pmax/pmax/memc_3max.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/pmax/pmax/memc_3min.c cvs rdiff -u -r1.16 -r1.17 src/sys/arch/pmax/pmax/promcall.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/autoconf.c diff -u src/sys/arch/pmax/pmax/autoconf.c:1.73 src/sys/arch/pmax/pmax/autoconf.c:1.74 --- src/sys/arch/pmax/pmax/autoconf.c:1.73 Wed Mar 18 10:22:33 2009 +++ src/sys/arch/pmax/pmax/autoconf.c Mon Jul 20 17:05:13 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.73 2009/03/18 10:22:33 cegger Exp $ */ +/* $NetBSD: autoconf.c,v 1.74 2009/07/20 17:05:13 tsutsui Exp $ */ /* * Copyright (c) 1992, 1993 @@ -77,7 +77,7 @@ */ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.73 2009/03/18 10:22:33 cegger Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.74 2009/07/20 17:05:13 tsutsui Exp $"); #include #include @@ -111,6 +111,7 @@ void cpu_configure(void) { + /* Kick off autoconfiguration. */ (void)splhigh(); @@ -185,6 +186,7 @@ void cpu_rootconf(void) { + printf("boot device: %s\n", booted_device ? booted_device->dv_xname : ""); Index: src/sys/arch/pmax/pmax/bus_dma.c diff -u src/sys/arch/pmax/pmax/bus_dma.c:1.51 src/sys/arch/pmax/pmax/bus_dma.c:1.52 --- src/sys/arch/pmax/pmax/bus_dma.c:1.51 Sat Mar 14 21:04:14 2009 +++ src/sys/arch/pmax/pmax/bus_dma.c Mon Jul 20 17:05:13 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.51 2009/03/14 21:04:14 dsl Exp $ */ +/* $NetBSD: bus_dma.c,v 1.52 2009/07/20 17:05:13 tsutsui Exp $ */ /*- * Copyright (c) 1997, 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.51 2009/03/14 21:04:14 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.52 2009/07/20 17:05:13 tsutsui Exp $"); #include "opt_cputype.h" @@ -90,7 +90,8 @@ * DMA map creation functions. */ int -_bus_dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments, bus_size_t maxsegsz, bus_size_t boundary, int flags, bus_dmamap_t *dmamp) +_bus_dmamap_create(bus_dma_tag_t t, bus_size_t size, int nsegments, +bus_size_t maxsegsz, bus_size_t boundary, int flags, bus_dmamap_t *dmamp) { struct pmax_bus_dmamap *map; void *mapstore; @@ -127,7 +128,7 @@ map->dm_nsegs = 0; *dmamp = map; - return (0); + return 0; } /* @@ -148,16 +149,8 @@ * first indicates if this is the first invocation of this function. */ static int -_bus_dmamap_load_buffer(map, buf, buflen, vm, flags, -lastaddrp, segp, first) - bus_dmamap_t map; - void *buf; - bus_size_t buflen; - struct vmspace *vm; - int flags; - vaddr_t *lastaddrp; - int *segp; - int first; +_bus_dmamap_load_buffer(bus_dmamap_t map, void *buf, bus_size_t buflen, +struct vmspace *vm, int flags, vaddr_t *lastaddrp, int *segp, int first) { bus_size_t sgsize; bus_addr_t curaddr, lastaddr, baddr, bmask; @@ -231,9 +224,9 @@ * Did we fit? */ if (buflen != 0) - return (EFBIG); /* XXX better return value here? */ + return EFBIG; /* XXX better return value here? */ - return (0); + return 0; } /* @@ -241,7 +234,8 @@ * buffer. */ int -_bus_dmamap_load(bus_dma_tag_t t, bus_dmamap_t map, void *buf, bus_size_t buflen, struct proc *p, int flags) +_bus_dmamap_load(bus_dma_tag_t t, bus_dmamap_t map, void *buf, +bus_size_t buflen, struct proc *p, int flags) { vaddr_t lastaddr; int seg, error; @@ -255,7 +249,7 @@ KASSERT(map->dm_maxsegsz <= map->_dm_maxmaxsegsz); if (buflen > map->_dm_size) - return (EINVAL); + return EINVAL; if (p != NULL) { vm = p->p_vmspace; @@ -281,14 +275,15 @@ buf < (void *)MIPS_KSEG2_START) map->_
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: tsutsui Date: Mon Jul 20 16:45:50 UTC 2009 Modified Files: src/sys/arch/pmax/pmax: memc_3min.c Log Message: Sprinkle keyword volatile around device register accesses. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/pmax/pmax/memc_3min.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/memc_3min.c diff -u src/sys/arch/pmax/pmax/memc_3min.c:1.10 src/sys/arch/pmax/pmax/memc_3min.c:1.11 --- src/sys/arch/pmax/pmax/memc_3min.c:1.10 Sun Dec 11 12:18:39 2005 +++ src/sys/arch/pmax/pmax/memc_3min.c Mon Jul 20 16:45:50 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: memc_3min.c,v 1.10 2005/12/11 12:18:39 christos Exp $ */ +/* $NetBSD: memc_3min.c,v 1.11 2009/07/20 16:45:50 tsutsui Exp $ */ /* * Copyright (c) 1992, 1993 @@ -79,7 +79,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: memc_3min.c,v 1.10 2005/12/11 12:18:39 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: memc_3min.c,v 1.11 2009/07/20 16:45:50 tsutsui Exp $"); /* * Motherboard memory error contoller used in both @@ -105,12 +105,12 @@ int mer, adr, siz, err; static int errintr_cnt = 0; - siz = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_MSR); - mer = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_MER); - adr = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_AER); + siz = *(volatile u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_MSR); + mer = *(volatile u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_MER); + adr = *(volatile u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_AER); /* clear interrupt bit */ - *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_TIMEOUT) = 0; + *(volatile u_int32_t *)MIPS_PHYS_TO_KSEG1(KMIN_REG_TIMEOUT) = 0; err = 0; /* XXX gcc */ switch (mer & KMIN_MER_LASTBYTE) {
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: tsutsui Date: Mon Jul 20 16:25:23 UTC 2009 Modified Files: src/sys/arch/pmax/pmax: dec_3100.c dec_3max.c dec_3maxplus.c dec_3min.c dec_maxine.c Log Message: Sprinkle keyword volatile around device register accesses. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/arch/pmax/pmax/dec_3100.c cvs rdiff -u -r1.48 -r1.49 src/sys/arch/pmax/pmax/dec_3max.c cvs rdiff -u -r1.61 -r1.62 src/sys/arch/pmax/pmax/dec_3maxplus.c cvs rdiff -u -r1.63 -r1.64 src/sys/arch/pmax/pmax/dec_3min.c cvs rdiff -u -r1.56 -r1.57 src/sys/arch/pmax/pmax/dec_maxine.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/pmax/dec_3100.c diff -u src/sys/arch/pmax/pmax/dec_3100.c:1.47 src/sys/arch/pmax/pmax/dec_3100.c:1.48 --- src/sys/arch/pmax/pmax/dec_3100.c:1.47 Mon Mar 16 23:11:14 2009 +++ src/sys/arch/pmax/pmax/dec_3100.c Mon Jul 20 16:25:22 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3100.c,v 1.47 2009/03/16 23:11:14 dsl Exp $ */ +/* $NetBSD: dec_3100.c,v 1.48 2009/07/20 16:25:22 tsutsui Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -105,7 +105,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: dec_3100.c,v 1.47 2009/03/16 23:11:14 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3100.c,v 1.48 2009/07/20 16:25:22 tsutsui Exp $"); #include #include @@ -274,11 +274,11 @@ { u_int16_t csr; - csr = *(u_int16_t *)MIPS_PHYS_TO_KSEG1(KN01_SYS_CSR); + csr = *(volatile u_int16_t *)MIPS_PHYS_TO_KSEG1(KN01_SYS_CSR); if (csr & KN01_CSR_MERR) { printf("Memory error at 0x%x\n", - *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN01_SYS_ERRADR)); + *(volatile u_int32_t *)MIPS_PHYS_TO_KSEG1(KN01_SYS_ERRADR)); panic("Mem error interrupt"); } csr = (csr & ~KN01_CSR_MBZ) | 0xff; Index: src/sys/arch/pmax/pmax/dec_3max.c diff -u src/sys/arch/pmax/pmax/dec_3max.c:1.48 src/sys/arch/pmax/pmax/dec_3max.c:1.49 --- src/sys/arch/pmax/pmax/dec_3max.c:1.48 Mon Mar 16 23:11:14 2009 +++ src/sys/arch/pmax/pmax/dec_3max.c Mon Jul 20 16:25:22 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: dec_3max.c,v 1.48 2009/03/16 23:11:14 dsl Exp $ */ +/* $NetBSD: dec_3max.c,v 1.49 2009/07/20 16:25:22 tsutsui Exp $ */ /* * Copyright (c) 1998 Jonathan Stone. All rights reserved. @@ -106,7 +106,7 @@ #include /* RCS ID & Copyright macro defns */ -__KERNEL_RCSID(0, "$NetBSD: dec_3max.c,v 1.48 2009/03/16 23:11:14 dsl Exp $"); +__KERNEL_RCSID(0, "$NetBSD: dec_3max.c,v 1.49 2009/07/20 16:25:22 tsutsui Exp $"); #include #include @@ -167,7 +167,7 @@ /* no high resolution timer available */ /* clear any memory errors */ - *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_ERRADR) = 0; + *(volatile u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_ERRADR) = 0; kn02_wbflush(); ipl2spl_table = dec_3max_ipl2spl_table; @@ -179,9 +179,9 @@ * Enable ECC memory correction, turn off LEDs, and * disable all TURBOchannel interrupts. */ - csr = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR); + csr = *(volatile u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR); csr &= ~(KN02_CSR_WRESERVED|KN02_CSR_IOINTEN|KN02_CSR_CORRECT|0xff); - *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR) = csr; + *(volatile u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR) = csr; kn02_wbflush(); strcpy(cpu_model, "DECstation 5000/200 (3MAX)"); @@ -197,10 +197,10 @@ * Reset interrupts, clear any errors from newconf probes */ - *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_ERRADR) = 0; + *(volatile u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_ERRADR) = 0; kn02_wbflush(); - *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CHKSYN) = 0; + *(volatile u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CHKSYN) = 0; kn02_wbflush(); } @@ -263,9 +263,10 @@ intrtab[(int)cookie].ih_func = handler; intrtab[(int)cookie].ih_arg = arg; - csr = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR) & 0x0000; + csr = *(volatile u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR) & + 0x0000; csr |= (kn02intrs[i].intrbit << 16); - *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR) = csr; + *(volatile u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR) = csr; kn02_wbflush(); } @@ -286,7 +287,7 @@ if (ipending & MIPS_INT_MASK_1) { struct clockframe cf; - csr = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR); + csr = *(volatile u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR); if ((csr & KN02_CSR_PSWARN) && !warned) { warned = 1; printf("WARNING: power supply is overheating!\n"); @@ -310,7 +311,7 @@ _splset(MIPS_SR_INT_IE | (status & MIPS_INT_MASK_1)); if (ipending & MIPS_INT_MASK_0) { - csr = *(u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR); + csr = *(volatile u_int32_t *)MIPS_PHYS_TO_KSEG1(KN02_SYS_CSR); csr &= (csr >> KN02_CSR_IOINTEN_SHIFT); if (csr & (KN02_IP_DZ | KN02_IP_LANCE | KN02_IP_SCSI)) { if (csr & KN02_IP_DZ) @@ -349,11 +350,11 @@ u_int32_t erradr, errsyn, csr; /* Fetch error addr
CVS commit: src/sys/arch/pmax/stand
Module Name:src Committed By: tsutsui Date: Thu Apr 23 16:37:44 UTC 2009 Modified Files: src/sys/arch/pmax/stand: Makefile.booters Log Message: Make sure to remove all generated files on cleandir. To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/sys/arch/pmax/stand/Makefile.booters Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/stand/Makefile.booters diff -u src/sys/arch/pmax/stand/Makefile.booters:1.50 src/sys/arch/pmax/stand/Makefile.booters:1.51 --- src/sys/arch/pmax/stand/Makefile.booters:1.50 Thu Apr 23 16:35:20 2009 +++ src/sys/arch/pmax/stand/Makefile.booters Thu Apr 23 16:37:44 2009 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.booters,v 1.50 2009/04/23 16:35:20 tsutsui Exp $ +# $NetBSD: Makefile.booters,v 1.51 2009/04/23 16:37:44 tsutsui Exp $ .include # for HOST_SH @@ -120,7 +120,7 @@ .include .include -CLEANFILES+= ${PROG}.map +CLEANFILES+= ${PROG}.map ${PROG}.elf cleandir distclean: cleanlibdir
CVS commit: src/sys/arch/pmax/stand
Module Name:src Committed By: tsutsui Date: Thu Apr 23 16:35:20 UTC 2009 Modified Files: src/sys/arch/pmax/stand: Makefile.booters Log Message: Use to create machine and ${MACHINE_ARCH} symlinks. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/sys/arch/pmax/stand/Makefile.booters Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/stand/Makefile.booters diff -u src/sys/arch/pmax/stand/Makefile.booters:1.49 src/sys/arch/pmax/stand/Makefile.booters:1.50 --- src/sys/arch/pmax/stand/Makefile.booters:1.49 Fri Apr 3 10:38:14 2009 +++ src/sys/arch/pmax/stand/Makefile.booters Thu Apr 23 16:35:20 2009 @@ -1,19 +1,10 @@ -# $NetBSD: Makefile.booters,v 1.49 2009/04/03 10:38:14 tsutsui Exp $ +# $NetBSD: Makefile.booters,v 1.50 2009/04/23 16:35:20 tsutsui Exp $ .include # for HOST_SH # $S must correspond to the top of the 'sys' tree S= ${.CURDIR}/../../../.. -.if !make(obj) && !make(clean) && !make(cleandir) -.BEGIN: - @[ -h machine ] || ln -s $S/arch/${MACHINE}/include machine - @[ -h pmax ] || ln -s $S/arch/${MACHINE}/include pmax - @[ -h mips ] || ln -s $S/arch/mips/include mips -.NOPATH: machine pmax mips -.endif -CLEANFILES+= machine pmax mips - BINMODE?= 444 # XXX SHOULD NOT NEED TO DEFINE THESE! @@ -111,7 +102,7 @@ vers.c: ${.CURDIR}/version ${HOST_SH} ${S}/conf/newvers_stand.sh -N ${.CURDIR}/version "pmax" -${PROG}: machine mips pmax ${OBJS} ${LIBS} +${PROG}: ${OBJS} ${LIBS} ${LD} -Map ${PROG}.map -N -x -Ttext ${LOAD_ADDRESS} \ ${LDBUG} -e start -o ${PROG} ${OBJS} ${LIBS} @${SIZE} ${PROG} @@ -126,6 +117,7 @@ @echo done. .endif +.include .include CLEANFILES+= ${PROG}.map
CVS commit: src/sys/arch/pmax/stand
Module Name:src Committed By: tsutsui Date: Tue Apr 21 16:08:40 UTC 2009 Modified Files: src/sys/arch/pmax/stand: Makefile src/sys/arch/pmax/stand/bootxx_ffs: Makefile src/sys/arch/pmax/stand/common: conf.c Added Files: src/sys/arch/pmax/stand/bootxx_ffsv2: Makefile Log Message: Add UFS2 boot support. Tested on gxemul. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/pmax/stand/Makefile cvs rdiff -u -r1.2 -r1.3 src/sys/arch/pmax/stand/bootxx_ffs/Makefile cvs rdiff -u -r0 -r1.1 src/sys/arch/pmax/stand/bootxx_ffsv2/Makefile cvs rdiff -u -r1.24 -r1.25 src/sys/arch/pmax/stand/common/conf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/pmax/stand/Makefile diff -u src/sys/arch/pmax/stand/Makefile:1.18 src/sys/arch/pmax/stand/Makefile:1.19 --- src/sys/arch/pmax/stand/Makefile:1.18 Thu Apr 4 22:59:33 2002 +++ src/sys/arch/pmax/stand/Makefile Tue Apr 21 16:08:39 2009 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.18 2002/04/04 22:59:33 lukem Exp $ +# $NetBSD: Makefile,v 1.19 2009/04/21 16:08:39 tsutsui Exp $ # @(#)Makefile 8.3 (Berkeley) 2/16/94 # first stage bootblocks -SUBDIR+=bootxx_cd9660 bootxx_ffs bootxx_lfs netboot +SUBDIR+=bootxx_cd9660 bootxx_ffs bootxx_ffsv2 bootxx_lfs netboot # remove this when netboot is working - we don't go in here # by default... Index: src/sys/arch/pmax/stand/bootxx_ffs/Makefile diff -u src/sys/arch/pmax/stand/bootxx_ffs/Makefile:1.2 src/sys/arch/pmax/stand/bootxx_ffs/Makefile:1.3 --- src/sys/arch/pmax/stand/bootxx_ffs/Makefile:1.2 Sat Feb 1 23:58:48 2003 +++ src/sys/arch/pmax/stand/bootxx_ffs/Makefile Tue Apr 21 16:08:39 2009 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.2 2003/02/01 23:58:48 simonb Exp $ +# $NetBSD: Makefile,v 1.3 2009/04/21 16:08:39 tsutsui Exp $ PRIMARY_PROG= bootxx_ffs -CPPFLAGS+= -DLIBSA_SINGLE_FILESYSTEM=ufs \ - -DBOOTXX_FS_NAME='"FFS"' +CPPFLAGS+= -DLIBSA_SINGLE_FILESYSTEM=ffsv1 \ + -DBOOTXX_FS_NAME='"FFSv1"' # Use small daddr_t to avoid code bloat CPPFLAGS+= -D__daddr_t=int32_t Index: src/sys/arch/pmax/stand/common/conf.c diff -u src/sys/arch/pmax/stand/common/conf.c:1.24 src/sys/arch/pmax/stand/common/conf.c:1.25 --- src/sys/arch/pmax/stand/common/conf.c:1.24 Sun Dec 11 12:18:39 2005 +++ src/sys/arch/pmax/stand/common/conf.c Tue Apr 21 16:08:40 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: conf.c,v 1.24 2005/12/11 12:18:39 christos Exp $ */ +/* $NetBSD: conf.c,v 1.25 2009/04/21 16:08:40 tsutsui Exp $ */ /* * Copyright (c) 1992, 1993 @@ -81,7 +81,8 @@ #ifndef LIBSA_SINGLE_FILESYSTEM #ifdef LIBSA_NO_FS_CLOSE -#define ufs_close 0 +#define ffsv1_close 0 +#define ffsv2_close 0 #define lfsv1_close 0 #define lfsv2_close 0 #define cd9660_close 0 @@ -89,7 +90,8 @@ #define nfs_close 0 #endif #ifdef LIBSA_NO_FS_WRITE -#define ufs_write 0 +#define ffsv1_write 0 +#define ffsv2_write 0 #define lfsv1_write 0 #define lfsv2_write 0 #define cd9660_write 0 @@ -98,7 +100,8 @@ #endif struct fs_ops file_system[] = { - FS_OPS(ufs), + FS_OPS(ffsv1), + FS_OPS(ffsv2), FS_OPS(lfsv1), FS_OPS(lfsv2), FS_OPS(cd9660), Added files: Index: src/sys/arch/pmax/stand/bootxx_ffsv2/Makefile diff -u /dev/null src/sys/arch/pmax/stand/bootxx_ffsv2/Makefile:1.1 --- /dev/null Tue Apr 21 16:08:40 2009 +++ src/sys/arch/pmax/stand/bootxx_ffsv2/Makefile Tue Apr 21 16:08:39 2009 @@ -0,0 +1,11 @@ +# $NetBSD: Makefile,v 1.1 2009/04/21 16:08:39 tsutsui Exp $ + +PRIMARY_PROG= bootxx_ffsv2 +CPPFLAGS+= -DLIBSA_SINGLE_FILESYSTEM=ffsv2 \ + -DBOOTXX_FS_NAME='"FFSv2"' +# Use small daddr_t to avoid code bloat +CPPFLAGS+= -D__daddr_t=int32_t + +PRIMARY_MAX_LOAD!= expr 8192 - 512 + +.include "../Makefile.booters"