CVS commit: src/sys/netinet6

2019-10-17 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Fri Oct 18 04:33:53 UTC 2019

Modified Files:
src/sys/netinet6: in6_ifattach.c in6_var.h ip6_input.c

Log Message:
in6: reset the temporary address timer on a change of the interval period


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/sys/netinet6/in6_ifattach.c
cvs rdiff -u -r1.101 -r1.102 src/sys/netinet6/in6_var.h
cvs rdiff -u -r1.213 -r1.214 src/sys/netinet6/ip6_input.c

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



CVS commit: src/sys/netinet6

2019-10-17 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Fri Oct 18 04:33:53 UTC 2019

Modified Files:
src/sys/netinet6: in6_ifattach.c in6_var.h ip6_input.c

Log Message:
in6: reset the temporary address timer on a change of the interval period


To generate a diff of this commit:
cvs rdiff -u -r1.116 -r1.117 src/sys/netinet6/in6_ifattach.c
cvs rdiff -u -r1.101 -r1.102 src/sys/netinet6/in6_var.h
cvs rdiff -u -r1.213 -r1.214 src/sys/netinet6/ip6_input.c

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

Modified files:

Index: src/sys/netinet6/in6_ifattach.c
diff -u src/sys/netinet6/in6_ifattach.c:1.116 src/sys/netinet6/in6_ifattach.c:1.117
--- src/sys/netinet6/in6_ifattach.c:1.116	Wed Oct 16 07:40:40 2019
+++ src/sys/netinet6/in6_ifattach.c	Fri Oct 18 04:33:53 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6_ifattach.c,v 1.116 2019/10/16 07:40:40 ozaki-r Exp $	*/
+/*	$NetBSD: in6_ifattach.c,v 1.117 2019/10/18 04:33:53 ozaki-r Exp $	*/
 /*	$KAME: in6_ifattach.c,v 1.124 2001/07/18 08:32:51 jinmei Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: in6_ifattach.c,v 1.116 2019/10/16 07:40:40 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: in6_ifattach.c,v 1.117 2019/10/18 04:33:53 ozaki-r Exp $");
 
 #include 
 #include 
@@ -75,7 +75,6 @@ static int get_ifid(struct ifnet *, stru
 static int in6_ifattach_linklocal(struct ifnet *, struct ifnet *);
 static int in6_ifattach_loopback(struct ifnet *);
 
-static void in6_tmpaddrtimer_schedule(void);
 static void in6_tmpaddrtimer(void *);
 
 #define EUI64_GBIT	0x01
@@ -861,7 +860,7 @@ in6_tmpaddrtimer_init(void)
 	in6_tmpaddrtimer_schedule();
 }
 
-static void
+void
 in6_tmpaddrtimer_schedule(void)
 {
 

Index: src/sys/netinet6/in6_var.h
diff -u src/sys/netinet6/in6_var.h:1.101 src/sys/netinet6/in6_var.h:1.102
--- src/sys/netinet6/in6_var.h:1.101	Wed Oct 16 07:40:40 2019
+++ src/sys/netinet6/in6_var.h	Fri Oct 18 04:33:53 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: in6_var.h,v 1.101 2019/10/16 07:40:40 ozaki-r Exp $	*/
+/*	$NetBSD: in6_var.h,v 1.102 2019/10/18 04:33:53 ozaki-r Exp $	*/
 /*	$KAME: in6_var.h,v 1.81 2002/06/08 11:16:51 itojun Exp $	*/
 
 /*
@@ -734,6 +734,8 @@ struct in6pcb;
 
 void	in6_sysctl_multicast_setup(struct sysctllog **);
 
+void	in6_tmpaddrtimer_schedule(void);
+
 #endif /* _KERNEL */
 
 #endif /* !_NETINET6_IN6_VAR_H_ */

Index: src/sys/netinet6/ip6_input.c
diff -u src/sys/netinet6/ip6_input.c:1.213 src/sys/netinet6/ip6_input.c:1.214
--- src/sys/netinet6/ip6_input.c:1.213	Wed Oct 16 07:41:28 2019
+++ src/sys/netinet6/ip6_input.c	Fri Oct 18 04:33:53 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: ip6_input.c,v 1.213 2019/10/16 07:41:28 ozaki-r Exp $	*/
+/*	$NetBSD: ip6_input.c,v 1.214 2019/10/18 04:33:53 ozaki-r Exp $	*/
 /*	$KAME: ip6_input.c,v 1.188 2001/03/29 05:34:31 itojun Exp $	*/
 
 /*
@@ -62,7 +62,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.213 2019/10/16 07:41:28 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip6_input.c,v 1.214 2019/10/18 04:33:53 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_gateway.h"
@@ -1550,6 +1550,8 @@ sysctl_net_inet6_ip6_temppltime(SYSCTLFN
 
 	ip6_temp_preferred_lifetime = pltime;
 
+	in6_tmpaddrtimer_schedule();
+
 	return 0;
 }
 



CVS commit: src/sys/arch/i386/stand/pxeboot

2019-10-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct 18 04:13:56 UTC 2019

Modified Files:
src/sys/arch/i386/stand/pxeboot: pxe.h

Log Message:
 Fix typos.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/i386/stand/pxeboot/pxe.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/i386/stand/pxeboot

2019-10-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct 18 04:13:56 UTC 2019

Modified Files:
src/sys/arch/i386/stand/pxeboot: pxe.h

Log Message:
 Fix typos.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/i386/stand/pxeboot/pxe.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/i386/stand/pxeboot/pxe.h
diff -u src/sys/arch/i386/stand/pxeboot/pxe.h:1.7 src/sys/arch/i386/stand/pxeboot/pxe.h:1.8
--- src/sys/arch/i386/stand/pxeboot/pxe.h:1.7	Tue May 28 08:59:34 2019
+++ src/sys/arch/i386/stand/pxeboot/pxe.h	Fri Oct 18 04:13:56 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pxe.h,v 1.7 2019/05/28 08:59:34 msaitoh Exp $	*/
+/*	$NetBSD: pxe.h,v 1.8 2019/10/18 04:13:56 msaitoh Exp $	*/
 
 /*
  * Copyright (c) 2000 Alfred Perlstein 
@@ -140,7 +140,7 @@ typedef struct {
 	ADDR32_t	ProtocolIni;	/* Phys addr of a copy of the
 	   driver module */
 	uint8_t		reserved[8];
-} __packed t_PXENV_UNDI_INITALIZE;
+} __packed t_PXENV_UNDI_INITIALIZE;
 
 
 #define	MAXNUM_MCADDR		8
@@ -219,7 +219,7 @@ typedef struct {
 #define	PXENV_UNDI_SET_STATION_ADDRESS	0x000A
 typedef struct {
 	PXENV_STATUS_t	Status;
-	MAC_ADDR	StationAddress;		/* Temp MAC addres to use */
+	MAC_ADDR	StationAddress;		/* Temp MAC address to use */
 } __packed t_PXENV_UNDI_SET_STATION_ADDR;
 
 #define	PXENV_UNDI_SET_PACKET_FILTER	0x000B
@@ -345,7 +345,7 @@ typedef struct {
 #	define PXENV_UNDI_ISR_OUT_NOT_OUTS	1
 
 	/*
-	 * one of these will bre returnd for PXEND_UNDI_ISR_IN_PROCESS
+	 * one of these will be returned for PXEND_UNDI_ISR_IN_PROCESS
 	 * and PXENV_UNDI_ISR_IN_GET_NEXT
 	 */
 #	define PXENV_UNDI_ISR_OUT_DONE		0



CVS commit: src

2019-10-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct 18 04:09:03 UTC 2019

Modified Files:
src/sys/arch/arm/imx: imx23_clkctrl.c imx23_digctl.c imx23_pinctrl.c
imx23_rtc.c
src/sys/arch/pmax/ibus: pm.c
src/sys/arch/sparc/dev: ebus.c
src/sys/dev/audio: audio.c
src/sys/dev/ic: icp.c
src/sys/dev/pci: if_bce.c if_ena.c
src/sys/netinet: ip_id.c
src/sys/netinet6: ip6_id.c
src/sys/nfs: nfs_node.c
src/usr.sbin/makefs: cd9660.c

Log Message:
 s/initalize/initialize/ in comment or printf message.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/imx23_clkctrl.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/imx23_digctl.c \
src/sys/arch/arm/imx/imx23_pinctrl.c src/sys/arch/arm/imx/imx23_rtc.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/pmax/ibus/pm.c
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/sparc/dev/ebus.c
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/audio/audio.c
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/ic/icp.c
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/pci/if_bce.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/pci/if_ena.c
cvs rdiff -u -r1.15 -r1.16 src/sys/netinet/ip_id.c
cvs rdiff -u -r1.18 -r1.19 src/sys/netinet6/ip6_id.c
cvs rdiff -u -r1.123 -r1.124 src/sys/nfs/nfs_node.c
cvs rdiff -u -r1.55 -r1.56 src/usr.sbin/makefs/cd9660.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/imx/imx23_clkctrl.c
diff -u src/sys/arch/arm/imx/imx23_clkctrl.c:1.2 src/sys/arch/arm/imx/imx23_clkctrl.c:1.3
--- src/sys/arch/arm/imx/imx23_clkctrl.c:1.2	Sat Jan 10 12:13:56 2015
+++ src/sys/arch/arm/imx/imx23_clkctrl.c	Fri Oct 18 04:09:01 2019
@@ -1,4 +1,4 @@
-/* $Id: imx23_clkctrl.c,v 1.2 2015/01/10 12:13:56 jmcneill Exp $ */
+/* $Id: imx23_clkctrl.c,v 1.3 2019/10/18 04:09:01 msaitoh Exp $ */
 
 /*
 * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -140,7 +140,7 @@ clkctrl_en_usb(void)
 	struct clkctrl_softc *sc = _sc;
 
 if (sc == NULL) {
-aprint_error("clkctrl is not initalized");
+aprint_error("clkctrl is not initialized");
 return;
 }
 
@@ -160,7 +160,7 @@ clkctrl_en_filtclk(void)
 	struct clkctrl_softc *sc = _sc;
 
 	if (sc == NULL) {
-		aprint_error("clkctrl is not initalized");
+		aprint_error("clkctrl is not initialized");
 		return;
 	}
 

Index: src/sys/arch/arm/imx/imx23_digctl.c
diff -u src/sys/arch/arm/imx/imx23_digctl.c:1.1 src/sys/arch/arm/imx/imx23_digctl.c:1.2
--- src/sys/arch/arm/imx/imx23_digctl.c:1.1	Mon Oct  7 17:36:40 2013
+++ src/sys/arch/arm/imx/imx23_digctl.c	Fri Oct 18 04:09:01 2019
@@ -1,4 +1,4 @@
-/* $Id: imx23_digctl.c,v 1.1 2013/10/07 17:36:40 matt Exp $ */
+/* $Id: imx23_digctl.c,v 1.2 2019/10/18 04:09:01 msaitoh Exp $ */
 
 /*
 * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -167,7 +167,7 @@ digctl_usb_clkgate(int value)
 	struct digctl_softc *sc = _sc;
 
 	if (sc == NULL) {
-		aprint_error("digctl is not initalized");
+		aprint_error("digctl is not initialized");
 		return;
 	}
 
Index: src/sys/arch/arm/imx/imx23_pinctrl.c
diff -u src/sys/arch/arm/imx/imx23_pinctrl.c:1.1 src/sys/arch/arm/imx/imx23_pinctrl.c:1.2
--- src/sys/arch/arm/imx/imx23_pinctrl.c:1.1	Mon Oct  7 17:36:40 2013
+++ src/sys/arch/arm/imx/imx23_pinctrl.c	Fri Oct 18 04:09:01 2019
@@ -1,4 +1,4 @@
-/* $Id: imx23_pinctrl.c,v 1.1 2013/10/07 17:36:40 matt Exp $ */
+/* $Id: imx23_pinctrl.c,v 1.2 2019/10/18 04:09:01 msaitoh Exp $ */
 
 /*
 * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -504,7 +504,7 @@ pinctrl_en_usb(void)
 	struct pinctrl_softc *sc = _sc;
 
 if (sc == NULL) {
-aprint_error("pinctrl is not initalized");
+aprint_error("pinctrl is not initialized");
 return;
 }
 
Index: src/sys/arch/arm/imx/imx23_rtc.c
diff -u src/sys/arch/arm/imx/imx23_rtc.c:1.1 src/sys/arch/arm/imx/imx23_rtc.c:1.2
--- src/sys/arch/arm/imx/imx23_rtc.c:1.1	Sat Jan 10 12:16:28 2015
+++ src/sys/arch/arm/imx/imx23_rtc.c	Fri Oct 18 04:09:01 2019
@@ -1,4 +1,4 @@
-/* $Id: imx23_rtc.c,v 1.1 2015/01/10 12:16:28 jmcneill Exp $ */
+/* $Id: imx23_rtc.c,v 1.2 2019/10/18 04:09:01 msaitoh Exp $ */
 
 /*
 * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -141,7 +141,7 @@ rtc_release_gnd(int val)
 	struct rtc_softc *sc = _sc;
 
 if (sc == NULL) {
-aprint_error("rtc is not initalized");
+aprint_error("rtc is not initialized");
 return;
 }
 	if(val)

Index: src/sys/arch/pmax/ibus/pm.c
diff -u src/sys/arch/pmax/ibus/pm.c:1.15 src/sys/arch/pmax/ibus/pm.c:1.16
--- src/sys/arch/pmax/ibus/pm.c:1.15	Wed Jan 24 05:35:58 2018
+++ src/sys/arch/pmax/ibus/pm.c	Fri Oct 18 04:09:02 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: pm.c,v 1.15 2018/01/24 05:35:58 riastradh Exp $	*/
+/*	$NetBSD: pm.c,v 1.16 2019/10/18 04:09:02 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2003 The 

CVS commit: src

2019-10-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Fri Oct 18 04:09:03 UTC 2019

Modified Files:
src/sys/arch/arm/imx: imx23_clkctrl.c imx23_digctl.c imx23_pinctrl.c
imx23_rtc.c
src/sys/arch/pmax/ibus: pm.c
src/sys/arch/sparc/dev: ebus.c
src/sys/dev/audio: audio.c
src/sys/dev/ic: icp.c
src/sys/dev/pci: if_bce.c if_ena.c
src/sys/netinet: ip_id.c
src/sys/netinet6: ip6_id.c
src/sys/nfs: nfs_node.c
src/usr.sbin/makefs: cd9660.c

Log Message:
 s/initalize/initialize/ in comment or printf message.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/arm/imx/imx23_clkctrl.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/arm/imx/imx23_digctl.c \
src/sys/arch/arm/imx/imx23_pinctrl.c src/sys/arch/arm/imx/imx23_rtc.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/pmax/ibus/pm.c
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/sparc/dev/ebus.c
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/audio/audio.c
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/ic/icp.c
cvs rdiff -u -r1.53 -r1.54 src/sys/dev/pci/if_bce.c
cvs rdiff -u -r1.16 -r1.17 src/sys/dev/pci/if_ena.c
cvs rdiff -u -r1.15 -r1.16 src/sys/netinet/ip_id.c
cvs rdiff -u -r1.18 -r1.19 src/sys/netinet6/ip6_id.c
cvs rdiff -u -r1.123 -r1.124 src/sys/nfs/nfs_node.c
cvs rdiff -u -r1.55 -r1.56 src/usr.sbin/makefs/cd9660.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

2019-10-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Oct 18 01:38:28 UTC 2019

Modified Files:
src/sys/arch/i386/conf: files.i386
src/sys/arch/i386/i386: locore.S machdep.c multiboot.c
src/sys/arch/i386/include: multiboot.h
Added Files:
src/sys/arch/x86/x86: multiboot2.c

Log Message:
Multiboot2 kernel support for i386

That implementation works either with BIOS or UEFI bootstrap

This requires the following kernel changes:

Add UEFI boot services and I/O method protoypes
src/sys/arch/x86/include/efi.h 1.8 - 1.9

Fix EFI system table mapping in virtual space
src/sys/arch/x86/x86/efi.c 1.19 - 1.20

Make sure no bioscall is issued when booting off UEFI system
src/sys/arch/i386/i386/machdep.c 1.821 - 1.822
src/sys/arch/i386/pci/piixpcib.c 1.22 - 1.23

And the following bootstrap changes:

Add kernel symbols for multiboot1
src/sys/arch/i386/stand/lib/exec_multiboot1.c 1.2 - 1.3
src/sys/arch/i386/stand/lib/libi386.h 1.45 - 1.47

Fix kernel symbols for multiboot2
src/sys/arch/i386/stand/lib/exec_multiboot2.c 1.2 - 1.3


To generate a diff of this commit:
cvs rdiff -u -r1.400 -r1.401 src/sys/arch/i386/conf/files.i386
cvs rdiff -u -r1.172 -r1.173 src/sys/arch/i386/i386/locore.S
cvs rdiff -u -r1.822 -r1.823 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/i386/i386/multiboot.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/i386/include/multiboot.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/x86/x86/multiboot2.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

2019-10-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Oct 18 01:38:28 UTC 2019

Modified Files:
src/sys/arch/i386/conf: files.i386
src/sys/arch/i386/i386: locore.S machdep.c multiboot.c
src/sys/arch/i386/include: multiboot.h
Added Files:
src/sys/arch/x86/x86: multiboot2.c

Log Message:
Multiboot2 kernel support for i386

That implementation works either with BIOS or UEFI bootstrap

This requires the following kernel changes:

Add UEFI boot services and I/O method protoypes
src/sys/arch/x86/include/efi.h 1.8 - 1.9

Fix EFI system table mapping in virtual space
src/sys/arch/x86/x86/efi.c 1.19 - 1.20

Make sure no bioscall is issued when booting off UEFI system
src/sys/arch/i386/i386/machdep.c 1.821 - 1.822
src/sys/arch/i386/pci/piixpcib.c 1.22 - 1.23

And the following bootstrap changes:

Add kernel symbols for multiboot1
src/sys/arch/i386/stand/lib/exec_multiboot1.c 1.2 - 1.3
src/sys/arch/i386/stand/lib/libi386.h 1.45 - 1.47

Fix kernel symbols for multiboot2
src/sys/arch/i386/stand/lib/exec_multiboot2.c 1.2 - 1.3


To generate a diff of this commit:
cvs rdiff -u -r1.400 -r1.401 src/sys/arch/i386/conf/files.i386
cvs rdiff -u -r1.172 -r1.173 src/sys/arch/i386/i386/locore.S
cvs rdiff -u -r1.822 -r1.823 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/i386/i386/multiboot.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/i386/include/multiboot.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/x86/x86/multiboot2.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/i386/conf/files.i386
diff -u src/sys/arch/i386/conf/files.i386:1.400 src/sys/arch/i386/conf/files.i386:1.401
--- src/sys/arch/i386/conf/files.i386:1.400	Fri Feb 15 08:54:01 2019
+++ src/sys/arch/i386/conf/files.i386	Fri Oct 18 01:38:28 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: files.i386,v 1.400 2019/02/15 08:54:01 nonaka Exp $
+#	$NetBSD: files.i386,v 1.401 2019/10/18 01:38:28 manu Exp $
 #
 # new style config file for i386 architecture
 #
@@ -51,6 +51,7 @@ defparam 	opt_beep.h		BEEP_ONHALT_PERIOD
 defflag 	opt_multiboot.h		MULTIBOOT
 obsolete 	defparam		MULTIBOOT_SYMTAB_SPACE
 file 	arch/i386/i386/multiboot.c	multiboot
+file 	arch/x86/x86/multiboot2.c	multiboot
 
 file	arch/i386/i386/autoconf.c
 file	arch/i386/i386/aout_machdep.c	exec_aout

Index: src/sys/arch/i386/i386/locore.S
diff -u src/sys/arch/i386/i386/locore.S:1.172 src/sys/arch/i386/i386/locore.S:1.173
--- src/sys/arch/i386/i386/locore.S:1.172	Sat Oct 12 06:31:03 2019
+++ src/sys/arch/i386/i386/locore.S	Fri Oct 18 01:38:28 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.172 2019/10/12 06:31:03 maxv Exp $	*/
+/*	$NetBSD: locore.S,v 1.173 2019/10/18 01:38:28 manu Exp $	*/
 
 /*
  * Copyright-o-rama!
@@ -128,7 +128,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.172 2019/10/12 06:31:03 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore.S,v 1.173 2019/10/18 01:38:28 manu Exp $");
 
 #include "opt_copy_symtab.h"
 #include "opt_ddb.h"
@@ -346,12 +346,52 @@ _C_LABEL(Multiboot_Header):
 	.long	MULTIBOOT_HEADER_FLAGS
 	.long	-(MULTIBOOT_HEADER_MAGIC + MULTIBOOT_HEADER_FLAGS)
 
+	.align	8
+	.globl	Multiboot2_Header
+_C_LABEL(Multiboot2_Header):
+	.long	MULTIBOOT2_HEADER_MAGIC
+	.long	MULTIBOOT2_ARCHITECTURE_I386
+	.long	Multiboot2_Header_end - Multiboot2_Header
+	.long	-(MULTIBOOT2_HEADER_MAGIC + MULTIBOOT2_ARCHITECTURE_I386 \
+		+ (Multiboot2_Header_end - Multiboot2_Header))
+
+	.long	1	/* MULTIBOOT_HEADER_TAG_INFORMATION_REQUEST */
+	.long	12	/* sizeof(multiboot_header_tag_information_request) */
+			/* + sizeof(uint32_t) * requests */
+	.long	4	/* MULTIBOOT_TAG_TYPE_BASIC_MEMINFO */
+	.long	0	/* pad for 8 bytes alignment */
+
+	.long	8	/* MULTIBOOT_HEADER_TAG_ENTRY_ADDRESS_EFI32 */
+	.long	12	/* sizeof(struct multiboot_tag_efi32) */
+	.long	efi_multiboot2_loader - KERNBASE
+	.long   0	/* pad for 8 bytes alignment */
+
+#if notyet 
+	/* 
+	 * Could be used to get an early console for debug,
+	 * but this is broken.
+	 */
+	.long	7	/* MULTIBOOT_HEADER_TAG_EFI_BS */
+	.long	8	/* sizeof(struct multiboot_tag) */
+#endif
+
+	.long	0	/* MULTIBOOT_HEADER_TAG_END */
+	.long	8	/* sizeof(struct multiboot_tag) */
+	.globl	Multiboot2_Header_end
+_C_LABEL(Multiboot2_Header_end):
+
 1:
 	/* Check if we are being executed by a Multiboot-compliant boot
 	 * loader. */
 	cmpl	$MULTIBOOT_INFO_MAGIC,%eax
-	jne	1f
+	je	multiboot1_loader
+
+	cmpl	$MULTIBOOT2_BOOTLOADER_MAGIC,%eax
+	je	multiboot2_loader
 
+	jmp	1f
+
+multiboot1_loader:
 	/*
 	 * Indeed, a multiboot-compliant boot loader executed us. We switch
 	 * to the temporary stack, and copy the received Multiboot information
@@ -361,10 +401,187 @@ _C_LABEL(Multiboot_Header):
 	 */
 	movl	$_RELOC(tmpstk),%esp
 	pushl	%ebx		/* Address of Multiboot information */
-	call	_C_LABEL(multiboot_pre_reloc)
+	call	_C_LABEL(multiboot1_pre_reloc)
 	addl	$4,%esp
 	jmp	2f
+
+efi_multiboot2_loader:
+	/*
+	 * EFI32 multiboot2 entry 

CVS commit: src/sys/arch/i386/stand/lib

2019-10-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Oct 18 01:24:51 UTC 2019

Modified Files:
src/sys/arch/i386/stand/lib: libi386.h

Log Message:
Remove prototype added twice by mistake


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/i386/stand/lib/libi386.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/i386/stand/lib/libi386.h
diff -u src/sys/arch/i386/stand/lib/libi386.h:1.46 src/sys/arch/i386/stand/lib/libi386.h:1.47
--- src/sys/arch/i386/stand/lib/libi386.h:1.46	Fri Oct 18 01:09:46 2019
+++ src/sys/arch/i386/stand/lib/libi386.h	Fri Oct 18 01:24:51 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: libi386.h,v 1.46 2019/10/18 01:09:46 manu Exp $	*/
+/*	$NetBSD: libi386.h,v 1.47 2019/10/18 01:24:51 manu Exp $	*/
 
 /*
  * Copyright (c) 1996
@@ -173,6 +173,4 @@ void framebuffer_configure(struct btinfo
 
 void ksyms_addr_set(void *, void *, void *);
 
-void ksyms_addr_set(void *, void *, void *);
-
 #endif	/* __I386_STAND_LIBI386_H__ */



CVS commit: src/sys/arch/i386/stand/lib

2019-10-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Oct 18 01:24:51 UTC 2019

Modified Files:
src/sys/arch/i386/stand/lib: libi386.h

Log Message:
Remove prototype added twice by mistake


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/i386/stand/lib/libi386.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/i386/i386

2019-10-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Oct 18 01:19:00 UTC 2019

Modified Files:
src/sys/arch/i386/i386: multiboot.c

Log Message:
Fix multiboot1 kernel symbol load

ELF_Shdr's sh_type field is a value, not a flag field


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/i386/i386/multiboot.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/i386/i386/multiboot.c
diff -u src/sys/arch/i386/i386/multiboot.c:1.24 src/sys/arch/i386/i386/multiboot.c:1.25
--- src/sys/arch/i386/i386/multiboot.c:1.24	Thu Nov  8 06:23:48 2018
+++ src/sys/arch/i386/i386/multiboot.c	Fri Oct 18 01:19:00 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: multiboot.c,v 1.24 2018/11/08 06:23:48 msaitoh Exp $	*/
+/*	$NetBSD: multiboot.c,v 1.25 2019/10/18 01:19:00 manu Exp $	*/
 
 /*-
  * Copyright (c) 2005, 2006 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: multiboot.c,v 1.24 2018/11/08 06:23:48 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: multiboot.c,v 1.25 2019/10/18 01:19:00 manu Exp $");
 
 #include "opt_multiboot.h"
 
@@ -302,14 +302,14 @@ copy_syms(struct multiboot_info *mi)
 
 		shdrp = &((Elf32_Shdr *)mi->mi_elfshdr_addr)[i];
 
-		if ((shdrp->sh_type & SHT_SYMTAB) &&
+		if ((shdrp->sh_type == SHT_SYMTAB) &&
 		shdrp->sh_link != SHN_UNDEF) {
 			Elf32_Shdr *shdrp2;
 
 			shdrp2 = &((Elf32_Shdr *)mi->mi_elfshdr_addr)
 			[shdrp->sh_link];
 
-			if (shdrp2->sh_type & SHT_STRTAB) {
+			if (shdrp2->sh_type == SHT_STRTAB) {
 symtabp = shdrp;
 strtabp = shdrp2;
 			}



CVS commit: src/sys/arch/i386/i386

2019-10-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Oct 18 01:19:00 UTC 2019

Modified Files:
src/sys/arch/i386/i386: multiboot.c

Log Message:
Fix multiboot1 kernel symbol load

ELF_Shdr's sh_type field is a value, not a flag field


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/i386/i386/multiboot.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/i386/stand/lib

2019-10-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Oct 18 01:15:54 UTC 2019

Modified Files:
src/sys/arch/i386/stand/lib: exec_multiboot2.c

Log Message:
Fix kernel symbols for multiboot2

Previous version just provided the ELF section table, which is correct
as far as the multiboot 2 specification is concerned.

But in order to retreive kernel symboles, the NetBSD kernelneeds symbol
table and string table sections to be loaded in memory, and have an
address set in the section table.

Requires change: Add kernel symbols for multiboot1
src/sys/arch/i386/stand/lib/exec_multiboot1.c 1.2 - 1.3
src/sys/arch/i386/stand/lib/libi386.h 1.45 - 1.46


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/i386/stand/lib/exec_multiboot2.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/i386/stand/lib

2019-10-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Oct 18 01:15:54 UTC 2019

Modified Files:
src/sys/arch/i386/stand/lib: exec_multiboot2.c

Log Message:
Fix kernel symbols for multiboot2

Previous version just provided the ELF section table, which is correct
as far as the multiboot 2 specification is concerned.

But in order to retreive kernel symboles, the NetBSD kernelneeds symbol
table and string table sections to be loaded in memory, and have an
address set in the section table.

Requires change: Add kernel symbols for multiboot1
src/sys/arch/i386/stand/lib/exec_multiboot1.c 1.2 - 1.3
src/sys/arch/i386/stand/lib/libi386.h 1.45 - 1.46


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/i386/stand/lib/exec_multiboot2.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/i386/stand/lib/exec_multiboot2.c
diff -u src/sys/arch/i386/stand/lib/exec_multiboot2.c:1.2 src/sys/arch/i386/stand/lib/exec_multiboot2.c:1.3
--- src/sys/arch/i386/stand/lib/exec_multiboot2.c:1.2	Sun Sep 15 23:55:26 2019
+++ src/sys/arch/i386/stand/lib/exec_multiboot2.c	Fri Oct 18 01:15:54 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_multiboot2.c,v 1.2 2019/09/15 23:55:26 manu Exp $ */
+/* $NetBSD: exec_multiboot2.c,v 1.3 2019/10/18 01:15:54 manu Exp $ */
 
 /*
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -976,9 +976,10 @@ mbi_elf_sections(struct multiboot_packag
 	size_t len = 0;
 	struct multiboot_tag_elf_sections *mbt = buf;
 	Elf_Ehdr ehdr;
+	int class;
 	Elf32_Ehdr *ehdr32 = NULL;
 	Elf64_Ehdr *ehdr64 = NULL;
-	uint32_t shnum, shentsize, shstrndx, shoff;
+	uint64_t shnum, shentsize, shstrndx, shoff;
 	size_t shdr_len;
 
 	if (mbp->mbp_marks[MARK_SYM] == 0)
@@ -992,7 +993,9 @@ mbi_elf_sections(struct multiboot_packag
 	if (memcmp(_ident, ELFMAG, SELFMAG) != 0)
 		goto out;
 
-	switch (ehdr.e_ident[EI_CLASS]) {
+	class = ehdr.e_ident[EI_CLASS];
+
+	switch (class) {
 	case ELFCLASS32:
 		ehdr32 = (Elf32_Ehdr *)
 		shnum = ehdr32->e_shnum;
@@ -1017,8 +1020,7 @@ mbi_elf_sections(struct multiboot_packag
 
 	len = sizeof(*mbt) + shdr_len;
 	if (mbt) {
-		int fd = -1;
-		int ret = -1;
+		char *shdr = (char *)mbp->mbp_marks[MARK_SYM] + shoff;
 
 		mbt->type = MULTIBOOT_TAG_TYPE_ELF_SECTIONS;
 		mbt->size = len;
@@ -1026,26 +1028,16 @@ mbi_elf_sections(struct multiboot_packag
 		mbt->entsize = shentsize;
 		mbt->shndx = shstrndx;
 		
-		if ((fd = open(mbp->mbp_file, 0)) == -1)
-			goto out_read;
-
-		if (lseek(fd, shoff, SEEK_SET) != shoff)
-			goto out_read;
- 
-		if (read(fd, mbt + 1,  shdr_len) != shdr_len)
-			goto out_read;
+		pvbcopy((void *)shdr, mbt + 1, shdr_len);
 
-		ret = 0;
-out_read:
-		if (fd != -1)
-			close(fd);
-
-		if (ret != 0) {
-			printf("Error reading ELF sections from %s\n",
-			mbp->mbp_file);
-			len = 0;
-		}
+		/*
+		 * Adjust sh_addr for symtab and strtab
+		 * section that have been loaded.
+		 */
+		ksyms_addr_set(, mbt + 1,
+		(void *)mbp->mbp_marks[MARK_SYM]);
 	}
+
 out:
 	return roundup(len, MULTIBOOT_TAG_ALIGN);
 }



