CVS commit: src
Module Name:src Committed By: uebayasi Date: Tue Apr 29 06:29:02 UTC 2014 Modified Files: src/distrib/sets/lists/debug: mi src/distrib/sets/lists/tests: mi src/etc/mtree: NetBSD.dist.tests src/tests/lib/libc/gen: Makefile Added Files: src/tests/lib/libc/gen/execve: Makefile t_execve.c Log Message: Minimal execve(2) ATF test. To generate a diff of this commit: cvs rdiff -u -r1.59 -r1.60 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.566 -r1.567 src/distrib/sets/lists/tests/mi cvs rdiff -u -r1.103 -r1.104 src/etc/mtree/NetBSD.dist.tests cvs rdiff -u -r1.39 -r1.40 src/tests/lib/libc/gen/Makefile cvs rdiff -u -r0 -r1.1 src/tests/lib/libc/gen/execve/Makefile \ src/tests/lib/libc/gen/execve/t_execve.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.59 src/distrib/sets/lists/debug/mi:1.60 --- src/distrib/sets/lists/debug/mi:1.59 Thu Apr 24 21:46:44 2014 +++ src/distrib/sets/lists/debug/mi Tue Apr 29 06:29:02 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.59 2014/04/24 21:46:44 pooka Exp $ +# $NetBSD: mi,v 1.60 2014/04/29 06:29:02 uebayasi Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib @@ -1792,6 +1792,7 @@ ./usr/libdata/debug/usr/tests/lib/libc/c063/t_unlinkat.debug tests-lib-debug debug,atf ./usr/libdata/debug/usr/tests/lib/libc/c063/t_utimensat.debug tests-lib-debug debug,atf ./usr/libdata/debug/usr/tests/lib/libc/db/h_db.debug tests-lib-debug debug,atf +./usr/libdata/debug/usr/tests/lib/libc/gen/execve/t_execve.debug tests-kernel-tests debug,atf ./usr/libdata/debug/usr/tests/lib/libc/gen/posix_spawn/h_fileactions.debug tests-kernel-tests debug,atf ./usr/libdata/debug/usr/tests/lib/libc/gen/posix_spawn/h_spawn.debug tests-kernel-tests debug,atf ./usr/libdata/debug/usr/tests/lib/libc/gen/posix_spawn/h_spawnattr.debug tests-kernel-tests debug,atf Index: src/distrib/sets/lists/tests/mi diff -u src/distrib/sets/lists/tests/mi:1.566 src/distrib/sets/lists/tests/mi:1.567 --- src/distrib/sets/lists/tests/mi:1.566 Thu Apr 17 23:15:27 2014 +++ src/distrib/sets/lists/tests/mi Tue Apr 29 06:29:02 2014 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.566 2014/04/17 23:15:27 pgoyette Exp $ +# $NetBSD: mi,v 1.567 2014/04/29 06:29:02 uebayasi Exp $ # # Note: don't delete entries from here - mark them as obsolete instead. # @@ -85,6 +85,7 @@ ./usr/libdata/debug/usr/tests/lib/libc/c063tests-lib-debug ./usr/libdata/debug/usr/tests/lib/libc/dbtests-lib-debug ./usr/libdata/debug/usr/tests/lib/libc/gentests-lib-debug +./usr/libdata/debug/usr/tests/lib/libc/gen/execve tests-kernel-tests ./usr/libdata/debug/usr/tests/lib/libc/gen/posix_spawn tests-kernel-tests ./usr/libdata/debug/usr/tests/lib/libc/getaddrinfo tests-obsolete obsolete ./usr/libdata/debug/usr/tests/lib/libc/getaddrinfo/data tests-obsolete obsolete @@ -1910,6 +1911,10 @@ ./usr/tests/lib/libc/gen tests-lib-tests ./usr/tests/lib/libc/gen/Atffile tests-lib-tests atf ./usr/tests/lib/libc/gen/Kyuafile tests-lib-tests atf,kyua +./usr/tests/lib/libc/gen/execve tests-kernel-tests +./usr/tests/lib/libc/gen/execve/Atffile tests-kernel-tests atf +./usr/tests/lib/libc/gen/execve/Kyuafile tests-kernel-tests atf,kyua +./usr/tests/lib/libc/gen/execve/t_execve tests-kernel-tests atf ./usr/tests/lib/libc/gen/posix_spawn tests-kernel-tests ./usr/tests/lib/libc/gen/posix_spawn/Atffile tests-kernel-tests atf ./usr/tests/lib/libc/gen/posix_spawn/Kyuafile tests-kernel-tests atf,kyua Index: src/etc/mtree/NetBSD.dist.tests diff -u src/etc/mtree/NetBSD.dist.tests:1.103 src/etc/mtree/NetBSD.dist.tests:1.104 --- src/etc/mtree/NetBSD.dist.tests:1.103 Sat Feb 8 19:45:51 2014 +++ src/etc/mtree/NetBSD.dist.tests Tue Apr 29 06:29:02 2014 @@ -1,4 +1,4 @@ -# $NetBSD: NetBSD.dist.tests,v 1.103 2014/02/08 19:45:51 jmmv Exp $ +# $NetBSD: NetBSD.dist.tests,v 1.104 2014/04/29 06:29:02 uebayasi Exp $ ./usr/libdata/debug/usr/tests ./usr/libdata/debug/usr/tests/atf @@ -75,6 +75,7 @@ ./usr/libdata/debug/usr/tests/lib/libc/c063 ./usr/libdata/debug/usr/tests/lib/libc/db ./usr/libdata/debug/usr/tests/lib/libc/gen +./usr/libdata/debug/usr/tests/lib/libc/gen/execve ./usr/libdata/debug/usr/tests/lib/libc/gen/posix_spawn ./usr/libdata/debug/usr/tests/lib/libc/hash ./usr/libdata/debug/usr/tests/lib/libc/locale @@ -236,6 +237,7 @@ ./usr/tests/lib/libc/c063 ./usr/tests/lib/libc/db ./usr/tests/lib/libc/gen +./usr/tests/lib/libc/gen/execve ./usr/tests/lib/libc/gen/posix_spawn ./usr/tests/lib/libc/hash ./usr/tests/lib/libc/hash/data Index: src/tests/lib/libc/gen/Makefile diff -u src/tests/lib/libc/gen/Makefile:1.39 src/tests/lib/libc/gen/Makefile:1.40 --- src/tests/lib/libc/gen/Makefile:1.39 Thu Jan 30 15:04:04 2014 +++ src/tests/lib/libc/gen/Makefile Tue Apr
CVS commit: src
Module Name:src Committed By: uebayasi Date: Tue Apr 29 06:51:57 UTC 2014 Modified Files: src: build.sh Log Message: resolvepath: Resolve .. in absolute paths. To generate a diff of this commit: cvs rdiff -u -r1.278 -r1.279 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/build.sh diff -u src/build.sh:1.278 src/build.sh:1.279 --- src/build.sh:1.278 Mon Mar 31 19:29:21 2014 +++ src/build.sh Tue Apr 29 06:51:57 2014 @@ -1,5 +1,5 @@ #! /usr/bin/env sh -# $NetBSD: build.sh,v 1.278 2014/03/31 19:29:21 martin Exp $ +# $NetBSD: build.sh,v 1.279 2014/04/29 06:51:57 uebayasi Exp $ # # Copyright (c) 2001-2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -889,6 +889,7 @@ resolvepath() val=${TOP}/${val%/} ;; esac + val=$( /bin/mkdir -p ${val} cd ${val} /bin/pwd ) eval ${var}=\\${val}\ } @@ -1746,7 +1747,7 @@ createmakewrapper() eval cat EOF ${makewrapout} #! ${HOST_SH} # Set proper variables to allow easy make building of a NetBSD subtree. -# Generated from: \$NetBSD: build.sh,v 1.278 2014/03/31 19:29:21 martin Exp $ +# Generated from: \$NetBSD: build.sh,v 1.279 2014/04/29 06:51:57 uebayasi Exp $ # with these arguments: ${_args} #
CVS commit: src/sys/arch/amiga/stand/bootblock/bootxx_ffs
Module Name:src Committed By: martin Date: Tue Apr 29 08:11:46 UTC 2014 Modified Files: src/sys/arch/amiga/stand/bootblock/bootxx_ffs: Makefile Log Message: Specify both -march=68030 and -mcpu=68030 for assembler files here as well. To generate a diff of this commit: cvs rdiff -u -r1.21 -r1.22 \ src/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile diff -u src/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile:1.21 src/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile:1.22 --- src/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile:1.21 Sat Mar 29 12:52:56 2014 +++ src/sys/arch/amiga/stand/bootblock/bootxx_ffs/Makefile Tue Apr 29 08:11:46 2014 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.21 2014/03/29 12:52:56 mlelstv Exp $ +# $NetBSD: Makefile,v 1.22 2014/04/29 08:11:46 martin Exp $ ### what we need: @@ -53,7 +53,7 @@ INCPATH += -I${.CURDIR}/../boot -I${.CUR INCPATH += -I${.CURDIR}/../elf2bb -I${.OBJDIR} AFLAGS += -m68030 -l -CAFLAGS += -Wa,-l -Wa,-mcpu=68030 ${INCPATH} -D_PRIMARY_BOOT +CAFLAGS += -Wa,-l -Wa,-march=68030 -Wa,-mcpu=68030 ${INCPATH} -D_PRIMARY_BOOT COPTIM= -Os -fomit-frame-pointer -fcse-follow-jumps -fcse-skip-blocks COPTIM+= -Wa,-l -m68060 -Wa,-mcpu=68030 -fno-unwind-tables
CVS commit: xsrc/external/mit/xf86-video-suncg14/dist/src
Module Name:xsrc Committed By: macallan Date: Tue Apr 29 08:40:58 UTC 2014 Modified Files: xsrc/external/mit/xf86-video-suncg14/dist/src: cg14.h Log Message: write all SX commands to 64bit-aligned addresses now this works on rev. 27 hardware To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h diff -u xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h:1.10 xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h:1.11 --- xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h:1.10 Thu Jul 25 17:37:30 2013 +++ xsrc/external/mit/xf86-video-suncg14/dist/src/cg14.h Tue Apr 29 08:40:58 2014 @@ -123,7 +123,7 @@ read_sx_reg(Cg14Ptr p, int reg) static inline void write_sx_io(Cg14Ptr p, int reg, uint32_t val) { - *(volatile uint32_t *)(p-sxio + reg) = val; + *(volatile uint32_t *)(p-sxio + (reg ~7)) = val; } Bool CG14SetupCursor(ScreenPtr);
CVS commit: src/etc/rc.d
Module Name:src Committed By: uebayasi Date: Tue Apr 29 09:42:51 UTC 2014 Modified Files: src/etc/rc.d: network Log Message: Split huge monolithic functions for readability. To generate a diff of this commit: cvs rdiff -u -r1.63 -r1.64 src/etc/rc.d/network 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/network diff -u src/etc/rc.d/network:1.63 src/etc/rc.d/network:1.64 --- src/etc/rc.d/network:1.63 Sat Apr 20 18:24:18 2013 +++ src/etc/rc.d/network Tue Apr 29 09:42:51 2014 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: network,v 1.63 2013/04/20 18:24:18 christos Exp $ +# $NetBSD: network,v 1.64 2014/04/29 09:42:51 uebayasi Exp $ # # PROVIDE: network @@ -34,6 +34,20 @@ network_start() # echo Starting network. + network_start_hostname + network_start_domainname + network_start_loopback + network_start_ipv6_route + network_start_interfaces + network_start_aliases + network_start_defaultroute + network_start_defaultroute6 + network_start_ipv6_autoconf + network_start_local +} + +network_start_hostname() +{ # If $hostname is set, use it for my Internet name, # otherwise use /etc/myname # @@ -54,7 +68,10 @@ network_start() warn \$hostname not set. fi fi +} +network_start_domainname() +{ # Check $domainname first, then /etc/defaultdomain, # for NIS/YP domain name # @@ -70,7 +87,10 @@ network_start() if checkyesno flushroutes; then /sbin/route -qn flush fi +} +network_start_loopback() +{ # Set the address for the first loopback interface, so that the # auto-route from a newly configured interface's address to lo0 # works correctly. @@ -82,7 +102,10 @@ network_start() # According to RFC1122, 127.0.0.0/8 must not leave the node. # /sbin/route -q add -inet 127.0.0.0 -netmask 0xff00 127.0.0.1 -reject +} +network_start_ipv6_route() +{ # IPv6 routing setups, and host/router mode selection. # if /sbin/ifconfig lo0 inet6 /dev/null 21; then @@ -168,7 +191,10 @@ network_start() esac fi +} +network_start_interfaces() +{ # Configure all of the network interfaces listed in $net_interfaces; # if $auto_ifconfig is YES, grab all interfaces from ifconfig. # In the following, xxN stands in for interface names, like le0. @@ -309,7 +335,10 @@ network_start() done echo . fi +} +network_start_aliases() +{ echo -n Adding interface aliases: # Check if each configured interface xxN has an $ifaliases_xxN variable @@ -360,7 +389,10 @@ network_start() fi echo . # for Adding interface aliases: +} +network_start_defaultroute() +{ # Check $defaultroute, then /etc/mygate, for the name or address # of my IPv4 gateway host. If using a name, that name must be in # /etc/hosts. @@ -371,7 +403,10 @@ network_start() if [ -n $defaultroute ]; then /sbin/route add default $defaultroute fi +} +network_start_defaultroute6() +{ # Check $defaultroute6, then /etc/mygate6, for the name or address # of my IPv6 gateway host. If using a name, that name must be in # /etc/hosts. Note that the gateway host address must be a link-local @@ -388,7 +423,10 @@ network_start() fi /sbin/route add -inet6 default $defaultroute6 fi +} +network_start_ipv6_autoconf() +{ # IPv6 interface autoconfiguration. # if /sbin/ifconfig lo0 inet6 /dev/null 21; then @@ -420,7 +458,10 @@ network_start() sleep 1 fi fi +} +network_start_local() +{ # XXX this must die if [ -s /etc/netstart.local ]; then sh /etc/netstart.local start @@ -431,11 +472,22 @@ network_stop() { echo Stopping network. + network_stop_local + network_stop_aliases + network_stop_interfaces + network_stop_route +} + +network_stop_local() +{ # XXX this must die if [ -s /etc/netstart.local ]; then sh /etc/netstart.local stop fi +} +network_stop_aliases() +{ echo Deleting aliases. if [ -f /etc/ifaliases ]; then while read addr int net; do @@ -453,7 +505,10 @@ network_stop() done fi done +} +network_stop_interfaces() +{ # down interfaces # echo -n 'Downing network interfaces:' @@ -480,7 +535,10 @@ network_stop() done echo . fi +} +network_stop_route() +{ # flush routes # /sbin/route -qn flush
CVS commit: src/etc/rc.d
Module Name:src Committed By: uebayasi Date: Tue Apr 29 09:56:16 UTC 2014 Modified Files: src/etc/rc.d: network Log Message: Refactor a little to remove huge indents. To generate a diff of this commit: cvs rdiff -u -r1.64 -r1.65 src/etc/rc.d/network 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/network diff -u src/etc/rc.d/network:1.64 src/etc/rc.d/network:1.65 --- src/etc/rc.d/network:1.64 Tue Apr 29 09:42:51 2014 +++ src/etc/rc.d/network Tue Apr 29 09:56:16 2014 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: network,v 1.64 2014/04/29 09:42:51 uebayasi Exp $ +# $NetBSD: network,v 1.65 2014/04/29 09:56:16 uebayasi Exp $ # # PROVIDE: network @@ -16,11 +16,11 @@ stop_cmd=network_stop nl=' ' # a newline -intmissing() { +intmissing() +{ local int=$1 shift - for i - do + for i; do if [ $int = $i ]; then return 1 fi @@ -28,6 +28,11 @@ intmissing() { return 0 } +have_inet6() +{ + /sbin/ifconfig lo0 inet6 /dev/null 21 +} + network_start() { # set hostname, turn on network @@ -37,11 +42,14 @@ network_start() network_start_hostname network_start_domainname network_start_loopback + have_inet6 network_start_ipv6_route + [ $net_interfaces != NO ] network_start_interfaces network_start_aliases network_start_defaultroute network_start_defaultroute6 + have_inet6 network_start_ipv6_autoconf network_start_local } @@ -108,7 +116,6 @@ network_start_ipv6_route() { # IPv6 routing setups, and host/router mode selection. # - if /sbin/ifconfig lo0 inet6 /dev/null 21; then # We have IPv6 support in kernel. # disallow link-local unicast dest without outgoing scope @@ -190,7 +197,6 @@ network_start_ipv6_route() ;; esac - fi } network_start_interfaces() @@ -227,7 +233,6 @@ network_start_interfaces() # You can put shell script fragment into /etc/ifconfig.xxN by # starting a line with !. Refer to ifconfig.if(5) for details. # - if [ $net_interfaces != NO ]; then ifaces=$(/sbin/ifconfig -l) if checkyesno auto_ifconfig; then tmp=$ifaces @@ -334,7 +339,6 @@ network_start_interfaces() configured_interfaces=$configured_interfaces $int done echo . - fi } network_start_aliases() @@ -429,7 +433,6 @@ network_start_ipv6_autoconf() { # IPv6 interface autoconfiguration. # - if /sbin/ifconfig lo0 inet6 /dev/null 21; then # wait till DAD is completed. always invoke it in case # if are configured manually by ifconfig # @@ -457,7 +460,6 @@ network_start_ipv6_autoconf() sleep $dadcount sleep 1 fi - fi } network_start_local() @@ -474,6 +476,7 @@ network_stop() network_stop_local network_stop_aliases + [ $net_interfaces != NO ] network_stop_interfaces network_stop_route } @@ -512,7 +515,6 @@ network_stop_interfaces() # down interfaces # echo -n 'Downing network interfaces:' - if [ $net_interfaces != NO ]; then if checkyesno auto_ifconfig; then tmp=$(/sbin/ifconfig -l) else @@ -534,7 +536,6 @@ network_stop_interfaces() fi done echo . - fi } network_stop_route()
CVS commit: src/etc/rc.d
Module Name:src Committed By: uebayasi Date: Tue Apr 29 09:58:18 UTC 2014 Modified Files: src/etc/rc.d: network Log Message: Indent. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/etc/rc.d/network 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/network diff -u src/etc/rc.d/network:1.65 src/etc/rc.d/network:1.66 --- src/etc/rc.d/network:1.65 Tue Apr 29 09:56:16 2014 +++ src/etc/rc.d/network Tue Apr 29 09:58:18 2014 @@ -1,6 +1,6 @@ #!/bin/sh # -# $NetBSD: network,v 1.65 2014/04/29 09:56:16 uebayasi Exp $ +# $NetBSD: network,v 1.66 2014/04/29 09:58:18 uebayasi Exp $ # # PROVIDE: network @@ -116,87 +116,87 @@ network_start_ipv6_route() { # IPv6 routing setups, and host/router mode selection. # - # We have IPv6 support in kernel. + # We have IPv6 support in kernel. - # disallow link-local unicast dest without outgoing scope - # identifiers. - # - /sbin/route -q add -inet6 fe80:: -prefixlen 10 ::1 -reject + # disallow link-local unicast dest without outgoing scope + # identifiers. + # + /sbin/route -q add -inet6 fe80:: -prefixlen 10 ::1 -reject - # disallow the use of the RFC3849 documentation address - # - /sbin/route -q add -inet6 2001:db8:: -prefixlen 32 ::1 -reject + # disallow the use of the RFC3849 documentation address + # + /sbin/route -q add -inet6 2001:db8:: -prefixlen 32 ::1 -reject - # IPv6 site-local scoped address prefix (fec0::/10) - # has been deprecated by RFC3879. - # - if [ -n $ip6sitelocal ]; then - warn \$ip6sitelocal is no longer valid - fi + # IPv6 site-local scoped address prefix (fec0::/10) + # has been deprecated by RFC3879. + # + if [ -n $ip6sitelocal ]; then + warn \$ip6sitelocal is no longer valid + fi - # disallow internal addresses to appear on the wire. - # - /sbin/route -q add -inet6 :::0.0.0.0 -prefixlen 96 ::1 -reject + # disallow internal addresses to appear on the wire. + # + /sbin/route -q add -inet6 :::0.0.0.0 -prefixlen 96 ::1 -reject - # disallow packets to malicious IPv4 compatible prefix - # - /sbin/route -q add -inet6 ::224.0.0.0 -prefixlen 100 ::1 -reject - /sbin/route -q add -inet6 ::127.0.0.0 -prefixlen 104 ::1 -reject - /sbin/route -q add -inet6 ::0.0.0.0 -prefixlen 104 ::1 -reject - /sbin/route -q add -inet6 ::255.0.0.0 -prefixlen 104 ::1 -reject + # disallow packets to malicious IPv4 compatible prefix + # + /sbin/route -q add -inet6 ::224.0.0.0 -prefixlen 100 ::1 -reject + /sbin/route -q add -inet6 ::127.0.0.0 -prefixlen 104 ::1 -reject + /sbin/route -q add -inet6 ::0.0.0.0 -prefixlen 104 ::1 -reject + /sbin/route -q add -inet6 ::255.0.0.0 -prefixlen 104 ::1 -reject - # disallow packets to malicious 6to4 prefix - # - /sbin/route -q add -inet6 2002:e000:: -prefixlen 20 ::1 -reject - /sbin/route -q add -inet6 2002:7f00:: -prefixlen 24 ::1 -reject - /sbin/route -q add -inet6 2002::: -prefixlen 24 ::1 -reject - /sbin/route -q add -inet6 2002:ff00:: -prefixlen 24 ::1 -reject - - # Completely disallow packets to IPv4 compatible prefix. - # This may conflict with RFC1933 under following circumstances: - # (1) An IPv6-only KAME node tries to originate packets to IPv4 - # compatible destination. The KAME node has no IPv4 - # compatible support. Under RFC1933, it should transmit - # native IPv6 packets toward IPv4 compatible destination, - # hoping it would reach a router that forwards the packet - # toward auto-tunnel interface. - # (2) An IPv6-only node originates a packet to IPv4 compatible - # destination. A KAME node is acting as an IPv6 router, and - # asked to forward it. - # Due to rare use of IPv4 compatible address, and security - # issues with it, we disable it by default. - # - /sbin/route -q add -inet6 ::0.0.0.0 -prefixlen 96 ::1 -reject + # disallow packets to malicious 6to4 prefix + # + /sbin/route -q add -inet6 2002:e000:: -prefixlen 20 ::1 -reject + /sbin/route -q add -inet6 2002:7f00:: -prefixlen 24 ::1 -reject + /sbin/route -q add -inet6 2002::: -prefixlen 24 ::1 -reject + /sbin/route -q add -inet6 2002:ff00:: -prefixlen 24 ::1 -reject - /sbin/sysctl -qw net.inet6.ip6.forwarding=0 - /sbin/sysctl -qw net.inet6.ip6.accept_rtadv=0 + # Completely disallow packets to IPv4 compatible prefix. + # This may conflict with RFC1933 under following circumstances: + # (1) An IPv6-only KAME node tries to originate packets to IPv4 + # compatible destination. The KAME node has no IPv4 + # compatible support. Under RFC1933, it should transmit + # native IPv6 packets toward IPv4 compatible destination, + # hoping it would reach a router that forwards the packet + # toward auto-tunnel interface. + # (2) An IPv6-only node originates a packet to IPv4 compatible + # destination. A KAME node is acting as an IPv6 router, and + # asked to forward it. + # Due to rare use of IPv4
CVS commit: src/sys/dev/usb
Module Name:src Committed By: nonaka Date: Tue Apr 29 10:55:02 UTC 2014 Modified Files: src/sys/dev/usb: usbdevs Log Message: Added Planex GW-USFang300 entry. To generate a diff of this commit: cvs rdiff -u -r1.667 -r1.668 src/sys/dev/usb/usbdevs 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/usb/usbdevs diff -u src/sys/dev/usb/usbdevs:1.667 src/sys/dev/usb/usbdevs:1.668 --- src/sys/dev/usb/usbdevs:1.667 Sun Apr 6 09:26:11 2014 +++ src/sys/dev/usb/usbdevs Tue Apr 29 10:55:02 2014 @@ -1,4 +1,4 @@ -$NetBSD: usbdevs,v 1.667 2014/04/06 09:26:11 nonaka Exp $ +$NetBSD: usbdevs,v 1.668 2014/04/29 10:55:02 nonaka Exp $ /* * Copyright (c) 1998-2004 The NetBSD Foundation, Inc. @@ -2508,6 +2508,7 @@ product PLANEX GW_US11H 0x14ea GW-US11H product PLANEX2 RTL8188CUS 0x1201 RTL8188CUS product PLANEX2 GW_US11S 0x3220 GW-US11S WLAN product PLANEX2 RTL8188CU_3 0x4902 RTL8188CU +product PLANEX2 GWUSFANG300 0x4903 GW-USFang300 product PLANEX2 GWUS54GXS 0x5303 GW-US54GXS product PLANEX2 GW_US300 0x5304 GW-US300 product PLANEX2 GWUS54HP 0xab01 GW-US54HP
CVS commit: src/sys/dev/usb
Module Name:src Committed By: nonaka Date: Tue Apr 29 10:56:39 UTC 2014 Modified Files: src/sys/dev/usb: usbdevs.h usbdevs_data.h Log Message: regen To generate a diff of this commit: cvs rdiff -u -r1.659 -r1.660 src/sys/dev/usb/usbdevs.h cvs rdiff -u -r1.660 -r1.661 src/sys/dev/usb/usbdevs_data.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/usb/usbdevs.h diff -u src/sys/dev/usb/usbdevs.h:1.659 src/sys/dev/usb/usbdevs.h:1.660 --- src/sys/dev/usb/usbdevs.h:1.659 Sun Apr 6 09:26:33 2014 +++ src/sys/dev/usb/usbdevs.h Tue Apr 29 10:56:38 2014 @@ -1,10 +1,10 @@ -/* $NetBSD: usbdevs.h,v 1.659 2014/04/06 09:26:33 nonaka Exp $ */ +/* $NetBSD: usbdevs.h,v 1.660 2014/04/29 10:56:38 nonaka Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: usbdevs,v 1.667 2014/04/06 09:26:11 nonaka Exp + * NetBSD: usbdevs,v 1.668 2014/04/29 10:55:02 nonaka Exp */ /* @@ -2515,6 +2515,7 @@ #define USB_PRODUCT_PLANEX2_RTL8188CUS 0x1201 /* RTL8188CUS */ #define USB_PRODUCT_PLANEX2_GW_US11S 0x3220 /* GW-US11S WLAN */ #define USB_PRODUCT_PLANEX2_RTL8188CU_3 0x4902 /* RTL8188CU */ +#define USB_PRODUCT_PLANEX2_GWUSFANG300 0x4903 /* GW-USFang300 */ #define USB_PRODUCT_PLANEX2_GWUS54GXS 0x5303 /* GW-US54GXS */ #define USB_PRODUCT_PLANEX2_GW_US300 0x5304 /* GW-US300 */ #define USB_PRODUCT_PLANEX2_GWUS54HP 0xab01 /* GW-US54HP */ Index: src/sys/dev/usb/usbdevs_data.h diff -u src/sys/dev/usb/usbdevs_data.h:1.660 src/sys/dev/usb/usbdevs_data.h:1.661 --- src/sys/dev/usb/usbdevs_data.h:1.660 Sun Apr 6 09:26:33 2014 +++ src/sys/dev/usb/usbdevs_data.h Tue Apr 29 10:56:38 2014 @@ -1,10 +1,10 @@ -/* $NetBSD: usbdevs_data.h,v 1.660 2014/04/06 09:26:33 nonaka Exp $ */ +/* $NetBSD: usbdevs_data.h,v 1.661 2014/04/29 10:56:38 nonaka Exp $ */ /* * THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: usbdevs,v 1.667 2014/04/06 09:26:11 nonaka Exp + * NetBSD: usbdevs,v 1.668 2014/04/29 10:55:02 nonaka Exp */ /* @@ -7691,6 +7691,10 @@ const struct usb_product usb_products[] RTL8188CU, }, { + USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUSFANG300, + GW-USFang300, + }, + { USB_VENDOR_PLANEX2, USB_PRODUCT_PLANEX2_GWUS54GXS, GW-US54GXS, }, @@ -10127,4 +10131,4 @@ const struct usb_product usb_products[] Prestige, }, }; -const int usb_nproducts = 1993; +const int usb_nproducts = 1994;
CVS commit: src/sys/dev/sbus
Module Name:src Committed By: macallan Date: Tue Apr 29 11:16:25 UTC 2014 Modified Files: src/sys/dev/sbus: tcx.c Log Message: return a match score 1 to beat out genfb if present To generate a diff of this commit: cvs rdiff -u -r1.45 -r1.46 src/sys/dev/sbus/tcx.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/sbus/tcx.c diff -u src/sys/dev/sbus/tcx.c:1.45 src/sys/dev/sbus/tcx.c:1.46 --- src/sys/dev/sbus/tcx.c:1.45 Sun Mar 16 05:20:29 2014 +++ src/sys/dev/sbus/tcx.c Tue Apr 29 11:16:25 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: tcx.c,v 1.45 2014/03/16 05:20:29 dholland Exp $ */ +/* $NetBSD: tcx.c,v 1.46 2014/04/29 11:16:25 macallan Exp $ */ /* * Copyright (c) 1996, 1998, 2009 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tcx.c,v 1.45 2014/03/16 05:20:29 dholland Exp $); +__KERNEL_RCSID(0, $NetBSD: tcx.c,v 1.46 2014/04/29 11:16:25 macallan Exp $); /* * define for cg8 emulation on S24 (24-bit version of tcx) for the SS5; @@ -226,7 +226,9 @@ tcxmatch(device_t parent, cfdata_t cf, v { struct sbus_attach_args *sa = aux; - return (strcmp(sa-sa_name, OBPNAME) == 0); + if (strcmp(sa-sa_name, OBPNAME) == 0) + return 100; /* beat genfb */ + return 0; } /*
CVS commit: src
Module Name:src Committed By: uebayasi Date: Tue Apr 29 11:52:51 UTC 2014 Modified Files: src: build.sh Log Message: Revert previous for now; resolvepath() has to work for file paths too. To generate a diff of this commit: cvs rdiff -u -r1.279 -r1.280 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/build.sh diff -u src/build.sh:1.279 src/build.sh:1.280 --- src/build.sh:1.279 Tue Apr 29 06:51:57 2014 +++ src/build.sh Tue Apr 29 11:52:51 2014 @@ -1,5 +1,5 @@ #! /usr/bin/env sh -# $NetBSD: build.sh,v 1.279 2014/04/29 06:51:57 uebayasi Exp $ +# $NetBSD: build.sh,v 1.280 2014/04/29 11:52:51 uebayasi Exp $ # # Copyright (c) 2001-2011 The NetBSD Foundation, Inc. # All rights reserved. @@ -889,7 +889,6 @@ resolvepath() val=${TOP}/${val%/} ;; esac - val=$( /bin/mkdir -p ${val} cd ${val} /bin/pwd ) eval ${var}=\\${val}\ } @@ -1747,7 +1746,7 @@ createmakewrapper() eval cat EOF ${makewrapout} #! ${HOST_SH} # Set proper variables to allow easy make building of a NetBSD subtree. -# Generated from: \$NetBSD: build.sh,v 1.279 2014/04/29 06:51:57 uebayasi Exp $ +# Generated from: \$NetBSD: build.sh,v 1.280 2014/04/29 11:52:51 uebayasi Exp $ # with these arguments: ${_args} #
CVS commit: src/sys/arch
Module Name:src Committed By: reinoud Date: Tue Apr 29 16:47:10 UTC 2014 Modified Files: src/sys/arch/arm/samsung: exynos4_loc.c exynos4_reg.h exynos5_loc.c exynos_io.c exynos_soc.c exynos_var.h files.exynos src/sys/arch/evbarm/conf: ODROID-U Added Files: src/sys/arch/arm/samsung: exynos_dma.c exynos_usb.c Log Message: Commit initial USB adapter support and associated DMA tags To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/samsung/exynos4_loc.c cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/samsung/exynos4_reg.h \ src/sys/arch/arm/samsung/exynos5_loc.c \ src/sys/arch/arm/samsung/exynos_io.c cvs rdiff -u -r0 -r1.1 src/sys/arch/arm/samsung/exynos_dma.c \ src/sys/arch/arm/samsung/exynos_usb.c cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/samsung/exynos_soc.c cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/samsung/exynos_var.h \ src/sys/arch/arm/samsung/files.exynos cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbarm/conf/ODROID-U 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/samsung/exynos4_loc.c diff -u src/sys/arch/arm/samsung/exynos4_loc.c:1.2 src/sys/arch/arm/samsung/exynos4_loc.c:1.3 --- src/sys/arch/arm/samsung/exynos4_loc.c:1.2 Sun Apr 27 20:43:19 2014 +++ src/sys/arch/arm/samsung/exynos4_loc.c Tue Apr 29 16:47:10 2014 @@ -260,8 +260,8 @@ #define IRQ_MDNIE_LCD0_1 EXYNOS_COMBINERIRQ(0, 1) #define IRQ_MDNIE_LCD0_0 EXYNOS_COMBINERIRQ(0, 0) -#define OFFANDSIZE(p,n) EXYNOS4##p##_##n##_OFFSET, 0x1 - +#define OFFANDSIZE(p,n) \ + EXYNOS4##p##_##n##_OFFSET, 0x1 static const struct exyo_locators exynos4_locators[] = { { mct, OFFANDSIZE(,MCT), NOPORT, IRQ_G0_IRQ, 0 }, @@ -270,6 +270,7 @@ static const struct exyo_locators exynos { sscom, OFFANDSIZE(,UART1), 1, IRQ_UART1, 0 }, { sscom, OFFANDSIZE(,UART2), 2, IRQ_UART2, 0 }, { sscom, OFFANDSIZE(,UART3), 3, IRQ_UART3, 0 }, + { exyousb, OFFANDSIZE(,USBHOST0), 0, IRQ_UHOST, 0}, /* ehci+ohci */ }; const struct exyo_locinfo exynos4_locinfo = { Index: src/sys/arch/arm/samsung/exynos4_reg.h diff -u src/sys/arch/arm/samsung/exynos4_reg.h:1.1 src/sys/arch/arm/samsung/exynos4_reg.h:1.2 --- src/sys/arch/arm/samsung/exynos4_reg.h:1.1 Sun Apr 13 02:26:26 2014 +++ src/sys/arch/arm/samsung/exynos4_reg.h Tue Apr 29 16:47:10 2014 @@ -204,8 +204,8 @@ #define EXYNOS4_SDMMC4_OFFSET 0x0255 #define EXYNOS4_MIPI_HSI_OFFSET 0x0256 /* LCD0 */ #define EXYNOS4_SROMC_OFFSET 0x0257 -#define EXYNOS4_USBHOST0_OFFSET 0x0258 /* USB interface 0 */ -#define EXYNOS4_USBHOST1_OFFSET 0x0259 /* USB interface 1 */ +#define EXYNOS4_USBHOST0_OFFSET 0x0258 /* USB EHCI */ +#define EXYNOS4_USBHOST1_OFFSET 0x0259 /* USB OHCI companion to EHCI (paired) */ #define EXYNOS4_USBOTG1_OFFSET 0x025B /* USB On The Go interface */ #define EXYNOS4_PDMA0_OFFSET 0x0268 /* Peripheral DMA */ #define EXYNOS4_PDMA1_OFFSET 0x0269 Index: src/sys/arch/arm/samsung/exynos5_loc.c diff -u src/sys/arch/arm/samsung/exynos5_loc.c:1.1 src/sys/arch/arm/samsung/exynos5_loc.c:1.2 --- src/sys/arch/arm/samsung/exynos5_loc.c:1.1 Sun Apr 13 02:26:26 2014 +++ src/sys/arch/arm/samsung/exynos5_loc.c Tue Apr 29 16:47:10 2014 @@ -209,7 +209,8 @@ #define IRQ_TZASC_CBXR EXYNOS_COMBINERIRQ(0, 0) -#define OFFANDSIZE(p,n) EXYNOS5##p##_##n##_OFFSET, 0x1 +#define OFFANDSIZE(p,n) \ + EXYNOS5##p##_##n##_OFFSET, 0x1 static const struct exyo_locators exynos5_locators[] = { { exywdt, OFFANDSIZE(,WDT), NOPORT, IRQ_WDT, 0 }, Index: src/sys/arch/arm/samsung/exynos_io.c diff -u src/sys/arch/arm/samsung/exynos_io.c:1.1 src/sys/arch/arm/samsung/exynos_io.c:1.2 --- src/sys/arch/arm/samsung/exynos_io.c:1.1 Sun Apr 13 02:26:26 2014 +++ src/sys/arch/arm/samsung/exynos_io.c Tue Apr 29 16:47:10 2014 @@ -34,7 +34,7 @@ #include opt_exynos.h #include sys/cdefs.h -__KERNEL_RCSID(1, $NetBSD: exynos_io.c,v 1.1 2014/04/13 02:26:26 matt Exp $); +__KERNEL_RCSID(1, $NetBSD: exynos_io.c,v 1.2 2014/04/29 16:47:10 reinoud Exp $); #include sys/param.h #include sys/bus.h @@ -58,12 +58,12 @@ static int exyo_match(device_t, cfdata_ static void exyo_attach(device_t, device_t, void *); static struct exyo_softc { - device_t sc_dev; - bus_space_tag_t sc_bst; - bus_space_tag_t sc_a4x_bst; - bus_space_handle_t sc_bsh; - bus_dma_tag_t sc_dmat; - bus_dma_tag_t sc_coherent_dmat; + device_t sc_dev; + bus_space_tag_t sc_bst; + bus_space_tag_t sc_a4x_bst; + bus_space_handle_t sc_bsh; + bus_dma_tag_t sc_dmat; + bus_dma_tag_t sc_coherent_dmat; } exyo_sc; CFATTACH_DECL_NEW(exyo_io, 0, exyo_match, exyo_attach, NULL, NULL); @@ -119,27 +119,29 @@ exyo_find(device_t parent, cfdata_t cf, return config_match(parent, cf, aux); } + +#if !defined(EXYNOS4) !defined(EXYNOS5) +#error Must define a SoC +#endif static void exyo_attach(device_t parent, device_t self, void *aux) { + const struct
CVS commit: src/sys/arch/mips/ralink
Module Name:src Committed By: matt Date: Tue Apr 29 17:09:17 UTC 2014 Modified Files: src/sys/arch/mips/ralink: ralink_reg.h Log Message: More MT7620 definitions To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/ralink/ralink_reg.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/ralink/ralink_reg.h diff -u src/sys/arch/mips/ralink/ralink_reg.h:1.5 src/sys/arch/mips/ralink/ralink_reg.h:1.6 --- src/sys/arch/mips/ralink/ralink_reg.h:1.5 Sat Apr 19 12:48:03 2014 +++ src/sys/arch/mips/ralink/ralink_reg.h Tue Apr 29 17:09:17 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ralink_reg.h,v 1.5 2014/04/19 12:48:03 matt Exp $ */ +/* $NetBSD: ralink_reg.h,v 1.6 2014/04/29 17:09:17 matt Exp $ */ /*- * Copyright (c) 2011 CradlePoint Technology, Inc. * All rights reserved. @@ -33,6 +33,10 @@ #ifndef _RALINK_REG_H_ #define _RALINK_REG_H_ +#ifdef _KERNEL_OPT +#include opt_rasoc.h +#endif + #include mips/cpuregs.h #if defined(RT3050) @@ -103,6 +107,9 @@ #define RA_USB_OTG_BASE 0x101C #if defined(RT3883) || defined(MT7620) #define RA_USB_HOST_BASE 0x101C +#define RA_USB_BLOCK_SIZE 0x1000 +#define RA_USB_EHCI_BASE (RA_USB_HOST_BASE + 0x) +#define RA_USB_OHCI_BASE (RA_USB_EHCI_BASE + RA_USB_BLOCK_SIZE) #endif #if defined(RT3052) || defined(RT3050) #define RA_FLASH_BASE 0x1F00 @@ -164,6 +171,71 @@ #endif #if defined(RT3883) || defined(MT7620) +#define SYSCTL_CFG1_GE2_MODE __BITS(15,14) +#define SYSCTL_CFG1_GE1_MODE __BITS(13,12) +#define GE_MODE_RGMII 0 // RGMII mode (10/100/1000) +#define GE_MODE_MII 1 // MII mode (10/100) +#define GE_MODE_RMII 2 // Reverse MMI (10/100) +#define SYSCTL_CFG1_USB0_HOST_MODE __BIT(10) +#define SYSCTL_CFG1_PCIE_RC_MODE __BIT(8) +#endif +#if defined(RT3883) +#define SYSCTL_CFG1_PCI_HOST_MODE __BIT(7) +#define SYSCTL_CFG1_PCI_66M_MODE __BIT(6) +#endif + +#if defined(RT3883) || defined(MT7620) +#define SYSCTL_CLKCFG0_REFCLK0_RATE __BITS(11,9) +#endif +#if defined(RT3883) +#define SYSCTL_CLKCFG0_OSC_1US_DIV_3883 __BITS(21,16) +#define SYSCTL_CLKCFG0_REFCLK1_RATE __BITS(15,13) +#define SYSCTL_CLKCFG0_REFCLK0_IS_OUT __BIT(8) +#define SYSCTL_CLKCFG0_CPU_FREQ_ADJ __BITS(3,0) +#endif +#if defined(MT7620) +#define SYSCTL_CLKCFG0_OSC_1US_DIV_7620 __BITS(29,24) +#define SYSCTL_CLKCFG0_INT_CLK_FDIV __BITS(22,18) +#define SYSCTL_CLKCFG0_INT_CLK_FFRAC __BITS(16,12) +#define SYSCTL_CLKCFG0_PERI_CLK_SEL __BIT(4) +#define SYSCTL_CLKCFG0_EPHY_USE_25M __BIT(3) +#endif + +#if defined(RT3883) +#define SYSCTL_CLKCFG1_PBUS_DIV2 __BIT(30) +#define SYSCTL_CLKCFG1_SYS_TCK_EN __BIT(29) +#define SYSCTL_CLKCFG1_FE_GDMA_PCLK_EN __BIT(22) +#define SYSCTL_CLKCFG1_PCIE_CLK_EN_3883 __BIT(21) +#define SYSCTL_CLKCFG1_UPHY1_CLK_EN __BIT(20) +#define SYSCTL_CLKCFG1_PCIE_CLK_EN __BIT(19) +#define SYSCTL_CLKCFG1_UPHY0_CLK_EN_3883 __BIT(18) +#define SYSCTL_CLKCFG1_GE2_CLK_EN_3883 __BIT(17) +#define SYSCTL_CLKCFG1_GE1_CLK_EN_3883 __BIT(16) +#endif +#if defined(MT7620) +#define SYSCTL_CLKCFG1_SDHC_CLK_EN __BIT(30) +#define SYSCTL_CLKCFG1_AUX_SYS_TCK_EN __BIT(28) +#define SYSCTL_CLKCFG1_PCIE_CLK_EN_7620 __BIT(26) +#define SYSCTL_CLKCFG1_UPHY0_CLK_EN_7620 __BIT(25) +#define SYSCTL_CLKCFG1_ESW_CLK_EN __BIT(23) +#define SYSCTL_CLKCFG1_FE_CLK_EN __BIT(21) +#define SYSCTL_CLKCFG1_UART_CLK_EN __BIT(19) +#define SYSCTL_CLKCFG1_SPI_CLK_EN __BIT(18) +#define SYSCTL_CLKCFG1_I2S_CLK_EN __BIT(17) +#define SYSCTL_CLKCFG1_I2C_CLK_EN __BIT(16) +#define SYSCTL_CLKCFG1_NAND_CLK_EN __BIT(15) +#define SYSCTL_CLKCFG1_GDMA_CLK_EN __BIT(14) +#define SYSCTL_CLKCFG1_GPIO_CLK_EN __BIT(13) +#define SYSCTL_CLKCFG1_UART_CLK_EN __BIT(12) +#define SYSCTL_CLKCFG1_PCM_CLK_EN __BIT(11) +#define SYSCTL_CLKCFG1_MC_CLK_EN __BIT(10) +#define SYSCTL_CLKCFG1_INTC_CLK_EN __BIT(9) +#define SYSCTL_CLKCFG1_TIMER_CLK_EN __BIT(8) +#define SYSCTL_CLKCFG1_GE2_CLK_EN_7620 __BIT(7) +#define SYSCTL_CLKCFG1_GE1_CLK_EN_7620 __BIT(6) +#endif + +#if defined(RT3883) || defined(MT7620) /* 3883 doesn't have memo regs, use teststat instead */ #define RA_SYSCTL_MEMO0 0x18 #define RA_SYSCTL_MEMO1 0x1C @@ -172,14 +244,19 @@ #define RA_SYSCTL_MEMO1 0x6C #endif -#define RST_PPE __BIT(31) -#define RST_SDHC __BIT(30) -#define RST_MIPS_CNT __BIT(28) -#define RST_PCIE0 __BIT(26) -#define RST_UHST0 __BIT(25) -#define RST_EPHY __BIT(24) -#define RST_SW __BIT(23) -#define RST_OTG __BIT(22) +#define RST_PPE_7620 __BIT(31) +#define RST_SDHC_7620 __BIT(30) +#define RST_MIPS_CNT_7620 __BIT(28) +#define RST_PCIPCIE_3883 __BIT(27) +#define RST_FLASH_3883 __BIT(26) +#define RST_PCIE0_7620 __BIT(26) +#define RST_UDEV_3883 __BIT(25) +#define RST_UHST0_7620 __BIT(25) +#define RST_PCI_3883 __BIT(24) +#define RST_EPHY_7620 __BIT(24) +#define RST_PCIE_3883 __BIT(23) +#define RST_ESW_7620 __BIT(23) +#define RST_UHST_3883 __BIT(22) #define RST_FE __BIT(21) #define RST_WLAN
CVS commit: src/sys/arch/mips/ralink
Module Name:src Committed By: matt Date: Tue Apr 29 17:10:07 UTC 2014 Modified Files: src/sys/arch/mips/ralink: ralink_ehci.c ralink_ohci.c Log Message: Clean these up and move some defines to ralink_reg.h To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/ralink/ralink_ehci.c cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/ralink/ralink_ohci.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/mips/ralink/ralink_ehci.c diff -u src/sys/arch/mips/ralink/ralink_ehci.c:1.3 src/sys/arch/mips/ralink/ralink_ehci.c:1.4 --- src/sys/arch/mips/ralink/ralink_ehci.c:1.3 Fri Jul 20 02:14:02 2012 +++ src/sys/arch/mips/ralink/ralink_ehci.c Tue Apr 29 17:10:07 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ralink_ehci.c,v 1.3 2012/07/20 02:14:02 matt Exp $ */ +/* $NetBSD: ralink_ehci.c,v 1.4 2014/04/29 17:10:07 matt Exp $ */ /*- * Copyright (c) 2011 CradlePoint Technology, Inc. * All rights reserved. @@ -29,7 +29,7 @@ /* ralink_ehci.c -- Ralink EHCI USB Driver */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ralink_ehci.c,v 1.3 2012/07/20 02:14:02 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: ralink_ehci.c,v 1.4 2014/04/29 17:10:07 matt Exp $); #include sys/param.h #include sys/bus.h @@ -47,9 +47,6 @@ __KERNEL_RCSID(0, $NetBSD: ralink_ehci. #include mips/ralink/ralink_var.h #include mips/ralink/ralink_reg.h -#define RT3XXX_EHCI_BASE 0x101c -#define RT3XXX_BLOCK_SIZE 0x1000 - struct ralink_ehci_softc { struct ehci_softc sc_ehci; void *sc_ih; @@ -122,14 +119,14 @@ ralink_ehci_attach(device_t parent, devi bus_space_unmap(ma-ma_memt, sysctl_memh, 0x1); /* Map EHCI registers */ - if ((error = bus_space_map(sc-sc_ehci.iot, RT3XXX_EHCI_BASE, - RT3XXX_BLOCK_SIZE, 0, sc-sc_ehci.ioh)) != 0) { + if ((error = bus_space_map(sc-sc_ehci.iot, RA_USB_EHCI_BASE, + RA_USB_BLOCK_SIZE, 0, sc-sc_ehci.ioh)) != 0) { aprint_error_dev(self, can't map EHCI registers, error=%d\n, error); return; } - sc-sc_ehci.sc_size = RT3XXX_BLOCK_SIZE; + sc-sc_ehci.sc_size = RA_USB_BLOCK_SIZE; sc-sc_ehci.sc_bus.usbrev = USBREV_2_0; #ifdef RALINK_EHCI_DEBUG Index: src/sys/arch/mips/ralink/ralink_ohci.c diff -u src/sys/arch/mips/ralink/ralink_ohci.c:1.2 src/sys/arch/mips/ralink/ralink_ohci.c:1.3 --- src/sys/arch/mips/ralink/ralink_ohci.c:1.2 Thu Jul 28 15:38:49 2011 +++ src/sys/arch/mips/ralink/ralink_ohci.c Tue Apr 29 17:10:07 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ralink_ohci.c,v 1.2 2011/07/28 15:38:49 matt Exp $ */ +/* $NetBSD: ralink_ohci.c,v 1.3 2014/04/29 17:10:07 matt Exp $ */ /*- * Copyright (c) 2011 CradlePoint Technology, Inc. * All rights reserved. @@ -31,7 +31,7 @@ #include ehci.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ralink_ohci.c,v 1.2 2011/07/28 15:38:49 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: ralink_ohci.c,v 1.3 2014/04/29 17:10:07 matt Exp $); #include sys/param.h #include sys/bus.h @@ -51,9 +51,6 @@ __KERNEL_RCSID(0, $NetBSD: ralink_ohci. #define OREAD4(sc, a) bus_space_read_4((sc)-iot, (sc)-ioh, (a)) #define OWRITE4(sc, a, x) bus_space_write_4((sc)-iot, (sc)-ioh, (a), (x)) -#define RT3XXX_OHCI_BASE 0x101c1000 -#define RT3XXX_BLOCK_SIZE 0x1000 - struct ralink_ohci_softc { struct ohci_softc sc_ohci; #if NEHCI 0 @@ -86,7 +83,7 @@ static void ralink_ohci_attach(device_t parent, device_t self, void *aux) { struct ralink_ohci_softc * const sc = device_private(self); - const struct mainbus_attach_args *ma = aux; + const struct mainbus_attach_args * const ma = aux; usbd_status status; int error; #ifdef RALINK_OHCI_DEBUG @@ -102,14 +99,14 @@ ralink_ohci_attach(device_t parent, devi sc-sc_ohci.sc_bus.dmatag = ma-ma_dmat; /* Map I/O registers */ - if ((error = bus_space_map(sc-sc_ohci.iot, RT3XXX_OHCI_BASE, - RT3XXX_BLOCK_SIZE, 0, sc-sc_ohci.ioh)) != 0) { + if ((error = bus_space_map(sc-sc_ohci.iot, RA_USB_OHCI_BASE, + RA_USB_BLOCK_SIZE, 0, sc-sc_ohci.ioh)) != 0) { aprint_error_dev(self, can't map OHCI registers, error=%d\n, error); return; } - sc-sc_ohci.sc_size = RT3XXX_BLOCK_SIZE; + sc-sc_ohci.sc_size = RA_USB_BLOCK_SIZE; #ifdef RALINK_OHCI_DEBUG printf(%s sc: %p ma: %p\n, devname, sc, ma);
CVS commit: src/sys/arch/mips/ralink
Module Name:src Committed By: matt Date: Tue Apr 29 17:21:24 UTC 2014 Added Files: src/sys/arch/mips/ralink: ralink_pci.c Log Message: Stub for PCI/PCIe support for RT3883/MT7620 To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/mips/ralink/ralink_pci.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/mips/ralink/ralink_pci.c diff -u /dev/null src/sys/arch/mips/ralink/ralink_pci.c:1.1 --- /dev/null Tue Apr 29 17:21:24 2014 +++ src/sys/arch/mips/ralink/ralink_pci.c Tue Apr 29 17:21:24 2014 @@ -0,0 +1,71 @@ +/* $NetBSD: ralink_pci.c,v 1.1 2014/04/29 17:21:24 matt Exp $ */ +/*- + * Copyright (c) 2014 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Matt Thomas of 3am Software Foundry. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include opt_pci.h + +#include sys/cdefs.h + +__KERNEL_RCSID(1, $NetBSD: ralink_pci.c,v 1.1 2014/04/29 17:21:24 matt Exp $); + +#include sys/param.h + +#include sys/bus.h +#include sys/device.h + +#include dev/pci/pcireg.h +#include dev/pci/pcivar.h + +struct ralink_pci_softc { + device_t sc_dev; +}; + +static int ralink_pci_match(device_t, cfdata_t, void *); +static void ralink_pci_attach(device_t, device_t, void *); + +CFATTACH_DECL_NEW(ralink_pci, sizeof(struct ralink_pci_softc), +ralink_pci_match, ralink_pci_attach, NULL, NULL); + +static int +ralink_pci_match(device_t parent, cfdata_t cf, void *aux) +{ + return 1; +} + +static void +ralink_pci_attach(device_t parent, device_t self, void *aux) +{ + struct ralink_pci_softc * const sc = device_private(self); + + sc-sc_dev = self; + + aprint_naive(: Ralink PCIe Controller\n); + aprint_normal(: Ralink PCIe Controller\n); +} +
CVS commit: src/sys/arch/evbmips/conf
Module Name:src Committed By: matt Date: Tue Apr 29 17:24:11 UTC 2014 Modified Files: src/sys/arch/evbmips/conf: files.rasoc Log Message: Add opt_rasoc.h To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/evbmips/conf/files.rasoc 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/evbmips/conf/files.rasoc diff -u src/sys/arch/evbmips/conf/files.rasoc:1.2 src/sys/arch/evbmips/conf/files.rasoc:1.3 --- src/sys/arch/evbmips/conf/files.rasoc:1.2 Thu Jul 28 15:50:13 2011 +++ src/sys/arch/evbmips/conf/files.rasoc Tue Apr 29 17:24:11 2014 @@ -1,4 +1,6 @@ -# $NetBSD: files.rasoc,v 1.2 2011/07/28 15:50:13 matt Exp $ +# $NetBSD: files.rasoc,v 1.3 2014/04/29 17:24:11 matt Exp $ + +defflag opt_rasoc.hRT3050 RT3052 RT3883 MT7620 file arch/mips/mips/bus_dma.c file arch/mips/mips/mips3_clock.c
CVS commit: src/sys/arch/hp300/conf
Module Name:src Committed By: tsutsui Date: Tue Apr 29 18:38:27 UTC 2014 Modified Files: src/sys/arch/hp300/conf: INSTALL Log Message: Add pseudo-device wsmux in INSTALL (and RAMDISK) kernels. On NetBSD/hp300, hilkbd(4) is probed in config_interrupts(9) so it's always attached after wsdisplay(4). In that case, wskbd can't be used as a console input device without wsmux(4). (i.e. keyboard didn't work on installer using screen console) Should be pulled up to all netbsd-6* branches. To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/arch/hp300/conf/INSTALL Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/hp300/conf/INSTALL diff -u src/sys/arch/hp300/conf/INSTALL:1.56 src/sys/arch/hp300/conf/INSTALL:1.57 --- src/sys/arch/hp300/conf/INSTALL:1.56 Sat Apr 19 05:37:54 2014 +++ src/sys/arch/hp300/conf/INSTALL Tue Apr 29 18:38:27 2014 @@ -1,4 +1,4 @@ -# $NetBSD: INSTALL,v 1.56 2014/04/19 05:37:54 tsutsui Exp $ +# $NetBSD: INSTALL,v 1.57 2014/04/29 18:38:27 tsutsui Exp $ # # INSTALL machine description file # @@ -248,3 +248,4 @@ pseudo-device loop # loopback network #pseudo-device stf # 6to4 IPv6 over IPv4 encapsulation #pseudo-device vlan # IEEE 802.1q encapsulation #pseudo-device bridge # simple inter-network bridging +pseudo-device wsmux # mouse keyboard multiplexor
CVS commit: src/sys/arch/hp300/conf
Module Name:src Committed By: tsutsui Date: Tue Apr 29 18:47:22 UTC 2014 Modified Files: src/sys/arch/hp300/conf: RAMDISK Log Message: Disable options NVNODE, NBUF and BUFPAGES in the RAMDISK kernel. These options were specified in the INSTALL kernel for 4MB machines, but nowadays even the INSTALL kernel would not boot on such machines and the RAMDISK kernel assumes the target machine has more memories. Furthermore, these options makes extracting binary sets much slower and also could cause wapbl_register_deallocation: out of resources panic during extracting binaries into a 32GB SSD with 4KB fragments. Should be pulled up to netbsd-6* branches. To generate a diff of this commit: cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hp300/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/hp300/conf/RAMDISK diff -u src/sys/arch/hp300/conf/RAMDISK:1.13 src/sys/arch/hp300/conf/RAMDISK:1.14 --- src/sys/arch/hp300/conf/RAMDISK:1.13 Tue Nov 23 11:13:58 2010 +++ src/sys/arch/hp300/conf/RAMDISK Tue Apr 29 18:47:22 2014 @@ -1,4 +1,4 @@ -# $NetBSD: RAMDISK,v 1.13 2010/11/23 11:13:58 hannken Exp $ +# $NetBSD: RAMDISK,v 1.14 2014/04/29 18:47:22 tsutsui Exp $ # # RAMDISK machine description file # @@ -7,6 +7,11 @@ include arch/hp300/conf/INSTALL +# These options for small RAM machines makes extracting binaries much slower. +no options NVNODE +no options NBUF +no options BUFPAGES + # Enable the hooks used for initializing the root memory-disk. options MEMORY_DISK_HOOKS options MEMORY_DISK_IS_ROOT # force root on memory disk
CVS commit: src/crypto/external/bsd/heimdal/include
Module Name:src Committed By: pettai Date: Tue Apr 29 23:18:53 UTC 2014 Modified Files: src/crypto/external/bsd/heimdal/include: config.h Log Message: update VERSION To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/crypto/external/bsd/heimdal/include/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/crypto/external/bsd/heimdal/include/config.h diff -u src/crypto/external/bsd/heimdal/include/config.h:1.5 src/crypto/external/bsd/heimdal/include/config.h:1.6 --- src/crypto/external/bsd/heimdal/include/config.h:1.5 Thu Apr 24 13:50:53 2014 +++ src/crypto/external/bsd/heimdal/include/config.h Tue Apr 29 23:18:53 2014 @@ -1532,7 +1532,7 @@ static /**/const char *const rcsid[] = { /* #undef TM_IN_SYS_TIME */ /* Version number of package */ -#define VERSION 1.5pre1 +#define VERSION 1.5.3 /* Define if signal handlers return void. */ #define VOID_RETSIGTYPE 1
CVS commit: src/sys/arch/sparc64/sparc64
Module Name:src Committed By: mrg Date: Wed Apr 30 00:09:29 UTC 2014 Modified Files: src/sys/arch/sparc64/sparc64: clock.c Log Message: avoid divide by zero when setting 'hz' low. To generate a diff of this commit: cvs rdiff -u -r1.114 -r1.115 src/sys/arch/sparc64/sparc64/clock.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/sparc64/sparc64/clock.c diff -u src/sys/arch/sparc64/sparc64/clock.c:1.114 src/sys/arch/sparc64/sparc64/clock.c:1.115 --- src/sys/arch/sparc64/sparc64/clock.c:1.114 Sat Dec 7 11:17:25 2013 +++ src/sys/arch/sparc64/sparc64/clock.c Wed Apr 30 00:09:29 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: clock.c,v 1.114 2013/12/07 11:17:25 nakayama Exp $ */ +/* $NetBSD: clock.c,v 1.115 2014/04/30 00:09:29 mrg Exp $ */ /* * Copyright (c) 1992, 1993 @@ -55,7 +55,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.114 2013/12/07 11:17:25 nakayama Exp $); +__KERNEL_RCSID(0, $NetBSD: clock.c,v 1.115 2014/04/30 00:09:29 mrg Exp $); #include opt_multiprocessor.h @@ -556,7 +556,10 @@ cpu_initclocks(void) * Establish scheduler softint. */ schedint = sparc_softintr_establish(PIL_SCHED, schedintr, NULL); - schedhz = 16; /* 16Hz is best according to kern/kern_clock.c */ + if (stathz 60) + schedhz = 16; /* 16Hz is best according to kern/kern_clock.c */ + else + schedhz = stathz / 2 + 1; statscheddiv = stathz / schedhz; if (statscheddiv = 0) panic(statscheddiv);
CVS commit: src/sys/arch/mips/ralink
Module Name:src Committed By: matt Date: Wed Apr 30 00:51:01 UTC 2014 Modified Files: src/sys/arch/mips/ralink: ralink_bus.c ralink_var.h Log Message: Add a static bus_space_handle_t for the core (sysctl) registers. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/ralink/ralink_bus.c cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/ralink/ralink_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/mips/ralink/ralink_bus.c diff -u src/sys/arch/mips/ralink/ralink_bus.c:1.2 src/sys/arch/mips/ralink/ralink_bus.c:1.3 --- src/sys/arch/mips/ralink/ralink_bus.c:1.2 Thu Jul 28 15:38:49 2011 +++ src/sys/arch/mips/ralink/ralink_bus.c Wed Apr 30 00:51:01 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ralink_bus.c,v 1.2 2011/07/28 15:38:49 matt Exp $ */ +/* $NetBSD: ralink_bus.c,v 1.3 2014/04/30 00:51:01 matt Exp $ */ /*- * Copyright (c) 2011 CradlePoint Technology, Inc. * All rights reserved. @@ -69,7 +69,7 @@ #include locators.h #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ralink_bus.c,v 1.2 2011/07/28 15:38:49 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: ralink_bus.c,v 1.3 2014/04/30 00:51:01 matt Exp $); #define _MIPS_BUS_DMA_PRIVATE #include sys/param.h @@ -91,10 +91,18 @@ struct mips_bus_dma_tag ra_bus_dmat = { ._dmatag_ops = _BUS_DMATAG_OPS_INITIALIZER, }; +const bus_space_handle_t ra_sysctl_bsh = +(bus_space_handle_t) RA_IOREG_VADDR(RA_SYSCTL_BASE, 0); + void ra_bus_init(void) { ra_bus_bus_mem_init(ra_bus_memt, NULL); +#ifdef DIAGNOSTIC + bus_space_handle_t bsh = 0xdeadfa11; + bus_space_map(ra_bus_memt, RA_SYSCTL_BASE, 0x100, 0, bsh); + KASSERT(ra_sysctl_bsh == bsh); +#endif } /* Index: src/sys/arch/mips/ralink/ralink_var.h diff -u src/sys/arch/mips/ralink/ralink_var.h:1.5 src/sys/arch/mips/ralink/ralink_var.h:1.6 --- src/sys/arch/mips/ralink/ralink_var.h:1.5 Wed Feb 1 02:05:14 2012 +++ src/sys/arch/mips/ralink/ralink_var.h Wed Apr 30 00:51:01 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ralink_var.h,v 1.5 2012/02/01 02:05:14 matt Exp $ */ +/* $NetBSD: ralink_var.h,v 1.6 2014/04/30 00:51:01 matt Exp $ */ /*- * Copyright (c) 2011 CradlePoint Technology, Inc. * All rights reserved. @@ -41,8 +41,9 @@ extern int ra_spiflash_read(void *, vad extern void ra_gpio_toggle_LED(void *); -extern struct mips_bus_space ra_bus_memt; -extern struct mips_bus_dma_tag ra_bus_dmat; +extern struct mips_bus_space ra_bus_memt; +extern struct mips_bus_dma_tag ra_bus_dmat; +extern const bus_space_handle_t ra_sysctl_bsh; struct mainbus_attach_args { const char *ma_name;
CVS commit: src/sys/arch/mips/ralink
Module Name:src Committed By: matt Date: Wed Apr 30 00:51:26 UTC 2014 Modified Files: src/sys/arch/mips/ralink: ralink_com.c Log Message: comment a #endif To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/ralink/ralink_com.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/mips/ralink/ralink_com.c diff -u src/sys/arch/mips/ralink/ralink_com.c:1.3 src/sys/arch/mips/ralink/ralink_com.c:1.4 --- src/sys/arch/mips/ralink/ralink_com.c:1.3 Wed Feb 1 02:05:14 2012 +++ src/sys/arch/mips/ralink/ralink_com.c Wed Apr 30 00:51:26 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ralink_com.c,v 1.3 2012/02/01 02:05:14 matt Exp $ */ +/* $NetBSD: ralink_com.c,v 1.4 2014/04/30 00:51:26 matt Exp $ */ /*- * Copyright (c) 2011 CradlePoint Technology, Inc. * All rights reserved. @@ -130,7 +130,7 @@ /* ralink_com.c -- Ralink 3052 uart console driver */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ralink_com.c,v 1.3 2012/02/01 02:05:14 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: ralink_com.c,v 1.4 2014/04/30 00:51:26 matt Exp $); #include sys/param.h #include sys/bus.h @@ -232,7 +232,7 @@ ralink_console_early(void) { cn_tab = ralink_earlycons; } -#endif +#endif /* RALINK_CONSOLE_EARLY */ int
CVS commit: src/sys/arch/mips/ralink
Module Name:src Committed By: matt Date: Wed Apr 30 00:52:49 UTC 2014 Modified Files: src/sys/arch/mips/ralink: ralink_mainbus.c Log Message: Instead of mainbus0 (root): Ralink System Bus be more explicit about the system: mainbus0 (root): Mediatek MT7620 System Bus To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/ralink/ralink_mainbus.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/mips/ralink/ralink_mainbus.c diff -u src/sys/arch/mips/ralink/ralink_mainbus.c:1.3 src/sys/arch/mips/ralink/ralink_mainbus.c:1.4 --- src/sys/arch/mips/ralink/ralink_mainbus.c:1.3 Wed Mar 26 17:42:00 2014 +++ src/sys/arch/mips/ralink/ralink_mainbus.c Wed Apr 30 00:52:49 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ralink_mainbus.c,v 1.3 2014/03/26 17:42:00 christos Exp $ */ +/* $NetBSD: ralink_mainbus.c,v 1.4 2014/04/30 00:52:49 matt Exp $ */ /*- * Copyright (c) 2011 CradlePoint Technology, Inc. * All rights reserved. @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ralink_mainbus.c,v 1.3 2014/03/26 17:42:00 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: ralink_mainbus.c,v 1.4 2014/04/30 00:52:49 matt Exp $); #include sys/param.h #include sys/systm.h @@ -86,16 +86,33 @@ mainbus_attach(device_t parent, device_t { mainbus_softc_t * const sc = device_private(self); struct mainbus_attach_args ma; + union { + char buf[9]; + uint32_t id[2]; + } xid; mainbus_found = true; - aprint_naive(: Ralink System Bus\n); - aprint_normal(: Ralink System Bus\n); - sc-sc_dev = self; + sc-sc_memt = ra_bus_memt; + sc-sc_dmat = ra_bus_dmat; + + xid.id[0] = bus_space_read_4(sc-sc_memt, ra_sysctl_bsh, RA_SYSCTL_ID0); + xid.id[1] = bus_space_read_4(sc-sc_memt, ra_sysctl_bsh, RA_SYSCTL_ID1); + xid.buf[8] = '\0'; + if (xid.buf[6] == ' ') { + xid.buf[6] = '\0'; + } else if (xid.buf[7] == ' ') { + xid.buf[7] = '\0'; + } + const char * const manuf = xid.buf[0] == 'M' ? Mediatek : Ralink; + + aprint_naive(: %s %s System Bus\n, manuf, xid.buf); + aprint_normal(: %s %s System Bus\n, manuf, xid.buf); + ma.ma_name = NULL; - ma.ma_memt = sc-sc_memt = ra_bus_memt; - ma.ma_dmat = sc-sc_dmat = ra_bus_dmat; + ma.ma_memt = sc-sc_memt; + ma.ma_dmat = sc-sc_dmat; /* attach critical devices */ mainbus_attach_critical(sc);
CVS commit: src/sys/arch/mips/ralink
Module Name:src Committed By: matt Date: Wed Apr 30 00:53:31 UTC 2014 Modified Files: src/sys/arch/mips/ralink: ralink_reg.h Log Message: Fix a few more register definitions. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/ralink/ralink_reg.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/ralink/ralink_reg.h diff -u src/sys/arch/mips/ralink/ralink_reg.h:1.6 src/sys/arch/mips/ralink/ralink_reg.h:1.7 --- src/sys/arch/mips/ralink/ralink_reg.h:1.6 Tue Apr 29 17:09:17 2014 +++ src/sys/arch/mips/ralink/ralink_reg.h Wed Apr 30 00:53:31 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ralink_reg.h,v 1.6 2014/04/29 17:09:17 matt Exp $ */ +/* $NetBSD: ralink_reg.h,v 1.7 2014/04/30 00:53:31 matt Exp $ */ /*- * Copyright (c) 2011 CradlePoint Technology, Inc. * All rights reserved. @@ -55,6 +55,10 @@ #endif #define RA_BUS_FREQ 16600 /* DDR speed */ #define RA_UART_FREQ 4000 +#elif defined(MT7620) +#define RA_CLOCK_RATE 58000 +#define RA_BUS_FREQ (RA_CLOCK_RATE / 3) +#define RA_UART_FREQ 4000 #else /* Ralink dev board */ #define RA_CLOCK_RATE 38400 @@ -114,7 +118,7 @@ #if defined(RT3052) || defined(RT3050) #define RA_FLASH_BASE 0x1F00 #define RA_FLASH_END 0x1F7F -#elif defined(RT3883) +#elif defined(RT3883) || defined(MT7620) #define RA_FLASH_BASE 0x1C00 #define RA_FLASH_END 0x1DFF #endif @@ -207,7 +211,7 @@ #define SYSCTL_CLKCFG1_FE_GDMA_PCLK_EN __BIT(22) #define SYSCTL_CLKCFG1_PCIE_CLK_EN_3883 __BIT(21) #define SYSCTL_CLKCFG1_UPHY1_CLK_EN __BIT(20) -#define SYSCTL_CLKCFG1_PCIE_CLK_EN __BIT(19) +#define SYSCTL_CLKCFG1_PCI_CLK_EN __BIT(19) #define SYSCTL_CLKCFG1_UPHY0_CLK_EN_3883 __BIT(18) #define SYSCTL_CLKCFG1_GE2_CLK_EN_3883 __BIT(17) #define SYSCTL_CLKCFG1_GE1_CLK_EN_3883 __BIT(16) @@ -219,7 +223,7 @@ #define SYSCTL_CLKCFG1_UPHY0_CLK_EN_7620 __BIT(25) #define SYSCTL_CLKCFG1_ESW_CLK_EN __BIT(23) #define SYSCTL_CLKCFG1_FE_CLK_EN __BIT(21) -#define SYSCTL_CLKCFG1_UART_CLK_EN __BIT(19) +#define SYSCTL_CLKCFG1_UARTL_CLK_EN __BIT(19) #define SYSCTL_CLKCFG1_SPI_CLK_EN __BIT(18) #define SYSCTL_CLKCFG1_I2S_CLK_EN __BIT(17) #define SYSCTL_CLKCFG1_I2C_CLK_EN __BIT(16) @@ -256,7 +260,7 @@ #define RST_EPHY_7620 __BIT(24) #define RST_PCIE_3883 __BIT(23) #define RST_ESW_7620 __BIT(23) -#define RST_UHST_3883 __BIT(22) +#define RST_UHST __BIT(22) #define RST_FE __BIT(21) #define RST_WLAN __BIT(20) #define RST_UARTL __BIT(19)
CVS commit: src/sys/arch/mips/ralink
Module Name:src Committed By: matt Date: Wed Apr 30 00:54:47 UTC 2014 Modified Files: src/sys/arch/mips/ralink: ralink_ehci.c Log Message: Remove cfg1 manip, moved elsewhere. Use aprintf_normal_dev for some debug printfs To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/ralink/ralink_ehci.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/mips/ralink/ralink_ehci.c diff -u src/sys/arch/mips/ralink/ralink_ehci.c:1.4 src/sys/arch/mips/ralink/ralink_ehci.c:1.5 --- src/sys/arch/mips/ralink/ralink_ehci.c:1.4 Tue Apr 29 17:10:07 2014 +++ src/sys/arch/mips/ralink/ralink_ehci.c Wed Apr 30 00:54:47 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: ralink_ehci.c,v 1.4 2014/04/29 17:10:07 matt Exp $ */ +/* $NetBSD: ralink_ehci.c,v 1.5 2014/04/30 00:54:47 matt Exp $ */ /*- * Copyright (c) 2011 CradlePoint Technology, Inc. * All rights reserved. @@ -29,7 +29,7 @@ /* ralink_ehci.c -- Ralink EHCI USB Driver */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: ralink_ehci.c,v 1.4 2014/04/29 17:10:07 matt Exp $); +__KERNEL_RCSID(0, $NetBSD: ralink_ehci.c,v 1.5 2014/04/30 00:54:47 matt Exp $); #include sys/param.h #include sys/bus.h @@ -86,13 +86,8 @@ ralink_ehci_attach(device_t parent, devi struct ralink_ehci_softc * const sc = device_private(self); const struct mainbus_attach_args *ma = aux; struct ralink_usb_hc *ruh; - uint32_t r; - bus_space_handle_t sysctl_memh; usbd_status status; int error; -#ifdef RALINK_EHCI_DEBUG - const char *const devname = device_xname(self); -#endif aprint_naive(: EHCI USB controller\n); aprint_normal(: EHCI USB controller\n); @@ -102,22 +97,6 @@ ralink_ehci_attach(device_t parent, devi sc-sc_ehci.iot = ma-ma_memt; sc-sc_ehci.sc_bus.dmatag = ma-ma_dmat; - /* Map Sysctl registers */ - if (((error = bus_space_map(ma-ma_memt, RA_SYSCTL_BASE, 0x1, - 0, sysctl_memh) != 0)) != 0) { - aprint_error_dev(self, can't map Sysctl registers, - error=%d\n, error); - return; - } - - /* The USB block defaults PHY0 to device mode, change to host mode */ - r = bus_space_read_4(ma-ma_memt, sysctl_memh, RA_SYSCTL_CFG1); - r |= (1 10); - bus_space_write_4(ma-ma_memt, sysctl_memh, RA_SYSCTL_CFG1, r); - - /* done with Sysctl regs */ - bus_space_unmap(ma-ma_memt, sysctl_memh, 0x1); - /* Map EHCI registers */ if ((error = bus_space_map(sc-sc_ehci.iot, RA_USB_EHCI_BASE, RA_USB_BLOCK_SIZE, 0, sc-sc_ehci.ioh)) != 0) { @@ -129,16 +108,16 @@ ralink_ehci_attach(device_t parent, devi sc-sc_ehci.sc_size = RA_USB_BLOCK_SIZE; sc-sc_ehci.sc_bus.usbrev = USBREV_2_0; -#ifdef RALINK_EHCI_DEBUG - printf(%s sc: %p ma: %p\n, devname, sc, ma); - printf(%s memt: %p dmat: %p\n, devname, ma-ma_memt, ma-ma_dmat); - printf(%s: EHCI HCCAPBASE=0x%x\n, devname, +#if defined(RALINK_EHCI_DEBUG) + aprint_normal_dev(self, sc %p ma %p\n, sc, ma); + aprint_normal_dev(self, memt %p dmat %p\n, ma-ma_memt, ma-ma_dmat); + aprint_normal_dev(self, EHCI HCCAPBASE=%#x\n, EREAD4(sc-sc_ehci, EHCI_CAPLENGTH)); - printf(%s: EHCI HCSPARAMS=0x%x\n, devname, + aprint_normal_dev(self, EHCI HCSPARAMS=%#x\n, EREAD4(sc-sc_ehci, EHCI_HCSPARAMS)); - printf(%s: EHCI HCCPARAMS=0x%x\n, devname, + aprint_normal_dev(self, EHCI HCCPARAMS=%#x\n, EREAD4(sc-sc_ehci, EHCI_HCCPARAMS)); - printf(%s: EHCI HCSP_PORTROUTE=0x%x\n, devname, + aprint_normal_dev(self, EHCI HCSP_PORTROUTE=%#x\n, EREAD4(sc-sc_ehci, EHCI_HCSP_PORTROUTE)); #endif @@ -146,12 +125,10 @@ ralink_ehci_attach(device_t parent, devi sc-sc_ehci.sc_offs = EREAD1(sc-sc_ehci, EHCI_CAPLENGTH); EOWRITE4(sc-sc_ehci, EHCI_USBINTR, 0); -#ifdef RALINK_EHCI_DEBUG - printf(%s: EHCI USBCMD=0x%x\n, devname, - EOREAD4(sc-sc_ehci, EHCI_USBCMD)); - printf(%s: EHCI USBSTS=0x%x\n, devname, - EOREAD4(sc-sc_ehci, EHCI_USBSTS)); - printf(%s: EHCI USBINTR=0x%x\n, devname, +#if defined(RALINK_EHCI_DEBUG) + aprint_normal_dev(self, EHCI USBCMD=%#x USBSTS=%#x USBINTR=%#x\n, + EOREAD4(sc-sc_ehci, EHCI_USBCMD), + EOREAD4(sc-sc_ehci, EHCI_USBSTS), EOREAD4(sc-sc_ehci, EHCI_USBINTR)); #endif
CVS commit: src/sys/arch/evbmips/conf
Module Name:src Committed By: matt Date: Wed Apr 30 00:58:54 UTC 2014 Modified Files: src/sys/arch/evbmips/conf: CPMBR1400 std.rasoc Log Message: Localize the bsentry ubootimage kludge needed for the CPMBR1400 doesn't spread beyong the CPMBR1400. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbmips/conf/CPMBR1400 cvs rdiff -u -r1.3 -r1.4 src/sys/arch/evbmips/conf/std.rasoc 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/evbmips/conf/CPMBR1400 diff -u src/sys/arch/evbmips/conf/CPMBR1400:1.15 src/sys/arch/evbmips/conf/CPMBR1400:1.16 --- src/sys/arch/evbmips/conf/CPMBR1400:1.15 Mon Mar 24 14:15:37 2014 +++ src/sys/arch/evbmips/conf/CPMBR1400 Wed Apr 30 00:58:54 2014 @@ -2,12 +2,14 @@ include arch/evbmips/conf/std.rasoc options SYMTAB_SPACE=45 # size for embedded symbol table -#options RA_CONSOLE_EARLY +#options RALINK_CONSOLE_EARLY options RT3883 #options SLICKROCK options RALINK_ETH_NUM_SW_PARTITIONS=5 options CONSPEED=57600 #options SYSCALL_DEBUG +no makeoptions NEED_UBOOTIMAGE +makeoptions NEED_UBOOTIMAGE=bsentry maxusers 8 Index: src/sys/arch/evbmips/conf/std.rasoc diff -u src/sys/arch/evbmips/conf/std.rasoc:1.3 src/sys/arch/evbmips/conf/std.rasoc:1.4 --- src/sys/arch/evbmips/conf/std.rasoc:1.3 Tue Aug 16 07:01:37 2011 +++ src/sys/arch/evbmips/conf/std.rasoc Wed Apr 30 00:58:54 2014 @@ -1,4 +1,4 @@ -# $NetBSD: std.rasoc,v 1.3 2011/08/16 07:01:37 matt Exp $ +# $NetBSD: std.rasoc,v 1.4 2014/04/30 00:58:54 matt Exp $ machine evbmips mips include conf/std # MI standard options @@ -15,6 +15,6 @@ options EXEC_SCRIPT # exec #! scripts makeoptions CPUFLAGS+=-march=mips32r2 makeoptions DEFTEXTADDR=0x8001 makeoptions NEED_BINARY=yes -makeoptions NEED_UBOOTIMAGE=bsentry +makeoptions NEED_UBOOTIMAGE=yes include arch/evbmips/conf/files.rasoc
CVS commit: src/sys/arch/evbmips/conf
Module Name:src Committed By: matt Date: Wed Apr 30 01:01:04 UTC 2014 Added Files: src/sys/arch/evbmips/conf: INSTALL_ZYXELKX ZYXELKX Log Message: Add configs for the Zyxel Keenetic Extra. To generate a diff of this commit: cvs rdiff -u -r0 -r1.1 src/sys/arch/evbmips/conf/INSTALL_ZYXELKX \ src/sys/arch/evbmips/conf/ZYXELKX Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Added files: Index: src/sys/arch/evbmips/conf/INSTALL_ZYXELKX diff -u /dev/null src/sys/arch/evbmips/conf/INSTALL_ZYXELKX:1.1 --- /dev/null Wed Apr 30 01:01:04 2014 +++ src/sys/arch/evbmips/conf/INSTALL_ZYXELKX Wed Apr 30 01:01:04 2014 @@ -0,0 +1,24 @@ +# $NetBSD: INSTALL_ZYXELKX,v 1.1 2014/04/30 01:01:04 matt Exp $ + +include arch/evbmips/conf/ZYXELKX + +#ident INSTALL_ZYXELKX-$Revision: 1.1 $ + +# Enable the hooks used for initializing the root memory-disk. +# The ramdisk size must be kept in sync manually with the size of +# the `ramdisk' image (which is built in distrib/evbmips/ramdisk/ramdisk). +pseudo-device md# memory disk device +options MEMORY_DISK_HOOKS +options MEMORY_DISK_IS_ROOT # force root on memory disk +options MEMORY_DISK_SERVER=0 # no userspace memory disk +options MEMORY_DISK_ROOT_SIZE=12288 # size of memory disk, in blocks + +#options UVMHIST +#options UVMHIST_PRINT +makeoptions DEBUG=-g +makeoptions NEED_MDSETIMAGE=yes +#makeoptions NEED_UBOOTIMAGE=yes +no config netbsd-sd0a +no config netbsd-reth0 + +no options VMSWAP Index: src/sys/arch/evbmips/conf/ZYXELKX diff -u /dev/null src/sys/arch/evbmips/conf/ZYXELKX:1.1 --- /dev/null Wed Apr 30 01:01:04 2014 +++ src/sys/arch/evbmips/conf/ZYXELKX Wed Apr 30 01:01:04 2014 @@ -0,0 +1,246 @@ +include arch/evbmips/conf/std.rasoc + +options SYMTAB_SPACE=45 # size for embedded symbol table + +options RALINK_CONSOLE_EARLY +options MT7620 +options RALINK_ETH_NUM_SW_PARTITIONS=5 +options CONSPEED=57600 + +maxusers 8 + +# Size reduction options +#options VNODE_OP_NOINLINE +#options PIPE_SOCKETPAIR # smaller, but slower pipe(2) +#options SOSEND_NO_LOAN + +# Standard system options + +options INSECURE # disable kernel security levels - X needs this + +options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT +options NTP # NTP phase/frequency locked loop + +#options KTRACE # system call tracing via ktrace(1) + +#options SYSVMSG # System V-like message queues +#options SYSVSEM # System V-like semaphores +#options SYSVSHM # System V-like memory sharing +#options SHMMAXPGS=2048 # 2048 pages is the default + +#options NMBCLUSTERS=1024 +#options MCLSHIFT=12 # 4k mbuf clusters (increases pool max's to 4k as well) + +#options USERCONF # userconf(4) support +#options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel + +# Diagnostic/debugging support options +options DIAGNOSTIC # expensive kernel consistency checks +#options LOCKDEBUG +#options KSTACK_CHECK_MAGIC +options DEBUG # expensive debugging checks/support +options KMEMSTATS # kernel memory statistics (vmstat -m) +options DDB # in-kernel debugger +options DDB_ONPANIC=1 # see also sysctl(7): `ddb.onpanic' +#options DDB_HISTORY_SIZE=512 # enable history editing in DDB +#options DDB_COMMANDONENTER=w/b 0x9128 0 ; bt # disable watchdog drop history on enter +#options KGDB # remote debugger +#options KGDB_DEVNAME=\com\,KGDB_DEVADDR=0x2f8,KGDB_DEVRATE=9600 +#makeoptions DEBUG=-g2 # compile full symbol table +#makeoptions COPTS=-Os # Optimise for space. + +#makeoptions PROF=-p # build profiling in +#options GPROF + +# Compatibility options +#options COMPAT_NOMID # NetBSD 0.8, 386BSD, and BSDI +#options COMPAT_09 # NetBSD 0.9 +#options COMPAT_10 # NetBSD 1.0 +#options COMPAT_11 # NetBSD 1.1 +#options COMPAT_12 # NetBSD 1.2, 386BSD, and BSDI +#options COMPAT_13 # NetBSD 1.3, 386BSD, and BSDI +#options COMPAT_14 # NetBSD 1.4 +#options COMPAT_15 # NetBSD 1.5 +#options COMPAT_16 # NetBSD 1.6 +#options COMPAT_20 # NetBSD 2.0 +#options COMPAT_30 # NetBSD 3.0 compatibility. +#options COMPAT_40 # NetBSD 4.0 +options COMPAT_50 # NetBSD 5.0 compatibility. +options COMPAT_60 # NetBSD 6.0 compatibility. +#options COMPAT_43 # 4.3BSD, 386BSD, and BSDI +#options COMPAT_386BSD_MBRPART # recognize old partition ID +#options TCP_COMPAT_42 # 4.2BSD TCP/IP bug compat. Not recommended. + +#options COMPAT_SVR4 # binary compatibility with SVR4 +#options COMPAT_IBCS2 # binary compatibility with SCO and ISC +#options COMPAT_LINUX # binary compatibility with Linux +#options COMPAT_FREEBSD # binary compatibility with FreeBSD +#options COMPAT_BSDPTY # /dev/[pt]ty?? ptys. + +# File systems +file-system FFS # UFS +#file-system EXT2FS # second extended file system (linux) +#file-system LFS # log-structured file system +file-system MFS # memory file system +file-system NFS # Network File System client +#file-system CD9660 # ISO 9660 + Rock Ridge file
CVS commit: src/sys/arch/evbmips/rasoc
Module Name:src Committed By: matt Date: Wed Apr 30 01:01:47 UTC 2014 Modified Files: src/sys/arch/evbmips/rasoc: machdep.c Log Message: Add some MT7620 support. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbmips/rasoc/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/evbmips/rasoc/machdep.c diff -u src/sys/arch/evbmips/rasoc/machdep.c:1.9 src/sys/arch/evbmips/rasoc/machdep.c:1.10 --- src/sys/arch/evbmips/rasoc/machdep.c:1.9 Mon Mar 24 20:06:32 2014 +++ src/sys/arch/evbmips/rasoc/machdep.c Wed Apr 30 01:01:47 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.9 2014/03/24 20:06:32 christos Exp $ */ +/* $NetBSD: machdep.c,v 1.10 2014/04/30 01:01:47 matt Exp $ */ /*- * Copyright (c) 2011 CradlePoint Technology, Inc. @@ -28,7 +28,7 @@ */ #include sys/cdefs.h /* RCS ID Copyright macro defns */ -__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.9 2014/03/24 20:06:32 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.10 2014/04/30 01:01:47 matt Exp $); #include sys/param.h #include sys/boot_flag.h @@ -121,6 +121,13 @@ mach_init(void) tmp2 = sysctl_read(RA_SYSCTL_ID1); memcpy(id2, tmp2, sizeof(tmp2)); id2[4] = id1[4] = '\0'; + if (id2[2] == ' ') { + id2[2] = '\0'; + } else if (id2[3] == ' ') { + id2[3] = '\0'; + } else { + id2[4] = '\0'; + } cpu_setmodel(%s%s, id1, id2); /* @@ -155,6 +162,9 @@ mach_init(void) /* * Determine the memory size. */ +#if defined(MT7620) + memsize = 128 20; +#else memsize = *(volatile uint32_t *) MIPS_PHYS_TO_KSEG1(RA_SYSCTL_BASE + RA_SYSCTL_CFG0); memsize = __SHIFTOUT(memsize, SYSCTL_CFG0_DRAM_SIZE); @@ -163,6 +173,7 @@ mach_init(void) } else { memsize = 4 (20 + memsize); } +#endif physmem = btoc(memsize); @@ -321,7 +332,9 @@ ra_check_memo_reg(int key) case SERIAL_CONSOLE: magic = sysctl_read(RA_SYSCTL_MEMO1); - if (((SERIAL_MAGIC magic) != 0) || ((keyvalue 2) != 0)) { + if (magic == 0 + || (SERIAL_MAGIC magic) != 0 + || (keyvalue 2) != 0) { keyvalue |= 2; return 1; }
CVS commit: src/sys/arch/evbmips/rasoc
Module Name:src Committed By: matt Date: Wed Apr 30 01:02:40 UTC 2014 Modified Files: src/sys/arch/evbmips/rasoc: autoconf.c Log Message: Add common support for bringing devices out of reset or enabling their clocks to device_register. Add code to switch USB to host mode. To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/sys/arch/evbmips/rasoc/autoconf.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/evbmips/rasoc/autoconf.c diff -u src/sys/arch/evbmips/rasoc/autoconf.c:1.4 src/sys/arch/evbmips/rasoc/autoconf.c:1.5 --- src/sys/arch/evbmips/rasoc/autoconf.c:1.4 Sat Oct 27 17:17:51 2012 +++ src/sys/arch/evbmips/rasoc/autoconf.c Wed Apr 30 01:02:40 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.4 2012/10/27 17:17:51 chs Exp $ */ +/* $NetBSD: autoconf.c,v 1.5 2014/04/30 01:02:40 matt Exp $ */ /*- * Copyright (c) 2011 CradlePoint Technology, Inc. * All rights reserved. @@ -27,7 +27,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.4 2012/10/27 17:17:51 chs Exp $); +__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.5 2014/04/30 01:02:40 matt Exp $); #include sys/param.h #include sys/bus.h @@ -35,6 +35,9 @@ __KERNEL_RCSID(0, $NetBSD: autoconf.c,v #include sys/device.h #include sys/systm.h +#include mips/ralink/ralink_reg.h +#include mips/ralink/ralink_var.h + /* * Configure all devices on system */ @@ -61,8 +64,76 @@ cpu_rootconf(void) rootconf(); } +static const struct cfg_info { + const char *map_name; + uint32_t map_rst; + uint32_t map_clkcfg1; +} map_info[] = { +#if defined(MT7620) + { rpci, RST_PCIE0_7620, SYSCTL_CLKCFG1_PCIE_CLK_EN_7620 }, + { ohci, RST_UHST0_7620|RST_UHST, SYSCTL_CLKCFG1_UPHY0_CLK_EN_7620 }, + { ehci, RST_UHST0_7620|RST_UHST, SYSCTL_CLKCFG1_UPHY0_CLK_EN_7620 }, + { sdhc, RST_SDHC_7620, SYSCTL_CLKCFG1_SDHC_CLK_EN }, + { rsw, RST_ESW_7620, SYSCTL_CLKCFG1_ESW_CLK_EN }, +#endif +#if defined(RT3883) + { rpci, RST_PCI_3883 | RST_PCIPCIE_3883, + SYSCTL_CLKCFG1_PCI_CLK_EN|SYSCTL_CLKCFG1_PCIE_CLK_EN_3883 }, + { ohci, RST_UHST, SYSCTL_CLKCFG1_UPHY0_CLK_EN_3883 }, + { ehci, RST_UHST, SYSCTL_CLKCFG1_UPHY0_CLK_EN_3883 }, +#endif +}; + +static void +ra_device_fixup(bus_space_tag_t bst, const struct cfg_info *map) +{ + const uint32_t clkcfg1 = bus_space_read_4(bst, ra_sysctl_bsh, + RA_SYSCTL_CLKCFG1); + if ((clkcfg1 map-map_clkcfg1) != map-map_clkcfg1) { + bus_space_write_4(bst, ra_sysctl_bsh, RA_SYSCTL_CLKCFG1, + clkcfg1 | map-map_clkcfg1); + delay(1); + } + + const uint32_t rst = bus_space_read_4(bst, ra_sysctl_bsh, + RA_SYSCTL_RST); + if ((rst map-map_rst) != 0) { + bus_space_write_4(bst, ra_sysctl_bsh, RA_SYSCTL_RST, + rst ~map-map_rst); + delay(1); + } +} + void -device_register(device_t dev, void *aux) +device_register(device_t self, void *aux) { - /* TBD */ + device_t parent = device_parent(self); + + if (parent != NULL device_is_a(parent, mainbus)) { + // If we are attaching a mainbus device, see if we know how + // to bring it out of reset. + struct mainbus_attach_args * const ma = aux; + for (const struct cfg_info *map = map_info; + map map_info + __arraycount(map_info); + map++) { + if (device_is_a(self, map-map_name)) { +ra_device_fixup(ma-ma_memt, map); +delay(1000); +break; + } + } + +#if defined(RT3883) || defined(MT7620) + if (device_is_a(self, ohci) || device_is_a(self, ehci)) { + const uint32_t cfg1 = bus_space_read_4(ma-ma_memt, + ra_sysctl_bsh, RA_SYSCTL_CFG1); + if ((cfg1 SYSCTL_CFG1_USB0_HOST_MODE) == 0) { +bus_space_write_4(ma-ma_memt, ra_sysctl_bsh, +RA_SYSCTL_CFG1, +cfg1 | SYSCTL_CFG1_USB0_HOST_MODE); +delay(10); + } + } +#endif + } }
CVS commit: src/sbin/mount_tmpfs
Module Name:src Committed By: christos Date: Wed Apr 30 01:33:11 UTC 2014 Modified Files: src/sbin/mount_tmpfs: mount_tmpfs.c Log Message: allow update To generate a diff of this commit: cvs rdiff -u -r1.27 -r1.28 src/sbin/mount_tmpfs/mount_tmpfs.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/mount_tmpfs/mount_tmpfs.c diff -u src/sbin/mount_tmpfs/mount_tmpfs.c:1.27 src/sbin/mount_tmpfs/mount_tmpfs.c:1.28 --- src/sbin/mount_tmpfs/mount_tmpfs.c:1.27 Wed Dec 4 10:10:11 2013 +++ src/sbin/mount_tmpfs/mount_tmpfs.c Tue Apr 29 21:33:11 2014 @@ -1,5 +1,5 @@ -/* $NetBSD: mount_tmpfs.c,v 1.27 2013/12/04 15:10:11 martin Exp $ */ +/* $NetBSD: mount_tmpfs.c,v 1.28 2014/04/30 01:33:11 christos Exp $ */ /* * Copyright (c) 2005, 2006 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #include sys/cdefs.h #ifndef lint -__RCSID($NetBSD: mount_tmpfs.c,v 1.27 2013/12/04 15:10:11 martin Exp $); +__RCSID($NetBSD: mount_tmpfs.c,v 1.28 2014/04/30 01:33:11 christos Exp $); #endif /* not lint */ #include sys/param.h @@ -60,6 +60,7 @@ __RCSID($NetBSD: mount_tmpfs.c,v 1.27 2 /* - */ static const struct mntopt mopts[] = { + MOPT_UPDATE, MOPT_STDOPTS, MOPT_GETARGS, MOPT_NULL,
CVS commit: src/sys/fs/tmpfs
Module Name:src Committed By: christos Date: Wed Apr 30 01:33:51 UTC 2014 Modified Files: src/sys/fs/tmpfs: tmpfs.h tmpfs_mem.c tmpfs_vfsops.c Log Message: handle MNT_UPDATE To generate a diff of this commit: cvs rdiff -u -r1.48 -r1.49 src/sys/fs/tmpfs/tmpfs.h cvs rdiff -u -r1.4 -r1.5 src/sys/fs/tmpfs/tmpfs_mem.c cvs rdiff -u -r1.59 -r1.60 src/sys/fs/tmpfs/tmpfs_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/tmpfs/tmpfs.h diff -u src/sys/fs/tmpfs/tmpfs.h:1.48 src/sys/fs/tmpfs/tmpfs.h:1.49 --- src/sys/fs/tmpfs/tmpfs.h:1.48 Sat Nov 23 11:35:32 2013 +++ src/sys/fs/tmpfs/tmpfs.h Tue Apr 29 21:33:51 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: tmpfs.h,v 1.48 2013/11/23 16:35:32 rmind Exp $ */ +/* $NetBSD: tmpfs.h,v 1.49 2014/04/30 01:33:51 christos Exp $ */ /* * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -279,6 +279,7 @@ void tmpfs_update(vnode_t *, unsigned); void tmpfs_mntmem_init(tmpfs_mount_t *, uint64_t); void tmpfs_mntmem_destroy(tmpfs_mount_t *); +int tmpfs_mntmem_set(tmpfs_mount_t *, uint64_t); size_t tmpfs_mem_info(bool); uint64_t tmpfs_bytes_max(tmpfs_mount_t *); Index: src/sys/fs/tmpfs/tmpfs_mem.c diff -u src/sys/fs/tmpfs/tmpfs_mem.c:1.4 src/sys/fs/tmpfs/tmpfs_mem.c:1.5 --- src/sys/fs/tmpfs/tmpfs_mem.c:1.4 Mon May 23 21:09:47 2011 +++ src/sys/fs/tmpfs/tmpfs_mem.c Tue Apr 29 21:33:51 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: tmpfs_mem.c,v 1.4 2011/05/24 01:09:47 rmind Exp $ */ +/* $NetBSD: tmpfs_mem.c,v 1.5 2014/04/30 01:33:51 christos Exp $ */ /* * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tmpfs_mem.c,v 1.4 2011/05/24 01:09:47 rmind Exp $); +__KERNEL_RCSID(0, $NetBSD: tmpfs_mem.c,v 1.5 2014/04/30 01:33:51 christos Exp $); #include sys/param.h #include sys/atomic.h @@ -65,6 +65,24 @@ tmpfs_mntmem_destroy(struct tmpfs_mount mutex_destroy(mp-tm_acc_lock); } +int +tmpfs_mntmem_set(struct tmpfs_mount *mp, uint64_t memlimit) +{ + int error; + + mutex_enter(mp-tm_acc_lock); + if (round_page(mp-tm_bytes_used) = memlimit) + error = EBUSY; + else { + error = 0; + mp-tm_mem_limit = memlimit; + } + mutex_exit(mp-tm_acc_lock); + return error; +} + + + /* * tmpfs_mem_info: return the number of available memory pages. * Index: src/sys/fs/tmpfs/tmpfs_vfsops.c diff -u src/sys/fs/tmpfs/tmpfs_vfsops.c:1.59 src/sys/fs/tmpfs/tmpfs_vfsops.c:1.60 --- src/sys/fs/tmpfs/tmpfs_vfsops.c:1.59 Wed Apr 16 14:55:19 2014 +++ src/sys/fs/tmpfs/tmpfs_vfsops.c Tue Apr 29 21:33:51 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: tmpfs_vfsops.c,v 1.59 2014/04/16 18:55:19 maxv Exp $ */ +/* $NetBSD: tmpfs_vfsops.c,v 1.60 2014/04/30 01:33:51 christos Exp $ */ /* * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tmpfs_vfsops.c,v 1.59 2014/04/16 18:55:19 maxv Exp $); +__KERNEL_RCSID(0, $NetBSD: tmpfs_vfsops.c,v 1.60 2014/04/30 01:33:51 christos Exp $); #include sys/param.h #include sys/types.h @@ -130,10 +130,6 @@ tmpfs_mount(struct mount *mp, const char return 0; } - if (mp-mnt_flag MNT_UPDATE) { - /* TODO */ - return EOPNOTSUPP; - } /* Prohibit mounts if there is not enough memory. */ if (tmpfs_mem_info(true) TMPFS_PAGES_RESERVED) @@ -155,6 +151,20 @@ tmpfs_mount(struct mount *mp, const char nodes = MIN(nodes, INT_MAX); KASSERT(nodes = 3); + if (mp-mnt_flag MNT_UPDATE) { + tmp = VFS_TO_TMPFS(mp); + if (nodes tmp-tm_nodes_cnt) + return EBUSY; + if ((error = tmpfs_mntmem_set(tmp, memlimit)) != 0) + return error; + tmp-tm_nodes_max = nodes; + root = tmp-tm_rooto + root-tn_uid = args-ta_root_uid; + root-tn_gid = args-ta_root_gid; + root-tn_mode = args-ta_root_mode; + return 0; + } + /* Allocate the tmpfs mount structure and fill it. */ tmp = kmem_zalloc(sizeof(tmpfs_mount_t), KM_SLEEP); if (tmp == NULL)
CVS commit: src/sys/fs/tmpfs
Module Name:src Committed By: christos Date: Wed Apr 30 01:59:30 UTC 2014 Modified Files: src/sys/fs/tmpfs: tmpfs_vfsops.c Log Message: fix typo To generate a diff of this commit: cvs rdiff -u -r1.60 -r1.61 src/sys/fs/tmpfs/tmpfs_vfsops.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/fs/tmpfs/tmpfs_vfsops.c diff -u src/sys/fs/tmpfs/tmpfs_vfsops.c:1.60 src/sys/fs/tmpfs/tmpfs_vfsops.c:1.61 --- src/sys/fs/tmpfs/tmpfs_vfsops.c:1.60 Tue Apr 29 21:33:51 2014 +++ src/sys/fs/tmpfs/tmpfs_vfsops.c Tue Apr 29 21:59:30 2014 @@ -1,4 +1,4 @@ -/* $NetBSD: tmpfs_vfsops.c,v 1.60 2014/04/30 01:33:51 christos Exp $ */ +/* $NetBSD: tmpfs_vfsops.c,v 1.61 2014/04/30 01:59:30 christos Exp $ */ /* * Copyright (c) 2005, 2006, 2007 The NetBSD Foundation, Inc. @@ -42,7 +42,7 @@ */ #include sys/cdefs.h -__KERNEL_RCSID(0, $NetBSD: tmpfs_vfsops.c,v 1.60 2014/04/30 01:33:51 christos Exp $); +__KERNEL_RCSID(0, $NetBSD: tmpfs_vfsops.c,v 1.61 2014/04/30 01:59:30 christos Exp $); #include sys/param.h #include sys/types.h @@ -158,7 +158,7 @@ tmpfs_mount(struct mount *mp, const char if ((error = tmpfs_mntmem_set(tmp, memlimit)) != 0) return error; tmp-tm_nodes_max = nodes; - root = tmp-tm_rooto + root = tmp-tm_root; root-tn_uid = args-ta_root_uid; root-tn_gid = args-ta_root_gid; root-tn_mode = args-ta_root_mode;
CVS commit: src/external/gpl3/gcc/dist/gcc/config/arm
Module Name:src Committed By: dogcow Date: Wed Apr 30 02:04:11 UTC 2014 Modified Files: src/external/gpl3/gcc/dist/gcc/config/arm: arm.h Log Message: fix munged patch: xcompilation on linux/non-arm systems - netbsd/arm works again. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/external/gpl3/gcc/dist/gcc/config/arm/arm.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc/dist/gcc/config/arm/arm.h diff -u src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.6 src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.7 --- src/external/gpl3/gcc/dist/gcc/config/arm/arm.h:1.6 Mon Mar 3 03:28:55 2014 +++ src/external/gpl3/gcc/dist/gcc/config/arm/arm.h Wed Apr 30 02:04:11 2014 @@ -2319,7 +2319,7 @@ extern int making_const_table; /* -mcpu=native handling only makes sense with compiler running on an ARM chip. */ -#if defined(__linux__) +#if defined(__arm__) defined(__linux__) extern const char *host_detect_local_cpu (int argc, const char **argv); # define EXTRA_SPEC_FUNCTIONS \ { local_cpu_detect, host_detect_local_cpu },
CVS commit: [netbsd-6] src/doc
Module Name:src Committed By: msaitoh Date: Wed Apr 30 05:38:32 UTC 2014 Modified Files: src/doc [netbsd-6]: CHANGES-6.2 Log Message: Add missing newlines. To generate a diff of this commit: cvs rdiff -u -r1.1.2.107 -r1.1.2.108 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.107 src/doc/CHANGES-6.2:1.1.2.108 --- src/doc/CHANGES-6.2:1.1.2.107 Tue Apr 22 03:28:56 2014 +++ src/doc/CHANGES-6.2 Wed Apr 30 05:38:31 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-6.2,v 1.1.2.107 2014/04/22 03:28:56 msaitoh Exp $ +# $NetBSD: CHANGES-6.2,v 1.1.2.108 2014/04/30 05:38:31 msaitoh Exp $ A complete list of changes from the 6.1 release until the 6.2 release: @@ -242,6 +242,7 @@ usr.sbin/installboot/arch/vax.c 1.16-1 Don't include host's disklabel.h. Fixes cross compile error on some environment. [martin, ticket #865] + sys/netinet6/ip6_flow.c1.21 Clear mbuf's csum_flags in ip6flow_fastforward(). Fixes PR#47849. @@ -2079,6 +2080,7 @@ distrib/sets/lists/comp/shl.mi patch Update openssl to 1.0.1g. It includes CVE-2014-0076 and CVE-2014-0160. [spz, ticket #1044] + crypto/external/bsd/openssl/pkgconfig.mk 1.5 Run the mkpc script using ${HOST_SH}. Fixes build when @@ -2123,6 +2125,7 @@ crypto/external/bsd/heimdal/dist/lib/rok Fix file descriptor leak in Heimdal. Fixes PR#48718 reported by Juergen Hannken-Illjes. [hannken, ticket #1047] + sys/kern/kern_exec.c1.403 via patch Avoid use-after-free on failure.
CVS commit: [netbsd-5] src/doc
Module Name:src Committed By: msaitoh Date: Wed Apr 30 05:41:30 UTC 2014 Modified Files: src/doc [netbsd-5]: CHANGES-5.3 Log Message: Add missing newlines. To generate a diff of this commit: cvs rdiff -u -r1.1.2.51 -r1.1.2.52 src/doc/CHANGES-5.3 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-5.3 diff -u src/doc/CHANGES-5.3:1.1.2.51 src/doc/CHANGES-5.3:1.1.2.52 --- src/doc/CHANGES-5.3:1.1.2.51 Fri Apr 25 15:50:39 2014 +++ src/doc/CHANGES-5.3 Wed Apr 30 05:41:30 2014 @@ -1,4 +1,4 @@ -# $NetBSD: CHANGES-5.3,v 1.1.2.51 2014/04/25 15:50:39 sborrill Exp $ +# $NetBSD: CHANGES-5.3,v 1.1.2.52 2014/04/30 05:41:30 msaitoh Exp $ A complete list of changes from the NetBSD 5.2 release to the NetBSD 5.3 release: @@ -338,6 +338,7 @@ usr.sbin/installboot/arch/vax.c 1.14-1 (booting via VMB.EXE). Don't include host's disklabel.h. [martin, ticket #1856] + sys/arch/x86/include/mtrr.h 1.5 sys/arch/x86/include/specialreg.h 1.55 sys/arch/x86/x86/mtrr_i686.c 1.25 @@ -461,6 +462,7 @@ usr.bin/mklocale/mklocaledb.c 1.3 Swap order of _CITRUS_LC_MONETARY_SYM_INT_N_CS_PRECEDES and _CITRUS_LC_MONETARY_SYM_INT_P_SEP_BY_SPACE to match data files. [joerg, ticket #1869] + sys/dev/pci/if_wm.c 1.246-1.247, 1.249-1.258 via patch sys/dev/pci/if_wmreg.h 1.51, 1.53 via patch sys/dev/pci/if_wmvar.h 1.15-1.16 via patch