CVS commit: src/sys/arch

2021-02-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Feb 27 02:52:49 UTC 2021

Modified Files:
src/sys/arch/macppc/include: autoconf.h
src/sys/arch/macppc/macppc: machdep.c
src/sys/arch/ofppc/include: autoconf.h
src/sys/arch/ofppc/ofppc: machdep.c
src/sys/arch/powerpc/include: ofw_bus.h ofw_bus_funcs.h
src/sys/arch/powerpc/oea: ofwoea_machdep.c

Log Message:
Un-do a bunch of misguided code sharing.  It's not really shared if it's
full of platform-specific #ifdefs:
- ofwoea_batinit() is gone; just do what's needed early in macppc / ofppc
  initppc() functions.
- Get a bunch of Mac-specific stuff out of ofwoea_initppc().


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/macppc/include/autoconf.h
cvs rdiff -u -r1.172 -r1.173 src/sys/arch/macppc/macppc/machdep.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/ofppc/include/autoconf.h
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/ofppc/ofppc/machdep.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/powerpc/include/ofw_bus.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/powerpc/include/ofw_bus_funcs.h
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/powerpc/oea/ofwoea_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/macppc/include/autoconf.h
diff -u src/sys/arch/macppc/include/autoconf.h:1.21 src/sys/arch/macppc/include/autoconf.h:1.22
--- src/sys/arch/macppc/include/autoconf.h:1.21	Fri Feb 12 23:38:17 2021
+++ src/sys/arch/macppc/include/autoconf.h	Sat Feb 27 02:52:48 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.h,v 1.21 2021/02/12 23:38:17 thorpej Exp $	*/
+/*	$NetBSD: autoconf.h,v 1.22 2021/02/27 02:52:48 thorpej Exp $	*/
 
 /*-
  * Copyright (C) 1998	Internet Research Institute, Inc.
@@ -62,7 +62,6 @@ void identifycpu(char *);
 
 /* these are in machdep.c */
 void initppc(u_int, u_int, char *);
-void model_init(void);
 paddr_t kvtop(void *);
 void dumpsys(void);
 void copy_disp_props(device_t, int, prop_dictionary_t);

Index: src/sys/arch/macppc/macppc/machdep.c
diff -u src/sys/arch/macppc/macppc/machdep.c:1.172 src/sys/arch/macppc/macppc/machdep.c:1.173
--- src/sys/arch/macppc/macppc/machdep.c:1.172	Tue Jan 26 14:49:41 2021
+++ src/sys/arch/macppc/macppc/machdep.c	Sat Feb 27 02:52:48 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.172 2021/01/26 14:49:41 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.173 2021/02/27 02:52:48 thorpej Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,13 +32,14 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.172 2021/01/26 14:49:41 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.173 2021/02/27 02:52:48 thorpej Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
 #include "opt_altivec.h"
 #include "opt_multiprocessor.h"
+#include "opt_ppcarch.h"
 #include "adb.h"
 #include "zsc.h"
 
@@ -78,6 +79,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 
 #include 
 #include 
 #include 
+#include 
 #include 
 #ifdef ALTIVEC
 #include 
@@ -124,13 +126,53 @@ static int of_upd_brightness(void *, int
 void
 initppc(u_int startkernel, u_int endkernel, char *args)
 {
-	ofwoea_initppc(startkernel, endkernel, args);
-}
+	int node, l;
 
-/* perform model-specific actions at initppc() */
-void
-model_init(void)
-{
+	node = OF_finddevice("/");
+	if (node != -1) {
+		l = OF_getprop(node, "model", model_name, sizeof(model_name));
+		if (l == -1) {
+			OF_getprop(node, "name", model_name,
+			sizeof(model_name));
+		}
+	}
+
+	ofw_quiesce = strncmp(model_name, "PowerMac11,2", 12) == 0 ||
+		  strncmp(model_name, "PowerMac12,1", 12) == 0;
+
+	/* switch CPUs to full speed */
+	if  (strncmp(model_name, "PowerMac7,", 10) == 0) {
+		int clock_ih = OF_open("/u3/i2c/i2c-hwclock");
+		if (clock_ih != 0) {
+			OF_call_method_1("slew-high", clock_ih, 0);
+		}
+	}
+
+	/*
+	 * Initialize BAT mappings for our I/O regions.  Note,
+	 * on the 601, we use segment mappings under the covers.
+	 */
+#ifdef PPC_OEA601
+	if ((mfpvr() >> 16 ) == MPC601) {
+		oea_batinit(
+		0x8000, BAT_BL_256M,
+		0x9000, BAT_BL_256M,
+		0xa000, BAT_BL_256M,
+		0xb000, BAT_BL_256M,
+		0xf000, BAT_BL_256M,
+		0);
+	} else
+#endif /* PPC_OEA601 */
+	{
+		oea_batinit(
+		0x8000, BAT_BL_1G,
+		0xf000, BAT_BL_128M,
+		0xf800, BAT_BL_64M,
+		0xfe00, BAT_BL_8M,	/* Grackle IO */
+		0);
+	}
+
+	ofwoea_initppc(startkernel, endkernel, args);
 }
 
 void

Index: src/sys/arch/ofppc/include/autoconf.h
diff -u src/sys/arch/ofppc/include/autoconf.h:1.17 src/sys/arch/ofppc/include/autoconf.h:1.18
--- src/sys/arch/ofppc/include/autoconf.h:1.17	Tue Jul  7 02:33:54 2020
+++ src/sys/arch/ofppc/include/autoconf.h	Sat Feb 27 02:52:48 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.h,v 1.17 2020/07/07 02:33:54 rin Exp $	*/
+/*	$NetBSD: autoconf.h,v 1.18 2021/02/27 02:52:48 thorpej Exp $	*/
 
 #ifndef 

CVS commit: src/sys/arch

2021-02-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Feb 27 01:31:24 UTC 2021

Modified Files:
src/sys/arch/bebox/bebox: machdep.c
src/sys/arch/ibmnws/ibmnws: machdep.c
src/sys/arch/mvmeppc/mvmeppc: machdep.c
src/sys/arch/powerpc/include: prep_bus.h prep_bus_funcs.h
src/sys/arch/powerpc/oea: prep_machdep.c
src/sys/arch/prep/prep: machdep.c

Log Message:
Don't put #ifdefs in prep_initppc().  Instead, let callers specify the
additional BAT-mapped regions they care about.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/arch/bebox/bebox/machdep.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/ibmnws/ibmnws/machdep.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/mvmeppc/mvmeppc/machdep.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/include/prep_bus.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/powerpc/include/prep_bus_funcs.h
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/powerpc/oea/prep_machdep.c
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/prep/prep/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/bebox/bebox/machdep.c
diff -u src/sys/arch/bebox/bebox/machdep.c:1.108 src/sys/arch/bebox/bebox/machdep.c:1.109
--- src/sys/arch/bebox/bebox/machdep.c:1.108	Sun Jul 15 05:16:41 2018
+++ src/sys/arch/bebox/bebox/machdep.c	Sat Feb 27 01:31:24 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.108 2018/07/15 05:16:41 maxv Exp $	*/
+/*	$NetBSD: machdep.c,v 1.109 2021/02/27 01:31:24 thorpej Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.108 2018/07/15 05:16:41 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.109 2021/02/27 01:31:24 thorpej Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_ddb.h"
@@ -56,6 +56,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 
 #include 
 #include 
 
+#include 
 #include  
 #include 
 #include 
@@ -140,7 +141,10 @@ initppc(u_long startkernel, u_long endke
 		ns_per_tick = 10 / ticks_per_sec;
 	}
 
-	prep_initppc(startkernel, endkernel, args);
+	prep_initppc(startkernel, endkernel, args,
+	/* BeBox mainboard registers */
+	0x7000, BAT_BL_8M,		/* XXX magic number */
+	0);
 }
 
 /*

Index: src/sys/arch/ibmnws/ibmnws/machdep.c
diff -u src/sys/arch/ibmnws/ibmnws/machdep.c:1.17 src/sys/arch/ibmnws/ibmnws/machdep.c:1.18
--- src/sys/arch/ibmnws/ibmnws/machdep.c:1.17	Sat Jul 28 23:11:00 2012
+++ src/sys/arch/ibmnws/ibmnws/machdep.c	Sat Feb 27 01:31:24 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.17 2012/07/28 23:11:00 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.18 2021/02/27 01:31:24 thorpej Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.17 2012/07/28 23:11:00 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.18 2021/02/27 01:31:24 thorpej Exp $");
 
 #include "opt_compat_netbsd.h"
 
@@ -149,7 +149,7 @@ initppc(u_long startkernel, u_long endke
 	 */
 	boothowto = 0;		/* XXX - should make this an option */
 
