CVS commit: src/sys/arch/evbsh3/evbsh3

2020-07-11 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Sun Jul 12 03:52:51 UTC 2020

Modified Files:
src/sys/arch/evbsh3/evbsh3: locore.S

Log Message:
Use symbolic constants for SR and CCR init values.
Same object code is generated.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbsh3/evbsh3/locore.S

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

Modified files:

Index: src/sys/arch/evbsh3/evbsh3/locore.S
diff -u src/sys/arch/evbsh3/evbsh3/locore.S:1.12 src/sys/arch/evbsh3/evbsh3/locore.S:1.13
--- src/sys/arch/evbsh3/evbsh3/locore.S:1.12	Sun Jul 12 01:52:22 2020
+++ src/sys/arch/evbsh3/evbsh3/locore.S	Sun Jul 12 03:52:51 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.12 2020/07/12 01:52:22 uwe Exp $	*/
+/*	$NetBSD: locore.S,v 1.13 2020/07/12 03:52:51 uwe Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -81,6 +81,7 @@
 #endif
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -111,7 +112,7 @@ ALTENTRY(kernel_text)
 	bra	start1
 	nop
 	.align	2
-SR_init:	.long	0x50F0
+SR_init:	.long	PSL_MD | PSL_BL | PSL_IMASK
 REG_SYMBOL(MMUCR)
 start1:
 
@@ -230,8 +231,8 @@ XLinitSH3:	.long	_C_LABEL(initSH3)
 XLmain:		.long	_C_LABEL(main)
 XLtoP2:		.long	0x2000
 REG_SYMBOL(CCR)
-#ifdef SH4
-XL_CCRVAL:	.long	0x0909 /* Operand cache ON */
+#ifdef SH4	/* invalidate and enable instruction and operand caches */
+XL_CCRVAL:	.long	SH4_CCR_ICI | SH4_CCR_ICE | SH4_CCR_OCI | SH4_CCR_OCE
 #endif /* SH4 */
 
 load_and_reset:



CVS commit: src/sys/arch/evbsh3/evbsh3

2020-07-11 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Sun Jul 12 03:52:51 UTC 2020

Modified Files:
src/sys/arch/evbsh3/evbsh3: locore.S

Log Message:
Use symbolic constants for SR and CCR init values.
Same object code is generated.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/evbsh3/evbsh3/locore.S

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



CVS commit: src/sbin/wsconsctl

2020-07-11 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Jul 12 03:37:07 UTC 2020

Modified Files:
src/sbin/wsconsctl: wsconsctl.8

Log Message:
More keyboard layouts


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sbin/wsconsctl/wsconsctl.8

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

Modified files:

Index: src/sbin/wsconsctl/wsconsctl.8
diff -u src/sbin/wsconsctl/wsconsctl.8:1.28 src/sbin/wsconsctl/wsconsctl.8:1.29
--- src/sbin/wsconsctl/wsconsctl.8:1.28	Tue Feb 14 11:05:32 2012
+++ src/sbin/wsconsctl/wsconsctl.8	Sun Jul 12 03:37:06 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: wsconsctl.8,v 1.28 2012/02/14 11:05:32 wiz Exp $
+.\" $NetBSD: wsconsctl.8,v 1.29 2020/07/12 03:37:06 nia Exp $
 .\"
 .\" Copyright (c) 1998, 2004 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 June 9, 2009
+.Dd July 12, 2020
 .Dt WSCONSCTL 8
 .Os
 .Sh NAME
@@ -115,10 +115,11 @@ There are also definitions relating to v
 control, which are not applicable to all display types, and to text
 emulation and graphics (mapped) modes.
 .Pp
-In addition to British, US, and US-Dvorak keyboard encodings, support
-currently exists for the following languages: Belgian, Danish, Finnish,
-French, German, Greek, Hungarian, Italian, Japanese, Norwegian, Polish,
-Portuguese, Russian, Spanish, Swedish, Swiss, and Ukrainian.
+In addition to British, US, and US-Dvorak keyboard encodings,
+support currently exists for the following languages: Belgian,
+Brazilian, Danish, Finnish, French, German, Greek, Hungarian,
+Italian, Japanese, Norwegian, Polish, Portuguese, Russian, Spanish,
+Swedish, Swiss, Turkish, and Ukrainian.
 Additionally, a user-defined encoding is supported.
 .Sh FILES
 .Bl -tag -width /dev/wsmouse



CVS commit: src/sbin/wsconsctl

2020-07-11 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Jul 12 03:37:07 UTC 2020

Modified Files:
src/sbin/wsconsctl: wsconsctl.8

Log Message:
More keyboard layouts


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sbin/wsconsctl/wsconsctl.8

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



CVS commit: src/games/hangman

2020-07-11 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 12 02:34:54 UTC 2020

Modified Files:
src/games/hangman: prdata.c

Log Message:
Avoid messing up the display when too many letters are guessed at once.

The field to put them in was made 26 characters wide... but includes
the string "Guessed: ". So if you get to 17 it wraps to the next line
and clreol()'s it. Instead, when reaching this point step on the
"Guessed:" string instead.

Reported by phil@.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/games/hangman/prdata.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/hangman/prdata.c
diff -u src/games/hangman/prdata.c:1.7 src/games/hangman/prdata.c:1.8
--- src/games/hangman/prdata.c:1.7	Sat Oct 13 21:03:09 2012
+++ src/games/hangman/prdata.c	Sun Jul 12 02:34:54 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: prdata.c,v 1.7 2012/10/13 21:03:09 dholland Exp $	*/
+/*	$NetBSD: prdata.c,v 1.8 2020/07/12 02:34:54 dholland Exp $	*/
 
 /*-
  * Copyright (c) 1983, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)prdata.c	8.1 (Berkeley) 5/31/93";
 #else
-__RCSID("$NetBSD: prdata.c,v 1.7 2012/10/13 21:03:09 dholland Exp $");
+__RCSID("$NetBSD: prdata.c,v 1.8 2020/07/12 02:34:54 dholland Exp $");
 #endif
 #endif /* not lint */
 
