CVS commit: src/tools/gcc

2015-10-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Oct 16 00:41:08 UTC 2015

Modified Files:
src/tools/gcc: gcc-version.mk

Log Message:
bump for printf/syslog format changres


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/tools/gcc/gcc-version.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tools/gcc/gcc-version.mk
diff -u src/tools/gcc/gcc-version.mk:1.3 src/tools/gcc/gcc-version.mk:1.4
--- src/tools/gcc/gcc-version.mk:1.3	Thu Jan 15 03:42:14 2015
+++ src/tools/gcc/gcc-version.mk	Thu Oct 15 20:41:07 2015
@@ -1,5 +1,5 @@
-#	$NetBSD: gcc-version.mk,v 1.3 2015/01/15 08:42:14 skrll Exp $
+#	$NetBSD: gcc-version.mk,v 1.4 2015/10/16 00:41:07 christos Exp $
 
 # common location for tools and native build
 
-NETBSD_GCC_VERSION=nb2 20150115
+NETBSD_GCC_VERSION=nb3 20151015



CVS commit: [netbsd-7] src/doc

2015-10-15 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Oct 15 20:35:50 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
992


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.2 -r1.1.2.3 src/doc/CHANGES-7.1

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.1
diff -u src/doc/CHANGES-7.1:1.1.2.2 src/doc/CHANGES-7.1:1.1.2.3
--- src/doc/CHANGES-7.1:1.1.2.2	Thu Oct 15 20:28:37 2015
+++ src/doc/CHANGES-7.1	Thu Oct 15 20:35:49 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.2 2015/10/15 20:28:37 snj Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.3 2015/10/15 20:35:49 snj Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -15,3 +15,11 @@ sys/dev/bluetooth/btmagic.c			1.12, 1.14
 	Add support for Apple Magic Trackpad.
 	[bouyer, ticket #869]
 
+distrib/amd64/ramdisks/common/Makefile.ramdisk	1.11
+distrib/amd64/ramdisks/common/list.ramdisk	1.20
+distrib/i386/ramdisks/common/Makefile.ramdisk	1.12
+distrib/i386/ramdisks/common/list.ramdisk	1.26
+
+	PR install/50311: missing gptmbr.bin on ramdisk based installs.
+	[martin, ticket #992]
+



CVS commit: [netbsd-7-0] src/doc

2015-10-15 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Oct 15 20:35:28 UTC 2015

Modified Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
992


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/doc/CHANGES-7.0.1

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.1
diff -u src/doc/CHANGES-7.0.1:1.1.2.1 src/doc/CHANGES-7.0.1:1.1.2.2
--- src/doc/CHANGES-7.0.1:1.1.2.1	Thu Oct 15 20:11:33 2015
+++ src/doc/CHANGES-7.0.1	Thu Oct 15 20:35:28 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.1,v 1.1.2.1 2015/10/15 20:11:33 snj Exp $
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.2 2015/10/15 20:35:28 snj Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
 release:
@@ -9,3 +9,11 @@ sys/sys/param.h	patched by hand
 	Welcome to 7.0.0_PATCH.
 	[snj]
 
+distrib/amd64/ramdisks/common/Makefile.ramdisk	1.11
+distrib/amd64/ramdisks/common/list.ramdisk	1.20
+distrib/i386/ramdisks/common/Makefile.ramdisk	1.12
+distrib/i386/ramdisks/common/list.ramdisk	1.26
+
+	PR install/50311: missing gptmbr.bin on ramdisk based installs.
+	[martin, ticket #992]
+



CVS commit: [netbsd-7-0] src/distrib

2015-10-15 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Oct 15 20:31:51 UTC 2015

Modified Files:
src/distrib/amd64/ramdisks/common [netbsd-7-0]: Makefile.ramdisk
list.ramdisk
src/distrib/i386/ramdisks/common [netbsd-7-0]: Makefile.ramdisk
list.ramdisk

Log Message:
Pull up following revision(s) (requested by martin in ticket #992):
distrib/amd64/ramdisks/common/Makefile.ramdisk: revision 1.11
distrib/amd64/ramdisks/common/list.ramdisk: revision 1.20
distrib/i386/ramdisks/common/Makefile.ramdisk: revision 1.12
distrib/i386/ramdisks/common/list.ramdisk: revision 1.26
PR install/50311: missing gptmbr.bin on ramdisk based installs.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.12.1 \
src/distrib/amd64/ramdisks/common/Makefile.ramdisk
cvs rdiff -u -r1.19 -r1.19.4.1 src/distrib/amd64/ramdisks/common/list.ramdisk
cvs rdiff -u -r1.11 -r1.11.12.1 \
src/distrib/i386/ramdisks/common/Makefile.ramdisk
cvs rdiff -u -r1.25 -r1.25.4.1 src/distrib/i386/ramdisks/common/list.ramdisk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/amd64/ramdisks/common/Makefile.ramdisk
diff -u src/distrib/amd64/ramdisks/common/Makefile.ramdisk:1.10 src/distrib/amd64/ramdisks/common/Makefile.ramdisk:1.10.12.1
--- src/distrib/amd64/ramdisks/common/Makefile.ramdisk:1.10	Tue Oct 16 08:23:20 2012
+++ src/distrib/amd64/ramdisks/common/Makefile.ramdisk	Thu Oct 15 20:31:50 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.ramdisk,v 1.10 2012/10/16 08:23:20 apb Exp $
+#	$NetBSD: Makefile.ramdisk,v 1.10.12.1 2015/10/15 20:31:50 snj Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -25,6 +25,7 @@ IMAGEDEPENDS+= 	${CRUNCHBIN} \
 		${DESTDIR}/usr/mdec/mbr \
 		${DESTDIR}/usr/mdec/mbr_ext \
 		${DESTDIR}/usr/mdec/mbr_bootsel \
+		${DESTDIR}/usr/mdec/gptmbr.bin \
 		${NETBSDSRCDIR}/etc/group ${NETBSDSRCDIR}/etc/master.passwd \
 		${NETBSDSRCDIR}/etc/netconfig ${DISTRIBDIR}/common/protocols \
 		${DISTRIBDIR}/common/services

Index: src/distrib/amd64/ramdisks/common/list.ramdisk
diff -u src/distrib/amd64/ramdisks/common/list.ramdisk:1.19 src/distrib/amd64/ramdisks/common/list.ramdisk:1.19.4.1
--- src/distrib/amd64/ramdisks/common/list.ramdisk:1.19	Sun Aug 10 20:07:41 2014
+++ src/distrib/amd64/ramdisks/common/list.ramdisk	Thu Oct 15 20:31:50 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: list.ramdisk,v 1.19 2014/08/10 20:07:41 riz Exp $
+#	$NetBSD: list.ramdisk,v 1.19.4.1 2015/10/15 20:31:50 snj Exp $
 
 SRCDIRS	external/bsd/less/bin
 SRCDIRS	bin sbin usr.bin usr.sbin libexec
@@ -83,6 +83,7 @@ COPY	${DESTDIR}/usr/mdec/bootxx_lfsv2	us
 COPY	${DESTDIR}/usr/mdec/mbr			usr/mdec/mbr
 COPY	${DESTDIR}/usr/mdec/mbr_ext		usr/mdec/mbr_ext
 COPY	${DESTDIR}/usr/mdec/mbr_bootsel		usr/mdec/mbr_bootsel
+COPY	${DESTDIR}/usr/mdec/gptmbr.bin		usr/mdec/gptmbr.bin
 
 # and the boot script
 COPY	${CURDIR}/../common/dot.profile		.profile

Index: src/distrib/i386/ramdisks/common/Makefile.ramdisk
diff -u src/distrib/i386/ramdisks/common/Makefile.ramdisk:1.11 src/distrib/i386/ramdisks/common/Makefile.ramdisk:1.11.12.1
--- src/distrib/i386/ramdisks/common/Makefile.ramdisk:1.11	Tue Oct 16 08:23:21 2012
+++ src/distrib/i386/ramdisks/common/Makefile.ramdisk	Thu Oct 15 20:31:51 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.ramdisk,v 1.11 2012/10/16 08:23:21 apb Exp $
+#	$NetBSD: Makefile.ramdisk,v 1.11.12.1 2015/10/15 20:31:51 snj Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -24,6 +24,7 @@ IMAGEDEPENDS+= 	${CRUNCHBIN} \
 		${DESTDIR}/usr/mdec/mbr \
 		${DESTDIR}/usr/mdec/mbr_ext \
 		${DESTDIR}/usr/mdec/mbr_bootsel \
+		${DESTDIR}/usr/mdec/gptmbr.bin \
 		${NETBSDSRCDIR}/etc/group ${NETBSDSRCDIR}/etc/master.passwd \
 		${NETBSDSRCDIR}/etc/netconfig ${DISTRIBDIR}/common/protocols \
 		${DISTRIBDIR}/common/services

Index: src/distrib/i386/ramdisks/common/list.ramdisk
diff -u src/distrib/i386/ramdisks/common/list.ramdisk:1.25 src/distrib/i386/ramdisks/common/list.ramdisk:1.25.4.1
--- src/distrib/i386/ramdisks/common/list.ramdisk:1.25	Sun Aug 10 20:07:41 2014
+++ src/distrib/i386/ramdisks/common/list.ramdisk	Thu Oct 15 20:31:51 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: list.ramdisk,v 1.25 2014/08/10 20:07:41 riz Exp $
+#	$NetBSD: list.ramdisk,v 1.25.4.1 2015/10/15 20:31:51 snj Exp $
 
 SRCDIRS	external/bsd/less/bin
 SRCDIRS	bin sbin usr.bin usr.sbin libexec
@@ -83,6 +83,7 @@ COPY	${DESTDIR}/usr/mdec/bootxx_lfsv2	us
 COPY	${DESTDIR}/usr/mdec/mbr			usr/mdec/mbr
 COPY	${DESTDIR}/usr/mdec/mbr_ext		usr/mdec/mbr_ext
 COPY	${DESTDIR}/usr/mdec/mbr_bootsel		usr/mdec/mbr_bootsel
+COPY	${DESTDIR}/usr/mdec/gptmbr.bin		usr/mdec/gptmbr.bin
 
 # and the boot script
 COPY	${CURDIR}/../common/dot.profile		.profile



CVS commit: [netbsd-7] src/distrib

2015-10-15 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Oct 15 20:30:57 UTC 2015

Modified Files:
src/distrib/amd64/ramdisks/common [netbsd-7]: Makefile.ramdisk
list.ramdisk
src/distrib/i386/ramdisks/common [netbsd-7]: Makefile.ramdisk
list.ramdisk

Log Message:
Pull up following revision(s) (requested by martin in ticket #992):
distrib/amd64/ramdisks/common/Makefile.ramdisk: revision 1.11
distrib/amd64/ramdisks/common/list.ramdisk: revision 1.20
distrib/i386/ramdisks/common/Makefile.ramdisk: revision 1.12
distrib/i386/ramdisks/common/list.ramdisk: revision 1.26
PR install/50311: missing gptmbr.bin on ramdisk based installs.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.10.10.1 \
src/distrib/amd64/ramdisks/common/Makefile.ramdisk
cvs rdiff -u -r1.19 -r1.19.2.1 src/distrib/amd64/ramdisks/common/list.ramdisk
cvs rdiff -u -r1.11 -r1.11.10.1 \
src/distrib/i386/ramdisks/common/Makefile.ramdisk
cvs rdiff -u -r1.25 -r1.25.2.1 src/distrib/i386/ramdisks/common/list.ramdisk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/amd64/ramdisks/common/Makefile.ramdisk
diff -u src/distrib/amd64/ramdisks/common/Makefile.ramdisk:1.10 src/distrib/amd64/ramdisks/common/Makefile.ramdisk:1.10.10.1
--- src/distrib/amd64/ramdisks/common/Makefile.ramdisk:1.10	Tue Oct 16 08:23:20 2012
+++ src/distrib/amd64/ramdisks/common/Makefile.ramdisk	Thu Oct 15 20:30:57 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.ramdisk,v 1.10 2012/10/16 08:23:20 apb Exp $
+#	$NetBSD: Makefile.ramdisk,v 1.10.10.1 2015/10/15 20:30:57 snj Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -25,6 +25,7 @@ IMAGEDEPENDS+= 	${CRUNCHBIN} \
 		${DESTDIR}/usr/mdec/mbr \
 		${DESTDIR}/usr/mdec/mbr_ext \
 		${DESTDIR}/usr/mdec/mbr_bootsel \
+		${DESTDIR}/usr/mdec/gptmbr.bin \
 		${NETBSDSRCDIR}/etc/group ${NETBSDSRCDIR}/etc/master.passwd \
 		${NETBSDSRCDIR}/etc/netconfig ${DISTRIBDIR}/common/protocols \
 		${DISTRIBDIR}/common/services

Index: src/distrib/amd64/ramdisks/common/list.ramdisk
diff -u src/distrib/amd64/ramdisks/common/list.ramdisk:1.19 src/distrib/amd64/ramdisks/common/list.ramdisk:1.19.2.1
--- src/distrib/amd64/ramdisks/common/list.ramdisk:1.19	Sun Aug 10 20:07:41 2014
+++ src/distrib/amd64/ramdisks/common/list.ramdisk	Thu Oct 15 20:30:57 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: list.ramdisk,v 1.19 2014/08/10 20:07:41 riz Exp $
+#	$NetBSD: list.ramdisk,v 1.19.2.1 2015/10/15 20:30:57 snj Exp $
 
 SRCDIRS	external/bsd/less/bin
 SRCDIRS	bin sbin usr.bin usr.sbin libexec
@@ -83,6 +83,7 @@ COPY	${DESTDIR}/usr/mdec/bootxx_lfsv2	us
 COPY	${DESTDIR}/usr/mdec/mbr			usr/mdec/mbr
 COPY	${DESTDIR}/usr/mdec/mbr_ext		usr/mdec/mbr_ext
 COPY	${DESTDIR}/usr/mdec/mbr_bootsel		usr/mdec/mbr_bootsel
+COPY	${DESTDIR}/usr/mdec/gptmbr.bin		usr/mdec/gptmbr.bin
 
 # and the boot script
 COPY	${CURDIR}/../common/dot.profile		.profile

Index: src/distrib/i386/ramdisks/common/Makefile.ramdisk
diff -u src/distrib/i386/ramdisks/common/Makefile.ramdisk:1.11 src/distrib/i386/ramdisks/common/Makefile.ramdisk:1.11.10.1
--- src/distrib/i386/ramdisks/common/Makefile.ramdisk:1.11	Tue Oct 16 08:23:21 2012
+++ src/distrib/i386/ramdisks/common/Makefile.ramdisk	Thu Oct 15 20:30:57 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.ramdisk,v 1.11 2012/10/16 08:23:21 apb Exp $
+#	$NetBSD: Makefile.ramdisk,v 1.11.10.1 2015/10/15 20:30:57 snj Exp $
 
 .include 
 .include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
@@ -24,6 +24,7 @@ IMAGEDEPENDS+= 	${CRUNCHBIN} \
 		${DESTDIR}/usr/mdec/mbr \
 		${DESTDIR}/usr/mdec/mbr_ext \
 		${DESTDIR}/usr/mdec/mbr_bootsel \
+		${DESTDIR}/usr/mdec/gptmbr.bin \
 		${NETBSDSRCDIR}/etc/group ${NETBSDSRCDIR}/etc/master.passwd \
 		${NETBSDSRCDIR}/etc/netconfig ${DISTRIBDIR}/common/protocols \
 		${DISTRIBDIR}/common/services

Index: src/distrib/i386/ramdisks/common/list.ramdisk
diff -u src/distrib/i386/ramdisks/common/list.ramdisk:1.25 src/distrib/i386/ramdisks/common/list.ramdisk:1.25.2.1
--- src/distrib/i386/ramdisks/common/list.ramdisk:1.25	Sun Aug 10 20:07:41 2014
+++ src/distrib/i386/ramdisks/common/list.ramdisk	Thu Oct 15 20:30:57 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: list.ramdisk,v 1.25 2014/08/10 20:07:41 riz Exp $
+#	$NetBSD: list.ramdisk,v 1.25.2.1 2015/10/15 20:30:57 snj Exp $
 
 SRCDIRS	external/bsd/less/bin
 SRCDIRS	bin sbin usr.bin usr.sbin libexec
@@ -83,6 +83,7 @@ COPY	${DESTDIR}/usr/mdec/bootxx_lfsv2	us
 COPY	${DESTDIR}/usr/mdec/mbr			usr/mdec/mbr
 COPY	${DESTDIR}/usr/mdec/mbr_ext		usr/mdec/mbr_ext
 COPY	${DESTDIR}/usr/mdec/mbr_bootsel		usr/mdec/mbr_bootsel
+COPY	${DESTDIR}/usr/mdec/gptmbr.bin		usr/mdec/gptmbr.bin
 
 # and the boot script
 COPY	${CURDIR}/../common/dot.profile		.profile



CVS commit: [netbsd-7] src/doc

2015-10-15 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Oct 15 20:28:37 UTC 2015

Modified Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
ticket 869


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.1 -r1.1.2.2 src/doc/CHANGES-7.1

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.1
diff -u src/doc/CHANGES-7.1:1.1.2.1 src/doc/CHANGES-7.1:1.1.2.2
--- src/doc/CHANGES-7.1:1.1.2.1	Thu Oct 15 20:11:52 2015
+++ src/doc/CHANGES-7.1	Thu Oct 15 20:28:37 2015
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1,v 1.1.2.1 2015/10/15 20:11:52 snj Exp $
+# $NetBSD: CHANGES-7.1,v 1.1.2.2 2015/10/15 20:28:37 snj Exp $
 
 A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
 release:
@@ -9,3 +9,9 @@ sys/sys/param.h	patched by hand
 	Welcome to 7.0_STABLE.
 	[snj]
 
+share/man/man4/btmagic.4			1.3-1.6
+sys/dev/bluetooth/btmagic.c			1.12, 1.14
+
+	Add support for Apple Magic Trackpad.
+	[bouyer, ticket #869]
+



CVS commit: [netbsd-7] src

2015-10-15 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Oct 15 20:24:30 UTC 2015

Modified Files:
src/share/man/man4 [netbsd-7]: btmagic.4
src/sys/dev/bluetooth [netbsd-7]: btmagic.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #869):
share/man/man4/btmagic.4: revisions 1.3-1.6
sys/dev/bluetooth/btmagic.c: revisions 1.12, 1.14
Add support for Apple Magic Trackpad.
3 button emulation by detecting in which area of the bottom of
the device the trackpad's button is pressed.
Pointer move support with 1 finger touch, X/Y scroll with 2-finger touch.
TODO:
- detect tap to emulate button press and drag/n/drop.
- Detect and support zoom, if wsmouse allows to report this
--
Mention magic trackpad support
--
Grammar, whitespace; make AUTHORS section from HISTORY since it mostly cites
people.
--
Add basic support for tap detection, emulating a left-click.
--
New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.26.1 src/share/man/man4/btmagic.4
cvs rdiff -u -r1.11 -r1.11.2.1 src/sys/dev/bluetooth/btmagic.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/share/man/man4/btmagic.4
diff -u src/share/man/man4/btmagic.4:1.2 src/share/man/man4/btmagic.4:1.2.26.1
--- src/share/man/man4/btmagic.4:1.2	Mon Oct 11 15:15:57 2010
+++ src/share/man/man4/btmagic.4	Thu Oct 15 20:24:30 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: btmagic.4,v 1.2 2010/10/11 15:15:57 plunky Exp $
+.\" $NetBSD: btmagic.4,v 1.2.26.1 2015/10/15 20:24:30 snj Exp $
 .\"
 .\" Copyright (c) 2010 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,12 +27,12 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 11, 2010
+.Dd July 4, 2015
 .Dt BTMAGIC 4
 .Os
 .Sh NAME
 .Nm btmagic
-.Nd Apple Magic Mouse
+.Nd Apple Magic Mouse and Apple Magic Trackpad
 .Sh SYNOPSIS
 .Cd "btmagic*	at bthub?"
 .Cd "wsmouse*	at btmagic?"
@@ -42,6 +42,8 @@ The
 driver provides support for the
 .Tn Bluetooth
 .Dq Magic Mouse
+and
+.Dq Magic Trackpad
 from
 .Tn Apple, Inc .
 As remote devices cannot be discovered by autoconfig, configuring
@@ -49,10 +51,10 @@ a mouse is normally carried out with the
 .Xr btdevctl 8
 program.
 .Pp
-The Magic Mouse uses the standard
+The Magic Mouse and Magic Trackpad use the standard
 .Tn USB
-Human Interface Device protocol to communicate, but does not provide a
-proper HID Descriptor, and requires specific initializations to enable
+Human Interface Device protocol to communicate, but do not provide a
+proper HID Descriptor, and require specific initializations to enable
 the proprietary touch reports.
 .Pp
 The Magic Mouse provides basic mouse functionality with two buttons,
@@ -69,6 +71,25 @@ along with the pressure needed to discer
 distance necessary to trigger scrolling and the additional downscale
 factor applied to scroll movements.
 .Pp
+The Magic Trackpad provides multi touch functionality and one button.
+The
+.Nm
+driver emulates 3 buttons by splitting the area at the bottom of the
+device in 3 equal zones and detects finger presence in one of these zones
+when the button is pressed.
+In addition, a tap in any area of the trackpad is interpreted as a left click.
+The timeout for tap detection defaults to 100ms
+and is adjustable with
+.Xr sysctl 8 .
+.Pp
+Pointer movement is reported for single-touch
+movements over the device, and scroll is reported for multi-touch movements.
+.Pp
+The trackpad has a base resolution of 1300dpi, which the driver scales
+by default to a less sensitive 650dpi, but this is adjustable with
+.Xr sysctl 8
+along with the additional downscale factor applied to scroll movements.
+.Pp
 .Nm
 interfaces to the system as usual through the
 .Xr wsmouse 4
@@ -77,7 +98,7 @@ driver, and the following properties are
 .It vendor-id
 Must be 0x05ac.
 .It product-id
-Must be 0x030d.
+Must be 0x030d or 0x030e.
 .It local-bdaddr
 Local device address.
 .It remote-bdaddr
@@ -106,7 +127,8 @@ during the pairing process.
 .Xr wsmouse 4 ,
 .Xr btdevctl 8 ,
 .Xr sysctl 8
-.Sh HISTORY
+.Sh AUTHORS
+.An -nosplit
 The
 .Nm
 driver was written by
@@ -115,3 +137,10 @@ with reference to the
 .Tn Linux
 driver written by
 .An Michael Poole .
+.An Manuel Bouyer
+added Magic Trackpad support, with reference to the
+.Tn Linux
+driver written by
+.An Michael Poole
+and
+.An Chase Douglas .

Index: src/sys/dev/bluetooth/btmagic.c
diff -u src/sys/dev/bluetooth/btmagic.c:1.11 src/sys/dev/bluetooth/btmagic.c:1.11.2.1
--- src/sys/dev/bluetooth/btmagic.c:1.11	Tue Aug  5 07:55:31 2014
+++ src/sys/dev/bluetooth/btmagic.c	Thu Oct 15 20:24:30 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: btmagic.c,v 1.11 2014/08/05 07:55:31 rtr Exp $	*/
+/*	$NetBSD: btmagic.c,v 1.11.2.1 2015/10/15 20:24:30 snj Exp $	*/
 
 /*-
  * Copyright (c) 2010 The NetBSD Foundation, Inc.
@@ -85,7 +85,7 @@
  ***

CVS commit: [netbsd-7] src

2015-10-15 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Oct 15 20:11:53 UTC 2015

Modified Files:
src/gnu/usr.bin/groff/tmac [netbsd-7]: mdoc.local
src/sys/sys [netbsd-7]: param.h
Added Files:
src/doc [netbsd-7]: CHANGES-7.1

Log Message:
7.0_STABLE


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/doc/CHANGES-7.1
cvs rdiff -u -r1.75.4.1 -r1.75.4.2 src/gnu/usr.bin/groff/tmac/mdoc.local
cvs rdiff -u -r1.459.2.6 -r1.459.2.7 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/gnu/usr.bin/groff/tmac/mdoc.local
diff -u src/gnu/usr.bin/groff/tmac/mdoc.local:1.75.4.1 src/gnu/usr.bin/groff/tmac/mdoc.local:1.75.4.2
--- src/gnu/usr.bin/groff/tmac/mdoc.local:1.75.4.1	Mon Aug 11 09:21:47 2014
+++ src/gnu/usr.bin/groff/tmac/mdoc.local	Thu Oct 15 20:11:52 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: mdoc.local,v 1.75.4.1 2014/08/11 09:21:47 riz Exp $
+.\" $NetBSD: mdoc.local,v 1.75.4.2 2015/10/15 20:11:52 snj Exp $
 .\"
 .\" Copyright (c) 2003, 2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -44,9 +44,9 @@
 .as doc-str-St--ieee1275-94 " (\*[Lq]\*[doc-Tn-font-size]Open Firmware\*[doc-str-St]\*[Rq])
 .
 .\" Default .Os value
-.ds doc-operating-system NetBSD\~7.0
+.ds doc-operating-system NetBSD\~7.0_STABLE
 .\" Default footer operating system value
-.ds doc-default-operating-system NetBSD\~7.0
+.ds doc-default-operating-system NetBSD\~7.0_STABLE
 .\" Other known versions, not yet in groff distribution
 .ds doc-operating-system-NetBSD-1.3.3  1.3.3
 .ds doc-operating-system-NetBSD-1.6.3  1.6.3

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.459.2.6 src/sys/sys/param.h:1.459.2.7
--- src/sys/sys/param.h:1.459.2.6	Fri Sep 25 04:34:17 2015
+++ src/sys/sys/param.h	Thu Oct 15 20:11:53 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.459.2.6 2015/09/25 04:34:17 snj Exp $	*/
+/*	$NetBSD: param.h,v 1.459.2.7 2015/10/15 20:11:53 snj Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -63,7 +63,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	70001	/* NetBSD 7.0 */
+#define	__NetBSD_Version__	70001	/* NetBSD 7.0_STABLE */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)

Added files:

Index: src/doc/CHANGES-7.1
diff -u /dev/null src/doc/CHANGES-7.1:1.1.2.1
--- /dev/null	Thu Oct 15 20:11:53 2015
+++ src/doc/CHANGES-7.1	Thu Oct 15 20:11:52 2015
@@ -0,0 +1,11 @@
+# $NetBSD: CHANGES-7.1,v 1.1.2.1 2015/10/15 20:11:52 snj Exp $
+
+A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.1
+release:
+
+gnu/usr.bin/groff/tmac/mdoc.local		patched by hand
+sys/sys/param.h	patched by hand
+
+	Welcome to 7.0_STABLE.
+	[snj]
+



CVS commit: [netbsd-7-0] src

2015-10-15 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Oct 15 20:11:34 UTC 2015

Modified Files:
src/gnu/usr.bin/groff/tmac [netbsd-7-0]: mdoc.local
src/sys/sys [netbsd-7-0]: param.h
Added Files:
src/doc [netbsd-7-0]: CHANGES-7.0.1

Log Message:
7.0.0_PATCH


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.1 src/doc/CHANGES-7.0.1
cvs rdiff -u -r1.75.4.1 -r1.75.4.1.2.1 src/gnu/usr.bin/groff/tmac/mdoc.local
cvs rdiff -u -r1.459.2.6 -r1.459.2.6.2.1 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/gnu/usr.bin/groff/tmac/mdoc.local
diff -u src/gnu/usr.bin/groff/tmac/mdoc.local:1.75.4.1 src/gnu/usr.bin/groff/tmac/mdoc.local:1.75.4.1.2.1
--- src/gnu/usr.bin/groff/tmac/mdoc.local:1.75.4.1	Mon Aug 11 09:21:47 2014
+++ src/gnu/usr.bin/groff/tmac/mdoc.local	Thu Oct 15 20:11:33 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: mdoc.local,v 1.75.4.1 2014/08/11 09:21:47 riz Exp $
+.\" $NetBSD: mdoc.local,v 1.75.4.1.2.1 2015/10/15 20:11:33 snj Exp $
 .\"
 .\" Copyright (c) 2003, 2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -44,9 +44,9 @@
 .as doc-str-St--ieee1275-94 " (\*[Lq]\*[doc-Tn-font-size]Open Firmware\*[doc-str-St]\*[Rq])
 .
 .\" Default .Os value
-.ds doc-operating-system NetBSD\~7.0
+.ds doc-operating-system NetBSD\~7.0.0_PATCH
 .\" Default footer operating system value
-.ds doc-default-operating-system NetBSD\~7.0
+.ds doc-default-operating-system NetBSD\~7.0.0_PATCH
 .\" Other known versions, not yet in groff distribution
 .ds doc-operating-system-NetBSD-1.3.3  1.3.3
 .ds doc-operating-system-NetBSD-1.6.3  1.6.3

Index: src/sys/sys/param.h
diff -u src/sys/sys/param.h:1.459.2.6 src/sys/sys/param.h:1.459.2.6.2.1
--- src/sys/sys/param.h:1.459.2.6	Fri Sep 25 04:34:17 2015
+++ src/sys/sys/param.h	Thu Oct 15 20:11:34 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.459.2.6 2015/09/25 04:34:17 snj Exp $	*/
+/*	$NetBSD: param.h,v 1.459.2.6.2.1 2015/10/15 20:11:34 snj Exp $	*/
 
 /*-
  * Copyright (c) 1982, 1986, 1989, 1993
@@ -63,7 +63,7 @@
  *	2.99.9		(299000900)
  */
 
-#define	__NetBSD_Version__	70001	/* NetBSD 7.0 */
+#define	__NetBSD_Version__	70001	/* NetBSD 7.0.0_PATCH */
 
 #define __NetBSD_Prereq__(M,m,p) (M) * 1) + \
 (m) * 100) + (p) * 100) <= __NetBSD_Version__)

Added files:

Index: src/doc/CHANGES-7.0.1
diff -u /dev/null src/doc/CHANGES-7.0.1:1.1.2.1
--- /dev/null	Thu Oct 15 20:11:34 2015
+++ src/doc/CHANGES-7.0.1	Thu Oct 15 20:11:33 2015
@@ -0,0 +1,11 @@
+# $NetBSD: CHANGES-7.0.1,v 1.1.2.1 2015/10/15 20:11:33 snj Exp $
+
+A complete list of changes from the NetBSD 7.0 release to the NetBSD 7.0.1
+release:
+
+gnu/usr.bin/groff/tmac/mdoc.local		patched by hand
+sys/sys/param.h	patched by hand
+
+	Welcome to 7.0.0_PATCH.
+	[snj]
+



CVS commit: src/gnu/usr.bin/groff/tmac

2015-10-15 Thread Soren Jacobsen
Module Name:src
Committed By:   snj
Date:   Thu Oct 15 20:02:24 UTC 2015

Modified Files:
src/gnu/usr.bin/groff/tmac: mdoc.local

Log Message:
evbsh5 is no more


To generate a diff of this commit:
cvs rdiff -u -r1.77 -r1.78 src/gnu/usr.bin/groff/tmac/mdoc.local

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/gnu/usr.bin/groff/tmac/mdoc.local
diff -u src/gnu/usr.bin/groff/tmac/mdoc.local:1.77 src/gnu/usr.bin/groff/tmac/mdoc.local:1.78
--- src/gnu/usr.bin/groff/tmac/mdoc.local:1.77	Mon Sep 28 21:07:47 2015
+++ src/gnu/usr.bin/groff/tmac/mdoc.local	Thu Oct 15 20:02:24 2015
@@ -1,4 +1,4 @@
-.\" $NetBSD: mdoc.local,v 1.77 2015/09/28 21:07:47 christos Exp $
+.\" $NetBSD: mdoc.local,v 1.78 2015/10/15 20:02:24 snj Exp $
 .\"
 .\" Copyright (c) 2003, 2004 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -76,7 +76,6 @@
 .ds doc-operating-system-FreeBSD-9.0   9.0
 .\" Platforms not yet in groff distribution
 .ds doc-volume-as-amigappc  amigappc
-.ds doc-volume-as-evbsh5evbsh5
 .ds doc-volume-as-ews4800mips   ews4800mips
 .ds doc-volume-as-ibmnwsibmnws
 .ds doc-volume-as-iyonixiyonix



CVS commit: src/etc/rc.d

2015-10-15 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Oct 15 16:47:28 UTC 2015

Modified Files:
src/etc/rc.d: mdnsd

Log Message:
Make mdnsd start before NETWORKING and require staticroute, mountcritlocal
and networking.
Fixes PR install/43313.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/etc/rc.d/mdnsd

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/mdnsd
diff -u src/etc/rc.d/mdnsd:1.2 src/etc/rc.d/mdnsd:1.3
--- src/etc/rc.d/mdnsd:1.2	Sat Jan 23 17:44:44 2010
+++ src/etc/rc.d/mdnsd	Thu Oct 15 16:47:28 2015
@@ -1,10 +1,11 @@
 #!/bin/sh
 #
-# $NetBSD: mdnsd,v 1.2 2010/01/23 17:44:44 drochner Exp $
+# $NetBSD: mdnsd,v 1.3 2015/10/15 16:47:28 roy Exp $
 #
 
 # PROVIDE: mdnsd
-# REQUIRE: SERVERS
+# REQUIRE: network mountcritlocal staticroute
+# BEFORE:  NETWORKING
 
 $_rc_subr_loaded . /etc/rc.subr
 



CVS commit: src/external/apache2/mDNSResponder/dist/mDNSPosix

2015-10-15 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Oct 15 16:14:40 UTC 2015

Modified Files:
src/external/apache2/mDNSResponder/dist/mDNSPosix: mDNSPosix.c

Log Message:
Add support for parsing IPv6 nameservers found in resolv.conf.
Fixes PR bin/42196.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 \
src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.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/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c:1.9 src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c:1.10
--- src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c:1.9	Mon Oct 12 09:29:25 2015
+++ src/external/apache2/mDNSResponder/dist/mDNSPosix/mDNSPosix.c	Thu Oct 15 16:14:40 2015
@@ -494,10 +494,11 @@ mDNSexport int ParseDNSServers(mDNS *m, 
 	while (fgets(line,sizeof(line),fp))
 		{
 		struct in_addr ina;
+		struct in6_addr ina6;
 		line[255]='\0';		// just to be safe
 		if (sscanf(line,"%10s %15s", keyword, nameserver) != 2) continue;	// it will skip whitespaces
 		if (strncasecmp(keyword,"nameserver",10)) continue;
-		if (inet_aton(nameserver, (struct in_addr *)&ina) != 0)
+		if (inet_pton(AF_INET, nameserver, &ina) == 1)
 			{
 			mDNSAddr DNSAddr;
 			DNSAddr.type = mDNSAddrType_IPv4;
@@ -505,7 +506,15 @@ mDNSexport int ParseDNSServers(mDNS *m, 
 			mDNS_AddDNSServer(m, NULL, mDNSInterface_Any, &DNSAddr, UnicastDNSPort, mDNSfalse, 0);
 			numOfServers++;
 			}
-		}  
+		else if (inet_pton(AF_INET6, nameserver, &ina6) == 1)
+			{
+			mDNSAddr DNSAddr;
+			DNSAddr.type = mDNSAddrType_IPv6;
+			DNSAddr.ip.v6 = *(mDNSv6Addr *)&ina6;
+			mDNS_AddDNSServer(m, NULL, mDNSInterface_Any, &DNSAddr, UnicastDNSPort, mDNSfalse, 0);
+			numOfServers++;
+			}
+		}
 	fclose(fp);
 	return (numOfServers > 0) ? 0 : -1;
 	}



CVS commit: src/external/apache2/mDNSResponder/dist/mDNSCore

2015-10-15 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Oct 15 15:58:34 UTC 2015

Modified Files:
src/external/apache2/mDNSResponder/dist/mDNSCore: mDNS.c

Log Message:
Revert prior. Instead just send the diagnostic to debugf instead of syslog as 
it's not really that interesting.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/apache2/mDNSResponder/dist/mDNSCore/mDNS.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/apache2/mDNSResponder/dist/mDNSCore/mDNS.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSCore/mDNS.c:1.5 src/external/apache2/mDNSResponder/dist/mDNSCore/mDNS.c:1.6
--- src/external/apache2/mDNSResponder/dist/mDNSCore/mDNS.c:1.5	Thu Oct 15 10:29:57 2015
+++ src/external/apache2/mDNSResponder/dist/mDNSCore/mDNS.c	Thu Oct 15 15:58:34 2015
@@ -687,18 +687,16 @@ mDNSlocal void SetNextAnnounceProbeTime(
 		// If (rr->LastAPTime + rr->ThisAPInterval) happens to be far in the past, we don't want to allow
 		// NextScheduledProbe to be set excessively in the past, because that can cause bad things to happen.
 		// See:  mDNS: Sometimes advertising stops working and record interval is set to zero
-		// A future time also needs to be set to avoid spamming logs about not all probes being sent.
-		if (m->NextScheduledProbe - m->timenow <= 0)
-			m->NextScheduledProbe = m->timenow + 1;
+		if (m->NextScheduledProbe - m->timenow < 0)
+			m->NextScheduledProbe = m->timenow;
 		}
 	else if (rr->AnnounceCount && (ResourceRecordIsValidAnswer(rr) || rr->resrec.RecordType == kDNSRecordTypeDeregistering))
 		{
 		if (m->NextScheduledResponse - (rr->LastAPTime + rr->ThisAPInterval) >= 0)
 			m->NextScheduledResponse = (rr->LastAPTime + rr->ThisAPInterval);
 		}
-		// A future time also needs to be set to avoid spamming logs about not all responses being sent.
-		if (m->NextScheduledResponse - m->timenow <= 0)
-			m->NextScheduledResponse = m->timenow + 1;
+		if (m->NextScheduledResponse - m->timenow < 0)
+			m->NextScheduledResponse = m->timenow;
 	}
 
 mDNSlocal void InitializeLastAPTime(mDNS *const m, AuthRecord *const rr)
@@ -4499,7 +4497,7 @@ mDNSexport mDNSs32 mDNS_Execute(mDNS *co
 }
 			if (m->timenow - m->NextScheduledProbe >= 0)
 {
-LogMsg("mDNS_Execute: SendQueries didn't send all its probes (%d - %d = %d) will try again in one second",
+debugf("mDNS_Execute: SendQueries didn't send all its probes (%d - %d = %d) will try again in one second",
 	m->timenow, m->NextScheduledProbe, m->timenow - m->NextScheduledProbe);
 m->NextScheduledProbe = m->timenow + mDNSPlatformOneSecond;
 }
@@ -4508,7 +4506,7 @@ mDNSexport mDNSs32 mDNS_Execute(mDNS *co
 			if (m->timenow - m->NextScheduledResponse >= 0) SendResponses(m);
 			if (m->timenow - m->NextScheduledResponse >= 0)
 {
-LogMsg("mDNS_Execute: SendResponses didn't send all its responses; will try again in one second");
+debugf("mDNS_Execute: SendResponses didn't send all its responses; will try again in one second");
 m->NextScheduledResponse = m->timenow + mDNSPlatformOneSecond;
 }
 			}



CVS commit: src/sys/dev/i2c

2015-10-15 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu Oct 15 13:48:57 UTC 2015

Modified Files:
src/sys/dev/i2c: axp20x.c

Log Message:
Fix dcdc3 voltage settings (s/dcdc2/dcdc3/g).
While there convert some aprint_normal to aprint_verbose


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/i2c/axp20x.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/i2c/axp20x.c
diff -u src/sys/dev/i2c/axp20x.c:1.3 src/sys/dev/i2c/axp20x.c:1.4
--- src/sys/dev/i2c/axp20x.c:1.3	Thu Oct 15 13:41:11 2015
+++ src/sys/dev/i2c/axp20x.c	Thu Oct 15 13:48:57 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: axp20x.c,v 1.3 2015/10/15 13:41:11 bouyer Exp $ */
+/* $NetBSD: axp20x.c,v 1.4 2015/10/15 13:48:57 bouyer Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: axp20x.c,v 1.3 2015/10/15 13:41:11 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: axp20x.c,v 1.4 2015/10/15 13:48:57 bouyer Exp $");
 
 #include 
 #include 
@@ -225,21 +225,21 @@ axp20x_attach(device_t parent, device_t 
 	aprint_naive("\n");
 	first = 1;
 	if (sc->sc_inputstatus & AXP_INPUT_STATUS_AC_OK) {
-		aprint_normal(": AC used");
+		aprint_verbose(": AC used");
 		first = 0;
 	} else if (sc->sc_inputstatus & AXP_INPUT_STATUS_AC_PRESENT) {
-		aprint_normal(": AC present (but unused)");
+		aprint_verbose(": AC present (but unused)");
 		first = 0;
 	}
 	if (sc->sc_inputstatus & AXP_INPUT_STATUS_VBUS_OK) {
-		aprint_normal("%s VBUS used", first ? ":" : ",");
+		aprint_verbose("%s VBUS used", first ? ":" : ",");
 		first = 0;
 	} else if (sc->sc_inputstatus & AXP_INPUT_STATUS_VBUS_PRESENT) {
-		aprint_normal("%s VBUS present (but unused)", first ? ":" : ",");
+		aprint_verbose("%s VBUS present (but unused)", first ? ":" : ",");
 		first = 0;
 	}
 	if (sc->sc_powermode & AXP_POWER_MODE_BATTOK) {
-		aprint_normal("%s battery present", first ? ":" : ",");
+		aprint_verbose("%s battery present", first ? ":" : ",");
 	}
 	aprint_normal("\n");
 
@@ -325,15 +325,15 @@ axp20x_attach(device_t parent, device_t 
 	sysmon_envsys_register(sc->sc_sme);
 
 	if (axp20x_read(sc, AXP_DCDC2, &value, 1, I2C_F_POLL) == 0) {
-		aprint_normal_dev(sc->sc_dev, ": DCDC2 %dmV\n",
+		aprint_verbose_dev(sc->sc_dev, ": DCDC2 %dmV\n",
 		(int)(700 + (value & AXP_DCDC2_VOLT_MASK) * 25));
 	}
 	if (axp20x_read(sc, AXP_DCDC3, &value, 1, I2C_F_POLL) == 0) {
-		aprint_normal_dev(sc->sc_dev, ": DCDC3 %dmV\n",
+		aprint_verbose_dev(sc->sc_dev, ": DCDC3 %dmV\n",
 		(int)(700 + (value & AXP_DCDC3_VOLT_MASK) * 25));
 	}
 	if (axp20x_read(sc, AXP_LDO2_4, &value, 1, I2C_F_POLL) == 0) {
-		aprint_normal_dev(sc->sc_dev, ": LDO2 %dmV, LDO4 %dmV\n",
+		aprint_verbose_dev(sc->sc_dev, ": LDO2 %dmV, LDO4 %dmV\n",
 		(int)(1800 +
 		((value & AXP_LDO2_VOLT_MASK) >> AXP_LDO2_VOLT_SHIFT) * 100
 		),
@@ -341,9 +341,9 @@ axp20x_attach(device_t parent, device_t 
 	}
 	if (axp20x_read(sc, AXP_LDO3, &value, 1, I2C_F_POLL) == 0) {
 		if (value & AXP_LDO3_TRACK) {
-			aprint_normal_dev(sc->sc_dev, ": LDO3: tracking\n");
+			aprint_verbose_dev(sc->sc_dev, ": LDO3: tracking\n");
 		} else {
-			aprint_normal_dev(sc->sc_dev, ": LDO3 %dmV\n",
+			aprint_verbose_dev(sc->sc_dev, ": LDO3 %dmV\n",
 			(int)(700 + (value & AXP_LDO3_VOLT_MASK) * 25));
 		}
 	}
@@ -536,26 +536,26 @@ axp20x_set_dcdc(device_t dev, int dcdc, 
 			return ret;
 		if (axp20x_read(sc, AXP_DCDC2, ®, 1, poll ? I2C_F_POLL : 0)
 		  == 0) {
-			aprint_normal_dev(sc->sc_dev,
+			aprint_verbose_dev(sc->sc_dev,
 			": DCDC2 changed to %dmV\n",
 			(int)(700 + (reg & AXP_DCDC2_VOLT_MASK) * 25));
 		}
 		return 0;
 
 	case AXP20X_DCDC3:
-		value <<= AXP_DCDC2_VOLT_SHIFT;
-		if (value > AXP_DCDC2_VOLT_MASK) 
+		value <<= AXP_DCDC3_VOLT_SHIFT;
+		if (value > AXP_DCDC3_VOLT_MASK) 
 			return EINVAL;
-		reg = value & AXP_DCDC2_VOLT_MASK;
-		ret = axp20x_write(sc, AXP_DCDC2, ®, 1,
+		reg = value & AXP_DCDC3_VOLT_MASK;
+		ret = axp20x_write(sc, AXP_DCDC3, ®, 1,
 		poll ? I2C_F_POLL : 0);
 		if (ret)
 			return ret;
-		if (axp20x_read(sc, AXP_DCDC2, ®, 1, poll ? I2C_F_POLL : 0)
+		if (axp20x_read(sc, AXP_DCDC3, ®, 1, poll ? I2C_F_POLL : 0)
 		  == 0) {
-			aprint_normal_dev(sc->sc_dev,
-			": DCDC2 changed to %dmV\n",
-			(int)(700 + (reg & AXP_DCDC2_VOLT_MASK) * 25));
+			aprint_verbose_dev(sc->sc_dev,
+			": DCDC3 changed to %dmV\n",
+			(int)(700 + (reg & AXP_DCDC3_VOLT_MASK) * 25));
 		}
 		return 0;
 	default:



CVS commit: src/sys/dev/i2c

2015-10-15 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu Oct 15 13:41:11 UTC 2015

Modified Files:
src/sys/dev/i2c: axp20x.c
Added Files:
src/sys/dev/i2c: axp20xvar.h

Log Message:
Implement sensor reports for power supplies (voltage and intensities).
Implement a callback to change DCDC2 and DCDC3 voltages, so that
CPU management can change CPU core voltage when changing frequency.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/i2c/axp20x.c
cvs rdiff -u -r0 -r1.1 src/sys/dev/i2c/axp20xvar.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/i2c/axp20x.c
diff -u src/sys/dev/i2c/axp20x.c:1.2 src/sys/dev/i2c/axp20x.c:1.3
--- src/sys/dev/i2c/axp20x.c:1.2	Tue Sep  9 23:39:16 2014
+++ src/sys/dev/i2c/axp20x.c	Thu Oct 15 13:41:11 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: axp20x.c,v 1.2 2014/09/09 23:39:16 jmcneill Exp $ */
+/* $NetBSD: axp20x.c,v 1.3 2015/10/15 13:41:11 bouyer Exp $ */
 
 /*-
  * Copyright (c) 2014 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: axp20x.c,v 1.2 2014/09/09 23:39:16 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: axp20x.c,v 1.3 2015/10/15 13:41:11 bouyer Exp $");
 
 #include 
 #include 
@@ -37,25 +37,136 @@ __KERNEL_RCSID(0, "$NetBSD: axp20x.c,v 1
 #include 
 
 #include 
+#include 
 
 #include 
 
+#define AXP_INPUT_STATUS	0x00
+#define AXP_INPUT_STATUS_AC_PRESENT	__BIT(7)
+#define AXP_INPUT_STATUS_AC_OK		__BIT(6)
+#define AXP_INPUT_STATUS_VBUS_PRESENT	__BIT(5)
+#define AXP_INPUT_STATUS_VBUS_OK	__BIT(4)
+
+#define AXP_POWER_MODE		0x01
+#define AXP_POWER_MODE_OVERTEMP		__BIT(7)
+#define AXP_POWER_MODE_CHARGING		__BIT(6)
+#define AXP_POWER_MODE_BATTOK		__BIT(5)
+
+#define AXP_POWEROUT_CTRL	0x12
+#define AXP_POWEROUT_CTRL_LDO3		__BIT(6)
+#define AXP_POWEROUT_CTRL_DCDC2		__BIT(4)
+#define AXP_POWEROUT_CTRL_LDO4		__BIT(3)
+#define AXP_POWEROUT_CTRL_LDO2		__BIT(2)
+#define AXP_POWEROUT_CTRL_DCDC3		__BIT(1)
+#define AXP_POWEROUT_CTRL_EXTEN		__BIT(0)
+
+#define AXP_DCDC2		0x23
+#define AXP_DCDC2_VOLT_MASK		__BITS(0,5)
+#define AXP_DCDC2_VOLT_SHIFT		0
+
+#define AXP_DCDC2_LDO3_VRC	0x25
+
+#define AXP_DCDC3		0x27
+#define AXP_DCDC3_VOLT_MASK		__BITS(0,6)
+#define AXP_DCDC3_VOLT_SHIFT		0
+
+#define AXP_LDO2_4		0x28
+#define AXP_LDO2_VOLT_MASK		__BITS(4,7)
+#define AXP_LDO2_VOLT_SHIFT		4
+#define AXP_LDO4_VOLT_MASK		__BITS(0,3)
+#define AXP_LDO4_VOLT_SHIFT		0
+static int ldo4_mvV[] = {
+	1250,
+	1300,
+	1400,
+	1500,
+	1600,
+	1700,
+	1800,
+	1900,
+	2000,
+	2500,
+	2700,
+	2800,
+	3000,
+	3100,
+	3200,
+	3300
+};
+
+#define AXP_LDO3		0x29
+#define AXP_LDO3_TRACK			__BIT(7)
+#define AXP_LDO3_VOLT_MASK		__BITS(0,6)
+#define AXP_LDO3_VOLT_SHIFT		0
+
+#define AXP_ACV_MON_REG		0x56	/* 2 bytes */
+#define AXP_ACI_MON_REG		0x58	/* 2 bytes */
+#define AXP_VBUSV_MON_REG	0x5a	/* 2 bytes */
+#define AXP_VBUSI_MON_REG	0x5c	/* 2 bytes */
 #define AXP_TEMP_MON_REG	0x5e	/* 2 bytes */
+#define AXP_BATTV_MON_REG	0x78	/* 2 bytes */
+#define AXP_BATTCI_MON_REG	0x7a	/* 2 bytes */
+#define AXP_BATTDI_MON_REG	0x7c	/* 2 bytes */
+#define AXP_APSV_MON_REG	0x7e	/* 2 bytes */
+
+#define AXP_ADC_EN1		0x82
+#define AXP_ADC_EN1_BATTV		__BIT(7)
+#define AXP_ADC_EN1_BATTI		__BIT(6)
+#define AXP_ADC_EN1_ACV			__BIT(5)
+#define AXP_ADC_EN1_ACI			__BIT(4)
+#define AXP_ADC_EN1_VBUSV		__BIT(3)
+#define AXP_ADC_EN1_VBUSI		__BIT(2)
+#define AXP_ADC_EN1_APSV		__BIT(1)
+#define AXP_ADC_EN1_TS			__BIT(0)
+#define AXP_ADC_EN2		0x83
+#define AXP_ADC_EN2_TEMP		__BIT(7)
+
+#define AXP_SENSOR_ACOK		0
+#define AXP_SENSOR_ACV		1
+#define AXP_SENSOR_ACI		2
+#define AXP_SENSOR_VBUSOK	3
+#define AXP_SENSOR_VBUSV	4
+#define AXP_SENSOR_VBUSI	5
+#define AXP_SENSOR_BATTOK	6
+#define AXP_SENSOR_BATTV	7
+#define AXP_SENSOR_BATTI	8
+#define AXP_SENSOR_APSV		9
+#define AXP_SENSOR_TEMP		10
+#define AXP_NSENSORS (AXP_SENSOR_TEMP + 1)
+
+/* define per-ADC LSB to uV/uA values */
+static int axp20x_sensors_lsb[] = {
+	   0, /* AXP_SENSOR_ACOK */
+	1700, /* AXP_SENSOR_ACV */
+	 625, /* AXP_SENSOR_ACI */
+	   0,
+	1700, /* AXP_SENSOR_VBUSV */
+	 375, /* AXP_SENSOR_VBUSI */
+	   0,
+	1100, /* AXP_SENSOR_BATTV */
+	 500, /* AXP_SENSOR_BATTI */
+	1400, /* AXP_SENSOR_APSV */
+};
+
 
 struct axp20x_softc {
 	device_t	sc_dev;
 	i2c_tag_t	sc_i2c;
 	i2c_addr_t	sc_addr;
 
+	uint8_t 	sc_inputstatus;
+	uint8_t 	sc_powermode;
+
 	struct sysmon_envsys *sc_sme;
-	envsys_data_t	sc_sensor_temp;
+	envsys_data_t	sc_sensor[AXP_NSENSORS];
 };
 
 static int	axp20x_match(device_t, cfdata_t, void *);
 static void	axp20x_attach(device_t, device_t, void *);
 
 static void	axp20x_sensors_refresh(struct sysmon_envsys *, envsys_data_t *);
-static int	axp20x_read(struct axp20x_softc *, uint8_t, uint8_t *, size_t);
+static int	axp20x_read(struct axp20x_softc *, uint8_t, uint8_t *, size_t, int);
+static int	axp20x_write(struct axp20x_softc *, uint8_t, uint8_t *, size_t, int);
 
 CFATTACH_DECL_NEW(axp20x, sizeof(struct a

CVS commit: src/sys/dev/sysmon

2015-10-15 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Thu Oct 15 13:35:30 UTC 2015

Modified Files:
src/sys/dev/sysmon: sysmon_envsys_events.c

Log Message:
As proposed in
https://mail-index.netbsd.org/tech-kern/2015/10/14/msg019511.html
don't sleep on sme->sme_mtx in the callout but use mutex_tryenter()
and just reschedule the callout if we can't get the mutex now.
This fixes a deadlock which can happen if the backed wants to
sleep with timeout (e.g. cv_timedwait()) as the backed is called with
sme->sme_mtx held.

This is a stopgap measure for netbsd-7; sysmon should be changed to not
sleep (or call a backend which will sleep) with mutexes held.


To generate a diff of this commit:
cvs rdiff -u -r1.117 -r1.118 src/sys/dev/sysmon/sysmon_envsys_events.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/sysmon/sysmon_envsys_events.c
diff -u src/sys/dev/sysmon/sysmon_envsys_events.c:1.117 src/sys/dev/sysmon/sysmon_envsys_events.c:1.118
--- src/sys/dev/sysmon/sysmon_envsys_events.c:1.117	Tue Jun 23 19:22:56 2015
+++ src/sys/dev/sysmon/sysmon_envsys_events.c	Thu Oct 15 13:35:30 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: sysmon_envsys_events.c,v 1.117 2015/06/23 19:22:56 pgoyette Exp $ */
+/* $NetBSD: sysmon_envsys_events.c,v 1.118 2015/10/15 13:35:30 bouyer Exp $ */
 
 /*-
  * Copyright (c) 2007, 2008 Juan Romero Pardines.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.117 2015/06/23 19:22:56 pgoyette Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sysmon_envsys_events.c,v 1.118 2015/10/15 13:35:30 bouyer Exp $");
 
 #include 
 #include 
@@ -739,18 +739,21 @@ sme_events_check(void *arg)
 		mutex_exit(&sme->sme_work_mtx);
 		return;
 	}
-	mutex_exit(&sme->sme_work_mtx);
-
-	mutex_enter(&sme->sme_mtx);
-	mutex_enter(&sme->sme_work_mtx);
+	if (!mutex_tryenter(&sme->sme_mtx)) {
+		/* can't get lock - try again later */
+		if (!sysmon_low_power)
+			sme_schedule_callout(sme);
+		mutex_exit(&sme->sme_work_mtx);
+		return;
+	}
 	LIST_FOREACH(see, &sme->sme_events_list, see_list) {
 		workqueue_enqueue(sme->sme_wq, &see->see_wk, NULL);
 		see->see_edata->flags |= ENVSYS_FNEED_REFRESH;
 		sme->sme_busy++;
 	}
-	mutex_exit(&sme->sme_work_mtx);
 	if (!sysmon_low_power)
 		sme_schedule_callout(sme);
+	mutex_exit(&sme->sme_work_mtx);
 	mutex_exit(&sme->sme_mtx);
 }
 



CVS commit: src/sys/arch/sandpoint/stand/altboot

2015-10-15 Thread Tohru Nishimura
Module Name:src
Committed By:   nisimura
Date:   Thu Oct 15 12:00:02 UTC 2015

Modified Files:
src/sys/arch/sandpoint/stand/altboot: brdsetup.c

Log Message:
fix a board type check logic error that affected Linkstation and Kurobox (HG).
They were mistakenly recognized kurot4 type and ended up with kernel boot
failure.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/sandpoint/stand/altboot/brdsetup.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/sandpoint/stand/altboot/brdsetup.c
diff -u src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.36 src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.37
--- src/sys/arch/sandpoint/stand/altboot/brdsetup.c:1.36	Wed Sep 30 14:14:32 2015
+++ src/sys/arch/sandpoint/stand/altboot/brdsetup.c	Thu Oct 15 12:00:02 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: brdsetup.c,v 1.36 2015/09/30 14:14:32 phx Exp $ */
+/* $NetBSD: brdsetup.c,v 1.37 2015/10/15 12:00:02 nisimura Exp $ */
 
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
@@ -260,10 +260,14 @@ brdsetup(void)
 	}
 	else if (PCI_CLASS(pcicfgread(dev11, PCI_CLASS_REG)) == PCI_CLASS_ETH) {
 		/* ADMtek AN985 (tlp) or RealTek 8169S (re) at dev 11 */
-		if (PCI_VENDOR(pcicfgread(dev12, PCI_ID_REG)) != 0x1095)
+		if (PCI_VENDOR(pcicfgread(dev11, PCI_ID_REG)) == 0x1317)
 			brdtype = BRD_KUROBOX;
-		else
-			brdtype = BRD_KUROBOXT4;
+		else if (PCI_VENDOR(pcicfgread(dev11, PCI_ID_REG)) == 0x10ec) {
+			if (PCI_PRODUCT(pcicfgread(dev12,PCI_ID_REG)) != 0x3512)
+brdtype = BRD_KUROBOX;
+			else
+brdtype = BRD_KUROBOXT4;
+		}
 	}
 	else if (PCI_VENDOR(pcicfgread(dev15, PCI_ID_REG)) == 0x11ab) {
 		/* SKnet/Marvell (sk) at dev 15 */



CVS commit: src/external/apache2/mDNSResponder/dist

2015-10-15 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Oct 15 11:21:53 UTC 2015

Modified Files:
src/external/apache2/mDNSResponder/dist/mDNSPosix: PosixDaemon.c
src/external/apache2/mDNSResponder/dist/mDNSShared: PlatformCommon.c

Log Message:
Derive our primary interface and address by trying to connect to an
address in the TEST-NET-2 network as noted in RFC5737 instead of using
the 1.1.1.1 address. Also, use port 7 (echo) for better style.
Fixes PR bin/46758 thanks to Lloyd Parkes.

While here, if we do fail to connect to the test address, don't spam
this to the console as it's a common case during the boot sequence.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c
cvs rdiff -u -r1.1.1.3 -r1.2 \
src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.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/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.7 src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.8
--- src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.7	Thu Oct 15 10:15:18 2015
+++ src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c	Thu Oct 15 11:21:53 2015
@@ -92,7 +92,8 @@ mDNSlocal void mDNS_StatusCallback(mDNS 
 static void Reconfigure(mDNS *m)
 	{
 	mDNSAddr DynDNSIP;
-	const mDNSAddr dummy = { mDNSAddrType_IPv4, { { { 1, 1, 1, 1 } } } };;
+	// Use a random address from TEST-NET-2	in RFC5737
+	const mDNSAddr dummy = { mDNSAddrType_IPv4, { { { 198, 51, 100, 42 } } } };;
 	mDNS_SetPrimaryInterfaceInfo(m, NULL, NULL, NULL);
 mDNS_Lock(m);
 	if (ParseDNSServers(m, uDNS_SERVERS_FILE) < 0)

Index: src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c:1.1.1.3 src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c:1.2
--- src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c:1.1.1.3	Mon Mar 31 23:21:22 2014
+++ src/external/apache2/mDNSResponder/dist/mDNSShared/PlatformCommon.c	Thu Oct 15 11:21:53 2015
@@ -47,7 +47,7 @@ mDNSexport void mDNSPlatformSourceAddrFo
 		addr.a4.sin_len = inner_len;
 		#endif
 		addr.a4.sin_family  = AF_INET;
-		addr.a4.sin_port= 1;	// Not important, any port will do
+		addr.a4.sin_port= 7;	// Not important, any port will do
 		addr.a4.sin_addr.s_addr = dst->ip.v4.NotAnInteger;
 		}
 	else if (dst->type == mDNSAddrType_IPv6)
@@ -58,14 +58,26 @@ mDNSexport void mDNSPlatformSourceAddrFo
 		#endif
 		addr.a6.sin6_family   = AF_INET6;
 		addr.a6.sin6_flowinfo = 0;
-		addr.a6.sin6_port = 1;	// Not important, any port will do
+		addr.a6.sin6_port = 7;	// Not important, any port will do
 		addr.a6.sin6_addr = *(struct in6_addr*)&dst->ip.v6;
 		addr.a6.sin6_scope_id = 0;
 		}
 	else return;
 
 	if ((connect(sock, &addr.s, inner_len)) < 0)
-		{ LogMsg("mDNSPlatformSourceAddrForDest: connect %#a failed errno %d (%s)", dst, errno, strerror(errno)); goto exit; }
+		{
+		static mDNSv4Addr dummy = { 198, 51, 100, 42 };
+
+		// Don't spam if we can't connect to 198.51.100.42 to the console.
+		// That is our test address to out which interfaces/address should be primary and is also
+		// configured in mDNSPosix/PosixDaemon.c:Reconfigure()
+		// Failing to connect to it with EADDRNOTAVAIL is a common situation, especially on boot up.
+		if (dst->type == mDNSAddrType_IPv4 && dst->ip.v4.NotAnInteger == dummy.NotAnInteger && errno == EADDRNOTAVAIL)
+		LogInfo("mDNSPlatformSourceAddrForDest: connect %#a failed errno %d (%s)", dst, errno, strerror(errno));
+		else
+		LogMsg("mDNSPlatformSourceAddrForDest: connect %#a failed errno %d (%s)", dst, errno, strerror(errno));
+		goto exit;
+		}
 
 	if ((getsockname(sock, &addr.s, &len)) < 0)
 		{ LogMsg("mDNSPlatformSourceAddrForDest: getsockname failed errno %d (%s)", errno, strerror(errno)); goto exit; }



CVS commit: src/external/apache2/mDNSResponder/dist/mDNSCore

2015-10-15 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Oct 15 10:29:57 UTC 2015

Modified Files:
src/external/apache2/mDNSResponder/dist/mDNSCore: mDNS.c

Log Message:
If scheduling a probe or response is in the past or exactly now, schedule
it for now + 1 to avoid log file spam about not all probes being sent.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 \
src/external/apache2/mDNSResponder/dist/mDNSCore/mDNS.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/apache2/mDNSResponder/dist/mDNSCore/mDNS.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSCore/mDNS.c:1.4 src/external/apache2/mDNSResponder/dist/mDNSCore/mDNS.c:1.5
--- src/external/apache2/mDNSResponder/dist/mDNSCore/mDNS.c:1.4	Mon Mar 31 23:26:30 2014
+++ src/external/apache2/mDNSResponder/dist/mDNSCore/mDNS.c	Thu Oct 15 10:29:57 2015
@@ -687,14 +687,18 @@ mDNSlocal void SetNextAnnounceProbeTime(
 		// If (rr->LastAPTime + rr->ThisAPInterval) happens to be far in the past, we don't want to allow
 		// NextScheduledProbe to be set excessively in the past, because that can cause bad things to happen.
 		// See:  mDNS: Sometimes advertising stops working and record interval is set to zero
-		if (m->NextScheduledProbe - m->timenow < 0)
-			m->NextScheduledProbe = m->timenow;
+		// A future time also needs to be set to avoid spamming logs about not all probes being sent.
+		if (m->NextScheduledProbe - m->timenow <= 0)
+			m->NextScheduledProbe = m->timenow + 1;
 		}
 	else if (rr->AnnounceCount && (ResourceRecordIsValidAnswer(rr) || rr->resrec.RecordType == kDNSRecordTypeDeregistering))
 		{
 		if (m->NextScheduledResponse - (rr->LastAPTime + rr->ThisAPInterval) >= 0)
 			m->NextScheduledResponse = (rr->LastAPTime + rr->ThisAPInterval);
 		}
+		// A future time also needs to be set to avoid spamming logs about not all responses being sent.
+		if (m->NextScheduledResponse - m->timenow <= 0)
+			m->NextScheduledResponse = m->timenow + 1;
 	}
 
 mDNSlocal void InitializeLastAPTime(mDNS *const m, AuthRecord *const rr)



CVS commit: src/external/apache2/mDNSResponder/dist/mDNSCore

2015-10-15 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Oct 15 10:24:33 UTC 2015

Modified Files:
src/external/apache2/mDNSResponder/dist/mDNSCore: DNSCommon.c

Log Message:
Revert r1.5 now that the time calculations are using a monotonic clock.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 \
src/external/apache2/mDNSResponder/dist/mDNSCore/DNSCommon.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/apache2/mDNSResponder/dist/mDNSCore/DNSCommon.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSCore/DNSCommon.c:1.5 src/external/apache2/mDNSResponder/dist/mDNSCore/DNSCommon.c:1.6
--- src/external/apache2/mDNSResponder/dist/mDNSCore/DNSCommon.c:1.5	Tue Nov 25 02:29:57 2014
+++ src/external/apache2/mDNSResponder/dist/mDNSCore/DNSCommon.c	Thu Oct 15 10:24:33 2015
@@ -2697,7 +2697,7 @@ mDNSexport void mDNS_Lock_(mDNS *const m
 	if (m->timenow_last - m->timenow > 0)
 		{
 		m->timenow_adjust += m->timenow_last - m->timenow;
-		debugf("%s: mDNSPlatformRawTime went backwards by %ld ticks; setting correction factor to %ld", functionname, m->timenow_last - m->timenow, m->timenow_adjust);
+		LogMsg("%s: mDNSPlatformRawTime went backwards by %ld ticks; setting correction factor to %ld", functionname, m->timenow_last - m->timenow, m->timenow_adjust);
 		m->timenow = m->timenow_last;
 		}
 	m->timenow_last = m->timenow;



CVS commit: src/external/apache2/mDNSResponder/dist/mDNSPosix

2015-10-15 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Thu Oct 15 10:15:19 UTC 2015

Modified Files:
src/external/apache2/mDNSResponder/dist/mDNSPosix: PosixDaemon.c

Log Message:
Starting and stopping should be informational messages to avoid console
spam.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.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/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c
diff -u src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.6 src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.7
--- src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c:1.6	Mon Mar 24 00:31:13 2014
+++ src/external/apache2/mDNSResponder/dist/mDNSPosix/PosixDaemon.c	Thu Oct 15 10:15:18 2015
@@ -232,7 +232,7 @@ int main(int argc, char **argv)
 
 	ParseCmdLinArgs(argc, argv);
 
-	LogMsg("%s starting", mDNSResponderVersionString);
+	LogInfo("%s starting", mDNSResponderVersionString);
 
 	err = mDNS_Init(&mDNSStorage, &PlatformStorage, gRRCache, RR_CACHE_SIZE, mDNS_Init_AdvertiseLocalAddresses, 
 	mDNS_StatusCallback, mDNS_Init_NoInitCallbackContext); 
@@ -265,7 +265,7 @@ int main(int argc, char **argv)
 	if (mStatus_NoError == err)
 		err = MainLoop(&mDNSStorage);
  
-	LogMsg("%s stopping", mDNSResponderVersionString);
+	LogInfo("%s stopping", mDNSResponderVersionString);
 
 	mDNS_Close(&mDNSStorage);
 



CVS commit: src/sys/dev/gpio

2015-10-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Oct 15 09:07:49 UTC 2015

Modified Files:
src/sys/dev/gpio: files.gpio

Log Message:
pull in sysmon_taskq


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/dev/gpio/files.gpio

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/gpio/files.gpio
diff -u src/sys/dev/gpio/files.gpio:1.13 src/sys/dev/gpio/files.gpio:1.14
--- src/sys/dev/gpio/files.gpio:1.13	Thu Aug 20 12:09:22 2015
+++ src/sys/dev/gpio/files.gpio	Thu Oct 15 09:07:49 2015
@@ -1,4 +1,4 @@
-# $NetBSD: files.gpio,v 1.13 2015/08/20 12:09:22 uebayasi Exp $
+# $NetBSD: files.gpio,v 1.14 2015/10/15 09:07:49 jmcneill Exp $
 
 define	gpio {[offset = -1], [mask = 0], [flag = 0]}
 
@@ -36,6 +36,6 @@ attach	gpiorfkill at gpio
 file	dev/gpio/gpiorfkill.c			gpiorfkill
 
 # Button
-device	gpiobutton: gpiobus, sysmon_power
+device	gpiobutton: gpiobus, sysmon_power, sysmon_taskq
 attach	gpiobutton at gpio
 file	dev/gpio/gpiobutton.c			gpiobutton



CVS commit: src/sys/arch/arm/nvidia

2015-10-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Oct 15 09:06:04 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: tegra_pcie.c tegra_pciereg.h

Log Message:
explicitly disable PCIe MSI as we dont support it yet


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/nvidia/tegra_pcie.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/nvidia/tegra_pciereg.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_pcie.c
diff -u src/sys/arch/arm/nvidia/tegra_pcie.c:1.3 src/sys/arch/arm/nvidia/tegra_pcie.c:1.4
--- src/sys/arch/arm/nvidia/tegra_pcie.c:1.3	Fri Oct  2 05:22:50 2015
+++ src/sys/arch/arm/nvidia/tegra_pcie.c	Thu Oct 15 09:06:04 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_pcie.c,v 1.3 2015/10/02 05:22:50 msaitoh Exp $ */
+/* $NetBSD: tegra_pcie.c,v 1.4 2015/10/15 09:06:04 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.3 2015/10/02 05:22:50 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_pcie.c,v 1.4 2015/10/15 09:06:04 jmcneill Exp $");
 
 #include 
 #include 
@@ -193,34 +193,51 @@ tegra_pcie_attach(device_t parent, devic
 }
 
 static int
-tegra_pcie_intr(void *priv)
+tegra_pcie_legacy_intr(struct tegra_pcie_softc *sc)
 {
-	struct tegra_pcie_softc *sc = priv;
+	const uint32_t msg = bus_space_read_4(sc->sc_bst, sc->sc_bsh_afi,
+	AFI_MSG_REG);
 	struct tegra_pcie_ih *pcie_ih;
+	int rv = 0;
 
-	const uint32_t code = bus_space_read_4(sc->sc_bst, sc->sc_bsh_afi,
-	AFI_INTR_CODE_REG);
-	const uint32_t sig = bus_space_read_4(sc->sc_bst, sc->sc_bsh_afi,
-	AFI_INTR_SIGNATURE_REG);
-	bus_space_write_4(sc->sc_bst, sc->sc_bsh_afi, AFI_INTR_CODE_REG, 0);
-
-	switch (__SHIFTOUT(code, AFI_INTR_CODE_INT_CODE)) {
-	case AFI_INTR_CODE_SM_MSG:
+	if (msg & (AFI_MSG_INT0|AFI_MSG_INT1)) {
 		mutex_enter(&sc->sc_lock);
 		const u_int lastgen = sc->sc_intrgen;
 		TAILQ_FOREACH(pcie_ih, &sc->sc_intrs, ih_entry) {
 			int (*callback)(void *) = pcie_ih->ih_callback;
 			void *arg = pcie_ih->ih_arg;
 			mutex_exit(&sc->sc_lock);
-			const int rv = callback(arg);
-			if (rv)
-return rv;
+			rv += callback(arg);
 			mutex_enter(&sc->sc_lock);
 			if (lastgen != sc->sc_intrgen)
 break;
 		}
 		mutex_exit(&sc->sc_lock);
-		return 0;
+	} else if (msg & (AFI_MSG_PM_PME0|AFI_MSG_PM_PME1)) {
+		device_printf(sc->sc_dev, "PM PME message; AFI_MSG=%08x\n",
+		msg);
+	} else {
+		bus_space_write_4(sc->sc_bst, sc->sc_bsh_afi, AFI_MSG_REG, msg);
+		rv = 1;
+	}
+
+	return rv;
+}
+
+static int
+tegra_pcie_intr(void *priv)
+{
+	struct tegra_pcie_softc *sc = priv;
+
+	const uint32_t code = bus_space_read_4(sc->sc_bst, sc->sc_bsh_afi,
+	AFI_INTR_CODE_REG);
+	const uint32_t sig = bus_space_read_4(sc->sc_bst, sc->sc_bsh_afi,
+	AFI_INTR_SIGNATURE_REG);
+	bus_space_write_4(sc->sc_bst, sc->sc_bsh_afi, AFI_INTR_CODE_REG, 0);
+
+	switch (__SHIFTOUT(code, AFI_INTR_CODE_INT_CODE)) {
+	case AFI_INTR_CODE_SM_MSG:
+		return tegra_pcie_legacy_intr(sc);
 	default:
 		device_printf(sc->sc_dev, "intr: code %#x sig %#x\n",
 		code, sig);
@@ -231,6 +248,14 @@ tegra_pcie_intr(void *priv)
 static void
 tegra_pcie_enable(struct tegra_pcie_softc *sc)
 {
+	/* disable MSI */
+	bus_space_write_4(sc->sc_bst, sc->sc_bsh_afi,
+	AFI_MSI_BAR_SZ_REG, 0);
+	bus_space_write_4(sc->sc_bst, sc->sc_bsh_afi,
+	AFI_MSI_FPCI_BAR_ST_REG, 0);
+	bus_space_write_4(sc->sc_bst, sc->sc_bsh_afi,
+	AFI_MSI_AXI_BAR_ST_REG, 0);
+
 	bus_space_write_4(sc->sc_bst, sc->sc_bsh_afi,
 	AFI_SM_INTR_ENABLE_REG, 0x);
 	bus_space_write_4(sc->sc_bst, sc->sc_bsh_afi,

Index: src/sys/arch/arm/nvidia/tegra_pciereg.h
diff -u src/sys/arch/arm/nvidia/tegra_pciereg.h:1.1 src/sys/arch/arm/nvidia/tegra_pciereg.h:1.2
--- src/sys/arch/arm/nvidia/tegra_pciereg.h:1.1	Sun May  3 01:07:44 2015
+++ src/sys/arch/arm/nvidia/tegra_pciereg.h	Thu Oct 15 09:06:04 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_pciereg.h,v 1.1 2015/05/03 01:07:44 jmcneill Exp $ */
+/* $NetBSD: tegra_pciereg.h,v 1.2 2015/10/15 09:06:04 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -30,11 +30,15 @@
 #define _ARM_TEGRA_PCIEREG_H
 
 /* AFI */
+#define AFI_MSI_BAR_SZ_REG	0x60
+#define AFI_MSI_FPCI_BAR_ST_REG	0x64
+#define AFI_MSI_AXI_BAR_ST_REG	0x68
 #define AFI_INTR_MASK_REG	0xb4
 #define AFI_INTR_CODE_REG	0xb8
 #define AFI_INTR_SIGNATURE_REG	0xbc
 #define AFI_SM_INTR_ENABLE_REG	0xc4
 #define AFI_AFI_INTR_ENABLE_REG	0xc8
+#define AFI_MSG_REG		0x190
 
 #define AFI_INTR_MASK_MSI	__BIT(8)
 #define AFI_INTR_MASK_INT	__BIT(0)
@@ -42,4 +46,9 @@
 #define AFI_INTR_CODE_INT_CODE	__BITS(4,0)
 #define AFI_INTR_CODE_SM_MSG	6
 
+#define AFI_MSG_INT1		__BITS(27,24)
+#define AFI_MSG_PM_PME1		__BIT(20)
+#define AFI_MSG_INT0		__BITS(11,8)
+#define AFI_MSG_PM_PME0		__BIT(4)
+
 #endif /* _ARM_TEGRA_PCIEREG_H */



CVS commit: src/sys/arch/arm/nvidia

2015-10-15 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Oct 15 09:04:35 UTC 2015

Modified Files:
src/sys/arch/arm/nvidia: tegra_ahcisata.c tegra_ahcisatareg.h

Log Message:
disable SATA sleep feature


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/nvidia/tegra_ahcisata.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/nvidia/tegra_ahcisatareg.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_ahcisata.c
diff -u src/sys/arch/arm/nvidia/tegra_ahcisata.c:1.6 src/sys/arch/arm/nvidia/tegra_ahcisata.c:1.7
--- src/sys/arch/arm/nvidia/tegra_ahcisata.c:1.6	Sun May 24 22:30:22 2015
+++ src/sys/arch/arm/nvidia/tegra_ahcisata.c	Thu Oct 15 09:04:35 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_ahcisata.c,v 1.6 2015/05/24 22:30:22 jmcneill Exp $ */
+/* $NetBSD: tegra_ahcisata.c,v 1.7 2015/10/15 09:04:35 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -29,7 +29,7 @@
 #include "locators.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tegra_ahcisata.c,v 1.6 2015/05/24 22:30:22 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tegra_ahcisata.c,v 1.7 2015/10/15 09:04:35 jmcneill Exp $");
 
 #include 
 #include 
@@ -129,6 +129,20 @@ tegra_ahcisata_init(struct tegra_ahcisat
 	const u_int gen2_tx_amp = 0x18;
 	const u_int gen2_tx_peak = 0x0a;
 
+	/* Set RX idle detection source and disable RX idle detection interrupt */
+	tegra_reg_set_clear(bst, bsh, TEGRA_SATA_AUX_MISC_CNTL_1_REG,
+	TEGRA_SATA_AUX_MISC_CNTL_1_AUX_OR_CORE_IDLE_STATUS_SEL, 0);
+	tegra_reg_set_clear(bst, bsh, TEGRA_SATA_AUX_RX_STAT_INT_REG,
+	TEGRA_SATA_AUX_RX_STAT_INT_SATA_RX_STAT_INT_DISABLE, 0);
+
+	/* Prevent automatic OOB sequence when coming out of reset */
+	tegra_reg_set_clear(bst, bsh, TEGRA_SATA_AUX_MISC_CNTL_1_REG,
+	0, TEGRA_SATA_AUX_MISC_CNTL_1_OOB_ON_POR);
+
+	/* Disable device sleep */
+	tegra_reg_set_clear(bst, bsh, TEGRA_SATA_AUX_MISC_CNTL_1_REG,
+	0, TEGRA_SATA_AUX_MISC_CNTL_1_SDS_SUPPORT);
+
 	/* Enable IFPS device block */
 	tegra_reg_set_clear(bst, bsh, TEGRA_SATA_CONFIGURATION_REG,
 	TEGRA_SATA_CONFIGURATION_EN_FPCI, 0);

Index: src/sys/arch/arm/nvidia/tegra_ahcisatareg.h
diff -u src/sys/arch/arm/nvidia/tegra_ahcisatareg.h:1.1 src/sys/arch/arm/nvidia/tegra_ahcisatareg.h:1.2
--- src/sys/arch/arm/nvidia/tegra_ahcisatareg.h:1.1	Fri May 15 17:43:35 2015
+++ src/sys/arch/arm/nvidia/tegra_ahcisatareg.h	Thu Oct 15 09:04:35 2015
@@ -1,4 +1,4 @@
-/* $NetBSD: tegra_ahcisatareg.h,v 1.1 2015/05/15 17:43:35 jmcneill Exp $ */
+/* $NetBSD: tegra_ahcisatareg.h,v 1.2 2015/10/15 09:04:35 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2015 Jared D. McNeill 
@@ -53,6 +53,14 @@
 #define TEGRA_T_SATA0_CFG9_BASE_ADDRESS			__BITS(31,13) 
 #define TEGRA_T_SATA0_CFG9_SPACE_TYPE			__BIT(0)
 
+#define TEGRA_SATA_AUX_MISC_CNTL_1_REG		0x1108
+#define TEGRA_SATA_AUX_MISC_CNTL_1_AUX_OR_CORE_IDLE_STATUS_SEL	__BIT(18)
+#define TEGRA_SATA_AUX_MISC_CNTL_1_SDS_SUPPORT			__BIT(13)
+#define TEGRA_SATA_AUX_MISC_CNTL_1_OOB_ON_POR			__BIT(7)
+
+#define TEGRA_SATA_AUX_RX_STAT_INT_REG		0x110c
+#define TEGRA_SATA_AUX_RX_STAT_INT_SATA_RX_STAT_INT_DISABLE	__BIT(2)
+
 #define TEGRA_T_SATA0_BKDOOR_CC_REG		0x14a4
 #define TEGRA_T_SATA0_BKDOOR_CC_CLASS_CODE		__BITS(31,16)
 #define TEGRA_T_SATA0_BKDOOR_CC_PROG_IF			__BITS(15,8)



CVS commit: src/sys/arch/arm/include

2015-10-15 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 15 07:14:56 UTC 2015

Modified Files:
src/sys/arch/arm/include: armreg.h

Log Message:
No need to shout


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/arch/arm/include/armreg.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/include/armreg.h
diff -u src/sys/arch/arm/include/armreg.h:1.108 src/sys/arch/arm/include/armreg.h:1.109
--- src/sys/arch/arm/include/armreg.h:1.108	Thu Oct 15 07:13:50 2015
+++ src/sys/arch/arm/include/armreg.h	Thu Oct 15 07:14:56 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: armreg.h,v 1.108 2015/10/15 07:13:50 skrll Exp $	*/
+/*	$NetBSD: armreg.h,v 1.109 2015/10/15 07:14:56 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Ben Harris
@@ -459,7 +459,7 @@
 /* Cortex-A15 Auxiliary Control Register (CP15 register 1, opcode 1) */
 #define	CORTEXA15_ACTLR_BTB	__BIT(0)  /* Cache and TLB updates broadcast */
 #define	CORTEXA15_ACTLR_SMP	__BIT(6)  /* SMP */
-#define	CORTEXA15_ACTLR_IOBEU	__BIT(15) /* In order issue in Branch Exec UNIT */
+#define	CORTEXA15_ACTLR_IOBEU	__BIT(15) /* In order issue in Branch Exec Unit */
 
 /* Marvell Feroceon Extra Features Register (CP15 register 1, opcode2 0) */
 #define FC_DCACHE_REPL_LOCK	0x8000 /* Replace DCache Lock */



CVS commit: src/sys/arch

2015-10-15 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Oct 15 07:13:50 UTC 2015

Modified Files:
src/sys/arch/arm/arm: cpufunc.c
src/sys/arch/arm/cortex: a9_mpsubr.S
src/sys/arch/arm/include: armreg.h
src/sys/arch/evbarm/conf: std.tegra

Log Message:
Setting actlr.bit15=1 (Force in order issue in the branch execution unit)
makes my jetson tk1 stable.  Apply this workaround until we figure out
what the real problem is.


To generate a diff of this commit:
cvs rdiff -u -r1.156 -r1.157 src/sys/arch/arm/arm/cpufunc.c
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/arm/cortex/a9_mpsubr.S
cvs rdiff -u -r1.107 -r1.108 src/sys/arch/arm/include/armreg.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/evbarm/conf/std.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/arm/cpufunc.c
diff -u src/sys/arch/arm/arm/cpufunc.c:1.156 src/sys/arch/arm/arm/cpufunc.c:1.157
--- src/sys/arch/arm/arm/cpufunc.c:1.156	Thu Jul  2 08:33:31 2015
+++ src/sys/arch/arm/arm/cpufunc.c	Thu Oct 15 07:13:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpufunc.c,v 1.156 2015/07/02 08:33:31 skrll Exp $	*/
+/*	$NetBSD: cpufunc.c,v 1.157 2015/10/15 07:13:50 skrll Exp $	*/
 
 /*
  * arm7tdmi support code Copyright (c) 2001 John Fremlin
@@ -49,7 +49,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.156 2015/07/02 08:33:31 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpufunc.c,v 1.157 2015/10/15 07:13:50 skrll Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_cpuoptions.h"
@@ -3165,6 +3165,17 @@ armv7_setup(char *args)
 		cpuctrl |= CPU_CONTROL_VECRELOC;
 #endif
 
+#ifdef TEGRAK1_PMAP_WORKAROUND
+	uint32_t auxctrl = armreg_auxctl_read();
+
+	// u-boot sets this incorrectly on boot cpu
+	auxctrl &= ~CORTEXA15_ACTLR_BTB;
+	auxctrl |= CORTEXA15_ACTLR_IOBEU;
+
+	/* Update auxctlr */
+	armreg_auxctl_write(auxctrl);
+#endif
+
 	/* Clear out the cache */
 	cpu_idcache_wbinv_all();
 

Index: src/sys/arch/arm/cortex/a9_mpsubr.S
diff -u src/sys/arch/arm/cortex/a9_mpsubr.S:1.42 src/sys/arch/arm/cortex/a9_mpsubr.S:1.43
--- src/sys/arch/arm/cortex/a9_mpsubr.S:1.42	Tue Jun  9 08:08:14 2015
+++ src/sys/arch/arm/cortex/a9_mpsubr.S	Thu Oct 15 07:13:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: a9_mpsubr.S,v 1.42 2015/06/09 08:08:14 skrll Exp $	*/
+/*	$NetBSD: a9_mpsubr.S,v 1.43 2015/10/15 07:13:50 skrll Exp $	*/
 /*-
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -498,6 +498,10 @@ cortex_init:
 	bfi	r0, r2, #31, #1			// copy it to bit 31 in ACTRL
 #endif
 
+#if defined(TEGRAK1_PMAP_WORKAROUND)
+	orr	r0, r0, #CORTEXA15_ACTLR_IOBEU
+#endif
+
 #if defined(CPU_CORTEXA5) || defined(CPU_CORTEXA9)
 	//
 	// Step 4a (continued on A5/A9), ACTLR.FW=1)

Index: src/sys/arch/arm/include/armreg.h
diff -u src/sys/arch/arm/include/armreg.h:1.107 src/sys/arch/arm/include/armreg.h:1.108
--- src/sys/arch/arm/include/armreg.h:1.107	Tue Jun  9 08:08:14 2015
+++ src/sys/arch/arm/include/armreg.h	Thu Oct 15 07:13:50 2015
@@ -1,4 +1,4 @@
-/*	$NetBSD: armreg.h,v 1.107 2015/06/09 08:08:14 skrll Exp $	*/
+/*	$NetBSD: armreg.h,v 1.108 2015/10/15 07:13:50 skrll Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Ben Harris
@@ -456,6 +456,11 @@
 #define	CORTEXA9_AUXCTL_ONEWAY	0x0100 /* Allocate in on cache way only */
 #define	CORTEXA9_AUXCTL_PARITY	0x0200 /* Support parity checking */
 
+/* Cortex-A15 Auxiliary Control Register (CP15 register 1, opcode 1) */
+#define	CORTEXA15_ACTLR_BTB	__BIT(0)  /* Cache and TLB updates broadcast */
+#define	CORTEXA15_ACTLR_SMP	__BIT(6)  /* SMP */
+#define	CORTEXA15_ACTLR_IOBEU	__BIT(15) /* In order issue in Branch Exec UNIT */
+
 /* Marvell Feroceon Extra Features Register (CP15 register 1, opcode2 0) */
 #define FC_DCACHE_REPL_LOCK	0x8000 /* Replace DCache Lock */
 #define FC_DCACHE_STREAM_EN	0x2000 /* DCache Streaming Switch */

Index: src/sys/arch/evbarm/conf/std.tegra
diff -u src/sys/arch/evbarm/conf/std.tegra:1.7 src/sys/arch/evbarm/conf/std.tegra:1.8
--- src/sys/arch/evbarm/conf/std.tegra:1.7	Sun May 31 20:04:44 2015
+++ src/sys/arch/evbarm/conf/std.tegra	Thu Oct 15 07:13:50 2015
@@ -1,4 +1,4 @@
-#	$NetBSD: std.tegra,v 1.7 2015/05/31 20:04:44 jmcneill Exp $
+#	$NetBSD: std.tegra,v 1.8 2015/10/15 07:13:50 skrll Exp $
 #
 
 machine	evbarm arm
@@ -19,6 +19,7 @@ options 	KERNEL_BASE_EXT=0x8000
 options 	FPU_VFP
 options 	PCI_NETBSD_CONFIGURE
 options 	__HAVE_PCI_CONF_HOOK
+options 	TEGRAK1_PMAP_WORKAROUND
 
 makeoptions	KERNEL_BASE_PHYS="0x8100"
 makeoptions	KERNEL_BASE_VIRT="0x8100"