CVS commit: [netbsd-9] src/distrib/sets/lists/rescue

2019-11-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Nov 17 08:04:06 UTC 2019

Added Files:
src/distrib/sets/lists/rescue [netbsd-9]: mi

Log Message:
Fix mishap from processing ticket #435


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.2 src/distrib/sets/lists/rescue/mi

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

Added files:

Index: src/distrib/sets/lists/rescue/mi
diff -u /dev/null src/distrib/sets/lists/rescue/mi:1.1.2.2
--- /dev/null	Sun Nov 17 08:04:06 2019
+++ src/distrib/sets/lists/rescue/mi	Sun Nov 17 08:04:06 2019
@@ -0,0 +1,170 @@
+# $NetBSD: mi,v 1.1.2.2 2019/11/17 08:04:06 martin Exp $
+#
+# Note: don't delete entries from here - mark them as "obsolete" instead.
+#
+./etc/mtree/set.rescuebase-rescue-root
+./rescue/[	base-rescue-root
+./rescue/atactl	base-rescue-root
+./rescue/badsectbase-rescue-root
+./rescue/brconfigbase-rescue-root
+./rescue/bunzip2base-rescue-root
+./rescue/bzcat	base-rescue-root
+./rescue/bzip2	base-rescue-root
+./rescue/cat	base-rescue-root
+./rescue/ccdconfigbase-rescue-root
+./rescue/cgdconfigbase-rescue-root
+./rescue/chgrp	base-rescue-root
+./rescue/chio	base-rescue-root
+./rescue/chmod	base-rescue-root
+./rescue/chown	base-rescue-root
+./rescue/chroot	base-rescue-root
+./rescue/clri	base-rescue-root
+./rescue/cp	base-rescue-root
+./rescue/csh	base-rescue-root
+./rescue/date	base-rescue-root
+./rescue/dd	base-rescue-root
+./rescue/df	base-rescue-root
+./rescue/disklabelbase-rescue-root
+./rescue/dkctl	base-rescue-root
+./rescue/dmesg	base-rescue-root
+./rescue/domainnamebase-rescue-root
+./rescue/dump	base-rescue-root
+./rescue/dump_lfsbase-rescue-root
+./rescue/dumpfs	base-rescue-root
+./rescue/dumplfsbase-rescue-root
+./rescue/echo	base-rescue-root
+./rescue/ed	base-rescue-root
+./rescue/edlabelbase-obsolete	obsolete
+./rescue/egrep	base-rescue-root
+./rescue/ekermitbase-rescue-root
+./rescue/ex	base-rescue-root
+./rescue/expr	base-rescue-root
+./rescue/fdisk	base-rescue-root
+./rescue/fgrep	base-rescue-root
+./rescue/fsck	base-rescue-root
+./rescue/fsck_ext2fsbase-rescue-root
+./rescue/fsck_ffsbase-rescue-root
+./rescue/fsck_lfsbase-rescue-root
+./rescue/fsck_msdosbase-rescue-root
+./rescue/fsdb	base-rescue-root
+./rescue/fsirandbase-rescue-root
+./rescue/ftp	base-rescue-root
+./rescue/gpt	base-rescue-root
+./rescue/grep	base-rescue-root
+./rescue/gunzip	base-rescue-root
+./rescue/gzcat	base-rescue-root
+./rescue/gzip	base-rescue-root
+./rescue/halt	base-rescue-root
+./rescue/hostnamebase-rescue-root
+./rescue/ifconfigbase-rescue-root
+./rescue/init	base-rescue-root
+./rescue/init.bakbase-rescue-root
+./rescue/installbootbase-rescue-root
+./rescue/ipppctlbase-obsolete	obsolete
+./rescue/kdump	base-rescue-root
+./rescue/kill	base-rescue-root
+./rescue/ksh	base-rescue-root
+./rescue/ktrace	base-rescue-root
+./rescue/ktruss	base-rescue-root
+./rescue/ldconfigbase-obsolete	obsolete
+./rescue/ldd	base-rescue-root
+./rescue/less	base-rescue-root
+./rescue/lfs_cleanerdbase-rescue-root
+./rescue/lmcconfigbase-obsolete	obsolete
+./rescue/lmcctl	base-obsolete	obsolete
+./rescue/ln	base-rescue-root
+./rescue/ls	base-rescue-root
+./rescue/mbrlabelbase-rescue-root
+./rescue/mkdir	base-rescue-root
+./rescue/mknod	base-rescue-root
+./rescue/modloadbase-rescue-root
+./rescue/modstatbase-rescue-root
+./rescue/modunloadbase-rescue-root
+./rescue/more	base-rescue-root
+./rescue/mount	base-rescue-root
+./rescue/mount_adosbase-rescue-root
+./rescue/mount_cd9660base-rescue-root
+./rescue/mount_efsbase-rescue-root
+./rescue/mount_ext2fsbase-rescue-root
+./rescue/mount_fdescbase-rescue-root
+./rescue/mount_ffsbase-rescue-root
+./rescue/mount_filecorebase-rescue-root
+./rescue/mount_kernfsbase-rescue-root
+./rescue/mount_lfsbase-rescue-root
+./rescue/mount_mfsbase-rescue-root
+./rescue/mount_msdosbase-rescue-root
+./rescue/mount_nfsbase-rescue-root
+./rescue/mount_ntfsbase-rescue-root
+./rescue/mount_nullbase-rescue-root
+./rescue/mount_overlaybase-rescue-root
+./rescue/mount_portalbase-obsolete		obsolete
+./rescue/mount_procfsbase-rescue-root
+./rescue/mount_smbfsbase-rescue-root
+./rescue/mount_tmpfsbase-rescue-root
+./rescue/mount_ufsbase-rescue-root
+./rescue/mount_umapbase-rescue-root
+./rescue/mount_unionbase-rescue-root
+./rescue/mt	base-rescue-root
+./rescue/mv	base-rescue-root
+./rescue/newfs	base-rescue-root
+./rescue/newfs_lfsbase-rescue-root
+./rescue/newfs_msdosbase-rescue-root
+./rescue/pax	base-rescue-root
+./rescue/pdisk	base-rescue-root
+./rescu

CVS commit: [netbsd-9] src/distrib/sets/lists/rescue

2019-11-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Nov 17 08:04:06 UTC 2019

Added Files:
src/distrib/sets/lists/rescue [netbsd-9]: mi

Log Message:
Fix mishap from processing ticket #435


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.2 src/distrib/sets/lists/rescue/mi

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



CVS commit: src/sys/netinet

2019-11-17 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Nov 17 08:21:25 UTC 2019

Modified Files:
src/sys/netinet: tcp_output.c

Log Message:
Don't allow zero sized segments that will panic the stack.
Reported-by: syzbot+5542516fa4afe7a10...@syzkaller.appspotmail.com


To generate a diff of this commit:
cvs rdiff -u -r1.211 -r1.212 src/sys/netinet/tcp_output.c

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



CVS commit: src/sys/netinet

2019-11-17 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sun Nov 17 08:21:25 UTC 2019

Modified Files:
src/sys/netinet: tcp_output.c

Log Message:
Don't allow zero sized segments that will panic the stack.
Reported-by: syzbot+5542516fa4afe7a10...@syzkaller.appspotmail.com


To generate a diff of this commit:
cvs rdiff -u -r1.211 -r1.212 src/sys/netinet/tcp_output.c

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

Modified files:

Index: src/sys/netinet/tcp_output.c
diff -u src/sys/netinet/tcp_output.c:1.211 src/sys/netinet/tcp_output.c:1.212
--- src/sys/netinet/tcp_output.c:1.211	Mon Feb 25 10:49:16 2019
+++ src/sys/netinet/tcp_output.c	Sun Nov 17 08:21:25 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: tcp_output.c,v 1.211 2019/02/25 10:49:16 maxv Exp $	*/
+/*	$NetBSD: tcp_output.c,v 1.212 2019/11/17 08:21:25 mlelstv Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -135,7 +135,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.211 2019/02/25 10:49:16 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_output.c,v 1.212 2019/11/17 08:21:25 mlelstv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -252,6 +252,7 @@ tcp_segsize(struct tcpcb *tp, int *txseg
 		break;
 #endif
 	default:
+		hdrlen = 1; /* prevent zero sized segments */
 		goto out;
 	}
 
@@ -386,6 +387,13 @@ tcp_segsize(struct tcpcb *tp, int *txseg
 		*txsegsizep = uimin(so->so_snd.sb_hiwat >> 1, *txsegsizep);
 	}
 
