CVS commit: src/doc

2018-12-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Dec  5 06:51:16 UTC 2018

Modified Files:
src/doc: CHANGES

Log Message:
note atactl auto vendor (micron) support.


To generate a diff of this commit:
cvs rdiff -u -r1.2459 -r1.2460 src/doc/CHANGES

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2459 src/doc/CHANGES:1.2460
--- src/doc/CHANGES:1.2459	Fri Nov 30 23:48:14 2018
+++ src/doc/CHANGES	Wed Dec  5 06:51:16 2018
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2459 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2460 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -254,3 +254,5 @@ Changes from NetBSD 8.0 to NetBSD 9.0:
 		GENERIC64 kernel config. [jmcneill 20181124]
 	ena(4): Add support for Amazon.com Elastic Network Adapter (ENA).
 		[netbsd 20181130]
+	atactl(8): Add support to automatically detect Micron/Crucial devices
+		and their vendor-specific SMART status values.  [mrg 20181205]



CVS commit: src/doc

2018-12-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Dec  5 06:51:16 UTC 2018

Modified Files:
src/doc: CHANGES

Log Message:
note atactl auto vendor (micron) support.


To generate a diff of this commit:
cvs rdiff -u -r1.2459 -r1.2460 src/doc/CHANGES

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



CVS commit: src/sbin/atactl

2018-12-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Dec  5 06:49:54 UTC 2018

Modified Files:
src/sbin/atactl: atactl.8 atactl.c

Log Message:
"smart status" already obtains the ata parameters to check if smart
is actually supported, so we can attempt to guess a vendor smart
table from the model name.  add basic support for all the micron /
crucial disk names i could find, and add a couple more micron
specific values.

XXX: probably should add regex support for matching, and probably
 should be more restrictive with the current matches.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sbin/atactl/atactl.8
cvs rdiff -u -r1.78 -r1.79 src/sbin/atactl/atactl.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/atactl/atactl.8
diff -u src/sbin/atactl/atactl.8:1.26 src/sbin/atactl/atactl.8:1.27
--- src/sbin/atactl/atactl.8:1.26	Sat Nov  3 10:51:14 2018
+++ src/sbin/atactl/atactl.8	Wed Dec  5 06:49:54 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: atactl.8,v 1.26 2018/11/03 10:51:14 wiz Exp $
+.\"	$NetBSD: atactl.8,v 1.27 2018/12/05 06:49:54 mrg Exp $
 .\"
 .\" Copyright (c) 1998 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd October 4, 2018
+.Dd December 5, 2018
 .Dt ATACTL 8
 .Os
 .Sh NAME
@@ -162,6 +162,8 @@ information if known to
 Currently, only
 .Dq micron
 has a vendor-specific table.
+If the vendor is not supplied, it may be guessed from devices' model
+or other data available.
 .It Ar offline #
 Runs the numbered offline self-test on the drive.
 .It Ar error-log
@@ -273,6 +275,10 @@ It was based heavily on the
 .Xr scsictl 8
 command written by
 .An Jason R. Thorpe .
+.An Matthew R. Green
+significantly enhanced the 
+.Cm smart status
+support.
 .Sh BUGS
 The output from the
 .Cm identify

Index: src/sbin/atactl/atactl.c
diff -u src/sbin/atactl/atactl.c:1.78 src/sbin/atactl/atactl.c:1.79
--- src/sbin/atactl/atactl.c:1.78	Wed Oct 31 20:00:56 2018
+++ src/sbin/atactl/atactl.c	Wed Dec  5 06:49:54 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: atactl.c,v 1.78 2018/10/31 20:00:56 mrg Exp $	*/
+/*	$NetBSD: atactl.c,v 1.79 2018/12/05 06:49:54 mrg Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 #include 
 
 #ifndef lint
-__RCSID("$NetBSD: atactl.c,v 1.78 2018/10/31 20:00:56 mrg Exp $");
+__RCSID("$NetBSD: atactl.c,v 1.79 2018/12/05 06:49:54 mrg Exp $");
 #endif
 
 
@@ -114,7 +114,7 @@ static void	print_selftest_entry(int, co
 static void	print_error(const void *);
 static void	print_selftest(const void *);
 
-static const struct ataparams *getataparams(void);
+static void	fillataparams(void);
 
 static int	is_smart(void);
 
@@ -122,6 +122,10 @@ static int	fd;/* file descriptor for
 static const	char *dvname;			/* device name */
 static char	dvname_store[MAXPATHLEN];	/* for opendisk(3) */
 static const	char *cmdname;			/* command user issued */
+static const	struct ataparams *inqbuf;	/* inquiry buffer */
+static char	model[sizeof(inqbuf->atap_model)+1];
+static char	revision[sizeof(inqbuf->atap_revision)+1];
+static char	serial[sizeof(inqbuf->atap_serial)+1];
 
 static void	device_identify(int, char *[]);
 static void	device_setidle(int, char *[]);