@@ -47,9 +47,17 @@ __RCSID("$NetBSD: prdata.c,v 1.7 2012/10
 void
 prdata(void)
 {
-	int i;
+	int i, n, l;
 
-	move(GUESSY, GUESSX + sizeof "Guessed: ");
+	for (i = n = 0; i < 26; i++)
+		if (Guessed[i])
+			n++;
+
+	move(GUESSY, GUESSX);
+	l = sizeof "Guessed: ";
+	if (GUESSX + l + n < COLS) {
+		addstr("Guessed: ");
+	}
 	for (i = 0; i < 26; i++)
 		if (Guessed[i])
 			addch(i + 'a');



CVS commit: src/games/hangman

2020-07-11 Thread David A. Holland
Module Name:src
Committed By:   dholland
Date:   Sun Jul 12 02:34:54 UTC 2020

Modified Files:
src/games/hangman: prdata.c

Log Message:
Avoid messing up the display when too many letters are guessed at once.

The field to put them in was made 26 characters wide... but includes
the string "Guessed: ". So if you get to 17 it wraps to the next line
and clreol()'s it. Instead, when reaching this point step on the
"Guessed:" string instead.

Reported by phil@.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/games/hangman/prdata.c

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



CVS commit: src/doc

2020-07-11 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Jul 12 02:09:52 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
doc/CHANGES: Added KB_BR


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

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

Modified files:

Index: src/doc/CHANGES
diff -u src/doc/CHANGES:1.2709 src/doc/CHANGES:1.2710
--- src/doc/CHANGES:1.2709	Sat Jul  4 21:03:50 2020
+++ src/doc/CHANGES	Sun Jul 12 02:09:51 2020
@@ -1,4 +1,4 @@
-# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2709 $>
+# LIST OF CHANGES FROM LAST RELEASE:			<$Revision: 1.2710 $>
 #
 #
 # [Note: This file does not mention every change made to the NetBSD source tree.
@@ -243,3 +243,5 @@ Changes from NetBSD 9.0 to NetBSD 10.0:
 	dhcpcd: Import version 9.1.4 [roy 20200703]
 	x86: Xen kernels now use the same kernel modules as native kernels.
 		[chs 20200704]
+	wskbd(4): Added Brazilian keyboard layout (KB_BR) to pckbd(4) and
+		ukbd(4). [nia 20200712]



CVS commit: src/doc

2020-07-11 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Jul 12 02:09:52 UTC 2020

Modified Files:
src/doc: CHANGES

Log Message:
doc/CHANGES: Added KB_BR


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

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



CVS commit: src/sys/arch/evbsh3/evbsh3

2020-07-11 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Sun Jul 12 01:52:22 UTC 2020

Modified Files:
src/sys/arch/evbsh3/evbsh3: locore.S

Log Message:
Wrap _ROM_START in #ifdef ROMIMAGE to match its use.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbsh3/evbsh3/locore.S

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

Modified files:

Index: src/sys/arch/evbsh3/evbsh3/locore.S
diff -u src/sys/arch/evbsh3/evbsh3/locore.S:1.11 src/sys/arch/evbsh3/evbsh3/locore.S:1.12
--- src/sys/arch/evbsh3/evbsh3/locore.S:1.11	Sat Oct  7 01:21:47 2006
+++ src/sys/arch/evbsh3/evbsh3/locore.S	Sun Jul 12 01:52:22 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.11 2006/10/07 01:21:47 tsutsui Exp $	*/
+/*	$NetBSD: locore.S,v 1.12 2020/07/12 01:52:22 uwe Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -223,7 +223,9 @@ ___etext:	.long	_C_LABEL(etext)
 ___end:		.long	_C_LABEL(end)
 XLtmpstk:	.long	INIT_STACK
 _KERNBASE:	.long	0x8c00
+#ifdef ROMIMAGE
 _ROM_START:	.long	IOM_ROM_BEGIN
+#endif
 XLinitSH3:	.long	_C_LABEL(initSH3)
 XLmain:		.long	_C_LABEL(main)
 XLtoP2:		.long	0x2000



CVS commit: src/sys/arch/evbsh3/evbsh3

2020-07-11 Thread Valeriy E. Ushakov
Module Name:src
Committed By:   uwe
Date:   Sun Jul 12 01:52:22 UTC 2020

Modified Files:
src/sys/arch/evbsh3/evbsh3: locore.S

Log Message:
Wrap _ROM_START in #ifdef ROMIMAGE to match its use.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/evbsh3/evbsh3/locore.S

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



CVS commit: src/sys/dev

2020-07-11 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Jul 12 01:44:24 UTC 2020

Modified Files:
src/sys/dev/hid: hidkbdmap.c
src/sys/dev/pckbport: wskbdmap_mfii.c

Log Message:
Bring br.nodead closer to X11


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/hid/hidkbdmap.c
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/pckbport/wskbdmap_mfii.c

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



CVS commit: src/sys/dev

2020-07-11 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Jul 12 01:44:24 UTC 2020

Modified Files:
src/sys/dev/hid: hidkbdmap.c
src/sys/dev/pckbport: wskbdmap_mfii.c

Log Message:
Bring br.nodead closer to X11


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/dev/hid/hidkbdmap.c
cvs rdiff -u -r1.28 -r1.29 src/sys/dev/pckbport/wskbdmap_mfii.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/hid/hidkbdmap.c
diff -u src/sys/dev/hid/hidkbdmap.c:1.4 src/sys/dev/hid/hidkbdmap.c:1.5
--- src/sys/dev/hid/hidkbdmap.c:1.4	Sun Jul 12 01:35:59 2020
+++ src/sys/dev/hid/hidkbdmap.c	Sun Jul 12 01:44:24 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: hidkbdmap.c,v 1.4 2020/07/12 01:35:59 nia Exp $	*/
+/*	$NetBSD: hidkbdmap.c,v 1.5 2020/07/12 01:44:24 nia Exp $	*/
 
 /*
  * Copyright (c) 1999,2001 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hidkbdmap.c,v 1.4 2020/07/12 01:35:59 nia Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hidkbdmap.c,v 1.5 2020/07/12 01:44:24 nia Exp $");
 
 #include 
 #include 
@@ -649,6 +649,7 @@ static const keysym_t hidkbd_keydesc_br[
 
 static const keysym_t hidkbd_keydesc_br_nodead[] = {
 /*  pos  normal shifted altgr   shift-altgr */
+KC(35),  KS_6,		KS_diaeresis,	KS_notsign,	KS_dead_diaeresis,
 KC(47),  KS_apostrophe,	KS_grave,	KS_dead_acute,	KS_dead_grave,
 KC(52),  KS_asciitilde,	KS_asciicircum,	KS_dead_tilde,	KS_dead_circumflex,
 };

Index: src/sys/dev/pckbport/wskbdmap_mfii.c
diff -u src/sys/dev/pckbport/wskbdmap_mfii.c:1.28 src/sys/dev/pckbport/wskbdmap_mfii.c:1.29
--- src/sys/dev/pckbport/wskbdmap_mfii.c:1.28	Sun Jul 12 01:35:59 2020
+++ src/sys/dev/pckbport/wskbdmap_mfii.c	Sun Jul 12 01:44:24 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: wskbdmap_mfii.c,v 1.28 2020/07/12 01:35:59 nia Exp $	*/
+/*	$NetBSD: wskbdmap_mfii.c,v 1.29 2020/07/12 01:44:24 nia Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wskbdmap_mfii.c,v 1.28 2020/07/12 01:35:59 nia Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wskbdmap_mfii.c,v 1.29 2020/07/12 01:44:24 nia Exp $");
 
 #include "opt_wskbdmap.h"
 #include 
@@ -857,6 +857,7 @@ static const keysym_t pckbd_keydesc_br[]
 
 static const keysym_t pckbd_keydesc_br_nodead[] = {
 /*  pos  normal shifted altgr   shift-altgr */
+KC(7),   KS_6,		KS_diaeresis,	KS_notsign,	KS_dead_diaeresis,
 KC(26),  KS_apostrophe,	KS_grave,	KS_dead_acute,	KS_dead_grave,
 KC(40),  KS_asciitilde,	KS_asciicircum,	KS_dead_tilde,	KS_dead_circumflex,
 };



CVS commit: src

2020-07-11 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Jul 12 01:36:32 UTC 2020

Modified Files:
src/etc: wscons.conf
src/share/man/man4: pckbd.4

Log Message:
Update lists of keyboard layouts to add Turkish and Brazilian


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/etc/wscons.conf
cvs rdiff -u -r1.22 -r1.23 src/share/man/man4/pckbd.4

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



CVS commit: src

2020-07-11 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Jul 12 01:36:32 UTC 2020

Modified Files:
src/etc: wscons.conf
src/share/man/man4: pckbd.4

Log Message:
Update lists of keyboard layouts to add Turkish and Brazilian


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/etc/wscons.conf
cvs rdiff -u -r1.22 -r1.23 src/share/man/man4/pckbd.4

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

Modified files:

Index: src/etc/wscons.conf
diff -u src/etc/wscons.conf:1.19 src/etc/wscons.conf:1.20
--- src/etc/wscons.conf:1.19	Fri Jul 22 19:06:23 2011
+++ src/etc/wscons.conf	Sun Jul 12 01:36:32 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: wscons.conf,v 1.19 2011/07/22 19:06:23 christos Exp $
+#	$NetBSD: wscons.conf,v 1.20 2020/07/12 01:36:32 nia Exp $
 #
 # workstation console configuration
 
@@ -34,8 +34,8 @@ screen	4	-	-
 
 # Select a kernel builtin keyboard map by uncommenting the following line and
 # altering the country code to your requirements
