CVS commit: src/sys/arch/powerpc

2020-06-21 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jun 22 05:34:57 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: mcontext.h types.h
src/sys/arch/powerpc/powerpc: sig_machdep.c

Log Message:
Fix previous; hide userland ABI details for kernel as suggested by joerg:

http://mail-index.netbsd.org/source-changes-d/2020/06/21/msg012745.html

- Revive __lwp_settcb(), and call _lwp_setprivate(2) from it.

- Keep l_private opaque pointer for kernel; store raw value of %r2 in it.
  In the previous commit message, I wrote,

http://mail-index.netbsd.org/source-changes/2020/06/21/msg118524.html

> - Make sure that, like other ports, l_private represents address of tcb,
>   not biased one as in %r2.

  but, it turned out to be wrong. mips stores a biased address, at least.
  It is userland responsibility to interpret returned values from
  lwp_getprivate(2).


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/powerpc/include/mcontext.h
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/powerpc/include/types.h
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/powerpc/powerpc/sig_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/powerpc/include/mcontext.h
diff -u src/sys/arch/powerpc/include/mcontext.h:1.20 src/sys/arch/powerpc/include/mcontext.h:1.21
--- src/sys/arch/powerpc/include/mcontext.h:1.20	Sun Jun 21 00:39:59 2020
+++ src/sys/arch/powerpc/include/mcontext.h	Mon Jun 22 05:34:57 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: mcontext.h,v 1.20 2020/06/21 00:39:59 rin Exp $	*/
+/*	$NetBSD: mcontext.h,v 1.21 2020/06/22 05:34:57 rin Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -141,8 +141,7 @@ typedef struct {
 
 #define	_UC_MACHINE_SET_PC(uc, pc)	_UC_MACHINE_PC(uc) = (pc)
 
-#if defined(_KERNEL) || \
-defined(_RTLD_SOURCE) || defined(_LIBC_SOURCE) || defined(__LIBPTHREAD_SOURCE__)
+#if defined(_RTLD_SOURCE) || defined(_LIBC_SOURCE) || defined(__LIBPTHREAD_SOURCE__)
 #include 
 
 /*
@@ -154,7 +153,6 @@ defined(_RTLD_SOURCE) || defined(_LIBC_S
 #define	TLS_DTV_OFFSET	0x8000
 __CTASSERT(TLS_TP_OFFSET + sizeof(struct tls_tcb) < 0x8000);
 
-#ifndef _KERNEL
 static __inline void *
 __lwp_gettcb_fast(void)
 {
@@ -167,7 +165,21 @@ __lwp_gettcb_fast(void)
 
 	return __tcb;
 }
-#endif /* !_KERNEL */
-#endif /* _KERNEL || _RTLD_SOURCE || _LIBC_SOURCE || __LIBPTHREAD_SOURCE__ */
+
+void _lwp_setprivate(void *);
+
+static __inline void
+__lwp_settcb(void *__tcb)
+{
+	__tcb = (uint8_t *)__tcb + TLS_TP_OFFSET + sizeof(struct tls_tcb);
+
+	__asm __volatile(
+		"mr %%r2,%[__tcb]"
+	:
+	:	[__tcb] "r" (__tcb));
+
+	_lwp_setprivate(__tcb);
+}
+#endif /* _RTLD_SOURCE || _LIBC_SOURCE || __LIBPTHREAD_SOURCE__ */
 
 #endif	/* !_POWERPC_MCONTEXT_H_ */

Index: src/sys/arch/powerpc/include/types.h
diff -u src/sys/arch/powerpc/include/types.h:1.63 src/sys/arch/powerpc/include/types.h:1.64
--- src/sys/arch/powerpc/include/types.h:1.63	Sun Jun 21 00:39:59 2020
+++ src/sys/arch/powerpc/include/types.h	Mon Jun 22 05:34:57 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: types.h,v 1.63 2020/06/21 00:39:59 rin Exp $	*/
+/*	$NetBSD: types.h,v 1.64 2020/06/22 05:34:57 rin Exp $	*/
 
 /*-
  * Copyright (C) 1995 Wolfgang Solfrank.
@@ -89,6 +89,7 @@ typedef __uint32_t tlb_asid_t;		/* for b
 #define	__HAVE_CPU_LWP_SETPRIVATE
 #define	__HAVE_COMMON___TLS_GET_ADDR
 #define	__HAVE___LWP_GETTCB_FAST
+#define	__HAVE___LWP_SETTCB
 #define	__HAVE_TLS_VARIANT_I
 
 #if defined(_KERNEL) || defined(_KMEMUSER)

Index: src/sys/arch/powerpc/powerpc/sig_machdep.c
diff -u src/sys/arch/powerpc/powerpc/sig_machdep.c:1.50 src/sys/arch/powerpc/powerpc/sig_machdep.c:1.51
--- src/sys/arch/powerpc/powerpc/sig_machdep.c:1.50	Sun Jun 21 00:40:00 2020
+++ src/sys/arch/powerpc/powerpc/sig_machdep.c	Mon Jun 22 05:34:57 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: sig_machdep.c,v 1.50 2020/06/21 00:40:00 rin Exp $	*/
+/*	$NetBSD: sig_machdep.c,v 1.51 2020/06/22 05:34:57 rin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.50 2020/06/21 00:40:00 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.51 2020/06/22 05:34:57 rin Exp $");
 
 #include "opt_ppcarch.h"
 #include "opt_altivec.h"
@@ -243,9 +243,8 @@ cpu_setmcontext(struct lwp *l, const mco
 #endif
 	}
 
-#define TLS_BIAS (TLS_TP_OFFSET + sizeof(struct tls_tcb))
 	if (flags & _UC_TLSBASE)
-		lwp_setprivate(l, (void *)((uintptr_t)gr[_REG_R2] - TLS_BIAS));
+		lwp_setprivate(l, (void *)(uintptr_t)gr[_REG_R2]);
 
 #ifdef PPC_HAVE_FPU
 	/* Restore FPU context, if any. */
@@ -280,8 +279,7 @@ cpu_lwp_setprivate(lwp_t *l, void *addr)
 {
 	struct trapframe * const tf = l->l_md.md_utf;
 
-	tf->tf_fixreg[_REG_R2] = (register_t)addr + TLS_BIAS;
-#undef TLS_BIAS
+	tf->tf_fixreg[_REG_R2] = (register_t)addr;
 
 	return 0;
 }



CVS commit: src/sys/arch/powerpc

2020-06-21 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jun 22 05:34:57 UTC 2020

Modified Files:
src/sys/arch/powerpc/include: mcontext.h types.h
src/sys/arch/powerpc/powerpc: sig_machdep.c

Log Message:
Fix previous; hide userland ABI details for kernel as suggested by joerg:

http://mail-index.netbsd.org/source-changes-d/2020/06/21/msg012745.html

- Revive __lwp_settcb(), and call _lwp_setprivate(2) from it.

- Keep l_private opaque pointer for kernel; store raw value of %r2 in it.
  In the previous commit message, I wrote,

http://mail-index.netbsd.org/source-changes/2020/06/21/msg118524.html

> - Make sure that, like other ports, l_private represents address of tcb,
>   not biased one as in %r2.

  but, it turned out to be wrong. mips stores a biased address, at least.
  It is userland responsibility to interpret returned values from
  lwp_getprivate(2).


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/powerpc/include/mcontext.h
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/powerpc/include/types.h
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/powerpc/powerpc/sig_machdep.c

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



CVS commit: src/share/installboot/evbmips

2020-06-21 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jun 22 03:15:49 UTC 2020

Added Files:
src/share/installboot/evbmips: Makefile

Log Message:
Add missing Makefile.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/share/installboot/evbmips/Makefile

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



CVS commit: src/etc/mtree

2020-06-21 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jun 22 03:16:29 UTC 2020

Modified Files:
src/etc/mtree: NetBSD.dist.base

Log Message:
Add missing ./usr/share/installboot/evbmips.


To generate a diff of this commit:
cvs rdiff -u -r1.219 -r1.220 src/etc/mtree/NetBSD.dist.base

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

Modified files:

Index: src/etc/mtree/NetBSD.dist.base
diff -u src/etc/mtree/NetBSD.dist.base:1.219 src/etc/mtree/NetBSD.dist.base:1.220
--- src/etc/mtree/NetBSD.dist.base:1.219	Mon Jun 15 01:57:30 2020
+++ src/etc/mtree/NetBSD.dist.base	Mon Jun 22 03:16:29 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: NetBSD.dist.base,v 1.219 2020/06/15 01:57:30 christos Exp $
+#	$NetBSD: NetBSD.dist.base,v 1.220 2020/06/22 03:16:29 rin Exp $
 #	@(#)4.4BSD.dist	8.1 (Berkeley) 6/13/93
 
 # Do not customize this file as it may be overwritten on upgrades.
@@ -485,6 +485,7 @@
 ./usr/share/info
 ./usr/share/installboot
 ./usr/share/installboot/evbarm
+./usr/share/installboot/evbmips
 ./usr/share/keymaps
 ./usr/share/keymaps/amiga
 ./usr/share/keymaps/atari



CVS commit: src/etc/mtree

2020-06-21 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jun 22 03:16:29 UTC 2020

Modified Files:
src/etc/mtree: NetBSD.dist.base

Log Message:
Add missing ./usr/share/installboot/evbmips.


To generate a diff of this commit:
cvs rdiff -u -r1.219 -r1.220 src/etc/mtree/NetBSD.dist.base

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



CVS commit: src/share/installboot/evbmips

2020-06-21 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jun 22 03:15:49 UTC 2020

Added Files:
src/share/installboot/evbmips: Makefile

Log Message:
Add missing Makefile.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/share/installboot/evbmips/Makefile

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

Added files:

Index: src/share/installboot/evbmips/Makefile
diff -u /dev/null src/share/installboot/evbmips/Makefile:1.1
--- /dev/null	Mon Jun 22 03:15:49 2020
+++ src/share/installboot/evbmips/Makefile	Mon Jun 22 03:15:48 2020
@@ -0,0 +1,12 @@
+#	$NetBSD: Makefile,v 1.1 2020/06/22 03:15:48 rin Exp $
+
+NOOBJ=		# defined
+
+.include 
+
+.if ${MKSHARE} != "no"
+FILES=		boards.plist
+FILESDIR=	/usr/share/installboot/evbmips
+.endif
+
+.include 



CVS commit: src/sys/arch/mips/cavium/dev

2020-06-21 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Jun 22 03:05:07 UTC 2020

Modified Files:
src/sys/arch/mips/cavium/dev: octeon_asxreg.h octeon_bootbusreg.h
octeon_ciureg.h octeon_corereg.h octeon_fpareg.h octeon_gmxreg.h
octeon_gpioreg.h octeon_ipdreg.h octeon_mpireg.h octeon_pip.c
octeon_pipreg.h octeon_powreg.h octeon_rnmreg.h octeon_twsireg.h
octeon_usbcreg.h octeon_usbnreg.h

Log Message:
Remove unused snprintb format strings.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/cavium/dev/octeon_asxreg.h \
src/sys/arch/mips/cavium/dev/octeon_bootbusreg.h \
src/sys/arch/mips/cavium/dev/octeon_gpioreg.h \
src/sys/arch/mips/cavium/dev/octeon_usbcreg.h \
src/sys/arch/mips/cavium/dev/octeon_usbnreg.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/cavium/dev/octeon_ciureg.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/cavium/dev/octeon_corereg.h \
src/sys/arch/mips/cavium/dev/octeon_fpareg.h \
src/sys/arch/mips/cavium/dev/octeon_gmxreg.h \
src/sys/arch/mips/cavium/dev/octeon_ipdreg.h \
src/sys/arch/mips/cavium/dev/octeon_mpireg.h \
src/sys/arch/mips/cavium/dev/octeon_pipreg.h \
src/sys/arch/mips/cavium/dev/octeon_powreg.h \
src/sys/arch/mips/cavium/dev/octeon_twsireg.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/cavium/dev/octeon_pip.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/cavium/dev/octeon_rnmreg.h

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

Modified files:

Index: src/sys/arch/mips/cavium/dev/octeon_asxreg.h
diff -u src/sys/arch/mips/cavium/dev/octeon_asxreg.h:1.1 src/sys/arch/mips/cavium/dev/octeon_asxreg.h:1.2
--- src/sys/arch/mips/cavium/dev/octeon_asxreg.h:1.1	Wed Apr 29 08:32:01 2015
+++ src/sys/arch/mips/cavium/dev/octeon_asxreg.h	Mon Jun 22 03:05:07 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: octeon_asxreg.h,v 1.1 2015/04/29 08:32:01 hikaru Exp $	*/
+/*	$NetBSD: octeon_asxreg.h,v 1.2 2020/06/22 03:05:07 simonb Exp $	*/
 
 /*
  * Copyright (c) 2007 Internet Initiative Japan, Inc.
@@ -155,114 +155,4 @@
 #define ASX0_GMII_RX_DAT_SET_63_5		0xffe0
 #define ASX0_GMII_RX_DAT_SET_SETTING		0x001f
 
-/*  */
-
-#define	ASX0_RX_PRT_EN_BITS \
-	"\177"		/* new format */ \
-	"\020"		/* hex display */ \
-	"\020"		/* %016x format */ \
-	"f\x03\x3d"	"63_3\0" \
-	"f\x00\x03"	"PRT_EN\0"
-#define	ASX0_TX_PRT_EN_BITS \
-	"\177"		/* new format */ \
-	"\020"		/* hex display */ \
-	"\020"		/* %016x format */ \
-	"f\x03\x3d"	"63_3\0" \
-	"f\x00\x03"	"PRT_EN\0"
-#define	ASX0_INT_REG_BITS \
-	"\177"		/* new format */ \
-	"\020"		/* hex display */ \
-	"\020"		/* %016x format */ \
-	"f\x0b\x35"	"63_11\0" \
-	"f\x08\x03"	"TXPSH\0" \
-	"b\x07"		"7\0" \
-	"f\x04\x03"	"TXPOP\0" \
-	"b\x03"		"3\0" \
-	"f\x00\x03"	"OVRFLW\0"
-#define	ASX0_INT_EN_BITS \
-	"\177"		/* new format */ \
-	"\020"		/* hex display */ \
-	"\020"		/* %016x format */ \
-	"f\x0b\x35"	"63_11\0" \
-	"f\x08\x03"	"TXPSH\0" \
-	"b\x07"		"7\0" \
-	"f\x04\x03"	"TXPOP\0" \
-	"b\x03"		"3\0" \
-	"f\x00\x03"	"OVRFLW\0"
-#define	ASX0_RX_CLK_SET0_BITS \
-	"\177"		/* new format */ \
-	"\020"		/* hex display */ \
-	"\020"		/* %016x format */ \
-
-#define	ASX0_RX_CLK_SET1_BITS \
-	"\177"		/* new format */ \
-	"\020"		/* hex display */ \
-	"\020"		/* %016x format */ \
-
-#define	ASX0_RX_CLK_SET2_BITS \
-	"\177"		/* new format */ \
-	"\020"		/* hex display */ \
-	"\020"		/* %016x format */ \
-
-#define	ASX0_PRT_LOOP_BITS \
-	"\177"		/* new format */ \
-	"\020"		/* hex display */ \
-	"\020"		/* %016x format */ \
-	"f\x07\x39"	"63_7\0" \
-	"f\x04\x03"	"EXT_LOOP\0" \
-	"b\x03"		"3\0" \
-	"f\x00\x03"	"PRT_LOOP\0"
-#define	ASX0_TX_CLK_SET0_BITS \
-	"\177"		/* new format */ \
-	"\020"		/* hex display */ \
-	"\020"		/* %016x format */ \
-
-#define	ASX0_TX_CLK_SET1_BITS \
-	"\177"		/* new format */ \
-	"\020"		/* hex display */ \
-	"\020"		/* %016x format */ \
-
-#define	ASX0_TX_CLK_SET2_BITS \
-	"\177"		/* new format */ \
-	"\020"		/* hex display */ \
-	"\020"		/* %016x format */ \
-
-#define	ASX0_COMP_BYP_BITS \
-	"\177"		/* new format */ \
-	"\020"		/* hex display */ \
-	"\020"		/* %016x format */ \
-
-#define	ASX0_TX_HI_WATER000_BITS \
-	"\177"		/* new format */ \
-	"\020"		/* hex display */ \
-	"\020"		/* %016x format */ \
-
-#define	ASX0_TX_HI_WATER001_BITS \
-	"\177"		/* new format */ \
-	"\020"		/* hex display */ \
-	"\020"		/* %016x format */ \
-
-#define	ASX0_TX_HI_WATER002_BITS \
-	"\177"		/* new format */ \
-	"\020"		/* hex display */ \
-	"\020"		/* %016x format */ \
-
-#define	ASX0_GMII_RX_CLK_SET_BITS \
-	"\177"		/* new format */ \
-	"\020"		/* hex display */ \
-	"\020"		/* %016x format */ \
-	"f\x05\x3b"	"63_5\0" \
-	"f\x00\x05"	"SETTING\0"
-#define	ASX0_GMII_RX_DAT_SET_BITS \
-	"\177"		/* new format */ \
-	"\020"		/* hex display */ \
-	"\020"		/* %016x format */ \
-	"f\x05\x3b"	"63_5\0" \
-	"f\x00\x05"	"SETTING\0"
-#define	ASX0_MII_RX_DAT_SET_BITS \
-	"\177"		/* 

CVS commit: src/sys/arch/mips/cavium/dev

2020-06-21 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Jun 22 03:05:07 UTC 2020

Modified Files:
src/sys/arch/mips/cavium/dev: octeon_asxreg.h octeon_bootbusreg.h
octeon_ciureg.h octeon_corereg.h octeon_fpareg.h octeon_gmxreg.h
octeon_gpioreg.h octeon_ipdreg.h octeon_mpireg.h octeon_pip.c
octeon_pipreg.h octeon_powreg.h octeon_rnmreg.h octeon_twsireg.h
octeon_usbcreg.h octeon_usbnreg.h

Log Message:
Remove unused snprintb format strings.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/mips/cavium/dev/octeon_asxreg.h \
src/sys/arch/mips/cavium/dev/octeon_bootbusreg.h \
src/sys/arch/mips/cavium/dev/octeon_gpioreg.h \
src/sys/arch/mips/cavium/dev/octeon_usbcreg.h \
src/sys/arch/mips/cavium/dev/octeon_usbnreg.h
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/cavium/dev/octeon_ciureg.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/cavium/dev/octeon_corereg.h \
src/sys/arch/mips/cavium/dev/octeon_fpareg.h \
src/sys/arch/mips/cavium/dev/octeon_gmxreg.h \
src/sys/arch/mips/cavium/dev/octeon_ipdreg.h \
src/sys/arch/mips/cavium/dev/octeon_mpireg.h \
src/sys/arch/mips/cavium/dev/octeon_pipreg.h \
src/sys/arch/mips/cavium/dev/octeon_powreg.h \
src/sys/arch/mips/cavium/dev/octeon_twsireg.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/cavium/dev/octeon_pip.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/cavium/dev/octeon_rnmreg.h

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



CVS commit: src/tests/lib/libc/sys

2020-06-21 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jun 22 02:51:07 UTC 2020

Modified Files:
src/tests/lib/libc/sys: t_ptrace_signal_wait.h t_ptrace_wait.h

Log Message:
Turn trigger_fpe() back to integer division by zero for a while
until QEMU bug #1668041 is fixed:

https://bugs.launchpad.net/qemu/+bug/1668041

by which floating-point division by zero is not trapped correctly
both on amd64 and i386.

Skip *_crash_fpe tests on powerpc, where integer division by zero
is never trapped.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/sys/t_ptrace_signal_wait.h
cvs rdiff -u -r1.30 -r1.31 src/tests/lib/libc/sys/t_ptrace_wait.h

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

Modified files:

Index: src/tests/lib/libc/sys/t_ptrace_signal_wait.h
diff -u src/tests/lib/libc/sys/t_ptrace_signal_wait.h:1.2 src/tests/lib/libc/sys/t_ptrace_signal_wait.h:1.3
--- src/tests/lib/libc/sys/t_ptrace_signal_wait.h:1.2	Wed Jun 17 08:42:16 2020
+++ src/tests/lib/libc/sys/t_ptrace_signal_wait.h	Mon Jun 22 02:51:06 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_signal_wait.h,v 1.2 2020/06/17 08:42:16 rin Exp $	*/
+/*	$NetBSD: t_ptrace_signal_wait.h,v 1.3 2020/06/22 02:51:06 rin Exp $	*/
 
 /*-
  * Copyright (c) 2016, 2017, 2018, 2019, 2020 The NetBSD Foundation, Inc.
@@ -423,7 +423,7 @@ traceme_crash(int sig)
 		info.psi_siginfo.si_code <= ILL_BADSTK);
 		break;
 	case SIGFPE:
-		ATF_REQUIRE_EQ(info.psi_siginfo.si_code, FPE_FLTDIV);
+		ATF_REQUIRE_EQ(info.psi_siginfo.si_code, FPE_INTDIV);
 		break;
 	case SIGBUS:
 		ATF_REQUIRE_EQ(info.psi_siginfo.si_code, BUS_ADRERR);
@@ -603,7 +603,7 @@ traceme_signalmasked_crash(int sig)
 		info.psi_siginfo.si_code <= ILL_BADSTK);
 		break;
 	case SIGFPE:
-		ATF_REQUIRE_EQ(info.psi_siginfo.si_code, FPE_FLTDIV);
+		ATF_REQUIRE_EQ(info.psi_siginfo.si_code, FPE_INTDIV);
 		break;
 	case SIGBUS:
 		ATF_REQUIRE_EQ(info.psi_siginfo.si_code, BUS_ADRERR);
@@ -786,7 +786,7 @@ traceme_signalignored_crash(int sig)
 		info.psi_siginfo.si_code <= ILL_BADSTK);
 		break;
 	case SIGFPE:
-		ATF_REQUIRE_EQ(info.psi_siginfo.si_code, FPE_FLTDIV);
+		ATF_REQUIRE_EQ(info.psi_siginfo.si_code, FPE_INTDIV);
 		break;
 	case SIGBUS:
 		ATF_REQUIRE_EQ(info.psi_siginfo.si_code, BUS_ADRERR);
@@ -1890,7 +1890,7 @@ unrelated_tracer_sees_crash(int sig, boo
 			info.psi_siginfo.si_code <= ILL_BADSTK);
 			break;
 		case SIGFPE:
-			FORKEE_ASSERT_EQ(info.psi_siginfo.si_code, FPE_FLTDIV);
+			FORKEE_ASSERT_EQ(info.psi_siginfo.si_code, FPE_INTDIV);
 			break;
 		case SIGBUS:
 			FORKEE_ASSERT_EQ(info.psi_siginfo.si_code, BUS_ADRERR);

Index: src/tests/lib/libc/sys/t_ptrace_wait.h
diff -u src/tests/lib/libc/sys/t_ptrace_wait.h:1.30 src/tests/lib/libc/sys/t_ptrace_wait.h:1.31
--- src/tests/lib/libc/sys/t_ptrace_wait.h:1.30	Wed Jun 17 08:42:16 2020
+++ src/tests/lib/libc/sys/t_ptrace_wait.h	Mon Jun 22 02:51:06 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: t_ptrace_wait.h,v 1.30 2020/06/17 08:42:16 rin Exp $	*/
+/*	$NetBSD: t_ptrace_wait.h,v 1.31 2020/06/22 02:51:06 rin Exp $	*/
 
 /*-
  * Copyright (c) 2016, 2017, 2018, 2019 The NetBSD Foundation, Inc.
@@ -671,6 +671,9 @@ are_fpu_exceptions_supported(void)
 		return false;
 	return true;
 }
+#elif __powerpc__
+/* Integer division by zero do not trap on powerpc. */
+#define are_fpu_exceptions_supported() 0
 #else
 #define are_fpu_exceptions_supported() 1
 #endif