CVS commit: src/sys/arch/i386/stand/lib

2019-10-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Oct 18 01:09:47 UTC 2019

Modified Files:
src/sys/arch/i386/stand/lib: exec_multiboot1.c libi386.h

Log Message:
Add kernel symbols for multiboot1


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/i386/stand/lib/exec_multiboot1.c
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/i386/stand/lib/libi386.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/i386/stand/lib/exec_multiboot1.c
diff -u src/sys/arch/i386/stand/lib/exec_multiboot1.c:1.2 src/sys/arch/i386/stand/lib/exec_multiboot1.c:1.3
--- src/sys/arch/i386/stand/lib/exec_multiboot1.c:1.2	Fri Oct 18 01:04:24 2019
+++ src/sys/arch/i386/stand/lib/exec_multiboot1.c	Fri Oct 18 01:09:46 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_multiboot1.c,v 1.2 2019/10/18 01:04:24 manu Exp $ */
+/* $NetBSD: exec_multiboot1.c,v 1.3 2019/10/18 01:09:46 manu Exp $ */
 
 /*
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -42,6 +42,80 @@
 
 extern struct btinfo_modulelist *btinfo_modulelist;
 
+void
+ksyms_addr_set(void *ehdr, void *shdr, void *symbase)
+{
+	int class;
+	Elf32_Ehdr *ehdr32 = NULL;
+	Elf64_Ehdr *ehdr64 = NULL;
+	uint64_t shnum;
+	int i;
+
+	class = ((Elf_Ehdr *)ehdr)->e_ident[EI_CLASS];
+
+switch (class) {
+case ELFCLASS32: 
+ehdr32 = (Elf32_Ehdr *)ehdr;
+shnum = ehdr32->e_shnum;
+break;
+case ELFCLASS64:
+ehdr64 = (Elf64_Ehdr *)ehdr;
+shnum = ehdr64->e_shnum;
+break;
+default:
+		panic("Unexpected ELF class");
+		break;
+}
+
+	for (i = 0; i < shnum; i++) {
+		Elf64_Shdr *shdrp64 = NULL;
+		Elf32_Shdr *shdrp32 = NULL;
+		uint64_t shtype, shaddr, shsize, shoffset;
+
+		switch(class) {
+		case ELFCLASS64:
+			shdrp64 = &((Elf64_Shdr *)shdr)[i];	
+			shtype = shdrp64->sh_type;
+			shaddr = shdrp64->sh_addr;
+			shsize = shdrp64->sh_size;
+			shoffset = shdrp64->sh_offset;
+			break;
+		case ELFCLASS32:
+			shdrp32 = &((Elf32_Shdr *)shdr)[i];	
+			shtype = shdrp32->sh_type;
+			shaddr = shdrp32->sh_addr;
+			shsize = shdrp32->sh_size;
+			shoffset = shdrp32->sh_offset;
+			break;
+		default:
+			panic("Unexpected ELF class");
+			break;
+		}
+
+		if (shtype != SHT_SYMTAB && shtype != SHT_STRTAB)
+			continue;
+
+		if (shaddr != 0 || shsize == 0)
+			continue;
+
+		shaddr = (uint64_t)(uintptr_t)(symbase + shoffset);
+
+		switch(class) {
+		case ELFCLASS64:
+			shdrp64->sh_addr = shaddr;
+			break;
+		case ELFCLASS32:
+			shdrp32->sh_addr = shaddr;
+			break;
+		default:
+			panic("Unexpected ELF class");
+			break;
+		}
+	}
+
+	return;
+}
+
 static int
 exec_multiboot1(struct multiboot_package *mbp)
 {
@@ -85,6 +159,38 @@ exec_multiboot1(struct multiboot_package
 		mbi->mi_mods_addr = vtophys(mbm);
 	}
 
+	if (mbp->mbp_marks[MARK_SYM] != 0) {
+		Elf32_Ehdr ehdr;
+		void *shbuf;
+		size_t shlen;
+		u_long shaddr;
+
+		pvbcopy((void *)mbp->mbp_marks[MARK_SYM], , sizeof(ehdr));
+
+		if (memcmp(_ident, ELFMAG, SELFMAG) != 0)
+			goto skip_ksyms;
+
+		shaddr = mbp->mbp_marks[MARK_SYM] + ehdr.e_shoff;
+
+		shlen = ehdr.e_shnum * ehdr.e_shentsize;
+		shbuf = alloc(shlen);
+
+		pvbcopy((void *)shaddr, shbuf, shlen);
+		ksyms_addr_set(, shbuf,
+		(void *)(KERNBASE + mbp->mbp_marks[MARK_SYM]));
+		vpbcopy(shbuf, (void *)shaddr, shlen);
+
+		dealloc(shbuf, shlen);
+
+		mbi->mi_elfshdr_num = ehdr.e_shnum;
+		mbi->mi_elfshdr_size = ehdr.e_shentsize;
+		mbi->mi_elfshdr_addr = shaddr;
+		mbi->mi_elfshdr_shndx = ehdr.e_shstrndx;
+
+		mbi->mi_flags |= MULTIBOOT_INFO_HAS_ELF_SYMS;
+	}
+skip_ksyms:
+
 #ifdef DEBUG
 	printf("Start @ 0x%lx [%ld=0x%lx-0x%lx]...\n",
 	mbp->mbp_marks[MARK_ENTRY],

Index: src/sys/arch/i386/stand/lib/libi386.h
diff -u src/sys/arch/i386/stand/lib/libi386.h:1.45 src/sys/arch/i386/stand/lib/libi386.h:1.46
--- src/sys/arch/i386/stand/lib/libi386.h:1.45	Fri Sep 13 02:19:46 2019
+++ src/sys/arch/i386/stand/lib/libi386.h	Fri Oct 18 01:09:46 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: libi386.h,v 1.45 2019/09/13 02:19:46 manu Exp $	*/
+/*	$NetBSD: libi386.h,v 1.46 2019/10/18 01:09:46 manu Exp $	*/
 
 /*
  * Copyright (c) 1996
@@ -171,4 +171,8 @@ void module_add_split(const char *, uint
 struct btinfo_framebuffer;
 void framebuffer_configure(struct btinfo_framebuffer *);
 
+void ksyms_addr_set(void *, void *, void *);
+
+void ksyms_addr_set(void *, void *, void *);
+
 #endif	/* __I386_STAND_LIBI386_H__ */



CVS commit: src/sys/arch/i386/stand/lib

2019-10-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Oct 18 01:09:47 UTC 2019

Modified Files:
src/sys/arch/i386/stand/lib: exec_multiboot1.c libi386.h

Log Message:
Add kernel symbols for multiboot1


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/i386/stand/lib/exec_multiboot1.c
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/i386/stand/lib/libi386.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/i386/stand/lib

2019-10-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Oct 18 01:04:24 UTC 2019

Modified Files:
src/sys/arch/i386/stand/lib: exec_multiboot1.c

Log Message:
Fix multiboot1 header detection

Specification states it must be must be longword (32-bit) aligned


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/i386/stand/lib/exec_multiboot1.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/i386/stand/lib/exec_multiboot1.c
diff -u src/sys/arch/i386/stand/lib/exec_multiboot1.c:1.1 src/sys/arch/i386/stand/lib/exec_multiboot1.c:1.2
--- src/sys/arch/i386/stand/lib/exec_multiboot1.c:1.1	Fri Sep 13 02:19:46 2019
+++ src/sys/arch/i386/stand/lib/exec_multiboot1.c	Fri Oct 18 01:04:24 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: exec_multiboot1.c,v 1.1 2019/09/13 02:19:46 manu Exp $ */
+/* $NetBSD: exec_multiboot1.c,v 1.2 2019/10/18 01:04:24 manu Exp $ */
 
 /*
  * Copyright (c) 2019 The NetBSD Foundation, Inc.
@@ -126,7 +126,7 @@ probe_multiboot1(const char *path)
 	if (readen < sizeof(struct multiboot_header))
 		goto out;
 
-	for (i = 0; i < readen; i += 8) {
+	for (i = 0; i < readen; i += 4) {
 		struct multiboot_header *mbh;
 
 		mbh = (struct multiboot_header *)(buf + i);



CVS commit: src/sys/arch/i386/stand/lib

2019-10-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Oct 18 01:04:24 UTC 2019

Modified Files:
src/sys/arch/i386/stand/lib: exec_multiboot1.c

Log Message:
Fix multiboot1 header detection

Specification states it must be must be longword (32-bit) aligned


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/i386/stand/lib/exec_multiboot1.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/i386

2019-10-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Oct 18 01:00:25 UTC 2019

Modified Files:
src/sys/arch/i386/i386: machdep.c
src/sys/arch/i386/pci: piixpcib.c

Log Message:
Make sure no bioscall is issued when booting off UEFI system


To generate a diff of this commit:
cvs rdiff -u -r1.821 -r1.822 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/i386/pci/piixpcib.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/i386

2019-10-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Oct 18 01:00:25 UTC 2019

Modified Files:
src/sys/arch/i386/i386: machdep.c
src/sys/arch/i386/pci: piixpcib.c

Log Message:
Make sure no bioscall is issued when booting off UEFI system


To generate a diff of this commit:
cvs rdiff -u -r1.821 -r1.822 src/sys/arch/i386/i386/machdep.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/i386/pci/piixpcib.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/i386/i386/machdep.c
diff -u src/sys/arch/i386/i386/machdep.c:1.821 src/sys/arch/i386/i386/machdep.c:1.822
--- src/sys/arch/i386/i386/machdep.c:1.821	Sat Oct 12 06:31:03 2019
+++ src/sys/arch/i386/i386/machdep.c	Fri Oct 18 01:00:24 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.821 2019/10/12 06:31:03 maxv Exp $	*/
+/*	$NetBSD: machdep.c,v 1.822 2019/10/18 01:00:24 manu Exp $	*/
 
 /*
  * Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009, 2017
@@ -67,7 +67,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.821 2019/10/12 06:31:03 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.822 2019/10/18 01:00:24 manu Exp $");
 
 #include "opt_beep.h"
 #include "opt_compat_freebsd.h"
@@ -119,6 +119,8 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 
 
 #include 
 
+#include 
+
 #include 
 #include 
 #include 
@@ -1368,10 +1370,15 @@ init386(paddr_t first_avail)
 	init386_ksyms();
 
 #if NMCA > 0
-	/* check for MCA bus, needed to be done before ISA stuff - if
+	/* 
+	 * check for MCA bus, needed to be done before ISA stuff - if
 	 * MCA is detected, ISA needs to use level triggered interrupts
-	 * by default */
-	mca_busprobe();
+	 * by default
+	 * And we do not search for MCA using bioscall() on EFI systems
+	 * that lacks it (they lack MCA too, anyway).
+	 */
+	if (lookup_bootinfo(BTINFO_EFI) == NULL)
+		mca_busprobe();
 #endif
 
 #ifdef XENPV

Index: src/sys/arch/i386/pci/piixpcib.c
diff -u src/sys/arch/i386/pci/piixpcib.c:1.22 src/sys/arch/i386/pci/piixpcib.c:1.23
--- src/sys/arch/i386/pci/piixpcib.c:1.22	Mon Jul 11 11:31:49 2016
+++ src/sys/arch/i386/pci/piixpcib.c	Fri Oct 18 01:00:25 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: piixpcib.c,v 1.22 2016/07/11 11:31:49 msaitoh Exp $ */
+/* $NetBSD: piixpcib.c,v 1.23 2019/10/18 01:00:25 manu Exp $ */
 
 /*-
  * Copyright (c) 2004, 2006 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: piixpcib.c,v 1.22 2016/07/11 11:31:49 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: piixpcib.c,v 1.23 2019/10/18 01:00:25 manu Exp $");
 
 #include 
 #include 
@@ -195,6 +195,12 @@ piixpcib_int15_gsic_call(int *sig, int *
 {
 	struct bioscallregs regs;
 
+	/* No bioscall with EFI */
+	if (lookup_bootinfo(BTINFO_EFI) != NULL) {
+		*sig = *smicmd = *cmd = *smidata = *flags = -1;
+		return;
+	}
+		
 	memset(, 0, sizeof(struct bioscallregs));
 	regs.EAX = 0xe980;	/* IST support */
 	regs.EDX = PIIXPCIB_GSIC;



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

2019-10-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Oct 18 00:56:25 UTC 2019

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

Log Message:
Fix EFI system table mapping in virtual space

Previous version was annoted as untested, and indeed it did not work.
New version uses the same approach as for ACPI table mapping.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/x86/x86/efi.c

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

Modified files:

Index: src/sys/arch/x86/x86/efi.c
diff -u src/sys/arch/x86/x86/efi.c:1.19 src/sys/arch/x86/x86/efi.c:1.20
--- src/sys/arch/x86/x86/efi.c:1.19	Mon Dec  3 19:46:43 2018
+++ src/sys/arch/x86/x86/efi.c	Fri Oct 18 00:56:25 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: efi.c,v 1.19 2018/12/03 19:46:43 cherry Exp $	*/
+/*	$NetBSD: efi.c,v 1.20 2019/10/18 00:56:25 manu Exp $	*/
 
 /*-
  * Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: efi.c,v 1.19 2018/12/03 19:46:43 cherry Exp $");
+__KERNEL_RCSID(0, "$NetBSD: efi.c,v 1.20 2019/10/18 00:56:25 manu Exp $");
 
 #include 
 #include 
@@ -37,6 +37,8 @@ __KERNEL_RCSID(0, "$NetBSD: efi.c,v 1.19
 #include 
 
 #include 
+#include 
+#include 
 #include 
 
 #include 
@@ -73,21 +75,19 @@ static vaddr_t
 efi_getva(paddr_t pa)
 {
 	vaddr_t va;
+	int rv;
 
 #ifdef __HAVE_MM_MD_DIRECT_MAPPED_PHYS
 	if (mm_md_direct_mapped_phys(pa, ))
 		return va;
 #endif
 
-	/* XXX This code path is not tested. */
-	va = uvm_km_alloc(kernel_map, PAGE_SIZE, 0,
-	UVM_KMF_VAONLY | UVM_KMF_WAITVA);
-	if (va == 0) {
+	rv = _x86_memio_map(x86_bus_space_mem, pa, 
+	PAGE_SIZE, 0, (bus_space_handle_t *));   
+	if (rv != 0) {
 		aprint_debug("efi: unable to allocate va\n");
 		return 0;
 	}
-	pmap_kenter_pa(va, pa, VM_PROT_READ, 0);
-	pmap_update(pmap_kernel());
 
 	return va;
 }
@@ -107,10 +107,8 @@ efi_relva(paddr_t pa, vaddr_t va)
 	}
 #endif
 