-	prep_initppc(startkernel, endkernel, args);
+	prep_initppc(startkernel, endkernel, args, 0);
 }
 
 /*

Index: src/sys/arch/mvmeppc/mvmeppc/machdep.c
diff -u src/sys/arch/mvmeppc/mvmeppc/machdep.c:1.31 src/sys/arch/mvmeppc/mvmeppc/machdep.c:1.32
--- src/sys/arch/mvmeppc/mvmeppc/machdep.c:1.31	Wed Mar 26 17:44:36 2014
+++ src/sys/arch/mvmeppc/mvmeppc/machdep.c	Sat Feb 27 01:31:24 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.31 2014/03/26 17:44:36 christos Exp $	*/
+/*	$NetBSD: machdep.c,v 1.32 2021/02/27 01:31:24 thorpej Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.31 2014/03/26 17:44:36 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.32 2021/02/27 01:31:24 thorpej Exp $");
 
 #include "opt_compat_netbsd.h"
 #include "opt_mvmetype.h"
@@ -148,7 +148,7 @@ initppc(u_long startkernel, u_long endke
 		ns_per_tick = 10 / ticks_per_sec;
 	}
 
-	prep_initppc(startkernel, endkernel, boothowto);
+	prep_initppc(startkernel, endkernel, boothowto, 0);
 
 	(*platform->pic_setup)();
 }

Index: src/sys/arch/powerpc/include/prep_bus.h
diff -u src/sys/arch/powerpc/include/prep_bus.h:1.3 src/sys/arch/powerpc/include/prep_bus.h:1.4
--- src/sys/arch/powerpc/include/prep_bus.h:1.3	Mon Apr 28 20:23:32 2008
+++ src/sys/arch/powerpc/include/prep_bus.h	Sat Feb 27 01:31:23 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: prep_bus.h,v 1.3 2008/04/28 20:23:32 martin Exp $ */
+/* $NetBSD: prep_bus.h,v 1.4 2021/02/27 01:31:23 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -57,7 +57,7 @@ extern struct powerpc_bus_space genppc_i
 #include 
 
 void prep_bus_space_init(void);
-void prep_initppc(u_long, u_long, u_int);
+void prep_initppc(u_long, u_long, u_int, paddr_t, ...);
 void mem_regions(struct 

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

2021-02-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Feb 27 01:22:18 UTC 2021

Modified Files:
src/sys/arch/powerpc/oea: ofwoea_machdep.c

Log Message:
In ofwoea_initppc(), call oea_init() after getting the bootpath, etc.
Also, add a comment explaining why it's actually necessary to clear
PSL_IP after installing the kernel's exception vectors.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/powerpc/oea/ofwoea_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/oea/ofwoea_machdep.c
diff -u src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.54 src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.55
--- src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.54	Wed Feb 24 16:53:00 2021
+++ src/sys/arch/powerpc/oea/ofwoea_machdep.c	Sat Feb 27 01:22:18 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ofwoea_machdep.c,v 1.54 2021/02/24 16:53:00 thorpej Exp $ */
+/* $NetBSD: ofwoea_machdep.c,v 1.55 2021/02/27 01:22:18 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.54 2021/02/24 16:53:00 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.55 2021/02/27 01:22:18 thorpej Exp $");
 
 #include "ksyms.h"
 #include "wsdisplay.h"
@@ -215,15 +215,6 @@ ofwoea_initppc(u_int startkernel, u_int 
 	}
 #endif
 
-	oea_init(pic_ext_intr);
-
-/*
- * XXX
- * we need to do this here instead of earlier on in ofwinit() for some reason
- * At least some versions of Apple OF 2.0.1 hang if we do this earlier
- */ 
-	ofwmsr &= ~PSL_IP;
-
 	/* Parse the args string */
 	if (args) {
 		strcpy(bootpath, args);
@@ -243,6 +234,15 @@ ofwoea_initppc(u_int startkernel, u_int 
 			bootpath[len] = 0;
 	}
 
+	oea_init(pic_ext_intr);
+
+	/*
+	 * Now that we've installed our own exception vectors,
+	 * ensure that exceptions that happen while running
+	 * firmware code fall into ours.
+	 */
+	ofwmsr &= ~PSL_IP;
+
 	uvm_md_init();
 
 	pmap_bootstrap(startkernel, endkernel);



CVS commit: src/sys/arch/powerpc

2021-02-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Feb 27 01:16:52 UTC 2021

Modified Files:
src/sys/arch/powerpc/include/oea: sr_601.h
src/sys/arch/powerpc/oea: oea_machdep.c

Log Message:
Rather than putting it on the caller, just let oea_iobat_add() decide
whether to call mpc601_ioseg_add().


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/include/oea/sr_601.h
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/powerpc/oea/oea_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/oea/sr_601.h
diff -u src/sys/arch/powerpc/include/oea/sr_601.h:1.5 src/sys/arch/powerpc/include/oea/sr_601.h:1.6
--- src/sys/arch/powerpc/include/oea/sr_601.h:1.5	Mon Apr 28 20:23:32 2008
+++ src/sys/arch/powerpc/include/oea/sr_601.h	Sat Feb 27 01:16:52 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: sr_601.h,v 1.5 2008/04/28 20:23:32 martin Exp $	*/
+/*	$NetBSD: sr_601.h,v 1.6 2021/02/27 01:16:52 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2002, 2004 The NetBSD Foundation, Inc.
@@ -64,8 +64,4 @@
 #define	SR601_PA_MATCH_P(sr, pa) \
 	 (((sr) & SR601_PACKET1) == ((pa) >> ADDR_SR_SHFT))
 
-#ifdef _KERNEL
-void mpc601_ioseg_add(paddr_t, register_t);
-#endif
-
 #endif /* !_POWERPC_OEA_SR_601_H_ */

Index: src/sys/arch/powerpc/oea/oea_machdep.c
diff -u src/sys/arch/powerpc/oea/oea_machdep.c:1.81 src/sys/arch/powerpc/oea/oea_machdep.c:1.82
--- src/sys/arch/powerpc/oea/oea_machdep.c:1.81	Mon Jul  6 10:34:23 2020
+++ src/sys/arch/powerpc/oea/oea_machdep.c	Sat Feb 27 01:16:52 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: oea_machdep.c,v 1.81 2020/07/06 10:34:23 rin Exp $	*/
+/*	$NetBSD: oea_machdep.c,v 1.82 2021/02/27 01:16:52 thorpej Exp $	*/
 
 /*
  * Copyright (C) 2002 Matt Thomas
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.81 2020/07/06 10:34:23 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: oea_machdep.c,v 1.82 2021/02/27 01:16:52 thorpej Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_altivec.h"
@@ -480,7 +480,7 @@ oea_init(void (*handler)(void))
 }
 
 #ifdef PPC_OEA601
-void
+static void
 mpc601_ioseg_add(paddr_t pa, register_t len)
 {
 	const u_int i = pa >> ADDR_SR_SHFT;
@@ -531,6 +531,14 @@ oea_iobat_add(paddr_t pa, register_t len
 
 	KASSERT(len >= BAT_BL_8M);
 
+#ifdef PPC_OEA601
+	if (mfpvr() >> 16 == MPC601) {
+		/* Use I/O segments on the BAT-starved 601. */
+		mpc601_ioseg_add(pa, len);
+		return;
+	}
+#endif /* PPC_OEA601 */
+
 	/*
 	 * If the caller wanted a bigger BAT than the hardware supports,
 	 * split it into smaller BATs.
@@ -778,29 +786,15 @@ oea_batinit(paddr_t pa, ...)
 	 * registers were cleared above.
 	 */
 
-	va_start(ap, pa);
-
 	/*
 	 * Add any I/O BATs specificed;
-	 * use I/O segments on the BAT-starved 601.
 	 */