@@ -678,14 +681,15 @@ are_fpu_exceptions_supported(void)
 static void __used
 trigger_fpe(void)
 {
-	volatile double a = getpid();
-	volatile double b = atoi("0");
+	volatile int a = getpid();
+	volatile int b = atoi("0");
 
 #ifdef __HAVE_FENV
 	feenableexcept(FE_ALL_EXCEPT);
 #endif
 
-	usleep((int)(a / b));
+	/* Division by zero causes CPU trap, translated to SIGFPE */
+	usleep(a / b);
 }
 
 static void __used



CVS commit: src/tests/lib/libc/sys

2020-06-21 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Mon Jun 22 02:51:07 UTC 2020

Modified Files:
src/tests/lib/libc/sys: t_ptrace_signal_wait.h t_ptrace_wait.h

Log Message:
Turn trigger_fpe() back to integer division by zero for a while
until QEMU bug #1668041 is fixed:

https://bugs.launchpad.net/qemu/+bug/1668041

by which floating-point division by zero is not trapped correctly
both on amd64 and i386.

Skip *_crash_fpe tests on powerpc, where integer division by zero
is never trapped.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libc/sys/t_ptrace_signal_wait.h
cvs rdiff -u -r1.30 -r1.31 src/tests/lib/libc/sys/t_ptrace_wait.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/mips

2020-06-21 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Jun 22 02:26:20 UTC 2020

Modified Files:
src/sys/arch/mips/cavium: octeonvar.h
src/sys/arch/mips/cavium/dev: if_cnmac.c if_cnmacvar.h octeon_asx.c
octeon_asxvar.h octeon_ciu.c octeon_fpa.c octeon_fpavar.h
octeon_gmx.c octeon_gmxvar.h octeon_ipd.c octeon_ipdvar.h
octeon_pci.c octeon_pip.c octeon_pipvar.h octeon_pko.c
octeon_pkovar.h octeon_pow.c octeon_powvar.h
src/sys/arch/mips/conf: files.octeon

Log Message:
Remove unmaintained CNMAC_DEBUG debug code.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/mips/cavium/octeonvar.h
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/mips/cavium/dev/if_cnmac.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/cavium/dev/if_cnmacvar.h \
src/sys/arch/mips/cavium/dev/octeon_asx.c \
src/sys/arch/mips/cavium/dev/octeon_ciu.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/cavium/dev/octeon_asxvar.h \
src/sys/arch/mips/cavium/dev/octeon_ipdvar.h \
src/sys/arch/mips/cavium/dev/octeon_pipvar.h \
src/sys/arch/mips/cavium/dev/octeon_pko.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/cavium/dev/octeon_fpa.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/cavium/dev/octeon_fpavar.h \
src/sys/arch/mips/cavium/dev/octeon_gmxvar.h \
src/sys/arch/mips/cavium/dev/octeon_ipd.c \
src/sys/arch/mips/cavium/dev/octeon_pip.c \
src/sys/arch/mips/cavium/dev/octeon_powvar.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/mips/cavium/dev/octeon_gmx.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/cavium/dev/octeon_pci.c \
src/sys/arch/mips/cavium/dev/octeon_pkovar.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/cavium/dev/octeon_pow.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/conf/files.octeon

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

Modified files:

Index: src/sys/arch/mips/cavium/octeonvar.h
diff -u src/sys/arch/mips/cavium/octeonvar.h:1.11 src/sys/arch/mips/cavium/octeonvar.h:1.12
--- src/sys/arch/mips/cavium/octeonvar.h:1.11	Thu Jun 18 13:52:08 2020
+++ src/sys/arch/mips/cavium/octeonvar.h	Mon Jun 22 02:26:19 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: octeonvar.h,v 1.11 2020/06/18 13:52:08 simonb Exp $	*/
+/*	$NetBSD: octeonvar.h,v 1.12 2020/06/22 02:26:19 simonb Exp $	*/
 
 /*-
  * Copyright (c) 2001 The NetBSD Foundation, Inc.
@@ -415,47 +415,4 @@ octeon_get_cycles(void)
 #endif
 }
 
-/* -- */
-
-/*  event counter */
-
-#if defined(CNMAC_DEBUG)
-#define	OCTEON_EVCNT_INC(sc, name) \
-	do { (sc)->sc_ev_##name.ev_count++; } while (0)
-#define	OCTEON_EVCNT_ADD(sc, name, n) \
-	do { (sc)->sc_ev_##name.ev_count += (n); } while (0)
-#define	OCTEON_EVCNT_ATTACH_EVCNTS(sc, entries, devname) \
-do {\
-	int i;			\
-	const struct octeon_evcnt_entry *ee;			\
-\
-	for (i = 0; i < (int)__arraycount(entries); i++) {	\
-		ee = &(entries)[i];\
-		evcnt_attach_dynamic(\
-		(struct evcnt *)((uintptr_t)(sc) + ee->ee_offset), \
-		ee->ee_type, ee->ee_parent, devname,	\
-		ee->ee_name);\
-	}			\
-} while (0)
-#else
-#define	OCTEON_EVCNT_INC(sc, name)
-#define	OCTEON_EVCNT_ADD(sc, name, n)
-#define	OCTEON_EVCNT_ATTACH_EVCNTS(sc, entries, devname)
-#endif
-
-struct octeon_evcnt_entry {
-	size_t		ee_offset;
-	int		ee_type;
-	struct evcnt	*ee_parent;
-	const char	*ee_name;
-};
-
-#define	OCTEON_EVCNT_ENTRY(_sc_type, _var, _ev_type, _parent, _name) \
-	{			\
-		.ee_offset = offsetof(_sc_type, sc_ev_##_var),	\
-		.ee_type = EVCNT_TYPE_##_ev_type,		\
-		.ee_parent = _parent,\
-		.ee_name = _name\
-	}
-
 #endif	/* _MIPS_OCTEON_OCTEONVAR_H_ */

Index: src/sys/arch/mips/cavium/dev/if_cnmac.c
diff -u src/sys/arch/mips/cavium/dev/if_cnmac.c:1.22 src/sys/arch/mips/cavium/dev/if_cnmac.c:1.23
--- src/sys/arch/mips/cavium/dev/if_cnmac.c:1.22	Thu Jun 18 13:52:08 2020
+++ src/sys/arch/mips/cavium/dev/if_cnmac.c	Mon Jun 22 02:26:19 2020
@@ -1,24 +1,12 @@
-/*	$NetBSD: if_cnmac.c,v 1.22 2020/06/18 13:52:08 simonb Exp $	*/
+/*	$NetBSD: if_cnmac.c,v 1.23 2020/06/22 02:26:19 simonb Exp $	*/
 
 #include 
 #if 0
-__KERNEL_RCSID(0, "$NetBSD: if_cnmac.c,v 1.22 2020/06/18 13:52:08 simonb Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_cnmac.c,v 1.23 2020/06/22 02:26:19 simonb Exp $");
 #endif
 
 #include "opt_octeon.h"
 
-#ifdef	CNMAC_DEBUG
-
-#ifndef DIAGNOSTIC
-#define	DIAGNOSTIC
-#endif
-
-#ifndef DEBUG
-#define	DEBUG
-#endif
-
-#endif
-
 /*
  * If no free send buffer is available, free all the sent buffers and bail out.
  */
@@ -83,14 +71,6 @@ __KERNEL_RCSID(0, "$NetBSD: if_cnmac.c,v
 #include 
 #include 
 
-#ifdef CNMAC_DEBUG
-#define	CNMAC_KASSERT(x)	KASSERT(x)
-#define	CNMAC_KDASSERT(x)	KDASSERT(x)
-#else
-#define	CNMAC_KASSERT(x)
-#define	CNMAC_KDASSERT(x)
-#endif
-
 /*
  * Set the PKO to think command buffers are an odd length.  This makes it so we
  * never have to divide a 

CVS commit: src/sys/arch/mips

2020-06-21 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Mon Jun 22 02:26:20 UTC 2020

Modified Files:
src/sys/arch/mips/cavium: octeonvar.h
src/sys/arch/mips/cavium/dev: if_cnmac.c if_cnmacvar.h octeon_asx.c
octeon_asxvar.h octeon_ciu.c octeon_fpa.c octeon_fpavar.h
octeon_gmx.c octeon_gmxvar.h octeon_ipd.c octeon_ipdvar.h
octeon_pci.c octeon_pip.c octeon_pipvar.h octeon_pko.c
octeon_pkovar.h octeon_pow.c octeon_powvar.h
src/sys/arch/mips/conf: files.octeon

Log Message:
Remove unmaintained CNMAC_DEBUG debug code.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/mips/cavium/octeonvar.h
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/mips/cavium/dev/if_cnmac.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/mips/cavium/dev/if_cnmacvar.h \
src/sys/arch/mips/cavium/dev/octeon_asx.c \
src/sys/arch/mips/cavium/dev/octeon_ciu.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/mips/cavium/dev/octeon_asxvar.h \
src/sys/arch/mips/cavium/dev/octeon_ipdvar.h \
src/sys/arch/mips/cavium/dev/octeon_pipvar.h \
src/sys/arch/mips/cavium/dev/octeon_pko.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/mips/cavium/dev/octeon_fpa.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/mips/cavium/dev/octeon_fpavar.h \
src/sys/arch/mips/cavium/dev/octeon_gmxvar.h \
src/sys/arch/mips/cavium/dev/octeon_ipd.c \
src/sys/arch/mips/cavium/dev/octeon_pip.c \
src/sys/arch/mips/cavium/dev/octeon_powvar.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/mips/cavium/dev/octeon_gmx.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/mips/cavium/dev/octeon_pci.c \
src/sys/arch/mips/cavium/dev/octeon_pkovar.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/mips/cavium/dev/octeon_pow.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/conf/files.octeon

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



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

2020-06-21 Thread Rin Okuyama

On 2020/06/22 5:10, Joerg Sonnenberger wrote:

On Sun, Jun 21, 2020 at 12:40:00AM +, Rin Okuyama wrote:

- Obsolete __lwp_settcb() in order to let kernel know new TLS address via
   _lwp_setprivate(2). Alternatively, we can call _lwp_setprivate(2) within
   __lwp_settcb() like mips, but it is just double handling; we adjust %r2
   appropriately in _lwp_setprivate(2) via cpu_lwp_setprivate().


If an architecture stores the TCB at an offset, it should provide
__lwp_settcb to do the necessary adjust and then invoke _lwp_setprivate
as appropiate. The MIPS variant is correct. This should *not* be done in
the kernel, as it is an ABI detail of the userland TLS API.


Thank you for your comment. I agree. Tt is cleaner not to bring in
userland ABI details into kernel. OK, I will fix it differently.

Thanks,
rin


CVS commit: src/share/mk

2020-06-21 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Mon Jun 22 01:04:26 UTC 2020

Modified Files:
src/share/mk: bsd.dep.mk

Log Message:
bsd.dep.mk: revert 1.85 (for now)

Revert my recent 1.85 revision that fixed "make tags".  It causes too
much build breakage elsewhere in the tree that needs to be resolved first.

Issues include:
- Directories using TESTS_CXX with .cpp and .cxx extension instead of the
  default .cc extension (see bsd.prog.mk). Most of these have been fixed.
- external/gpl3/gcc build of .cc files. (No idea what's wrong there).


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/share/mk/bsd.dep.mk

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



CVS commit: src/share/mk

2020-06-21 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Mon Jun 22 01:04:26 UTC 2020

Modified Files:
src/share/mk: bsd.dep.mk

Log Message:
bsd.dep.mk: revert 1.85 (for now)

Revert my recent 1.85 revision that fixed "make tags".  It causes too
much build breakage elsewhere in the tree that needs to be resolved first.

Issues include:
- Directories using TESTS_CXX with .cpp and .cxx extension instead of the
  default .cc extension (see bsd.prog.mk). Most of these have been fixed.
- external/gpl3/gcc build of .cc files. (No idea what's wrong there).


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/share/mk/bsd.dep.mk

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

Modified files:

Index: src/share/mk/bsd.dep.mk
diff -u src/share/mk/bsd.dep.mk:1.85 src/share/mk/bsd.dep.mk:1.86
--- src/share/mk/bsd.dep.mk:1.85	Sun Jun 21 03:39:21 2020
+++ src/share/mk/bsd.dep.mk	Mon Jun 22 01:04:26 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.dep.mk,v 1.85 2020/06/21 03:39:21 lukem Exp $
+#	$NetBSD: bsd.dep.mk,v 1.86 2020/06/22 01:04:26 lukem Exp $
 
 # Basic targets
 realdepend:	beforedepend .depend afterdepend
@@ -94,16 +94,16 @@ _MKDEP_FILEFLAGS=
 
 # Clean rules
 .if defined(SRCS) && !empty(SRCS)
-CLEANDIRFILES+= .depend ${__DPSRCS.d} ${__DPSRCS.d:.d=.d.tmp} tags ${CLEANDEPEND}
+CLEANDIRFILES+= .depend ${__DPSRCS.d} ${__DPSRCS.d:.d=.d.tmp} ${.CURDIR}/tags ${CLEANDEPEND}
 .endif
 
 # Custom rules
-.if !commands(tags)
+.if !target(tags)
 tags: ${SRCS}
 .if defined(SRCS) && !empty(SRCS)
 	${_MKTARGET_CREATE}
-	-cd "${.CURDIR}"; ctags -f /dev/stdout ${.ALLSRC:M*.[cly]} | \
-	${TOOL_SED} "s;\${.CURDIR}/;;" > ${.OBJDIR}/tags
+	-cd "${.CURDIR}"; ctags -f /dev/stdout ${.ALLSRC:N*.h} | \
+	${TOOL_SED} "s;\${.CURDIR}/;;" > tags
 .endif
 .endif
 



CVS commit: src/doc

2020-06-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Jun 21 23:53:59 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
evbarm: Added boot.cfg support to efiboot


To generate a diff of this commit:
cvs rdiff -u -r1.2704 -r1.2705 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.2704 src/doc/CHANGES:1.2705
--- src/doc/CHANGES:1.2704	Sun Jun 21 17:26:15 2020
+++ src/doc/CHANGES	Sun Jun 21 23:53:59 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2704 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2705 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -223,3 +223,4 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	dhcpcd: Import version 9.1.2 [roy 20200615]
 	evbarm: Add support for loading modules with the bootloader.
 		[jmcneill 20200221]
+	evbarm: Added boot.cfg support to efiboot [jmcneill 20200211]



CVS commit: src/doc

2020-06-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Jun 21 23:53:59 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
evbarm: Added boot.cfg support to efiboot


To generate a diff of this commit:
cvs rdiff -u -r1.2704 -r1.2705 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/stand/efiboot

2020-06-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Jun 21 23:53:26 UTC 2020

Modified Files:
src/sys/stand/efiboot: Makefile.efiboot boot.c efiboot.c version
Added Files:
src/sys/stand/efiboot: bootmenu.c bootmenu.h

Log Message:
Add boot.cfg support.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/stand/efiboot/Makefile.efiboot
cvs rdiff -u -r1.22 -r1.23 src/sys/stand/efiboot/boot.c
cvs rdiff -u -r0 -r1.1 src/sys/stand/efiboot/bootmenu.c \
src/sys/stand/efiboot/bootmenu.h
cvs rdiff -u -r1.18 -r1.19 src/sys/stand/efiboot/efiboot.c
cvs rdiff -u -r1.16 -r1.17 src/sys/stand/efiboot/version

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

Modified files:

Index: src/sys/stand/efiboot/Makefile.efiboot
diff -u src/sys/stand/efiboot/Makefile.efiboot:1.14 src/sys/stand/efiboot/Makefile.efiboot:1.15
--- src/sys/stand/efiboot/Makefile.efiboot:1.14	Sun Jun 21 17:24:26 2020
+++ src/sys/stand/efiboot/Makefile.efiboot	Sun Jun 21 23:53:26 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.efiboot,v 1.14 2020/06/21 17:24:26 jmcneill Exp $
+# $NetBSD: Makefile.efiboot,v 1.15 2020/06/21 23:53:26 jmcneill Exp $
 
 S=		${.CURDIR}/../../..
 
@@ -21,8 +21,8 @@ AFLAGS.start.S= ${${ACTIVE_CC} == "clang
 
 .PATH: ${EFIDIR}/gnuefi
 SOURCES=	crt0-efi-${GNUEFIARCH}.S reloc_${GNUEFIARCH}.c
-SOURCES+=	boot.c conf.c console.c dev_net.c devopen.c exec.c module.c \
-		panic.c prompt.c
+SOURCES+=	boot.c bootmenu.c conf.c console.c dev_net.c devopen.c exec.c \
+		module.c panic.c prompt.c
 SOURCES+=	efiboot.c efichar.c efidev.c efienv.c efigetsecs.c efifdt.c \
 		efifile.c efiblock.c efinet.c efipxe.c efiacpi.c efirng.c smbios.c
 

Index: src/sys/stand/efiboot/boot.c
diff -u src/sys/stand/efiboot/boot.c:1.22 src/sys/stand/efiboot/boot.c:1.23
--- src/sys/stand/efiboot/boot.c:1.22	Sun Jun 21 17:24:26 2020
+++ src/sys/stand/efiboot/boot.c	Sun Jun 21 23:53:26 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.22 2020/06/21 17:24:26 jmcneill Exp $	*/
+/*	$NetBSD: boot.c,v 1.23 2020/06/21 23:53:26 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka 
@@ -34,12 +34,14 @@
 #include "efienv.h"
 #include "efirng.h"
 #include "module.h"
+#include "bootmenu.h"
 
 #include 
 #include 
 #include 
 
 #include 
+#include 
 
 extern const char bootprog_name[], bootprog_rev[], bootprog_kernrev[];
 
@@ -96,6 +98,7 @@ void	command_load(char *);
 void	command_unload(char *);
 void	command_ls(char *);
 void	command_mem(char *);
+void	command_menu(char *);
 void	command_printenv(char *);
 void	command_setenv(char *);
 void	command_clearenv(char *);
@@ -116,6 +119,7 @@ const struct boot_command commands[] = {
 	{ "unload",	command_unload,		"unload " },
 	{ "ls",		command_ls,		"ls [hdNn:/path]" },
 	{ "mem",	command_mem,		"mem" },
+	{ "menu",	command_menu,		"menu" },
 	{ "printenv",	command_printenv,	"printenv [key]" },
 	{ "setenv",	command_setenv,		"setenv  " },
 	{ "clearenv",	command_clearenv,	"clearenv " },
@@ -269,6 +273,17 @@ command_mem(char *arg)
 }
 
 void
+command_menu(char *arg)
+{
+	if (bootcfg_info.nummenu == 0) {
+		printf("No menu defined in boot.cfg\n");
+		return;
+	}
+
+	doboottypemenu();	/* Does not return */
+}
+
+void
 command_printenv(char *arg)
 {
 	char *val;
@@ -530,7 +545,20 @@ boot(void)
 	int currname, c;
 
 	read_env();
+
+	parsebootconf(BOOTCFG_FILENAME);
+
+	if (bootcfg_info.clear)
+		uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut);
+
 	print_banner();
+
+	/* Display menu if configured */
+	twiddle_toggle = 1;
+	if (bootcfg_info.nummenu > 0) {
+		doboottypemenu();	/* No return */
+	}
+
 	printf("Press return to boot now, any other key for boot prompt\n");
 
 	if (netbsd_path[0] != '\0')

Index: src/sys/stand/efiboot/efiboot.c
diff -u src/sys/stand/efiboot/efiboot.c:1.18 src/sys/stand/efiboot/efiboot.c:1.19
--- src/sys/stand/efiboot/efiboot.c:1.18	Thu May 14 19:20:08 2020
+++ src/sys/stand/efiboot/efiboot.c	Sun Jun 21 23:53:26 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: efiboot.c,v 1.18 2020/05/14 19:20:08 riastradh Exp $ */
+/* $NetBSD: efiboot.c,v 1.19 2020/06/21 23:53:26 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2018 Jared McNeill 
@@ -72,7 +72,6 @@ efi_main(EFI_HANDLE imageHandle, EFI_SYS
 	uefi_call_wrapper(ST->ConOut->Reset, 2, ST->ConOut, TRUE);
 	uefi_call_wrapper(ST->ConOut->SetMode, 2, ST->ConOut, 0);
 	uefi_call_wrapper(ST->ConOut->EnableCursor, 2, ST->ConOut, TRUE);
-	uefi_call_wrapper(ST->ConOut->ClearScreen, 1, ST->ConOut);
 
 	status = uefi_call_wrapper(BS->AllocatePages, 4, AllocateAnyPages, EfiLoaderData, sz, _start);
 	if (EFI_ERROR(status))

Index: src/sys/stand/efiboot/version
diff -u src/sys/stand/efiboot/version:1.16 src/sys/stand/efiboot/version:1.17
--- src/sys/stand/efiboot/version:1.16	Sun Jun 21 17:24:26 2020
+++ src/sys/stand/efiboot/version	Sun Jun 21 23:53:26 2020
@@ -1,4 +1,4 @@
-$NetBSD: version,v 1.16 2020/06/21 17:24:26 jmcneill Exp $
+$NetBSD: version,v 1.17 2020/06/21 23:53:26 

CVS commit: src/sys/stand/efiboot

2020-06-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Jun 21 23:53:26 UTC 2020

Modified Files:
src/sys/stand/efiboot: Makefile.efiboot boot.c efiboot.c version
Added Files:
src/sys/stand/efiboot: bootmenu.c bootmenu.h

Log Message:
Add boot.cfg support.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/stand/efiboot/Makefile.efiboot
cvs rdiff -u -r1.22 -r1.23 src/sys/stand/efiboot/boot.c
cvs rdiff -u -r0 -r1.1 src/sys/stand/efiboot/bootmenu.c \
src/sys/stand/efiboot/bootmenu.h
cvs rdiff -u -r1.18 -r1.19 src/sys/stand/efiboot/efiboot.c
cvs rdiff -u -r1.16 -r1.17 src/sys/stand/efiboot/version

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



CVS commit: src/sys/dev/iscsi

2020-06-21 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Jun 21 23:08:16 UTC 2020

Modified Files:
src/sys/dev/iscsi: iscsi_globals.h iscsi_ioctl.c

Log Message:
avoid the use of UVM internals in the iscsi ioctl code.
copyin/out are fine in this context.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/iscsi/iscsi_globals.h
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/iscsi/iscsi_ioctl.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/iscsi

2020-06-21 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Jun 21 23:08:16 UTC 2020

Modified Files:
src/sys/dev/iscsi: iscsi_globals.h iscsi_ioctl.c

Log Message:
avoid the use of UVM internals in the iscsi ioctl code.
copyin/out are fine in this context.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/iscsi/iscsi_globals.h
cvs rdiff -u -r1.31 -r1.32 src/sys/dev/iscsi/iscsi_ioctl.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/iscsi/iscsi_globals.h
diff -u src/sys/dev/iscsi/iscsi_globals.h:1.25 src/sys/dev/iscsi/iscsi_globals.h:1.26
--- src/sys/dev/iscsi/iscsi_globals.h:1.25	Sun Apr 21 11:45:08 2019
+++ src/sys/dev/iscsi/iscsi_globals.h	Sun Jun 21 23:08:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_globals.h,v 1.25 2019/04/21 11:45:08 maya Exp $	*/
+/*	$NetBSD: iscsi_globals.h,v 1.26 2020/06/21 23:08:16 chs Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -651,10 +651,6 @@ int kill_all_sessions(void);
 void handle_connection_error(connection_t *, uint32_t, int);
 void add_connection_cleanup(connection_t *);
 
-#ifndef ISCSI_MINIMAL
-uint32_t map_databuf(struct proc *, void **, uint32_t);
-void unmap_databuf(struct proc *, void *, uint32_t);
-#endif
 int iscsiioctl(struct file *, u_long, void *);
 
 session_t *find_session(uint32_t);

Index: src/sys/dev/iscsi/iscsi_ioctl.c
diff -u src/sys/dev/iscsi/iscsi_ioctl.c:1.31 src/sys/dev/iscsi/iscsi_ioctl.c:1.32
--- src/sys/dev/iscsi/iscsi_ioctl.c:1.31	Tue May 26 00:50:54 2020
+++ src/sys/dev/iscsi/iscsi_ioctl.c	Sun Jun 21 23:08:16 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: iscsi_ioctl.c,v 1.31 2020/05/26 00:50:54 kamil Exp $	*/
+/*	$NetBSD: iscsi_ioctl.c,v 1.32 2020/06/21 23:08:16 chs Exp $	*/
 
 /*-
  * Copyright (c) 2004,2005,2006,2011 The NetBSD Foundation, Inc.
@@ -34,11 +34,7 @@
 #include 
 #include 
 #include 
-
-#ifndef ISCSI_MINIMAL
-#include 
-#include 
-#endif
+#include 
 
 static kmutex_t iscsi_cleanup_mtx;
 static kcondvar_t iscsi_cleanup_cv;
@@ -1278,92 +1274,6 @@ restore_connection(iscsi_login_parameter
 #ifndef ISCSI_MINIMAL
 
 /*
- * map_databuf:
- *Map user-supplied data buffer into kernel space.
- *
- *Parameter:
- *  pIN: The proc pointer of the caller
- *  buf  IN/OUT: The virtual address of the buffer, modified
- *   on exit to reflect kernel VA.
- *  datalen  IN: The size of the data buffer
- *
- *Returns:
- *  An ISCSI status code on error, else 0.
- */
-
-uint32_t
-map_databuf(struct proc *p, void **buf, uint32_t datalen)
-{
-	vaddr_t kva, databuf, offs;
-	int error;
-
-	/* page align address */
-	databuf = (vaddr_t) * buf & ~PAGE_MASK;
-	/* offset of VA into page */
-	offs = (vaddr_t) * buf & PAGE_MASK;
-	/* round to full page including offset */
-	datalen = (datalen + offs + PAGE_MASK) & ~PAGE_MASK;
-
-	/* Do some magic to the vm space reference count (copied from "copyin_proc") */
-	if ((p->p_sflag & PS_WEXIT) || (p->p_vmspace->vm_refcnt < 1)) {
-		return ISCSI_STATUS_NO_RESOURCES;
-	}
-	uvmspace_addref(p->p_vmspace);
-
-	/* this is lifted from uvm_io */
-	error = uvm_map_extract(>p_vmspace->vm_map, databuf, datalen,
-			kernel_map, ,
-			UVM_EXTRACT_QREF | UVM_EXTRACT_CONTIG |
-UVM_EXTRACT_FIXPROT);
-	if (error) {
-		DEBOUT(("uvm_map_extract failed, error = %d\n", error));
-		return ISCSI_STATUS_NO_RESOURCES;
-	}
-	/* add offset back into kernel VA */
-	*buf = (void *) (kva + offs);
-
-	return 0;
-}
-
-
-/*
- * unmap_databuf:
- *Remove kernel space mapping of data buffer.
- *
- *Parameter:
- *  pIN: The proc pointer of the caller
- *  buf  IN: The kernel virtual address of the buffer
- *  datalen  IN: The size of the data buffer
- *
- *Returns:
- *  An ISCSI status code on error, else 0.
- */
-
-void
-unmap_databuf(struct proc *p, void *buf, uint32_t datalen)
-{
-	struct vm_map_entry *dead_entries;
-	vaddr_t databuf;
-
-	/* round to full page */
-	datalen = (datalen + ((uintptr_t) buf & PAGE_MASK) + PAGE_MASK) & ~PAGE_MASK;
-	/* page align address */
-	databuf = (vaddr_t) buf & ~PAGE_MASK;
-
-	/* following code lifted almost verbatim from uvm_io.c */
-	vm_map_lock(kernel_map);
-	uvm_unmap_remove(kernel_map, databuf, databuf + datalen, _entries,
-	0);
-	vm_map_unlock(kernel_map);
-	if (dead_entries != NULL) {
-		uvm_unmap_detach(dead_entries, AMAP_REFALL);
-	}
-	/* this apparently reverses the magic to the vm ref count, from copyin_proc */
-	uvmspace_free(p->p_vmspace);
-}
-
-
-/*
  * io_command:
  *Handle the io_command ioctl.
  *
@@ -1376,8 +1286,9 @@ static void
 io_command(iscsi_iocommand_parameters_t *par, struct lwp *l)
 {
 	uint32_t datalen = par->req.datalen;
-	void *databuf = par->req.databuf;
 	session_t *session;
+	void *kbuf = NULL;
+	int error;
 
 	DEB(9, ("ISCSI: io_command, SID=%d, lun=%" PRIu64 "\n", par->session_id, 

CVS commit: src/crypto/external/bsd/openssl/dist/crypto/bn/asm

2020-06-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 21 22:16:53 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/bn/asm: mips.pl

Log Message:
Revert to the upstream version, there are no more warnings


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl

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



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/modes

2020-06-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 21 22:17:35 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/modes: gcm128.c

Log Message:
Revert to the upstream version


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c

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

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c
diff -u src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c:1.7 src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c:1.8
--- src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c:1.7	Sat Mar 21 20:53:07 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c	Sun Jun 21 18:17:35 2020
@@ -685,7 +685,6 @@ void gcm_ghash_v8(u64 Xi[2], const u128 
 #  endif
 # elif defined(__sparc__) || defined(__sparc)
 #  include "sparc_arch.h"
-#  if defined(__arch64__)
 #   define GHASH_ASM_SPARC
 #   define GCM_FUNCREF_4BIT
 extern unsigned int OPENSSL_sparcv9cap_P[];
@@ -693,7 +692,6 @@ void gcm_init_vis3(u128 Htable[16], cons
 void gcm_gmult_vis3(u64 Xi[2], const u128 Htable[16]);
 void gcm_ghash_vis3(u64 Xi[2], const u128 Htable[16], const u8 *inp,
 size_t len);
-#  endif
 # elif defined(OPENSSL_CPUID_OBJ) && (defined(__powerpc__) || defined(__ppc__) || defined(_ARCH_PPC))
 #  include "ppc_arch.h"
 #  define GHASH_ASM_PPC



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/bn/asm

2020-06-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 21 22:16:53 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/bn/asm: mips.pl

Log Message:
Revert to the upstream version, there are no more warnings


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl

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

Modified files:

Index: src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl
diff -u src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl:1.7 src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl:1.8
--- src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl:1.7	Sat Mar 21 20:53:03 2020
+++ src/crypto/external/bsd/openssl/dist/crypto/bn/asm/mips.pl	Sun Jun 21 18:16:53 2020
@@ -486,9 +486,8 @@ $code.=<<___;
 	$ST	$ta3,-2*$BNSZ($a0)
 
 	.set	noreorder
-	$ST	$ta2,-$BNSZ($a0)
 	bgtz	$ta0,.L_bn_sqr_words_loop
-	nop
+	$ST	$ta2,-$BNSZ($a0)
 
 	beqz	$a2,.L_bn_sqr_words_return
 	nop
@@ -817,9 +816,8 @@ bn_div_3_words:
 
 	$LD	$a0,($a3)
 	move	$ta2,$a1
-	$LD	$a1,-$BNSZ($a3)
 	bne	$a0,$a2,bn_div_3_words_internal
-	 nop
+	 $LD	$a1,-$BNSZ($a3)
 	li	$v0,-1
 	jr	$ra
 	move	$a0,$v0



CVS commit: src/crypto/external/bsd/openssl/dist/crypto/modes

2020-06-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 21 22:17:35 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/dist/crypto/modes: gcm128.c

Log Message:
Revert to the upstream version


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 \
src/crypto/external/bsd/openssl/dist/crypto/modes/gcm128.c

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



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips

2020-06-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 21 22:16:16 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips: mips.S
mips64.S

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.S
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips64.S

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



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc

2020-06-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 21 22:16:08 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: bn.inc
crypto.inc modes.inc

Log Message:
Re-enable the v9 testing and assembly


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc
cvs rdiff -u -r1.12 -r1.13 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc

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



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc

2020-06-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 21 22:16:08 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc: bn.inc
crypto.inc modes.inc

Log Message:
Re-enable the v9 testing and assembly


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc
cvs rdiff -u -r1.12 -r1.13 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc:1.1 src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc:1.2
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc:1.1	Sun Mar  2 04:02:43 2014
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/bn.inc	Sun Jun 21 18:16:08 2020
@@ -1,6 +1,5 @@
-.if ${MACHINE} == "sparc64"
 .PATH.S: ${.PARSEDIR}
 # XXX bn-sparcv8plus.S doesn't work well. why?
 BN_SRCS = bn-sparcv8.S
-.endif
+AFLAGS.bn-sparcv8.S+= -Wa,-Av9
 .include "../../bn.inc"

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc:1.12 src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc:1.13
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc:1.12	Sat May  9 09:16:42 2020
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/crypto.inc	Sun Jun 21 18:16:08 2020
@@ -1,10 +1,9 @@
 .PATH.S: ${.PARSEDIR}
 .PATH.c: ${.PARSEDIR}
 CPUID = yes
-CPUID_SRCS += sparccpuid.S sparccap.c
+CPUID_SRCS += sparccpuid.S sparcv9cap.c
 CPPFLAGS += -DOPENSSL_CPUID_OBJ
 
-.if ${MACHINE} == "sparc64"
 CPUID_SRCS += sparcv9-mont.S sparcv9a-mont.S 
 CPUID_SRCS += sparct4-mont.S vis3-mont.S
 #CPPFLAGS += -DOPENSSL_BN_ASM_MONT
@@ -12,6 +11,5 @@ AFLAGS.sparcv9-mont.S+= -Wa,-Av9
 AFLAGS.sparcv9a-mont.S+= -Wa,-Av9a
 AFLAGS.sparct4-mont.S+= -Wa,-Av9a
 AFLAGS.vis3-mont.S+= -Wa,-Av9a
-.endif
 
 .include "../../crypto.inc"

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc:1.3 src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc:1.4
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc:1.3	Fri Oct 14 12:09:44 2016
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/sparc/modes.inc	Sun Jun 21 18:16:08 2020
@@ -1,7 +1,5 @@
-.if ${MACHINE} == "sparc64"
 .PATH.S: ${.PARSEDIR}
 MODES_SRCS = ghash-sparcv9.S
 MODESCPPFLAGS = -DGHASH_ASM
 AFLAGS.ghash-sparcv9.S+= -Wa,-Av9
-.endif
 .include "../../modes.inc"



CVS commit: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips

2020-06-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Jun 21 22:16:16 UTC 2020

Modified Files:
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips: mips.S
mips64.S

Log Message:
regen


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.S
cvs rdiff -u -r1.4 -r1.5 \
src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips64.S

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

Modified files:

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.S:1.3 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.S:1.4
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.S:1.3	Sat Mar 21 20:53:12 2020
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips.S	Sun Jun 21 18:16:16 2020
@@ -316,9 +316,8 @@ bn_sqr_words_internal:
 	sw	$11,-2*4($4)
 
 	.set	noreorder
-	sw	$10,-4($4)
 	bgtz	$8,.L_bn_sqr_words_loop
-	nop
+	sw	$10,-4($4)
 
 	beqz	$6,.L_bn_sqr_words_return
 	nop
@@ -589,9 +588,8 @@ bn_div_3_words:
 
 	lw	$4,($7)
 	move	$10,$5
-	lw	$5,-4($7)
 	bne	$4,$6,bn_div_3_words_internal
-	 nop
+	 lw	$5,-4($7)
 	li	$2,-1
 	jr	$31
 	move	$4,$2

Index: src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips64.S
diff -u src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips64.S:1.4 src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips64.S:1.5
--- src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips64.S:1.4	Sat Mar 21 20:53:12 2020
+++ src/crypto/external/bsd/openssl/lib/libcrypto/arch/mips/mips64.S	Sun Jun 21 18:16:16 2020
@@ -313,9 +313,8 @@ bn_sqr_words_internal:
 	sd	$11,-2*8($4)
 
 	.set	noreorder
-	sd	$10,-8($4)
 	bgtz	$8,.L_bn_sqr_words_loop
-	nop
+	sd	$10,-8($4)
 
 	beqz	$6,.L_bn_sqr_words_return
 	nop
@@ -586,9 +585,8 @@ bn_div_3_words:
 
 	ld	$4,($7)
 	move	$10,$5
-	ld	$5,-8($7)
 	bne	$4,$6,bn_div_3_words_internal
-	 nop
+	 ld	$5,-8($7)
 	li	$2,-1
 	jr	$31
 	move	$4,$2



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2020-06-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Jun 21 21:29:11 UTC 2020

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: vdev_disk.c

Log Message:
If calling d_minphys on the parent disk device, make sure we use the
parent disk device's dev_t. Fixes zfs on wedges on ld(4).

XXX pullup-9


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c

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



CVS commit: src/external/cddl/osnet/dist/uts/common/fs/zfs

2020-06-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Jun 21 21:29:11 UTC 2020

Modified Files:
src/external/cddl/osnet/dist/uts/common/fs/zfs: vdev_disk.c

Log Message:
If calling d_minphys on the parent disk device, make sure we use the
parent disk device's dev_t. Fixes zfs on wedges on ld(4).

XXX pullup-9


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 \
src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c

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

Modified files:

Index: src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c
diff -u src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c:1.16 src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c:1.17
--- src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c:1.16	Wed Apr 29 04:30:40 2020
+++ src/external/cddl/osnet/dist/uts/common/fs/zfs/vdev_disk.c	Sun Jun 21 21:29:11 2020
@@ -229,11 +229,12 @@ vdev_disk_open(vdev_t *vd, uint64_t *psi
 	*/
 	{
 		struct buf buf = {
-			.b_dev = vp->v_rdev,
 			.b_bcount = MAXPHYS,
 		};
-		if (pdk && pdk->dk_driver && pdk->dk_driver->d_minphys)
+		if (pdk && pdk->dk_driver && pdk->dk_driver->d_minphys) {
+			buf.b_dev = pdk->dk_rawvp->v_rdev;
 			(*pdk->dk_driver->d_minphys)();
+		}
 		dvd->vd_maxphys = buf.b_bcount;
 	}
 



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

2020-06-21 Thread Joerg Sonnenberger
On Sun, Jun 21, 2020 at 12:40:00AM +, Rin Okuyama wrote:
> - Obsolete __lwp_settcb() in order to let kernel know new TLS address via
>   _lwp_setprivate(2). Alternatively, we can call _lwp_setprivate(2) within
>   __lwp_settcb() like mips, but it is just double handling; we adjust %r2
>   appropriately in _lwp_setprivate(2) via cpu_lwp_setprivate().

If an architecture stores the TCB at an offset, it should provide
__lwp_settcb to do the necessary adjust and then invoke _lwp_setprivate
as appropiate. The MIPS variant is correct. This should *not* be done in
the kernel, as it is an ABI detail of the userland TLS API.

Joerg


CVS commit: src/share/installboot/evbarm

2020-06-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Jun 21 19:39:11 UTC 2020

Modified Files:
src/share/installboot/evbarm: boards.plist

Log Message:
Add additional sunxi boards:
- libretech,all-h3-cc-h2-plus
- libretech,all-h3-cc-h3
- libretech,all-h3-cc-h5


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/installboot/evbarm/boards.plist

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

Modified files:

Index: src/share/installboot/evbarm/boards.plist
diff -u src/share/installboot/evbarm/boards.plist:1.8 src/share/installboot/evbarm/boards.plist:1.9
--- src/share/installboot/evbarm/boards.plist:1.8	Sun Jun 21 16:53:57 2020
+++ src/share/installboot/evbarm/boards.plist	Sun Jun 21 19:39:11 2020
@@ -1,4 +1,4 @@
-
+
 

CVS commit: src/share/installboot/evbarm

2020-06-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Jun 21 19:39:11 UTC 2020

Modified Files:
src/share/installboot/evbarm: boards.plist

Log Message:
Add additional sunxi boards:
- libretech,all-h3-cc-h2-plus
- libretech,all-h3-cc-h3
- libretech,all-h3-cc-h5


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/share/installboot/evbarm/boards.plist

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



Re: CVS commit: src/external/bsd/kyua-cli

2020-06-21 Thread Christos Zoulas
In article <20200621142616.60471f...@cvs.netbsd.org>,
Luke Mewburn  wrote:
>-=-=-=-=-=-
>
>Module Name:   src
>Committed By:  lukem
>Date:  Sun Jun 21 14:26:16 UTC 2020
>
>Modified Files:
>   src/external/bsd/kyua-cli: Makefile.inc
>
>Log Message:
>kyua-cli: avoid warning about deprecated auto_ptr

Can you sed -ie s/auto_ptr/unique_ptr/g instead?
You'll need to do this for c++-17 anyway.

christos



CVS commit: src/doc

2020-06-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Jun 21 17:26:15 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
evbarm: Add support for loading modules with the bootloader.


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

2020-06-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Jun 21 17:26:15 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
evbarm: Add support for loading modules with the bootloader.


To generate a diff of this commit:
cvs rdiff -u -r1.2703 -r1.2704 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.2703 src/doc/CHANGES:1.2704
--- src/doc/CHANGES:1.2703	Mon Jun 15 17:04:03 2020
+++ src/doc/CHANGES	Sun Jun 21 17:26:15 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2703 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2704 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -221,3 +221,5 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	file(1): Upgraded to 5.39. [christos 20200614]
 	blocklist: import current version [christos 20200614]
 	dhcpcd: Import version 9.1.2 [roy 20200615]
+	evbarm: Add support for loading modules with the bootloader.
+		[jmcneill 20200221]



CVS commit: src/sys/arch

2020-06-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Jun 21 17:25:04 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: aarch64_machdep.c
src/sys/arch/arm/arm32: arm32_machdep.c
src/sys/arch/arm/fdt: arm_fdt.c arm_fdtvar.h

Log Message:
Add support for installing modules that were loaded by the bootloader.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/aarch64/aarch64/aarch64_machdep.c
cvs rdiff -u -r1.134 -r1.135 src/sys/arch/arm/arm32/arm32_machdep.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/fdt/arm_fdt.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/fdt/arm_fdtvar.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/aarch64/aarch64/aarch64_machdep.c
diff -u src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.42 src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.43
--- src/sys/arch/aarch64/aarch64/aarch64_machdep.c:1.42	Mon Apr 13 05:40:25 2020
+++ src/sys/arch/aarch64/aarch64/aarch64_machdep.c	Sun Jun 21 17:25:03 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: aarch64_machdep.c,v 1.42 2020/04/13 05:40:25 maxv Exp $ */
+/* $NetBSD: aarch64_machdep.c,v 1.43 2020/06/21 17:25:03 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.42 2020/04/13 05:40:25 maxv Exp $");
+__KERNEL_RCSID(1, "$NetBSD: aarch64_machdep.c,v 1.43 2020/06/21 17:25:03 jmcneill Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_cpuoptions.h"
@@ -530,6 +530,9 @@ machdep_init(void)
 void
 module_init_md(void)
 {
+#ifdef FDT
+	arm_fdt_module_init();
+#endif
 }
 #endif /* MODULAR */
 

Index: src/sys/arch/arm/arm32/arm32_machdep.c
diff -u src/sys/arch/arm/arm32/arm32_machdep.c:1.134 src/sys/arch/arm/arm32/arm32_machdep.c:1.135
--- src/sys/arch/arm/arm32/arm32_machdep.c:1.134	Sat Jun 20 15:45:22 2020
+++ src/sys/arch/arm/arm32/arm32_machdep.c	Sun Jun 21 17:25:03 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: arm32_machdep.c,v 1.134 2020/06/20 15:45:22 skrll Exp $	*/
+/*	$NetBSD: arm32_machdep.c,v 1.135 2020/06/21 17:25:03 jmcneill Exp $	*/
 
 /*
  * Copyright (c) 1994-1998 Mark Brinicombe.
@@ -42,7 +42,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.134 2020/06/20 15:45:22 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm32_machdep.c,v 1.135 2020/06/21 17:25:03 jmcneill Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_arm_start.h"
@@ -687,6 +687,9 @@ dosoftints(void)
 void
 module_init_md(void)
 {
+#ifdef FDT
+	arm_fdt_module_init();
+#endif
 }
 #endif /* MODULAR */
 

Index: src/sys/arch/arm/fdt/arm_fdt.c
diff -u src/sys/arch/arm/fdt/arm_fdt.c:1.10 src/sys/arch/arm/fdt/arm_fdt.c:1.11
--- src/sys/arch/arm/fdt/arm_fdt.c:1.10	Sun Jan  5 17:16:07 2020
+++ src/sys/arch/arm/fdt/arm_fdt.c	Sun Jun 21 17:25:03 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: arm_fdt.c,v 1.10 2020/01/05 17:16:07 jmcneill Exp $ */
+/* $NetBSD: arm_fdt.c,v 1.11 2020/06/21 17:25:03 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared D. McNeill 
@@ -27,9 +27,10 @@
  */
 
 #include "opt_arm_timer.h"
+#include "opt_modular.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: arm_fdt.c,v 1.10 2020/01/05 17:16:07 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: arm_fdt.c,v 1.11 2020/06/21 17:25:03 jmcneill Exp $");
 
 #include 
 #include 
@@ -37,6 +38,9 @@ __KERNEL_RCSID(0, "$NetBSD: arm_fdt.c,v 
 #include 
 #include 
 #include 
+#include 
+
+#include 
 
 #include 
 #include 
@@ -200,3 +204,52 @@ cpu_initclocks(void)
 	_arm_fdt_timer_init();
 }
 #endif
+
+void
+arm_fdt_module_init(void)
+{
+#ifdef MODULAR
+	const int chosen = OF_finddevice("/chosen");
+	const char *module_name;
+	const uint64_t *data;
+	u_int index;
+	paddr_t pa;
+	vaddr_t va;
+	int len;
+
+	if (chosen == -1)
+		return;
+
+	data = fdtbus_get_prop(chosen, "netbsd,modules", );
+	if (data == NULL)
+		return;
+
+	for (index = 0; index < len / 16; index++, data += 2) {
+		module_name = fdtbus_get_string_index(chosen,
+		"netbsd,module-names", index);
+		if (module_name == NULL)
+			break;
+
+		const paddr_t startpa = (paddr_t)be64dec(data + 0);
+		const size_t size = (size_t)be64dec(data + 1);
+		const paddr_t endpa = round_page(startpa + size);
+
+		const vaddr_t startva = uvm_km_alloc(kernel_map, endpa - startpa,
+		0, UVM_KMF_VAONLY | UVM_KMF_NOWAIT);
+		if (startva == 0) {
+			printf("ERROR: Cannot allocate VA for module %s\n",
+			module_name);
+			continue;
+		}
+
+		for (pa = startpa, va = startva;
+		 pa < endpa;
+		 pa += PAGE_SIZE, va += PAGE_SIZE) {
+			pmap_kenter_pa(va, pa, VM_PROT_ALL, PMAP_WRITE_BACK);
+		}
+		pmap_update(pmap_kernel());
+
+		module_prime(module_name, (void *)(uintptr_t)startva, size);
+	}
+#endif /* !MODULAR */
+}

Index: src/sys/arch/arm/fdt/arm_fdtvar.h
diff -u src/sys/arch/arm/fdt/arm_fdtvar.h:1.16 src/sys/arch/arm/fdt/arm_fdtvar.h:1.17
--- src/sys/arch/arm/fdt/arm_fdtvar.h:1.16	Sun Jan  5 17:16:07 2020
+++ 

CVS commit: src/sys/arch

2020-06-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Jun 21 17:25:04 UTC 2020

Modified Files:
src/sys/arch/aarch64/aarch64: aarch64_machdep.c
src/sys/arch/arm/arm32: arm32_machdep.c
src/sys/arch/arm/fdt: arm_fdt.c arm_fdtvar.h

Log Message:
Add support for installing modules that were loaded by the bootloader.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/aarch64/aarch64/aarch64_machdep.c
cvs rdiff -u -r1.134 -r1.135 src/sys/arch/arm/arm32/arm32_machdep.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/arm/fdt/arm_fdt.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/arm/fdt/arm_fdtvar.h

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



CVS commit: src/sys/stand/efiboot

2020-06-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Jun 21 17:24:26 UTC 2020

Modified Files:
src/sys/stand/efiboot: Makefile.efiboot boot.c efifdt.c efifdt.h exec.c
version
src/sys/stand/efiboot/bootaa64: Makefile
src/sys/stand/efiboot/bootarm: Makefile
Added Files:
src/sys/stand/efiboot: module.c module.h

Log Message:
Add module support.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/stand/efiboot/Makefile.efiboot
cvs rdiff -u -r1.21 -r1.22 src/sys/stand/efiboot/boot.c
cvs rdiff -u -r1.23 -r1.24 src/sys/stand/efiboot/efifdt.c
cvs rdiff -u -r1.8 -r1.9 src/sys/stand/efiboot/efifdt.h
cvs rdiff -u -r1.15 -r1.16 src/sys/stand/efiboot/exec.c \
src/sys/stand/efiboot/version
cvs rdiff -u -r0 -r1.1 src/sys/stand/efiboot/module.c \
src/sys/stand/efiboot/module.h
cvs rdiff -u -r1.7 -r1.8 src/sys/stand/efiboot/bootaa64/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/stand/efiboot/bootarm/Makefile

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



CVS commit: src/sys/stand/efiboot

2020-06-21 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Sun Jun 21 17:24:26 UTC 2020

Modified Files:
src/sys/stand/efiboot: Makefile.efiboot boot.c efifdt.c efifdt.h exec.c
version
src/sys/stand/efiboot/bootaa64: Makefile
src/sys/stand/efiboot/bootarm: Makefile
Added Files:
src/sys/stand/efiboot: module.c module.h

Log Message:
Add module support.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/stand/efiboot/Makefile.efiboot
cvs rdiff -u -r1.21 -r1.22 src/sys/stand/efiboot/boot.c
cvs rdiff -u -r1.23 -r1.24 src/sys/stand/efiboot/efifdt.c
cvs rdiff -u -r1.8 -r1.9 src/sys/stand/efiboot/efifdt.h
cvs rdiff -u -r1.15 -r1.16 src/sys/stand/efiboot/exec.c \
src/sys/stand/efiboot/version
cvs rdiff -u -r0 -r1.1 src/sys/stand/efiboot/module.c \
src/sys/stand/efiboot/module.h
cvs rdiff -u -r1.7 -r1.8 src/sys/stand/efiboot/bootaa64/Makefile
cvs rdiff -u -r1.4 -r1.5 src/sys/stand/efiboot/bootarm/Makefile

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

Modified files:

Index: src/sys/stand/efiboot/Makefile.efiboot
diff -u src/sys/stand/efiboot/Makefile.efiboot:1.13 src/sys/stand/efiboot/Makefile.efiboot:1.14
--- src/sys/stand/efiboot/Makefile.efiboot:1.13	Thu May 14 19:19:08 2020
+++ src/sys/stand/efiboot/Makefile.efiboot	Sun Jun 21 17:24:26 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.efiboot,v 1.13 2020/05/14 19:19:08 riastradh Exp $
+# $NetBSD: Makefile.efiboot,v 1.14 2020/06/21 17:24:26 jmcneill Exp $
 
 S=		${.CURDIR}/../../..
 
@@ -21,8 +21,10 @@ AFLAGS.start.S= ${${ACTIVE_CC} == "clang
 
 .PATH: ${EFIDIR}/gnuefi
 SOURCES=	crt0-efi-${GNUEFIARCH}.S reloc_${GNUEFIARCH}.c
-SOURCES+=	boot.c conf.c console.c dev_net.c devopen.c exec.c panic.c prompt.c
-SOURCES+=	efiboot.c efichar.c efidev.c efienv.c efigetsecs.c efifdt.c efifile.c efiblock.c efinet.c efipxe.c efiacpi.c efirng.c smbios.c
+SOURCES+=	boot.c conf.c console.c dev_net.c devopen.c exec.c module.c \
+		panic.c prompt.c
+SOURCES+=	efiboot.c efichar.c efidev.c efienv.c efigetsecs.c efifdt.c \
+		efifile.c efiblock.c efinet.c efipxe.c efiacpi.c efirng.c smbios.c
 
 .PATH: ${S}/external/bsd/libfdt/dist
 CPPFLAGS+=	-I${S}/external/bsd/libfdt/dist

Index: src/sys/stand/efiboot/boot.c
diff -u src/sys/stand/efiboot/boot.c:1.21 src/sys/stand/efiboot/boot.c:1.22
--- src/sys/stand/efiboot/boot.c:1.21	Thu May 14 19:19:08 2020
+++ src/sys/stand/efiboot/boot.c	Sun Jun 21 17:24:26 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.21 2020/05/14 19:19:08 riastradh Exp $	*/
+/*	$NetBSD: boot.c,v 1.22 2020/06/21 17:24:26 jmcneill Exp $	*/
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka 
@@ -33,6 +33,7 @@
 #include "efiacpi.h"
 #include "efienv.h"
 #include "efirng.h"
+#include "module.h"
 
 #include 
 #include 
@@ -90,6 +91,9 @@ void	command_dtb(char *);
 void	command_plist(char *);
 void	command_initrd(char *);
 void	command_rndseed(char *);
+void	command_modules(char *);
+void	command_load(char *);
+void	command_unload(char *);
 void	command_ls(char *);
 void	command_mem(char *);
 void	command_printenv(char *);
@@ -107,6 +111,9 @@ const struct boot_command commands[] = {
 	{ "plist",	command_plist,		"plist [dev:][filename]" },
 	{ "initrd",	command_initrd,		"initrd [dev:][filename]" },
 	{ "rndseed",	command_rndseed,	"rndseed [dev:][filename]" },
+	{ "modules",	command_modules,	"modules [{on|off|reset}]" },
+	{ "load",	command_load,		"load " },
+	{ "unload",	command_unload,		"unload " },
 	{ "ls",		command_ls,		"ls [hdNn:/path]" },
 	{ "mem",	command_mem,		"mem" },
 	{ "printenv",	command_printenv,	"printenv [key]" },
@@ -193,6 +200,47 @@ command_rndseed(char *arg)
 }
 
 void
+command_modules(char *arg)
+{
+	if (arg && *arg) {
+		if (strcmp(arg, "on") == 0)
+			module_enable(1);
+		else if (strcmp(arg, "off") == 0)
+			module_enable(0);
+		else if (strcmp(arg, "reset") == 0)
+			module_remove_all();
+		else {
+			command_help("");
+			return;
+		}
+	} else {
+		printf("modules are %sabled\n", module_enabled ? "en" : "dis");
+	}
+}
+
+void
+command_load(char *arg)
+{
+	if (!arg || !*arg) {
+		command_help("");
+		return;
+	}
+
+	module_add(arg);
+}
+
+void
+command_unload(char *arg)
+{
+	if (!arg || !*arg) {
+		command_help("");
+		return;
+	}
+
+	module_remove(arg);
+}
+
+void
 command_ls(char *arg)
 {
 	ls(arg);

Index: src/sys/stand/efiboot/efifdt.c
diff -u src/sys/stand/efiboot/efifdt.c:1.23 src/sys/stand/efiboot/efifdt.c:1.24
--- src/sys/stand/efiboot/efifdt.c:1.23	Thu May 14 19:21:53 2020
+++ src/sys/stand/efiboot/efifdt.c	Sun Jun 21 17:24:26 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: efifdt.c,v 1.23 2020/05/14 19:21:53 riastradh Exp $ */
+/* $NetBSD: efifdt.c,v 1.24 2020/06/21 17:24:26 jmcneill Exp $ */
 
 /*-
  * Copyright (c) 2019 Jason R. Thorpe
@@ -425,3 +425,18 @@ efi_fdt_efirng(u_long efirng_addr, u_lon
 	fdt_setprop_u64(fdt_data, chosen, "netbsd,efirng-end",
 	efirng_addr + efirng_size);
 }
+
+/* pass in module information */
+void

CVS commit: src

2020-06-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Jun 21 17:17:02 UTC 2020

Modified Files:
src/tools/installboot: Makefile
src/usr.sbin/installboot: Makefile installboot.h machines.c
Added Files:
src/usr.sbin/installboot/arch: evbmips.c

Log Message:
Add evbmips support for u-boot handling.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tools/installboot/Makefile
cvs rdiff -u -r1.54 -r1.55 src/usr.sbin/installboot/Makefile
cvs rdiff -u -r1.41 -r1.42 src/usr.sbin/installboot/installboot.h
cvs rdiff -u -r1.42 -r1.43 src/usr.sbin/installboot/machines.c
cvs rdiff -u -r0 -r1.1 src/usr.sbin/installboot/arch/evbmips.c

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



CVS commit: src

2020-06-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Jun 21 17:17:02 UTC 2020

Modified Files:
src/tools/installboot: Makefile
src/usr.sbin/installboot: Makefile installboot.h machines.c
Added Files:
src/usr.sbin/installboot/arch: evbmips.c

Log Message:
Add evbmips support for u-boot handling.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/tools/installboot/Makefile
cvs rdiff -u -r1.54 -r1.55 src/usr.sbin/installboot/Makefile
cvs rdiff -u -r1.41 -r1.42 src/usr.sbin/installboot/installboot.h
cvs rdiff -u -r1.42 -r1.43 src/usr.sbin/installboot/machines.c
cvs rdiff -u -r0 -r1.1 src/usr.sbin/installboot/arch/evbmips.c

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

Modified files:

Index: src/tools/installboot/Makefile
diff -u src/tools/installboot/Makefile:1.12 src/tools/installboot/Makefile:1.13
--- src/tools/installboot/Makefile:1.12	Tue May  7 05:02:42 2019
+++ src/tools/installboot/Makefile	Sun Jun 21 17:17:01 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.12 2019/05/07 05:02:42 thorpej Exp $
+#	$NetBSD: Makefile,v 1.13 2020/06/21 17:17:01 thorpej Exp $
 
 .include 
 
@@ -22,7 +22,7 @@ HOST_SHAREDIR=	${TOOLDIR}/share
 BOARDDB_SRCDIR=	${SHARE_SRCDIR}/installboot
 BOARDDB_DSTDIR=	${HOST_SHAREDIR}/installboot
 
-BOARDDBS=	evbarm
+BOARDDBS=	evbarm evbmips
 
 .for _d in ${BOARDDBS}
 install: .PHONY install.${_d}.boards.plist

Index: src/usr.sbin/installboot/Makefile
diff -u src/usr.sbin/installboot/Makefile:1.54 src/usr.sbin/installboot/Makefile:1.55
--- src/usr.sbin/installboot/Makefile:1.54	Thu Aug 15 19:53:01 2019
+++ src/usr.sbin/installboot/Makefile	Sun Jun 21 17:17:02 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.54 2019/08/15 19:53:01 martin Exp $
+#	$NetBSD: Makefile,v 1.55 2020/06/21 17:17:02 thorpej Exp $
 #
 
 .include 
@@ -12,7 +12,7 @@ ARCH_XLAT+= sun2-sun68k.c sun3-sun68k.c
 
 .if !defined(SMALLPROG) && !defined(ARCH_FILES)
 ARCH_FILES=  alpha.c amiga.c
-ARCH_FILES+= emips.c evbarm.c ews4800mips.c
+ARCH_FILES+= emips.c evbarm.c evbmips.c ews4800mips.c
 ARCH_FILES+= hp300.c hppa.c
 ARCH_FILES+= i386.c
 ARCH_FILES+= landisk.c
@@ -32,11 +32,11 @@ COPTS.machines.c+=	-DSINGLE_ARCH=ib_mach
 
 SRCS+=${ARCH_FILES}
 
-.if !empty(ARCH_FILES:C/(evbarm)/evboard/:Mevboard.c)
+.if !empty(ARCH_FILES:C/(evbarm|evbmips)/evboard/:Mevboard.c)
 SRCS+=evboards.c
 .endif
 
-.if !empty(ARCH_FILES:C/(evbarm)/fdt/:Mfdt.c)
+.if !empty(ARCH_FILES:C/(evbarm|evbmips)/fdt/:Mfdt.c)
 FDTDIR=		${.CURDIR}/../../sys/external/bsd/libfdt/dist
 .PATH:		${FDTDIR}
 CPPFLAGS+=	-DSUPPORT_FDT -I${FDTDIR}
@@ -49,7 +49,7 @@ COPTS.fdt_strerror.c+=	-Wno-error=sign-c
 
 
 .if !defined(HOSTPROGNAME)
-.if !empty(ARCH_FILES:C/(evbarm)/ofw/:Mofw.c)
+.if !empty(ARCH_FILES:C/(evbarm|evbmips)/ofw/:Mofw.c)
 CPPFLAGS+=	-DSUPPORT_OPENFIRMWARE
 .endif
 .endif

Index: src/usr.sbin/installboot/installboot.h
diff -u src/usr.sbin/installboot/installboot.h:1.41 src/usr.sbin/installboot/installboot.h:1.42
--- src/usr.sbin/installboot/installboot.h:1.41	Thu Aug 15 08:36:09 2019
+++ src/usr.sbin/installboot/installboot.h	Sun Jun 21 17:17:02 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: installboot.h,v 1.41 2019/08/15 08:36:09 kamil Exp $	*/
+/*	$NetBSD: installboot.h,v 1.42 2020/06/21 17:17:02 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -186,6 +186,7 @@ extern struct ib_mach ib_mach_amd64;
 extern struct ib_mach ib_mach_amiga;
 extern struct ib_mach ib_mach_emips;
 extern struct ib_mach ib_mach_evbarm;
+extern struct ib_mach ib_mach_evbmips;
 extern struct ib_mach ib_mach_ews4800mips;
 extern struct ib_mach ib_mach_hp300;
 extern struct ib_mach ib_mach_hppa;

Index: src/usr.sbin/installboot/machines.c
diff -u src/usr.sbin/installboot/machines.c:1.42 src/usr.sbin/installboot/machines.c:1.43
--- src/usr.sbin/installboot/machines.c:1.42	Thu Aug 15 19:53:01 2019
+++ src/usr.sbin/installboot/machines.c	Sun Jun 21 17:17:02 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: machines.c,v 1.42 2019/08/15 19:53:01 martin Exp $	*/
+/*	$NetBSD: machines.c,v 1.43 2020/06/21 17:17:02 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2002-2005 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
 
 #include 
 #if !defined(__lint)
-__RCSID("$NetBSD: machines.c,v 1.42 2019/08/15 19:53:01 martin Exp $");
+__RCSID("$NetBSD: machines.c,v 1.43 2020/06/21 17:17:02 thorpej Exp $");
 #endif	/* !__lint */
 
 #include 
@@ -50,6 +50,7 @@ struct ib_mach * const machines[] = {
 _mach_amiga,
 _mach_emips,
 _mach_evbarm,
+_mach_evbmips,
 _mach_ews4800mips,
 _mach_hp300,
 _mach_hppa,

Added files:

Index: src/usr.sbin/installboot/arch/evbmips.c
diff -u /dev/null src/usr.sbin/installboot/arch/evbmips.c:1.1
--- /dev/null	Sun Jun 21 17:17:02 2020
+++ src/usr.sbin/installboot/arch/evbmips.c	Sun Jun 21 17:17:02 2020
@@ -0,0 +1,119 @@
+/*	$NetBSD: evbmips.c,v 1.1 2020/06/21 17:17:02 thorpej Exp $	*/
+
+/*-
+ * Copyright (c) 2019 The NetBSD Foundation, Inc.
+ * 

CVS commit: src

2020-06-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Jun 21 17:15:51 UTC 2020

Modified Files:
src/distrib/sets/lists/base: mi
src/share/installboot: Makefile
Added Files:
src/share/installboot/evbmips: boards.plist

Log Message:
Add evbmips installboot board data.


To generate a diff of this commit:
cvs rdiff -u -r1.1251 -r1.1252 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.1 -r1.2 src/share/installboot/Makefile
cvs rdiff -u -r0 -r1.1 src/share/installboot/evbmips/boards.plist

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



CVS commit: src

2020-06-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Jun 21 17:15:51 UTC 2020

Modified Files:
src/distrib/sets/lists/base: mi
src/share/installboot: Makefile
Added Files:
src/share/installboot/evbmips: boards.plist

Log Message:
Add evbmips installboot board data.


To generate a diff of this commit:
cvs rdiff -u -r1.1251 -r1.1252 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.1 -r1.2 src/share/installboot/Makefile
cvs rdiff -u -r0 -r1.1 src/share/installboot/evbmips/boards.plist

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

Modified files:

Index: src/distrib/sets/lists/base/mi
diff -u src/distrib/sets/lists/base/mi:1.1251 src/distrib/sets/lists/base/mi:1.1252
--- src/distrib/sets/lists/base/mi:1.1251	Mon Jun 15 01:57:29 2020
+++ src/distrib/sets/lists/base/mi	Sun Jun 21 17:15:51 2020
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1251 2020/06/15 01:57:29 christos Exp $
+# $NetBSD: mi,v 1.1252 2020/06/21 17:15:51 thorpej Exp $
 #
 # Note:	Don't delete entries from here - mark them as "obsolete" instead,
 #	unless otherwise stated below.
@@ -3132,6 +3132,8 @@
 ./usr/share/installbootbase-sysutil-share
 ./usr/share/installboot/evbarm			base-sysutil-share
 ./usr/share/installboot/evbarm/boards.plist	base-sysutil-share
+./usr/share/installboot/evbmips			base-sysutil-share
+./usr/share/installboot/evbmips/boards.plist	base-sysutil-share
 ./usr/share/keymapsbase-sys-share
 ./usr/share/keymaps/amiga			base-sys-share
 ./usr/share/keymaps/atari			base-sys-share

Index: src/share/installboot/Makefile
diff -u src/share/installboot/Makefile:1.1 src/share/installboot/Makefile:1.2
--- src/share/installboot/Makefile:1.1	Tue May  7 05:02:42 2019
+++ src/share/installboot/Makefile	Sun Jun 21 17:15:51 2020
@@ -1,9 +1,9 @@
-#	$NetBSD: Makefile,v 1.1 2019/05/07 05:02:42 thorpej Exp $
+#	$NetBSD: Makefile,v 1.2 2020/06/21 17:15:51 thorpej Exp $
 
 .include 
 
 .if ${MKSHARE} != "no"
-SUBDIR=	evbarm
+SUBDIR=	evbarm evbmips
 .endif
 
 .include 

Added files:

Index: src/share/installboot/evbmips/boards.plist
diff -u /dev/null src/share/installboot/evbmips/boards.plist:1.1
--- /dev/null	Sun Jun 21 17:15:51 2020
+++ src/share/installboot/evbmips/boards.plist	Sun Jun 21 17:15:51 2020
@@ -0,0 +1,43 @@
+
+
+
+
+	
+	img,ci20
+	
+		description
+		MIPS Creator CI20
+		u-boot-pkg
+		ci20
+	
+
+



CVS commit: src/sys/arch/amd64/amd64

2020-06-21 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Jun 21 16:57:18 UTC 2020

Modified Files:
src/sys/arch/amd64/amd64: amd64_trap.S locore.S

Log Message:
On amd64, Xen PV calls syscalls and traps with events enabled.
Disable events on entry to be safe.
It should have been mostly safe for most cases, but for FPU traps
we need to reload the FPU state if we got interrupted at trap entry.

Hopefully fixes:
panic: kernel diagnostic assertion "curlwp->l_md.md_flags & MDL_FPU_IN_CPU" 
failed: file "/home/source/ab/HEAD/src/sys/arch/x86/x86/fpu.c", line 524

when running tests.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/amd64/amd64/amd64_trap.S
cvs rdiff -u -r1.209 -r1.210 src/sys/arch/amd64/amd64/locore.S

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



CVS commit: src/sys/arch/amd64/amd64

2020-06-21 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Jun 21 16:57:18 UTC 2020

Modified Files:
src/sys/arch/amd64/amd64: amd64_trap.S locore.S

Log Message:
On amd64, Xen PV calls syscalls and traps with events enabled.
Disable events on entry to be safe.
It should have been mostly safe for most cases, but for FPU traps
we need to reload the FPU state if we got interrupted at trap entry.

Hopefully fixes:
panic: kernel diagnostic assertion "curlwp->l_md.md_flags & MDL_FPU_IN_CPU" 
failed: file "/home/source/ab/HEAD/src/sys/arch/x86/x86/fpu.c", line 524

when running tests.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/amd64/amd64/amd64_trap.S
cvs rdiff -u -r1.209 -r1.210 src/sys/arch/amd64/amd64/locore.S

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

Modified files:

Index: src/sys/arch/amd64/amd64/amd64_trap.S
diff -u src/sys/arch/amd64/amd64/amd64_trap.S:1.51 src/sys/arch/amd64/amd64/amd64_trap.S:1.52
--- src/sys/arch/amd64/amd64/amd64_trap.S:1.51	Sat Dec  7 10:19:35 2019
+++ src/sys/arch/amd64/amd64/amd64_trap.S	Sun Jun 21 16:57:18 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: amd64_trap.S,v 1.51 2019/12/07 10:19:35 maxv Exp $	*/
+/*	$NetBSD: amd64_trap.S,v 1.52 2020/06/21 16:57:18 bouyer Exp $	*/
 
 /*
  * Copyright (c) 1998, 2007, 2008, 2017 The NetBSD Foundation, Inc.
@@ -90,7 +90,7 @@
  */
 
 #ifdef	XENPV
-#define	PRE_TRAP	movq (%rsp),%rcx ; movq 8(%rsp),%r11 ; addq $0x10,%rsp
+#define	PRE_TRAP	CLI(cx); movq (%rsp),%rcx ; movq 8(%rsp),%r11 ; addq $0x10,%rsp
 #else
 #define	PRE_TRAP
 #endif
@@ -231,9 +231,9 @@ IDTVEC(trap01)
 	movw	%ds,TF_DS(%rsp)
 
 	jmp	.Lalltraps_noentry
-#else
+#else /* !XENPV */
 	ZTRAP(T_TRCTRAP)
-#endif
+#endif /* !XENPV */
 IDTVEC_END(trap01)
 
 /*
@@ -250,7 +250,7 @@ IDTVEC_END(trap01)
 IDTVEC(trap02)
 #if defined(XENPV)
 	ZTRAP(T_NMI)
-#else
+#else /* XENPV */
 	ZTRAP_NJ(T_NMI)
 	subq	$TF_REGSIZE,%rsp
 	INTR_SAVE_GPRS
@@ -299,7 +299,7 @@ IDTVEC(trap02)
 	INTR_RESTORE_GPRS
 	addq	$TF_REGSIZE+16,%rsp
 	iretq
-#endif
+#endif /* XENPV */
 IDTVEC_END(trap02)
 
 IDTVEC(trap03)
@@ -361,7 +361,7 @@ IDTVEC_END(trap07)
 IDTVEC(trap08)
 #if defined(XENPV)
 	TRAP(T_DOUBLEFLT)
-#else
+#else /* XENPV */
 	TRAP_NJ(T_DOUBLEFLT)
 	subq	$TF_REGSIZE,%rsp
 	INTR_SAVE_GPRS
@@ -396,7 +396,7 @@ IDTVEC(trap08)
 	INTR_RESTORE_GPRS
 	addq	$TF_REGSIZE+16,%rsp
 	iretq
-#endif
+#endif /* XENPV */
 IDTVEC_END(trap08)
 
 IDTVEC(trap09)
@@ -414,7 +414,7 @@ IDTVEC_END(trap10)
  * in order to copy the user segment registers into the fault frame.
  */
 #define kernuser_reenter alltraps
-#endif
+#endif /* XENPV */
 
 IDTVEC(trap11)		/* #NP() Segment not present */
 	TRAP_NJ(T_SEGNPFLT)
@@ -448,6 +448,14 @@ IDTVEC(trap16)
 	ZTRAP_NJ(T_ARITHTRAP)
 .Ldo_fputrap:
 	INTRENTRY
+#ifdef XENPV
+	/* traps are called with interrupts enabled, and we may have been
+	 * interrupted just before the CLI in the trap macro.
+	 * we have to check if a FPU reload is needed.
+	 */ 
+	movqCPUVAR(CURLWP),%r14
+	HANDLE_DEFERRED_FPU
+#endif /* XENPV */
 #ifdef DIAGNOSTIC
 	movl	CPUVAR(ILEVEL),%ebx
 #endif

Index: src/sys/arch/amd64/amd64/locore.S
diff -u src/sys/arch/amd64/amd64/locore.S:1.209 src/sys/arch/amd64/amd64/locore.S:1.210
--- src/sys/arch/amd64/amd64/locore.S:1.209	Wed May 27 19:33:40 2020
+++ src/sys/arch/amd64/amd64/locore.S	Sun Jun 21 16:57:18 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.209 2020/05/27 19:33:40 ad Exp $	*/
+/*	$NetBSD: locore.S,v 1.210 2020/06/21 16:57:18 bouyer Exp $	*/
 
 /*
  * Copyright-o-rama!
@@ -1481,7 +1481,13 @@ IDTVEC(\name)
 	movq	$2,TF_ERR(%rsp)		/* syscall instruction size */
 	movq	$T_ASTFLT,TF_TRAPNO(%rsp)
 #else
-	/* Xen already switched to kernel stack */
+	/*
+	 * Xen already switched to kernel stack.
+	 * But it didn't disable events
+	 */
+	pushq	%rsi
+	CLI(si)
+	popq	%rsi
 	addq	$0x10,%rsp	/* gap to match cs:rip */
 	pushq	$2		/* error code */
 	pushq	$T_ASTFLT
@@ -1524,6 +1530,9 @@ IDTVEC_END(syscall32)
 	TEXT_USER_BEGIN
 IDTVEC(osyscall)
 #ifdef XENPV
+	pushq	%rsi
+	CLI(si)
+	popq	%rsi
 	movq (%rsp),%rcx
 	movq 8(%rsp),%r11
 	addq $0x10,%rsp



CVS commit: src/share/installboot/evbarm

2020-06-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Jun 21 16:53:57 UTC 2020

Modified Files:
src/share/installboot/evbarm: boards.plist

Log Message:
Add several boards:
- terasic,de0-atlas
- asus,rk3288-tinker
- nvidia,p3450-
- ti,omap4-panda
- ti,omap4-panda-es
- olimex,a20-olinuxino-lime2
- olimex,a20-olinuxino-lime2-emmc
- olimex,a20-olinuxino-micro
- olimex,a20-olinuxino-micro-emmc
- digilent,zynq-zybo
- digilent,zynq-zybo-z7

Update the nvidia,p2771- description to match recent DTS.

Fix u-boot package name for cubietech,cubietruck-plus.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/share/installboot/evbarm/boards.plist

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

Modified files:

Index: src/share/installboot/evbarm/boards.plist
diff -u src/share/installboot/evbarm/boards.plist:1.7 src/share/installboot/evbarm/boards.plist:1.8
--- src/share/installboot/evbarm/boards.plist:1.7	Fri Mar 27 23:02:33 2020
+++ src/share/installboot/evbarm/boards.plist	Sun Jun 21 16:53:57 2020
@@ -1,4 +1,4 @@
-
+
 
+	terasic,de0-atlas
+	
+		description
+		Terasic DE-0(Atlas)
+		u-boot-pkg
+		de0-nanosoc
+	
+
+	
 	hardkernel,odroid-c2
@@ -82,6 +93,13 @@
 		u-boot-pkg
 		pinebook-pro
 	
+	asus,rk3288-tinker
+	
+		description
+		Rockchip RK3288 Asus Tinker Board
+		u-boot-pkg
+		tinker
+	
 
 	
+	digilent,zynq-zybo
+	
+		description
+		Digilent Zybo board
+		u-boot-pkg
+		zynq-zybo
+	
+	digilent,zynq-zybo-z7
+	
+		description
+		Digilent Zybo Z7 board
+		u-boot-pkg
+		zynq-zybo-z7
+	
 
 



CVS commit: src/share/installboot/evbarm

2020-06-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Jun 21 16:53:57 UTC 2020

Modified Files:
src/share/installboot/evbarm: boards.plist

Log Message:
Add several boards:
- terasic,de0-atlas
- asus,rk3288-tinker
- nvidia,p3450-
- ti,omap4-panda
- ti,omap4-panda-es
- olimex,a20-olinuxino-lime2
- olimex,a20-olinuxino-lime2-emmc
- olimex,a20-olinuxino-micro
- olimex,a20-olinuxino-micro-emmc
- digilent,zynq-zybo
- digilent,zynq-zybo-z7

Update the nvidia,p2771- description to match recent DTS.

Fix u-boot package name for cubietech,cubietruck-plus.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/share/installboot/evbarm/boards.plist

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



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

2020-06-21 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Jun 21 16:53:37 UTC 2020

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

Log Message:
Fix comment


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/amd64/include/frameasm.h

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

Modified files:

Index: src/sys/arch/amd64/include/frameasm.h
diff -u src/sys/arch/amd64/include/frameasm.h:1.50 src/sys/arch/amd64/include/frameasm.h:1.51
--- src/sys/arch/amd64/include/frameasm.h:1.50	Mon Jun  1 22:58:06 2020
+++ src/sys/arch/amd64/include/frameasm.h	Sun Jun 21 16:53:37 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: frameasm.h,v 1.50 2020/06/01 22:58:06 ad Exp $	*/
+/*	$NetBSD: frameasm.h,v 1.51 2020/06/21 16:53:37 bouyer Exp $	*/
 
 #ifndef _AMD64_MACHINE_FRAMEASM_H
 #define _AMD64_MACHINE_FRAMEASM_H
@@ -48,7 +48,7 @@
 #define STI(temp_reg) sti
 #define PUSHF(temp_reg) pushf
 #define POPL popl
-#endif	/* XEN */
+#endif	/* XENPV */
 
 #define HP_NAME_CLAC		1
 #define HP_NAME_STAC		2



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

2020-06-21 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Sun Jun 21 16:53:37 UTC 2020

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

Log Message:
Fix comment


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/amd64/include/frameasm.h

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



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

2020-06-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jun 21 16:33:34 UTC 2020

Modified Files:
src/sys/arch/arm/imx: files.imx51

Log Message:
Remove all paltforms


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/imx/files.imx51

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/files.imx51
diff -u src/sys/arch/arm/imx/files.imx51:1.23 src/sys/arch/arm/imx/files.imx51:1.24
--- src/sys/arch/arm/imx/files.imx51:1.23	Sun Jun 21 08:02:43 2020
+++ src/sys/arch/arm/imx/files.imx51	Sun Jun 21 16:33:34 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: files.imx51,v 1.23 2020/06/21 08:02:43 simonb Exp $
+#	$NetBSD: files.imx51,v 1.24 2020/06/21 16:33:34 skrll Exp $
 #
 # Configuration info for the Freescale i.MX5x
 #
@@ -117,7 +117,7 @@ file	arch/arm/imx/imxi2c.c		imxi2c
 file	arch/arm/imx/imx51_i2c.c	imxi2c
 
 # SPI bus controller
-# attach of this driver need to be specified in paltform configuration
+# attach of this driver need to be specified in platform configuration
 # use flags to module version
 device  imxspi : spibus
 filearch/arm/imx/imxspi.c			imxspi



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

2020-06-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jun 21 16:33:34 UTC 2020

Modified Files:
src/sys/arch/arm/imx: files.imx51

Log Message:
Remove all paltforms


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/arm/imx/files.imx51

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



CVS commit: src/sys/dev/wsfont

2020-06-21 Thread Frederic Cambus
Module Name:src
Committed By:   fcambus
Date:   Sun Jun 21 15:48:17 UTC 2020

Modified Files:
src/sys/dev/wsfont: spleen12x24.h spleen16x32.h spleen32x64.h
spleen5x8.h spleen8x16.h

Log Message:
Update Spleen kernel fonts to version 1.7.1, bringing the following
improvements:

- Remove strain pixel on the '5' digit (5x8 version)
- Improve the Esszet character (8x16, 12x24, 16x32, and 32x64 versions)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/wsfont/spleen12x24.h \
src/sys/dev/wsfont/spleen32x64.h
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/wsfont/spleen16x32.h \
src/sys/dev/wsfont/spleen5x8.h
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/wsfont/spleen8x16.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/wsfont

2020-06-21 Thread Frederic Cambus
Module Name:src
Committed By:   fcambus
Date:   Sun Jun 21 15:48:17 UTC 2020

Modified Files:
src/sys/dev/wsfont: spleen12x24.h spleen16x32.h spleen32x64.h
spleen5x8.h spleen8x16.h

Log Message:
Update Spleen kernel fonts to version 1.7.1, bringing the following
improvements:

- Remove strain pixel on the '5' digit (5x8 version)
- Improve the Esszet character (8x16, 12x24, 16x32, and 32x64 versions)


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/wsfont/spleen12x24.h \
src/sys/dev/wsfont/spleen32x64.h
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/wsfont/spleen16x32.h \
src/sys/dev/wsfont/spleen5x8.h
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/wsfont/spleen8x16.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/wsfont/spleen12x24.h
diff -u src/sys/dev/wsfont/spleen12x24.h:1.4 src/sys/dev/wsfont/spleen12x24.h:1.5
--- src/sys/dev/wsfont/spleen12x24.h:1.4	Mon Nov  4 10:44:00 2019
+++ src/sys/dev/wsfont/spleen12x24.h	Sun Jun 21 15:48:17 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: spleen12x24.h,v 1.4 2019/11/04 10:44:00 fcambus Exp $ */
+/*	$NetBSD: spleen12x24.h,v 1.5 2020/06/21 15:48:17 fcambus Exp $ */
 /*	$OpenBSD: spleen12x24.h,v 1.2 2019/03/08 10:53:59 fcambus Exp $ */
 
 /*
@@ -4829,13 +4829,13 @@ static u_char spleen12x24_data[] = {
 	0x61, 0x80, 	/* .****... */
 	0x61, 0x80, 	/* .****... */
 	0x63, 0x00, 	/* .**...** */
-	0x7f, 0x00, 	/* .*** */
+	0x6f, 0x00, 	/* .**. */
 	0x63, 0x80, 	/* .**...***... */
 	0x60, 0xc0, 	/* .**.**.. */
 	0x60, 0x60, 	/* .**..**. */
 	0x60, 0x60, 	/* .**..**. */
 	0x60, 0x60, 	/* .**..**. */
-	0x78, 0x60, 	/* .**. */
+	0x68, 0x60, 	/* .**.***. */
 	0x6c, 0xc0, 	/* .**.**..**.. */
 	0x67, 0x80, 	/* .**..... */
 	0x00, 0x00, 	/*  */
Index: src/sys/dev/wsfont/spleen32x64.h
diff -u src/sys/dev/wsfont/spleen32x64.h:1.4 src/sys/dev/wsfont/spleen32x64.h:1.5
--- src/sys/dev/wsfont/spleen32x64.h:1.4	Mon Nov  4 10:44:00 2019
+++ src/sys/dev/wsfont/spleen32x64.h	Sun Jun 21 15:48:17 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: spleen32x64.h,v 1.4 2019/11/04 10:44:00 fcambus Exp $ */
+/*	$NetBSD: spleen32x64.h,v 1.5 2020/06/21 15:48:17 fcambus Exp $ */
 /*	$OpenBSD: spleen32x64.h,v 1.2 2019/03/08 10:53:59 fcambus Exp $ */
 
 /*
@@ -12485,31 +12485,31 @@ static u_char spleen32x64_data[] = {
 	0x0f, 0x00, 0x0f, 0x00, 	/*  */
 	0x0f, 0x00, 0x0f, 0x00, 	/*  */
 	0x0f, 0x00, 0x1f, 0x00, 	/* ...* */
-	0x0f, 0x00, 0x3f, 0x00, 	/* ..** */
-	0x0f, 0xff, 0xfe, 0x00, 	/* ***. */
-	0x0f, 0xff, 0xfc, 0x00, 	/* **.. */
-	0x0f, 0xff, 0xf8, 0x00, 	/* *... */
-	0x0f, 0xff, 0xf0, 0x00, 	/*  */
-	0x0f, 0x03, 0xfc, 0x00, 	/* .... */
-	0x0f, 0x00, 0xff, 0x00, 	/*  */
-	0x0f, 0x00, 0x3f, 0xc0, 	/* .... */
+	0x0f, 0x00, 0x1f, 0x00, 	/* ...* */
+	0x0f, 0x00, 0x3e, 0x00, 	/* ..*. */
+	0x0f, 0x00, 0xfe, 0x00, 	/* ***. */
+	0x0f, 0x0f, 0xfc, 0x00, 	/* **.. */
+	0x0f, 0x0f, 0xff, 0x00, 	/*  */
+	0x0f, 0x0f, 0xff, 0x80, 	/* *... */
+	0x0f, 0x0f, 0xff, 0xc0, 	/* **.. */
 	0x0f, 0x00, 0x0f, 0xe0, 	/* ***. */
-	0x0f, 0x00, 0x03, 0xf0, 	/* ..** */
+	0x0f, 0x00, 0x03, 0xe0, 	/* ..*. */
+	0x0f, 0x00, 0x01, 0xf0, 	/* ...* */
 	0x0f, 0x00, 0x01, 0xf0, 	/* ...* */
 	0x0f, 0x00, 0x00, 0xf0, 	/*  */
 	0x0f, 0x00, 0x00, 0xf0, 	/*  */
 	0x0f, 0x00, 0x00, 0xf0, 	/*  */
 	0x0f, 0x00, 0x00, 0xf0, 	/*  */
 	0x0f, 0x00, 0x00, 0xf0, 	/*  */
-	0x0f, 0x80, 0x00, 0xf0, 	/* *... */
-	0x0f, 0xc0, 0x00, 0xf0, 	/* **.. */
-	0x0f, 0xe0, 0x00, 0xf0, 	/* ***. */
-	0x0f, 0xf0, 0x01, 0xf0, 	/* ...* */
-	0x0f, 0xfc, 0x03, 0xe0, 	/* ***. */
-	0x0f, 0x7f, 0xff, 0xe0, 	/* .**. */
-	0x0f, 0x3f, 0xff, 0xc0, 	/* .... */
-	0x0f, 0x1f, 0xff, 0x80, 	/* ...**... */
-	0x0f, 0x0f, 0xfe, 0x00, 	/* ***. */
+	0x0f, 0x00, 0x00, 0xf0, 	/* 

CVS commit: src/lib/libterminfo

2020-06-21 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Jun 21 15:05:23 UTC 2020

Modified Files:
src/lib/libterminfo: compile.c term_private.h

Log Message:
libterminfo: cast to uint16/32_t before conversion to preserve negativity

Otherwise the ABSENT_NUMERIC(-1) or CANCELLED_NUMERIC(-2) will be converted
incorrectly to size_t and then down to uint16/32_t.
Picked up by DIAGNOSTIC builds.

Thanks to Michael Forney for the fix for PR lib/52293.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/lib/libterminfo/compile.c
cvs rdiff -u -r1.18 -r1.19 src/lib/libterminfo/term_private.h

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



CVS commit: src/lib/libterminfo

2020-06-21 Thread Roy Marples
Module Name:src
Committed By:   roy
Date:   Sun Jun 21 15:05:23 UTC 2020

Modified Files:
src/lib/libterminfo: compile.c term_private.h

Log Message:
libterminfo: cast to uint16/32_t before conversion to preserve negativity

Otherwise the ABSENT_NUMERIC(-1) or CANCELLED_NUMERIC(-2) will be converted
incorrectly to size_t and then down to uint16/32_t.
Picked up by DIAGNOSTIC builds.

Thanks to Michael Forney for the fix for PR lib/52293.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/lib/libterminfo/compile.c
cvs rdiff -u -r1.18 -r1.19 src/lib/libterminfo/term_private.h

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

Modified files:

Index: src/lib/libterminfo/compile.c
diff -u src/lib/libterminfo/compile.c:1.25 src/lib/libterminfo/compile.c:1.26
--- src/lib/libterminfo/compile.c:1.25	Sun Apr  5 12:31:02 2020
+++ src/lib/libterminfo/compile.c	Sun Jun 21 15:05:23 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: compile.c,v 1.25 2020/04/05 12:31:02 roy Exp $ */
+/* $NetBSD: compile.c,v 1.26 2020/06/21 15:05:23 roy Exp $ */
 
 /*
  * Copyright (c) 2009, 2010, 2011, 2020 The NetBSD Foundation, Inc.
@@ -32,7 +32,7 @@
 #endif
 
 #include 
-__RCSID("$NetBSD: compile.c,v 1.25 2020/04/05 12:31:02 roy Exp $");
+__RCSID("$NetBSD: compile.c,v 1.26 2020/06/21 15:05:23 roy Exp $");
 
 #if !HAVE_NBTOOL_CONFIG_H || HAVE_SYS_ENDIAN_H
 #include 
@@ -560,9 +560,9 @@ _ti_encode_buf_id_num(TBUF *tbuf, int in
 		return 0;
 	_ti_encode_buf_16(tbuf, ind);
 	if (len == sizeof(uint32_t))
-		_ti_encode_buf_32(tbuf, num);
+		_ti_encode_buf_32(tbuf, (uint32_t)num);
 	else
-		_ti_encode_buf_16(tbuf, num);
+		_ti_encode_buf_16(tbuf, (uint16_t)num);
 	tbuf->entries++;
 	return 1;
 }

Index: src/lib/libterminfo/term_private.h
diff -u src/lib/libterminfo/term_private.h:1.18 src/lib/libterminfo/term_private.h:1.19
--- src/lib/libterminfo/term_private.h:1.18	Sun Mar 29 21:46:22 2020
+++ src/lib/libterminfo/term_private.h	Sun Jun 21 15:05:23 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: term_private.h,v 1.18 2020/03/29 21:46:22 roy Exp $ */
+/* $NetBSD: term_private.h,v 1.19 2020/06/21 15:05:23 roy Exp $ */
 
 /*
  * Copyright (c) 2009, 2010, 2013, 2020 The NetBSD Foundation, Inc.
@@ -276,14 +276,16 @@ _ti_encode_buf_count_str(TBUF *tbuf, con
 }
 
 static __inline void
-_ti_encode_buf_num(TBUF *tbuf, size_t num, int rtype)
+_ti_encode_buf_num(TBUF *tbuf, int num, int rtype)
 {
 	if (rtype == TERMINFO_RTYPE_O1) {
 		if (num > INT16_MAX)
 			num = INT16_MAX;
-		_ti_encode_buf_16(tbuf, num);
+		_ti_encode_buf_16(tbuf, (uint16_t)num);
 	} else {
-		_ti_encode_buf_32(tbuf, num);
+		if (num > INT32_MAX)
+			num = INT32_MAX;
+		_ti_encode_buf_32(tbuf, (uint32_t)num);
 	}
 }
 



CVS commit: src/external/bsd/kyua-cli

2020-06-21 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Jun 21 14:26:16 UTC 2020

Modified Files:
src/external/bsd/kyua-cli: Makefile.inc

Log Message:
kyua-cli: avoid warning about deprecated auto_ptr


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/kyua-cli/Makefile.inc

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

Modified files:

Index: src/external/bsd/kyua-cli/Makefile.inc
diff -u src/external/bsd/kyua-cli/Makefile.inc:1.4 src/external/bsd/kyua-cli/Makefile.inc:1.5
--- src/external/bsd/kyua-cli/Makefile.inc:1.4	Sat Jul  5 19:22:41 2014
+++ src/external/bsd/kyua-cli/Makefile.inc	Sun Jun 21 14:26:16 2020
@@ -1,10 +1,13 @@
-# $NetBSD: Makefile.inc,v 1.4 2014/07/05 19:22:41 dholland Exp $
+# $NetBSD: Makefile.inc,v 1.5 2020/06/21 14:26:16 lukem Exp $
 
 .include 
 
 TOPDIR=		${NETBSDSRCDIR}/external/bsd/kyua-cli
 SRCDIR=		${TOPDIR}/dist
 
+# Kyua uses auto_ptr; g++ 8 complains about it
+CXXFLAGS+=	-Wno-deprecated-declarations
+
 # Name of the private libraries (without their lib prefix) to depend on.
 KYUA_LIBS?=
 



CVS commit: src/external/bsd/kyua-cli

2020-06-21 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Jun 21 14:26:16 UTC 2020

Modified Files:
src/external/bsd/kyua-cli: Makefile.inc

Log Message:
kyua-cli: avoid warning about deprecated auto_ptr


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/external/bsd/kyua-cli/Makefile.inc

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



CVS commit: src/external/bsd/lutok/tests/lib/liblutok

2020-06-21 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Jun 21 14:12:50 UTC 2020

Modified Files:
src/external/bsd/lutok/tests/lib/liblutok: Makefile

Log Message:
lutok; fix build of c++ tests


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/lutok/tests/lib/liblutok/Makefile

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



CVS commit: src/external/bsd/lutok/tests/lib/liblutok

2020-06-21 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Jun 21 14:12:50 UTC 2020

Modified Files:
src/external/bsd/lutok/tests/lib/liblutok: Makefile

Log Message:
lutok; fix build of c++ tests


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/lutok/tests/lib/liblutok/Makefile

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

Modified files:

Index: src/external/bsd/lutok/tests/lib/liblutok/Makefile
diff -u src/external/bsd/lutok/tests/lib/liblutok/Makefile:1.2 src/external/bsd/lutok/tests/lib/liblutok/Makefile:1.3
--- src/external/bsd/lutok/tests/lib/liblutok/Makefile:1.2	Fri Oct 18 23:36:10 2013
+++ src/external/bsd/lutok/tests/lib/liblutok/Makefile	Sun Jun 21 14:12:50 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.2 2013/10/18 23:36:10 jmmv Exp $
+# $NetBSD: Makefile,v 1.3 2020/06/21 14:12:50 lukem Exp $
 
 .include 
 
@@ -10,14 +10,22 @@ SRCDIR=		${NETBSDSRCDIR}/external/bsd/lu
 CPPFLAGS+=	-DHAVE_CONFIG_H
 CPPFLAGS+=	-I${NETBSDSRCDIR}/lib/liblutok
 
+# lutok uses auto_ptr; g++ 8 complains about it
+CXXFLAGS+=	-Wno-deprecated-declarations
+
 FILESDIR=	${TESTSDIR}
 
-TESTS_CXX=	c_gate_test \
+TESTS_CXX=
+.for test in	\
+		c_gate_test \
 		debug_test \
 		exceptions_test \
 		operations_test \
 		stack_cleaner_test \
 		state_test
+TESTS_CXX+=	${test}
+SRCS.${test}=	${test}.cpp
+.endfor
 
 LDADD+=		-llutok -llua
 DPADD+=		${LIBLUTOK} ${LIBLUA}



CVS commit: src/external/bsd/lutok/dist

2020-06-21 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Jun 21 14:11:54 UTC 2020

Modified Files:
src/external/bsd/lutok/dist: state.cpp

Log Message:
lutok; fix strncpy -Wstringop-truncation warning


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/lutok/dist/state.cpp

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



CVS commit: src/external/bsd/lutok/dist

2020-06-21 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Jun 21 14:11:54 UTC 2020

Modified Files:
src/external/bsd/lutok/dist: state.cpp

Log Message:
lutok; fix strncpy -Wstringop-truncation warning


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/lutok/dist/state.cpp

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

Modified files:

Index: src/external/bsd/lutok/dist/state.cpp
diff -u src/external/bsd/lutok/dist/state.cpp:1.1.1.2 src/external/bsd/lutok/dist/state.cpp:1.2
--- src/external/bsd/lutok/dist/state.cpp:1.1.1.2	Fri Oct 18 23:35:24 2013
+++ src/external/bsd/lutok/dist/state.cpp	Sun Jun 21 14:11:54 2020
@@ -145,7 +145,7 @@ call_cxx_function_from_c(lutok::cxx_func
 lutok::state state = lutok::state_c_gate::connect(raw_state);
 return function(state);
 } catch (const std::exception& e) {
-std::strncpy(error_buf, e.what(), sizeof(error_buf));
+std::strncpy(error_buf, e.what(), sizeof(error_buf)-1);
 } catch (...) {
 std::strncpy(error_buf, "Unhandled exception in Lua C++ hook",
  sizeof(error_buf));



CVS commit: src/external/bsd/atf/tests/atf

2020-06-21 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Jun 21 13:59:56 UTC 2020

Modified Files:
src/external/bsd/atf/tests/atf/test-programs: Makefile
src/external/bsd/atf/tests/atf/tools: Makefile

Log Message:
fix build of atf .cpp files


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/external/bsd/atf/tests/atf/test-programs/Makefile
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/atf/tests/atf/tools/Makefile

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



CVS commit: src/external/bsd/atf/tests/atf

2020-06-21 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Jun 21 13:59:56 UTC 2020

Modified Files:
src/external/bsd/atf/tests/atf/test-programs: Makefile
src/external/bsd/atf/tests/atf/tools: Makefile

Log Message:
fix build of atf .cpp files


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 \
src/external/bsd/atf/tests/atf/test-programs/Makefile
cvs rdiff -u -r1.7 -r1.8 src/external/bsd/atf/tests/atf/tools/Makefile

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

Modified files:

Index: src/external/bsd/atf/tests/atf/test-programs/Makefile
diff -u src/external/bsd/atf/tests/atf/test-programs/Makefile:1.6 src/external/bsd/atf/tests/atf/test-programs/Makefile:1.7
--- src/external/bsd/atf/tests/atf/test-programs/Makefile:1.6	Sat Feb 15 04:15:20 2014
+++ src/external/bsd/atf/tests/atf/test-programs/Makefile	Sun Jun 21 13:59:56 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.6 2014/02/15 04:15:20 jmmv Exp $
+# $NetBSD: Makefile,v 1.7 2020/06/21 13:59:56 lukem Exp $
 
 .include 
 
@@ -11,6 +11,7 @@ KYUAFILE=	yes
 TESTS_C=	c_helpers
 
 TESTS_CXX=	cpp_helpers
+SRCS.cpp_helpers=cpp_helpers.cpp
 
 TESTS_SH=	sh_helpers
 .for t in config_test expect_test meta_data_test result_test srcdir_test

Index: src/external/bsd/atf/tests/atf/tools/Makefile
diff -u src/external/bsd/atf/tests/atf/tools/Makefile:1.7 src/external/bsd/atf/tests/atf/tools/Makefile:1.8
--- src/external/bsd/atf/tests/atf/tools/Makefile:1.7	Sat Feb 15 22:32:26 2014
+++ src/external/bsd/atf/tests/atf/tools/Makefile	Sun Jun 21 13:59:56 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2014/02/15 22:32:26 jmmv Exp $
+# $NetBSD: Makefile,v 1.8 2020/06/21 13:59:56 lukem Exp $
 
 USE_ATF_LIBTOOLS=	yes
 
@@ -23,7 +23,9 @@ TESTS_C=	expect_helpers \
 		several_tcs_helper \
 		zero_tcs_helper
 
-TESTS_CXX=	application_test \
+TESTS_CXX=
+.for test in	\
+		application_test \
 		atffile_test \
 		auto_array_test \
 		config_file_test \
@@ -44,6 +46,9 @@ TESTS_CXX=	application_test \
 		text_test \
 		ui_test \
 		user_test
+TESTS_CXX+=	${test}
+SRCS.${test}=	${test}.cpp
+.endfor
 
 TESTS_SH=	atf-config_test \
 		atf-report_test \



CVS commit: src/share/mk

2020-06-21 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Jun 21 13:29:05 UTC 2020

Modified Files:
src/share/mk: bsd.README

Log Message:
document PROGS and PROGS_CXX, and default c++ SRCS


To generate a diff of this commit:
cvs rdiff -u -r1.407 -r1.408 src/share/mk/bsd.README

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

Modified files:

Index: src/share/mk/bsd.README
diff -u src/share/mk/bsd.README:1.407 src/share/mk/bsd.README:1.408
--- src/share/mk/bsd.README:1.407	Mon Jun 15 01:57:31 2020
+++ src/share/mk/bsd.README	Sun Jun 21 13:29:05 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: bsd.README,v 1.407 2020/06/15 01:57:31 christos Exp $
+#	$NetBSD: bsd.README,v 1.408 2020/06/21 13:29:05 lukem Exp $
 #	@(#)bsd.README	8.2 (Berkeley) 4/2/94
 
 This is the README file for the make "include" files for the NetBSD
@@ -1645,8 +1645,16 @@ PROG_CXX	If defined, the name of the pro
 PROGNAME	The name that the above program will be installed as, if
 		different from ${PROG}.
 
+PROGS		Multiple programs to build from a single directory.
+		Defaults to PROG. For each program ${_P} in ${PROGS},
+		uses SRCS.${_P}, defaulting to ${_P}.c.
+
+PROGS_CXX	Multiple C++ programs to build from a single directory.
+		Defaults to PROG_CXX. For each program ${_P} in ${PROGS_CXX},
+		uses SRCS.${_P}, defaulting to ${_P}.cc.
+
 SRCS		List of source files to build the program.  If SRCS is not
-		defined, it's assumed to be ${PROG}.c.
+		defined, it's assumed to be ${PROG}.c or ${PROG_CXX}.cc.
 
 DPSRCS		List of source files which are needed for generating
 		dependencies, but are not needed in ${SRCS}.



CVS commit: src/share/mk

2020-06-21 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Jun 21 13:29:05 UTC 2020

Modified Files:
src/share/mk: bsd.README

Log Message:
document PROGS and PROGS_CXX, and default c++ SRCS


To generate a diff of this commit:
cvs rdiff -u -r1.407 -r1.408 src/share/mk/bsd.README

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

2020-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jun 21 10:41:59 UTC 2020

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

Log Message:
Tickets #967 - #969


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.69 -r1.1.2.70 src/doc/CHANGES-9.1

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

2020-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jun 21 10:41:59 UTC 2020

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

Log Message:
Tickets #967 - #969


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.69 -r1.1.2.70 src/doc/CHANGES-9.1

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

Modified files:

Index: src/doc/CHANGES-9.1
diff -u src/doc/CHANGES-9.1:1.1.2.69 src/doc/CHANGES-9.1:1.1.2.70
--- src/doc/CHANGES-9.1:1.1.2.69	Sat Jun 20 20:04:17 2020
+++ src/doc/CHANGES-9.1	Sun Jun 21 10:41:59 2020
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.1,v 1.1.2.69 2020/06/20 20:04:17 martin Exp $
+# $NetBSD: CHANGES-9.1,v 1.1.2.70 2020/06/21 10:41:59 martin Exp $
 
 A complete list of changes from the NetBSD 9.0 release to the NetBSD 9.1
 release:
@@ -3048,3 +3048,24 @@ etc/rc.d/postfix1.19
 	PR 55396: show "Starting postfix" message at startup.
 	[rin, ticket #966]
 
+share/misc/acronyms1.300-1.304
+share/misc/acronyms-o.real			1.7,1.8
+share/misc/acronyms.comp			1.302-1.307
+share/misc/bsd-family-tree			1.82
+
+	Add various acronyms. Sync family tree.
+	[sevan, ticket #967]
+
+usr.bin/calendar/calendars/calendar.birthday	1.42-1.44
+usr.bin/calendar/calendars/calendar.computer	1.13-1.15
+usr.bin/calendar/calendars/calendar.music	1.24
+
+	Add various entries.
+	[sevan, ticket #968]
+
+games/fortune/datfiles/fortunes			1.87-1.91
+games/fortune/datfiles/netbsd-tips		1.7,1.8
+
+	Add various enries, fix some tips.
+	[sevan, ticket #969]
+



CVS commit: [netbsd-9] src/games/fortune/datfiles

2020-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jun 21 10:39:58 UTC 2020

Modified Files:
src/games/fortune/datfiles [netbsd-9]: fortunes netbsd-tips

Log Message:
Pull up following revision(s) (requested by sevan in ticket #969):

games/fortune/datfiles/fortunes: revision 1.90
games/fortune/datfiles/fortunes: revision 1.91
games/fortune/datfiles/netbsd-tips: revision 1.7
games/fortune/datfiles/netbsd-tips: revision 1.8
games/fortune/datfiles/fortunes: revision 1.87
games/fortune/datfiles/fortunes: revision 1.88
games/fortune/datfiles/fortunes: revision 1.89

something I apparently forgot to commit months or years ago

Andrew Weatherall's tattoo and a track on A Pox On The Pioneers album.
https://pbs.twimg.com/media/ERAuddhU4AAFv3w?format=jpg=orig
Story:
https://www.dummymag.com/features/andrew-weatherall-interview-it-s-bollocks-it-s-discos-tell-me-tales-of-the/

Disks can sense vibes, DTrace confirms it.
https://youtu.be/tDacjrSCeq4

Heads up on Bell patents
P21 on https://minnie.tuhs.org/Archive/Documentation/AUUGN/AUUGN-V01.1.pdf

A revision of "The purpose of computing is insight, not numbers" by
Richard Hamming.
 From The Art of Doing Science and Engineering

Properly quote printf string
Noticed by Ottavio Caruso on #netbsd@Freenode, thanks!

Recommend using `pkg_admin {fetch-pkg-vulnerabilities,audit}' instead of
{download-vulnerability-list,audit-packages}.


To generate a diff of this commit:
cvs rdiff -u -r1.82.2.1 -r1.82.2.2 src/games/fortune/datfiles/fortunes
cvs rdiff -u -r1.6 -r1.6.2.1 src/games/fortune/datfiles/netbsd-tips

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



CVS commit: [netbsd-9] src/games/fortune/datfiles

2020-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jun 21 10:39:58 UTC 2020

Modified Files:
src/games/fortune/datfiles [netbsd-9]: fortunes netbsd-tips

Log Message:
Pull up following revision(s) (requested by sevan in ticket #969):

games/fortune/datfiles/fortunes: revision 1.90
games/fortune/datfiles/fortunes: revision 1.91
games/fortune/datfiles/netbsd-tips: revision 1.7
games/fortune/datfiles/netbsd-tips: revision 1.8
games/fortune/datfiles/fortunes: revision 1.87
games/fortune/datfiles/fortunes: revision 1.88
games/fortune/datfiles/fortunes: revision 1.89

something I apparently forgot to commit months or years ago

Andrew Weatherall's tattoo and a track on A Pox On The Pioneers album.
https://pbs.twimg.com/media/ERAuddhU4AAFv3w?format=jpg=orig
Story:
https://www.dummymag.com/features/andrew-weatherall-interview-it-s-bollocks-it-s-discos-tell-me-tales-of-the/

Disks can sense vibes, DTrace confirms it.
https://youtu.be/tDacjrSCeq4

Heads up on Bell patents
P21 on https://minnie.tuhs.org/Archive/Documentation/AUUGN/AUUGN-V01.1.pdf

A revision of "The purpose of computing is insight, not numbers" by
Richard Hamming.
 From The Art of Doing Science and Engineering

Properly quote printf string
Noticed by Ottavio Caruso on #netbsd@Freenode, thanks!

Recommend using `pkg_admin {fetch-pkg-vulnerabilities,audit}' instead of
{download-vulnerability-list,audit-packages}.


To generate a diff of this commit:
cvs rdiff -u -r1.82.2.1 -r1.82.2.2 src/games/fortune/datfiles/fortunes
cvs rdiff -u -r1.6 -r1.6.2.1 src/games/fortune/datfiles/netbsd-tips

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

Modified files:

Index: src/games/fortune/datfiles/fortunes
diff -u src/games/fortune/datfiles/fortunes:1.82.2.1 src/games/fortune/datfiles/fortunes:1.82.2.2
--- src/games/fortune/datfiles/fortunes:1.82.2.1	Sun Dec  8 13:06:37 2019
+++ src/games/fortune/datfiles/fortunes	Sun Jun 21 10:39:58 2020
@@ -16289,3 +16289,18 @@ I wonder why I wonder.
 I wonder why I wonder why
 I wonder why I wonder!
 		-- Richard P. Feynman, "Always Trying to Escape"
+%
+Fanfare, n.:
+The food available for consumption at a con.
+%
+Fail we may, sail we must
+%
+Don't shout at your JBODs, they don't like it!
+		-- Brendan Gregg, "Shouting in the Datacenter"
+%
+Bell has two patents on UNIX
+a) set-user-id bit
+b) on "typo" !
+		-- John Lions, Australian UNIX Users Group Newsletter, Oct 1978
+%
+The purpose of computing numbers is not yet in sight

Index: src/games/fortune/datfiles/netbsd-tips
diff -u src/games/fortune/datfiles/netbsd-tips:1.6 src/games/fortune/datfiles/netbsd-tips:1.6.2.1
--- src/games/fortune/datfiles/netbsd-tips:1.6	Sun Sep  2 16:08:12 2018
+++ src/games/fortune/datfiles/netbsd-tips	Sun Jun 21 10:39:58 2020
@@ -35,11 +35,11 @@ You can view your non-default Postfix se
 To report about installed packages with known vulnerabilities,
 fetch the latest pkg-vulnerabilities file as the superuser with:
 
- download-vulnerability-list
+ pkg_admin fetch-pkg-vulnerabilities
 
 And then run:
 
- audit-packages
+ pkg_admin audit
 %
 The following shows an example of temporarily adding 10MB more swap
 space for virtual memory:
@@ -51,7 +51,7 @@ space for virtual memory:
 If your console ever gets broken, you can try resetting it to its
 initial state with:
 
- printf "\033c
+ printf "\033c"
 %
 If you installed a package, but don't know what the software is
 called or what executables to run, use pkg_info with the -L switch



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

2020-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jun 21 10:32:39 UTC 2020

Modified Files:
src/usr.bin/calendar/calendars [netbsd-9]: calendar.birthday
calendar.computer calendar.music

Log Message:
Pull up following revision(s) (requested by sevan in ticket #969):

usr.bin/calendar/calendars/calendar.music: revision 1.24
usr.bin/calendar/calendars/calendar.birthday: revision 1.42
usr.bin/calendar/calendars/calendar.birthday: revision 1.43
usr.bin/calendar/calendars/calendar.birthday: revision 1.44
usr.bin/calendar/calendars/calendar.computer: revision 1.13
usr.bin/calendar/calendars/calendar.computer: revision 1.14
usr.bin/calendar/calendars/calendar.computer: revision 1.15

It was aboard the Space Shuttle Atlantis using a Macintosh Portable.
https://support.apple.com/kb/TA30635

Add RISC-V's birthday
https://riscv.org/2020/05/happy-10th-birthday-risc-v/

X turned 36 today
http://www.talisman.org/x-debut.shtml

Fix typo

Add Margaret Hamilton, Florian Schneider, Ron Hardy, Little Richard

Add Allen Ginsberg

The Hacienda must be rebuilt.
https://twitter.com/McrHistory/status/1263386700249776130
https://twitter.com/Mr_Dave_Haslam/status/1263373996172640256


To generate a diff of this commit:
cvs rdiff -u -r1.29.2.3 -r1.29.2.4 \
src/usr.bin/calendar/calendars/calendar.birthday
cvs rdiff -u -r1.7.2.2 -r1.7.2.3 \
src/usr.bin/calendar/calendars/calendar.computer
cvs rdiff -u -r1.19.2.2 -r1.19.2.3 \
src/usr.bin/calendar/calendars/calendar.music

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

Modified files:

Index: src/usr.bin/calendar/calendars/calendar.birthday
diff -u src/usr.bin/calendar/calendars/calendar.birthday:1.29.2.3 src/usr.bin/calendar/calendars/calendar.birthday:1.29.2.4
--- src/usr.bin/calendar/calendars/calendar.birthday:1.29.2.3	Tue Apr 28 15:58:51 2020
+++ src/usr.bin/calendar/calendars/calendar.birthday	Sun Jun 21 10:32:38 2020
@@ -80,6 +80,7 @@
 02/29	Herman Hollerith born, 1860
 03/01	David Niven born, 1910
 03/02	Dr. Seuss born, 1904
+03/02	Ron Hardy died in Chicago, Illinois, 1992
 03/04	Casimir Pulaski born, 1747
 03/05	John Belushi dies in Los Angeles, 1982
 03/07	Sir John Frederick William Herschel born, 1792, astronomer
@@ -111,7 +112,9 @@
 03/31	Rene Descartes born, 1596, mathematician & philosopher
 04/01	Alan Jay Perlis was born in Pittsburgh, Pennsylvania, 1922
 04/03	Washington Irving born, 1783
+04/05	Irwin Allen Ginsberg died in New York City, 1997
 04/05	Thomas Hobbes born, 1588, philosopher
+04/07	Florian Schneider-Esleben was born in Baden-Wurttemberg, Germany, 1947
 04/08	Buddha born, 563 BC
 04/08	David Rittenhouse born, 1732, astronomer & mathematician
 04/09	Edward Muybridge born, 1830, motion-picture pioneer
@@ -123,6 +126,7 @@
 		discovered Saturn's rings
 04/15	Leonardo da Vinci born, 1452
 04/16	Charles (Charlie) Chaplin (Sir) born in London, 1889
+04/21	Florian Schneider-Esleben died in Dusseldorf, Germany, 2020
 04/22	Immanuel Kant born, 1724
 04/24	Lawrence Gordon Tesler was born in The Bronx, New York City, 1945
 04/27	Louis Victor de Broglie born, 1774, physicist
@@ -133,12 +137,15 @@
 05/01	Little Walter (Marion Walter Jacobs) born in Alexandria,
 		Louisiana, 1930
 05/02	Dr. Benjamin Spock born, 1903
+05/08	Ron Hardy was born in Chicago, Illinois, 1958
+05/09	Little Richard (Richard Wayne Penniman) died in Tullahoma, Tennessee,
+		2020
 05/09	Pinza died, 1957
 05/10	Fred Astaire (Frederick Austerlitz) born in Omaha, Nebraska, 1899
 05/10	William Robert "Bert" Sutherland was born in Hastings, Nebraska, 1936
 05/11	Douglas Adams died, 2001
 05/11	Johnny Appleseed born, 1768
-05/11	Richard Philips Feynman was born is Queens, New York, 1918
+05/11	Richard Philips Feynman was born in Queens, New York, 1918
 05/12	Florence Nightingale born in Florence, Italy, 1820
 05/13	Arthur S. Sullivan born, 1842
 05/15	Mike Oldfield born in Essex, England, 1953
@@ -154,6 +161,7 @@
 06/01	Brigham Young born, 1801
 06/01	Marilyn Monroe born, 1928
 06/03	Henry James born, 1811
+06/03	Irwin Allen Ginsberg was born in Newark, New Jersey, 1926
 06/07	(Eugene Henri) Paul Gaugin born, 1848
 06/07	Alan Mathison Turing died, 1954
 06/07	George Bryan "Beau" Brummel born, 1778
@@ -197,6 +205,7 @@
 08/13	Annie Oakley born, 1860
 08/13	Fidel Castro born, 1927
 08/17	Mae West born, 1892
+08/17	Margaret Heafield Hamilton was born in Paoli, Indiana, 1936
 08/18	Meriwether Lewis born, 1774, American explorer
 08/20	Leon Trotsky assassinated, 1940
 08/23	Gene Kelly born, 1912
@@ -275,6 +284,8 @@
 11/30	Mark Twain (Samuel Clemens) born in Florida, Missouri, 1835
 12/01	Woody Allen (Allen Stuart Konigsberg) born in Brooklyn, NY, 1935
 12/04	Tommy Bolin dies of a heroin overdose in Miami, 1976
+12/05	Little Richard (Richard Wayne Penniman) was born in Macon, Georgia,
+		1932
 12/05	Walt (Walter Elias) Disney born in Chicago, 1901
 

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

2020-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jun 21 10:32:39 UTC 2020

Modified Files:
src/usr.bin/calendar/calendars [netbsd-9]: calendar.birthday
calendar.computer calendar.music

Log Message:
Pull up following revision(s) (requested by sevan in ticket #969):

usr.bin/calendar/calendars/calendar.music: revision 1.24
usr.bin/calendar/calendars/calendar.birthday: revision 1.42
usr.bin/calendar/calendars/calendar.birthday: revision 1.43
usr.bin/calendar/calendars/calendar.birthday: revision 1.44
usr.bin/calendar/calendars/calendar.computer: revision 1.13
usr.bin/calendar/calendars/calendar.computer: revision 1.14
usr.bin/calendar/calendars/calendar.computer: revision 1.15

It was aboard the Space Shuttle Atlantis using a Macintosh Portable.
https://support.apple.com/kb/TA30635

Add RISC-V's birthday
https://riscv.org/2020/05/happy-10th-birthday-risc-v/

X turned 36 today
http://www.talisman.org/x-debut.shtml

Fix typo

Add Margaret Hamilton, Florian Schneider, Ron Hardy, Little Richard

Add Allen Ginsberg

The Hacienda must be rebuilt.
https://twitter.com/McrHistory/status/1263386700249776130
https://twitter.com/Mr_Dave_Haslam/status/1263373996172640256


To generate a diff of this commit:
cvs rdiff -u -r1.29.2.3 -r1.29.2.4 \
src/usr.bin/calendar/calendars/calendar.birthday
cvs rdiff -u -r1.7.2.2 -r1.7.2.3 \
src/usr.bin/calendar/calendars/calendar.computer
cvs rdiff -u -r1.19.2.2 -r1.19.2.3 \
src/usr.bin/calendar/calendars/calendar.music

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



CVS commit: [netbsd-9] src/share/misc

2020-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jun 21 10:28:20 UTC 2020

Modified Files:
src/share/misc [netbsd-9]: acronyms acronyms-o.real acronyms.comp
bsd-family-tree

Log Message:
Pull up following revision(s) (requested by sevan in ticket #967):

share/misc/acronyms: revision 1.302
share/misc/acronyms: revision 1.303
share/misc/acronyms: revision 1.304
share/misc/bsd-family-tree: revision 1.82
share/misc/acronyms-o.real: revision 1.7
share/misc/acronyms-o.real: revision 1.8
share/misc/acronyms.comp: revision 1.302
share/misc/acronyms.comp: revision 1.303
share/misc/acronyms.comp: revision 1.304
share/misc/acronyms.comp: revision 1.305
share/misc/acronyms.comp: revision 1.306
share/misc/acronyms.comp: revision 1.307
share/misc/acronyms: revision 1.300
share/misc/acronyms: revision 1.301

LSO   large send offload
Add OWASP
BMP, DGEMM, DIB, GEMM, WMF
Add FHRP, GLBP, HSRP
IME, SCIM
QOI
ACAB
FTP
ACAB (worksafe variant)
FQA GCHQ
URM
BAU
Sync with r359561


To generate a diff of this commit:
cvs rdiff -u -r1.287.2.2 -r1.287.2.3 src/share/misc/acronyms
cvs rdiff -u -r1.6 -r1.6.6.1 src/share/misc/acronyms-o.real
cvs rdiff -u -r1.283.2.2 -r1.283.2.3 src/share/misc/acronyms.comp
cvs rdiff -u -r1.75.2.2 -r1.75.2.3 src/share/misc/bsd-family-tree

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

Modified files:

Index: src/share/misc/acronyms
diff -u src/share/misc/acronyms:1.287.2.2 src/share/misc/acronyms:1.287.2.3
--- src/share/misc/acronyms:1.287.2.2	Tue Apr 28 18:00:56 2020
+++ src/share/misc/acronyms	Sun Jun 21 10:28:20 2020
@@ -1,4 +1,4 @@
-$NetBSD: acronyms,v 1.287.2.2 2020/04/28 18:00:56 martin Exp $
+$NetBSD: acronyms,v 1.287.2.3 2020/06/21 10:28:20 martin Exp $
 10Q	thank you
 10X	thanks
 1337	elite ("leet")
@@ -9,6 +9,7 @@ A/S/L	age/sex/location
 AAMOF	as a matter of fact
 ABD	all but dissertation
 AC	audible chuckle
+ACAB	all cats are beautiful
 ADD	attention deficit disorder
 ADHD	attention deficit (and) hyperactivity disorder
 ADN	any day now
@@ -58,6 +59,7 @@ B/W	bandwidth
 B/W	between
 BAI	goodbye
 BAK	back at keyboard
+BAU	business as usual
 BBIAB	be back in a bit
 BBL	[I'll] be back later
 BBR	burnt beyond repair
@@ -167,6 +169,7 @@ FNO	from now on
 FOC	free of charge
 FPS	first person shooter
 FPS	frames per second
+FQA	frequently questioned answer
 FRAND	fair, reasonable, and non-discriminatory
 FSDO	for some definition of
 FSVO	for some value of
@@ -191,6 +194,7 @@ GAC	get a clue
 GAL	get a life
 GBTW	get back to work
 GCD	greatest common divisor
+GCHQ	Government Communications Headquarters (UK)
 GDPR	General Data Protection Regulation
 GF	girlfriend
 GFCI	ground-fault circuit interrupter
@@ -466,6 +470,7 @@ PTT	post-telephone-telegraph
 PTV	parental tunnel vision
 QED	quod erat demonstrandum
 QFT	quoted for truth
+QOI	quality of information
 RA	residential advisor
 RAND	reasonable and non-discriminatory
 RCD	residual current device
@@ -584,6 +589,7 @@ UGT	universal greeting time
 UPC	Universal Product Code
 UR	your
 UR	{you're, you are}
+URM	underrepresented minority
 UTSL	use the source, Luke
 VCR	video cassette recorder
 VEG	very evil grin

Index: src/share/misc/acronyms-o.real
diff -u src/share/misc/acronyms-o.real:1.6 src/share/misc/acronyms-o.real:1.6.6.1
--- src/share/misc/acronyms-o.real:1.6	Sat Nov 18 08:19:21 2017
+++ src/share/misc/acronyms-o.real	Sun Jun 21 10:28:20 2020
@@ -1,4 +1,5 @@
-# $NetBSD: acronyms-o.real,v 1.6 2017/11/18 08:19:21 pgoyette Exp $
+# $NetBSD: acronyms-o.real,v 1.6.6.1 2020/06/21 10:28:20 martin Exp $
+ACAB	all cops are bastards
 AFU	all fucked up
 AYFKM	are you fucking kidding me
 B/S	bullshit
@@ -21,6 +22,7 @@ FSCK	fuck
 FTFA	from the fucking article
 FTFM	fuck the fuckin' manual!
 FTMFW	for the motherfucking win
+FTP	fuck the police
 FTS	fuck that shit
 FUBAR	fucked up beyond all recognition
 FYIAD	fuck you, I'm a dragon!

Index: src/share/misc/acronyms.comp
diff -u src/share/misc/acronyms.comp:1.283.2.2 src/share/misc/acronyms.comp:1.283.2.3
--- src/share/misc/acronyms.comp:1.283.2.2	Tue Apr 28 18:00:56 2020
+++ src/share/misc/acronyms.comp	Sun Jun 21 10:28:20 2020
@@ -1,4 +1,4 @@
-$NetBSD: acronyms.comp,v 1.283.2.2 2020/04/28 18:00:56 martin Exp $
+$NetBSD: acronyms.comp,v 1.283.2.3 2020/06/21 10:28:20 martin Exp $
 3WHS	three-way handshake
 8VSB	8-state vestigial side band modulation
 AA	anti-aliasing
@@ -155,6 +155,8 @@ BLE	Bluetooth low energy
 BLOB	binary large object
 BM	bus master
 BMC	baseboard management controller
+BMP	basic multilingual plane
+BMP	bitmap image file
 BMIC	bus master interface controller
 BN	boundary neutral
 BNF	Backus-Naur form
@@ -394,9 +396,11 @@ DFSAN	Data Flow Sanitizer
 DFT	diagnostic function test
 DFT	discrete Fourier transform
 DGL	data generation language
+DGEMM	double precision general matrix multiply
 DH	

CVS commit: [netbsd-9] src/share/misc

2020-06-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jun 21 10:28:20 UTC 2020

Modified Files:
src/share/misc [netbsd-9]: acronyms acronyms-o.real acronyms.comp
bsd-family-tree

Log Message:
Pull up following revision(s) (requested by sevan in ticket #967):

share/misc/acronyms: revision 1.302
share/misc/acronyms: revision 1.303
share/misc/acronyms: revision 1.304
share/misc/bsd-family-tree: revision 1.82
share/misc/acronyms-o.real: revision 1.7
share/misc/acronyms-o.real: revision 1.8
share/misc/acronyms.comp: revision 1.302
share/misc/acronyms.comp: revision 1.303
share/misc/acronyms.comp: revision 1.304
share/misc/acronyms.comp: revision 1.305
share/misc/acronyms.comp: revision 1.306
share/misc/acronyms.comp: revision 1.307
share/misc/acronyms: revision 1.300
share/misc/acronyms: revision 1.301

LSO   large send offload
Add OWASP
BMP, DGEMM, DIB, GEMM, WMF
Add FHRP, GLBP, HSRP
IME, SCIM
QOI
ACAB
FTP
ACAB (worksafe variant)
FQA GCHQ
URM
BAU
Sync with r359561


To generate a diff of this commit:
cvs rdiff -u -r1.287.2.2 -r1.287.2.3 src/share/misc/acronyms
cvs rdiff -u -r1.6 -r1.6.6.1 src/share/misc/acronyms-o.real
cvs rdiff -u -r1.283.2.2 -r1.283.2.3 src/share/misc/acronyms.comp
cvs rdiff -u -r1.75.2.2 -r1.75.2.3 src/share/misc/bsd-family-tree

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

2020-06-21 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sun Jun 21 08:02:43 UTC 2020

Modified Files:
src/sys/arch/arm/imx: files.imx51

Log Message:
Fix tyop.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/imx/files.imx51

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/files.imx51
diff -u src/sys/arch/arm/imx/files.imx51:1.22 src/sys/arch/arm/imx/files.imx51:1.23
--- src/sys/arch/arm/imx/files.imx51:1.22	Sat May 23 06:21:15 2020
+++ src/sys/arch/arm/imx/files.imx51	Sun Jun 21 08:02:43 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: files.imx51,v 1.22 2020/05/23 06:21:15 rin Exp $
+#	$NetBSD: files.imx51,v 1.23 2020/06/21 08:02:43 simonb Exp $
 #
 # Configuration info for the Freescale i.MX5x
 #
@@ -99,7 +99,7 @@ file	arch/arm/imx/imx51_uart.c		imx51_ua
 defflag	opt_imxuart.hIMXUARTCONSOLE
 
 # USB controller
-# attach of this driver need to be specified in paltform configuration
+# attach of this driver need to be specified in platform configuration
 device imxusbc { unit, irq } : bus_dma_generic
 file   arch/arm/imx/imx51_usb.c			imxusbc
 



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

2020-06-21 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sun Jun 21 08:02:43 UTC 2020

Modified Files:
src/sys/arch/arm/imx: files.imx51

Log Message:
Fix tyop.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/arm/imx/files.imx51

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

2020-06-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jun 21 07:17:25 UTC 2020

Modified Files:
src/sys/arch/arm/broadcom: bcm283x_platform.c

Log Message:
Update to new proplib api


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/arm/broadcom/bcm283x_platform.c

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



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

2020-06-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jun 21 07:17:25 UTC 2020

Modified Files:
src/sys/arch/arm/broadcom: bcm283x_platform.c

Log Message:
Update to new proplib api


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/arm/broadcom/bcm283x_platform.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/broadcom/bcm283x_platform.c
diff -u src/sys/arch/arm/broadcom/bcm283x_platform.c:1.37 src/sys/arch/arm/broadcom/bcm283x_platform.c:1.38
--- src/sys/arch/arm/broadcom/bcm283x_platform.c:1.37	Sat Feb 22 00:28:35 2020
+++ src/sys/arch/arm/broadcom/bcm283x_platform.c	Sun Jun 21 07:17:25 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: bcm283x_platform.c,v 1.37 2020/02/22 00:28:35 jmcneill Exp $	*/
+/*	$NetBSD: bcm283x_platform.c,v 1.38 2020/06/21 07:17:25 skrll Exp $	*/
 
 /*-
  * Copyright (c) 2017 Jared D. McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bcm283x_platform.c,v 1.37 2020/02/22 00:28:35 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bcm283x_platform.c,v 1.38 2020/06/21 07:17:25 skrll Exp $");
 
 #include "opt_arm_debug.h"
 #include "opt_bcm283x.h"
@@ -1428,14 +1428,8 @@ bcm283x_platform_device_register(device_
 		 (vb.vbt_macaddr.addr >> 40) & 0xff
 		};
 
-		prop_data_t pd = prop_data_create_data(enaddr, ETHER_ADDR_LEN);
-		KASSERT(pd != NULL);
-		if (prop_dictionary_set(device_properties(dev), "mac-address",
-		pd) == false) {
-			aprint_error_dev(dev,
-			"WARNING: Unable to set mac-address property\n");
-		}
-		prop_object_release(pd);
+		prop_dictionary_set_data(dict, "mac-address", enaddr,
+		ETHER_ADDR_LEN);
 	}
 
 #if NGENFB > 0



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

2020-06-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jun 21 07:14:16 UTC 2020

Modified Files:
src/sys/arch/arm/arm32: pmap.c

Log Message:
Use howmany().  NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.414 -r1.415 src/sys/arch/arm/arm32/pmap.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/arm32/pmap.c
diff -u src/sys/arch/arm/arm32/pmap.c:1.414 src/sys/arch/arm/arm32/pmap.c:1.415
--- src/sys/arch/arm/arm32/pmap.c:1.414	Wed May 27 06:43:22 2020
+++ src/sys/arch/arm/arm32/pmap.c	Sun Jun 21 07:14:15 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.c,v 1.414 2020/05/27 06:43:22 skrll Exp $	*/
+/*	$NetBSD: pmap.c,v 1.415 2020/06/21 07:14:15 skrll Exp $	*/
 
 /*
  * Copyright 2003 Wasabi Systems, Inc.
@@ -192,7 +192,7 @@
 #endif
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.414 2020/05/27 06:43:22 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.415 2020/06/21 07:14:15 skrll Exp $");
 
 #include 
 #include 
@@ -6337,12 +6337,12 @@ pmap_bootstrap(vaddr_t vstart, vaddr_t v
 	 * for L2 descriptor tables and metadata allocation in
 	 * pmap_growkernel().
 	 */
-	size = ((virtual_end - pmap_curmaxkvaddr) + L1_S_OFFSET) / L1_S_SIZE;
+	size = howmany(virtual_end - pmap_curmaxkvaddr, L1_S_SIZE);
 	pmap_alloc_specials(_avail,
 	round_page(size * L2_TABLE_SIZE_REAL) / PAGE_SIZE,
 	_kernel_l2ptp_kva, NULL);
 
-	size = (size + (L2_BUCKET_SIZE - 1)) / L2_BUCKET_SIZE;
+	size = howmany(size, L2_BUCKET_SIZE);
 	pmap_alloc_specials(_avail,
 	round_page(size * sizeof(struct l2_dtable)) / PAGE_SIZE,
 	_kernel_l2dtable_kva, NULL);



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

2020-06-21 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Jun 21 07:14:16 UTC 2020

Modified Files:
src/sys/arch/arm/arm32: pmap.c

Log Message:
Use howmany().  NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.414 -r1.415 src/sys/arch/arm/arm32/pmap.c

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



CVS commit: src/tests/lib/libpthread

2020-06-21 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Jun 21 07:06:05 UTC 2020

Modified Files:
src/tests/lib/libpthread: Makefile

Log Message:
fix build of h_thread_local_dtor.cpp


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libpthread/Makefile

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

Modified files:

Index: src/tests/lib/libpthread/Makefile
diff -u src/tests/lib/libpthread/Makefile:1.14 src/tests/lib/libpthread/Makefile:1.15
--- src/tests/lib/libpthread/Makefile:1.14	Wed Apr 24 11:43:19 2019
+++ src/tests/lib/libpthread/Makefile	Sun Jun 21 07:06:05 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.14 2019/04/24 11:43:19 kamil Exp $
+# $NetBSD: Makefile,v 1.15 2020/06/21 07:06:05 lukem Exp $
 
 NOMAN=		# defined
 
@@ -55,6 +55,7 @@ TESTS_C+=	t_call_once t_cnd t_mtx t_thrd
 COPTS.h_thread_local_dtor.cpp+=	-std=c++11
 # Deal with questionable warning and header quality in libstdc++.
 COPTS.h_thread_local_dtor.cpp+=	 ${${ACTIVE_CC} == "gcc" :?  -Wno-ctor-dtor-privacy -Wno-sign-compare -Wno-shadow :}
+SRCS.h_thread_local_dtor= h_thread_local_dtor.cpp
 
 FILESDIR=	${TESTSDIR}
 FILES=		d_mach



CVS commit: src/tests/lib/libpthread

2020-06-21 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Jun 21 07:06:05 UTC 2020

Modified Files:
src/tests/lib/libpthread: Makefile

Log Message:
fix build of h_thread_local_dtor.cpp


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/tests/lib/libpthread/Makefile

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



CVS commit: src/tests/lib/libm

2020-06-21 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Jun 21 06:58:16 UTC 2020

Modified Files:
src/tests/lib/libm: Makefile

Log Message:
fix build of t_cabsl from t_cabsl.cxx

t_cabsl source is in t_cabsl.cxx not t_cabsl.cc - the latter
is what bsd.tests.mk defaults to.

This only broke after my commit of share/mk/bsd.dep.mk rev 1.85
but I don't know why it didn't cause a problem previously.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/tests/lib/libm/Makefile

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

Modified files:

Index: src/tests/lib/libm/Makefile
diff -u src/tests/lib/libm/Makefile:1.46 src/tests/lib/libm/Makefile:1.47
--- src/tests/lib/libm/Makefile:1.46	Fri Apr 26 08:52:16 2019
+++ src/tests/lib/libm/Makefile	Sun Jun 21 06:58:16 2020
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.46 2019/04/26 08:52:16 maya Exp $
+# $NetBSD: Makefile,v 1.47 2020/06/21 06:58:16 lukem Exp $
 
 .include 
 
@@ -46,6 +46,8 @@ TESTS_C+=	t_tan
 TESTS_C+=	t_tanh
 TESTS_CXX+=	t_cabsl
 
+SRCS.t_cabsl=	t_cabsl.cxx
+
 LDADD+=		-lm
 #COPTS+=	-Wfloat-equal
 



CVS commit: src/tests/lib/libm

2020-06-21 Thread Luke Mewburn
Module Name:src
Committed By:   lukem
Date:   Sun Jun 21 06:58:16 UTC 2020

Modified Files:
src/tests/lib/libm: Makefile

Log Message:
fix build of t_cabsl from t_cabsl.cxx

t_cabsl source is in t_cabsl.cxx not t_cabsl.cc - the latter
is what bsd.tests.mk defaults to.

This only broke after my commit of share/mk/bsd.dep.mk rev 1.85
but I don't know why it didn't cause a problem previously.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/tests/lib/libm/Makefile

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