-	/* XXX This code path is not tested. */
-	pmap_kremove(va, PAGE_SIZE);
-	pmap_update(pmap_kernel());
-	uvm_km_free(kernel_map, va, PAGE_SIZE, UVM_KMF_VAONLY);
+	(void)_x86_memio_unmap(x86_bus_space_mem, (bus_space_handle_t)va,
+	PAGE_SIZE, NULL);
 }
 
 /*



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

2019-10-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Oct 18 00:56:25 UTC 2019

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

Log Message:
Fix EFI system table mapping in virtual space

Previous version was annoted as untested, and indeed it did not work.
New version uses the same approach as for ACPI table mapping.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/x86/x86/efi.c

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



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

2019-10-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Oct 18 00:54:48 UTC 2019

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

Log Message:
Add UEFI boot services and I/O method protoypes


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x86/include/efi.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/x86/include

2019-10-17 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Fri Oct 18 00:54:48 UTC 2019

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

Log Message:
Add UEFI boot services and I/O method protoypes


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x86/include/efi.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/efi.h
diff -u src/sys/arch/x86/include/efi.h:1.8 src/sys/arch/x86/include/efi.h:1.9
--- src/sys/arch/x86/include/efi.h:1.8	Sun Oct 22 00:59:28 2017
+++ src/sys/arch/x86/include/efi.h	Fri Oct 18 00:54:48 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: efi.h,v 1.8 2017/10/22 00:59:28 maya Exp $   */
+/* $NetBSD: efi.h,v 1.9 2019/10/18 00:54:48 manu Exp $   */
 
 /*-
  * Copyright (c) 2004 Marcel Moolenaar
@@ -63,6 +63,12 @@ enum efi_reset {
 typedef uint16_t   efi_char;
 typedef unsigned long efi_status;
 
+#if defined(__amd64__)
+typedef uint64_t uintn;
+#elif defined(__i386__)
+typedef uint32_t uintn;
+#endif
+
 struct efi_cfgtbl {
struct uuid ct_uuid;
void   *ct_data;
@@ -149,6 +155,133 @@ struct efi_rt {
efi_char *);
 };
 
+typedef uintn efi_tpl;
+typedef void *efi_event;
+typedef void (*efi_event_notify)(efi_event, void *);
+typedef void *efi_handle;
+typedef struct {
+	uint8_t type;
+	uint8_t subtype;
+	uint8_t ldnegth[2];
+} efi_device_path;
+
+struct efi_bs {
+   struct efi_tblhdr bs_hdr;
+#define		EFI_BS_SIG  0x56524553544f4f42UL
+   efi_tpl (*bs_raisetpl)(efi_tpl);
+   void(*bs_restoretpl)(efi_tpl);
+   efi_status  (*bs_allocatepages)(uint32_t, uint32_t,
+	   uintn, paddr_t *);
+   efi_status  (*bs_freepages)(paddr_t, uintn);
+   efi_status  (*bs_getmemorymap)(uintn *, struct efi_md *,
+	   uintn *, uintn *, uint32_t *);
+   efi_status  (*bs_allocatepool)(uint32_t, uintn, void **);
+   efi_status  (*bs_freepool)(void *);
+   efi_status  (*bs_createevent)(uint32_t, efi_tpl, efi_event_notify,
+	   void *, efi_event *);
+   efi_status  (*bs_settimer)(efi_event, uint32_t, uint64_t);
+   efi_status  (*bs_waitforevent)(uintn, efi_event *, uintn *);
+   efi_status  (*bs_signalevent)(efi_event);
+   efi_status  (*bs_closeevent)(efi_event);
+   efi_status  (*bs_checkevent)(efi_event);
+   efi_status  (*bs_installprotocolinterface)(efi_handle *,
+	   struct uuid *, uint32_t, void *);
+   efi_status  (*bs_reinstallprotocolinterface)(efi_handle *,
+	   struct uuid *, void *, void *);
+   efi_status  (*bs_uninstallprotocolinterface)(efi_handle *,
+	   struct uuid *, void *);
+   efi_status  (*bs_handleprotocol)(efi_handle,
+	   struct uuid *, void **);
+   efi_status  (*bs_pchandleprotocol)(efi_handle,
+	   struct uuid *, void **);
+   efi_status  (*bs_registerprotocolnotify)(struct uuid *, efi_event,
+	   void **);
+   efi_status  (*bs_locatehandle)(uint32_t, struct uuid *, void *,
+	   uintn *, efi_handle *);
+   efi_status  (*bs_locatedevicepath)(struct uuid *, efi_device_path **,
+	   efi_handle *);
+   efi_status  (*bs_installconfigurationtable)(struct uuid *, void *);
+   efi_status  (*bs_loadimage)(uint8_t, efi_handle, efi_device_path *,
+	   void *, uintn, efi_handle *);
+   efi_status  (*bs_startimage)(efi_handle, uintn *, efi_char **);
+   efi_status  (*bs_exit)(efi_handle, efi_status, uintn, efi_char *);
+   efi_status  (*bs_unloadimage)(efi_handle);
+   efi_status  (*bs_exitbootservices)(efi_handle, uintn);
+   efi_status  (*bs_getnextmonotoniccount)(uint64_t *);
+   efi_status  (*bs_stall)(uintn);
+   efi_status  (*bs_setwatchdogtimer)(uintn, uint64_t,
+	   uintn, efi_char *);
+   efi_status  (*bs_connectcontroller)(efi_handle, efi_handle *,
+	efi_device_path *, uint8_t);
+   efi_status  (*bs_disconnectcontroller)(efi_handle, efi_handle,
+	efi_handle);
+   efi_status  (*bs_openprotocol)(efi_handle, struct uuid *, void **,
+	efi_handle, efi_handle, uint32_t);
+   efi_status  (*bs_closeprotocol)(efi_handle, struct uuid *,
+	efi_handle, efi_handle);
+   efi_status  (*bs_openprotocolinformation)(efi_handle, efi_handle,
+	uint32_t, uint32_t);
+   efi_status  (*bs_protocolsperhandle)(efi_handle,
+	struct uuid ***, uintn *);
+   efi_status  (*bs_locatehandlebuffer)(uint32_t, struct uuid *,
+	void *, uintn *, efi_handle **);
+   efi_status  (*bs_locateprotocol)(struct uuid *, void *, void **);
+   efi_status  (*bs_installmultipleprotocolinterfaces)(efi_handle *,
+	...);
+   efi_status  (*bs_uninstallmultipleprotocolinterfaces)(efi_handle,
+	...);
+   efi_status  (*bs_calculatecrc32)(void *, uintn, uint32_t *);
+   efi_status  

CVS commit: src/doc

2019-10-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Oct 17 23:10:24 UTC 2019

Modified Files:
src/doc: CHANGES.prev

Log Message:
evbarm: Add support for Amazon Graviton "a1.metal" instances.


To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 src/doc/CHANGES.prev

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.prev
diff -u src/doc/CHANGES.prev:1.147 src/doc/CHANGES.prev:1.148
--- src/doc/CHANGES.prev:1.147	Thu Oct 17 20:48:44 2019
+++ src/doc/CHANGES.prev	Thu Oct 17 23:10:23 2019
@@ -1,4 +1,4 @@
-LIST OF CHANGES FROM PREVIOUS RELEASES:			<$Revision: 1.147 $>
+LIST OF CHANGES FROM PREVIOUS RELEASES:			<$Revision: 1.148 $>
 
 
 Changes from 386bsd 0.1 + patchkit 0.2.2 to NetBSD 0.8:
@@ -12639,4 +12639,5 @@ Changes from NetBSD 8.0 to NetBSD 9.0:
 	usbnet(9): Port kue(4) and upl(4). [mrg 20190818]
 	mcx(4): Added driver for Mellanox 5th generation ethernet.
 		[jmcneill 20190921]
-
+	evbarm: Add support for Amazon Graviton "a1.metal" instances.
+		[jmcneill 20191015]



CVS commit: src/doc

2019-10-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Oct 17 23:10:24 UTC 2019

Modified Files:
src/doc: CHANGES.prev

Log Message:
evbarm: Add support for Amazon Graviton "a1.metal" instances.


To generate a diff of this commit:
cvs rdiff -u -r1.147 -r1.148 src/doc/CHANGES.prev

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/fdt

2019-10-17 Thread Christoph Badura
Module Name:src
Committed By:   bad
Date:   Thu Oct 17 21:52:27 UTC 2019

Modified Files:
src/sys/arch/arm/fdt: cpu_fdt.c

Log Message:
back out r1.26. it makes the pinebook fail to boot.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/fdt/cpu_fdt.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/fdt/cpu_fdt.c
diff -u src/sys/arch/arm/fdt/cpu_fdt.c:1.26 src/sys/arch/arm/fdt/cpu_fdt.c:1.27
--- src/sys/arch/arm/fdt/cpu_fdt.c:1.26	Tue Oct 15 17:25:02 2019
+++ src/sys/arch/arm/fdt/cpu_fdt.c	Thu Oct 17 21:52:26 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_fdt.c,v 1.26 2019/10/15 17:25:02 bad Exp $ */
+/* $NetBSD: cpu_fdt.c,v 1.27 2019/10/17 21:52:26 bad Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill 
@@ -30,7 +30,7 @@
 #include "psci_fdt.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu_fdt.c,v 1.26 2019/10/15 17:25:02 bad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_fdt.c,v 1.27 2019/10/17 21:52:26 bad Exp $");
 
 #include 
 #include 
@@ -348,7 +348,6 @@ cpu_enable_psci(int phandle)
 
 	fdtbus_get_reg64(phandle, 0, , NULL);
 
-	cpu_dcache_wbinv_all();
 	ret = psci_cpu_on(mpidr, cpu_fdt_mpstart_pa(), 0);
 	if (ret != PSCI_SUCCESS)
 		return EIO;



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

2019-10-17 Thread Christoph Badura
Module Name:src
Committed By:   bad
Date:   Thu Oct 17 21:52:27 UTC 2019

Modified Files:
src/sys/arch/arm/fdt: cpu_fdt.c

Log Message:
back out r1.26. it makes the pinebook fail to boot.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/arm/fdt/cpu_fdt.c

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



CVS commit: src/doc

2019-10-17 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Oct 17 20:48:44 UTC 2019

Modified Files:
src/doc: CHANGES CHANGES.prev

Log Message:
move usbnet and mcx entries from CHANGES to CHANGES.prev.

there may be others that should also move.. i'm not sure.


To generate a diff of this commit:
cvs rdiff -u -r1.2601 -r1.2602 src/doc/CHANGES
cvs rdiff -u -r1.146 -r1.147 src/doc/CHANGES.prev

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2601 src/doc/CHANGES:1.2602
--- src/doc/CHANGES:1.2601	Thu Oct 17 16:48:12 2019
+++ src/doc/CHANGES	Thu Oct 17 20:48:44 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2601 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2602 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -25,11 +25,6 @@
 
 Changes from NetBSD 9.0 to NetBSD 10.0:
 	openldap: Import 2.4.48. [christos 20190808]
-	usbnet(9): Add common framework for USB network devices.  Port the
-		axe(4), axen(4), cdce(4), cue(4), mue(4), smsc(4), udav(4),
-		ure(4), url(4), and urndis(4) drivers fixing many bugs and
-		porting to NET_MPSAFE in the process.  [mrg 20190814]
-	usbnet(9): Port kue(4) and upl(4). [mrg 20190818]
 	boot(8): GPT and RAIDframe support for x86 bootstrap [manu 20190818]
 	dhcpcd(8): Import dhcpcd-8.0.3 [roy 20190821]
 	inet6: Fix sending RTM_MISS for unresolvable addresses and restore
@@ -45,8 +40,6 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 		packets from userland. [maxv 20190914]
 	mos(4): Ported driver for MosChip MCS7730/7830/7832 USB ethernet.
 		[mrg 20190814]
-	mcx(4): Added driver for Mellanox 5th generation ethernet.
-		[jmcneill 20190921]
 	libpcap: Import 1.9.1. [christos 20191001]
 	tcpdump(8): Import 4.9.3. [christos 20191001]
 	rescue(8): Moved into a separate, rescue-only set. [maya 20191001]

Index: src/doc/CHANGES.prev
diff -u src/doc/CHANGES.prev:1.146 src/doc/CHANGES.prev:1.147
--- src/doc/CHANGES.prev:1.146	Thu Aug 15 13:33:15 2019
+++ src/doc/CHANGES.prev	Thu Oct 17 20:48:44 2019
@@ -1,4 +1,4 @@
-LIST OF CHANGES FROM PREVIOUS RELEASES:			<$Revision: 1.146 $>
+LIST OF CHANGES FROM PREVIOUS RELEASES:			<$Revision: 1.147 $>
 
 
 Changes from 386bsd 0.1 + patchkit 0.2.2 to NetBSD 0.8:
@@ -12632,4 +12632,11 @@ Changes from NetBSD 8.0 to NetBSD 9.0:
 		for depths 2 and 24. Shadow framebuffer supported for all
 		depths. A lot of bug fixes, both major and minor. Dedup more
 		than 20% of lines, or 50% of characters. [rin 20190810]
+	usbnet(9): Add common framework for USB network devices.  Port the
+		axe(4), axen(4), cdce(4), cue(4), mue(4), smsc(4), udav(4),
+		ure(4), url(4), and urndis(4) drivers fixing many bugs and
+		porting to NET_MPSAFE in the process.  [mrg 20190814]
+	usbnet(9): Port kue(4) and upl(4). [mrg 20190818]
+	mcx(4): Added driver for Mellanox 5th generation ethernet.
+		[jmcneill 20190921]
 



CVS commit: src/doc

2019-10-17 Thread matthew green
Module Name:src
Committed By:   mrg
Date:   Thu Oct 17 20:48:44 UTC 2019

Modified Files:
src/doc: CHANGES CHANGES.prev

Log Message:
move usbnet and mcx entries from CHANGES to CHANGES.prev.

there may be others that should also move.. i'm not sure.


To generate a diff of this commit:
cvs rdiff -u -r1.2601 -r1.2602 src/doc/CHANGES
cvs rdiff -u -r1.146 -r1.147 src/doc/CHANGES.prev

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-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 19:39:31 UTC 2019

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

Log Message:
Tickets #343 - #351


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.80 -r1.1.2.81 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.80 src/doc/CHANGES-9.0:1.1.2.81
--- src/doc/CHANGES-9.0:1.1.2.80	Thu Oct 17 18:48:55 2019
+++ src/doc/CHANGES-9.0	Thu Oct 17 19:39:31 2019
@@ -1,5 +1,4 @@
-
-# $NetBSD: CHANGES-9.0,v 1.1.2.80 2019/10/17 18:48:55 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.81 2019/10/17 19:39:31 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -4748,3 +4747,330 @@ sys/arch/evbarm/conf/GENERIC			1.54
 	Add support (dtb files) for NanoPi R1 and Duo2.
 	[bad, ticket #341]
 
+sys/dev/usb/if_ure.c1.32,1.33
+
+	Fix reading the mac address of ure version 4c10.
+	Allocate a random mac address if on-chip mac is all zeroes.
+	[bad, ticket #343]
+
+sys/arch/x86/include/specialreg.h		1.154,1.155
+sys/arch/x86/x86/procfs_machdep.c		1.34
+usr.sbin/cpuctl/arch/i386.c			1.107
+
+	- Add definitions of AMD's CPUID Fn8000_001f Encrypted Memory features.
+	- Add definition of AMD's CPUID Fn8000_000a %edx bit 11 "GMET".
+	- Define CPUID_AMD_SVM_PFThreshold correctly.
+	- Modify comment a bit for consistency.
+	- Add rdpru support to /proc/cpuinfo.
+	[msaitoh, ticket #344]
+
+sys/dev/pci/if_vge.c1.75
+sys/dev/pci/if_vgereg.h1.5
+
+	Recover from powerdown mode.
+	[msaitoh, ticket #345]
+
+sys/dev/pci/if_et.c1.27
+
+	Fix a bug that multicast address filter doesn't work correctly.
+	[msaitoh, ticket #346]
+
+sys/dev/mii/ciphy.c1.35
+sys/dev/mii/rgephy.c1.56,1.57
+
+	Indicate master mode if the negotiated result say so.
+	[msaitoh, ticket #347]
+
+sys/dev/pci/ixgbe/ixgbe.c			1.214
+
+	Disable EEE for backplane X550EM_X.
+	[msaitoh, ticket #348]
+
+doc/CHANGES	1.2599
+
+	evbarm: Add support for Amazon Graviton "a1.metal" instances.
+	[jmcneill, ticket #349]
+
+sys/external/bsd/drm2/linux/linux_dma_buf.c	1.6
+
+	Fix error handling.
+	[maya, ticket #350]
+
+external/mpl/bind/dist/bin/tests/system/checkzone/zones/bad-cdnskey.db up to 1.1.1.1
+external/mpl/bind/dist/bin/tests/system/checkzone/zones/bad-cds.db up to 1.1.1.1
+external/mpl/bind/dist/bin/tests/system/checkzone/zones/good-cdnskey.db up to 1.1.1.1
+external/mpl/bind/dist/bin/tests/system/checkzone/zones/good-cds.db up to 1.1.1.1
+external/mpl/bind/dist/bin/tests/system/forward/ns1/sld.tld.db up to 1.1.1.1
+external/mpl/bind/dist/bin/tests/system/forward/ns2/tld.db up to 1.1.1.1
+external/mpl/bind/dist/bin/tests/system/forward/ns8/named.conf.in up to 1.1.1.1
+external/mpl/bind/dist/bin/tests/system/forward/ns8/root.db up to 1.1.1.1
+external/mpl/bind/dist/bin/tests/system/rpz/ns5/expire.conf.in up to 1.1.1.1
+external/mpl/bind/dist/bin/tests/system/rpz/ns5/fast-expire.db.in up to 1.1.1.1
+external/mpl/bind/dist/doc/arm/notes-bug-fixes.xml up to 1.1.1.1
+external/mpl/bind/dist/doc/arm/notes-download.xml up to 1.1.1.1
+external/mpl/bind/dist/doc/arm/notes-eol.xmlup to 1.1.1.1
+external/mpl/bind/dist/doc/arm/notes-intro.xml  up to 1.1.1.1
+external/mpl/bind/dist/doc/arm/notes-license.xml up to 1.1.1.1
+external/mpl/bind/dist/doc/arm/notes-new-features.xml up to 1.1.1.1
+external/mpl/bind/dist/doc/arm/notes-numbering.xml up to 1.1.1.1
+external/mpl/bind/dist/doc/arm/notes-platforms.xml up to 1.1.1.1
+external/mpl/bind/dist/doc/arm/notes-sec-fixes.xml up to 1.1.1.1
+external/mpl/bind/dist/doc/arm/notes-thankyou.xml up to 1.1.1.1
+external/mpl/bind/dist/bin/pkcs11/Makefile  delete
+external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/Makefile delete
+external/mpl/bind/dist/bin/tests/pkcs11/Makefile delete
+external/mpl/bind/dist/bin/tests/system/dlzexternal/ns1/dlzs.conf delete
+external/mpl/bind/dist/bin/tests/system/glue/ns1/cache.in delete
+external/mpl/bind/dist/bin/tests/system/glue/ns1/mil.db delete
+external/mpl/bind/dist/bin/tests/system/glue/xx.good delete
+external/mpl/bind/dist/bin/tests/system/glue/yy.good delete
+external/mpl/bind/dist/bin/tests/virtual-time/Makefile delete
+external/mpl/bind/dist/bin/tests/virtual-time/conf.sh delete
+external/mpl/bind/dist/lib/dns/tests/tkey_test.c delete
+external/mpl/bind/dist/lib/samples/Makefile-postinstall delete
+external/mpl/bind/dist/contrib/scripts/zone-edit.sh delete
+external/mpl/bind/dist/contrib/scripts/check-secure-delegation.pl delete
+external/mpl/bind/dist/unit/unittest.sh delete
+external/mpl/bind/bind2netbsd   up to 1.4
+external/mpl/bind/bin/dnssec/dnssec-verify/Makefile up to 1.2
+external/mpl/bind/dist/CHANGES  up to 1.1.1.6
+external/mpl/bind/dist/README   up to 1.1.1.6
+external/mpl/bind/dist/README.md

CVS commit: [netbsd-9] src/doc

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 19:39:31 UTC 2019

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

Log Message:
Tickets #343 - #351


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.80 -r1.1.2.81 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

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 19:34:23 UTC 2019

Modified Files:
src/doc [netbsd-9]: 3RDPARTY
src/external/mpl/bind [netbsd-9]: bind2netbsd
src/external/mpl/bind/bin/dnssec/dnssec-verify [netbsd-9]: Makefile
src/external/mpl/bind/dist [netbsd-9]: CHANGES README README.md
config.h.in configure configure.ac srcid version
src/external/mpl/bind/dist/bin/check/win32 [netbsd-9]:
checkconf.vcxproj.in checktool.vcxproj.in checkzone.vcxproj.in
src/external/mpl/bind/dist/bin/confgen/win32 [netbsd-9]:
confgentool.vcxproj.in ddnsconfgen.vcxproj.in
rndcconfgen.vcxproj.in
src/external/mpl/bind/dist/bin/delv/win32 [netbsd-9]: delv.vcxproj.in
src/external/mpl/bind/dist/bin/dig [netbsd-9]: dighost.c
src/external/mpl/bind/dist/bin/dig/win32 [netbsd-9]: dig.vcxproj.in
dighost.vcxproj.in host.vcxproj.in nslookup.vcxproj.in
src/external/mpl/bind/dist/bin/dnssec [netbsd-9]: dnssec-dsfromkey.c
src/external/mpl/bind/dist/bin/dnssec/win32 [netbsd-9]: cds.vcxproj.in
dnssectool.vcxproj.in dsfromkey.vcxproj.in importkey.vcxproj.in
keyfromlabel.vcxproj.in keygen.vcxproj.in revoke.vcxproj.in
settime.vcxproj.in signzone.vcxproj.in verify.vcxproj.in
src/external/mpl/bind/dist/bin/named [netbsd-9]: config.c main.c
server.c statschannel.c zoneconf.c
src/external/mpl/bind/dist/bin/named/win32 [netbsd-9]: named.vcxproj.in
os.c
src/external/mpl/bind/dist/bin/nsupdate/win32 [netbsd-9]:
nsupdate.vcxproj.in
src/external/mpl/bind/dist/bin/pkcs11/win32 [netbsd-9]:
pk11destroy.vcxproj.in pk11keygen.vcxproj.in pk11list.vcxproj.in
pk11tokens.vcxproj.in
src/external/mpl/bind/dist/bin/rndc/win32 [netbsd-9]: rndc.vcxproj.in
rndcutil.vcxproj.in
src/external/mpl/bind/dist/bin/tests/optional [netbsd-9]: nsecify.c
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks [netbsd-9]:
create.c find.c genrsa.c login.c privrsa.c pubrsa.c session.c
sha1.c sign.c verify.c
src/external/mpl/bind/dist/bin/tests/system [netbsd-9]: conf.sh.common
conf.sh.win32 runall.sh
src/external/mpl/bind/dist/bin/tests/system/digdelv [netbsd-9]:
tests.sh
src/external/mpl/bind/dist/bin/tests/system/dnssec [netbsd-9]: tests.sh
src/external/mpl/bind/dist/bin/tests/system/dnssec/ns2 [netbsd-9]:
sign.sh
src/external/mpl/bind/dist/bin/tests/system/forward [netbsd-9]:
setup.sh tests.sh
src/external/mpl/bind/dist/bin/tests/system/forward/ns1 [netbsd-9]:
named.conf.in
src/external/mpl/bind/dist/bin/tests/system/forward/ns2 [netbsd-9]:
named.conf.in
src/external/mpl/bind/dist/bin/tests/system/glue [netbsd-9]: clean.sh
setup.sh
src/external/mpl/bind/dist/bin/tests/system/glue/ns1 [netbsd-9]:
named.conf.in root.db
src/external/mpl/bind/dist/bin/tests/system/idna [netbsd-9]: tests.sh
src/external/mpl/bind/dist/bin/tests/system/keymgr [netbsd-9]: tests.sh
src/external/mpl/bind/dist/bin/tests/system/resolver [netbsd-9]:
tests.sh
src/external/mpl/bind/dist/bin/tests/system/resolver/ns6 [netbsd-9]:
delegation-only.db
src/external/mpl/bind/dist/bin/tests/system/rpz [netbsd-9]: clean.sh
setup.sh tests.sh
src/external/mpl/bind/dist/bin/tests/system/rpz/ns3 [netbsd-9]:
named.conf.in
src/external/mpl/bind/dist/bin/tests/system/rpz/ns5 [netbsd-9]:
named.conf.in
src/external/mpl/bind/dist/bin/tests/system/statschannel [netbsd-9]:
tests.sh
src/external/mpl/bind/dist/bin/tests/system/win32 [netbsd-9]:
bigkey.vcxproj.in feature-test.vcxproj.in gencheck.vcxproj.in
keycreate.vcxproj.in keydelete.vcxproj.in pipequeries.vcxproj.in
src/external/mpl/bind/dist/bin/tests/system/xfer [netbsd-9]: tests.sh
src/external/mpl/bind/dist/bin/tests/win32 [netbsd-9]:
backtrace_test.vcxproj.in inter_test.vcxproj.in
makejournal.vcxproj.in rwlock_test.vcxproj.in
shutdown_test.vcxproj.in sock_test.vcxproj.in task_test.vcxproj.in
timer_test.vcxproj.in
src/external/mpl/bind/dist/bin/tools [netbsd-9]: mdig.c
src/external/mpl/bind/dist/bin/tools/win32 [netbsd-9]:
arpaname.vcxproj.in journalprint.vcxproj.in mdig.vcxproj.in
nsec3hash.vcxproj.in rrchecker.vcxproj.in
src/external/mpl/bind/dist/bin/win32/BINDInstall [netbsd-9]:
AccountInfo.cpp BINDInstall.rc BINDInstall.vcxproj.in
BINDInstallDlg.cpp DirBrowse.cpp VersionInfo.cpp resource.h
src/external/mpl/bind/dist/contrib/dlz/modules/mysqldyn 

CVS commit: [netbsd-9] src/sys/external/bsd/drm2/linux

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 19:17:46 UTC 2019

Modified Files:
src/sys/external/bsd/drm2/linux [netbsd-9]: linux_dma_buf.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #350):

sys/external/bsd/drm2/linux/linux_dma_buf.c: revision 1.6

correct error handling.
from Ilja Van Sprundel, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.6.1 src/sys/external/bsd/drm2/linux/linux_dma_buf.c

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



CVS commit: [netbsd-9] src/sys/external/bsd/drm2/linux

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 19:17:46 UTC 2019

Modified Files:
src/sys/external/bsd/drm2/linux [netbsd-9]: linux_dma_buf.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #350):

sys/external/bsd/drm2/linux/linux_dma_buf.c: revision 1.6

correct error handling.
from Ilja Van Sprundel, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.6.1 src/sys/external/bsd/drm2/linux/linux_dma_buf.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/external/bsd/drm2/linux/linux_dma_buf.c
diff -u src/sys/external/bsd/drm2/linux/linux_dma_buf.c:1.5 src/sys/external/bsd/drm2/linux/linux_dma_buf.c:1.5.6.1
--- src/sys/external/bsd/drm2/linux/linux_dma_buf.c:1.5	Fri Jan  4 23:03:02 2019
+++ src/sys/external/bsd/drm2/linux/linux_dma_buf.c	Thu Oct 17 19:17:45 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_dma_buf.c,v 1.5 2019/01/04 23:03:02 tnn Exp $	*/
+/*	$NetBSD: linux_dma_buf.c,v 1.5.6.1 2019/10/17 19:17:45 martin Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_dma_buf.c,v 1.5 2019/01/04 23:03:02 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_dma_buf.c,v 1.5.6.1 2019/10/17 19:17:45 martin Exp $");
 
 #include 
 #include 
@@ -133,11 +133,11 @@ dma_buf_get(int fd)
 
 	if ((file = fd_getfile(fd)) == NULL) {
 		error = EBADF;
-		goto fail1;
+		goto fail0;
 	}
 	if (file->f_type != DTYPE_MISC || file->f_ops != _fileops) {
 		error = EINVAL;
-		goto fail0;
+		goto fail1;
 	}
 
 	dmabuf = file->f_data;



CVS commit: [netbsd-9] src/doc

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 19:15:24 UTC 2019

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

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #349):

doc/CHANGES: revision 1.2599

evbarm: Add support for Amazon Graviton "a1.metal" instances.


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

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-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 19:15:24 UTC 2019

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

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #349):

doc/CHANGES: revision 1.2599

evbarm: Add support for Amazon Graviton "a1.metal" instances.


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2563 src/doc/CHANGES:1.2563.2.1
--- src/doc/CHANGES:1.2563	Tue Jul 30 14:57:06 2019
+++ src/doc/CHANGES	Thu Oct 17 19:15:24 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2563 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2563.2.1 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -417,3 +417,6 @@ Changes from NetBSD 8.0 to NetBSD 9.0:
 	dhcpcd(8): Import dhcpcd-8.0.1. [roy 20190725]
 	mac68k: Add genfb(4) framebuffer driver. [rin 20190726]
 	dhcpcd(8): Import dhcpcd-8.0.2. [roy 20190730]
+	evbarm: Add support for Amazon Graviton "a1.metal" instances.
+		 [jmcneill 20191015]
+



Re: CVS commit: src/doc

2019-10-17 Thread Martin Husemann
On Fri, Oct 18, 2019 at 06:08:55AM +1100, matthew green wrote:
> "Jared D. McNeill" writes:
> > Module Name:src
> > Committed By:   jmcneill
> > Date:   Thu Oct 17 09:38:07 UTC 2019
> > 
> > Modified Files:
> > src/doc: CHANGES
> > 
> > Log Message:
> > Amazon Graviton support is in 9.0, remove the changes entry.
> 
> is it in CHANGES.prev?  entries should move from CHANGES
> to CHANGES.prev when they're going to be part of a first
> release.. otherwise they're lost entirely.

Indeed - my fault, sorry Jared - can you fix it?

Martin


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

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 19:09:14 UTC 2019

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-9]: ixgbe.c

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

sys/dev/pci/ixgbe/ixgbe.c: revision 1.214

Apply FreeBSD r353599:
 > ixgbe: Disable EEE for backplane X550EM_X
 >
 > From Zach:
 > Intel documentation indicates that backplane X550EM_X KR devices do not
 > support Energy Efficient Ethernet. Prior to this patch, X552 devices
 > (device ID 0x15AB) will crash the system when transitioning EEE state
 > via sysctl.
 >
 > Signed-off-by: Zach Vargas 
 >
 > PR:  240320
 > Submitted by:Zach Vargas 
 > Reviewed by: erj@
 > MFC after:   3 days
 > Differential Revision:   https://reviews.freebsd.org/D21673


To generate a diff of this commit:
cvs rdiff -u -r1.199.2.5 -r1.199.2.6 src/sys/dev/pci/ixgbe/ixgbe.c

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



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

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 19:09:14 UTC 2019

Modified Files:
src/sys/dev/pci/ixgbe [netbsd-9]: ixgbe.c

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

sys/dev/pci/ixgbe/ixgbe.c: revision 1.214

Apply FreeBSD r353599:
 > ixgbe: Disable EEE for backplane X550EM_X
 >
 > From Zach:
 > Intel documentation indicates that backplane X550EM_X KR devices do not
 > support Energy Efficient Ethernet. Prior to this patch, X552 devices
 > (device ID 0x15AB) will crash the system when transitioning EEE state
 > via sysctl.
 >
 > Signed-off-by: Zach Vargas 
 >
 > PR:  240320
 > Submitted by:Zach Vargas 
 > Reviewed by: erj@
 > MFC after:   3 days
 > Differential Revision:   https://reviews.freebsd.org/D21673


To generate a diff of this commit:
cvs rdiff -u -r1.199.2.5 -r1.199.2.6 src/sys/dev/pci/ixgbe/ixgbe.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.199.2.5 src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.6
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.199.2.5	Thu Sep 26 19:07:22 2019
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Thu Oct 17 19:09:14 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.199.2.5 2019/09/26 19:07:22 martin Exp $ */
+/* $NetBSD: ixgbe.c,v 1.199.2.6 2019/10/17 19:09:14 martin Exp $ */
 
 /**
 
@@ -5860,7 +5860,7 @@ ixgbe_sysctl_eee_state(SYSCTLFN_ARGS)
 	if ((new_eee < 0) || (new_eee > 1))
 		return (EINVAL);
 
-	retval = adapter->hw.mac.ops.setup_eee(>hw, new_eee);
+	retval = ixgbe_setup_eee(>hw, new_eee);
 	if (retval) {
 		device_printf(dev, "Error in EEE setup: 0x%08X\n", retval);
 		return (EINVAL);
@@ -6034,8 +6034,6 @@ ixgbe_init_device_features(struct adapte
 		 */
 		adapter->feat_cap |= IXGBE_FEATURE_SRIOV;
 		adapter->feat_cap |= IXGBE_FEATURE_FDIR;
