CVS commit: src/sys/arch/arm/marvell
Module Name:src Committed By: hsuenaga Date: Sun May 3 06:29:32 UTC 2015 Modified Files: src/sys/arch/arm/marvell: armadaxp.c Log Message: write back unaligned boundary of L2 cache even if invalidate operation is requested. To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/sys/arch/arm/marvell/armadaxp.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/arm/marvell/armadaxp.c diff -u src/sys/arch/arm/marvell/armadaxp.c:1.11 src/sys/arch/arm/marvell/armadaxp.c:1.12 --- src/sys/arch/arm/marvell/armadaxp.c:1.11 Fri Apr 17 13:43:55 2015 +++ src/sys/arch/arm/marvell/armadaxp.c Sun May 3 06:29:31 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: armadaxp.c,v 1.11 2015/04/17 13:43:55 hsuenaga Exp $ */ +/* $NetBSD: armadaxp.c,v 1.12 2015/05/03 06:29:31 hsuenaga Exp $ */ /*** Copyright (C) Marvell International Ltd. and its affiliates @@ -37,7 +37,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBI ***/ #include -__KERNEL_RCSID(0, "$NetBSD: armadaxp.c,v 1.11 2015/04/17 13:43:55 hsuenaga Exp $"); +__KERNEL_RCSID(0, "$NetBSD: armadaxp.c,v 1.12 2015/05/03 06:29:31 hsuenaga Exp $"); #define _INTR_PRIVATE @@ -500,23 +500,42 @@ armadaxp_sdcache_wbinv_all(void) void armadaxp_sdcache_inv_range(vaddr_t va, paddr_t pa, psize_t sz) { - paddr_t pa_base, pa_end; + paddr_t pa_base = pa; + paddr_t pa_end = pa + sz - 1; - pa_base = pa & ~0x1f; - pa_end = (pa_base + sz + 0x20) & ~0x1f; - L2_WRITE(ARMADAXP_L2_RANGE_BASE, pa_base); - L2_WRITE(ARMADAXP_L2_INV_RANGE, pa_end); + /* need write back if boundary is not aligned */ + if (pa_base & 0x1f) + L2_WRITE(ARMADAXP_L2_WB_PHYS, (pa_base & ~0x1f)); + if (pa_end & 0x1f) + L2_WRITE(ARMADAXP_L2_WB_PHYS, (pa_end & ~0x1f)); + L2_WRITE(ARMADAXP_L2_SYNC, 0); + __asm__ __volatile__("dsb"); + + /* invalidate other cache */ + pa_base &= ~0x1f; + pa_end &= ~0x1f; + if (pa_base == pa_end) + L2_WRITE(ARMADAXP_L2_INV_PHYS, pa_base); + else { + L2_WRITE(ARMADAXP_L2_RANGE_BASE, pa_base); + L2_WRITE(ARMADAXP_L2_INV_RANGE, pa_end); + } } void armadaxp_sdcache_wb_range(vaddr_t va, paddr_t pa, psize_t sz) { - paddr_t pa_base, pa_end; + paddr_t pa_base = pa; + paddr_t pa_end = pa + sz - 1; - pa_base = pa & ~0x1f; - pa_end = (pa_base + sz + 0x20) & ~0x1f; - L2_WRITE(ARMADAXP_L2_RANGE_BASE, pa_base); - L2_WRITE(ARMADAXP_L2_WB_RANGE, pa_end); + pa_base &= ~0x1f; + pa_end &= ~0x1f; + if (pa_base == pa_end) + L2_WRITE(ARMADAXP_L2_WB_PHYS, pa_base); + else { + L2_WRITE(ARMADAXP_L2_RANGE_BASE, pa_base); + L2_WRITE(ARMADAXP_L2_WB_RANGE, pa_end); + } L2_WRITE(ARMADAXP_L2_SYNC, 0); __asm__ __volatile__("dsb"); } @@ -524,12 +543,17 @@ armadaxp_sdcache_wb_range(vaddr_t va, pa void armadaxp_sdcache_wbinv_range(vaddr_t va, paddr_t pa, psize_t sz) { - paddr_t pa_base, pa_end; + paddr_t pa_base = pa; + paddr_t pa_end = pa + sz - 1; - pa_base = pa & ~0x1f; - pa_end = (pa_base + sz + 0x20) & ~0x1f; - L2_WRITE(ARMADAXP_L2_RANGE_BASE, pa_base); - L2_WRITE(ARMADAXP_L2_WBINV_RANGE, pa_end); + pa_base &= ~0x1f; + pa_end &= ~0x1f; + if (pa_base == pa_end) + L2_WRITE(ARMADAXP_L2_WBINV_PHYS, pa_base); + else { + L2_WRITE(ARMADAXP_L2_RANGE_BASE, pa_base); + L2_WRITE(ARMADAXP_L2_WBINV_RANGE, pa_end); + } L2_WRITE(ARMADAXP_L2_SYNC, 0); __asm__ __volatile__("dsb"); }
CVS commit: src/sys/dev/pci
Module Name:src Committed By: msaitoh Date: Sun May 3 06:29:21 UTC 2015 Modified Files: src/sys/dev/pci: pcidevs Log Message: Add some NVIDIA devices. To generate a diff of this commit: cvs rdiff -u -r1.1220 -r1.1221 src/sys/dev/pci/pcidevs Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/pcidevs diff -u src/sys/dev/pci/pcidevs:1.1220 src/sys/dev/pci/pcidevs:1.1221 --- src/sys/dev/pci/pcidevs:1.1220 Thu Apr 2 15:08:22 2015 +++ src/sys/dev/pci/pcidevs Sun May 3 06:29:21 2015 @@ -1,4 +1,4 @@ -$NetBSD: pcidevs,v 1.1220 2015/04/02 15:08:22 tnn Exp $ +$NetBSD: pcidevs,v 1.1221 2015/05/03 06:29:21 msaitoh Exp $ /* * Copyright (c) 1995, 1996 Christopher G. Demetriou @@ -4910,7 +4910,15 @@ product NVIDIA MCP67_HDA_1 0x055c nForce product NVIDIA MCP67_HDA_2 0x055d nForce MCP67 High Definition Audio Controller product NVIDIA MCP67_IDE 0x0560 nForce MCP67 ATA133 IDE Controller product NVIDIA MCP73_IDE 0x056c nForce MCP73 ATA133 IDE Controller +product NVIDIA GEFORCE_8800_GT 0x0611 GeForce 8800 GT +product NVIDIA GEFORCE_9800_GT 0x0614 GeForce 9800 GT +product NVIDIA GEFORCE_9600_GT 0x0622 GeForce 9600 GT +product NVIDIA GEFORCE_9500_GT 0x0640 GeForce 9500 GT +product NVIDIA GEFORCE_9300_GE_1 0x06e0 GeForce 9300 GE product NVIDIA GEFORCE8400GS 0x06e4 GeForce 8400 GS +product NVIDIA GEFORCE9300M_GS 0x06e9 GeForce 9300M GS +product NVIDIA QUADRONVS150 0x06ea Quadro NVS 150m +product NVIDIA QUADRONVS160 0x06eb Quadro NVS 160m product NVIDIA MCP77_IDE 0x0759 nForce MCP77 ATA133 IDE Controller product NVIDIA MCP77_LAN1 0x0760 nForce MCP77 Gigabit Ethernet Controller product NVIDIA MCP77_LAN2 0x0761 nForce MCP77 Gigabit Ethernet Controller
CVS commit: src/sys/kern
Module Name:src Committed By: rtr Date: Sun May 3 04:18:45 UTC 2015 Modified Files: src/sys/kern: uipc_socket.c Log Message: flip (NULL == addr) to (addr == NULL) use in conditional from previous commit. To generate a diff of this commit: cvs rdiff -u -r1.243 -r1.244 src/sys/kern/uipc_socket.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/kern/uipc_socket.c diff -u src/sys/kern/uipc_socket.c:1.243 src/sys/kern/uipc_socket.c:1.244 --- src/sys/kern/uipc_socket.c:1.243 Sat May 2 23:46:04 2015 +++ src/sys/kern/uipc_socket.c Sun May 3 04:18:45 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_socket.c,v 1.243 2015/05/02 23:46:04 rtr Exp $ */ +/* $NetBSD: uipc_socket.c,v 1.244 2015/05/03 04:18:45 rtr Exp $ */ /*- * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.243 2015/05/02 23:46:04 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.244 2015/05/03 04:18:45 rtr Exp $"); #include "opt_compat_netbsd.h" #include "opt_sock_counters.h" @@ -941,7 +941,7 @@ sosend(struct socket *so, struct mbuf *a error = ENOTCONN; goto release; } - } else if (NULL == addr) { + } else if (addr == NULL) { error = EDESTADDRREQ; goto release; }
CVS commit: src/distrib/sets/lists/modules
Module Name:src Committed By: pgoyette Date: Sun May 3 02:55:04 UTC 2015 Modified Files: src/distrib/sets/lists/modules: md.amd64 md.i386 Log Message: Include the new tco module on i386 and amd64 builds To generate a diff of this commit: cvs rdiff -u -r1.58 -r1.59 src/distrib/sets/lists/modules/md.amd64 cvs rdiff -u -r1.61 -r1.62 src/distrib/sets/lists/modules/md.i386 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/modules/md.amd64 diff -u src/distrib/sets/lists/modules/md.amd64:1.58 src/distrib/sets/lists/modules/md.amd64:1.59 --- src/distrib/sets/lists/modules/md.amd64:1.58 Thu Apr 23 23:22:39 2015 +++ src/distrib/sets/lists/modules/md.amd64 Sun May 3 02:55:04 2015 @@ -1,4 +1,4 @@ -# $NetBSD: md.amd64,v 1.58 2015/04/23 23:22:39 pgoyette Exp $ +# $NetBSD: md.amd64,v 1.59 2015/05/03 02:55:04 pgoyette Exp $ # # NOTE that there are two sets of files here: # @MODULEDIR@ and amd64-xen @@ -131,6 +131,8 @@ ./@MODULEDIR@/sljit/sljit.kmod base-kernel-modules kmod,sljit ./@MODULEDIR@/syscallemu base-kernel-modules kmod ./@MODULEDIR@/syscallemu/syscallemu.kmod base-kernel-modules kmod +./@MODULEDIR@/tcobase-kernel-modules kmod +./@MODULEDIR@/tco/tco.kmod base-kernel-modules kmod ./@MODULEDIR@/thinkpadbase-kernel-modules kmod ./@MODULEDIR@/thinkpad/thinkpad.kmod base-kernel-modules kmod ./@MODULEDIR@/tprof_amdpmi base-kernel-modules kmod @@ -512,6 +514,8 @@ ./stand/amd64-xen/@OSRELEASE@/modules/sysmon_wdog/sysmon_wdog.kmod base-kernel-modules kmod,compatmodules ./stand/amd64-xen/@OSRELEASE@/modules/sysvbfsbase-kernel-modules kmod,compatmodules ./stand/amd64-xen/@OSRELEASE@/modules/sysvbfs/sysvbfs.kmod base-kernel-modules kmod,compatmodules +./stand/amd64-xen/@OSRELEASE@/modules/tcobase-kernel-modules kmod,compatmodules +./stand/amd64-xen/@OSRELEASE@/modules/tco/tco.kmod base-kernel-modules kmod,compatmodules ./stand/amd64-xen/@OSRELEASE@/modules/thinkpadbase-kernel-modules kmod,compatmodules ./stand/amd64-xen/@OSRELEASE@/modules/thinkpad/thinkpad.kmod base-kernel-modules kmod,compatmodules ./stand/amd64-xen/@OSRELEASE@/modules/tmpfsbase-kernel-modules kmod,compatmodules Index: src/distrib/sets/lists/modules/md.i386 diff -u src/distrib/sets/lists/modules/md.i386:1.61 src/distrib/sets/lists/modules/md.i386:1.62 --- src/distrib/sets/lists/modules/md.i386:1.61 Wed Apr 29 23:27:45 2015 +++ src/distrib/sets/lists/modules/md.i386 Sun May 3 02:55:04 2015 @@ -1,4 +1,4 @@ -# $NetBSD: md.i386,v 1.61 2015/04/29 23:27:45 riastradh Exp $ +# $NetBSD: md.i386,v 1.62 2015/05/03 02:55:04 pgoyette Exp $ # # NOTE that there are three sets of files here: # @MODULEDIR@, i386-xen, and i386pae-xen @@ -147,6 +147,8 @@ ./@MODULEDIR@/sljit/sljit.kmod base-kernel-modules kmod,sljit ./@MODULEDIR@/syscallemu base-kernel-modules kmod ./@MODULEDIR@/syscallemu/syscallemu.kmod base-kernel-modules kmod +./@MODULEDIR@/tcobase-kernel-modules kmod +./@MODULEDIR@/tco/tco.kmod base-kernel-modules kmod ./@MODULEDIR@/tdfxdrmbase-kernel-modules kmod ./@MODULEDIR@/tdfxdrm/tdfxdrm.kmod base-kernel-modules kmod ./@MODULEDIR@/thinkpadbase-kernel-modules kmod @@ -545,6 +547,8 @@ ./stand/i386-xen/@OSRELEASE@/modules/sysmon_wdog/sysmon_wdog.kmod base-kernel-modules kmod,compatmodules ./stand/i386-xen/@OSRELEASE@/modules/sysvbfsbase-kernel-modules kmod,compatmodules ./stand/i386-xen/@OSRELEASE@/modules/sysvbfs/sysvbfs.kmod base-kernel-modules kmod,compatmodules +./stand/i386-xen/@OSRELEASE@/modules/tcobase-kernel-modules kmod,compatmodules +./stand/i386-xen//@OSRELEASE@/modulestco/tco.kmod base-kernel-modules kmod,compatmodules ./stand/i386-xen/@OSRELEASE@/modules/tdfxdrmbase-kernel-modules kmod,compatmodules ./stand/i386-xen/@OSRELEASE@/modules/tdfxdrm/tdfxdrm.kmod base-kernel-modules kmod,compatmodules ./stand/i386-xen/@OSRELEASE@/modules/thinkpadbase-kernel-modules kmod,compatmodules @@ -966,6 +970,8 @@ ./stand/i386pae-xen/@OSRELEASE@/modules/sysmon_wdog/sysmon_wdog.kmod base-kernel-modules kmod,compatmodules ./stand/i386pae-xen/@OSRELEASE@/modules/sysvbfsbase-kernel-modules kmod,compatmodules ./stand/i386pae-xen/@OSRELEASE@/modules/sysvbfs/sysvbfs.kmod base-kernel-modules kmod,compatmodules +./stand/i386pae-xen/@OSRELEASE@/modules/tcobase-kernel-modules kmod,compatmodules +./stand/i386pae-xen/@OSRELEASE@/modules/tco/tco.kmod base-kernel-modules kmod,compatmodules ./stand/i386pae-xen/@OSRELEASE@/modules/tdfxdrmbase-kernel-modules kmod,compatmodules ./stand/i386pae-xen/@OSRELEASE@/modules/tdfxdrm/tdfxdrm.kmod base-kernel-modules kmod,compatmodules ./stand/i386pae-xen/@OSRELEASE@/modules/thinkpad base-kernel-modules kmod,compatmodules
CVS commit: src/sys/modules
Module Name:src Committed By: pgoyette Date: Sun May 3 02:54:08 UTC 2015 Modified Files: src/sys/modules: Makefile Added Files: src/sys/modules/tco: Makefile tco.ioconf Log Message: Build the tco watchdog module To generate a diff of this commit: cvs rdiff -u -r1.149 -r1.150 src/sys/modules/Makefile cvs rdiff -u -r0 -r1.1 src/sys/modules/tco/Makefile \ src/sys/modules/tco/tco.ioconf Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/modules/Makefile diff -u src/sys/modules/Makefile:1.149 src/sys/modules/Makefile:1.150 --- src/sys/modules/Makefile:1.149 Wed Apr 29 17:38:50 2015 +++ src/sys/modules/Makefile Sun May 3 02:54:07 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.149 2015/04/29 17:38:50 riastradh Exp $ +# $NetBSD: Makefile,v 1.150 2015/05/03 02:54:07 pgoyette Exp $ .include @@ -147,6 +147,7 @@ SUBDIR+= hdaudioverbose SUBDIR+= hpet SUBDIR+= odcm SUBDIR+= powernow +SUBDIR+= tco SUBDIR+= tprof_pmi SUBDIR+= tprof_amdpmi SUBDIR+= vmt Added files: Index: src/sys/modules/tco/Makefile diff -u /dev/null src/sys/modules/tco/Makefile:1.1 --- /dev/null Sun May 3 02:54:08 2015 +++ src/sys/modules/tco/Makefile Sun May 3 02:54:07 2015 @@ -0,0 +1,13 @@ +# $NetBSD: Makefile,v 1.1 2015/05/03 02:54:07 pgoyette Exp $ + +.include "../Makefile.inc" + +.PATH: ${S}/arch/x86/pci + +KMOD= tco +IOCONF= tco.ioconf +SRCS= tco.c + +WARNS= 4 + +.include Index: src/sys/modules/tco/tco.ioconf diff -u /dev/null src/sys/modules/tco/tco.ioconf:1.1 --- /dev/null Sun May 3 02:54:08 2015 +++ src/sys/modules/tco/tco.ioconf Sun May 3 02:54:07 2015 @@ -0,0 +1,11 @@ +# $NetBSD: tco.ioconf,v 1.1 2015/05/03 02:54:07 pgoyette Exp $ + +ioconf tco + +include "conf/files" +include "dev/pci/files.pci" +include "arch/x86/pci/files.pci" + +pseudo-root tcoichbus* + +tco* at tcoichbus?
CVS commit: src/sys/arch
Module Name:src Committed By: pgoyette Date: Sun May 3 02:52:50 UTC 2015 Modified Files: src/sys/arch/amd64/conf: ALL GENERIC src/sys/arch/i386/conf: ALL GENERIC Log Message: Update to include the tco driver (it was previously included as part of ichlpcib). To generate a diff of this commit: cvs rdiff -u -r1.28 -r1.29 src/sys/arch/amd64/conf/ALL cvs rdiff -u -r1.412 -r1.413 src/sys/arch/amd64/conf/GENERIC cvs rdiff -u -r1.393 -r1.394 src/sys/arch/i386/conf/ALL cvs rdiff -u -r1.1122 -r1.1123 src/sys/arch/i386/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/amd64/conf/ALL diff -u src/sys/arch/amd64/conf/ALL:1.28 src/sys/arch/amd64/conf/ALL:1.29 --- src/sys/arch/amd64/conf/ALL:1.28 Tue Apr 28 13:52:49 2015 +++ src/sys/arch/amd64/conf/ALL Sun May 3 02:52:50 2015 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.28 2015/04/28 13:52:49 rjs Exp $ +# $NetBSD: ALL,v 1.29 2015/05/03 02:52:50 pgoyette Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "ALL-$Revision: 1.28 $" +#ident "ALL-$Revision: 1.29 $" maxusers 64 # estimated number of users @@ -449,9 +449,10 @@ amdtemp* at amdnb_misc? # AMD CPU Temp amdpcib* at pci? dev ? function ? # AMD 8111 PCI-ISA w/ HPET hpet* at amdpcib? ichlpcib* at pci? dev ? function ? # Intel ICH PCI-ISA w/ timecounter, - # watchdog, SpeedStep and HPET + # watchdog, gpio, SpeedStep and HPET hpet0 at ichlpcib? # High Precision Event Timer fwhrng* at ichlpcib? # Intel 82802 FWH Random Number Generator +tco* at ichlpcib? # TCO watchdog timer rdcpcib* at pci? dev ? function ? # RDC Vortex86/PMX-1000 PCI-ISA w/ pchb* at pci? dev ? function ? # PCI-Host bridges options AGP_X86 Index: src/sys/arch/amd64/conf/GENERIC diff -u src/sys/arch/amd64/conf/GENERIC:1.412 src/sys/arch/amd64/conf/GENERIC:1.413 --- src/sys/arch/amd64/conf/GENERIC:1.412 Thu Apr 23 11:32:55 2015 +++ src/sys/arch/amd64/conf/GENERIC Sun May 3 02:52:50 2015 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.412 2015/04/23 11:32:55 pgoyette Exp $ +# $NetBSD: GENERIC,v 1.413 2015/05/03 02:52:50 pgoyette Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/amd64/conf/std.amd64" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.412 $" +#ident "GENERIC-$Revision: 1.413 $" maxusers 64 # estimated number of users @@ -354,9 +354,10 @@ puc* at pci? dev ? function ? # PCI "uni pwdog* at pci? dev ? function ? # QUANCOM PWDOG1 ichlpcib* at pci? dev ? function ? # Intel ICH PCI-LPC w/ timecounter, - # watchdog and Speedstep and HPET + # watchdog, gpio, Speedstep and HPET fwhrng* at ichlpcib? # Intel 82802 FWH Random Number Generator #hpet* at ichlpcib? +tco* at ichlpcib? # TCO watch dog timer aapic* at pci? dev ? function ? # AMD 8131 IO apic Index: src/sys/arch/i386/conf/ALL diff -u src/sys/arch/i386/conf/ALL:1.393 src/sys/arch/i386/conf/ALL:1.394 --- src/sys/arch/i386/conf/ALL:1.393 Wed Apr 29 11:37:31 2015 +++ src/sys/arch/i386/conf/ALL Sun May 3 02:52:50 2015 @@ -1,4 +1,4 @@ -# $NetBSD: ALL,v 1.393 2015/04/29 11:37:31 riastradh Exp $ +# $NetBSD: ALL,v 1.394 2015/05/03 02:52:50 pgoyette Exp $ # From NetBSD: GENERIC,v 1.787 2006/10/01 18:37:54 bouyer Exp # # ALL machine description file @@ -17,7 +17,7 @@ include "arch/i386/conf/std.i386" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "ALL-$Revision: 1.393 $" +#ident "ALL-$Revision: 1.394 $" maxusers 64 # estimated number of users @@ -486,9 +486,10 @@ amdtemp* at amdnb_misc? # AMD CPU Temp amdpcib* at pci? dev ? function ? # AMD 8111 PCI-ISA w/ HPET hpet* at amdpcib? ichlpcib* at pci? dev ? function ? # Intel ICH PCI-ISA w/ timecounter, - # watchdog, SpeedStep and HPET + # watchdog, gpio, SpeedStep and HPET hpet0 at ichlpcib? # High Precision Event Timer fwhrng* at ichlpcib? # Intel 82802 FWH Random Number Generator +tco* at ichlpcib? # TCO watchdog timer gcscpcib* at pci? dev ? function ? # AMD CS5535/CS5536 PCI-ISA w/ gpio* at gcscpcib? # timecounter, watchdog and GPIO piixpcib* at pci? dev ? function ? # Intel PIIX4 PCI-ISA w/ SpeedStep Index: src/sys/arch/i386/conf/GENERIC diff -u src/sys/arch/i386/conf/GENERIC:1.1122 src/sys/arch/i386/conf/GENERIC:1.1123 --- src/sys/arch/i386/conf/GENERIC:1.1122 Wed Apr 29 17:43:06 2015 +++ src/sys/arch/i386/conf/GENERIC Sun May 3 02:52:50 2015 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.1122 2015/04/29 17:43:06 riastradh Exp $ +# $NetBSD: GENERIC,v 1.1123 2015/05/03 02:52:50 pgoyette Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/i386/conf/std.i386" options INCLUDE_CONFIG_FILE # embed conf
CVS commit: src/sys/arch/x86/pci
Module Name:src Committed By: pgoyette Date: Sun May 3 02:50:59 UTC 2015 Modified Files: src/sys/arch/x86/pci: files.pci ichlpcib.c Added Files: src/sys/arch/x86/pci: tco.c tco.h Log Message: Separate the watchdog code from the pcib code, and make the watchdog a loadable module. To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/sys/arch/x86/pci/files.pci cvs rdiff -u -r1.48 -r1.49 src/sys/arch/x86/pci/ichlpcib.c cvs rdiff -u -r0 -r1.1 src/sys/arch/x86/pci/tco.c src/sys/arch/x86/pci/tco.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/x86/pci/files.pci diff -u src/sys/arch/x86/pci/files.pci:1.19 src/sys/arch/x86/pci/files.pci:1.20 --- src/sys/arch/x86/pci/files.pci:1.19 Tue Nov 11 02:31:55 2014 +++ src/sys/arch/x86/pci/files.pci Sun May 3 02:50:59 2015 @@ -1,4 +1,4 @@ -# $NetBSD: files.pci,v 1.19 2014/11/11 02:31:55 christos Exp $ +# $NetBSD: files.pci,v 1.20 2015/05/03 02:50:59 pgoyette Exp $ device aapic attach aapic at pci @@ -46,13 +46,18 @@ file arch/x86/pci/rdcpcib.c rdcpcib define fwhichbus {} define hpetichbus {} -device ichlpcib: acpipmtimer, isabus, sysmon_wdog, fwhichbus, hpetichbus, gpiobus +define tcoichbus {} +device ichlpcib: acpipmtimer, isabus, fwhichbus, hpetichbus, gpiobus, tcoichbus attach ichlpcib at pci file arch/x86/pci/ichlpcib.c ichlpcib attach hpet at hpetichbus with ichlpcib_hpet filearch/x86/pci/ichlpcib_hpet.c ichlpcib_hpet +device tco: sysmon_wdog +attach tco at tcoichbus +file arch/x86/pci/tco.c tco + device tcpcib: isabus, sysmon_wdog, hpetichbus attach tcpcib at pci file arch/x86/pci/tcpcib.c tcpcib Index: src/sys/arch/x86/pci/ichlpcib.c diff -u src/sys/arch/x86/pci/ichlpcib.c:1.48 src/sys/arch/x86/pci/ichlpcib.c:1.49 --- src/sys/arch/x86/pci/ichlpcib.c:1.48 Fri Mar 20 12:01:32 2015 +++ src/sys/arch/x86/pci/ichlpcib.c Sun May 3 02:50:59 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ichlpcib.c,v 1.48 2015/03/20 12:01:32 msaitoh Exp $ */ +/* $NetBSD: ichlpcib.c,v 1.49 2015/05/03 02:50:59 pgoyette Exp $ */ /*- * Copyright (c) 2004 The NetBSD Foundation, Inc. @@ -34,12 +34,13 @@ * * LPC Interface Bridge is basically a pcib (PCI-ISA Bridge), but has * some power management and monitoring functions. - * Currently we support the watchdog timer, SpeedStep (on some systems) + * Currently we support the watchdog timer, SpeedStep (on some systems), + * the gpio interface, hpet timer, hardware random number generator, * and the power management timer. */ #include -__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.48 2015/03/20 12:01:32 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v 1.49 2015/05/03 02:50:59 pgoyette Exp $"); #include #include @@ -55,7 +56,6 @@ __KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v #include #include -#include #include #include @@ -63,6 +63,8 @@ __KERNEL_RCSID(0, "$NetBSD: ichlpcib.c,v #include #include +#include + #include "pcibvar.h" #include "gpio.h" #include "fwhrng.h" @@ -82,8 +84,7 @@ struct lpcib_softc { bus_space_handle_t sc_rcbah; pcireg_t sc_rcba_reg; - /* Watchdog variables. */ - struct sysmon_wdog sc_smw; + /* Power management variables. */ bus_space_tag_t sc_iot; bus_space_handle_t sc_ioh; bus_size_t sc_iosize; @@ -114,6 +115,7 @@ struct lpcib_softc { pcireg_t sc_fwhsel2; /* Child devices */ + device_t sc_tco; device_t sc_hpetbus; acpipmtimer_t sc_pmtimer; pcireg_t sc_acpi_cntl; @@ -135,12 +137,6 @@ static int pmtimer_unconfigure(device_t, static void tcotimer_configure(device_t); static int tcotimer_unconfigure(device_t, int); -static int tcotimer_setmode(struct sysmon_wdog *); -static int tcotimer_tickle(struct sysmon_wdog *); -static void tcotimer_stop(struct lpcib_softc *); -static void tcotimer_start(struct lpcib_softc *); -static void tcotimer_status_reset(struct lpcib_softc *); -static int tcotimer_disable_noreboot(device_t); static void speedstep_configure(device_t); static void speedstep_unconfigure(device_t); @@ -411,6 +407,11 @@ lpcibchilddet(device_t self, device_t ch return; } #endif + if (sc->sc_tco == child) { + sc->sc_tco = NULL; + return; + } + if (sc->sc_hpetbus != child) { pcibchilddet(self, child); return; @@ -454,6 +455,9 @@ lpcibrescan(device_t self, const char *i { struct lpcib_softc *sc = device_private(self); + if(ifattr_match(ifattr, "tcoichbus") && sc->sc_tco == NULL) + tcotimer_configure(self); + #if NFWHRNG > 0 if (ifattr_match(ifattr, "fwhichbus") && sc->sc_fwhbus == NULL) lpcib_fwh_configure(self); @@ -613,59 +617,22 @@ pmtimer_unconfigure(device_t self, int f } /* - * Initialize the watchdog timer. + * Configure the watchdog timer. */ static void tcotimer_configure(device_t self) { struct lpcib_softc *sc = device_private(self); - uint32_t ioreg; - unsigned int period; - - /* Explicitly stop the TCO timer. */ - tco
CVS commit: src/sys/arch/arm/nvidia
Module Name:src Committed By: jmcneill Date: Sun May 3 01:26:44 UTC 2015 Modified Files: src/sys/arch/arm/nvidia: tegra_pcie.c Log Message: coherent dma tag doesnt quite work To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/nvidia/tegra_pcie.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/arm/nvidia/tegra_pcie.c diff -u src/sys/arch/arm/nvidia/tegra_pcie.c:1.1 src/sys/arch/arm/nvidia/tegra_pcie.c:1.2 --- src/sys/arch/arm/nvidia/tegra_pcie.c:1.1 Sun May 3 01:07:44 2015 +++ src/sys/arch/arm/nvidia/tegra_pcie.c Sun May 3 01:26:44 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_pcie.c,v 1.1 2015/05/03 01:07:44 jmcneill Exp $ */ +/* $NetBSD: tegra_pcie.c,v 1.2 2015/05/03 01:26:44 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -29,7 +29,7 @@ #include "locators.h" #include -__KERNEL_RCSID(0, "$NetBSD: tegra_pcie.c,v 1.1 2015/05/03 01:07:44 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tegra_pcie.c,v 1.2 2015/05/03 01:26:44 jmcneill Exp $"); #include #include @@ -124,7 +124,11 @@ tegra_pcie_attach(device_t parent, devic int error; sc->sc_dev = self; +#if notyet sc->sc_dmat = tio->tio_coherent_dmat; +#else + sc->sc_dmat = tio->tio_dmat; +#endif sc->sc_bst = tio->tio_bst; sc->sc_intr = loc->loc_intr; if (bus_space_map(sc->sc_bst, TEGRA_PCIE_AFI_BASE, TEGRA_PCIE_AFI_SIZE,
CVS commit: src/sys/arch
Module Name:src Committed By: jmcneill Date: Sun May 3 01:07:44 UTC 2015 Modified Files: src/sys/arch/arm/nvidia: files.tegra tegra_intr.h tegra_io.c tegra_reg.h tegra_soc.c tegra_var.h src/sys/arch/evbarm/conf: JETSONTK1 std.tegra src/sys/arch/evbarm/tegra: tegra_machdep.c Added Files: src/sys/arch/arm/nvidia: tegra_pcie.c tegra_pciereg.h Log Message: Add Tegra K1 PCIE support. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/nvidia/files.tegra \ src/sys/arch/arm/nvidia/tegra_reg.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/nvidia/tegra_intr.h cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/nvidia/tegra_io.c \ src/sys/arch/arm/nvidia/tegra_soc.c cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/nvidia/tegra_pcie.c \ src/sys/arch/arm/nvidia/tegra_pciereg.h cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/nvidia/tegra_var.h cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/conf/JETSONTK1 cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbarm/conf/std.tegra cvs rdiff -u -r1.8 -r1.9 src/sys/arch/evbarm/tegra/tegra_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/arm/nvidia/files.tegra diff -u src/sys/arch/arm/nvidia/files.tegra:1.5 src/sys/arch/arm/nvidia/files.tegra:1.6 --- src/sys/arch/arm/nvidia/files.tegra:1.5 Sat May 2 17:15:20 2015 +++ src/sys/arch/arm/nvidia/files.tegra Sun May 3 01:07:44 2015 @@ -1,4 +1,4 @@ -# $NetBSD: files.tegra,v 1.5 2015/05/02 17:15:20 jmcneill Exp $ +# $NetBSD: files.tegra,v 1.6 2015/05/03 01:07:44 jmcneill Exp $ # # Configuration info for NVIDIA Tegra ARM Peripherals # @@ -53,6 +53,11 @@ file arch/arm/nvidia/tegra_ehci.c tegra attach sdhc at tegraio with tegra_sdhc file arch/arm/nvidia/tegra_sdhc.c tegra_sdhc +# PCIE +device tegrapcie: pcibus +attach tegrapcie at tegraio with tegra_pcie +file arch/arm/nvidia/tegra_pcie.c tegra_pcie + # SATA attach ahcisata at tegraio with tegra_ahcisata file arch/arm/nvidia/tegra_ahcisata.c tegra_ahcisata Index: src/sys/arch/arm/nvidia/tegra_reg.h diff -u src/sys/arch/arm/nvidia/tegra_reg.h:1.5 src/sys/arch/arm/nvidia/tegra_reg.h:1.6 --- src/sys/arch/arm/nvidia/tegra_reg.h:1.5 Sat May 2 12:08:32 2015 +++ src/sys/arch/arm/nvidia/tegra_reg.h Sun May 3 01:07:44 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_reg.h,v 1.5 2015/05/02 12:08:32 jmcneill Exp $ */ +/* $NetBSD: tegra_reg.h,v 1.6 2015/05/03 01:07:44 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -33,6 +33,24 @@ #define TEGRA_EXTMEM_BASE 0x8000 +#define TEGRA_PCIE_OFFSET 0x0100 +#define TEGRA_PCIE_SIZE 0x3eff +#define TEGRA_PCIE_PADS_BASE 0x01003000 +#define TEGRA_PCIE_PADS_SIZE 0x0800 +#define TEGRA_PCIE_AFI_BASE 0x01003800 +#define TEGRA_PCIE_AFI_SIZE 0x0800 +#define TEGRA_PCIE_A1_BASE 0x0100 +#define TEGRA_PCIE_A1_SIZE 0x2000 +#define TEGRA_PCIE_A2_BASE 0x0200 +#define TEGRA_PCIE_A2_SIZE 0x0100 + +#define TEGRA_PCIE_IO_BASE 0x1200 +#define TEGRA_PCIE_IO_SIZE 0x0001 +#define TEGRA_PCIE_MEM_BASE 0x1300 +#define TEGRA_PCIE_MEM_SIZE 0x0d00 +#define TEGRA_PCIE_PMEM_BASE 0x2000 +#define TEGRA_PCIE_PMEM_SIZE 0x2000 + #define TEGRA_HOST1X_BASE 0x5000 #define TEGRA_HOST1X_SIZE 0x0010 #define TEGRA_PPSB_BASE 0x6000 Index: src/sys/arch/arm/nvidia/tegra_intr.h diff -u src/sys/arch/arm/nvidia/tegra_intr.h:1.2 src/sys/arch/arm/nvidia/tegra_intr.h:1.3 --- src/sys/arch/arm/nvidia/tegra_intr.h:1.2 Sun Mar 29 10:44:54 2015 +++ src/sys/arch/arm/nvidia/tegra_intr.h Sun May 3 01:07:44 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_intr.h,v 1.2 2015/03/29 10:44:54 jmcneill Exp $ */ +/* $NetBSD: tegra_intr.h,v 1.3 2015/05/03 01:07:44 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -50,5 +50,8 @@ #define TEGRA_INTR_HDA TEGRA_INTR(81) #define TEGRA_INTR_UARTD TEGRA_INTR(90) #define TEGRA_INTR_USB3 TEGRA_INTR(97) +#define TEGRA_INTR_PCIE_INT TEGRA_INTR(98) +#define TEGRA_INTR_PCIE_MSI TEGRA_INTR(99) +#define TEGRA_INTR_PCIE_WAKE TEGRA_INTR(100) #endif /* _ARM_TEGRA_INTR_H */ Index: src/sys/arch/arm/nvidia/tegra_io.c diff -u src/sys/arch/arm/nvidia/tegra_io.c:1.4 src/sys/arch/arm/nvidia/tegra_io.c:1.5 --- src/sys/arch/arm/nvidia/tegra_io.c:1.4 Sat May 2 12:08:32 2015 +++ src/sys/arch/arm/nvidia/tegra_io.c Sun May 3 01:07:44 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_io.c,v 1.4 2015/05/02 12:08:32 jmcneill Exp $ */ +/* $NetBSD: tegra_io.c,v 1.5 2015/05/03 01:07:44 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -29,7 +29,7 @@ #include "opt_tegra.h" #include -__KERNEL_RCSID(0, "$NetBSD: tegra_io.c,v 1.4 2015/05/02 12:08:32 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tegra_io.c,v 1.5 2015/05/03 01:07:44 jmcneill Exp $"); #include #include @@ -104,6 +104,11 @@ static const struct tegra_locators tegra TEGRA_USB3_OFFSET, TEGRA_USB3_SIZE, 2, TEGRA_INTR_USB3 }, }; +static
CVS commit: src/sys/dev/pci
Module Name:src Committed By: matt Date: Sun May 3 00:04:06 UTC 2015 Modified Files: src/sys/dev/pci: if_re_pci.c Log Message: Deal with 64-bit BARs To generate a diff of this commit: cvs rdiff -u -r1.43 -r1.44 src/sys/dev/pci/if_re_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/pci/if_re_pci.c diff -u src/sys/dev/pci/if_re_pci.c:1.43 src/sys/dev/pci/if_re_pci.c:1.44 --- src/sys/dev/pci/if_re_pci.c:1.43 Sat Mar 29 19:28:25 2014 +++ src/sys/dev/pci/if_re_pci.c Sun May 3 00:04:06 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_re_pci.c,v 1.43 2014/03/29 19:28:25 christos Exp $ */ +/* $NetBSD: if_re_pci.c,v 1.44 2015/05/03 00:04:06 matt Exp $ */ /* * Copyright (c) 1997, 1998-2003 @@ -46,7 +46,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_re_pci.c,v 1.43 2014/03/29 19:28:25 christos Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_re_pci.c,v 1.44 2015/05/03 00:04:06 matt Exp $"); #include @@ -201,8 +201,12 @@ re_pci_attach(device_t parent, device_t switch (memtype) { case PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_32BIT: case PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_64BIT: - memh_valid = (pci_mapreg_map(pa, RTK_PCI_LOMEM, - memtype, 0, &memt, &memh, NULL, &memsize) == 0); + memh_valid = + (pci_mapreg_map(pa, RTK_PCI_LOMEM, + memtype, 0, &memt, &memh, NULL, &memsize) == 0) || + (pci_mapreg_map(pa, RTK_PCI_LOMEM + 4, + PCI_MAPREG_TYPE_MEM | PCI_MAPREG_MEM_TYPE_64BIT, + 0, &memt, &memh, NULL, &memsize) == 0); break; default: memh_valid = 0;
CVS commit: src/sys/kern
Module Name:src Committed By: rtr Date: Sat May 2 23:46:04 UTC 2015 Modified Files: src/sys/kern: uipc_socket.c Log Message: compare mbuf * pointer to NULL instead of 0 To generate a diff of this commit: cvs rdiff -u -r1.242 -r1.243 src/sys/kern/uipc_socket.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/kern/uipc_socket.c diff -u src/sys/kern/uipc_socket.c:1.242 src/sys/kern/uipc_socket.c:1.243 --- src/sys/kern/uipc_socket.c:1.242 Sat May 2 21:15:33 2015 +++ src/sys/kern/uipc_socket.c Sat May 2 23:46:04 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_socket.c,v 1.242 2015/05/02 21:15:33 rtr Exp $ */ +/* $NetBSD: uipc_socket.c,v 1.243 2015/05/02 23:46:04 rtr Exp $ */ /*- * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.242 2015/05/02 21:15:33 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.243 2015/05/02 23:46:04 rtr Exp $"); #include "opt_compat_netbsd.h" #include "opt_sock_counters.h" @@ -941,7 +941,7 @@ sosend(struct socket *so, struct mbuf *a error = ENOTCONN; goto release; } - } else if (addr == 0) { + } else if (NULL == addr) { error = EDESTADDRREQ; goto release; }
CVS commit: src/sys/arch/arc/conf
Module Name:src Committed By: christos Date: Sat May 2 23:21:40 UTC 2015 Modified Files: src/sys/arch/arc/conf: RAMDISK Log Message: grow it a bit. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sys/arch/arc/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/arc/conf/RAMDISK diff -u src/sys/arch/arc/conf/RAMDISK:1.81 src/sys/arch/arc/conf/RAMDISK:1.82 --- src/sys/arch/arc/conf/RAMDISK:1.81 Thu Aug 8 09:21:38 2013 +++ src/sys/arch/arc/conf/RAMDISK Sat May 2 19:21:40 2015 @@ -1,4 +1,4 @@ -# $NetBSD: RAMDISK,v 1.81 2013/08/08 13:21:38 he Exp $ +# $NetBSD: RAMDISK,v 1.82 2015/05/02 23:21:40 christos Exp $ # # memory disk based configuration file for MIPS R4x00 ARC Systems # @@ -9,7 +9,7 @@ include "arch/arc/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=5420 # size of memory disk, in blocks +options MEMORY_DISK_ROOT_SIZE=8420 # 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/kern
Module Name:src Committed By: rtr Date: Sat May 2 21:15:33 UTC 2015 Modified Files: src/sys/kern: uipc_socket.c Log Message: remove unnecessary check that nam != NULL before deref in soconnect() (added in previous commit). sockargs copyin() makes sure we don't get NULL here To generate a diff of this commit: cvs rdiff -u -r1.241 -r1.242 src/sys/kern/uipc_socket.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/kern/uipc_socket.c diff -u src/sys/kern/uipc_socket.c:1.241 src/sys/kern/uipc_socket.c:1.242 --- src/sys/kern/uipc_socket.c:1.241 Sat May 2 20:10:26 2015 +++ src/sys/kern/uipc_socket.c Sat May 2 21:15:33 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_socket.c,v 1.241 2015/05/02 20:10:26 rtr Exp $ */ +/* $NetBSD: uipc_socket.c,v 1.242 2015/05/02 21:15:33 rtr Exp $ */ /*- * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.241 2015/05/02 20:10:26 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.242 2015/05/02 21:15:33 rtr Exp $"); #include "opt_compat_netbsd.h" #include "opt_sock_counters.h" @@ -830,8 +830,7 @@ soconnect(struct socket *so, struct sock (error = sodisconnect(so { error = EISCONN; } else { - if (NULL != nam && - nam->sa_family != so->so_proto->pr_domain->dom_family) { + if (nam->sa_family != so->so_proto->pr_domain->dom_family) { return EAFNOSUPPORT; } error = (*so->so_proto->pr_usrreqs->pr_connect)(so, nam, l);
CVS commit: src/sys/netinet
Module Name:src Committed By: joerg Date: Sat May 2 20:22:12 UTC 2015 Modified Files: src/sys/netinet: in.c ip_input.c Log Message: Fix !ARP build. To generate a diff of this commit: cvs rdiff -u -r1.153 -r1.154 src/sys/netinet/in.c cvs rdiff -u -r1.321 -r1.322 src/sys/netinet/ip_input.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/netinet/in.c diff -u src/sys/netinet/in.c:1.153 src/sys/netinet/in.c:1.154 --- src/sys/netinet/in.c:1.153 Sat May 2 15:22:03 2015 +++ src/sys/netinet/in.c Sat May 2 20:22:12 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: in.c,v 1.153 2015/05/02 15:22:03 roy Exp $ */ +/* $NetBSD: in.c,v 1.154 2015/05/02 20:22:12 joerg Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,8 +91,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.153 2015/05/02 15:22:03 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.154 2015/05/02 20:22:12 joerg Exp $"); +#include "arp.h" #include "opt_inet.h" #include "opt_inet_conf.h" #include "opt_mrouting.h" @@ -663,8 +664,10 @@ in_purgeaddr(struct ifaddr *ifa) struct ifnet *ifp = ifa->ifa_ifp; struct in_ifaddr *ia = (void *) ifa; -/* stop DAD processing */ +#if NARP + /* stop DAD processing */ arp_dad_stop(ifa); +#endif in_ifscrub(ifp, ia); in_ifremlocal(ifa); @@ -979,10 +982,12 @@ in_ifinit(struct ifnet *ifp, struct in_i ia->ia_allhosts = in_addmulti(&addr, ifp); } +#if NARP if (hostIsNew && if_do_dad(ifp) && !in_nullhost(ia->ia_addr.sin_addr) && ia->ia4_flags & IN_IFF_TENTATIVE) arp_dad_start((struct ifaddr *)ia); +#endif return (error); bad: @@ -1178,11 +1183,13 @@ in_if_link_up(struct ifnet *ifp) rt_newaddrmsg(RTM_NEWADDR, ifa, 0, NULL); } +#if NARP if (ia->ia4_flags & IN_IFF_TENTATIVE) { /* Clear the duplicated flag as we're starting DAD. */ ia->ia4_flags &= ~IN_IFF_DUPLICATED; arp_dad_start(ifa); } +#endif } } @@ -1208,8 +1215,10 @@ in_if_link_down(struct ifnet *ifp) continue; ia = (struct in_ifaddr *)ifa; +#if NARP /* Stop DAD processing */ arp_dad_stop(ifa); +#endif /* * Mark the address as detached. Index: src/sys/netinet/ip_input.c diff -u src/sys/netinet/ip_input.c:1.321 src/sys/netinet/ip_input.c:1.322 --- src/sys/netinet/ip_input.c:1.321 Sat May 2 14:41:32 2015 +++ src/sys/netinet/ip_input.c Sat May 2 20:22:12 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ip_input.c,v 1.321 2015/05/02 14:41:32 roy Exp $ */ +/* $NetBSD: ip_input.c,v 1.322 2015/05/02 20:22:12 joerg Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.321 2015/05/02 14:41:32 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ip_input.c,v 1.322 2015/05/02 20:22:12 joerg Exp $"); #include "opt_inet.h" #include "opt_compat_netbsd.h" @@ -1645,6 +1645,7 @@ sysctl_net_inet_ip_setup(struct sysctllo sysctl_net_inet_ip_stats, 0, NULL, 0, CTL_NET, PF_INET, IPPROTO_IP, IPCTL_STATS, CTL_EOL); +#if NARP sysctl_createv(clog, 0, NULL, NULL, CTLFLAG_PERMANENT|CTLFLAG_READWRITE, CTLTYPE_INT, "dad_count", @@ -1653,6 +1654,7 @@ sysctl_net_inet_ip_setup(struct sysctllo NULL, 0, &ip_dad_count, 0, CTL_NET, PF_INET, IPPROTO_IP, IPCTL_DAD_COUNT, CTL_EOL); +#endif /* anonportalgo RFC6056 subtree */ const struct sysctlnode *portalgo_node;
CVS commit: src/sys/kern
Module Name:src Committed By: rtr Date: Sat May 2 20:10:26 UTC 2015 Modified Files: src/sys/kern: uipc_socket.c Log Message: make soconnect() fail with EAFNOSUPPORT if the domain of the socket does not match family received in the sockaddr. * connect() now fails as documented in connect(2). * atf test t_connect:connect_foreign_family now passes. To generate a diff of this commit: cvs rdiff -u -r1.240 -r1.241 src/sys/kern/uipc_socket.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/kern/uipc_socket.c diff -u src/sys/kern/uipc_socket.c:1.240 src/sys/kern/uipc_socket.c:1.241 --- src/sys/kern/uipc_socket.c:1.240 Sat May 2 17:18:03 2015 +++ src/sys/kern/uipc_socket.c Sat May 2 20:10:26 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: uipc_socket.c,v 1.240 2015/05/02 17:18:03 rtr Exp $ */ +/* $NetBSD: uipc_socket.c,v 1.241 2015/05/02 20:10:26 rtr Exp $ */ /*- * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -71,7 +71,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.240 2015/05/02 17:18:03 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.241 2015/05/02 20:10:26 rtr Exp $"); #include "opt_compat_netbsd.h" #include "opt_sock_counters.h" @@ -827,10 +827,15 @@ soconnect(struct socket *so, struct sock */ if (so->so_state & (SS_ISCONNECTED|SS_ISCONNECTING) && ((so->so_proto->pr_flags & PR_CONNREQUIRED) || - (error = sodisconnect(so + (error = sodisconnect(so { error = EISCONN; - else + } else { + if (NULL != nam && + nam->sa_family != so->so_proto->pr_domain->dom_family) { + return EAFNOSUPPORT; + } error = (*so->so_proto->pr_usrreqs->pr_connect)(so, nam, l); + } return error; }
CVS commit: [netbsd-7] src/doc
Module Name:src Committed By: martin Date: Sat May 2 18:27:09 UTC 2015 Modified Files: src/doc [netbsd-7]: CHANGES-7.0 Log Message: Tickets #728 - #731 To generate a diff of this commit: cvs rdiff -u -r1.1.2.276 -r1.1.2.277 src/doc/CHANGES-7.0 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-7.0 diff -u src/doc/CHANGES-7.0:1.1.2.276 src/doc/CHANGES-7.0:1.1.2.277 --- src/doc/CHANGES-7.0:1.1.2.276 Fri May 1 08:06:00 2015 +++ src/doc/CHANGES-7.0 Sat May 2 18:27:09 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-7.0,v 1.1.2.276 2015/05/01 08:06:00 martin Exp $ +# $NetBSD: CHANGES-7.0,v 1.1.2.277 2015/05/02 18:27:09 martin Exp $ A complete list of changes from the initial NetBSD 7.0 branch on 11 Aug 2014 until the 7.0 release: @@ -22762,3 +22762,25 @@ usr.bin/calendar/calendars/calendar.usho [snj, ticket #727] +etc/rc.d/sshd 1.23 + + Add new keytype, replace duplicated code with loop + [nakayama, ticket #728] + +distrib/sparc64/liveimage/emuimage/Makefile 1.4 + + Don't forget to put /ofwboot into the image otherwise boot fails. + [tsutsui, ticket #729] + +lib/csu/arch/mips/crti.S 1.3 + + Make sure .init and .fini are word (4byte) aligned. + [skrll, ticket #730] + +sys/netinet6/nd6_rtr.c1.99 + + Mitigate Local Denial of Service with IPv6 Router Advertisements and + log attack attempts. + Fixes CVE-2015-2923, taken from FreeBSD. + [roy, ticket #731] +
CVS commit: [netbsd-7] src/sys/netinet6
Module Name:src Committed By: martin Date: Sat May 2 18:23:26 UTC 2015 Modified Files: src/sys/netinet6 [netbsd-7]: nd6_rtr.c Log Message: Pull up following revision(s) (requested by roy in ticket #731): sys/netinet6/nd6_rtr.c: revision 1.99 Mitigate Local Denial of Service with IPv6 Router Advertisements and log attack attempts. Fixes CVE-2015-2923, taken from FreeBSD. To generate a diff of this commit: cvs rdiff -u -r1.93.2.2 -r1.93.2.3 src/sys/netinet6/nd6_rtr.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/netinet6/nd6_rtr.c diff -u src/sys/netinet6/nd6_rtr.c:1.93.2.2 src/sys/netinet6/nd6_rtr.c:1.93.2.3 --- src/sys/netinet6/nd6_rtr.c:1.93.2.2 Mon Apr 6 01:32:33 2015 +++ src/sys/netinet6/nd6_rtr.c Sat May 2 18:23:25 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_rtr.c,v 1.93.2.2 2015/04/06 01:32:33 snj Exp $ */ +/* $NetBSD: nd6_rtr.c,v 1.93.2.3 2015/05/02 18:23:25 martin Exp $ */ /* $KAME: nd6_rtr.c,v 1.95 2001/02/07 08:09:47 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.93.2.2 2015/04/06 01:32:33 snj Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.93.2.3 2015/05/02 18:23:25 martin Exp $"); #include #include @@ -272,8 +272,15 @@ nd6_ra_input(struct mbuf *m, int off, in } if (nd_ra->nd_ra_retransmit) ndi->retrans = ntohl(nd_ra->nd_ra_retransmit); - if (nd_ra->nd_ra_curhoplimit) - ndi->chlim = nd_ra->nd_ra_curhoplimit; + if (nd_ra->nd_ra_curhoplimit) { + if (ndi->chlim < nd_ra->nd_ra_curhoplimit) + ndi->chlim = nd_ra->nd_ra_curhoplimit; + else if (ndi->chlim != nd_ra->nd_ra_curhoplimit) + log(LOG_ERR, "nd_ra_input: lower CurHopLimit sent from " + "%s on %s (current=%d, received=%d), ignored\n", + ip6_sprintf(&ip6->ip6_src), + if_name(ifp), ndi->chlim, nd_ra->nd_ra_curhoplimit); + } dr = defrtrlist_update(&drtr); }
CVS commit: src/share/mk
Module Name:src Committed By: matt Date: Sat May 2 18:18:13 UTC 2015 Modified Files: src/share/mk: bsd.kmodule.mk Log Message: For mips64, build kmodules using N64 ABI To generate a diff of this commit: cvs rdiff -u -r1.52 -r1.53 src/share/mk/bsd.kmodule.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.kmodule.mk diff -u src/share/mk/bsd.kmodule.mk:1.52 src/share/mk/bsd.kmodule.mk:1.53 --- src/share/mk/bsd.kmodule.mk:1.52 Thu Nov 13 02:31:24 2014 +++ src/share/mk/bsd.kmodule.mk Sat May 2 18:18:13 2015 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.kmodule.mk,v 1.52 2014/11/13 02:31:24 christos Exp $ +# $NetBSD: bsd.kmodule.mk,v 1.53 2015/05/02 18:18:13 matt Exp $ # We are not building this with PIE MKPIE=no @@ -37,6 +37,12 @@ CFLAGS+= ${${ACTIVE_CC} == "gcc":? -mlon CFLAGS+= -fno-pic .elif ${MACHINE_CPU} == "riscv" CFLAGS+= -fPIC -Wa,-fno-pic +.elif ${MACHINE_ARCH} == "mips64eb" +CFLAGS+= -mabi=64 +LDFLAGS+= -Wl,-m,elf64btsmip +.elif ${MACHINE_ARCH} == "mips64el" +CFLAGS+= -mabi=64 +LDFLAGS+= -Wl,-m,elf64ltsmip .endif .if ${MACHINE_CPU} == "sparc64"
CVS commit: [netbsd-7] src/lib/csu/arch/mips
Module Name:src Committed By: martin Date: Sat May 2 18:18:22 UTC 2015 Modified Files: src/lib/csu/arch/mips [netbsd-7]: crti.S Log Message: Pull up following revision(s) (requested by skrll in ticket #730): lib/csu/arch/mips/crti.S: revision 1.3 Make sure .init and .fini are word (4byte) aligned. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.2.8.1 src/lib/csu/arch/mips/crti.S Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/csu/arch/mips/crti.S diff -u src/lib/csu/arch/mips/crti.S:1.2 src/lib/csu/arch/mips/crti.S:1.2.8.1 --- src/lib/csu/arch/mips/crti.S:1.2 Sun Jun 30 08:00:34 2013 +++ src/lib/csu/arch/mips/crti.S Sat May 2 18:18:22 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: crti.S,v 1.2 2013/06/30 08:00:34 matt Exp $ */ +/* $NetBSD: crti.S,v 1.2.8.1 2015/05/02 18:18:22 martin Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -31,11 +31,12 @@ #include -RCSID("$NetBSD: crti.S,v 1.2 2013/06/30 08:00:34 matt Exp $") +RCSID("$NetBSD: crti.S,v 1.2.8.1 2015/05/02 18:18:22 martin Exp $") #include "sysident.S" .section ".init", "ax", @progbits + .p2align 2 NESTED_NOPROFILE(_init, CALLFRAME_SIZ, ra) SETUP_GP PTR_SUBU sp, sp, CALLFRAME_SIZ # allocate stack frame @@ -48,6 +49,7 @@ NESTED_NOPROFILE(_init, CALLFRAME_SIZ, r END(_init) .section ".fini", "ax", @progbits + .p2align 2 NESTED_NOPROFILE(_fini, CALLFRAME_SIZ, ra) SETUP_GP PTR_SUBU sp, sp, CALLFRAME_SIZ # allocate stack frame
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: matt Date: Sat May 2 18:16:17 UTC 2015 Modified Files: src/sys/arch/mips/include: locore.h Log Message: mips_{l,s}d_a64 only valid for !O32 To generate a diff of this commit: cvs rdiff -u -r1.96 -r1.97 src/sys/arch/mips/include/locore.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/mips/include/locore.h diff -u src/sys/arch/mips/include/locore.h:1.96 src/sys/arch/mips/include/locore.h:1.97 --- src/sys/arch/mips/include/locore.h:1.96 Fri May 1 18:37:40 2015 +++ src/sys/arch/mips/include/locore.h Sat May 2 18:16:17 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.h,v 1.96 2015/05/01 18:37:40 christos Exp $ */ +/* $NetBSD: locore.h,v 1.97 2015/05/02 18:16:17 matt Exp $ */ /* * This file should not be included by MI code!!! @@ -317,7 +317,7 @@ mips3_sw_a64(uint64_t addr, uint32_t val } #endif /* (MIPS3 + MIPS4 + MIPS64 + MIPS64R2) > 0 */ -#if (MIPS64 + MIPS64R2) > 0 +#if (MIPS64 + MIPS64R2) > 0 && !defined(__mips_o32) /* 64-bits address space accessor for n32, n64 ABI */ static __inline uint64_t mips64_ld_a64(uint64_t addr) __unused; @@ -332,7 +332,7 @@ mips64_ld_a64(uint64_t addr) #elif defined(_LP64) rv = *(volatile uint64_t *)addr; #else - KASSERT(0); // LKM, STANDALONE, MODULE +#error unknown ABI #endif return (rv); } @@ -345,7 +345,7 @@ mips64_sd_a64(uint64_t addr, uint64_t va #elif defined(_LP64) *(volatile uint64_t *)addr = val; #else - KASSERT(0); // LKM, STANDALONE, MODULE +#error unknown ABI #endif } #endif /* (MIPS64 + MIPS64R2) > 0 */
CVS commit: [netbsd-7] src/distrib/sparc64/liveimage/emuimage
Module Name:src Committed By: martin Date: Sat May 2 18:09:06 UTC 2015 Modified Files: src/distrib/sparc64/liveimage/emuimage [netbsd-7]: Makefile Log Message: Pull up following revision(s) (requested by tsutsui in ticket #729): distrib/sparc64/liveimage/emuimage/Makefile: revision 1.4 Don't forget to put /ofwboot into the image otherwise boot fails. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.3.10.1 src/distrib/sparc64/liveimage/emuimage/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sparc64/liveimage/emuimage/Makefile diff -u src/distrib/sparc64/liveimage/emuimage/Makefile:1.3 src/distrib/sparc64/liveimage/emuimage/Makefile:1.3.10.1 --- src/distrib/sparc64/liveimage/emuimage/Makefile:1.3 Sat Nov 3 14:25:33 2012 +++ src/distrib/sparc64/liveimage/emuimage/Makefile Sat May 2 18:09:06 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.3 2012/11/03 14:25:33 tsutsui Exp $ +# $NetBSD: Makefile,v 1.3.10.1 2015/05/02 18:09:06 martin Exp $ LIVEIMGBASE= NetBSD-${DISTRIBVER}-sparc64-live-sd0root # gives ${IMGBASE}.img @@ -11,7 +11,7 @@ BOOTDISK= sd0 # for QEMU LIVEIMAGEMB= ${EMUIMAGEMB} .endif PRIMARY_BOOT= bootblk -#SECONDARY_BOOT= # nothing +SECONDARY_BOOT= ofwboot #SECONDARY_BOOT_ARG= # unnecessary USE_SUNLABEL= yes
CVS commit: [netbsd-7] src/etc/rc.d
Module Name:src Committed By: martin Date: Sat May 2 18:04:37 UTC 2015 Modified Files: src/etc/rc.d [netbsd-7]: sshd Log Message: Pull up following revision(s) (requested by nakayama in ticket #728): etc/rc.d/sshd: revision 1.23 Add new keytype, replace duplicated code with loop To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.22.10.1 src/etc/rc.d/sshd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/etc/rc.d/sshd diff -u src/etc/rc.d/sshd:1.22 src/etc/rc.d/sshd:1.22.10.1 --- src/etc/rc.d/sshd:1.22 Thu Feb 7 19:32:19 2013 +++ src/etc/rc.d/sshd Sat May 2 18:04:37 2015 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: sshd,v 1.22 2013/02/07 19:32:19 christos Exp $ +# $NetBSD: sshd,v 1.22.10.1 2015/05/02 18:04:37 martin Exp $ # # PROVIDE: sshd @@ -17,44 +17,31 @@ extra_commands="keygen reload" sshd_keygen() { - ( +( + keygen="/usr/bin/ssh-keygen" umask 022 - if [ -f /etc/ssh/ssh_host_key ]; then - echo "You already have an RSA host key" \ - "in /etc/ssh/ssh_host_key" - echo "Skipping protocol version 1 RSA Key Generation" - else - /usr/bin/ssh-keygen -t rsa1 ${ssh_keygen_flags} \ - -f /etc/ssh/ssh_host_key -N '' - fi - - if [ -f /etc/ssh/ssh_host_dsa_key ]; then - echo "You already have a DSA host key" \ - "in /etc/ssh/ssh_host_dsa_key" - echo "Skipping protocol version 2 DSA Key Generation" - else - /usr/bin/ssh-keygen -t dsa -b 1024 \ - -f /etc/ssh/ssh_host_dsa_key -N '' - fi - - if [ -f /etc/ssh/ssh_host_ecdsa_key ]; then - echo "You already have a ECDSA host key" \ - "in /etc/ssh/ssh_host_ecdsa_key" - echo "Skipping protocol version 1 ECDSA Key Generation" - else - /usr/bin/ssh-keygen -t ecdsa -b 521 \ - -f /etc/ssh/ssh_host_ecdsa_key -N '' - fi - - if [ -f /etc/ssh/ssh_host_rsa_key ]; then - echo "You already have a RSA host key" \ - "in /etc/ssh/ssh_host_rsa_key" - echo "Skipping protocol version 2 RSA Key Generation" - else - /usr/bin/ssh-keygen -t rsa ${ssh_keygen_flags} \ - -f /etc/ssh/ssh_host_rsa_key -N '' - fi - ) + while read type bits filename version name; do + f="/etc/ssh/$filename" + if [ -f "$f" ]; then + echo "You already have an $name host key in $f" + echo "Skipping protocol version $version $name" \ + "Key Generation" + else + case "${bits}" in + -1) bitarg=;; + 0) bitarg="${ssh_keygen_flags}";; + *) bitarg="-b ${bits}";; + esac + "${keygen}" -t "${type}" ${bitarg} -f "${f}" -N '' + fi + done << _EOF +rsa1 0 ssh_host_key 1 RSA +dsa 1024 ssh_host_dsa_key 2 DSA +ecdsa 521 ssh_host_ecdsa_key 1 ECDSA +ed25519 -1 ssh_host_ed25519_key 1 ED25519 +rsa 0 ssh_host_rsa_key 2 RSA +_EOF +) } sshd_precmd() @@ -62,6 +49,7 @@ sshd_precmd() if [ ! -f /etc/ssh/ssh_host_key -o \ ! -f /etc/ssh/ssh_host_dsa_key -o \ ! -f /etc/ssh/ssh_host_ecdsa_key -o \ + ! -f /etc/ssh/ssh_host_ed25519_key -o \ ! -f /etc/ssh/ssh_host_rsa_key ]; then run_rc_command keygen fi
CVS commit: src/sys/arch/mips/include
Module Name:src Committed By: matt Date: Sat May 2 17:39:31 UTC 2015 Modified Files: src/sys/arch/mips/include: cpu.h Log Message: Don't define MIPS1/MIPS32/MIPS32R2 if ABI is N32 or N64. To generate a diff of this commit: cvs rdiff -u -r1.109 -r1.110 src/sys/arch/mips/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/mips/include/cpu.h diff -u src/sys/arch/mips/include/cpu.h:1.109 src/sys/arch/mips/include/cpu.h:1.110 --- src/sys/arch/mips/include/cpu.h:1.109 Sun Nov 10 17:18:32 2013 +++ src/sys/arch/mips/include/cpu.h Sat May 2 17:39:31 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.109 2013/11/10 17:18:32 christos Exp $ */ +/* $NetBSD: cpu.h,v 1.110 2015/05/02 17:39:31 matt Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -175,17 +175,21 @@ struct cpu_info { #ifdef _KERNEL #if defined(_MODULAR) || defined(_LKM) || defined(_STANDALONE) /* Assume all CPU architectures are valid for LKM's and standlone progs */ +#if !defined(__mips_n32) && !defined(__mips_n64) #define MIPS1 1 +#endif #define MIPS3 1 #define MIPS4 1 +#if !defined(__mips_n32) && !defined(__mips_n64) #define MIPS32 1 #define MIPS32R2 1 +#endif #define MIPS64 1 #define MIPS64R2 1 #endif #if (MIPS1 + MIPS3 + MIPS4 + MIPS32 + MIPS32R2 + MIPS64 + MIPS64R2) == 0 -#error at least one of MIPS1, MIPS3, MIPS4, MIPS32, MIPS32R2, MIPS64, or MIPS64RR2 must be specified +#error at least one of MIPS1, MIPS3, MIPS4, MIPS32, MIPS32R2, MIPS64, or MIPS64R2 must be specified #endif /* Shortcut for MIPS3 or above defined */
CVS commit: [netbsd-6-0] src/doc
Module Name:src Committed By: martin Date: Sat May 2 17:25:38 UTC 2015 Modified Files: src/doc [netbsd-6-0]: CHANGES-6.0.7 Log Message: Ticket #1297 To generate a diff of this commit: cvs rdiff -u -r1.1.2.41 -r1.1.2.42 src/doc/CHANGES-6.0.7 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.0.7 diff -u src/doc/CHANGES-6.0.7:1.1.2.41 src/doc/CHANGES-6.0.7:1.1.2.42 --- src/doc/CHANGES-6.0.7:1.1.2.41 Sun Apr 19 05:59:36 2015 +++ src/doc/CHANGES-6.0.7 Sat May 2 17:25:37 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.0.7,v 1.1.2.41 2015/04/19 05:59:36 msaitoh Exp $ +# $NetBSD: CHANGES-6.0.7,v 1.1.2.42 2015/05/02 17:25:37 martin Exp $ A complete list of changes from the NetBSD 6.0.6 release to the NetBSD 6.0.7 release: @@ -5988,3 +5988,9 @@ xsrc/xfree/xc/lib/X11/Xlibint.h1.2 Fix CVE-2013-7439: Buffer overflow in MakeBigReq macro in libX11. [mrg, ticket #1290] + +distrib/sparc64/liveimage/emuimage/Makefile 1.4 + + Don't forget to put /ofwboot into the image otherwise boot fails. + [tsutsui, ticket #1297] +
CVS commit: [netbsd-6-0] src/distrib/sparc64/liveimage/emuimage
Module Name:src Committed By: martin Date: Sat May 2 17:21:45 UTC 2015 Modified Files: src/distrib/sparc64/liveimage/emuimage [netbsd-6-0]: Makefile Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1297): distrib/sparc64/liveimage/emuimage/Makefile: revision 1.4 Don't forget to put /ofwboot into the image otherwise boot fails. To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.1.4.1 \ src/distrib/sparc64/liveimage/emuimage/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sparc64/liveimage/emuimage/Makefile diff -u src/distrib/sparc64/liveimage/emuimage/Makefile:1.1.2.1 src/distrib/sparc64/liveimage/emuimage/Makefile:1.1.2.1.4.1 --- src/distrib/sparc64/liveimage/emuimage/Makefile:1.1.2.1 Fri Aug 17 20:50:50 2012 +++ src/distrib/sparc64/liveimage/emuimage/Makefile Sat May 2 17:21:45 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1.2.1 2012/08/17 20:50:50 martin Exp $ +# $NetBSD: Makefile,v 1.1.2.1.4.1 2015/05/02 17:21:45 martin Exp $ LIVEIMGBASE= NetBSD-${DISTRIBVER}-sparc64-live-sd0root # gives ${IMGBASE}.img @@ -8,7 +8,7 @@ KERN_SET= kern-GENERIC BOOTDISK= sd0 # for QEMU #BOOTDISK= wd0 # for Ultra5/10 image? PRIMARY_BOOT= bootblk -#SECONDARY_BOOT= # nothing +SECONDARY_BOOT= ofwboot #SECONDARY_BOOT_ARG= # unnecessary USE_SUNLABEL= yes
CVS commit: src/sys
Module Name:src Committed By: rtr Date: Sat May 2 17:18:04 UTC 2015 Modified Files: src/sys/compat/linux/common: linux_socket.c src/sys/compat/svr4: svr4_stream.c src/sys/kern: uipc_socket.c uipc_syscalls.c uipc_usrreq.c src/sys/net: if_gre.c link_proto.c raw_cb.h raw_usrreq.c rtsock.c src/sys/netatalk: ddp_usrreq.c src/sys/netbt: hci_socket.c l2cap_socket.c rfcomm_socket.c sco_socket.c src/sys/netinet: dccp_usrreq.c dccp_var.h in_pcb.c in_pcb.h raw_ip.c tcp_input.c tcp_usrreq.c udp_usrreq.c src/sys/netinet6: dccp6_usrreq.c dccp6_var.h in6_pcb.c in6_pcb.h raw_ip6.c udp6_output.c udp6_usrreq.c udp6_var.h src/sys/netipsec: keysock.c src/sys/netmpls: mpls_proto.c src/sys/netnatm: natm.c src/sys/netsmb: smb_trantcp.c src/sys/nfs: nfs_socket.c src/sys/rump/net/lib/libsockin: sockin.c src/sys/sys: param.h protosw.h socketvar.h un.h Log Message: make connect syscall use sockaddr_big and modify pr_{send,connect} nam parameter type from buf * to sockaddr *. final commit for parameter type changes to protocol user requests * bump kernel version to 7.99.15 for parameter type changes to pr_{send,connect} To generate a diff of this commit: cvs rdiff -u -r1.123 -r1.124 src/sys/compat/linux/common/linux_socket.c cvs rdiff -u -r1.84 -r1.85 src/sys/compat/svr4/svr4_stream.c cvs rdiff -u -r1.239 -r1.240 src/sys/kern/uipc_socket.c cvs rdiff -u -r1.176 -r1.177 src/sys/kern/uipc_syscalls.c cvs rdiff -u -r1.178 -r1.179 src/sys/kern/uipc_usrreq.c cvs rdiff -u -r1.164 -r1.165 src/sys/net/if_gre.c cvs rdiff -u -r1.27 -r1.28 src/sys/net/link_proto.c cvs rdiff -u -r1.24 -r1.25 src/sys/net/raw_cb.h cvs rdiff -u -r1.53 -r1.54 src/sys/net/raw_usrreq.c cvs rdiff -u -r1.170 -r1.171 src/sys/net/rtsock.c cvs rdiff -u -r1.67 -r1.68 src/sys/netatalk/ddp_usrreq.c cvs rdiff -u -r1.43 -r1.44 src/sys/netbt/hci_socket.c cvs rdiff -u -r1.34 -r1.35 src/sys/netbt/l2cap_socket.c cvs rdiff -u -r1.36 -r1.37 src/sys/netbt/rfcomm_socket.c \ src/sys/netbt/sco_socket.c cvs rdiff -u -r1.5 -r1.6 src/sys/netinet/dccp_usrreq.c cvs rdiff -u -r1.1 -r1.2 src/sys/netinet/dccp_var.h cvs rdiff -u -r1.159 -r1.160 src/sys/netinet/in_pcb.c cvs rdiff -u -r1.57 -r1.58 src/sys/netinet/in_pcb.h cvs rdiff -u -r1.151 -r1.152 src/sys/netinet/raw_ip.c cvs rdiff -u -r1.338 -r1.339 src/sys/netinet/tcp_input.c cvs rdiff -u -r1.207 -r1.208 src/sys/netinet/tcp_usrreq.c cvs rdiff -u -r1.220 -r1.221 src/sys/netinet/udp_usrreq.c cvs rdiff -u -r1.5 -r1.6 src/sys/netinet6/dccp6_usrreq.c cvs rdiff -u -r1.3 -r1.4 src/sys/netinet6/dccp6_var.h cvs rdiff -u -r1.139 -r1.140 src/sys/netinet6/in6_pcb.c \ src/sys/netinet6/raw_ip6.c cvs rdiff -u -r1.44 -r1.45 src/sys/netinet6/in6_pcb.h cvs rdiff -u -r1.48 -r1.49 src/sys/netinet6/udp6_output.c cvs rdiff -u -r1.119 -r1.120 src/sys/netinet6/udp6_usrreq.c cvs rdiff -u -r1.27 -r1.28 src/sys/netinet6/udp6_var.h cvs rdiff -u -r1.47 -r1.48 src/sys/netipsec/keysock.c cvs rdiff -u -r1.27 -r1.28 src/sys/netmpls/mpls_proto.c cvs rdiff -u -r1.48 -r1.49 src/sys/netnatm/natm.c cvs rdiff -u -r1.47 -r1.48 src/sys/netsmb/smb_trantcp.c cvs rdiff -u -r1.194 -r1.195 src/sys/nfs/nfs_socket.c cvs rdiff -u -r1.61 -r1.62 src/sys/rump/net/lib/libsockin/sockin.c cvs rdiff -u -r1.476 -r1.477 src/sys/sys/param.h cvs rdiff -u -r1.63 -r1.64 src/sys/sys/protosw.h cvs rdiff -u -r1.137 -r1.138 src/sys/sys/socketvar.h cvs rdiff -u -r1.55 -r1.56 src/sys/sys/un.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/compat/linux/common/linux_socket.c diff -u src/sys/compat/linux/common/linux_socket.c:1.123 src/sys/compat/linux/common/linux_socket.c:1.124 --- src/sys/compat/linux/common/linux_socket.c:1.123 Fri Apr 3 20:01:07 2015 +++ src/sys/compat/linux/common/linux_socket.c Sat May 2 17:18:03 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: linux_socket.c,v 1.123 2015/04/03 20:01:07 rtr Exp $ */ +/* $NetBSD: linux_socket.c,v 1.124 2015/05/02 17:18:03 rtr Exp $ */ /*- * Copyright (c) 1995, 1998, 2008 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.123 2015/04/03 20:01:07 rtr Exp $"); +__KERNEL_RCSID(0, "$NetBSD: linux_socket.c,v 1.124 2015/05/02 17:18:03 rtr Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -1402,14 +1402,14 @@ linux_sys_connect(struct lwp *l, const s syscallarg(int) namelen; } */ int error; - struct mbuf *nam; + struct sockaddr_big sb; - error = linux_get_sa(l, SCARG(uap, s), &nam, SCARG(uap, name), + error = linux_get_sa_sb(l, SCARG(uap, s), &sb, SCARG(uap, name), SCARG(uap, namelen)); if (error) return (error); - error = do_sys_connect(l, SCARG(uap, s), nam); + error = do_sys_connect(l, SCARG(uap, s), (struct sockaddr *)&sb); if (error == EISCONN) { struct socket *so; Index: src/sys/compat/svr4/svr4_str
CVS commit: src/sys/arch
Module Name:src Committed By: jmcneill Date: Sat May 2 17:15:20 UTC 2015 Modified Files: src/sys/arch/arm/nvidia: files.tegra src/sys/arch/evbarm/conf: JETSONTK1 src/sys/arch/evbarm/tegra: tegra_machdep.c Log Message: jetsontk1 specific gpio setup for sdhc To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/nvidia/files.tegra cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/conf/JETSONTK1 cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/tegra/tegra_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/arm/nvidia/files.tegra diff -u src/sys/arch/arm/nvidia/files.tegra:1.4 src/sys/arch/arm/nvidia/files.tegra:1.5 --- src/sys/arch/arm/nvidia/files.tegra:1.4 Sat May 2 12:09:04 2015 +++ src/sys/arch/arm/nvidia/files.tegra Sat May 2 17:15:20 2015 @@ -1,4 +1,4 @@ -# $NetBSD: files.tegra,v 1.4 2015/05/02 12:09:04 jmcneill Exp $ +# $NetBSD: files.tegra,v 1.5 2015/05/02 17:15:20 jmcneill Exp $ # # Configuration info for NVIDIA Tegra ARM Peripherals # @@ -72,3 +72,6 @@ defparam opt_tegra.h MEMSIZE # SOC parameters defflag opt_tegra.h SOC_TEGRAK1 defflag opt_tegra.h SOC_TEGRA124: SOC_TEGRAK1 + +# Board parameters +defflag opt_tegra.h BOARD_JETSONTK1 Index: src/sys/arch/evbarm/conf/JETSONTK1 diff -u src/sys/arch/evbarm/conf/JETSONTK1:1.7 src/sys/arch/evbarm/conf/JETSONTK1:1.8 --- src/sys/arch/evbarm/conf/JETSONTK1:1.7 Sat May 2 12:09:34 2015 +++ src/sys/arch/evbarm/conf/JETSONTK1 Sat May 2 17:15:20 2015 @@ -1,5 +1,5 @@ # -# $NetBSD: JETSONTK1,v 1.7 2015/05/02 12:09:34 jmcneill Exp $ +# $NetBSD: JETSONTK1,v 1.8 2015/05/02 17:15:20 jmcneill Exp $ # # NVIDIA Jetson TK1 - Tegra K1 development kit # https://developer.nvidia.com/jetson-tk1 @@ -10,6 +10,7 @@ include "arch/evbarm/conf/GENERIC.common options CPU_CORTEXA15 options SOC_TEGRA124 +options BOARD_JETSONTK1 options MULTIPROCESSOR #options MEMSIZE=2048 Index: src/sys/arch/evbarm/tegra/tegra_machdep.c diff -u src/sys/arch/evbarm/tegra/tegra_machdep.c:1.7 src/sys/arch/evbarm/tegra/tegra_machdep.c:1.8 --- src/sys/arch/evbarm/tegra/tegra_machdep.c:1.7 Mon Apr 27 00:33:46 2015 +++ src/sys/arch/evbarm/tegra/tegra_machdep.c Sat May 2 17:15:20 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_machdep.c,v 1.7 2015/04/27 00:33:46 jmcneill Exp $ */ +/* $NetBSD: tegra_machdep.c,v 1.8 2015/05/02 17:15:20 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: tegra_machdep.c,v 1.7 2015/04/27 00:33:46 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tegra_machdep.c,v 1.8 2015/05/02 17:15:20 jmcneill Exp $"); #include "opt_tegra.h" #include "opt_machdep.h" @@ -376,4 +376,18 @@ tegra_device_register(device_t self, voi prop_dictionary_set_uint32(dict, "frequency", TEGRA_REF_FREQ); return; } + +#ifdef BOARD_JETSONTK1 + if (device_is_a(self, "sdhc") + && device_is_a(device_parent(self), "tegraio")) { + struct tegraio_attach_args * const tio = aux; + const struct tegra_locators * const loc = &tio->tio_loc; + + if (loc->loc_port == 2) { + prop_dictionary_set_cstring(dict, "cd-gpio", "V2"); + prop_dictionary_set_cstring(dict, "power-gpio", "R0"); + prop_dictionary_set_cstring(dict, "wp-gpio", "Q4"); + } + } +#endif }
CVS commit: src/sys/arch/arm/nvidia
Module Name:src Committed By: jmcneill Date: Sat May 2 17:07:55 UTC 2015 Modified Files: src/sys/arch/arm/nvidia: tegra_sdhc.c Log Message: hook up power, card detect, write protect gpios To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/nvidia/tegra_sdhc.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/arm/nvidia/tegra_sdhc.c diff -u src/sys/arch/arm/nvidia/tegra_sdhc.c:1.2 src/sys/arch/arm/nvidia/tegra_sdhc.c:1.3 --- src/sys/arch/arm/nvidia/tegra_sdhc.c:1.2 Sat May 2 14:10:03 2015 +++ src/sys/arch/arm/nvidia/tegra_sdhc.c Sat May 2 17:07:55 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_sdhc.c,v 1.2 2015/05/02 14:10:03 jmcneill Exp $ */ +/* $NetBSD: tegra_sdhc.c,v 1.3 2015/05/02 17:07:55 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -29,7 +29,7 @@ #include "locators.h" #include -__KERNEL_RCSID(0, "$NetBSD: tegra_sdhc.c,v 1.2 2015/05/02 14:10:03 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tegra_sdhc.c,v 1.3 2015/05/02 17:07:55 jmcneill Exp $"); #include #include @@ -50,6 +50,9 @@ __KERNEL_RCSID(0, "$NetBSD: tegra_sdhc.c static int tegra_sdhc_match(device_t, cfdata_t, void *); static void tegra_sdhc_attach(device_t, device_t, void *); +static int tegra_sdhc_card_detect(struct sdhc_softc *); +static int tegra_sdhc_write_protect(struct sdhc_softc *); + struct tegra_sdhc_softc { struct sdhc_softc sc; @@ -60,6 +63,10 @@ struct tegra_sdhc_softc { bus_size_t sc_bsz; struct sdhc_host *sc_host; void *sc_ih; + + struct tegra_gpio_pin *sc_pin_cd; + struct tegra_gpio_pin *sc_pin_power; + struct tegra_gpio_pin *sc_pin_wp; }; CFATTACH_DECL_NEW(tegra_sdhc, sizeof(struct tegra_sdhc_softc), @@ -77,6 +84,8 @@ tegra_sdhc_attach(device_t parent, devic struct tegra_sdhc_softc * const sc = device_private(self); struct tegraio_attach_args * const tio = aux; const struct tegra_locators * const loc = &tio->tio_loc; + prop_dictionary_t prop = device_properties(self); + const char *pin; int error; sc->sc.sc_dev = self; @@ -97,6 +106,22 @@ tegra_sdhc_attach(device_t parent, devic sc->sc_bsz = loc->loc_size; sc->sc_port = loc->loc_port; + if (prop_dictionary_get_cstring_nocopy(prop, "power-gpio", &pin)) { + sc->sc_pin_power = tegra_gpio_acquire(pin, GPIO_PIN_OUTPUT); + if (sc->sc_pin_power) + tegra_gpio_write(sc->sc_pin_power, 1); + } + + if (prop_dictionary_get_cstring_nocopy(prop, "cd-gpio", &pin)) + sc->sc_pin_cd = tegra_gpio_acquire(pin, GPIO_PIN_INPUT); + if (prop_dictionary_get_cstring_nocopy(prop, "wp-gpio", &pin)) + sc->sc_pin_wp = tegra_gpio_acquire(pin, GPIO_PIN_INPUT); + + if (sc->sc_pin_cd) + sc->sc.sc_vendor_card_detect = tegra_sdhc_card_detect; + if (sc->sc_pin_wp) + sc->sc.sc_vendor_write_protect = tegra_sdhc_write_protect; + /* * The controller supports SDR104 speeds (208 MHz). With PLLP (408 Mhz) * as input and div=2 we can get a reasonable 204 MHz for the SDHC. @@ -131,3 +156,23 @@ tegra_sdhc_attach(device_t parent, devic return; } } + +static int +tegra_sdhc_card_detect(struct sdhc_softc *ssc) +{ + struct tegra_sdhc_softc *sc = device_private(ssc->sc_dev); + + KASSERT(sc->sc_pin_cd != NULL); + + return !tegra_gpio_read(sc->sc_pin_cd); +} + +static int +tegra_sdhc_write_protect(struct sdhc_softc *ssc) +{ + struct tegra_sdhc_softc *sc = device_private(ssc->sc_dev); + + KASSERT(sc->sc_pin_wp != NULL); + + return tegra_gpio_read(sc->sc_pin_wp); +}
CVS commit: [netbsd-6-1] src/doc
Module Name:src Committed By: martin Date: Sat May 2 17:08:07 UTC 2015 Modified Files: src/doc [netbsd-6-1]: CHANGES-6.1.6 Log Message: Ticket #1297 To generate a diff of this commit: cvs rdiff -u -r1.1.2.40 -r1.1.2.41 src/doc/CHANGES-6.1.6 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.1.6 diff -u src/doc/CHANGES-6.1.6:1.1.2.40 src/doc/CHANGES-6.1.6:1.1.2.41 --- src/doc/CHANGES-6.1.6:1.1.2.40 Sun Apr 19 05:59:12 2015 +++ src/doc/CHANGES-6.1.6 Sat May 2 17:08:07 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.1.6,v 1.1.2.40 2015/04/19 05:59:12 msaitoh Exp $ +# $NetBSD: CHANGES-6.1.6,v 1.1.2.41 2015/05/02 17:08:07 martin Exp $ A complete list of changes from the NetBSD 6.1.5 release to the NetBSD 6.1.6 release: @@ -5708,3 +5708,9 @@ xsrc/xfree/xc/lib/X11/Xlibint.h1.2 Fix CVE-2013-7439: Buffer overflow in MakeBigReq macro in libX11. [mrg, ticket #1290] + +distrib/sparc64/liveimage/emuimage/Makefile 1.4 + + Don't forget to put /ofwboot into the image otherwise boot fails. + [tsutsui, ticket #1297] +
CVS commit: src/sys/arch/arm/nvidia
Module Name:src Committed By: jmcneill Date: Sat May 2 17:06:53 UTC 2015 Modified Files: src/sys/arch/arm/nvidia: tegra_gpio.c tegra_var.h Log Message: simplify gpio kpi To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/nvidia/tegra_gpio.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/nvidia/tegra_var.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/arm/nvidia/tegra_gpio.c diff -u src/sys/arch/arm/nvidia/tegra_gpio.c:1.1 src/sys/arch/arm/nvidia/tegra_gpio.c:1.2 --- src/sys/arch/arm/nvidia/tegra_gpio.c:1.1 Sat May 2 12:08:32 2015 +++ src/sys/arch/arm/nvidia/tegra_gpio.c Sat May 2 17:06:53 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_gpio.c,v 1.1 2015/05/02 12:08:32 jmcneill Exp $ */ +/* $NetBSD: tegra_gpio.c,v 1.2 2015/05/02 17:06:53 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -29,7 +29,7 @@ #include "locators.h" #include -__KERNEL_RCSID(0, "$NetBSD: tegra_gpio.c,v 1.1 2015/05/02 12:08:32 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tegra_gpio.c,v 1.2 2015/05/02 17:06:53 jmcneill Exp $"); #include #include @@ -250,25 +250,41 @@ tegra_gpio_pin_ctl(void *priv, int pin, } static const struct tegra_gpio_pinbank * -tegra_gpio_pinbank_lookup(const char *bankname) +tegra_gpio_pin_lookup(const char *pinname, int *ppin) { + char bankname[3]; u_int n; + int pin; + + KASSERT(strlen(pinname) == 2 || strlen(pinname) == 3); + + memset(bankname, 0, sizeof(bankname)); + bankname[0] = pinname[0]; + if (strlen(pinname) == 2) { + pin = pinname[1] - '0'; + } else { + bankname[1] = pinname[1]; + pin = pinname[2] - '0'; + } for (n = 0; n < __arraycount(tegra_gpio_pinbanks); n++) { const struct tegra_gpio_pinbank *pb = &tegra_gpio_pinbanks[n]; - if (strcmp(pb->name, bankname) == 0) + if (strcmp(pb->name, bankname) == 0) { + *ppin = pin; return pb; + } } return NULL; } struct tegra_gpio_pin * -tegra_gpio_acquire(const char *bankname, int pin, u_int flags) +tegra_gpio_acquire(const char *pinname, u_int flags) { struct tegra_gpio_bank bank; struct tegra_gpio_pin *gpin; + int pin; device_t dev; dev = device_find_by_driver_unit("tegragpio", 0); @@ -276,7 +292,7 @@ tegra_gpio_acquire(const char *bankname, return NULL; bank.bank_sc = device_private(dev); - bank.bank_pb = tegra_gpio_pinbank_lookup(bankname); + bank.bank_pb = tegra_gpio_pin_lookup(pinname, &pin); if (bank.bank_pb == NULL) return NULL; Index: src/sys/arch/arm/nvidia/tegra_var.h diff -u src/sys/arch/arm/nvidia/tegra_var.h:1.5 src/sys/arch/arm/nvidia/tegra_var.h:1.6 --- src/sys/arch/arm/nvidia/tegra_var.h:1.5 Sat May 2 12:08:32 2015 +++ src/sys/arch/arm/nvidia/tegra_var.h Sat May 2 17:06:53 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_var.h,v 1.5 2015/05/02 12:08:32 jmcneill Exp $ */ +/* $NetBSD: tegra_var.h,v 1.6 2015/05/02 17:06:53 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -77,7 +77,7 @@ u_int tegra_car_periph_sdmmc_rate(u_int) int tegra_car_periph_sdmmc_set_div(u_int, u_int); struct tegra_gpio_pin; -struct tegra_gpio_pin *tegra_gpio_acquire(const char *, int, u_int); +struct tegra_gpio_pin *tegra_gpio_acquire(const char *, u_int); void tegra_gpio_release(struct tegra_gpio_pin *); int tegra_gpio_read(struct tegra_gpio_pin *); void tegra_gpio_write(struct tegra_gpio_pin *, int);
CVS commit: [netbsd-6-1] src/distrib/sparc64/liveimage/emuimage
Module Name:src Committed By: martin Date: Sat May 2 17:06:01 UTC 2015 Modified Files: src/distrib/sparc64/liveimage/emuimage [netbsd-6-1]: Makefile Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1297): distrib/sparc64/liveimage/emuimage/Makefile: revision 1.4 Don't forget to put /ofwboot into the image otherwise boot fails. To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.1.6.1 \ src/distrib/sparc64/liveimage/emuimage/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sparc64/liveimage/emuimage/Makefile diff -u src/distrib/sparc64/liveimage/emuimage/Makefile:1.1.2.1 src/distrib/sparc64/liveimage/emuimage/Makefile:1.1.2.1.6.1 --- src/distrib/sparc64/liveimage/emuimage/Makefile:1.1.2.1 Fri Aug 17 20:50:50 2012 +++ src/distrib/sparc64/liveimage/emuimage/Makefile Sat May 2 17:06:01 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1.2.1 2012/08/17 20:50:50 martin Exp $ +# $NetBSD: Makefile,v 1.1.2.1.6.1 2015/05/02 17:06:01 martin Exp $ LIVEIMGBASE= NetBSD-${DISTRIBVER}-sparc64-live-sd0root # gives ${IMGBASE}.img @@ -8,7 +8,7 @@ KERN_SET= kern-GENERIC BOOTDISK= sd0 # for QEMU #BOOTDISK= wd0 # for Ultra5/10 image? PRIMARY_BOOT= bootblk -#SECONDARY_BOOT= # nothing +SECONDARY_BOOT= ofwboot #SECONDARY_BOOT_ARG= # unnecessary USE_SUNLABEL= yes
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: martin Date: Sat May 2 16:22:10 UTC 2015 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Ticket #1297 To generate a diff of this commit: cvs rdiff -u -r1.1.2.216 -r1.1.2.217 src/doc/CHANGES-6.2 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES-6.2 diff -u src/doc/CHANGES-6.2:1.1.2.216 src/doc/CHANGES-6.2:1.1.2.217 --- src/doc/CHANGES-6.2:1.1.2.216 Thu Apr 30 19:56:24 2015 +++ src/doc/CHANGES-6.2 Sat May 2 16:22:10 2015 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.216 2015/04/30 19:56:24 snj Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.217 2015/05/02 16:22:10 martin Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -11491,3 +11491,8 @@ sys/dev/pci/if_wmvar.h1.20 via patch Same as FreeBSD. [msaitoh, ticket #1296] +distrib/sparc64/liveimage/emuimage/Makefile 1.4 + + Don't forget to put /ofwboot into the image otherwise boot fails. + [tsutsui, ticket #1297] +
CVS commit: [netbsd-6] src/distrib/sparc64/liveimage/emuimage
Module Name:src Committed By: martin Date: Sat May 2 16:20:38 UTC 2015 Modified Files: src/distrib/sparc64/liveimage/emuimage [netbsd-6]: Makefile Log Message: Pull up following revision(s) (requested by tsutsui in ticket #1297): distrib/sparc64/liveimage/emuimage/Makefile: revision 1.4 Don't forget to put /ofwboot into the image otherwise boot fails. To generate a diff of this commit: cvs rdiff -u -r1.1.2.1 -r1.1.2.2 \ src/distrib/sparc64/liveimage/emuimage/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sparc64/liveimage/emuimage/Makefile diff -u src/distrib/sparc64/liveimage/emuimage/Makefile:1.1.2.1 src/distrib/sparc64/liveimage/emuimage/Makefile:1.1.2.2 --- src/distrib/sparc64/liveimage/emuimage/Makefile:1.1.2.1 Fri Aug 17 20:50:50 2012 +++ src/distrib/sparc64/liveimage/emuimage/Makefile Sat May 2 16:20:38 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.1.2.1 2012/08/17 20:50:50 martin Exp $ +# $NetBSD: Makefile,v 1.1.2.2 2015/05/02 16:20:38 martin Exp $ LIVEIMGBASE= NetBSD-${DISTRIBVER}-sparc64-live-sd0root # gives ${IMGBASE}.img @@ -8,7 +8,7 @@ KERN_SET= kern-GENERIC BOOTDISK= sd0 # for QEMU #BOOTDISK= wd0 # for Ultra5/10 image? PRIMARY_BOOT= bootblk -#SECONDARY_BOOT= # nothing +SECONDARY_BOOT= ofwboot #SECONDARY_BOOT_ARG= # unnecessary USE_SUNLABEL= yes
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: skrll Date: Sat May 2 16:20:41 UTC 2015 Modified Files: src/sys/arch/arm/arm: arm_machdep.c Log Message: Remove unintended commit To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/arch/arm/arm/arm_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/arm/arm/arm_machdep.c diff -u src/sys/arch/arm/arm/arm_machdep.c:1.48 src/sys/arch/arm/arm/arm_machdep.c:1.49 --- src/sys/arch/arm/arm/arm_machdep.c:1.48 Sat May 2 16:18:49 2015 +++ src/sys/arch/arm/arm/arm_machdep.c Sat May 2 16:20:41 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: arm_machdep.c,v 1.48 2015/05/02 16:18:49 skrll Exp $ */ +/* $NetBSD: arm_machdep.c,v 1.49 2015/05/02 16:20:41 skrll Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -80,7 +80,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: arm_machdep.c,v 1.48 2015/05/02 16:18:49 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: arm_machdep.c,v 1.49 2015/05/02 16:20:41 skrll Exp $"); #include #include @@ -187,7 +187,7 @@ setregs(struct lwp *l, struct exec_packa tf->tf_spsr = PSR_USR32_MODE | (CPU_IS_ARMV7_P() ? PSR_E_BIT : 0); #else tf->tf_spsr = PSR_USR32_MODE; -#endif /* __ARMEB__ */ +#endif /* __ARMEB__ */ #ifdef THUMB_CODE if (pack->ep_entry & 1) @@ -213,7 +213,7 @@ setregs(struct lwp *l, struct exec_packa void startlwp(void *arg) { - ucontext_t *uc = (ucontext_t *)arg; + ucontext_t *uc = (ucontext_t *)arg; lwp_t *l = curlwp; int error __diagused; @@ -243,11 +243,9 @@ cpu_need_resched(struct cpu_info *ci, in */ return; } -#if 0 - /* XXXNH??? */ if (ci->ci_want_resched && !immed) return; -#endif + if (l == ci->ci_data.cpu_idlelwp) { #ifdef MULTIPROCESSOR /*
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: skrll Date: Sat May 2 16:18:49 UTC 2015 Modified Files: src/sys/arch/arm/arm: arm_machdep.c disassem.c Log Message: Move /* A5.2.10 Synchronisation primitives */ block earlier so it matches correctly To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/arch/arm/arm/arm_machdep.c cvs rdiff -u -r1.32 -r1.33 src/sys/arch/arm/arm/disassem.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/arm/arm/arm_machdep.c diff -u src/sys/arch/arm/arm/arm_machdep.c:1.47 src/sys/arch/arm/arm/arm_machdep.c:1.48 --- src/sys/arch/arm/arm/arm_machdep.c:1.47 Wed Apr 15 21:26:48 2015 +++ src/sys/arch/arm/arm/arm_machdep.c Sat May 2 16:18:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: arm_machdep.c,v 1.47 2015/04/15 21:26:48 matt Exp $ */ +/* $NetBSD: arm_machdep.c,v 1.48 2015/05/02 16:18:49 skrll Exp $ */ /* * Copyright (c) 2001 Wasabi Systems, Inc. @@ -80,7 +80,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: arm_machdep.c,v 1.47 2015/04/15 21:26:48 matt Exp $"); +__KERNEL_RCSID(0, "$NetBSD: arm_machdep.c,v 1.48 2015/05/02 16:18:49 skrll Exp $"); #include #include @@ -187,7 +187,7 @@ setregs(struct lwp *l, struct exec_packa tf->tf_spsr = PSR_USR32_MODE | (CPU_IS_ARMV7_P() ? PSR_E_BIT : 0); #else tf->tf_spsr = PSR_USR32_MODE; -#endif /* __ARMEB__ */ +#endif /* __ARMEB__ */ #ifdef THUMB_CODE if (pack->ep_entry & 1) @@ -213,7 +213,7 @@ setregs(struct lwp *l, struct exec_packa void startlwp(void *arg) { - ucontext_t *uc = (ucontext_t *)arg; + ucontext_t *uc = (ucontext_t *)arg; lwp_t *l = curlwp; int error __diagused; @@ -243,9 +243,11 @@ cpu_need_resched(struct cpu_info *ci, in */ return; } +#if 0 + /* XXXNH??? */ if (ci->ci_want_resched && !immed) return; - +#endif if (l == ci->ci_data.cpu_idlelwp) { #ifdef MULTIPROCESSOR /* Index: src/sys/arch/arm/arm/disassem.c diff -u src/sys/arch/arm/arm/disassem.c:1.32 src/sys/arch/arm/arm/disassem.c:1.33 --- src/sys/arch/arm/arm/disassem.c:1.32 Tue Mar 31 16:15:07 2015 +++ src/sys/arch/arm/arm/disassem.c Sat May 2 16:18:49 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: disassem.c,v 1.32 2015/03/31 16:15:07 skrll Exp $ */ +/* $NetBSD: disassem.c,v 1.33 2015/05/02 16:18:49 skrll Exp $ */ /* * Copyright (c) 1996 Mark Brinicombe. @@ -49,7 +49,7 @@ #include -__KERNEL_RCSID(0, "$NetBSD: disassem.c,v 1.32 2015/03/31 16:15:07 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: disassem.c,v 1.33 2015/05/02 16:18:49 skrll Exp $"); #include @@ -247,6 +247,18 @@ static const struct arm32_insn arm32_i[] { 0x0ff0, 0x0300, "movw", "dZ" }, { 0x0ff0, 0x0340, "movt", "dZ" }, +/* A5.2.10 Synchronisation primitives */ +{ 0x0ff00ff0, 0x0190, "swp", "dmo" }, +{ 0x0ff00ff0, 0x01400090, "swpb", "dmo" }, +{ 0x0ff00fff, 0x01900f9f, "ldrex", "da" }, +{ 0x0ff00fff, 0x01b00f9f, "ldrexd", "da" }, +{ 0x0ff00fff, 0x01d00f9f, "ldrexb", "da" }, +{ 0x0ff00fff, 0x01f00f9f, "ldrexh", "da" }, +{ 0x0ff00ff0, 0x01800f90, "strex", "dma" }, +{ 0x0ff00ff0, 0x01a00f90, "strexd", "dma" }, +{ 0x0ff00ff0, 0x01c00f90, "strexb", "dma" }, +{ 0x0ff00ff0, 0x01e00f90, "strexh", "dma" }, + /* A5.2 non-exceptions */ /* A5.2.1, A5.2.2, and A5.2.3 Data-processing */ @@ -275,18 +287,6 @@ static const struct arm32_insn arm32_i[] { 0x0fe000f0, 0x00a00090, "umlal", "Sdnms" }, { 0x0fe000f0, 0x00e00090, "smlal", "Sdnms" }, -/* A5.2.10 Synchronisation primitives */ -{ 0x0ff00ff0, 0x0190, "swp", "dmo" }, -{ 0x0ff00ff0, 0x01400090, "swpb", "dmo" }, -{ 0x0ff00fff, 0x01900f9f, "ldrex", "da" }, -{ 0x0ff00fff, 0x01b00f9f, "ldrexd", "da" }, -{ 0x0ff00fff, 0x01d00f9f, "ldrexb", "da" }, -{ 0x0ff00fff, 0x01f00f9f, "ldrexh", "da" }, -{ 0x0ff00ff0, 0x01800f90, "strex", "dma" }, -{ 0x0ff00ff0, 0x01a00f90, "strexd", "dma" }, -{ 0x0ff00ff0, 0x01c00f90, "strexb", "dma" }, -{ 0x0ff00ff0, 0x01e00f90, "strexh", "dma" }, - /* */ { 0x0ff08f10, 0x0e000100, "adf", "PRfgh" }, { 0x0ff08f10, 0x0e100100, "muf", "PRfgh" },
CVS commit: src/doc
Module Name:src Committed By: roy Date: Sat May 2 15:23:49 UTC 2015 Modified Files: src/doc: 3RDPARTY CHANGES Log Message: Note import of dhcpcd-6.8.2 To generate a diff of this commit: cvs rdiff -u -r1.1223 -r1.1224 src/doc/3RDPARTY cvs rdiff -u -r1.2074 -r1.2075 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/3RDPARTY diff -u src/doc/3RDPARTY:1.1223 src/doc/3RDPARTY:1.1224 --- src/doc/3RDPARTY:1.1223 Fri May 1 18:26:58 2015 +++ src/doc/3RDPARTY Sat May 2 15:23:49 2015 @@ -1,4 +1,4 @@ -# $NetBSD: 3RDPARTY,v 1.1223 2015/05/01 18:26:58 roy Exp $ +# $NetBSD: 3RDPARTY,v 1.1224 2015/05/02 15:23:49 roy Exp $ # # This file contains a list of the software that has been integrated into # NetBSD where we are not the primary maintainer. @@ -305,8 +305,8 @@ Notes: Use the dhcp2netbsd script. Package: dhcpcd -Version: 6.8.1 -Current Vers: 6.8.1 +Version: 6.8.2 +Current Vers: 6.8.2 Maintainer: roy Archive Site: ftp://roy.marples.name/pub/dhcpcd/ Home Page: http://roy.marples.name/projects/dhcpcd/ Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2074 src/doc/CHANGES:1.2075 --- src/doc/CHANGES:1.2074 Sat May 2 14:54:10 2015 +++ src/doc/CHANGES Sat May 2 15:23:49 2015 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2074 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2075 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -159,3 +159,4 @@ Changes from NetBSD 7.0 to NetBSD 8.0: netinet: Added IN_IFF_TENTATIVE, IN_IFF_DUPLICATED and IN_IFF_DETACHED. IPV4 addresses now perform DAD using ARP as described in RFC 5227. [roy 20150502] + dhcpcd(8): Import dhcpcd-6.8.2. [roy 20150502]
CVS commit: src/sys/netinet
Module Name:src Committed By: roy Date: Sat May 2 15:22:03 UTC 2015 Modified Files: src/sys/netinet: in.c Log Message: Appease gcc. To generate a diff of this commit: cvs rdiff -u -r1.152 -r1.153 src/sys/netinet/in.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/netinet/in.c diff -u src/sys/netinet/in.c:1.152 src/sys/netinet/in.c:1.153 --- src/sys/netinet/in.c:1.152 Sat May 2 14:41:32 2015 +++ src/sys/netinet/in.c Sat May 2 15:22:03 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: in.c,v 1.152 2015/05/02 14:41:32 roy Exp $ */ +/* $NetBSD: in.c,v 1.153 2015/05/02 15:22:03 roy Exp $ */ /* * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. @@ -91,7 +91,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.152 2015/05/02 14:41:32 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: in.c,v 1.153 2015/05/02 15:22:03 roy Exp $"); #include "opt_inet.h" #include "opt_inet_conf.h" @@ -370,6 +370,7 @@ in_control(struct socket *so, u_long cmd if (ifp != NULL) IFP_TO_IA(ifp, ia); + hostIsNew = 1; /* moved here to appease gcc */ switch (cmd) { case SIOCAIFADDR: case SIOCDIFADDR: @@ -396,7 +397,6 @@ in_control(struct socket *so, u_long cmd } /* FALLTHROUGH */ case SIOCSIFADDR: - hostIsNew = 1; if (ia == NULL || ia->ia_addr.sin_family != AF_INET) ; else if (ifra->ifra_addr.sin_len == 0) {
CVS commit: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Sat May 2 15:18:37 UTC 2015 Modified Files: src/external/bsd/dhcpcd/dist: arp.c arp.h common.c defs.h dhcp.c dhcp.h dhcp6.c dhcp6.h dhcpcd.c dhcpcd.conf.5.in eloop.c if-bsd.c if-options.c if-options.h if.c if.h ipv4.c ipv4.h ipv4ll.c ipv6.c ipv6.h ipv6nd.c ipv6nd.h script.c Log Message: Sync To generate a diff of this commit: cvs rdiff -u -r1.11 -r1.12 src/external/bsd/dhcpcd/dist/arp.c \ src/external/bsd/dhcpcd/dist/common.c \ src/external/bsd/dhcpcd/dist/dhcp6.c src/external/bsd/dhcpcd/dist/ipv6.h cvs rdiff -u -r1.8 -r1.9 src/external/bsd/dhcpcd/dist/arp.h \ src/external/bsd/dhcpcd/dist/dhcp.h src/external/bsd/dhcpcd/dist/dhcp6.h cvs rdiff -u -r1.16 -r1.17 src/external/bsd/dhcpcd/dist/defs.h cvs rdiff -u -r1.29 -r1.30 src/external/bsd/dhcpcd/dist/dhcp.c cvs rdiff -u -r1.23 -r1.24 src/external/bsd/dhcpcd/dist/dhcpcd.c cvs rdiff -u -r1.19 -r1.20 src/external/bsd/dhcpcd/dist/dhcpcd.conf.5.in \ src/external/bsd/dhcpcd/dist/if-bsd.c cvs rdiff -u -r1.9 -r1.10 src/external/bsd/dhcpcd/dist/eloop.c \ src/external/bsd/dhcpcd/dist/if-options.h \ src/external/bsd/dhcpcd/dist/if.h src/external/bsd/dhcpcd/dist/ipv4.h \ src/external/bsd/dhcpcd/dist/ipv4ll.c cvs rdiff -u -r1.22 -r1.23 src/external/bsd/dhcpcd/dist/if-options.c \ src/external/bsd/dhcpcd/dist/ipv6nd.c cvs rdiff -u -r1.12 -r1.13 src/external/bsd/dhcpcd/dist/if.c cvs rdiff -u -r1.13 -r1.14 src/external/bsd/dhcpcd/dist/ipv4.c cvs rdiff -u -r1.10 -r1.11 src/external/bsd/dhcpcd/dist/ipv6.c \ src/external/bsd/dhcpcd/dist/ipv6nd.h cvs rdiff -u -r1.18 -r1.19 src/external/bsd/dhcpcd/dist/script.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/dhcpcd/dist/arp.c diff -u src/external/bsd/dhcpcd/dist/arp.c:1.11 src/external/bsd/dhcpcd/dist/arp.c:1.12 --- src/external/bsd/dhcpcd/dist/arp.c:1.11 Fri Mar 27 18:53:15 2015 +++ src/external/bsd/dhcpcd/dist/arp.c Sat May 2 15:18:36 2015 @@ -1,5 +1,5 @@ #include - __RCSID("$NetBSD: arp.c,v 1.11 2015/03/27 18:53:15 christos Exp $"); + __RCSID("$NetBSD: arp.c,v 1.12 2015/05/02 15:18:36 roy Exp $"); /* * dhcpcd - DHCP client daemon @@ -44,6 +44,7 @@ #define ELOOP_QUEUE 5 #include "config.h" #include "arp.h" +#include "if.h" #include "ipv4.h" #include "common.h" #include "dhcp.h" @@ -57,7 +58,7 @@ (sizeof(struct arphdr) + (2 * sizeof(uint32_t)) + (2 * HWADDR_LEN)) static ssize_t -arp_send(const struct interface *ifp, int op, in_addr_t sip, in_addr_t tip) +arp_request(const struct interface *ifp, in_addr_t sip, in_addr_t tip) { uint8_t arp_buffer[ARP_LEN]; struct arphdr ar; @@ -68,7 +69,7 @@ arp_send(const struct interface *ifp, in ar.ar_pro = htons(ETHERTYPE_IP); ar.ar_hln = ifp->hwlen; ar.ar_pln = sizeof(sip); - ar.ar_op = htons((uint16_t)op); + ar.ar_op = htons(ARPOP_REQUEST); p = arp_buffer; len = 0; @@ -99,12 +100,20 @@ eexit: void arp_report_conflicted(const struct arp_state *astate, const struct arp_msg *amsg) { - char buf[HWADDR_LEN * 3]; - logger(astate->iface->ctx, LOG_ERR, "%s: hardware address %s claims %s", - astate->iface->name, - hwaddr_ntoa(amsg->sha, astate->iface->hwlen, buf, sizeof(buf)), - inet_ntoa(astate->failed)); + if (amsg) { + char buf[HWADDR_LEN * 3]; + + logger(astate->iface->ctx, LOG_ERR, + "%s: hardware address %s claims %s", + astate->iface->name, + hwaddr_ntoa(amsg->sha, astate->iface->hwlen, + buf, sizeof(buf)), + inet_ntoa(astate->failed)); + } else + logger(astate->iface->ctx, LOG_ERR, + "%s: DAD detected %s", + astate->iface->name, inet_ntoa(astate->failed)); } static void @@ -226,8 +235,7 @@ arp_announce1(void *arg) "%s: ARP announcing %s (%d of %d)", ifp->name, inet_ntoa(astate->addr), astate->claims, ANNOUNCE_NUM); - if (arp_send(ifp, ARPOP_REQUEST, - astate->addr.s_addr, astate->addr.s_addr) == -1) + if (arp_request(ifp, astate->addr.s_addr, astate->addr.s_addr) == -1) logger(ifp->ctx, LOG_ERR, "send_arp: %m"); eloop_timeout_add_sec(ifp->ctx->eloop, ANNOUNCE_WAIT, astate->claims < ANNOUNCE_NUM ? arp_announce1 : arp_announced, @@ -274,7 +282,7 @@ arp_probe1(void *arg) ifp->name, inet_ntoa(astate->addr), astate->probes ? astate->probes : PROBE_NUM, PROBE_NUM, timespec_to_double(&tv)); - if (arp_send(ifp, ARPOP_REQUEST, 0, astate->addr.s_addr) == -1) + if (arp_request(ifp, 0, astate->addr.s_addr) == -1) logger(ifp->ctx, LOG_ERR, "send_arp: %m"); } @@ -289,19 +297,38 @@ arp_probe(struct arp_state *astate) arp_probe1(astate); } +static struct arp_state * +arp_find(struct interface *ifp, const struct in_addr *addr) +{ + struct arp_state *astate; + struct dhcp_state *state; + + state = D_STATE(ifp); + TAILQ_FOREACH(astate, &state->arp_states, next) { + if (astate->addr.s_addr == addr->s_addr && astate
CVS import: src/external/bsd/dhcpcd/dist
Module Name:src Committed By: roy Date: Sat May 2 15:10:45 UTC 2015 Update of /cvsroot/src/external/bsd/dhcpcd/dist In directory ivanova.netbsd.org:/tmp/cvs-serv8637 Log Message: Import dhcpcd-6.8.2 with the following changes: * dumping leases no longer affects kernel settings * dhcpcd can now act as a pure BOOTP client * IPv6 default route is only installed once a working address is available. * fixed a crash when finding a route without an interface. * support IN_IFF_TENTATIVE and friends. The last change allows dhcpcd to persist the address when the carrier goes down. The normal DHCP workflow will then manage the address correctly. Status: Vendor Tag: roy Release Tags: dhcpcd-6-8-2 C src/external/bsd/dhcpcd/dist/common.c U src/external/bsd/dhcpcd/dist/control.c C src/external/bsd/dhcpcd/dist/dhcpcd.c U src/external/bsd/dhcpcd/dist/duid.c C src/external/bsd/dhcpcd/dist/eloop.c C src/external/bsd/dhcpcd/dist/if.c C src/external/bsd/dhcpcd/dist/if-options.c C src/external/bsd/dhcpcd/dist/script.c U src/external/bsd/dhcpcd/dist/dhcp-common.c U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.c C src/external/bsd/dhcpcd/dist/if-bsd.c C src/external/bsd/dhcpcd/dist/arp.c C src/external/bsd/dhcpcd/dist/dhcp.c C src/external/bsd/dhcpcd/dist/ipv4.c C src/external/bsd/dhcpcd/dist/ipv4ll.c C src/external/bsd/dhcpcd/dist/ipv6.c C src/external/bsd/dhcpcd/dist/ipv6nd.c C src/external/bsd/dhcpcd/dist/dhcp6.c U src/external/bsd/dhcpcd/dist/auth.c U src/external/bsd/dhcpcd/dist/dhcpcd.conf U src/external/bsd/dhcpcd/dist/dhcpcd-definitions.conf U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.c.in U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.h.in U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.8.in U src/external/bsd/dhcpcd/dist/dhcpcd-run-hooks.in U src/external/bsd/dhcpcd/dist/dhcpcd.8.in C src/external/bsd/dhcpcd/dist/dhcpcd.conf.5.in C src/external/bsd/dhcpcd/dist/arp.h U src/external/bsd/dhcpcd/dist/auth.h U src/external/bsd/dhcpcd/dist/bpf-filter.h U src/external/bsd/dhcpcd/dist/common.h U src/external/bsd/dhcpcd/dist/config.h U src/external/bsd/dhcpcd/dist/control.h C src/external/bsd/dhcpcd/dist/defs.h U src/external/bsd/dhcpcd/dist/dev.h U src/external/bsd/dhcpcd/dist/dhcp-common.h C src/external/bsd/dhcpcd/dist/dhcp.h C src/external/bsd/dhcpcd/dist/dhcp6.h U src/external/bsd/dhcpcd/dist/dhcpcd-embedded.h U src/external/bsd/dhcpcd/dist/dhcpcd.h U src/external/bsd/dhcpcd/dist/duid.h U src/external/bsd/dhcpcd/dist/eloop.h C src/external/bsd/dhcpcd/dist/if-options.h C src/external/bsd/dhcpcd/dist/if.h C src/external/bsd/dhcpcd/dist/ipv4.h U src/external/bsd/dhcpcd/dist/ipv4ll.h C src/external/bsd/dhcpcd/dist/ipv6.h C src/external/bsd/dhcpcd/dist/ipv6nd.h U src/external/bsd/dhcpcd/dist/script.h U src/external/bsd/dhcpcd/dist/crypt/hmac_md5.c U src/external/bsd/dhcpcd/dist/crypt/crypt.h U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/01-test U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/02-dump U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/10-mtu U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/10-wpa_supplicant U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/15-timezone U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/20-resolv.conf U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/29-lookup-hostname U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/30-hostname U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ntp.conf U src/external/bsd/dhcpcd/dist/dhcpcd-hooks/50-ypbind 24 conflicts created by this import. Use the following command to help the merge: cvs checkout -jroy:yesterday -jroy src/external/bsd/dhcpcd/dist
CVS commit: src/external/mit/xorg/lib/pixman
Module Name:src Committed By: macallan Date: Sat May 2 14:54:18 UTC 2015 Modified Files: src/external/mit/xorg/lib/pixman: Makefile Log Message: build Loongson-MMI support only on mips64el To generate a diff of this commit: cvs rdiff -u -r1.31 -r1.32 src/external/mit/xorg/lib/pixman/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/mit/xorg/lib/pixman/Makefile diff -u src/external/mit/xorg/lib/pixman/Makefile:1.31 src/external/mit/xorg/lib/pixman/Makefile:1.32 --- src/external/mit/xorg/lib/pixman/Makefile:1.31 Sun Aug 10 19:11:08 2014 +++ src/external/mit/xorg/lib/pixman/Makefile Sat May 2 14:54:18 2015 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.31 2014/08/10 19:11:08 joerg Exp $ +# $NetBSD: Makefile,v 1.32 2015/05/02 14:54:18 macallan Exp $ NOLINT= 1 # defined @@ -90,7 +90,7 @@ AFLAGS+= ${${ACTIVE_CC} == "clang" :? -f #CPPFLAGS+= -DUSE_ARM_IWMMXT .endif -.if ${MACHINE} == "evbmips" +.if ${MACHINE_ARCH} == "mips64el" # Loongson MMI SRCS+= pixman-mmx.c CPPFLAGS+= -DUSE_LOONGSON_MMI
CVS commit: src/doc
Module Name:src Committed By: roy Date: Sat May 2 14:54:10 UTC 2015 Modified Files: src/doc: CHANGES Log Message: Note addition of IN_IFF_TENTATIVE and friends. To generate a diff of this commit: cvs rdiff -u -r1.2073 -r1.2074 src/doc/CHANGES Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/doc/CHANGES diff -u src/doc/CHANGES:1.2073 src/doc/CHANGES:1.2074 --- src/doc/CHANGES:1.2073 Fri May 1 18:26:58 2015 +++ src/doc/CHANGES Sat May 2 14:54:10 2015 @@ -1,4 +1,4 @@ -# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2073 $> +# LIST OF CHANGES FROM LAST RELEASE: <$Revision: 1.2074 $> # # # [Note: This file does not mention every change made to the NetBSD source tree. @@ -156,3 +156,6 @@ Changes from NetBSD 7.0 to NetBSD 8.0: xz(1): Import of XZ 5.2.1. [christos 20150417] libc: Update to tzcode2015d. [christos 20150428] openresolv(8): Import openresolv-3.7.0 [roy 20150501] + netinet: Added IN_IFF_TENTATIVE, IN_IFF_DUPLICATED and IN_IFF_DETACHED. + IPV4 addresses now perform DAD using ARP as described in + RFC 5227. [roy 20150502]
CVS commit: src/external/bsd/ntp/dist/ntpd
Module Name:src Committed By: roy Date: Sat May 2 14:46:51 UTC 2015 Modified Files: src/external/bsd/ntp/dist/ntpd: ntp_io.c Log Message: Don't bind to IN_IFF_TENTATIVE or IN_IFF_DETACHED addresses. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/external/bsd/ntp/dist/ntpd/ntp_io.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/bsd/ntp/dist/ntpd/ntp_io.c diff -u src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.17 src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.18 --- src/external/bsd/ntp/dist/ntpd/ntp_io.c:1.17 Tue Apr 7 17:34:19 2015 +++ src/external/bsd/ntp/dist/ntpd/ntp_io.c Sat May 2 14:46:51 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: ntp_io.c,v 1.17 2015/04/07 17:34:19 christos Exp $ */ +/* $NetBSD: ntp_io.c,v 1.18 2015/05/02 14:46:51 roy Exp $ */ /* * ntp_io.c - input/output routines for ntpd. The socket-opening code @@ -1647,6 +1647,34 @@ set_wildcard_reuse( } #endif /* OS_NEEDS_REUSEADDR_FOR_IFADDRBIND */ +static isc_boolean_t +check_flags( + sockaddr_u *psau, + const char *name, + u_int32 flags + ) +{ +#if defined(SIOCGIFAFLAG_IN) + struct ifreq ifr; + int fd; + + if (psau->sa.sa_family != AF_INET) + return ISC_FALSE; + if ((fd = socket(AF_INET, SOCK_DGRAM, 0)) < 0) + return ISC_FALSE; + ZERO(ifr); + memcpy(&ifr.ifr_addr, &psau->sa, sizeof(ifr.ifr_addr)); + strlcpy(ifr.ifr_name, name, sizeof(ifr.ifr_name)); + if (ioctl(fd, SIOCGIFAFLAG_IN, &ifr) < 0) { + close(fd); + return ISC_FALSE; + } + close(fd); + if ((ifr.ifr_addrflags & flags) != 0) + return ISC_TRUE; +#endif /* SIOCGIFAFLAG_IN */ + return ISC_FALSE; +} static isc_boolean_t check_flags6( @@ -1696,19 +1724,32 @@ is_valid( const char *name ) { - u_int32 flags6; + u_int32 flags; - flags6 = 0; + flags = 0; + switch (psau->sa.sa_family) { + case AF_INET: +#ifdef IN_IFF_DETACHED + flags |= IN_IFF_DETACHED; +#endif +#ifdef IN_IFF_TENTATIVE + flags |= IN_IFF_TENTATIVE; +#endif + return check_flags(psau, name, flags) ? ISC_FALSE : ISC_TRUE; + case AF_INET6: #ifdef IN6_IFF_DEPARTED - flags6 |= IN6_IFF_DEPARTED; + flags |= IN6_IFF_DEPARTED; #endif #ifdef IN6_IFF_DETACHED - flags6 |= IN6_IFF_DETACHED; + flags |= IN6_IFF_DETACHED; #endif #ifdef IN6_IFF_TENTATIVE - flags6 |= IN6_IFF_TENTATIVE; + flags |= IN6_IFF_TENTATIVE; #endif - return check_flags6(psau, name, flags6) ? ISC_FALSE : ISC_TRUE; + return check_flags6(psau, name, flags) ? ISC_FALSE : ISC_TRUE; + default: + return ISC_FALSE; + } } /*
CVS commit: src/sbin/ifconfig
Module Name:src Committed By: roy Date: Sat May 2 14:43:51 UTC 2015 Modified Files: src/sbin/ifconfig: af_inet.c Log Message: Report IN_IFF_TENTATIVE and friends. Wait for IN_IFF_TENTATIVE to be removed with the -w flag. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sbin/ifconfig/af_inet.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sbin/ifconfig/af_inet.c diff -u src/sbin/ifconfig/af_inet.c:1.15 src/sbin/ifconfig/af_inet.c:1.16 --- src/sbin/ifconfig/af_inet.c:1.15 Mon Dec 13 17:35:08 2010 +++ src/sbin/ifconfig/af_inet.c Sat May 2 14:43:51 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: af_inet.c,v 1.15 2010/12/13 17:35:08 pooka Exp $ */ +/* $NetBSD: af_inet.c,v 1.16 2015/05/02 14:43:51 roy Exp $ */ /* * Copyright (c) 1983, 1993 @@ -31,7 +31,7 @@ #include #ifndef lint -__RCSID("$NetBSD: af_inet.c,v 1.15 2010/12/13 17:35:08 pooka Exp $"); +__RCSID("$NetBSD: af_inet.c,v 1.16 2015/05/02 14:43:51 roy Exp $"); #endif /* not lint */ #include @@ -62,12 +62,14 @@ __RCSID("$NetBSD: af_inet.c,v 1.15 2010/ static void in_constructor(void) __attribute__((constructor)); static void in_status(prop_dictionary_t, prop_dictionary_t, bool); static void in_commit_address(prop_dictionary_t, prop_dictionary_t); +static bool in_addr_tentative(struct ifaddrs *ifa); static void in_alias(const char *, prop_dictionary_t, prop_dictionary_t, struct in_aliasreq *); static struct afswtch af = { .af_name = "inet", .af_af = AF_INET, .af_status = in_status, - .af_addr_commit = in_commit_address + .af_addr_commit = in_commit_address, + .af_addr_tentative = in_addr_tentative }; static void @@ -137,6 +139,21 @@ in_alias(const char *ifname, prop_dictio strlcpy(hbuf, "", sizeof(hbuf)); /* some message? */ printf(" broadcast %s", hbuf); } + +#ifdef IN_IFF_TENTATIVE + memcpy(&ifr.ifr_addr, &creq->ifra_addr, creq->ifra_addr.sin_len); + if (prog_ioctl(s, SIOCGIFAFLAG_IN, &ifr) == -1) { + if (errno != EADDRNOTAVAIL) + warn("SIOCGIFAFLAG_IN"); + } else { + if (ifr.ifr_addrflags & IN_IFF_TENTATIVE) + printf(" tentative"); + if (ifr.ifr_addrflags & IN_IFF_DUPLICATED) + printf(" duplicated"); + if (ifr.ifr_addrflags & IN_IFF_DETACHED) + printf(" detached"); + } +#endif } static void @@ -203,6 +220,26 @@ in_commit_address(prop_dictionary_t env, commit_address(env, oenv, &inparam); } +static bool +in_addr_tentative(struct ifaddrs *ifa) +{ +#ifdef IN_IFF_TENTATIVE + int s; + struct ifreq ifr; + + memset(&ifr, 0, sizeof(ifr)); + strncpy(ifr.ifr_name, ifa->ifa_name, sizeof(ifr.ifr_name)); + ifr.ifr_addr = *ifa->ifa_addr; + if ((s = getsock(AF_INET)) == -1) + err(EXIT_FAILURE, "%s: getsock", __func__); + if (ioctl(s, SIOCGIFAFLAG_IN, &ifr) == -1) + err(EXIT_FAILURE, "SIOCGIFAFLAG_IN"); + return ifr.ifr_addrflags & IN_IFF_TENTATIVE ? true : false; +#else + return false; +#endif +} + static void in_constructor(void) {
CVS commit: src/sys
Module Name:src Committed By: roy Date: Sat May 2 14:41:32 UTC 2015 Modified Files: src/sys/net: if.h if_spppsubr.c src/sys/netinet: if_arp.c if_inarp.h in.c in.h in_pcb.c in_proto.c in_selsrc.c in_var.h ip_icmp.c ip_input.c raw_ip.c src/sys/sys: sockio.h Log Message: Add IPv4 address flags IN_IFF_TENTATIVE, IN_IFF_DUPLICATED and IN_IFF_DETATCHED to mimic the IPv6 address behaviour. Add SIOCGIFAFLAG_IN ioctl to retrieve the address flag via the ifreq structure. Add IPv4 DAD detection via the ARP methods described in RFC 5227. Add sysctls net.inet.ip.dad_count and net.inet.arp.debug. Discussed on tech-net@ To generate a diff of this commit: cvs rdiff -u -r1.188 -r1.189 src/sys/net/if.h cvs rdiff -u -r1.132 -r1.133 src/sys/net/if_spppsubr.c cvs rdiff -u -r1.162 -r1.163 src/sys/netinet/if_arp.c cvs rdiff -u -r1.44 -r1.45 src/sys/netinet/if_inarp.h cvs rdiff -u -r1.151 -r1.152 src/sys/netinet/in.c cvs rdiff -u -r1.96 -r1.97 src/sys/netinet/in.h cvs rdiff -u -r1.158 -r1.159 src/sys/netinet/in_pcb.c cvs rdiff -u -r1.111 -r1.112 src/sys/netinet/in_proto.c cvs rdiff -u -r1.11 -r1.12 src/sys/netinet/in_selsrc.c cvs rdiff -u -r1.70 -r1.71 src/sys/netinet/in_var.h cvs rdiff -u -r1.137 -r1.138 src/sys/netinet/ip_icmp.c cvs rdiff -u -r1.320 -r1.321 src/sys/netinet/ip_input.c cvs rdiff -u -r1.150 -r1.151 src/sys/netinet/raw_ip.c cvs rdiff -u -r1.32 -r1.33 src/sys/sys/sockio.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/net/if.h diff -u src/sys/net/if.h:1.188 src/sys/net/if.h:1.189 --- src/sys/net/if.h:1.188 Mon Apr 20 10:19:54 2015 +++ src/sys/net/if.h Sat May 2 14:41:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if.h,v 1.188 2015/04/20 10:19:54 roy Exp $ */ +/* $NetBSD: if.h,v 1.189 2015/05/02 14:41:32 roy Exp $ */ /*- * Copyright (c) 1999, 2000, 2001 The NetBSD Foundation, Inc. @@ -594,6 +594,7 @@ struct ifreq { struct sockaddr ifru_broadaddr; struct sockaddr_storage ifru_space; short ifru_flags; + int ifru_addrflags; int ifru_metric; int ifru_mtu; int ifru_dlt; @@ -609,6 +610,7 @@ struct ifreq { #define ifr_broadaddr ifr_ifru.ifru_broadaddr /* broadcast address */ #define ifr_space ifr_ifru.ifru_space /* sockaddr_storage */ #define ifr_flags ifr_ifru.ifru_flags /* flags */ +#define ifr_addrflags ifr_ifru.ifru_addrflags /* addr flags */ #define ifr_metric ifr_ifru.ifru_metric /* metric */ #define ifr_mtu ifr_ifru.ifru_mtu /* mtu */ #define ifr_dlt ifr_ifru.ifru_dlt /* data link type (DLT_*) */ Index: src/sys/net/if_spppsubr.c diff -u src/sys/net/if_spppsubr.c:1.132 src/sys/net/if_spppsubr.c:1.133 --- src/sys/net/if_spppsubr.c:1.132 Mon Apr 20 10:19:54 2015 +++ src/sys/net/if_spppsubr.c Sat May 2 14:41:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_spppsubr.c,v 1.132 2015/04/20 10:19:54 roy Exp $ */ +/* $NetBSD: if_spppsubr.c,v 1.133 2015/05/02 14:41:32 roy Exp $ */ /* * Synchronous PPP/Cisco link level subroutines. @@ -41,7 +41,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.132 2015/04/20 10:19:54 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_spppsubr.c,v 1.133 2015/05/02 14:41:32 roy Exp $"); #if defined(_KERNEL_OPT) #include "opt_inet.h" @@ -4875,7 +4875,7 @@ sppp_set_ip_addrs(struct sppp *sp, uint3 found: { - int error; + int error, hostIsNew; struct sockaddr_in new_sin = *si; struct sockaddr_in new_dst = *dest; @@ -4886,8 +4886,13 @@ found: */ in_ifscrub(ifp, ifatoia(ifa)); - if (myaddr != 0) - new_sin.sin_addr.s_addr = htonl(myaddr); + hostIsNew = 0; + if (myaddr != 0) { + if (new_sin.sin_addr.s_addr != htonl(myaddr)) { +new_sin.sin_addr.s_addr = htonl(myaddr); +hostIsNew = 1; + } + } if (hisaddr != 0) { new_dst.sin_addr.s_addr = htonl(hisaddr); if (new_dst.sin_addr.s_addr != dest->sin_addr.s_addr) { @@ -4895,7 +4900,7 @@ found: *dest = new_dst; /* fix dstaddr in place */ } } - error = in_ifinit(ifp, ifatoia(ifa), &new_sin, 0); + error = in_ifinit(ifp, ifatoia(ifa), &new_sin, 0, hostIsNew); if (debug && error) { log(LOG_DEBUG, "%s: sppp_set_ip_addrs: in_ifinit " @@ -4948,7 +4953,7 @@ found: if (sp->ipcp.flags & IPCP_HISADDR_DYN) /* replace peer addr in place */ dest->sin_addr.s_addr = sp->ipcp.saved_hisaddr; - in_ifinit(ifp, ifatoia(ifa), &new_sin, 0); + in_ifinit(ifp, ifatoia(ifa), &new_sin, 0, 0); (void)pfil_run_hooks(if_pfil, (struct mbuf **)SIOCDIFADDR, ifp, PFIL_IFADDR); } Index: src/sys/netinet/if_arp.c diff -u src/sys/netinet/if_arp.c:1.162 src/sys/netinet/if_arp.c:1.163 --- src/sys/netinet/if_arp.c:1.162 Mon Mar 23 18:33:17 2015 +++ src/sys/netinet/if_arp.c Sat May 2 14:41:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: if_arp.c,v 1.162 2015/03/23 18:33:17 roy Exp $ */ +/* $NetBSD: if_arp.c,v 1.163 2015/05/02 14:41:32 roy Exp $ */ /*- * Copyright (c) 1998, 2000, 2008 The NetBSD Foundation, Inc. @@ -68,
CVS commit: src/sys/arch/x86/x86
Module Name:src Committed By: roy Date: Sat May 2 14:30:27 UTC 2015 Modified Files: src/sys/arch/x86/x86: intr.c Log Message: Fix compile on clang. To generate a diff of this commit: cvs rdiff -u -r1.81 -r1.82 src/sys/arch/x86/x86/intr.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/x86/x86/intr.c diff -u src/sys/arch/x86/x86/intr.c:1.81 src/sys/arch/x86/x86/intr.c:1.82 --- src/sys/arch/x86/x86/intr.c:1.81 Mon Apr 27 07:03:58 2015 +++ src/sys/arch/x86/x86/intr.c Sat May 2 14:30:27 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: intr.c,v 1.81 2015/04/27 07:03:58 knakahara Exp $ */ +/* $NetBSD: intr.c,v 1.82 2015/05/02 14:30:27 roy Exp $ */ /*- * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc. @@ -133,7 +133,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.81 2015/04/27 07:03:58 knakahara Exp $"); +__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.82 2015/05/02 14:30:27 roy Exp $"); #include "opt_intrdebug.h" #include "opt_multiprocessor.h" @@ -572,7 +572,7 @@ intr_free_io_intrsource_direct(struct in SIMPLEQ_REMOVE(&io_interrupt_sources, isp, intrsource, is_list); /* Is this interrupt established? */ - if (isp->is_evname != '\0') + if (isp->is_evname[0] != '\0') evcnt_detach(&isp->is_evcnt); kmem_free(isp->is_saved_evcnt,
CVS commit: src/sys/netinet6
Module Name:src Committed By: roy Date: Sat May 2 14:28:30 UTC 2015 Modified Files: src/sys/netinet6: nd6_rtr.c Log Message: Mitigate Local Denial of Service with IPv6 Router Advertisements and log attack attempts. Fixes CVE-2015-2923, taken from FreeBSD. To generate a diff of this commit: cvs rdiff -u -r1.98 -r1.99 src/sys/netinet6/nd6_rtr.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/netinet6/nd6_rtr.c diff -u src/sys/netinet6/nd6_rtr.c:1.98 src/sys/netinet6/nd6_rtr.c:1.99 --- src/sys/netinet6/nd6_rtr.c:1.98 Wed Feb 25 12:45:34 2015 +++ src/sys/netinet6/nd6_rtr.c Sat May 2 14:28:30 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: nd6_rtr.c,v 1.98 2015/02/25 12:45:34 roy Exp $ */ +/* $NetBSD: nd6_rtr.c,v 1.99 2015/05/02 14:28:30 roy Exp $ */ /* $KAME: nd6_rtr.c,v 1.95 2001/02/07 08:09:47 itojun Exp $ */ /* @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.98 2015/02/25 12:45:34 roy Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nd6_rtr.c,v 1.99 2015/05/02 14:28:30 roy Exp $"); #include #include @@ -272,8 +272,15 @@ nd6_ra_input(struct mbuf *m, int off, in } if (nd_ra->nd_ra_retransmit) ndi->retrans = ntohl(nd_ra->nd_ra_retransmit); - if (nd_ra->nd_ra_curhoplimit) - ndi->chlim = nd_ra->nd_ra_curhoplimit; + if (nd_ra->nd_ra_curhoplimit) { + if (ndi->chlim < nd_ra->nd_ra_curhoplimit) + ndi->chlim = nd_ra->nd_ra_curhoplimit; + else if (ndi->chlim != nd_ra->nd_ra_curhoplimit) + log(LOG_ERR, "nd_ra_input: lower CurHopLimit sent from " + "%s on %s (current=%d, received=%d), ignored\n", + ip6_sprintf(&ip6->ip6_src), + if_name(ifp), ndi->chlim, nd_ra->nd_ra_curhoplimit); + } dr = defrtrlist_update(&drtr); }
CVS commit: src/sys/arch/arm/nvidia
Module Name:src Committed By: jmcneill Date: Sat May 2 14:10:03 UTC 2015 Modified Files: src/sys/arch/arm/nvidia: tegra_car.c tegra_carreg.h tegra_sdhc.c Log Message: SDMMC clock input is PLLP (408 MHz). Set input divisor to 2 to get a 204 MHz input for the SDHC, which is just below the maximum supported frequency for SDR104. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/nvidia/tegra_car.c \ src/sys/arch/arm/nvidia/tegra_carreg.h \ src/sys/arch/arm/nvidia/tegra_sdhc.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/arm/nvidia/tegra_car.c diff -u src/sys/arch/arm/nvidia/tegra_car.c:1.1 src/sys/arch/arm/nvidia/tegra_car.c:1.2 --- src/sys/arch/arm/nvidia/tegra_car.c:1.1 Tue Apr 28 11:15:55 2015 +++ src/sys/arch/arm/nvidia/tegra_car.c Sat May 2 14:10:03 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_car.c,v 1.1 2015/04/28 11:15:55 jmcneill Exp $ */ +/* $NetBSD: tegra_car.c,v 1.2 2015/05/02 14:10:03 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -29,7 +29,7 @@ #include "locators.h" #include -__KERNEL_RCSID(0, "$NetBSD: tegra_car.c,v 1.1 2015/04/28 11:15:55 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tegra_car.c,v 1.2 2015/05/02 14:10:03 jmcneill Exp $"); #include #include @@ -81,6 +81,7 @@ tegra_car_attach(device_t parent, device aprint_normal(": CAR\n"); aprint_verbose_dev(self, "PLLX = %u Hz\n", tegra_car_pllx_rate()); + aprint_verbose_dev(self, "PLLP0 = %u Hz\n", tegra_car_pllp0_rate()); } static void @@ -102,8 +103,9 @@ tegra_car_osc_rate(void) return TEGRA_REF_FREQ; } -u_int -tegra_car_pllx_rate(void) +static u_int +tegra_car_pll_rate(u_int base_reg, u_int divm_mask, u_int divn_mask, +u_int divp_mask) { bus_space_tag_t bst; bus_space_handle_t bsh; @@ -112,12 +114,79 @@ tegra_car_pllx_rate(void) tegra_car_get_bs(&bst, &bsh); rate = tegra_car_osc_rate(); - const uint32_t base = bus_space_read_4(bst, bsh, CAR_PLLX_BASE_REG); - const u_int divm = __SHIFTOUT(base, CAR_PLLX_BASE_DIVM); - const u_int divn = __SHIFTOUT(base, CAR_PLLX_BASE_DIVN); - const u_int divp = __SHIFTOUT(base, CAR_PLLX_BASE_DIVP); + const uint32_t base = bus_space_read_4(bst, bsh, base_reg); + const u_int divm = __SHIFTOUT(base, divm_mask); + const u_int divn = __SHIFTOUT(base, divn_mask); + const u_int divp = __SHIFTOUT(base, divp_mask); - rate = tegra_car_osc_rate() * divn; + rate = (uint64_t)tegra_car_osc_rate() * divn; return rate / (divm << divp); } + +u_int +tegra_car_pllx_rate(void) +{ + return tegra_car_pll_rate(CAR_PLLX_BASE_REG, CAR_PLLX_BASE_DIVM, + CAR_PLLX_BASE_DIVN, CAR_PLLX_BASE_DIVP); +} + +u_int +tegra_car_pllp0_rate(void) +{ + return tegra_car_pll_rate(CAR_PLLP_BASE_REG, CAR_PLLP_BASE_DIVM, + CAR_PLLP_BASE_DIVN, CAR_PLLP_BASE_DIVP); +} + +u_int +tegra_car_periph_sdmmc_rate(u_int port) +{ + bus_space_tag_t bst; + bus_space_handle_t bsh; + bus_size_t src_reg; + + tegra_car_get_bs(&bst, &bsh); + + switch (port) { + case 0: src_reg = CAR_CLKSRC_SDMMC1_REG; break; + case 1: src_reg = CAR_CLKSRC_SDMMC2_REG; break; + case 2: src_reg = CAR_CLKSRC_SDMMC3_REG; break; + case 3: src_reg = CAR_CLKSRC_SDMMC4_REG; break; + default: return 0; + } + + const uint32_t src = bus_space_read_4(bst, bsh, src_reg); + + const u_int div = __SHIFTOUT(src, CAR_CLKSRC_SDMMC_DIV) + 1; + + return tegra_car_pllp0_rate() / div; +} + +int +tegra_car_periph_sdmmc_set_div(u_int port, u_int div) +{ + bus_space_tag_t bst; + bus_space_handle_t bsh; + bus_size_t src_reg; + uint32_t src; + + KASSERT(div > 0); + + tegra_car_get_bs(&bst, &bsh); + + switch (port) { + case 0: src_reg = CAR_CLKSRC_SDMMC1_REG; break; + case 1: src_reg = CAR_CLKSRC_SDMMC2_REG; break; + case 2: src_reg = CAR_CLKSRC_SDMMC3_REG; break; + case 3: src_reg = CAR_CLKSRC_SDMMC4_REG; break; + default: return EINVAL; + } + + src = __SHIFTIN(CAR_CLKSRC_SDMMC_SRC_PLLP_OUT0, + CAR_CLKSRC_SDMMC_SRC); + src |= __SHIFTIN(div - 1, CAR_CLKSRC_SDMMC_DIV); + + bus_space_write_4(bst, bsh, src_reg, src); + + return 0; +} Index: src/sys/arch/arm/nvidia/tegra_carreg.h diff -u src/sys/arch/arm/nvidia/tegra_carreg.h:1.1 src/sys/arch/arm/nvidia/tegra_carreg.h:1.2 --- src/sys/arch/arm/nvidia/tegra_carreg.h:1.1 Tue Apr 28 11:15:55 2015 +++ src/sys/arch/arm/nvidia/tegra_carreg.h Sat May 2 14:10:03 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_carreg.h,v 1.1 2015/04/28 11:15:55 jmcneill Exp $ */ +/* $NetBSD: tegra_carreg.h,v 1.2 2015/05/02 14:10:03 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -29,10 +29,28 @@ #ifndef _ARM_TEGRA_CARREG_H #define _ARM_TEGRA_CARREG_H +#define CAR_CLK_OUT_ENB_L_REG 0x10 +#define CAR_CLK_OUT_ENB_H_REG 0x14 +#define CAR_CLK_OUT_ENB_U_REG 0x18 + +#define CAR_PLLP_BASE_REG 0xa0 +#define CAR_PLLP_BASE_BYPASS __BIT(31) +#define CAR_PLLP_BASE_ENABLE __BIT(30) +#define CAR_PLLP_BASE_REF_DIS __BIT(29) +#define CAR_PLLP_BASE_OVER
CVS commit: src/sys/kern
Module Name:src Committed By: mlelstv Date: Sat May 2 12:57:19 UTC 2015 Modified Files: src/sys/kern: files.kern Log Message: Merge dk_intf and dkdriver interfaces. Merge common disk driver functionality in ld.c with dksubr.c. Adjust the two previous users of dk_intf (cgd and xbd) to the changes. This file was missing from the commit. To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/kern/files.kern Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/kern/files.kern diff -u src/sys/kern/files.kern:1.3 src/sys/kern/files.kern:1.4 --- src/sys/kern/files.kern:1.3 Sat Mar 7 16:35:37 2015 +++ src/sys/kern/files.kern Sat May 2 12:57:19 2015 @@ -1,4 +1,4 @@ -# $NetBSD: files.kern,v 1.3 2015/03/07 16:35:37 christos Exp $ +# $NetBSD: files.kern,v 1.4 2015/05/02 12:57:19 mlelstv Exp $ # # kernel sources @@ -13,7 +13,7 @@ file dev/cgd.c cgd file dev/cgd_crypto.c cgd file dev/clock_subr.c kern # XXX file dev/clockctl.c clockctl -file dev/dksubr.c cgd | xbd | ccd | raid | dm +file dev/dksubr.c cgd | xbd | ccd | raid | dm | ld file dev/dkwedge/dk.c kern # XXX file dev/dkwedge/dkwedge_apple.c dkwedge_method_apple file dev/dkwedge/dkwedge_bsdlabel.c dkwedge_method_bsdlabel
CVS commit: src/sys/dev/sdmmc
Module Name:src Committed By: jmcneill Date: Sat May 2 12:10:24 UTC 2015 Modified Files: src/sys/dev/sdmmc: sdhc.c sdhcreg.h sdhcvar.h Log Message: support SDHC 4.0, allow for overriding clk base frequency To generate a diff of this commit: cvs rdiff -u -r1.55 -r1.56 src/sys/dev/sdmmc/sdhc.c cvs rdiff -u -r1.12 -r1.13 src/sys/dev/sdmmc/sdhcreg.h cvs rdiff -u -r1.16 -r1.17 src/sys/dev/sdmmc/sdhcvar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/dev/sdmmc/sdhc.c diff -u src/sys/dev/sdmmc/sdhc.c:1.55 src/sys/dev/sdmmc/sdhc.c:1.56 --- src/sys/dev/sdmmc/sdhc.c:1.55 Tue Apr 14 18:34:29 2015 +++ src/sys/dev/sdmmc/sdhc.c Sat May 2 12:10:24 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: sdhc.c,v 1.55 2015/04/14 18:34:29 bouyer Exp $ */ +/* $NetBSD: sdhc.c,v 1.56 2015/05/02 12:10:24 jmcneill Exp $ */ /* $OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $ */ /* @@ -23,7 +23,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.55 2015/04/14 18:34:29 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.56 2015/05/02 12:10:24 jmcneill Exp $"); #ifdef _KERNEL_OPT #include "opt_sdmmc.h" @@ -289,6 +289,10 @@ sdhc_host_found(struct sdhc_softc *sc, b aprint_normal("3.0"); break; + case SDHC_SPEC_VERS_400: + aprint_normal("4.0"); + break; + default: aprint_normal("unknown version(0x%x)", SDHC_SPEC_VERSION(sdhcver)); @@ -329,12 +333,13 @@ sdhc_host_found(struct sdhc_softc *sc, b /* * Determine the base clock frequency. (2.2.24) */ - if (hp->specver == SDHC_SPEC_VERS_300) { + if (hp->specver >= SDHC_SPEC_VERS_300) { hp->clkbase = SDHC_BASE_V3_FREQ_KHZ(caps); } else { hp->clkbase = SDHC_BASE_FREQ_KHZ(caps); } - if (hp->clkbase == 0) { + if (hp->clkbase == 0 || + ISSET(sc->sc_flags, SDHC_FLAG_NO_CLKBASE)) { if (sc->sc_clkbase == 0) { /* The attachment driver must tell us. */ aprint_error_dev(sc->sc_dev, @@ -424,7 +429,7 @@ sdhc_host_found(struct sdhc_softc *sc, b else if (hp->sc->sc_clkmsk != 0) saa.saa_clkmin = hp->clkbase / (hp->sc->sc_clkmsk >> (ffs(hp->sc->sc_clkmsk) - 1)); - else if (hp->specver == SDHC_SPEC_VERS_300) + else if (hp->specver >= SDHC_SPEC_VERS_300) saa.saa_clkmin = hp->clkbase / 0x3ff; else saa.saa_clkmin = hp->clkbase / 256; @@ -827,7 +832,7 @@ sdhc_clock_divisor(struct sdhc_host *hp, //freq = hp->clkbase / div; return true; } - if (hp->specver == SDHC_SPEC_VERS_300) { + if (hp->specver >= SDHC_SPEC_VERS_300) { div = howmany(hp->clkbase, freq); div = div > 1 ? howmany(div, 2) : 0; if (div > 0x3ff) Index: src/sys/dev/sdmmc/sdhcreg.h diff -u src/sys/dev/sdmmc/sdhcreg.h:1.12 src/sys/dev/sdmmc/sdhcreg.h:1.13 --- src/sys/dev/sdmmc/sdhcreg.h:1.12 Mon Jan 26 04:56:56 2015 +++ src/sys/dev/sdmmc/sdhcreg.h Sat May 2 12:10:24 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: sdhcreg.h,v 1.12 2015/01/26 04:56:56 nonaka Exp $ */ +/* $NetBSD: sdhcreg.h,v 1.13 2015/05/02 12:10:24 jmcneill Exp $ */ /* $OpenBSD: sdhcreg.h,v 1.4 2006/07/30 17:20:40 fgsch Exp $ */ /* @@ -183,6 +183,7 @@ #define SDHC_SPEC_VERS_100 0x00 #define SDHC_SPEC_VERS_200 0x01 #define SDHC_SPEC_VERS_300 0x02 +#define SDHC_SPEC_VERS_400 0x03 /* SDHC_CAPABILITIES decoding */ #define SDHC_BASE_V3_FREQ_KHZ(cap) \ Index: src/sys/dev/sdmmc/sdhcvar.h diff -u src/sys/dev/sdmmc/sdhcvar.h:1.16 src/sys/dev/sdmmc/sdhcvar.h:1.17 --- src/sys/dev/sdmmc/sdhcvar.h:1.16 Tue Apr 14 18:34:29 2015 +++ src/sys/dev/sdmmc/sdhcvar.h Sat May 2 12:10:24 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: sdhcvar.h,v 1.16 2015/04/14 18:34:29 bouyer Exp $ */ +/* $NetBSD: sdhcvar.h,v 1.17 2015/05/02 12:10:24 jmcneill Exp $ */ /* $OpenBSD: sdhcvar.h,v 1.3 2007/09/06 08:01:01 jsg Exp $ */ /* @@ -52,6 +52,7 @@ struct sdhc_softc { #define SDHC_FLAG_NO_HS_BIT 0x2000 /* Don't set SDHC_HIGH_SPEED bit */ #define SDHC_FLAG_EXTERNAL_DMA 0x4000 #define SDHC_FLAG_EXTDMA_DMAEN 0x8000 /* ext. dma need SDHC_DMA_ENABLE */ +#define SDHC_FLAG_NO_CLKBASE 0x0002 /* ignore clkbase register */ uint32_t sc_clkbase; int sc_clkmsk; /* Mask for SDCLK */
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: jmcneill Date: Sat May 2 12:09:34 UTC 2015 Modified Files: src/sys/arch/evbarm/conf: JETSONTK1 Log Message: enable tegragpio To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbarm/conf/JETSONTK1 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/evbarm/conf/JETSONTK1 diff -u src/sys/arch/evbarm/conf/JETSONTK1:1.6 src/sys/arch/evbarm/conf/JETSONTK1:1.7 --- src/sys/arch/evbarm/conf/JETSONTK1:1.6 Tue Apr 28 11:15:55 2015 +++ src/sys/arch/evbarm/conf/JETSONTK1 Sat May 2 12:09:34 2015 @@ -1,5 +1,5 @@ # -# $NetBSD: JETSONTK1,v 1.6 2015/04/28 11:15:55 jmcneill Exp $ +# $NetBSD: JETSONTK1,v 1.7 2015/05/02 12:09:34 jmcneill Exp $ # # NVIDIA Jetson TK1 - Tegra K1 development kit # https://developer.nvidia.com/jetson-tk1 @@ -44,6 +44,10 @@ tegrapmc0 at tegraio? # PMC # Clock and Reset controller tegracar0 at tegraio? # CAR +# GPIO controller +tegragpio0 at tegraio? # GPIO +gpio* at gpiobus? + # UART com3 at tegraio? port 3 # UART-D options CONSADDR=0x70006300, CONSPEED=115200
CVS commit: src/sys/arch/arm/nvidia
Module Name:src Committed By: jmcneill Date: Sat May 2 12:09:05 UTC 2015 Modified Files: src/sys/arch/arm/nvidia: files.tegra Log Message: hook in gpio driver To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/nvidia/files.tegra 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/arm/nvidia/files.tegra diff -u src/sys/arch/arm/nvidia/files.tegra:1.3 src/sys/arch/arm/nvidia/files.tegra:1.4 --- src/sys/arch/arm/nvidia/files.tegra:1.3 Tue Apr 28 11:15:55 2015 +++ src/sys/arch/arm/nvidia/files.tegra Sat May 2 12:09:04 2015 @@ -1,4 +1,4 @@ -# $NetBSD: files.tegra,v 1.3 2015/04/28 11:15:55 jmcneill Exp $ +# $NetBSD: files.tegra,v 1.4 2015/05/02 12:09:04 jmcneill Exp $ # # Configuration info for NVIDIA Tegra ARM Peripherals # @@ -36,6 +36,11 @@ device tegracar attach tegracar at tegraio with tegra_car file arch/arm/nvidia/tegra_car.c tegra_car +# GPIO controller +device tegragpio: gpiobus +attach tegragpio at tegraio with tegra_gpio +file arch/arm/nvidia/tegra_gpio.c tegra_gpio + # UART attach com at tegraio with tegra_com file arch/arm/nvidia/tegra_com.c tegra_com needs-flag
CVS commit: src/sys/arch/arm/nvidia
Module Name:src Committed By: jmcneill Date: Sat May 2 12:08:32 UTC 2015 Modified Files: src/sys/arch/arm/nvidia: tegra_io.c tegra_reg.h tegra_var.h Added Files: src/sys/arch/arm/nvidia: tegra_gpio.c tegra_gpioreg.h Log Message: add GPIO support To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/nvidia/tegra_gpio.c \ src/sys/arch/arm/nvidia/tegra_gpioreg.h cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/nvidia/tegra_io.c cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/nvidia/tegra_reg.h \ src/sys/arch/arm/nvidia/tegra_var.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/arm/nvidia/tegra_io.c diff -u src/sys/arch/arm/nvidia/tegra_io.c:1.3 src/sys/arch/arm/nvidia/tegra_io.c:1.4 --- src/sys/arch/arm/nvidia/tegra_io.c:1.3 Tue Apr 28 11:15:55 2015 +++ src/sys/arch/arm/nvidia/tegra_io.c Sat May 2 12:08:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_io.c,v 1.3 2015/04/28 11:15:55 jmcneill Exp $ */ +/* $NetBSD: tegra_io.c,v 1.4 2015/05/02 12:08:32 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -29,7 +29,7 @@ #include "opt_tegra.h" #include -__KERNEL_RCSID(0, "$NetBSD: tegra_io.c,v 1.3 2015/04/28 11:15:55 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: tegra_io.c,v 1.4 2015/05/02 12:08:32 jmcneill Exp $"); #include #include @@ -64,6 +64,8 @@ static bool tegraio_found = false; static const struct tegra_locators tegra_ppsb_locators[] = { { "tegracar", TEGRA_CAR_OFFSET, TEGRA_CAR_SIZE, NOPORT, NOINTR }, + { "tegragpio", +TEGRA_GPIO_OFFSET, TEGRA_GPIO_SIZE, NOPORT, NOINTR }, }; static const struct tegra_locators tegra_apb_locators[] = { Index: src/sys/arch/arm/nvidia/tegra_reg.h diff -u src/sys/arch/arm/nvidia/tegra_reg.h:1.4 src/sys/arch/arm/nvidia/tegra_reg.h:1.5 --- src/sys/arch/arm/nvidia/tegra_reg.h:1.4 Tue Apr 28 11:15:55 2015 +++ src/sys/arch/arm/nvidia/tegra_reg.h Sat May 2 12:08:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_reg.h,v 1.4 2015/04/28 11:15:55 jmcneill Exp $ */ +/* $NetBSD: tegra_reg.h,v 1.5 2015/05/02 12:08:32 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -89,6 +89,8 @@ /* PPSB */ #define TEGRA_CAR_OFFSET 0x6000 #define TEGRA_CAR_SIZE 0x1000 +#define TEGRA_GPIO_OFFSET 0xd000 +#define TEGRA_GPIO_SIZE 0x0800 #define TEGRA_EVP_OFFSET 0xf000 #define TEGRA_EVP_SIZE 0x1000 Index: src/sys/arch/arm/nvidia/tegra_var.h diff -u src/sys/arch/arm/nvidia/tegra_var.h:1.4 src/sys/arch/arm/nvidia/tegra_var.h:1.5 --- src/sys/arch/arm/nvidia/tegra_var.h:1.4 Tue Apr 28 11:15:55 2015 +++ src/sys/arch/arm/nvidia/tegra_var.h Sat May 2 12:08:32 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: tegra_var.h,v 1.4 2015/04/28 11:15:55 jmcneill Exp $ */ +/* $NetBSD: tegra_var.h,v 1.5 2015/05/02 12:08:32 jmcneill Exp $ */ /*- * Copyright (c) 2015 Jared D. McNeill @@ -31,6 +31,7 @@ #include #include +#include #include "opt_tegra.h" @@ -71,6 +72,15 @@ void tegra_bootstrap(void); u_int tegra_car_osc_rate(void); u_int tegra_car_pllx_rate(void); +u_int tegra_car_pllp0_rate(void); +u_int tegra_car_periph_sdmmc_rate(u_int); +int tegra_car_periph_sdmmc_set_div(u_int, u_int); + +struct tegra_gpio_pin; +struct tegra_gpio_pin *tegra_gpio_acquire(const char *, int, u_int); +void tegra_gpio_release(struct tegra_gpio_pin *); +int tegra_gpio_read(struct tegra_gpio_pin *); +void tegra_gpio_write(struct tegra_gpio_pin *, int); void tegra_pmc_reset(void); void tegra_pmc_power(u_int, bool); Added files: Index: src/sys/arch/arm/nvidia/tegra_gpio.c diff -u /dev/null src/sys/arch/arm/nvidia/tegra_gpio.c:1.1 --- /dev/null Sat May 2 12:08:32 2015 +++ src/sys/arch/arm/nvidia/tegra_gpio.c Sat May 2 12:08:32 2015 @@ -0,0 +1,320 @@ +/* $NetBSD: tegra_gpio.c,v 1.1 2015/05/02 12:08:32 jmcneill Exp $ */ + +/*- + * Copyright (c) 2015 Jared D. McNeill + * 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 the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUS
CVS commit: src/libexec/httpd
Module Name:src Committed By: mrg Date: Sat May 2 11:35:48 UTC 2015 Modified Files: src/libexec/httpd: bozohttpd.8 bozohttpd.c bozohttpd.h cgi-bozo.c content-bozo.c Log Message: fix content type handling to not hard code (wrong) values for length, but just call strlen() as needed. call this 20150501. reported by Jan Danielsson for ".svg". To generate a diff of this commit: cvs rdiff -u -r1.50 -r1.51 src/libexec/httpd/bozohttpd.8 cvs rdiff -u -r1.63 -r1.64 src/libexec/httpd/bozohttpd.c cvs rdiff -u -r1.34 -r1.35 src/libexec/httpd/bozohttpd.h cvs rdiff -u -r1.26 -r1.27 src/libexec/httpd/cgi-bozo.c cvs rdiff -u -r1.11 -r1.12 src/libexec/httpd/content-bozo.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/libexec/httpd/bozohttpd.8 diff -u src/libexec/httpd/bozohttpd.8:1.50 src/libexec/httpd/bozohttpd.8:1.51 --- src/libexec/httpd/bozohttpd.8:1.50 Thu Apr 16 02:32:33 2015 +++ src/libexec/httpd/bozohttpd.8 Sat May 2 11:35:48 2015 @@ -1,4 +1,4 @@ -.\" $NetBSD: bozohttpd.8,v 1.50 2015/04/16 02:32:33 mrg Exp $ +.\" $NetBSD: bozohttpd.8,v 1.51 2015/05/02 11:35:48 mrg Exp $ .\" .\" $eterna: bozohttpd.8,v 1.101 2011/11/18 01:25:11 mrg Exp $ .\" @@ -26,7 +26,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 15, 2015 +.Dd May 1, 2015 .Dt BOZOHTTPD 8 .Os .Sh NAME @@ -510,7 +510,7 @@ The focus has always been simplicity and and regular code audits. This manual documents .Nm -version 20150320. +version 20150501. .Sh AUTHORS .An -nosplit .Nm Index: src/libexec/httpd/bozohttpd.c diff -u src/libexec/httpd/bozohttpd.c:1.63 src/libexec/httpd/bozohttpd.c:1.64 --- src/libexec/httpd/bozohttpd.c:1.63 Fri Mar 20 19:54:53 2015 +++ src/libexec/httpd/bozohttpd.c Sat May 2 11:35:48 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: bozohttpd.c,v 1.63 2015/03/20 19:54:53 mrg Exp $ */ +/* $NetBSD: bozohttpd.c,v 1.64 2015/05/02 11:35:48 mrg Exp $ */ /* $eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $ */ @@ -109,7 +109,7 @@ #define INDEX_HTML "index.html" #endif #ifndef SERVER_SOFTWARE -#define SERVER_SOFTWARE "bozohttpd/20150320" +#define SERVER_SOFTWARE "bozohttpd/20150501" #endif #ifndef DIRECT_ACCESS_FILE #define DIRECT_ACCESS_FILE ".bzdirect" @@ -1861,6 +1861,7 @@ static struct errors_map { { 404, "404 Not Found", "This item has not been found", }, { 408, "408 Request Timeout", "This request took too long", }, { 417, "417 Expectation Failed","Expectations not available", }, + { 420, "420 Enhance Your Calm","Chill, Winston", }, { 500, "500 Internal Error", "An error occured on the server", }, { 501, "501 Not Implemented", "This request is not available", }, { 0, NULL, NULL, }, Index: src/libexec/httpd/bozohttpd.h diff -u src/libexec/httpd/bozohttpd.h:1.34 src/libexec/httpd/bozohttpd.h:1.35 --- src/libexec/httpd/bozohttpd.h:1.34 Fri Nov 21 08:58:28 2014 +++ src/libexec/httpd/bozohttpd.h Sat May 2 11:35:48 2015 @@ -1,9 +1,9 @@ -/* $NetBSD: bozohttpd.h,v 1.34 2014/11/21 08:58:28 shm Exp $ */ +/* $NetBSD: bozohttpd.h,v 1.35 2015/05/02 11:35:48 mrg Exp $ */ /* $eterna: bozohttpd.h,v 1.39 2011/11/18 09:21:15 mrg Exp $ */ /* - * Copyright (c) 1997-2014 Matthew R. Green + * Copyright (c) 1997-2015 Matthew R. Green * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -68,7 +68,6 @@ typedef struct lua_state_map { typedef struct bozo_content_map_t { const char *name; /* postfix of file */ - size_t namelen; /* length of postfix */ const char *type; /* matching content-type */ const char *encoding; /* matching content-encoding */ const char *encoding11; /* matching content-encoding (HTTP/1.1) */ Index: src/libexec/httpd/cgi-bozo.c diff -u src/libexec/httpd/cgi-bozo.c:1.26 src/libexec/httpd/cgi-bozo.c:1.27 --- src/libexec/httpd/cgi-bozo.c:1.26 Sun Apr 19 19:05:19 2015 +++ src/libexec/httpd/cgi-bozo.c Sat May 2 11:35:48 2015 @@ -1,9 +1,9 @@ -/* $NetBSD: cgi-bozo.c,v 1.26 2015/04/19 19:05:19 christos Exp $ */ +/* $NetBSD: cgi-bozo.c,v 1.27 2015/05/02 11:35:48 mrg Exp $ */ /* $eterna: cgi-bozo.c,v 1.40 2011/11/18 09:21:15 mrg Exp $ */ /* - * Copyright (c) 1997-2014 Matthew R. Green + * Copyright (c) 1997-2015 Matthew R. Green * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -515,7 +515,6 @@ bozo_add_content_map_cgi(bozohttpd_t *ht map = bozo_get_content_map(httpd, arg); map->name = arg; - map->namelen = strlen(map->name); map->type = map->encoding = map->encoding11 = NULL; map->cgihandler = cgihandler; } Index: src/libexec/httpd/content-bozo.c diff -u src/libexec/httpd/content-bozo.c:1.11 src/libexec/httpd/content-bozo.c:1.12 --- src/libexec/httpd/content-bozo.c:1.11 Sat Dec 13 19:30:04 2014 +++ src/libexec/httpd/content-bozo.c Sat May 2 11:35:48 2015 @@ -1,9 +1,9 @@ -/* $N
CVS commit: src/sys
Module Name:src Committed By: mlelstv Date: Sat May 2 08:00:09 UTC 2015 Modified Files: src/sys/arch/xen/include: xbdvar.h src/sys/arch/xen/xen: xbd_xenbus.c src/sys/dev: cgd.c dksubr.c dkvar.h ld.c ldvar.h src/sys/sys: disk.h param.h Log Message: Merge dk_intf and dkdriver interfaces. Merge common disk driver functionality in ld.c with dksubr.c. Adjust the two previous users of dk_intf (cgd and xbd) to the changes. bump kernel version to 7.99.14 To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/sys/arch/xen/include/xbdvar.h cvs rdiff -u -r1.70 -r1.71 src/sys/arch/xen/xen/xbd_xenbus.c cvs rdiff -u -r1.97 -r1.98 src/sys/dev/cgd.c cvs rdiff -u -r1.59 -r1.60 src/sys/dev/dksubr.c cvs rdiff -u -r1.19 -r1.20 src/sys/dev/dkvar.h cvs rdiff -u -r1.82 -r1.83 src/sys/dev/ld.c cvs rdiff -u -r1.22 -r1.23 src/sys/dev/ldvar.h cvs rdiff -u -r1.63 -r1.64 src/sys/sys/disk.h cvs rdiff -u -r1.475 -r1.476 src/sys/sys/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/xen/include/xbdvar.h diff -u src/sys/arch/xen/include/xbdvar.h:1.16 src/sys/arch/xen/include/xbdvar.h:1.17 --- src/sys/arch/xen/include/xbdvar.h:1.16 Tue Apr 14 20:32:35 2015 +++ src/sys/arch/xen/include/xbdvar.h Sat May 2 08:00:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: xbdvar.h,v 1.16 2015/04/14 20:32:35 riastradh Exp $ */ +/* $NetBSD: xbdvar.h,v 1.17 2015/05/02 08:00:08 mlelstv Exp $ */ /* * @@ -36,7 +36,6 @@ struct xbd_softc { device_t sc_dev; /* base device glue */ struct dk_softc sc_dksc; /* generic disk interface */ unsigned long sc_xd_device; /* cookie identifying device */ - struct dk_intf *sc_di; /* pseudo-disk interface */ int sc_shutdown; /* about to be removed */ krndsource_t sc_rnd_source; }; @@ -44,7 +43,6 @@ struct xbd_softc { struct xbd_attach_args { const char *xa_device; vdisk_t *xa_xd; - struct dk_intf *xa_dkintf; struct sysctlnode *xa_diskcookies; }; Index: src/sys/arch/xen/xen/xbd_xenbus.c diff -u src/sys/arch/xen/xen/xbd_xenbus.c:1.70 src/sys/arch/xen/xen/xbd_xenbus.c:1.71 --- src/sys/arch/xen/xen/xbd_xenbus.c:1.70 Mon Apr 13 21:18:40 2015 +++ src/sys/arch/xen/xen/xbd_xenbus.c Sat May 2 08:00:08 2015 @@ -1,4 +1,4 @@ -/* $NetBSD: xbd_xenbus.c,v 1.70 2015/04/13 21:18:40 riastradh Exp $ */ +/* $NetBSD: xbd_xenbus.c,v 1.71 2015/05/02 08:00:08 mlelstv Exp $ */ /* * Copyright (c) 2006 Manuel Bouyer. @@ -50,7 +50,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.70 2015/04/13 21:18:40 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xbd_xenbus.c,v 1.71 2015/05/02 08:00:08 mlelstv Exp $"); #include "opt_xen.h" @@ -168,7 +168,7 @@ static bool xbd_xenbus_suspend(device_t, static bool xbd_xenbus_resume(device_t, const pmf_qual_t *); static int xbd_handler(void *); -static void xbdstart(struct dk_softc *); +static void xbdstart(device_t); static void xbd_backend_changed(void *, XenbusState); static void xbd_connect(struct xbd_xenbus_softc *); @@ -218,19 +218,12 @@ const struct cdevsw xbd_cdevsw = { extern struct cfdriver xbd_cd; -/* Pseudo-disk Interface */ -static struct dk_intf dkintf_esdi = { -DKTYPE_ESDI, - "Xen Virtual ESDI", - xbdopen, - xbdclose, - xbdstrategy, - xbdstart, -}, *di = &dkintf_esdi; - static struct dkdriver xbddkdriver = { .d_strategy = xbdstrategy, .d_minphys = xbdminphys, + .d_open = xbdopen, + .d_close = xbdclose, + .d_diskstart = xbdstart, }; static int @@ -265,8 +258,8 @@ xbd_xenbus_attach(device_t parent, devic config_pending_incr(self); aprint_normal(": Xen Virtual Block Device Interface\n"); - dk_sc_init(&sc->sc_dksc, device_xname(self)); - sc->sc_dksc.sc_dev = self; + dk_init(&sc->sc_dksc, self, DKTYPE_ESDI); + disk_init(&sc->sc_dksc.sc_dkdev, device_xname(self), &xbddkdriver); #ifdef XBD_DEBUG printf("path: %s\n", xa->xa_xbusd->xbusd_path); @@ -293,7 +286,6 @@ xbd_xenbus_attach(device_t parent, devic sc->sc_xbusd = xa->xa_xbusd; sc->sc_xbusd->xbusd_otherend_changed = xbd_backend_changed; - disk_init(&sc->sc_dksc.sc_dkdev, device_xname(self), &xbddkdriver); /* initialize free requests list */ SLIST_INIT(&sc->sc_xbdreq_head); for (i = 0; i < XBD_RING_SIZE; i++) { @@ -380,6 +372,7 @@ xbd_xenbus_detach(device_t dev, int flag /* detach disk */ disk_detach(&sc->sc_dksc.sc_dkdev); disk_destroy(&sc->sc_dksc.sc_dkdev); + dk_detach(&sc->sc_dksc); /* Unhook the entropy source. */ rnd_detach_source(&sc->sc_rnd_source); } @@ -580,13 +573,13 @@ static void xbd_backend_changed(void *ar dg->dg_ncylinders = dg->dg_secperunit / dg->dg_nsectors; bufq_alloc(&sc->sc_dksc.sc_bufq, "fcfs", 0); - sc->sc_dksc.sc_flags |= DKF_INITED; + dk_attach(&sc->sc_dksc); disk_attach(&sc->sc_dksc.sc_dkdev); sc->sc_backend_status = BLKIF_STATE_CONNECTED; /* try to read the disklabel */ - dk_getdisklabel(