-# (choose from user, us, uk, be, cz, dk, nl, fi, fr, de, gr, hu, it, jp, no,
-# pl, pt, ru, es, sv, sf, sg, ua)
+# (choose from user, us, uk, be, br, cz, dk, nl, fi, fr, de, gr, hu, it, jp,
+# no, pl, pt, ru, es, sv, sf, sg, tr, ua)
 # See wsconsctl(8), pckbd(4), ukbd(4) etc. for more details.
 #encoding sv
 #encoding us.swapctrlcaps

Index: src/share/man/man4/pckbd.4
diff -u src/share/man/man4/pckbd.4:1.22 src/share/man/man4/pckbd.4:1.23
--- src/share/man/man4/pckbd.4:1.22	Sat Jan 11 21:45:08 2020
+++ src/share/man/man4/pckbd.4	Sun Jul 12 01:36:32 2020
@@ -1,4 +1,4 @@
-.\" $NetBSD: pckbd.4,v 1.22 2020/01/11 21:45:08 nia Exp $
+.\" $NetBSD: pckbd.4,v 1.23 2020/07/12 01:36:32 nia Exp $
 .\"
 .\" Copyright (c) 1999
 .\" 	Matthias Drochner.  All rights reserved.
@@ -24,7 +24,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd January 11, 2020
+.Dd July 12, 2020
 .Dt PCKBD 4
 .Os
 .Sh NAME
@@ -62,6 +62,8 @@ The builtin mappings are at this time:
 .It Li KB_US Ta us Ta English/US keyboard mapping (default)
 .It Li KB_UK Ta uk Ta English/UK keyboard mapping
 .It Li KB_BE Ta be Ta Belgian
+.It Li KB_BR Ta br Ta Brazilian with
+.Dq dead accents
 .It Li KB_CZ Ta cz Ta Czech (QWERTY)
 .It Li KB_DK Ta dk Ta Danish with
 .Dq dead accents
@@ -84,6 +86,8 @@ The builtin mappings are at this time:
 .Dq dead accents
 .It Li KB_SF Ta sf Ta Swiss French
 .It Li KB_SG Ta sg Ta Swiss German
+.It Li KB_TR Ta tr Ta Turkish with
+.Dq dead accents
 .It Li KB_UA Ta ua Ta Ukrainian
 .It Li "KB_US|KB_DECLK" Ta \ Ta English/US mapping for Tn DEC
 .It Ta Ta LK400-style keyboards with PC keyboard
@@ -95,11 +99,16 @@ The builtin mappings are at this time:
 .El
 .Pp
 The
+.Li KB_BR ,
 .Li KB_DE ,
 .Li KB_DK ,
-.Li KB_NO
+.Li KB_NO ,
+.Li KB_NL ,
+.Li KB_SF ,
+.Li KB_SG ,
+.Li KB_SV ,
 and
-.Li KB_SV
+.Li KB_TR
 mappings can be used in the
 .Li KB_NODEAD (
 .Dq .nodead )



CVS commit: src/sys/dev

2020-07-11 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Jul 12 01:35:59 UTC 2020

Modified Files:
src/sys/dev/hid: hidkbdmap.c
src/sys/dev/pckbport: wskbdmap_mfii.c
src/sys/dev/wscons: wsksymdef.h

Log Message:
Add support for the Brazilian keyboard layout to pckbd and ukbd.

This is significantly different from the European Portugese layout,
and was pieced together from Wikipedia, X11 layout files, and to
some extent with trial and error.

Thanks to lun-4 for helping test this.

PR kern/44570


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/hid/hidkbdmap.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/pckbport/wskbdmap_mfii.c
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/wscons/wsksymdef.h

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

Modified files:

Index: src/sys/dev/hid/hidkbdmap.c
diff -u src/sys/dev/hid/hidkbdmap.c:1.3 src/sys/dev/hid/hidkbdmap.c:1.4
--- src/sys/dev/hid/hidkbdmap.c:1.3	Fri Apr 24 13:29:46 2020
+++ src/sys/dev/hid/hidkbdmap.c	Sun Jul 12 01:35:59 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: hidkbdmap.c,v 1.3 2020/04/24 13:29:46 rhialto Exp $	*/
+/*	$NetBSD: hidkbdmap.c,v 1.4 2020/07/12 01:35:59 nia Exp $	*/
 
 /*
  * Copyright (c) 1999,2001 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hidkbdmap.c,v 1.3 2020/04/24 13:29:46 rhialto Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hidkbdmap.c,v 1.4 2020/07/12 01:35:59 nia Exp $");
 
 #include 
 #include 
@@ -619,6 +619,40 @@ static const keysym_t hidkbd_keydesc_hu[
 KC(230), KS_Mode_switch,	KS_Multi_key
 };
 
+static const keysym_t hidkbd_keydesc_br[] = {
+/*  pos  normal shifted altgr   shift-altgr */
+KC(6),   KS_c,		KS_C,			KS_copyright,		KS_copyright,
+KC(8),   KS_e,		KS_E,			KS_currency,		KS_currency,
+KC(16),  KS_m,		KS_M,			KS_mu,			KS_mu,
+KC(20),  KS_q,		KS_Q,			KS_slash,		KS_slash,
+KC(21),  KS_r,		KS_R,			KS_registered,		KS_registered,
+KC(26),  KS_w,		KS_W,			KS_question,		KS_question,
+KC(30),  KS_1,		KS_exclam,		KS_onesuperior,		KS_exclamdown,
+KC(31),  KS_2,		KS_at,			KS_twosuperior,		KS_onehalf,
+KC(32),  KS_3,		KS_numbersign,		KS_threesuperior,	KS_threequarters,
+KC(33),  KS_4,		KS_dollar,		KS_sterling,		KS_onequarter,
+KC(34),  KS_5,		KS_percent,		KS_cent,		KS_cent,
+KC(35),  KS_6,		KS_dead_diaeresis,	KS_notsign,		KS_diaeresis,
+KC(46),  KS_equal,		KS_plus,		KS_section,		KS_dead_ogonek,
+KC(47),  KS_dead_acute,	KS_dead_grave,		KS_acute,		KS_grave,
+KC(48),  KS_bracketleft,	KS_braceleft,		KS_ordfeminine,		KS_macron,
+KC(49),  KS_bracketright,	KS_braceright,		KS_masculine,		KS_masculine,
+KC(50),  KS_bracketright,	KS_braceright,		KS_masculine,		KS_masculine,
+KC(51),  KS_ccedilla,	KS_Ccedilla,		KS_dead_acute,		KS_dead_hungarumlaut,
+KC(52),  KS_dead_tilde,	KS_dead_circumflex,	KS_asciitilde,		KS_asciicircum,
+KC(53),  KS_apostrophe,	KS_quotedbl,		KS_notsign,		KS_notsign,
+KC(56),  KS_semicolon,	KS_colon,		KS_dead_dotaccent,	KS_abovedot,
+KC(100), KS_backslash,	KS_bar,			KS_masculine,		KS_dead_breve,
+KC(135), KS_slash,		KS_question,		KS_degree,		KS_questiondown,
+KC(230), KS_Mode_switch,	KS_Multi_key,
+};
+
+static const keysym_t hidkbd_keydesc_br_nodead[] = {
+/*  pos  normal shifted altgr   shift-altgr */
+KC(47),  KS_apostrophe,	KS_grave,	KS_dead_acute,	KS_dead_grave,
+KC(52),  KS_asciitilde,	KS_asciicircum,	KS_dead_tilde,	KS_dead_circumflex,
+};
+
 #define KBD_MAP(name, base, map) \
 			{ name, base, sizeof(map)/sizeof(keysym_t), map }
 