-		if (adapter->hw.device_id == IXGBE_DEV_ID_X550EM_X_KR)
-			adapter->feat_cap |= IXGBE_FEATURE_EEE;
 		break;
 	case ixgbe_mac_X550EM_a:
 		/*



re: CVS commit: src/doc

2019-10-17 Thread matthew green
"Jared D. McNeill" writes:
> Module Name:  src
> Committed By: jmcneill
> Date: Thu Oct 17 09:38:07 UTC 2019
> 
> Modified Files:
>   src/doc: CHANGES
> 
> Log Message:
> Amazon Graviton support is in 9.0, remove the changes entry.

is it in CHANGES.prev?  entries should move from CHANGES
to CHANGES.prev when they're going to be part of a first
release.. otherwise they're lost entirely.

thanks.


.mrg.


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

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 19:06:58 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-9]: ciphy.c rgephy.c

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

sys/dev/mii/ciphy.c: revision 1.35
sys/dev/mii/rgephy.c: revision 1.56
sys/dev/mii/rgephy.c: revision 1.57

Make new rgephy_linkup() function and share it like FreeBSD.
No functional change intended.

- Indicate master mode if the negotiated result say so.
- KNF


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.34.4.1 src/sys/dev/mii/ciphy.c
cvs rdiff -u -r1.55 -r1.55.2.1 src/sys/dev/mii/rgephy.c

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



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

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 19:06:58 UTC 2019

Modified Files:
src/sys/dev/mii [netbsd-9]: ciphy.c rgephy.c

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

sys/dev/mii/ciphy.c: revision 1.35
sys/dev/mii/rgephy.c: revision 1.56
sys/dev/mii/rgephy.c: revision 1.57

Make new rgephy_linkup() function and share it like FreeBSD.
No functional change intended.

- Indicate master mode if the negotiated result say so.
- KNF


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.34.4.1 src/sys/dev/mii/ciphy.c
cvs rdiff -u -r1.55 -r1.55.2.1 src/sys/dev/mii/rgephy.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/mii/ciphy.c
diff -u src/sys/dev/mii/ciphy.c:1.34 src/sys/dev/mii/ciphy.c:1.34.4.1
--- src/sys/dev/mii/ciphy.c:1.34	Thu Apr 11 09:14:07 2019
+++ src/sys/dev/mii/ciphy.c	Thu Oct 17 19:06:58 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ciphy.c,v 1.34 2019/04/11 09:14:07 msaitoh Exp $ */
+/* $NetBSD: ciphy.c,v 1.34.4.1 2019/10/17 19:06:58 martin Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.34 2019/04/11 09:14:07 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.34.4.1 2019/10/17 19:06:58 martin Exp $");
 
 /*
  * Driver for the Cicada CS8201 10/100/1000 copper PHY.
@@ -297,7 +297,7 @@ static void
 ciphy_status(struct mii_softc *sc)
 {
 	struct mii_data *mii = sc->mii_pdata;
-	uint16_t bmsr, bmcr;
+	uint16_t bmsr, bmcr, gtsr;
 
 	mii->mii_media_status = IFM_AVALID;
 	mii->mii_media_active = IFM_ETHER;
@@ -343,16 +343,19 @@ ciphy_status(struct mii_softc *sc)
 	else
 		mii->mii_media_active |= IFM_HDX;
 
-	return;
+	if (IFM_SUBTYPE(mii->mii_media_active) == IFM_1000_T) {
+		PHY_READ(sc, MII_GTSR, );
+		if ((gtsr & GTSR_MS_RES) != 0)
+			mii->mii_media_active |= IFM_ETH_MASTER;
+	}
 }
 
 static void
 ciphy_reset(struct mii_softc *sc)
 {
+
 	mii_phy_reset(sc);
 	DELAY(1000);
-
-	return;
 }
 
 static inline int
@@ -437,6 +440,4 @@ ciphy_fixup(struct mii_softc *sc)
 		model);
 		break;
 	}
-
-	return;
 }

Index: src/sys/dev/mii/rgephy.c
diff -u src/sys/dev/mii/rgephy.c:1.55 src/sys/dev/mii/rgephy.c:1.55.2.1
--- src/sys/dev/mii/rgephy.c:1.55	Wed Jun  5 17:50:06 2019
+++ src/sys/dev/mii/rgephy.c	Thu Oct 17 19:06:58 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: rgephy.c,v 1.55 2019/06/05 17:50:06 triaxx Exp $	*/
+/*	$NetBSD: rgephy.c,v 1.55.2.1 2019/10/17 19:06:58 martin Exp $	*/
 
 /*
  * Copyright (c) 2003
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.55 2019/06/05 17:50:06 triaxx Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rgephy.c,v 1.55.2.1 2019/10/17 19:06:58 martin Exp $");
 
 
 /*
@@ -75,6 +75,7 @@ static int	rgephy_service(struct mii_sof
 static void	rgephy_status(struct mii_softc *);
 static int	rgephy_mii_phy_auto(struct mii_softc *);
 static void	rgephy_reset(struct mii_softc *);
+static bool	rgephy_linkup(struct mii_softc *);
 static void	rgephy_loop(struct mii_softc *);
 static void	rgephy_load_dspcode(struct mii_softc *);
 
@@ -295,26 +296,9 @@ rgephy_service(struct mii_softc *sc, str
 		 * need to restart the autonegotiation process.  Read
 		 * the BMSR twice in case it's latched.
 		 */
