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

2021-03-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Mar  5 07:16:33 UTC 2021

Modified Files:
src/sys/arch/powerpc/pic: ipi_openpic.c

Log Message:
Convert to intr_establish_xname().


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/powerpc/pic/ipi_openpic.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/pic/ipi_openpic.c
diff -u src/sys/arch/powerpc/pic/ipi_openpic.c:1.9 src/sys/arch/powerpc/pic/ipi_openpic.c:1.10
--- src/sys/arch/powerpc/pic/ipi_openpic.c:1.9	Mon Jul  6 09:34:18 2020
+++ src/sys/arch/powerpc/pic/ipi_openpic.c	Fri Mar  5 07:16:33 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ipi_openpic.c,v 1.9 2020/07/06 09:34:18 rin Exp $ */
+/* $NetBSD: ipi_openpic.c,v 1.10 2021/03/05 07:16:33 rin Exp $ */
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ipi_openpic.c,v 1.9 2020/07/06 09:34:18 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ipi_openpic.c,v 1.10 2021/03/05 07:16:33 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_multiprocessor.h"
@@ -106,7 +106,8 @@ openpic_send_ipi(cpuid_t target, uint32_
 static void
 openpic_establish_ipi(int type, int level, void *ih_args)
 {
-	intr_establish(ipiops.ppc_ipi_vector, type, level, ipi_intr, ih_args);
+	intr_establish_xname(ipiops.ppc_ipi_vector, type, level, ipi_intr,
+	ih_args, "openpic ipi");
 }
 
 #endif /*MULTIPROCESSOR*/



CVS commit: src/sys/arch/macppc

2021-03-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Mar  5 07:15:53 UTC 2021

Modified Files:
src/sys/arch/macppc/dev: adb.c awacs.c com_mainbus.c cuda.c esp.c
gpio.c if_bm.c if_gm.c if_mc.c if_wi_obio.c kauai.c mediabay.c
mesh.c pmu.c smu.c snapper.c wdc_obio.c zs.c
src/sys/arch/macppc/macppc: ipi_hammerhead.c pic_ohare.c pic_u3_ht.c

Log Message:
Convert to intr_establish_xname().


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/macppc/dev/adb.c
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/macppc/dev/awacs.c \
src/sys/arch/macppc/dev/zs.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/macppc/dev/com_mainbus.c
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/macppc/dev/cuda.c \
src/sys/arch/macppc/dev/if_mc.c
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/macppc/dev/esp.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/macppc/dev/gpio.c
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/macppc/dev/if_bm.c
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/macppc/dev/if_gm.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/macppc/dev/if_wi_obio.c
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/macppc/dev/kauai.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/macppc/dev/mediabay.c
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/macppc/dev/mesh.c
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/macppc/dev/pmu.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/macppc/dev/smu.c
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/macppc/dev/snapper.c
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/macppc/dev/wdc_obio.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/macppc/macppc/ipi_hammerhead.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/macppc/macppc/pic_ohare.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/macppc/macppc/pic_u3_ht.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/dev/adb.c
diff -u src/sys/arch/macppc/dev/adb.c:1.34 src/sys/arch/macppc/dev/adb.c:1.35
--- src/sys/arch/macppc/dev/adb.c:1.34	Sat Oct 27 17:18:00 2012
+++ src/sys/arch/macppc/dev/adb.c	Fri Mar  5 07:15:53 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: adb.c,v 1.34 2012/10/27 17:18:00 chs Exp $	*/
+/*	$NetBSD: adb.c,v 1.35 2021/03/05 07:15:53 rin Exp $	*/
 
 /*-
  * Copyright (C) 1994	Bradley A. Grantham
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: adb.c,v 1.34 2012/10/27 17:18:00 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: adb.c,v 1.35 2021/03/05 07:15:53 rin Exp $");
 
 #include 
 #include 
@@ -132,10 +132,12 @@ adbattach(device_t parent, device_t self
 
 	switch (adbHardware) {
 	case ADB_HW_CUDA:
-		intr_establish(irq, IST_LEVEL, IPL_TTY, adb_intr_cuda, sc);
+		intr_establish_xname(irq, IST_LEVEL, IPL_TTY, adb_intr_cuda, sc,
+		device_xname(self));
 		break;
 	case ADB_HW_PMU:
-		intr_establish(irq, IST_LEVEL, IPL_TTY, pm_intr, sc);
+		intr_establish_xname(irq, IST_LEVEL, IPL_TTY, pm_intr, sc,
+		device_xname(self));
 		pm_init();
 		break;
 	}

Index: src/sys/arch/macppc/dev/awacs.c
diff -u src/sys/arch/macppc/dev/awacs.c:1.50 src/sys/arch/macppc/dev/awacs.c:1.51
--- src/sys/arch/macppc/dev/awacs.c:1.50	Sat Feb  6 07:20:36 2021
+++ src/sys/arch/macppc/dev/awacs.c	Fri Mar  5 07:15:53 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: awacs.c,v 1.50 2021/02/06 07:20:36 isaki Exp $	*/
+/*	$NetBSD: awacs.c,v 1.51 2021/03/05 07:15:53 rin Exp $	*/
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: awacs.c,v 1.50 2021/02/06 07:20:36 isaki Exp $");
+__KERNEL_RCSID(0, "$NetBSD: awacs.c,v 1.51 2021/03/05 07:15:53 rin Exp $");
 
 #include 
 #include 
@@ -307,7 +307,7 @@ awacs_attach(device_t parent, device_t s
 	int cirq, oirq, iirq, cirq_type, oirq_type, iirq_type;
 	int len = -1, perch;
 	int root_node;
-	char compat[256];
+	char compat[256], intr_xname[INTRDEVNAMEBUF];
 
 	sc = device_private(self);
 	sc->sc_dev = self;
@@ -361,9 +361,18 @@ awacs_attach(device_t parent, device_t s
 		cirq_type = oirq_type = iirq_type = IST_EDGE;
 	}
 
-	intr_establish(cirq, cirq_type, IPL_BIO, awacs_status_intr, sc);
-	intr_establish(oirq, oirq_type, IPL_AUDIO, awacs_intr, sc);
-	intr_establish(iirq, iirq_type, IPL_AUDIO, awacs_intr, sc);
+	snprintf(intr_xname, sizeof(intr_xname), "%s status",
+	device_xname(self));
+	intr_establish_xname(cirq, cirq_type, IPL_BIO, awacs_status_intr, sc,
+	intr_xname);
+
+	snprintf(intr_xname, sizeof(intr_xname), "%s out", device_xname(self));
+	intr_establish_xname(oirq, oirq_type, IPL_AUDIO, awacs_intr, sc,
+	intr_xname);
+
+	snprintf(intr_xname, sizeof(intr_xname), "%s in", device_xname(self));
+	intr_establish_xname(iirq, iirq_type, IPL_AUDIO, awacs_intr, sc,
+	intr_xname);
 
 	mutex_init(>sc_lock, MUTEX_DEFAULT, IPL_NONE);
 	mutex_init(>sc_intr_lock, MUTEX_DEFAULT, IPL_AUDIO);
Index: src/sys/arch/macppc/dev/zs.c
diff -u src/sys/arch/macppc/dev/zs.c:1.50 src/sys/arch/macppc/dev/zs.c:1.51
--- src/sys/arch/macppc/dev/zs.c:1.50	Thu Jun 30 00:52:57 2011
+++ 

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

2021-03-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Mar  5 07:11:24 UTC 2021

Modified Files:
src/sys/arch/powerpc/ibm4xx: cpu.c

Log Message:
Show PVR as 8-digit hex.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/powerpc/ibm4xx/cpu.c

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

Modified files:

Index: src/sys/arch/powerpc/ibm4xx/cpu.c
diff -u src/sys/arch/powerpc/ibm4xx/cpu.c:1.35 src/sys/arch/powerpc/ibm4xx/cpu.c:1.36
--- src/sys/arch/powerpc/ibm4xx/cpu.c:1.35	Fri Mar  5 07:10:27 2021
+++ src/sys/arch/powerpc/ibm4xx/cpu.c	Fri Mar  5 07:11:24 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.35 2021/03/05 07:10:27 rin Exp $	*/
+/*	$NetBSD: cpu.c,v 1.36 2021/03/05 07:11:24 rin Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.35 2021/03/05 07:10:27 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.36 2021/03/05 07:11:24 rin Exp $");
 
 #include 
 #include 
@@ -292,7 +292,7 @@ cpuattach(device_t parent, device_t self
 	if (__predict_false(cp->name == NULL))
 		cpu_setmodel("Version 0x%x", pvr);
 
-	aprint_normal(": %uMHz %s (PVR 0x%x)\n",
+	aprint_normal(": %uMHz %s (PVR 0x%08x)\n",
 	(processor_freq + 50) / 100,
 	(cp->name != NULL ? cpu_getmodel() : "unknown model"),
 	pvr);



CVS commit: src/sys/arch/powerpc

2021-03-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Mar  5 07:10:27 UTC 2021

Modified Files:
src/sys/arch/powerpc/ibm4xx: cpu.c
src/sys/arch/powerpc/include/ibm4xx: spr.h

Log Message:
Add 403 family processors other than 403GCX.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/powerpc/ibm4xx/cpu.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/powerpc/include/ibm4xx/spr.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/powerpc/ibm4xx/cpu.c
diff -u src/sys/arch/powerpc/ibm4xx/cpu.c:1.34 src/sys/arch/powerpc/ibm4xx/cpu.c:1.35
--- src/sys/arch/powerpc/ibm4xx/cpu.c:1.34	Thu Mar  5 01:21:09 2020
+++ src/sys/arch/powerpc/ibm4xx/cpu.c	Fri Mar  5 07:10:27 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.c,v 1.34 2020/03/05 01:21:09 rin Exp $	*/
+/*	$NetBSD: cpu.c,v 1.35 2021/03/05 07:10:27 rin Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.34 2020/03/05 01:21:09 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu.c,v 1.35 2021/03/05 07:10:27 rin Exp $");
 
 #include 
 #include 
@@ -130,9 +130,39 @@ static const struct cputab models[] = {
 			.icache_line_size = 16,
 		}
 	}, {
-		.version = PVR_403, 
-		.mask = 0x,
-		.name = "403",
+		.version = PVR_403GA,	/* XXX no MMU */
+		.mask = 0xff00,
+		.name = "403GA",
+		.ci = {
+			.dcache_size = 1024,
+			.dcache_line_size = 16,
+			.icache_size = 2048,
+			.icache_line_size = 16,
+		}
+	}, {
+		.version = PVR_403GB,	/* XXX no MMU */
+		.mask = 0xff00,
+		.name = "403GB",
+		.ci = {
+			.dcache_size = 1024,
+			.dcache_line_size = 16,
+			.icache_size = 2048,
+			.icache_line_size = 16,
+		}
+	}, {
+		.version = PVR_403GC,
+		.mask = 0xff00,
+		.name = "403GC",
+		.ci = {
+			.dcache_size = 1024,
+			.dcache_line_size = 16,
+			.icache_size = 2048,
+			.icache_line_size = 16,
+		}
+	}, {
+		.version = PVR_403GCX,
+		.mask = 0xff00,
+		.name = "403GCX",
 		.ci = {
 			.dcache_size = 8192,
 			.dcache_line_size = 16,

Index: src/sys/arch/powerpc/include/ibm4xx/spr.h
diff -u src/sys/arch/powerpc/include/ibm4xx/spr.h:1.3 src/sys/arch/powerpc/include/ibm4xx/spr.h:1.4
--- src/sys/arch/powerpc/include/ibm4xx/spr.h:1.3	Sat Jun 18 17:06:52 2011
+++ src/sys/arch/powerpc/include/ibm4xx/spr.h	Fri Mar  5 07:10:27 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: spr.h,v 1.3 2011/06/18 17:06:52 matt Exp $	*/
+/*	$NetBSD: spr.h,v 1.4 2021/03/05 07:10:27 rin Exp $	*/
 
 #ifndef _POWERPC_IBM4XX_SPR_H_
 #define	_POWERPC_IBM4XX_SPR_H_
@@ -43,7 +43,10 @@
 #define	PVR_401F2		0x0026
 #define	PVR_401G2		0x0027
 
-#define	PVR_403			0x0020
+#define	PVR_403GA		0x0020	/* XXX no MMU */
+#define	PVR_403GB		0x00200100	/* XXX no MMU */
+#define	PVR_403GC		0x00200200
+#define	PVR_403GCX		0x00201400
 
 #define PVR_405GP		0x4011
 #define PVR_405GP_PASS1 	0x4011	/* RevA */



CVS commit: src/sys/arch/evbppc

2021-03-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Mar  5 07:06:15 UTC 2021

Modified Files:
src/sys/arch/evbppc/conf: EXPLORA451
src/sys/arch/evbppc/explora: machdep.c

Log Message:
Identify oneself as ``Explora 450'' instead of 451.

There are models numbered 450 to 454. The differences b/w them are
shapes of ethernet and audio connectors. Base model number 450 is
displayed for (probably) all models by firmware.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/evbppc/conf/EXPLORA451
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/evbppc/explora/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/evbppc/conf/EXPLORA451
diff -u src/sys/arch/evbppc/conf/EXPLORA451:1.69 src/sys/arch/evbppc/conf/EXPLORA451:1.70
--- src/sys/arch/evbppc/conf/EXPLORA451:1.69	Fri Mar  5 06:57:02 2021
+++ src/sys/arch/evbppc/conf/EXPLORA451	Fri Mar  5 07:06:15 2021
@@ -1,6 +1,6 @@
-#	$NetBSD: EXPLORA451,v 1.69 2021/03/05 06:57:02 rin Exp $
+#	$NetBSD: EXPLORA451,v 1.70 2021/03/05 07:06:15 rin Exp $
 #
-#	GENERIC -- everything that's currently supported
+#	EXPLORA451 -- NCD Explora 450 Series Thin Client
 #
 
 include 	"arch/evbppc/conf/std.explora"

Index: src/sys/arch/evbppc/explora/machdep.c
diff -u src/sys/arch/evbppc/explora/machdep.c:1.44 src/sys/arch/evbppc/explora/machdep.c:1.45
--- src/sys/arch/evbppc/explora/machdep.c:1.44	Fri Mar  5 06:40:15 2021
+++ src/sys/arch/evbppc/explora/machdep.c	Fri Mar  5 07:06:15 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.44 2021/03/05 06:40:15 rin Exp $	*/
+/*	$NetBSD: machdep.c,v 1.45 2021/03/05 07:06:15 rin Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.44 2021/03/05 06:40:15 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.45 2021/03/05 07:06:15 rin Exp $");
 
 #include "opt_explora.h"
 #include "opt_modular.h"
@@ -149,7 +149,7 @@ cpu_startup(void)
 	/*
 	 * cpu common startup
 	 */
-	ibm4xx_cpu_startup("NCD Explora 451");
+	ibm4xx_cpu_startup("NCD Explora 450");
 
 	/*
 	 * Set up the board properties database.



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

2021-03-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Mar  5 06:57:02 UTC 2021

Modified Files:
src/sys/arch/evbppc/conf: EXPLORA451

Log Message:
Add tmpfs.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/evbppc/conf/EXPLORA451

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/evbppc/conf/EXPLORA451
diff -u src/sys/arch/evbppc/conf/EXPLORA451:1.68 src/sys/arch/evbppc/conf/EXPLORA451:1.69
--- src/sys/arch/evbppc/conf/EXPLORA451:1.68	Sun Sep 27 13:48:51 2020
+++ src/sys/arch/evbppc/conf/EXPLORA451	Fri Mar  5 06:57:02 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: EXPLORA451,v 1.68 2020/09/27 13:48:51 roy Exp $
+#	$NetBSD: EXPLORA451,v 1.69 2021/03/05 06:57:02 rin Exp $
 #
 #	GENERIC -- everything that's currently supported
 #
@@ -76,6 +76,7 @@ file-system 	UMAPFS		# NULLFS + uid and 
 file-system 	UNION		# union file system
 file-system	CODA		# Coda File System; also needs vcoda (below)
 file-system	PTYFS		# /dev/pts/N support
+file-system	TMPFS		# Efficient memory file-system
 
 # File system options
 options 	QUOTA		# legacy UFS quotas



CVS commit: src/sys/arch/evbppc/explora/dev

2021-03-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Mar  5 06:50:57 UTC 2021

Modified Files:
src/sys/arch/evbppc/explora/dev: fb_elb.c

Log Message:
Fix color map.

Almost all colors except *green* were wrong for the apparent reason ;).


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbppc/explora/dev/fb_elb.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/evbppc/explora/dev/fb_elb.c
diff -u src/sys/arch/evbppc/explora/dev/fb_elb.c:1.15 src/sys/arch/evbppc/explora/dev/fb_elb.c:1.16
--- src/sys/arch/evbppc/explora/dev/fb_elb.c:1.15	Fri Mar  5 06:48:20 2021
+++ src/sys/arch/evbppc/explora/dev/fb_elb.c	Fri Mar  5 06:50:57 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: fb_elb.c,v 1.15 2021/03/05 06:48:20 rin Exp $	*/
+/*	$NetBSD: fb_elb.c,v 1.16 2021/03/05 06:50:57 rin Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fb_elb.c,v 1.15 2021/03/05 06:48:20 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fb_elb.c,v 1.16 2021/03/05 06:50:57 rin Exp $");
 
 #include 
 #include 
@@ -389,20 +389,20 @@ fb_copycols(void *v, int row, int srccol
 
 static u_int8_t default_cmap[] = {
 	/* black */		  0,   0,   0,
-	/* blue */		  0,   0, 192,
-	/* green */		  0, 192,   0,
-	/* cyan */		  0, 192, 192,
 	/* red */		192,   0,   0,
-	/* magenta */		192,   0, 192,
+	/* green */		  0, 192,   0,
 	/* brown */		192, 192,   0,
+	/* blue */		  0,   0, 192,
+	/* magenta */		192,   0, 192,
+	/* cyan */		  0, 192, 192,
 	/* lightgrey */		212, 208, 200,
 	/* darkgrey */		200, 192, 188,
-	/* lightblue */		  0,   0, 255,
-	/* lightgreen */	  0, 255,   0,
-	/* lightcyan */		  0, 255, 255,
 	/* lightred */		255,   0,   0,
-	/* lightmagenta */	255,   0, 255,
+	/* lightgreen */	  0, 255,   0,
 	/* yellow */		255, 255,   0,
+	/* lightblue */		  0,   0, 255,
+	/* lightmagenta */	255,   0, 255,
+	/* lightcyan */		  0, 255, 255,
 	/* white */		255, 255, 255,
 };
 



CVS commit: src/sys/arch/evbppc/explora/dev

2021-03-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Mar  5 06:48:21 UTC 2021

Modified Files:
src/sys/arch/evbppc/explora/dev: fb_elb.c

Log Message:
Configure fb(4) appropriately also when it is not console.

Now, wsdisplay(4) can be used with serial console.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbppc/explora/dev/fb_elb.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/evbppc/explora/dev/fb_elb.c
diff -u src/sys/arch/evbppc/explora/dev/fb_elb.c:1.14 src/sys/arch/evbppc/explora/dev/fb_elb.c:1.15
--- src/sys/arch/evbppc/explora/dev/fb_elb.c:1.14	Sat Nov 21 15:42:20 2020
+++ src/sys/arch/evbppc/explora/dev/fb_elb.c	Fri Mar  5 06:48:20 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: fb_elb.c,v 1.14 2020/11/21 15:42:20 thorpej Exp $	*/
+/*	$NetBSD: fb_elb.c,v 1.15 2021/03/05 06:48:20 rin Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fb_elb.c,v 1.14 2020/11/21 15:42:20 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fb_elb.c,v 1.15 2021/03/05 06:48:20 rin Exp $");
 
 #include 
 #include 
@@ -66,7 +66,7 @@ struct fb_elb_softc {
 static int	fb_elb_probe(device_t, cfdata_t, void *);
 static void	fb_elb_attach(device_t, device_t, void *);
 void		fb_cnattach(bus_space_tag_t, bus_addr_t, void *);
-static void	fb_init(struct fb_dev *, int);
+static void	fb_init(struct fb_dev *);
 static int	fb_ioctl(void *, void *, u_long, void *, int, struct lwp *);
 static paddr_t	fb_mmap(void *, void *, off_t, int);
 static int	fb_alloc_screen(void *, const struct wsscreen_descr *, void **,
@@ -153,7 +153,8 @@ fb_elb_attach(device_t parent, device_t 
 	bus_space_map(sc->sc_fb->fb_iot, eaa->elb_base2, FB_NPORTS,
 	0, >sc_fb->fb_ioh);
 
-	fb_init(sc->sc_fb, !is_console);
+	if (!is_console)
+		fb_init(sc->sc_fb);
 
 	ri = >sc_fb->fb_ri;
 
@@ -168,24 +169,19 @@ fb_elb_attach(device_t parent, device_t 
 }
 
 static void
-fb_init(struct fb_dev *fb, int full)
+fb_init(struct fb_dev *fb)
 {
 	struct rasops_info *ri = >fb_ri;
 
-	if (full) {
-		s3_init(fb, >ri_width, >ri_height);
-		ri->ri_depth = 8;
-		ri->ri_stride = ri->ri_width;
-		ri->ri_bits = fb->fb_vram;
-		ri->ri_flg = RI_CENTER;
-		if (ri == _dev.fb_ri)
-			ri->ri_flg |= RI_NO_AUTO;
+	s3_init(fb, >ri_width, >ri_height);
+	ri->ri_depth = 8;
+	ri->ri_stride = ri->ri_width;
+	ri->ri_bits = fb->fb_vram;
+	ri->ri_flg = RI_CENTER | RI_CLEAR;
+	if (ri == _dev.fb_ri)
+		ri->ri_flg |= RI_NO_AUTO;
 
-		rasops_init(ri, 500, 500);
-	} else {
-		ri->ri_origbits = fb->fb_vram;	/*XXX*/
-		rasops_reconfig(ri, 500, 500);
-	}
+	rasops_init(ri, 500, 500);
 
 	/* Replace the copy/erase ops. */
 	ri->ri_hw = fb;
@@ -287,7 +283,7 @@ fb_cnattach(bus_space_tag_t iot, bus_add
 	console_dev.fb_ioh = iobase;
 	console_dev.fb_vram = vram;
 
-	fb_init(_dev, 1);
+	fb_init(_dev);
 
 	(*ri->ri_ops.allocattr)(ri, 0, 0, 0, );
 



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

2021-03-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Mar  5 06:45:12 UTC 2021

Modified Files:
src/sys/arch/evbppc/conf: std.explora

Log Message:
Bump INTSTK to 16KB, i.e., one VM page, in the same manner as other boards.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/evbppc/conf/std.explora

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/evbppc/conf/std.explora
diff -u src/sys/arch/evbppc/conf/std.explora:1.6 src/sys/arch/evbppc/conf/std.explora:1.7
--- src/sys/arch/evbppc/conf/std.explora:1.6	Fri Mar  5 06:06:34 2021
+++ src/sys/arch/evbppc/conf/std.explora	Fri Mar  5 06:45:12 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: std.explora,v 1.6 2021/03/05 06:06:34 rin Exp $
+#	$NetBSD: std.explora,v 1.7 2021/03/05 06:45:12 rin Exp $
 #
 # Standard/required options for NetBSD/explora.
 
@@ -20,7 +20,7 @@ makeoptions	PPCDIR="ibm4xx"
 
 options 	PPC_INTR_IMPL=""
 
-options 	INTSTK=8192
+options 	INTSTK=16384
 
 options 	PPC_CPU_FREQ=6600	# XXX hack for pckbc_cnattach()
 



CVS commit: src/sys/arch/evbppc

2021-03-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Mar  5 06:40:16 UTC 2021

Modified Files:
src/sys/arch/evbppc/conf: files.explora
src/sys/arch/evbppc/explora: machdep.c

Log Message:
Map framebuffer to virtual space when fb(4) is present,
even if it is not console.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbppc/conf/files.explora
cvs rdiff -u -r1.43 -r1.44 src/sys/arch/evbppc/explora/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/evbppc/conf/files.explora
diff -u src/sys/arch/evbppc/conf/files.explora:1.11 src/sys/arch/evbppc/conf/files.explora:1.12
--- src/sys/arch/evbppc/conf/files.explora:1.11	Fri Mar  5 06:26:56 2021
+++ src/sys/arch/evbppc/conf/files.explora	Fri Mar  5 06:40:15 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: files.explora,v 1.11 2021/03/05 06:26:56 rin Exp $
+#	$NetBSD: files.explora,v 1.12 2021/03/05 06:40:15 rin Exp $
 
 # maxpartitions must be first item in files.${ARCH}
 
@@ -50,4 +50,4 @@ file	arch/evbppc/explora/dev/pckbc_elb.c
 
 device	fb: wsemuldisplaydev, rasops8
 attach	fb at elb with fb_elb
-file	arch/evbppc/explora/dev/fb_elb.c	fb_elb
+file	arch/evbppc/explora/dev/fb_elb.c	fb_elb		needs-flag

Index: src/sys/arch/evbppc/explora/machdep.c
diff -u src/sys/arch/evbppc/explora/machdep.c:1.43 src/sys/arch/evbppc/explora/machdep.c:1.44
--- src/sys/arch/evbppc/explora/machdep.c:1.43	Fri Mar  5 06:30:45 2021
+++ src/sys/arch/evbppc/explora/machdep.c	Fri Mar  5 06:40:15 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.43 2021/03/05 06:30:45 rin Exp $	*/
+/*	$NetBSD: machdep.c,v 1.44 2021/03/05 06:40:15 rin Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,10 +30,12 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.43 2021/03/05 06:30:45 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.44 2021/03/05 06:40:15 rin Exp $");
 
 #include "opt_explora.h"
 #include "opt_modular.h"
+
+#include "fb_elb.h"
 #include "ksyms.h"
 
 #include 
@@ -119,7 +121,7 @@ initppc(vaddr_t startkernel, vaddr_t end
 	/* Map PCKBC, PCKBC2, COM, LPT. This is far beyond physmem. */
 	ppc4xx_tlb_reserve(BASE_ISA, BASE_ISA, TLB_PG_SIZE, TLB_I | TLB_G);
 
-#ifndef COM_IS_CONSOLE
+#if NFB_ELB > 0
 	ppc4xx_tlb_reserve(BASE_FB,  BASE_FB,  TLB_PG_SIZE, TLB_I | TLB_G);
 	ppc4xx_tlb_reserve(BASE_FB2, BASE_FB2, TLB_PG_SIZE, TLB_I | TLB_G);
 #endif



CVS commit: src/sys/arch/evbppc/explora

2021-03-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Mar  5 06:30:45 UTC 2021

Modified Files:
src/sys/arch/evbppc/explora: machdep.c

Log Message:
Call bus_space_mallocok() appropriately.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/evbppc/explora/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/evbppc/explora/machdep.c
diff -u src/sys/arch/evbppc/explora/machdep.c:1.42 src/sys/arch/evbppc/explora/machdep.c:1.43
--- src/sys/arch/evbppc/explora/machdep.c:1.42	Fri Mar  5 06:26:56 2021
+++ src/sys/arch/evbppc/explora/machdep.c	Fri Mar  5 06:30:45 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.42 2021/03/05 06:26:56 rin Exp $	*/
+/*	$NetBSD: machdep.c,v 1.43 2021/03/05 06:30:45 rin Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.42 2021/03/05 06:26:56 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.43 2021/03/05 06:30:45 rin Exp $");
 
 #include "opt_explora.h"
 #include "opt_modular.h"
@@ -168,6 +168,11 @@ cpu_startup(void)
 	prop_object_release(pn);
 
 	/*
+	 * Now that we have VM, malloc()s are OK in bus_space.
+	 */
+	bus_space_mallocok();
+
+	/*
 	 * no fake mapiodev
 	 */
 	fake_mapiodev = 0;



CVS commit: src/sys/arch/evbppc

2021-03-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Mar  5 06:26:57 UTC 2021

Modified Files:
src/sys/arch/evbppc/conf: files.explora
src/sys/arch/evbppc/explora: autoconf.c machdep.c

Log Message:
For very MD codes for Explora, reorder things, and use more common codes for
ibm4xx and ibm40x for clarity as well as better comparison with other boards.

No functional changes intended.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbppc/conf/files.explora
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/evbppc/explora/autoconf.c
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/evbppc/explora/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/evbppc/conf/files.explora
diff -u src/sys/arch/evbppc/conf/files.explora:1.10 src/sys/arch/evbppc/conf/files.explora:1.11
--- src/sys/arch/evbppc/conf/files.explora:1.10	Mon Jul  6 10:38:46 2020
+++ src/sys/arch/evbppc/conf/files.explora	Fri Mar  5 06:26:56 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: files.explora,v 1.10 2020/07/06 10:38:46 rin Exp $
+#	$NetBSD: files.explora,v 1.11 2021/03/05 06:26:56 rin Exp $
 
 # maxpartitions must be first item in files.${ARCH}
 
@@ -15,7 +15,13 @@ include		"arch/powerpc/pic/files.pic"
 file	arch/evbppc/explora/autoconf.c
 file	arch/evbppc/explora/consinit.c
 file	arch/evbppc/explora/machdep.c
+
 file	arch/powerpc/ibm4xx/ibm4xx_machdep.c
+file	arch/powerpc/ibm4xx/ibm40x_machdep.c
+
+# Board Properties
+file	arch/powerpc/ibm4xx/board_prop.c
+
 defflag	opt_uic.h	MULTIUIC
 file	arch/powerpc/ibm4xx/pic_uic.c
 file	dev/md_root.cmemory_disk_hooks

Index: src/sys/arch/evbppc/explora/autoconf.c
diff -u src/sys/arch/evbppc/explora/autoconf.c:1.14 src/sys/arch/evbppc/explora/autoconf.c:1.15
--- src/sys/arch/evbppc/explora/autoconf.c:1.14	Tue Mar  2 07:38:48 2021
+++ src/sys/arch/evbppc/explora/autoconf.c	Fri Mar  5 06:26:56 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.14 2021/03/02 07:38:48 rin Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.15 2021/03/05 06:26:56 rin Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.14 2021/03/02 07:38:48 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.15 2021/03/05 06:26:56 rin Exp $");
 
 #include 
 #include 
@@ -43,6 +43,8 @@ __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v
 void
 cpu_configure(void)
 {
+
+	intr_init();
 	calc_delayconst();
 
 	if (config_rootfound("elb", NULL) == NULL)

Index: src/sys/arch/evbppc/explora/machdep.c
diff -u src/sys/arch/evbppc/explora/machdep.c:1.41 src/sys/arch/evbppc/explora/machdep.c:1.42
--- src/sys/arch/evbppc/explora/machdep.c:1.41	Tue Mar  2 07:44:08 2021
+++ src/sys/arch/evbppc/explora/machdep.c	Fri Mar  5 06:26:56 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.41 2021/03/02 07:44:08 rin Exp $	*/
+/*	$NetBSD: machdep.c,v 1.42 2021/03/05 06:26:56 rin Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.41 2021/03/02 07:44:08 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.42 2021/03/05 06:26:56 rin Exp $");
 
 #include "opt_explora.h"
 #include "opt_modular.h"
@@ -71,7 +71,6 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v 
 #include 
 #endif
 
-#define MEMREGIONS	2
 #define TLB_PG_SIZE	(16*1024*1024)
 
 char machine[] = MACHINE;		/* from  */
@@ -79,12 +78,8 @@ char machine_arch[] = MACHINE_ARCH;	/* f
 
 static const unsigned int cpuspeed = 6600;
 
-prop_dictionary_t board_properties;
 struct vm_map *phys_map = NULL;
 
-static struct mem_region phys_mem[MEMREGIONS];
-static struct mem_region avail_mem[MEMREGIONS];
-
 void		initppc(vaddr_t, vaddr_t);
 
 void
@@ -112,11 +107,6 @@ initppc(vaddr_t startkernel, vaddr_t end
 			size = maddr+msize;
 	}
 
-	phys_mem[0].start = 0;
-	phys_mem[0].size = size & ~PGOFSET;
-	avail_mem[0].start = startkernel;
-	avail_mem[0].size = size-startkernel;
-
 	/*
 	 * Setup initial tlbs.
 	 * Kernel memory and console device are
@@ -140,48 +130,29 @@ initppc(vaddr_t startkernel, vaddr_t end
 	/* Disable all timer interrupts */
 	mtspr(SPR_TCR, 0);
 
+	ibm40x_memsize_init(size, startkernel);
 	ibm4xx_init(startkernel, endkernel, pic_ext_intr);
+
+	/*
+	 * Look for the ibm4xx modules in the right place.
+	 */
+	module_machine = module_machine_ibm4xx;
 }
 
 void
 cpu_startup(void)
 {
-	vaddr_t minaddr, maxaddr;
 	prop_number_t pn;
-	char pbuf[9];
-
-	/*
-	 * Initialize error message buffer (before start of kernel)
-	 */
-	initmsgbuf((void *)msgbuf, round_page(MSGBUFSIZE));
-
-	printf("%s%s", copyright, version);
-	printf("NCD Explora451\n");
-
-	format_bytes(pbuf, sizeof(pbuf), ctob(physmem));
-	printf("total memory = %s\n", pbuf);
-
-	minaddr = 0;
-	/*
-	 * Allocate a submap for physio
-	 */
-	phys_map = uvm_km_suballoc(kernel_map, , ,
- VM_PHYS_SIZE, 0, false, NULL);
 
 	/*
-	 * No need to allocate an mbuf 

CVS commit: src/sys/arch/evbppc/explora/dev

2021-03-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Mar  5 06:17:02 UTC 2021

Modified Files:
src/sys/arch/evbppc/explora/dev: pckbc_elb.c

Log Message:
Avoid doubly bus_space_map(9) when pckbc(4) is already attached as console.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbppc/explora/dev/pckbc_elb.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/evbppc/explora/dev/pckbc_elb.c
diff -u src/sys/arch/evbppc/explora/dev/pckbc_elb.c:1.11 src/sys/arch/evbppc/explora/dev/pckbc_elb.c:1.12
--- src/sys/arch/evbppc/explora/dev/pckbc_elb.c:1.11	Fri Mar  5 06:14:47 2021
+++ src/sys/arch/evbppc/explora/dev/pckbc_elb.c	Fri Mar  5 06:17:02 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pckbc_elb.c,v 1.11 2021/03/05 06:14:47 rin Exp $	*/
+/*	$NetBSD: pckbc_elb.c,v 1.12 2021/03/05 06:17:02 rin Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pckbc_elb.c,v 1.11 2021/03/05 06:14:47 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pckbc_elb.c,v 1.12 2021/03/05 06:17:02 rin Exp $");
 
 #include 
 #include 
@@ -84,19 +84,23 @@ pckbc_elb_attach(device_t parent, device
 	msc->sc_irq = eaa->elb_irq;
 	sc->intr_establish = pckbc_elb_intr_establish;
 
-	if (pckbc_is_console(eaa->elb_bt, eaa->elb_base)) {
+	if (pckbc_is_console(eaa->elb_bt,
+	_BUS_SPACE_UNSTRIDE(eaa->elb_bt, eaa->elb_base))) {
 		t = _consdata;
 		pckbc_console_attached = 1;
 	} else {
 		t = kmem_zalloc(sizeof(struct pckbc_internal), KM_SLEEP);
+
+		t->t_iot = eaa->elb_bt;
+		bus_space_map(eaa->elb_bt,
+		_BUS_SPACE_UNSTRIDE(eaa->elb_bt, eaa->elb_base), 1, 0,
+		>t_ioh_d);
+		bus_space_map(eaa->elb_bt,
+		_BUS_SPACE_UNSTRIDE(eaa->elb_bt, eaa->elb_base2), 1, 0,
+		>t_ioh_c);
+		t->t_addr = eaa->elb_base;
 	}
 
-	t->t_iot = eaa->elb_bt;
-	bus_space_map(eaa->elb_bt,
-	_BUS_SPACE_UNSTRIDE(eaa->elb_bt, eaa->elb_base), 1, 0, >t_ioh_d);
-	bus_space_map(eaa->elb_bt,
-	_BUS_SPACE_UNSTRIDE(eaa->elb_bt, eaa->elb_base2), 1, 0, >t_ioh_c);
-	t->t_addr = eaa->elb_base;
 	t->t_sc = sc;
 	sc->id = t;
 



CVS commit: src/sys/arch/evbppc/explora/dev

2021-03-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Mar  5 06:14:47 UTC 2021

Modified Files:
src/sys/arch/evbppc/explora/dev: pckbc_elb.c

Log Message:
pckbcintr() must be running with IPL_TTY, not IPL_SERIAL. Otherwise,
tty(4) routines are unexpectedly interrupted, which results in
"locking against myself" errors for tty_lock.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/evbppc/explora/dev/pckbc_elb.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/evbppc/explora/dev/pckbc_elb.c
diff -u src/sys/arch/evbppc/explora/dev/pckbc_elb.c:1.10 src/sys/arch/evbppc/explora/dev/pckbc_elb.c:1.11
--- src/sys/arch/evbppc/explora/dev/pckbc_elb.c:1.10	Tue Mar  2 12:01:02 2021
+++ src/sys/arch/evbppc/explora/dev/pckbc_elb.c	Fri Mar  5 06:14:47 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pckbc_elb.c,v 1.10 2021/03/02 12:01:02 rin Exp $	*/
+/*	$NetBSD: pckbc_elb.c,v 1.11 2021/03/05 06:14:47 rin Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pckbc_elb.c,v 1.10 2021/03/02 12:01:02 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pckbc_elb.c,v 1.11 2021/03/05 06:14:47 rin Exp $");
 
 #include 
 #include 
@@ -116,7 +116,7 @@ pckbc_elb_intr_establish(struct pckbc_so
 	 */
 
 	if (irq >= 0)
-	 	intr_establish_xname(irq, IST_LEVEL, IPL_SERIAL, pckbcintr, sc,
+	 	intr_establish_xname(irq, IST_LEVEL, IPL_TTY, pckbcintr, sc,
 		device_xname(sc->sc_dv));
 
 	msc->sc_irq = -1;



CVS commit: src/sys/arch

2021-03-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Mar  5 06:06:34 UTC 2021

Modified Files:
src/sys/arch/evbppc/conf: std.explora
src/sys/arch/evbppc/explora: consinit.c
src/sys/arch/powerpc/conf: files.powerpc
src/sys/arch/powerpc/ibm4xx: clock.c

Log Message:
For Explora 451, call calc_delayconst() before pckbc_cnattach(), which
depends on delay() and DELAY().

Unfortunately, proplib(9) API is not available for MD codes, that are
called before consinit() (since pool(9) is not initialized yet).

Therefore, hard-code CPU frequency to calc_delayconst() in case
"processor-frequency" is not initialized.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/evbppc/conf/std.explora
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/evbppc/explora/consinit.c
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/powerpc/conf/files.powerpc
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/powerpc/ibm4xx/clock.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/evbppc/conf/std.explora
diff -u src/sys/arch/evbppc/conf/std.explora:1.5 src/sys/arch/evbppc/conf/std.explora:1.6
--- src/sys/arch/evbppc/conf/std.explora:1.5	Mon Jun 20 17:44:33 2011
+++ src/sys/arch/evbppc/conf/std.explora	Fri Mar  5 06:06:34 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: std.explora,v 1.5 2011/06/20 17:44:33 matt Exp $
+#	$NetBSD: std.explora,v 1.6 2021/03/05 06:06:34 rin Exp $
 #
 # Standard/required options for NetBSD/explora.
 
@@ -22,4 +22,6 @@ options 	PPC_INTR_IMPL="
 
 options 	INTSTK=8192
 
+options 	PPC_CPU_FREQ=6600	# XXX hack for pckbc_cnattach()
+
 include		"arch/evbppc/conf/files.explora"

Index: src/sys/arch/evbppc/explora/consinit.c
diff -u src/sys/arch/evbppc/explora/consinit.c:1.9 src/sys/arch/evbppc/explora/consinit.c:1.10
--- src/sys/arch/evbppc/explora/consinit.c:1.9	Sat Oct 13 17:58:53 2012
+++ src/sys/arch/evbppc/explora/consinit.c	Fri Mar  5 06:06:34 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: consinit.c,v 1.9 2012/10/13 17:58:53 jdc Exp $	*/
+/*	$NetBSD: consinit.c,v 1.10 2021/03/05 06:06:34 rin Exp $	*/
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.9 2012/10/13 17:58:53 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: consinit.c,v 1.10 2021/03/05 06:06:34 rin Exp $");
 
 #include 
 #include 
@@ -54,6 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: consinit.c,v
 #include "pckbd.h"
 
 #include 
+#include 
 
 #include "opt_explora.h"
 
@@ -86,6 +87,9 @@ consinit(void)
 
 	tag = elb_get_bus_space_tag(BASE_FB);
 	fb_cnattach(tag, BASE_FB2, (void *)BASE_FB);
+
+	calc_delayconst();	/* required by pckbc_cnattach() */
+
 	tag = elb_get_bus_space_tag(BASE_PCKBC);
 	pckbc_cnattach(tag, _BUS_SPACE_UNSTRIDE(tag, BASE_PCKBC),
 	_BUS_SPACE_UNSTRIDE(tag, BASE_PCKBC2-BASE_PCKBC), PCKBC_KBD_SLOT,

Index: src/sys/arch/powerpc/conf/files.powerpc
diff -u src/sys/arch/powerpc/conf/files.powerpc:1.97 src/sys/arch/powerpc/conf/files.powerpc:1.98
--- src/sys/arch/powerpc/conf/files.powerpc:1.97	Wed Oct 21 13:31:51 2020
+++ src/sys/arch/powerpc/conf/files.powerpc	Fri Mar  5 06:06:34 2021
@@ -1,8 +1,8 @@
-#	$NetBSD: files.powerpc,v 1.97 2020/10/21 13:31:51 christos Exp $
+#	$NetBSD: files.powerpc,v 1.98 2021/03/05 06:06:34 rin Exp $
 
 defflag	opt_altivec.h	ALTIVEC K_ALTIVEC PPC_HAVE_SPE
 defflag	opt_openpic.h	OPENPIC_DISTRIBUTE
-defparam opt_ppcparam.h	L2CR_CONFIG L3CR_CONFIG INTSTK CLOCKBASE VERBOSE_INITPPC
+defparam opt_ppcparam.h	L2CR_CONFIG L3CR_CONFIG INTSTK CLOCKBASE VERBOSE_INITPPC PPC_CPU_FREQ
 defflag	opt_ppcarch.h	PPC_OEA PPC_OEA601 PPC_OEA64 PPC_OEA64_BRIDGE PPC_MPC8XX PPC_IBM4XX PPC_IBM403 PPC_IBM440 PPC_BOOKE
 defflag opt_ppccache.h	CACHE_PROTO_MEI
 defflag opt_pmap.h	PMAPDEBUG PMAPCHECK PMAPCOUNTERS PMAP_MINIMALTLB PMAP_TLBDEBUG

Index: src/sys/arch/powerpc/ibm4xx/clock.c
diff -u src/sys/arch/powerpc/ibm4xx/clock.c:1.31 src/sys/arch/powerpc/ibm4xx/clock.c:1.32
--- src/sys/arch/powerpc/ibm4xx/clock.c:1.31	Mon Jan 18 04:35:04 2021
+++ src/sys/arch/powerpc/ibm4xx/clock.c	Fri Mar  5 06:06:34 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.c,v 1.31 2021/01/18 04:35:04 rin Exp $	*/
+/*	$NetBSD: clock.c,v 1.32 2021/03/05 06:06:34 rin Exp $	*/
 /*  $OpenBSD: clock.c,v 1.3 1997/10/13 13:42:53 pefo Exp $  */
 
 /*
@@ -33,10 +33,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.31 2021/01/18 04:35:04 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.32 2021/03/05 06:06:34 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ppcarch.h"
+#include "opt_ppcparam.h"
 #endif
 
 #include 
@@ -197,9 +198,17 @@ calc_delayconst(void)
 	prop_number_t freq;
 
 	freq = prop_dictionary_get(board_properties, "processor-frequency");
+
+#ifndef PPC_CPU_FREQ
 	KASSERT(freq != NULL);
+#else
+	/* XXX hack for pckbc_cnattach() for Explora */
+	if (freq == NULL)
+		ticks_per_sec = (u_long) PPC_CPU_FREQ;
+	else
+#endif
+		ticks_per_sec = (u_long) 

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

2021-03-04 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Fri Mar  5 05:35:50 UTC 2021

Modified Files:
src/sys/arch/powerpc/ibm4xx: pic_uic.c

Log Message:
Fix hard freeze in pic_handle_intr() for PPC_IBM403.

Not clearly documented in reference manual, but DCR_EXISR register is
not updated immediately after some bits are cleared by mtdcr, no matter
whether sync (= eieio) and/or isync are issued.

Therefore, we have to manage our own status mask in the interrupt handler.
This is what we did in obsoleted powerpc/ibm4xx/intr.c.

With this change, my Explora 451 works just fine with serial console!
Fix for framebuffer console will be committed soon.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/powerpc/ibm4xx/pic_uic.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/ibm4xx/pic_uic.c
diff -u src/sys/arch/powerpc/ibm4xx/pic_uic.c:1.8 src/sys/arch/powerpc/ibm4xx/pic_uic.c:1.9
--- src/sys/arch/powerpc/ibm4xx/pic_uic.c:1.8	Sat Feb 27 20:43:58 2021
+++ src/sys/arch/powerpc/ibm4xx/pic_uic.c	Fri Mar  5 05:35:50 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: pic_uic.c,v 1.8 2021/02/27 20:43:58 rin Exp $	*/
+/*	$NetBSD: pic_uic.c,v 1.9 2021/03/05 05:35:50 rin Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -36,7 +36,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pic_uic.c,v 1.8 2021/02/27 20:43:58 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pic_uic.c,v 1.9 2021/03/05 05:35:50 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ppcarch.h"
@@ -73,6 +73,19 @@ static void	uic_establish_irq(struct pic
 
 struct uic {
 	uint32_t uic_intr_enable;	/* cached intr enable mask */
+#ifdef PPC_IBM403
+	/*
+	 * Not clearly documented in reference manual, but DCR_EXISR
+	 * register is not updated immediately after some bits are
+	 * cleared by mtdcr, no matter whether sync (= eieio) and/or
+	 * isync are issued.
+	 *
+	 * Therefore, we have to manage our own status mask in the
+	 * interrupt handler; see uic_{ack,get}_irq() for more details.
+	 * This is what we did in obsoleted powerpc/ibm4xx/intr.c.
+	 */
+	uint32_t uic_intr_status;
+#endif
 	uint32_t (*uic_mf_intr_status)(void);
 	uint32_t (*uic_mf_intr_enable)(void);
 	void (*uic_mt_intr_enable)(uint32_t);
@@ -356,15 +369,26 @@ uic_ack_irq(struct pic_ops *pic, int irq
 	struct uic * const uic = pic->pic_cookie;
 	const uint32_t irqmask = IRQ_TO_MASK(irq);
 
+#ifdef PPC_IBM403
+	uic->uic_intr_status &= ~irqmask;
+#endif
+
 	(*uic->uic_mt_intr_ack)(irqmask);
 }
 
 static int
-uic_get_irq(struct pic_ops *pic, int dummy)
+uic_get_irq(struct pic_ops *pic, int req)
 {
 	struct uic * const uic = pic->pic_cookie;
 
+#ifdef PPC_IBM403
+	if (req == PIC_GET_IRQ)
+		uic->uic_intr_status = (*uic->uic_mf_intr_status)();
+	const uint32_t irqmask = uic->uic_intr_status;
+#else
 	const uint32_t irqmask = (*uic->uic_mf_intr_status)();
+#endif
+
 	if (irqmask == 0)
 		return 255;
 	return IRQ_OF_MASK(irqmask);



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

2021-03-04 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Mar  5 02:58:13 UTC 2021

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

Log Message:
Split set_timebase() into get_timebase_frequency() and init_decrementer().
Call get_timebase_frequency() much earlier.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 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.57 src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.58
--- src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.57	Fri Mar  5 01:33:33 2021
+++ src/sys/arch/powerpc/oea/ofwoea_machdep.c	Fri Mar  5 02:58:13 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ofwoea_machdep.c,v 1.57 2021/03/05 01:33:33 thorpej Exp $ */
+/* $NetBSD: ofwoea_machdep.c,v 1.58 2021/03/05 02:58:13 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.57 2021/03/05 01:33:33 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.58 2021/03/05 02:58:13 thorpej Exp $");
 
 #include "ksyms.h"
 #include "wsdisplay.h"
@@ -136,8 +136,10 @@ extern uint32_t ticks_per_sec;
 extern uint32_t ns_per_tick;
 extern uint32_t ticks_per_intr;
 
+static void get_timebase_frequency(void);
+static void init_decrementer(void);
+
 static void restore_ofmap(void);
-static void set_timebase(void);
 
 void
 ofwoea_initppc(u_int startkernel, u_int endkernel, char *args)
@@ -172,6 +174,9 @@ ofwoea_initppc(u_int startkernel, u_int 
 			bootpath[len] = 0;
 	}
 
+	/* Get the timebase frequency from the firmware. */
+	get_timebase_frequency();
+
 	/* Initialize bus_space */
 	ofwoea_bus_space_init();
 
@@ -267,8 +272,8 @@ ofwoea_initppc(u_int startkernel, u_int 
 	ksyms_addsyms_elf((int)((uintptr_t)endsym - (uintptr_t)startsym), startsym, endsym);
 #endif
 
-	/* CPU clock stuff */
-	set_timebase();
+	/* Kick off the clock. */
+	init_decrementer();
 
 #ifdef DDB
 	if (boothowto & RB_KDB)
@@ -276,22 +281,22 @@ ofwoea_initppc(u_int startkernel, u_int 
 #endif
 }
 
-void
-set_timebase(void)
+static void
+get_timebase_frequency(void)
 {
-	int qhandle, phandle, msr, scratch, node;
+	int qhandle, phandle, node;
 	char type[32];
 
 	if (timebase_freq != 0) {
 		ticks_per_sec = timebase_freq;
-		goto found;
+		return;
 	}
 
 	node = OF_finddevice("/cpus/@0");
 	if (node != -1 &&
 	OF_getprop(node, "timebase-frequency", _per_sec,
 		   sizeof ticks_per_sec) > 0) {
-		goto found;
+		return;
 	}
 
 	node = OF_finddevice("/");
@@ -300,7 +305,7 @@ set_timebase(void)
 		&& strcmp(type, "cpu") == 0
 		&& OF_getprop(qhandle, "timebase-frequency",
 			_per_sec, sizeof ticks_per_sec) > 0) {
-			goto found;
+			return;
 		}
 		if ((phandle = OF_child(qhandle)))
 			continue;
@@ -311,8 +316,15 @@ set_timebase(void)
 		}
 	}
 	panic("no cpu node");
+}
+
+static void
+init_decrementer(void)
+{
+	int scratch, msr;
+
+	KASSERT(ticks_per_sec != 0);
 
-found:
 	__asm volatile ("mfmsr %0; andi. %1,%0,%2; mtmsr %1"
 		: "=r"(msr), "=r"(scratch) : "K"((u_short)~PSL_EE));
 	ns_per_tick = 10 / ticks_per_sec;
@@ -321,10 +333,10 @@ found:
 
 #ifdef PPC_OEA601
 	if ((mfpvr() >> 16) == MPC601)
-	curcpu()->ci_lasttb = rtc_nanosecs();
+		curcpu()->ci_lasttb = rtc_nanosecs();
 	else
 #endif
-	curcpu()->ci_lasttb = mftbl();
+		curcpu()->ci_lasttb = mftbl();
 
 	mtspr(SPR_DEC, ticks_per_intr);
 	mtmsr(msr);



CVS commit: src/sys/arch

2021-03-04 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Mar  5 01:33:33 UTC 2021

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

Log Message:
Move ofppc-specific CPU spinup code to ofppc/machdep.c


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/arch/ofppc/ofppc/machdep.c
cvs rdiff -u -r1.56 -r1.57 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/ofppc/ofppc/machdep.c
diff -u src/sys/arch/ofppc/ofppc/machdep.c:1.118 src/sys/arch/ofppc/ofppc/machdep.c:1.119
--- src/sys/arch/ofppc/ofppc/machdep.c:1.118	Sat Feb 27 02:52:49 2021
+++ src/sys/arch/ofppc/ofppc/machdep.c	Fri Mar  5 01:33:33 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.118 2021/02/27 02:52:49 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.119 2021/03/05 01:33:33 thorpej Exp $	*/
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.118 2021/02/27 02:52:49 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.119 2021/03/05 01:33:33 thorpej Exp $");
 
 #include "opt_ofwoea.h"
 
@@ -159,6 +159,30 @@ initppc(u_int startkernel, u_int endkern
 		}
 	}
 
+#if defined(MULTIPROCESSOR)
+	int l;
+	char cpupath[32];
+
+	extern void cpu_spinstart(u_int);
+	extern volatile u_int cpu_spinstart_ack;
+
+	for (i = 1; i < CPU_MAXNUM; i++) {
+		snprintf(cpupath, sizeof(cpupath), "/cpus/@%x", i);
+		node = OF_finddevice(cpupath);
+		if (node <= 0)
+			continue;
+		aprint_verbose("Starting up CPU %d %s\n", i, cpupath);
+		OF_start_cpu(node, (u_int)cpu_spinstart, i);
+		for (l = 0; l < 1; l++) {
+			if (cpu_spinstart_ack == i) {
+aprint_verbose("CPU %d spun up.\n", i);
+break;
+			}
+			__asm volatile ("sync");
+		}
+	}
+#endif /* MULTIPROCESSOR */
+
 	ofwoea_initppc(startkernel, endkernel, args);
 }
 

Index: src/sys/arch/powerpc/oea/ofwoea_machdep.c
diff -u src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.56 src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.57
--- src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.56	Sat Feb 27 02:52:48 2021
+++ src/sys/arch/powerpc/oea/ofwoea_machdep.c	Fri Mar  5 01:33:33 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: ofwoea_machdep.c,v 1.56 2021/02/27 02:52:48 thorpej Exp $ */
+/* $NetBSD: ofwoea_machdep.c,v 1.57 2021/03/05 01:33:33 thorpej Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.56 2021/02/27 02:52:48 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.57 2021/03/05 01:33:33 thorpej Exp $");
 
 #include "ksyms.h"
 #include "wsdisplay.h"
@@ -139,9 +139,6 @@ extern uint32_t ticks_per_intr;
 static void restore_ofmap(void);
 static void set_timebase(void);
 
-extern void cpu_spinstart(u_int);
-extern volatile u_int cpu_spinstart_ack;
-
 void
 ofwoea_initppc(u_int startkernel, u_int endkernel, char *args)
 {
@@ -156,35 +153,6 @@ ofwoea_initppc(u_int startkernel, u_int 
 	startsym = endsym = NULL;
 #endif
 
-	/* Initialize bus_space */
-	ofwoea_bus_space_init();
-
-	ofwoea_consinit();
-
-	if (ofw_quiesce)
-		OF_quiesce();
-
-#if defined(MULTIPROCESSOR) && defined(ofppc)
-	char cpupath[32];
-	int i, l, node;
-
-	for (i = 1; i < CPU_MAXNUM; i++) {
-		snprintf(cpupath, sizeof(cpupath), "/cpus/@%x", i);
-		node = OF_finddevice(cpupath);
-		if (node <= 0)
-			continue;
-		aprint_verbose("Starting up CPU %d %s\n", i, cpupath);
-		OF_start_cpu(node, (u_int)cpu_spinstart, i);
-		for (l = 0; l < 1; l++) {
-			if (cpu_spinstart_ack == i) {
-aprint_verbose("CPU %d spun up.\n", i);
-break;
-			}
-			__asm volatile ("sync");
-		}
-	}
-#endif
-
 	/* Parse the args string */
 	if (args) {
 		strcpy(bootpath, args);
@@ -204,6 +172,14 @@ ofwoea_initppc(u_int startkernel, u_int 
 			bootpath[len] = 0;
 	}
 
+	/* Initialize bus_space */
+	ofwoea_bus_space_init();
+
+	ofwoea_consinit();
+
+	if (ofw_quiesce)
+		OF_quiesce();
+
 	oea_init(pic_ext_intr);
 
 	/*



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

2021-03-04 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Fri Mar  5 01:31:43 UTC 2021

Modified Files:
src/sys/arch/ofppc/conf: GENERIC.MP

Log Message:
Don't include mvgbe in this kernel config; that driver has an explicit
warning for the MULTIPROCESSOR case.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/ofppc/conf/GENERIC.MP

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/ofppc/conf/GENERIC.MP
diff -u src/sys/arch/ofppc/conf/GENERIC.MP:1.18 src/sys/arch/ofppc/conf/GENERIC.MP:1.19
--- src/sys/arch/ofppc/conf/GENERIC.MP:1.18	Thu Feb  9 19:04:04 2012
+++ src/sys/arch/ofppc/conf/GENERIC.MP	Fri Mar  5 01:31:43 2021
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC.MP,v 1.18 2012/02/09 19:04:04 matt Exp $
+# $NetBSD: GENERIC.MP,v 1.19 2021/03/05 01:31:43 thorpej Exp $
 #
 # GENERIC machine description file
 # 
@@ -24,3 +24,6 @@ include 	"arch/ofppc/conf/GENERIC"
 options 	MULTIPROCESSOR
 options 	IPI_OPENPIC
 options 	PMAP_NEED_FULL_MAPKERNEL
+
+no mvgbec*	at gt?
+no mvgbe0	at mvgbec?



CVS commit: src/sys/arch/sparc64/dev

2021-03-04 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Thu Mar  4 20:59:39 UTC 2021

Modified Files:
src/sys/arch/sparc64/dev: vnet.c

Log Message:
sun4v: add vnet driver from openbsd - compiles but probably does not work yet - 
still WIP (now with NetBSD cvs tag and compiles for 32-bit SUN4U


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/sparc64/dev/vnet.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/sparc64/dev/vnet.c
diff -u src/sys/arch/sparc64/dev/vnet.c:1.1 src/sys/arch/sparc64/dev/vnet.c:1.2
--- src/sys/arch/sparc64/dev/vnet.c:1.1	Thu Mar  4 20:17:00 2021
+++ src/sys/arch/sparc64/dev/vnet.c	Thu Mar  4 20:59:39 2021
@@ -1,3 +1,4 @@
+/*	$NetBSD: vnet.c,v 1.2 2021/03/04 20:59:39 palle Exp $	*/
 /*	$OpenBSD: vnet.c,v 1.62 2020/07/10 13:26:36 patrick Exp $	*/
 /*
  * Copyright (c) 2009, 2015 Mark Kettenis
@@ -265,7 +266,7 @@ vnet_attach(struct device *parent, struc
 	sc->sc_tx_ino = ca->ca_tx_ino;
 	sc->sc_rx_ino = ca->ca_rx_ino;
 
-	printf(": ivec 0x%lx, 0x%lx", sc->sc_tx_ino, sc->sc_rx_ino);
+	printf(": ivec 0x%" PRIx64 ", 0x%" PRIx64, sc->sc_tx_ino, sc->sc_rx_ino);
 
 	/*
 	 * Un-configure queues before registering interrupt handlers,
@@ -488,7 +489,7 @@ FIXME openbsd			
 	if (rx_head == rx_tail)
 		return (0);
 
-	lp = (struct ldc_pkt *)(lc->lc_rxq->lq_va + rx_head);
+	lp = (struct ldc_pkt *)(uintptr_t)(lc->lc_rxq->lq_va + rx_head);
 	switch (lp->type) {
 	case LDC_CTRL:
 		ldc_rx_ctrl(lc, lp);



CVS commit: src/sys/dev/ic

2021-03-04 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Mar  4 20:30:39 UTC 2021

Modified Files:
src/sys/dev/ic: sti.c

Log Message:
Trailing whitespace


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/dev/ic/sti.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/ic/sti.c
diff -u src/sys/dev/ic/sti.c:1.25 src/sys/dev/ic/sti.c:1.26
--- src/sys/dev/ic/sti.c:1.25	Sat Dec 26 08:58:03 2020
+++ src/sys/dev/ic/sti.c	Thu Mar  4 20:30:39 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: sti.c,v 1.25 2020/12/26 08:58:03 tsutsui Exp $	*/
+/*	$NetBSD: sti.c,v 1.26 2021/03/04 20:30:39 skrll Exp $	*/
 
 /*	$OpenBSD: sti.c,v 1.61 2009/09/05 14:09:35 miod Exp $	*/
 
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sti.c,v 1.25 2020/12/26 08:58:03 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sti.c,v 1.26 2021/03/04 20:30:39 skrll Exp $");
 
 #include "wsdisplay.h"
 
@@ -1260,7 +1260,7 @@ static const uint8_t
 sti_unitoroman[0x100 - 0xa0] = {
 	0xa0, 0xb8, 0xbf, 0xbb, 0xba, 0xbc,0, 0xbd,
 	0xab,0, 0xf9, 0xfb,0, 0xf6,0, 0xb0,
-	
+
 	0xb3, 0xfe,0,0, 0xa8, 0xf3, 0xf4, 0xf2,
 	   0,0, 0xfa, 0xfd, 0xf7, 0xf8,0, 0xb9,
 
@@ -1425,11 +1425,11 @@ sti_alloc_attr(void *v, int fg, int bg, 
 	WSATTR_UNDERLINE | WSATTR_WSCOLORS)) != 0)
 		return EINVAL;
 	if ((flags & WSATTR_REVERSE) != 0) {
-		fg = STI_COLOUR_BLACK; 
+		fg = STI_COLOUR_BLACK;
 		bg = STI_COLOUR_WHITE;
 	} else {
 		fg = STI_COLOUR_WHITE;
-		bg = STI_COLOUR_BLACK; 
+		bg = STI_COLOUR_BLACK;
 	}
 
 	*pattr = WSATTR_PACK(fg, bg, flags);



CVS commit: src/sys/arch/sparc64

2021-03-04 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Thu Mar  4 20:17:00 UTC 2021

Modified Files:
src/sys/arch/sparc64/conf: GENERIC files.sparc64
Added Files:
src/sys/arch/sparc64/dev: vnet.c

Log Message:
sun4v: add vnet driver from openbsd - compiles but probably does not work yet - 
still WIP


To generate a diff of this commit:
cvs rdiff -u -r1.234 -r1.235 src/sys/arch/sparc64/conf/GENERIC
cvs rdiff -u -r1.163 -r1.164 src/sys/arch/sparc64/conf/files.sparc64
cvs rdiff -u -r0 -r1.1 src/sys/arch/sparc64/dev/vnet.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/sparc64/conf/GENERIC
diff -u src/sys/arch/sparc64/conf/GENERIC:1.234 src/sys/arch/sparc64/conf/GENERIC:1.235
--- src/sys/arch/sparc64/conf/GENERIC:1.234	Sun Jan 31 08:07:25 2021
+++ src/sys/arch/sparc64/conf/GENERIC	Thu Mar  4 20:17:00 2021
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.234 2021/01/31 08:07:25 martin Exp $
+# $NetBSD: GENERIC,v 1.235 2021/03/04 20:17:00 palle Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/sparc64/conf/std.sparc64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.234 $"
+#ident		"GENERIC-$Revision: 1.235 $"
 
 maxusers	64
 
@@ -248,6 +248,7 @@ iic* 	at jbusi2c?
 # Virtual devices for sun4v systems.
 vrtc0	at vbus?
 vdsk*	at cbus?
+vnet*	at cbus?
 
  Serial port configuration
 

Index: src/sys/arch/sparc64/conf/files.sparc64
diff -u src/sys/arch/sparc64/conf/files.sparc64:1.163 src/sys/arch/sparc64/conf/files.sparc64:1.164
--- src/sys/arch/sparc64/conf/files.sparc64:1.163	Wed Oct 21 13:31:52 2020
+++ src/sys/arch/sparc64/conf/files.sparc64	Thu Mar  4 20:17:00 2021
@@ -1,4 +1,4 @@
-#	$NetBSD: files.sparc64,v 1.163 2020/10/21 13:31:52 christos Exp $
+#	$NetBSD: files.sparc64,v 1.164 2021/03/04 20:17:00 palle Exp $
 
 # @(#)files.sparc64	8.1 (Berkeley) 7/19/93
 # sparc64-specific configuration info
@@ -332,3 +332,8 @@ file	arch/sparc64/dev/ldc.c			ldc
 device	vdsk: ldc, scsi
 attach	vdsk at cbus
 file	arch/sparc64/dev/vdsk.c			vdsk
+
+# Virtual network
+device	vnet: ldc
+attach	vnet at cbus
+file	arch/sparc64/dev/vnet.c			vnet

Added files:

Index: src/sys/arch/sparc64/dev/vnet.c
diff -u /dev/null src/sys/arch/sparc64/dev/vnet.c:1.1
--- /dev/null	Thu Mar  4 20:17:00 2021
+++ src/sys/arch/sparc64/dev/vnet.c	Thu Mar  4 20:17:00 2021
@@ -0,0 +1,1889 @@
+/*	$OpenBSD: vnet.c,v 1.62 2020/07/10 13:26:36 patrick Exp $	*/
+/*
+ * Copyright (c) 2009, 2015 Mark Kettenis
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#if 0
+FIXME openbsd
+#include "bpfilter.h"
+#endif
+
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#if 0
+FIXME openbsd
+#include 
+#endif
+
+#include 
+#include 
+#include 
+
+#include 
+#include 
+
+#include 
+#include 
+
+#if NBPFILTER > 0
+#include 
+#endif
+
+#include 
+
+#include 
+#include 
+#include 
+
+#ifdef VNET_DEBUG
+#define DPRINTF(x)	printf x
+#else
+#define DPRINTF(x)
+#endif
+
+#define VNET_TX_ENTRIES		32
+#define VNET_RX_ENTRIES		32
+
+struct vnet_attr_info {
+	struct vio_msg_tag	tag;
+	uint8_t			xfer_mode;
+	uint8_t			addr_type;
+	uint16_t		ack_freq;
+	uint32_t		_reserved1;
+	uint64_t		addr;
+	uint64_t		mtu;
+	uint64_t		_reserved2[3];
+};
+
+/* Address types. */
+#define VNET_ADDR_ETHERMAC	0x01
+
+/* Sub-Type envelopes. */
+#define VNET_MCAST_INFO		0x0101
+
+#define VNET_NUM_MCAST		7
+
+struct vnet_mcast_info {
+	struct vio_msg_tag	tag;
+	uint8_t			set;
+	uint8_t			count;
+	uint8_t			mcast_addr[VNET_NUM_MCAST][ETHER_ADDR_LEN];
+	uint32_t		_reserved;
+};
+
+struct vnet_desc {
+	struct vio_dring_hdr	hdr;
+	uint32_t		nbytes;
+	uint32_t		ncookies;
+	struct ldc_cookie	cookie[2];
+};
+
+struct vnet_desc_msg {
+	struct vio_msg_tag	tag;
+	uint64_t		seq_no;
+	uint64_t		desc_handle;
+	uint32_t		nbytes;
+	uint32_t		ncookies;
+	struct ldc_cookie	cookie[1];
+};
+
+struct vnet_dring {
+	bus_dmamap_t		vd_map;
+	bus_dma_segment_t	vd_seg;
+	struct vnet_desc	*vd_desc;
+	int			vd_nentries;
+};
+
+struct vnet_dring *vnet_dring_alloc(bus_dma_tag_t, int);
+void	vnet_dring_free(bus_dma_tag_t, struct vnet_dring *);
+
+/*
+ * For now, we only support vNet 1.0.
+ */

CVS commit: src/sys/arch/sparc64/doc

2021-03-04 Thread Palle Lyckegaard
Module Name:src
Committed By:   palle
Date:   Thu Mar  4 20:00:51 UTC 2021

Modified Files:
src/sys/arch/sparc64/doc: TODO

Log Message:
sun4v: update TODO - removed leftover OpenFirmware interface comment and add 
comment on idle handling


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/sparc64/doc/TODO

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

Modified files:

Index: src/sys/arch/sparc64/doc/TODO
diff -u src/sys/arch/sparc64/doc/TODO:1.36 src/sys/arch/sparc64/doc/TODO:1.37
--- src/sys/arch/sparc64/doc/TODO:1.36	Sat Feb 27 18:29:38 2021
+++ src/sys/arch/sparc64/doc/TODO	Thu Mar  4 20:00:51 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: TODO,v 1.36 2021/02/27 18:29:38 palle Exp $ */
+/* $NetBSD: TODO,v 1.37 2021/03/04 20:00:51 palle Exp $ */
 
 Things to be done:
 
@@ -18,9 +18,9 @@ sun4v:
 	   Installation is not possible, since no driver currently exists
 	   for the ldom network interfaces, but openbsd vnet and vsw drivers are
 	   possible to integrate and this work is progressing.
-	   OpenBoot (properly trashed registers).
 	 T2000 ldom with 8 VCPU and 4GB:
 	   On this platform it crashes in /sbin/init doing an access() call where %o0 is corrupted (zero)
+- idle handling - call hypervisor trap (openbsd code...??)	   
 - 64-bit kernel support
 - 32-bit kernel support
 - libkvm



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

2021-03-04 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Thu Mar  4 19:01:41 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: std.xen

Log Message:
std.xen: Move towards std.amd64

(No functional change.)


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/amd64/conf/std.xen

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/conf/std.xen
diff -u src/sys/arch/amd64/conf/std.xen:1.13 src/sys/arch/amd64/conf/std.xen:1.14
--- src/sys/arch/amd64/conf/std.xen:1.13	Sat Apr 25 15:26:16 2020
+++ src/sys/arch/amd64/conf/std.xen	Thu Mar  4 19:01:41 2021
@@ -1,20 +1,20 @@
-# $NetBSD: std.xen,v 1.13 2020/04/25 15:26:16 bouyer Exp $
-# NetBSD: std.i386,v 1.24 2003/02/26 21:33:36 fvdl Exp 
+# $NetBSD: std.xen,v 1.14 2021/03/04 19:01:41 gdt Exp $
 #
-# standard, required NetBSD/i386 'options'
+# standard, required NetBSD/xen 'options'
+# Note that this file is used by both DOM0 and DOMU.
 
 machine xen amd64 x86
 include 	"conf/std"	# MI standard options
-include		"arch/xen/conf/files.xen.pv"
-
-options 	XEN	#Xen support
-
-include		"arch/xen/conf/std.xenversion"
+include 	"arch/xen/conf/std.xenversion"
 
 options 	CPU_IN_CKSUM
 options 	EXEC_ELF64	# exec ELF binaries
 options 	EXEC_SCRIPT	# exec #! scripts
 options 	MTRR
+#options 	MULTIPROCESSOR
 
 options 	CHILD_MAX=1024	# 160 is too few
 options 	OPEN_MAX=1024	# 128 is too few
+
+options 	XEN		# Xen support
+include 	"arch/xen/conf/files.xen.pv"



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

2021-03-04 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Thu Mar  4 16:02:11 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: XEN3_DOM0

Log Message:
XEN3_DOM0: Move closer to GENERIC (NFC)

This is another step in making XEN3_DOM0 closer to GENERIC.  It is
just reordering lines, adding commented out lines, and adding a few
comments.  (Test-booted with no dmesg change.)

This pass is showing cases where there are substantive and likely
undesired changes (e.g., UFS_ACL is not defined in XEN3_DOM0).  Often
I added them but commented them out to preserve the NFC property of
this commit.  My plan is to finish the easy NFC stuff first before
addressing functional changes.


To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/sys/arch/amd64/conf/XEN3_DOM0

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/conf/XEN3_DOM0
diff -u src/sys/arch/amd64/conf/XEN3_DOM0:1.190 src/sys/arch/amd64/conf/XEN3_DOM0:1.191
--- src/sys/arch/amd64/conf/XEN3_DOM0:1.190	Wed Mar  3 12:31:19 2021
+++ src/sys/arch/amd64/conf/XEN3_DOM0	Thu Mar  4 16:02:10 2021
@@ -1,4 +1,4 @@
-# $NetBSD: XEN3_DOM0,v 1.190 2021/03/03 12:31:19 gdt Exp $
+# $NetBSD: XEN3_DOM0,v 1.191 2021/03/04 16:02:10 gdt Exp $
 
 # XEN3_DOM0 machine description file
 #
@@ -14,7 +14,7 @@ include 	"arch/amd64/conf/std.xen"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"XEN3_DOM0-$Revision: 1.190 $"
+#ident		"XEN3_DOM0-$Revision: 1.191 $"
 
 maxusers	32		# estimated number of users
 
@@ -80,6 +80,7 @@ options 	SYSVSHM		# System V-like memory
 
 options 	MODULAR		# new style module(7) framework
 options 	USERCONF	# userconf(4) support
+#options 	PIPE_SOCKETPAIR	# smaller, but slower pipe(2)
 options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel
 
 # Alternate buffer queue strategies for better responsiveness under high
@@ -108,9 +109,55 @@ options 	DDB_HISTORY_SIZE=512	# enable h
 #options 	SYSCALL_STATS	# per syscall counts
 #options 	SYSCALL_TIMES	# per syscall times
 #options 	SYSCALL_TIMES_HASCOUNTER	# use 'broken' rdtsc (soekris)
+#options 	KDTRACE_HOOKS	# kernel DTrace hooks
+
+# Kernel Undefined Behavior Sanitizer (kUBSan).
+#options 	KUBSAN			# mandatory
+#options 	UBSAN_ALWAYS_FATAL	# optional: panic on all kUBSan reports
+
+# Kernel Address Sanitizer (kASan). You need to disable SVS to use it.
+# The quarantine is optional and can help KASAN find more use-after-frees.
+# Use KASAN_PANIC if you want panics instead of warnings.
+#makeoptions 	KASAN=1		# mandatory
+#options 	KASAN		# mandatory
+#no options	SVS		# mandatory
+#options 	POOL_QUARANTINE	# optional
+#options 	KASAN_PANIC	# optional
+
+# Kernel Concurrency Sanitizer (kCSan).
+#makeoptions 	KCSAN=1		# mandatory
+#options 	KCSAN		# mandatory
+#options 	KCSAN_PANIC	# optional
+
+# Kernel Memory Sanitizer (kMSan). You need to disable SVS and kernel modules
+# to use it. POOL_NOCACHE is optional and can help KMSAN find uninitialized
+# memory in pool caches. Note that KMSAN requires at least 4GB of RAM.
+#makeoptions 	KMSAN=1		# mandatory
+#options 	KMSAN		# mandatory
+#no options	SVS		# mandatory
+#no options 	MODULAR		# mandatory
+#no options 	MODULAR_DEFAULT_AUTOLOAD	# mandatory
+#options 	POOL_NOCACHE	# optional
+#options 	KMSAN_PANIC	# optional
+
+# Kernel Code Coverage Driver.
+#makeoptions	KCOV=1
+#options 	KCOV
+
+# Fault Injection Driver.
+#options 	FAULT
 
 # Compatibility options
+# x86_64 never shipped with a.out binaries; the two options below are
+# only relevant to 32-bit i386 binaries
+#options 	EXEC_AOUT	# required by binaries from before 1.5
+#options 	COMPAT_NOMID	# NetBSD 0.8, 386BSD, and BSDI
+
+# NetBSD backward compatibility. Support goes from COMPAT_15 up until
+# the latest release. Note that really old compat (< COMPAT_16) is only
+# useful for 32-bit i386 binaries.
 include 	"conf/compat_netbsd15.config"
+
 #options 	COMPAT_386BSD_MBRPART # recognize old partition ID
 
 options 	COMPAT_NETBSD32
@@ -128,17 +175,23 @@ options 	DKWEDGE_METHOD_APPLE	# Support 
 include "conf/filesystems.config"
 
 # File system options
+# ffs
 options 	QUOTA		# legacy UFS quotas
 options 	QUOTA2		# new, in-filesystem UFS quotas
-#options 	DISKLABEL_EI	# disklabel Endian Independent support
 #options 	FFS_EI		# FFS Endian Independent support
 options 	WAPBL		# File system journaling support
+# Note that UFS_DIRHASH is suspected of causing kernel memory corruption.
+# It is not recommended for general use.
 #options 	UFS_DIRHASH	# UFS Large Directory Hashing - Experimental
-options 	NFSSERVER	# Network File System server
+#options		UFS_ACL		# UFS Access Control Lists
 #options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
 options 	UFS_EXTATTR	# Extended attribute support for UFS1
+# ext2fs
 #options 	EXT2FS_SYSTEM_FLAGS # makes ext2fs file flags (append and
 # immutable) behave as system flags.
+# other
+#options 	DISKLABEL_EI	

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

2021-03-04 Thread Greg Troxel
Module Name:src
Committed By:   gdt
Date:   Thu Mar  4 15:58:50 UTC 2021

Modified Files:
src/sys/arch/amd64/conf: GENERIC

Log Message:
GENERIC: Tiny comment adjustment (NFC)

While making XEN3_DOM0 more like GENERIC, I noticed a few differences
where GENERIC was off -- trivial things like missing spaces in
comments, inconsistent comment workding.  This fixes those, both
because they are valid fixes in their own right once noticed, and to
make the diff to XEN smaller.


To generate a diff of this commit:
cvs rdiff -u -r1.584 -r1.585 src/sys/arch/amd64/conf/GENERIC

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

Modified files:

Index: src/sys/arch/amd64/conf/GENERIC
diff -u src/sys/arch/amd64/conf/GENERIC:1.584 src/sys/arch/amd64/conf/GENERIC:1.585
--- src/sys/arch/amd64/conf/GENERIC:1.584	Mon Mar  1 18:12:58 2021
+++ src/sys/arch/amd64/conf/GENERIC	Thu Mar  4 15:58:50 2021
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.584 2021/03/01 18:12:58 jakllsch Exp $
+# $NetBSD: GENERIC,v 1.585 2021/03/04 15:58:50 gdt Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include 	"arch/amd64/conf/std.amd64"
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident		"GENERIC-$Revision: 1.584 $"
+#ident		"GENERIC-$Revision: 1.585 $"
 
 maxusers	64		# estimated number of users
 
@@ -297,7 +297,7 @@ config		netbsd	root on ? type ?
 # Device configuration
 #
 
-#IPMI support
+# IPMI support
 ipmi0		at mainbus?
 ipmi_acpi*	at acpi?
 ipmi0		at ipmi_acpi?
@@ -307,7 +307,7 @@ acpi0		at mainbus0
 options 	ACPI_SCANPCI		# find PCI roots using ACPI
 options 	MPBIOS			# configure CPUs and APICs using MPBIOS
 options 	MPBIOS_SCANPCI		# MPBIOS configures PCI roots
-#options 	PCI_INTR_FIXUP		# PCI interrupt routing via ACPI
+#options 	PCI_INTR_FIXUP		# fixup PCI interrupt routing via ACPI
 #options 	PCI_BUS_FIXUP		# fixup PCI bus numbering
 #options 	PCI_ADDR_FIXUP		# fixup PCI I/O addresses
 #options 	ACPI_ACTIVATE_DEV	# If set, activate inactive devices
@@ -317,7 +317,7 @@ options 	VGA_POST		# in-kernel support f
 acpiacad*	at acpi?		# ACPI AC Adapter
 acpibat*	at acpi?		# ACPI Battery
 acpibut*	at acpi?		# ACPI Button
-acpidalb*	at acpi?		# Direct Application Launch Button
+acpidalb*	at acpi?		# ACPI Direct Application Launch Button
 acpiec* 	at acpi?		# ACPI Embedded Controller (late)
 acpiecdt*	at acpi?		# ACPI Embedded Controller (early)
 acpifan*	at acpi?		# ACPI Fan



CVS commit: src/external/mit/ctwm/etc

2021-03-04 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Thu Mar  4 08:35:59 UTC 2021

Modified Files:
src/external/mit/ctwm/etc: system.ctwmrc

Log Message:
ctwmrc: disable NoTitleFocus to prevent multiple windows having focus

some investigation help from Rhialto


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/external/mit/ctwm/etc/system.ctwmrc

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

Modified files:

Index: src/external/mit/ctwm/etc/system.ctwmrc
diff -u src/external/mit/ctwm/etc/system.ctwmrc:1.11 src/external/mit/ctwm/etc/system.ctwmrc:1.12
--- src/external/mit/ctwm/etc/system.ctwmrc:1.11	Sat Feb 27 12:28:17 2021
+++ src/external/mit/ctwm/etc/system.ctwmrc	Thu Mar  4 08:35:58 2021
@@ -1,5 +1,5 @@
 #
-# $NetBSD: system.ctwmrc,v 1.11 2021/02/27 12:28:17 nia Exp $
+# $NetBSD: system.ctwmrc,v 1.12 2021/03/04 08:35:58 nia Exp $
 #
 # ctwmrc by nia
 #
@@ -148,7 +148,7 @@ StayUpMenus
 WarpToDefaultMenuEntry
 MenuShadowDepth  1
 
-NoTitleFocus
+TitleFocus
 
 # warp through all windows in the current workspace
 WindowRing