@@ -636,6 +670,8 @@ const struct wscons_keydesc hidkbd_keyde
 	KBD_MAP(KB_FR,  KB_US,  hidkbd_keydesc_fr),
 	KBD_MAP(KB_FR | KB_SWAPCTRLCAPS,KB_FR,	hidkbd_keydesc_swapctrlcaps),
 	KBD_MAP(KB_BE,  KB_FR,  hidkbd_keydesc_be),
+	KBD_MAP(KB_BR,  KB_US,  hidkbd_keydesc_br),
+	KBD_MAP(KB_BR | KB_NODEAD,	KB_BR,  hidkbd_keydesc_br_nodead),
 	KBD_MAP(KB_DK,			KB_US,	hidkbd_keydesc_dk),
 	KBD_MAP(KB_DK | KB_NODEAD,	KB_DK,	hidkbd_keydesc_dk_nodead),
 	KBD_MAP(KB_IT,			KB_US,	hidkbd_keydesc_it),

Index: src/sys/dev/pckbport/wskbdmap_mfii.c
diff -u src/sys/dev/pckbport/wskbdmap_mfii.c:1.27 src/sys/dev/pckbport/wskbdmap_mfii.c:1.28
--- src/sys/dev/pckbport/wskbdmap_mfii.c:1.27	Sat Jan 11 21:43:11 2020
+++ src/sys/dev/pckbport/wskbdmap_mfii.c	Sun Jul 12 01:35:59 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: wskbdmap_mfii.c,v 1.27 2020/01/11 21:43:11 nia Exp $	*/
+/*	$NetBSD: wskbdmap_mfii.c,v 1.28 2020/07/12 01:35:59 nia Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: wskbdmap_mfii.c,v 1.27 2020/01/11 21:43:11 nia Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wskbdmap_mfii.c,v 1.28 2020/07/12 01:35:59 nia Exp $");
 
 #include "opt_wskbdmap.h"
 #include 
@@ -827,6 +827,39 @@ 

CVS commit: src/sys/dev

2020-07-11 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sun Jul 12 01:35:59 UTC 2020

Modified Files:
src/sys/dev/hid: hidkbdmap.c
src/sys/dev/pckbport: wskbdmap_mfii.c
src/sys/dev/wscons: wsksymdef.h

Log Message:
Add support for the Brazilian keyboard layout to pckbd and ukbd.

This is significantly different from the European Portugese layout,
and was pieced together from Wikipedia, X11 layout files, and to
some extent with trial and error.

Thanks to lun-4 for helping test this.

PR kern/44570


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/dev/hid/hidkbdmap.c
cvs rdiff -u -r1.27 -r1.28 src/sys/dev/pckbport/wskbdmap_mfii.c
cvs rdiff -u -r1.67 -r1.68 src/sys/dev/wscons/wsksymdef.h

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



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

2020-07-11 Thread Kimmo Suominen
On Sun, Jul 12, 2020 at 12:05:37AM +0700, Robert Elz wrote:
> Just to make things clear here, the LUN you're talking about is not
> the scsi unit number (which is what I think Martin was referring to)
> but a sub-device number within a single scsi ID.   Right?

Correct. I should have written "SCSI target" instead of "SCSI bus" in
my commit message to avoid confusion.

In both of the use cases I highlighted (Proxmox and Linode), the disks
are always on SCSI ID 0. However, the "problematic" disks are on LUN 1
instead of LUN 0.

Out of curiosity, I just added a "scsi2" disk to the Proxmox VM. It has
been placed on LUN 2, and NetBSD does not pick it up even with this
patch... FreeBSD does (although the earlier LUNs are clearly causing
unexpected output from the "pass" attachments), so I guess I might be
looking at this a bit more. It would be nice to have (at least debug)
output about the LUN that terminates the scan loop.

Will probably open a ticket with Proxmox, too, in an attempt to put
a stop to this unnecessary wasteful skipping of perfectly good LUN
numbers.

+ Kimmo


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

2020-07-11 Thread Robert Elz
Date:Sat, 11 Jul 2020 18:24:51 +0300
From:Kimmo Suominen 
Message-ID:  <20200711152451.ga1...@homeworld.netbsd.org>

  | On Sat, Jul 11, 2020 at 05:00:02PM +0200, Martin Husemann wrote:
  | > I don't understand the change. When was this broken? This has always 
worked
  | > for me e.g. with the sd0 at LUN 3 and the controller at 6 or 7.
  |
  | I think all real SCSI hardware I've had has always just only had LUN 0,
  | and each disk has been on its own SCSI ID (target).

Just to make things clear here, the LUN you're talking about is not
the scsi unit number (which is what I think Martin was referring to)
but a sub-device number within a single scsi ID.   Right?

In real scsi hardware, the only place I think I've ever seen other than
LUN 0 is in a raid array device, where there is a single scsi bus
attachment, with a single ID, and then each raid volume created gets
a different LUN (not all scsi raids work that way I think, but some do).

kre



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

2020-07-11 Thread Martin Husemann
On Sat, Jul 11, 2020 at 06:24:51PM +0300, Kimmo Suominen wrote:
> I think all real SCSI hardware I've had has always just only had LUN 0,
> and each disk has been on its own SCSI ID (target).

Yes, I confused ID and LUN here - just ignore me.

Martin


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

2020-07-11 Thread Kimmo Suominen
On Sat, Jul 11, 2020 at 05:00:02PM +0200, Martin Husemann wrote:
> I don't understand the change. When was this broken? This has always worked
> for me e.g. with the sd0 at LUN 3 and the controller at 6 or 7.

I think all real SCSI hardware I've had has always just only had LUN 0,
and each disk has been on its own SCSI ID (target).

> Or is there something special in your setup?

Well, this is how Proxmox and Linode do it, and with this change it is
possible to install and use NetBSD on those platforms.

Of course, anyone running their own Proxmox could just avoid the "Virtio
SCSI single" controller type (or SCSI disks altogether), but there is
no user or admin control for specifying the LUN ID of a disk.

With a platform like Linode, you are stuck with the configuration it
creates for you from a boot profile (or other UI object). Although Linode
is usually responsive to bug reports, here it is not clear if the bug is
in how they do things or how NetBSD behaves.

With this change it is possible to run the NetBSD installer just like
the FreeBSD one (or any other "custom distro") on Linode.

Kind regards,
+ Kimmo


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

2020-07-11 Thread Martin Husemann
On Sat, Jul 11, 2020 at 05:57:46PM +0300, Kimmo Suominen wrote:
> On Sat, Jul 11, 2020 at 05:47:34PM +0300, Jukka Ruohonen wrote:
> > I'd reckon a pullup to NetBSD 9 would be in order?
> 
> Yes, I was just waiting to be able to link to mail-index.  I had
> already checked that the patch applies cleanly to both netbsd-9
> and netbsd-8.

I don't understand the change. When was this broken? This has always worked
for me e.g. with the sd0 at LUN 3 and the controller at 6 or 7.

Or is there something special in your setup?

Martin


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

2020-07-11 Thread Kimmo Suominen
On Sat, Jul 11, 2020 at 05:47:34PM +0300, Jukka Ruohonen wrote:
> I'd reckon a pullup to NetBSD 9 would be in order?

Yes, I was just waiting to be able to link to mail-index.  I had
already checked that the patch applies cleanly to both netbsd-9
and netbsd-8.

http://releng.netbsd.org/cgi-bin/req-9.cgi?show=1000
http://releng.netbsd.org/cgi-bin/req-8.cgi?show=1571

Cheers,
+ Kimmo


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

2020-07-11 Thread Jukka Ruohonen
On Sat, Jul 11, 2020 at 02:31:46PM +, Kimmo Suominen wrote:
> Use case 2: A Linode boot profile with multiple disks results in
> the first disk ("sda") on LUN 1, while the second disk ("sdb") is
> on LUN 0, each on their own bus.

As Linode is quite popular, and supposedly uses a rather similar setup to
its competitors (e.g., Vultr), I'd reckon a pullup to NetBSD 9 would be in
order?  Some of these (e.g., netcup.eu in Europe) even offer off-the-shelf
NetBSD 9 images.

- Jukka


CVS commit: src/sys/dev/scsipi

2020-07-11 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Sat Jul 11 14:31:46 UTC 2020

Modified Files:
src/sys/dev/scsipi: scsiconf.c

Log Message:
Continue scanning a SCSI bus when a LUN is reported not present

This fixes disk attachment under Qemu when there is no disk on LUN 0 on
a SCSI bus but there is a disk on LUN 1. The inquiry for LUN 0 returns
SID_QUAL_LU_NOTPRESENT & T_NODEVICE.  Quirks are only checked if neither
one of those are set, so cannot use a quirk entry.

Use case 1: Proxmox 6 configures each disk on its own bus when using
the "Virtio SCSI single" SCSI controller. However, while the "scsi0"
disk is on LUN 0, the "scsi1" disk is on LUN 1.

Use case 2: A Linode boot profile with multiple disks results in
the first disk ("sda") on LUN 1, while the second disk ("sdb") is
on LUN 0, each on their own bus.


To generate a diff of this commit:
cvs rdiff -u -r1.287 -r1.288 src/sys/dev/scsipi/scsiconf.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/scsipi/scsiconf.c
diff -u src/sys/dev/scsipi/scsiconf.c:1.287 src/sys/dev/scsipi/scsiconf.c:1.288
--- src/sys/dev/scsipi/scsiconf.c:1.287	Sat May  2 06:45:53 2020
+++ src/sys/dev/scsipi/scsiconf.c	Sat Jul 11 14:31:46 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: scsiconf.c,v 1.287 2020/05/02 06:45:53 jdc Exp $	*/
+/*	$NetBSD: scsiconf.c,v 1.288 2020/07/11 14:31:46 kim Exp $	*/
 
 /*-
  * Copyright (c) 1998, 1999, 2004 The NetBSD Foundation, Inc.
@@ -48,7 +48,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.287 2020/05/02 06:45:53 jdc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scsiconf.c,v 1.288 2020/07/11 14:31:46 kim Exp $");
 
 #include 
 #include 
@@ -883,6 +883,8 @@ scsi_probe_device(struct scsibus_softc *
 		break;
 
 	case SID_QUAL_LU_NOTPRESENT:
+		docontinue = 1;
+		/* FALLTHROUGH */
 	case SID_QUAL_reserved:
 	case SID_QUAL_LU_NOT_SUPP:
 		goto bad;



