CVS commit: src/sys/arch/cobalt/cobalt
Module Name:src Committed By: thorpej Date: Sat Nov 21 15:26:54 UTC 2020 Modified Files: src/sys/arch/cobalt/cobalt: interrupt.c Log Message: malloc(9) -> kmem(9) To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/cobalt/cobalt/interrupt.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/cobalt/cobalt/interrupt.c diff -u src/sys/arch/cobalt/cobalt/interrupt.c:1.10 src/sys/arch/cobalt/cobalt/interrupt.c:1.11 --- src/sys/arch/cobalt/cobalt/interrupt.c:1.10 Sun Nov 10 21:16:25 2019 +++ src/sys/arch/cobalt/cobalt/interrupt.c Sat Nov 21 15:26:53 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: interrupt.c,v 1.10 2019/11/10 21:16:25 chs Exp $ */ +/* $NetBSD: interrupt.c,v 1.11 2020/11/21 15:26:53 thorpej Exp $ */ /*- * Copyright (c) 2006 Izumi Tsutsui. All rights reserved. @@ -79,12 +79,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.10 2019/11/10 21:16:25 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.11 2020/11/21 15:26:53 thorpej Exp $"); #define __INTR_PRIVATE #include -#include +#include #include #include @@ -265,7 +265,7 @@ icu_intr_establish(int irq, int type, in return NULL; } - ih = malloc(sizeof(*ih), M_DEVBUF, M_WAITOK); + ih = kmem_alloc(sizeof(*ih), KM_SLEEP); ih->ih_func = func; ih->ih_arg = arg; ih->ih_irq = irq; @@ -306,7 +306,7 @@ icu_intr_disestablish(void *cookie) icu_set(); } splx(s); - free(ih, M_DEVBUF); + kmem_free(ih, sizeof(*ih)); } }
CVS commit: src/sys/arch/cobalt/conf
Module Name:src Committed By: thorpej Date: Tue Jun 16 06:36:56 UTC 2020 Modified Files: src/sys/arch/cobalt/conf: GENERIC Log Message: Disable DEBUG. To generate a diff of this commit: cvs rdiff -u -r1.167 -r1.168 src/sys/arch/cobalt/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/cobalt/conf/GENERIC diff -u src/sys/arch/cobalt/conf/GENERIC:1.167 src/sys/arch/cobalt/conf/GENERIC:1.168 --- src/sys/arch/cobalt/conf/GENERIC:1.167 Wed Mar 25 17:06:18 2020 +++ src/sys/arch/cobalt/conf/GENERIC Tue Jun 16 06:36:56 2020 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.167 2020/03/25 17:06:18 jdolecek Exp $ +# $NetBSD: GENERIC,v 1.168 2020/06/16 06:36:56 thorpej Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/cobalt/conf/std.cobalt" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.167 $" +#ident "GENERIC-$Revision: 1.168 $" maxusers 32 @@ -43,7 +43,7 @@ options BUFQ_PRIOCSCAN # Debugging options options DIAGNOSTIC # extra kernel sanity checking -options DEBUG # extra kernel debugging support +#options DEBUG # extra kernel debugging support options DDB # kernel dynamic debugger #options DDB_HISTORY_SIZE=100 # enable history editing in DDB makeoptions DEBUG="-g" # compile full symbol table
CVS commit: src/sys/arch/cobalt/conf
Module Name:src Committed By: thorpej Date: Wed Mar 4 04:58:52 UTC 2020 Modified Files: src/sys/arch/cobalt/conf: majors.cobalt Log Message: panel -> lcdpanel Part of PR port-cobalt/55009 To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/cobalt/conf/majors.cobalt 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/cobalt/conf/majors.cobalt diff -u src/sys/arch/cobalt/conf/majors.cobalt:1.33 src/sys/arch/cobalt/conf/majors.cobalt:1.34 --- src/sys/arch/cobalt/conf/majors.cobalt:1.33 Wed Jan 29 18:39:01 2020 +++ src/sys/arch/cobalt/conf/majors.cobalt Wed Mar 4 04:58:52 2020 @@ -1,4 +1,4 @@ -# $NetBSD: majors.cobalt,v 1.33 2020/01/29 18:39:01 maya Exp $ +# $NetBSD: majors.cobalt,v 1.34 2020/03/04 04:58:52 thorpej Exp $ # # Device majors for cobalt # @@ -39,7 +39,7 @@ device-major ld char 27 block 10 ld device-major clockctl char 33 clockctl #device-major obsolete char 34 obsolete (systrace) device-major cgd char 35 block 11 cgd -device-major panel char 36 panel +device-major lcdpanel char 36 lcdpanel device-major ksyms char 37 ksyms device-major pci char 38 pci device-major zstty char 39 zstty
CVS commit: src/sys/arch/cobalt/dev
Module Name:src Committed By: thorpej Date: Mon Mar 2 01:46:02 UTC 2020 Modified Files: src/sys/arch/cobalt/dev: gt.c Log Message: The PCI I/O space extent map needs to reflect the BUS_{START,END} not the SYS_{START,END}. This fixes mapping of the viaide DMA registers on my Qube2. To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/cobalt/dev/gt.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/cobalt/dev/gt.c diff -u src/sys/arch/cobalt/dev/gt.c:1.29 src/sys/arch/cobalt/dev/gt.c:1.30 --- src/sys/arch/cobalt/dev/gt.c:1.29 Sat Jan 20 13:56:09 2018 +++ src/sys/arch/cobalt/dev/gt.c Mon Mar 2 01:46:02 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: gt.c,v 1.29 2018/01/20 13:56:09 skrll Exp $ */ +/* $NetBSD: gt.c,v 1.30 2020/03/02 01:46:02 thorpej Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang. All rights reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.29 2018/01/20 13:56:09 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.30 2020/03/02 01:46:02 thorpej Exp $"); #include "opt_pci.h" #include "pci.h" @@ -132,7 +132,7 @@ gt_attach(device_t parent, device_t self pc->pc_bsh = sc->sc_bsh; #ifdef PCI_NETBSD_CONFIGURE - pc->pc_ioext = extent_create("pciio", 0x10001000, 0x11ff, + pc->pc_ioext = extent_create("pciio", 0x1000, 0x01ff, NULL, 0, EX_NOWAIT); pc->pc_memext = extent_create("pcimem", 0x1200, 0x13ff, NULL, 0, EX_NOWAIT);
CVS commit: src/sys/arch/cobalt/cobalt
Module Name:src Committed By: mrg Date: Wed Feb 6 21:42:46 UTC 2019 Modified Files: src/sys/arch/cobalt/cobalt: machdep.c Log Message: compare pointers with NULL not nul. To generate a diff of this commit: cvs rdiff -u -r1.121 -r1.122 src/sys/arch/cobalt/cobalt/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/cobalt/cobalt/machdep.c diff -u src/sys/arch/cobalt/cobalt/machdep.c:1.121 src/sys/arch/cobalt/cobalt/machdep.c:1.122 --- src/sys/arch/cobalt/cobalt/machdep.c:1.121 Sat Jan 20 13:56:08 2018 +++ src/sys/arch/cobalt/cobalt/machdep.c Wed Feb 6 21:42:46 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.121 2018/01/20 13:56:08 skrll Exp $ */ +/* $NetBSD: machdep.c,v 1.122 2019/02/06 21:42:46 mrg Exp $ */ /*- * Copyright (c) 2006 Izumi Tsutsui. All rights reserved. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.121 2018/01/20 13:56:08 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.122 2019/02/06 21:42:46 mrg Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -399,7 +399,7 @@ decode_bootstring(void) /* break apart bootstring on ' ' boundries and itterate */ work = strtok_light(bootstring, ' '); - while (work != '\0') { + while (work != NULL) { /* if starts with '-', we got options, walk its decode */ if (work[0] == '-') { i = 1; @@ -410,7 +410,7 @@ decode_bootstring(void) } else /* if it has a '=' its an assignment, switch and set */ - if ((equ = strchr(work, '=')) != '\0') { + if ((equ = strchr(work, '=')) != NULL) { if (memcmp("nfsroot=", work, 8) == 0) { nfsroot_bstr = (equ + 1); } else
CVS commit: src/sys/arch/cobalt/stand/boot
Module Name:src Committed By: christos Date: Tue Jan 8 19:15:54 UTC 2019 Modified Files: src/sys/arch/cobalt/stand/boot: wdc.c Log Message: no need for To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/cobalt/stand/boot/wdc.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/cobalt/stand/boot/wdc.c diff -u src/sys/arch/cobalt/stand/boot/wdc.c:1.15 src/sys/arch/cobalt/stand/boot/wdc.c:1.16 --- src/sys/arch/cobalt/stand/boot/wdc.c:1.15 Tue Jan 8 12:13:03 2019 +++ src/sys/arch/cobalt/stand/boot/wdc.c Tue Jan 8 14:15:54 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: wdc.c,v 1.15 2019/01/08 17:13:03 christos Exp $ */ +/* $NetBSD: wdc.c,v 1.16 2019/01/08 19:15:54 christos Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -36,7 +36,6 @@ #include #include -#include #include "boot.h" #include "wdvar.h"
CVS commit: src/sys/arch/cobalt/stand/boot
Module Name:src Committed By: christos Date: Tue Jan 8 17:13:04 UTC 2019 Modified Files: src/sys/arch/cobalt/stand/boot: wdc.c Log Message: Someone should merge all the wdc copies. Include for DEV_BSIZE/DEV_BSHIFT To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/sys/arch/cobalt/stand/boot/wdc.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/cobalt/stand/boot/wdc.c diff -u src/sys/arch/cobalt/stand/boot/wdc.c:1.14 src/sys/arch/cobalt/stand/boot/wdc.c:1.15 --- src/sys/arch/cobalt/stand/boot/wdc.c:1.14 Thu Apr 3 14:49:52 2014 +++ src/sys/arch/cobalt/stand/boot/wdc.c Tue Jan 8 12:13:03 2019 @@ -1,4 +1,4 @@ -/* $NetBSD: wdc.c,v 1.14 2014/04/03 18:49:52 joerg Exp $ */ +/* $NetBSD: wdc.c,v 1.15 2019/01/08 17:13:03 christos Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -29,6 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include #include #include #include
CVS commit: src/sys/arch/cobalt
Module Name:src Committed By: christos Date: Mon Apr 9 20:16:16 UTC 2018 Modified Files: src/sys/arch/cobalt/conf: GENERIC INSTALL files.cobalt src/sys/arch/cobalt/include: cpu.h Added Files: src/sys/arch/cobalt/dev: lcdpanel.c Removed Files: src/sys/arch/cobalt/dev: panel.c Log Message: rename panel to lcdpanel. To generate a diff of this commit: cvs rdiff -u -r1.157 -r1.158 src/sys/arch/cobalt/conf/GENERIC cvs rdiff -u -r1.66 -r1.67 src/sys/arch/cobalt/conf/INSTALL cvs rdiff -u -r1.40 -r1.41 src/sys/arch/cobalt/conf/files.cobalt cvs rdiff -u -r0 -r1.1 src/sys/arch/cobalt/dev/lcdpanel.c cvs rdiff -u -r1.24 -r0 src/sys/arch/cobalt/dev/panel.c cvs rdiff -u -r1.15 -r1.16 src/sys/arch/cobalt/include/cpu.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/cobalt/conf/GENERIC diff -u src/sys/arch/cobalt/conf/GENERIC:1.157 src/sys/arch/cobalt/conf/GENERIC:1.158 --- src/sys/arch/cobalt/conf/GENERIC:1.157 Mon Apr 9 15:05:26 2018 +++ src/sys/arch/cobalt/conf/GENERIC Mon Apr 9 16:16:16 2018 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.157 2018/04/09 19:05:26 christos Exp $ +# $NetBSD: GENERIC,v 1.158 2018/04/09 20:16:16 christos Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/cobalt/conf/std.cobalt" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.157 $" +#ident "GENERIC-$Revision: 1.158 $" maxusers 32 @@ -146,7 +146,7 @@ zsc0 at mainbus? addr 0x1c80 irq 4 zstty0 at zsc0 channel 0 zstty1 at zsc0 channel 1 -ledpanel0 at mainbus? addr 0x1f00 +lcdpanel0 at mainbus? addr 0x1f00 gt0 at mainbus? addr 0x1400 Index: src/sys/arch/cobalt/conf/INSTALL diff -u src/sys/arch/cobalt/conf/INSTALL:1.66 src/sys/arch/cobalt/conf/INSTALL:1.67 --- src/sys/arch/cobalt/conf/INSTALL:1.66 Mon Apr 9 15:05:26 2018 +++ src/sys/arch/cobalt/conf/INSTALL Mon Apr 9 16:16:16 2018 @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.66 2018/04/09 19:05:26 christos Exp $ +# $NetBSD: INSTALL,v 1.67 2018/04/09 20:16:16 christos Exp $ # # INSTALL -- installation and rescue kernel. # @@ -10,7 +10,7 @@ include "arch/cobalt/conf/std.cobalt" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "INSTALL-$Revision: 1.66 $" +#ident "INSTALL-$Revision: 1.67 $" makeoptions COPTS="-Os -mmemcpy" makeoptions CPUFLAGS="-march=vr5000 -mabi=32" @@ -135,7 +135,7 @@ zsc0 at mainbus? addr 0x1c80 irq 4 zstty0 at zsc0 channel 0 #zstty1 at zsc0 channel 1 -ledpanel0 at mainbus? addr 0x1f00 +lcdpanel0 at mainbus? addr 0x1f00 gt0 at mainbus? addr 0x1400 Index: src/sys/arch/cobalt/conf/files.cobalt diff -u src/sys/arch/cobalt/conf/files.cobalt:1.40 src/sys/arch/cobalt/conf/files.cobalt:1.41 --- src/sys/arch/cobalt/conf/files.cobalt:1.40 Mon Apr 9 15:05:26 2018 +++ src/sys/arch/cobalt/conf/files.cobalt Mon Apr 9 16:16:16 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.cobalt,v 1.40 2018/04/09 19:05:26 christos Exp $ +# $NetBSD: files.cobalt,v 1.41 2018/04/09 20:16:16 christos Exp $ maxpartitions 16 @@ -31,9 +31,9 @@ device mcclock: mc146818 attach mcclock at mainbus file arch/cobalt/dev/mcclock.c mcclock needs-flag -device ledpanel: hd44780 -attach ledpanel at mainbus -file arch/cobalt/dev/panel.c ledpanel +device lcdpanel: hd44780 +attach lcdpanel at mainbus +file arch/cobalt/dev/lcdpanel.c lcdpanel device gt: pcibus attach gt at mainbus Index: src/sys/arch/cobalt/include/cpu.h diff -u src/sys/arch/cobalt/include/cpu.h:1.15 src/sys/arch/cobalt/include/cpu.h:1.16 --- src/sys/arch/cobalt/include/cpu.h:1.15 Tue May 3 05:15:20 2011 +++ src/sys/arch/cobalt/include/cpu.h Mon Apr 9 16:16:16 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.15 2011/05/03 09:15:20 tsutsui Exp $ */ +/* $NetBSD: cpu.h,v 1.16 2018/04/09 20:16:16 christos Exp $ */ #ifndef _COBALT_CPU_H_ #define _COBALT_CPU_H_ @@ -25,7 +25,7 @@ extern u_int cobalt_id; #define LED_POWEROFF 3 #define COM_BASE 0x1c80 #define ZS_BASE 0x1c80 -#define PANEL_BASE 0x1d00 +#define LCDPANEL_BASE 0x1d00 #define LCD_BASE 0x1f00 #endif /* !_LOCORE */ Added files: Index: src/sys/arch/cobalt/dev/lcdpanel.c diff -u /dev/null src/sys/arch/cobalt/dev/lcdpanel.c:1.1 --- /dev/null Mon Apr 9 16:16:16 2018 +++ src/sys/arch/cobalt/dev/lcdpanel.c Mon Apr 9 16:16:16 2018 @@ -0,0 +1,334 @@ +/* $NetBSD: lcdpanel.c,v 1.1 2018/04/09 20:16:16 christos Exp $ */ + +/* + * Copyright (c) 2002 Dennis I. Chernoivanov + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce t
CVS commit: src/sys/arch/cobalt/conf
Module Name:src Committed By: christos Date: Mon Apr 9 19:05:26 UTC 2018 Modified Files: src/sys/arch/cobalt/conf: GENERIC INSTALL files.cobalt Log Message: rename the cobalt panel to ledpanel to avoid conflict with fdt. To generate a diff of this commit: cvs rdiff -u -r1.156 -r1.157 src/sys/arch/cobalt/conf/GENERIC cvs rdiff -u -r1.65 -r1.66 src/sys/arch/cobalt/conf/INSTALL cvs rdiff -u -r1.39 -r1.40 src/sys/arch/cobalt/conf/files.cobalt 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/cobalt/conf/GENERIC diff -u src/sys/arch/cobalt/conf/GENERIC:1.156 src/sys/arch/cobalt/conf/GENERIC:1.157 --- src/sys/arch/cobalt/conf/GENERIC:1.156 Tue Jan 23 09:47:54 2018 +++ src/sys/arch/cobalt/conf/GENERIC Mon Apr 9 15:05:26 2018 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.156 2018/01/23 14:47:54 sevan Exp $ +# $NetBSD: GENERIC,v 1.157 2018/04/09 19:05:26 christos Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/cobalt/conf/std.cobalt" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.156 $" +#ident "GENERIC-$Revision: 1.157 $" maxusers 32 @@ -146,7 +146,7 @@ zsc0 at mainbus? addr 0x1c80 irq 4 zstty0 at zsc0 channel 0 zstty1 at zsc0 channel 1 -panel0 at mainbus? addr 0x1f00 +ledpanel0 at mainbus? addr 0x1f00 gt0 at mainbus? addr 0x1400 Index: src/sys/arch/cobalt/conf/INSTALL diff -u src/sys/arch/cobalt/conf/INSTALL:1.65 src/sys/arch/cobalt/conf/INSTALL:1.66 --- src/sys/arch/cobalt/conf/INSTALL:1.65 Tue Jan 23 09:47:54 2018 +++ src/sys/arch/cobalt/conf/INSTALL Mon Apr 9 15:05:26 2018 @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.65 2018/01/23 14:47:54 sevan Exp $ +# $NetBSD: INSTALL,v 1.66 2018/04/09 19:05:26 christos Exp $ # # INSTALL -- installation and rescue kernel. # @@ -10,7 +10,7 @@ include "arch/cobalt/conf/std.cobalt" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "INSTALL-$Revision: 1.65 $" +#ident "INSTALL-$Revision: 1.66 $" makeoptions COPTS="-Os -mmemcpy" makeoptions CPUFLAGS="-march=vr5000 -mabi=32" @@ -135,7 +135,7 @@ zsc0 at mainbus? addr 0x1c80 irq 4 zstty0 at zsc0 channel 0 #zstty1 at zsc0 channel 1 -panel0 at mainbus? addr 0x1f00 +ledpanel0 at mainbus? addr 0x1f00 gt0 at mainbus? addr 0x1400 Index: src/sys/arch/cobalt/conf/files.cobalt diff -u src/sys/arch/cobalt/conf/files.cobalt:1.39 src/sys/arch/cobalt/conf/files.cobalt:1.40 --- src/sys/arch/cobalt/conf/files.cobalt:1.39 Sat Jan 20 08:56:09 2018 +++ src/sys/arch/cobalt/conf/files.cobalt Mon Apr 9 15:05:26 2018 @@ -1,4 +1,4 @@ -# $NetBSD: files.cobalt,v 1.39 2018/01/20 13:56:09 skrll Exp $ +# $NetBSD: files.cobalt,v 1.40 2018/04/09 19:05:26 christos Exp $ maxpartitions 16 @@ -31,9 +31,9 @@ device mcclock: mc146818 attach mcclock at mainbus file arch/cobalt/dev/mcclock.c mcclock needs-flag -device panel: hd44780 -attach panel at mainbus -file arch/cobalt/dev/panel.c panel +device ledpanel: hd44780 +attach ledpanel at mainbus +file arch/cobalt/dev/panel.c ledpanel device gt: pcibus attach gt at mainbus
CVS commit: src/sys/arch/cobalt
Module Name:src Committed By: skrll Date: Sat Jan 20 13:56:09 UTC 2018 Modified Files: src/sys/arch/cobalt/cobalt: bus.c interrupt.c machdep.c mainbus.c src/sys/arch/cobalt/conf: GENERIC files.cobalt src/sys/arch/cobalt/dev: com_mainbus.c gt.c src/sys/arch/cobalt/include: bus_defs.h bus_funcs.h Added Files: src/sys/arch/cobalt/dev: gt_io_space.c gt_mem_space.c gtvar.h Log Message: Switch cobalt to common bus_space. Tested on raq 2 To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/arch/cobalt/cobalt/bus.c cvs rdiff -u -r1.7 -r1.8 src/sys/arch/cobalt/cobalt/interrupt.c cvs rdiff -u -r1.120 -r1.121 src/sys/arch/cobalt/cobalt/machdep.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/cobalt/cobalt/mainbus.c cvs rdiff -u -r1.154 -r1.155 src/sys/arch/cobalt/conf/GENERIC cvs rdiff -u -r1.38 -r1.39 src/sys/arch/cobalt/conf/files.cobalt cvs rdiff -u -r1.20 -r1.21 src/sys/arch/cobalt/dev/com_mainbus.c cvs rdiff -u -r1.28 -r1.29 src/sys/arch/cobalt/dev/gt.c cvs rdiff -u -r0 -r1.1 src/sys/arch/cobalt/dev/gt_io_space.c \ src/sys/arch/cobalt/dev/gt_mem_space.c src/sys/arch/cobalt/dev/gtvar.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/cobalt/include/bus_defs.h \ src/sys/arch/cobalt/include/bus_funcs.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/cobalt/cobalt/bus.c diff -u src/sys/arch/cobalt/cobalt/bus.c:1.45 src/sys/arch/cobalt/cobalt/bus.c:1.46 --- src/sys/arch/cobalt/cobalt/bus.c:1.45 Tue Jul 29 21:21:43 2014 +++ src/sys/arch/cobalt/cobalt/bus.c Sat Jan 20 13:56:08 2018 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.c,v 1.45 2014/07/29 21:21:43 skrll Exp $ */ +/* $NetBSD: bus.c,v 1.46 2018/01/20 13:56:08 skrll Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -30,370 +30,37 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include -__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.45 2014/07/29 21:21:43 skrll Exp $"); - -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#include - -#include - -/* - * Utility macros; do not use outside this file. - */ -#define __PB_TYPENAME_PREFIX(BITS) ___CONCAT(uint,BITS) -#define __PB_TYPENAME(BITS) ___CONCAT(__PB_TYPENAME_PREFIX(BITS),_t) - -/* - * void bus_space_read_multi_N(bus_space_tag_t tag, - * bus_space_handle_t bsh, bus_size_t offset, - * uintN_t *addr, bus_size_t count); - * - * Read `count' 1, 2, 4, or 8 byte quantities from bus space - * described by tag/handle/offset and copy into buffer provided. - */ - -#define __COBALT_bus_space_read_multi(BYTES,BITS) \ -void __CONCAT(bus_space_read_multi_,BYTES)\ - (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ - __PB_TYPENAME(BITS) *, bus_size_t);\ - \ -void \ -__CONCAT(bus_space_read_multi_,BYTES)( \ - bus_space_tag_t t, \ - bus_space_handle_t h, \ - bus_size_t o, \ - __PB_TYPENAME(BITS) *a, \ - bus_size_t c) \ -{ \ - \ - while (c--) \ - *a++ = __CONCAT(bus_space_read_,BYTES)(t, h, o); \ -} - -__COBALT_bus_space_read_multi(1,8) -__COBALT_bus_space_read_multi(2,16) -__COBALT_bus_space_read_multi(4,32) - -#if 0 /* Cause a link error for bus_space_read_multi_8 */ -#define bus_space_read_multi_8 !!! bus_space_read_multi_8 unimplemented !!! -#endif - -#undef __COBALT_bus_space_read_multi - /* - * void bus_space_read_region_N(bus_space_tag_t tag, - * bus_space_handle_t bsh, bus_size_t offset, - * uintN_t *addr, bus_size_t count); - * - * Read `count' 1, 2, 4, or 8 byte quantities from bus space - * described by tag/handle and starting at `offset' and copy into - * buffer provided. - */ - -#define __COBALT_bus_space_read_region(BYTES,BITS) \ -void __CONCAT(bus_space_read_region_,BYTES)\ - (bus_space_tag_t, bus_space_handle_t, bus_size_t, \ - __PB_TYPENAME(BITS) *, bus_size_t);\ - \ -void \ -__CONCAT(bus_space_read_region_,BYTES)( \ - bus_space_tag_t t, \ - bus_space_handle_t h, \ - bus_size_t o, \ - __PB_TYPENAME(BITS) *a, \ - bus_size_t c) \ -{ \ - \ - while (c--) { \ - *a++ = __CONCAT(bus_space_read_,BYTES)(t, h, o); \ - o += BYTES; \ - }\ -} - -__COBALT_bus_space_read_region(1,8) -__COBALT_bus_space_read_region(2,16) -__COBALT_bus_space_read_region(4,32) - -#if 0 /* Cause a link error for bus_space_read_region_8 */ -#define bus_space_read_region_8 !!! bus_space_read_region_8 unimplemented !!! -#endif - -#undef __COBALT_bus_space_read_region - -/* - * void bus_space_write_multi_N(bus_space_tag_t tag, - * bus_space_handle_t bsh, bus_size_t offset, - * const uintN_t *addr, bus_size_t count); - * - * Write `count' 1, 2, 4, or 8 byte quantities from the buffer - * provided to bus space described by tag/handle/offset. + * Platform-specific I/O support for the cobalt machines */ -#define __COBALT_bus_space_write_mu
CVS commit: src/sys/arch/cobalt/conf
Module Name:src Committed By: christos Date: Sat Jul 22 19:26:41 UTC 2017 Modified Files: src/sys/arch/cobalt/conf: RAMDISK Log Message: we need to get on a diet To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/arch/cobalt/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/cobalt/conf/RAMDISK diff -u src/sys/arch/cobalt/conf/RAMDISK:1.7 src/sys/arch/cobalt/conf/RAMDISK:1.8 --- src/sys/arch/cobalt/conf/RAMDISK:1.7 Sat Feb 20 20:33:56 2016 +++ src/sys/arch/cobalt/conf/RAMDISK Sat Jul 22 15:26:41 2017 @@ -1,4 +1,4 @@ -# $NetBSD: RAMDISK,v 1.7 2016/02/21 01:33:56 christos Exp $ +# $NetBSD: RAMDISK,v 1.8 2017/07/22 19:26:41 christos Exp $ # # memory disk based configuration file # @@ -9,7 +9,7 @@ include "arch/cobalt/conf/GENERIC" options MEMORY_DISK_HOOKS options MEMORY_DISK_IS_ROOT # force root on memory disk options MEMORY_DISK_SERVER=0 # no userspace md(4) support -options MEMORY_DISK_ROOT_SIZE=7000 # size of memory disk, in blocks +options MEMORY_DISK_ROOT_SIZE=7400 # size of memory disk, in blocks options MEMORY_DISK_RBFLAGS=RB_SINGLE # boot in single-user mode makeoptions COPTS="-Os -mmemcpy" # generates smaller code than -O2, -O1
CVS commit: src/sys/arch/cobalt/conf
Module Name:src Committed By: skrll Date: Tue Nov 22 09:21:51 UTC 2016 Modified Files: src/sys/arch/cobalt/conf: GENERIC64 INSTALL64 RAMDISK64 Log Message: s/COMPAT_NETBSD64/COMPAT_NETBSD32/ so userland works To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/cobalt/conf/GENERIC64 \ src/sys/arch/cobalt/conf/INSTALL64 src/sys/arch/cobalt/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/cobalt/conf/GENERIC64 diff -u src/sys/arch/cobalt/conf/GENERIC64:1.1 src/sys/arch/cobalt/conf/GENERIC64:1.2 --- src/sys/arch/cobalt/conf/GENERIC64:1.1 Thu Dec 17 15:29:47 2009 +++ src/sys/arch/cobalt/conf/GENERIC64 Tue Nov 22 09:21:51 2016 @@ -1,10 +1,10 @@ -# $NetBSD: GENERIC64,v 1.1 2009/12/17 15:29:47 matt Exp $ +# $NetBSD: GENERIC64,v 1.2 2016/11/22 09:21:51 skrll Exp $ include "arch/cobalt/conf/GENERIC" -#ident "GENERIC64-$Revision: 1.1 $" +#ident "GENERIC64-$Revision: 1.2 $" no makeoptions CPUFLAGS makeoptions LP64="yes" options EXEC_ELF64 -options COMPAT_NETBSD64 +options COMPAT_NETBSD32 Index: src/sys/arch/cobalt/conf/INSTALL64 diff -u src/sys/arch/cobalt/conf/INSTALL64:1.1 src/sys/arch/cobalt/conf/INSTALL64:1.2 --- src/sys/arch/cobalt/conf/INSTALL64:1.1 Thu Dec 17 15:29:47 2009 +++ src/sys/arch/cobalt/conf/INSTALL64 Tue Nov 22 09:21:51 2016 @@ -1,10 +1,10 @@ -# $NetBSD: INSTALL64,v 1.1 2009/12/17 15:29:47 matt Exp $ +# $NetBSD: INSTALL64,v 1.2 2016/11/22 09:21:51 skrll Exp $ include "arch/cobalt/conf/INSTALL" -#ident "INSTALL64-$Revision: 1.1 $" +#ident "INSTALL64-$Revision: 1.2 $" no makeoptions CPUFLAGS makeoptions LP64="yes" options EXEC_ELF64 -options COMPAT_NETBSD64 +options COMPAT_NETBSD32 Index: src/sys/arch/cobalt/conf/RAMDISK64 diff -u src/sys/arch/cobalt/conf/RAMDISK64:1.1 src/sys/arch/cobalt/conf/RAMDISK64:1.2 --- src/sys/arch/cobalt/conf/RAMDISK64:1.1 Thu Dec 17 15:29:47 2009 +++ src/sys/arch/cobalt/conf/RAMDISK64 Tue Nov 22 09:21:51 2016 @@ -1,10 +1,10 @@ -# $NetBSD: RAMDISK64,v 1.1 2009/12/17 15:29:47 matt Exp $ +# $NetBSD: RAMDISK64,v 1.2 2016/11/22 09:21:51 skrll Exp $ include "arch/cobalt/conf/RAMDISK" -#ident "RAMDISK64-$Revision: 1.1 $" +#ident "RAMDISK64-$Revision: 1.2 $" no makeoptions CPUFLAGS makeoptions LP64="yes" options EXEC_ELF64 -options COMPAT_NETBSD64 +options COMPAT_NETBSD32
CVS commit: src/sys/arch/cobalt/stand
Module Name:src Committed By: christos Date: Thu Sep 8 14:37:37 UTC 2016 Modified Files: src/sys/arch/cobalt/stand: Makefile.inc src/sys/arch/cobalt/stand/boot: Makefile Log Message: Avoid the PIE To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/cobalt/stand/Makefile.inc cvs rdiff -u -r1.30 -r1.31 src/sys/arch/cobalt/stand/boot/Makefile 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/cobalt/stand/Makefile.inc diff -u src/sys/arch/cobalt/stand/Makefile.inc:1.1 src/sys/arch/cobalt/stand/Makefile.inc:1.2 --- src/sys/arch/cobalt/stand/Makefile.inc:1.1 Thu Mar 30 16:46:16 2000 +++ src/sys/arch/cobalt/stand/Makefile.inc Thu Sep 8 10:37:36 2016 @@ -1,3 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.1 2000/03/30 21:46:16 soren Exp $ +# $NetBSD: Makefile.inc,v 1.2 2016/09/08 14:37:36 christos Exp $ +NOPIE= # defined BINDIR= /usr/mdec Index: src/sys/arch/cobalt/stand/boot/Makefile diff -u src/sys/arch/cobalt/stand/boot/Makefile:1.30 src/sys/arch/cobalt/stand/boot/Makefile:1.31 --- src/sys/arch/cobalt/stand/boot/Makefile:1.30 Tue Jun 23 16:54:43 2015 +++ src/sys/arch/cobalt/stand/boot/Makefile Thu Sep 8 10:37:37 2016 @@ -1,8 +1,8 @@ -# $NetBSD: Makefile,v 1.30 2015/06/23 20:54:43 matt Exp $ +# $NetBSD: Makefile,v 1.31 2016/09/08 14:37:37 christos Exp $ NOMAN= # defined -.include +.include S= ${.CURDIR}/../../../.. MIPS= ${S}/arch/mips
CVS commit: src/sys/arch/cobalt/cobalt
Module Name:src Committed By: skrll Date: Wed Jul 27 11:13:14 UTC 2016 Modified Files: src/sys/arch/cobalt/cobalt: machdep.c Log Message: Fix RB_KDB by calling the debugger entry points after pmap_bootstrap, etc To generate a diff of this commit: cvs rdiff -u -r1.117 -r1.118 src/sys/arch/cobalt/cobalt/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/cobalt/cobalt/machdep.c diff -u src/sys/arch/cobalt/cobalt/machdep.c:1.117 src/sys/arch/cobalt/cobalt/machdep.c:1.118 --- src/sys/arch/cobalt/cobalt/machdep.c:1.117 Mon Jun 29 17:52:53 2015 +++ src/sys/arch/cobalt/cobalt/machdep.c Wed Jul 27 11:13:14 2016 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.117 2015/06/29 17:52:53 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.118 2016/07/27 11:13:14 skrll Exp $ */ /*- * Copyright (c) 2006 Izumi Tsutsui. All rights reserved. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.117 2015/06/29 17:52:53 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.118 2016/07/27 11:13:14 skrll Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -274,15 +274,6 @@ mach_init(int32_t memsize32, u_int bim, ksyms_addsyms_elf(esym - ssym, ssym, esym); #endif KASSERT(&lwp0 == curlwp); -#ifdef DDB - if (boothowto & RB_KDB) - Debugger(); -#endif -#ifdef KGDB - if (boothowto & RB_KDB) - kgdb_connect(0); -#endif - /* * Load the rest of the available pages into the VM system. */ @@ -302,6 +293,16 @@ mach_init(int32_t memsize32, u_int bim, * Allocate space for proc0's USPACE. */ mips_init_lwp0_uarea(); + +#ifdef DDB + if (boothowto & RB_KDB) + Debugger(); +#endif +#ifdef KGDB + if (boothowto & RB_KDB) + kgdb_connect(0); +#endif + } /*
CVS commit: src/sys/arch/cobalt/conf
Module Name:src Committed By: christos Date: Sun Feb 21 01:33:56 UTC 2016 Modified Files: src/sys/arch/cobalt/conf: RAMDISK Log Message: bump size. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/cobalt/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/cobalt/conf/RAMDISK diff -u src/sys/arch/cobalt/conf/RAMDISK:1.6 src/sys/arch/cobalt/conf/RAMDISK:1.7 --- src/sys/arch/cobalt/conf/RAMDISK:1.6 Mon Sep 29 11:02:56 2014 +++ src/sys/arch/cobalt/conf/RAMDISK Sat Feb 20 20:33:56 2016 @@ -1,4 +1,4 @@ -# $NetBSD: RAMDISK,v 1.6 2014/09/29 15:02:56 msaitoh Exp $ +# $NetBSD: RAMDISK,v 1.7 2016/02/21 01:33:56 christos Exp $ # # memory disk based configuration file # @@ -9,7 +9,7 @@ include "arch/cobalt/conf/GENERIC" options MEMORY_DISK_HOOKS options MEMORY_DISK_IS_ROOT # force root on memory disk options MEMORY_DISK_SERVER=0 # no userspace md(4) support -options MEMORY_DISK_ROOT_SIZE=6656 # size of memory disk, in blocks +options MEMORY_DISK_ROOT_SIZE=7000 # size of memory disk, in blocks options MEMORY_DISK_RBFLAGS=RB_SINGLE # boot in single-user mode makeoptions COPTS="-Os -mmemcpy" # generates smaller code than -O2, -O1
CVS commit: src/sys/arch/cobalt/cobalt
Module Name:src Committed By: matt Date: Mon Jun 29 17:52:53 UTC 2015 Modified Files: src/sys/arch/cobalt/cobalt: machdep.c Log Message: use cpu_startup_common To generate a diff of this commit: cvs rdiff -u -r1.116 -r1.117 src/sys/arch/cobalt/cobalt/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/cobalt/cobalt/machdep.c diff -u src/sys/arch/cobalt/cobalt/machdep.c:1.116 src/sys/arch/cobalt/cobalt/machdep.c:1.117 --- src/sys/arch/cobalt/cobalt/machdep.c:1.116 Thu Apr 3 19:15:43 2014 +++ src/sys/arch/cobalt/cobalt/machdep.c Mon Jun 29 17:52:53 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.116 2014/04/03 19:15:43 joerg Exp $ */ +/* $NetBSD: machdep.c,v 1.117 2015/06/29 17:52:53 matt Exp $ */ /*- * Copyright (c) 2006 Izumi Tsutsui. All rights reserved. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.116 2014/04/03 19:15:43 joerg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.117 2015/06/29 17:52:53 matt Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -310,32 +310,7 @@ mach_init(int32_t memsize32, u_int bim, void cpu_startup(void) { - vaddr_t minaddr, maxaddr; - char pbuf[9]; - - /* - * Good {morning,afternoon,evening,night}. - */ - printf("%s%s", copyright, version); - printf("%s\n", cpu_getmodel()); - format_bytes(pbuf, sizeof(pbuf), ctob(physmem)); - printf("total memory = %s\n", pbuf); - - minaddr = 0; - /* - * Allocate a submap for physio. - */ - phys_map = uvm_km_suballoc(kernel_map, &minaddr, &maxaddr, - VM_PHYS_SIZE, 0, false, NULL); - - /* - * (No need to allocate an mbuf cluster submap. Mbuf clusters - * are allocated via the pool allocator, and we use KSEG to - * map those pages.) - */ - - format_bytes(pbuf, sizeof(pbuf), ptoa(uvmexp.free)); - printf("avail memory = %s\n", pbuf); + cpu_startup_common(); } static int waittime = -1;
CVS commit: src/sys/arch/cobalt/stand/boot
Module Name:src Committed By: matt Date: Tue Jun 23 20:54:43 UTC 2015 Modified Files: src/sys/arch/cobalt/stand/boot: Makefile Log Message: Always build for mips3. Use -Os instead -O2 for smallest code size. text goes from 74608 to 63020 To generate a diff of this commit: cvs rdiff -u -r1.29 -r1.30 src/sys/arch/cobalt/stand/boot/Makefile 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/cobalt/stand/boot/Makefile diff -u src/sys/arch/cobalt/stand/boot/Makefile:1.29 src/sys/arch/cobalt/stand/boot/Makefile:1.30 --- src/sys/arch/cobalt/stand/boot/Makefile:1.29 Tue Aug 5 15:40:59 2014 +++ src/sys/arch/cobalt/stand/boot/Makefile Tue Jun 23 20:54:43 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.29 2014/08/05 15:40:59 apb Exp $ +# $NetBSD: Makefile,v 1.30 2015/06/23 20:54:43 matt Exp $ NOMAN= # defined @@ -53,10 +53,12 @@ CPPFLAGS+= -DSUPPORT_DHCP -DSUPPORT_BOOT #CPPFLAGS+= -DRPC_DEBUG -DRARP_DEBUG -DNET_DEBUG -DDEBUG -DPARANOID # compiler flags for smallest code size -CFLAGS= -O2 -mmemcpy -ffreestanding -mno-abicalls -msoft-float -G 128 +CFLAGS= -Os -mmemcpy -ffreestanding -mno-abicalls -msoft-float -G 128 +AFLAGS+= -mips3 +CFLAGS+= -mips3 .if ${MACHINE_ARCH} == "mips64el" -AFLAGS+= -mips3 -mabi=32 -CFLAGS+= -mips3 -mabi=32 +AFLAGS+= -mabi=32 +CFLAGS+= -mabi=32 LINKFORMAT= -m elf32ltsmip .endif
CVS commit: src/sys/arch/cobalt/stand/boot
Module Name:src Committed By: matt Date: Tue Jun 23 20:27:28 UTC 2015 Modified Files: src/sys/arch/cobalt/stand/boot: boot.h Log Message: #include To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/cobalt/stand/boot/boot.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/cobalt/stand/boot/boot.h diff -u src/sys/arch/cobalt/stand/boot/boot.h:1.12 src/sys/arch/cobalt/stand/boot/boot.h:1.13 --- src/sys/arch/cobalt/stand/boot/boot.h:1.12 Thu May 29 14:25:01 2008 +++ src/sys/arch/cobalt/stand/boot/boot.h Tue Jun 23 20:27:28 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: boot.h,v 1.12 2008/05/29 14:25:01 tsutsui Exp $ */ +/* $NetBSD: boot.h,v 1.13 2015/06/23 20:27:28 matt Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -26,6 +26,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include + #if defined(_DEBUG) #define DPRINTF(x) printf x; #else
CVS commit: src/sys/arch/cobalt
Module Name:src Committed By: matt Date: Tue Jun 9 22:47:59 UTC 2015 Modified Files: src/sys/arch/cobalt/dev: com_mainbus.c zs.c src/sys/arch/cobalt/pci: pci_machdep.c Log Message: #include or as needed To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/cobalt/dev/com_mainbus.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/cobalt/dev/zs.c cvs rdiff -u -r1.36 -r1.37 src/sys/arch/cobalt/pci/pci_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/cobalt/dev/com_mainbus.c diff -u src/sys/arch/cobalt/dev/com_mainbus.c:1.19 src/sys/arch/cobalt/dev/com_mainbus.c:1.20 --- src/sys/arch/cobalt/dev/com_mainbus.c:1.19 Sat Jul 9 16:09:01 2011 +++ src/sys/arch/cobalt/dev/com_mainbus.c Tue Jun 9 22:47:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: com_mainbus.c,v 1.19 2011/07/09 16:09:01 matt Exp $ */ +/* $NetBSD: com_mainbus.c,v 1.20 2015/06/09 22:47:59 matt Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang. All rights reserved. @@ -26,10 +26,11 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: com_mainbus.c,v 1.19 2011/07/09 16:09:01 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com_mainbus.c,v 1.20 2015/06/09 22:47:59 matt Exp $"); #include #include +#include #include #include #include Index: src/sys/arch/cobalt/dev/zs.c diff -u src/sys/arch/cobalt/dev/zs.c:1.3 src/sys/arch/cobalt/dev/zs.c:1.4 --- src/sys/arch/cobalt/dev/zs.c:1.3 Mon Apr 28 20:23:16 2008 +++ src/sys/arch/cobalt/dev/zs.c Tue Jun 9 22:47:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: zs.c,v 1.3 2008/04/28 20:23:16 martin Exp $ */ +/* $NetBSD: zs.c,v 1.4 2015/06/09 22:47:59 matt Exp $ */ /*- * Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -37,20 +37,23 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.3 2008/04/28 20:23:16 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.4 2015/06/09 22:47:59 matt Exp $"); #include "opt_ddb.h" #include -#include #include +#include #include -#include #include +#include +#include #include #include +#include + #include #include Index: src/sys/arch/cobalt/pci/pci_machdep.c diff -u src/sys/arch/cobalt/pci/pci_machdep.c:1.36 src/sys/arch/cobalt/pci/pci_machdep.c:1.37 --- src/sys/arch/cobalt/pci/pci_machdep.c:1.36 Tue Jul 29 21:21:44 2014 +++ src/sys/arch/cobalt/pci/pci_machdep.c Tue Jun 9 22:47:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.c,v 1.36 2014/07/29 21:21:44 skrll Exp $ */ +/* $NetBSD: pci_machdep.c,v 1.37 2015/06/09 22:47:59 matt Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang. All rights reserved. @@ -26,14 +26,15 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.36 2014/07/29 21:21:44 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.37 2015/06/09 22:47:59 matt Exp $"); #define _MIPS_BUS_DMA_PRIVATE #include #include -#include +#include #include +#include #include #include #include
CVS commit: src/sys/arch/cobalt/stand/boot
Module Name:src Committed By: christos Date: Fri Nov 21 00:51:09 UTC 2014 Modified Files: src/sys/arch/cobalt/stand/boot: clock.c Log Message: need clock_subr.h for bcdtobin() To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/cobalt/stand/boot/clock.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/cobalt/stand/boot/clock.c diff -u src/sys/arch/cobalt/stand/boot/clock.c:1.4 src/sys/arch/cobalt/stand/boot/clock.c:1.5 --- src/sys/arch/cobalt/stand/boot/clock.c:1.4 Mon Jan 12 06:32:43 2009 +++ src/sys/arch/cobalt/stand/boot/clock.c Thu Nov 20 19:51:09 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.4 2009/01/12 11:32:43 tsutsui Exp $ */ +/* $NetBSD: clock.c,v 1.5 2014/11/21 00:51:09 christos Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -38,6 +38,7 @@ #include #include +#include #include #include
CVS commit: src/sys/arch/cobalt
Module Name:src Committed By: skrll Date: Tue Jul 29 21:21:44 UTC 2014 Modified Files: src/sys/arch/cobalt/cobalt: bus.c mainbus.c src/sys/arch/cobalt/conf: files.cobalt src/sys/arch/cobalt/include: bus_defs.h bus_funcs.h pci_machdep.h src/sys/arch/cobalt/pci: pci_machdep.c Log Message: Convert cobalt to generic mips bus_dma. To generate a diff of this commit: cvs rdiff -u -r1.44 -r1.45 src/sys/arch/cobalt/cobalt/bus.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/cobalt/cobalt/mainbus.c cvs rdiff -u -r1.37 -r1.38 src/sys/arch/cobalt/conf/files.cobalt cvs rdiff -u -r1.1 -r1.2 src/sys/arch/cobalt/include/bus_defs.h \ src/sys/arch/cobalt/include/bus_funcs.h cvs rdiff -u -r1.13 -r1.14 src/sys/arch/cobalt/include/pci_machdep.h cvs rdiff -u -r1.35 -r1.36 src/sys/arch/cobalt/pci/pci_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/cobalt/cobalt/bus.c diff -u src/sys/arch/cobalt/cobalt/bus.c:1.44 src/sys/arch/cobalt/cobalt/bus.c:1.45 --- src/sys/arch/cobalt/cobalt/bus.c:1.44 Tue Oct 2 23:54:51 2012 +++ src/sys/arch/cobalt/cobalt/bus.c Tue Jul 29 21:21:43 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.c,v 1.44 2012/10/02 23:54:51 christos Exp $ */ +/* $NetBSD: bus.c,v 1.45 2014/07/29 21:21:43 skrll Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,9 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.44 2012/10/02 23:54:51 christos Exp $"); - -#define _COBALT_BUS_DMA_PRIVATE +__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.45 2014/07/29 21:21:43 skrll Exp $"); #include #include @@ -56,25 +54,6 @@ __KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.44 #define __PB_TYPENAME_PREFIX(BITS) ___CONCAT(uint,BITS) #define __PB_TYPENAME(BITS) ___CONCAT(__PB_TYPENAME_PREFIX(BITS),_t) -static int _bus_dmamap_load_buffer(bus_dmamap_t, void *, bus_size_t, -struct vmspace *, int, vaddr_t *, int *, int); - -struct cobalt_bus_dma_tag cobalt_default_bus_dma_tag = { - _bus_dmamap_create, - _bus_dmamap_destroy, - _bus_dmamap_load, - _bus_dmamap_load_mbuf, - _bus_dmamap_load_uio, - _bus_dmamap_load_raw, - _bus_dmamap_unload, - _bus_dmamap_sync, - _bus_dmamem_alloc, - _bus_dmamem_free, - _bus_dmamem_map, - _bus_dmamem_unmap, - _bus_dmamem_mmap, -}; - /* * void bus_space_read_multi_N(bus_space_tag_t tag, * bus_space_handle_t bsh, bus_size_t offset, @@ -418,562 +397,3 @@ bus_space_mmap(bus_space_tag_t t, bus_ad /* XXX not implemented */ return -1; } - -/* - * Common function for DMA map creation. May be called by bus-specific - * 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) -{ - struct cobalt_bus_dmamap *map; - void *mapstore; - size_t mapsize; - - /* - * Allocate and initialize the DMA map. The end of the map - * is a variable-sized array of segments, so we allocate enough - * room for them in one shot. - * - * Note we don't preserve the WAITOK or NOWAIT flags. Preservation - * of ALLOCNOW notifies others that we've reserved these resources, - * and they are not to be freed. - * - * The bus_dmamap_t includes one bus_dma_segment_t, hence - * the (nsegments - 1). - */ - mapsize = sizeof(struct cobalt_bus_dmamap) + - (sizeof(bus_dma_segment_t) * (nsegments - 1)); - if ((mapstore = malloc(mapsize, M_DMAMAP, - (flags & BUS_DMA_NOWAIT) ? M_NOWAIT : M_WAITOK)) == NULL) - return ENOMEM; - - memset(mapstore, 0, mapsize); - map = (struct cobalt_bus_dmamap *)mapstore; - map->_dm_size = size; - map->_dm_segcnt = nsegments; - map->_dm_maxmaxsegsz = maxsegsz; - map->_dm_boundary = boundary; - map->_dm_flags = flags & ~(BUS_DMA_WAITOK|BUS_DMA_NOWAIT); - map->_dm_vmspace = NULL; - map->dm_maxsegsz = maxsegsz; - map->dm_mapsize = 0; /* no valid mappings */ - map->dm_nsegs = 0; - - *dmamp = map; - return 0; -} - -/* - * Common function for DMA map destruction. May be called by bus-specific - * DMA map destruction functions. - */ -void -_bus_dmamap_destroy(bus_dma_tag_t t, bus_dmamap_t map) -{ - - free(map, M_DMAMAP); -} - -extern paddr_t kvtophys(vaddr_t); /* XXX */ - -/* - * Utility function to load a linear buffer. lastaddrp holds state - * between invocations (for multiple-buffer loads). segp contains - * the starting segment on entrance, and the ending segment on exit. - * first indicates if this is the first invocation of this function. - */ -int -_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; - vaddr_t vaddr = (vaddr_t)buf; - paddr_t pa; - int seg; - - lastaddr = *lastaddrp; - bmask = ~(map->_dm_boundary - 1); - - for (seg = *segp; buflen > 0 ; ) { - /* - * Get the physical address for this segment. - */ - if (!VMS
CVS commit: src/sys/arch/cobalt/cobalt
Module Name:src Committed By: joerg Date: Thu Apr 3 19:15:43 UTC 2014 Modified Files: src/sys/arch/cobalt/cobalt: machdep.c Log Message: GC nsym To generate a diff of this commit: cvs rdiff -u -r1.115 -r1.116 src/sys/arch/cobalt/cobalt/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/cobalt/cobalt/machdep.c diff -u src/sys/arch/cobalt/cobalt/machdep.c:1.115 src/sys/arch/cobalt/cobalt/machdep.c:1.116 --- src/sys/arch/cobalt/cobalt/machdep.c:1.115 Mon Mar 24 20:06:31 2014 +++ src/sys/arch/cobalt/cobalt/machdep.c Thu Apr 3 19:15:43 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.115 2014/03/24 20:06:31 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.116 2014/04/03 19:15:43 joerg Exp $ */ /*- * Copyright (c) 2006 Izumi Tsutsui. All rights reserved. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.115 2014/03/24 20:06:31 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.116 2014/04/03 19:15:43 joerg Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -141,7 +141,6 @@ mach_init(int32_t memsize32, u_int bim, extern char edata[], end[]; const char *bi_msg; #if NKSYMS || defined(DDB) || defined(MODULAR) - int nsym = 0; char *ssym = 0; struct btinfo_symtab *bi_syms; #endif @@ -206,7 +205,6 @@ mach_init(int32_t memsize32, u_int bim, /* Load symbol table if present */ if (bi_syms != NULL) { - nsym = bi_syms->nsym; ssym = (void *)(intptr_t)bi_syms->ssym; esym = (void *)(intptr_t)bi_syms->esym; kernend = (void *)mips_round_page(esym);
CVS commit: src/sys/arch/cobalt/stand/boot
Module Name:src Committed By: joerg Date: Thu Apr 3 18:49:41 UTC 2014 Modified Files: src/sys/arch/cobalt/stand/boot: wd.c Log Message: Avoid type pruning. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/cobalt/stand/boot/wd.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/cobalt/stand/boot/wd.c diff -u src/sys/arch/cobalt/stand/boot/wd.c:1.15 src/sys/arch/cobalt/stand/boot/wd.c:1.16 --- src/sys/arch/cobalt/stand/boot/wd.c:1.15 Sun Jul 17 20:54:38 2011 +++ src/sys/arch/cobalt/stand/boot/wd.c Thu Apr 3 18:49:41 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.15 2011/07/17 20:54:38 joerg Exp $ */ +/* $NetBSD: wd.c,v 1.16 2014/04/03 18:49:41 joerg Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -157,6 +157,7 @@ wdgetdisklabel(struct wd_softc *wd) size_t rsize; struct disklabel *lp; uint8_t buf[DEV_BSIZE]; + uint16_t magic; wdgetdefaultlabel(wd, &wd->sc_label); @@ -167,7 +168,8 @@ wdgetdisklabel(struct wd_softc *wd) if (wdstrategy(wd, F_READ, MBR_BBSECTOR, DEV_BSIZE, buf, &rsize)) return EOFFSET; - if (*(uint16_t *)&buf[MBR_MAGIC_OFFSET] == MBR_MAGIC) { + memcpy(&magic, &buf[MBR_MAGIC_OFFSET], sizeof(magic)); + if (magic == MBR_MAGIC) { int i; struct mbr_partition *mp;
CVS commit: src/sys/arch/cobalt/stand/boot
Module Name:src Committed By: joerg Date: Thu Apr 3 18:49:52 UTC 2014 Modified Files: src/sys/arch/cobalt/stand/boot: wdc.c Log Message: GC found. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/cobalt/stand/boot/wdc.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/cobalt/stand/boot/wdc.c diff -u src/sys/arch/cobalt/stand/boot/wdc.c:1.13 src/sys/arch/cobalt/stand/boot/wdc.c:1.14 --- src/sys/arch/cobalt/stand/boot/wdc.c:1.13 Tue Jan 19 15:28:52 2010 +++ src/sys/arch/cobalt/stand/boot/wdc.c Thu Apr 3 18:49:52 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: wdc.c,v 1.13 2010/01/19 15:28:52 tsutsui Exp $ */ +/* $NetBSD: wdc.c,v 1.14 2014/04/03 18:49:52 joerg Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -115,7 +115,6 @@ wdcprobe(struct wdc_channel *chp) uint8_t st0, st1; uint8_t ret_value = 0x03; uint8_t drive; - int found; /* * Sanity check to see if the wdc channel responds at all. @@ -157,7 +156,6 @@ wdcprobe(struct wdc_channel *chp) * something here assume it's ATA or OLD. Ghost will be killed later in * attach routine. */ - found = 0; for (drive = 0; drive < 2; drive++) { if ((ret_value & (0x01 << drive)) == 0) continue;
CVS commit: src/sys/arch/cobalt/pci
Module Name:src Committed By: christos Date: Wed Mar 26 15:47:00 UTC 2014 Modified Files: src/sys/arch/cobalt/pci: pci_machdep.c Log Message: kill sprintf To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/cobalt/pci/pci_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/cobalt/pci/pci_machdep.c diff -u src/sys/arch/cobalt/pci/pci_machdep.c:1.33 src/sys/arch/cobalt/pci/pci_machdep.c:1.34 --- src/sys/arch/cobalt/pci/pci_machdep.c:1.33 Sat Oct 27 13:17:44 2012 +++ src/sys/arch/cobalt/pci/pci_machdep.c Wed Mar 26 11:47:00 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.c,v 1.33 2012/10/27 17:17:44 chs Exp $ */ +/* $NetBSD: pci_machdep.c,v 1.34 2014/03/26 15:47:00 christos Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang. All rights reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.33 2012/10/27 17:17:44 chs Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.34 2014/03/26 15:47:00 christos Exp $"); #define _COBALT_BUS_DMA_PRIVATE @@ -188,9 +188,9 @@ pci_intr_string(pci_chipset_tag_t pc, pc static char irqstr[8]; if (ih >= NICU_INT) - sprintf(irqstr, "level %d", ih - NICU_INT); + snprintf(irqstr, sizeof(irqstr), "level %d", ih - NICU_INT); else - sprintf(irqstr, "irq %d", ih); + snprintf(irqstr, sizeof(irqstr), "irq %d", ih); return irqstr; }
CVS commit: src/sys/arch/cobalt
Module Name:src Committed By: matt Date: Sat Jul 9 16:09:03 UTC 2011 Modified Files: src/sys/arch/cobalt/cobalt: autoconf.c bus.c machdep.c src/sys/arch/cobalt/dev: com_mainbus.c gt.c src/sys/arch/cobalt/pci: pci_machdep.c pcib.c pciide_machdep.c Log Message: Cleanup kernel files to use sys variants for bus.h, cpu.h, and intr.h Use for db_machdep.h and psl.h To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/cobalt/cobalt/autoconf.c cvs rdiff -u -r1.40 -r1.41 src/sys/arch/cobalt/cobalt/bus.c cvs rdiff -u -r1.111 -r1.112 src/sys/arch/cobalt/cobalt/machdep.c cvs rdiff -u -r1.18 -r1.19 src/sys/arch/cobalt/dev/com_mainbus.c cvs rdiff -u -r1.26 -r1.27 src/sys/arch/cobalt/dev/gt.c cvs rdiff -u -r1.31 -r1.32 src/sys/arch/cobalt/pci/pci_machdep.c cvs rdiff -u -r1.20 -r1.21 src/sys/arch/cobalt/pci/pcib.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/cobalt/pci/pciide_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/cobalt/cobalt/autoconf.c diff -u src/sys/arch/cobalt/cobalt/autoconf.c:1.28 src/sys/arch/cobalt/cobalt/autoconf.c:1.29 --- src/sys/arch/cobalt/cobalt/autoconf.c:1.28 Sat Mar 22 18:32:20 2008 +++ src/sys/arch/cobalt/cobalt/autoconf.c Sat Jul 9 16:09:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.28 2008/03/22 18:32:20 tsutsui Exp $ */ +/* $NetBSD: autoconf.c,v 1.29 2011/07/09 16:09:01 matt Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang. All rights reserved. @@ -26,16 +26,15 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.28 2008/03/22 18:32:20 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.29 2011/07/09 16:09:01 matt Exp $"); #include -#include #include +#include #include #include - -#include -#include +#include +#include #include #include Index: src/sys/arch/cobalt/cobalt/bus.c diff -u src/sys/arch/cobalt/cobalt/bus.c:1.40 src/sys/arch/cobalt/cobalt/bus.c:1.41 --- src/sys/arch/cobalt/cobalt/bus.c:1.40 Tue May 3 09:15:20 2011 +++ src/sys/arch/cobalt/cobalt/bus.c Sat Jul 9 16:09:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.c,v 1.40 2011/05/03 09:15:20 tsutsui Exp $ */ +/* $NetBSD: bus.c,v 1.41 2011/07/09 16:09:01 matt Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,9 +31,12 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.40 2011/05/03 09:15:20 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.41 2011/07/09 16:09:01 matt Exp $"); + +#define _COBALT_BUS_DMA_PRIVATE #include +#include #include #include #include @@ -41,9 +44,6 @@ #include #include -#define _COBALT_BUS_DMA_PRIVATE -#include - #include #include Index: src/sys/arch/cobalt/cobalt/machdep.c diff -u src/sys/arch/cobalt/cobalt/machdep.c:1.111 src/sys/arch/cobalt/cobalt/machdep.c:1.112 --- src/sys/arch/cobalt/cobalt/machdep.c:1.111 Sun Feb 20 15:47:28 2011 +++ src/sys/arch/cobalt/cobalt/machdep.c Sat Jul 9 16:09:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.111 2011/02/20 15:47:28 tsutsui Exp $ */ +/* $NetBSD: machdep.c,v 1.112 2011/07/09 16:09:01 matt Exp $ */ /*- * Copyright (c) 2006 Izumi Tsutsui. All rights reserved. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.111 2011/02/20 15:47:28 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.112 2011/07/09 16:09:01 matt Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -72,9 +72,9 @@ #include #include -#include #include +#include #include @@ -87,7 +87,7 @@ #include "ksyms.h" #if NKSYMS || defined(DDB) || defined(MODULAR) -#include +#include #include #define ELFSIZE DB_ELFSIZE #include Index: src/sys/arch/cobalt/dev/com_mainbus.c diff -u src/sys/arch/cobalt/dev/com_mainbus.c:1.18 src/sys/arch/cobalt/dev/com_mainbus.c:1.19 --- src/sys/arch/cobalt/dev/com_mainbus.c:1.18 Fri Jul 1 20:36:42 2011 +++ src/sys/arch/cobalt/dev/com_mainbus.c Sat Jul 9 16:09:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: com_mainbus.c,v 1.18 2011/07/01 20:36:42 dyoung Exp $ */ +/* $NetBSD: com_mainbus.c,v 1.19 2011/07/09 16:09:01 matt Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang. All rights reserved. @@ -26,16 +26,16 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: com_mainbus.c,v 1.18 2011/07/01 20:36:42 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com_mainbus.c,v 1.19 2011/07/09 16:09:01 matt Exp $"); #include -#include +#include #include +#include +#include #include #include -#include -#include #include #include Index: src/sys/arch/cobalt/dev/gt.c diff -u src/sys/arch/cobalt/dev/gt.c:1.26 src/sys/arch/cobalt/dev/gt.c:1.27 --- src/sys/arch/cobalt/dev/gt.c:1.26 Fri Jul 1 20:36:42 2011 +++ src/sys/arch/cobalt/dev/gt.c Sat Jul 9 16:09:01 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: gt.c,v 1.26 2011/07/01 20:36:42 dyoung Exp $ */ +/* $NetBSD: gt.c,v 1.27 2011/07/09 16:09:01 matt Exp $ */ /* * Copyright (c) 2000 So
CVS commit: src/sys/arch/cobalt/stand/boot
Module Name:src Committed By: matt Date: Sat Jul 9 15:50:38 UTC 2011 Modified Files: src/sys/arch/cobalt/stand/boot: Makefile Log Message: Use TOOL_GZIP To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/cobalt/stand/boot/Makefile 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/cobalt/stand/boot/Makefile diff -u src/sys/arch/cobalt/stand/boot/Makefile:1.23 src/sys/arch/cobalt/stand/boot/Makefile:1.24 --- src/sys/arch/cobalt/stand/boot/Makefile:1.23 Sun Feb 20 07:54:11 2011 +++ src/sys/arch/cobalt/stand/boot/Makefile Sat Jul 9 15:50:38 2011 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.23 2011/02/20 07:54:11 matt Exp $ +# $NetBSD: Makefile,v 1.24 2011/07/09 15:50:38 matt Exp $ NOMAN= # defined @@ -109,7 +109,7 @@ ${PROG}: ${LDSCRIPT} ${OBJS} ${LIBS} ${LD} ${LINKFORMAT} -Map ${PROG}.map -N -x -Ttext ${LOAD_ADDRESS} \ -T ${LDSCRIPT} -e start -o ${PROG} ${OBJS} ${LIBS} - gzip -c9 ${PROG} > ${PROG}.gz + ${TOOL_GZIP} -c9 ${PROG} > ${PROG}.gz @${SIZE} ${PROG} CLEANFILES+= ${PROG}.map ${PROG}.elf ${PROG}.gz
CVS commit: src/sys/arch/cobalt/stand/boot
Module Name:src Committed By: mrg Date: Thu Jul 7 06:01:51 UTC 2011 Modified Files: src/sys/arch/cobalt/stand/boot: wd.c Log Message: avoid pointer aliasing issues To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/cobalt/stand/boot/wd.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/cobalt/stand/boot/wd.c diff -u src/sys/arch/cobalt/stand/boot/wd.c:1.13 src/sys/arch/cobalt/stand/boot/wd.c:1.14 --- src/sys/arch/cobalt/stand/boot/wd.c:1.13 Sun Jul 11 17:09:27 2010 +++ src/sys/arch/cobalt/stand/boot/wd.c Thu Jul 7 06:01:51 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.13 2010/07/11 17:09:27 he Exp $ */ +/* $NetBSD: wd.c,v 1.14 2011/07/07 06:01:51 mrg Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -55,11 +55,12 @@ { int error; uint8_t buf[DEV_BSIZE]; + struct ataparams *params = (struct ataparams *)buf; if ((error = wdc_exec_identify(wd, buf)) != 0) return error; - wd->sc_params = *(struct ataparams *)buf; + wd->sc_params = *params; /* 48-bit LBA addressing */ if ((wd->sc_params.atap_cmd2_en & ATA_CMD2_LBA48) != 0)
CVS commit: src/sys/arch/cobalt/pci
Module Name:src Committed By: dyoung Date: Fri Jul 1 20:37:08 UTC 2011 Modified Files: src/sys/arch/cobalt/pci: pchb.c pci_machdep.c pcib.c Log Message: #include instead of . To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/cobalt/pci/pchb.c cvs rdiff -u -r1.30 -r1.31 src/sys/arch/cobalt/pci/pci_machdep.c cvs rdiff -u -r1.19 -r1.20 src/sys/arch/cobalt/pci/pcib.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/cobalt/pci/pchb.c diff -u src/sys/arch/cobalt/pci/pchb.c:1.10 src/sys/arch/cobalt/pci/pchb.c:1.11 --- src/sys/arch/cobalt/pci/pchb.c:1.10 Fri May 9 10:59:55 2008 +++ src/sys/arch/cobalt/pci/pchb.c Fri Jul 1 20:37:08 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pchb.c,v 1.10 2008/05/09 10:59:55 tsutsui Exp $ */ +/* $NetBSD: pchb.c,v 1.11 2011/07/01 20:37:08 dyoung Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang. All rights reserved. @@ -26,14 +26,14 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.10 2008/05/09 10:59:55 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pchb.c,v 1.11 2011/07/01 20:37:08 dyoung Exp $"); #include #include #include #include -#include +#include #include #include Index: src/sys/arch/cobalt/pci/pci_machdep.c diff -u src/sys/arch/cobalt/pci/pci_machdep.c:1.30 src/sys/arch/cobalt/pci/pci_machdep.c:1.31 --- src/sys/arch/cobalt/pci/pci_machdep.c:1.30 Tue May 3 09:15:20 2011 +++ src/sys/arch/cobalt/pci/pci_machdep.c Fri Jul 1 20:37:08 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pci_machdep.c,v 1.30 2011/05/03 09:15:20 tsutsui Exp $ */ +/* $NetBSD: pci_machdep.c,v 1.31 2011/07/01 20:37:08 dyoung Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang. All rights reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.30 2011/05/03 09:15:20 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pci_machdep.c,v 1.31 2011/07/01 20:37:08 dyoung Exp $"); #include #include @@ -37,7 +37,7 @@ #include #define _COBALT_BUS_DMA_PRIVATE -#include +#include #include #include Index: src/sys/arch/cobalt/pci/pcib.c diff -u src/sys/arch/cobalt/pci/pcib.c:1.19 src/sys/arch/cobalt/pci/pcib.c:1.20 --- src/sys/arch/cobalt/pci/pcib.c:1.19 Fri May 9 10:59:55 2008 +++ src/sys/arch/cobalt/pci/pcib.c Fri Jul 1 20:37:08 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: pcib.c,v 1.19 2008/05/09 10:59:55 tsutsui Exp $ */ +/* $NetBSD: pcib.c,v 1.20 2011/07/01 20:37:08 dyoung Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang. All rights reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.19 2008/05/09 10:59:55 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pcib.c,v 1.20 2011/07/01 20:37:08 dyoung Exp $"); #include #include @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include
CVS commit: src/sys/arch/cobalt
Module Name:src Committed By: dyoung Date: Fri Jul 1 20:36:42 UTC 2011 Modified Files: src/sys/arch/cobalt/cobalt: console.c interrupt.c src/sys/arch/cobalt/dev: com_mainbus.c gt.c mcclock.c panel.c Log Message: #include instead of . To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/cobalt/cobalt/console.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/cobalt/cobalt/interrupt.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/cobalt/dev/com_mainbus.c cvs rdiff -u -r1.25 -r1.26 src/sys/arch/cobalt/dev/gt.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/cobalt/dev/mcclock.c cvs rdiff -u -r1.21 -r1.22 src/sys/arch/cobalt/dev/panel.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/cobalt/cobalt/console.c diff -u src/sys/arch/cobalt/cobalt/console.c:1.11 src/sys/arch/cobalt/cobalt/console.c:1.12 --- src/sys/arch/cobalt/cobalt/console.c:1.11 Thu Mar 27 15:21:46 2008 +++ src/sys/arch/cobalt/cobalt/console.c Fri Jul 1 20:36:42 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: console.c,v 1.11 2008/03/27 15:21:46 tsutsui Exp $ */ +/* $NetBSD: console.c,v 1.12 2011/07/01 20:36:42 dyoung Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang. All rights reserved. @@ -26,14 +26,14 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: console.c,v 1.11 2008/03/27 15:21:46 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: console.c,v 1.12 2011/07/01 20:36:42 dyoung Exp $"); #include #include #include #include -#include +#include #include #include Index: src/sys/arch/cobalt/cobalt/interrupt.c diff -u src/sys/arch/cobalt/cobalt/interrupt.c:1.6 src/sys/arch/cobalt/cobalt/interrupt.c:1.7 --- src/sys/arch/cobalt/cobalt/interrupt.c:1.6 Sun Feb 20 07:54:10 2011 +++ src/sys/arch/cobalt/cobalt/interrupt.c Fri Jul 1 20:36:42 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: interrupt.c,v 1.6 2011/02/20 07:54:10 matt Exp $ */ +/* $NetBSD: interrupt.c,v 1.7 2011/07/01 20:36:42 dyoung Exp $ */ /*- * Copyright (c) 2006 Izumi Tsutsui. All rights reserved. @@ -79,7 +79,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.6 2011/02/20 07:54:10 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: interrupt.c,v 1.7 2011/07/01 20:36:42 dyoung Exp $"); #define __INTR_PRIVATE @@ -89,7 +89,7 @@ #include #include -#include +#include #include #include Index: src/sys/arch/cobalt/dev/com_mainbus.c diff -u src/sys/arch/cobalt/dev/com_mainbus.c:1.17 src/sys/arch/cobalt/dev/com_mainbus.c:1.18 --- src/sys/arch/cobalt/dev/com_mainbus.c:1.17 Thu Mar 27 15:21:46 2008 +++ src/sys/arch/cobalt/dev/com_mainbus.c Fri Jul 1 20:36:42 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: com_mainbus.c,v 1.17 2008/03/27 15:21:46 tsutsui Exp $ */ +/* $NetBSD: com_mainbus.c,v 1.18 2011/07/01 20:36:42 dyoung Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang. All rights reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: com_mainbus.c,v 1.17 2008/03/27 15:21:46 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: com_mainbus.c,v 1.18 2011/07/01 20:36:42 dyoung Exp $"); #include #include @@ -35,7 +35,7 @@ #include #include -#include +#include #include #include Index: src/sys/arch/cobalt/dev/gt.c diff -u src/sys/arch/cobalt/dev/gt.c:1.25 src/sys/arch/cobalt/dev/gt.c:1.26 --- src/sys/arch/cobalt/dev/gt.c:1.25 Tue May 17 17:34:48 2011 +++ src/sys/arch/cobalt/dev/gt.c Fri Jul 1 20:36:42 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: gt.c,v 1.25 2011/05/17 17:34:48 dyoung Exp $ */ +/* $NetBSD: gt.c,v 1.26 2011/07/01 20:36:42 dyoung Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang. All rights reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.25 2011/05/17 17:34:48 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.26 2011/07/01 20:36:42 dyoung Exp $"); #include "opt_pci.h" #include "pci.h" @@ -48,7 +48,7 @@ #include #include -#include +#include #include #include Index: src/sys/arch/cobalt/dev/mcclock.c diff -u src/sys/arch/cobalt/dev/mcclock.c:1.4 src/sys/arch/cobalt/dev/mcclock.c:1.5 --- src/sys/arch/cobalt/dev/mcclock.c:1.4 Sat Mar 29 05:42:45 2008 +++ src/sys/arch/cobalt/dev/mcclock.c Fri Jul 1 20:36:42 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: mcclock.c,v 1.4 2008/03/29 05:42:45 tsutsui Exp $ */ +/* $NetBSD: mcclock.c,v 1.5 2011/07/01 20:36:42 dyoung Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: mcclock.c,v 1.4 2008/03/29 05:42:45 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: mcclock.c,v 1.5 2011/07/01 20:36:42 dyoung Exp $"); #include /* RCS ID & Copyright macro defns */ @@ -38,7 +38,7 @@ #include #include -#include +#include #include #include Index: src/sys/arch/cobalt/dev/panel.c diff -u src/sys/arch/cobalt/dev/panel.c:1.21 src/sys/arch/cobalt/dev/panel.c:1.22 --- src/sys/arch/cobalt/dev/panel.c:1.21 Tue May 3 09:15:20 2011 +++ src/sys/a
CVS commit: src/sys/arch/cobalt
Module Name:src Committed By: tsutsui Date: Tue May 3 09:15:20 UTC 2011 Modified Files: src/sys/arch/cobalt/cobalt: bus.c src/sys/arch/cobalt/conf: GENERIC INSTALL RAMDISK majors.cobalt src/sys/arch/cobalt/dev: panel.c src/sys/arch/cobalt/include: cpu.h src/sys/arch/cobalt/pci: pci_machdep.c Log Message: TAB/space cosmetics. To generate a diff of this commit: cvs rdiff -u -r1.39 -r1.40 src/sys/arch/cobalt/cobalt/bus.c cvs rdiff -u -r1.129 -r1.130 src/sys/arch/cobalt/conf/GENERIC cvs rdiff -u -r1.43 -r1.44 src/sys/arch/cobalt/conf/INSTALL cvs rdiff -u -r1.4 -r1.5 src/sys/arch/cobalt/conf/RAMDISK cvs rdiff -u -r1.28 -r1.29 src/sys/arch/cobalt/conf/majors.cobalt cvs rdiff -u -r1.20 -r1.21 src/sys/arch/cobalt/dev/panel.c cvs rdiff -u -r1.14 -r1.15 src/sys/arch/cobalt/include/cpu.h cvs rdiff -u -r1.29 -r1.30 src/sys/arch/cobalt/pci/pci_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/cobalt/cobalt/bus.c diff -u src/sys/arch/cobalt/cobalt/bus.c:1.39 src/sys/arch/cobalt/cobalt/bus.c:1.40 --- src/sys/arch/cobalt/cobalt/bus.c:1.39 Sun Feb 20 07:54:10 2011 +++ src/sys/arch/cobalt/cobalt/bus.c Tue May 3 09:15:20 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.c,v 1.39 2011/02/20 07:54:10 matt Exp $ */ +/* $NetBSD: bus.c,v 1.40 2011/05/03 09:15:20 tsutsui Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.39 2011/02/20 07:54:10 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.40 2011/05/03 09:15:20 tsutsui Exp $"); #include #include @@ -683,6 +683,6 @@ rv = _bus_dmamem_mmap_common(t, segs, nsegs, off, prot, flags); if (rv == (bus_addr_t)-1) return (-1); - + return (mips_btop((char *)rv)); } Index: src/sys/arch/cobalt/conf/GENERIC diff -u src/sys/arch/cobalt/conf/GENERIC:1.129 src/sys/arch/cobalt/conf/GENERIC:1.130 --- src/sys/arch/cobalt/conf/GENERIC:1.129 Sun Mar 6 17:08:21 2011 +++ src/sys/arch/cobalt/conf/GENERIC Tue May 3 09:15:20 2011 @@ -1,7 +1,7 @@ -# $NetBSD: GENERIC,v 1.129 2011/03/06 17:08:21 bouyer Exp $ +# $NetBSD: GENERIC,v 1.130 2011/05/03 09:15:20 tsutsui 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 @@ options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.129 $" +#ident "GENERIC-$Revision: 1.130 $" maxusers 32 @@ -37,7 +37,7 @@ #options PIPE_SOCKETPAIR # smaller, but slower pipe(2) options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel -# Enable experimental buffer queue strategy for better responsiveness under +# Enable experimental buffer queue strategy for better responsiveness under # high disk I/O load. Use it with caution - it's not proven to be stable yet. #options BUFQ_READPRIO #options BUFQ_PRIOCSCAN Index: src/sys/arch/cobalt/conf/INSTALL diff -u src/sys/arch/cobalt/conf/INSTALL:1.43 src/sys/arch/cobalt/conf/INSTALL:1.44 --- src/sys/arch/cobalt/conf/INSTALL:1.43 Sun Mar 6 17:08:21 2011 +++ src/sys/arch/cobalt/conf/INSTALL Tue May 3 09:15:20 2011 @@ -1,16 +1,16 @@ -# $NetBSD: INSTALL,v 1.43 2011/03/06 17:08:21 bouyer Exp $ +# $NetBSD: INSTALL,v 1.44 2011/05/03 09:15:20 tsutsui Exp $ # # INSTALL -- installation and rescue kernel. # # This kernel should be derived from GENERIC with most features # commented out to shoehorn into Cobalt kernel size limitations. -# +# include "arch/cobalt/conf/std.cobalt" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "INSTALL-$Revision: 1.43 $" +#ident "INSTALL-$Revision: 1.44 $" makeoptions COPTS="-Os -mmemcpy" makeoptions CPUFLAGS="-march=vr5000 -mabi=32" @@ -32,7 +32,7 @@ options PIPE_SOCKETPAIR # smaller, but slower pipe(2) #options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel -# Enable experimental buffer queue strategy for better responsiveness under +# Enable experimental buffer queue strategy for better responsiveness under # high disk I/O load. Use it with caution - it's not proven to be stable yet. #options BUFQ_READPRIO #options BUFQ_PRIOCSCAN Index: src/sys/arch/cobalt/conf/RAMDISK diff -u src/sys/arch/cobalt/conf/RAMDISK:1.4 src/sys/arch/cobalt/conf/RAMDISK:1.5 --- src/sys/arch/cobalt/conf/RAMDISK:1.4 Tue Nov 23 11:13:55 2010 +++ src/sys/arch/cobalt/conf/RAMDISK Tue May 3 09:15:20 2011 @@ -1,4 +1,4 @@ -# $NetBSD: RAMDISK,v 1.4 2010/11/23 11:13:55 hannken Exp $ +# $NetBSD: RAMDISK,v 1.5 2011/05/03 09:15:20 tsutsui Exp $ # # memory disk based configuration file # @@ -14,4 +14,4 @@ makeoptions COPTS="-Os -mmemcpy" # generates smaller code than -O2, -O1 -pseudo-device md +pseudo-dev
CVS commit: src/sys/arch/cobalt/dev
Module Name:src Committed By: dyoung Date: Fri Apr 15 21:03:31 UTC 2011 Modified Files: src/sys/arch/cobalt/dev: gt.c Log Message: Don't set pba.pba_flags twice. No functional change intended. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/sys/arch/cobalt/dev/gt.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/cobalt/dev/gt.c diff -u src/sys/arch/cobalt/dev/gt.c:1.23 src/sys/arch/cobalt/dev/gt.c:1.24 --- src/sys/arch/cobalt/dev/gt.c:1.23 Sun Feb 20 07:54:11 2011 +++ src/sys/arch/cobalt/dev/gt.c Fri Apr 15 21:03:31 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: gt.c,v 1.23 2011/02/20 07:54:11 matt Exp $ */ +/* $NetBSD: gt.c,v 1.24 2011/04/15 21:03:31 dyoung Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang. All rights reserved. @@ -26,7 +26,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.23 2011/02/20 07:54:11 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: gt.c,v 1.24 2011/04/15 21:03:31 dyoung Exp $"); #include "opt_pci.h" #include "pci.h" @@ -135,7 +135,6 @@ #endif pba.pba_dmat = &pci_bus_dma_tag; pba.pba_dmat64 = NULL; - pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED; pba.pba_bus = 0; pba.pba_bridgetag = NULL; pba.pba_flags = PCI_FLAGS_IO_ENABLED | PCI_FLAGS_MEM_ENABLED |
CVS commit: src/sys/arch/cobalt
Module Name:src Committed By: dyoung Date: Mon Apr 4 19:45:00 UTC 2011 Modified Files: src/sys/arch/cobalt: Makefile Log Message: Fix target 'tags'. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/cobalt/Makefile 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/cobalt/Makefile diff -u src/sys/arch/cobalt/Makefile:1.5 src/sys/arch/cobalt/Makefile:1.6 --- src/sys/arch/cobalt/Makefile:1.5 Sat Oct 25 22:27:37 2008 +++ src/sys/arch/cobalt/Makefile Mon Apr 4 19:45:00 2011 @@ -1,14 +1,16 @@ -# $NetBSD: Makefile,v 1.5 2008/10/25 22:27:37 apb Exp $ +# $NetBSD: Makefile,v 1.6 2011/04/04 19:45:00 dyoung Exp $ # Makefile for cobalt tags file # Find where mips source files are for inclusion in tags .include <../mips/Makefile.inc> -TCOBALT= ../cobalt/tags -SCOBALT= ../cobalt/cobalt/*.[ch] ../cobalt/include/*.h \ - ../cobalt/dev/*.[ch] ../cobalt/pci/*.[ch] -ACOBALT= ../cobalt/cobalt/*.S +TCOBALT= ${SYSDIR}/arch/cobalt/tags +SCOBALT= ${SYSDIR}/arch/cobalt/cobalt/*.[ch] \ + ${SYSDIR}/arch/cobalt/include/*.h \ + ${SYSDIR}/arch/cobalt/dev/*.[ch] \ + ${SYSDIR}/arch/cobalt/pci/*.[ch] +ACOBALT= ${SYSDIR}/arch/cobalt/cobalt/*.S # Directories in which to place tags links DCOBALT= pci include @@ -16,7 +18,9 @@ .include "../../kern/Make.tags.inc" tags: - -ctags -wdtf ${TCOBALT} ${SCOBALT} ${SMIPS} ${COMM} + -rm -f ${TCOBALT} + -echo ${SCOBALT} ${SMIPS} | xargs ctags -wadtf ${TCOBALT} + -${FINDCOMM} | xargs ctags -wadtf ${TCOBALT} egrep "^ENTRY(.*)|^ALTENTRY(.*)" ${ACOBALT} ${AMIPS} | \ ${TOOL_SED} -e \ "s;\([^:]*\):\([^(]*\)(\([^, )]*\)\(.*\);\3 \1 /^\2(\3\4$$/;" \
CVS commit: src/sys/arch/cobalt/include
Module Name:src Committed By: tsutsui Date: Fri Mar 18 16:19:13 UTC 2011 Modified Files: src/sys/arch/cobalt/include: param.h Log Message: Include after MACHINE is defined. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/cobalt/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/cobalt/include/param.h diff -u src/sys/arch/cobalt/include/param.h:1.18 src/sys/arch/cobalt/include/param.h:1.19 --- src/sys/arch/cobalt/include/param.h:1.18 Sun Mar 6 20:34:57 2011 +++ src/sys/arch/cobalt/include/param.h Fri Mar 18 16:19:13 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: param.h,v 1.18 2011/03/06 20:34:57 he Exp $ */ +/* $NetBSD: param.h,v 1.19 2011/03/18 16:19:13 tsutsui Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -37,12 +37,10 @@ #ifndef _COBALT_PARAM_H_ #define _COBALT_PARAM_H_ -#include - #define _MACHINE cobalt -#ifdef _KERNEL #define MACHINE "cobalt" -#endif + +#include #define DEV_BSIZE 512 #define DEV_BSHIFT 9 /* log2(DEV_BSIZE) */
CVS commit: src/sys/arch/cobalt/cobalt
Module Name:src Committed By: tsutsui Date: Sun Feb 20 15:47:28 UTC 2011 Modified Files: src/sys/arch/cobalt/cobalt: machdep.c Log Message: Remove leftover debug stuff. To generate a diff of this commit: cvs rdiff -u -r1.110 -r1.111 src/sys/arch/cobalt/cobalt/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/cobalt/cobalt/machdep.c diff -u src/sys/arch/cobalt/cobalt/machdep.c:1.110 src/sys/arch/cobalt/cobalt/machdep.c:1.111 --- src/sys/arch/cobalt/cobalt/machdep.c:1.110 Sun Feb 20 07:54:10 2011 +++ src/sys/arch/cobalt/cobalt/machdep.c Sun Feb 20 15:47:28 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.110 2011/02/20 07:54:10 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.111 2011/02/20 15:47:28 tsutsui Exp $ */ /*- * Copyright (c) 2006 Izumi Tsutsui. All rights reserved. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.110 2011/02/20 07:54:10 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.111 2011/02/20 15:47:28 tsutsui Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -281,7 +281,7 @@ #endif KASSERT(&lwp0 == curlwp); #ifdef DDB -// if (boothowto & RB_KDB) + if (boothowto & RB_KDB) Debugger(); #endif #ifdef KGDB
CVS commit: src/sys/arch/cobalt
Module Name:src Committed By: matt Date: Sun Feb 20 07:54:11 UTC 2011 Modified Files: src/sys/arch/cobalt/cobalt: bus.c cpu.c interrupt.c machdep.c src/sys/arch/cobalt/conf: GENERIC files.cobalt std.cobalt src/sys/arch/cobalt/dev: gt.c src/sys/arch/cobalt/include: bootinfo.h intr.h src/sys/arch/cobalt/pci: pci_machdep.c src/sys/arch/cobalt/stand/boot: Makefile Log Message: Merge forward from matt-nb5-mips64. (XXX generic kernels on raq2 die after interrupts are enabled but gxemul works fine). To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/sys/arch/cobalt/cobalt/bus.c cvs rdiff -u -r1.10 -r1.11 src/sys/arch/cobalt/cobalt/cpu.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/cobalt/cobalt/interrupt.c cvs rdiff -u -r1.109 -r1.110 src/sys/arch/cobalt/cobalt/machdep.c cvs rdiff -u -r1.127 -r1.128 src/sys/arch/cobalt/conf/GENERIC cvs rdiff -u -r1.34 -r1.35 src/sys/arch/cobalt/conf/files.cobalt cvs rdiff -u -r1.14 -r1.15 src/sys/arch/cobalt/conf/std.cobalt cvs rdiff -u -r1.22 -r1.23 src/sys/arch/cobalt/dev/gt.c cvs rdiff -u -r1.9 -r1.10 src/sys/arch/cobalt/include/bootinfo.h cvs rdiff -u -r1.32 -r1.33 src/sys/arch/cobalt/include/intr.h cvs rdiff -u -r1.27 -r1.28 src/sys/arch/cobalt/pci/pci_machdep.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/cobalt/stand/boot/Makefile 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/cobalt/cobalt/bus.c diff -u src/sys/arch/cobalt/cobalt/bus.c:1.38 src/sys/arch/cobalt/cobalt/bus.c:1.39 --- src/sys/arch/cobalt/cobalt/bus.c:1.38 Mon Dec 14 00:46:00 2009 +++ src/sys/arch/cobalt/cobalt/bus.c Sun Feb 20 07:54:10 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.c,v 1.38 2009/12/14 00:46:00 matt Exp $ */ +/* $NetBSD: bus.c,v 1.39 2011/02/20 07:54:10 matt Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.38 2009/12/14 00:46:00 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.39 2011/02/20 07:54:10 matt Exp $"); #include #include @@ -568,22 +568,24 @@ mips_dcache_wbinv_range(start, minlen); break; - case BUS_DMASYNC_PREREAD: + case BUS_DMASYNC_PREREAD: { + struct mips_cache_info * const mci = &mips_cache_info; end = start + minlen; - preboundary = start & ~mips_dcache_align_mask; - firstboundary = (start + mips_dcache_align_mask) - & ~mips_dcache_align_mask; - lastboundary = end & ~mips_dcache_align_mask; + preboundary = start & ~mci->mci_dcache_align_mask; + firstboundary = (start + mci->mci_dcache_align_mask) + & ~mci->mci_dcache_align_mask; + lastboundary = end & ~mci->mci_dcache_align_mask; if (preboundary < start && preboundary < lastboundary) mips_dcache_wbinv_range(preboundary, -mips_dcache_align); +mci->mci_dcache_align); if (firstboundary < lastboundary) mips_dcache_inv_range(firstboundary, lastboundary - firstboundary); if (lastboundary < end) mips_dcache_wbinv_range(lastboundary, -mips_dcache_align); +mci->mci_dcache_align); break; + } case BUS_DMASYNC_PREWRITE: mips_dcache_wb_range(start, minlen); @@ -606,12 +608,11 @@ bus_size_t boundary, bus_dma_segment_t *segs, int nsegs, int *rsegs, int flags) { - extern paddr_t avail_start, avail_end; + extern paddr_t mips_avail_start, mips_avail_end; return (_bus_dmamem_alloc_range_common(t, size, alignment, boundary, - segs, nsegs, rsegs, flags, - avail_start /*low*/, - avail_end - PAGE_SIZE /*high*/)); + segs, nsegs, rsegs, flags, + mips_avail_start /*low*/, mips_avail_end - PAGE_SIZE /*high*/)); } /* Index: src/sys/arch/cobalt/cobalt/cpu.c diff -u src/sys/arch/cobalt/cobalt/cpu.c:1.10 src/sys/arch/cobalt/cobalt/cpu.c:1.11 --- src/sys/arch/cobalt/cobalt/cpu.c:1.10 Fri May 9 10:59:55 2008 +++ src/sys/arch/cobalt/cobalt/cpu.c Sun Feb 20 07:54:10 2011 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.c,v 1.10 2008/05/09 10:59:55 tsutsui Exp $ */ +/* $NetBSD: cpu.c,v 1.11 2011/02/20 07:54:10 matt Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -28,18 +28,19 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.10 2008/05/09 10:59:55 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.11 2011/02/20 07:54:10 matt Exp $"); #include #include #include +#include #include #include "ioconf.h" -int cpu_match(device_t, cfdata_t, void *); -void cpu_attach(device_t, device_t, void *); +static int cpu_match(device_t, cfdata_t, void *); +static void cpu_attach(device_t, device_t, void *); CFATTACH_DECL_NEW(cpu, 0, cpu_match, cpu_attach, NULL, NULL); @@ -55,6 +56,11 @@ cpu_attach(device_t parent, device_t self, void *aux) { + struct cpu_info * const ci = curcpu(); + + ci->ci_dev = self; + self->dv_private = ci; + aprint_normal(": "); - cpu_identify(); + cpu_iden
CVS commit: src/sys/arch/cobalt/stand/boot
Module Name:src Committed By: he Date: Sun Jul 11 17:09:27 UTC 2010 Modified Files: src/sys/arch/cobalt/stand/boot: wd.c Log Message: Include for howmany() definition. OK'ed by tsut...@. To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/cobalt/stand/boot/wd.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/cobalt/stand/boot/wd.c diff -u src/sys/arch/cobalt/stand/boot/wd.c:1.12 src/sys/arch/cobalt/stand/boot/wd.c:1.13 --- src/sys/arch/cobalt/stand/boot/wd.c:1.12 Tue Jan 19 15:28:52 2010 +++ src/sys/arch/cobalt/stand/boot/wd.c Sun Jul 11 17:09:27 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.12 2010/01/19 15:28:52 tsutsui Exp $ */ +/* $NetBSD: wd.c,v 1.13 2010/07/11 17:09:27 he Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -29,6 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include #include #include
CVS commit: src/sys/arch/cobalt/stand/boot
Module Name:src Committed By: tsutsui Date: Tue Jan 19 15:28:52 UTC 2010 Modified Files: src/sys/arch/cobalt/stand/boot: Makefile tlp.c wd.c wdc.c Log Message: Use -DLIBSA_PRINTF_LONGLONG_SUPPORT -DLIBSA_PRINTF_WIDTH_SUPPORT in debug printf()s. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/cobalt/stand/boot/Makefile cvs rdiff -u -r1.8 -r1.9 src/sys/arch/cobalt/stand/boot/tlp.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/cobalt/stand/boot/wd.c cvs rdiff -u -r1.12 -r1.13 src/sys/arch/cobalt/stand/boot/wdc.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/cobalt/stand/boot/Makefile diff -u src/sys/arch/cobalt/stand/boot/Makefile:1.19 src/sys/arch/cobalt/stand/boot/Makefile:1.20 --- src/sys/arch/cobalt/stand/boot/Makefile:1.19 Sun Mar 15 10:47:59 2009 +++ src/sys/arch/cobalt/stand/boot/Makefile Tue Jan 19 15:28:51 2010 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.19 2009/03/15 10:47:59 tsutsui Exp $ +# $NetBSD: Makefile,v 1.20 2010/01/19 15:28:51 tsutsui Exp $ NOMAN= # defined @@ -41,7 +41,8 @@ # -I${.CURDIR}/../.. done by Makefile.inc CPPFLAGS+= -nostdinc -D_STANDALONE -DNO_ABICALLS -D_NO_PROM_DEFINES -# CPPFLAGS+= -D_DEBUG +#CPPFLAGS+= -D_DEBUG \ +# -DLIBSA_PRINTF_LONGLONG_SUPPORT -DLIBSA_PRINTF_WIDTH_SUPPORT CPPFLAGS+= -I${.OBJDIR} -I${S} -I${S}/arch -I${LIBSADIR} CPPFLAGS+= -DCONS_SERIAL -DCOMPORT=${COMPORT} CPPFLAGS+= -DCOMSPEED=${COMSPEED} -DCOMPROBE=${COMPROBE} Index: src/sys/arch/cobalt/stand/boot/tlp.c diff -u src/sys/arch/cobalt/stand/boot/tlp.c:1.8 src/sys/arch/cobalt/stand/boot/tlp.c:1.9 --- src/sys/arch/cobalt/stand/boot/tlp.c:1.8 Mon Apr 28 20:23:16 2008 +++ src/sys/arch/cobalt/stand/boot/tlp.c Tue Jan 19 15:28:52 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: tlp.c,v 1.8 2008/04/28 20:23:16 martin Exp $ */ +/* $NetBSD: tlp.c,v 1.9 2010/01/19 15:28:52 tsutsui Exp $ */ /*- * Copyright (c) 2007 The NetBSD Foundation, Inc. @@ -238,7 +238,7 @@ en[4] = val; en[5] = val >> 8; - DPRINTF(("tlp: MAC address %x:%x:%x:%x:%x:%x\n", + DPRINTF(("tlp: MAC address %02x:%02x:%02x:%02x:%02x:%02x\n", en[0], en[1], en[2], en[3], en[4], en[5])); rxd = &l->rxd[0]; Index: src/sys/arch/cobalt/stand/boot/wd.c diff -u src/sys/arch/cobalt/stand/boot/wd.c:1.11 src/sys/arch/cobalt/stand/boot/wd.c:1.12 --- src/sys/arch/cobalt/stand/boot/wd.c:1.11 Sun Jan 10 16:20:45 2010 +++ src/sys/arch/cobalt/stand/boot/wd.c Tue Jan 19 15:28:52 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.11 2010/01/10 16:20:45 tsutsui Exp $ */ +/* $NetBSD: wd.c,v 1.12 2010/01/19 15:28:52 tsutsui Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -98,8 +98,8 @@ wd->sc_params.atap_heads * wd->sc_params.atap_sectors; } - DPRINTF(("wd->sc_capacity = %ld, wd->sc_capacity28 = %d.\n", - (u_long)wd->sc_capacity, wd->sc_capacity28)); + DPRINTF(("wd->sc_capacity = %" PRId64 ", wd->sc_capacity28 = %d.\n", + wd->sc_capacity, wd->sc_capacity28)); return 0; } Index: src/sys/arch/cobalt/stand/boot/wdc.c diff -u src/sys/arch/cobalt/stand/boot/wdc.c:1.12 src/sys/arch/cobalt/stand/boot/wdc.c:1.13 --- src/sys/arch/cobalt/stand/boot/wdc.c:1.12 Sun Jan 10 16:20:45 2010 +++ src/sys/arch/cobalt/stand/boot/wdc.c Tue Jan 19 15:28:52 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: wdc.c,v 1.12 2010/01/10 16:20:45 tsutsui Exp $ */ +/* $NetBSD: wdc.c,v 1.13 2010/01/19 15:28:52 tsutsui Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -34,6 +34,7 @@ #include #include +#include #include #include "boot.h" @@ -259,9 +260,9 @@ struct wdc_channel *chp = &wd->sc_channel; #if 0 - DPRINTF(("%s(%d, %x, %ld, %d)\n", __func__, + DPRINTF(("%s(%d, %x, %" PRId64 ", %d)\n", __func__, wd_c->drive, wd_c->r_command, - (u_long)wd_c->r_blkno, wd_c->r_count)); + wd_c->r_blkno, wd_c->r_count)); #endif /* Select drive, head, and addressing mode. */
CVS commit: src/sys/arch/cobalt/stand/boot
Module Name:src Committed By: tsutsui Date: Sun Jan 10 16:20:45 UTC 2010 Modified Files: src/sys/arch/cobalt/stand/boot: version wd.c wdc.c wdvar.h Log Message: Add support for LBA48 read command to standalone wdc/wd driver. Thanks to bouyer@ for comments about LBA48 boundary checks. Tested on: > Cobalt Qube 2700 > wd0 at atabus0 drive 0: > wd0: 153 GB, 319120 cyl, 16 head, 63 sec, 512 bytes/sect x 321672960 sectors via SATA-IDE converter, and NetBSD partition allocated at: > 1: NetBSD (sysid 169) > start 293603940, size 28069020 (13706 MB, Cyls 18276-20023/54/63) Also bump version. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/arch/cobalt/stand/boot/version \ src/sys/arch/cobalt/stand/boot/wd.c cvs rdiff -u -r1.11 -r1.12 src/sys/arch/cobalt/stand/boot/wdc.c cvs rdiff -u -r1.8 -r1.9 src/sys/arch/cobalt/stand/boot/wdvar.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/cobalt/stand/boot/version diff -u src/sys/arch/cobalt/stand/boot/version:1.10 src/sys/arch/cobalt/stand/boot/version:1.11 --- src/sys/arch/cobalt/stand/boot/version:1.10 Wed May 28 14:04:07 2008 +++ src/sys/arch/cobalt/stand/boot/version Sun Jan 10 16:20:45 2010 @@ -1,4 +1,4 @@ -$NetBSD: version,v 1.10 2008/05/28 14:04:07 tsutsui Exp $ +$NetBSD: version,v 1.11 2010/01/10 16:20:45 tsutsui Exp $ NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE. The format of this file is important - make sure the entries are appended on end, last item @@ -14,3 +14,4 @@ 0.7: Add support for netboot via 21041 on Qube2700 0.8: Add support for optional Z85C30 serial console on Qube2700 0.9: Print banner and a loading kernel name onto LCD +1.0: Add support for LBA48 read command Index: src/sys/arch/cobalt/stand/boot/wd.c diff -u src/sys/arch/cobalt/stand/boot/wd.c:1.10 src/sys/arch/cobalt/stand/boot/wd.c:1.11 --- src/sys/arch/cobalt/stand/boot/wd.c:1.10 Mon Apr 28 20:23:16 2008 +++ src/sys/arch/cobalt/stand/boot/wd.c Sun Jan 10 16:20:45 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: wd.c,v 1.10 2008/04/28 20:23:16 martin Exp $ */ +/* $NetBSD: wd.c,v 1.11 2010/01/10 16:20:45 tsutsui Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -61,18 +61,45 @@ wd->sc_params = *(struct ataparams *)buf; /* 48-bit LBA addressing */ - if ((wd->sc_params.atap_cmd2_en & ATA_CMD2_LBA48) != 0) { - DPRINTF(("Drive supports LBA48.\n")); -#if defined(_ENABLE_LBA48) + if ((wd->sc_params.atap_cmd2_en & ATA_CMD2_LBA48) != 0) wd->sc_flags |= WDF_LBA48; -#endif - } /* Prior to ATA-4, LBA was optional. */ - if ((wd->sc_params.atap_capabilities1 & WDC_CAP_LBA) != 0) { - DPRINTF(("Drive supports LBA.\n")); + if ((wd->sc_params.atap_capabilities1 & WDC_CAP_LBA) != 0) wd->sc_flags |= WDF_LBA; + + if ((wd->sc_flags & WDF_LBA48) != 0) { + DPRINTF(("Drive supports LBA48.\n")); + wd->sc_capacity = + ((uint64_t)wd->sc_params.atap_max_lba[3] << 48) | + ((uint64_t)wd->sc_params.atap_max_lba[2] << 32) | + ((uint64_t)wd->sc_params.atap_max_lba[1] << 16) | + ((uint64_t)wd->sc_params.atap_max_lba[0] << 0); + DPRINTF(("atap_max_lba = (0x%x, 0x%x, 0x%x, 0x%x)\n", + wd->sc_params.atap_max_lba[3], + wd->sc_params.atap_max_lba[2], + wd->sc_params.atap_max_lba[1], + wd->sc_params.atap_max_lba[0])); + wd->sc_capacity28 = + ((uint32_t)wd->sc_params.atap_capacity[1] << 16) | + ((uint32_t)wd->sc_params.atap_capacity[0] << 0); + DPRINTF(("atap_capacity = (0x%x, 0x%x)\n", + wd->sc_params.atap_capacity[1], + wd->sc_params.atap_capacity[0])); + } else if ((wd->sc_flags & WDF_LBA) != 0) { + DPRINTF(("Drive supports LBA.\n")); + wd->sc_capacity = wd->sc_capacity28 = + ((uint32_t)wd->sc_params.atap_capacity[1] << 16) | + ((uint32_t)wd->sc_params.atap_capacity[0] << 0); + } else { + DPRINTF(("Drive doesn't support LBA; using CHS.\n")); + wd->sc_capacity = wd->sc_capacity28 = + wd->sc_params.atap_cylinders * + wd->sc_params.atap_heads * + wd->sc_params.atap_sectors; } + DPRINTF(("wd->sc_capacity = %ld, wd->sc_capacity28 = %d.\n", + (u_long)wd->sc_capacity, wd->sc_capacity28)); return 0; } @@ -173,7 +200,7 @@ } DPRINTF(("label info: d_secsize %d, d_nsectors %d, d_ncylinders %d," - "d_ntracks %d, d_secpercyl %d\n", + " d_ntracks %d, d_secpercyl %d\n", wd->sc_label.d_secsize, wd->sc_label.d_nsectors, wd->sc_label.d_ncylinders, Index: src/sys/arch/cobalt/stand/boot/wdc.c diff -u src/sys/arch/cobalt/stand/boot/wdc.c:1.11 src/sys/arch/cobalt/stand/boot/wdc.c:1.12 --- src/sys/arch/cobalt/stand/boot/wdc.c:1.11 Mon Apr 28 20:23:16 2008 +++ src/sys/arch/cobalt/stand/boot/wdc.c Sun Jan 10 16:20:45 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: wdc.c,v 1.11 2008/04/28 20:23:16 martin Exp $ */ +/* $NetBSD: wdc.c,v 1.12 2010/01/10 16:20:45 tsutsui Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -229,
CVS commit: src/sys/arch/cobalt/stand/boot
Module Name:src Committed By: tsutsui Date: Sun Jan 10 09:34:45 UTC 2010 Modified Files: src/sys/arch/cobalt/stand/boot: boot.c bootinfo.c Log Message: Make these compile with -D_DEBUG (use proper printf types). To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/cobalt/stand/boot/boot.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/cobalt/stand/boot/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/cobalt/stand/boot/boot.c diff -u src/sys/arch/cobalt/stand/boot/boot.c:1.18 src/sys/arch/cobalt/stand/boot/boot.c:1.19 --- src/sys/arch/cobalt/stand/boot/boot.c:1.18 Wed Dec 16 19:01:24 2009 +++ src/sys/arch/cobalt/stand/boot/boot.c Sun Jan 10 09:34:45 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.18 2009/12/16 19:01:24 matt Exp $ */ +/* $NetBSD: boot.c,v 1.19 2010/01/10 09:34:45 tsutsui Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -485,8 +485,8 @@ entry = (void *)marks[MARK_ENTRY]; - DPRINTF(("Bootinfo @ 0x%x\n", bi_addr)); - printf("Starting at 0x%x\n\n", (u_int)entry); + DPRINTF(("Bootinfo @ 0x%lx\n", (u_long)bi_addr)); + printf("Starting at 0x%lx\n\n", (u_long)entry); (*entry)(memsize, BOOTINFO_MAGIC, bi_addr); } Index: src/sys/arch/cobalt/stand/boot/bootinfo.c diff -u src/sys/arch/cobalt/stand/boot/bootinfo.c:1.6 src/sys/arch/cobalt/stand/boot/bootinfo.c:1.7 --- src/sys/arch/cobalt/stand/boot/bootinfo.c:1.6 Mon Apr 28 20:23:16 2008 +++ src/sys/arch/cobalt/stand/boot/bootinfo.c Sun Jan 10 09:34:45 2010 @@ -1,4 +1,4 @@ -/* $NetBSD: bootinfo.c,v 1.6 2008/04/28 20:23:16 martin Exp $ */ +/* $NetBSD: bootinfo.c,v 1.7 2010/01/10 09:34:45 tsutsui Exp $ */ /*- * Copyright (c) 1999, 2000 The NetBSD Foundation, Inc. @@ -67,8 +67,8 @@ return;/* XXX error? */ if (bootinfo != NULL) { - DPRINTF(("Adding %d of size %d @0x%x\n", - type, size, (char*)bi_next)); + DPRINTF(("Adding %d of size %d @0x%lx\n", + type, size, (u_long)bi_next)); bi = new; bi->next = size;
CVS commit: src/sys/arch/cobalt/include
Module Name:src Committed By: he Date: Wed Dec 30 18:39:03 UTC 2009 Modified Files: src/sys/arch/cobalt/include: bootinfo.h Log Message: Change prototype of lookup_bootinfo() so that it matches the implementation again. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/arch/cobalt/include/bootinfo.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/cobalt/include/bootinfo.h diff -u src/sys/arch/cobalt/include/bootinfo.h:1.8 src/sys/arch/cobalt/include/bootinfo.h:1.9 --- src/sys/arch/cobalt/include/bootinfo.h:1.8 Thu Dec 17 15:29:47 2009 +++ src/sys/arch/cobalt/include/bootinfo.h Wed Dec 30 18:39:03 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bootinfo.h,v 1.8 2009/12/17 15:29:47 matt Exp $ */ +/* $NetBSD: bootinfo.h,v 1.9 2009/12/30 18:39:03 he Exp $ */ /* * Copyright (c) 1997, 2000-2004 @@ -75,7 +75,7 @@ }; #ifdef _KERNEL -void *lookup_bootinfo(int); +void *lookup_bootinfo(unsigned int); #endif #endif /* !_COBALT_BOOTINFO_H_ */
CVS commit: src/sys/arch/cobalt/cobalt
Module Name:src Committed By: matt Date: Fri Dec 18 23:22:29 UTC 2009 Modified Files: src/sys/arch/cobalt/cobalt: machdep.c Log Message: Cleanup some messages. Change arguments to sign extend properly. GENERIC64 now gets to boot prompt in gxemul. To generate a diff of this commit: cvs rdiff -u -r1.107 -r1.108 src/sys/arch/cobalt/cobalt/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/cobalt/cobalt/machdep.c diff -u src/sys/arch/cobalt/cobalt/machdep.c:1.107 src/sys/arch/cobalt/cobalt/machdep.c:1.108 --- src/sys/arch/cobalt/cobalt/machdep.c:1.107 Thu Dec 17 15:29:47 2009 +++ src/sys/arch/cobalt/cobalt/machdep.c Fri Dec 18 23:22:28 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.107 2009/12/17 15:29:47 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.108 2009/12/18 23:22:28 matt Exp $ */ /*- * Copyright (c) 2006 Izumi Tsutsui. All rights reserved. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.107 2009/12/17 15:29:47 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.108 2009/12/18 23:22:28 matt Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -101,7 +101,7 @@ struct vm_map *phys_map = NULL; int physmem; /* Total physical memory */ -char *bootinfo = NULL; /* pointer to bootinfo structure */ +void *bootinfo = NULL; /* pointer to bootinfo structure */ char bootstring[512]; /* Boot command */ int netboot; /* Are we netbooting? */ @@ -126,7 +126,7 @@ phys_ram_seg_t mem_clusters[VM_PHYSSEG_MAX]; int mem_cluster_cnt; -void mach_init(unsigned int, u_int, int32_t); +void mach_init(intptr_t, u_int, int32_t); void decode_bootstring(void); static char *strtok_light(char *, const char); static u_int read_board_id(void); @@ -143,10 +143,9 @@ * Do all the stuff that locore normally does before calling main(). */ void -mach_init(unsigned int memsize32, u_int bim, int32_t bip32) +mach_init(intptr_t memsize, u_int bim, int32_t bip32) { - size_t memsize = memsize32; - char *bip = (void *)(intptr_t)bip32; + void *bip = (void *)(intptr_t)bip32; char *kernend; u_long first, last; extern char edata[], end[]; @@ -201,12 +200,17 @@ bootinfo = bip; bi_magic = lookup_bootinfo(BTINFO_MAGIC); - if (bi_magic == NULL || bi_magic->magic != BOOTINFO_MAGIC) - bi_msg = "invalid bootinfo structure.\n"; - else + if (bi_magic == NULL) { + bi_msg = "missing bootinfo structure"; + bim = (uintptr_t)bip; + } else if (bi_magic->magic != BOOTINFO_MAGIC) { + bi_msg = "invalid bootinfo structure"; + bim = bi_magic->magic; + } else bi_msg = NULL; - } else - bi_msg = "invalid bootinfo (standalone boot?)\n"; + } else { + bi_msg = "invalid bootinfo (standalone boot?)"; + } #if NKSYMS || defined(DDB) || defined(MODULAR) bi_syms = lookup_bootinfo(BTINFO_SYMTAB); @@ -258,7 +262,7 @@ consinit(); if (bi_msg != NULL) - printf(bi_msg); + printf("%s: magic=%#x\n", bi_msg, bim); uvm_setpagesize(); @@ -495,7 +499,7 @@ * Look up information in bootinfo of boot loader. */ void * -lookup_bootinfo(int type) +lookup_bootinfo(unsigned int type) { struct btinfo_common *bt; char *help = bootinfo;
CVS commit: src/sys/arch/cobalt
Module Name:src Committed By: matt Date: Thu Dec 17 15:29:47 UTC 2009 Modified Files: src/sys/arch/cobalt/cobalt: machdep.c src/sys/arch/cobalt/conf: std.cobalt src/sys/arch/cobalt/include: autoconf.h bootinfo.h Added Files: src/sys/arch/cobalt/conf: GENERIC32 GENERIC64 INSTALL32 INSTALL64 RAMDISK32 RAMDISK64 src/sys/arch/cobalt/include: netbsd32_machdep.h Log Message: Enable mips64 support for cobalt. To generate a diff of this commit: cvs rdiff -u -r1.106 -r1.107 src/sys/arch/cobalt/cobalt/machdep.c cvs rdiff -u -r0 -r1.1 src/sys/arch/cobalt/conf/GENERIC32 \ src/sys/arch/cobalt/conf/GENERIC64 src/sys/arch/cobalt/conf/INSTALL32 \ src/sys/arch/cobalt/conf/INSTALL64 src/sys/arch/cobalt/conf/RAMDISK32 \ src/sys/arch/cobalt/conf/RAMDISK64 cvs rdiff -u -r1.13 -r1.14 src/sys/arch/cobalt/conf/std.cobalt cvs rdiff -u -r1.4 -r1.5 src/sys/arch/cobalt/include/autoconf.h cvs rdiff -u -r1.7 -r1.8 src/sys/arch/cobalt/include/bootinfo.h cvs rdiff -u -r0 -r1.1 src/sys/arch/cobalt/include/netbsd32_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/cobalt/cobalt/machdep.c diff -u src/sys/arch/cobalt/cobalt/machdep.c:1.106 src/sys/arch/cobalt/cobalt/machdep.c:1.107 --- src/sys/arch/cobalt/cobalt/machdep.c:1.106 Wed Dec 16 19:01:24 2009 +++ src/sys/arch/cobalt/cobalt/machdep.c Thu Dec 17 15:29:47 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.106 2009/12/16 19:01:24 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.107 2009/12/17 15:29:47 matt Exp $ */ /*- * Copyright (c) 2006 Izumi Tsutsui. All rights reserved. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.106 2009/12/16 19:01:24 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.107 2009/12/17 15:29:47 matt Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -126,7 +126,7 @@ phys_ram_seg_t mem_clusters[VM_PHYSSEG_MAX]; int mem_cluster_cnt; -void mach_init(unsigned int, u_int, char*); +void mach_init(unsigned int, u_int, int32_t); void decode_bootstring(void); static char *strtok_light(char *, const char); static u_int read_board_id(void); @@ -143,8 +143,10 @@ * Do all the stuff that locore normally does before calling main(). */ void -mach_init(unsigned int memsize, u_int bim, char *bip) +mach_init(unsigned int memsize32, u_int bim, int32_t bip32) { + size_t memsize = memsize32; + char *bip = (void *)(intptr_t)bip32; char *kernend; u_long first, last; extern char edata[], end[]; @@ -212,8 +214,8 @@ /* Load symbol table if present */ if (bi_syms != NULL) { nsym = bi_syms->nsym; - ssym = (void *)bi_syms->ssym; - esym = (void *)bi_syms->esym; + ssym = (void *)(intptr_t)bi_syms->ssym; + esym = (void *)(intptr_t)bi_syms->esym; kernend = (void *)mips_round_page(esym); } #endif @@ -506,7 +508,7 @@ do { bt = (struct btinfo_common *)help; - printf("Type %d @0x%x\n", bt->type, (u_int)bt); + printf("Type %d @%p\n", bt->type, (void *)(intptr_t)bt); if (bt->type == type) return (void *)help; help += bt->next; Index: src/sys/arch/cobalt/conf/std.cobalt diff -u src/sys/arch/cobalt/conf/std.cobalt:1.13 src/sys/arch/cobalt/conf/std.cobalt:1.14 --- src/sys/arch/cobalt/conf/std.cobalt:1.13 Tue Jul 18 12:51:01 2006 +++ src/sys/arch/cobalt/conf/std.cobalt Thu Dec 17 15:29:47 2009 @@ -1,8 +1,8 @@ -# $NetBSD: std.cobalt,v 1.13 2006/07/18 12:51:01 tsutsui Exp $ +# $NetBSD: std.cobalt,v 1.14 2009/12/17 15:29:47 matt Exp $ machine cobalt mips include "conf/std" # MI standard options -makeoptions MACHINE_ARCH="mipsel" +#makeoptions MACHINE_ARCH="mipsel" options MIPS3 options MIPS3_ENABLE_CLOCK_INTR Index: src/sys/arch/cobalt/include/autoconf.h diff -u src/sys/arch/cobalt/include/autoconf.h:1.4 src/sys/arch/cobalt/include/autoconf.h:1.5 --- src/sys/arch/cobalt/include/autoconf.h:1.4 Thu Mar 27 15:21:46 2008 +++ src/sys/arch/cobalt/include/autoconf.h Thu Dec 17 15:29:47 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.h,v 1.4 2008/03/27 15:21:46 tsutsui Exp $ */ +/* $NetBSD: autoconf.h,v 1.5 2009/12/17 15:29:47 matt Exp $ */ /* * Copyright (c) 2000 Soren S. Jorvang. All rights reserved. @@ -28,8 +28,8 @@ #include struct mainbus_attach_args { - char *ma_name; - unsigned long ma_addr; + const char *ma_name; + bus_addr_t ma_addr; bus_space_tag_t ma_iot; int ma_level; int ma_irq; Index: src/sys/arch/cobalt/include/bootinfo.h diff -u src/sys/arch/cobalt/include/bootinfo.h:1.7 src/sys/arch/cobalt/include/bootinfo.h:1.8 --- src/sys/arch/cobalt/include/bootinfo.h:1.7 Sat Mar 14 14:45:58 2009 +++ src/sys/arch/cobalt/include/bootinfo.h Thu Dec 17 15:29:47 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bootinfo.h,v 1.7 2009/03/14 14:45:58 dsl Exp $ */ +/* $NetBSD: bootinfo.h,v 1.8 2009/12/17 15:29:47 matt Exp $ */ /* * Copyright (c) 1997, 2000-2004 @@ -33,8 +33,8 @@ #define BOOTINFO_SIZE 1024 struct bt
CVS commit: src/sys/arch/cobalt
Module Name:src Committed By: matt Date: Wed Dec 16 19:01:24 UTC 2009 Modified Files: src/sys/arch/cobalt/cobalt: machdep.c src/sys/arch/cobalt/stand/boot: boot.c Log Message: Make cobalt build again. To generate a diff of this commit: cvs rdiff -u -r1.105 -r1.106 src/sys/arch/cobalt/cobalt/machdep.c cvs rdiff -u -r1.17 -r1.18 src/sys/arch/cobalt/stand/boot/boot.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/cobalt/cobalt/machdep.c diff -u src/sys/arch/cobalt/cobalt/machdep.c:1.105 src/sys/arch/cobalt/cobalt/machdep.c:1.106 --- src/sys/arch/cobalt/cobalt/machdep.c:1.105 Mon Dec 14 00:46:00 2009 +++ src/sys/arch/cobalt/cobalt/machdep.c Wed Dec 16 19:01:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.105 2009/12/14 00:46:00 matt Exp $ */ +/* $NetBSD: machdep.c,v 1.106 2009/12/16 19:01:24 matt Exp $ */ /*- * Copyright (c) 2006 Izumi Tsutsui. All rights reserved. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.105 2009/12/14 00:46:00 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.106 2009/12/16 19:01:24 matt Exp $"); #include "opt_ddb.h" #include "opt_kgdb.h" @@ -147,8 +147,6 @@ { char *kernend; u_long first, last; - struct pcb *pcb0; - vaddr_t v; extern char edata[], end[]; const char *bi_msg; #if NKSYMS || defined(DDB) || defined(MODULAR) Index: src/sys/arch/cobalt/stand/boot/boot.c diff -u src/sys/arch/cobalt/stand/boot/boot.c:1.17 src/sys/arch/cobalt/stand/boot/boot.c:1.18 --- src/sys/arch/cobalt/stand/boot/boot.c:1.17 Thu May 29 14:25:00 2008 +++ src/sys/arch/cobalt/stand/boot/boot.c Wed Dec 16 19:01:24 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: boot.c,v 1.17 2008/05/29 14:25:00 tsutsui Exp $ */ +/* $NetBSD: boot.c,v 1.18 2009/12/16 19:01:24 matt Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -379,7 +379,7 @@ bootprog_name, bootprog_rev, (void*)&start); printf(">> (%s, %s)\n", bootprog_maker, bootprog_date); printf(">> Model:\t\t%s\n", cobalt_model[cobalt_id]); - printf(">> Memory:\t\t%u k\n", (memsize - MIPS_KSEG0_START) / 1024); + printf(">> Memory:\t\t%lu k\n", (memsize - MIPS_KSEG0_START) / 1024); printf(">> PROM boot string:\t%s\n", bootstring); }
CVS commit: src/sys/arch/cobalt/conf
Module Name:src Committed By: tsutsui Date: Sat Nov 14 09:14:23 UTC 2009 Modified Files: src/sys/arch/cobalt/conf: majors.cobalt Log Message: Preserve wscons(4) device numbers for forthcoming udl(4) USB display. To generate a diff of this commit: cvs rdiff -u -r1.25 -r1.26 src/sys/arch/cobalt/conf/majors.cobalt 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/cobalt/conf/majors.cobalt diff -u src/sys/arch/cobalt/conf/majors.cobalt:1.25 src/sys/arch/cobalt/conf/majors.cobalt:1.26 --- src/sys/arch/cobalt/conf/majors.cobalt:1.25 Wed Nov 12 12:35:58 2008 +++ src/sys/arch/cobalt/conf/majors.cobalt Sat Nov 14 09:14:22 2009 @@ -1,4 +1,4 @@ -# $NetBSD: majors.cobalt,v 1.25 2008/11/12 12:35:58 ad Exp $ +# $NetBSD: majors.cobalt,v 1.26 2009/11/14 09:14:22 tsutsui Exp $ # # Device majors for cobalt # @@ -52,6 +52,11 @@ device-major midi char 48 midi device-major sequencer char 49 sequencer device-major vcoda char 50 vcoda +device-major wsdisplay char 51 wsdisplay +device-major wskbd char 52 wskbd +device-major wsmouse char 53 wsmouse +device-major wsmux char 54 wsmux +device-major wsfont char 55 wsfont device-major altq char 77 altq
CVS commit: src/sys/arch/cobalt/dev
Module Name:src Committed By: tsutsui Date: Mon Aug 31 15:18:55 UTC 2009 Modified Files: src/sys/arch/cobalt/dev: panel.c Log Message: Replace shutdownhook_establish(9) with pmf_device_register1(9). Also check howto to print appropriate "Rebooting..." or "Halting..." messages. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/cobalt/dev/panel.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/cobalt/dev/panel.c diff -u src/sys/arch/cobalt/dev/panel.c:1.19 src/sys/arch/cobalt/dev/panel.c:1.20 --- src/sys/arch/cobalt/dev/panel.c:1.19 Thu Aug 20 11:43:59 2009 +++ src/sys/arch/cobalt/dev/panel.c Mon Aug 31 15:18:55 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: panel.c,v 1.19 2009/08/20 11:43:59 tsutsui Exp $ */ +/* $NetBSD: panel.c,v 1.20 2009/08/31 15:18:55 tsutsui Exp $ */ /* * Copyright (c) 2002 Dennis I. Chernoivanov @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: panel.c,v 1.19 2009/08/20 11:43:59 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: panel.c,v 1.20 2009/08/31 15:18:55 tsutsui Exp $"); #include #include @@ -41,6 +41,7 @@ #include #include #include +#include #include #include @@ -76,14 +77,18 @@ "NetBSD/cobalt ", "Starting up... " }; -static const struct lcd_message shutdown_message = { +static const struct lcd_message halt_message = { "NetBSD/cobalt ", - "Shutting down..." + "Halting... " +}; +static const struct lcd_message reboot_message = { + "NetBSD/cobalt ", + "Rebooting..." }; static int panel_match(device_t, cfdata_t, void *); static void panel_attach(device_t, device_t, void *); -static void panel_shutdown(void *); +static bool panel_shutdown(device_t, int); static void panel_soft(void *); @@ -158,7 +163,7 @@ hd44780_ddram_io(&sc->sc_lcd, sc->sc_lcd.sc_curchip, &io, HD_DDRAM_WRITE); - shutdownhook_establish(panel_shutdown, sc); + pmf_device_register1(self, NULL, NULL, panel_shutdown); sc->sc_kp.sc_iot = maa->ma_iot; sc->sc_kp.sc_ioh = MIPS_PHYS_TO_KSEG1(PANEL_BASE); /* XXX */ @@ -173,18 +178,23 @@ selinit(&sc->sc_selq); } -static void -panel_shutdown(void *arg) +static bool +panel_shutdown(device_t self, int howto) { - struct panel_softc *sc = arg; + struct panel_softc *sc = device_private(self); struct hd44780_io io; /* Goodbye World */ io.dat = 0; io.len = PANEL_VCOLS * PANEL_ROWS; - memcpy(io.buf, &shutdown_message, io.len); + if (howto & RB_HALT) + memcpy(io.buf, &halt_message, io.len); + else + memcpy(io.buf, &reboot_message, io.len); hd44780_ddram_io(&sc->sc_lcd, sc->sc_lcd.sc_curchip, &io, HD_DDRAM_WRITE); + + return true; } static uint8_t
CVS commit: src/sys/arch/cobalt
Module Name:src Committed By: thorpej Date: Fri Aug 21 03:50:01 UTC 2009 Modified Files: src/sys/arch/cobalt/cobalt: bus.c src/sys/arch/cobalt/conf: files.cobalt Log Message: Use bus_dmamem_common. To generate a diff of this commit: cvs rdiff -u -r1.36 -r1.37 src/sys/arch/cobalt/cobalt/bus.c cvs rdiff -u -r1.33 -r1.34 src/sys/arch/cobalt/conf/files.cobalt 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/cobalt/cobalt/bus.c diff -u src/sys/arch/cobalt/cobalt/bus.c:1.36 src/sys/arch/cobalt/cobalt/bus.c:1.37 --- src/sys/arch/cobalt/cobalt/bus.c:1.36 Thu Aug 20 11:50:11 2009 +++ src/sys/arch/cobalt/cobalt/bus.c Fri Aug 21 03:50:01 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.c,v 1.36 2009/08/20 11:50:11 tsutsui Exp $ */ +/* $NetBSD: bus.c,v 1.37 2009/08/21 03:50:01 thorpej Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.36 2009/08/20 11:50:11 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.37 2009/08/21 03:50:01 thorpej Exp $"); #include #include @@ -44,6 +44,8 @@ #define _COBALT_BUS_DMA_PRIVATE #include +#include + #include #include @@ -603,57 +605,11 @@ int flags) { extern paddr_t avail_start, avail_end; - 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*/)); } /* @@ -663,25 +619,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); } /* @@ -692,11 +631,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 @@ -710,31 +644,8 @@ 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, - VM_PROT_READ | VM_PROT_WRITE, - VM_PROT_READ | VM_PROT_WRITE | PMAP_WIRED); - - /* XXX Do something about COHERENT here. */ - } - } - pmap_update(pmap_kernel()); - - return 0; + /* XXX BUS_DMA_COHERENT */ + return (_bus_dmamem_map_common(t, segs, nsegs, size, kvap, flags, 0)); } /* @@ -745,11 +656,6 @@ _bus_dmamem_unmap(bus_dma_tag_t t, void *kva, size_t size) { -#ifdef DIAGNOSTIC - if ((u_long)kva & PGOFSET) - panic("_bus_dmamem_unmap"); -#endif - /* * Nothing to do if we mapped it with KSEG0 or KSEG1 (i.e. * not in KSEG2). @@ -758,10 +664,7 @@ kva < (void *)MIPS_KSEG2_START) return; - size = round_page(size); - pmap_remove(pmap_kernel(), (vaddr_t)kva, (vaddr_t)kva + size); - pmap_upda
CVS commit: src/sys/arch/cobalt
Module Name:src Committed By: tsutsui Date: Thu Aug 20 11:50:11 UTC 2009 Modified Files: src/sys/arch/cobalt/cobalt: bus.c src/sys/arch/cobalt/include: bus.h Log Message: Add an empty bus_space_mmap(9) function as temporary workaround for MI pci(4) mmap function in sys/dev/pci/pci_usrreq.c. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/cobalt/cobalt/bus.c cvs rdiff -u -r1.22 -r1.23 src/sys/arch/cobalt/include/bus.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/cobalt/cobalt/bus.c diff -u src/sys/arch/cobalt/cobalt/bus.c:1.35 src/sys/arch/cobalt/cobalt/bus.c:1.36 --- src/sys/arch/cobalt/cobalt/bus.c:1.35 Wed Jun 4 12:41:40 2008 +++ src/sys/arch/cobalt/cobalt/bus.c Thu Aug 20 11:50:11 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.c,v 1.35 2008/06/04 12:41:40 ad Exp $ */ +/* $NetBSD: bus.c,v 1.36 2009/08/20 11:50:11 tsutsui Exp $ */ /* * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.35 2008/06/04 12:41:40 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.36 2009/08/20 11:50:11 tsutsui Exp $"); #include #include @@ -117,6 +117,15 @@ return 0; } +paddr_t +bus_space_mmap(bus_space_tag_t t, bus_addr_t addr, off_t off, int prot, +int flags) +{ + + /* XXX not implemented */ + return -1; +} + /* * Common function for DMA map creation. May be called by bus-specific * DMA map creation functions. Index: src/sys/arch/cobalt/include/bus.h diff -u src/sys/arch/cobalt/include/bus.h:1.22 src/sys/arch/cobalt/include/bus.h:1.23 --- src/sys/arch/cobalt/include/bus.h:1.22 Mon Apr 28 20:23:16 2008 +++ src/sys/arch/cobalt/include/bus.h Thu Aug 20 11:50:11 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: bus.h,v 1.22 2008/04/28 20:23:16 martin Exp $ */ +/* $NetBSD: bus.h,v 1.23 2009/08/20 11:50:11 tsutsui Exp $ */ /* * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc. @@ -88,6 +88,16 @@ bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp); /* + * paddr_t bus_space_mmap(bus_space_tag_t t, + * bus_addr_t addr, off_t offset, int prot, int flags); + * + * Mmap bus space for a user application. + */ + +paddr_t bus_space_mmap(bus_space_tag_t t, bus_addr_t addr, off_t off, int prot, +int flags); + +/* * int bus_space_alloc(bus_space_tag_t t, bus_addr_t, rstart, * bus_addr_t rend, bus_size_t size, bus_size_t align, * bus_size_t boundary, int flags, bus_addr_t *addrp,
CVS commit: src/sys/arch/cobalt/dev
Module Name:src Committed By: tsutsui Date: Thu Aug 20 11:44:00 UTC 2009 Modified Files: src/sys/arch/cobalt/dev: panel.c Log Message: Adjust attach message for failure path (found on gxemul). To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/cobalt/dev/panel.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/cobalt/dev/panel.c diff -u src/sys/arch/cobalt/dev/panel.c:1.18 src/sys/arch/cobalt/dev/panel.c:1.19 --- src/sys/arch/cobalt/dev/panel.c:1.18 Fri May 9 10:59:55 2008 +++ src/sys/arch/cobalt/dev/panel.c Thu Aug 20 11:43:59 2009 @@ -1,4 +1,4 @@ -/* $NetBSD: panel.c,v 1.18 2008/05/09 10:59:55 tsutsui Exp $ */ +/* $NetBSD: panel.c,v 1.19 2009/08/20 11:43:59 tsutsui Exp $ */ /* * Copyright (c) 2002 Dennis I. Chernoivanov @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: panel.c,v 1.18 2008/05/09 10:59:55 tsutsui Exp $"); +__KERNEL_RCSID(0, "$NetBSD: panel.c,v 1.19 2009/08/20 11:43:59 tsutsui Exp $"); #include #include @@ -139,6 +139,8 @@ bus_space_subregion(sc->sc_lcd.sc_iot, sc->sc_lcd.sc_ioir, DATA_OFFSET, 1, &sc->sc_lcd.sc_iodr); + printf("\n"); + sc->sc_lcd.sc_dev_ok = 1; sc->sc_lcd.sc_cols = PANEL_COLS; sc->sc_lcd.sc_vcols = PANEL_VCOLS; @@ -169,8 +171,6 @@ callout_init(&sc->sc_callout, 0); selinit(&sc->sc_selq); - - printf("\n"); } static void