+	/*
+	 * A segment must at least store header + options
+	 */
+	if (*txsegsizep < hdrlen + optlen) {
+		return EMSGSIZE;
+	}
+
 	if (*txsegsizep != tp->t_segsz) {
 		/*
 		 * If the new segment size is larger, we don't want to



Re: CVS commit: src [llvm]

2019-11-17 Thread Maxime Villard

Le 16/11/2019 à 23:01, Joerg Sonnenberger a écrit :

On Tue, Nov 12, 2019 at 11:39:09AM +0100, Maxime Villard wrote:

Le 11/11/2019 à 23:45, Joerg Sonnenberger a écrit :

Module Name:src
Committed By:   joerg
Date:   Mon Nov 11 22:45:32 UTC 2019

[...]
Log Message:
Update LLVM to 10.0.0git (01f3a59fb3e2542fce74c768718f594d0debd0da)


Since this change, I cannot cross-compile GENERIC amd64 from Linux:


Problem for GCC 7 in NetBSD itself should be fixed. Please check if it
works for your version too or otherwise report your GCC version.


cross-compilation with GCC 9.2.1 on Linux still doesn't work


CVS commit: src/sys/dev/usb

2019-11-17 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sun Nov 17 11:28:48 UTC 2019

Modified Files:
src/sys/dev/usb: vhci.c

Log Message:
Not a bug strictly speaking, but compute the address only after the length
checks, for clarity and to appease kUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/usb/vhci.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/usb

2019-11-17 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sun Nov 17 11:28:48 UTC 2019

Modified Files:
src/sys/dev/usb: vhci.c

Log Message:
Not a bug strictly speaking, but compute the address only after the length
checks, for clarity and to appease kUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/usb/vhci.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/usb/vhci.c
diff -u src/sys/dev/usb/vhci.c:1.3 src/sys/dev/usb/vhci.c:1.4
--- src/sys/dev/usb/vhci.c:1.3	Thu Oct  3 05:13:23 2019
+++ src/sys/dev/usb/vhci.c	Sun Nov 17 11:28:48 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vhci.c,v 1.3 2019/10/03 05:13:23 maxv Exp $ */
+/*	$NetBSD: vhci.c,v 1.4 2019/11/17 11:28:48 maxv Exp $ */
 
 /*
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vhci.c,v 1.3 2019/10/03 05:13:23 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vhci.c,v 1.4 2019/11/17 11:28:48 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -376,8 +376,6 @@ vhci_roothub_ctrl(struct usbd_bus *bus, 
 	value = UGETW(req->wValue);
 	index = UGETW(req->wIndex);
 
-	port = &sc->sc_port[VHCI_INDEX2PORT(index)];
-
 #define C(x,y) ((x) | ((y) << 8))
 	switch (C(req->bRequest, req->bmRequestType)) {
 	case C(UR_GET_DESCRIPTOR, UT_READ_DEVICE):
@@ -414,6 +412,7 @@ vhci_roothub_ctrl(struct usbd_bus *bus, 
 			if (index < 1 || index >= sc->sc_nports) {
 return -1;
 			}
+			port = &sc->sc_port[VHCI_INDEX2PORT(index)];
 			port->status |= UPS_C_PORT_RESET;
 			break;
 		case UHF_PORT_POWER:
@@ -430,6 +429,7 @@ vhci_roothub_ctrl(struct usbd_bus *bus, 
 		if (index < 1 || index >= sc->sc_nports) {
 			return -1;
 		}
+		port = &sc->sc_port[VHCI_INDEX2PORT(index)];
 		switch (value) {
 		case UHF_PORT_ENABLE:
 			port->status &= ~UPS_PORT_ENABLED;
@@ -463,6 +463,7 @@ vhci_roothub_ctrl(struct usbd_bus *bus, 
 		if (index < 1 || index >= sc->sc_nports) {
 			return -1;
 		}
+		port = &sc->sc_port[VHCI_INDEX2PORT(index)];
 		USETW(ps.wPortStatus, port->status);
 		USETW(ps.wPortChange, port->change);
 		totlen = uimin(len, sizeof(ps));



CVS commit: src/share/man/man9

2019-11-17 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Nov 17 11:46:39 UTC 2019

Modified Files:
src/share/man/man9: vnsubr.9

Log Message:
file system police. New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/share/man/man9/vnsubr.9

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/man9/vnsubr.9
diff -u src/share/man/man9/vnsubr.9:1.46 src/share/man/man9/vnsubr.9:1.47
--- src/share/man/man9/vnsubr.9:1.46	Sat Nov 16 22:09:56 2019
+++ src/share/man/man9/vnsubr.9	Sun Nov 17 11:46:38 2019
@@ -1,4 +1,4 @@
-.\" $NetBSD: vnsubr.9,v 1.46 2019/11/16 22:09:56 mlelstv Exp $
+.\" $NetBSD: vnsubr.9,v 1.47 2019/11/17 11:46:38 wiz Exp $
 .\"
 .\" Copyright (c) 2001, 2005, 2006 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -185,12 +185,13 @@ stores the vnode pointer into
 .Fa *vpp .
 The argument
 .Fa l
-is the calling process. The vnode can be closed and freed with
+is the calling process.
+The vnode can be closed and freed with
 .Fa vn_close .
 .It Fn vn_bdev_openpath "pb" "vpp" "l"
 Works like
 .Fn vn_bdev_open
-but looks up a filesystem path
+but looks up a file system path
 .Fa pb
 to determine the device ID.
 .It Fn vn_rdwr "rw" "vp" "base" "len" "offset" "segflg" "ioflg" "cred" "aresid" "l"



CVS commit: src/share/man/man9

2019-11-17 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Sun Nov 17 11:46:39 UTC 2019

Modified Files:
src/share/man/man9: vnsubr.9

Log Message:
file system police. New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/share/man/man9/vnsubr.9

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



CVS commit: src/sys/kern

2019-11-17 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Nov 17 12:32:31 UTC 2019

Modified Files:
src/sys/kern: subr_cprng.c

Log Message:
Update comment to reflect third-party software's usage of KERN_ARND.

Changing it as the comment suggests would be a very terrible idea due to
the common usage of this variable.

Returning only 32 or 64 bits also seems to be the purpose of KERN_URND,
so that functionality is already present.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/kern/subr_cprng.c

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



CVS commit: src/sys/kern

2019-11-17 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Nov 17 12:32:31 UTC 2019

Modified Files:
src/sys/kern: subr_cprng.c

Log Message:
Update comment to reflect third-party software's usage of KERN_ARND.

Changing it as the comment suggests would be a very terrible idea due to
the common usage of this variable.

Returning only 32 or 64 bits also seems to be the purpose of KERN_URND,
so that functionality is already present.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/kern/subr_cprng.c

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

Modified files:

Index: src/sys/kern/subr_cprng.c
diff -u src/sys/kern/subr_cprng.c:1.31 src/sys/kern/subr_cprng.c:1.32
--- src/sys/kern/subr_cprng.c:1.31	Mon Sep  2 20:09:30 2019
+++ src/sys/kern/subr_cprng.c	Sun Nov 17 12:32:31 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_cprng.c,v 1.31 2019/09/02 20:09:30 riastradh Exp $ */
+/*	$NetBSD: subr_cprng.c,v 1.32 2019/11/17 12:32:31 nia Exp $ */
 
 /*-
  * Copyright (c) 2011-2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.31 2019/09/02 20:09:30 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_cprng.c,v 1.32 2019/11/17 12:32:31 nia Exp $");
 
 #include 
 #include 
@@ -581,8 +581,9 @@ sysctl_kern_urnd(SYSCTLFN_ARGS)
  * requested.  Evidently this was used to key RC4 in userspace.
  *
  * In NetBSD, the libc stack-smash-protection code reads 64 bytes
- * from here at every program startup.  So though it would be nice
- * to make this node return only 32 or 64 bits, we can't.  Too bad!
+ * from here at every program startup.  Third-party software also often
+ * uses this to obtain a key for CSPRNG, reading 32 bytes or more, while
+ * avoiding the need to open /dev/urandom.
  */
 static int
 sysctl_kern_arnd(SYSCTLFN_ARGS)



CVS commit: [netbsd-9] src/usr.bin/msgc

2019-11-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Nov 17 13:36:18 UTC 2019

Modified Files:
src/usr.bin/msgc [netbsd-9]: msg_sys.def

Log Message:
Pull up following revision(s) (requested by martin in ticket #433):
usr.bin/msgc/msg_sys.def: revision 1.48
msg_table_add(): fix mishap in the format safety changes in r1.45


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.47.2.1 src/usr.bin/msgc/msg_sys.def

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



CVS commit: [netbsd-9] src/usr.bin/msgc

2019-11-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Nov 17 13:36:18 UTC 2019

Modified Files:
src/usr.bin/msgc [netbsd-9]: msg_sys.def

Log Message:
Pull up following revision(s) (requested by martin in ticket #433):
usr.bin/msgc/msg_sys.def: revision 1.48
msg_table_add(): fix mishap in the format safety changes in r1.45


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.47.2.1 src/usr.bin/msgc/msg_sys.def

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/msgc/msg_sys.def
diff -u src/usr.bin/msgc/msg_sys.def:1.47 src/usr.bin/msgc/msg_sys.def:1.47.2.1
--- src/usr.bin/msgc/msg_sys.def:1.47	Tue Jun 25 21:09:33 2019
+++ src/usr.bin/msgc/msg_sys.def	Sun Nov 17 13:36:18 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg_sys.def,v 1.47 2019/06/25 21:09:33 joerg Exp $	*/
+/*	$NetBSD: msg_sys.def,v 1.47.2.1 2019/11/17 13:36:18 msaitoh Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -653,7 +653,7 @@ void
 msg_table_add(msg msg_no)
 {
 
-	msg_printf("%s", msg_string(msg_no));
+	msg_fmt_table_add(msg_no, "");
 }
 
 void __printflike(2, 3)



CVS commit: [netbsd-9] src/usr.sbin/sysinst

2019-11-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Nov 17 13:45:26 UTC 2019

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: Makefile.inc bsddisklabel.c
configmenu.c defs.h disklabel.c disks.c gpt.c install.c label.c
main.c mbr.c mbr.h msg.mi.de msg.mi.en msg.mi.es msg.mi.fr
msg.mi.pl net.c part_edit.c partitions.c partitions.h partman.c
run.c util.c
src/usr.sbin/sysinst/arch/amd64 [netbsd-9]: md.c md.h
src/usr.sbin/sysinst/arch/ews4800mips [netbsd-9]: Makefile
src/usr.sbin/sysinst/arch/i386 [netbsd-9]: md.c menus.md msg.md.de
msg.md.en msg.md.es msg.md.fr msg.md.pl
src/usr.sbin/sysinst/arch/playstation2 [netbsd-9]: msg.md.de msg.md.en
msg.md.es msg.md.fr msg.md.pl

Log Message:
Pull up following revision(s) (requested by martin in ticket #436):
usr.sbin/sysinst/disks.c: revision 1.55
usr.sbin/sysinst/msg.mi.en: revision 1.24
usr.sbin/sysinst/mbr.c: revision 1.22
usr.sbin/sysinst/disks.c: revision 1.56
usr.sbin/sysinst/msg.mi.en: revision 1.25
usr.sbin/sysinst/disks.c: revision 1.57
usr.sbin/sysinst/arch/playstation2/msg.md.pl: revision 1.3
usr.sbin/sysinst/Makefile.inc: revision 1.30
usr.sbin/sysinst/configmenu.c: revision 1.11
usr.sbin/sysinst/util.c: revision 1.35
usr.sbin/sysinst/gpt.c: revision 1.12
usr.sbin/sysinst/util.c: revision 1.36
usr.sbin/sysinst/arch/playstation2/msg.md.de: revision 1.3
usr.sbin/sysinst/arch/i386/menus.md: revision 1.3
usr.sbin/sysinst/util.c: revision 1.37
usr.sbin/sysinst/part_edit.c: revision 1.11
usr.sbin/sysinst/arch/i386/msg.md.en: revision 1.2
usr.sbin/sysinst/util.c: revision 1.38
usr.sbin/sysinst/part_edit.c: revision 1.12
usr.sbin/sysinst/arch/i386/msg.md.en: revision 1.3
usr.sbin/sysinst/util.c: revision 1.39
usr.sbin/sysinst/part_edit.c: revision 1.13
usr.sbin/sysinst/arch/i386/msg.md.en: revision 1.4
usr.sbin/sysinst/disklabel.c: revision 1.15
usr.sbin/sysinst/bsddisklabel.c: revision 1.30
usr.sbin/sysinst/arch/i386/msg.md.es: revision 1.2
usr.sbin/sysinst/bsddisklabel.c: revision 1.31
usr.sbin/sysinst/arch/i386/msg.md.es: revision 1.3
usr.sbin/sysinst/arch/i386/msg.md.es: revision 1.4
usr.sbin/sysinst/mbr.h: revision 1.4
usr.sbin/sysinst/main.c: revision 1.18
usr.sbin/sysinst/partman.c: revision 1.44
usr.sbin/sysinst/msg.mi.de: revision 1.17
usr.sbin/sysinst/arch/i386/msg.md.fr: revision 1.2
usr.sbin/sysinst/msg.mi.de: revision 1.18
usr.sbin/sysinst/arch/i386/msg.md.fr: revision 1.3
usr.sbin/sysinst/arch/playstation2/msg.md.en: revision 1.3
usr.sbin/sysinst/arch/i386/msg.md.fr: revision 1.4
usr.sbin/sysinst/arch/amd64/md.c: revision 1.2
usr.sbin/sysinst/arch/ews4800mips/Makefile: revision 1.3
usr.sbin/sysinst/arch/playstation2/msg.md.es: revision 1.3
usr.sbin/sysinst/label.c: revision 1.13
usr.sbin/sysinst/Makefile.inc: revision 1.29
usr.sbin/sysinst/label.c: revision 1.14
usr.sbin/sysinst/util.c: revision 1.40
usr.sbin/sysinst/partitions.c: revision 1.5
usr.sbin/sysinst/arch/amd64/md.h: revision 1.8
usr.sbin/sysinst/msg.mi.es: revision 1.18
usr.sbin/sysinst/net.c: revision 1.34
usr.sbin/sysinst/msg.mi.es: revision 1.19
usr.sbin/sysinst/arch/i386/msg.md.pl: revision 1.2
usr.sbin/sysinst/arch/i386/md.c: revision 1.22
usr.sbin/sysinst/msg.mi.fr: revision 1.22
usr.sbin/sysinst/arch/playstation2/msg.md.fr: revision 1.3
usr.sbin/sysinst/arch/i386/msg.md.pl: revision 1.3
usr.sbin/sysinst/arch/i386/md.c: revision 1.23
usr.sbin/sysinst/msg.mi.pl: revision 1.25
usr.sbin/sysinst/msg.mi.fr: revision 1.23
usr.sbin/sysinst/arch/i386/msg.md.pl: revision 1.4
usr.sbin/sysinst/arch/i386/md.c: revision 1.24
usr.sbin/sysinst/partitions.h: revision 1.8
usr.sbin/sysinst/msg.mi.pl: revision 1.26
usr.sbin/sysinst/arch/i386/msg.md.de: revision 1.2
usr.sbin/sysinst/arch/i386/msg.md.de: revision 1.3
usr.sbin/sysinst/arch/i386/msg.md.de: revision 1.4
usr.sbin/sysinst/run.c: revision 1.13
usr.sbin/sysinst/defs.h: revision 1.46
usr.sbin/sysinst/install.c: revision 1.12
usr.sbin/sysinst/defs.h: revision 1.47
usr.sbin/sysinst/install.c: revision 1.13
usr.sbin/sysinst/defs.h: revision 1.48
Add options to the various partitioning stages that allow cloning of
alien partitions (optionally including data).
PR 54467: we trust our own sets, extract them with -P to allow symlink
redirection (especially for updates and chroot services - back out
once a better solution for those is implemented)
Make cloning support option

CVS commit: [netbsd-9] src/usr.sbin/sysinst

2019-11-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Nov 17 13:45:26 UTC 2019

Modified Files:
src/usr.sbin/sysinst [netbsd-9]: Makefile.inc bsddisklabel.c
configmenu.c defs.h disklabel.c disks.c gpt.c install.c label.c
main.c mbr.c mbr.h msg.mi.de msg.mi.en msg.mi.es msg.mi.fr
msg.mi.pl net.c part_edit.c partitions.c partitions.h partman.c
run.c util.c
src/usr.sbin/sysinst/arch/amd64 [netbsd-9]: md.c md.h
src/usr.sbin/sysinst/arch/ews4800mips [netbsd-9]: Makefile
src/usr.sbin/sysinst/arch/i386 [netbsd-9]: md.c menus.md msg.md.de
msg.md.en msg.md.es msg.md.fr msg.md.pl
src/usr.sbin/sysinst/arch/playstation2 [netbsd-9]: msg.md.de msg.md.en
msg.md.es msg.md.fr msg.md.pl

Log Message:
Pull up following revision(s) (requested by martin in ticket #436):
usr.sbin/sysinst/disks.c: revision 1.55
usr.sbin/sysinst/msg.mi.en: revision 1.24
usr.sbin/sysinst/mbr.c: revision 1.22
usr.sbin/sysinst/disks.c: revision 1.56
usr.sbin/sysinst/msg.mi.en: revision 1.25
usr.sbin/sysinst/disks.c: revision 1.57
usr.sbin/sysinst/arch/playstation2/msg.md.pl: revision 1.3
usr.sbin/sysinst/Makefile.inc: revision 1.30
usr.sbin/sysinst/configmenu.c: revision 1.11
usr.sbin/sysinst/util.c: revision 1.35
usr.sbin/sysinst/gpt.c: revision 1.12
usr.sbin/sysinst/util.c: revision 1.36
usr.sbin/sysinst/arch/playstation2/msg.md.de: revision 1.3
usr.sbin/sysinst/arch/i386/menus.md: revision 1.3
usr.sbin/sysinst/util.c: revision 1.37
usr.sbin/sysinst/part_edit.c: revision 1.11
usr.sbin/sysinst/arch/i386/msg.md.en: revision 1.2
usr.sbin/sysinst/util.c: revision 1.38
usr.sbin/sysinst/part_edit.c: revision 1.12
usr.sbin/sysinst/arch/i386/msg.md.en: revision 1.3
usr.sbin/sysinst/util.c: revision 1.39
usr.sbin/sysinst/part_edit.c: revision 1.13
usr.sbin/sysinst/arch/i386/msg.md.en: revision 1.4
usr.sbin/sysinst/disklabel.c: revision 1.15
usr.sbin/sysinst/bsddisklabel.c: revision 1.30
usr.sbin/sysinst/arch/i386/msg.md.es: revision 1.2
usr.sbin/sysinst/bsddisklabel.c: revision 1.31
usr.sbin/sysinst/arch/i386/msg.md.es: revision 1.3
usr.sbin/sysinst/arch/i386/msg.md.es: revision 1.4
usr.sbin/sysinst/mbr.h: revision 1.4
usr.sbin/sysinst/main.c: revision 1.18
usr.sbin/sysinst/partman.c: revision 1.44
usr.sbin/sysinst/msg.mi.de: revision 1.17
usr.sbin/sysinst/arch/i386/msg.md.fr: revision 1.2
usr.sbin/sysinst/msg.mi.de: revision 1.18
usr.sbin/sysinst/arch/i386/msg.md.fr: revision 1.3
usr.sbin/sysinst/arch/playstation2/msg.md.en: revision 1.3
usr.sbin/sysinst/arch/i386/msg.md.fr: revision 1.4
usr.sbin/sysinst/arch/amd64/md.c: revision 1.2
usr.sbin/sysinst/arch/ews4800mips/Makefile: revision 1.3
usr.sbin/sysinst/arch/playstation2/msg.md.es: revision 1.3
usr.sbin/sysinst/label.c: revision 1.13
usr.sbin/sysinst/Makefile.inc: revision 1.29
usr.sbin/sysinst/label.c: revision 1.14
usr.sbin/sysinst/util.c: revision 1.40
usr.sbin/sysinst/partitions.c: revision 1.5
usr.sbin/sysinst/arch/amd64/md.h: revision 1.8
usr.sbin/sysinst/msg.mi.es: revision 1.18
usr.sbin/sysinst/net.c: revision 1.34
usr.sbin/sysinst/msg.mi.es: revision 1.19
usr.sbin/sysinst/arch/i386/msg.md.pl: revision 1.2
usr.sbin/sysinst/arch/i386/md.c: revision 1.22
usr.sbin/sysinst/msg.mi.fr: revision 1.22
usr.sbin/sysinst/arch/playstation2/msg.md.fr: revision 1.3
usr.sbin/sysinst/arch/i386/msg.md.pl: revision 1.3
usr.sbin/sysinst/arch/i386/md.c: revision 1.23
usr.sbin/sysinst/msg.mi.pl: revision 1.25
usr.sbin/sysinst/msg.mi.fr: revision 1.23
usr.sbin/sysinst/arch/i386/msg.md.pl: revision 1.4
usr.sbin/sysinst/arch/i386/md.c: revision 1.24
usr.sbin/sysinst/partitions.h: revision 1.8
usr.sbin/sysinst/msg.mi.pl: revision 1.26
usr.sbin/sysinst/arch/i386/msg.md.de: revision 1.2
usr.sbin/sysinst/arch/i386/msg.md.de: revision 1.3
usr.sbin/sysinst/arch/i386/msg.md.de: revision 1.4
usr.sbin/sysinst/run.c: revision 1.13
usr.sbin/sysinst/defs.h: revision 1.46
usr.sbin/sysinst/install.c: revision 1.12
usr.sbin/sysinst/defs.h: revision 1.47
usr.sbin/sysinst/install.c: revision 1.13
usr.sbin/sysinst/defs.h: revision 1.48
Add options to the various partitioning stages that allow cloning of
alien partitions (optionally including data).
PR 54467: we trust our own sets, extract them with -P to allow symlink
redirection (especially for updates and chroot services - back out
once a better solution for those is implemented)
Make cloning support option

CVS commit: [netbsd-9] src/doc

2019-11-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Nov 17 13:50:13 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Ticket #433 and #436.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.105 -r1.1.2.106 src/doc/CHANGES-9.0

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



CVS commit: [netbsd-9] src/doc

2019-11-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Nov 17 13:50:13 UTC 2019

Modified Files:
src/doc [netbsd-9]: CHANGES-9.0

Log Message:
Ticket #433 and #436.


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.105 -r1.1.2.106 src/doc/CHANGES-9.0

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

Modified files:

Index: src/doc/CHANGES-9.0
diff -u src/doc/CHANGES-9.0:1.1.2.105 src/doc/CHANGES-9.0:1.1.2.106
--- src/doc/CHANGES-9.0:1.1.2.105	Sun Nov 17 07:13:09 2019
+++ src/doc/CHANGES-9.0	Sun Nov 17 13:50:13 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.0,v 1.1.2.105 2019/11/17 07:13:09 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.106 2019/11/17 13:50:13 msaitoh Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -5832,3 +5832,55 @@ usr.sbin/sysinst/util.c1.33
 	Make /rescue into a separate set and minor cleanup of /rescue.
 	[maya, ticket #435]
 
+usr.bin/msgc/msg_sys.def			1.48
+
+	msg_table_add(): Fix mishap in the format safety changes in r1.45.
+	[martin, ticket #433]
+
+usr.sbin/sysinst/Makefile.inc			1.29-1.30
+usr.sbin/sysinst/arch/amd64/md.c		1.2
+usr.sbin/sysinst/arch/amd64/md.h		1.8
+usr.sbin/sysinst/arch/ews4800mips/Makefile	1.3
+usr.sbin/sysinst/arch/i386/md.c			1.22-1.24
+usr.sbin/sysinst/arch/i386/menus.md		1.3
+usr.sbin/sysinst/arch/i386/msg.md.de		1.2-.1.4
+usr.sbin/sysinst/arch/i386/msg.md.en		1.2-1.4
+usr.sbin/sysinst/arch/i386/msg.md.es		1.2-1.4
+usr.sbin/sysinst/arch/i386/msg.md.fr		1.2-1.4
+usr.sbin/sysinst/arch/i386/msg.md.pl		1.2-1.4
+usr.sbin/sysinst/arch/playstation2/msg.md.de	1.3
+usr.sbin/sysinst/arch/playstation2/msg.md.en	1.3
+usr.sbin/sysinst/arch/playstation2/msg.md.es	1.3
+usr.sbin/sysinst/arch/playstation2/msg.md.fr	1.3
+usr.sbin/sysinst/arch/playstation2/msg.md.pl	1.3
+usr.sbin/sysinst/bsddisklabel.c			1.30-1.31
+usr.sbin/sysinst/configmenu.c			1.11
+usr.sbin/sysinst/defs.h1.46-1.48
+usr.sbin/sysinst/disklabel.c			1.15
+usr.sbin/sysinst/disks.c			1.55-1.57
+usr.sbin/sysinst/gpt.c1.12
+usr.sbin/sysinst/install.c			1.12-1.13
+usr.sbin/sysinst/label.c			1.13-1.14
+usr.sbin/sysinst/main.c1.18
+usr.sbin/sysinst/mbr.c1.22
+usr.sbin/sysinst/mbr.h1.4
+usr.sbin/sysinst/msg.mi.de			1.17-1.18
+usr.sbin/sysinst/msg.mi.en			1.24-1.25
+usr.sbin/sysinst/msg.mi.es			1.18-1.19
+usr.sbin/sysinst/msg.mi.fr			1.22-1.23
+usr.sbin/sysinst/msg.mi.pl			1.25-1.26
+usr.sbin/sysinst/net.c1.34
+usr.sbin/sysinst/part_edit.c			1.11-1.13
+usr.sbin/sysinst/partitions.c			1.5
+usr.sbin/sysinst/partitions.h			1.8
+usr.sbin/sysinst/partman.c			1.44
+usr.sbin/sysinst/run.c1.13
+usr.sbin/sysinst/util.c1.35-1.40
+
+	Various sysinst changes:
+	 - allow cloning of alien partitions
+	 - adjust tar extraction flags depending on the tar variant in use
+	 - fix a few missing translations (always using "x: Exit" in menus)
+	 - x86: improve boot block selection menu
+	 - amd64: allow installation of KASLR kernel via "Custom Install"
+	[martin, ticket #436]



CVS commit: src/sys/arch/amd64

2019-11-17 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sun Nov 17 14:07:00 UTC 2019

Modified Files:
src/sys/arch/amd64/amd64: vector.S
src/sys/arch/amd64/include: frameasm.h

Log Message:
Disable KCOV - by raising the interrupt level - in the TLB IPI handler,
because this is only noise.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/amd64/amd64/vector.S
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/amd64/include/frameasm.h

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



CVS commit: src/sys/arch/amd64

2019-11-17 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sun Nov 17 14:07:00 UTC 2019

Modified Files:
src/sys/arch/amd64/amd64: vector.S
src/sys/arch/amd64/include: frameasm.h

Log Message:
Disable KCOV - by raising the interrupt level - in the TLB IPI handler,
because this is only noise.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/amd64/amd64/vector.S
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/amd64/include/frameasm.h

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

Modified files:

Index: src/sys/arch/amd64/amd64/vector.S
diff -u src/sys/arch/amd64/amd64/vector.S:1.70 src/sys/arch/amd64/amd64/vector.S:1.71
--- src/sys/arch/amd64/amd64/vector.S:1.70	Thu Mar  7 10:16:07 2019
+++ src/sys/arch/amd64/amd64/vector.S	Sun Nov 17 14:07:00 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: vector.S,v 1.70 2019/03/07 10:16:07 nonaka Exp $	*/
+/*	$NetBSD: vector.S,v 1.71 2019/11/17 14:07:00 maxv Exp $	*/
 
 /*
  * Copyright (c) 1998, 2007, 2008 The NetBSD Foundation, Inc.
@@ -316,7 +316,9 @@ IDTVEC_END(intr_hyperv_hypercall)
 IDTVEC(handle_lapic_tlb)
 	movq	_C_LABEL(local_apic_va),%rax
 	movl	$0,LAPIC_EOI(%rax)
+	KCOV_DISABLE
 	callq	_C_LABEL(pmap_tlb_intr)
+	KCOV_ENABLE
 	INTRFASTEXIT
 IDTVEC_END(handle_lapic_tlb)
 IDTVEC(handle_x2apic_tlb)
@@ -324,7 +326,9 @@ IDTVEC(handle_x2apic_tlb)
 	xorl	%eax,%eax
 	xorl	%edx,%edx
 	wrmsr
+	KCOV_DISABLE
 	callq	_C_LABEL(pmap_tlb_intr)
+	KCOV_ENABLE
 	INTRFASTEXIT
 IDTVEC_END(handle_x2apic_tlb)
 

Index: src/sys/arch/amd64/include/frameasm.h
diff -u src/sys/arch/amd64/include/frameasm.h:1.46 src/sys/arch/amd64/include/frameasm.h:1.47
--- src/sys/arch/amd64/include/frameasm.h:1.46	Thu Nov 14 16:23:52 2019
+++ src/sys/arch/amd64/include/frameasm.h	Sun Nov 17 14:07:00 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: frameasm.h,v 1.46 2019/11/14 16:23:52 maxv Exp $	*/
+/*	$NetBSD: frameasm.h,v 1.47 2019/11/17 14:07:00 maxv Exp $	*/
 
 #ifndef _AMD64_MACHINE_FRAMEASM_H
 #define _AMD64_MACHINE_FRAMEASM_H
@@ -6,6 +6,7 @@
 #ifdef _KERNEL_OPT
 #include "opt_xen.h"
 #include "opt_svs.h"
+#include "opt_kcov.h"
 #include "opt_kmsan.h"
 #endif
 
@@ -267,6 +268,16 @@
 #define KMSAN_INIT_RET(sz)	/* nothing */
 #endif
 
+#ifdef KCOV
+#define KCOV_DISABLE			\
+	incl	CPUVAR(IDEPTH)
+#define KCOV_ENABLE			\
+	decl	CPUVAR(IDEPTH)
+#else
+#define KCOV_DISABLE		/* nothing */
+#define KCOV_ENABLE		/* nothing */
+#endif
+
 #define	INTRENTRY \
 	subq	$TF_REGSIZE,%rsp	; \
 	INTR_SAVE_GPRS			; \



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

2019-11-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Nov 17 15:31:05 UTC 2019

Modified Files:
src/sys/arch/x86/include: specialreg.h

Log Message:
Add the following bit definitions from the latest Intel SDM:
 - CET shadow stack
 - Fast Short REP MOV
 - Hybrid part
 - CET Indirect Branch Tracking


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/sys/arch/x86/include/specialreg.h

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

Modified files:

Index: src/sys/arch/x86/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.157 src/sys/arch/x86/include/specialreg.h:1.158
--- src/sys/arch/x86/include/specialreg.h:1.157	Tue Nov 12 18:00:13 2019
+++ src/sys/arch/x86/include/specialreg.h	Sun Nov 17 15:31:05 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.157 2019/11/12 18:00:13 maxv Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.158 2019/11/17 15:31:05 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2014-2019 The NetBSD Foundation, Inc.
@@ -447,6 +447,7 @@
 #define CPUID_SEF_OSPKE		__BIT(4)  /* OS has set CR4.PKE to ena. protec. keys */
 #define CPUID_SEF_WAITPKG	__BIT(5)  /* TPAUSE,UMONITOR,UMWAIT */
 #define CPUID_SEF_AVX512_VBMI2	__BIT(6)  /* AVX-512 Vector Byte Manipulation 2 */
+#define CPUID_SEF_CET_SS	__BIT(7)  /* CET shadow stack */
 #define CPUID_SEF_GFNI		__BIT(8)
 #define CPUID_SEF_VAES		__BIT(9)
 #define CPUID_SEF_VPCLMULQDQ	__BIT(10)
@@ -462,7 +463,7 @@
 
 #define CPUID_SEF_FLAGS1	"\177\20" \
 	"b\0PREFETCHWT1\0" "b\1AVX512_VBMI\0" "b\2UMIP\0" "b\3PKU\0"	\
-	"b\4OSPKE\0"	"b\5WAITPKG\0"	"b\6AVX512_VBMI2\0"		  \
+	"b\4OSPKE\0"	"b\5WAITPKG\0"	"b\6AVX512_VBMI2\0" "b\7CET_SS\0" \
 	"b\10GFNI\0"	"b\11VAES\0"	"b\12VPCLMULQDQ\0" "b\13AVX512_VNNI\0"\
 	"b\14AVX512_BITALG\0"		"b\16AVX512_VPOPCNTDQ\0"	\
 	"f\21\5MAWAU\0"			\
@@ -473,8 +474,11 @@
 /* %edx */
 #define CPUID_SEF_AVX512_4VNNIW	__BIT(2)
 #define CPUID_SEF_AVX512_4FMAPS	__BIT(3)
+#define CPUID_SEF_FSREP_MOV	__BIT(4)  /* Fast Short REP MOV */
 #define CPUID_SEF_MD_CLEAR	__BIT(10)
 #define CPUID_SEF_TSX_FORCE_ABORT __BIT(13) /* MSR_TSX_FORCE_ABORT bit 0 */
+#define CPUID_SEF_HYBRID	__BIT(15) /* Hybrid part */
+#define CPUID_SEF_CET_IBT	__BIT(20) /* CET Indirect Branch Tracking */
 #define CPUID_SEF_IBRS		__BIT(26) /* IBRS / IBPB Speculation Control */
 #define CPUID_SEF_STIBP		__BIT(27) /* STIBP Speculation Control */
 #define CPUID_SEF_L1D_FLUSH	__BIT(28) /* IA32_FLUSH_CMD MSR */
@@ -484,8 +488,10 @@
 
 #define CPUID_SEF_FLAGS2	"\20" \
 "\3" "AVX512_4VNNIW" "\4" "AVX512_4FMAPS" \
+	"\5" "FSREP_MOV"		\
 "\13" "MD_CLEAR"			\
-			"\16" "TSX_FORCE_ABORT"\
+			"\16" "TSX_FORCE_ABORT"		"\20" "HYBRID"	\
+	"\25" "CET_IBT"			\
 	"\33" "IBRS"	"\34" "STIBP"	\
 	"\35" "L1D_FLUSH" "\36" "ARCH_CAP" "\37CORE_CAP"	"\40" "SSBD"
 



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

2019-11-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Nov 17 15:31:05 UTC 2019

Modified Files:
src/sys/arch/x86/include: specialreg.h

Log Message:
Add the following bit definitions from the latest Intel SDM:
 - CET shadow stack
 - Fast Short REP MOV
 - Hybrid part
 - CET Indirect Branch Tracking


To generate a diff of this commit:
cvs rdiff -u -r1.157 -r1.158 src/sys/arch/x86/include/specialreg.h

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



CVS commit: src/usr.sbin/cpuctl/arch

2019-11-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Nov 17 15:32:00 UTC 2019

Modified Files:
src/usr.sbin/cpuctl/arch: i386.c

Log Message:
0x7d and 0x7e are for 10th generation Core (Ice Lake).


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 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: src/usr.sbin/cpuctl/arch

2019-11-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Sun Nov 17 15:32:00 UTC 2019

Modified Files:
src/usr.sbin/cpuctl/arch: i386.c

Log Message:
0x7d and 0x7e are for 10th generation Core (Ice Lake).


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 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/usr.sbin/cpuctl/arch/i386.c
diff -u src/usr.sbin/cpuctl/arch/i386.c:1.107 src/usr.sbin/cpuctl/arch/i386.c:1.108
--- src/usr.sbin/cpuctl/arch/i386.c:1.107	Thu Oct  3 15:21:44 2019
+++ src/usr.sbin/cpuctl/arch/i386.c	Sun Nov 17 15:32:00 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: i386.c,v 1.107 2019/10/03 15:21:44 msaitoh Exp $	*/
+/*	$NetBSD: i386.c,v 1.108 2019/11/17 15:32:00 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 1999, 2000, 2001, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: i386.c,v 1.107 2019/10/03 15:21:44 msaitoh Exp $");
+__RCSID("$NetBSD: i386.c,v 1.108 2019/11/17 15:32:00 msaitoh Exp $");
 #endif /* not lint */
 
 #include 
@@ -386,8 +386,8 @@ const struct cpu_cpuid_nameclass i386_cp
 [0x6a] = "Future Xeon (Ice Lake)",
 [0x6c] = "Future Xeon (Ice Lake)",
 [0x7a] = "Atom (Goldmont Plus)",
-[0x7d] = "Future Core (Ice Lake)",
-[0x7e] = "Future Core (Ice Lake)",
+[0x7d] = "10th gen Core (Ice Lake)",
+[0x7e] = "10th gen Core (Ice Lake)",
 [0x85] = "Xeon Phi 7215, 7285, 7295 (Knights Mill)",
 [0x86] = "Atom (Tremont)",
 [0x8e] = "7th or 8th gen Core (Kaby Lake, Coffee Lake) or Xeon E (Coffee Lake)",



CVS commit: src/sys/arch/ia64

2019-11-17 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Sun Nov 17 16:52:29 UTC 2019

Modified Files:
src/sys/arch/ia64: TODO

Log Message:
Mention ski works on amd64 and probably other archs


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/TODO

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



CVS commit: src/sys/arch/ia64

2019-11-17 Thread Sean Cole
Module Name:src
Committed By:   scole
Date:   Sun Nov 17 16:52:29 UTC 2019

Modified Files:
src/sys/arch/ia64: TODO

Log Message:
Mention ski works on amd64 and probably other archs


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/ia64/TODO

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/ia64/TODO
diff -u src/sys/arch/ia64/TODO:1.8 src/sys/arch/ia64/TODO:1.9
--- src/sys/arch/ia64/TODO:1.8	Mon Nov 11 18:06:47 2019
+++ src/sys/arch/ia64/TODO	Sun Nov 17 16:52:29 2019
@@ -1,8 +1,9 @@
 $ NetBSD: TODO,v 1.1 2018/04/14 12:06:03 scole Exp $
 
 What works:
-  The ski simulator (pkgsrc/emulators/ski) works on NetBSD/i386, can run
-  and step through in assembly.
+  The ski simulator (pkgsrc/emulators/ski) is known to work on NetBSD
+  i386 and amd64, and probably will work on other archs as well.  It
+  can run and step through in assembly.
 
   Netbooting may work on some machines, basically you need to boot
   diskless with the loader.efi (from src/sys/arch/ia64/stand/ia64/)



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

2019-11-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov 17 17:33:34 UTC 2019

Modified Files:
src/sys/arch/arm/sunxi: sunxi_dwhdmi.c sunxi_i2s.c

Log Message:
Add A64 HDMI audio support.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sunxi/sunxi_dwhdmi.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/sunxi/sunxi_i2s.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/arm/sunxi

2019-11-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov 17 17:33:17 UTC 2019

Modified Files:
src/sys/arch/arm/sunxi: sun50i_a64_ccu.c sunxi_ccu_div.c

Log Message:
Add support for A64 I2S clocks.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/sunxi/sun50i_a64_ccu.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/sunxi/sunxi_ccu_div.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/arm/sunxi

2019-11-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov 17 17:33:17 UTC 2019

Modified Files:
src/sys/arch/arm/sunxi: sun50i_a64_ccu.c sunxi_ccu_div.c

Log Message:
Add support for A64 I2S clocks.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/arm/sunxi/sun50i_a64_ccu.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/arm/sunxi/sunxi_ccu_div.c

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

Modified files:

Index: src/sys/arch/arm/sunxi/sun50i_a64_ccu.c
diff -u src/sys/arch/arm/sunxi/sun50i_a64_ccu.c:1.13 src/sys/arch/arm/sunxi/sun50i_a64_ccu.c:1.14
--- src/sys/arch/arm/sunxi/sun50i_a64_ccu.c:1.13	Mon Jul  1 21:06:47 2019
+++ src/sys/arch/arm/sunxi/sun50i_a64_ccu.c	Sun Nov 17 17:33:17 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sun50i_a64_ccu.c,v 1.13 2019/07/01 21:06:47 jmcneill Exp $ */
+/* $NetBSD: sun50i_a64_ccu.c,v 1.14 2019/11/17 17:33:17 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill 
@@ -28,7 +28,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: sun50i_a64_ccu.c,v 1.13 2019/07/01 21:06:47 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: sun50i_a64_ccu.c,v 1.14 2019/11/17 17:33:17 jmcneill Exp $");
 
 #include 
 #include 
@@ -60,6 +60,9 @@ __KERNEL_RCSID(1, "$NetBSD: sun50i_a64_c
 #define	SDMMC0_CLK_REG		0x088
 #define	SDMMC1_CLK_REG		0x08c
 #define	SDMMC2_CLK_REG		0x090
+#define	I2SPCM0_CLK_REG		0x0b0
+#define	I2SPCM1_CLK_REG		0x0b4
+#define	I2SPCM2_CLK_REG		0x0b8
 #define	USBPHY_CFG_REG		0x0cc
 #define	DRAM_CFG_REG		0x0f4
 #define	MBUS_RST_REG		0x0fc
@@ -154,6 +157,7 @@ static const char *mmc_parents[] = { "ho
 static const char *ths_parents[] = { "hosc", NULL, NULL, NULL };
 static const char *de_parents[] = { "pll_periph0_2x", "pll_de" };
 static const char *hdmi_parents[] = { "pll_video0", "pll_video1" };
+static const char *i2s_parents[] = { "pll_audio_8x", "pll_audio_4x", "pll_audio_2x", "pll_audio" };
 static const char *tcon1_parents[] = { "pll_video0", NULL, "pll_video1", NULL };
 static const char *gpu_parents[] = { "pll_gpu" };
 
@@ -407,6 +411,26 @@ static struct sunxi_ccu_clk sun50i_a64_c
 	SUNXI_CCU_GATE(A64_CLK_HDMI_DDC, "hdmi-ddc", "hosc",
 	HDMI_SLOW_CLK_REG, 31),
 
+	SUNXI_CCU_DIV_GATE(A64_CLK_I2S0, "i2s0", i2s_parents,
+	I2SPCM0_CLK_REG,	/* reg */
+	0,			/* div */
+	__BITS(17,16),	/* sel */
+	__BIT(31),		/* enable */
+	0),
+	SUNXI_CCU_DIV_GATE(A64_CLK_I2S1, "i2s1", i2s_parents,
+	I2SPCM1_CLK_REG,	/* reg */
+	0,			/* div */
+	__BITS(17,16),	/* sel */
+	__BIT(31),		/* enable */
+	0),
+	SUNXI_CCU_DIV_GATE(A64_CLK_I2S2, "i2s2", i2s_parents,
+	I2SPCM2_CLK_REG,	/* reg */
+	0,			/* div */
+	__BITS(17,16),	/* sel */
+	__BIT(31),		/* enable */
+	0),
+
+
 	SUNXI_CCU_DIV_GATE(A64_CLK_TCON1, "tcon1", tcon1_parents,
 	TCON1_CLK_REG,	/* reg */
 	__BITS(3,0),	/* div */

Index: src/sys/arch/arm/sunxi/sunxi_ccu_div.c
diff -u src/sys/arch/arm/sunxi/sunxi_ccu_div.c:1.5 src/sys/arch/arm/sunxi/sunxi_ccu_div.c:1.6
--- src/sys/arch/arm/sunxi/sunxi_ccu_div.c:1.5	Mon Mar 19 16:19:17 2018
+++ src/sys/arch/arm/sunxi/sunxi_ccu_div.c	Sun Nov 17 17:33:17 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_ccu_div.c,v 1.5 2018/03/19 16:19:17 bouyer Exp $ */
+/* $NetBSD: sunxi_ccu_div.c,v 1.6 2019/11/17 17:33:17 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_ccu_div.c,v 1.5 2018/03/19 16:19:17 bouyer Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_ccu_div.c,v 1.6 2019/11/17 17:33:17 jmcneill Exp $");
 
 #include 
 #include 
@@ -98,6 +98,38 @@ sunxi_ccu_div_get_rate(struct sunxi_ccu_
 	return rate / ratio;
 }
 
+static int
+sunxi_ccu_div_select_parent(struct sunxi_ccu_softc *sc,
+struct sunxi_ccu_clk *clk, u_int new_rate)
+{
+	struct sunxi_ccu_div *div = &clk->u.div;
+	struct sunxi_ccu_clk *clk_parent;
+	struct clk *best_parent;
+	u_int index, best_diff;
+	const char *pname;
+
+	best_parent = NULL;
+	best_diff = ~0u;
+	for (index = 0; index < div->nparents; index++) {
+		pname = div->parents[index];
+		if (pname == NULL)
+			continue;
+		clk_parent = sunxi_ccu_clock_find(sc, pname);
+		if (clk_parent == NULL)
+			continue;
+		const u_int rate = clk_get_rate(&clk_parent->base);
+		const u_int diff = abs((int)rate - (int)new_rate);
+		if (diff < best_diff) {
+			best_diff = diff;
+			best_parent = &clk_parent->base;
+		}
+	}
+	if (best_diff == ~0u)
+		return EINVAL;
+
+	return clk_set_parent(&clk->base, best_parent);
+}
+
 int
 sunxi_ccu_div_set_rate(struct sunxi_ccu_softc *sc,
 struct sunxi_ccu_clk *clk, u_int new_rate)
@@ -119,7 +151,7 @@ sunxi_ccu_div_set_rate(struct sunxi_ccu_
 		if ((div->flags & SUNXI_CCU_DIV_SET_RATE_PARENT) != 0)
 			return clk_set_rate(clkp_parent, new_rate);
 		else
-			return ENXIO;
+			return sunxi_ccu_div_select_parent(sc, clk, new_rate);
 	}
 
 	val = CCU_READ(sc, div->reg);



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

2019-11-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov 17 17:33:34 UTC 2019

Modified Files:
src/sys/arch/arm/sunxi: sunxi_dwhdmi.c sunxi_i2s.c

Log Message:
Add A64 HDMI audio support.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/sunxi/sunxi_dwhdmi.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/arm/sunxi/sunxi_i2s.c

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

Modified files:

Index: src/sys/arch/arm/sunxi/sunxi_dwhdmi.c
diff -u src/sys/arch/arm/sunxi/sunxi_dwhdmi.c:1.3 src/sys/arch/arm/sunxi/sunxi_dwhdmi.c:1.4
--- src/sys/arch/arm/sunxi/sunxi_dwhdmi.c:1.3	Sat Feb  2 17:35:16 2019
+++ src/sys/arch/arm/sunxi/sunxi_dwhdmi.c	Sun Nov 17 17:33:34 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_dwhdmi.c,v 1.3 2019/02/02 17:35:16 jmcneill Exp $ */
+/* $NetBSD: sunxi_dwhdmi.c,v 1.4 2019/11/17 17:33:34 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2019 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_dwhdmi.c,v 1.3 2019/02/02 17:35:16 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_dwhdmi.c,v 1.4 2019/11/17 17:33:34 jmcneill Exp $");
 
 #include 
 #include 
@@ -197,6 +197,21 @@ sunxi_dwhdmi_mode_set(struct dwhdmi_soft
 	sc->sc_curmode = *adjusted_mode;
 }
 
+static audio_dai_tag_t
+sunxi_dwhdmi_dai_get_tag(device_t dev, const void *data, size_t len)
+{
+	struct sunxi_dwhdmi_softc * const sc = device_private(dev);
+
+	if (len != 4)
+		return NULL;
+
+	return &sc->sc_base.sc_dai;
+}
+
+static struct fdtbus_dai_controller_func sunxi_dwhdmi_dai_funcs = {
+	.get_tag = sunxi_dwhdmi_dai_get_tag
+};
+
 static int
 sunxi_dwhdmi_match(device_t parent, cfdata_t cf, void *aux)
 {
@@ -263,6 +278,8 @@ sunxi_dwhdmi_attach(device_t parent, dev
 	sc->sc_ports.dp_ep_activate = sunxi_dwhdmi_ep_activate;
 	sc->sc_ports.dp_ep_get_data = sunxi_dwhdmi_ep_get_data;
 	fdt_ports_register(&sc->sc_ports, self, phandle, EP_DRM_BRIDGE);
+
+	fdtbus_register_dai_controller(self, phandle, &sunxi_dwhdmi_dai_funcs);
 }
 
 CFATTACH_DECL_NEW(sunxi_dwhdmi, sizeof(struct sunxi_dwhdmi_softc),

Index: src/sys/arch/arm/sunxi/sunxi_i2s.c
diff -u src/sys/arch/arm/sunxi/sunxi_i2s.c:1.6 src/sys/arch/arm/sunxi/sunxi_i2s.c:1.7
--- src/sys/arch/arm/sunxi/sunxi_i2s.c:1.6	Sat Jun  8 08:02:37 2019
+++ src/sys/arch/arm/sunxi/sunxi_i2s.c	Sun Nov 17 17:33:34 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sunxi_i2s.c,v 1.6 2019/06/08 08:02:37 isaki Exp $ */
+/* $NetBSD: sunxi_i2s.c,v 1.7 2019/11/17 17:33:34 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sunxi_i2s.c,v 1.6 2019/06/08 08:02:37 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sunxi_i2s.c,v 1.7 2019/11/17 17:33:34 jmcneill Exp $");
 
 #include 
 #include 
@@ -42,16 +42,24 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_i2s.c,
 
 #include 
 
-#define	SUNXI_I2S_CLK_RATE	24576000
+#define	SUNXI_I2S_CLK_RATE		24576000
+#define	SUNXI_I2S_SAMPLE_RATE		48000
 
 #define	DA_CTL		0x00
+#define	 DA_CTL_BCLK_OUT __BIT(18)	/* sun8i */
+#define	 DA_CLK_LRCK_OUT __BIT(17)	/* sun8i */
 #define	 DA_CTL_SDO_EN	__BIT(8)
-#define	 DA_CTL_MS	__BIT(5)
-#define	 DA_CTL_PCM	__BIT(4)
+#define	 DA_CTL_MS	__BIT(5)	/* sun4i */
+#define	 DA_CTL_PCM	__BIT(4)	/* sun4i */
+#define	 DA_CTL_MODE_SEL __BITS(5,4)	/* sun8i */
+#define	  DA_CTL_MODE_SEL_PCM	0
+#define	  DA_CTL_MODE_SEL_LJ	1
+#define	  DA_CTL_MODE_SEL_RJ	2
 #define	 DA_CTL_TXEN	__BIT(2)
 #define	 DA_CTL_RXEN	__BIT(1)
 #define	 DA_CTL_GEN	__BIT(0)
 #define	DA_FAT0		0x04
+#define	 DA_FAT0_LRCK_PERIOD __BITS(17,8) /* sun8i */
 #define	 DA_FAT0_LRCP	__BIT(7)
 #define	  DA_LRCP_NORMAL	0
 #define	  DA_LRCP_INVERTED	1
@@ -79,20 +87,34 @@ __KERNEL_RCSID(0, "$NetBSD: sunxi_i2s.c,
 #define	 DA_INT_RX_DRQ	__BIT(3)
 #define	DA_TXFIFO	0x20
 #define	DA_CLKD		0x24
-#define	 DA_CLKD_MCLKO_EN __BIT(7)
-#define	 DA_CLKD_BCLKDIV __BITS(6,4)
+#define	 DA_CLKD_MCLKO_EN_SUN8I __BIT(8)
+#define	 DA_CLKD_MCLKO_EN_SUN4I __BIT(7)
+#define	 DA_CLKD_BCLKDIV_SUN8I __BITS(7,4)
+#define	 DA_CLKD_BCLKDIV_SUN4I __BITS(6,4)
 #define	  DA_CLKD_BCLKDIV_8	3
 #define	  DA_CLKD_BCLKDIV_16	5
 #define	 DA_CLKD_MCLKDIV __BITS(3,0)
 #define	  DA_CLKD_MCLKDIV_1	0
 #define	DA_TXCNT	0x28
 #define	DA_RXCNT	0x2c
+#define	DA_CHCFG	0x30		/* sun8i */
+#define	 DA_CHCFG_TX_SLOT_HIZ	__BIT(9)
+#define	 DA_CHCFG_TXN_STATE	__BIT(8)
+#define	 DA_CHCFG_RX_SLOT_NUM	__BITS(6,4)
+#define	 DA_CHCFG_TX_SLOT_NUM	__BITS(2,0)
 
+#define	DA_CHSEL_OFFSET	__BITS(13,12)	/* sun8i */
 #define	DA_CHSEL_EN	__BITS(11,4)
 #define	DA_CHSEL_SEL	__BITS(2,0)
 
+enum sunxi_i2s_type {
+	SUNXI_I2S_SUN4I,
+	SUNXI_I2S_SUN8I,
+};
+
 struct sunxi_i2s_config {
 	const char	*name;
+	enum sunxi_i2s_type type;
 	bus_size_t	txchsel;
 	bus_size_t	txchmap;
 	bus_size_t	rxchsel;
@@ -101,15 +123,27 @@ struct sunxi_i2s_config {
 
 static const struct sunxi_i2s_config sun50i_a64_codec_config = {
 	.name = "Audio Codec (digital part)",
+	.type = SUNXI_I2S_SUN4I,
 	.txchsel = 0

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

2019-11-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov 17 17:35:10 UTC 2019

Modified Files:
src/sys/arch/arm/dts: sun50i-a64-pine64-plus.dts sun50i-a64-pine64.dts
sun50i-a64-sopine-baseboard.dts sun50i-a64.dtsi

Log Message:
Enable HDMI audio support on Pine64, Pine64+, and Pine64 LTS boards.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/dts/sun50i-a64-pine64-plus.dts
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/dts/sun50i-a64-pine64.dts \
src/sys/arch/arm/dts/sun50i-a64-sopine-baseboard.dts
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/dts/sun50i-a64.dtsi

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

Modified files:

Index: src/sys/arch/arm/dts/sun50i-a64-pine64-plus.dts
diff -u src/sys/arch/arm/dts/sun50i-a64-pine64-plus.dts:1.2 src/sys/arch/arm/dts/sun50i-a64-pine64-plus.dts:1.3
--- src/sys/arch/arm/dts/sun50i-a64-pine64-plus.dts:1.2	Sat Sep  9 12:05:28 2017
+++ src/sys/arch/arm/dts/sun50i-a64-pine64-plus.dts	Sun Nov 17 17:35:10 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sun50i-a64-pine64-plus.dts,v 1.2 2017/09/09 12:05:28 jmcneill Exp $ */
+/* $NetBSD: sun50i-a64-pine64-plus.dts,v 1.3 2019/11/17 17:35:10 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill 
@@ -49,3 +49,11 @@
 &ohci0 {
 	status = "okay";
 };
+
+&i2s2 {
+	status = "okay";
+};
+
+&sound_hdmi {
+	status = "okay";
+};

Index: src/sys/arch/arm/dts/sun50i-a64-pine64.dts
diff -u src/sys/arch/arm/dts/sun50i-a64-pine64.dts:1.1 src/sys/arch/arm/dts/sun50i-a64-pine64.dts:1.2
--- src/sys/arch/arm/dts/sun50i-a64-pine64.dts:1.1	Sun Feb 18 12:20:25 2018
+++ src/sys/arch/arm/dts/sun50i-a64-pine64.dts	Sun Nov 17 17:35:10 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sun50i-a64-pine64.dts,v 1.1 2018/02/18 12:20:25 jmcneill Exp $ */
+/* $NetBSD: sun50i-a64-pine64.dts,v 1.2 2019/11/17 17:35:10 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -28,3 +28,11 @@
 
 #include "../../../external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts"
 #include "sun50i-a64.dtsi"
+
+&i2s2 {
+	status = "okay";
+};
+
+&sound_hdmi {
+	status = "okay";
+};
Index: src/sys/arch/arm/dts/sun50i-a64-sopine-baseboard.dts
diff -u src/sys/arch/arm/dts/sun50i-a64-sopine-baseboard.dts:1.1 src/sys/arch/arm/dts/sun50i-a64-sopine-baseboard.dts:1.2
--- src/sys/arch/arm/dts/sun50i-a64-sopine-baseboard.dts:1.1	Thu Jun  7 00:51:41 2018
+++ src/sys/arch/arm/dts/sun50i-a64-sopine-baseboard.dts	Sun Nov 17 17:35:10 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sun50i-a64-sopine-baseboard.dts,v 1.1 2018/06/07 00:51:41 jmcneill Exp $ */
+/* $NetBSD: sun50i-a64-sopine-baseboard.dts,v 1.2 2019/11/17 17:35:10 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -28,3 +28,11 @@
 
 #include "../../../external/gpl2/dts/dist/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts"
 #include "sun50i-a64.dtsi"
+
+&i2s2 {
+	status = "okay";
+};
+
+&sound_hdmi {
+	status = "okay";
+};

Index: src/sys/arch/arm/dts/sun50i-a64.dtsi
diff -u src/sys/arch/arm/dts/sun50i-a64.dtsi:1.12 src/sys/arch/arm/dts/sun50i-a64.dtsi:1.13
--- src/sys/arch/arm/dts/sun50i-a64.dtsi:1.12	Fri Nov  8 11:12:09 2019
+++ src/sys/arch/arm/dts/sun50i-a64.dtsi	Sun Nov 17 17:35:10 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sun50i-a64.dtsi,v 1.12 2019/11/08 11:12:09 jmcneill Exp $ */
+/* $NetBSD: sun50i-a64.dtsi,v 1.13 2019/11/17 17:35:10 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill 
@@ -59,6 +59,36 @@
 			 ,
 			 ;
 	};
+
+	i2s2: i2s@1c22800 {
+		#sound-dai-cells = <0>;
+		compatible = "allwinner,sun50i-a64-i2s",
+			 "allwinner,sun8i-h3-i2s";
+		reg = <0x01c22800 0x400>;
+		interrupts = ;
+		clocks = <&ccu CLK_BUS_I2S2>, <&ccu CLK_I2S2>;
+		clock-names = "apb", "mod";
+		resets = <&ccu RST_BUS_I2S2>;
+		dma-names = "tx";
+		dmas = <&dma 27>;
+		status = "disabled";
+	};
+
+	sound_hdmi: sound-hdmi {
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "hdmi-audio";
+		simple-audio-card,format = "i2s";
+		simple-audio-card,mclk-fs = <256>;
+		status = "disabled";
+
+		simple-audio-card,cpu {
+			sound-dai = <&i2s2>;
+		};
+
+		simple-audio-card,codec {
+			sound-dai = <&hdmi>;
+		};
+	};
 };
 
 &cpu0 {



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

2019-11-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov 17 17:35:10 UTC 2019

Modified Files:
src/sys/arch/arm/dts: sun50i-a64-pine64-plus.dts sun50i-a64-pine64.dts
sun50i-a64-sopine-baseboard.dts sun50i-a64.dtsi

Log Message:
Enable HDMI audio support on Pine64, Pine64+, and Pine64 LTS boards.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/dts/sun50i-a64-pine64-plus.dts
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/dts/sun50i-a64-pine64.dts \
src/sys/arch/arm/dts/sun50i-a64-sopine-baseboard.dts
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/arm/dts/sun50i-a64.dtsi

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



CVS commit: src/sys/dev/fdt

2019-11-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov 17 19:30:43 UTC 2019

Modified Files:
src/sys/dev/fdt: files.fdt
Added Files:
src/sys/dev/fdt: spdif_tx.c

Log Message:
Add driver for dummy spdif transmitter bindings.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/fdt/files.fdt
cvs rdiff -u -r0 -r1.1 src/sys/dev/fdt/spdif_tx.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/evbarm/conf

2019-11-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov 17 19:30:59 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: GENERIC64

Log Message:
Add spdiftx


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/evbarm/conf/GENERIC64

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



CVS commit: src/sys/arch/evbarm/conf

2019-11-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov 17 19:30:59 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: GENERIC64

Log Message:
Add spdiftx


To generate a diff of this commit:
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/evbarm/conf/GENERIC64

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

Modified files:

Index: src/sys/arch/evbarm/conf/GENERIC64
diff -u src/sys/arch/evbarm/conf/GENERIC64:1.113 src/sys/arch/evbarm/conf/GENERIC64:1.114
--- src/sys/arch/evbarm/conf/GENERIC64:1.113	Sat Nov 16 13:24:40 2019
+++ src/sys/arch/evbarm/conf/GENERIC64	Sun Nov 17 19:30:59 2019
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC64,v 1.113 2019/11/16 13:24:40 jmcneill Exp $
+#	$NetBSD: GENERIC64,v 1.114 2019/11/17 19:30:59 jmcneill Exp $
 #
 #	GENERIC ARM (aarch64) kernel
 #
@@ -419,6 +419,7 @@ options 	HDAUDIOVERBOSE
 options 	HDAUDIO_ENABLE_HDMI
 options 	HDAUDIO_ENABLE_DISPLAYPORT
 ausoc*		at fdt?			# Simple SoC audio card
+spdiftx*	at fdt?			# SPDIF transmitter
 rki2s*		at fdt?			# Rockchip I2S/PCM
 sunxicodec*	at fdt?			# Allwinner audio codec
 sun8icodec*	at fdt?			# Allwinner audio codec (sun8i/sun50i)



CVS commit: src/sys/dev/fdt

2019-11-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov 17 19:30:43 UTC 2019

Modified Files:
src/sys/dev/fdt: files.fdt
Added Files:
src/sys/dev/fdt: spdif_tx.c

Log Message:
Add driver for dummy spdif transmitter bindings.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/dev/fdt/files.fdt
cvs rdiff -u -r0 -r1.1 src/sys/dev/fdt/spdif_tx.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/fdt/files.fdt
diff -u src/sys/dev/fdt/files.fdt:1.47 src/sys/dev/fdt/files.fdt:1.48
--- src/sys/dev/fdt/files.fdt:1.47	Wed Oct 30 21:37:56 2019
+++ src/sys/dev/fdt/files.fdt	Sun Nov 17 19:30:42 2019
@@ -1,4 +1,4 @@
-# $NetBSD: files.fdt,v 1.47 2019/10/30 21:37:56 jmcneill Exp $
+# $NetBSD: files.fdt,v 1.48 2019/11/17 19:30:42 jmcneill Exp $
 
 include	"external/bsd/libfdt/conf/files.libfdt"
 
@@ -98,6 +98,10 @@ device	ausoc: audiobus
 attach	ausoc at fdt
 file	dev/fdt/ausoc.causoc
 
+device	spdiftx
+attach	spdiftx at fdt
+file	dev/fdt/spdif_tx.c			spdiftx
+
 define	fdt_display_timing
 file	dev/fdt/display_timing.c		fdt_display_timing
 

Added files:

Index: src/sys/dev/fdt/spdif_tx.c
diff -u /dev/null src/sys/dev/fdt/spdif_tx.c:1.1
--- /dev/null	Sun Nov 17 19:30:43 2019
+++ src/sys/dev/fdt/spdif_tx.c	Sun Nov 17 19:30:42 2019
@@ -0,0 +1,114 @@
+/* $NetBSD: spdif_tx.c,v 1.1 2019/11/17 19:30:42 jmcneill Exp $ */
+
+/*-
+ * Copyright (c) 2019 Jared McNeill 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include 
+__KERNEL_RCSID(0, "$NetBSD: spdif_tx.c,v 1.1 2019/11/17 19:30:42 jmcneill Exp $");
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+
+#include 
+
+#include 
+
+struct spdif_tx_softc {
+	device_t		sc_dev;
+	struct audio_dai_device	sc_dai;
+};
+
+static int	spdif_tx_match(device_t, cfdata_t, void *);
+static void	spdif_tx_attach(device_t, device_t, void *);
+
+static const char *compatible[] = {
+	"linux,spdif-dit",
+	NULL
+};
+
+CFATTACH_DECL_NEW(spdiftx, sizeof(struct spdif_tx_softc),
+	spdif_tx_match, spdif_tx_attach, NULL, NULL);
+
+static int
+spdif_tx_set_format(audio_dai_tag_t dai, u_int format)
+{
+	return 0;
+}
+
+static int
+spdif_tx_add_device(audio_dai_tag_t dai, audio_dai_tag_t aux)
+{
+	return 0;
+}
+
+static const struct audio_hw_if spdif_tx_hw_if = { };
+
+static audio_dai_tag_t
+spdif_tx_dai_get_tag(device_t dev, const void *data, size_t len)
+{
+	struct spdif_tx_softc * const sc = device_private(dev);
+
+	if (len != 4)
+		return NULL;
+
+	return &sc->sc_dai;
+}
+
+static struct fdtbus_dai_controller_func spdif_tx_dai_funcs = {
+	.get_tag = spdif_tx_dai_get_tag
+};
+
+static int
+spdif_tx_match(device_t parent, cfdata_t cf, void *aux)
+{
+	struct fdt_attach_args * const faa = aux;
+
+	return of_match_compatible(faa->faa_phandle, compatible);
+}
+
+static void
+spdif_tx_attach(device_t parent, device_t self, void *aux)
+{
+	struct spdif_tx_softc * const sc = device_private(self);
+	struct fdt_attach_args * const faa = aux;
+	const int phandle = faa->faa_phandle;
+
+	sc->sc_dev = self;
+
+	aprint_naive("\n");
+	aprint_normal(": SPDIF transmitter\n");
+
+	sc->sc_dai.dai_set_format = spdif_tx_set_format;
+	sc->sc_dai.dai_add_device = spdif_tx_add_device;
+	sc->sc_dai.dai_hw_if = &spdif_tx_hw_if;
+	sc->sc_dai.dai_dev = self;
+	sc->sc_dai.dai_priv = sc;
+	fdtbus_register_dai_controller(self, phandle, &spdif_tx_dai_funcs);
+}



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

2019-11-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov 17 19:51:12 UTC 2019

Modified Files:
src/sys/arch/arm/sunxi: sun50i_a64_ccu.c

Log Message:
Add SPI clocks


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/sunxi/sun50i_a64_ccu.c

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

Modified files:

Index: src/sys/arch/arm/sunxi/sun50i_a64_ccu.c
diff -u src/sys/arch/arm/sunxi/sun50i_a64_ccu.c:1.14 src/sys/arch/arm/sunxi/sun50i_a64_ccu.c:1.15
--- src/sys/arch/arm/sunxi/sun50i_a64_ccu.c:1.14	Sun Nov 17 17:33:17 2019
+++ src/sys/arch/arm/sunxi/sun50i_a64_ccu.c	Sun Nov 17 19:51:12 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: sun50i_a64_ccu.c,v 1.14 2019/11/17 17:33:17 jmcneill Exp $ */
+/* $NetBSD: sun50i_a64_ccu.c,v 1.15 2019/11/17 19:51:12 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill 
@@ -28,7 +28,7 @@
 
 #include 
 
-__KERNEL_RCSID(1, "$NetBSD: sun50i_a64_ccu.c,v 1.14 2019/11/17 17:33:17 jmcneill Exp $");
+__KERNEL_RCSID(1, "$NetBSD: sun50i_a64_ccu.c,v 1.15 2019/11/17 19:51:12 jmcneill Exp $");
 
 #include 
 #include 
@@ -60,6 +60,8 @@ __KERNEL_RCSID(1, "$NetBSD: sun50i_a64_c
 #define	SDMMC0_CLK_REG		0x088
 #define	SDMMC1_CLK_REG		0x08c
 #define	SDMMC2_CLK_REG		0x090
+#define	SPI0_CLK_REG		0x0a0
+#define	SPI1_CLK_REG		0x0a4
 #define	I2SPCM0_CLK_REG		0x0b0
 #define	I2SPCM1_CLK_REG		0x0b4
 #define	I2SPCM2_CLK_REG		0x0b8
@@ -158,6 +160,7 @@ static const char *ths_parents[] = { "ho
 static const char *de_parents[] = { "pll_periph0_2x", "pll_de" };
 static const char *hdmi_parents[] = { "pll_video0", "pll_video1" };
 static const char *i2s_parents[] = { "pll_audio_8x", "pll_audio_4x", "pll_audio_2x", "pll_audio" };
+static const char *spi_parents[] = { "hosc", "pll_periph0", "pll_periph1", NULL };
 static const char *tcon1_parents[] = { "pll_video0", NULL, "pll_video1", NULL };
 static const char *gpu_parents[] = { "pll_gpu" };
 
@@ -260,6 +263,16 @@ static struct sunxi_ccu_clk sun50i_a64_c
 	SUNXI_CCU_NKMP_DIVIDE_BY_TWO),
 	SUNXI_CCU_FIXED_FACTOR(A64_CLK_PLL_PERIPH0_2X, "pll_periph0_2x", "pll_periph0", 1, 2),
 
+	SUNXI_CCU_NKMP(A64_CLK_PLL_PERIPH1, "pll_periph1", "hosc",
+	PLL_PERIPH1_CTRL_REG,	/* reg */
+	__BITS(12,8),		/* n */
+	__BITS(5,4), 		/* k */
+	0,/* m */
+	__BITS(17,16),		/* p */
+	__BIT(31),			/* enable */
+	SUNXI_CCU_NKMP_DIVIDE_BY_TWO),
+	SUNXI_CCU_FIXED_FACTOR(A64_CLK_PLL_PERIPH1_2X, "pll_periph1_2x", "pll_periph1", 1, 2),
+
 	SUNXI_CCU_NKMP_TABLE(A64_CLK_PLL_AUDIO_BASE, "pll_audio_base", "hosc",
 	PLL_AUDIO_CTRL_REG,		/* reg */
 	__BITS(14,8),		/* n */
@@ -430,6 +443,21 @@ static struct sunxi_ccu_clk sun50i_a64_c
 	__BIT(31),		/* enable */
 	0),
 
+	SUNXI_CCU_NM(A64_CLK_SPI0, "spi0", spi_parents,
+	SPI0_CLK_REG,	/* reg */
+	__BITS(17,16),	/* n */
+	__BITS(3,0),	/* m */
+	__BITS(25,24),	/* sel */
+	__BIT(31),		/* enable */
+	SUNXI_CCU_NM_POWER_OF_TWO|SUNXI_CCU_NM_ROUND_DOWN),
+
+	SUNXI_CCU_NM(A64_CLK_SPI1, "spi1", spi_parents,
+	SPI1_CLK_REG,	/* reg */
+	__BITS(17,16),	/* n */
+	__BITS(3,0),	/* m */
+	__BITS(25,24),	/* sel */
+	__BIT(31),		/* enable */
+	SUNXI_CCU_NM_POWER_OF_TWO|SUNXI_CCU_NM_ROUND_DOWN),
 
 	SUNXI_CCU_DIV_GATE(A64_CLK_TCON1, "tcon1", tcon1_parents,
 	TCON1_CLK_REG,	/* reg */



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

2019-11-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov 17 19:51:12 UTC 2019

Modified Files:
src/sys/arch/arm/sunxi: sun50i_a64_ccu.c

Log Message:
Add SPI clocks


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/arm/sunxi/sun50i_a64_ccu.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/evbarm/conf

2019-11-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov 17 19:51:35 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: GENERIC64

Log Message:
Add sun6ispi


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/arch/evbarm/conf/GENERIC64

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



CVS commit: src/sys/arch/evbarm/conf

2019-11-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Nov 17 19:51:35 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf: GENERIC64

Log Message:
Add sun6ispi


To generate a diff of this commit:
cvs rdiff -u -r1.114 -r1.115 src/sys/arch/evbarm/conf/GENERIC64

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

Modified files:

Index: src/sys/arch/evbarm/conf/GENERIC64
diff -u src/sys/arch/evbarm/conf/GENERIC64:1.114 src/sys/arch/evbarm/conf/GENERIC64:1.115
--- src/sys/arch/evbarm/conf/GENERIC64:1.114	Sun Nov 17 19:30:59 2019
+++ src/sys/arch/evbarm/conf/GENERIC64	Sun Nov 17 19:51:35 2019
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC64,v 1.114 2019/11/17 19:30:59 jmcneill Exp $
+#	$NetBSD: GENERIC64,v 1.115 2019/11/17 19:51:35 jmcneill Exp $
 #
 #	GENERIC ARM (aarch64) kernel
 #
@@ -407,6 +407,7 @@ ld*		at nvme? nsid ?
 # SPI controllers
 bcmspi*		at fdt?			# Broadcom BCM283x SPI
 rkspi*		at fdt?			# Rockchip SPI
+sun6ispi*	at fdt?			# Allwinner SPI
 spi*		at spibus?
 m25p*		at spi?
 spiflash*	at spiflashbus?



CVS commit: src/sys/lib/libunwind

2019-11-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov 17 22:53:33 UTC 2019

Modified Files:
src/sys/lib/libunwind: Makefile.inc

Log Message:
Explicitly compile libunwind with vfp3 because gcc-8 defaults to neon
and breaks exceptions.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/lib/libunwind/Makefile.inc

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



CVS commit: src/sys/lib/libunwind

2019-11-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Nov 17 22:53:33 UTC 2019

Modified Files:
src/sys/lib/libunwind: Makefile.inc

Log Message:
Explicitly compile libunwind with vfp3 because gcc-8 defaults to neon
and breaks exceptions.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/lib/libunwind/Makefile.inc

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

Modified files:

Index: src/sys/lib/libunwind/Makefile.inc
diff -u src/sys/lib/libunwind/Makefile.inc:1.11 src/sys/lib/libunwind/Makefile.inc:1.12
--- src/sys/lib/libunwind/Makefile.inc:1.11	Thu Jan 29 15:45:16 2015
+++ src/sys/lib/libunwind/Makefile.inc	Sun Nov 17 17:53:33 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.11 2015/01/29 20:45:16 joerg Exp $
+#	$NetBSD: Makefile.inc,v 1.12 2019/11/17 22:53:33 christos Exp $
 
 .PATH:	${NETBSDSRCDIR}/sys/lib/libunwind
 
@@ -14,5 +14,6 @@ COPTS.libunwind.cxx+=	-Wno-old-style-cas
 CPPFLAGS.libunwind.cxx+=-I${NETBSDSRCDIR}/sys/lib/libunwind
 
 .if ${LIBC_MACHINE_CPU} == "arm"
+COPTS.libunwind.cxx+=	${${ACTIVE_CC} == "gcc":? -mfpu=vfp3 :}
 AFLAGS.unwind_registers.S+=	${${ACTIVE_CC} == "clang":? -mfpu=vfp3 :}
 .endif



CVS commit: src/etc/etc.ofppc

2019-11-17 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Nov 18 01:11:14 UTC 2019

Modified Files:
src/etc/etc.ofppc: Makefile.inc

Log Message:
build GENERIC64 only on ofppc64 (doesn't build, but a least fails
somewhat sanely, instead of trying to build the wrong things.)


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/etc/etc.ofppc/Makefile.inc

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



CVS commit: src/etc/etc.ofppc

2019-11-17 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Nov 18 01:11:14 UTC 2019

Modified Files:
src/etc/etc.ofppc: Makefile.inc

Log Message:
build GENERIC64 only on ofppc64 (doesn't build, but a least fails
somewhat sanely, instead of trying to build the wrong things.)


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/etc/etc.ofppc/Makefile.inc

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

Modified files:

Index: src/etc/etc.ofppc/Makefile.inc
diff -u src/etc/etc.ofppc/Makefile.inc:1.9 src/etc/etc.ofppc/Makefile.inc:1.10
--- src/etc/etc.ofppc/Makefile.inc:1.9	Thu May  1 01:58:10 2008
+++ src/etc/etc.ofppc/Makefile.inc	Mon Nov 18 01:11:14 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.inc,v 1.9 2008/05/01 01:58:10 garbled Exp $
+#	$NetBSD: Makefile.inc,v 1.10 2019/11/18 01:11:14 mrg Exp $
 #
 #	etc.ofppc/Makefile.inc -- ofppc-specific etc Makefile targets
 #
@@ -6,10 +6,18 @@
 # If you change the list of distributed kernels, don't forget
 # to update the release documentation in distrib/notes/common/contents
 
+.if ${MACHINE_ARCH} == "powerpc"
+
 KERNEL_SETS=		GENERIC
 
 BUILD_KERNELS+=		INSTALL
 
+.else
+
+KERNEL_SETS=		GENERIC64
+
+.endif
+
 MD_INSTALLATION_DIRS=	installation/netboot
 
 INSTALLATION_DIRS+=	${MD_INSTALLATION_DIRS}



CVS commit: src/external/gpl3/gcc

2019-11-17 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Nov 18 01:13:39 UTC 2019

Modified Files:
src/external/gpl3/gcc: README.gcc8
src/external/gpl3/gcc/dist/libsanitizer/lsan: lsan_allocator.h
src/external/gpl3/gcc/usr.bin/gcc/arch/ia64: defs.mk

Log Message:
few gcc 8 clean ups:
- port lsan_allocator.h to riscv and ia64.
- remove configure output garbage from ia64/defs.mk
- update README.gcc8 to reality:
  - arms mostly work, but not quite
  - most ports now build
  - some ports have switched


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/README.gcc8
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_allocator.h
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gcc/usr.bin/gcc/arch/ia64/defs.mk

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

Modified files:

Index: src/external/gpl3/gcc/README.gcc8
diff -u src/external/gpl3/gcc/README.gcc8:1.4 src/external/gpl3/gcc/README.gcc8:1.5
--- src/external/gpl3/gcc/README.gcc8:1.4	Sat Nov 16 11:50:58 2019
+++ src/external/gpl3/gcc/README.gcc8	Mon Nov 18 01:13:39 2019
@@ -1,4 +1,4 @@
-$NetBSD: README.gcc8,v 1.4 2019/11/16 11:50:58 mrg Exp $
+$NetBSD: README.gcc8,v 1.5 2019/11/18 01:13:39 mrg Exp $
 
 new stuff:
 	cc1objcplus
@@ -28,39 +28,39 @@ architecture	tools	kernels	libgcc	native
 	-	---	--	--			---	
 aarch64		y	y	y	y		y		y	y	y
 alpha		y	y	y	y		y		?	?	?
-earmv4		y	y	y	y		?		?	?	?
-earmv4eb	y	?	?	y		?		?	?	?
-earm		y	?	?	y		?		?	?	?
-earmeb		y	?	?	y		?		?	?	?
-earmhf		y	?	?	y		?		?	?	?
-earmhfeb	y	?	?	y		?		?	?	?
-earmv6		y	?	?	y		?		?	?	?
-earmv6eb	y	?	?	y		?		?	?	?
-earmv6hf	y	?	?	y		?		?	?	?
-earmv6hfeb	y	?	?	y		?		?	?	?
-earmv7		y	?	?	y		?		?	?	?
-earmv7eb	y	?	?	y		?		?	?	?
+earmv4		y	y	y	y		y		y	?	?
+earmv4eb	y	?	y	y		?		?	?	?
+earm		y	?	y	y		?		?	?	?
+earmeb		y	?	y	y		?		?	?	?
+earmhf		y	?	y	y		?		?	?	?
+earmhfeb	y	?	y	y		?		?	?	?
+earmv6		y	?	y	y		?		?	?	?
+earmv6eb	y	?	y	y		?		?	?	?
+earmv6hf	y	?	y	y		?		?	?	?
+earmv6hfeb	y	?	y	y		?		?	?	?
+earmv7		y	?	y	y		?		?	?	?
+earmv7eb	y	?	y	y		?		?	?	?
 earmv7hf	y	y	y	y		y		y	n[3]	n
-earmv7hfeb	y	?	?	y		?		?	?	?
-hppa		y	?	?	y		?		?	?	?
+earmv7hfeb	y	?	y	y		?		?	?	?
+hppa		y	?	y	y		?		?	?	?
 i386		y	y	y	y		y		y	y	y
-ia64		y	?	?	y		?		?	?	?
-m68000		y	?	?	y		?		?	?	?
-m68k		y	?	?	y		?		?	?	?
-mipseb		y	?	?	y		?		?	?	?
-mipsel		y	?	?	y		?		?	?	?
+ia64		y	y	y	y		y		y	n[4]	y
+m68000		y	?	y	y		?		?	?	?
+m68k		y	y	y	y		y		?	?	?
+mipseb		y	y	y	y		?		?	?	?
+mipsel		y	?	y	y		?		?	?	?
 mips64eb	y	y	y	y		y		y	y[2]	?
-mips64el	y	?	?	y		?		?	?	?
+mips64el	y	?	y	y		?		?	?	?
 powerpc		y	y	y	y		y		y	y[1]	?
-powerpc64	y	?	y	y		y		?	?	?
-sh3eb		y	?	?	y		?		?	?	?
-sh3el		y	?	?	y		?		?	?	?
+powerpc64	y	n	y	y		y		y	y	y
+sh3eb		y	y	y	y		y		y	yX	?
+sh3el		y	y	y	y		y		?	?	?
 sparc		y	y	y	y		y		y	y	y
 sparc64		y	y	y	y		y		y	y	y
 vax		y	?	?	y		?		?	?	?
 x86_64		y	y	y	y		y		y	y	y
-riscv32		y	?	?	y		?		?	?	?	
-riscv64		y	?	?	y		?		?	?	?
+riscv32		y	?	y	y		y		?	?	?	
+riscv64		y	?	y	y		y		?	?	?
 --
 coldfire	?	N/A	?	?		?		N/A	N/A
 	-	---	--	--			---
@@ -69,43 +69,43 @@ architecture	tools	kernels	libgcc	native
 [1] - many ipsec atf and c++ failures
 [2] - lots of failures, no idea if bad
 [3] - c++ exceptions are broken, all arm
+[4] - not upto userland yet
 
 CPU vs platform test table (for CPUs with multiple ports).  this is "make release" or just kernels.
 values:		y (yes), k (kernels only), n (failed), r (running), ? (not attempted)
 
 CPU		platform list
 ---		 
-		acorn32		cats		epoc32		evbarm-eb	evbarm-el	hpcarm		iyonix		netwinder	shark 		zaurus
-arm:		?		?		?		?		?		?		?		?		?		?
-earmv4:		?		?		?		k		k		?		-		?		?		-
-earm:		-		-		-		?		?		-		?		-		-		k
-earmhf:		-		-		-		r		?		-		-		-		-		-
-earmv6:		-		-		-		k		k		-		-		-		-		-
-earmv6hf:	-		-		-		k		k		-		-		-		-		-
-earmv7:		-		-		-		k		k		-		-		-		-		-
-earmv7hf:	-		-		-		k		k		-		-		-		-		-
+		acorn32		cats	epoc32	evbarm-eb	evbarm-el	hpcarm		iyonix		netwinder	shark 		zaurus
+earmv4:		k		k	k	k		k		k		-		k		y		-
+earm:		-		-	-	k		k		-		k		-		-		k
+earmhf:		-		-	-	k		k		-		-		-		-		-
+earmv6:		-		-	-	k		k		-		-		-		-		-
+earmv6hf:	-		-	-	k		k		-		-		-		-		-
+earmv7:		-		-	-	k		k		-		-		-		-		-
+earmv7hf:	-		-	-	k		k		-		-		-		-		-
 
-		amiga		atari		cesfic		hp300		luna68k		mac68k		mvme68k		news68k		next68k		sun3		x68k
-m68k:		?		?		k		?		?		y[1]		?		?		?		y 		?
+		amiga		atari	cesfic	hp300		luna68k		mac68k		mvme68k		news68k		next68k		sun3	x68k
+m68k:		k		k	k	k		k		y		k		k		k		y 	k
 
 		evbmips		emips		ews4800mips	mipsco		newsmips	sgimips
-mipseb:		?		?		?		?		?		?
+mipseb:		k		k		k		k		k		y
 
 		evbmips		algor		arc		cobalt		hpcmips		pmax
-mipsel:		?		?		?		?		?		?
+mipsel:		y		y		y		y		y		y
 
 		algor		evbmips		pmax
-mips64eb:	-		?		-
-mips64el:	?		?		?
-
-		amigappc	bebox		evbppc		ibmnws		macppc		mvmeppc		

CVS commit: src/external/gpl3/gcc

2019-11-17 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Nov 18 01:13:39 UTC 2019

Modified Files:
src/external/gpl3/gcc: README.gcc8
src/external/gpl3/gcc/dist/libsanitizer/lsan: lsan_allocator.h
src/external/gpl3/gcc/usr.bin/gcc/arch/ia64: defs.mk

Log Message:
few gcc 8 clean ups:
- port lsan_allocator.h to riscv and ia64.
- remove configure output garbage from ia64/defs.mk
- update README.gcc8 to reality:
  - arms mostly work, but not quite
  - most ports now build
  - some ports have switched


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/gpl3/gcc/README.gcc8
cvs rdiff -u -r1.3 -r1.4 \
src/external/gpl3/gcc/dist/libsanitizer/lsan/lsan_allocator.h
cvs rdiff -u -r1.10 -r1.11 \
src/external/gpl3/gcc/usr.bin/gcc/arch/ia64/defs.mk

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



CVS commit: src/external/mit/xorg/server/xorg-server/hw/xfree86

2019-11-17 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Nov 18 01:14:03 UTC 2019

Modified Files:
src/external/mit/xorg/server/xorg-server/hw/xfree86: Makefile

Log Message:
build int10 on powerpc64 as well.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 \
src/external/mit/xorg/server/xorg-server/hw/xfree86/Makefile

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



CVS commit: src/external/mit/xorg/server/xorg-server/hw/xfree86

2019-11-17 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Mon Nov 18 01:14:03 UTC 2019

Modified Files:
src/external/mit/xorg/server/xorg-server/hw/xfree86: Makefile

Log Message:
build int10 on powerpc64 as well.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 \
src/external/mit/xorg/server/xorg-server/hw/xfree86/Makefile

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

Modified files:

Index: src/external/mit/xorg/server/xorg-server/hw/xfree86/Makefile
diff -u src/external/mit/xorg/server/xorg-server/hw/xfree86/Makefile:1.38 src/external/mit/xorg/server/xorg-server/hw/xfree86/Makefile:1.39
--- src/external/mit/xorg/server/xorg-server/hw/xfree86/Makefile:1.38	Tue Apr 16 21:20:51 2019
+++ src/external/mit/xorg/server/xorg-server/hw/xfree86/Makefile	Mon Nov 18 01:14:03 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.38 2019/04/16 21:20:51 mrg Exp $
+#	$NetBSD: Makefile,v 1.39 2019/11/18 01:14:03 mrg Exp $
 
 .include 
 
@@ -8,7 +8,7 @@ SUBDIR=		common ddc dixmods doc dri dri2
 		x86emu xf86config xkb \
 		drivers
 
-.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "powerpc"
+.if ${MACHINE_ARCH} == "i386" || ${MACHINE_ARCH} == "x86_64" || ${MACHINE_CPU} == "powerpc"
 SUBDIR+=	int10 
 .endif
 



CVS commit: src/sys/dev/pci/ixgbe

2019-11-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Nov 18 03:17:51 UTC 2019

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixv.c

Log Message:
 Print MAC address.

 XXX Should we move such type of printf() to ether_ifattach?


To generate a diff of this commit:
cvs rdiff -u -r1.215 -r1.216 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.140 -r1.141 src/sys/dev/pci/ixgbe/ixv.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/ixgbe/ixgbe.c
diff -u src/sys/dev/pci/ixgbe/ixgbe.c:1.215 src/sys/dev/pci/ixgbe/ixgbe.c:1.216
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.215	Sun Nov 10 21:16:36 2019
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Mon Nov 18 03:17:51 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.215 2019/11/10 21:16:36 chs Exp $ */
+/* $NetBSD: ixgbe.c,v 1.216 2019/11/18 03:17:51 msaitoh Exp $ */
 
 /**
 
@@ -1333,6 +1333,8 @@ ixgbe_setup_interface(device_t dev, stru
 	}
 	adapter->ipq = if_percpuq_create(&adapter->osdep.ec.ec_if);
 	ether_ifattach(ifp, adapter->hw.mac.addr);
+	aprint_normal_dev(dev, "Ethernet address %s\n",
+	ether_sprintf(adapter->hw.mac.addr));
 	/*
 	 * We use per TX queue softint, so if_deferred_start_init() isn't
 	 * used.

Index: src/sys/dev/pci/ixgbe/ixv.c
diff -u src/sys/dev/pci/ixgbe/ixv.c:1.140 src/sys/dev/pci/ixgbe/ixv.c:1.141
--- src/sys/dev/pci/ixgbe/ixv.c:1.140	Wed Nov  6 04:17:16 2019
+++ src/sys/dev/pci/ixgbe/ixv.c	Mon Nov 18 03:17:51 2019
@@ -1,4 +1,4 @@
-/*$NetBSD: ixv.c,v 1.140 2019/11/06 04:17:16 msaitoh Exp $*/
+/*$NetBSD: ixv.c,v 1.141 2019/11/18 03:17:51 msaitoh Exp $*/
 
 /**
 
@@ -1610,6 +1610,8 @@ ixv_setup_interface(device_t dev, struct
 	}
 	adapter->ipq = if_percpuq_create(&adapter->osdep.ec.ec_if);
 	ether_ifattach(ifp, adapter->hw.mac.addr);
+	aprint_normal_dev(dev, "Ethernet address %s\n",
+	ether_sprintf(adapter->hw.mac.addr));
 	/*
 	 * We use per TX queue softint, so if_deferred_start_init() isn't
 	 * used.



CVS commit: src/sys/dev/pci/ixgbe

2019-11-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Mon Nov 18 03:17:51 UTC 2019

Modified Files:
src/sys/dev/pci/ixgbe: ixgbe.c ixv.c

Log Message:
 Print MAC address.

 XXX Should we move such type of printf() to ether_ifattach?


To generate a diff of this commit:
cvs rdiff -u -r1.215 -r1.216 src/sys/dev/pci/ixgbe/ixgbe.c
cvs rdiff -u -r1.140 -r1.141 src/sys/dev/pci/ixgbe/ixv.c

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



CVS commit: src/sys/compat/netbsd32

2019-11-17 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov 18 04:09:53 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32.h netbsd32_conv.h netbsd32_ioctl.c
netbsd32_ioctl.h netbsd32_signal.c

Log Message:
Belatedly catch up with kern_sig.c rev 1.358:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/kern_sig.c#rev1.358

Provide syscall information with SIGTRAP TRAP_SCE/TRAP_SCX so that
picotrace/truss, for example, works fine on COMPAT_NETBSD32.

With some minor changes:

- Centralize netbsd32_si{,32}_si{32,}() into netbsd32_ksi{,32}_ksi{32,}().
- Provide si_status with SIGCHLD.
- Remove the remaining of SA.

XXX
pullup to netbsd-9


To generate a diff of this commit:
cvs rdiff -u -r1.128 -r1.129 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.40 -r1.41 src/sys/compat/netbsd32/netbsd32_conv.h
cvs rdiff -u -r1.104 -r1.105 src/sys/compat/netbsd32/netbsd32_ioctl.c
cvs rdiff -u -r1.68 -r1.69 src/sys/compat/netbsd32/netbsd32_ioctl.h
cvs rdiff -u -r1.45 -r1.46 src/sys/compat/netbsd32/netbsd32_signal.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/compat/netbsd32/netbsd32.h
diff -u src/sys/compat/netbsd32/netbsd32.h:1.128 src/sys/compat/netbsd32/netbsd32.h:1.129
--- src/sys/compat/netbsd32/netbsd32.h:1.128	Thu Nov  7 15:21:55 2019
+++ src/sys/compat/netbsd32/netbsd32.h	Mon Nov 18 04:09:53 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32.h,v 1.128 2019/11/07 15:21:55 rin Exp $	*/
+/*	$NetBSD: netbsd32.h,v 1.129 2019/11/18 04:09:53 rin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008, 2015 Matthew R. Green
@@ -37,6 +37,7 @@
  */
 
 #include  /* precautionary upon removal from ucred.h */
+#include 
 #include 
 #include 
 #include 
@@ -72,7 +73,11 @@ typedef int32_t netbsd32_key_t;
 typedef int32_t netbsd32_intptr_t;
 typedef uint32_t netbsd32_uintptr_t;
 
-/* netbsd32_[u]int64 are machine dependent and defined below */
+/*
+ * netbsd32_[u]int64 are machine dependent and defined in :
+ * 64 bit integers only have 4-byte alignment on some 32 bit ports,
+ * but always have 8-byte alignment on 64 bit systems.
+ */
 
 /*
  * machine dependant section; must define:
@@ -154,15 +159,6 @@ netbsd32_ptr32_incr(netbsd32_pointer_t *
 #undef NETBSD32_POINTER_TYPE
 
 /*
- * 64 bit integers only have 4-byte alignment on some 32 bit ports,
- * but always have 8-byte alignment on 64 bit systems.
- * NETBSD32_INT64_ALIGN may be __attribute__((__aligned__(4)))
- */
-typedef int64_t netbsd32_int64 NETBSD32_INT64_ALIGN;
-typedef uint64_t netbsd32_uint64 NETBSD32_INT64_ALIGN;
-#undef NETBSD32_INT64_ALIGN
-
-/*
  * all pointers are netbsd32_pointer_t (defined in )
  */
 
@@ -212,14 +208,13 @@ struct netbsd32_iovec {
 
 /* from  */
 typedef int32_t netbsd32_timer_t;
-typedef	int32_t netbsd32_time50_t;
 typedef	netbsd32_int64 netbsd32_time_t;
 typedef netbsd32_pointer_t netbsd32_timerp_t;
 typedef netbsd32_pointer_t netbsd32_clockidp_t;
 
 typedef netbsd32_pointer_t netbsd32_timespec50p_t;
 struct netbsd32_timespec50 {
-	netbsd32_time50_t tv_sec;			/* seconds */
+	int32_t		tv_sec;			/* seconds */
 	netbsd32_long	tv_nsec;	/* and nanoseconds */
 };
 
@@ -231,7 +226,7 @@ struct netbsd32_timespec {
 
 typedef netbsd32_pointer_t netbsd32_timeval50p_t;
 struct netbsd32_timeval50 {
-	netbsd32_time50_t	tv_sec;		/* seconds */
+	netbsd32_long		tv_sec;		/* seconds */
 	netbsd32_long		tv_usec;	/* and microseconds */
 };
 

Index: src/sys/compat/netbsd32/netbsd32_conv.h
diff -u src/sys/compat/netbsd32/netbsd32_conv.h:1.40 src/sys/compat/netbsd32/netbsd32_conv.h:1.41
--- src/sys/compat/netbsd32/netbsd32_conv.h:1.40	Thu Oct  3 22:16:53 2019
+++ src/sys/compat/netbsd32/netbsd32_conv.h	Mon Nov 18 04:09:53 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_conv.h,v 1.40 2019/10/03 22:16:53 kamil Exp $	*/
+/*	$NetBSD: netbsd32_conv.h,v 1.41 2019/11/18 04:09:53 rin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -58,7 +58,7 @@ netbsd32_from_timeval50(const struct tim
 struct netbsd32_timeval50 *tv32)
 {
 
-	tv32->tv_sec = (netbsd32_time50_t)tv->tv_sec;
+	tv32->tv_sec = (netbsd32_long)tv->tv_sec;
 	tv32->tv_usec = (netbsd32_long)tv->tv_usec;
 }
 
@@ -152,7 +152,7 @@ netbsd32_from_timespec50(const struct ti
 struct netbsd32_timespec50 *s32p)
 {
 
-	s32p->tv_sec = (netbsd32_time50_t)p->tv_sec;
+	s32p->tv_sec = (int32_t)p->tv_sec;
 	s32p->tv_nsec = (netbsd32_long)p->tv_nsec;
 }
 

Index: src/sys/compat/netbsd32/netbsd32_ioctl.c
diff -u src/sys/compat/netbsd32/netbsd32_ioctl.c:1.104 src/sys/compat/netbsd32/netbsd32_ioctl.c:1.105
--- src/sys/compat/netbsd32/netbsd32_ioctl.c:1.104	Tue Aug 20 09:32:21 2019
+++ src/sys/compat/netbsd32/netbsd32_ioctl.c	Mon Nov 18 04:09:53 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_ioctl.c,v 1.104 2019/08/20 09:32:21 christos Exp $	*/
+/*	$NetBSD: netbsd32_ioctl.c,v 1.105 2019/11/18 04:09:53 rin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -31,7 +31,7 @@
  */
 
 #include 
-_

CVS commit: src/sys/compat/netbsd32

2019-11-17 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov 18 04:09:53 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32.h netbsd32_conv.h netbsd32_ioctl.c
netbsd32_ioctl.h netbsd32_signal.c

Log Message:
Belatedly catch up with kern_sig.c rev 1.358:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/kern/kern_sig.c#rev1.358

Provide syscall information with SIGTRAP TRAP_SCE/TRAP_SCX so that
picotrace/truss, for example, works fine on COMPAT_NETBSD32.

With some minor changes:

- Centralize netbsd32_si{,32}_si{32,}() into netbsd32_ksi{,32}_ksi{32,}().
- Provide si_status with SIGCHLD.
- Remove the remaining of SA.

XXX
pullup to netbsd-9


To generate a diff of this commit:
cvs rdiff -u -r1.128 -r1.129 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.40 -r1.41 src/sys/compat/netbsd32/netbsd32_conv.h
cvs rdiff -u -r1.104 -r1.105 src/sys/compat/netbsd32/netbsd32_ioctl.c
cvs rdiff -u -r1.68 -r1.69 src/sys/compat/netbsd32/netbsd32_ioctl.h
cvs rdiff -u -r1.45 -r1.46 src/sys/compat/netbsd32/netbsd32_signal.c

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



CVS commit: src/sys/compat/netbsd32

2019-11-17 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov 18 04:17:08 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32.h netbsd32_conv.h netbsd32_ioctl.c
netbsd32_ioctl.h

Log Message:
Sorry, revert unintentional parts of the previous commit:
http://mail-index.netbsd.org/source-changes/2019/11/18/msg110946.html

I was going to commit only netbsd32_signal.c.


To generate a diff of this commit:
cvs rdiff -u -r1.129 -r1.130 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.41 -r1.42 src/sys/compat/netbsd32/netbsd32_conv.h
cvs rdiff -u -r1.105 -r1.106 src/sys/compat/netbsd32/netbsd32_ioctl.c
cvs rdiff -u -r1.69 -r1.70 src/sys/compat/netbsd32/netbsd32_ioctl.h

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



CVS commit: src/sys/compat/netbsd32

2019-11-17 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov 18 04:17:08 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32.h netbsd32_conv.h netbsd32_ioctl.c
netbsd32_ioctl.h

Log Message:
Sorry, revert unintentional parts of the previous commit:
http://mail-index.netbsd.org/source-changes/2019/11/18/msg110946.html

I was going to commit only netbsd32_signal.c.


To generate a diff of this commit:
cvs rdiff -u -r1.129 -r1.130 src/sys/compat/netbsd32/netbsd32.h
cvs rdiff -u -r1.41 -r1.42 src/sys/compat/netbsd32/netbsd32_conv.h
cvs rdiff -u -r1.105 -r1.106 src/sys/compat/netbsd32/netbsd32_ioctl.c
cvs rdiff -u -r1.69 -r1.70 src/sys/compat/netbsd32/netbsd32_ioctl.h

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

Modified files:

Index: src/sys/compat/netbsd32/netbsd32.h
diff -u src/sys/compat/netbsd32/netbsd32.h:1.129 src/sys/compat/netbsd32/netbsd32.h:1.130
--- src/sys/compat/netbsd32/netbsd32.h:1.129	Mon Nov 18 04:09:53 2019
+++ src/sys/compat/netbsd32/netbsd32.h	Mon Nov 18 04:17:08 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32.h,v 1.129 2019/11/18 04:09:53 rin Exp $	*/
+/*	$NetBSD: netbsd32.h,v 1.130 2019/11/18 04:17:08 rin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001, 2008, 2015 Matthew R. Green
@@ -37,7 +37,6 @@
  */
 
 #include  /* precautionary upon removal from ucred.h */
-#include 
 #include 
 #include 
 #include 
@@ -73,11 +72,7 @@ typedef int32_t netbsd32_key_t;
 typedef int32_t netbsd32_intptr_t;
 typedef uint32_t netbsd32_uintptr_t;
 
-/*
- * netbsd32_[u]int64 are machine dependent and defined in :
- * 64 bit integers only have 4-byte alignment on some 32 bit ports,
- * but always have 8-byte alignment on 64 bit systems.
- */
+/* netbsd32_[u]int64 are machine dependent and defined below */
 
 /*
  * machine dependant section; must define:
@@ -159,6 +154,15 @@ netbsd32_ptr32_incr(netbsd32_pointer_t *
 #undef NETBSD32_POINTER_TYPE
 
 /*
+ * 64 bit integers only have 4-byte alignment on some 32 bit ports,
+ * but always have 8-byte alignment on 64 bit systems.
+ * NETBSD32_INT64_ALIGN may be __attribute__((__aligned__(4)))
+ */
+typedef int64_t netbsd32_int64 NETBSD32_INT64_ALIGN;
+typedef uint64_t netbsd32_uint64 NETBSD32_INT64_ALIGN;
+#undef NETBSD32_INT64_ALIGN
+
+/*
  * all pointers are netbsd32_pointer_t (defined in )
  */
 
@@ -208,13 +212,14 @@ struct netbsd32_iovec {
 
 /* from  */
 typedef int32_t netbsd32_timer_t;
+typedef	int32_t netbsd32_time50_t;
 typedef	netbsd32_int64 netbsd32_time_t;
 typedef netbsd32_pointer_t netbsd32_timerp_t;
 typedef netbsd32_pointer_t netbsd32_clockidp_t;
 
 typedef netbsd32_pointer_t netbsd32_timespec50p_t;
 struct netbsd32_timespec50 {
-	int32_t		tv_sec;			/* seconds */
+	netbsd32_time50_t tv_sec;			/* seconds */
 	netbsd32_long	tv_nsec;	/* and nanoseconds */
 };
 
@@ -226,7 +231,7 @@ struct netbsd32_timespec {
 
 typedef netbsd32_pointer_t netbsd32_timeval50p_t;
 struct netbsd32_timeval50 {
-	netbsd32_long		tv_sec;		/* seconds */
+	netbsd32_time50_t	tv_sec;		/* seconds */
 	netbsd32_long		tv_usec;	/* and microseconds */
 };
 

Index: src/sys/compat/netbsd32/netbsd32_conv.h
diff -u src/sys/compat/netbsd32/netbsd32_conv.h:1.41 src/sys/compat/netbsd32/netbsd32_conv.h:1.42
--- src/sys/compat/netbsd32/netbsd32_conv.h:1.41	Mon Nov 18 04:09:53 2019
+++ src/sys/compat/netbsd32/netbsd32_conv.h	Mon Nov 18 04:17:08 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_conv.h,v 1.41 2019/11/18 04:09:53 rin Exp $	*/
+/*	$NetBSD: netbsd32_conv.h,v 1.42 2019/11/18 04:17:08 rin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -58,7 +58,7 @@ netbsd32_from_timeval50(const struct tim
 struct netbsd32_timeval50 *tv32)
 {
 
-	tv32->tv_sec = (netbsd32_long)tv->tv_sec;
+	tv32->tv_sec = (netbsd32_time50_t)tv->tv_sec;
 	tv32->tv_usec = (netbsd32_long)tv->tv_usec;
 }
 
@@ -152,7 +152,7 @@ netbsd32_from_timespec50(const struct ti
 struct netbsd32_timespec50 *s32p)
 {
 
-	s32p->tv_sec = (int32_t)p->tv_sec;
+	s32p->tv_sec = (netbsd32_time50_t)p->tv_sec;
 	s32p->tv_nsec = (netbsd32_long)p->tv_nsec;
 }
 

Index: src/sys/compat/netbsd32/netbsd32_ioctl.c
diff -u src/sys/compat/netbsd32/netbsd32_ioctl.c:1.105 src/sys/compat/netbsd32/netbsd32_ioctl.c:1.106
--- src/sys/compat/netbsd32/netbsd32_ioctl.c:1.105	Mon Nov 18 04:09:53 2019
+++ src/sys/compat/netbsd32/netbsd32_ioctl.c	Mon Nov 18 04:17:08 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_ioctl.c,v 1.105 2019/11/18 04:09:53 rin Exp $	*/
+/*	$NetBSD: netbsd32_ioctl.c,v 1.106 2019/11/18 04:17:08 rin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.105 2019/11/18 04:09:53 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_ioctl.c,v 1.106 2019/11/18 04:17:08 rin Exp $");
 
 #if defined(_KERNEL_OPT)
 #include "opt_ntp.h"
@@ -1066,30 +1066,6 @@ netbsd32_do_clockctl_ntp_adjtime(struct 
 }
 #endif
 
-#ifdef COMPAT_50
-static void
-netbsd32_ioctl_to_time

CVS commit: src/sys/dev/hyperv

2019-11-17 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Mon Nov 18 04:38:48 UTC 2019

Modified Files:
src/sys/dev/hyperv: if_hvn.c

Log Message:
Fixed incorrect m_defrag return value check.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/hyperv/if_hvn.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/hyperv

2019-11-17 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Mon Nov 18 04:38:48 UTC 2019

Modified Files:
src/sys/dev/hyperv: if_hvn.c

Log Message:
Fixed incorrect m_defrag return value check.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/dev/hyperv/if_hvn.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/hyperv/if_hvn.c
diff -u src/sys/dev/hyperv/if_hvn.c:1.6 src/sys/dev/hyperv/if_hvn.c:1.7
--- src/sys/dev/hyperv/if_hvn.c:1.6	Fri Nov 15 08:51:27 2019
+++ src/sys/dev/hyperv/if_hvn.c	Mon Nov 18 04:38:48 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_hvn.c,v 1.6 2019/11/15 08:51:27 nonaka Exp $	*/
+/*	$NetBSD: if_hvn.c,v 1.7 2019/11/18 04:38:48 nonaka Exp $	*/
 /*	$OpenBSD: if_hvn.c,v 1.39 2018/03/11 14:31:34 mikeb Exp $	*/
 
 /*-
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.6 2019/11/15 08:51:27 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_hvn.c,v 1.7 2019/11/18 04:38:48 nonaka Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -565,7 +565,7 @@ hvn_encap(struct hvn_softc *sc, struct m
 	case 0:
 		break;
 	case EFBIG:
-		if (m_defrag(m, M_NOWAIT) == 0 &&
+		if (m_defrag(m, M_NOWAIT) != NULL &&
 		bus_dmamap_load_mbuf(sc->sc_dmat, txd->txd_dmap, m,
 		  BUS_DMA_READ | BUS_DMA_NOWAIT) == 0)
 			break;



CVS commit: src/sys/dev/pci

2019-11-17 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Mon Nov 18 04:40:05 UTC 2019

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

Log Message:
Fixed incorrect m_defrag return value check.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/if_mcx.c

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

Modified files:

Index: src/sys/dev/pci/if_mcx.c
diff -u src/sys/dev/pci/if_mcx.c:1.5 src/sys/dev/pci/if_mcx.c:1.6
--- src/sys/dev/pci/if_mcx.c:1.5	Thu Oct 17 15:57:56 2019
+++ src/sys/dev/pci/if_mcx.c	Mon Nov 18 04:40:05 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_mcx.c,v 1.5 2019/10/17 15:57:56 msaitoh Exp $ */
+/*	$NetBSD: if_mcx.c,v 1.6 2019/11/18 04:40:05 nonaka Exp $ */
 /*	$OpenBSD: if_mcx.c,v 1.33 2019/09/12 04:23:59 jmatthew Exp $ */
 
 /*
@@ -6347,7 +6347,7 @@ mcx_load_mbuf(struct mcx_softc *sc, stru
 		break;
 
 	case EFBIG:
-		if (m_defrag(m, M_DONTWAIT) == 0 &&
+		if (m_defrag(m, M_DONTWAIT) != NULL &&
 		bus_dmamap_load_mbuf(sc->sc_dmat, ms->ms_map, m,
 		BUS_DMA_STREAMING | BUS_DMA_NOWAIT) == 0)
 			break;



CVS commit: src/sys/dev/pci

2019-11-17 Thread NONAKA Kimihiro
Module Name:src
Committed By:   nonaka
Date:   Mon Nov 18 04:40:05 UTC 2019

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

Log Message:
Fixed incorrect m_defrag return value check.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/if_mcx.c

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



CVS commit: src/sys/compat/netbsd32

2019-11-17 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov 18 04:58:42 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32_signal.c

Log Message:
Sort by signal numbers as far as possible, adjust locations of functions.
No functional changes intended.

XXX
pullup to netbsd-9


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/compat/netbsd32/netbsd32_signal.c

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



CVS commit: src/sys/compat/netbsd32

2019-11-17 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Nov 18 04:58:42 UTC 2019

Modified Files:
src/sys/compat/netbsd32: netbsd32_signal.c

Log Message:
Sort by signal numbers as far as possible, adjust locations of functions.
No functional changes intended.

XXX
pullup to netbsd-9


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/compat/netbsd32/netbsd32_signal.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/compat/netbsd32/netbsd32_signal.c
diff -u src/sys/compat/netbsd32/netbsd32_signal.c:1.46 src/sys/compat/netbsd32/netbsd32_signal.c:1.47
--- src/sys/compat/netbsd32/netbsd32_signal.c:1.46	Mon Nov 18 04:09:53 2019
+++ src/sys/compat/netbsd32/netbsd32_signal.c	Mon Nov 18 04:58:42 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: netbsd32_signal.c,v 1.46 2019/11/18 04:09:53 rin Exp $	*/
+/*	$NetBSD: netbsd32_signal.c,v 1.47 2019/11/18 04:58:42 rin Exp $	*/
 
 /*
  * Copyright (c) 1998, 2001 Matthew R. Green
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: netbsd32_signal.c,v 1.46 2019/11/18 04:09:53 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: netbsd32_signal.c,v 1.47 2019/11/18 04:58:42 rin Exp $");
 
 #if defined(_KERNEL_OPT) 
 #include "opt_ktrace.h"
@@ -197,9 +197,9 @@ netbsd32_ksi32_to_ksi(struct _ksiginfo *
 
 	switch (si32->_signo) {
 	case SIGILL:
+	case SIGFPE:
 	case SIGBUS:
 	case SIGSEGV:
-	case SIGFPE:
 fill_fault:
 		si->_reason._fault._addr =
 		NETBSD32IPTR64(si32->_reason._fault._addr);
@@ -227,6 +227,11 @@ fill_fault:
 		si->_reason._rt._value.sival_int =
 		si32->_reason._rt._value.sival_int;
 		break;
+	case SIGURG:
+	case SIGIO:
+		si->_reason._poll._band = si32->_reason._poll._band;
+		si->_reason._poll._fd = si32->_reason._poll._fd;
+		break;
 	case SIGCHLD:
 		si->_reason._child._pid = si32->_reason._child._pid;
 		si->_reason._child._uid = si32->_reason._child._uid;
@@ -234,14 +239,17 @@ fill_fault:
 		si->_reason._child._utime = si32->_reason._child._utime;
 		si->_reason._child._stime = si32->_reason._child._stime;
 		break;
-	case SIGURG:
-	case SIGIO:
-		si->_reason._poll._band = si32->_reason._poll._band;
-		si->_reason._poll._fd = si32->_reason._poll._fd;
-		break;
 	}
 }
 
+void
+netbsd32_si32_to_si(siginfo_t *si, const siginfo32_t *si32)
+{
+
+	memset(si, 0, sizeof (*si));
+	netbsd32_ksi32_to_ksi(&si->_info, &si32->_info);
+}
+
 static void
 netbsd32_ksi_to_ksi32(struct __ksiginfo32 *si32, const struct _ksiginfo *si)
 {
@@ -254,9 +262,9 @@ netbsd32_ksi_to_ksi32(struct __ksiginfo3
 
 	switch (si->_signo) {
 	case SIGILL:
+	case SIGFPE:
 	case SIGBUS:
 	case SIGSEGV:
-	case SIGFPE:
 fill_fault:
 		si32->_reason._fault._addr =
 		NETBSD32PTR32I(si->_reason._fault._addr);
@@ -284,6 +292,11 @@ fill_fault:
 		si32->_reason._rt._value.sival_int =
 		si->_reason._rt._value.sival_int;
 		break;
+	case SIGURG:
+	case SIGIO:
+		si32->_reason._poll._band = si->_reason._poll._band;
+		si32->_reason._poll._fd = si->_reason._poll._fd;
+		break;
 	case SIGCHLD:
 		si32->_reason._child._pid = si->_reason._child._pid;
 		si32->_reason._child._uid = si->_reason._child._uid;
@@ -291,11 +304,6 @@ fill_fault:
 		si32->_reason._child._utime = si->_reason._child._utime;
 		si32->_reason._child._stime = si->_reason._child._stime;
 		break;
-	case SIGURG:
-	case SIGIO:
-		si32->_reason._poll._band = si->_reason._poll._band;
-		si32->_reason._poll._fd = si->_reason._poll._fd;
-		break;
 	}
 }
 
@@ -308,14 +316,6 @@ netbsd32_si_to_si32(siginfo32_t *si32, c
 }
 
 void
-netbsd32_si32_to_si(siginfo_t *si, const siginfo32_t *si32)
-{
-
-	memset(si, 0, sizeof (*si));
-	netbsd32_ksi32_to_ksi(&si->_info, &si32->_info);
-}
-
-void
 getucontext32(struct lwp *l, ucontext32_t *ucp)
 {
 	struct proc *p = l->l_proc;



CVS commit: src/share/man/man4

2019-11-17 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Mon Nov 18 05:01:36 UTC 2019

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

Log Message:
re.4: msaitoh@ added the NCube vendor ID that identifies the TP-Link
TG-3468 v2 as well.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/share/man/man4/re.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/re.4
diff -u src/share/man/man4/re.4:1.17 src/share/man/man4/re.4:1.18
--- src/share/man/man4/re.4:1.17	Sun Nov 10 23:14:16 2019
+++ src/share/man/man4/re.4	Mon Nov 18 05:01:36 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: re.4,v 1.17 2019/11/10 23:14:16 gutteridge Exp $
+.\"	$NetBSD: re.4,v 1.18 2019/11/18 05:01:36 gutteridge Exp $
 .\"
 .\" Copyright (c) 2003
 .\"	Bill Paul . All rights reserved.
@@ -32,7 +32,7 @@
 .\"
 .\" $FreeBSD: src/share/man/man4/re.4,v 1.4 2004/03/04 06:42:46 sanpei Exp $
 .\"
-.Dd November 10, 2019
+.Dd November 18, 2019
 .Dt RE 4
 .Os
 .Sh NAME
@@ -72,7 +72,7 @@ US Robotics (3Com) USR997902 Gigabit Eth
 .It
 Linksys EG1032 rev. 3 Gigabit Ethernet (8169S)
 .It
-TP-Link TG-3468 v3 Gigabit Ethernet (8168)
+TP-Link TG-3468 v2 & v3 Gigabit Ethernet (8168)
 .El
 .Pp
 NICs based on the 8139C+ are capable of 10 and 100Mbps speeds over



CVS commit: src/share/man/man4

2019-11-17 Thread David H. Gutteridge
Module Name:src
Committed By:   gutteridge
Date:   Mon Nov 18 05:01:36 UTC 2019

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

Log Message:
re.4: msaitoh@ added the NCube vendor ID that identifies the TP-Link
TG-3468 v2 as well.


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

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



Re: CVS commit: src/sys/dev/pci

2019-11-17 Thread maya
> Modified files:
> 
> Index: src/sys/dev/pci/if_mcx.c
> diff -u src/sys/dev/pci/if_mcx.c:1.5 src/sys/dev/pci/if_mcx.c:1.6
> --- src/sys/dev/pci/if_mcx.c:1.5  Thu Oct 17 15:57:56 2019
> +++ src/sys/dev/pci/if_mcx.c  Mon Nov 18 04:40:05 2019
> @@ -1,4 +1,4 @@
> -/*   $NetBSD: if_mcx.c,v 1.5 2019/10/17 15:57:56 msaitoh Exp $ */
> +/*   $NetBSD: if_mcx.c,v 1.6 2019/11/18 04:40:05 nonaka Exp $ */
>  /*   $OpenBSD: if_mcx.c,v 1.33 2019/09/12 04:23:59 jmatthew Exp $ */
>  
>  /*
> @@ -6347,7 +6347,7 @@ mcx_load_mbuf(struct mcx_softc *sc, stru
>   break;
>  
>   case EFBIG:
> - if (m_defrag(m, M_DONTWAIT) == 0 &&
> + if (m_defrag(m, M_DONTWAIT) != NULL &&
>   bus_dmamap_load_mbuf(sc->sc_dmat, ms->ms_map, m,
>   BUS_DMA_STREAMING | BUS_DMA_NOWAIT) == 0)
>   break;
> 

Is this one of those "m_defrag misbehaves because it will not turn it
into a chain of 1 packet, but 2"?

(I think this will not work)


Re: CVS commit: src/sys/dev/pci

2019-11-17 Thread maya
On Mon, Nov 18, 2019 at 06:15:27AM +, m...@netbsd.org wrote:
> > Modified files:
> > 
> > Index: src/sys/dev/pci/if_mcx.c
> > diff -u src/sys/dev/pci/if_mcx.c:1.5 src/sys/dev/pci/if_mcx.c:1.6
> > --- src/sys/dev/pci/if_mcx.c:1.5Thu Oct 17 15:57:56 2019
> > +++ src/sys/dev/pci/if_mcx.cMon Nov 18 04:40:05 2019
> > @@ -1,4 +1,4 @@
> > -/* $NetBSD: if_mcx.c,v 1.5 2019/10/17 15:57:56 msaitoh Exp $ */
> > +/* $NetBSD: if_mcx.c,v 1.6 2019/11/18 04:40:05 nonaka Exp $ */
> >  /* $OpenBSD: if_mcx.c,v 1.33 2019/09/12 04:23:59 jmatthew Exp $ */
> >  
> >  /*
> > @@ -6347,7 +6347,7 @@ mcx_load_mbuf(struct mcx_softc *sc, stru
> > break;
> >  
> > case EFBIG:
> > -   if (m_defrag(m, M_DONTWAIT) == 0 &&
> > +   if (m_defrag(m, M_DONTWAIT) != NULL &&
> > bus_dmamap_load_mbuf(sc->sc_dmat, ms->ms_map, m,
> > BUS_DMA_STREAMING | BUS_DMA_NOWAIT) == 0)
> > break;
> > 
> 
> Is this one of those "m_defrag misbehaves because it will not turn it
> into a chain of 1 packet, but 2"?
> 
> (I think this will not work)

Additional context:
http://mail-index.netbsd.org/tech-net/2018/09/01/msg007031.html


Re: CVS commit: src/sys/dev/pci

2019-11-17 Thread Kimihiro Nonaka
It only prevent null pointer dereference.

On Mon, Nov 18, 2019 at 3:18 PM  wrote:
>
> On Mon, Nov 18, 2019 at 06:15:27AM +, m...@netbsd.org wrote:
> > > Modified files:
> > >
> > > Index: src/sys/dev/pci/if_mcx.c
> > > diff -u src/sys/dev/pci/if_mcx.c:1.5 src/sys/dev/pci/if_mcx.c:1.6
> > > --- src/sys/dev/pci/if_mcx.c:1.5Thu Oct 17 15:57:56 2019
> > > +++ src/sys/dev/pci/if_mcx.cMon Nov 18 04:40:05 2019
> > > @@ -1,4 +1,4 @@
> > > -/* $NetBSD: if_mcx.c,v 1.5 2019/10/17 15:57:56 msaitoh Exp $ */
> > > +/* $NetBSD: if_mcx.c,v 1.6 2019/11/18 04:40:05 nonaka Exp $ */
> > >  /* $OpenBSD: if_mcx.c,v 1.33 2019/09/12 04:23:59 jmatthew Exp $ */
> > >
> > >  /*
> > > @@ -6347,7 +6347,7 @@ mcx_load_mbuf(struct mcx_softc *sc, stru
> > > break;
> > >
> > > case EFBIG:
> > > -   if (m_defrag(m, M_DONTWAIT) == 0 &&
> > > +   if (m_defrag(m, M_DONTWAIT) != NULL &&
> > > bus_dmamap_load_mbuf(sc->sc_dmat, ms->ms_map, m,
> > > BUS_DMA_STREAMING | BUS_DMA_NOWAIT) == 0)
> > > break;
> > >
> >
> > Is this one of those "m_defrag misbehaves because it will not turn it
> > into a chain of 1 packet, but 2"?
> >
> > (I think this will not work)
>
> Additional context:
> http://mail-index.netbsd.org/tech-net/2018/09/01/msg007031.html