CVS commit: src/sys/dev/scsipi

2020-07-11 Thread Kimmo Suominen
Module Name:src
Committed By:   kim
Date:   Sat Jul 11 14:31:46 UTC 2020

Modified Files:
src/sys/dev/scsipi: scsiconf.c

Log Message:
Continue scanning a SCSI bus when a LUN is reported not present

This fixes disk attachment under Qemu when there is no disk on LUN 0 on
a SCSI bus but there is a disk on LUN 1. The inquiry for LUN 0 returns
SID_QUAL_LU_NOTPRESENT & T_NODEVICE.  Quirks are only checked if neither
one of those are set, so cannot use a quirk entry.

Use case 1: Proxmox 6 configures each disk on its own bus when using
the "Virtio SCSI single" SCSI controller. However, while the "scsi0"
disk is on LUN 0, the "scsi1" disk is on LUN 1.

Use case 2: A Linode boot profile with multiple disks results in
the first disk ("sda") on LUN 1, while the second disk ("sdb") is
on LUN 0, each on their own bus.


To generate a diff of this commit:
cvs rdiff -u -r1.287 -r1.288 src/sys/dev/scsipi/scsiconf.c

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



CVS commit: src/sys/arch

2020-07-11 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sat Jul 11 13:07:01 UTC 2020

Modified Files:
src/sys/arch/mips/atheros/dev: argpio.c
src/sys/arch/sun2/sun2: locore2.c
src/sys/arch/sun3/sun3: locore2.c
src/sys/arch/sun3/sun3x: locore2.c

Log Message:
Fix various typos of "system" in comments. Mainly copypasto errors.

from vezhlys on freenode.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/atheros/dev/argpio.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/sun2/sun2/locore2.c
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/sun3/sun3/locore2.c
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/sun3/sun3x/locore2.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/mips/atheros/dev/argpio.c
diff -u src/sys/arch/mips/atheros/dev/argpio.c:1.7 src/sys/arch/mips/atheros/dev/argpio.c:1.8
--- src/sys/arch/mips/atheros/dev/argpio.c:1.7	Thu Sep 15 21:45:37 2016
+++ src/sys/arch/mips/atheros/dev/argpio.c	Sat Jul 11 13:07:01 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: argpio.c,v 1.7 2016/09/15 21:45:37 jdolecek Exp $ */
+/* $NetBSD: argpio.c,v 1.8 2020/07/11 13:07:01 nia Exp $ */
 
 /*-
  * Copyright (c) 2006 Garrett D'Amore
@@ -32,7 +32,7 @@
  */ 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: argpio.c,v 1.7 2016/09/15 21:45:37 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: argpio.c,v 1.8 2020/07/11 13:07:01 nia Exp $");
 
 #include 
 #include 