-		if (sc->mii_mpd_rev >= RGEPHY_8211F) {
-			/* RTL8211F */
-			PHY_READ(sc, RGEPHY_MII_PHYSR, );
-			if (reg & RGEPHY_PHYSR_LINK) {
-sc->mii_ticks = 0;
-break;
-			}
-		} else if (sc->mii_mpd_rev >= RGEPHY_8211B) {
-			/* RTL8211B(L) */
-			PHY_READ(sc, RGEPHY_MII_SSR, );
-			if (reg & RGEPHY_SSR_LINK) {
-sc->mii_ticks = 0;
-break;
-			}
-		} else {
-			PHY_READ(sc, RTK_GMEDIASTAT, );
-			if ((reg & RTK_GMEDIASTAT_LINK) != 0) {
-sc->mii_ticks = 0;
-break;
-			}
+		if (rgephy_linkup(sc)) {
+			sc->mii_ticks = 0;
+			break;
 		}
 
 		/* Announce link loss right after it happens. */
@@ -345,28 +329,40 @@ rgephy_service(struct mii_softc *sc, str
 	return 0;
 }
 
+static bool
+rgephy_linkup(struct mii_softc *sc)
+{
+	bool linkup = false;
+	uint16_t reg;
+
+	if (sc->mii_mpd_rev >= RGEPHY_8211F) {
+		PHY_READ(sc, RGEPHY_MII_PHYSR, );
+		if (reg & RGEPHY_PHYSR_LINK)
+			linkup = true;
+	} else if (sc->mii_mpd_rev >= RGEPHY_8211B) {
+		PHY_READ(sc, RGEPHY_MII_SSR, );
+		if (reg & RGEPHY_SSR_LINK)
+			linkup = true;
+	} else {
+		PHY_READ(sc, RTK_GMEDIASTAT, );
+		if ((reg & RTK_GMEDIASTAT_LINK) != 0)
+			linkup = true;
+	}
+
+	return linkup;
+}
+
 static void
 rgephy_status(struct mii_softc *sc)
 {
 	struct mii_data *mii = sc->mii_pdata;
-	uint16_t gstat, bmsr, bmcr, physr, ssr;
+	uint16_t gstat, bmsr, bmcr, gtsr, physr, ssr;
 
 	mii->mii_media_status = IFM_AVALID;
 	mii->mii_media_active = IFM_ETHER;
 
-	if (sc->mii_mpd_rev >= RGEPHY_8211F) {
-		PHY_READ(sc, RGEPHY_MII_PHYSR, );
-		if (physr & RGEPHY_PHYSR_LINK)
-			mii->mii_media_status |= IFM_ACTIVE;
-	} else if (sc->mii_mpd_rev >= RGEPHY_8211B) {
-		

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

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 19:02:55 UTC 2019

Modified Files:
src/sys/dev/pci [netbsd-9]: if_et.c

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

sys/dev/pci/if_et.c: revision 1.27

Fix a bug that multicast address filter doesn't work correctly.
XXX pullup-[789].


To generate a diff of this commit:
cvs rdiff -u -r1.24.2.1 -r1.24.2.2 src/sys/dev/pci/if_et.c

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



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

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 19:02:55 UTC 2019

Modified Files:
src/sys/dev/pci [netbsd-9]: if_et.c

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

sys/dev/pci/if_et.c: revision 1.27

Fix a bug that multicast address filter doesn't work correctly.
XXX pullup-[789].


To generate a diff of this commit:
cvs rdiff -u -r1.24.2.1 -r1.24.2.2 src/sys/dev/pci/if_et.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_et.c
diff -u src/sys/dev/pci/if_et.c:1.24.2.1 src/sys/dev/pci/if_et.c:1.24.2.2
--- src/sys/dev/pci/if_et.c:1.24.2.1	Fri Aug  9 16:03:13 2019
+++ src/sys/dev/pci/if_et.c	Thu Oct 17 19:02:54 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_et.c,v 1.24.2.1 2019/08/09 16:03:13 martin Exp $	*/
+/*	$NetBSD: if_et.c,v 1.24.2.2 2019/10/17 19:02:54 martin Exp $	*/
 /*	$OpenBSD: if_et.c,v 1.12 2008/07/11 09:29:02 kevlo $	*/
 /*
  * Copyright (c) 2007 The DragonFly Project.  All rights reserved.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.24.2.1 2019/08/09 16:03:13 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.24.2.2 2019/10/17 19:02:54 martin Exp $");
 
 #include "opt_inet.h"
 #include "vlan.h"
@@ -1304,7 +1304,6 @@ et_setmulti(struct et_softc *sc)
 	uint32_t rxmac_ctrl, pktfilt;
 	struct ether_multi *enm;
 	struct ether_multistep step;
-	uint8_t addr[ETHER_ADDR_LEN];
 	int i, count;
 
 	pktfilt = CSR_READ_4(sc, ET_PKTFILT);
@@ -1316,19 +1315,13 @@ et_setmulti(struct et_softc *sc)
 		goto back;
 	}
 
-	bcopy(etherbroadcastaddr, addr, ETHER_ADDR_LEN);
-
 	count = 0;
 	ETHER_LOCK(ec);
 	ETHER_FIRST_MULTI(step, ec, enm);
 	while (enm != NULL) {
 		uint32_t *hp, h;
 
-		for (i = 0; i < ETHER_ADDR_LEN; i++) {
-			addr[i] &= enm->enm_addrlo[i];
-		}
-
-		h = ether_crc32_be(addr, ETHER_ADDR_LEN);
+		h = ether_crc32_be(enm->enm_addrlo, ETHER_ADDR_LEN);
 		h = (h & 0x3f80) >> 23;
 
 		hp = [0];



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

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 18:58:33 UTC 2019

Modified Files:
src/sys/dev/pci [netbsd-9]: if_vge.c if_vgereg.h

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

sys/dev/pci/if_vgereg.h: revision 1.5
sys/dev/pci/if_vge.c: revision 1.75

Copy vge_clrwol() from FreeBSD and call it in vge_attach() to recover from
powerdown mode. Fixes PR kern/41525 reported by Aran Clauson.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.73.2.1 src/sys/dev/pci/if_vge.c
cvs rdiff -u -r1.4 -r1.4.2.1 src/sys/dev/pci/if_vgereg.h

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



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

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 18:58:33 UTC 2019

Modified Files:
src/sys/dev/pci [netbsd-9]: if_vge.c if_vgereg.h

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

sys/dev/pci/if_vgereg.h: revision 1.5
sys/dev/pci/if_vge.c: revision 1.75

Copy vge_clrwol() from FreeBSD and call it in vge_attach() to recover from
powerdown mode. Fixes PR kern/41525 reported by Aran Clauson.


To generate a diff of this commit:
cvs rdiff -u -r1.73 -r1.73.2.1 src/sys/dev/pci/if_vge.c
cvs rdiff -u -r1.4 -r1.4.2.1 src/sys/dev/pci/if_vgereg.h

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

Modified files:

Index: src/sys/dev/pci/if_vge.c
diff -u src/sys/dev/pci/if_vge.c:1.73 src/sys/dev/pci/if_vge.c:1.73.2.1
--- src/sys/dev/pci/if_vge.c:1.73	Tue Jul  9 08:46:59 2019
+++ src/sys/dev/pci/if_vge.c	Thu Oct 17 18:58:33 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vge.c,v 1.73 2019/07/09 08:46:59 msaitoh Exp $ */
+/* $NetBSD: if_vge.c,v 1.73.2.1 2019/10/17 18:58:33 martin Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_vge.c,v 1.73 2019/07/09 08:46:59 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vge.c,v 1.73.2.1 2019/10/17 18:58:33 martin Exp $");
 
 /*
  * VIA Networking Technologies VT612x PCI gigabit ethernet NIC driver.
@@ -328,6 +328,7 @@ static void vge_miibus_statchg(struct if
 
 static void vge_cam_clear(struct vge_softc *);
 static int vge_cam_set(struct vge_softc *, uint8_t *);
+static void	vge_clrwol(struct vge_softc *);
 static void vge_setmulti(struct vge_softc *);
 static void vge_reset(struct vge_softc *);
 
@@ -953,6 +954,9 @@ vge_attach(device_t parent, device_t sel
 	aprint_normal_dev(self, "Ethernet address %s\n",
 	ether_sprintf(eaddr));
 
+	/* Clear WOL and take hardware from powerdown. */
+	vge_clrwol(sc);
+
 	/*
 	 * Use the 32bit tag. Hardware supports 48bit physical addresses,
 	 * but we don't use that for now.
@@ -2156,3 +2160,30 @@ vge_shutdown(device_t self, int howto)
 
 	return true;
 }
+
+static void
+vge_clrwol(struct vge_softc *sc)
+{
+	uint8_t val;
+
+	val = CSR_READ_1(sc, VGE_PWRSTAT);
+	val &= ~VGE_STICKHW_SWPTAG;
+	CSR_WRITE_1(sc, VGE_PWRSTAT, val);
+	/* Disable WOL and clear power state indicator. */
+	val = CSR_READ_1(sc, VGE_PWRSTAT);
+	val &= ~(VGE_STICKHW_DS0 | VGE_STICKHW_DS1);
+	CSR_WRITE_1(sc, VGE_PWRSTAT, val);
+
+	CSR_CLRBIT_1(sc, VGE_DIAGCTL, VGE_DIAGCTL_GMII);
+	CSR_CLRBIT_1(sc, VGE_DIAGCTL, VGE_DIAGCTL_MACFORCE);
+
+	/* Clear WOL on pattern match. */
+	CSR_WRITE_1(sc, VGE_WOLCR0C, VGE_WOLCR0_PATTERN_ALL);
+	/* Disable WOL on magic/unicast packet. */
+	CSR_WRITE_1(sc, VGE_WOLCR1C, 0x0F);
+	CSR_WRITE_1(sc, VGE_WOLCFGC, VGE_WOLCFG_SAB | VGE_WOLCFG_SAM |
+	VGE_WOLCFG_PMEOVR);
+	/* Clear WOL status on pattern match. */
+	CSR_WRITE_1(sc, VGE_WOLSR0C, 0xFF);
+	CSR_WRITE_1(sc, VGE_WOLSR1C, 0xFF);
+}

Index: src/sys/dev/pci/if_vgereg.h
diff -u src/sys/dev/pci/if_vgereg.h:1.4 src/sys/dev/pci/if_vgereg.h:1.4.2.1
--- src/sys/dev/pci/if_vgereg.h:1.4	Thu Jul 11 03:49:51 2019
+++ src/sys/dev/pci/if_vgereg.h	Thu Oct 17 18:58:33 2019
@@ -540,6 +540,31 @@
 #define VGE_TXBLOCK_128PKTS	0x08
 #define VGE_TXBLOCK_8PKTS	0x0C
 
+/* Sticky bit shadow register */
+
+#define	VGE_STICKHW_DS0		0x01
+#define	VGE_STICKHW_DS1		0x02
+#define	VGE_STICKHW_WOL_ENB	0x04
+#define	VGE_STICKHW_WOL_STS	0x08
+#define	VGE_STICKHW_SWPTAG	0x10
+
+/* WOL pattern control */
+#define	VGE_WOLCR0_PATTERN0	0x01
+#define	VGE_WOLCR0_PATTERN1	0x02
+#define	VGE_WOLCR0_PATTERN2	0x04
+#define	VGE_WOLCR0_PATTERN3	0x08
+#define	VGE_WOLCR0_PATTERN4	0x10
+#define	VGE_WOLCR0_PATTERN5	0x20
+#define	VGE_WOLCR0_PATTERN6	0x40
+#define	VGE_WOLCR0_PATTERN7	0x80
+#define	VGE_WOLCR0_PATTERN_ALL	0xFF
+
+/* WOL config register */
+#define	VGE_WOLCFG_PHYINT_ENB	0x01
+#define	VGE_WOLCFG_SAB		0x10
+#define	VGE_WOLCFG_SAM		0x20
+#define	VGE_WOLCFG_PMEOVR	0x80
+
 /* EEPROM control/status register */
 
 #define VGE_EECSR_EDO		0x01	/* data out pin */



CVS commit: [netbsd-9] src

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 18:56:25 UTC 2019

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

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

sys/arch/x86/include/specialreg.h: revision 1.154
sys/arch/x86/include/specialreg.h: revision 1.155
usr.sbin/cpuctl/arch/i386.c: revision 1.107
sys/arch/x86/x86/procfs_machdep.c: revision 1.34

- Add definitions of AMD's CPUID Fn8000_001f Encrypted Memory features.
- Add definition of AMD's CPUID Fn8000_000a %edx bit 11 "GMET".
- Define CPUID_AMD_SVM_PFThreshold correctly.
- Modify comment a bit for consistency.

 Fix AMD Fn8000_0001f %eax bit 0's name.

Add rdpru.


To generate a diff of this commit:
cvs rdiff -u -r1.150.2.1 -r1.150.2.2 src/sys/arch/x86/include/specialreg.h
cvs rdiff -u -r1.33 -r1.33.2.1 src/sys/arch/x86/x86/procfs_machdep.c
cvs rdiff -u -r1.104.2.2 -r1.104.2.3 src/usr.sbin/cpuctl/arch/i386.c

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



CVS commit: [netbsd-9] src

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 18:56:25 UTC 2019

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

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

sys/arch/x86/include/specialreg.h: revision 1.154
sys/arch/x86/include/specialreg.h: revision 1.155
usr.sbin/cpuctl/arch/i386.c: revision 1.107
sys/arch/x86/x86/procfs_machdep.c: revision 1.34

- Add definitions of AMD's CPUID Fn8000_001f Encrypted Memory features.
- Add definition of AMD's CPUID Fn8000_000a %edx bit 11 "GMET".
- Define CPUID_AMD_SVM_PFThreshold correctly.
- Modify comment a bit for consistency.

 Fix AMD Fn8000_0001f %eax bit 0's name.

Add rdpru.


To generate a diff of this commit:
cvs rdiff -u -r1.150.2.1 -r1.150.2.2 src/sys/arch/x86/include/specialreg.h
cvs rdiff -u -r1.33 -r1.33.2.1 src/sys/arch/x86/x86/procfs_machdep.c
cvs rdiff -u -r1.104.2.2 -r1.104.2.3 src/usr.sbin/cpuctl/arch/i386.c

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

Modified files:

Index: src/sys/arch/x86/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.150.2.1 src/sys/arch/x86/include/specialreg.h:1.150.2.2
--- src/sys/arch/x86/include/specialreg.h:1.150.2.1	Thu Sep 26 18:47:14 2019
+++ src/sys/arch/x86/include/specialreg.h	Thu Oct 17 18:56:24 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.150.2.1 2019/09/26 18:47:14 martin Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.150.2.2 2019/10/17 18:56:24 martin Exp $	*/
 
 /*
  * Copyright (c) 2014-2019 The NetBSD Foundation, Inc.
@@ -646,7 +646,7 @@
 	"\31" "FXSR"	"\32" "FFXSR"	"\33" "P1GB"	"\34" "RDTSCP"	\
 			"\36" "LONG"	"\37" "3DNOW2"	"\40" "3DNOW"
 
-/* AMD Fn8001 extended features - %ecx */
+/* AMD Fn8000_0001 extended features - %ecx */
 /* 	CPUID_LAHF			   LAHF/SAHF instruction */
 #define CPUID_CMPLEGACY	0x0002	/* Compare Legacy */
 #define CPUID_SVM	0x0004	/* Secure Virtual Machine */
@@ -745,7 +745,7 @@
 	"\21IBRS_ALWAYSON" "\22STIBP_ALWAYSON" "\23PREFER_IBRS"	"\24B19" \
 	"\31SSBD"	"\32VIRT_SSBD"	"\33SSB_NO"
 
-/* AMD Fn800a %edx features (SVM features) */
+/* AMD Fn8000_000a %edx features (SVM features) */
 #define CPUID_AMD_SVM_NP		0x0001
 #define CPUID_AMD_SVM_LbrVirt		0x0002
 #define CPUID_AMD_SVM_SVML		0x0004
@@ -755,7 +755,8 @@
 #define CPUID_AMD_SVM_FlushByASID	0x0040
 #define CPUID_AMD_SVM_DecodeAssist	0x0080
 #define CPUID_AMD_SVM_PauseFilter	0x0400
-#define CPUID_AMD_SVM_PFThreshold	0x0x001000 /* PAUSE filter threshold */
+#define CPUID_AMD_SVM_GMET		0x0800
+#define CPUID_AMD_SVM_PFThreshold	0x1000 /* PAUSE filter threshold */
 #define CPUID_AMD_SVM_AVIC		0x2000 /* AMD Virtual intr. ctrl */
 #define CPUID_AMD_SVM_V_VMSAVE_VMLOAD	0x8000 /* Virtual VM{SAVE/LOAD} */
 #define CPUID_AMD_SVM_vGIF		0x0001 /* Virtualized GIF */
@@ -763,13 +764,13 @@
 	"\1" "NP"	"\2" "LbrVirt"	"\3" "SVML"	"\4" "NRIPS"	\
 	"\5" "TSCRate"	"\6" "VMCBCleanBits" \
 			"\7" "FlushByASID" "\10" "DecodeAssist"	\
-	"\11" "B08"	"\12" "B09"	"\13" "PauseFilter" "\14" "B11" \
+	"\11" "B08"	"\12" "B09"	"\13" "PauseFilter" "\14" "GMET" \
 	"\15" "PFThreshold" "\16" "AVIC" "\17" "B14"			\
 		"\20" "V_VMSAVE_VMLOAD"	\
 	"\21" "VGIF"
 
 /*
- * AMD Fn8000_0001d  Cache Topology Information.
+ * AMD Fn8000_0001d Cache Topology Information.
  * It's almost the same as Intel Deterministic Cache Parameter Leaf(0x04)
  * except the following:
  *	No Cores/package (%eax bit 31..26)
@@ -777,6 +778,24 @@
  */
 
 /*
+ * AMD Fn8000_0001f Encrypted Memory Capabilities.
+ * %eax: flags
+ * %ebx:  5-0: Cbit Position
+ *   11-6: PhysAddrReduction
+ * %ecx: 31-0: NumEncryptedGuests
+ * %edx: 31-0: MinSevNoEsAsid
+ */
+#define CPUID_AMD_ENCMEM_SME	__BIT(0)   /* Secure Memory Encryption */
+#define CPUID_AMD_ENCMEM_SEV	__BIT(1)   /* Secure Encrypted Virtualiz. */
+#define CPUID_AMD_ENCMEM_PGFLMSR __BIT(2)  /* Page Flush MSR */
+#define CPUID_AMD_ENCMEM_SEVES	__BIT(3)   /* SEV Encrypted State */
+#define CPUID_AMD_ENCMEM_VTE	__BIT(16)  /* Virtual Transparent Encryption */
+
+#define CPUID_AMD_ENCMEM_FLAGS	 "\20"	  \
+	"\1" "SME"	"\2" "SEV"	"\3" "PageFlushMsr"	"\4" "SEV-ES" \
+	"\21" "VTE"
+
+/*
  * Centaur Extended Feature flags
  */
 #define CPUID_VIA_HAS_RNG	0x0004	/* Random number generator */

Index: src/sys/arch/x86/x86/procfs_machdep.c
diff -u src/sys/arch/x86/x86/procfs_machdep.c:1.33 src/sys/arch/x86/x86/procfs_machdep.c:1.33.2.1
--- src/sys/arch/x86/x86/procfs_machdep.c:1.33	Wed Jul 24 04:58:26 2019
+++ src/sys/arch/x86/x86/procfs_machdep.c	Thu Oct 17 18:56:25 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_machdep.c,v 1.33 2019/07/24 04:58:26 msaitoh Exp $ */
+/*	$NetBSD: procfs_machdep.c,v 1.33.2.1 2019/10/17 18:56:25 martin Exp $ */
 
 /*
  * Copyright 

CVS commit: [netbsd-9] src/sys/dev/usb

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 18:53:26 UTC 2019

Modified Files:
src/sys/dev/usb [netbsd-9]: if_ure.c

Log Message:
Pull up following revision(s) (requested by bad in ticket #343):

sys/dev/usb/if_ure.c: revision 1.32
sys/dev/usb/if_ure.c: revision 1.33

read mac address of ure version 4c10 from URE_PLA_IDR, save as 4c00.
from ganbold@freebsd r346052.
XXX pullup-9

 -

allocate a random mac address if on-chip mac is all zeroes.
helps ure(4) on NanoPi R1.
partly from ganbold@freebsd r346052.
XXX pullup-9


To generate a diff of this commit:
cvs rdiff -u -r1.14.2.1 -r1.14.2.2 src/sys/dev/usb/if_ure.c

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



CVS commit: [netbsd-9] src/sys/dev/usb

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 18:53:26 UTC 2019

Modified Files:
src/sys/dev/usb [netbsd-9]: if_ure.c

Log Message:
Pull up following revision(s) (requested by bad in ticket #343):

sys/dev/usb/if_ure.c: revision 1.32
sys/dev/usb/if_ure.c: revision 1.33

read mac address of ure version 4c10 from URE_PLA_IDR, save as 4c00.
from ganbold@freebsd r346052.
XXX pullup-9

 -

allocate a random mac address if on-chip mac is all zeroes.
helps ure(4) on NanoPi R1.
partly from ganbold@freebsd r346052.
XXX pullup-9


To generate a diff of this commit:
cvs rdiff -u -r1.14.2.1 -r1.14.2.2 src/sys/dev/usb/if_ure.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/if_ure.c
diff -u src/sys/dev/usb/if_ure.c:1.14.2.1 src/sys/dev/usb/if_ure.c:1.14.2.2
--- src/sys/dev/usb/if_ure.c:1.14.2.1	Sun Sep  1 13:00:36 2019
+++ src/sys/dev/usb/if_ure.c	Thu Oct 17 18:53:25 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ure.c,v 1.14.2.1 2019/09/01 13:00:36 martin Exp $	*/
+/*	$NetBSD: if_ure.c,v 1.14.2.2 2019/10/17 18:53:25 martin Exp $	*/
 /*	$OpenBSD: if_ure.c,v 1.10 2018/11/02 21:32:30 jcs Exp $	*/
 
 /*-
@@ -30,7 +30,7 @@
 /* RealTek RTL8152/RTL8153 10/100/Gigabit USB Ethernet device */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ure.c,v 1.14.2.1 2019/09/01 13:00:36 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ure.c,v 1.14.2.2 2019/10/17 18:53:25 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -38,6 +38,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_ure.c,v 1
 #endif
 
 #include 
+#include 
 
 #include 
 
@@ -66,6 +67,9 @@ int	uredebug = 0;
 #define DPRINTFN(n, x)
 #endif
 
+#define ETHER_IS_ZERO(addr) \
+	(!(addr[0] | addr[1] | addr[2] | addr[3] | addr[4] | addr[5]))
+
 static const struct usb_devno ure_devs[] = {
 	{ USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8152 },
 	{ USB_VENDOR_REALTEK, USB_PRODUCT_REALTEK_RTL8153 }
@@ -848,6 +852,7 @@ ure_attach(device_t parent, device_t sel
 	uint16_t ver;
 	uint8_t eaddr[8]; /* 2byte padded */
 	char *devinfop;
+	uint32_t maclo, machi;
 
 	aprint_naive("\n");
 	aprint_normal("\n");
@@ -941,13 +946,24 @@ ure_attach(device_t parent, device_t sel
 	else
 		ure_rtl8153_init(un);
 
-	if (un->un_flags & URE_FLAG_VER_4C00)
+	if ((un->un_flags & URE_FLAG_VER_4C00) ||
+	(un->un_flags & URE_FLAG_VER_4C10))
 		ure_read_mem(un, URE_PLA_IDR, URE_MCU_TYPE_PLA, eaddr,
 		sizeof(eaddr));
 	else
 		ure_read_mem(un, URE_PLA_BACKUP, URE_MCU_TYPE_PLA, eaddr,
 		sizeof(eaddr));
 	usbnet_unlock(un);
+	if (ETHER_IS_ZERO(eaddr)) {
+		maclo = 0x00f2 | (cprng_strong32() & 0x);
+		machi = cprng_strong32() & 0x;
+		eaddr[0] = maclo & 0xff;
+		eaddr[1] = (maclo >> 8) & 0xff;
+		eaddr[2] = (maclo >> 16) & 0xff;
+		eaddr[3] = (maclo >> 24) & 0xff;
+		eaddr[4] = machi & 0xff;
+		eaddr[5] = (machi >> 8) & 0xff;
+	}
 	memcpy(un->un_eaddr, eaddr, sizeof un->un_eaddr);
 
 	struct ifnet *ifp = usbnet_ifp(un);



CVS commit: [netbsd-9] src/doc

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 18:48:55 UTC 2019

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

Log Message:
Ticket #341


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.79 -r1.1.2.80 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.79 src/doc/CHANGES-9.0:1.1.2.80
--- src/doc/CHANGES-9.0:1.1.2.79	Wed Oct 16 17:43:35 2019
+++ src/doc/CHANGES-9.0	Thu Oct 17 18:48:55 2019
@@ -1,5 +1,5 @@
 
-# $NetBSD: CHANGES-9.0,v 1.1.2.79 2019/10/16 17:43:35 martin Exp $
+# $NetBSD: CHANGES-9.0,v 1.1.2.80 2019/10/17 18:48:55 martin Exp $
 
 A complete list of changes from the initial NetBSD 9.0 branch on 2019-07-30
 until the 9.0 release:
@@ -4740,3 +4740,11 @@ src/doc/3RDPARTY(manually edited)
 	Import dhcpcd-8.1.1.
 	[roy, ticket #340]
 
+sys/arch/arm/dts/sun8i-h3-nanopi-duo2.dts	1.1
+sys/arch/arm/dts/sun8i-h3-nanopi-r1.dts		1.1
+sys/arch/arm/dts/sun8i-h3-nanopi-r1.dts		1.2
+sys/arch/evbarm/conf/GENERIC			1.54
+
+	Add support (dtb files) for NanoPi R1 and Duo2.
+	[bad, ticket #341]
+



CVS commit: [netbsd-9] src/doc

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 18:48:55 UTC 2019

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

Log Message:
Ticket #341


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.79 -r1.1.2.80 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/sys/arch

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 18:47:48 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf [netbsd-9]: GENERIC
Added Files:
src/sys/arch/arm/dts [netbsd-9]: sun8i-h3-nanopi-duo2.dts
sun8i-h3-nanopi-r1.dts

Log Message:
Pull up following revision(s) (requested by bad in ticket #341):

sys/arch/evbarm/conf/GENERIC: revision 1.54
sys/arch/arm/dts/sun8i-h3-nanopi-r1.dts: revision 1.1
sys/arch/arm/dts/sun8i-h3-nanopi-r1.dts: revision 1.2
sys/arch/arm/dts/sun8i-h3-nanopi-duo2.dts: revision 1.1

Add sun8i-h3-nanopi-r1.dts and sun8i-h3-nanopi-duo2.dts.

>From 
>https://github.com/armbian/build/blob/master/patch/kernel/sunxi-next/xxx-add-nanopi-r1-and-duo2.patch
Cherry pick a few changes from the armbian u-boot patch.

Makes my NanoPi R1 boot reliably.

>From 
>https://github.com/armbian/build/blob/master/patch/u-boot/u-boot-sunxi/add-nano+pi-r1-and-duo2.patch
Add sun8i-h3-nanopi-duo2.dts and sun8i-h3-nanopi-r1.dts.

The former is untested.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.2 src/sys/arch/arm/dts/sun8i-h3-nanopi-duo2.dts
cvs rdiff -u -r0 -r1.2.2.2 src/sys/arch/arm/dts/sun8i-h3-nanopi-r1.dts
cvs rdiff -u -r1.48.2.2 -r1.48.2.3 src/sys/arch/evbarm/conf/GENERIC

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



CVS commit: [netbsd-9] src/sys/arch

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 18:47:48 UTC 2019

Modified Files:
src/sys/arch/evbarm/conf [netbsd-9]: GENERIC
Added Files:
src/sys/arch/arm/dts [netbsd-9]: sun8i-h3-nanopi-duo2.dts
sun8i-h3-nanopi-r1.dts

Log Message:
Pull up following revision(s) (requested by bad in ticket #341):

sys/arch/evbarm/conf/GENERIC: revision 1.54
sys/arch/arm/dts/sun8i-h3-nanopi-r1.dts: revision 1.1
sys/arch/arm/dts/sun8i-h3-nanopi-r1.dts: revision 1.2
sys/arch/arm/dts/sun8i-h3-nanopi-duo2.dts: revision 1.1

Add sun8i-h3-nanopi-r1.dts and sun8i-h3-nanopi-duo2.dts.

>From 
>https://github.com/armbian/build/blob/master/patch/kernel/sunxi-next/xxx-add-nanopi-r1-and-duo2.patch
Cherry pick a few changes from the armbian u-boot patch.

Makes my NanoPi R1 boot reliably.

>From 
>https://github.com/armbian/build/blob/master/patch/u-boot/u-boot-sunxi/add-nano+pi-r1-and-duo2.patch
Add sun8i-h3-nanopi-duo2.dts and sun8i-h3-nanopi-r1.dts.

The former is untested.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1.2.2 src/sys/arch/arm/dts/sun8i-h3-nanopi-duo2.dts
cvs rdiff -u -r0 -r1.2.2.2 src/sys/arch/arm/dts/sun8i-h3-nanopi-r1.dts
cvs rdiff -u -r1.48.2.2 -r1.48.2.3 src/sys/arch/evbarm/conf/GENERIC

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

Modified files:

Index: src/sys/arch/evbarm/conf/GENERIC
diff -u src/sys/arch/evbarm/conf/GENERIC:1.48.2.2 src/sys/arch/evbarm/conf/GENERIC:1.48.2.3
--- src/sys/arch/evbarm/conf/GENERIC:1.48.2.2	Sun Oct  6 11:19:25 2019
+++ src/sys/arch/evbarm/conf/GENERIC	Thu Oct 17 18:47:47 2019
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC,v 1.48.2.2 2019/10/06 11:19:25 martin Exp $
+#	$NetBSD: GENERIC,v 1.48.2.3 2019/10/17 18:47:47 martin Exp $
 #
 #	GENERIC ARM (aarch32) kernel
 #
@@ -123,8 +123,10 @@ makeoptions	DTS="
 	sun8i-h3-beelink-x2.dts
 	sun8i-h3-libretech-all-h3-cc.dts
 	sun8i-h3-mapleboard-mp130.dts
+	sun8i-h3-nanopi-duo2.dts
 	sun8i-h3-nanopi-m1-plus.dts
 	sun8i-h3-nanopi-m1.dts
+	sun8i-h3-nanopi-r1.dts
 	sun8i-h3-nanopi-neo.dts
 	sun8i-h3-nanopi-neo-air.dts
 	sun8i-h3-orangepi-2.dts

Added files:

Index: src/sys/arch/arm/dts/sun8i-h3-nanopi-duo2.dts
diff -u /dev/null src/sys/arch/arm/dts/sun8i-h3-nanopi-duo2.dts:1.1.2.2
--- /dev/null	Thu Oct 17 18:47:48 2019
+++ src/sys/arch/arm/dts/sun8i-h3-nanopi-duo2.dts	Thu Oct 17 18:47:48 2019
@@ -0,0 +1,99 @@
+/* $NetBSD: sun8i-h3-nanopi-duo2.dts,v 1.1.2.2 2019/10/17 18:47:48 martin Exp $ */
+
+/*
+ * Copyright (C) 2019 Igor 
+ *
+ * This file is dual-licensed: you can use it either under the terms
+ * of the GPL or the X11 license, at your option. Note that this dual
+ * licensing only applies to this file, and not this project as a
+ * whole.
+ *
+ *  a) This file is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; either version 2 of the
+ * License, or (at your option) any later version.
+ *
+ * This file is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * Or, alternatively,
+ *
+ *  b) Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use,
+ * copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the
+ * Software is furnished to do so, subject to the following
+ * conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+ * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+ * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+ * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+ * OTHER DEALINGS IN THE SOFTWARE.
+ */
+
+#include "sun8i-h3-nanopi.dtsi"
+
+/ {
+	model = "FriendlyElec NanoPi-Duo2";
+	compatible = "friendlyarm,nanopi-duo2", "allwinner,sun8i-h3";
+
+	wifi_pwrseq: wifi_pwrseq {
+		compatible = "mmc-pwrseq-simple";
+		pinctrl-names = "default";
+		reset-gpios = <_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
+		post-power-on-delay-ms = <200>;
+	};
+
+};
+
+_pio {
+	wifi_en_npi: wifi_en_pin {
+		pins = "PL7";
+		function = "gpio_out";
+	};
+};
+
+ {
+	

CVS commit: [netbsd-8] src/doc

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 18:41:27 UTC 2019

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

Log Message:
Tickets #1406 - #1408


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.51 -r1.1.2.52 src/doc/CHANGES-8.2

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



CVS commit: [netbsd-8] src/doc

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 18:41:27 UTC 2019

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

Log Message:
Tickets #1406 - #1408


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.51 -r1.1.2.52 src/doc/CHANGES-8.2

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

Modified files:

Index: src/doc/CHANGES-8.2
diff -u src/doc/CHANGES-8.2:1.1.2.51 src/doc/CHANGES-8.2:1.1.2.52
--- src/doc/CHANGES-8.2:1.1.2.51	Tue Oct 15 04:24:16 2019
+++ src/doc/CHANGES-8.2	Thu Oct 17 18:41:27 2019
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.2,v 1.1.2.51 2019/10/15 04:24:16 martin Exp $
+# $NetBSD: CHANGES-8.2,v 1.1.2.52 2019/10/17 18:41:27 martin Exp $
 
 A complete list of changes from the NetBSD 8.1 release to the NetBSD 8.2
 release:
@@ -1283,3 +1283,19 @@ sys/kern/vnode_if.c(regen)
 	Add fstrans type LAZY and use it for VOP_STRATEGY().
 	[hannken, ticket #1405]
 
+sys/dev/pci/if_vge.c1.75
+sys/dev/pci/if_vgereg.h1.5
+
+	Properly recover from powerdown mode.
+	[msaitoh, ticket #1406]
+
+sys/dev/pci/if_et.c 1.27 via patch
+
+	Fix a bug that multicast address filter doesn't work correctly.
+	[msaitoh, ticket #1407]
+
+sys/dev/pci/ixgbe/ixgbe.c			1.214
+
+	Disable EEE for backplane X550EM_X.
+	[msaitoh, ticket #1408]
+



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

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 18:39:42 UTC 2019

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

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

sys/dev/pci/ixgbe/ixgbe.c: revision 1.214

Apply FreeBSD r353599:
 > ixgbe: Disable EEE for backplane X550EM_X
 >
 > From Zach:
 > Intel documentation indicates that backplane X550EM_X KR devices do not
 > support Energy Efficient Ethernet. Prior to this patch, X552 devices
 > (device ID 0x15AB) will crash the system when transitioning EEE state
 > via sysctl.
 >
 > Signed-off-by: Zach Vargas 
 >
 > PR:  240320
 > Submitted by:Zach Vargas 
 > Reviewed by: erj@
 > MFC after:   3 days
 > Differential Revision:   https://reviews.freebsd.org/D21673


To generate a diff of this commit:
cvs rdiff -u -r1.88.2.35 -r1.88.2.36 src/sys/dev/pci/ixgbe/ixgbe.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.88.2.35 src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.36
--- src/sys/dev/pci/ixgbe/ixgbe.c:1.88.2.35	Thu Sep 26 18:19:26 2019
+++ src/sys/dev/pci/ixgbe/ixgbe.c	Thu Oct 17 18:39:41 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ixgbe.c,v 1.88.2.35 2019/09/26 18:19:26 martin Exp $ */
+/* $NetBSD: ixgbe.c,v 1.88.2.36 2019/10/17 18:39:41 martin Exp $ */
 
 /**
 
@@ -5819,7 +5819,7 @@ ixgbe_sysctl_eee_state(SYSCTLFN_ARGS)
 	if ((new_eee < 0) || (new_eee > 1))
 		return (EINVAL);
 
-	retval = adapter->hw.mac.ops.setup_eee(>hw, new_eee);
+	retval = ixgbe_setup_eee(>hw, new_eee);
 	if (retval) {
 		device_printf(dev, "Error in EEE setup: 0x%08X\n", retval);
 		return (EINVAL);
@@ -5993,8 +5993,6 @@ ixgbe_init_device_features(struct adapte
 		 */
 		adapter->feat_cap |= IXGBE_FEATURE_SRIOV;
 		adapter->feat_cap |= IXGBE_FEATURE_FDIR;
-		if (adapter->hw.device_id == IXGBE_DEV_ID_X550EM_X_KR)
-			adapter->feat_cap |= IXGBE_FEATURE_EEE;
 		break;
 	case ixgbe_mac_X550EM_a:
 		/*



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

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 18:39:42 UTC 2019

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

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

sys/dev/pci/ixgbe/ixgbe.c: revision 1.214

Apply FreeBSD r353599:
 > ixgbe: Disable EEE for backplane X550EM_X
 >
 > From Zach:
 > Intel documentation indicates that backplane X550EM_X KR devices do not
 > support Energy Efficient Ethernet. Prior to this patch, X552 devices
 > (device ID 0x15AB) will crash the system when transitioning EEE state
 > via sysctl.
 >
 > Signed-off-by: Zach Vargas 
 >
 > PR:  240320
 > Submitted by:Zach Vargas 
 > Reviewed by: erj@
 > MFC after:   3 days
 > Differential Revision:   https://reviews.freebsd.org/D21673


To generate a diff of this commit:
cvs rdiff -u -r1.88.2.35 -r1.88.2.36 src/sys/dev/pci/ixgbe/ixgbe.c

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



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

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 18:36:44 UTC 2019

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

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

sys/dev/pci/if_et.c 1.27 via patch

Fix a bug that multicast address filter doesn't work correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.14.8.3 -r1.14.8.4 src/sys/dev/pci/if_et.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_et.c
diff -u src/sys/dev/pci/if_et.c:1.14.8.3 src/sys/dev/pci/if_et.c:1.14.8.4
--- src/sys/dev/pci/if_et.c:1.14.8.3	Tue Aug  6 16:10:17 2019
+++ src/sys/dev/pci/if_et.c	Thu Oct 17 18:36:44 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_et.c,v 1.14.8.3 2019/08/06 16:10:17 martin Exp $	*/
+/*	$NetBSD: if_et.c,v 1.14.8.4 2019/10/17 18:36:44 martin Exp $	*/
 /*	$OpenBSD: if_et.c,v 1.12 2008/07/11 09:29:02 kevlo $	*/
 /*
  * Copyright (c) 2007 The DragonFly Project.  All rights reserved.
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.14.8.3 2019/08/06 16:10:17 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_et.c,v 1.14.8.4 2019/10/17 18:36:44 martin Exp $");
 
 #include "opt_inet.h"
 #include "vlan.h"
@@ -1302,7 +1302,6 @@ et_setmulti(struct et_softc *sc)
 	uint32_t rxmac_ctrl, pktfilt;
 	struct ether_multi *enm;
 	struct ether_multistep step;
-	uint8_t addr[ETHER_ADDR_LEN];
 	int i, count;
 
 	pktfilt = CSR_READ_4(sc, ET_PKTFILT);
@@ -1314,19 +1313,12 @@ et_setmulti(struct et_softc *sc)
 		goto back;
 	}
 
-	bcopy(etherbroadcastaddr, addr, ETHER_ADDR_LEN);
-
 	count = 0;
 	ETHER_FIRST_MULTI(step, ec, enm);
 	while (enm != NULL) {
 		uint32_t *hp, h;
 
-		for (i = 0; i < ETHER_ADDR_LEN; i++) {
-			addr[i] &= enm->enm_addrlo[i];
-		}
-
-		h = ether_crc32_be(LLADDR((struct sockaddr_dl *)addr),
-		ETHER_ADDR_LEN);
+		h = ether_crc32_be(enm->enm_addrlo, ETHER_ADDR_LEN);
 		h = (h & 0x3f80) >> 23;
 
 		hp = [0];



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

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 18:36:44 UTC 2019

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

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

sys/dev/pci/if_et.c 1.27 via patch

Fix a bug that multicast address filter doesn't work correctly.


To generate a diff of this commit:
cvs rdiff -u -r1.14.8.3 -r1.14.8.4 src/sys/dev/pci/if_et.c

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



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

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 18:27:36 UTC 2019

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

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

sys/dev/pci/if_vgereg.h: revision 1.5
sys/dev/pci/if_vge.c: revision 1.75

Copy vge_clrwol() from FreeBSD and call it in vge_attach() to recover from
powerdown mode. Fixes PR kern/41525 reported by Aran Clauson.


To generate a diff of this commit:
cvs rdiff -u -r1.60.8.2 -r1.60.8.3 src/sys/dev/pci/if_vge.c
cvs rdiff -u -r1.3 -r1.3.134.1 src/sys/dev/pci/if_vgereg.h

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



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

2019-10-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 17 18:27:36 UTC 2019

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

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

sys/dev/pci/if_vgereg.h: revision 1.5
sys/dev/pci/if_vge.c: revision 1.75

Copy vge_clrwol() from FreeBSD and call it in vge_attach() to recover from
powerdown mode. Fixes PR kern/41525 reported by Aran Clauson.


To generate a diff of this commit:
cvs rdiff -u -r1.60.8.2 -r1.60.8.3 src/sys/dev/pci/if_vge.c
cvs rdiff -u -r1.3 -r1.3.134.1 src/sys/dev/pci/if_vgereg.h

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

Modified files:

Index: src/sys/dev/pci/if_vge.c
diff -u src/sys/dev/pci/if_vge.c:1.60.8.2 src/sys/dev/pci/if_vge.c:1.60.8.3
--- src/sys/dev/pci/if_vge.c:1.60.8.2	Mon May 13 12:40:13 2019
+++ src/sys/dev/pci/if_vge.c	Thu Oct 17 18:27:36 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: if_vge.c,v 1.60.8.2 2019/05/13 12:40:13 martin Exp $ */
+/* $NetBSD: if_vge.c,v 1.60.8.3 2019/10/17 18:27:36 martin Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_vge.c,v 1.60.8.2 2019/05/13 12:40:13 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_vge.c,v 1.60.8.3 2019/10/17 18:27:36 martin Exp $");
 
 /*
  * VIA Networking Technologies VT612x PCI gigabit ethernet NIC driver.
@@ -329,6 +329,7 @@ static void vge_miibus_statchg(struct if
 
 static void vge_cam_clear(struct vge_softc *);
 static int vge_cam_set(struct vge_softc *, uint8_t *);
+static void	vge_clrwol(struct vge_softc *);
 static void vge_setmulti(struct vge_softc *);
 static void vge_reset(struct vge_softc *);
 
@@ -999,6 +1000,9 @@ vge_attach(device_t parent, device_t sel
 	aprint_normal_dev(self, "Ethernet address: %s\n",
 	ether_sprintf(eaddr));
 
+	/* Clear WOL and take hardware from powerdown. */
+	vge_clrwol(sc);
+
 	/*
 	 * Use the 32bit tag. Hardware supports 48bit physical addresses,
 	 * but we don't use that for now.
@@ -2202,3 +2206,30 @@ vge_shutdown(device_t self, int howto)
 
 	return true;
 }
+
+static void
+vge_clrwol(struct vge_softc *sc)
+{
+	uint8_t val;
+
+	val = CSR_READ_1(sc, VGE_PWRSTAT);
+	val &= ~VGE_STICKHW_SWPTAG;
+	CSR_WRITE_1(sc, VGE_PWRSTAT, val);
+	/* Disable WOL and clear power state indicator. */
+	val = CSR_READ_1(sc, VGE_PWRSTAT);
+	val &= ~(VGE_STICKHW_DS0 | VGE_STICKHW_DS1);
+	CSR_WRITE_1(sc, VGE_PWRSTAT, val);
+
+	CSR_CLRBIT_1(sc, VGE_DIAGCTL, VGE_DIAGCTL_GMII);
+	CSR_CLRBIT_1(sc, VGE_DIAGCTL, VGE_DIAGCTL_MACFORCE);
+
+	/* Clear WOL on pattern match. */
+	CSR_WRITE_1(sc, VGE_WOLCR0C, VGE_WOLCR0_PATTERN_ALL);
+	/* Disable WOL on magic/unicast packet. */
+	CSR_WRITE_1(sc, VGE_WOLCR1C, 0x0F);
+	CSR_WRITE_1(sc, VGE_WOLCFGC, VGE_WOLCFG_SAB | VGE_WOLCFG_SAM |
+	VGE_WOLCFG_PMEOVR);
+	/* Clear WOL status on pattern match. */
+	CSR_WRITE_1(sc, VGE_WOLSR0C, 0xFF);
+	CSR_WRITE_1(sc, VGE_WOLSR1C, 0xFF);
+}

Index: src/sys/dev/pci/if_vgereg.h
diff -u src/sys/dev/pci/if_vgereg.h:1.3 src/sys/dev/pci/if_vgereg.h:1.3.134.1
--- src/sys/dev/pci/if_vgereg.h:1.3	Tue Oct 31 14:13:30 2006
+++ src/sys/dev/pci/if_vgereg.h	Thu Oct 17 18:27:36 2019
@@ -540,6 +540,31 @@
 #define VGE_TXBLOCK_128PKTS	0x08
 #define VGE_TXBLOCK_8PKTS	0x0C
 
+/* Sticky bit shadow register */
+
+#define	VGE_STICKHW_DS0		0x01
+#define	VGE_STICKHW_DS1		0x02
+#define	VGE_STICKHW_WOL_ENB	0x04
+#define	VGE_STICKHW_WOL_STS	0x08
+#define	VGE_STICKHW_SWPTAG	0x10
+
+/* WOL pattern control */
+#define	VGE_WOLCR0_PATTERN0	0x01
+#define	VGE_WOLCR0_PATTERN1	0x02
+#define	VGE_WOLCR0_PATTERN2	0x04
+#define	VGE_WOLCR0_PATTERN3	0x08
+#define	VGE_WOLCR0_PATTERN4	0x10
+#define	VGE_WOLCR0_PATTERN5	0x20
+#define	VGE_WOLCR0_PATTERN6	0x40
+#define	VGE_WOLCR0_PATTERN7	0x80
+#define	VGE_WOLCR0_PATTERN_ALL	0xFF
+
+/* WOL config register */
+#define	VGE_WOLCFG_PHYINT_ENB	0x01
+#define	VGE_WOLCFG_SAB		0x10
+#define	VGE_WOLCFG_SAM		0x20
+#define	VGE_WOLCFG_PMEOVR	0x80
+
 /* EEPROM control/status register */
 
 #define VGE_EECSR_EDO		0x01	/* data out pin */



Re: CVS commit: src/sys/arch/arm/fdt

2019-10-17 Thread Jonathan A. Kollasch
This change causes evbarm/aarch64 to hang early on an Allwinner
A64-based Pinebook.

On Tue, Oct 15, 2019 at 05:25:02PM +, Christoph Badura wrote:
> Module Name:  src
> Committed By: bad
> Date: Tue Oct 15 17:25:02 UTC 2019
> 
> Modified Files:
>   src/sys/arch/arm/fdt: cpu_fdt.c
> 
> Log Message:
> flush the dcache in cpu_enable_psci() before calling psci_cpu_on().
> 
> fixes the kernel hanging with multiple "mpstart" on (at least) NanoPi R1.
> 
> OK jmcneill@, skrll@
> 
> XXX pullup-9
> 
> 
> To generate a diff of this commit:
> cvs rdiff -u -r1.25 -r1.26 src/sys/arch/arm/fdt/cpu_fdt.c
> 
> Please note that diffs are not public domain; they are subject to the
> copyright notices on the relevant files.
> 


CVS commit: src/external/mpl/bind/include

2019-10-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Oct 17 16:53:06 UTC 2019

Modified Files:
src/external/mpl/bind/include: config.h

Log Message:
remove LD_WRAP


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/mpl/bind/include/config.h

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



CVS commit: src/external/mpl/bind/include

2019-10-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Oct 17 16:53:06 UTC 2019

Modified Files:
src/external/mpl/bind/include: config.h

Log Message:
remove LD_WRAP


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/external/mpl/bind/include/config.h

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

Modified files:

Index: src/external/mpl/bind/include/config.h
diff -u src/external/mpl/bind/include/config.h:1.7 src/external/mpl/bind/include/config.h:1.8
--- src/external/mpl/bind/include/config.h:1.7	Thu Oct 17 12:47:02 2019
+++ src/external/mpl/bind/include/config.h	Thu Oct 17 12:53:06 2019
@@ -492,9 +492,6 @@
 /* Define to allow building of objects for dlopen(). */
 #define ISC_DLZ_DLOPEN 1
 
-/* define if the linker supports --wrap option */
-#define LD_WRAP 1
-
 /* have __attribute__s used in librpz.h */
 #define LIBRPZ_HAVE_ATTR 1
 



CVS commit: src/doc

2019-10-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Oct 17 16:48:12 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new bind


To generate a diff of this commit:
cvs rdiff -u -r1.1665 -r1.1666 src/doc/3RDPARTY
cvs rdiff -u -r1.2600 -r1.2601 src/doc/CHANGES

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



CVS commit: src/doc

2019-10-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Oct 17 16:48:12 UTC 2019

Modified Files:
src/doc: 3RDPARTY CHANGES

Log Message:
new bind


To generate a diff of this commit:
cvs rdiff -u -r1.1665 -r1.1666 src/doc/3RDPARTY
cvs rdiff -u -r1.2600 -r1.2601 src/doc/CHANGES

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1665 src/doc/3RDPARTY:1.1666
--- src/doc/3RDPARTY:1.1665	Thu Oct 17 12:21:02 2019
+++ src/doc/3RDPARTY	Thu Oct 17 12:48:12 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1665 2019/10/17 16:21:02 maya Exp $
+#	$NetBSD: 3RDPARTY,v 1.1666 2019/10/17 16:48:12 christos Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -120,12 +120,12 @@ Notes:
 bc includes dc, both of which are in the NetBSD tree.
 
 Package:	bind [named and utils]
-Version:	9.14.5/MPL
+Version:	9.14.7/MPL
 Current Vers:	9.14.7/MPL
 Maintainer:	ISC
 Archive Site:	ftp://ftp.isc.org/isc/bind9/
 Home Page:	http://www.isc.org/software/bind/
-Date:		2019-10-09
+Date:		2019-10-17
 Mailing List:	https://lists.isc.org/mailman/listinfo/bind-announce
 Mailing List:	https://lists.isc.org/mailman/listinfo/bind-users
 Responsible:	christos

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2600 src/doc/CHANGES:1.2601
--- src/doc/CHANGES:1.2600	Thu Oct 17 05:38:07 2019
+++ src/doc/CHANGES	Thu Oct 17 12:48:12 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2600 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2601 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -61,3 +61,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	dhcpcd(8): Import dhcpcd-8.1.1 [roy 20191016]
 	evbarm: Add support for the NanoPi R1 and Duo2. [bad 20191016]
 	alc(4): Add support for Killer E2400 and E2500. [msaitoh 20191017]
+	bind: Import version 9.14.7. [christos 20191017]



CVS commit: src/external/mpl/bind

2019-10-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Oct 17 16:47:02 UTC 2019

Modified Files:
src/external/mpl/bind: bind2netbsd
src/external/mpl/bind/dist: config.h.in configure
src/external/mpl/bind/dist/bin/dig: dighost.c
src/external/mpl/bind/dist/bin/dnssec: dnssec-dsfromkey.c
src/external/mpl/bind/dist/bin/named: config.c main.c server.c
statschannel.c zoneconf.c
src/external/mpl/bind/dist/bin/named/win32: os.c
src/external/mpl/bind/dist/bin/tests/optional: nsecify.c
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks: create.c find.c
genrsa.c login.c privrsa.c pubrsa.c session.c sha1.c sign.c
verify.c
src/external/mpl/bind/dist/bin/tools: mdig.c
src/external/mpl/bind/dist/bin/win32/BINDInstall: resource.h
src/external/mpl/bind/dist/contrib/dlz/modules/mysqldyn:
dlz_mysqldyn_mod.c
src/external/mpl/bind/dist/doc/arm: Bv9ARM.pdf
src/external/mpl/bind/dist/fuzz: dns_rdata_fromwire_text.c
src/external/mpl/bind/dist/lib/dns: dnssec.c dst_api.c ecdb.c message.c
name.c nsec.c openssldh_link.c opensslrsa_link.c rbt.c rcode.c
resolver.c rpz.c sdb.c ttl.c zone.c zoneverify.c
src/external/mpl/bind/dist/lib/dns/include/dns: message.h
src/external/mpl/bind/dist/lib/dns/rdata/generic: opt_41.c
src/external/mpl/bind/dist/lib/dns/tests: rbt_serialize_test.c
src/external/mpl/bind/dist/lib/irs/win32: resconf.c
src/external/mpl/bind/dist/lib/isc: lex.c ratelimiter.c siphash.c
sockaddr.c
src/external/mpl/bind/dist/lib/isc/include/isc: siphash.h socket.h
src/external/mpl/bind/dist/lib/isc/tests: hmac_test.c md_test.c
queue_test.c random_test.c siphash_test.c task_test.c
src/external/mpl/bind/dist/lib/isc/unix: resource.c socket.c
src/external/mpl/bind/dist/lib/isc/win32: file.c ntgroups.c socket.c
time.c
src/external/mpl/bind/dist/lib/isc/win32/include/isc: stdatomic.h
src/external/mpl/bind/dist/lib/isccfg: namedconf.c parser.c
src/external/mpl/bind/dist/lib/ns: client.c
src/external/mpl/bind/include: config.h
Removed Files:
src/external/mpl/bind/dist/bin/pkcs11: Makefile
src/external/mpl/bind/dist/bin/tests/pkcs11: Makefile
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks: Makefile
src/external/mpl/bind/dist/bin/tests/system/dlzexternal/ns1: dlzs.conf
src/external/mpl/bind/dist/bin/tests/system/glue: xx.good yy.good
src/external/mpl/bind/dist/bin/tests/system/glue/ns1: cache.in mil.db
src/external/mpl/bind/dist/bin/tests/virtual-time: Makefile conf.sh
src/external/mpl/bind/dist/contrib/scripts: check-secure-delegation.pl
zone-edit.sh
src/external/mpl/bind/dist/lib/dns/tests: tkey_test.c
src/external/mpl/bind/dist/lib/samples: Makefile-postinstall
src/external/mpl/bind/dist/unit: unittest.sh

Log Message:
merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/mpl/bind/bind2netbsd
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/bind/dist/config.h.in \
src/external/mpl/bind/dist/configure
cvs rdiff -u -r1.5 -r1.6 src/external/mpl/bind/dist/bin/dig/dighost.c
cvs rdiff -u -r1.5 -r1.6 \
src/external/mpl/bind/dist/bin/dnssec/dnssec-dsfromkey.c
cvs rdiff -u -r1.5 -r1.6 src/external/mpl/bind/dist/bin/named/config.c \
src/external/mpl/bind/dist/bin/named/main.c
cvs rdiff -u -r1.7 -r1.8 src/external/mpl/bind/dist/bin/named/server.c
cvs rdiff -u -r1.4 -r1.5 src/external/mpl/bind/dist/bin/named/statschannel.c \
src/external/mpl/bind/dist/bin/named/zoneconf.c
cvs rdiff -u -r1.5 -r1.6 src/external/mpl/bind/dist/bin/named/win32/os.c
cvs rdiff -u -r1.1.1.1 -r0 src/external/mpl/bind/dist/bin/pkcs11/Makefile
cvs rdiff -u -r1.3 -r1.4 \
src/external/mpl/bind/dist/bin/tests/optional/nsecify.c
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/mpl/bind/dist/bin/tests/pkcs11/Makefile
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/Makefile
cvs rdiff -u -r1.3 -r1.4 \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/create.c \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/find.c \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/genrsa.c \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/login.c \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/privrsa.c \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/pubrsa.c \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/session.c \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/sha1.c \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/sign.c \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/verify.c
cvs rdiff -u -r1.1.1.1 -r0 \

CVS commit: src/external/mpl/bind

2019-10-17 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Thu Oct 17 16:47:02 UTC 2019

Modified Files:
src/external/mpl/bind: bind2netbsd
src/external/mpl/bind/dist: config.h.in configure
src/external/mpl/bind/dist/bin/dig: dighost.c
src/external/mpl/bind/dist/bin/dnssec: dnssec-dsfromkey.c
src/external/mpl/bind/dist/bin/named: config.c main.c server.c
statschannel.c zoneconf.c
src/external/mpl/bind/dist/bin/named/win32: os.c
src/external/mpl/bind/dist/bin/tests/optional: nsecify.c
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks: create.c find.c
genrsa.c login.c privrsa.c pubrsa.c session.c sha1.c sign.c
verify.c
src/external/mpl/bind/dist/bin/tools: mdig.c
src/external/mpl/bind/dist/bin/win32/BINDInstall: resource.h
src/external/mpl/bind/dist/contrib/dlz/modules/mysqldyn:
dlz_mysqldyn_mod.c
src/external/mpl/bind/dist/doc/arm: Bv9ARM.pdf
src/external/mpl/bind/dist/fuzz: dns_rdata_fromwire_text.c
src/external/mpl/bind/dist/lib/dns: dnssec.c dst_api.c ecdb.c message.c
name.c nsec.c openssldh_link.c opensslrsa_link.c rbt.c rcode.c
resolver.c rpz.c sdb.c ttl.c zone.c zoneverify.c
src/external/mpl/bind/dist/lib/dns/include/dns: message.h
src/external/mpl/bind/dist/lib/dns/rdata/generic: opt_41.c
src/external/mpl/bind/dist/lib/dns/tests: rbt_serialize_test.c
src/external/mpl/bind/dist/lib/irs/win32: resconf.c
src/external/mpl/bind/dist/lib/isc: lex.c ratelimiter.c siphash.c
sockaddr.c
src/external/mpl/bind/dist/lib/isc/include/isc: siphash.h socket.h
src/external/mpl/bind/dist/lib/isc/tests: hmac_test.c md_test.c
queue_test.c random_test.c siphash_test.c task_test.c
src/external/mpl/bind/dist/lib/isc/unix: resource.c socket.c
src/external/mpl/bind/dist/lib/isc/win32: file.c ntgroups.c socket.c
time.c
src/external/mpl/bind/dist/lib/isc/win32/include/isc: stdatomic.h
src/external/mpl/bind/dist/lib/isccfg: namedconf.c parser.c
src/external/mpl/bind/dist/lib/ns: client.c
src/external/mpl/bind/include: config.h
Removed Files:
src/external/mpl/bind/dist/bin/pkcs11: Makefile
src/external/mpl/bind/dist/bin/tests/pkcs11: Makefile
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks: Makefile
src/external/mpl/bind/dist/bin/tests/system/dlzexternal/ns1: dlzs.conf
src/external/mpl/bind/dist/bin/tests/system/glue: xx.good yy.good
src/external/mpl/bind/dist/bin/tests/system/glue/ns1: cache.in mil.db
src/external/mpl/bind/dist/bin/tests/virtual-time: Makefile conf.sh
src/external/mpl/bind/dist/contrib/scripts: check-secure-delegation.pl
zone-edit.sh
src/external/mpl/bind/dist/lib/dns/tests: tkey_test.c
src/external/mpl/bind/dist/lib/samples: Makefile-postinstall
src/external/mpl/bind/dist/unit: unittest.sh

Log Message:
merge conflicts


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/external/mpl/bind/bind2netbsd
cvs rdiff -u -r1.6 -r1.7 src/external/mpl/bind/dist/config.h.in \
src/external/mpl/bind/dist/configure
cvs rdiff -u -r1.5 -r1.6 src/external/mpl/bind/dist/bin/dig/dighost.c
cvs rdiff -u -r1.5 -r1.6 \
src/external/mpl/bind/dist/bin/dnssec/dnssec-dsfromkey.c
cvs rdiff -u -r1.5 -r1.6 src/external/mpl/bind/dist/bin/named/config.c \
src/external/mpl/bind/dist/bin/named/main.c
cvs rdiff -u -r1.7 -r1.8 src/external/mpl/bind/dist/bin/named/server.c
cvs rdiff -u -r1.4 -r1.5 src/external/mpl/bind/dist/bin/named/statschannel.c \
src/external/mpl/bind/dist/bin/named/zoneconf.c
cvs rdiff -u -r1.5 -r1.6 src/external/mpl/bind/dist/bin/named/win32/os.c
cvs rdiff -u -r1.1.1.1 -r0 src/external/mpl/bind/dist/bin/pkcs11/Makefile
cvs rdiff -u -r1.3 -r1.4 \
src/external/mpl/bind/dist/bin/tests/optional/nsecify.c
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/mpl/bind/dist/bin/tests/pkcs11/Makefile
cvs rdiff -u -r1.1.1.1 -r0 \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/Makefile
cvs rdiff -u -r1.3 -r1.4 \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/create.c \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/find.c \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/genrsa.c \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/login.c \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/privrsa.c \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/pubrsa.c \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/session.c \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/sha1.c \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/sign.c \
src/external/mpl/bind/dist/bin/tests/pkcs11/benchmarks/verify.c
cvs rdiff -u -r1.1.1.1 -r0 \

CVS commit: src/doc

2019-10-17 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Oct 17 16:21:02 UTC 2019

Modified Files:
src/doc: 3RDPARTY

Log Message:
correct bind location. new bind


To generate a diff of this commit:
cvs rdiff -u -r1.1664 -r1.1665 src/doc/3RDPARTY

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

Modified files:

Index: src/doc/3RDPARTY
diff -u src/doc/3RDPARTY:1.1664 src/doc/3RDPARTY:1.1665
--- src/doc/3RDPARTY:1.1664	Wed Oct 16 14:56:34 2019
+++ src/doc/3RDPARTY	Thu Oct 17 16:21:02 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: 3RDPARTY,v 1.1664 2019/10/16 14:56:34 roy Exp $
+#	$NetBSD: 3RDPARTY,v 1.1665 2019/10/17 16:21:02 maya Exp $
 #
 # This file contains a list of the software that has been integrated into
 # NetBSD where we are not the primary maintainer.
@@ -121,7 +121,7 @@ bc includes dc, both of which are in the
 
 Package:	bind [named and utils]
 Version:	9.14.5/MPL
-Current Vers:	9.14.6/MPL
+Current Vers:	9.14.7/MPL
 Maintainer:	ISC
 Archive Site:	ftp://ftp.isc.org/isc/bind9/
 Home Page:	http://www.isc.org/software/bind/
@@ -130,10 +130,10 @@ Mailing List:	https://lists.isc.org/mail
 Mailing List:	https://lists.isc.org/mailman/listinfo/bind-users
 Responsible:	christos
 License:	BSD-like (2-clause) / MPL
-Location:	external/bsd/bind/dist
+Location:	external/mpl/bind/dist
 Notes:
 First bind2netbsd script to import into src/external/bsd/bind/dist.
-The Makefiles in src/external/bsd/bind are not handled by the script.
+The Makefiles in src/external/mpl/bind are not handled by the script.
 Build bind to generate the include files.
 Then binclude4netbsd script to import into src/external/bsd/bind/include.
 The libc and include parts of the resolver are now part of libbind.



CVS commit: src/doc

2019-10-17 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Oct 17 16:21:02 UTC 2019

Modified Files:
src/doc: 3RDPARTY

Log Message:
correct bind location. new bind


To generate a diff of this commit:
cvs rdiff -u -r1.1664 -r1.1665 src/doc/3RDPARTY

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



CVS commit: src/sys/dev/pci

2019-10-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Oct 17 15:57:56 UTC 2019

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

Log Message:
 Use unsigned to avoid undefined behavior. Found by kUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/dev/pci/if_bce.c
cvs rdiff -u -r1.4 -r1.5 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_bce.c
diff -u src/sys/dev/pci/if_bce.c:1.52 src/sys/dev/pci/if_bce.c:1.53
--- src/sys/dev/pci/if_bce.c:1.52	Thu May 30 02:32:18 2019
+++ src/sys/dev/pci/if_bce.c	Thu Oct 17 15:57:56 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: if_bce.c,v 1.52 2019/05/30 02:32:18 msaitoh Exp $	 */
+/* $NetBSD: if_bce.c,v 1.53 2019/10/17 15:57:56 msaitoh Exp $	 */
 
 /*
  * Copyright (c) 2003 Clifford Wright. All rights reserved.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_bce.c,v 1.52 2019/05/30 02:32:18 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_bce.c,v 1.53 2019/10/17 15:57:56 msaitoh Exp $");
 
 #include "vlan.h"
 
@@ -1010,7 +1010,7 @@ bce_add_mac(struct bce_softc *sc, uint8_
 	uint32_t	rval;
 
 	bus_space_write_4(sc->bce_btag, sc->bce_bhandle, BCE_FILT_LOW,
-	mac[2] << 24 | mac[3] << 16 | mac[4] << 8 | mac[5]);
+	(uint32_t)mac[2] << 24 | mac[3] << 16 | mac[4] << 8 | mac[5]);
 	bus_space_write_4(sc->bce_btag, sc->bce_bhandle, BCE_FILT_HI,
 	mac[0] << 8 | mac[1] | 0x1);	/* MAGIC */
 	bus_space_write_4(sc->bce_btag, sc->bce_bhandle, BCE_FILT_CTL,

Index: src/sys/dev/pci/if_mcx.c
diff -u src/sys/dev/pci/if_mcx.c:1.4 src/sys/dev/pci/if_mcx.c:1.5
--- src/sys/dev/pci/if_mcx.c:1.4	Sat Sep 28 16:22:45 2019
+++ src/sys/dev/pci/if_mcx.c	Thu Oct 17 15:57:56 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_mcx.c,v 1.4 2019/09/28 16:22:45 tnn Exp $ */
+/*	$NetBSD: if_mcx.c,v 1.5 2019/10/17 15:57:56 msaitoh Exp $ */
 /*	$OpenBSD: if_mcx.c,v 1.33 2019/09/12 04:23:59 jmatthew Exp $ */
 
 /*
@@ -130,7 +130,7 @@
 #define MCX_CMDQ_DOORBELL		0x0018
 
 #define MCX_STATE		0x01fc
-#define MCX_STATE_MASK			(1 << 31)
+#define MCX_STATE_MASK			(1U << 31)
 #define MCX_STATE_INITIALIZING		(1 << 31)
 #define MCX_STATE_READY			(0 << 31)
 #define MCX_STATE_INTERFACE_MASK	(0x3 << 24)
@@ -1324,7 +1324,7 @@ CTASSERT(sizeof(struct mcx_wq_ctx) == 0x
 
 struct mcx_sq_ctx {
 	uint32_t		sq_flags;
-#define MCX_SQ_CTX_RLKEY			(1 << 31)
+#define MCX_SQ_CTX_RLKEY			(1U << 31)
 #define MCX_SQ_CTX_FRE_SHIFT			(1 << 29)
 #define MCX_SQ_CTX_FLUSH_IN_ERROR		(1 << 28)
 #define MCX_SQ_CTX_MIN_WQE_INLINE_SHIFT		24
@@ -1434,7 +1434,7 @@ struct mcx_cmd_destroy_sq_out {
 
 struct mcx_rq_ctx {
 	uint32_t		rq_flags;
-#define MCX_RQ_CTX_RLKEY			(1 << 31)
+#define MCX_RQ_CTX_RLKEY			(1U << 31)
 #define MCX_RQ_CTX_VLAN_STRIP_DIS		(1 << 28)
 #define MCX_RQ_CTX_MEM_RQ_TYPE_SHIFT		24
 #define MCX_RQ_CTX_STATE_SHIFT			20
@@ -6501,7 +6501,7 @@ mcx_media_add_types(struct mcx_softc *sc
 
 	proto_cap = be32toh(ptys.rp_eth_proto_cap);
 	for (i = 0; i < __arraycount(mcx_eth_cap_map); i++) {
-		if ((proto_cap & (1 << i)) && (mcx_eth_cap_map[i] != 0))
+		if ((proto_cap & (1U << i)) && (mcx_eth_cap_map[i] != 0))
 			ifmedia_add(>sc_media, IFM_ETHER |
 			mcx_eth_cap_map[i], 0, NULL);
 	}
@@ -6531,7 +6531,7 @@ mcx_media_status(struct ifnet *ifp, stru
 
 	media_oper = 0;
 	for (i = 0; i < __arraycount(mcx_eth_cap_map); i++) {
-		if (proto_oper & (1 << i)) {
+		if (proto_oper & (1U << i)) {
 			media_oper = mcx_eth_cap_map[i];
 		}
 	}



CVS commit: src/sys/dev/pci

2019-10-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Oct 17 15:57:56 UTC 2019

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

Log Message:
 Use unsigned to avoid undefined behavior. Found by kUBSan.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/dev/pci/if_bce.c
cvs rdiff -u -r1.4 -r1.5 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/external/bsd/drm2/linux

2019-10-17 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Oct 17 14:33:02 UTC 2019

Modified Files:
src/sys/external/bsd/drm2/linux: linux_dma_buf.c

Log Message:
correct error handling.

from Ilja Van Sprundel, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/linux/linux_dma_buf.c

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



CVS commit: src/sys/external/bsd/drm2/linux

2019-10-17 Thread Maya Rashish
Module Name:src
Committed By:   maya
Date:   Thu Oct 17 14:33:02 UTC 2019

Modified Files:
src/sys/external/bsd/drm2/linux: linux_dma_buf.c

Log Message:
correct error handling.

from Ilja Van Sprundel, thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/external/bsd/drm2/linux/linux_dma_buf.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/external/bsd/drm2/linux/linux_dma_buf.c
diff -u src/sys/external/bsd/drm2/linux/linux_dma_buf.c:1.5 src/sys/external/bsd/drm2/linux/linux_dma_buf.c:1.6
--- src/sys/external/bsd/drm2/linux/linux_dma_buf.c:1.5	Fri Jan  4 23:03:02 2019
+++ src/sys/external/bsd/drm2/linux/linux_dma_buf.c	Thu Oct 17 14:33:02 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: linux_dma_buf.c,v 1.5 2019/01/04 23:03:02 tnn Exp $	*/
+/*	$NetBSD: linux_dma_buf.c,v 1.6 2019/10/17 14:33:02 maya Exp $	*/
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: linux_dma_buf.c,v 1.5 2019/01/04 23:03:02 tnn Exp $");
+__KERNEL_RCSID(0, "$NetBSD: linux_dma_buf.c,v 1.6 2019/10/17 14:33:02 maya Exp $");
 
 #include 
 #include 
@@ -133,11 +133,11 @@ dma_buf_get(int fd)
 
 	if ((file = fd_getfile(fd)) == NULL) {
 		error = EBADF;
-		goto fail1;
+		goto fail0;
 	}
 	if (file->f_type != DTYPE_MISC || file->f_ops != _fileops) {
 		error = EINVAL;
-		goto fail0;
+		goto fail1;
 	}
 
 	dmabuf = file->f_data;



CVS commit: src/sys/lib/libsa

2019-10-17 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Thu Oct 17 14:00:28 UTC 2019

Modified Files:
src/sys/lib/libsa: loadfile_elf32.c

Log Message:
Make sure we're dealing with a static binary. Otherwise we could crash if
the user mistakenly tries to boot a KASLR kernel with 'boot' instead of
'pkboot'. Now we fail cleanly. Reported by cryo@.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/lib/libsa/loadfile_elf32.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/lib/libsa/loadfile_elf32.c
diff -u src/sys/lib/libsa/loadfile_elf32.c:1.55 src/sys/lib/libsa/loadfile_elf32.c:1.56
--- src/sys/lib/libsa/loadfile_elf32.c:1.55	Sun Jul 21 16:53:17 2019
+++ src/sys/lib/libsa/loadfile_elf32.c	Thu Oct 17 14:00:28 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: loadfile_elf32.c,v 1.55 2019/07/21 16:53:17 rin Exp $ */
+/* $NetBSD: loadfile_elf32.c,v 1.56 2019/10/17 14:00:28 maxv Exp $ */
 
 /*
  * Copyright (c) 1997, 2008, 2017 The NetBSD Foundation, Inc.
@@ -699,6 +699,11 @@ ELFNAMEEND(loadfile_static)(int fd, Elf_
 
 	internalize_ehdr(elf->e_ident[EI_DATA], elf);
 
+	if (elf->e_type != ET_EXEC) {
+		errno = EINVAL;
+		return 1;
+	}
+
 	sz = elf->e_phnum * sizeof(Elf_Phdr);
 	phdr = ALLOC(sz);
 	ret = ELFNAMEEND(readfile_local)(fd, elf->e_phoff, phdr, sz);



CVS commit: src/sys/lib/libsa

2019-10-17 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Thu Oct 17 14:00:28 UTC 2019

Modified Files:
src/sys/lib/libsa: loadfile_elf32.c

Log Message:
Make sure we're dealing with a static binary. Otherwise we could crash if
the user mistakenly tries to boot a KASLR kernel with 'boot' instead of
'pkboot'. Now we fail cleanly. Reported by cryo@.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/lib/libsa/loadfile_elf32.c

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



CVS commit: src/doc

2019-10-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Oct 17 09:38:07 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
Amazon Graviton support is in 9.0, remove the changes entry.


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2599 src/doc/CHANGES:1.2600
--- src/doc/CHANGES:1.2599	Thu Oct 17 09:34:10 2019
+++ src/doc/CHANGES	Thu Oct 17 09:38:07 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2599 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2600 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -58,8 +58,6 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	OpenSSH: Import 8.1. [christos 20191012]
 	acpi(4): Updated ACPICA to 20190816. [christos 20191015]
 	sup: removed, use ftp://ftp.astron.com/pub/sup [christos 20191015]
-	evbarm: Add support for Amazon Graviton "a1.metal" instances.
-		[jmcneill 20191015]
 	dhcpcd(8): Import dhcpcd-8.1.1 [roy 20191016]
 	evbarm: Add support for the NanoPi R1 and Duo2. [bad 20191016]
 	alc(4): Add support for Killer E2400 and E2500. [msaitoh 20191017]



CVS commit: src/doc

2019-10-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Oct 17 09:38:07 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
Amazon Graviton support is in 9.0, remove the changes entry.


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

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



CVS commit: src/doc

2019-10-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Oct 17 09:34:10 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
evbarm: Add support for Amazon Graviton "a1.metal" instances.


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2598 src/doc/CHANGES:1.2599
--- src/doc/CHANGES:1.2598	Thu Oct 17 09:14:50 2019
+++ src/doc/CHANGES	Thu Oct 17 09:34:10 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2598 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2599 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -58,6 +58,8 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	OpenSSH: Import 8.1. [christos 20191012]
 	acpi(4): Updated ACPICA to 20190816. [christos 20191015]
 	sup: removed, use ftp://ftp.astron.com/pub/sup [christos 20191015]
+	evbarm: Add support for Amazon Graviton "a1.metal" instances.
+		[jmcneill 20191015]
 	dhcpcd(8): Import dhcpcd-8.1.1 [roy 20191016]
 	evbarm: Add support for the NanoPi R1 and Duo2. [bad 20191016]
 	alc(4): Add support for Killer E2400 and E2500. [msaitoh 20191017]



CVS commit: src/doc

2019-10-17 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Thu Oct 17 09:34:10 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
evbarm: Add support for Amazon Graviton "a1.metal" instances.


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

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



CVS commit: src/sys/dev/mii

2019-10-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Oct 17 09:22:49 UTC 2019

Modified Files:
src/sys/dev/mii: ciphy.c

Log Message:
- Match a lot of Cicada and Vitesse devices correctly. This change also fixes
  a bug that ciphy_fixup() didn't work.
- Match VSC8221, VSC8234 and VSC8641.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/mii/ciphy.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/mii/ciphy.c
diff -u src/sys/dev/mii/ciphy.c:1.36 src/sys/dev/mii/ciphy.c:1.37
--- src/sys/dev/mii/ciphy.c:1.36	Fri Oct 11 09:31:52 2019
+++ src/sys/dev/mii/ciphy.c	Thu Oct 17 09:22:49 2019
@@ -1,4 +1,4 @@
-/* $NetBSD: ciphy.c,v 1.36 2019/10/11 09:31:52 msaitoh Exp $ */
+/* $NetBSD: ciphy.c,v 1.37 2019/10/17 09:22:49 msaitoh Exp $ */
 
 /*-
  * Copyright (c) 2004
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.36 2019/10/11 09:31:52 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ciphy.c,v 1.37 2019/10/17 09:22:49 msaitoh Exp $");
 
 /*
  * Driver for the Cicada CS8201 10/100/1000 copper PHY.
@@ -74,16 +74,16 @@ static const struct mii_phy_funcs ciphy_
 };
 
 static const struct mii_phydesc ciphys[] = {
-	MII_PHY_DESC(CICADA, CS8201),
-	MII_PHY_DESC(CICADA, CS8201A),
-	MII_PHY_DESC(CICADA, CS8201B),
-	MII_PHY_DESC(CICADA, CS8204),
-	MII_PHY_DESC(CICADA, VSC8211),
-	MII_PHY_DESC(CICADA, CS8244),
-	MII_PHY_DESC(CICADA, CS8201),
-	MII_PHY_DESC(CICADA, CS8201A),
-	MII_PHY_DESC(xxCICADA, CS8201B),
-	MII_PHY_DESC(VITESSE, VSC8601),
+	MII_PHY_DESC(xxCICADA, CIS8201),
+	MII_PHY_DESC(xxCICADA, CIS8201A),
+	MII_PHY_DESC(xxCICADA, CIS8201B),
+	MII_PHY_DESC(xxCICADA, CIS8204),
+	MII_PHY_DESC(xxCICADA, VSC8211),
+	MII_PHY_DESC(xxCICADA, VSC8221),
+	MII_PHY_DESC(xxCICADA, VSC8234),
+	MII_PHY_DESC(xxCICADA, VSC8244),
+	MII_PHY_DESC(xxVITESSE, VSC8601),
+	MII_PHY_DESC(xxVITESSE, VSC8641),
 	MII_PHY_END,
 };
 
@@ -398,8 +398,8 @@ ciphy_fixup(struct mii_softc *sc)
 	}
 
 	switch (model) {
-	case MII_MODEL_CICADA_CS8201:
-	case MII_MODEL_CICADA_CS8204:
+	case MII_MODEL_xxCICADA_CIS8201:
+	case MII_MODEL_xxCICADA_CIS8204:
 		/* Turn off "aux mode" (whatever that means) */
 		PHY_SETBIT(sc, CIPHY_MII_AUXCSR, CIPHY_AUXCSR_MDPPS);
 
@@ -418,8 +418,8 @@ ciphy_fixup(struct mii_softc *sc)
 
 		break;
 
-	case MII_MODEL_CICADA_CS8201A:
-	case MII_MODEL_CICADA_CS8201B:
+	case MII_MODEL_xxCICADA_CIS8201A:
+	case MII_MODEL_xxCICADA_CIS8201B:
 		/*
 		 * Work around speed polling bug in VT3119/VT3216
 		 * when using MII in full duplex mode.
@@ -431,9 +431,12 @@ ciphy_fixup(struct mii_softc *sc)
 			PHY_CLRBIT(sc, CIPHY_MII_10BTCSR, CIPHY_10BTCSR_ECHO);
 
 		break;
-	case MII_MODEL_CICADA_VSC8211:
-	case MII_MODEL_CICADA_CS8244:
-	case MII_MODEL_VITESSE_VSC8601:
+	case MII_MODEL_xxCICADA_VSC8211:
+	case MII_MODEL_xxCICADA_VSC8221:
+	case MII_MODEL_xxCICADA_VSC8234:
+	case MII_MODEL_xxCICADA_VSC8244:
+	case MII_MODEL_xxVITESSE_VSC8601:
+	case MII_MODEL_xxVITESSE_VSC8641:
 		break;
 	default:
 		aprint_error_dev(sc->mii_dev, "unknown CICADA PHY model %x\n",



CVS commit: src/sys/dev/mii

2019-10-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Oct 17 09:22:49 UTC 2019

Modified Files:
src/sys/dev/mii: ciphy.c

Log Message:
- Match a lot of Cicada and Vitesse devices correctly. This change also fixes
  a bug that ciphy_fixup() didn't work.
- Match VSC8221, VSC8234 and VSC8641.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/dev/mii/ciphy.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/mii

2019-10-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Oct 17 09:22:00 UTC 2019

Modified Files:
src/sys/dev/mii: miidevs.h miidevs_data.h

Log Message:
 Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.155 -r1.156 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.143 -r1.144 src/sys/dev/mii/miidevs_data.h

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

Modified files:

Index: src/sys/dev/mii/miidevs.h
diff -u src/sys/dev/mii/miidevs.h:1.155 src/sys/dev/mii/miidevs.h:1.156
--- src/sys/dev/mii/miidevs.h:1.155	Thu Sep 19 14:39:08 2019
+++ src/sys/dev/mii/miidevs.h	Thu Oct 17 09:22:00 2019
@@ -1,10 +1,10 @@
-/*	$NetBSD: miidevs.h,v 1.155 2019/09/19 14:39:08 msaitoh Exp $	*/
+/*	$NetBSD: miidevs.h,v 1.156 2019/10/17 09:22:00 msaitoh Exp $	*/
 
 /*
  * THIS FILE AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: miidevs,v 1.157 2019/09/19 14:38:45 msaitoh Exp
+ *	NetBSD: miidevs,v 1.158 2019/10/17 09:21:40 msaitoh Exp
  */
 
 /*-
@@ -57,10 +57,8 @@
  */
 
 #define	MII_OUI_AMD	0x1a	/* Advanced Micro Devices */
-#define	MII_OUI_VITESSE	0x0001c1	/* Vitesse */
 #define	MII_OUI_TRIDIUM	0x0001f0	/* Tridium */
 #define	MII_OUI_DATATRACK	0x0002c6	/* Data Track Technology */
-#define	MII_OUI_CICADA	0x0003f1	/* Cicada Semiconductor */
 #define	MII_OUI_AGERE	0x00053d	/* Agere */
 #define	MII_OUI_BANKSPEED	0x0006b8	/* Bankspeed Pty */
 #define	MII_OUI_NETEXCELL	0x0008bb	/* NetExcell */
@@ -121,6 +119,7 @@
 #define	MII_OUI_xxBROADCOM_ALT1	0x0050ef	/* Broadcom Corporation */
 #define	MII_OUI_yyINTEL	0x005500	/* Intel */
 #define	MII_OUI_yyASIX	0x007063	/* Asix Semiconductor */
+#define	MII_OUI_xxVITESSE	0x008083	/* Vitesse Semiconductor */
 #define	MII_OUI_xxPMCSIERRA2	0x009057	/* PMC-Sierra */
 #define	MII_OUI_xxCICADA	0x00c08f	/* Cicada Semiconductor */
 #define	MII_OUI_xxNATSEMI	0x1000e8	/* National Semiconductor */
@@ -308,23 +307,26 @@
 #define	MII_MODEL_xxBROADCOM_ALT1_BCM5906	0x0004
 #define	MII_STR_xxBROADCOM_ALT1_BCM5906	"BCM5906 10/100baseTX media interface"
 
-/* Cicada Semiconductor PHYs (now owned by Vitesse?) */
-#define	MII_MODEL_CICADA_CS8201	0x0001
-#define	MII_STR_CICADA_CS8201	"Cicada CS8201 10/100/1000TX PHY"
-#define	MII_MODEL_CICADA_CS8204	0x0004
-#define	MII_STR_CICADA_CS8204	"Cicada CS8204 10/100/1000TX PHY"
-#define	MII_MODEL_CICADA_VSC8211	0x000b
-#define	MII_STR_CICADA_VSC8211	"Cicada VSC8211 10/100/1000TX PHY"
-#define	MII_MODEL_CICADA_CS8201A	0x0020
-#define	MII_STR_CICADA_CS8201A	"Cicada CS8201 10/100/1000TX PHY"
-#define	MII_MODEL_CICADA_CS8201B	0x0021
-#define	MII_STR_CICADA_CS8201B	"Cicada CS8201 10/100/1000TX PHY"
-#define	MII_MODEL_CICADA_CS8244	0x002c
-#define	MII_STR_CICADA_CS8244	"Vitesse VSC8244 Quad 10/100/1000BASE-T PHY"
+/* Cicada Semiconductor PHYs (-> Vitesse -> Microsemi) */
+
+#define	MII_MODEL_xxCICADA_CIS8201	0x0001
+#define	MII_STR_xxCICADA_CIS8201	"Cicada CIS8201 10/100/1000TX PHY"
+#define	MII_MODEL_xxCICADA_CIS8204	0x0004
+#define	MII_STR_xxCICADA_CIS8204	"Cicada CIS8204 10/100/1000TX PHY"
+#define	MII_MODEL_xxCICADA_VSC8211	0x000b
+#define	MII_STR_xxCICADA_VSC8211	"Cicada VSC8211 10/100/1000TX PHY"
 #define	MII_MODEL_xxCICADA_VSC8221	0x0015
 #define	MII_STR_xxCICADA_VSC8221	"Vitesse VSC8221 10/100/1000BASE-T PHY"
-#define	MII_MODEL_xxCICADA_CS8201B	0x0021
-#define	MII_STR_xxCICADA_CS8201B	"Cicada CS8201 10/100/1000TX PHY"
+#define	MII_MODEL_xxCICADA_VSC8224	0x0018
+#define	MII_STR_xxCICADA_VSC8224	"Vitesse VSC8224 10/100/1000BASE-T PHY"
+#define	MII_MODEL_xxCICADA_CIS8201A	0x0020
+#define	MII_STR_xxCICADA_CIS8201A	"Cicada CIS8201 10/100/1000TX PHY"
+#define	MII_MODEL_xxCICADA_CIS8201B	0x0021
+#define	MII_STR_xxCICADA_CIS8201B	"Cicada CIS8201 10/100/1000TX PHY"
+#define	MII_MODEL_xxCICADA_VSC8234	0x0022
+#define	MII_STR_xxCICADA_VSC8234	"Vitesse VSC8234 10/100/1000TX PHY"
+#define	MII_MODEL_xxCICADA_VSC8244	0x002c
+#define	MII_STR_xxCICADA_VSC8244	"Vitesse VSC8244 Quad 10/100/1000BASE-T PHY"
 
 /* Davicom Semiconductor PHYs */
 /* AMD Am79C873 seems to be a relabeled DM9101 */
@@ -604,9 +606,13 @@
 #define	MII_MODEL_VIA_VT6103_2	0x0034
 #define	MII_STR_VIA_VT6103_2	"VT6103 10/100 PHY"
 
-/* Vitesse PHYs */
-#define	MII_MODEL_VITESSE_VSC8601	0x0002
-#define	MII_STR_VITESSE_VSC8601	"VSC8601 10/100/1000 PHY"
+/* Vitesse PHYs (Now Microsemi) */
+#define	MII_MODEL_xxVITESSE_VSC8601	0x0002
+#define	MII_STR_xxVITESSE_VSC8601	"VSC8601 10/100/1000 PHY"
+#define	MII_MODEL_xxVITESSE_VSC8641	0x0003
+#define	MII_STR_xxVITESSE_VSC8641	"Vitesse VSC8641 10/100/1000TX PHY"
+#define	MII_MODEL_xxVITESSE_VSC8501	0x0013
+#define	MII_STR_xxVITESSE_VSC8501	"Vitesse VSC8501 10/100/1000TX PHY"
 
 /* XaQti Corp. PHYs */
 #define	MII_MODEL_xxXAQTI_XMACII	0x

Index: src/sys/dev/mii/miidevs_data.h
diff -u src/sys/dev/mii/miidevs_data.h:1.143 src/sys/dev/mii/miidevs_data.h:1.144
--- src/sys/dev/mii/miidevs_data.h:1.143	Thu Sep 19 14:39:08 2019
+++ src/sys/dev/mii/miidevs_data.h	Thu Oct 

CVS commit: src/sys/dev/mii

2019-10-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Oct 17 09:21:40 UTC 2019

Modified Files:
src/sys/dev/mii: miidevs

Log Message:
- All of Cicada and Vitesse devices' OUI are not bit-reversed, so use "xx".
- Rename CS82xx -> CIS82xx
- Add Vitesse VSC8224, VSC8234, VSC8641 and VSC8501.


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

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



CVS commit: src/sys/dev/mii

2019-10-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Oct 17 09:22:00 UTC 2019

Modified Files:
src/sys/dev/mii: miidevs.h miidevs_data.h

Log Message:
 Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.155 -r1.156 src/sys/dev/mii/miidevs.h
cvs rdiff -u -r1.143 -r1.144 src/sys/dev/mii/miidevs_data.h

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



CVS commit: src/sys/dev/mii

2019-10-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Oct 17 09:21:40 UTC 2019

Modified Files:
src/sys/dev/mii: miidevs

Log Message:
- All of Cicada and Vitesse devices' OUI are not bit-reversed, so use "xx".
- Rename CS82xx -> CIS82xx
- Add Vitesse VSC8224, VSC8234, VSC8641 and VSC8501.


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

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

Modified files:

Index: src/sys/dev/mii/miidevs
diff -u src/sys/dev/mii/miidevs:1.157 src/sys/dev/mii/miidevs:1.158
--- src/sys/dev/mii/miidevs:1.157	Thu Sep 19 14:38:45 2019
+++ src/sys/dev/mii/miidevs	Thu Oct 17 09:21:40 2019
@@ -1,4 +1,4 @@
-$NetBSD: miidevs,v 1.157 2019/09/19 14:38:45 msaitoh Exp $
+$NetBSD: miidevs,v 1.158 2019/10/17 09:21:40 msaitoh Exp $
 
 /*-
  * Copyright (c) 1998, 1999 The NetBSD Foundation, Inc.
@@ -50,10 +50,8 @@ $NetBSD: miidevs,v 1.157 2019/09/19 14:3
  */
 
 oui AMD0x1a	Advanced Micro Devices
-oui VITESSE			0x0001c1	Vitesse
 oui TRIDIUM			0x0001f0	Tridium
 oui DATATRACK			0x0002c6	Data Track Technology
-oui CICADA			0x0003f1	Cicada Semiconductor
 oui AGERE			0x00053d	Agere
 oui BANKSPEED			0x0006b8	Bankspeed Pty
 oui NETEXCELL			0x0008bb	NetExcell
@@ -114,6 +112,7 @@ oui xxINTEL			0x001f00	Intel
 oui xxBROADCOM_ALT1		0x0050ef	Broadcom Corporation
 oui yyINTEL			0x005500	Intel
 oui yyASIX			0x007063	Asix Semiconductor
+oui xxVITESSE			0x008083	Vitesse Semiconductor
 oui xxPMCSIERRA2		0x009057	PMC-Sierra
 oui xxCICADA			0x00c08f	Cicada Semiconductor
 oui xxNATSEMI			0x1000e8	National Semiconductor
@@ -223,15 +222,17 @@ model BROADCOM3 BCM5720C	0x0036 BCM5720C
 model BROADCOM4 BCM5725C	0x0038 BCM5725C 1000BASE-T media interface
 model xxBROADCOM_ALT1 BCM5906	0x0004 BCM5906 10/100baseTX media interface
 
-/* Cicada Semiconductor PHYs (now owned by Vitesse?) */
-model CICADA CS8201		0x0001 Cicada CS8201 10/100/1000TX PHY
-model CICADA CS8204		0x0004 Cicada CS8204 10/100/1000TX PHY
-model CICADA VSC8211		0x000b Cicada VSC8211 10/100/1000TX PHY
-model CICADA CS8201A		0x0020 Cicada CS8201 10/100/1000TX PHY
-model CICADA CS8201B		0x0021 Cicada CS8201 10/100/1000TX PHY
-model CICADA CS8244		0x002c Vitesse VSC8244 Quad 10/100/1000BASE-T PHY
+/* Cicada Semiconductor PHYs (-> Vitesse -> Microsemi) */
+
+model xxCICADA CIS8201		0x0001 Cicada CIS8201 10/100/1000TX PHY
+model xxCICADA CIS8204		0x0004 Cicada CIS8204 10/100/1000TX PHY
+model xxCICADA VSC8211		0x000b Cicada VSC8211 10/100/1000TX PHY
 model xxCICADA VSC8221		0x0015 Vitesse VSC8221 10/100/1000BASE-T PHY
-model xxCICADA CS8201B		0x0021 Cicada CS8201 10/100/1000TX PHY
+model xxCICADA VSC8224		0x0018 Vitesse VSC8224 10/100/1000BASE-T PHY
+model xxCICADA CIS8201A		0x0020 Cicada CIS8201 10/100/1000TX PHY
+model xxCICADA CIS8201B		0x0021 Cicada CIS8201 10/100/1000TX PHY
+model xxCICADA VSC8234		0x0022 Vitesse VSC8234 10/100/1000TX PHY
+model xxCICADA VSC8244		0x002c Vitesse VSC8244 Quad 10/100/1000BASE-T PHY
 
 /* Davicom Semiconductor PHYs */
 /* AMD Am79C873 seems to be a relabeled DM9101 */
@@ -393,8 +394,10 @@ model xxTSC 78Q2121		0x0015 78Q2121 100B
 model VIA VT6103		0x0032	VT6103 10/100 PHY
 model VIA VT6103_2		0x0034	VT6103 10/100 PHY
 
-/* Vitesse PHYs */
-model VITESSE VSC8601		0x0002	VSC8601 10/100/1000 PHY
+/* Vitesse PHYs (Now Microsemi) */
+model xxVITESSE VSC8601		0x0002 VSC8601 10/100/1000 PHY
+model xxVITESSE VSC8641		0x0003 Vitesse VSC8641 10/100/1000TX PHY
+model xxVITESSE VSC8501		0x0013 Vitesse VSC8501 10/100/1000TX PHY
 
 /* XaQti Corp. PHYs */
 model xxXAQTI XMACII		0x XaQti Corp. XMAC II gigabit interface



CVS commit: src/doc

2019-10-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Oct 17 09:14:50 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
alc(4): Add support for Killer E2400 and E2500.


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2597 src/doc/CHANGES:1.2598
--- src/doc/CHANGES:1.2597	Wed Oct 16 20:49:59 2019
+++ src/doc/CHANGES	Thu Oct 17 09:14:50 2019
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2597 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2598 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -60,3 +60,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	sup: removed, use ftp://ftp.astron.com/pub/sup [christos 20191015]
 	dhcpcd(8): Import dhcpcd-8.1.1 [roy 20191016]
 	evbarm: Add support for the NanoPi R1 and Duo2. [bad 20191016]
+	alc(4): Add support for Killer E2400 and E2500. [msaitoh 20191017]



CVS commit: src/doc

2019-10-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Oct 17 09:14:50 UTC 2019

Modified Files:
src/doc: CHANGES

Log Message:
alc(4): Add support for Killer E2400 and E2500.


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

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



CVS commit: src

2019-10-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Oct 17 09:13:48 UTC 2019

Modified Files:
src/share/man/man4: alc.4
src/sys/dev/pci: if_alc.c if_alcreg.h

Log Message:
 Add support for Killer E2400 and E2500.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/alc.4
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/pci/if_alc.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/if_alcreg.h

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/alc.4
diff -u src/share/man/man4/alc.4:1.5 src/share/man/man4/alc.4:1.6
--- src/share/man/man4/alc.4:1.5	Mon Jan 19 11:53:59 2015
+++ src/share/man/man4/alc.4	Thu Oct 17 09:13:48 2019
@@ -1,4 +1,4 @@
-.\"	$NetBSD: alc.4,v 1.5 2015/01/19 11:53:59 wiz Exp $
+.\"	$NetBSD: alc.4,v 1.6 2019/10/17 09:13:48 msaitoh Exp $
 .\"
 .\" Copyright (c) 2009 Kevin Lo 
 .\"
@@ -14,12 +14,12 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd January 18, 2015
+.Dd October 16, 2019
 .Dt ALC 4
 .Os
 .Sh NAME
 .Nm alc
-.Nd Atheros AR813x/AR815x/AR816x/AR817x Ethernet device
+.Nd Atheros AR813x/AR815x/AR816x/AR817x Killer E2200/2400/2500 Ethernet device
 .Sh SYNOPSIS
 .Cd "alc* at pci?"
 .Cd "atphy* at mii?"
@@ -27,7 +27,8 @@
 The
 .Nm
 driver provides support for Ethernet interfaces based on the
-Atheros AR813x/AR815x/AR816x/AR817x Gigabit/Fast Ethernet chipsets.
+Atheros AR813x/AR815x/AR816x/AR817x Gigabit/Fast Ethernet chipsets and
+Killer E2200/2400/2500 Ethernet chipsets.
 .Pp
 The following
 .Ar media

Index: src/sys/dev/pci/if_alc.c
diff -u src/sys/dev/pci/if_alc.c:1.41 src/sys/dev/pci/if_alc.c:1.42
--- src/sys/dev/pci/if_alc.c:1.41	Thu Oct 17 09:12:12 2019
+++ src/sys/dev/pci/if_alc.c	Thu Oct 17 09:13:48 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_alc.c,v 1.41 2019/10/17 09:12:12 msaitoh Exp $	*/
+/*	$NetBSD: if_alc.c,v 1.42 2019/10/17 09:13:48 msaitoh Exp $	*/
 /*	$OpenBSD: if_alc.c,v 1.1 2009/08/08 09:31:13 kevlo Exp $	*/
 /*-
  * Copyright (c) 2009, Pyun YongHyeon 
@@ -101,6 +101,10 @@ static struct alc_ident alc_ident_table[
 		"Atheros AR8172 PCIe Fast Ethernet" },
 	{ PCI_VENDOR_ATTANSIC, PCI_PRODUCT_ATTANSIC_E2200, 9 * 1024,
 		"Killer E2200 Gigabit Ethernet" },
+	{ PCI_VENDOR_ATTANSIC, PCI_PRODUCT_ATTANSIC_E2400, 9 * 1024,
+		"Killer E2400 Gigabit Ethernet" },
+	{ PCI_VENDOR_ATTANSIC, PCI_PRODUCT_ATTANSIC_E2500, 9 * 1024,
+		"Killer E2500 Gigabit Ethernet" },
 	{ 0, 0, 0, NULL },
 };
 
@@ -1002,6 +1006,8 @@ alc_phy_down(struct alc_softc *sc)
 	switch (sc->alc_ident->deviceid) {
 	case PCI_PRODUCT_ATTANSIC_AR8161:
 	case PCI_PRODUCT_ATTANSIC_E2200:
+	case PCI_PRODUCT_ATTANSIC_E2400:
+	case PCI_PRODUCT_ATTANSIC_E2500:
 	case PCI_PRODUCT_ATTANSIC_AR8162:
 	case PCI_PRODUCT_ATTANSIC_AR8171:
 	case PCI_PRODUCT_ATTANSIC_AR8172:
@@ -1342,7 +1348,13 @@ alc_attach(device_t parent, device_t sel
 			sc->alc_dma_rd_burst = 3;
 		if (alc_dma_burst[sc->alc_dma_wr_burst] > 1024)
 			sc->alc_dma_wr_burst = 3;
-
+		/*
+		 * Force maximum payload size to 128 bytes for
+		 * E2200/E2400/E2500.
+		 * Otherwise it triggers DMA write error.
+		 */
+		if ((sc->alc_flags & ALC_FLAG_E2X00) != 0)
+			sc->alc_dma_wr_burst = 0;
 		alc_init_pcie(sc);
 	}
 
@@ -1361,13 +1373,17 @@ alc_attach(device_t parent, device_t sel
 	 * shows the same PHY model/revision number of AR8131.
 	 */
 	switch (sc->alc_ident->deviceid) {
+	case PCI_PRODUCT_ATTANSIC_E2200:
+	case PCI_PRODUCT_ATTANSIC_E2400:
+	case PCI_PRODUCT_ATTANSIC_E2500:
+		sc->alc_flags |= ALC_FLAG_E2X00;
+		/* FALLTHROUGH */
 	case PCI_PRODUCT_ATTANSIC_AR8161:
 		if (PCI_SUBSYS_ID(pci_conf_read(
 		   sc->sc_pct, sc->sc_pcitag, PCI_SUBSYS_ID_REG)) == 0x0091 &&
 		   sc->alc_rev == 0)
 			sc->alc_flags |= ALC_FLAG_LINK_WAR;
 		/* FALLTHROUGH */
-	case PCI_PRODUCT_ATTANSIC_E2200:
 	case PCI_PRODUCT_ATTANSIC_AR8171:
 		sc->alc_flags |= ALC_FLAG_AR816X_FAMILY;
 		break;

Index: src/sys/dev/pci/if_alcreg.h
diff -u src/sys/dev/pci/if_alcreg.h:1.7 src/sys/dev/pci/if_alcreg.h:1.8
--- src/sys/dev/pci/if_alcreg.h:1.7	Tue Sep  3 14:29:26 2019
+++ src/sys/dev/pci/if_alcreg.h	Thu Oct 17 09:13:48 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_alcreg.h,v 1.7 2019/09/03 14:29:26 msaitoh Exp $	*/
+/*	$NetBSD: if_alcreg.h,v 1.8 2019/10/17 09:13:48 msaitoh Exp $	*/
 /*	$OpenBSD: if_alcreg.h,v 1.1 2009/08/08 09:31:13 kevlo Exp $	*/
 /*-
  * Copyright (c) 2009, Pyun YongHyeon 
@@ -1475,7 +1475,8 @@ struct alc_softc {
 #define	ALC_FLAG_APS		0x1000
 #define	ALC_FLAG_AR816X_FAMILY	0x2000
 #define	ALC_FLAG_LINK_WAR	0x4000
-#define	ALC_FLAG_LINK		0x8000
+#define	ALC_FLAG_E2X00		0x8000
+#define	ALC_FLAG_LINK		0x1
 
 	callout_t		sc_tick_ch;
 	struct alc_hw_stats	alc_stats;



CVS commit: src

2019-10-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Oct 17 09:13:48 UTC 2019

Modified Files:
src/share/man/man4: alc.4
src/sys/dev/pci: if_alc.c if_alcreg.h

Log Message:
 Add support for Killer E2400 and E2500.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/share/man/man4/alc.4
cvs rdiff -u -r1.41 -r1.42 src/sys/dev/pci/if_alc.c
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/if_alcreg.h

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



CVS commit: src/sys/dev/pci

2019-10-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Oct 17 09:12:12 UTC 2019

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

Log Message:
Some alc(4) fixes:

- Apply FreeBSD r218141:
 > alc_rev was used without initialization such that it failed to
 > apply AR8152 v1.0 specific initialization code. Fix this bug by
 > explicitly reading PCI device revision id via PCI accessor.
 >
 > Reported by: Gabriel Linder ( linder.gabriel <> gmail dot com )
- Apply FreeBSD r304574:
 > Correct DMA channel number selection on AR816x family of
 > controllers. For Gigabit Ethernet version of AR816x, AR813x/AR815x
 > except L1D controller, use vendor recommended ASPM parameters.
 > While here, increase alc_dma_burst array size.  Broken H/W can
 > return bogus value in theory.
- Use static.
- Whitespace fix. Remove extra backslash.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/pci/if_alc.c

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



CVS commit: src/sys/dev/pci

2019-10-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Oct 17 09:12:12 UTC 2019

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

Log Message:
Some alc(4) fixes:

- Apply FreeBSD r218141:
 > alc_rev was used without initialization such that it failed to
 > apply AR8152 v1.0 specific initialization code. Fix this bug by
 > explicitly reading PCI device revision id via PCI accessor.
 >
 > Reported by: Gabriel Linder ( linder.gabriel <> gmail dot com )
- Apply FreeBSD r304574:
 > Correct DMA channel number selection on AR816x family of
 > controllers. For Gigabit Ethernet version of AR816x, AR813x/AR815x
 > except L1D controller, use vendor recommended ASPM parameters.
 > While here, increase alc_dma_burst array size.  Broken H/W can
 > return bogus value in theory.
- Use static.
- Whitespace fix. Remove extra backslash.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/dev/pci/if_alc.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_alc.c
diff -u src/sys/dev/pci/if_alc.c:1.40 src/sys/dev/pci/if_alc.c:1.41
--- src/sys/dev/pci/if_alc.c:1.40	Tue Oct 15 15:59:26 2019
+++ src/sys/dev/pci/if_alc.c	Thu Oct 17 09:12:12 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_alc.c,v 1.40 2019/10/15 15:59:26 msaitoh Exp $	*/
+/*	$NetBSD: if_alc.c,v 1.41 2019/10/17 09:12:12 msaitoh Exp $	*/
 /*	$OpenBSD: if_alc.c,v 1.1 2009/08/08 09:31:13 kevlo Exp $	*/
 /*-
  * Copyright (c) 2009, Pyun YongHyeon 
@@ -168,7 +168,7 @@ static void	alc_tick(void *);
 static void	alc_txeof(struct alc_softc *);
 static void	alc_init_pcie(struct alc_softc *);
 
-uint32_t alc_dma_burst[] = { 128, 256, 512, 1024, 2048, 4096, 0 };
+static uint32_t alc_dma_burst[] = { 128, 256, 512, 1024, 2048, 4096, 0, 0 };
 
 CFATTACH_DECL_NEW(alc, sizeof(struct alc_softc),
 alc_match, alc_attach, alc_detach, NULL);
@@ -764,7 +764,6 @@ alc_get_macaddr_816x(struct alc_softc *s
 	alc_get_macaddr_par(sc);
 }
 
-
 static void
 alc_get_macaddr_par(struct alc_softc *sc)
 {
@@ -1791,7 +1790,6 @@ alc_dma_alloc(struct alc_softc *sc)
 	return (0);
 }
 
-
 static void
 alc_dma_free(struct alc_softc *sc)
 {
@@ -2856,7 +2854,7 @@ alc_init_backend(struct ifnet *ifp, bool
 		CSR_WRITE_4(sc, ALC_RRD1_HEAD_ADDR_LO, 0);
 		CSR_WRITE_4(sc, ALC_RRD2_HEAD_ADDR_LO, 0);
 		CSR_WRITE_4(sc, ALC_RRD3_HEAD_ADDR_LO, 0);
-	}\
+	}
 	/* Set Rx return descriptor counter. */
 	CSR_WRITE_4(sc, ALC_RRD_RING_CNT,
 	(ALC_RR_RING_CNT << RRD_RING_CNT_SHIFT) & RRD_RING_CNT_MASK);
@@ -3053,13 +3051,17 @@ alc_init_backend(struct ifnet *ifp, bool
 	reg = (RXQ_CFG_RD_BURST_DEFAULT << RXQ_CFG_RD_BURST_SHIFT) &
 	RXQ_CFG_RD_BURST_MASK;
 	reg |= RXQ_CFG_RSS_MODE_DIS;
-	if ((sc->alc_flags & ALC_FLAG_AR816X_FAMILY) != 0)
+	if ((sc->alc_flags & ALC_FLAG_AR816X_FAMILY) != 0) {
 		reg |= (RXQ_CFG_816X_IDT_TBL_SIZE_DEFAULT <<
 		RXQ_CFG_816X_IDT_TBL_SIZE_SHIFT) &
 		RXQ_CFG_816X_IDT_TBL_SIZE_MASK;
-	if ((sc->alc_flags & ALC_FLAG_FASTETHER) == 0 &&
-	sc->alc_ident->deviceid != PCI_PRODUCT_ATTANSIC_AR8151_V2)
-		reg |= RXQ_CFG_ASPM_THROUGHPUT_LIMIT_1M;
+		if ((sc->alc_flags & ALC_FLAG_FASTETHER) == 0)
+			reg |= RXQ_CFG_ASPM_THROUGHPUT_LIMIT_100M;
+	} else {
+		if ((sc->alc_flags & ALC_FLAG_FASTETHER) == 0 &&
+		sc->alc_ident->deviceid != PCI_PRODUCT_ATTANSIC_AR8151_V2)
+			reg |= RXQ_CFG_ASPM_THROUGHPUT_LIMIT_100M;
+	}
 	CSR_WRITE_4(sc, ALC_RXQ_CFG, reg);
 
 	/* Configure DMA parameters. */
@@ -3083,12 +3085,12 @@ alc_init_backend(struct ifnet *ifp, bool
 		switch (AR816X_REV(sc->alc_rev)) {
 		case AR816X_REV_A0:
 		case AR816X_REV_A1:
-			reg |= DMA_CFG_RD_CHNL_SEL_1;
+			reg |= DMA_CFG_RD_CHNL_SEL_2;
 			break;
 		case AR816X_REV_B0:
 			/* FALLTHROUGH */
 		default:
-			reg |= DMA_CFG_RD_CHNL_SEL_3;
+			reg |= DMA_CFG_RD_CHNL_SEL_4;
 			break;
 		}
 	}



CVS commit: src/usr.sbin/sysinst

2019-10-17 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Thu Oct 17 08:54:50 UTC 2019

Modified Files:
src/usr.sbin/sysinst: msg.mi.en msg.mi.fr

Log Message:
Sentence begins with capital letter ("yes or no?"). Also add a few french
sentences, to make it less awful, but not complete. Not tested.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/sysinst/msg.mi.en
cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/sysinst/msg.mi.fr

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/sysinst/msg.mi.en
diff -u src/usr.sbin/sysinst/msg.mi.en:1.22 src/usr.sbin/sysinst/msg.mi.en:1.23
--- src/usr.sbin/sysinst/msg.mi.en:1.22	Wed Oct  2 11:16:04 2019
+++ src/usr.sbin/sysinst/msg.mi.en	Thu Oct 17 08:54:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.en,v 1.22 2019/10/02 11:16:04 maya Exp $	*/
+/*	$NetBSD: msg.mi.en,v 1.23 2019/10/17 08:54:50 maxv Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -980,7 +980,7 @@ message Configure_network {Configure net
 message Partition_a_disk {Partition a disk}
 message Logging_functions {Logging functions}
 message Halt_the_system {Halt the system}
-message yes_or_no {yes or no?}
+message yes_or_no {Yes or no?}
 message Hit_enter_to_continue {Hit enter to continue}
 message Choose_your_installation {Choose your installation}
 

Index: src/usr.sbin/sysinst/msg.mi.fr
diff -u src/usr.sbin/sysinst/msg.mi.fr:1.20 src/usr.sbin/sysinst/msg.mi.fr:1.21
--- src/usr.sbin/sysinst/msg.mi.fr:1.20	Wed Oct  2 11:16:04 2019
+++ src/usr.sbin/sysinst/msg.mi.fr	Thu Oct 17 08:54:50 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.fr,v 1.20 2019/10/02 11:16:04 maya Exp $	*/
+/*	$NetBSD: msg.mi.fr,v 1.21 2019/10/17 08:54:50 maxv Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -269,7 +269,7 @@ message add_another_ptn
  *  $1 = size unit			GB
  */
 message fssizesok
-{Go on.  Free space $0 $1.}
+{Valider. Espace libre $0 $1.}
 
 /* Called with: 			Example
  *  $0 = missing space			1.4
@@ -1053,7 +1053,6 @@ message Finished {Terminée}
 message Command_failed {Échec}
 message Command_ended_on_signal {Commande terminée par un signal}
 
-
 message NetBSD_VERSION_Install_System {NetBSD-@@VERSION@@ Programme d'installation}
 message Exit_Install_System {Quitter le programme d'installation}
 message Install_NetBSD_to_hard_disk {Installation de NetBSD sur disque dur}
@@ -1062,8 +1061,8 @@ message Re_install_sets_or_install_addit
 message Reboot_the_computer {Redémarrer l'ordinateur}
 message Utility_menu {Utilitaires}
 message Config_menu {Configuration}
-message exit_menu_generic {Quitter}
 message exit_utility_menu {Quitter}
+message exit_menu_generic {Quitter}
 message NetBSD_VERSION_Utilities {Utilitaires NetBSD-@@VERSION@@}
 message Run_bin_sh {Exécuter /bin/sh}
 message Set_timezone {Configurer le fuseau horaire}
@@ -1071,7 +1070,7 @@ message Configure_network {Configurer le
 message Partition_a_disk {Partitionner un disque}
 message Logging_functions {Journaux}
 message Halt_the_system {Arrêter le système}
-message yes_or_no {oui ou non?}
+message yes_or_no {Oui ou non?}
 message Hit_enter_to_continue {Appuyez sur la touche Entrée pour continuer}
 message Choose_your_installation {Choisir le type d'installation désiré}
 
@@ -1334,7 +1333,7 @@ message	custom_type	{Unknown}
 
 message dl_type_invalid	{Invalid file system type code (0 .. 255)}
 
-message	cancel		{Cancel}
+message	cancel		{Annuler}
 
 message	out_of_range	{Invalid value}
 
@@ -1380,7 +1379,7 @@ message	fs_type_ffsv2	{FFSv2}
 message	fs_type_ffs	{FFS}
 message	other_fs_type	{Other type}
 
-message	editpack	{Edit name of the disk}
+message	editpack	{Changer le nom du disque}
 message	edit_disk_pack_hdr
 {The name of the disk is arbitrary. 
 It is useful for distinguishing between multiple disks.



CVS commit: src/usr.sbin/sysinst

2019-10-17 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Thu Oct 17 08:54:50 UTC 2019

Modified Files:
src/usr.sbin/sysinst: msg.mi.en msg.mi.fr

Log Message:
Sentence begins with capital letter ("yes or no?"). Also add a few french
sentences, to make it less awful, but not complete. Not tested.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/usr.sbin/sysinst/msg.mi.en
cvs rdiff -u -r1.20 -r1.21 src/usr.sbin/sysinst/msg.mi.fr

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



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

2019-10-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Oct 17 06:58:48 UTC 2019

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

Log Message:
Add rdpru.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/x86/x86/procfs_machdep.c

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



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

2019-10-17 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Oct 17 06:58:48 UTC 2019

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

Log Message:
Add rdpru.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/x86/x86/procfs_machdep.c

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

Modified files:

Index: src/sys/arch/x86/x86/procfs_machdep.c
diff -u src/sys/arch/x86/x86/procfs_machdep.c:1.33 src/sys/arch/x86/x86/procfs_machdep.c:1.34
--- src/sys/arch/x86/x86/procfs_machdep.c:1.33	Wed Jul 24 04:58:26 2019
+++ src/sys/arch/x86/x86/procfs_machdep.c	Thu Oct 17 06:58:48 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: procfs_machdep.c,v 1.33 2019/07/24 04:58:26 msaitoh Exp $ */
+/*	$NetBSD: procfs_machdep.c,v 1.34 2019/10/17 06:58:48 msaitoh Exp $ */
 
 /*
  * Copyright (c) 2001 Wasabi Systems, Inc.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.33 2019/07/24 04:58:26 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: procfs_machdep.c,v 1.34 2019/10/17 06:58:48 msaitoh Exp $");
 
 #include 
 #include 
@@ -153,7 +153,7 @@ static const char * const x86_features[]
 	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL},
 
 	{ /* (13) AMD 0x8008 ebx */
-	"clzero", "irperf", "xsaveerptr", NULL, NULL, NULL, NULL, NULL,
+	"clzero", "irperf", "xsaveerptr", NULL, "rdpru", NULL, NULL, NULL,
 	NULL, "wbnoinvd", NULL, NULL, NULL, NULL, NULL, NULL,
 	NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
 	NULL, "virt_ssbd", NULL, NULL, NULL, NULL, NULL, NULL},