-#ifdef PPC_OEA601
-	if (cpuvers == MPC601) {
-		while (pa != 0) {
-			register_t len = va_arg(ap, register_t);
-			mpc601_ioseg_add(pa, len);
-			pa = va_arg(ap, paddr_t);
-		}
-	} else
-#endif
-	{
-		while (pa != 0) {
-			register_t len = va_arg(ap, register_t);
-			oea_iobat_add(pa, len);
-			pa = va_arg(ap, paddr_t);
-		}
+	va_start(ap, pa);
+	while (pa != 0) {
+		register_t len = va_arg(ap, register_t);
+		oea_iobat_add(pa, len);
+		pa = va_arg(ap, paddr_t);
 	}
-
 	va_end(ap);
 
 	/*



CVS commit: src/sys/arch/powerpc

2021-02-26 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Feb 26 21:15:20 UTC 2021

Modified Files:
src/sys/arch/powerpc/include/oea: cpufeat.h
src/sys/arch/powerpc/oea: cpu_subr.c

Log Message:
Split cpu_model_init() into cpu_features_probe() and cpu_features_enable()
so that early bootstrap can do those two steps independently, if needed.

Continue to provide a cpu_model_init() wrapper for now.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/powerpc/include/oea/cpufeat.h
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/powerpc/oea/cpu_subr.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/oea/cpufeat.h
diff -u src/sys/arch/powerpc/include/oea/cpufeat.h:1.5 src/sys/arch/powerpc/include/oea/cpufeat.h:1.6
--- src/sys/arch/powerpc/include/oea/cpufeat.h:1.5	Thu Mar 22 21:26:27 2018
+++ src/sys/arch/powerpc/include/oea/cpufeat.h	Fri Feb 26 21:15:20 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: cpufeat.h,v 1.5 2018/03/22 21:26:27 macallan Exp $ */
+/* $NetBSD: cpufeat.h,v 1.6 2021/02/26 21:15:20 thorpej Exp $ */
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -30,7 +30,8 @@
 
 #ifndef _POWERPC_OEA_OEAFEAT_H_
 
-/* Cpu features for OEA Cpus.
+/*
+ * Cpu features for OEA Cpus.
  * These are only features that affect early bootstrap, and decisions
  * that need to be made very early on, like what pmap to use, if bats are
  * available, etc etc.  More can be added later. Some are not yet utilized.
@@ -48,7 +49,9 @@
 #define OEACPU_XBSEN		(1 << 7)	/* BATS > 256MB */
 
 #ifdef _KERNEL
-void cpu_model_init(void);
+void	cpu_features_probe(void);
+void	cpu_features_enable(void);
+void	cpu_model_init(void);
 extern unsigned long oeacpufeat;
 
 #define oea_mapiodev(addr, size) ((oeacpufeat & OEACPU_NOBAT) ? \

Index: src/sys/arch/powerpc/oea/cpu_subr.c
diff -u src/sys/arch/powerpc/oea/cpu_subr.c:1.106 src/sys/arch/powerpc/oea/cpu_subr.c:1.107
--- src/sys/arch/powerpc/oea/cpu_subr.c:1.106	Fri Feb 26 02:18:57 2021
+++ src/sys/arch/powerpc/oea/cpu_subr.c	Fri Feb 26 21:15:20 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu_subr.c,v 1.106 2021/02/26 02:18:57 thorpej Exp $	*/
+/*	$NetBSD: cpu_subr.c,v 1.107 2021/02/26 21:15:20 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2001 Matt Thomas.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.106 2021/02/26 02:18:57 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_subr.c,v 1.107 2021/02/26 21:15:20 thorpej Exp $");
 
 #include "sysmon_envsys.h"
 
@@ -267,20 +267,22 @@ register_t cpu_pslusermask = 0x;
 
 unsigned long oeacpufeat;
 
-/* This is to be called from locore.S, and nowhere else. */
-
 void
-cpu_model_init(void)
+cpu_features_probe(void)
 {
+	static bool feature_probe_done;
+
 	u_int pvr, vers;
 
+	if (feature_probe_done) {
+		return;
+	}
+
 	pvr = mfpvr();
 	vers = pvr >> 16;
 
-	oeacpufeat = 0;
-
 	if ((vers >= IBMRS64II && vers <= IBM970GX) || vers == MPC620 ||
-		vers == IBMCELL || vers == IBMPOWER6P5) {
+	vers == IBMCELL || vers == IBMPOWER6P5) {
 		oeacpufeat |= OEACPU_64;
 		oeacpufeat |= OEACPU_64_BRIDGE;
 		oeacpufeat |= OEACPU_NOBAT;
@@ -289,22 +291,53 @@ cpu_model_init(void)
 		oeacpufeat |= OEACPU_601;
 
 	} else if (MPC745X_P(vers)) {
-		register_t hid1 = mfspr(SPR_HID1);
-
 		if (vers != MPC7450) {
-			register_t hid0 = mfspr(SPR_HID0);
-
 			/* Enable more SPRG registers */
 			oeacpufeat |= OEACPU_HIGHSPRG;
 
 			/* Enable more BAT registers */
 			oeacpufeat |= OEACPU_HIGHBAT;
-			hid0 |= HID0_HIGH_BAT_EN;
 
 			/* Enable larger BAT registers */
 			oeacpufeat |= OEACPU_XBSEN;
+		}
+
+	} else if (vers == IBM750FX || vers == IBM750GX) {
+		oeacpufeat |= OEACPU_HIGHBAT;
+	}
+
+	feature_probe_done = true;
+}
+
+void
+cpu_features_enable(void)
+{
+	static bool feature_enable_done;
+
+	if (feature_enable_done) {
+		return;
+	}
+
+	u_int pvr, vers;
+
+	pvr = mfpvr();
+	vers = pvr >> 16;
+
+	if (MPC745X_P(vers)) {
+		register_t hid0 = mfspr(SPR_HID0);
+		register_t hid1 = mfspr(SPR_HID1);
+
+		const register_t ohid0 = hid0;
+
+		if (oeacpufeat & OEACPU_HIGHBAT) {
+			hid0 |= HID0_HIGH_BAT_EN;
+		}
+
+		if (oeacpufeat & OEACPU_XBSEN) {
 			hid0 |= HID0_XBSEN;
+		}
 
+		if (hid0 != ohid0) {
 			mtspr(SPR_HID0, hid0);
 			__asm volatile("sync;isync");
 		}
@@ -314,10 +347,22 @@ cpu_model_init(void)
 
 		mtspr(SPR_HID1, hid1);
 		__asm volatile("sync;isync");
-
-	} else if (vers == IBM750FX || vers == IBM750GX) {
-		oeacpufeat |= OEACPU_HIGHBAT;
 	}
+
+	feature_enable_done = true;
+}
+
+/* This is to be called from locore.S, and nowhere else. */
+
+void
+cpu_model_init(void)
+{
+	/*
+	 * This is just a wrapper for backwards-compatibility, and will
+	 * probably be garbage-collected in the near future.
+	 */
+	cpu_features_probe();
+	cpu_features_enable();
 }
 
 void



CVS commit: src/lib/libc/stdlib

2021-02-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 26 19:25:12 UTC 2021

Modified Files:
src/lib/libc/stdlib: reallocarray.c

Log Message:
arrange for tools build


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/lib/libc/stdlib/reallocarray.c

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

Modified files:

Index: src/lib/libc/stdlib/reallocarray.c
diff -u src/lib/libc/stdlib/reallocarray.c:1.10 src/lib/libc/stdlib/reallocarray.c:1.11
--- src/lib/libc/stdlib/reallocarray.c:1.10	Thu Jan  4 15:57:29 2018
+++ src/lib/libc/stdlib/reallocarray.c	Fri Feb 26 14:25:12 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: reallocarray.c,v 1.10 2018/01/04 20:57:29 kamil Exp $	*/
+/*	$NetBSD: reallocarray.c,v 1.11 2021/02/26 19:25:12 christos Exp $	*/
 /*	$OpenBSD: reallocarray.c,v 1.1 2014/05/08 21:43:49 deraadt Exp $	*/
 
 /*-
@@ -30,8 +30,12 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
+#ifdef HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif /* HAVE_NBTOOL_CONFIG_H */
+
 #include 
-__RCSID("$NetBSD: reallocarray.c,v 1.10 2018/01/04 20:57:29 kamil Exp $");
+__RCSID("$NetBSD: reallocarray.c,v 1.11 2021/02/26 19:25:12 christos Exp $");
 
 #include "namespace.h"
 



CVS commit: src/lib/libc/regex

2021-02-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Feb 26 19:24:48 UTC 2021

Modified Files:
src/lib/libc/regex: regcomp.c regerror.c regexec.c regfree.c

Log Message:
Arrange for tools build


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/lib/libc/regex/regcomp.c
cvs rdiff -u -r1.24 -r1.25 src/lib/libc/regex/regerror.c
cvs rdiff -u -r1.25 -r1.26 src/lib/libc/regex/regexec.c
cvs rdiff -u -r1.18 -r1.19 src/lib/libc/regex/regfree.c

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

Modified files:

Index: src/lib/libc/regex/regcomp.c
diff -u src/lib/libc/regex/regcomp.c:1.44 src/lib/libc/regex/regcomp.c:1.45
--- src/lib/libc/regex/regcomp.c:1.44	Thu Feb 25 16:59:27 2021
+++ src/lib/libc/regex/regcomp.c	Fri Feb 26 14:24:47 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: regcomp.c,v 1.44 2021/02/25 21:59:27 christos Exp $	*/
+/*	$NetBSD: regcomp.c,v 1.45 2021/02/26 19:24:47 christos Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-3-Clause
@@ -42,12 +42,16 @@
  *	@(#)regcomp.c	8.5 (Berkeley) 3/20/94
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include 
 #if 0
 static char sccsid[] = "@(#)regcomp.c	8.5 (Berkeley) 3/20/94";
 __FBSDID("$FreeBSD: head/lib/libc/regex/regcomp.c 368359 2020-12-05 03:18:48Z kevans $");
 #endif
-__RCSID("$NetBSD: regcomp.c,v 1.44 2021/02/25 21:59:27 christos Exp $");
+__RCSID("$NetBSD: regcomp.c,v 1.45 2021/02/26 19:24:47 christos Exp $");
 
 #define _OPENBSD_SOURCE
 

Index: src/lib/libc/regex/regerror.c
diff -u src/lib/libc/regex/regerror.c:1.24 src/lib/libc/regex/regerror.c:1.25
--- src/lib/libc/regex/regerror.c:1.24	Tue Feb 23 17:14:59 2021
+++ src/lib/libc/regex/regerror.c	Fri Feb 26 14:24:47 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: regerror.c,v 1.24 2021/02/23 22:14:59 christos Exp $	*/
+/*	$NetBSD: regerror.c,v 1.25 2021/02/26 19:24:47 christos Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-3-Clause
@@ -37,12 +37,16 @@
  *	@(#)regerror.c	8.4 (Berkeley) 3/20/94
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include 
 #if 0
 static char sccsid[] = "@(#)regerror.c	8.4 (Berkeley) 3/20/94";
 __FBSDID("$FreeBSD: head/lib/libc/regex/regerror.c 326025 2017-11-20 19:49:47Z pfg $");
 #endif
-__RCSID("$NetBSD: regerror.c,v 1.24 2021/02/23 22:14:59 christos Exp $");
+__RCSID("$NetBSD: regerror.c,v 1.25 2021/02/26 19:24:47 christos Exp $");
 
 #include "namespace.h"
 #include 

Index: src/lib/libc/regex/regexec.c
diff -u src/lib/libc/regex/regexec.c:1.25 src/lib/libc/regex/regexec.c:1.26
--- src/lib/libc/regex/regexec.c:1.25	Thu Feb 25 16:28:40 2021
+++ src/lib/libc/regex/regexec.c	Fri Feb 26 14:24:47 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: regexec.c,v 1.25 2021/02/25 21:28:40 christos Exp $	*/
+/*	$NetBSD: regexec.c,v 1.26 2021/02/26 19:24:47 christos Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-3-Clause
@@ -37,12 +37,16 @@
  *	@(#)regexec.c	8.3 (Berkeley) 3/20/94
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include 
 #if 0
 static char sccsid[] = "@(#)regexec.c	8.3 (Berkeley) 3/20/94";
 __FBSDID("$FreeBSD: head/lib/libc/regex/regexec.c 326025 2017-11-20 19:49:47Z pfg $");
 #endif
-__RCSID("$NetBSD: regexec.c,v 1.25 2021/02/25 21:28:40 christos Exp $");
+__RCSID("$NetBSD: regexec.c,v 1.26 2021/02/26 19:24:47 christos Exp $");
 
 /*
  * the outer shell of regexec()

Index: src/lib/libc/regex/regfree.c
diff -u src/lib/libc/regex/regfree.c:1.18 src/lib/libc/regex/regfree.c:1.19
--- src/lib/libc/regex/regfree.c:1.18	Thu Feb 25 16:28:40 2021
+++ src/lib/libc/regex/regfree.c	Fri Feb 26 14:24:47 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: regfree.c,v 1.18 2021/02/25 21:28:40 christos Exp $	*/
+/*	$NetBSD: regfree.c,v 1.19 2021/02/26 19:24:47 christos Exp $	*/
 
 /*-
  * SPDX-License-Identifier: BSD-3-Clause
@@ -37,12 +37,16 @@
  *	@(#)regfree.c	8.3 (Berkeley) 3/20/94
  */
 
+#if HAVE_NBTOOL_CONFIG_H
+#include "nbtool_config.h"
+#endif
+
 #include 
 #if 0
 static char sccsid[] = "@(#)regfree.c	8.3 (Berkeley) 3/20/94";
 __FBSDID("$FreeBSD: head/lib/libc/regex/regfree.c 326025 2017-11-20 19:49:47Z pfg $");
 #endif
-__RCSID("$NetBSD: regfree.c,v 1.18 2021/02/25 21:28:40 christos Exp $");
+__RCSID("$NetBSD: regfree.c,v 1.19 2021/02/26 19:24:47 christos Exp $");
 
 #include "namespace.h"
 #include 



CVS commit: src/etc/mtree

2021-02-26 Thread Jonathan A. Kollasch
Module Name:src
Committed By:   jakllsch
Date:   Fri Feb 26 18:39:10 UTC 2021

Modified Files:
src/etc/mtree: special

Log Message:
Add /etc/ip6addrctl.conf as optional file so it is backed up.


To generate a diff of this commit:
cvs rdiff -u -r1.170 -r1.171 src/etc/mtree/special

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/special
diff -u src/etc/mtree/special:1.170 src/etc/mtree/special:1.171
--- src/etc/mtree/special:1.170	Sun Jun 28 03:05:59 2020
+++ src/etc/mtree/special	Fri Feb 26 18:39:10 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: special,v 1.170 2020/06/28 03:05:59 kim Exp $
+#	$NetBSD: special,v 1.171 2021/02/26 18:39:10 jakllsch Exp $
 #	@(#)special	8.2 (Berkeley) 1/23/94
 #
 # This file may be overwritten on upgrades.
@@ -92,6 +92,7 @@
 ./etc/hosts.lpd			type=file mode=0644 optional
 ./etc/ifaliases			type=file mode=0644 optional
 ./etc/inetd.conf		type=file mode=0644
+./etc/ip6addrctl.conf		type=file mode=0644 optional
 ./etc/ipf.conf			type=file mode=0644 optional
 ./etc/ipf6.conf			type=file mode=0644 optional
 ./etc/ipnat.conf		type=file mode=0644 optional



CVS commit: src/games/cgram

2021-02-26 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb 26 15:18:40 UTC 2021

Modified Files:
src/games/cgram: cgram.c

Log Message:
cgram: don't beep if the window is resized


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/games/cgram/cgram.c

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

Modified files:

Index: src/games/cgram/cgram.c
diff -u src/games/cgram/cgram.c:1.16 src/games/cgram/cgram.c:1.17
--- src/games/cgram/cgram.c:1.16	Fri Feb 26 15:15:34 2021
+++ src/games/cgram/cgram.c	Fri Feb 26 15:18:40 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: cgram.c,v 1.16 2021/02/26 15:15:34 rillig Exp $ */
+/* $NetBSD: cgram.c,v 1.17 2021/02/26 15:18:40 rillig Exp $ */
 
 /*-
  * Copyright (c) 2013, 2021 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.c,v 1.16 2021/02/26 15:15:34 rillig Exp $");
+__RCSID("$NetBSD: cgram.c,v 1.17 2021/02/26 15:18:40 rillig Exp $");
 #endif
 
 #include 
@@ -525,6 +525,8 @@ handle_key(void)
 		break;
 	case '~':
 		return false;
+	case KEY_RESIZE:
+		break;
 	default:
 		handle_char_input(ch);
 		break;



CVS commit: src/games/cgram

2021-02-26 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb 26 15:15:34 UTC 2021

Modified Files:
src/games/cgram: cgram.c

Log Message:
cgram: place the 'solved' marker nearer to the text

This way, it cannot be overlooked as easily as before.  It also doesn't
change the position of the keyboard help text anymore.  Only if there is
not enough space, the 'solved' marker is put into the bottom line.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/games/cgram/cgram.c

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

Modified files:

Index: src/games/cgram/cgram.c
diff -u src/games/cgram/cgram.c:1.15 src/games/cgram/cgram.c:1.16
--- src/games/cgram/cgram.c:1.15	Fri Feb 26 14:55:37 2021
+++ src/games/cgram/cgram.c	Fri Feb 26 15:15:34 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: cgram.c,v 1.15 2021/02/26 14:55:37 rillig Exp $ */
+/* $NetBSD: cgram.c,v 1.16 2021/02/26 15:15:34 rillig Exp $ */
 
 /*-
  * Copyright (c) 2013, 2021 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.c,v 1.15 2021/02/26 14:55:37 rillig Exp $");
+__RCSID("$NetBSD: cgram.c,v 1.16 2021/02/26 15:15:34 rillig Exp $");
 #endif
 
 #include 
@@ -342,13 +342,17 @@ redraw(void)
 	}
 
 	move(LINES - 1, 0);
+	addstr("~ to quit, * to cheat, ^pnfb to move");
+
 	if (is_solved()) {
+		if (extent_y + 1 - offset_y < LINES - 2)
+			move(extent_y + 1 - offset_y, 0);
+		else
+			addch(' ');
 		attron(A_BOLD | A_STANDOUT);
 		addstr("*solved*");
 		attroff(A_BOLD | A_STANDOUT);
-		addch(' ');
 	}
-	addstr("~ to quit, * to cheat, ^pnfb to move");
 
 	move(cursor_y - offset_y, cursor_x - offset_x);
 



CVS commit: src/games/cgram

2021-02-26 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Fri Feb 26 14:55:37 UTC 2021

Modified Files:
src/games/cgram: cgram.c

Log Message:
cgram: make the 'solved' stand out more

Suggested by Weitian LI via [1].

[1] https://github.com/NetBSD/src/commit/efec6410b2b5a736


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/games/cgram/cgram.c

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

Modified files:

Index: src/games/cgram/cgram.c
diff -u src/games/cgram/cgram.c:1.14 src/games/cgram/cgram.c:1.15
--- src/games/cgram/cgram.c:1.14	Mon Feb 22 19:34:07 2021
+++ src/games/cgram/cgram.c	Fri Feb 26 14:55:37 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: cgram.c,v 1.14 2021/02/22 19:34:07 rillig Exp $ */
+/* $NetBSD: cgram.c,v 1.15 2021/02/26 14:55:37 rillig Exp $ */
 
 /*-
  * Copyright (c) 2013, 2021 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: cgram.c,v 1.14 2021/02/22 19:34:07 rillig Exp $");
+__RCSID("$NetBSD: cgram.c,v 1.15 2021/02/26 14:55:37 rillig Exp $");
 #endif
 
 #include 
@@ -342,8 +342,12 @@ redraw(void)
 	}
 
 	move(LINES - 1, 0);
-	if (is_solved())
-		addstr("*solved* ");
+	if (is_solved()) {
+		attron(A_BOLD | A_STANDOUT);
+		addstr("*solved*");
+		attroff(A_BOLD | A_STANDOUT);
+		addch(' ');
+	}
 	addstr("~ to quit, * to cheat, ^pnfb to move");
 
 	move(cursor_y - offset_y, cursor_x - offset_x);



CVS commit: [netbsd-8] src/doc

2021-02-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Feb 26 13:33:07 UTC 2021

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

Log Message:
Ticket #1660


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.75 -r1.1.2.76 src/doc/CHANGES-8.3

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

Modified files:

Index: src/doc/CHANGES-8.3
diff -u src/doc/CHANGES-8.3:1.1.2.75 src/doc/CHANGES-8.3:1.1.2.76
--- src/doc/CHANGES-8.3:1.1.2.75	Thu Feb 25 09:39:58 2021
+++ src/doc/CHANGES-8.3	Fri Feb 26 13:33:07 2021
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-8.3,v 1.1.2.75 2021/02/25 09:39:58 martin Exp $
+# $NetBSD: CHANGES-8.3,v 1.1.2.76 2021/02/26 13:33:07 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -1744,3 +1744,10 @@ sys/arch/m68k/m68k/reenter_syscall.s		1.
 	m68k: PR 55990: fix kernel stack overflow panic
 	[tsutsui, ticket #1659]
 
+usr.bin/patch/backupfile.c			1.16
+usr.bin/patch/backupfile.h			1.7
+usr.bin/patch/patch.c1.30
+
+	patch(1): make '-V none' work.
+	[nia, ticket #1660]
+



CVS commit: [netbsd-8] src/usr.bin/patch

2021-02-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Feb 26 13:32:14 UTC 2021

Modified Files:
src/usr.bin/patch [netbsd-8]: backupfile.c backupfile.h patch.c

Log Message:
Pull up following revision(s) (requested by nia in ticket #1660):

usr.bin/patch/backupfile.c: revision 1.16
usr.bin/patch/backupfile.h: revision 1.7
usr.bin/patch/patch.c: revision 1.30

patch: make '-V none' work in the expected way

Internally the code confuses the concept of "the user doesn't want
a backup file" and "the user hasn't defined a type of backup file".

Introduce a new "undefined" backup type to serve the purpose "none"
previously did, and make "none" not generate backup files, as expected.

http://mail-index.netbsd.org/tech-userlevel/2021/02/19/msg012901.html

XXX pullup?


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.16.1 src/usr.bin/patch/backupfile.c
cvs rdiff -u -r1.6 -r1.6.52.1 src/usr.bin/patch/backupfile.h
cvs rdiff -u -r1.29 -r1.29.34.1 src/usr.bin/patch/patch.c

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

Modified files:

Index: src/usr.bin/patch/backupfile.c
diff -u src/usr.bin/patch/backupfile.c:1.15 src/usr.bin/patch/backupfile.c:1.15.16.1
--- src/usr.bin/patch/backupfile.c:1.15	Fri Apr 11 17:30:03 2014
+++ src/usr.bin/patch/backupfile.c	Fri Feb 26 13:32:14 2021
@@ -1,7 +1,7 @@
 /*
  * $OpenBSD: backupfile.c,v 1.19 2006/03/11 19:41:30 otto Exp $
  * $DragonFly: src/usr.bin/patch/backupfile.c,v 1.5 2008/08/11 00:05:06 joerg Exp $
- * $NetBSD: backupfile.c,v 1.15 2014/04/11 17:30:03 christos Exp $
+ * $NetBSD: backupfile.c,v 1.15.16.1 2021/02/26 13:32:14 martin Exp $
  */
 
 /*
@@ -22,7 +22,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: backupfile.c,v 1.15 2014/04/11 17:30:03 christos Exp $");
+__RCSID("$NetBSD: backupfile.c,v 1.15.16.1 2021/02/26 13:32:14 martin Exp $");
 
 #include 
 #include 
@@ -38,7 +38,7 @@ __RCSID("$NetBSD: backupfile.c,v 1.15 20
 #define ISDIGIT(c) (isascii ((unsigned char)c) && isdigit ((unsigned char)c))
 
 /* Which type of backup file names are generated. */
-enum backup_type backup_type = none;
+enum backup_type backup_type = undefined;
 
 /*
  * The extension added to file names to produce a simple (as opposed to

Index: src/usr.bin/patch/backupfile.h
diff -u src/usr.bin/patch/backupfile.h:1.6 src/usr.bin/patch/backupfile.h:1.6.52.1
--- src/usr.bin/patch/backupfile.h:1.6	Fri Sep 19 18:33:34 2008
+++ src/usr.bin/patch/backupfile.h	Fri Feb 26 13:32:14 2021
@@ -1,7 +1,7 @@
 /*
  * $OpenBSD: backupfile.h,v 1.6 2003/07/28 18:35:36 otto Exp $
  * $DragonFly: src/usr.bin/patch/backupfile.h,v 1.3 2007/09/29 23:11:10 swildner Exp $
- * $NetBSD: backupfile.h,v 1.6 2008/09/19 18:33:34 joerg Exp $
+ * $NetBSD: backupfile.h,v 1.6.52.1 2021/02/26 13:32:14 martin Exp $
  */
 
 /*
@@ -19,6 +19,8 @@
 
 /* When to make backup files. */
 enum backup_type {
+	undefined,
+
 	/* Never make backups. */
 	none,
 

Index: src/usr.bin/patch/patch.c
diff -u src/usr.bin/patch/patch.c:1.29 src/usr.bin/patch/patch.c:1.29.34.1
--- src/usr.bin/patch/patch.c:1.29	Tue Sep  6 18:25:14 2011
+++ src/usr.bin/patch/patch.c	Fri Feb 26 13:32:14 2021
@@ -1,7 +1,7 @@
 /*
  * $OpenBSD: patch.c,v 1.45 2007/04/18 21:52:24 sobrado Exp $
  * $DragonFly: src/usr.bin/patch/patch.c,v 1.10 2008/08/10 23:39:56 joerg Exp $
- * $NetBSD: patch.c,v 1.29 2011/09/06 18:25:14 joerg Exp $
+ * $NetBSD: patch.c,v 1.29.34.1 2021/02/26 13:32:14 martin Exp $
  */
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: patch.c,v 1.29 2011/09/06 18:25:14 joerg Exp $");
+__RCSID("$NetBSD: patch.c,v 1.29.34.1 2021/02/26 13:32:14 martin Exp $");
 
 #include 
 #include 
@@ -197,17 +197,18 @@ main(int argc, char *argv[])
 	else
 		simple_backup_suffix = ORIGEXT;
 
+	if ((v = getenv("PATCH_VERSION_CONTROL")) == NULL)
+		v = getenv("VERSION_CONTROL");
+	if (v != NULL)
+		backup_type = get_version(v);
+
 	/* parse switches */
 	Argc = argc;
 	Argv = argv;
 	get_some_switches();
 
-	if (backup_type == none) {
-		if ((v = getenv("PATCH_VERSION_CONTROL")) == NULL)
-			v = getenv("VERSION_CONTROL");
-		if (v != NULL || !posix)
-			backup_type = get_version(v);	/* OK to pass NULL. */
-	}
+	if (backup_type == undefined)
+		backup_type = posix ? none : numbered_existing;
 
 	/* make sure we clean up /tmp in case of disaster */
 	set_signals(0);
@@ -493,7 +494,7 @@ get_some_switches(void)
 	while ((ch = getopt_long(Argc, Argv, options, longopts, NULL)) != -1) {
 		switch (ch) {
 		case 'b':
-			if (backup_type == none)
+			if (backup_type == undefined)
 backup_type = numbered_existing;
 			if (optarg == NULL)
 break;



CVS commit: [netbsd-9] src/doc

2021-02-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Feb 26 13:31:21 UTC 2021

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

Log Message:
Ticket #1215


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

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

Modified files:

Index: src/doc/CHANGES-9.2
diff -u src/doc/CHANGES-9.2:1.1.2.50 src/doc/CHANGES-9.2:1.1.2.51
--- src/doc/CHANGES-9.2:1.1.2.50	Thu Feb 25 09:37:33 2021
+++ src/doc/CHANGES-9.2	Fri Feb 26 13:31:21 2021
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.2,v 1.1.2.50 2021/02/25 09:37:33 martin Exp $
+# $NetBSD: CHANGES-9.2,v 1.1.2.51 2021/02/26 13:31:21 martin Exp $
 
 A complete list of changes from the NetBSD 9.1 release to the NetBSD 9.2
 release:
@@ -1704,3 +1704,10 @@ sys/arch/m68k/m68k/reenter_syscall.s		1.
 	m68k: PR 55990: fix kernel stack overflow panic
 	[tsutsui, ticket #1214]
 
+usr.bin/patch/backupfile.c			1.16
+usr.bin/patch/backupfile.h			1.7
+usr.bin/patch/patch.c1.30
+
+	patch(1): make '-V none' work.
+	[nia, ticket #1215]
+



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

2021-02-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Feb 26 13:29:16 UTC 2021

Modified Files:
src/usr.bin/patch [netbsd-9]: backupfile.c backupfile.h patch.c

Log Message:
Pull up following revision(s) (requested by nia in ticket #1215):

usr.bin/patch/backupfile.c: revision 1.16
usr.bin/patch/backupfile.h: revision 1.7
usr.bin/patch/patch.c: revision 1.30

patch: make '-V none' work in the expected way

Internally the code confuses the concept of "the user doesn't want
a backup file" and "the user hasn't defined a type of backup file".

Introduce a new "undefined" backup type to serve the purpose "none"
previously did, and make "none" not generate backup files, as expected.

http://mail-index.netbsd.org/tech-userlevel/2021/02/19/msg012901.html

XXX pullup?


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.15.26.1 src/usr.bin/patch/backupfile.c
cvs rdiff -u -r1.6 -r1.6.62.1 src/usr.bin/patch/backupfile.h
cvs rdiff -u -r1.29 -r1.29.44.1 src/usr.bin/patch/patch.c

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

Modified files:

Index: src/usr.bin/patch/backupfile.c
diff -u src/usr.bin/patch/backupfile.c:1.15 src/usr.bin/patch/backupfile.c:1.15.26.1
--- src/usr.bin/patch/backupfile.c:1.15	Fri Apr 11 17:30:03 2014
+++ src/usr.bin/patch/backupfile.c	Fri Feb 26 13:29:16 2021
@@ -1,7 +1,7 @@
 /*
  * $OpenBSD: backupfile.c,v 1.19 2006/03/11 19:41:30 otto Exp $
  * $DragonFly: src/usr.bin/patch/backupfile.c,v 1.5 2008/08/11 00:05:06 joerg Exp $
- * $NetBSD: backupfile.c,v 1.15 2014/04/11 17:30:03 christos Exp $
+ * $NetBSD: backupfile.c,v 1.15.26.1 2021/02/26 13:29:16 martin Exp $
  */
 
 /*
@@ -22,7 +22,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: backupfile.c,v 1.15 2014/04/11 17:30:03 christos Exp $");
+__RCSID("$NetBSD: backupfile.c,v 1.15.26.1 2021/02/26 13:29:16 martin Exp $");
 
 #include 
 #include 
@@ -38,7 +38,7 @@ __RCSID("$NetBSD: backupfile.c,v 1.15 20
 #define ISDIGIT(c) (isascii ((unsigned char)c) && isdigit ((unsigned char)c))
 
 /* Which type of backup file names are generated. */
-enum backup_type backup_type = none;
+enum backup_type backup_type = undefined;
 
 /*
  * The extension added to file names to produce a simple (as opposed to

Index: src/usr.bin/patch/backupfile.h
diff -u src/usr.bin/patch/backupfile.h:1.6 src/usr.bin/patch/backupfile.h:1.6.62.1
--- src/usr.bin/patch/backupfile.h:1.6	Fri Sep 19 18:33:34 2008
+++ src/usr.bin/patch/backupfile.h	Fri Feb 26 13:29:16 2021
@@ -1,7 +1,7 @@
 /*
  * $OpenBSD: backupfile.h,v 1.6 2003/07/28 18:35:36 otto Exp $
  * $DragonFly: src/usr.bin/patch/backupfile.h,v 1.3 2007/09/29 23:11:10 swildner Exp $
- * $NetBSD: backupfile.h,v 1.6 2008/09/19 18:33:34 joerg Exp $
+ * $NetBSD: backupfile.h,v 1.6.62.1 2021/02/26 13:29:16 martin Exp $
  */
 
 /*
@@ -19,6 +19,8 @@
 
 /* When to make backup files. */
 enum backup_type {
+	undefined,
+
 	/* Never make backups. */
 	none,
 

Index: src/usr.bin/patch/patch.c
diff -u src/usr.bin/patch/patch.c:1.29 src/usr.bin/patch/patch.c:1.29.44.1
--- src/usr.bin/patch/patch.c:1.29	Tue Sep  6 18:25:14 2011
+++ src/usr.bin/patch/patch.c	Fri Feb 26 13:29:16 2021
@@ -1,7 +1,7 @@
 /*
  * $OpenBSD: patch.c,v 1.45 2007/04/18 21:52:24 sobrado Exp $
  * $DragonFly: src/usr.bin/patch/patch.c,v 1.10 2008/08/10 23:39:56 joerg Exp $
- * $NetBSD: patch.c,v 1.29 2011/09/06 18:25:14 joerg Exp $
+ * $NetBSD: patch.c,v 1.29.44.1 2021/02/26 13:29:16 martin Exp $
  */
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__RCSID("$NetBSD: patch.c,v 1.29 2011/09/06 18:25:14 joerg Exp $");
+__RCSID("$NetBSD: patch.c,v 1.29.44.1 2021/02/26 13:29:16 martin Exp $");
 
 #include 
 #include 
@@ -197,17 +197,18 @@ main(int argc, char *argv[])
 	else
 		simple_backup_suffix = ORIGEXT;
 
+	if ((v = getenv("PATCH_VERSION_CONTROL")) == NULL)
+		v = getenv("VERSION_CONTROL");
+	if (v != NULL)
+		backup_type = get_version(v);
+
 	/* parse switches */
 	Argc = argc;
 	Argv = argv;
 	get_some_switches();
 
-	if (backup_type == none) {
-		if ((v = getenv("PATCH_VERSION_CONTROL")) == NULL)
-			v = getenv("VERSION_CONTROL");
-		if (v != NULL || !posix)
-			backup_type = get_version(v);	/* OK to pass NULL. */
-	}
+	if (backup_type == undefined)
+		backup_type = posix ? none : numbered_existing;
 
 	/* make sure we clean up /tmp in case of disaster */
 	set_signals(0);
@@ -493,7 +494,7 @@ get_some_switches(void)
 	while ((ch = getopt_long(Argc, Argv, options, longopts, NULL)) != -1) {
 		switch (ch) {
 		case 'b':
-			if (backup_type == none)
+			if (backup_type == undefined)
 backup_type = numbered_existing;
 			if (optarg == NULL)
 break;



CVS commit: src/share/man/man4

2021-02-26 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Fri Feb 26 11:12:45 UTC 2021

Modified Files:
src/share/man/man4: atalk.4 isapnp.4 mca.4 tc.4

Log Message:
Remove references to removed FDDI and Token Ring drivers


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/share/man/man4/atalk.4
cvs rdiff -u -r1.24 -r1.25 src/share/man/man4/isapnp.4
cvs rdiff -u -r1.20 -r1.21 src/share/man/man4/mca.4
cvs rdiff -u -r1.7 -r1.8 src/share/man/man4/tc.4

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

Modified files:

Index: src/share/man/man4/atalk.4
diff -u src/share/man/man4/atalk.4:1.19 src/share/man/man4/atalk.4:1.20
--- src/share/man/man4/atalk.4:1.19	Mon Mar 22 18:58:31 2010
+++ src/share/man/man4/atalk.4	Fri Feb 26 11:12:45 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: atalk.4,v 1.19 2010/03/22 18:58:31 joerg Exp $
+.\"	$NetBSD: atalk.4,v 1.20 2021/02/26 11:12:45 nia Exp $
 .\"
 .\" This file is derived from the atalk.4 man page in the Netatalk 1.4b2
 .\" distribution. That distribution is covered by the following copyright:
@@ -27,7 +27,7 @@
 .\"	+1-313-764-2278
 .\"	netat...@umich.edu
 .\"
-.Dd November 14, 1997
+.Dd February 26, 2021
 .Dt ATALK 4
 .Os
 .Sh NAME
@@ -54,7 +54,7 @@ or
 ).
 Currently,
 .Nx Ns 's
-AppleTalk implementation supports Ethernet, FDDI, and Token Ring.
+AppleTalk implementation supports Ethernet.
 .Pp
 AppleTalk packets are encapsulated on the Ethernet using the EtherTalk
 Link Access Protocol (ELAP).

Index: src/share/man/man4/isapnp.4
diff -u src/share/man/man4/isapnp.4:1.24 src/share/man/man4/isapnp.4:1.25
--- src/share/man/man4/isapnp.4:1.24	Tue May 11 22:42:47 2004
+++ src/share/man/man4/isapnp.4	Fri Feb 26 11:12:45 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: isapnp.4,v 1.24 2004/05/11 22:42:47 wiz Exp $
+.\"	$NetBSD: isapnp.4,v 1.25 2021/02/26 11:12:45 nia Exp $
 .\"
 .\" Copyright (c) 1997 Jonathan Stone
 .\" All rights reserved.
@@ -28,7 +28,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd February 17, 1997
+.Dd February 26, 2021
 .Dt ISAPNP 4
 .Os
 .Sh NAME
@@ -90,8 +90,6 @@ interfaces based on the successor to the
 NE2000-compatible
 .Tn Ethernet
 interfaces.
-.It tr
-TROPIC based token ring interfaces.
 .El
 .\"
 .Ss Sound cards

Index: src/share/man/man4/mca.4
diff -u src/share/man/man4/mca.4:1.20 src/share/man/man4/mca.4:1.21
--- src/share/man/man4/mca.4:1.20	Sat Oct 13 15:28:34 2012
+++ src/share/man/man4/mca.4	Fri Feb 26 11:12:45 2021
@@ -1,4 +1,4 @@
-.\" $NetBSD: mca.4,v 1.20 2012/10/13 15:28:34 njoly Exp $
+.\" $NetBSD: mca.4,v 1.21 2021/02/26 11:12:45 nia Exp $
 .\"
 .\" Copyright (c) 2000, 2002 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -24,7 +24,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd March 3, 2005
+.Dd February 26, 2021
 .Dt MCA 4
 .Os
 .Sh NAME
@@ -79,8 +79,6 @@ NS8250-, NS16450-, and NS16550-based ser
 .\"
 .Ss Network interfaces
 .Bl -tag -width speaker -offset indent
-.It tr
-TROPIC based token ring interfaces
 .It ate
 Allied-Telesis 1720 Ethernet interface cards
 .It we

Index: src/share/man/man4/tc.4
diff -u src/share/man/man4/tc.4:1.7 src/share/man/man4/tc.4:1.8
--- src/share/man/man4/tc.4:1.7	Fri Jun 23 15:24:35 2017
+++ src/share/man/man4/tc.4	Fri Feb 26 11:12:45 2021
@@ -1,4 +1,4 @@
-.\" $NetBSD: tc.4,v 1.7 2017/06/23 15:24:35 flxd Exp $
+.\" $NetBSD: tc.4,v 1.8 2021/02/26 11:12:45 nia Exp $
 .\"
 .\" Copyright (c) 1996, 1997 Jonathan Stone.
 .\" All rights reserved.
@@ -28,7 +28,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd June 23, 2017
+.Dd February 26, 2021
 .Dt TC 4
 .Os
 .Sh NAME
@@ -72,8 +72,6 @@ PMAZ-DS, PMAZ-FS, PMAZB-AA and PMAZC-AA 
 .El
 .Ss Network interfaces
 .Bl -tag -width pcdisplay -offset indent
-.It fta
-PMAF-F DEFTA FDDI controller
 .It le
 LANCE Ethernet interface
 .El



CVS commit: src/distrib/sets/lists/man

2021-02-26 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Fri Feb 26 11:05:33 UTC 2021

Modified Files:
src/distrib/sets/lists/man: mi

Log Message:
add new evbarm device driver man pages


To generate a diff of this commit:
cvs rdiff -u -r1.1713 -r1.1714 src/distrib/sets/lists/man/mi

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/man/mi
diff -u src/distrib/sets/lists/man/mi:1.1713 src/distrib/sets/lists/man/mi:1.1714
--- src/distrib/sets/lists/man/mi:1.1713	Sun Jan 10 23:24:25 2021
+++ src/distrib/sets/lists/man/mi	Fri Feb 26 11:05:33 2021
@@ -1,4 +1,4 @@
-# $NetBSD: mi,v 1.1713 2021/01/10 23:24:25 riastradh Exp $
+# $NetBSD: mi,v 1.1714 2021/02/26 11:05:33 nia Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 #
@@ -1107,6 +1107,8 @@
 ./usr/share/man/cat4/evbarm/iopaau.0		man-sys-catman		.cat
 ./usr/share/man/cat4/evbarm/iopwdog.0		man-sys-catman		.cat
 ./usr/share/man/cat4/evbarm/rktsadc.0		man-sys-catman		.cat
+./usr/share/man/cat4/evbarm/vcaudio.0		man-sys-catman		.cat
+./usr/share/man/cat4/evbarm/vchiq.0		man-sys-catman		.cat
 ./usr/share/man/cat4/evbmips/aupci.0		man-sys-catman		.cat
 ./usr/share/man/cat4/evbmips/intro.0		man-sys-catman		.cat
 ./usr/share/man/cat4/evbppc/cpc.0		man-sys-catman		.cat
@@ -4333,6 +4335,8 @@
 ./usr/share/man/html4/evbarm/iopaau.html	man-sys-htmlman		html
 ./usr/share/man/html4/evbarm/iopwdog.html	man-sys-htmlman		html
 ./usr/share/man/html4/evbarm/rktsadc.html	man-sys-htmlman		html
+./usr/share/man/html4/evbarm/vcaudio.html	man-sys-htmlman		html
+./usr/share/man/html4/evbarm/vchiq.html		man-sys-htmlman		html
 ./usr/share/man/html4/evbmips/aupci.html	man-sys-htmlman		html
 ./usr/share/man/html4/evbmips/intro.html	man-sys-htmlman		html
 ./usr/share/man/html4/evbppc/cpc.html		man-sys-htmlman		html
@@ -7331,6 +7335,8 @@
 ./usr/share/man/man4/evbarm/iopaau.4		man-sys-man		.man
 ./usr/share/man/man4/evbarm/iopwdog.4		man-sys-man		.man
 ./usr/share/man/man4/evbarm/rktsadc.4		man-sys-man		.man
+./usr/share/man/man4/evbarm/vcaudio.4		man-sys-man		.man
+./usr/share/man/man4/evbarm/vchiq.4		man-sys-man		.man
 ./usr/share/man/man4/evbmips/aupci.4		man-sys-man		.man
 ./usr/share/man/man4/evbmips/intro.4		man-sys-man		.man
 ./usr/share/man/man4/evbppc/cpc.4		man-sys-man		.man



CVS commit: src/share/man/man4/man4.i386

2021-02-26 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Fri Feb 26 10:56:48 UTC 2021

Modified Files:
src/share/man/man4/man4.i386: intro.4

Log Message:
Remove extremely outdated list of supported devices


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/share/man/man4/man4.i386/intro.4

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

Modified files:

Index: src/share/man/man4/man4.i386/intro.4
diff -u src/share/man/man4/man4.i386/intro.4:1.31 src/share/man/man4/man4.i386/intro.4:1.32
--- src/share/man/man4/man4.i386/intro.4:1.31	Mon Jul  3 21:30:59 2017
+++ src/share/man/man4/man4.i386/intro.4	Fri Feb 26 10:56:48 2021
@@ -1,4 +1,4 @@
-.\" $NetBSD: intro.4,v 1.31 2017/07/03 21:30:59 wiz Exp $
+.\" $NetBSD: intro.4,v 1.32 2021/02/26 10:56:48 nia Exp $
 .\"
 .\" Copyright (c) 1997 Jonathan Stone
 .\" Copyright (c) 1994 Christopher G. Demetriou
@@ -33,7 +33,7 @@
 .\"
 .\" <>
 .\"
-.Dd February 17, 2017
+.Dd February 26, 2021
 .Dt INTRO 4 i386
 .Os
 .Sh NAME
@@ -164,126 +164,6 @@ console driver.
 .\"
 .\"
 .\"
-.Pp
-Disk, tape and SCSI devices:
-.Bl -tag -width speaker -offset indent -compact
-.It aha
-Adaptec 154x ISA SCSI adapter boards.
-.It ahb
-Adaptec 1742 EISA SCSI adapter boards.
-.It ahc
-Adaptec 274x, 284x, 2940 and 3940 VL/EISA/PCI SCSI adapter boards.
-.It aic
-Adaptec AIC-6260, Adaptec AIC-6360, Adaptec 152x, and SoundBlaster SCSI boards.
-.It bha
-Buslogic  BT-445 (ISA), BT-74x (EISA), and BT-9[45][68] (PCI) SCSI boards.
-.It mcd
-Mitsumi CD-ROM drives.
-.It ncr
-Symbios (formerly NCR) PCI SCSI adapter boards.
-.It pciide
-PCI IDE controllers.
-.It sea
-Seagate/Future Domain SCSI cards.
-ST01/02, Future Domain TMC-885, and Future Domain TMC-950.
-.It uha
-Ultrastor ISA and EISA SCSI adapter cards.
-Ultrastore 14f, Ultrastore 34f, and Ultrastore 24f.
-.It wdc
-Standard ISA Western Digital type hard drives controllers.
-MFM, RLL, ESDI, and IDE.
-.It wt
-Wangtek and compatible ISA controllers for QIC-02 and QIC-36 tapes.
-.El
-.\"
-.\"
-.\"
-.Pp
-Network interfaces:
-.Bl -tag -width speaker -offset indent -compact
-.It de
-Ethernet driver for dc21040, dc21042, and dc21140-based  10Mbit and 100Mbit
-PCI Ethernet adaptors, including DE-430, DE-450 DE-500, SMC EtherPower,
-and Znyx.
-.It fea, fpa
-FDDI driver for Digital DEFEA (EISA) and DEFPA FDDI adaptors.
-.It ed
-Western Digital/SMC 80x3 and Ultra, 3Com 3c503, and Novell NE1000 and 2000
-Ethernet interface
-.It eg
-3Com 3c505 Ethernet board.
-.It el
-3Com 3c501 Ethernet board.
-.It ep
-3Com EtherLink III (3c5x9) Ethernet interface
-.It ie
-Ethernet driver for the AT StarLAN 10, EN100, StarLan Fiber, and 3Com 3c507.
-.It iy
-Ethernet driver for the ISA Intel EtherExpress PR0/10  adaptor.
-.It le
-Ethernet driver for BICC Isolan, Novell NE2100,  Digital DEPCA cards,
-and PCnet-PCI cards.
-.It tl
-Ethernet driver for ThunderLAN-based Ethernet adaptor.
-.El
-.\"
-.\"
-.\"
-.Pp
-Serial communication cards:
-.Bl -tag -width speaker -offset indent -compact
-.It ast
-multiplexing serial communications card first made by AST.
-.It boca
-Boca BB100[48] and BB2016 multiplexing serial communications cards.
-NS8250-, NS16450-, and NS16550-based asynchronous serial
-communications device interface, or  internal modems that provide
-a serial-chip compatible interface.
-.It cy
-Cyclades Cyclom-4Y, -8Y, and -16Y asynchronous serial communications
-device interface
-.It rtfps
-a multiplexing serial communications card derived from IBM PC/RT hardware.
-.El
-.\"
-.\"
-.\"
-Sound cards:
-.Bl -tag -width speaker -offset indent -compact
-.It gus
-Gravis Ultrasound non-PnP soundcards.
-.It guspnp
-Gravis Ultrasound PnP soundcards.
-.It pas
-ProAudio Spectrum soundcards.
-.It pss
-Personal Sound System-compatible soundcards, including
-Cardinal Digital SoundPro 16 and Orchid Soundwave 32.
-.It sb
-Soundblaster, Soundblaster 16, and Soundblaster Pro soundcards.
-.It wss
-Windows Sound System-compatible sound cards based on the ad1848 chip.
-.El
-.\"
-.\"
-.\"
-.Pp
-Mouse and pointer devices:
-.Bl -tag -width speaker -offset indent -compact
-.It joy
-joystick game adaptor
-.It lms
-Logitech-style bus mouse device interface
-.It mms
-Microsoft-style bus mouse device interface
-.It pms
-PS/2 auxiliary port mouse device interface
-.El
-.Pp
-Serial mice can be configured on any supported serial port.
-.\"
-.\"
-.\"
 .Sh SEE ALSO
 .Xr config 1 ,
 .Xr i386/autoconf 4 ,



CVS commit: src/sys/arch/mac68k

2021-02-26 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Feb 26 10:54:13 UTC 2021

Modified Files:
src/sys/arch/mac68k/conf: GENERIC files.mac68k
src/sys/arch/mac68k/mac68k: machdep.c

Log Message:
Add MAC68K_MEMSIZE option to hard-code memory size in MB, instead of
that given by Booter. Work around Booter bug by which max memory is
restricted to 255MB.


To generate a diff of this commit:
cvs rdiff -u -r1.233 -r1.234 src/sys/arch/mac68k/conf/GENERIC
cvs rdiff -u -r1.130 -r1.131 src/sys/arch/mac68k/conf/files.mac68k
cvs rdiff -u -r1.359 -r1.360 src/sys/arch/mac68k/mac68k/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/mac68k/conf/GENERIC
diff -u src/sys/arch/mac68k/conf/GENERIC:1.233 src/sys/arch/mac68k/conf/GENERIC:1.234
--- src/sys/arch/mac68k/conf/GENERIC:1.233	Thu Jan 21 06:51:55 2021
+++ src/sys/arch/mac68k/conf/GENERIC	Fri Feb 26 10:54:12 2021
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.233 2021/01/21 06:51:55 nia Exp $
+# $NetBSD: GENERIC,v 1.234 2021/02/26 10:54:12 rin Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@ include 	"arch/mac68k/conf/std.mac68k"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		"GENERIC-$Revision: 1.233 $"
+#ident 		"GENERIC-$Revision: 1.234 $"
 
 makeoptions	COPTS="-O2 -fno-reorder-blocks -fno-omit-frame-pointer"
 	# See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for
@@ -43,6 +43,10 @@ options 	FPU_EMULATE
 # You need to set the total memory in the MacOS Booter.
 #options 	DJMEMCMAX
 
+# Use hard-coded memory size in MB, instead of parameter given by Booter.
+# Workaround for Booter bug by which max memory is restricted to 255MB.
+#options 	MAC68K_MEMSIZE=256
+
 # Standard system options
 
 options 	INSECURE	# disable kernel security levels

Index: src/sys/arch/mac68k/conf/files.mac68k
diff -u src/sys/arch/mac68k/conf/files.mac68k:1.130 src/sys/arch/mac68k/conf/files.mac68k:1.131
--- src/sys/arch/mac68k/conf/files.mac68k:1.130	Thu Aug 22 14:52:58 2019
+++ src/sys/arch/mac68k/conf/files.mac68k	Fri Feb 26 10:54:12 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: files.mac68k,v 1.130 2019/08/22 14:52:58 rin Exp $
+#	$NetBSD: files.mac68k,v 1.131 2021/02/26 10:54:12 rin Exp $
 
 # mac68k-specific configuration info
 
@@ -10,6 +10,8 @@ defflag	opt_grf_compat.h	GRF_COMPAT
 
 defflag	opt_wsdisplay_compat.h	WSDISPLAY_COMPAT_ITEFONT
 
+defparam opt_mac68k.h		MAC68K_MEMSIZE
+
 # maxpartitions must be first item in files.${ARCH}.newconf
 maxpartitions 8
 

Index: src/sys/arch/mac68k/mac68k/machdep.c
diff -u src/sys/arch/mac68k/mac68k/machdep.c:1.359 src/sys/arch/mac68k/mac68k/machdep.c:1.360
--- src/sys/arch/mac68k/mac68k/machdep.c:1.359	Fri Feb 26 10:47:24 2021
+++ src/sys/arch/mac68k/mac68k/machdep.c	Fri Feb 26 10:54:12 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.359 2021/02/26 10:47:24 rin Exp $	*/
+/*	$NetBSD: machdep.c,v 1.360 2021/02/26 10:54:12 rin Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.359 2021/02/26 10:47:24 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.360 2021/02/26 10:54:12 rin Exp $");
 
 #include "opt_adb.h"
 #include "opt_compat_netbsd.h"
@@ -82,6 +82,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 
 #include "opt_ddb.h"
 #include "opt_ddbparam.h"
 #include "opt_kgdb.h"
+#include "opt_mac68k.h"
 #include "opt_modular.h"
 
 #include "akbd.h"
@@ -903,7 +904,11 @@ getenvvars(u_long flag, char *buf)
 	 */
 	mac68k_machine.machineid = machineid = getenv("MACHINEID");
 	mac68k_machine.mach_processor = getenv("PROCESSOR");
+#ifndef MAC68K_MEMSIZE
 	mac68k_machine.mach_memsize = getenv("MEMSIZE");
+#else
+	mac68k_machine.mach_memsize = MAC68K_MEMSIZE;
+#endif
 	mac68k_machine.do_graybars = getenv("GRAYBARS");
 	mac68k_machine.serial_boot_echo = getenv("SERIALECHO");
 	mac68k_machine.serial_console = getenv("SERIALCONSOLE");



CVS commit: src/sys/arch/mac68k/mac68k

2021-02-26 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Feb 26 10:47:24 UTC 2021

Modified Files:
src/sys/arch/mac68k/mac68k: machdep.c

Log Message:
Sort opt_*.h. No binary changes.


To generate a diff of this commit:
cvs rdiff -u -r1.358 -r1.359 src/sys/arch/mac68k/mac68k/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/mac68k/mac68k/machdep.c
diff -u src/sys/arch/mac68k/mac68k/machdep.c:1.358 src/sys/arch/mac68k/mac68k/machdep.c:1.359
--- src/sys/arch/mac68k/mac68k/machdep.c:1.358	Thu Jun 11 19:20:44 2020
+++ src/sys/arch/mac68k/mac68k/machdep.c	Fri Feb 26 10:47:24 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.358 2020/06/11 19:20:44 ad Exp $	*/
+/*	$NetBSD: machdep.c,v 1.359 2021/02/26 10:47:24 rin Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -74,15 +74,16 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.358 2020/06/11 19:20:44 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.359 2021/02/26 10:47:24 rin Exp $");
 
 #include "opt_adb.h"
+#include "opt_compat_netbsd.h"
 #include "opt_copy_symtab.h"
 #include "opt_ddb.h"
 #include "opt_ddbparam.h"
 #include "opt_kgdb.h"
 #include "opt_modular.h"
-#include "opt_compat_netbsd.h"
+
 #include "akbd.h"
 #include "genfb.h"
 #include "macfb.h"



CVS commit: src/share/man/man8/man8.amiga

2021-02-26 Thread Thomas Klausner
Module Name:src
Committed By:   wiz
Date:   Fri Feb 26 10:44:31 UTC 2021

Modified Files:
src/share/man/man8/man8.amiga: boot.8 installboot.8

Log Message:
More markup. New sentence, new line.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/share/man/man8/man8.amiga/boot.8
cvs rdiff -u -r1.24 -r1.25 src/share/man/man8/man8.amiga/installboot.8

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

Modified files:

Index: src/share/man/man8/man8.amiga/boot.8
diff -u src/share/man/man8/man8.amiga/boot.8:1.17 src/share/man/man8/man8.amiga/boot.8:1.18
--- src/share/man/man8/man8.amiga/boot.8:1.17	Thu Feb 25 03:43:57 2021
+++ src/share/man/man8/man8.amiga/boot.8	Fri Feb 26 10:44:31 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: boot.8,v 1.17 2021/02/25 03:43:57 rin Exp $
+.\"	$NetBSD: boot.8,v 1.18 2021/02/26 10:44:31 wiz Exp $
 .\"
 .\" Copyright (c) 1990, 1991 The Regents of the University of California.
 .\" All rights reserved.
@@ -91,7 +91,6 @@ The command line looks like:
 .Op Fl n Ar memsegments
 .Op Fl I Ar mask
 .Ed
-.Pp
 .Bl -tag -width flag
 .It kernel-path
 This gives you the opportunity to boot another kernel, say:

Index: src/share/man/man8/man8.amiga/installboot.8
diff -u src/share/man/man8/man8.amiga/installboot.8:1.24 src/share/man/man8/man8.amiga/installboot.8:1.25
--- src/share/man/man8/man8.amiga/installboot.8:1.24	Thu Feb 25 03:43:57 2021
+++ src/share/man/man8/man8.amiga/installboot.8	Fri Feb 26 10:44:31 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: installboot.8,v 1.24 2021/02/25 03:43:57 rin Exp $
+.\"	$NetBSD: installboot.8,v 1.25 2021/02/26 10:44:31 wiz Exp $
 .\"
 .\" Copyright (c) 1996 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -40,7 +40,8 @@
 .Ar device
 .Sh DESCRIPTION
 .Nm installboot
-copies the bootblock to a bootable partition. The
+copies the bootblock to a bootable partition.
+The
 bootstrap is written into the bootblock area on the partition, right
 in front of the superblock, and hence limited in size to
 8192 bytes.
@@ -57,7 +58,8 @@ the operator from the boot menu (on Amig
 mouse buttons during boot; on DraCo machines, press the left mouse button
 when prompted).
 .Pp
-On RDB devices, the whole bootblock is loaded by the ROM. The number of
+On RDB devices, the whole bootblock is loaded by the ROM.
+The number of
 boot blocks in the RDB partition entry must be correct.
 .Pp
 On floppy disks, the ROM always loads the first two blocks (1024 bytes),
@@ -108,9 +110,9 @@ If
 is accidentally used on the whole disk partition, the RDB will be overwritten,
 making your system unusable after the next reboot.
 .Pp
-Some third-party accelerator boards are not autoconfiguring. You won't
-be able to use their memory when booting from the bootblock after a cold
-start.
+Some third-party accelerator boards are not autoconfiguring.
+You won't be able to use their memory when booting from the bootblock
+after a cold start.
 .Pp
 Some third-party disk controllers don't support bootblock booting.
 .Pp
@@ -118,7 +120,9 @@ DraCo ROMs don't support bootblock booti
 .Pp
 Most 68060 boards, unlike the DraCo, don't set the SysBase->AttnFlags
 bit for the 68060 CPU (a patch program which is called during
-AmigaOS startup does this). You need to add options BB060STUPIDROM
+AmigaOS startup does this).
+You need to add
+.Cd options BB060STUPIDROM
 to your kernel to boot on such a machine.
 .Pp
 There is currently no easy way to edit the RDB from within
@@ -128,6 +132,8 @@ set the partition to bootable, "use cust
 of bootblocks to 16 (for bootxx_ffsv1 or bootxx_ffsv2) or 2 (for bootxx_fd),
 at least the first time you install the bootblock.
 .Pp
-As normal dd is used to install the bootblock, you can only install onto
+As normal
+.Xr dd 1
+is used to install the bootblock, you can only install onto
 your currently used root (or any other mounted) partition from single-user
 mode, or while otherwise running in insecure mode.



CVS commit: src/share/man/man4/man4.evbarm

2021-02-26 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Fri Feb 26 10:33:46 UTC 2021

Modified Files:
src/share/man/man4/man4.evbarm: Makefile vcaudio.4
Added Files:
src/share/man/man4/man4.evbarm: vchiq.4

Log Message:
Add a manual page for vchiq(4)


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/share/man/man4/man4.evbarm/Makefile
cvs rdiff -u -r1.1 -r1.2 src/share/man/man4/man4.evbarm/vcaudio.4
cvs rdiff -u -r0 -r1.1 src/share/man/man4/man4.evbarm/vchiq.4

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

Modified files:

Index: src/share/man/man4/man4.evbarm/Makefile
diff -u src/share/man/man4/man4.evbarm/Makefile:1.10 src/share/man/man4/man4.evbarm/Makefile:1.11
--- src/share/man/man4/man4.evbarm/Makefile:1.10	Fri Feb 26 09:20:58 2021
+++ src/share/man/man4/man4.evbarm/Makefile	Fri Feb 26 10:33:46 2021
@@ -1,7 +1,7 @@
-#	$NetBSD: Makefile,v 1.10 2021/02/26 09:20:58 nia Exp $
+#	$NetBSD: Makefile,v 1.11 2021/02/26 10:33:46 nia Exp $
 
 MAN=	awge.4 bcmgpio.4 cpsw.4 epgpio.4 gxio.4 intro.4 iopaau.4 iopwdog.4 \
-	rktsadc.4 vcaudio.4
+	rktsadc.4 vcaudio.4 vchiq.4
 
 MANSUBDIR=/evbarm
 

Index: src/share/man/man4/man4.evbarm/vcaudio.4
diff -u src/share/man/man4/man4.evbarm/vcaudio.4:1.1 src/share/man/man4/man4.evbarm/vcaudio.4:1.2
--- src/share/man/man4/man4.evbarm/vcaudio.4:1.1	Fri Feb 26 09:20:58 2021
+++ src/share/man/man4/man4.evbarm/vcaudio.4	Fri Feb 26 10:33:46 2021
@@ -1,4 +1,4 @@
-.\" $NetBSD: vcaudio.4,v 1.1 2021/02/26 09:20:58 nia Exp $
+.\" $NetBSD: vcaudio.4,v 1.2 2021/02/26 10:33:46 nia Exp $
 .\"
 .\" Copyright (c) 2021 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -54,7 +54,8 @@ The hardware does not support recording.
 .Sh SEE ALSO
 .Xr mixerctl 1 ,
 .Xr audio 4 ,
-.Xr mixer 4
+.Xr mixer 4 ,
+.Xr vchiq 4
 .Sh HISTORY
 The
 .Nm

Added files:

Index: src/share/man/man4/man4.evbarm/vchiq.4
diff -u /dev/null src/share/man/man4/man4.evbarm/vchiq.4:1.1
--- /dev/null	Fri Feb 26 10:33:46 2021
+++ src/share/man/man4/man4.evbarm/vchiq.4	Fri Feb 26 10:33:46 2021
@@ -0,0 +1,64 @@
+.\" $NetBSD: vchiq.4,v 1.1 2021/02/26 10:33:46 nia Exp $
+.\"
+.\" Copyright (c) 2021 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd February 26, 2021
+.Dt VCHIQ 4
+.Os
+.Sh NAME
+.Nm vchiq
+.Nd Broadcom VideoCore Host Interface device driver
+.Sh SYNOPSIS
+.Cd "vchiq* at simplebus?"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the VideoCore 4 GPU messaging interface in
+Broadcom SoCs found in boards such as the Raspberry Pi.
+.Pp
+Libraries in pkgsrc provide OpenGL ES support and video decoding acceleration
+for the VideoCore 4 using the
+.Pa /dev/vchiq
+interface exposed to userland.
+.Pp
+Audio output support is provided by the kernel through
+.Xr vcaudio 4 ,
+which uses this messaging interface to the GPU internally.
+.Sh SEE ALSO
+.Xr bcmgpio 4 ,
+.Xr vcaudio 4 ,
+.Pa pkgsrc/misc/raspberrypi-userland ,
+.Pa pkgsrc/multimedia/omxplayer
+.Sh HISTORY
+The
+.Nm
+device driver appeared in
+.Nx 7.0 .
+.Sh BUGS
+.Pa /dev/vchiq
+does not follow the standard model for graphical acceleration on Unix-like
+systems, so applications have to be specially built to take advantage of it.
+The interface to userland also cannot be exposed by 64-bit or big endian
+kernels due to problems in the upstream Broadcom code.



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

2021-02-26 Thread Jared D. McNeill
Module Name:src
Committed By:   jmcneill
Date:   Fri Feb 26 10:06:42 UTC 2021

Modified Files:
src/sys/arch/arm/pic: picvar.h

Log Message:
Unfortunately we need to disable interrupts in pic_set_priority to keep
hardware and ci_cpl in sync.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/arm/pic/picvar.h

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

Modified files:

Index: src/sys/arch/arm/pic/picvar.h
diff -u src/sys/arch/arm/pic/picvar.h:1.31 src/sys/arch/arm/pic/picvar.h:1.32
--- src/sys/arch/arm/pic/picvar.h:1.31	Sun Feb 21 17:07:45 2021
+++ src/sys/arch/arm/pic/picvar.h	Fri Feb 26 10:06:42 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: picvar.h,v 1.31 2021/02/21 17:07:45 jmcneill Exp $	*/
+/*	$NetBSD: picvar.h,v 1.32 2021/02/26 10:06:42 jmcneill Exp $	*/
 /*-
  * Copyright (c) 2008 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -107,6 +107,8 @@ void	intr_ipi_send(const kcpuset_t *, u_
 #include 
 #include 
 
+#include 
+
 #ifndef PIC_MAXPICS
 #define PIC_MAXPICS	32
 #endif
@@ -184,10 +186,14 @@ struct pic_ops {
  */
 #define pic_set_priority(ci, newipl)	\
 	do {\
+		register_t __psw = cpsid(I32_bit);			\
 		(ci)->ci_cpl = (newipl);\
 		if (__predict_true(pic_list[0] != NULL)) {		\
 			(pic_list[0]->pic_ops->pic_set_priority)(pic_list[0], newipl); \
 		}			\
+		if ((__psw & I32_bit) == 0) {\
+			cpsie(I32_bit);	\
+		}			\
 	} while (0)
 #else
 #define	pic_set_priority(ci, newipl)		((void)((ci)->ci_cpl = (newipl)))



CVS commit: src/share/man/man4

2021-02-26 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Fri Feb 26 09:59:20 UTC 2021

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

Log Message:
usb.4: add usmsc(4)


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

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

Modified files:

Index: src/share/man/man4/usb.4
diff -u src/share/man/man4/usb.4:1.115 src/share/man/man4/usb.4:1.116
--- src/share/man/man4/usb.4:1.115	Fri Feb 26 09:54:30 2021
+++ src/share/man/man4/usb.4	Fri Feb 26 09:59:19 2021
@@ -1,4 +1,4 @@
-.\" $NetBSD: usb.4,v 1.115 2021/02/26 09:54:30 nia Exp $
+.\" $NetBSD: usb.4,v 1.116 2021/02/26 09:59:19 nia Exp $
 .\"
 .\" Copyright (c) 1999-2014 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -113,6 +113,8 @@ Davicom DM9601 10/100 USB Ethernet devic
 Realtek RTL8150L 10/100 USB Ethernet device
 .It Xr urndis 4
 USB Remote NDIS Ethernet device
+.It Xr usmsc 4
+SMSC LAN95xx 10/100 USB Ethernet device
 .El
 .Ss Wireless network interfaces
 .Bl -tag -width 12n -offset ind -compact



CVS commit: src/share/man/man4

2021-02-26 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Fri Feb 26 09:54:30 UTC 2021

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

Log Message:
usb.4: add mue(4)


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

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

Modified files:

Index: src/share/man/man4/usb.4
diff -u src/share/man/man4/usb.4:1.114 src/share/man/man4/usb.4:1.115
--- src/share/man/man4/usb.4:1.114	Fri Feb 26 09:51:43 2021
+++ src/share/man/man4/usb.4	Fri Feb 26 09:54:30 2021
@@ -1,4 +1,4 @@
-.\" $NetBSD: usb.4,v 1.114 2021/02/26 09:51:43 nia Exp $
+.\" $NetBSD: usb.4,v 1.115 2021/02/26 09:54:30 nia Exp $
 .\"
 .\" Copyright (c) 1999-2014 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -105,6 +105,8 @@ CATC USB-EL1201A USB Ethernet device
 Kawasaki LSI KL5KUSB101B USB Ethernet device
 .It Xr mos 4
 MosChip MCS7730/7830/7832 10/100 USB Ethernet device
+.It Xr mue 4
+Microchip LAN75xx/LAN78xx 10/100/Gigabit USB Ethernet device
 .It Xr udav 4
 Davicom DM9601 10/100 USB Ethernet device
 .It Xr url 4



CVS commit: src/share/man/man4

2021-02-26 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Fri Feb 26 09:51:43 UTC 2021

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

Log Message:
usb.4: fix year


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

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

Modified files:

Index: src/share/man/man4/usb.4
diff -u src/share/man/man4/usb.4:1.113 src/share/man/man4/usb.4:1.114
--- src/share/man/man4/usb.4:1.113	Fri Feb 26 09:50:59 2021
+++ src/share/man/man4/usb.4	Fri Feb 26 09:51:43 2021
@@ -1,4 +1,4 @@
-.\" $NetBSD: usb.4,v 1.113 2021/02/26 09:50:59 nia Exp $
+.\" $NetBSD: usb.4,v 1.114 2021/02/26 09:51:43 nia Exp $
 .\"
 .\" Copyright (c) 1999-2014 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd February 26, 2020
+.Dd February 26, 2021
 .Dt USB 4
 .Os
 .Sh NAME



CVS commit: src/share/man/man4

2021-02-26 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Fri Feb 26 09:50:59 UTC 2021

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

Log Message:
usb.4: add mos(4)


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

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

Modified files:

Index: src/share/man/man4/usb.4
diff -u src/share/man/man4/usb.4:1.112 src/share/man/man4/usb.4:1.113
--- src/share/man/man4/usb.4:1.112	Sat May 16 13:46:10 2020
+++ src/share/man/man4/usb.4	Fri Feb 26 09:50:59 2021
@@ -1,4 +1,4 @@
-.\" $NetBSD: usb.4,v 1.112 2020/05/16 13:46:10 maya Exp $
+.\" $NetBSD: usb.4,v 1.113 2021/02/26 09:50:59 nia Exp $
 .\"
 .\" Copyright (c) 1999-2014 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd May 16, 2020
+.Dd February 26, 2020
 .Dt USB 4
 .Os
 .Sh NAME
@@ -103,6 +103,8 @@ USB Communication Device Class Ethernet 
 CATC USB-EL1201A USB Ethernet device
 .It Xr kue 4
 Kawasaki LSI KL5KUSB101B USB Ethernet device
+.It Xr mos 4
+MosChip MCS7730/7830/7832 10/100 USB Ethernet device
 .It Xr udav 4
 Davicom DM9601 10/100 USB Ethernet device
 .It Xr url 4



CVS commit: src/share/man/man4

2021-02-26 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Fri Feb 26 09:46:58 UTC 2021

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

Log Message:
pci.4: sync list of supported MI PCI devices a bit

I'm not sure what we consider machine-independent-enough for listing
here, so I'm listing drivers that are present in x86 and aarch64 kernels


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

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

Modified files:

Index: src/share/man/man4/pci.4
diff -u src/share/man/man4/pci.4:1.101 src/share/man/man4/pci.4:1.102
--- src/share/man/man4/pci.4:1.101	Sun Dec  8 02:54:54 2019
+++ src/share/man/man4/pci.4	Fri Feb 26 09:46:58 2021
@@ -1,4 +1,4 @@
-.\"	$NetBSD: pci.4,v 1.101 2019/12/08 02:54:54 nia Exp $
+.\"	$NetBSD: pci.4,v 1.102 2021/02/26 09:46:58 nia Exp $
 .\"
 .\" Copyright (c) 1997 Jason R. Thorpe.  All rights reserved.
 .\" Copyright (c) 1997 Jonathan Stone
@@ -29,7 +29,7 @@
 .\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
 .\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd December 12, 2018
+.Dd February 26, 2021
 .Dt PCI 4
 .Os
 .Sh NAME
@@ -215,6 +215,8 @@ IDE disk controllers.
 4500/4800 and
 .Tn Cisco
 340 series 802.11 interfaces.
+.It aq
+Aquantia AQC multigigabit Ethernet interfaces.
 .It bnx
 Broadcom NetXtreme II 10/100/1000 Ethernet interfaces.
 .It de
@@ -234,17 +236,10 @@ interfaces.
 SMC83C170 (EPIC/100)
 .Tn Ethernet
 interfaces.
-.It esh
-RoadRunner-based HIPPI interfaces.
 .It ex
 3Com 3c900, 3c905, and 3c980
 .Tn Ethernet
 interfaces.
-.It fpa
-.Tn DEC
-DEFPA
-.Tn FDDI
-interfaces.
 .It fxp
 Intel EtherExpress PRO 10+/100B
 .Tn Ethernet
@@ -264,6 +259,8 @@ interfaces.
 Note, the
 .Xr pcn 4
 driver supersedes this driver.
+.It mcx
+Mellanox 5th generation Ethernet devices.
 .It msk
 Marvell Yukon 2 based Gigabit
 .Tn Ethernet
@@ -284,6 +281,8 @@ AMD PCnet-PCI family of
 interfaces.
 .It ral
 Ralink Technology RT2500/RT2600-based 802.11a/b/g wireless network interfaces.
+.It re
+Realtek 10/100/1000 Ethernet adapters.
 .It rtk
 Realtek 8129/8139 based
 .Tn Ethernet
@@ -426,6 +425,8 @@ USB UHCI host controllers.
 VIA VT82C686A hardware monitors.
 .It vga
 VGA graphics boards.
+.It xhci
+USB XHCI host controllers.
 .El
 .Sh SEE ALSO
 .Xr aac 4 ,
@@ -436,6 +437,7 @@ VGA graphics boards.
 .Xr ahcisata 4 ,
 .Xr amr 4 ,
 .Xr an 4 ,
+.Xr aq 4 ,
 .Xr auich 4 ,
 .Xr autri 4 ,
 .Xr auvia 4 ,
@@ -448,7 +450,6 @@ VGA graphics boards.
 .Xr cmpci 4 ,
 .Xr cy 4 ,
 .Xr cz 4 ,
-.Xr de 4 ,
 .Xr dpt 4 ,
 .Xr eap 4 ,
 .Xr ehci 4 ,
@@ -456,12 +457,10 @@ VGA graphics boards.
 .Xr ep 4 ,
 .Xr epic 4 ,
 .Xr esa 4 ,
-.Xr esh 4 ,
 .Xr esm 4 ,
 .Xr eso 4 ,
 .Xr ex 4 ,
 .Xr fms 4 ,
-.Xr fpa 4 ,
 .Xr fxp 4 ,
 .Xr gsip 4 ,
 .Xr hme 4 ,
@@ -471,6 +470,7 @@ VGA graphics boards.
 .Xr iop 4 ,
 .Xr isp 4 ,
 .Xr le 4 ,
+.Xr mcx 4 ,
 .Xr mfi 4 ,
 .Xr mlx 4 ,
 .Xr mly 4 ,
@@ -491,6 +491,7 @@ VGA graphics boards.
 .Xr ppb 4 ,
 .Xr puc 4 ,
 .Xr ral 4 ,
+.Xr re 4 ,
 .Xr rtk 4 ,
 .Xr rtwn 4 ,
 .Xr sf 4 ,
@@ -515,6 +516,7 @@ VGA graphics boards.
 .Xr wi 4 ,
 .Xr wm 4 ,
 .Xr wscons 4 ,
+.Xr xhci 4 ,
 .Xr yds 4
 .Sh HISTORY
 The machine-independent



CVS commit: src/share/man/man4/man4.evbarm

2021-02-26 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Fri Feb 26 09:20:58 UTC 2021

Modified Files:
src/share/man/man4/man4.evbarm: Makefile
Added Files:
src/share/man/man4/man4.evbarm: vcaudio.4

Log Message:
Add a man page for vcaudio(4)


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/share/man/man4/man4.evbarm/Makefile
cvs rdiff -u -r0 -r1.1 src/share/man/man4/man4.evbarm/vcaudio.4

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

Modified files:

Index: src/share/man/man4/man4.evbarm/Makefile
diff -u src/share/man/man4/man4.evbarm/Makefile:1.9 src/share/man/man4/man4.evbarm/Makefile:1.10
--- src/share/man/man4/man4.evbarm/Makefile:1.9	Thu Jun  6 05:32:29 2019
+++ src/share/man/man4/man4.evbarm/Makefile	Fri Feb 26 09:20:58 2021
@@ -1,7 +1,7 @@
-#	$NetBSD: Makefile,v 1.9 2019/06/06 05:32:29 mrg Exp $
+#	$NetBSD: Makefile,v 1.10 2021/02/26 09:20:58 nia Exp $
 
 MAN=	awge.4 bcmgpio.4 cpsw.4 epgpio.4 gxio.4 intro.4 iopaau.4 iopwdog.4 \
-	rktsadc.4
+	rktsadc.4 vcaudio.4
 
 MANSUBDIR=/evbarm
 

Added files:

Index: src/share/man/man4/man4.evbarm/vcaudio.4
diff -u /dev/null src/share/man/man4/man4.evbarm/vcaudio.4:1.1
--- /dev/null	Fri Feb 26 09:20:58 2021
+++ src/share/man/man4/man4.evbarm/vcaudio.4	Fri Feb 26 09:20:58 2021
@@ -0,0 +1,67 @@
+.\" $NetBSD: vcaudio.4,v 1.1 2021/02/26 09:20:58 nia Exp $
+.\"
+.\" Copyright (c) 2021 The NetBSD Foundation, Inc.
+.\" All rights reserved.
+.\"
+.\" Redistribution and use in source and binary forms, with or without
+.\" modification, are permitted provided that the following conditions
+.\" are met:
+.\" 1. Redistributions of source code must retain the above copyright
+.\"notice, this list of conditions and the following disclaimer.
+.\" 2. Redistributions in binary form must reproduce the above copyright
+.\"notice, this list of conditions and the following disclaimer in the
+.\"documentation and/or other materials provided with the distribution.
+.\"
+.\" THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
+.\" ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
+.\" TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+.\" PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
+.\" BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+.\" CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+.\" SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+.\" INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+.\" CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+.\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+.\" POSSIBILITY OF SUCH DAMAGE.
+.\"
+.Dd February 26, 2021
+.Dt VCAUDIO 4
+.Os
+.Sh NAME
+.Nm vcaudio
+.Nd Broadcom VideoCore integrated audio device driver
+.Sh SYNOPSIS
+.Cd "vcaudio* at vchiq?"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the VideoCore 4 audio interface found on
+Broadcom SoCs used in boards such as the Raspberry Pi.
+.Pp
+Three outputs are supported:
+.Li auto ,
+.Li headphones ,
+and
+.Li hdmi .
+The selected output can be changed using the
+.Li outputs.select
+.Xr mixerctl 1
+variable.
+.Li headphones
+corresponds to the analog 3.5mm jack on the Raspberry Pi.
+.Pp
+The hardware does not support recording.
+.Sh SEE ALSO
+.Xr mixerctl 1 ,
+.Xr audio 4 ,
+.Xr mixer 4
+.Sh HISTORY
+The
+.Nm
+device driver appeared in
+.Nx 7.0 .
+.Sh BUGS
+The playback block size is fixed at 40ms of audio.
+The hardware output format is fixed at stereo 48kHz 16-bit LPCM so is
+not configurable with
+.Xr audiocfg 1 .