@@ -55,7 +55,7 @@ __KERNEL_RCSID(0, "$NetBSD: argpio.c,v 1
  * General Plan:
  *
  * Register GPIOs for all pins that are _not_ associated with the reset
- * pin.  (Possibly also not the sytem LED.)
+ * pin.  (Possibly also not the system LED.)
  */
 
 struct argpio_softc {

Index: src/sys/arch/sun2/sun2/locore2.c
diff -u src/sys/arch/sun2/sun2/locore2.c:1.27 src/sys/arch/sun2/sun2/locore2.c:1.28
--- src/sys/arch/sun2/sun2/locore2.c:1.27	Mon Sep  3 16:29:28 2018
+++ src/sys/arch/sun2/sun2/locore2.c	Sat Jul 11 13:07:01 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore2.c,v 1.27 2018/09/03 16:29:28 riastradh Exp $	*/
+/*	$NetBSD: locore2.c,v 1.28 2020/07/11 13:07:01 nia Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: locore2.c,v 1.27 2018/09/03 16:29:28 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore2.c,v 1.28 2020/07/11 13:07:01 nia Exp $");
 
 #include "opt_ddb.h"
 #include "opt_modular.h"
@@ -151,7 +151,7 @@ _save_symtab(void)
 
 /*
  * This function is called from _bootstrap() to initialize
- * pre-vm-sytem virtual memory.  All this really does is to
+ * pre-vm-system virtual memory.  All this really does is to
  * set virtual_avail to the first page following preloaded
  * data (i.e. the kernel and its symbol table) and special
  * things that may be needed very early (lwp0 upages).

Index: src/sys/arch/sun3/sun3/locore2.c
diff -u src/sys/arch/sun3/sun3/locore2.c:1.102 src/sys/arch/sun3/sun3/locore2.c:1.103
--- src/sys/arch/sun3/sun3/locore2.c:1.102	Mon Sep  3 16:29:28 2018
+++ src/sys/arch/sun3/sun3/locore2.c	Sat Jul 11 13:07:01 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore2.c,v 1.102 2018/09/03 16:29:28 riastradh Exp $	*/
+/*	$NetBSD: locore2.c,v 1.103 2020/07/11 13:07:01 nia Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: locore2.c,v 1.102 2018/09/03 16:29:28 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore2.c,v 1.103 2020/07/11 13:07:01 nia Exp $");
 
 #include "opt_ddb.h"
 #include "opt_modular.h"
@@ -168,7 +168,7 @@ _save_symtab(void)
 
 /*
  * This function is called from _bootstrap() to initialize
- * pre-vm-sytem virtual memory.  All this really does is to
+ * pre-vm-system virtual memory.  All this really does is to
  * set virtual_avail to the first page following preloaded
  * data (i.e. the kernel and its symbol table) and special
  * things that may be needed very early (lwp0 upages).

Index: src/sys/arch/sun3/sun3x/locore2.c
diff -u src/sys/arch/sun3/sun3x/locore2.c:1.41 src/sys/arch/sun3/sun3x/locore2.c:1.42
--- src/sys/arch/sun3/sun3x/locore2.c:1.41	Mon Sep  3 16:29:28 2018
+++ src/sys/arch/sun3/sun3x/locore2.c	Sat Jul 11 13:07:01 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore2.c,v 1.41 2018/09/03 16:29:28 riastradh Exp $	*/
+/*	$NetBSD: locore2.c,v 1.42 2020/07/11 13:07:01 nia Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: locore2.c,v 1.41 2018/09/03 16:29:28 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: locore2.c,v 1.42 2020/07/11 13:07:01 nia Exp $");
 
 #include "opt_ddb.h"
 
@@ -134,7 +134,7 @@ _save_symtab(void)
 
 /*
  * This function is called from _bootstrap() to initialize
- * pre-vm-sytem virtual memory.  All this really does is to
+ * pre-vm-system virtual memory.  All this really does is to
  * set virtual_avail to the first page following preloaded
  * data (i.e. the 

CVS commit: src/sys/arch

2020-07-11 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sat Jul 11 13:07:01 UTC 2020

Modified Files:
src/sys/arch/mips/atheros/dev: argpio.c
src/sys/arch/sun2/sun2: locore2.c
src/sys/arch/sun3/sun3: locore2.c
src/sys/arch/sun3/sun3x: locore2.c

Log Message:
Fix various typos of "system" in comments. Mainly copypasto errors.

from vezhlys on freenode.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/mips/atheros/dev/argpio.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/sun2/sun2/locore2.c
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/sun3/sun3/locore2.c
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/sun3/sun3x/locore2.c

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



CVS commit: src/share/misc

2020-07-11 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sat Jul 11 13:04:29 UTC 2020

Modified Files:
src/share/misc: acronyms.comp

Log Message:
spell system correctly; from vezhlys on freenode


To generate a diff of this commit:
cvs rdiff -u -r1.307 -r1.308 src/share/misc/acronyms.comp

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



CVS commit: src/share/misc

2020-07-11 Thread Nia Alarie
Module Name:src
Committed By:   nia
Date:   Sat Jul 11 13:04:29 UTC 2020

Modified Files:
src/share/misc: acronyms.comp

Log Message:
spell system correctly; from vezhlys on freenode


To generate a diff of this commit:
cvs rdiff -u -r1.307 -r1.308 src/share/misc/acronyms.comp

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

Modified files:

Index: src/share/misc/acronyms.comp
diff -u src/share/misc/acronyms.comp:1.307 src/share/misc/acronyms.comp:1.308
--- src/share/misc/acronyms.comp:1.307	Thu Jun 11 23:19:53 2020
+++ src/share/misc/acronyms.comp	Sat Jul 11 13:04:29 2020
@@ -1,4 +1,4 @@
-$NetBSD: acronyms.comp,v 1.307 2020/06/11 23:19:53 sevan Exp $
+$NetBSD: acronyms.comp,v 1.308 2020/07/11 13:04:29 nia Exp $
 3WHS	three-way handshake
 8VSB	8-state vestigial side band modulation
 AA	anti-aliasing
@@ -1747,7 +1747,7 @@ VROC	Virtual RAID On CPU
 VRRP	Virtual Router Redundancy Protocol
 VSTP	VLAN Spanning Tree Protocol
 VTP	VLAN Trunking Protocol
-VXFS	Veritas file sytem
+VXFS	Veritas file system
 VXVM	Veritas volume manager
 W	watt
 W3C	World Wide Web Consortium



CVS commit: src/sbin/wdogctl

2020-07-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Jul 11 12:51:21 UTC 2020

Modified Files:
src/sbin/wdogctl: wdogctl.8

Log Message:
Xref x86/tco(4) instead of the parent x86/ichlpcib(4) bridge.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sbin/wdogctl/wdogctl.8

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



CVS commit: src/sbin/wdogctl

2020-07-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Jul 11 12:51:21 UTC 2020

Modified Files:
src/sbin/wdogctl: wdogctl.8

Log Message:
Xref x86/tco(4) instead of the parent x86/ichlpcib(4) bridge.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sbin/wdogctl/wdogctl.8

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

Modified files:

Index: src/sbin/wdogctl/wdogctl.8
diff -u src/sbin/wdogctl/wdogctl.8:1.24 src/sbin/wdogctl/wdogctl.8:1.25
--- src/sbin/wdogctl/wdogctl.8:1.24	Thu Aug 11 08:00:05 2011
+++ src/sbin/wdogctl/wdogctl.8	Sat Jul 11 12:51:21 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: wdogctl.8,v 1.24 2011/08/11 08:00:05 mbalmer Exp $
+.\"	$NetBSD: wdogctl.8,v 1.25 2020/07/11 12:51:21 jruoho Exp $
 .\"
 .\" Copyright (c) 2000 Zembu Labs, Inc.
 .\" All rights reserved.
@@ -31,7 +31,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 August 11, 2011
+.Dd July 11, 2020
 .Dt WDOGCTL 8
 .Os
 .Sh NAME
@@ -172,7 +172,7 @@ the timer.
 .Xr pcweasel 4 ,
 .Xr pwdog 4 ,
 .Xr swwdog 4 ,
-.Xr x86/ichlpcib 4
+.Xr x86/tco 4
 .Sh HISTORY
 The
 .Nm



CVS commit: src/tests/usr.sbin

2020-07-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Jul 11 09:55:26 UTC 2020

Modified Files:
src/tests/usr.sbin/execsnoop: t_execsnoop.sh
src/tests/usr.sbin/opensnoop: t_opensnoop.sh

Log Message:
Sleep even more.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.sbin/execsnoop/t_execsnoop.sh
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.sbin/opensnoop/t_opensnoop.sh

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

Modified files:

Index: src/tests/usr.sbin/execsnoop/t_execsnoop.sh
diff -u src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.2 src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.3
--- src/tests/usr.sbin/execsnoop/t_execsnoop.sh:1.2	Mon Jul  6 10:32:18 2020
+++ src/tests/usr.sbin/execsnoop/t_execsnoop.sh	Sat Jul 11 09:55:26 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_execsnoop.sh,v 1.2 2020/07/06 10:32:18 jruoho Exp $
+# $NetBSD: t_execsnoop.sh,v 1.3 2020/07/11 09:55:26 jruoho Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -47,8 +47,9 @@ basic_body() {
 		n=$(expr $n - 1)
 	done
 
-	sleep 3
+	sleep 5
 	pkill -9 execsnoop
+	sleep 1
 
 	if [ ! $(cat $tmp | grep "whoami" | wc -l) -eq 10 ]; then
 		atf_fail "execsnoop does not work"

Index: src/tests/usr.sbin/opensnoop/t_opensnoop.sh
diff -u src/tests/usr.sbin/opensnoop/t_opensnoop.sh:1.3 src/tests/usr.sbin/opensnoop/t_opensnoop.sh:1.4
--- src/tests/usr.sbin/opensnoop/t_opensnoop.sh:1.3	Sat Jul 11 09:35:22 2020
+++ src/tests/usr.sbin/opensnoop/t_opensnoop.sh	Sat Jul 11 09:55:26 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_opensnoop.sh,v 1.3 2020/07/11 09:35:22 jruoho Exp $
+# $NetBSD: t_opensnoop.sh,v 1.4 2020/07/11 09:55:26 jruoho Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -50,8 +50,9 @@ basic_body() {
 		n=$(expr $n - 1)
 	done
 
-	sleep 3
+	sleep 5
 	pkill -9 opensnoop
+	sleep 1
 
 	if [ ! $(cat $tmp | grep "/etc/spwd.db" | wc -l) -eq 10 ]; then
 		atf_fail "opensnoop does not work"



CVS commit: src/tests/usr.sbin

2020-07-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Jul 11 09:55:26 UTC 2020

Modified Files:
src/tests/usr.sbin/execsnoop: t_execsnoop.sh
src/tests/usr.sbin/opensnoop: t_opensnoop.sh

Log Message:
Sleep even more.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.sbin/execsnoop/t_execsnoop.sh
cvs rdiff -u -r1.3 -r1.4 src/tests/usr.sbin/opensnoop/t_opensnoop.sh

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



CVS commit: src/tests/usr.sbin/opensnoop

2020-07-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Jul 11 09:35:22 UTC 2020

Modified Files:
src/tests/usr.sbin/opensnoop: t_opensnoop.sh

Log Message:
Skip this test as it may cause a panic. Point to PR kern/55481.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.sbin/opensnoop/t_opensnoop.sh

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

Modified files:

Index: src/tests/usr.sbin/opensnoop/t_opensnoop.sh
diff -u src/tests/usr.sbin/opensnoop/t_opensnoop.sh:1.2 src/tests/usr.sbin/opensnoop/t_opensnoop.sh:1.3
--- src/tests/usr.sbin/opensnoop/t_opensnoop.sh:1.2	Mon Jul  6 10:32:18 2020
+++ src/tests/usr.sbin/opensnoop/t_opensnoop.sh	Sat Jul 11 09:35:22 2020
@@ -1,4 +1,4 @@
-# $NetBSD: t_opensnoop.sh,v 1.2 2020/07/06 10:32:18 jruoho Exp $
+# $NetBSD: t_opensnoop.sh,v 1.3 2020/07/11 09:35:22 jruoho Exp $
 #
 # Copyright (c) 2020 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -33,11 +33,14 @@ atf_test_case basic cleanup
 basic_head() {
 	atf_set "require.user" "root"
 	atf_set "require.progs" "opensnoop"
-	atf_set "descr" "Test that DTrace's opensnoop works (cf. kern/53417)"
+	atf_set "descr" "Test that DTrace's opensnoop works " \
+		"(cf. PR kern/53417 and PR kern/55481)"
 }
 
 basic_body() {
 
+	atf_skip "The test may cause a panic (PR kern/55481)"
+
 	n=10
 	atf_check -s exit:0 -o ignore -e empty -x "opensnoop > $tmp &"
 	sleep 1



CVS commit: src/tests/usr.sbin/opensnoop

2020-07-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Jul 11 09:35:22 UTC 2020

Modified Files:
src/tests/usr.sbin/opensnoop: t_opensnoop.sh

Log Message:
Skip this test as it may cause a panic. Point to PR kern/55481.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/usr.sbin/opensnoop/t_opensnoop.sh

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



CVS commit: src/libexec/httpd

2020-07-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Jul 11 08:10:52 UTC 2020

Modified Files:
src/libexec/httpd: Makefile auth-bozo.c bozohttpd.8 bozohttpd.c
bozohttpd.h

Log Message:
Add blocklistd(8) support.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/libexec/httpd/Makefile
cvs rdiff -u -r1.24 -r1.25 src/libexec/httpd/auth-bozo.c
cvs rdiff -u -r1.80 -r1.81 src/libexec/httpd/bozohttpd.8
cvs rdiff -u -r1.115 -r1.116 src/libexec/httpd/bozohttpd.c
cvs rdiff -u -r1.61 -r1.62 src/libexec/httpd/bozohttpd.h

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

Modified files:

Index: src/libexec/httpd/Makefile
diff -u src/libexec/httpd/Makefile:1.28 src/libexec/httpd/Makefile:1.29
--- src/libexec/httpd/Makefile:1.28	Thu Jan 17 07:39:00 2019
+++ src/libexec/httpd/Makefile	Sat Jul 11 08:10:52 2020
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.28 2019/01/17 07:39:00 mrg Exp $
+#	$NetBSD: Makefile,v 1.29 2020/07/11 08:10:52 jruoho Exp $
 #
 #	$eterna: Makefile,v 1.30 2010/07/11 00:34:27 mrg Exp $
 #
@@ -14,6 +14,7 @@
 #	NO_SSL_SUPPORT		/* don't support ssl (https) */
 #	DO_HTPASSWD		/* support .htpasswd files */
 #	NO_LUA_SUPPORT		/* don't support Lua for dynamic content */
+#	NO_BLOCKLIST_SUPPORT	/* don't support blocklist */
 #
 # other system specific defines:
 #	HAVE_NBUTIL_H		/* netbsd compat is in 
@@ -32,8 +33,8 @@ SRCS=	bozohttpd.c ssl-bozo.c auth-bozo.c
 	tilde-luzah-bozo.c dir-index-bozo.c content-bozo.c lua-bozo.c
 SRCS+=	main.c
 
-LDADD=	-lcrypt -llua -lm
-DPADD=	${LIBCRYPT} ${LIBLUA} ${LIBM}
+LDADD=	-lblocklist -lcrypt -llua -lm
+DPADD=	${LIBBLOCKLIST} ${LIBCRYPT} ${LIBLUA} ${LIBM}
 
 WARNS?=	4
 

Index: src/libexec/httpd/auth-bozo.c
diff -u src/libexec/httpd/auth-bozo.c:1.24 src/libexec/httpd/auth-bozo.c:1.25
--- src/libexec/httpd/auth-bozo.c:1.24	Thu Feb 28 08:28:21 2019
+++ src/libexec/httpd/auth-bozo.c	Sat Jul 11 08:10:52 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: auth-bozo.c,v 1.24 2019/02/28 08:28:21 mrg Exp $	*/
+/*	$NetBSD: auth-bozo.c,v 1.25 2020/07/11 08:10:52 jruoho Exp $	*/
 
 /*	$eterna: auth-bozo.c,v 1.17 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -105,6 +105,11 @@ bozo_auth_check(bozo_httpreq_t *request,
 	pass) != 0)
 break;
 			fclose(fp);
+
+#ifndef NO_BLOCKLIST_SUPPORT
+			pfilter_notify(BLOCKLIST_AUTH_OK, 200);
+#endif /* !NO_BLOCKLIST_SUPPORT */
+
 			return 0;
 		}
 	}