@@ -355,7 +359,9 @@ static const struct attr_table {
 static const struct attr_table micron_smart_names[] = {
 	{   5,		"Reallocated NAND block count", NULL },
 	{ 173,  "Average block erase count", NULL },
+	{ 181,  "Non 4K aligned access count", NULL },
 	{ 184,  "Error correction count", NULL },
+	{ 189,  "Factory bad block count", NULL },
 	{ 197,		"Current pending ECC count", NULL },
 	{ 198,		"SMART offline scan uncorrectable error count", NULL },
 	{ 202,		"Percent lifetime remaining", NULL },
@@ -855,14 +861,19 @@ print_selftest(const void *buf)
 		print_selftest_entry(i, >log_entries[i]);
 }
 
-static const struct ataparams *
-getataparams(void)
+static void
+fillataparams(void)
 {
 	struct atareq req;
 	static union {
 		unsigned char inbuf[DEV_BSIZE];
 		struct ataparams inqbuf;
 	} inbuf;
+	static int first = 1;
+
+	if (!first)
+		return;
+	first = 0;
 
 	memset(, 0, sizeof(inbuf));
 	memset(, 0, sizeof(req));
@@ -875,7 +886,7 @@ getataparams(void)
 
 	ata_command();
 
-	return ();
+	inqbuf = 
 }
 
 /*
@@ -888,10 +899,9 @@ static int
 is_smart(void)
 {
 	int retval = 0;
-	const struct ataparams *inqbuf;
 	const char *status;
 
-	inqbuf = getataparams();
+	fillataparams();
 
 	if (inqbuf->atap_cmd_def != 0 && inqbuf->atap_cmd_def != 0x) {
 		if (!(inqbuf->atap_cmd_set1 & WDC_CMD1_SMART)) {
@@ -951,8 +961,7 @@ extract_string(char *buf, size_t bufmax,
 }
 
 static void
-compute_capacity(const struct ataparams *inqbuf, uint64_t *capacityp,
-uint64_t *sectorsp, uint32_t *secsizep)
+compute_capacity(uint64_t *capacityp, uint64_t 

CVS commit: src/sbin/atactl

2018-12-04 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Wed Dec  5 06:49:54 UTC 2018

Modified Files:
src/sbin/atactl: atactl.8 atactl.c

Log Message:
"smart status" already obtains the ata parameters to check if smart
is actually supported, so we can attempt to guess a vendor smart
table from the model name.  add basic support for all the micron /
crucial disk names i could find, and add a couple more micron
specific values.

XXX: probably should add regex support for matching, and probably
 should be more restrictive with the current matches.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sbin/atactl/atactl.8
cvs rdiff -u -r1.78 -r1.79 src/sbin/atactl/atactl.c

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



CVS commit: src/sys/dev/rasops

2018-12-04 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Dec  5 05:52:23 UTC 2018

Modified Files:
src/sys/dev/rasops: rasops4.c

Log Message:
It's WSATTR_UNDERLINE, not WS_UNDERLINE.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/rasops/rasops4.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/rasops/rasops4.c
diff -u src/sys/dev/rasops/rasops4.c:1.12 src/sys/dev/rasops/rasops4.c:1.13
--- src/sys/dev/rasops/rasops4.c:1.12	Tue Dec  4 09:27:59 2018
+++ src/sys/dev/rasops/rasops4.c	Wed Dec  5 05:52:23 2018
@@ -1,4 +1,4 @@
-/* 	$NetBSD: rasops4.c,v 1.12 2018/12/04 09:27:59 mlelstv Exp $	*/
+/* 	$NetBSD: rasops4.c,v 1.13 2018/12/05 05:52:23 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rasops4.c,v 1.12 2018/12/04 09:27:59 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops4.c,v 1.13 2018/12/05 05:52:23 mlelstv Exp $");
 
 #include "opt_rasops.h"
 
@@ -159,7 +159,7 @@ rasops4_putchar(void *cookie, int row, i
 		}
 
 		/* Do underline */
-		if (attr & WS_UNDERLINE) {
+		if (attr & WSATTR_UNDERLINE) {
 			DELTA(rp, -(ri->ri_stride << 1), int32_t *);
 			*rp = (*rp & lmask) | (fg & rmask);
 		}
@@ -196,7 +196,7 @@ rasops4_putchar(void *cookie, int row, i
 		}
 
 		/* Do underline */
-		if (attr & WS_UNDERLINE) {
+		if (attr & WSATTR_UNDERLINE) {
 			DELTA(rp, -(ri->ri_stride << 1), int32_t *);
 			rp[0] = (rp[0] & lmask) | (fg & ~lmask);
 			rp[1] = (rp[1] & rmask) | (fg & ~rmask);
@@ -311,7 +311,7 @@ rasops4_putchar8(void *cookie, int row, 
 	}
 
 	/* Do underline */
-	if ((attr & WS_UNDERLINE) != 0) {
+	if ((attr & WSATTR_UNDERLINE) != 0) {
 		rp -= (rs << 1);
 		rp[0] = stamp[15];
 		rp[1] = stamp[15];
@@ -383,7 +383,7 @@ rasops4_putchar12(void *cookie, int row,
 	}
 
 	/* Do underline */
-	if ((attr & WS_UNDERLINE) != 0) {
+	if ((attr & WSATTR_UNDERLINE) != 0) {
 		rp -= (rs << 1);
 		rp[0] = stamp[15];
 		rp[1] = stamp[15];
@@ -458,7 +458,7 @@ rasops4_putchar16(void *cookie, int row,
 	}
 
 	/* Do underline */
-	if ((attr & WS_UNDERLINE) != 0) {
+	if ((attr & WSATTR_UNDERLINE) != 0) {
 		rp -= (rs << 1);
 		rp[0] = stamp[15];
 		rp[1] = stamp[15];



CVS commit: src/sys/dev/rasops

2018-12-04 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Wed Dec  5 05:52:23 UTC 2018

Modified Files:
src/sys/dev/rasops: rasops4.c

Log Message:
It's WSATTR_UNDERLINE, not WS_UNDERLINE.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/dev/rasops/rasops4.c

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



CVS commit: src/bin/sh

2018-12-04 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Dec  5 03:14:28 UTC 2018

Modified Files:
src/bin/sh: trap.c

Log Message:
NFC (except that it should, I am guessing, fix compilation on
some versions of liux) - DEBUG mode change:  Delete a (relatively new)
trace point (temporarily anyway) which mkinit (a script run using the
host's /bin/sh) apparently cannot handle correctly on (some release of)
linux (it is fine with the NetBSD shell).

I don't know which linux version has a shell with this problem
(or whether it is a mkinit issue that only works by fluke on NetBSD)

Problem reported by gson@


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/bin/sh/trap.c

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

Modified files:

Index: src/bin/sh/trap.c
diff -u src/bin/sh/trap.c:1.47 src/bin/sh/trap.c:1.48
--- src/bin/sh/trap.c:1.47	Mon Dec  3 06:43:19 2018
+++ src/bin/sh/trap.c	Wed Dec  5 03:14:28 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.47 2018/12/03 06:43:19 kre Exp $	*/
+/*	$NetBSD: trap.c,v 1.48 2018/12/05 03:14:28 kre Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)trap.c	8.5 (Berkeley) 6/5/95";
 #else
-__RCSID("$NetBSD: trap.c,v 1.47 2018/12/03 06:43:19 kre Exp $");
+__RCSID("$NetBSD: trap.c,v 1.48 2018/12/05 03:14:28 kre Exp $");
 #endif
 #endif /* not lint */
 
@@ -571,8 +571,6 @@ SHELLPROC {
 	for (sm = sigmode ; sm < sigmode + NSIG ; sm++) {
 		if (*sm == S_IGN) {
 			*sm = S_HARD_IGN;
-			VTRACE(DBG_TRAP, ("SHELLPROC: %d -> hard_ign\n",
-			(sm - sigmode) + 1));
 		}
 	}
 	INTON;



CVS commit: src/bin/sh

2018-12-04 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Dec  5 03:14:28 UTC 2018

Modified Files:
src/bin/sh: trap.c

Log Message:
NFC (except that it should, I am guessing, fix compilation on
some versions of liux) - DEBUG mode change:  Delete a (relatively new)
trace point (temporarily anyway) which mkinit (a script run using the
host's /bin/sh) apparently cannot handle correctly on (some release of)
linux (it is fine with the NetBSD shell).

I don't know which linux version has a shell with this problem
(or whether it is a mkinit issue that only works by fluke on NetBSD)

Problem reported by gson@


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/bin/sh/trap.c

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



CVS commit: src/tests/bin/sh

2018-12-04 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Dec  5 02:48:05 UTC 2018

Modified Files:
src/tests/bin/sh: t_builtins.sh

Log Message:
Oops, this is 2018, not 2017 ... cut  (affects just copyright notice)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/bin/sh/t_builtins.sh

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

Modified files:

Index: src/tests/bin/sh/t_builtins.sh
diff -u src/tests/bin/sh/t_builtins.sh:1.1 src/tests/bin/sh/t_builtins.sh:1.2
--- src/tests/bin/sh/t_builtins.sh:1.1	Wed Dec  5 02:45:06 2018
+++ src/tests/bin/sh/t_builtins.sh	Wed Dec  5 02:48:04 2018
@@ -1,6 +1,6 @@
-# $NetBSD: t_builtins.sh,v 1.1 2018/12/05 02:45:06 kre Exp $
+# $NetBSD: t_builtins.sh,v 1.2 2018/12/05 02:48:04 kre Exp $
 #
-# Copyright (c) 2017 The NetBSD Foundation, Inc.
+# Copyright (c) 2018 The NetBSD Foundation, Inc.
 # All rights reserved.
 #
 # Redistribution and use in source and binary forms, with or without



CVS commit: src/tests/bin/sh

2018-12-04 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Dec  5 02:48:05 UTC 2018

Modified Files:
src/tests/bin/sh: t_builtins.sh

Log Message:
Oops, this is 2018, not 2017 ... cut  (affects just copyright notice)


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/bin/sh/t_builtins.sh

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



CVS commit: src

2018-12-04 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Dec  5 02:45:06 UTC 2018

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/bin/sh: Makefile
Added Files:
src/tests/bin/sh: t_builtins.sh

Log Message:
Add a new test program to test the "intermediate" shell built in
utilities.  That is, not the low level ones that look like syntax,
but aren't: break/continue/return; not those which are really
just external programs that are built in for efficiency (printf,
test, and kill - though kill really needs to be built in) - those
should all have separate test programs (there is a test here for the
built-in echo, as that is an entirely different thing to /bin/echo);
and also not those for which there are other tests because of the
nature of the built-in (like exit, wait, shift, ...).   Lastly not
"times" either as that just seems to be too hard to test rationally.

There is a test (well, framework) for ulimit and there's also t_ulimit.sh
one of those should go, but I am not yet sure which is the best way
to reconcile things.

Note: many (in fact) most of the test cases added here are either
entirely empty (no tests at all, beyond testing that the built-in is
in fact a shell built-in) or only very rudimentary tests - assistance
in fleshing those out would be welcome (the boilerplate is all here,
all that is needed is some actual tests to run...)


To generate a diff of this commit:
cvs rdiff -u -r1.795 -r1.796 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.13 -r1.14 src/tests/bin/sh/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/bin/sh/t_builtins.sh

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



CVS commit: src

2018-12-04 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Wed Dec  5 02:45:06 UTC 2018

Modified Files:
src/distrib/sets/lists/tests: mi
src/tests/bin/sh: Makefile
Added Files:
src/tests/bin/sh: t_builtins.sh

Log Message:
Add a new test program to test the "intermediate" shell built in
utilities.  That is, not the low level ones that look like syntax,
but aren't: break/continue/return; not those which are really
just external programs that are built in for efficiency (printf,
test, and kill - though kill really needs to be built in) - those
should all have separate test programs (there is a test here for the
built-in echo, as that is an entirely different thing to /bin/echo);
and also not those for which there are other tests because of the
nature of the built-in (like exit, wait, shift, ...).   Lastly not
"times" either as that just seems to be too hard to test rationally.

There is a test (well, framework) for ulimit and there's also t_ulimit.sh
one of those should go, but I am not yet sure which is the best way
to reconcile things.

Note: many (in fact) most of the test cases added here are either
entirely empty (no tests at all, beyond testing that the built-in is
in fact a shell built-in) or only very rudimentary tests - assistance
in fleshing those out would be welcome (the boilerplate is all here,
all that is needed is some actual tests to run...)


To generate a diff of this commit:
cvs rdiff -u -r1.795 -r1.796 src/distrib/sets/lists/tests/mi
cvs rdiff -u -r1.13 -r1.14 src/tests/bin/sh/Makefile
cvs rdiff -u -r0 -r1.1 src/tests/bin/sh/t_builtins.sh

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/tests/mi
diff -u src/distrib/sets/lists/tests/mi:1.795 src/distrib/sets/lists/tests/mi:1.796
--- src/distrib/sets/lists/tests/mi:1.795	Sun Sep 23 13:36:04 2018
+++ src/distrib/sets/lists/tests/mi	Wed Dec  5 02:45:05 2018
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.795 2018/09/23 13:36:04 christos Exp $
+# $NetBSD: mi,v 1.796 2018/12/05 02:45:05 kre Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1270,6 +1270,7 @@
 ./usr/tests/bin/sh/dotcmd/while_return_until	tests-bin-tests	compattestfile,atf
 ./usr/tests/bin/sh/dotcmd/while_return_while	tests-bin-tests	compattestfile,atf
 ./usr/tests/bin/sh/t_arith			tests-bin-tests		compattestfile,atf
+./usr/tests/bin/sh/t_builtins			tests-bin-tests		compattestfile,atf
 ./usr/tests/bin/sh/t_cmdsub			tests-bin-tests		compattestfile,atf
 ./usr/tests/bin/sh/t_compexit			tests-obsolete		obsolete
 ./usr/tests/bin/sh/t_evaltested			tests-bin-tests		compattestfile,atf

Index: src/tests/bin/sh/Makefile
diff -u src/tests/bin/sh/Makefile:1.13 src/tests/bin/sh/Makefile:1.14
--- src/tests/bin/sh/Makefile:1.13	Tue Jul 10 06:49:29 2018
+++ src/tests/bin/sh/Makefile	Wed Dec  5 02:45:06 2018
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.13 2018/07/10 06:49:29 kre Exp $
+# $NetBSD: Makefile,v 1.14 2018/12/05 02:45:06 kre Exp $
 #
 
 .include 
@@ -8,6 +8,7 @@ TESTSDIR = ${TESTSBASE}/bin/sh
 TESTS_SUBDIRS += dotcmd
 
 TESTS_SH+=	t_arith
+TESTS_SH+=	t_builtins
 TESTS_SH+=	t_cmdsub
 TESTS_SH+=	t_evaltested
 TESTS_SH+=	t_exit

Added files:

Index: src/tests/bin/sh/t_builtins.sh
diff -u /dev/null src/tests/bin/sh/t_builtins.sh:1.1
--- /dev/null	Wed Dec  5 02:45:06 2018
+++ src/tests/bin/sh/t_builtins.sh	Wed Dec  5 02:45:06 2018
@@ -0,0 +1,793 @@
+# $NetBSD: t_builtins.sh,v 1.1 2018/12/05 02:45:06 kre Exp $
+#
+# Copyright (c) 2017 The NetBSD Foundation, Inc.
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+#
+# THIS SOFTWARE IS PROVIDED BY THE 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.
+#
+# the implementation of "sh" to test
+: ${TEST_SH:="/bin/sh"}
+
+#

re: CVS commit: src/sys/arch/x86/x86

2018-12-04 Thread matthew green
Joerg Sonnenberger writes:
> On Tue, Dec 04, 2018 at 07:27:22PM +, Cherry G. Mathew wrote:
> > Module Name:src
> > Committed By:   cherry
> > Date:   Tue Dec  4 19:27:22 UTC 2018
> > 
> > Modified Files:
> > src/sys/arch/x86/x86: cpu.c intr.c
> > 
> > Log Message:
> > Hypothetically speaking, if one were to want to compile a
> > 
> > 'no options MULTIPROCESSOR'
> > 
> > kernel, these files may trip up the build.
> > 
> > Fix them by moving around the #defines as originally intended.
> 
> Well, MULTIPROCESSOR is *not* meant to be optional on x86.

true, but it's always been very simple to keep working.  i've
commited simple fixes like this maybe twice before..


.mrg.


CVS commit: src/sys/sys

2018-12-04 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Dec  4 22:06:37 UTC 2018

Modified Files:
src/sys/sys: cdefs.h

Log Message:
Stop mangling __func__ for C++11 and newer

Drop local logic between GCC 2.4 and GCC 2.6 that used __PRETTY_FUNCTION__.
This caused __func__ to be redefined for all C++ programs and use a
different behavior than intended by the compiler (Clang and GCC).
__PRETTY_FUNCTION__ prints all the prototype not just function name,
contrary to __FUNCTION__ and __func__.

__func__ is now an integral part of C99 and C++11, shipped by a compiler.

This change aligns the behavior of C++ programs using __func__ to other
Operating Systems. The difference caused unnecessary fallout in regression
test suites in projects (LLVM, fish, ...).


To generate a diff of this commit:
cvs rdiff -u -r1.137 -r1.138 src/sys/sys/cdefs.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/sys/cdefs.h
diff -u src/sys/sys/cdefs.h:1.137 src/sys/sys/cdefs.h:1.138
--- src/sys/sys/cdefs.h:1.137	Wed Aug 22 12:07:43 2018
+++ src/sys/sys/cdefs.h	Tue Dec  4 22:06:36 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: cdefs.h,v 1.137 2018/08/22 12:07:43 maxv Exp $	*/
+/*	$NetBSD: cdefs.h,v 1.138 2018/12/04 22:06:36 kamil Exp $	*/
 
 /* * Copyright (c) 1991, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -414,18 +414,16 @@
 #endif
 
 /*
- * C99 defines __func__ predefined identifier, which was made available
- * in GCC 2.95.
+ * C99 and C++11 define __func__ predefined identifier, which was made
+ * available in GCC 2.95.
  */
-#if !(__STDC_VERSION__ >= 199901L)
-#if __GNUC_PREREQ__(2, 6)
-#define	__func__	__PRETTY_FUNCTION__
-#elif __GNUC_PREREQ__(2, 4)
+#if !(__STDC_VERSION__ >= 199901L) && !(__cplusplus - 0 >= 201103L)
+#if __GNUC_PREREQ__(2, 4)
 #define	__func__	__FUNCTION__
 #else
 #define	__func__	""
 #endif
-#endif /* !(__STDC_VERSION__ >= 199901L) */
+#endif /* !(__STDC_VERSION__ >= 199901L) && !(__cplusplus - 0 >= 201103L) */
 
 #if defined(_KERNEL)
 #if defined(NO_KERNEL_RCSIDS)



Re: CVS commit: src/sys/arch/x86/x86

2018-12-04 Thread Joerg Sonnenberger
On Tue, Dec 04, 2018 at 07:27:22PM +, Cherry G. Mathew wrote:
> Module Name:  src
> Committed By: cherry
> Date: Tue Dec  4 19:27:22 UTC 2018
> 
> Modified Files:
>   src/sys/arch/x86/x86: cpu.c intr.c
> 
> Log Message:
> Hypothetically speaking, if one were to want to compile a
> 
> 'no options MULTIPROCESSOR'
> 
> kernel, these files may trip up the build.
> 
> Fix them by moving around the #defines as originally intended.

Well, MULTIPROCESSOR is *not* meant to be optional on x86.

Joerg


CVS commit: src/sys/netinet6

2018-12-04 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Dec  4 21:16:54 UTC 2018

Modified Files:
src/sys/netinet6: nd6_nbr.c

Log Message:
inet6: remove needless ifa_release.


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/sys/netinet6/nd6_nbr.c

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

Modified files:

Index: src/sys/netinet6/nd6_nbr.c
diff -u src/sys/netinet6/nd6_nbr.c:1.160 src/sys/netinet6/nd6_nbr.c:1.161
--- src/sys/netinet6/nd6_nbr.c:1.160	Tue Dec  4 21:01:48 2018
+++ src/sys/netinet6/nd6_nbr.c	Tue Dec  4 21:16:54 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_nbr.c,v 1.160 2018/12/04 21:01:48 roy Exp $	*/
+/*	$NetBSD: nd6_nbr.c,v 1.161 2018/12/04 21:16:54 roy Exp $	*/
 /*	$KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.160 2018/12/04 21:01:48 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.161 2018/12/04 21:16:54 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -306,11 +306,9 @@ nd6_ns_input(struct mbuf *m, int off, in
 		 */
 		if (IN6_IS_ADDR_UNSPECIFIED())
 			nd6_dad_input(ifa, ndopts.nd_opts_nonce);
-		ifa_release(ifa, _ia);
-		ifa = NULL;
-
 		goto freeit;
 	}
+
 	ifa_release(ifa, _ia);
 	ifa = NULL;
 



CVS commit: src/sys/netinet6

2018-12-04 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Dec  4 21:16:54 UTC 2018

Modified Files:
src/sys/netinet6: nd6_nbr.c

Log Message:
inet6: remove needless ifa_release.


To generate a diff of this commit:
cvs rdiff -u -r1.160 -r1.161 src/sys/netinet6/nd6_nbr.c

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



CVS commit: src/sys/netinet6

2018-12-04 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Dec  4 21:01:48 UTC 2018

Modified Files:
src/sys/netinet6: nd6_nbr.c

Log Message:
inet6: use one function for nd6_dad_input

Having different ones for NA and NS is a bit wasteful.


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/sys/netinet6/nd6_nbr.c

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

Modified files:

Index: src/sys/netinet6/nd6_nbr.c
diff -u src/sys/netinet6/nd6_nbr.c:1.159 src/sys/netinet6/nd6_nbr.c:1.160
--- src/sys/netinet6/nd6_nbr.c:1.159	Tue Dec  4 20:46:56 2018
+++ src/sys/netinet6/nd6_nbr.c	Tue Dec  4 21:01:48 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_nbr.c,v 1.159 2018/12/04 20:46:56 roy Exp $	*/
+/*	$NetBSD: nd6_nbr.c,v 1.160 2018/12/04 21:01:48 roy Exp $	*/
 /*	$KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.159 2018/12/04 20:46:56 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.160 2018/12/04 21:01:48 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -81,8 +81,7 @@ static void nd6_dad_starttimer(struct da
 static void nd6_dad_destroytimer(struct dadq *);
 static void nd6_dad_timer(struct dadq *);
 static void nd6_dad_ns_output(struct dadq *, struct ifaddr *);
-static void nd6_dad_ns_input(struct ifaddr *, struct nd_opt_nonce *);
-static void nd6_dad_na_input(struct ifaddr *);
+static void nd6_dad_input(struct ifaddr *, struct nd_opt_nonce *);
 static void nd6_dad_duplicated(struct ifaddr *, struct dadq *);
 
 static int dad_maxtry = 15;	/* max # of *tries* to transmit DAD packet */
@@ -306,7 +305,7 @@ nd6_ns_input(struct mbuf *m, int off, in
 		 * silently ignore it.
 		 */
 		if (IN6_IS_ADDR_UNSPECIFIED())
-			nd6_dad_ns_input(ifa, ndopts.nd_opts_nonce);
+			nd6_dad_input(ifa, ndopts.nd_opts_nonce);
 		ifa_release(ifa, _ia);
 		ifa = NULL;
 
@@ -663,7 +662,7 @@ nd6_na_input(struct mbuf *m, int off, in
 	 */
 	if (ifa) {
 		if (((struct in6_ifaddr *)ifa)->ia6_flags & IN6_IFF_TENTATIVE)
-			nd6_dad_na_input(ifa);
+			nd6_dad_input(ifa, NULL);
 		else
 			log(LOG_ERR,
 			"nd6_na_input: duplicate IP6 address %s\n",
@@ -1446,7 +1445,7 @@ nd6_dad_ns_output(struct dadq *dp, struc
 }
 
 static void
-nd6_dad_ns_input(struct ifaddr *ifa, struct nd_opt_nonce *nonce)
+nd6_dad_input(struct ifaddr *ifa, struct nd_opt_nonce *nonce)
 {
 	struct dadq *dp;
 	bool found_nonce = false;
@@ -1466,24 +1465,3 @@ nd6_dad_ns_input(struct ifaddr *ifa, str
 		ifafree(ifa);
 	}
 }
-
-static void
-nd6_dad_na_input(struct ifaddr *ifa)
-{
-	struct dadq *dp;
-
-	KASSERT(ifa != NULL);
-
-	mutex_enter(_dad_lock);
-	dp = nd6_dad_find(ifa, NULL, NULL);
-	if (dp == NULL) {
-		mutex_exit(_dad_lock);
-		return;
-	}
-
-	nd6_dad_duplicated(ifa, dp);
-	nd6_dad_stoptimer(dp);
-	mutex_exit(_dad_lock);
-	nd6_dad_destroytimer(dp);
-	ifafree(ifa);
-}



CVS commit: src/sys/netinet6

2018-12-04 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Dec  4 21:01:48 UTC 2018

Modified Files:
src/sys/netinet6: nd6_nbr.c

Log Message:
inet6: use one function for nd6_dad_input

Having different ones for NA and NS is a bit wasteful.


To generate a diff of this commit:
cvs rdiff -u -r1.159 -r1.160 src/sys/netinet6/nd6_nbr.c

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



CVS commit: src/sys/netinet6

2018-12-04 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Dec  4 20:46:56 UTC 2018

Modified Files:
src/sys/netinet6: nd6_nbr.c

Log Message:
inet6: simplify NA DaD checking


To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.159 src/sys/netinet6/nd6_nbr.c

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

Modified files:

Index: src/sys/netinet6/nd6_nbr.c
diff -u src/sys/netinet6/nd6_nbr.c:1.158 src/sys/netinet6/nd6_nbr.c:1.159
--- src/sys/netinet6/nd6_nbr.c:1.158	Tue Dec  4 12:23:43 2018
+++ src/sys/netinet6/nd6_nbr.c	Tue Dec  4 20:46:56 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_nbr.c,v 1.158 2018/12/04 12:23:43 roy Exp $	*/
+/*	$NetBSD: nd6_nbr.c,v 1.159 2018/12/04 20:46:56 roy Exp $	*/
 /*	$KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.158 2018/12/04 12:23:43 roy Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.159 2018/12/04 20:46:56 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -661,20 +661,13 @@ nd6_na_input(struct mbuf *m, int off, in
 	 *
 	 * Otherwise, process as defined in RFC 2461.
 	 */
-	if (ifa &&
-	(((struct in6_ifaddr *)ifa)->ia6_flags & IN6_IFF_TENTATIVE))
-	{
-		nd6_dad_na_input(ifa);
-		ifa_release(ifa, _ia);
-		ifa = NULL;
-		goto freeit;
-	}
-
-	/* Just for safety, maybe unnecessary. */
 	if (ifa) {
-		log(LOG_ERR,
-		"nd6_na_input: duplicate IP6 address %s\n",
-		IN6_PRINT(ip6buf, ));
+		if (((struct in6_ifaddr *)ifa)->ia6_flags & IN6_IFF_TENTATIVE)
+			nd6_dad_na_input(ifa);
+		else
+			log(LOG_ERR,
+			"nd6_na_input: duplicate IP6 address %s\n",
+			IN6_PRINT(ip6buf, ));
 		ifa_release(ifa, _ia);
 		ifa = NULL;
 		goto freeit;



CVS commit: src/sys/netinet6

2018-12-04 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Dec  4 20:46:56 UTC 2018

Modified Files:
src/sys/netinet6: nd6_nbr.c

Log Message:
inet6: simplify NA DaD checking


To generate a diff of this commit:
cvs rdiff -u -r1.158 -r1.159 src/sys/netinet6/nd6_nbr.c

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



CVS commit: src/sys/dev/pci

2018-12-04 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Dec  4 19:54:02 UTC 2018

Modified Files:
src/sys/dev/pci: mpii.c

Log Message:
NULL-terminate mpii_devices[], this is the end condition of the loop
in mpii_match(). Noticed by Mike Pumford


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/pci/mpii.c

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

Modified files:

Index: src/sys/dev/pci/mpii.c
diff -u src/sys/dev/pci/mpii.c:1.16 src/sys/dev/pci/mpii.c:1.17
--- src/sys/dev/pci/mpii.c:1.16	Mon Dec  3 23:23:30 2018
+++ src/sys/dev/pci/mpii.c	Tue Dec  4 19:54:02 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: mpii.c,v 1.16 2018/12/03 23:23:30 bouyer Exp $ */
+/* $NetBSD: mpii.c,v 1.17 2018/12/04 19:54:02 bouyer Exp $ */
 /*	$OpenBSD: mpii.c,v 1.115 2018/08/14 05:22:21 jmatthew Exp $	*/
 /*
  * Copyright (c) 2010, 2012 Mike Belopuhov
@@ -20,7 +20,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.16 2018/12/03 23:23:30 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpii.c,v 1.17 2018/12/04 19:54:02 bouyer Exp $");
 
 #include "bio.h"
 
@@ -433,7 +433,8 @@ static const struct mpii_pci_product {
 	{ PCI_VENDOR_SYMBIOS,	PCI_PRODUCT_SYMBIOS_SAS3508 },
 	{ PCI_VENDOR_SYMBIOS,	PCI_PRODUCT_SYMBIOS_SAS3508_1 },
 	{ PCI_VENDOR_SYMBIOS,	PCI_PRODUCT_SYMBIOS_SAS3516 },
-	{ PCI_VENDOR_SYMBIOS,	PCI_PRODUCT_SYMBIOS_SAS3516_1 }
+	{ PCI_VENDOR_SYMBIOS,	PCI_PRODUCT_SYMBIOS_SAS3516_1 },
+	{ 0, 0}
 };
 
 int



CVS commit: src/sys/dev/pci

2018-12-04 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Dec  4 19:54:02 UTC 2018

Modified Files:
src/sys/dev/pci: mpii.c

Log Message:
NULL-terminate mpii_devices[], this is the end condition of the loop
in mpii_match(). Noticed by Mike Pumford


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/pci/mpii.c

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



CVS commit: src/sys/dev/pci

2018-12-04 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Dec  4 19:34:27 UTC 2018

Modified Files:
src/sys/dev/pci: ahcisata_pci.c

Log Message:
disable MSI-X for time being since it's not working; allow only MSI
and INTx which both are confirmed working


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/pci/ahcisata_pci.c

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

Modified files:

Index: src/sys/dev/pci/ahcisata_pci.c
diff -u src/sys/dev/pci/ahcisata_pci.c:1.48 src/sys/dev/pci/ahcisata_pci.c:1.49
--- src/sys/dev/pci/ahcisata_pci.c:1.48	Fri Nov 30 17:47:54 2018
+++ src/sys/dev/pci/ahcisata_pci.c	Tue Dec  4 19:34:27 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisata_pci.c,v 1.48 2018/11/30 17:47:54 jdolecek Exp $	*/
+/*	$NetBSD: ahcisata_pci.c,v 1.49 2018/12/04 19:34:27 jdolecek Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.48 2018/11/30 17:47:54 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.49 2018/12/04 19:34:27 jdolecek Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ahcisata_pci.h"
@@ -311,8 +311,14 @@ ahci_pci_attach(device_t parent, device_
 
 	pci_aprint_devinfo(pa, "AHCI disk controller");
 
+	int counts[PCI_INTR_TYPE_SIZE] = {
+		[PCI_INTR_TYPE_INTX] = 1,
+		[PCI_INTR_TYPE_MSI] = 1,
+		[PCI_INTR_TYPE_MSIX] = 0, /* XXX not working */
+	};
+
 	/* Allocate and establish the interrupt. */
-	if (pci_intr_alloc(pa, >sc_pihp, NULL, 0)) {
+	if (pci_intr_alloc(pa, >sc_pihp, counts, PCI_INTR_TYPE_MSI)) {
 		aprint_error_dev(self, "can't allocate handler\n");
 		goto fail;
 	}



CVS commit: src/sys/dev/pci

2018-12-04 Thread Jaromir Dolecek
Module Name:src
Committed By:   jdolecek
Date:   Tue Dec  4 19:34:27 UTC 2018

Modified Files:
src/sys/dev/pci: ahcisata_pci.c

Log Message:
disable MSI-X for time being since it's not working; allow only MSI
and INTx which both are confirmed working


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/dev/pci/ahcisata_pci.c

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



CVS commit: src/sys/arch/x86/x86

2018-12-04 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Tue Dec  4 19:27:22 UTC 2018

Modified Files:
src/sys/arch/x86/x86: cpu.c intr.c

Log Message:
Hypothetically speaking, if one were to want to compile a

'no options MULTIPROCESSOR'

kernel, these files may trip up the build.

Fix them by moving around the #defines as originally intended.

No Functional Changes.


To generate a diff of this commit:
cvs rdiff -u -r1.163 -r1.164 src/sys/arch/x86/x86/cpu.c
cvs rdiff -u -r1.136 -r1.137 src/sys/arch/x86/x86/intr.c

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

Modified files:

Index: src/sys/arch/x86/x86/cpu.c
diff -u src/sys/arch/x86/x86/cpu.c:1.163 src/sys/arch/x86/x86/cpu.c:1.164
--- src/sys/arch/x86/x86/cpu.c:1.163	Tue Dec  4 19:22:42 2018
+++ src/sys/arch/x86/x86/cpu.c	Tue Dec  4 19:27:22 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.163 2018/12/04 19:22:42 cherry Exp $	*/
+/*	$NetBSD: cpu.c,v 1.164 2018/12/04 19:27:22 cherry Exp $	*/
 
 /*
  * Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.163 2018/12/04 19:22:42 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.164 2018/12/04 19:27:22 cherry Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mpbios.h"		/* for MPDEBUG */
@@ -188,10 +188,10 @@ struct cpu_info *cpu_starting;
 void	cpu_hatch(void *);
 static void	cpu_boot_secondary(struct cpu_info *ci);
 static void	cpu_start_secondary(struct cpu_info *ci);
-#endif
 #if NLAPIC > 0
 static void	cpu_copy_trampoline(paddr_t);
 #endif
+#endif /* MULTIPROCESSOR */
 
 /*
  * Runs once per boot once multiprocessor goo has been detected and
@@ -987,6 +987,7 @@ cpu_debug_dump(void)
 }
 #endif
 
+#ifdef MULTIPROCESSOR
 #if NLAPIC > 0
 static void
 cpu_copy_trampoline(paddr_t pdir_pa)
@@ -1028,7 +1029,6 @@ cpu_copy_trampoline(paddr_t pdir_pa)
 }
 #endif
 
-#ifdef MULTIPROCESSOR
 int
 mp_cpu_start(struct cpu_info *ci, paddr_t target)
 {

Index: src/sys/arch/x86/x86/intr.c
diff -u src/sys/arch/x86/x86/intr.c:1.136 src/sys/arch/x86/x86/intr.c:1.137
--- src/sys/arch/x86/x86/intr.c:1.136	Sun Dec  2 08:19:44 2018
+++ src/sys/arch/x86/x86/intr.c	Tue Dec  4 19:27:22 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.136 2018/12/02 08:19:44 cherry Exp $	*/
+/*	$NetBSD: intr.c,v 1.137 2018/12/04 19:27:22 cherry Exp $	*/
 
 /*
  * Copyright (c) 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -133,7 +133,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.136 2018/12/02 08:19:44 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.137 2018/12/04 19:27:22 cherry Exp $");
 
 #include "opt_intrdebug.h"
 #include "opt_multiprocessor.h"
@@ -1493,7 +1493,9 @@ void
 cpu_intr_init(struct cpu_info *ci)
 {
 #if !defined(XEN)
+#if (NLAPIC > 0) || defined(MULTIPROCESSOR) || defined(__HAVE_PREEMPTION)
 	struct intrsource *isp;
+#endif
 #if NLAPIC > 0
 	static int first = 1;
 #if defined(MULTIPROCESSOR)



CVS commit: src/sys/arch/x86/x86

2018-12-04 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Tue Dec  4 19:27:22 UTC 2018

Modified Files:
src/sys/arch/x86/x86: cpu.c intr.c

Log Message:
Hypothetically speaking, if one were to want to compile a

'no options MULTIPROCESSOR'

kernel, these files may trip up the build.

Fix them by moving around the #defines as originally intended.

No Functional Changes.


To generate a diff of this commit:
cvs rdiff -u -r1.163 -r1.164 src/sys/arch/x86/x86/cpu.c
cvs rdiff -u -r1.136 -r1.137 src/sys/arch/x86/x86/intr.c

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



CVS commit: src/sys/arch/x86/x86

2018-12-04 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Tue Dec  4 19:22:42 UTC 2018

Modified Files:
src/sys/arch/x86/x86: cpu.c

Log Message:
Stop panic()ing on a UP system.

The reason for the panic is that the cpu_attach() doesn't run to
completion because it thinks it's run past maxcpus (which in the case
of UP), is 1.

This is because on x86 at least, mi_cpu_attach() is called *before*
configure() (and thus the cpu_match()/cpu_attach() pair). Thus ncpu
has already been incremented by the time MD cpu_attach() is called.

Fix this.


To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/sys/arch/x86/x86/cpu.c

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

Modified files:

Index: src/sys/arch/x86/x86/cpu.c
diff -u src/sys/arch/x86/x86/cpu.c:1.162 src/sys/arch/x86/x86/cpu.c:1.163
--- src/sys/arch/x86/x86/cpu.c:1.162	Mon Nov 12 18:10:36 2018
+++ src/sys/arch/x86/x86/cpu.c	Tue Dec  4 19:22:42 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.162 2018/11/12 18:10:36 maxv Exp $	*/
+/*	$NetBSD: cpu.c,v 1.163 2018/12/04 19:22:42 cherry Exp $	*/
 
 /*
  * Copyright (c) 2000-2012 NetBSD Foundation, Inc.
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.162 2018/11/12 18:10:36 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.163 2018/12/04 19:22:42 cherry Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mpbios.h"		/* for MPDEBUG */
@@ -320,7 +320,7 @@ cpu_attach(device_t parent, device_t sel
 
 	sc->sc_dev = self;
 
-	if (ncpu == maxcpus) {
+	if (ncpu > maxcpus) {
 #ifndef _LP64
 		aprint_error(": too many CPUs, please use NetBSD/amd64\n");
 #else



CVS commit: src/sys/arch/x86/x86

2018-12-04 Thread Cherry G. Mathew
Module Name:src
Committed By:   cherry
Date:   Tue Dec  4 19:22:42 UTC 2018

Modified Files:
src/sys/arch/x86/x86: cpu.c

Log Message:
Stop panic()ing on a UP system.

The reason for the panic is that the cpu_attach() doesn't run to
completion because it thinks it's run past maxcpus (which in the case
of UP), is 1.

This is because on x86 at least, mi_cpu_attach() is called *before*
configure() (and thus the cpu_match()/cpu_attach() pair). Thus ncpu
has already been incremented by the time MD cpu_attach() is called.

Fix this.


To generate a diff of this commit:
cvs rdiff -u -r1.162 -r1.163 src/sys/arch/x86/x86/cpu.c

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



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

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 19:18:44 UTC 2018

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

Log Message:
Ticket #1662


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.119 -r1.1.2.120 src/doc/CHANGES-7.0.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-7.0.3
diff -u src/doc/CHANGES-7.0.3:1.1.2.119 src/doc/CHANGES-7.0.3:1.1.2.120
--- src/doc/CHANGES-7.0.3:1.1.2.119	Fri Nov 30 10:41:14 2018
+++ src/doc/CHANGES-7.0.3	Tue Dec  4 19:18:44 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.0.3,v 1.1.2.119 2018/11/30 10:41:14 martin Exp $
+# $NetBSD: CHANGES-7.0.3,v 1.1.2.120 2018/12/04 19:18:44 martin Exp $
 
 A complete list of changes from the NetBSD 7.0.2 release to the NetBSD 7.0.3
 release:
@@ -5614,3 +5614,8 @@ sys/kern/kern_sig.c1.350
 	Fix kernel info leak.
 	[maxv, ticket #1661]
 
+sys/arch/amd64/amd64/machdep.c			1.321
+
+	Fix stack info leak.
+	[maxv, ticket #1662]
+



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

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 19:18:44 UTC 2018

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

Log Message:
Ticket #1662


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.119 -r1.1.2.120 src/doc/CHANGES-7.0.3

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



CVS commit: [netbsd-7-0] src/sys/arch/amd64/amd64

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 19:18:12 UTC 2018

Modified Files:
src/sys/arch/amd64/amd64 [netbsd-7-0]: machdep.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #1662):

sys/arch/amd64/amd64/machdep.c: revision 1.321

Fix stack info leak. There is a big padding in struct sigframe_siginfo.

[  224.006287] kleak: Possible leak in copyout: [len=920, leaked=92]
[  224.016977] #0 0x80224d0a in kleak_note 
[  224.026268] #1 0x80224d8a in kleak_copyout 
[  224.026268] #2 0x802224b5 in sendsig_siginfo 
[  224.036261] #3 0x80b51564 in sendsig 
[  224.046475] #4 0x80b51282 in postsig 
[  224.046475] #5 0x80b2fc5d in lwp_userret 
[  224.056273] #6 0x8025a951 in mi_userret 
[  224.066277] #7 0x8025ab89 in syscall 


To generate a diff of this commit:
cvs rdiff -u -r1.211.6.2 -r1.211.6.3 src/sys/arch/amd64/amd64/machdep.c

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



CVS commit: [netbsd-7-0] src/sys/arch/amd64/amd64

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 19:18:12 UTC 2018

Modified Files:
src/sys/arch/amd64/amd64 [netbsd-7-0]: machdep.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #1662):

sys/arch/amd64/amd64/machdep.c: revision 1.321

Fix stack info leak. There is a big padding in struct sigframe_siginfo.

[  224.006287] kleak: Possible leak in copyout: [len=920, leaked=92]
[  224.016977] #0 0x80224d0a in kleak_note 
[  224.026268] #1 0x80224d8a in kleak_copyout 
[  224.026268] #2 0x802224b5 in sendsig_siginfo 
[  224.036261] #3 0x80b51564 in sendsig 
[  224.046475] #4 0x80b51282 in postsig 
[  224.046475] #5 0x80b2fc5d in lwp_userret 
[  224.056273] #6 0x8025a951 in mi_userret 
[  224.066277] #7 0x8025ab89 in syscall 


To generate a diff of this commit:
cvs rdiff -u -r1.211.6.2 -r1.211.6.3 src/sys/arch/amd64/amd64/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/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.211.6.2 src/sys/arch/amd64/amd64/machdep.c:1.211.6.3
--- src/sys/arch/amd64/amd64/machdep.c:1.211.6.2	Mon Jan 22 19:40:25 2018
+++ src/sys/arch/amd64/amd64/machdep.c	Tue Dec  4 19:18:12 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.211.6.2 2018/01/22 19:40:25 snj Exp $	*/
+/*	$NetBSD: machdep.c,v 1.211.6.3 2018/12/04 19:18:12 martin Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.211.6.2 2018/01/22 19:40:25 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.211.6.3 2018/12/04 19:18:12 martin Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -570,6 +570,7 @@ sendsig_siginfo(const ksiginfo_t *ksi, c
 	/* Round down the stackpointer to a multiple of 16 for the ABI. */
 	fp = (struct sigframe_siginfo *)(((unsigned long)sp & ~15) - 8);
 
+	memset(, 0, sizeof(frame));
 	frame.sf_ra = (uint64_t)ps->sa_sigdesc[sig].sd_tramp;
 	frame.sf_si._info = ksi->ksi_info;
 	frame.sf_uc.uc_flags = _UC_SIGMASK;
@@ -577,7 +578,6 @@ sendsig_siginfo(const ksiginfo_t *ksi, c
 	frame.sf_uc.uc_link = l->l_ctxlink;
 	frame.sf_uc.uc_flags |= (l->l_sigstk.ss_flags & SS_ONSTACK)
 	? _UC_SETSTACK : _UC_CLRSTACK;
-	memset(_uc.uc_stack, 0, sizeof(frame.sf_uc.uc_stack));
 	sendsig_reset(l, sig);
 
 	mutex_exit(p->p_lock);



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

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 19:17:46 UTC 2018

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

Log Message:
Ticket #1662


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/doc/CHANGES-7.1.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-7.1.3
diff -u src/doc/CHANGES-7.1.3:1.1.2.26 src/doc/CHANGES-7.1.3:1.1.2.27
--- src/doc/CHANGES-7.1.3:1.1.2.26	Fri Nov 30 10:39:48 2018
+++ src/doc/CHANGES-7.1.3	Tue Dec  4 19:17:46 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.1.3,v 1.1.2.26 2018/11/30 10:39:48 martin Exp $
+# $NetBSD: CHANGES-7.1.3,v 1.1.2.27 2018/12/04 19:17:46 martin Exp $
 
 A complete list of changes from the NetBSD 7.1.2 release to the NetBSD 7.1.3
 release:
@@ -306,3 +306,8 @@ sys/kern/kern_sig.c1.350
 	Fix kernel info leak.
 	[maxv, ticket #1661]
 
+sys/arch/amd64/amd64/machdep.c			1.321
+
+	Fix stack info leak.
+	[maxv, ticket #1662]
+



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

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 19:17:46 UTC 2018

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

Log Message:
Ticket #1662


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/doc/CHANGES-7.1.3

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



CVS commit: [netbsd-7-1] src/sys/arch/amd64/amd64

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 19:17:24 UTC 2018

Modified Files:
src/sys/arch/amd64/amd64 [netbsd-7-1]: machdep.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #1662):

sys/arch/amd64/amd64/machdep.c: revision 1.321

Fix stack info leak. There is a big padding in struct sigframe_siginfo.

[  224.006287] kleak: Possible leak in copyout: [len=920, leaked=92]
[  224.016977] #0 0x80224d0a in kleak_note 
[  224.026268] #1 0x80224d8a in kleak_copyout 
[  224.026268] #2 0x802224b5 in sendsig_siginfo 
[  224.036261] #3 0x80b51564 in sendsig 
[  224.046475] #4 0x80b51282 in postsig 
[  224.046475] #5 0x80b2fc5d in lwp_userret 
[  224.056273] #6 0x8025a951 in mi_userret 
[  224.066277] #7 0x8025ab89 in syscall 


To generate a diff of this commit:
cvs rdiff -u -r1.211.10.2 -r1.211.10.3 src/sys/arch/amd64/amd64/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/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.211.10.2 src/sys/arch/amd64/amd64/machdep.c:1.211.10.3
--- src/sys/arch/amd64/amd64/machdep.c:1.211.10.2	Mon Jan 22 19:40:58 2018
+++ src/sys/arch/amd64/amd64/machdep.c	Tue Dec  4 19:17:24 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.211.10.2 2018/01/22 19:40:58 snj Exp $	*/
+/*	$NetBSD: machdep.c,v 1.211.10.3 2018/12/04 19:17:24 martin Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.211.10.2 2018/01/22 19:40:58 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.211.10.3 2018/12/04 19:17:24 martin Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -570,6 +570,7 @@ sendsig_siginfo(const ksiginfo_t *ksi, c
 	/* Round down the stackpointer to a multiple of 16 for the ABI. */
 	fp = (struct sigframe_siginfo *)(((unsigned long)sp & ~15) - 8);
 
+	memset(, 0, sizeof(frame));
 	frame.sf_ra = (uint64_t)ps->sa_sigdesc[sig].sd_tramp;
 	frame.sf_si._info = ksi->ksi_info;
 	frame.sf_uc.uc_flags = _UC_SIGMASK;
@@ -577,7 +578,6 @@ sendsig_siginfo(const ksiginfo_t *ksi, c
 	frame.sf_uc.uc_link = l->l_ctxlink;
 	frame.sf_uc.uc_flags |= (l->l_sigstk.ss_flags & SS_ONSTACK)
 	? _UC_SETSTACK : _UC_CLRSTACK;
-	memset(_uc.uc_stack, 0, sizeof(frame.sf_uc.uc_stack));
 	sendsig_reset(l, sig);
 
 	mutex_exit(p->p_lock);



CVS commit: [netbsd-7-1] src/sys/arch/amd64/amd64

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 19:17:24 UTC 2018

Modified Files:
src/sys/arch/amd64/amd64 [netbsd-7-1]: machdep.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #1662):

sys/arch/amd64/amd64/machdep.c: revision 1.321

Fix stack info leak. There is a big padding in struct sigframe_siginfo.

[  224.006287] kleak: Possible leak in copyout: [len=920, leaked=92]
[  224.016977] #0 0x80224d0a in kleak_note 
[  224.026268] #1 0x80224d8a in kleak_copyout 
[  224.026268] #2 0x802224b5 in sendsig_siginfo 
[  224.036261] #3 0x80b51564 in sendsig 
[  224.046475] #4 0x80b51282 in postsig 
[  224.046475] #5 0x80b2fc5d in lwp_userret 
[  224.056273] #6 0x8025a951 in mi_userret 
[  224.066277] #7 0x8025ab89 in syscall 


To generate a diff of this commit:
cvs rdiff -u -r1.211.10.2 -r1.211.10.3 src/sys/arch/amd64/amd64/machdep.c

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



CVS commit: [netbsd-7] src/doc

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 19:17:00 UTC 2018

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

Log Message:
Ticket #1662


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.21 -r1.1.2.22 src/doc/CHANGES-7.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-7.3
diff -u src/doc/CHANGES-7.3:1.1.2.21 src/doc/CHANGES-7.3:1.1.2.22
--- src/doc/CHANGES-7.3:1.1.2.21	Fri Nov 30 10:37:10 2018
+++ src/doc/CHANGES-7.3	Tue Dec  4 19:17:00 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-7.3,v 1.1.2.21 2018/11/30 10:37:10 martin Exp $
+# $NetBSD: CHANGES-7.3,v 1.1.2.22 2018/12/04 19:17:00 martin Exp $
 
 A complete list of changes from the NetBSD 7.2 release to the NetBSD 7.3
 release:
@@ -314,3 +314,8 @@ sys/kern/kern_sig.c1.350
 	Fix kernel info leak.
 	[maxv, ticket #1661]
 
+sys/arch/amd64/amd64/machdep.c			1.321
+
+	Fix stack info leak.
+	[maxv, ticket #1662]
+



CVS commit: [netbsd-7] src/doc

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 19:17:00 UTC 2018

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

Log Message:
Ticket #1662


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.21 -r1.1.2.22 src/doc/CHANGES-7.3

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



CVS commit: [netbsd-7] src/sys/arch/amd64/amd64

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 19:16:27 UTC 2018

Modified Files:
src/sys/arch/amd64/amd64 [netbsd-7]: machdep.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #1662):

sys/arch/amd64/amd64/machdep.c: revision 1.321

Fix stack info leak. There is a big padding in struct sigframe_siginfo.

[  224.006287] kleak: Possible leak in copyout: [len=920, leaked=92]
[  224.016977] #0 0x80224d0a in kleak_note 
[  224.026268] #1 0x80224d8a in kleak_copyout 
[  224.026268] #2 0x802224b5 in sendsig_siginfo 
[  224.036261] #3 0x80b51564 in sendsig 
[  224.046475] #4 0x80b51282 in postsig 
[  224.046475] #5 0x80b2fc5d in lwp_userret 
[  224.056273] #6 0x8025a951 in mi_userret 
[  224.066277] #7 0x8025ab89 in syscall 


To generate a diff of this commit:
cvs rdiff -u -r1.211.2.2 -r1.211.2.3 src/sys/arch/amd64/amd64/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/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.211.2.2 src/sys/arch/amd64/amd64/machdep.c:1.211.2.3
--- src/sys/arch/amd64/amd64/machdep.c:1.211.2.2	Mon Jan 22 19:41:08 2018
+++ src/sys/arch/amd64/amd64/machdep.c	Tue Dec  4 19:16:27 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.211.2.2 2018/01/22 19:41:08 snj Exp $	*/
+/*	$NetBSD: machdep.c,v 1.211.2.3 2018/12/04 19:16:27 martin Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.211.2.2 2018/01/22 19:41:08 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.211.2.3 2018/12/04 19:16:27 martin Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -570,6 +570,7 @@ sendsig_siginfo(const ksiginfo_t *ksi, c
 	/* Round down the stackpointer to a multiple of 16 for the ABI. */
 	fp = (struct sigframe_siginfo *)(((unsigned long)sp & ~15) - 8);
 
+	memset(, 0, sizeof(frame));
 	frame.sf_ra = (uint64_t)ps->sa_sigdesc[sig].sd_tramp;
 	frame.sf_si._info = ksi->ksi_info;
 	frame.sf_uc.uc_flags = _UC_SIGMASK;
@@ -577,7 +578,6 @@ sendsig_siginfo(const ksiginfo_t *ksi, c
 	frame.sf_uc.uc_link = l->l_ctxlink;
 	frame.sf_uc.uc_flags |= (l->l_sigstk.ss_flags & SS_ONSTACK)
 	? _UC_SETSTACK : _UC_CLRSTACK;
-	memset(_uc.uc_stack, 0, sizeof(frame.sf_uc.uc_stack));
 	sendsig_reset(l, sig);
 
 	mutex_exit(p->p_lock);



CVS commit: [netbsd-7] src/sys/arch/amd64/amd64

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 19:16:27 UTC 2018

Modified Files:
src/sys/arch/amd64/amd64 [netbsd-7]: machdep.c

Log Message:
Pull up following revision(s) (requested by maxv in ticket #1662):

sys/arch/amd64/amd64/machdep.c: revision 1.321

Fix stack info leak. There is a big padding in struct sigframe_siginfo.

[  224.006287] kleak: Possible leak in copyout: [len=920, leaked=92]
[  224.016977] #0 0x80224d0a in kleak_note 
[  224.026268] #1 0x80224d8a in kleak_copyout 
[  224.026268] #2 0x802224b5 in sendsig_siginfo 
[  224.036261] #3 0x80b51564 in sendsig 
[  224.046475] #4 0x80b51282 in postsig 
[  224.046475] #5 0x80b2fc5d in lwp_userret 
[  224.056273] #6 0x8025a951 in mi_userret 
[  224.066277] #7 0x8025ab89 in syscall 


To generate a diff of this commit:
cvs rdiff -u -r1.211.2.2 -r1.211.2.3 src/sys/arch/amd64/amd64/machdep.c

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



CVS commit: src/doc

2018-12-04 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Dec  4 18:39:03 UTC 2018

Modified Files:
src/doc: TODO.sanitizers

Log Message:
Update TODO.sanitizers

Reflect with reality the fts(3) entry as handling compar callback is the
only feature still missing.

Add a new entry for utime(3), we expect to allow changing actime regardless
of noatime mount property.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/doc/TODO.sanitizers

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



CVS commit: src/doc

2018-12-04 Thread Kamil Rytarowski
Module Name:src
Committed By:   kamil
Date:   Tue Dec  4 18:39:03 UTC 2018

Modified Files:
src/doc: TODO.sanitizers

Log Message:
Update TODO.sanitizers

Reflect with reality the fts(3) entry as handling compar callback is the
only feature still missing.

Add a new entry for utime(3), we expect to allow changing actime regardless
of noatime mount property.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/doc/TODO.sanitizers

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

Modified files:

Index: src/doc/TODO.sanitizers
diff -u src/doc/TODO.sanitizers:1.7 src/doc/TODO.sanitizers:1.8
--- src/doc/TODO.sanitizers:1.7	Sat Nov 17 01:08:55 2018
+++ src/doc/TODO.sanitizers	Tue Dec  4 18:39:03 2018
@@ -7,7 +7,9 @@ Short term:
  - upstream local patches, mostly to compiler-rt
 
 Long term:
- - develop fts(3) interceptors (MSan, for ls(1), find(1), mtree(8)
+ - handle fts_open(3) compar callback in sanitizers (use TLS to store
+   the real callback and call a wrapper that will [un]poison appropriate
+   memory regions)
  - investigate and address the libcxx failing tests on NetBSD
  - FILE and DIR sanitization (needed by at least: ESan, MSan)
  - add missing interceptors (mostly MSan-centric)
@@ -38,6 +40,7 @@ Long term:
  - merge of the libFuzzer integration with the basesystem
  - oom-killer ATF tests and fixes
  - uvm_map.c E2BIG workaround or limit raise (1MB -> 10MB?), needed by libFuzzer
+ - utime(3) allow changing actime regardless of noatime mount property
 
 Unspecified:
  - kernel-tsan? upstream development is stalled with patches for Linux 4.2



CVS commit: src/usr.sbin/postinstall

2018-12-04 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Tue Dec  4 16:53:45 UTC 2018

Modified Files:
src/usr.sbin/postinstall: postinstall

Log Message:
rc.d/isdnd is obsolete


To generate a diff of this commit:
cvs rdiff -u -r1.220 -r1.221 src/usr.sbin/postinstall/postinstall

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

Modified files:

Index: src/usr.sbin/postinstall/postinstall
diff -u src/usr.sbin/postinstall/postinstall:1.220 src/usr.sbin/postinstall/postinstall:1.221
--- src/usr.sbin/postinstall/postinstall:1.220	Tue Nov  6 06:16:00 2018
+++ src/usr.sbin/postinstall/postinstall	Tue Dec  4 16:53:44 2018
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: postinstall,v 1.220 2018/11/06 06:16:00 plunky Exp $
+# $NetBSD: postinstall,v 1.221 2018/12/04 16:53:44 plunky Exp $
 #
 # Copyright (c) 2002-2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -1503,6 +1503,7 @@ btuartd
 daemon
 fsck.sh
 gated
+isdnd
 kerberos
 login
 nfsiod



CVS commit: src/usr.sbin/postinstall

2018-12-04 Thread Iain Hibbert
Module Name:src
Committed By:   plunky
Date:   Tue Dec  4 16:53:45 UTC 2018

Modified Files:
src/usr.sbin/postinstall: postinstall

Log Message:
rc.d/isdnd is obsolete


To generate a diff of this commit:
cvs rdiff -u -r1.220 -r1.221 src/usr.sbin/postinstall/postinstall

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



CVS commit: src/bin/sh

2018-12-04 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Dec  4 14:03:30 UTC 2018

Modified Files:
src/bin/sh: sh.1 var.c var.h

Log Message:
Alter a design botch when magic (self modifying) variables
were added to sh ... in other shells, setting such a variable
(for most of them) causes it to lose its special properties,
and act the same as any other variable.   I had assumed that
was just implementor laziness...   I was wrong.

>From now on the NetBSD shell will act like the others, and if vars
like HOSTNAME (and SECONDS, etc) are used as variables in a script
or whatever, they will act just like normal variables (and unless
this happens when they have been made local, or as a variable-assignment
as a prefix to a command, the special properties they would have had
otherwise are lost for the remainder of the life of the (sub-)shell
in which the variables were set).

Importing a value from the environment counts as setting the
value for this purpose (so if HOSTNAME is set in the environment,
the value there will be the value $HOSTNAME expands to).

The two exceptions to this are LINENO and RANDOM.   RANDOM
needs to be able to be set to (re-)set its seed.  LINENO needs to
be able to be set (at least in the "local" command) to achieve
the desired functionality.   It is unlikely that any (sane) script
is going to want to use those two as normal vars however.

While here, fix a minor bug in popping local vars (fn return) that need
to notify the shell of changes in value (like PATH).

Change sh(1) to reflect this alteration.  Also add doc of the
(forgotten) magic var EUSER (which has been there since the others
were added), and add a few more vars (which are documented
in other places in sh(1) - like ENV) into the defined or used
variable list (as well as wherever else they appear).

XXX pullup -8


To generate a diff of this commit:
cvs rdiff -u -r1.210 -r1.211 src/bin/sh/sh.1
cvs rdiff -u -r1.71 -r1.72 src/bin/sh/var.c
cvs rdiff -u -r1.37 -r1.38 src/bin/sh/var.h

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



CVS commit: src/bin/sh

2018-12-04 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Dec  4 14:03:30 UTC 2018

Modified Files:
src/bin/sh: sh.1 var.c var.h

Log Message:
Alter a design botch when magic (self modifying) variables
were added to sh ... in other shells, setting such a variable
(for most of them) causes it to lose its special properties,
and act the same as any other variable.   I had assumed that
was just implementor laziness...   I was wrong.

>From now on the NetBSD shell will act like the others, and if vars
like HOSTNAME (and SECONDS, etc) are used as variables in a script
or whatever, they will act just like normal variables (and unless
this happens when they have been made local, or as a variable-assignment
as a prefix to a command, the special properties they would have had
otherwise are lost for the remainder of the life of the (sub-)shell
in which the variables were set).

Importing a value from the environment counts as setting the
value for this purpose (so if HOSTNAME is set in the environment,
the value there will be the value $HOSTNAME expands to).

The two exceptions to this are LINENO and RANDOM.   RANDOM
needs to be able to be set to (re-)set its seed.  LINENO needs to
be able to be set (at least in the "local" command) to achieve
the desired functionality.   It is unlikely that any (sane) script
is going to want to use those two as normal vars however.

While here, fix a minor bug in popping local vars (fn return) that need
to notify the shell of changes in value (like PATH).

Change sh(1) to reflect this alteration.  Also add doc of the
(forgotten) magic var EUSER (which has been there since the others
were added), and add a few more vars (which are documented
in other places in sh(1) - like ENV) into the defined or used
variable list (as well as wherever else they appear).

XXX pullup -8


To generate a diff of this commit:
cvs rdiff -u -r1.210 -r1.211 src/bin/sh/sh.1
cvs rdiff -u -r1.71 -r1.72 src/bin/sh/var.c
cvs rdiff -u -r1.37 -r1.38 src/bin/sh/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/bin/sh/sh.1
diff -u src/bin/sh/sh.1:1.210 src/bin/sh/sh.1:1.211
--- src/bin/sh/sh.1:1.210	Mon Dec  3 06:43:19 2018
+++ src/bin/sh/sh.1	Tue Dec  4 14:03:30 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: sh.1,v 1.210 2018/12/03 06:43:19 kre Exp $
+.\"	$NetBSD: sh.1,v 1.211 2018/12/04 14:03:30 kre Exp $
 .\" Copyright (c) 1991, 1993
 .\"	The Regents of the University of California.  All rights reserved.
 .\"
@@ -31,7 +31,7 @@
 .\"
 .\"	@(#)sh.1	8.6 (Berkeley) 5/4/95
 .\"
-.Dd May 3, 2018
+.Dd December 4, 2018
 .Dt SH 1
 .\" everything except c o and s (keep them ordered)
 .ds flags abCEeFfhIiLmnpquVvXx
@@ -2995,6 +2995,21 @@ destination for
 output (as of the time of the
 .Ic local
 command) will also be restored.
+If any of the shell's magic variables
+(those which return a value which may vary without
+the variable being explicitly altered,
+e.g.:
+.Dv SECONDS
+or
+.Dv HOSTNAME )
+are made local in a function,
+they will lose their special properties when set
+within the function, including by the
+.Ic local
+command itself
+(if not to be set in the function, there is little point
+in making a variable local)
+but those properties will be restored when the function returns.
 .Pp
 It is an error to use
 .Ic local
@@ -3934,6 +3949,30 @@ above, which are documented further abov
 If unset
 .Dq $HOME/.editrc
 is used.
+.It Ev ENV
+Names the file sourced at startup by the shell.
+Unused by this shell after initialization,
+but is usually passed through the environment to
+descendant shells.
+.It Ev EUSER
+Set to the login name of the effective user id running the shell,
+as returned by
+.Bd -compact -literal -offset indent
+getpwuid(geteuid())->pw_name
+.Ed
+.Po
+See
+.Xr getpwuid 3
+and
+.Xr geteuid 2
+for more details.
+.Pc
+This is obtained each time
+.Ev EUSER
+is expanded, so changes to the shell's execution identity
+cause updates without further action.
+If unset, it returns nothing.
+If set it loses its special properties, and is simply a variable.
 .It Ev HISTSIZE
 The number of lines in the history buffer for the shell.
 .It Ev HOME
@@ -3952,8 +3991,7 @@ This is obtained each time
 is expanded, so changes to the system's name are reflected
 without further action.
 If unset, it returns nothing.
-Setting it does nothing except reverse the effect of an earlier
-.Ic unset .
+If set it loses its special properties, and is simply a variable.
 .It Ev IFS
 Input Field Separators.
 This is normally set to
@@ -4005,6 +4043,22 @@ The default search path for executables.
 See the
 .Sx Path Search
 section above.
+.It Ev POSIXLY_CORRECT
+If set in the environment upon initialization of the shell,
+then the shell option
+.Ic posix
+will be set.
+.Po
+See the description of the
+.Ic set
+command in the
+.Sx Built-ins
+section.
+.Pc
+After initialization it is unused by the shell,
+but is usually passed through the 

CVS commit: src/sys/netinet6

2018-12-04 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Dec  4 12:23:43 UTC 2018

Modified Files:
src/sys/netinet6: nd6_nbr.c

Log Message:
inet6: remove unused dad ns/na counters

The current DaD code triggers when either an NS or NA is directly
received, so the counters themselves do nothing of use.


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/sys/netinet6/nd6_nbr.c

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



CVS commit: src/sys/netinet6

2018-12-04 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Tue Dec  4 12:23:43 UTC 2018

Modified Files:
src/sys/netinet6: nd6_nbr.c

Log Message:
inet6: remove unused dad ns/na counters

The current DaD code triggers when either an NS or NA is directly
received, so the counters themselves do nothing of use.


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/sys/netinet6/nd6_nbr.c

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

Modified files:

Index: src/sys/netinet6/nd6_nbr.c
diff -u src/sys/netinet6/nd6_nbr.c:1.157 src/sys/netinet6/nd6_nbr.c:1.158
--- src/sys/netinet6/nd6_nbr.c:1.157	Thu Nov 29 09:51:21 2018
+++ src/sys/netinet6/nd6_nbr.c	Tue Dec  4 12:23:43 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: nd6_nbr.c,v 1.157 2018/11/29 09:51:21 ozaki-r Exp $	*/
+/*	$NetBSD: nd6_nbr.c,v 1.158 2018/12/04 12:23:43 roy Exp $	*/
 /*	$KAME: nd6_nbr.c,v 1.61 2001/02/10 16:06:14 jinmei Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.157 2018/11/29 09:51:21 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 1.158 2018/12/04 12:23:43 roy Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -76,14 +76,14 @@ __KERNEL_RCSID(0, "$NetBSD: nd6_nbr.c,v 
 #endif
 
 struct dadq;
-static struct dadq *nd6_dad_find(struct ifaddr *, struct nd_opt_nonce *);
+static struct dadq *nd6_dad_find(struct ifaddr *, struct nd_opt_nonce *, bool *);
 static void nd6_dad_starttimer(struct dadq *, int);
 static void nd6_dad_destroytimer(struct dadq *);
 static void nd6_dad_timer(struct dadq *);
 static void nd6_dad_ns_output(struct dadq *, struct ifaddr *);
 static void nd6_dad_ns_input(struct ifaddr *, struct nd_opt_nonce *);
 static void nd6_dad_na_input(struct ifaddr *);
-static void nd6_dad_duplicated(struct dadq *);
+static void nd6_dad_duplicated(struct ifaddr *, struct dadq *);
 
 static int dad_maxtry = 15;	/* max # of *tries* to transmit DAD packet */
 
@@ -661,8 +661,9 @@ nd6_na_input(struct mbuf *m, int off, in
 	 *
 	 * Otherwise, process as defined in RFC 2461.
 	 */
-	if (ifa
-	 && (((struct in6_ifaddr *)ifa)->ia6_flags & IN6_IFF_TENTATIVE)) {
+	if (ifa &&
+	(((struct in6_ifaddr *)ifa)->ia6_flags & IN6_IFF_TENTATIVE))
+	{
 		nd6_dad_na_input(ifa);
 		ifa_release(ifa, _ia);
 		ifa = NULL;
@@ -1075,8 +1076,6 @@ struct dadq {
 	int dad_count;			/* max NS to send */
 	int dad_ns_tcount;		/* # of trials to send NS */
 	int dad_ns_ocount;		/* NS sent so far */
-	int dad_ns_icount;
-	int dad_na_icount;
 	int dad_ns_lcount;		/* looped back NS */
 	struct callout dad_timer_ch;
 #define	ND_OPT_NONCE_STORE	3	/* dad_count should not exceed this */
@@ -1097,7 +1096,7 @@ static int dad_init = 0;
 static kmutex_t nd6_dad_lock;
 
 static struct dadq *
-nd6_dad_find(struct ifaddr *ifa, struct nd_opt_nonce *nonce)
+nd6_dad_find(struct ifaddr *ifa, struct nd_opt_nonce *nonce, bool *found_nonce)
 {
 	struct dadq *dp;
 	int i, nonce_max;
@@ -1122,6 +1121,7 @@ nd6_dad_find(struct ifaddr *ifa, struct 
 		if (i < nonce_max) {
 			char ip6buf[INET6_ADDRSTRLEN];
 
+			*found_nonce = true;
 			log(LOG_DEBUG,
 			"%s: detected a looped back NS message for %s\n",
 			ifa->ifa_ifp ? if_name(ifa->ifa_ifp) : "???",
@@ -1210,7 +1210,7 @@ nd6_dad_start(struct ifaddr *ifa, int xt
 	dp = kmem_intr_alloc(sizeof(*dp), KM_NOSLEEP);
 
 	mutex_enter(_dad_lock);
-	if (nd6_dad_find(ifa, NULL) != NULL) {
+	if (nd6_dad_find(ifa, NULL, NULL) != NULL) {
 		mutex_exit(_dad_lock);
 		/* DAD already in progress */
 		if (dp != NULL)
@@ -1237,7 +1237,6 @@ nd6_dad_start(struct ifaddr *ifa, int xt
 	dp->dad_ifa = ifa;
 	ifaref(ifa);	/* just for safety */
 	dp->dad_count = ip6_dad_count;
-	dp->dad_ns_icount = dp->dad_na_icount = 0;
 	dp->dad_ns_ocount = dp->dad_ns_tcount = 0;
 	dp->dad_ns_lcount = 0;
 	TAILQ_INSERT_TAIL(, (struct dadq *)dp, dad_list);
@@ -1266,7 +1265,7 @@ nd6_dad_stop(struct ifaddr *ifa)
 		return;
 
 	mutex_enter(_dad_lock);
-	dp = nd6_dad_find(ifa, NULL);
+	dp = nd6_dad_find(ifa, NULL, NULL);
 	if (dp == NULL) {
 		mutex_exit(_dad_lock);
 		/* DAD wasn't started yet */
@@ -1287,7 +1286,6 @@ nd6_dad_timer(struct dadq *dp)
 {
 	struct ifaddr *ifa;
 	struct in6_ifaddr *ia;
-	int duplicate = 0;
 	char ip6buf[INET6_ADDRSTRLEN];
 	bool need_free = false;
 
@@ -1336,42 +1334,19 @@ nd6_dad_timer(struct dadq *dp)
 		(long)ND_IFINFO(ifa->ifa_ifp)->retrans * hz / 1000);
 	} else {
 		/*
-		 * We have transmitted sufficient number of DAD packets.
-		 * See what we've got.
+		 * We are done with DAD.  No NA came, no NS came.
+		 * No duplicate address found.
 		 */
-		if (dp->dad_na_icount) {
-			/*
-			 * the check is in nd6_dad_na_input(),
-			 * but just in case
-			 */
-			duplicate++;
-		}
-
-		if (dp->dad_ns_icount) {
-			/* We've seen NS, means DAD has failed. */
-			duplicate++;
-		}
-
-		if (duplicate) {
-			nd6_dad_duplicated(dp);
-			nd6_dad_stoptimer(dp);
-			need_free = true;
-		} else {
-			/*
-			 * We are done 

CVS commit: [netbsd-8] src/doc

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 12:07:53 UTC 2018

Modified Files:
src/doc [netbsd-8]: CHANGES-8.1

Log Message:
Tickets #1114, #1116-#1123


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.67 -r1.1.2.68 src/doc/CHANGES-8.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-8.1
diff -u src/doc/CHANGES-8.1:1.1.2.67 src/doc/CHANGES-8.1:1.1.2.68
--- src/doc/CHANGES-8.1:1.1.2.67	Fri Nov 30 10:33:44 2018
+++ src/doc/CHANGES-8.1	Tue Dec  4 12:07:53 2018
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.1,v 1.1.2.67 2018/11/30 10:33:44 martin Exp $
+# $NetBSD: CHANGES-8.1,v 1.1.2.68 2018/12/04 12:07:53 martin Exp $
 
 A complete list of changes from the NetBSD 8.0 release to the NetBSD 8.1
 release:
@@ -1851,3 +1851,107 @@ sys/kern/kern_exit.c1.273
 	Fix info leak.
 	[maxv, ticket #1114]
 
+sys/dev/mii/miidevs1.130,1.131
+sys/dev/miidevs.h(regen)
+sys/dev/miidevs_data.h(regen)
+
+	Sort OUI by number. No functional change.
+	Add ASIX Ax88x9x.
+	Add description for DP83846A.
+	[msaitoh, ticket #1116]
+
+sys/dev/mii/inbmphyreg.h			1.12
+sys/dev/pci/if_wm.c1.597,1.598-1.602
+sys/dev/pci/if_wmreg.h1.109
+
+	- Fix race condition in wm_init_lcd_from_nvm().
+	- Check error status on some register's read/write.
+	- Control TX/RX descriptor snooping control bits on ICH8
+	  and newer.
+	- Disable relax ordering on 82546GB(Device ID 0x1099 and 0x10b5)
+	  or >= ICH8. Same as other OSes.
+	- Add wm_oem_bits_config_ich8lan() to control LPLU and GbE setting
+	  base on the NVM's info. This is for PCH and newer.
+	- Add some PHY workaround for suspend/resume.  This is for ICH8
+	  and newer.
+	- Add i82578 specific link stall workaround.
+	- Add PCH2 specific workaround for link layer's stability.
+	- Add comment. Modify comment.
+	[msaitoh, ticket #1117]
+
+sys/dev/pci/pci_subr.c1.207-1.210
+sys/dev/pci/pcireg.h1.143-1.146
+
+	- Decode PCI Enhanced Allocation.
+	- Fix the definition of PCI MSI vector mask and pending register.
+	  This problem was not a real bug because PCI_MSI{MASK,PENDING} were
+	  not used from anywhere.
+	- The downstream port of PCIe switch is not a root port, so don't
+	  print root port related registers.
+	- Add new macro PCIE_HAS_ROOTREGS(pcie_devtype) and use it. No
+	  functional change.
+	- Add new PCIE_HAS_LINKREGS(pcie_devtype) and use it. No functional
+	  change.
+	[msaitoh, ticket #1118]
+
+sys/dev/pci/pcidevs1.1345-1.1347,1.1349-1.1355
+sys/dev/pci/pcidevs.h(regen)
+sys/dev/pci/pcidevs_data.h			(regen)
+
+	Add some Intel devices. Some of them are found in Core i7-8550U.
+	Add Toshiba's XG4 and XG5 NVMe SSD.
+	Add C62x to the descriptions of Intel C620 series devices.
+	Add 0xa1ca for Intel C629 LPC or eSPI.
+	Add AMD Seattle Host Bridge and PCIE root port devices.
+	Add two other I2C devices of Intel.
+	Add some Intel 100 series and C230 series devices.
+	Add a whole bunch of Cavium ThunderX devices.
+	Add Rockchip vendor ID and a device.
+	Add Amazon.com UART, NVMe, and ENA PCI IDs.
+	[msaitoh, ticket #1119]
+
+sys/arch/x86/include/specialreg.h		1.132-1.136
+sys/arch/x86/x86/cpu_topology.c			1.14
+usr.sbin/cpuctl/arch/i386.c			1.85-1.90
+
+	Add MAWAU (for BND{LD,ST}X instruction) from the latest Intel SDM.
+	AMD also has CPUID 0x06 and 0x0d.
+	PCOMMIT was obsoleted.
+	Use ci_feat_val[7] as CPUID 7 %edx to match x86/cpu.h
+	AMD also has CPUID 6.
+	Remove unused code for coretemp.
+	Consistently use descs[] instead of data[].
+	AMD also reports CPUID 7's highest subleaf. Print it.
+	Add Intel CPUID Extended Topology Enumeration Fn000b definitions.
+	Add Intel/AMD MONITOR/MWAIT leaf.
+	Add Intel CPUID Architectural Performance Monitoring leaf Fn000a.
+	Print Intel CPUID Architectural Performance Monitoring leaf Fn000a.
+	[msaitoh, ticket #1120]
+
+usr.sbin/acpitool/acpidump/acpi.c		1.30-1.37, 1.39 via patch
+usr.sbin/acpitool/acpidump/acpidump.8		1.11-1.13 via patch
+
+	- Add ACPI LPIT (Low Power Idle Table) from FreeBSD r336185.
+	- Decode DMAR's ANDD (ACPI Name Space).
+	- Add X2APIC_MODE flag of DMAR.
+	- Remove extra newline in SPMI table.
+	- FACS is optional if the HW_REDUCED_ACPI flag is set in the FADT.
+	- Print SPCR's Interface Type and ARMH GIC Interrupt Type.
+	- Decode Generic Timer Description Table(GTDT).
+	- Don't print PM_TMR_BLK if the value is 0.
+	- Don't print X_PM_TMR_BLK if the address value is 0.
+	- Decode CSRT (Core System Resources Table).
+	[msaitoh, ticket #1121]
+
+sys/dev/ld.c	1.105
+
+	Take kernel lock for ioctl calls when backend isn't tagged MPSAFE.
+	[mlelstv, ticket #1122]
+
+sys/dev/pci/pcidevs1.1356
+sys/dev/pci/pcidevs.h(regen)
+sys/dev/pci/pcidevs_data.h			(regen)
+
+	Add 2 Symbios products.
+	[bouyer, ticket #1123]
+



CVS commit: [netbsd-8] src/doc

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 12:07:53 UTC 2018

Modified Files:
src/doc [netbsd-8]: CHANGES-8.1

Log Message:
Tickets #1114, #1116-#1123


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.67 -r1.1.2.68 src/doc/CHANGES-8.1

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



CVS commit: [netbsd-8] src/sys/dev/pci

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 12:04:02 UTC 2018

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs.h pcidevs_data.h

Log Message:
Regen for ticket #1123


To generate a diff of this commit:
cvs rdiff -u -r1.1281.2.11 -r1.1281.2.12 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1280.2.11 -r1.1280.2.12 src/sys/dev/pci/pcidevs_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/pci/pcidevs.h
diff -u src/sys/dev/pci/pcidevs.h:1.1281.2.11 src/sys/dev/pci/pcidevs.h:1.1281.2.12
--- src/sys/dev/pci/pcidevs.h:1.1281.2.11	Tue Dec  4 11:43:54 2018
+++ src/sys/dev/pci/pcidevs.h	Tue Dec  4 12:03:43 2018
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs.h,v 1.1281.2.11 2018/12/04 11:43:54 martin Exp $	*/
+/*	$NetBSD: pcidevs.h,v 1.1281.2.12 2018/12/04 12:03:43 martin Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1289.2.11 2018/12/04 11:34:59 martin Exp
+ *	NetBSD: pcidevs,v 1.1289.2.12 2018/12/04 12:02:12 martin Exp
  */
 
 /*
@@ -5842,9 +5842,11 @@
 #define	PCI_PRODUCT_SYMBIOS_SAS3108_4	0x0095		/* SAS3108 */
 #define	PCI_PRODUCT_SYMBIOS_SAS3004	0x0096		/* SAS3004 */
 #define	PCI_PRODUCT_SYMBIOS_SAS3008	0x0097		/* SAS3008 */
-#define	PCI_PRODUCT_SYMBIOS_SAS3516	0x00ab		/* SAS3516 */
+#define	PCI_PRODUCT_SYMBIOS_SAS3516	0x00aa		/* SAS3516 */
+#define	PCI_PRODUCT_SYMBIOS_SAS3516_1	0x00ab		/* SAS3516 */
 #define	PCI_PRODUCT_SYMBIOS_SAS3416	0x00ac		/* SAS3416 */
-#define	PCI_PRODUCT_SYMBIOS_SAS3508	0x00ae		/* SAS3508 */
+#define	PCI_PRODUCT_SYMBIOS_SAS3508	0x00ad		/* SAS3508 */
+#define	PCI_PRODUCT_SYMBIOS_SAS3508_1	0x00ae		/* SAS3508 */
 #define	PCI_PRODUCT_SYMBIOS_SAS3408	0x00af		/* SAS3408 */
 #define	PCI_PRODUCT_SYMBIOS_SAS3504	0x00be		/* SAS3504 */
 #define	PCI_PRODUCT_SYMBIOS_SAS3404	0x00bf		/* SAS3404 */

Index: src/sys/dev/pci/pcidevs_data.h
diff -u src/sys/dev/pci/pcidevs_data.h:1.1280.2.11 src/sys/dev/pci/pcidevs_data.h:1.1280.2.12
--- src/sys/dev/pci/pcidevs_data.h:1.1280.2.11	Tue Dec  4 11:43:54 2018
+++ src/sys/dev/pci/pcidevs_data.h	Tue Dec  4 12:03:43 2018
@@ -1,10 +1,10 @@
-/*	$NetBSD: pcidevs_data.h,v 1.1280.2.11 2018/12/04 11:43:54 martin Exp $	*/
+/*	$NetBSD: pcidevs_data.h,v 1.1280.2.12 2018/12/04 12:03:43 martin Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: pcidevs,v 1.1289.2.11 2018/12/04 11:34:59 martin Exp
+ *	NetBSD: pcidevs,v 1.1289.2.12 2018/12/04 12:02:12 martin Exp
  */
 
 /*
@@ -10214,10 +10214,14 @@ static const uint16_t pci_products[] = {
 	27572, 0,
 	PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_SAS3516, 
 	27388, 0,
+	PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_SAS3516_1, 
+	27388, 0,
 	PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_SAS3416, 
 	27396, 0,
 	PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_SAS3508, 
 	27404, 0,
+	PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_SAS3508_1, 
+	27404, 0,
 	PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_SAS3408, 
 	27412, 0,
 	PCI_VENDOR_SYMBIOS, PCI_PRODUCT_SYMBIOS_SAS3504, 
@@ -17145,9 +17149,9 @@ static const char pci_words[] = { "." 
 	"53c1510\0" /* 1 refs @ 27364 */
 	"53c895A\0" /* 1 refs @ 27372 */
 	"53c875A\0" /* 1 refs @ 27380 */
-	"SAS3516\0" /* 2 refs @ 27388 */
+	"SAS3516\0" /* 3 refs @ 27388 */
 	"SAS3416\0" /* 2 refs @ 27396 */
-	"SAS3508\0" /* 2 refs @ 27404 */
+	"SAS3508\0" /* 3 refs @ 27404 */
 	"SAS3408\0" /* 2 refs @ 27412 */
 	"SAS3504\0" /* 2 refs @ 27420 */
 	"SAS3404\0" /* 2 refs @ 27428 */



CVS commit: [netbsd-8] src/sys/dev/pci

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 12:04:02 UTC 2018

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs.h pcidevs_data.h

Log Message:
Regen for ticket #1123


To generate a diff of this commit:
cvs rdiff -u -r1.1281.2.11 -r1.1281.2.12 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1280.2.11 -r1.1280.2.12 src/sys/dev/pci/pcidevs_data.h

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



CVS commit: [netbsd-8] src/sys/dev/pci

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 12:02:12 UTC 2018

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1123):

sys/dev/pci/pcidevs: revision 1.1356

Add 2 Symbios products, from OpenBSD


To generate a diff of this commit:
cvs rdiff -u -r1.1289.2.11 -r1.1289.2.12 src/sys/dev/pci/pcidevs

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



CVS commit: [netbsd-8] src/sys/dev/pci

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 12:02:12 UTC 2018

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1123):

sys/dev/pci/pcidevs: revision 1.1356

Add 2 Symbios products, from OpenBSD


To generate a diff of this commit:
cvs rdiff -u -r1.1289.2.11 -r1.1289.2.12 src/sys/dev/pci/pcidevs

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

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1289.2.11 src/sys/dev/pci/pcidevs:1.1289.2.12
--- src/sys/dev/pci/pcidevs:1.1289.2.11	Tue Dec  4 11:34:59 2018
+++ src/sys/dev/pci/pcidevs	Tue Dec  4 12:02:12 2018
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1289.2.11 2018/12/04 11:34:59 martin Exp $
+$NetBSD: pcidevs,v 1.1289.2.12 2018/12/04 12:02:12 martin Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -5835,9 +5835,11 @@ product SYMBIOS SAS3108_3		0x0094	SAS310
 product SYMBIOS SAS3108_4		0x0095	SAS3108
 product SYMBIOS SAS3004			0x0096	SAS3004
 product SYMBIOS SAS3008			0x0097	SAS3008
-product	SYMBIOS	SAS3516			0x00ab	SAS3516
+product SYMBIOS SAS3516			0x00aa  SAS3516
+product	SYMBIOS	SAS3516_1		0x00ab	SAS3516
 product	SYMBIOS	SAS3416			0x00ac	SAS3416
-product	SYMBIOS	SAS3508			0x00ae	SAS3508
+product	SYMBIOS	SAS3508			0x00ad	SAS3508
+product SYMBIOS SAS3508_1		0x00ae  SAS3508
 product	SYMBIOS	SAS3408			0x00af	SAS3408
 product	SYMBIOS	SAS3504			0x00be	SAS3504
 product	SYMBIOS	SAS3404			0x00bf	SAS3404



CVS commit: [netbsd-8] src/sys/dev

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 12:00:42 UTC 2018

Modified Files:
src/sys/dev [netbsd-8]: ld.c

Log Message:
Pull up following revision(s) (requested by mlelstv in ticket #1122):

sys/dev/ld.c: revision 1.105

take kernel lock for ioctl calls when backend isn't tagged MPSAFE.


To generate a diff of this commit:
cvs rdiff -u -r1.101.2.1 -r1.101.2.2 src/sys/dev/ld.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/ld.c
diff -u src/sys/dev/ld.c:1.101.2.1 src/sys/dev/ld.c:1.101.2.2
--- src/sys/dev/ld.c:1.101.2.1	Fri Sep  1 09:59:10 2017
+++ src/sys/dev/ld.c	Tue Dec  4 12:00:41 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: ld.c,v 1.101.2.1 2017/09/01 09:59:10 martin Exp $	*/
+/*	$NetBSD: ld.c,v 1.101.2.2 2018/12/04 12:00:41 martin Exp $	*/
 
 /*-
  * Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.101.2.1 2017/09/01 09:59:10 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ld.c,v 1.101.2.2 2018/12/04 12:00:41 martin Exp $");
 
 #include 
 #include 
@@ -369,7 +369,11 @@ ldioctl(dev_t dev, u_long cmd, void *add
 		return (error);
 
 	if (sc->sc_ioctl) {
+		if ((sc->sc_flags & LDF_MPSAFE) == 0)
+			KERNEL_LOCK(1, curlwp);
 		error = (*sc->sc_ioctl)(sc, cmd, addr, flag, 0);
+		if ((sc->sc_flags & LDF_MPSAFE) == 0)
+			KERNEL_UNLOCK_ONE(curlwp);
 		if (error != EPASSTHROUGH)
 			return (error);
 	}
@@ -388,7 +392,11 @@ ld_flush(device_t self, bool poll)
 	struct ld_softc *sc = device_private(self);
 
 	if (sc->sc_ioctl) {
+		if ((sc->sc_flags & LDF_MPSAFE) == 0)
+			KERNEL_LOCK(1, curlwp);
 		error = (*sc->sc_ioctl)(sc, DIOCCACHESYNC, NULL, 0, poll);
+		if ((sc->sc_flags & LDF_MPSAFE) == 0)
+			KERNEL_UNLOCK_ONE(curlwp);
 		if (error != 0)
 			device_printf(self, "unable to flush cache\n");
 	}



CVS commit: [netbsd-8] src/sys/dev

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 12:00:42 UTC 2018

Modified Files:
src/sys/dev [netbsd-8]: ld.c

Log Message:
Pull up following revision(s) (requested by mlelstv in ticket #1122):

sys/dev/ld.c: revision 1.105

take kernel lock for ioctl calls when backend isn't tagged MPSAFE.


To generate a diff of this commit:
cvs rdiff -u -r1.101.2.1 -r1.101.2.2 src/sys/dev/ld.c

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



CVS commit: [netbsd-8] src/usr.sbin/acpitools/acpidump

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 11:58:11 UTC 2018

Modified Files:
src/usr.sbin/acpitools/acpidump [netbsd-8]: acpi.c acpidump.8

Log Message:
Pull up the following, requested by msaitoh in ticket #1121:

usr.sbin/acpitool/acpidump/acpi.c   1.30-1.37, 1.39 via 
patch
usr.sbin/acpitool/acpidump/acpidump.8   1.11-1.13 via patch

- Add ACPI LPIT (Low Power Idle Table) from FreeBSD r336185.
- Decode DMAR's ANDD (ACPI Name Space).
- Add X2APIC_MODE flag of DMAR.
- Remove extra newline in SPMI table.
- FACS is optional if the HW_REDUCED_ACPI flag is set in the FADT.
- Print SPCR's Interface Type and ARMH GIC Interrupt Type.
- Decode Generic Timer Description Table(GTDT).
- Don't print PM_TMR_BLK if the value is 0.
- Don't print X_PM_TMR_BLK if the address value is 0.
- Decode CSRT (Core System Resources Table).


To generate a diff of this commit:
cvs rdiff -u -r1.15.8.1 -r1.15.8.2 src/usr.sbin/acpitools/acpidump/acpi.c
cvs rdiff -u -r1.7.18.1 -r1.7.18.2 src/usr.sbin/acpitools/acpidump/acpidump.8

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

Modified files:

Index: src/usr.sbin/acpitools/acpidump/acpi.c
diff -u src/usr.sbin/acpitools/acpidump/acpi.c:1.15.8.1 src/usr.sbin/acpitools/acpidump/acpi.c:1.15.8.2
--- src/usr.sbin/acpitools/acpidump/acpi.c:1.15.8.1	Wed Nov 22 15:54:09 2017
+++ src/usr.sbin/acpitools/acpidump/acpi.c	Tue Dec  4 11:58:10 2018
@@ -1,4 +1,4 @@
-/* $NetBSD: acpi.c,v 1.15.8.1 2017/11/22 15:54:09 martin Exp $ */
+/* $NetBSD: acpi.c,v 1.15.8.2 2018/12/04 11:58:10 martin Exp $ */
 
 /*-
  * Copyright (c) 1998 Doug Rabson
@@ -30,7 +30,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: acpi.c,v 1.15.8.1 2017/11/22 15:54:09 martin Exp $");
+__RCSID("$NetBSD: acpi.c,v 1.15.8.2 2018/12/04 11:58:10 martin Exp $");
 
 #include 
 #include 
@@ -40,6 +40,7 @@ __RCSID("$NetBSD: acpi.c,v 1.15.8.1 2017
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -53,7 +54,11 @@ __RCSID("$NetBSD: acpi.c,v 1.15.8.1 2017
 #define BEGIN_COMMENT	"/*\n"
 #define END_COMMENT	" */\n"
 
+/* Commonly used helper functions */
 static void	acpi_print_string(char *s, size_t length);
+static void	acpi_print_tabs(unsigned int n);
+static void	acpi_dump_bytes(uint8_t *p, uint32_t len, unsigned int ntabs);
+static void	acpi_dump_table(ACPI_TABLE_HEADER *sdp);
 static void	acpi_print_gas(ACPI_GENERIC_ADDRESS *gas);
 static void	acpi_print_pci(uint16_t vendorid, uint16_t deviceid,
 		uint8_t seg, uint8_t bus, uint8_t device, uint8_t func);
@@ -68,6 +73,8 @@ static void	acpi_print_whea(ACPI_WHEA_HE
 		void (*print_ins)(ACPI_WHEA_HEADER *),
 		void (*print_flags)(ACPI_WHEA_HEADER *));
 static uint64_t	acpi_select_address(uint32_t, uint64_t);
+
+/* Handlers for each table */
 static void	acpi_handle_fadt(ACPI_TABLE_HEADER *fadt);
 static void	acpi_print_cpu(u_char cpu_id);
 static void	acpi_print_cpu_uid(uint32_t uid, char *uid_string);
@@ -81,11 +88,14 @@ static void	acpi_print_madt(ACPI_SUBTABL
 static void	acpi_handle_bert(ACPI_TABLE_HEADER *sdp);
 static void	acpi_handle_boot(ACPI_TABLE_HEADER *sdp);
 static void	acpi_handle_cpep(ACPI_TABLE_HEADER *sdp);
+static void	acpi_handle_csrt(ACPI_TABLE_HEADER *sdp);
 static void	acpi_handle_dbgp(ACPI_TABLE_HEADER *sdp);
 static void	acpi_handle_dbg2(ACPI_TABLE_HEADER *sdp);
 static void	acpi_handle_einj(ACPI_TABLE_HEADER *sdp);
 static void	acpi_handle_erst(ACPI_TABLE_HEADER *sdp);
+static void	acpi_handle_gtdt(ACPI_TABLE_HEADER *sdp);
 static void	acpi_handle_hest(ACPI_TABLE_HEADER *sdp);
+static void	acpi_handle_lpit(ACPI_TABLE_HEADER *sdp);
 static void	acpi_handle_madt(ACPI_TABLE_HEADER *sdp);
 static void	acpi_handle_msct(ACPI_TABLE_HEADER *sdp);
 static void	acpi_handle_ecdt(ACPI_TABLE_HEADER *sdp);
@@ -110,7 +120,6 @@ static void	acpi_handle_wdat(ACPI_TABLE_
 static void	acpi_handle_wddt(ACPI_TABLE_HEADER *sdp);
 static void	acpi_handle_wdrt(ACPI_TABLE_HEADER *sdp);
 static void	acpi_print_sdt(ACPI_TABLE_HEADER *sdp);
-static void	acpi_dump_bytes(ACPI_TABLE_HEADER *sdp);
 static void	acpi_print_fadt(ACPI_TABLE_HEADER *sdp);
 static void	acpi_print_facs(ACPI_TABLE_FACS *facs);
 static void	acpi_print_dsdt(ACPI_TABLE_HEADER *dsdp);
@@ -210,7 +219,7 @@ acpi_print_string(char *s, size_t length
 static void
 acpi_print_gas(ACPI_GENERIC_ADDRESS *gas)
 {
-	switch(gas->SpaceId) {
+	switch (gas->SpaceId) {
 	case ACPI_ADR_SPACE_SYSTEM_MEMORY:
 		if (gas->BitWidth <= 32)
 			printf("0x%08x:%u[%u] (Memory)",
@@ -813,11 +822,16 @@ acpi_handle_fadt(ACPI_TABLE_HEADER *sdp)
 	fadt = (ACPI_TABLE_FADT *)sdp;
 	acpi_print_fadt(sdp);
 
-	facs = (ACPI_TABLE_FACS *)acpi_map_sdt(
-		acpi_select_address(fadt->Facs, fadt->XFacs));
-	if (memcmp(facs->Signature, ACPI_SIG_FACS, 4) != 0 || facs->Length < 64)
-		errx(EXIT_FAILURE, "FACS is corrupt");
-	acpi_print_facs(facs);
+	if (acpi_select_address(fadt->Facs, fadt->XFacs) == 0) {
+		if 

CVS commit: [netbsd-8] src/usr.sbin/acpitools/acpidump

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 11:58:11 UTC 2018

Modified Files:
src/usr.sbin/acpitools/acpidump [netbsd-8]: acpi.c acpidump.8

Log Message:
Pull up the following, requested by msaitoh in ticket #1121:

usr.sbin/acpitool/acpidump/acpi.c   1.30-1.37, 1.39 via 
patch
usr.sbin/acpitool/acpidump/acpidump.8   1.11-1.13 via patch

- Add ACPI LPIT (Low Power Idle Table) from FreeBSD r336185.
- Decode DMAR's ANDD (ACPI Name Space).
- Add X2APIC_MODE flag of DMAR.
- Remove extra newline in SPMI table.
- FACS is optional if the HW_REDUCED_ACPI flag is set in the FADT.
- Print SPCR's Interface Type and ARMH GIC Interrupt Type.
- Decode Generic Timer Description Table(GTDT).
- Don't print PM_TMR_BLK if the value is 0.
- Don't print X_PM_TMR_BLK if the address value is 0.
- Decode CSRT (Core System Resources Table).


To generate a diff of this commit:
cvs rdiff -u -r1.15.8.1 -r1.15.8.2 src/usr.sbin/acpitools/acpidump/acpi.c
cvs rdiff -u -r1.7.18.1 -r1.7.18.2 src/usr.sbin/acpitools/acpidump/acpidump.8

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



CVS commit: [netbsd-8] src

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 11:52:57 UTC 2018

Modified Files:
src/sys/arch/x86/include [netbsd-8]: specialreg.h
src/sys/arch/x86/x86 [netbsd-8]: cpu_topology.c
src/usr.sbin/cpuctl/arch [netbsd-8]: i386.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1120):

usr.sbin/cpuctl/arch/i386.c: revision 1.85
usr.sbin/cpuctl/arch/i386.c: revision 1.86
usr.sbin/cpuctl/arch/i386.c: revision 1.87
usr.sbin/cpuctl/arch/i386.c: revision 1.88
usr.sbin/cpuctl/arch/i386.c: revision 1.89
usr.sbin/cpuctl/arch/i386.c: revision 1.90
sys/arch/x86/include/specialreg.h: revision 1.132
sys/arch/x86/include/specialreg.h: revision 1.133
sys/arch/x86/include/specialreg.h: revision 1.134
sys/arch/x86/include/specialreg.h: revision 1.135
sys/arch/x86/include/specialreg.h: revision 1.136
sys/arch/x86/x86/cpu_topology.c: revision 1.14

  Add MAWAU (for BND{LD,ST}X instruction) from the latest Intel SDM.

  Whitespace fix. No functional change.

Modify comment. No functional change:
- AMD also has CPUID 0x06 and 0x0d.
- PCOMMIT was obsoleted.
- Use ci_feat_val[7] as CPUID 7 %edx to match x86/cpu.h
- AMD also has CPUID 6.
- Remove unused code for coretemp.
- Consistently use descs[] instead of data[].
- AMD also reports CPUID 7's highest subleaf. Print it.
- Use macro.
  Add Intel CPUID Extended Topology Enumeration Fn000b definitions.
  Decode package, core and SMT id if CPUID 0x0b is available on Intel processor.

If the value is different from the kernel value, we should fix the kernel code.

TODO: Use 0x1f if it's available.

  Add Intel/AMD MONITOR/MWAIT leaf.
  Decode Intel/AMD MONITOR/MWAIT leaf.

  Add Intel CPUID Architectural Performance Monitoring leaf Fn000a.

  Print Intel CPUID Architectural Performance Monitoring leaf Fn000a.


To generate a diff of this commit:
cvs rdiff -u -r1.98.2.7 -r1.98.2.8 src/sys/arch/x86/include/specialreg.h
cvs rdiff -u -r1.9.22.2 -r1.9.22.3 src/sys/arch/x86/x86/cpu_topology.c
cvs rdiff -u -r1.74.6.3 -r1.74.6.4 src/usr.sbin/cpuctl/arch/i386.c

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



CVS commit: [netbsd-8] src

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 11:52:57 UTC 2018

Modified Files:
src/sys/arch/x86/include [netbsd-8]: specialreg.h
src/sys/arch/x86/x86 [netbsd-8]: cpu_topology.c
src/usr.sbin/cpuctl/arch [netbsd-8]: i386.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1120):

usr.sbin/cpuctl/arch/i386.c: revision 1.85
usr.sbin/cpuctl/arch/i386.c: revision 1.86
usr.sbin/cpuctl/arch/i386.c: revision 1.87
usr.sbin/cpuctl/arch/i386.c: revision 1.88
usr.sbin/cpuctl/arch/i386.c: revision 1.89
usr.sbin/cpuctl/arch/i386.c: revision 1.90
sys/arch/x86/include/specialreg.h: revision 1.132
sys/arch/x86/include/specialreg.h: revision 1.133
sys/arch/x86/include/specialreg.h: revision 1.134
sys/arch/x86/include/specialreg.h: revision 1.135
sys/arch/x86/include/specialreg.h: revision 1.136
sys/arch/x86/x86/cpu_topology.c: revision 1.14

  Add MAWAU (for BND{LD,ST}X instruction) from the latest Intel SDM.

  Whitespace fix. No functional change.

Modify comment. No functional change:
- AMD also has CPUID 0x06 and 0x0d.
- PCOMMIT was obsoleted.
- Use ci_feat_val[7] as CPUID 7 %edx to match x86/cpu.h
- AMD also has CPUID 6.
- Remove unused code for coretemp.
- Consistently use descs[] instead of data[].
- AMD also reports CPUID 7's highest subleaf. Print it.
- Use macro.
  Add Intel CPUID Extended Topology Enumeration Fn000b definitions.
  Decode package, core and SMT id if CPUID 0x0b is available on Intel processor.

If the value is different from the kernel value, we should fix the kernel code.

TODO: Use 0x1f if it's available.

  Add Intel/AMD MONITOR/MWAIT leaf.
  Decode Intel/AMD MONITOR/MWAIT leaf.

  Add Intel CPUID Architectural Performance Monitoring leaf Fn000a.

  Print Intel CPUID Architectural Performance Monitoring leaf Fn000a.


To generate a diff of this commit:
cvs rdiff -u -r1.98.2.7 -r1.98.2.8 src/sys/arch/x86/include/specialreg.h
cvs rdiff -u -r1.9.22.2 -r1.9.22.3 src/sys/arch/x86/x86/cpu_topology.c
cvs rdiff -u -r1.74.6.3 -r1.74.6.4 src/usr.sbin/cpuctl/arch/i386.c

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

Modified files:

Index: src/sys/arch/x86/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.98.2.7 src/sys/arch/x86/include/specialreg.h:1.98.2.8
--- src/sys/arch/x86/include/specialreg.h:1.98.2.7	Sun Sep 23 17:35:33 2018
+++ src/sys/arch/x86/include/specialreg.h	Tue Dec  4 11:52:57 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.98.2.7 2018/09/23 17:35:33 martin Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.98.2.8 2018/12/04 11:52:57 martin Exp $	*/
 
 /*-
  * Copyright (c) 1991 The Regents of the University of California.
@@ -282,7 +282,25 @@
 #define CPUID_DCP_COMPLEX	__BIT(2)	/* Complex cache indexing */
 
 /*
- * Intel Digital Thermal Sensor and
+ * Intel/AMD MONITOR/MWAIT
+ * Fn_0005
+ */
+/* %eax */
+#define CPUID_MON_MINSIZE	__BITS(15, 0)  /* Smallest monitor-line size */
+/* %ebx */
+#define CPUID_MON_MAXSIZE	__BITS(15, 0)  /* Largest monitor-line size */
+/* %ecx */
+#define CPUID_MON_EMX		__BIT(0)   /* MONITOR/MWAIT Extensions */
+#define CPUID_MON_IBE		__BIT(1)   /* Interrupt as Break Event */
+
+#define CPUID_MON_FLAGS	"\20" \
+	"\1" "EMX"	"\2" "IBE"
+
+/* %edx: number of substates for specific C-state */
+#define CPUID_MON_SUBSTATE(edx, cstate) (((edx) >> (cstate * 4)) & 0x000f)
+
+/*
+ * Intel/AMD Digital Thermal Sensor and
  * Power Management, Fn_0006 - %eax.
  */
 #define CPUID_DSPM_DTS	__BIT(0)	/* Digital Thermal Sensor */
@@ -313,7 +331,7 @@
 	"25" "HWP_IGNIDL"
 
 /*
- * Intel Digital Thermal Sensor and
+ * Intel/AMD Digital Thermal Sensor and
  * Power Management, Fn_0006 - %ecx.
  */
 #define CPUID_DSPM_HWF	0x0001	/* MSR_APERF/MSR_MPERF available */
@@ -322,7 +340,7 @@
 #define CPUID_DSPM_FLAGS1	"\20" "\1" "HWF" "\4" "EPB"
 
 /*
- * Intel Structured Extended Feature leaf Fn_0007
+ * Intel/AMD Structured Extended Feature leaf Fn_0007
  * %eax == 0: Subleaf 0
  *	%eax: The Maximum input value for supported subleaf.
  *	%ebx: Feature bits.
@@ -353,6 +371,7 @@
 #define CPUID_SEF_ADX		__BIT(19) /* ADCX/ADOX instructions */
 #define CPUID_SEF_SMAP		__BIT(20) /* Supervisor-Mode Access Prevention */
 #define CPUID_SEF_AVX512_IFMA	__BIT(21) /* AVX-512 Integer Fused Multiply Add */
+/* Bit 22 was PCOMMIT */
 #define CPUID_SEF_CLFLUSHOPT	__BIT(23) /* Cache Line FLUSH OPTimized */
 #define CPUID_SEF_CLWB		__BIT(24) /* Cache Line Write Back */
 #define CPUID_SEF_PT		__BIT(25) /* Processor Trace */
@@ -386,16 +405,18 @@
 #define CPUID_SEF_AVX512_VNNI	__BIT(11) /* Vector neural Network Instruction */
 #define CPUID_SEF_AVX512_BITALG	__BIT(12)
 #define CPUID_SEF_AVX512_VPOPCNTDQ __BIT(14)
+#define CPUID_SEF_MAWAU		__BITS(21, 17) /* MAWAU for BND{LD,ST}X */
 #define CPUID_SEF_RDPID		__BIT(22) 

CVS commit: [netbsd-8] src/sys/dev/pci

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 11:44:13 UTC 2018

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs.h pcidevs_data.h

Log Message:
Regen for #1119


To generate a diff of this commit:
cvs rdiff -u -r1.1281.2.10 -r1.1281.2.11 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1280.2.10 -r1.1280.2.11 src/sys/dev/pci/pcidevs_data.h

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

diffs are larger than 1MB and have been omitted


CVS commit: [netbsd-8] src/sys/dev/pci

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 11:44:13 UTC 2018

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs.h pcidevs_data.h

Log Message:
Regen for #1119


To generate a diff of this commit:
cvs rdiff -u -r1.1281.2.10 -r1.1281.2.11 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1280.2.10 -r1.1280.2.11 src/sys/dev/pci/pcidevs_data.h

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



CVS commit: [netbsd-8] src/sys/dev/pci

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 11:35:00 UTC 2018

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1119):

sys/dev/pci/pcidevs: revision 1.1350
sys/dev/pci/pcidevs: revision 1.1351
sys/dev/pci/pcidevs: revision 1.1352
sys/dev/pci/pcidevs: revision 1.1353
sys/dev/pci/pcidevs: revision 1.1354
sys/dev/pci/pcidevs: revision 1.1355
sys/dev/pci/pcidevs: revision 1.1345
sys/dev/pci/pcidevs: revision 1.1346
sys/dev/pci/pcidevs: revision 1.1347
sys/dev/pci/pcidevs: revision 1.1349

  Add some Intel devices. Some of them are found in Core i7-8550U.

  Add Toshiba's XG4 and XG5 NVMe SSD.

- Add C62x to the descriptions of Intel C620 series devices.
- Add 0xa1ca for Intel C629 LPC or eSPI.

Add AMD Seattle Host Bridge and PCIE root port devices

Add two otehr I2C devices of Intel.

"s/ are are / are /" in comment. No functional change.

Add some Intel 100 series and C230 series devices.

Add a whole bunch of Cavium ThunderX devices

Add Rockchip vendor ID and a device. Requested by jak@
 From OpenBSD

Add Amazon.com UART, NVMe, and ENA PCI IDs.


To generate a diff of this commit:
cvs rdiff -u -r1.1289.2.10 -r1.1289.2.11 src/sys/dev/pci/pcidevs

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



CVS commit: [netbsd-8] src/sys/dev/pci

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 11:35:00 UTC 2018

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1119):

sys/dev/pci/pcidevs: revision 1.1350
sys/dev/pci/pcidevs: revision 1.1351
sys/dev/pci/pcidevs: revision 1.1352
sys/dev/pci/pcidevs: revision 1.1353
sys/dev/pci/pcidevs: revision 1.1354
sys/dev/pci/pcidevs: revision 1.1355
sys/dev/pci/pcidevs: revision 1.1345
sys/dev/pci/pcidevs: revision 1.1346
sys/dev/pci/pcidevs: revision 1.1347
sys/dev/pci/pcidevs: revision 1.1349

  Add some Intel devices. Some of them are found in Core i7-8550U.

  Add Toshiba's XG4 and XG5 NVMe SSD.

- Add C62x to the descriptions of Intel C620 series devices.
- Add 0xa1ca for Intel C629 LPC or eSPI.

Add AMD Seattle Host Bridge and PCIE root port devices

Add two otehr I2C devices of Intel.

"s/ are are / are /" in comment. No functional change.

Add some Intel 100 series and C230 series devices.

Add a whole bunch of Cavium ThunderX devices

Add Rockchip vendor ID and a device. Requested by jak@
 From OpenBSD

Add Amazon.com UART, NVMe, and ENA PCI IDs.


To generate a diff of this commit:
cvs rdiff -u -r1.1289.2.10 -r1.1289.2.11 src/sys/dev/pci/pcidevs

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

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1289.2.10 src/sys/dev/pci/pcidevs:1.1289.2.11
--- src/sys/dev/pci/pcidevs:1.1289.2.10	Wed Oct 17 13:45:31 2018
+++ src/sys/dev/pci/pcidevs	Tue Dec  4 11:34:59 2018
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1289.2.10 2018/10/17 13:45:31 martin Exp $
+$NetBSD: pcidevs,v 1.1289.2.11 2018/12/04 11:34:59 martin Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -649,6 +649,8 @@ vendor QINHENG2		0x1c00	Nanjing QinHeng 
 vendor SYMPHONY2	0x1c1c	Symphony Labs (2nd PCI Vendor ID)
 vendor HGST		0x1c58	HGST, Inc.
 vendor BEIJING_MEMBLAZE	0x1c5f	Beijing Memblaze Technology Co. Ltd.
+vendor AMAZON		0x1d0f	Amazon.com, Inc.
+vendor ROCKCHIP		0x1d87	Rockchip
 vendor TEKRAM2		0x1de1	Tekram Technology (2nd PCI Vendor ID)
 vendor SUNIX2		0x1fd4	SUNIX Co
 vendor HINT		0x3388	HiNT
@@ -953,6 +955,11 @@ product ALTIMA AC1001	0x03e9	AC1001 Giga
 product ALTIMA AC9100	0x03ea	AC9100 Gigabit Ethernet
 product ALTIMA AC1003	0x03eb	AC1003 Gigabit Ethernet
 
+/* Amazon.com, Inc. products */
+product AMAZON UART	0x8250	16650-compatible UART
+product AMAZON NVME	0x8061	NVMe SSD
+product AMAZON ENA	0xec20	Elastic Network Adapter
+
 /* AMD products */
 product AMD AMD64_HT	0x1100	K8 AMD64 HyperTransport Configuration
 product AMD AMD64_ADDR	0x1101	K8 AMD64 Address Map Configuration
@@ -1042,6 +1049,9 @@ product AMD F12_GPP0	0x1709	Family12h GP
 product AMD F14_MISC	0x1716	Family12h/14h Misc. Configuration
 product AMD F14_HB18	0x1718	Family12h/14h Host Bridge
 product AMD F14_HB19	0x1719	Family12h/14h Host Bridge
+product AMD SEATTLE_PCHB_1	0x1a00	Seattle Host Bridge
+product AMD SEATTLE_PCHB_2	0x1a01	Seattle Host Bridge
+product AMD SEATTLE_PCIE	0x1a02	Seattle PCIE Root Port
 product AMD PCNET_PCI	0x2000	PCnet-PCI Ethernet
 product AMD PCNET_HOME	0x2001	PCnet-Home HomePNA Ethernet
 product AMD AM_1771_MBW	0x2003	Alchemy AM 1771 MBW
@@ -1932,7 +1942,58 @@ product BUSLOGIC FLASHPOINT	0x8130	Flash
 product C4T GPPCI		0x6773	GPPCI
 
 /* Cavium products */
-product CAVIUM NITROX		0x0001	Nitrox XL
+product CAVIUM NITROX			0x0001	Nitrox XL
+product CAVIUM THUNDERX_MRML		0xa001	Master RML Bridge to RSL devices
+product CAVIUM THUNDERX_PCIB		0xa002	PCI Bridge
+product CAVIUM THUNDERX_RESET		0xa00e	Reset Controller
+product CAVIUM THUNDERX_RNG		0xa018	Random Number Generator
+product CAVIUM THUNDERX_XHCI		0xa01b	xHCI USB Controller
+product CAVIUM THUNDERX_AHCI		0xa01c	AHCI SATA Controller
+product CAVIUM THUNDERX_RAID		0xa01d	RAID Coprocessor
+product CAVIUM THUNDERX_NIC		0xa01e	Network Interface Controller
+product CAVIUM THUNDERX_TNS		0xa01f	Traffic Network Switch
+product CAVIUM THUNDERX_LMC		0xa022	DRAM Controller
+product CAVIUM THUNDERX_BGX		0xa026	Common Ethernet Interface
+product CAVIUM THUNDERX_L2C_TAD		0xa02e	Level 2 cache tag and data
+product CAVIUM THUNDERX_L2C_CBC		0xa02f	L2C-CBC
+product CAVIUM THUNDERX_L2C_MCI		0xa030	L2C-MCI
+
+product CAVIUM THUNDERX_SMMU		0xa008	SMMU
+product CAVIUM THUNDERX_GIC		0xa009	Generic Interrupt Controller
+product CAVIUM THUNDERX_GPIO		0xa00a	GPIO Controller
+product CAVIUM THUNDERX_MPI_SPI		0xa00b	MPI / SPI Controller
+product CAVIUM THUNDERX_MIO_PTP		0xa00c	MIO-PTP Controller
+product CAVIUM THUNDERX_MIX		0xa00d	MIX Network Controller
+product CAVIUM THUNDERX_UART		0xa00f	UART Controller
+product CAVIUM THUNDERX_EMMC_SD		0xa010	eMMC/SD Controller
+product CAVIUM THUNDERX_MIO_BOOT	0xa011	MIO-BOOT Controller
+product CAVIUM THUNDERX_TWSI_I2C	0xa012	TWSI / I2C 

CVS commit: [netbsd-8] src/sys/dev/pci

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 11:29:41 UTC 2018

Modified Files:
src/sys/dev/pci [netbsd-8]: pci_subr.c pcireg.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1118):

sys/dev/pci/pci_subr.c: revision 1.210
sys/dev/pci/pci_subr.c: revision 1.207
sys/dev/pci/pcireg.h: revision 1.143
sys/dev/pci/pci_subr.c: revision 1.208
sys/dev/pci/pcireg.h: revision 1.144
sys/dev/pci/pci_subr.c: revision 1.209
sys/dev/pci/pcireg.h: revision 1.145
sys/dev/pci/pcireg.h: revision 1.146

  Decode PCI Enhanced Allocation.

  The register offset of the mask and pending register is depend on the 64bit
address capable bit, so fix the definition of PCI MSI vector mask and pending
register. This problem was not a real bug because PCI_MSI{MASK,PENDING} were
not used from anywhere.

  The downstream port of PCIe switch is not a root port, so don't print
root port related register. For example, Intel 63xxESB controller's
downstream port device was printed by pcictl(8) with this bug:

-
PCI configuration registers:
   Common header:
 0x00: 0x35108086 0x00100147 0x06040001 0x00010010
 Vendor Name: Intel (0x8086)
 Device Name: 63xxESB PCI Express Downstream Port #1 (0x3510)
(snip)
   Capability register at 0x44   <=
 type: 0x10 (PCI Express)
   Capability register at 0x60   <= 0x60 - 0x44 = 0x1c
 type: 0x05 (MSI)
   Capability register at 0x70
 type: 0x01 (Power Management)
   Capability register at 0x80
 type: 0x0d (Subsystem vendor ID)
(snip)
   PCI Message Signaled Interrupt
 Message Control register: 0x0080
   MSI Enabled: off
   Multiple Message Capable: no (1 vector)
   Multiple Message Enabled: off (1 vector)
   64 Bit Address Capable: on
   Per-Vector Masking Capable: off
   Extended Message Data Capable: off
   Extended Message Data Enable: off
 Message Address (lower) register: 0x
 Message Address (upper) register: 0x
 Message Data register: 0x
(snip)
   PCI Express Capabilities Register
(snip)
 Root Control Register: 0x7005  <=== 0x7005 is the first two byte
   SERR on Correctable Error Enable: on   of the MSI capability structure
   SERR on Non-Fatal Error Enable: off
   SERR on Fatal Error Enable: on
   PME Interrupt Enable: off
   CRS Software Visibility Enable: off
 Root Capability Register: 0x0080
   CRS Software Visibility: off
 Root Status Register: 0x
   PME Requester ID: 0x
   PME was asserted: off
   another PME is pending: off
   Device-dependent header:
 0x40: 0x00c0 0x00616010 0x0001 0x5026  |   |<- PCIe  |
 0x50: 0x0203f441 0x10010020 0x 0x004803c0  |   ->|
 0x60: 0x00807005 0x 0x 0x  |<- MSI ->|
 0x70: 0xc8028001 0x0100 0x 0x  |<- PM  ->|
 0x80: 0x000d 0x 0x 0x  |<- subsystem ID  |
--

  Add new macro PCIE_HAS_ROOTREGS(pcie_devtype) and use it. No functional
change.

  Add new PCIE_HAS_LINKREGS(pcie_devtype) and use it. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.183.2.8 -r1.183.2.9 src/sys/dev/pci/pci_subr.c
cvs rdiff -u -r1.130.2.7 -r1.130.2.8 src/sys/dev/pci/pcireg.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/pci/pci_subr.c
diff -u src/sys/dev/pci/pci_subr.c:1.183.2.8 src/sys/dev/pci/pci_subr.c:1.183.2.9
--- src/sys/dev/pci/pci_subr.c:1.183.2.8	Tue Oct 30 09:32:32 2018
+++ src/sys/dev/pci/pci_subr.c	Tue Dec  4 11:29:41 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_subr.c,v 1.183.2.8 2018/10/30 09:32:32 sborrill Exp $	*/
+/*	$NetBSD: pci_subr.c,v 1.183.2.9 2018/12/04 11:29:41 martin Exp $	*/
 
 /*
  * Copyright (c) 1997 Zubin D. Dittia.  All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.183.2.8 2018/10/30 09:32:32 sborrill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.183.2.9 2018/12/04 11:29:41 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pci.h"
@@ -1756,9 +1756,8 @@ pci_conf_print_pcie_cap(const pcireg_t *
 {
 	pcireg_t reg; /* for each register */
 	pcireg_t val; /* for each bitfield */
-	bool check_link = true;
 	bool check_slot = false;
-	bool check_rootport = false;
+	unsigned int pcie_devtype;
 	bool check_upstreamport = false;
 	unsigned int pciever;
 	unsigned int i;
@@ -1770,7 +1769,8 @@ pci_conf_print_pcie_cap(const pcireg_t *
 	pciever = (unsigned int)(PCIE_XCAP_VER(reg));
 	printf("  Capability version: %u\n", pciever);
 	printf("  Device type: ");
-	switch (PCIE_XCAP_TYPE(reg)) {
+	pcie_devtype = PCIE_XCAP_TYPE(reg);
+	switch (pcie_devtype) {
 	case 

CVS commit: [netbsd-8] src/sys/dev/pci

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 11:29:41 UTC 2018

Modified Files:
src/sys/dev/pci [netbsd-8]: pci_subr.c pcireg.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1118):

sys/dev/pci/pci_subr.c: revision 1.210
sys/dev/pci/pci_subr.c: revision 1.207
sys/dev/pci/pcireg.h: revision 1.143
sys/dev/pci/pci_subr.c: revision 1.208
sys/dev/pci/pcireg.h: revision 1.144
sys/dev/pci/pci_subr.c: revision 1.209
sys/dev/pci/pcireg.h: revision 1.145
sys/dev/pci/pcireg.h: revision 1.146

  Decode PCI Enhanced Allocation.

  The register offset of the mask and pending register is depend on the 64bit
address capable bit, so fix the definition of PCI MSI vector mask and pending
register. This problem was not a real bug because PCI_MSI{MASK,PENDING} were
not used from anywhere.

  The downstream port of PCIe switch is not a root port, so don't print
root port related register. For example, Intel 63xxESB controller's
downstream port device was printed by pcictl(8) with this bug:

-
PCI configuration registers:
   Common header:
 0x00: 0x35108086 0x00100147 0x06040001 0x00010010
 Vendor Name: Intel (0x8086)
 Device Name: 63xxESB PCI Express Downstream Port #1 (0x3510)
(snip)
   Capability register at 0x44   <=
 type: 0x10 (PCI Express)
   Capability register at 0x60   <= 0x60 - 0x44 = 0x1c
 type: 0x05 (MSI)
   Capability register at 0x70
 type: 0x01 (Power Management)
   Capability register at 0x80
 type: 0x0d (Subsystem vendor ID)
(snip)
   PCI Message Signaled Interrupt
 Message Control register: 0x0080
   MSI Enabled: off
   Multiple Message Capable: no (1 vector)
   Multiple Message Enabled: off (1 vector)
   64 Bit Address Capable: on
   Per-Vector Masking Capable: off
   Extended Message Data Capable: off
   Extended Message Data Enable: off
 Message Address (lower) register: 0x
 Message Address (upper) register: 0x
 Message Data register: 0x
(snip)
   PCI Express Capabilities Register
(snip)
 Root Control Register: 0x7005  <=== 0x7005 is the first two byte
   SERR on Correctable Error Enable: on   of the MSI capability structure
   SERR on Non-Fatal Error Enable: off
   SERR on Fatal Error Enable: on
   PME Interrupt Enable: off
   CRS Software Visibility Enable: off
 Root Capability Register: 0x0080
   CRS Software Visibility: off
 Root Status Register: 0x
   PME Requester ID: 0x
   PME was asserted: off
   another PME is pending: off
   Device-dependent header:
 0x40: 0x00c0 0x00616010 0x0001 0x5026  |   |<- PCIe  |
 0x50: 0x0203f441 0x10010020 0x 0x004803c0  |   ->|
 0x60: 0x00807005 0x 0x 0x  |<- MSI ->|
 0x70: 0xc8028001 0x0100 0x 0x  |<- PM  ->|
 0x80: 0x000d 0x 0x 0x  |<- subsystem ID  |
--

  Add new macro PCIE_HAS_ROOTREGS(pcie_devtype) and use it. No functional
change.

  Add new PCIE_HAS_LINKREGS(pcie_devtype) and use it. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.183.2.8 -r1.183.2.9 src/sys/dev/pci/pci_subr.c
cvs rdiff -u -r1.130.2.7 -r1.130.2.8 src/sys/dev/pci/pcireg.h

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



CVS commit: [netbsd-8] src/sys/dev

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 11:21:33 UTC 2018

Modified Files:
src/sys/dev/mii [netbsd-8]: inbmphyreg.h
src/sys/dev/pci [netbsd-8]: if_wm.c if_wmreg.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1117):

sys/dev/pci/if_wmreg.h: revision 1.109
sys/dev/pci/if_wm.c: revision 1.597
sys/dev/pci/if_wm.c: revision 1.598
sys/dev/mii/inbmphyreg.h: revision 1.12
sys/dev/pci/if_wm.c: revision 1.600
sys/dev/pci/if_wm.c: revision 1.601
sys/dev/pci/if_wm.c: revision 1.602

- Add new wm_gmii_{hv,i82544}_{read,write}reg_locked() and use them in
   wm_gmii_{hv,i82544}_{read,write}reg(). *_locked() functions are not
   mii(4) API functions, so it's not required to keep the mii API. Change
   the PHY register type from int to uint16_t. It also change the usage of
   return value. It returns zero on success and non-zero on error.
- Check the return value of *_locked() function and treat it.
- Use *writereg_locked() function to reduce race condition in
   wm_init_lcd_from_nvm().
- Add comment.
- Control TX/RX descriptor snooping control bits on ICH8 and newer.
   Only on ICH8, No-snoop bits are opposite polarity. On my Thinkpad X61,
   the default value of this bits are all zero, so this commit changes
   the snoop function enable on the machine. I tested with some other
   PCH machines and those bits are all zero (enable snoop by default),
   so this commit won't affect to some machines.
- Disable relax ordering on 82546GB(Device ID 0x1099 and 0x10b5) or >= ICH8.
   Same as other OSes.
- Add wm_oem_bits_config_ich8lan() to control LPLU and GbE setting base on
   the NVM's info.
- Modify wm_enable_wakeup() to reduce difference against FreeBSD and Linux.
   This modification affects to ICH8 and newer devices. I217 Rapid Start
   Technology support have not written yet (it's TODO).
- Add wm_k1_workaround_lv() from FreeBSD. It's PCH2 specific:
 Workaround to set the K1 beacon duration for 82579 parts in 10Mbps.
 Disable K1 for 1000 and 100 speeds.
- Make wm_link_stall_workaround_hv() and move an 82578 specific code into it.
   Don't apply the workaround if BMCR_LOOP bit is set. Same as FreeBSD.
- Add comment. Modify comment.
  Fix comment. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.9.8.2 -r1.9.8.3 src/sys/dev/mii/inbmphyreg.h
cvs rdiff -u -r1.508.4.26 -r1.508.4.27 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.98.6.5 -r1.98.6.6 src/sys/dev/pci/if_wmreg.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/mii/inbmphyreg.h
diff -u src/sys/dev/mii/inbmphyreg.h:1.9.8.2 src/sys/dev/mii/inbmphyreg.h:1.9.8.3
--- src/sys/dev/mii/inbmphyreg.h:1.9.8.2	Thu Nov  8 12:09:18 2018
+++ src/sys/dev/mii/inbmphyreg.h	Tue Dec  4 11:21:32 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: inbmphyreg.h,v 1.9.8.2 2018/11/08 12:09:18 martin Exp $	*/
+/*	$NetBSD: inbmphyreg.h,v 1.9.8.3 2018/12/04 11:21:32 martin Exp $	*/
 /***
 Copyright (c) 2001-2005, Intel Corporation 
 All rights reserved.
@@ -74,6 +74,13 @@ POSSIBILITY OF SUCH DAMAGE.
 #define BME1000_PSCR_DOWNSHIFT_COUNTER_MASK 0x7000
 #define BME1000_PSCR_DOWNSHIFT_COUNTER_SHIFT12
 
+/* BM PHY Copper Specific Status */
+#define BM_CS_STATUS		BME1000_REG(0, 17)
+#define BM_CS_STATUS_LINK_UP	0x0400
+#define BM_CS_STATUS_RESOLVED	0x0800
+#define BM_CS_STATUS_SPEED_MASK	0xC000
+#define BM_CS_STATUS_SPEED_1000	0x8000
+
 #define BME1000_PHY_PAGE_SELECT	BME1000_REG(0, 22) /* Page Select */
 
 #define BME1000_BIAS_SETTING	29
@@ -91,6 +98,14 @@ POSSIBILITY OF SUCH DAMAGE.
 #define HV_OEM_BITS_A1KDIS	(1 << 6)
 #define HV_OEM_BITS_ANEGNOW	(1 << 10)
 
+/* 82577 Mobile Phy Status Register */
+#define HV_M_STATUS		BME1000_REG(0, 26)
+#define HV_M_STATUS_AUTONEG_COMPLETE 0x1000
+#define HV_M_STATUS_SPEED_MASK	0x0300
+#define HV_M_STATUS_SPEED_1000	0x0200
+#define HV_M_STATUS_SPEED_100	0x0100
+#define HV_M_STATUS_LINK_UP	0x0040
+
 #define HV_LED_CONFIG		BME1000_REG(0, 30)
 
 #define	HV_KMRN_MODE_CTRL	BME1000_REG(BM_PORT_CTRL_PAGE, 16)

Index: src/sys/dev/pci/if_wm.c
diff -u src/sys/dev/pci/if_wm.c:1.508.4.26 src/sys/dev/pci/if_wm.c:1.508.4.27
--- src/sys/dev/pci/if_wm.c:1.508.4.26	Mon Nov 26 17:24:51 2018
+++ src/sys/dev/pci/if_wm.c	Tue Dec  4 11:21:32 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_wm.c,v 1.508.4.26 2018/11/26 17:24:51 snj Exp $	*/
+/*	$NetBSD: if_wm.c,v 1.508.4.27 2018/12/04 11:21:32 martin Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003, 2004 Wasabi Systems, Inc.
@@ -83,7 +83,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508.4.26 2018/11/26 17:24:51 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_wm.c,v 1.508.4.27 2018/12/04 11:21:32 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -463,6 +463,8 @@ struct wm_queue {
 struct 

CVS commit: [netbsd-8] src/sys/dev

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 11:21:33 UTC 2018

Modified Files:
src/sys/dev/mii [netbsd-8]: inbmphyreg.h
src/sys/dev/pci [netbsd-8]: if_wm.c if_wmreg.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1117):

sys/dev/pci/if_wmreg.h: revision 1.109
sys/dev/pci/if_wm.c: revision 1.597
sys/dev/pci/if_wm.c: revision 1.598
sys/dev/mii/inbmphyreg.h: revision 1.12
sys/dev/pci/if_wm.c: revision 1.600
sys/dev/pci/if_wm.c: revision 1.601
sys/dev/pci/if_wm.c: revision 1.602

- Add new wm_gmii_{hv,i82544}_{read,write}reg_locked() and use them in
   wm_gmii_{hv,i82544}_{read,write}reg(). *_locked() functions are not
   mii(4) API functions, so it's not required to keep the mii API. Change
   the PHY register type from int to uint16_t. It also change the usage of
   return value. It returns zero on success and non-zero on error.
- Check the return value of *_locked() function and treat it.
- Use *writereg_locked() function to reduce race condition in
   wm_init_lcd_from_nvm().
- Add comment.
- Control TX/RX descriptor snooping control bits on ICH8 and newer.
   Only on ICH8, No-snoop bits are opposite polarity. On my Thinkpad X61,
   the default value of this bits are all zero, so this commit changes
   the snoop function enable on the machine. I tested with some other
   PCH machines and those bits are all zero (enable snoop by default),
   so this commit won't affect to some machines.
- Disable relax ordering on 82546GB(Device ID 0x1099 and 0x10b5) or >= ICH8.
   Same as other OSes.
- Add wm_oem_bits_config_ich8lan() to control LPLU and GbE setting base on
   the NVM's info.
- Modify wm_enable_wakeup() to reduce difference against FreeBSD and Linux.
   This modification affects to ICH8 and newer devices. I217 Rapid Start
   Technology support have not written yet (it's TODO).
- Add wm_k1_workaround_lv() from FreeBSD. It's PCH2 specific:
 Workaround to set the K1 beacon duration for 82579 parts in 10Mbps.
 Disable K1 for 1000 and 100 speeds.
- Make wm_link_stall_workaround_hv() and move an 82578 specific code into it.
   Don't apply the workaround if BMCR_LOOP bit is set. Same as FreeBSD.
- Add comment. Modify comment.
  Fix comment. No functional change.


To generate a diff of this commit:
cvs rdiff -u -r1.9.8.2 -r1.9.8.3 src/sys/dev/mii/inbmphyreg.h
cvs rdiff -u -r1.508.4.26 -r1.508.4.27 src/sys/dev/pci/if_wm.c
cvs rdiff -u -r1.98.6.5 -r1.98.6.6 src/sys/dev/pci/if_wmreg.h

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



CVS commit: [netbsd-8] src/sys/dev/mii

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 11:16:33 UTC 2018

Modified Files:
src/sys/dev/mii [netbsd-8]: miidevs.h miidevs_data.h

Log Message:
Regen for ticket #1116


To generate a diff of this commit:
cvs rdiff -u -r1.128.6.2 -r1.128.6.3 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.116.6.2 -r1.116.6.3 src/sys/dev/mii/miidevs_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/mii/miidevs.h
diff -u src/sys/dev/mii/miidevs.h:1.128.6.2 src/sys/dev/mii/miidevs.h:1.128.6.3
--- src/sys/dev/mii/miidevs.h:1.128.6.2	Thu Jul 26 21:09:42 2018
+++ src/sys/dev/mii/miidevs.h	Tue Dec  4 11:16:33 2018
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs.h,v 1.128.6.2 2018/07/26 21:09:42 snj Exp $	*/
+/*	$NetBSD: miidevs.h,v 1.128.6.3 2018/12/04 11:16:33 martin Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.125.6.2 2018/07/26 21:09:22 snj Exp
+ *	NetBSD: miidevs,v 1.125.6.3 2018/12/04 11:15:20 martin Exp
  */
 
 /*-
@@ -56,36 +56,36 @@
  * Use "make -f Makefile.miidevs" to regenerate miidevs.h and miidevs_data.h
  */
 
+#define	MII_OUI_AMD	0x1a	/* Advanced Micro Devices */
+#define	MII_OUI_CICADA	0x0003f1	/* Cicada Semiconductor */
 #define	MII_OUI_AGERE	0x00053d	/* Agere */
+#define	MII_OUI_BROADCOM2	0x000af7	/* Broadcom Corporation */
+#define	MII_OUI_BROADCOM	0x001018	/* Broadcom Corporation */
+#define	MII_OUI_MICREL	0x0010a1	/* Micrel */
 #define	MII_OUI_ALTIMA	0x0010a9	/* Altima Communications */
-#define	MII_OUI_AMD	0x1a	/* Advanced Micro Devices */
+#define	MII_OUI_ENABLESEMI	0x0010dd	/* Enable Semiconductor */
 #define	MII_OUI_ATHEROS	0x001374	/* Atheros */
-#define	MII_OUI_ATTANSIC	0x00c82e	/* Attansic Technology */
-#define	MII_OUI_BROADCOM	0x001018	/* Broadcom Corporation */
-#define	MII_OUI_BROADCOM2	0x000af7	/* Broadcom Corporation */
 #define	MII_OUI_BROADCOM3	0x001be9	/* Broadcom Corporation */
-#define	MII_OUI_CICADA	0x0003F1	/* Cicada Semiconductor */
+#define	MII_OUI_LEVEL1	0x00207b	/* Level 1 */
+#define	MII_OUI_MARVELL	0x005043	/* Marvell Semiconductor */
+#define	MII_OUI_QUALSEMI	0x006051	/* Quality Semiconductor */
 #define	MII_OUI_DAVICOM	0x00606e	/* Davicom Semiconductor */
-#define	MII_OUI_ENABLESEMI	0x0010dd	/* Enable Semiconductor */
+#define	MII_OUI_SMSC	0x00800f	/* SMSC */
 #define	MII_OUI_ICPLUS	0x0090c3	/* IC Plus Corp. */
+#define	MII_OUI_SEEQ	0x00a07d	/* Seeq */
 #define	MII_OUI_ICS	0x00a0be	/* Integrated Circuit Systems */
 #define	MII_OUI_INTEL	0x00aa00	/* Intel */
-#define	MII_OUI_JMICRON	0x00d831	/* JMicron */
-#define	MII_OUI_LEVEL1	0x00207b	/* Level 1 */
-#define	MII_OUI_MARVELL	0x005043	/* Marvell Semiconductor */
-#define	MII_OUI_MICREL	0x0010a1	/* Micrel */
+#define	MII_OUI_TSC	0x00c039	/* TDK Semiconductor */
 #define	MII_OUI_MYSON	0x00c0b4	/* Myson Technology */
-#define	MII_OUI_NATSEMI	0x080017	/* National Semiconductor */
-#define	MII_OUI_PMCSIERRA	0x00e004	/* PMC-Sierra */
+#define	MII_OUI_ATTANSIC	0x00c82e	/* Attansic Technology */
 #define	MII_OUI_RDC	0x00d02d	/* RDC Semiconductor */
-#define	MII_OUI_REALTEK	0x00e04c	/* RealTek */
-#define	MII_OUI_QUALSEMI	0x006051	/* Quality Semiconductor */
-#define	MII_OUI_SEEQ	0x00a07d	/* Seeq */
+#define	MII_OUI_JMICRON	0x00d831	/* JMicron */
+#define	MII_OUI_PMCSIERRA	0x00e004	/* PMC-Sierra */
 #define	MII_OUI_SIS	0x00e006	/* Silicon Integrated Systems */
-#define	MII_OUI_SMSC	0x00800f	/* SMSC */
-#define	MII_OUI_TI	0x080028	/* Texas Instruments */
-#define	MII_OUI_TSC	0x00c039	/* TDK Semiconductor */
+#define	MII_OUI_REALTEK	0x00e04c	/* RealTek */
 #define	MII_OUI_XAQTI	0x00e0ae	/* XaQti Corp. */
+#define	MII_OUI_NATSEMI	0x080017	/* National Semiconductor */
+#define	MII_OUI_TI	0x080028	/* Texas Instruments */
 
 /* Some Intel 82553's use an alternative OUI. */
 #define	MII_OUI_xxINTEL	0x001f00	/* Intel */
@@ -110,6 +110,7 @@
 #define	MII_OUI_xxXAQTI	0xace000	/* XaQti Corp. */
 
 /* Don't know what's going on here. */
+#define	MII_OUI_xxASIX	0x000674	/* Asix Semiconductor */
 #define	MII_OUI_xxPMCSIERRA	0x0009c0	/* PMC-Sierra */
 #define	MII_OUI_xxPMCSIERRA2	0x009057	/* PMC-Sierra */
 
@@ -125,6 +126,10 @@
 #define	MII_MODEL_AGERE_ET1011	0x0004
 #define	MII_STR_AGERE_ET1011	"Agere ET1011 10/100/1000baseT PHY"
 
+/* Asix semiconductor PHYs */
+#define	MII_MODEL_xxASIX_AX88X9X	0x0031
+#define	MII_STR_xxASIX_AX88X9X	"Ax88x9x internal PHY"
+
 /* Atheros PHYs */
 #define	MII_MODEL_ATHEROS_F1	0x0001
 #define	MII_STR_ATHEROS_F1	"F1 10/100/1000 PHY"
@@ -446,7 +451,7 @@
 #define	MII_MODEL_xxNATSEMI_DP83843	0x0001
 #define	MII_STR_xxNATSEMI_DP83843	"DP83843 10/100 media interface"
 #define	MII_MODEL_xxNATSEMI_DP83815	0x0002
-#define	MII_STR_xxNATSEMI_DP83815	"DP83815 10/100 media interface"
+#define	MII_STR_xxNATSEMI_DP83815	"DP83815/DP83846A 10/100 media interface"
 #define	MII_MODEL_xxNATSEMI_DP83847	0x0003
 #define	

CVS commit: [netbsd-8] src/sys/dev/mii

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 11:16:33 UTC 2018

Modified Files:
src/sys/dev/mii [netbsd-8]: miidevs.h miidevs_data.h

Log Message:
Regen for ticket #1116


To generate a diff of this commit:
cvs rdiff -u -r1.128.6.2 -r1.128.6.3 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.116.6.2 -r1.116.6.3 src/sys/dev/mii/miidevs_data.h

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



CVS commit: [netbsd-8] src/sys/dev/mii

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 11:15:21 UTC 2018

Modified Files:
src/sys/dev/mii [netbsd-8]: miidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1116):

sys/dev/mii/miidevs: revision 1.130
sys/dev/mii/miidevs: revision 1.131

Sort OUI by number. No functional change.

- Add ASIX Ax88x9x
- Add description for DP83846A.


To generate a diff of this commit:
cvs rdiff -u -r1.125.6.2 -r1.125.6.3 src/sys/dev/mii/miidevs

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/mii/miidevs
diff -u src/sys/dev/mii/miidevs:1.125.6.2 src/sys/dev/mii/miidevs:1.125.6.3
--- src/sys/dev/mii/miidevs:1.125.6.2	Thu Jul 26 21:09:22 2018
+++ src/sys/dev/mii/miidevs	Tue Dec  4 11:15:20 2018
@@ -1,4 +1,4 @@
-$NetBSD: miidevs,v 1.125.6.2 2018/07/26 21:09:22 snj Exp $
+$NetBSD: miidevs,v 1.125.6.3 2018/12/04 11:15:20 martin Exp $
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -49,36 +49,36 @@ $NetBSD: miidevs,v 1.125.6.2 2018/07/26 
  * Use "make -f Makefile.miidevs" to regenerate miidevs.h and miidevs_data.h
  */
 
+oui AMD0x1a	Advanced Micro Devices
+oui CICADA			0x0003f1	Cicada Semiconductor
 oui AGERE			0x00053d	Agere
+oui BROADCOM2			0x000af7	Broadcom Corporation
+oui BROADCOM			0x001018	Broadcom Corporation
+oui MICREL			0x0010a1	Micrel
 oui ALTIMA			0x0010a9	Altima Communications
-oui AMD0x1a	Advanced Micro Devices
+oui ENABLESEMI			0x0010dd	Enable Semiconductor
 oui ATHEROS			0x001374	Atheros
-oui ATTANSIC			0x00c82e	Attansic Technology
-oui BROADCOM			0x001018	Broadcom Corporation
-oui BROADCOM2			0x000af7	Broadcom Corporation
 oui BROADCOM3			0x001be9	Broadcom Corporation
-oui CICADA			0x0003F1	Cicada Semiconductor
+oui LEVEL1			0x00207b	Level 1
+oui MARVELL			0x005043	Marvell Semiconductor
+oui QUALSEMI			0x006051	Quality Semiconductor
 oui DAVICOM			0x00606e	Davicom Semiconductor
-oui ENABLESEMI			0x0010dd	Enable Semiconductor
+oui SMSC			0x00800f	SMSC
 oui ICPLUS			0x0090c3	IC Plus Corp.
+oui SEEQ			0x00a07d	Seeq
 oui ICS0x00a0be	Integrated Circuit Systems
 oui INTEL			0x00aa00	Intel
-oui JMICRON			0x00d831	JMicron
-oui LEVEL1			0x00207b	Level 1
-oui MARVELL			0x005043	Marvell Semiconductor
-oui MICREL			0x0010a1	Micrel
+oui TSC0x00c039	TDK Semiconductor
 oui MYSON			0x00c0b4	Myson Technology
-oui NATSEMI			0x080017	National Semiconductor
-oui PMCSIERRA			0x00e004	PMC-Sierra
+oui ATTANSIC			0x00c82e	Attansic Technology
 oui RDC0x00d02d	RDC Semiconductor
-oui REALTEK			0x00e04c	RealTek
-oui QUALSEMI			0x006051	Quality Semiconductor
-oui SEEQ			0x00a07d	Seeq
+oui JMICRON			0x00d831	JMicron
+oui PMCSIERRA			0x00e004	PMC-Sierra
 oui SIS0x00e006	Silicon Integrated Systems
-oui SMSC			0x00800f	SMSC
-oui TI0x080028	Texas Instruments
-oui TSC0x00c039	TDK Semiconductor
+oui REALTEK			0x00e04c	RealTek
 oui XAQTI			0x00e0ae	XaQti Corp.
+oui NATSEMI			0x080017	National Semiconductor
+oui TI0x080028	Texas Instruments
 
 /* Some Intel 82553's use an alternative OUI. */
 oui xxINTEL			0x001f00	Intel
@@ -103,6 +103,7 @@ oui xxLEVEL1			0x782000	Level 1
 oui xxXAQTI			0xace000	XaQti Corp.
 
 /* Don't know what's going on here. */
+oui xxASIX			0x000674	Asix Semiconductor
 oui xxPMCSIERRA			0x0009c0	PMC-Sierra
 oui xxPMCSIERRA2		0x009057	PMC-Sierra
 
@@ -117,6 +118,9 @@ oui yyREALTEK			0x04	Realtek
  */
 model AGERE ET1011		0x0004 Agere ET1011 10/100/1000baseT PHY
 
+/* Asix semiconductor PHYs */
+model xxASIX AX88X9X		0x0031 Ax88x9x internal PHY
+
 /* Atheros PHYs */
 model ATHEROS F1		0x0001 F1 10/100/1000 PHY
 model ATHEROS F2		0x0002 F2 10/100 PHY
@@ -295,7 +299,7 @@ model MYSON MTD803		0x MTD803 3-in-1
 /* National Semiconductor PHYs */
 model xxNATSEMI DP83840		0x DP83840 10/100 media interface
 model xxNATSEMI DP83843		0x0001 DP83843 10/100 media interface
-model xxNATSEMI DP83815		0x0002 DP83815 10/100 media interface
+model xxNATSEMI DP83815		0x0002 DP83815/DP83846A 10/100 media interface
 model xxNATSEMI DP83847		0x0003 DP83847 10/100 media interface
 model xxNATSEMI DP83891		0x0005 DP83891 1000BASE-T media interface
 model xxNATSEMI DP83861		0x0006 DP83861 1000BASE-T media interface



CVS commit: [netbsd-8] src/sys/dev/mii

2018-12-04 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Dec  4 11:15:21 UTC 2018

Modified Files:
src/sys/dev/mii [netbsd-8]: miidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1116):

sys/dev/mii/miidevs: revision 1.130
sys/dev/mii/miidevs: revision 1.131

Sort OUI by number. No functional change.

- Add ASIX Ax88x9x
- Add description for DP83846A.


To generate a diff of this commit:
cvs rdiff -u -r1.125.6.2 -r1.125.6.3 src/sys/dev/mii/miidevs

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



CVS commit: src/sys/dev/pckbport

2018-12-04 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Tue Dec  4 10:10:15 UTC 2018

Modified Files:
src/sys/dev/pckbport: synaptics.c

Log Message:
* Increase the default scaling of the two finger scroll to make it
  less sensitive
* Fix range check for hw.synaptics.scale_z so it can be set with sysctl


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pckbport/synaptics.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/pckbport/synaptics.c
diff -u src/sys/dev/pckbport/synaptics.c:1.45 src/sys/dev/pckbport/synaptics.c:1.46
--- src/sys/dev/pckbport/synaptics.c:1.45	Wed Nov 28 09:14:03 2018
+++ src/sys/dev/pckbport/synaptics.c	Tue Dec  4 10:10:15 2018
@@ -1,4 +1,4 @@
-/*	$NetBSD: synaptics.c,v 1.45 2018/11/28 09:14:03 blymn Exp $	*/
+/*	$NetBSD: synaptics.c,v 1.46 2018/12/04 10:10:15 blymn Exp $	*/
 
 /*
  * Copyright (c) 2005, Steve C. Woodford
@@ -48,7 +48,7 @@
 #include "opt_pms.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.45 2018/11/28 09:14:03 blymn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: synaptics.c,v 1.46 2018/12/04 10:10:15 blymn Exp $");
 
 #include 
 #include 
@@ -115,7 +115,7 @@ static int synaptics_button3 = SYNAPTICS
 static int synaptics_two_fingers_emul = 0;
 static int synaptics_scale_x = 16;
 static int synaptics_scale_y = 16;
-static int synaptics_scale_z = 1;
+static int synaptics_scale_z = 32;
 static int synaptics_max_speed_x = 32;
 static int synaptics_max_speed_y = 32;
 static int synaptics_max_speed_z = 2;
@@ -867,7 +867,8 @@ pms_sysctl_synaptics_verify(SYSCTLFN_ARG
 			return (EINVAL);
 	} else
 	if (node.sysctl_num == synaptics_scale_x_nodenum ||
-	node.sysctl_num == synaptics_scale_y_nodenum) {
+	node.sysctl_num == synaptics_scale_y_nodenum ||
+	node.sysctl_num == synaptics_scale_z_nodenum) {
 		if (t < 1 || t > (SYNAPTICS_EDGE_MAX / 4))
 			return (EINVAL);
 	} else



CVS commit: src/sys/dev/pckbport

2018-12-04 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Tue Dec  4 10:10:15 UTC 2018

Modified Files:
src/sys/dev/pckbport: synaptics.c

Log Message:
* Increase the default scaling of the two finger scroll to make it
  less sensitive
* Fix range check for hw.synaptics.scale_z so it can be set with sysctl


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/dev/pckbport/synaptics.c

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



CVS commit: src/tests/bin/sh/dotcmd

2018-12-04 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Dec  4 09:47:26 UTC 2018

Modified Files:
src/tests/bin/sh/dotcmd: scoped_command

Log Message:
Supply a missing \ ... this missing has meant that these tests
have not been testing everything they should have been testing.
Never mind, they still all succeed.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/bin/sh/dotcmd/scoped_command

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



CVS commit: src/tests/bin/sh/dotcmd

2018-12-04 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Tue Dec  4 09:47:26 UTC 2018

Modified Files:
src/tests/bin/sh/dotcmd: scoped_command

Log Message:
Supply a missing \ ... this missing has meant that these tests
have not been testing everything they should have been testing.
Never mind, they still all succeed.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/bin/sh/dotcmd/scoped_command

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

Modified files:

Index: src/tests/bin/sh/dotcmd/scoped_command
diff -u src/tests/bin/sh/dotcmd/scoped_command:1.2 src/tests/bin/sh/dotcmd/scoped_command:1.3
--- src/tests/bin/sh/dotcmd/scoped_command:1.2	Sun Mar 27 14:57:50 2016
+++ src/tests/bin/sh/dotcmd/scoped_command	Tue Dec  4 09:47:25 2018
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $NetBSD: scoped_command,v 1.2 2016/03/27 14:57:50 christos Exp $
+# $NetBSD: scoped_command,v 1.3 2018/12/04 09:47:25 kre Exp $
 #
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -71,7 +71,7 @@ set -e
 # don't rely on command lists (';')
 cmd="echo 'before ${3}'
 ${2}
-echo 'after ${3}, return value:' ${?}"
+echo 'after ${3}, return value:' \${?}"
 
 echo "#!${TEST_SH}"
 



CVS commit: src/tests/lib/libcurses/check_files

2018-12-04 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Tue Dec  4 09:32:50 UTC 2018

Modified Files:
src/tests/lib/libcurses/check_files: background1.chk

Log Message:
Fix failing background test check file.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libcurses/check_files/background1.chk

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



CVS commit: src/tests/lib/libcurses/check_files

2018-12-04 Thread Brett Lymn
Module Name:src
Committed By:   blymn
Date:   Tue Dec  4 09:32:50 UTC 2018

Modified Files:
src/tests/lib/libcurses/check_files: background1.chk

Log Message:
Fix failing background test check file.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libcurses/check_files/background1.chk

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

Modified files:

Index: src/tests/lib/libcurses/check_files/background1.chk
diff -u src/tests/lib/libcurses/check_files/background1.chk:1.2 src/tests/lib/libcurses/check_files/background1.chk:1.3
--- src/tests/lib/libcurses/check_files/background1.chk:1.2	Tue Nov  6 09:43:25 2018
+++ src/tests/lib/libcurses/check_files/background1.chk	Tue Dec  4 09:32:50 2018
@@ -1 +1 @@
-smulcup2;1Xcup3;1Xcup4;1Xcup5;1Xcup6;1Xcup7;1Xcup8;1Xcup9;1Xcup10;1Xcup11;1Xcup12;1XA
 AAAcup13;1Xcup14;1Xcup15;1Xcup16;1Xcup17;1Xcup18;1Xcup19;1Xcup20;1Xcup21;1Xcup22;1Xcup23;1XAA
 AAcup24;1XAAAsmamArmamcup1;1Xrmul
+smulcup2;1Xcup3;1Xcup4;1Xcup5;1Xcup6;1Xcup7;1Xcup8;1Xcup9;1Xcup10;1Xcup11;1Xcup12;1XA
 AAAcup13;1Xcup14;1Xcup15;1Xcup16;1Xcup17;1Xcup18;1Xcup19;1Xcup20;1Xcup21;1Xcup22;1Xcup23;1XAA
 

CVS commit: src/sys/dev

2018-12-04 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Dec  4 09:27:59 UTC 2018

Modified Files:
src/sys/dev/rasops: rasops.c rasops1.c rasops15.c rasops2.c rasops24.c
rasops4.c rasops8.c
src/sys/dev/wscons: wsdisplayvar.h

Log Message:
rasops reused wscons attribute bits for internal control.
- make upper 4 attribute bits available for such use
- use wscons flag names instead of literal constants.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/dev/rasops/rasops.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/rasops/rasops1.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/rasops/rasops15.c
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/rasops/rasops2.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/rasops/rasops24.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/rasops/rasops4.c
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/rasops/rasops8.c
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/wscons/wsdisplayvar.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/rasops/rasops.c
diff -u src/sys/dev/rasops/rasops.c:1.78 src/sys/dev/rasops/rasops.c:1.79
--- src/sys/dev/rasops/rasops.c:1.78	Thu Nov 29 23:44:50 2018
+++ src/sys/dev/rasops/rasops.c	Tue Dec  4 09:27:59 2018
@@ -1,4 +1,4 @@
-/*	 $NetBSD: rasops.c,v 1.78 2018/11/29 23:44:50 macallan Exp $	*/
+/*	 $NetBSD: rasops.c,v 1.79 2018/12/04 09:27:59 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.78 2018/11/29 23:44:50 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.79 2018/12/04 09:27:59 mlelstv Exp $");
 
 #include "opt_rasops.h"
 #include "rasops_glue.h"
@@ -570,13 +570,13 @@ rasops_allocattr_color(void *cookie, int
 	if ((flg & WSATTR_HILIT) != 0)
 		fg += 8;
 
-	flg = ((flg & WSATTR_UNDERLINE) ? 1 : 0);
+	flg = flg & WSATTR_USERMASK;
 
 	if (rasops_isgray[fg])
-		flg |= 2;
+		flg |= WSATTR_PRIVATE1;
 
 	if (rasops_isgray[bg])
-		flg |= 4;
+		flg |= WSATTR_PRIVATE2;
 
 	*attr = (bg << 16) | (fg << 24) | flg;
 	return (0);
@@ -903,7 +903,7 @@ rasops_unpack_attr(long attr, int *fg, i
 	*fg = ((u_int)attr >> 24) & 0xf;
 	*bg = ((u_int)attr >> 16) & 0xf;
 	if (underline != NULL)
-		*underline = (u_int)attr & 1;
+		*underline = (u_int)attr & WSATTR_UNDERLINE;
 }
 
 /*
@@ -1366,7 +1366,7 @@ rasops_putchar_rotated_cw(void *cookie, 
 
 	/* Do rotated char sans (side)underline */
 	ri->ri_real_ops.putchar(cookie, col, ri->ri_rows - row - 1, uc,
-	attr & ~1);
+	attr & ~WSATTR_UNDERLINE);
 
 	/* Do rotated underline */
 	rp = ri->ri_bits + col * ri->ri_yscale + (ri->ri_rows - row - 1) * 
@@ -1374,7 +1374,7 @@ rasops_putchar_rotated_cw(void *cookie, 
 	height = ri->ri_font->fontheight;
 
 	/* XXX this assumes 16-bit color depth */
-	if ((attr & 1) != 0) {
+	if ((attr & WSATTR_UNDERLINE) != 0) {
 		int16_t c = (int16_t)ri->ri_devcmap[((u_int)attr >> 24) & 0xf];
 
 		while (height--) {
@@ -1493,7 +1493,7 @@ rasops_putchar_rotated_ccw(void *cookie,
 
 	/* Do rotated char sans (side)underline */
 	ri->ri_real_ops.putchar(cookie, ri->ri_cols - col - 1, row, uc,
-	attr & ~1);
+	attr & ~WSATTR_UNDERLINE);
 
 	/* Do rotated underline */
 	rp = ri->ri_bits + (ri->ri_cols - col - 1) * ri->ri_yscale +
@@ -1502,7 +1502,7 @@ rasops_putchar_rotated_ccw(void *cookie,
 	height = ri->ri_font->fontheight;
 
 	/* XXX this assumes 16-bit color depth */
-	if ((attr & 1) != 0) {
+	if ((attr & WSATTR_UNDERLINE) != 0) {
 		int16_t c = (int16_t)ri->ri_devcmap[((u_int)attr >> 24) & 0xf];
 
 		while (height--) {

Index: src/sys/dev/rasops/rasops1.c
diff -u src/sys/dev/rasops/rasops1.c:1.23 src/sys/dev/rasops/rasops1.c:1.24
--- src/sys/dev/rasops/rasops1.c:1.23	Tue May  4 04:57:34 2010
+++ src/sys/dev/rasops/rasops1.c	Tue Dec  4 09:27:59 2018
@@ -1,4 +1,4 @@
-/* 	$NetBSD: rasops1.c,v 1.23 2010/05/04 04:57:34 macallan Exp $	*/
+/* 	$NetBSD: rasops1.c,v 1.24 2018/12/04 09:27:59 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rasops1.c,v 1.23 2010/05/04 04:57:34 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops1.c,v 1.24 2018/12/04 09:27:59 mlelstv Exp $");
 
 #include "opt_rasops.h"
 
@@ -180,7 +180,7 @@ rasops1_putchar(void *cookie, int row, i
 		}
 
 		/* Do underline */
-		if ((attr & 1) != 0) {
+		if ((attr & WSATTR_UNDERLINE) != 0) {
 			DELTA(rp, -(ri->ri_stride << 1), int32_t *);
 			tmp = (*rp & lmask) | (fg & rmask);
 			*rp = tmp;
@@ -257,7 +257,7 @@ rasops1_putchar(void *cookie, int row, i
 		}
 
 		/* Do underline */
-		if ((attr & 1) != 0) {
+		if ((attr & WSATTR_UNDERLINE) != 0) {
 			DELTA(rp, -(ri->ri_stride << 1), int32_t *);
 			tmp = (rp[0] & lmask) | (fg & ~lmask);
 			tmp2 = (rp[1] & rmask) | (fg & ~rmask);
@@ -344,7 +344,7 @@ rasops1_putchar8(void *cookie, int row, 
 	}
 
 	/* Do underline */
-	if ((attr & 1) != 0) {
+	if ((attr & 

CVS commit: src/sys/dev

2018-12-04 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Dec  4 09:27:59 UTC 2018

Modified Files:
src/sys/dev/rasops: rasops.c rasops1.c rasops15.c rasops2.c rasops24.c
rasops4.c rasops8.c
src/sys/dev/wscons: wsdisplayvar.h

Log Message:
rasops reused wscons attribute bits for internal control.
- make upper 4 attribute bits available for such use
- use wscons flag names instead of literal constants.


To generate a diff of this commit:
cvs rdiff -u -r1.78 -r1.79 src/sys/dev/rasops/rasops.c
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/rasops/rasops1.c
cvs rdiff -u -r1.21 -r1.22 src/sys/dev/rasops/rasops15.c
cvs rdiff -u -r1.18 -r1.19 src/sys/dev/rasops/rasops2.c
cvs rdiff -u -r1.29 -r1.30 src/sys/dev/rasops/rasops24.c
cvs rdiff -u -r1.11 -r1.12 src/sys/dev/rasops/rasops4.c
cvs rdiff -u -r1.34 -r1.35 src/sys/dev/rasops/rasops8.c
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/wscons/wsdisplayvar.h

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



CVS commit: src/share/man/man4

2018-12-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Dec  4 08:02:14 UTC 2018

Modified Files:
src/share/man/man4: mpii.4

Log Message:
Remove trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/mpii.4

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/mpii.4
diff -u src/share/man/man4/mpii.4:1.3 src/share/man/man4/mpii.4:1.4
--- src/share/man/man4/mpii.4:1.3	Mon Dec  3 22:41:56 2018
+++ src/share/man/man4/mpii.4	Tue Dec  4 08:02:14 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: mpii.4,v 1.3 2018/12/03 22:41:56 bouyer Exp $
+.\"	$NetBSD: mpii.4,v 1.4 2018/12/04 08:02:14 wiz Exp $
 .\"	OpenBSD: mpii.4,v 1.8 2010/10/01 12:27:36 mikeb Exp
 .\"
 .\" Copyright (c) 2010 Marco Peereboom 
@@ -63,8 +63,8 @@ LSI SAS 9200-8e, SAS 9207-8i, SAS 9211-4
 Broadcom SAS 9300, HBA 9400
 .El
 .Pp
-Some models of these controllers carry an Integrated RAID (IR) firmware 
-providing support for RAID 0, RAID 1, RAID10 or RAID5 using SAS or SATA 
+Some models of these controllers carry an Integrated RAID (IR) firmware
+providing support for RAID 0, RAID 1, RAID10 or RAID5 using SAS or SATA
 drives.
 All RAID configuration is done through the controllers' BIOSes.
 .Pp



CVS commit: src/share/man/man4

2018-12-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Dec  4 08:02:14 UTC 2018

Modified Files:
src/share/man/man4: mpii.4

Log Message:
Remove trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/share/man/man4/mpii.4

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



CVS commit: src/usr.bin/pkill

2018-12-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Dec  4 08:01:35 UTC 2018

Modified Files:
src/usr.bin/pkill: pkill.1

Log Message:
Sort SEE ALSO.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/pkill/pkill.1

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



CVS commit: src/usr.bin/pkill

2018-12-04 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Tue Dec  4 08:01:35 UTC 2018

Modified Files:
src/usr.bin/pkill: pkill.1

Log Message:
Sort SEE ALSO.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/pkill/pkill.1

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

Modified files:

Index: src/usr.bin/pkill/pkill.1
diff -u src/usr.bin/pkill/pkill.1:1.29 src/usr.bin/pkill/pkill.1:1.30
--- src/usr.bin/pkill/pkill.1:1.29	Mon Dec  3 17:03:44 2018
+++ src/usr.bin/pkill/pkill.1	Tue Dec  4 08:01:35 2018
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pkill.1,v 1.29 2018/12/03 17:03:44 sevan Exp $
+.\"	$NetBSD: pkill.1,v 1.30 2018/12/04 08:01:35 wiz Exp $
 .\"
 .\" Copyright (c) 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -217,8 +217,8 @@ An internal error occurred.
 .Xr kill 1 ,
 .Xr ps 1 ,
 .Xr kill 2 ,
-.Xr kvm 3 ,
 .Xr sigaction 2 ,
+.Xr kvm 3 ,
 .Xr re_format 7 ,
 .Xr signal 7 ,
 .Xr renice 8