CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: rillig Date: Fri May 24 19:00:28 UTC 2024 Modified Files: src/sys/arch/pmax/pmax: kn230.h Log Message: pmax/kn230.h: fix typos and spacing in comments To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/pmax/pmax/kn230.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/pmax/kn230.h diff -u src/sys/arch/pmax/pmax/kn230.h:1.4 src/sys/arch/pmax/pmax/kn230.h:1.5 --- src/sys/arch/pmax/pmax/kn230.h:1.4 Thu May 23 08:52:06 2024 +++ src/sys/arch/pmax/pmax/kn230.h Fri May 24 19:00:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: kn230.h,v 1.4 2024/05/23 08:52:06 andvar Exp $ */ +/* $NetBSD: kn230.h,v 1.5 2024/05/24 19:00:27 rillig Exp $ */ /* * Copyright (c) 1997,1998 Jonathan Stone. @@ -35,17 +35,17 @@ /* * Physical addresses of baseboard devices and registers on the - * the DECstation 5100 motherboard (also known as the kn230). + * DECstation 5100 motherboard (also known as the kn230). * * The only options on the kn230 are two slots for daughterboards. * Each slot can contain an extra four-port dc708x DZ11 clone chip. - * Most baseborad chips are the same hardware and at the same - * address as the DECstation 3100 (kn01), except: + * Most baseboard chips are the same hardware and at the same + * address as the DECstation 3100 (kn01), except: * * The kn230 has more devices than the 3100, so instead * of hardwiring each device to a CPU interrupt line, - * the kn230 provides an interrupt-request register (ICSR). - * Devices are mapped onto CPU interrupt lines as below: + * the kn230 provides an interrupt-request register (ICSR). + * Devices are mapped onto CPU interrupt lines as below: * hardint 5: fpu * hardint 4: reset switch * hardint 3: memory error (write to nonexistent memory) @@ -75,7 +75,7 @@ /* * Interrupt-request bitmasks in the low-order 16 bits of the CSR. - * If a bit is set, the corresponding device has an interrupt condition. + * If a bit is set, the corresponding device has an interrupt condition. * There is no equivalent per-device interrupt masking register. * (note: these were LED control bits in the kn01). */ @@ -88,7 +88,7 @@ #define KN230_CSR_INTR_DZ0 0x0100 /* baseboard DZ */ /* - * kn230 LED control register. + * kn230 LED control register. * Writing a 1 bit to any bit turns off the corresponding LED. * low bits are or'ed to control registers which have side effects. * @@ -156,7 +156,7 @@ /* * NVRAM state definitions. - * Used under Ultrix for PrestoServe. + * Used under Ultrix for PrestoServe. */ #define KN230_SYS_NVRAM_DIAG 0x1f000300 /* NVRAM diagnostic register */ #define KN230_NVRAM_PRESENT 0x0001 @@ -169,7 +169,7 @@ /* * NVRAM has separate control and status registers for each of * the two motherboard SIMM banks (even and odd), - * located at offsets from the value at value at SYS_NVRAM_ADDR. + * located at offsets from the value at SYS_NVRAM_ADDR. */ # define KN230_SYS_NVRAM_EVENBNK_STATUS_OFFSET (0x20) # define KN230_SYS_NVRAM_ODDBNK_STATUS_OFFSET (0x20 +4) @@ -180,8 +180,8 @@ #define KN230_NVRAM_BATFAIL 0x0001 /* battery failure */ #define KN230_NVRAM_BATKILL 0x0002 /* battery kill */ /* - * To enable the battery, write 0x00 to each nvram control reg. + * To enable the battery, write 0x00 to each nvram control reg. * To disable the battery, write the sequence - *0x01, 0x01, 0x00, 0x00, 0x01 + *0x01, 0x01, 0x00, 0x00, 0x01 * to both per-bank control registers (do banks in parallel, not in sequence). */
CVS commit: src/sys/arch/pmax/pmax
Module Name:src Committed By: rillig Date: Fri May 24 19:00:28 UTC 2024 Modified Files: src/sys/arch/pmax/pmax: kn230.h Log Message: pmax/kn230.h: fix typos and spacing in comments To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/pmax/pmax/kn230.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
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/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.
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 = } +#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 =
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.
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.
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 = } + /* 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 =
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.
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/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: 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.
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/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.
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.
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/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/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.
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: 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.
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.
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/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 sys/cdefs.h -__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 sys/param.h #include sys/cpu.h @@ -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 sys/cdefs.h -__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 sys/cdefs.h -__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 sys/param.h #include sys/cpu.h @@ -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 sys/cdefs.h -__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 sys/param.h #include sys/cpu.h @@ -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); +
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.
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 sys/cdefs.h -__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/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.
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 sys/cdefs.h -__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: 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 sys/cdefs.h -__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 sys/param.h #include sys/systm.h @@ -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.
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.
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 sys/cdefs.h -__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 sys/param.h #include sys/systm.h @@ -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 sys/cdefs.h -__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 sys/param.h #include sys/systm.h @@ -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 sys/cdefs.h -__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 sys/param.h #include sys/systm.h @@ -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: 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.
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/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.
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 sys/cdefs.h -__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 sys/cdefs.h -__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 sys/param.h #include sys/systm.h @@ -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/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.
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 sys/cdefs.h /* 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: 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 sys/cdefs.h /* 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: 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 sys/cdefs.h -__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 sys/param.h #include sys/systm.h @@ -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 sys/cdefs.h /* 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 sys/param.h #include sys/systm.h @@ -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,
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 sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: memc_3min.c,v 1.10 2005/12/11 12:18:39 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: memc_3min.c,v 1.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 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 sys/cdefs.h /* 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 sys/param.h #include sys/systm.h @@ -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 : unknown); 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 sys/cdefs.h -__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