Index: src/libexec/httpd/bozohttpd.8
diff -u src/libexec/httpd/bozohttpd.8:1.80 src/libexec/httpd/bozohttpd.8:1.81
--- src/libexec/httpd/bozohttpd.8:1.80	Mon Jul  6 23:31:36 2020
+++ src/libexec/httpd/bozohttpd.8	Sat Jul 11 08:10:52 2020
@@ -1,4 +1,4 @@
-.\"	$NetBSD: bozohttpd.8,v 1.80 2020/07/06 23:31:36 jmcneill Exp $
+.\"	$NetBSD: bozohttpd.8,v 1.81 2020/07/11 08:10:52 jruoho Exp $
 .\"
 .\"	$eterna: bozohttpd.8,v 1.101 2011/11/18 01:25:11 mrg Exp $
 .\"
@@ -26,7 +26,7 @@
 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
 .\" SUCH DAMAGE.
 .\"
-.Dd July 6, 2020
+.Dd July 11, 2020
 .Dt BOZOHTTPD 8
 .Os
 .Sh NAME
@@ -454,6 +454,45 @@ with
 on the compiler command line to enable this support.
 It may require linking with the crypt library, using
 .Dq -lcrypt .
+.Ss BLOCKLIST SUPPORT
+On NetBSD,
+.Nm
+supports
+.Xr blocklistd 8
+by default.
+The support can be disabled with the
+.Dq -DNO_BLOCKLIST_SUPPORT
+compilation option.
+.Pp
+Upon occurrence,
+.Nm
+reports three HTTP status codes to
+.Xr blocklistd 8
+as failures:
+.Em 401
+(``Unauthorized'') ,
+.Em 403
+(``Forbidden'') ,
+and
+.Em 500
+(``Internal Server Error'') .
+Of these,
+.Em 401
+is the one received upon authorization failure with the
+HTTP Basic Authorization mechanism.
+A successful authorization decreases the counter kept by
+.Xr blocklistd 8 .
+.Pp
+Note that the implementation of the HTTP Basic Authorization mechanism
+uses a redirection; a status code
+.Em 401
+is always initially received.
+Therefore, a single authorization failure of
+.Pa .htpasswd
+is reported as two failures to
+.Xr blocklistd 8 ,
+but no failures are recorded upon successful authorization
+due to the decrease of the failure counter.
 .Ss SSL SUPPORT
 .Nm
 has support for TLSv1.1 and TLSv1.2 protocols that are included by

Index: src/libexec/httpd/bozohttpd.c
diff -u src/libexec/httpd/bozohttpd.c:1.115 src/libexec/httpd/bozohttpd.c:1.116
--- src/libexec/httpd/bozohttpd.c:1.115	Mon Jul  6 23:31:36 2020
+++ src/libexec/httpd/bozohttpd.c	Sat Jul 11 08:10:52 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: bozohttpd.c,v 1.115 2020/07/06 23:31:36 jmcneill Exp $	*/
+/*	$NetBSD: bozohttpd.c,v 1.116 2020/07/11 08:10:52 jruoho Exp $	*/
 
 /*	$eterna: bozohttpd.c,v 1.178 2011/11/18 09:21:15 mrg Exp $	*/
 
@@ -2133,6 +2133,7 @@ static struct errors_map {
 	const char *shortmsg;		/* short version of message */
 	const char *longmsg;		/* long version of message */
 } errors_map[] = {
+	{ 200,	"200 OK",		"The request was valid", },
 	{ 400,	"400 Bad Request",	"The request was 

CVS commit: src/libexec/httpd

2020-07-11 Thread Jukka Ruohonen
Module Name:src
Committed By:   jruoho
Date:   Sat Jul 11 08:10:52 UTC 2020

Modified Files:
src/libexec/httpd: Makefile auth-bozo.c bozohttpd.8 bozohttpd.c
bozohttpd.h

Log Message:
Add blocklistd(8) support.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/libexec/httpd/Makefile
cvs rdiff -u -r1.24 -r1.25 src/libexec/httpd/auth-bozo.c
cvs rdiff -u -r1.80 -r1.81 src/libexec/httpd/bozohttpd.8
cvs rdiff -u -r1.115 -r1.116 src/libexec/httpd/bozohttpd.c
cvs rdiff -u -r1.61 -r1.62 src/libexec/httpd/bozohttpd.h

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



CVS commit: src/sys/kern

2020-07-11 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Jul 11 07:14:53 UTC 2020

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

Log Message:
Remove support for '%n' in the kernel printf functions.

It makes vulnerabilities too easily exploitable, is unused and as a sanity
rule should not be used in the kernel to begin with.

Now, "printf(unfiltered_string);" is much less of a problem.


To generate a diff of this commit:
cvs rdiff -u -r1.184 -r1.185 src/sys/kern/subr_prf.c

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

Modified files:

Index: src/sys/kern/subr_prf.c
diff -u src/sys/kern/subr_prf.c:1.184 src/sys/kern/subr_prf.c:1.185
--- src/sys/kern/subr_prf.c:1.184	Sat May 23 23:42:43 2020
+++ src/sys/kern/subr_prf.c	Sat Jul 11 07:14:53 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: subr_prf.c,v 1.184 2020/05/23 23:42:43 ad Exp $	*/
+/*	$NetBSD: subr_prf.c,v 1.185 2020/07/11 07:14:53 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1986, 1988, 1991, 1993
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.184 2020/05/23 23:42:43 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: subr_prf.c,v 1.185 2020/07/11 07:14:53 maxv Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ddb.h"
@@ -1373,20 +1373,21 @@ reswitch:	switch (ch) {
 			base = DEC;
 			goto number;
 		case 'n':
+			/* no %n support in the kernel, consume and skip */
 			if (flags & MAXINT)
-*va_arg(ap, intmax_t *) = ret;
+(void)va_arg(ap, intmax_t *);
 			else if (flags & PTRINT)
-*va_arg(ap, intptr_t *) = ret;
+(void)va_arg(ap, intptr_t *);
 			else if (flags & SIZEINT)
-*va_arg(ap, ssize_t *) = ret;
+(void)va_arg(ap, ssize_t *);
 			else if (flags & QUADINT)
-*va_arg(ap, quad_t *) = ret;
+(void)va_arg(ap, quad_t *);
 			else if (flags & LONGINT)
-*va_arg(ap, long *) = ret;
+(void)va_arg(ap, long *);
 			else if (flags & SHORTINT)
-*va_arg(ap, short *) = ret;
+(void)va_arg(ap, short *);
 			else
-*va_arg(ap, int *) = ret;
+(void)va_arg(ap, int *);
 			continue;	/* no output */
 		case 'O':
 			flags |= LONGINT;



CVS commit: src/sys/kern

2020-07-11 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Sat Jul 11 07:14:53 UTC 2020

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

Log Message:
Remove support for '%n' in the kernel printf functions.

It makes vulnerabilities too easily exploitable, is unused and as a sanity
rule should not be used in the kernel to begin with.

Now, "printf(unfiltered_string);" is much less of a problem.


To generate a diff of this commit:
cvs rdiff -u -r1.184 -r1.185 src/sys/kern/subr_prf.c

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



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

2020-07-11 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jul 11 06:46:19 UTC 2020

Modified Files:
src/sys/arch/arm/include/arm32: vmparam.h

Log Message:
Fix ARM builds


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/arm/include/arm32/vmparam.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/include/arm32/vmparam.h
diff -u src/sys/arch/arm/include/arm32/vmparam.h:1.53 src/sys/arch/arm/include/arm32/vmparam.h:1.54
--- src/sys/arch/arm/include/arm32/vmparam.h:1.53	Fri Jul 10 15:12:33 2020
+++ src/sys/arch/arm/include/arm32/vmparam.h	Sat Jul 11 06:46:19 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.53 2020/07/10 15:12:33 skrll Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.54 2020/07/11 06:46:19 skrll Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002 Wasabi Systems, Inc.
@@ -38,7 +38,9 @@
 #ifndef _ARM_ARM32_VMPARAM_H_
 #define	_ARM_ARM32_VMPARAM_H_
 
+#if defined(_KERNEL_OPT)
 #include "opt_kasan.h"
+#endif
 
 /*
  * Virtual Memory parameters common to all arm32 platforms.
@@ -96,6 +98,7 @@
 #define	VM_MIN_KERNEL_ADDRESS	((vaddr_t) KERNEL_BASE)
 #define	VM_MAX_KERNEL_ADDRESS	((vaddr_t) -(PAGE_SIZE+1))
 
+#if defined(_KERNEL)
 // AddressSanitizer dedicates 1/8 of kernel memory to its shadow memory (e.g.
 // 128MB to cover 1GB for ARM) and uses a special KVA range for the shadow
 // address corresponding to a kernel memory address.
@@ -144,5 +147,6 @@
 
 #define VM_KERNEL_IO_ADDRESS	0xf000
 #define VM_KERNEL_IO_SIZE	(VM_MAX_KERNEL_ADDRESS - VM_KERNEL_IO_ADDRESS)
+#endif
 
 #endif /* _ARM_ARM32_VMPARAM_H_ */



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

2020-07-11 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Jul 11 06:46:19 UTC 2020

Modified Files:
src/sys/arch/arm/include/arm32: vmparam.h

Log Message:
Fix ARM builds


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/arm/include/arm32/vmparam.h

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