CVS commit: src/sys/arch/x68k

2024-01-06 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sun Jan  7 07:58:35 UTC 2024

Modified Files:
src/sys/arch/x68k/conf: GENERIC INSTALL majors.x68k
src/sys/arch/x68k/dev: bmd.c fd.c intio_dmac.c ite.c ite_tv.c itevar.h
kbdmap.c kbdmap.c.ascii mha.c mhavar.h ms.c par.c scsiromvar.h
slhci_intio.c sram.c vsvar.h
src/sys/arch/x68k/include: cpu.h disklabel.h intr.h kbdmap.h
opmbellio.h
src/sys/arch/x68k/stand/aout2hux: aout2hux.c
src/sys/arch/x68k/stand/boot: boot.c boot.ldscript if_ne.c srt0.S
src/sys/arch/x68k/stand/boot_ufs: readufs_lfs.c
src/sys/arch/x68k/stand/common: exec_image.S start.S
src/sys/arch/x68k/stand/libsa: clock.c consio.c fd.c fdsub.S
parseutils.c sdcd.c
src/sys/arch/x68k/stand/loadbsd: Makefile loadbsd.c
src/sys/arch/x68k/stand/mboot: Makefile srt0.S
src/sys/arch/x68k/stand/xxboot: Makefile.xxboot bootmain.c memcmp.S
src/sys/arch/x68k/usr.bin/loadkmap: ascii_kmap.c jis_kmap.c kbdmap.h
loadkmap.c
src/sys/arch/x68k/x68k: autoconf.c bus.c clock.c disksubr.c iodevice.h
kgdb_stub.c trap.c vectors.s

Log Message:
TAB/space/indent cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.208 -r1.209 src/sys/arch/x68k/conf/GENERIC
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/x68k/conf/INSTALL
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/x68k/conf/majors.x68k
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/x68k/dev/bmd.c
cvs rdiff -u -r1.128 -r1.129 src/sys/arch/x68k/dev/fd.c
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/x68k/dev/intio_dmac.c
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/x68k/dev/ite.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/x68k/dev/ite_tv.c \
src/sys/arch/x68k/dev/vsvar.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/x68k/dev/itevar.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x68k/dev/kbdmap.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x68k/dev/kbdmap.c.ascii
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/x68k/dev/mha.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/x68k/dev/mhavar.h
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/x68k/dev/ms.c
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/x68k/dev/par.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x68k/dev/scsiromvar.h
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x68k/dev/slhci_intio.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/x68k/dev/sram.c
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/x68k/include/cpu.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x68k/include/disklabel.h
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/x68k/include/intr.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x68k/include/kbdmap.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x68k/include/opmbellio.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/x68k/stand/aout2hux/aout2hux.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/x68k/stand/boot/boot.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/x68k/stand/boot/boot.ldscript
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x68k/stand/boot/if_ne.c \
src/sys/arch/x68k/stand/boot/srt0.S
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/x68k/stand/boot_ufs/readufs_lfs.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x68k/stand/common/exec_image.S
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x68k/stand/common/start.S
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x68k/stand/libsa/clock.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/x68k/stand/libsa/consio.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x68k/stand/libsa/fd.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/x68k/stand/libsa/fdsub.S
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x68k/stand/libsa/parseutils.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/x68k/stand/libsa/sdcd.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/x68k/stand/loadbsd/Makefile
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x68k/stand/loadbsd/loadbsd.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/x68k/stand/mboot/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x68k/stand/mboot/srt0.S
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x68k/stand/xxboot/bootmain.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/x68k/stand/xxboot/memcmp.S
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/x68k/usr.bin/loadkmap/ascii_kmap.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x68k/usr.bin/loadkmap/jis_kmap.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x68k/usr.bin/loadkmap/kbdmap.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/x68k/usr.bin/loadkmap/loadkmap.c
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/x68k/x68k/autoconf.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/x68k/x68k/bus.c
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/x68k/x68k/clock.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/x68k/x68k/disksubr.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/x68k/x68k/iodevice.h \
src/sys/arch/x68k/x68k/vectors.s
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/x68k/x68k/kgdb_stub.c
cvs rdiff -u -r1.112 -r1.113 src/sys/arch/x68k/x68k/trap.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/x68k

2024-01-06 Thread Tetsuya Isaki
Module Name:src
Committed By:   isaki
Date:   Sun Jan  7 07:58:35 UTC 2024

Modified Files:
src/sys/arch/x68k/conf: GENERIC INSTALL majors.x68k
src/sys/arch/x68k/dev: bmd.c fd.c intio_dmac.c ite.c ite_tv.c itevar.h
kbdmap.c kbdmap.c.ascii mha.c mhavar.h ms.c par.c scsiromvar.h
slhci_intio.c sram.c vsvar.h
src/sys/arch/x68k/include: cpu.h disklabel.h intr.h kbdmap.h
opmbellio.h
src/sys/arch/x68k/stand/aout2hux: aout2hux.c
src/sys/arch/x68k/stand/boot: boot.c boot.ldscript if_ne.c srt0.S
src/sys/arch/x68k/stand/boot_ufs: readufs_lfs.c
src/sys/arch/x68k/stand/common: exec_image.S start.S
src/sys/arch/x68k/stand/libsa: clock.c consio.c fd.c fdsub.S
parseutils.c sdcd.c
src/sys/arch/x68k/stand/loadbsd: Makefile loadbsd.c
src/sys/arch/x68k/stand/mboot: Makefile srt0.S
src/sys/arch/x68k/stand/xxboot: Makefile.xxboot bootmain.c memcmp.S
src/sys/arch/x68k/usr.bin/loadkmap: ascii_kmap.c jis_kmap.c kbdmap.h
loadkmap.c
src/sys/arch/x68k/x68k: autoconf.c bus.c clock.c disksubr.c iodevice.h
kgdb_stub.c trap.c vectors.s

Log Message:
TAB/space/indent cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.208 -r1.209 src/sys/arch/x68k/conf/GENERIC
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/x68k/conf/INSTALL
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/x68k/conf/majors.x68k
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/x68k/dev/bmd.c
cvs rdiff -u -r1.128 -r1.129 src/sys/arch/x68k/dev/fd.c
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/x68k/dev/intio_dmac.c
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/x68k/dev/ite.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/x68k/dev/ite_tv.c \
src/sys/arch/x68k/dev/vsvar.h
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/x68k/dev/itevar.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x68k/dev/kbdmap.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x68k/dev/kbdmap.c.ascii
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/x68k/dev/mha.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/x68k/dev/mhavar.h
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/x68k/dev/ms.c
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/x68k/dev/par.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x68k/dev/scsiromvar.h
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x68k/dev/slhci_intio.c
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/x68k/dev/sram.c
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/x68k/include/cpu.h
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x68k/include/disklabel.h
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/x68k/include/intr.h
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x68k/include/kbdmap.h
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x68k/include/opmbellio.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/x68k/stand/aout2hux/aout2hux.c
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/x68k/stand/boot/boot.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/x68k/stand/boot/boot.ldscript
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x68k/stand/boot/if_ne.c \
src/sys/arch/x68k/stand/boot/srt0.S
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/x68k/stand/boot_ufs/readufs_lfs.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x68k/stand/common/exec_image.S
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x68k/stand/common/start.S
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/x68k/stand/libsa/clock.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/x68k/stand/libsa/consio.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x68k/stand/libsa/fd.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/x68k/stand/libsa/fdsub.S
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x68k/stand/libsa/parseutils.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/x68k/stand/libsa/sdcd.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/x68k/stand/loadbsd/Makefile
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/x68k/stand/loadbsd/loadbsd.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/x68k/stand/mboot/Makefile
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/x68k/stand/mboot/srt0.S
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/x68k/stand/xxboot/Makefile.xxboot
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/x68k/stand/xxboot/bootmain.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/x68k/stand/xxboot/memcmp.S
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/x68k/usr.bin/loadkmap/ascii_kmap.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/x68k/usr.bin/loadkmap/jis_kmap.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/x68k/usr.bin/loadkmap/kbdmap.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/x68k/usr.bin/loadkmap/loadkmap.c
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/x68k/x68k/autoconf.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/x68k/x68k/bus.c
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/x68k/x68k/clock.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/x68k/x68k/disksubr.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/x68k/x68k/iodevice.h \
src/sys/arch/x68k/x68k/vectors.s
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/x68k/x68k/kgdb_stub.c
cvs rdiff -u -r1.112 -r1.113 src/sys/arch/x68k/x68k/trap.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/x68k/conf/GENERIC
diff -u src/sys/arch/x68k/conf/GENERIC:1.208 

CVS commit: src/usr.bin/make/unit-tests

2024-01-06 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Sun Jan  7 02:07:44 UTC 2024

Modified Files:
src/usr.bin/make/unit-tests: Makefile

Log Message:
make: unit-tests handle TEST_MAKE:T != make

We need to allow for ${TEST_MAKE:T}[1-9]: etc when
TEST_MAKE is not 'make'


To generate a diff of this commit:
cvs rdiff -u -r1.341 -r1.342 src/usr.bin/make/unit-tests/Makefile

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

Modified files:

Index: src/usr.bin/make/unit-tests/Makefile
diff -u src/usr.bin/make/unit-tests/Makefile:1.341 src/usr.bin/make/unit-tests/Makefile:1.342
--- src/usr.bin/make/unit-tests/Makefile:1.341	Sat Sep  9 16:41:04 2023
+++ src/usr.bin/make/unit-tests/Makefile	Sun Jan  7 02:07:44 2024
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.341 2023/09/09 16:41:04 sjg Exp $
+# $NetBSD: Makefile,v 1.342 2024/01/07 02:07:44 sjg Exp $
 #
 # Unit tests for make(1)
 #
@@ -747,6 +747,7 @@ _SED_CMDS+=	-e 's,${.OBJDIR},,g'
 _SED_CMDS+=	-e 's,^${TEST_MAKE:T:S,.,\\.,g}[][0-9]*:,make:,'
 _SED_CMDS+=	-e 's,${TEST_MAKE:S,.,\\.,g},make,'
 _SED_CMDS+=	-e 's,^usage: ${TEST_MAKE:T:S,.,\\.,g} ,usage: make ,'
+_SED_CMDS+=	-e 's,${TEST_MAKE:T:S,.,\\.,g}\(\[[1-9][0-9]*\]:\),make\1,'
 _SED_CMDS+=	-e 's,/,,g'
 _SED_CMDS+=	-e 's,${UNIT_TESTS:S,.,\\.,g}/,,g'
 _SED_CMDS+=	-e '/MAKE_VERSION/d'



CVS commit: src/usr.bin/make/unit-tests

2024-01-06 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Sun Jan  7 02:07:44 UTC 2024

Modified Files:
src/usr.bin/make/unit-tests: Makefile

Log Message:
make: unit-tests handle TEST_MAKE:T != make

We need to allow for ${TEST_MAKE:T}[1-9]: etc when
TEST_MAKE is not 'make'


To generate a diff of this commit:
cvs rdiff -u -r1.341 -r1.342 src/usr.bin/make/unit-tests/Makefile

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



CVS commit: src/usr.bin/make

2024-01-06 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Sun Jan  7 01:33:58 UTC 2024

Modified Files:
src/usr.bin/make: job.c main.c
src/usr.bin/make/unit-tests: jobs-error-indirect.exp
jobs-error-nested-make.exp jobs-error-nested.exp var-recursive.exp

Log Message:
make: more consistent error messages

Move %s: progname from Job_CheckCommands to Fatal
to avoid is being repeated when Job_CheckCommands is passed Error.

This means some errors from var also report progname (and level)
which is useful.

Reviewed by: rillig


To generate a diff of this commit:
cvs rdiff -u -r1.463 -r1.464 src/usr.bin/make/job.c
cvs rdiff -u -r1.608 -r1.609 src/usr.bin/make/main.c
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/jobs-error-indirect.exp \
src/usr.bin/make/unit-tests/jobs-error-nested.exp
cvs rdiff -u -r1.3 -r1.4 \
src/usr.bin/make/unit-tests/jobs-error-nested-make.exp
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/var-recursive.exp

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

Modified files:

Index: src/usr.bin/make/job.c
diff -u src/usr.bin/make/job.c:1.463 src/usr.bin/make/job.c:1.464
--- src/usr.bin/make/job.c:1.463	Fri Jan  5 23:22:06 2024
+++ src/usr.bin/make/job.c	Sun Jan  7 01:33:57 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: job.c,v 1.463 2024/01/05 23:22:06 rillig Exp $	*/
+/*	$NetBSD: job.c,v 1.464 2024/01/07 01:33:57 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -141,7 +141,7 @@
 #include "trace.h"
 
 /*	"@(#)job.c	8.2 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: job.c,v 1.463 2024/01/05 23:22:06 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.464 2024/01/07 01:33:57 sjg Exp $");
 
 /*
  * A shell defines how the commands are run.  All commands for a target are
@@ -1379,7 +1379,7 @@ Job_CheckCommands(GNode *gn, void (*abor
 		return false;
 	}
 
-	abortProc("%s: don't know how to make %s. Stop", progname, gn->name);
+	abortProc("don't know how to make %s. Stop", gn->name);
 	return false;
 }
 

Index: src/usr.bin/make/main.c
diff -u src/usr.bin/make/main.c:1.608 src/usr.bin/make/main.c:1.609
--- src/usr.bin/make/main.c:1.608	Fri Jan  5 23:22:06 2024
+++ src/usr.bin/make/main.c	Sun Jan  7 01:33:57 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.608 2024/01/05 23:22:06 rillig Exp $	*/
+/*	$NetBSD: main.c,v 1.609 2024/01/07 01:33:57 sjg Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -111,7 +111,7 @@
 #include "trace.h"
 
 /*	"@(#)main.c	8.3 (Berkeley) 3/19/94"	*/
-MAKE_RCSID("$NetBSD: main.c,v 1.608 2024/01/05 23:22:06 rillig Exp $");
+MAKE_RCSID("$NetBSD: main.c,v 1.609 2024/01/07 01:33:57 sjg Exp $");
 #if defined(MAKE_NATIVE)
 __COPYRIGHT("@(#) Copyright (c) 1988, 1989, 1990, 1993 "
 	"The Regents of the University of California.  "
@@ -1851,6 +1851,7 @@ Fatal(const char *fmt, ...)
 		Job_Wait();
 
 	(void)fflush(stdout);
+	fprintf(stderr, "%s: ", progname);
 	va_start(ap, fmt);
 	(void)vfprintf(stderr, fmt, ap);
 	va_end(ap);

Index: src/usr.bin/make/unit-tests/jobs-error-indirect.exp
diff -u src/usr.bin/make/unit-tests/jobs-error-indirect.exp:1.1 src/usr.bin/make/unit-tests/jobs-error-indirect.exp:1.2
--- src/usr.bin/make/unit-tests/jobs-error-indirect.exp:1.1	Tue Dec  1 17:50:04 2020
+++ src/usr.bin/make/unit-tests/jobs-error-indirect.exp	Sun Jan  7 01:33:57 2024
@@ -2,7 +2,7 @@ false
 *** [indirect] Error code 1
 
 make: stopped in unit-tests
-1 error
+make: 1 error
 
 make: stopped in unit-tests
 exit status 2
Index: src/usr.bin/make/unit-tests/jobs-error-nested.exp
diff -u src/usr.bin/make/unit-tests/jobs-error-nested.exp:1.1 src/usr.bin/make/unit-tests/jobs-error-nested.exp:1.2
--- src/usr.bin/make/unit-tests/jobs-error-nested.exp:1.1	Tue Dec  1 17:50:04 2020
+++ src/usr.bin/make/unit-tests/jobs-error-nested.exp	Sun Jan  7 01:33:57 2024
@@ -3,13 +3,13 @@ false
 *** [nested] Error code 1
 
 make: stopped in unit-tests
-1 error
+make: 1 error
 
 make: stopped in unit-tests
 *** [all] Error code 2
 
 make: stopped in unit-tests
-1 error
+make: 1 error
 
 make: stopped in unit-tests
 exit status 2

Index: src/usr.bin/make/unit-tests/jobs-error-nested-make.exp
diff -u src/usr.bin/make/unit-tests/jobs-error-nested-make.exp:1.3 src/usr.bin/make/unit-tests/jobs-error-nested-make.exp:1.4
--- src/usr.bin/make/unit-tests/jobs-error-nested-make.exp:1.3	Fri Jan  8 21:46:50 2021
+++ src/usr.bin/make/unit-tests/jobs-error-nested-make.exp	Sun Jan  7 01:33:57 2024
@@ -3,7 +3,7 @@ false
 *** [nested] Error code 1
 
 make: stopped in unit-tests
-1 error
+make: 1 error
 
 make: stopped in unit-tests
 

Index: src/usr.bin/make/unit-tests/var-recursive.exp
diff -u src/usr.bin/make/unit-tests/var-recursive.exp:1.6 src/usr.bin/make/unit-tests/var-recursive.exp:1.7
--- src/usr.bin/make/unit-tests/var-recursive.exp:1.6	Thu Jun  1 20:56:35 2023
+++ src/usr.bin/make/unit-tests/var-recursive.exp	Sun Jan  7 01:33:57 2024
@@ -1,19 +1,19 @@
 make: 

CVS commit: src/usr.bin/make

2024-01-06 Thread Simon J. Gerraty
Module Name:src
Committed By:   sjg
Date:   Sun Jan  7 01:33:58 UTC 2024

Modified Files:
src/usr.bin/make: job.c main.c
src/usr.bin/make/unit-tests: jobs-error-indirect.exp
jobs-error-nested-make.exp jobs-error-nested.exp var-recursive.exp

Log Message:
make: more consistent error messages

Move %s: progname from Job_CheckCommands to Fatal
to avoid is being repeated when Job_CheckCommands is passed Error.

This means some errors from var also report progname (and level)
which is useful.

Reviewed by: rillig


To generate a diff of this commit:
cvs rdiff -u -r1.463 -r1.464 src/usr.bin/make/job.c
cvs rdiff -u -r1.608 -r1.609 src/usr.bin/make/main.c
cvs rdiff -u -r1.1 -r1.2 src/usr.bin/make/unit-tests/jobs-error-indirect.exp \
src/usr.bin/make/unit-tests/jobs-error-nested.exp
cvs rdiff -u -r1.3 -r1.4 \
src/usr.bin/make/unit-tests/jobs-error-nested-make.exp
cvs rdiff -u -r1.6 -r1.7 src/usr.bin/make/unit-tests/var-recursive.exp

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



CVS commit: src/etc/etc.virt68k

2024-01-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Jan  7 00:58:11 UTC 2024

Added Files:
src/etc/etc.virt68k: MAKEDEV.conf Makefile.inc ttys

Log Message:
Add virt68k etc stuff.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/etc/etc.virt68k/MAKEDEV.conf \
src/etc/etc.virt68k/Makefile.inc src/etc/etc.virt68k/ttys

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

Added files:

Index: src/etc/etc.virt68k/MAKEDEV.conf
diff -u /dev/null src/etc/etc.virt68k/MAKEDEV.conf:1.1
--- /dev/null	Sun Jan  7 00:58:11 2024
+++ src/etc/etc.virt68k/MAKEDEV.conf	Sun Jan  7 00:58:11 2024
@@ -0,0 +1,26 @@
+# $NetBSD: MAKEDEV.conf,v 1.1 2024/01/07 00:58:11 thorpej Exp $
+
+all_md)
+	makedev sd0 sd1 sd2 sd3 sd4 sd5 sd6 sd7
+	makedev ld0 ld1 ld2 ld3 ld4 ld5 ld6 ld7
+	makedev dk0 dk1 dk2 dk3 dk4 dk5 dk6 dk7
+	makedev ttyGF0
+	makedev st0 st1 cd0 cd1
+	makedev uk0 uk1
+	makedev scsibus0 scsibus1 scsibus2 scsibus3
+	;;
+
+ramdisk)
+	makedev std bpf md0 md1 sd0 sd1 sd2 sd3
+	makedev ld0 ld1 ld2 ld3 ld4 ld5 ld6 ld7 dk0 dk1 dk2 dk3 dk4 dk5 dk6 dk7
+	makedev opty
+	makedev st0 st1 cd0 cd1
+	makedev drvctl random
+	;;
+
+ttyGF[0-9]*)
+	# Goldfish virtual TTY
+	unit=${i#ttyGF}
+	mkdev ttyGF$unit c 12 $(($unit + $dialin ))	"" "" $u_uucp
+	mkdev dtyGF$unit c 12 $(($unit + $dialout))	"" "" $u_uucp
+	;;
Index: src/etc/etc.virt68k/Makefile.inc
diff -u /dev/null src/etc/etc.virt68k/Makefile.inc:1.1
--- /dev/null	Sun Jan  7 00:58:11 2024
+++ src/etc/etc.virt68k/Makefile.inc	Sun Jan  7 00:58:11 2024
@@ -0,0 +1,14 @@
+#	$NetBSD: Makefile.inc,v 1.1 2024/01/07 00:58:11 thorpej Exp $
+#
+#	etc.virt68k/Makefile.inc -- virt68k-specific etc Makefile targets
+#
+
+# If you change the list of distributed kernels, don't forget
+# to update the release documentation in distrib/notes/common/contents
+
+KERNEL_SETS=		GENERIC
+
+INSTALLATION_DIRS+=	installation/ramdisks
+
+snap_md_post:
+	${MAKESUMS} -t ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/ramdisks -a
Index: src/etc/etc.virt68k/ttys
diff -u /dev/null src/etc/etc.virt68k/ttys:1.1
--- /dev/null	Sun Jan  7 00:58:11 2024
+++ src/etc/etc.virt68k/ttys	Sun Jan  7 00:58:11 2024
@@ -0,0 +1,18 @@
+#	$NetBSD: ttys,v 1.1 2024/01/07 00:58:11 thorpej Exp $
+#	from: @(#)ttys	5.1 (Berkeley) 4/17/89
+#
+# name	gettytype	status		comments
+#
+# If the console is marked insecure, single-user requires
+# the root password.
+#
+# /dev/console is always valid, regardless of the board type.
+#
+console "/usr/libexec/getty std.9600"	vt100	off secure
+constty "/usr/libexec/getty std.9600"	vt100	on secure
+
+#
+# Hardwired lines are marked off, by default, so getty(8)
+# is quiet when they don't exist.
+#
+ttyGF0	"/usr/libexec/getty std.9600"	vt100 off secure



CVS commit: src/etc/etc.virt68k

2024-01-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Jan  7 00:58:11 UTC 2024

Added Files:
src/etc/etc.virt68k: MAKEDEV.conf Makefile.inc ttys

Log Message:
Add virt68k etc stuff.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/etc/etc.virt68k/MAKEDEV.conf \
src/etc/etc.virt68k/Makefile.inc src/etc/etc.virt68k/ttys

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



CVS commit: src/distrib/virt68k

2024-01-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Jan  7 00:57:13 UTC 2024

Added Files:
src/distrib/virt68k: Makefile
src/distrib/virt68k/ramdisks: Makefile
src/distrib/virt68k/ramdisks/common: Makefile.ramdisk dot.profile
list.ramdisk
src/distrib/virt68k/ramdisks/inst-ramdisk: Makefile list

Log Message:
Add installation ramdisk for virt68k.  With the GENERIC kernel, you can
just specify this file with "-initrd /path/to/inst-ramdisk.fs" on the
Qemu command line and it will boot right into the installer.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/distrib/virt68k/Makefile
cvs rdiff -u -r0 -r1.1 src/distrib/virt68k/ramdisks/Makefile
cvs rdiff -u -r0 -r1.1 src/distrib/virt68k/ramdisks/common/Makefile.ramdisk \
src/distrib/virt68k/ramdisks/common/dot.profile \
src/distrib/virt68k/ramdisks/common/list.ramdisk
cvs rdiff -u -r0 -r1.1 src/distrib/virt68k/ramdisks/inst-ramdisk/Makefile \
src/distrib/virt68k/ramdisks/inst-ramdisk/list

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



CVS commit: src/distrib/virt68k

2024-01-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Jan  7 00:57:13 UTC 2024

Added Files:
src/distrib/virt68k: Makefile
src/distrib/virt68k/ramdisks: Makefile
src/distrib/virt68k/ramdisks/common: Makefile.ramdisk dot.profile
list.ramdisk
src/distrib/virt68k/ramdisks/inst-ramdisk: Makefile list

Log Message:
Add installation ramdisk for virt68k.  With the GENERIC kernel, you can
just specify this file with "-initrd /path/to/inst-ramdisk.fs" on the
Qemu command line and it will boot right into the installer.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.1 src/distrib/virt68k/Makefile
cvs rdiff -u -r0 -r1.1 src/distrib/virt68k/ramdisks/Makefile
cvs rdiff -u -r0 -r1.1 src/distrib/virt68k/ramdisks/common/Makefile.ramdisk \
src/distrib/virt68k/ramdisks/common/dot.profile \
src/distrib/virt68k/ramdisks/common/list.ramdisk
cvs rdiff -u -r0 -r1.1 src/distrib/virt68k/ramdisks/inst-ramdisk/Makefile \
src/distrib/virt68k/ramdisks/inst-ramdisk/list

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

Added files:

Index: src/distrib/virt68k/Makefile
diff -u /dev/null src/distrib/virt68k/Makefile:1.1
--- /dev/null	Sun Jan  7 00:57:13 2024
+++ src/distrib/virt68k/Makefile	Sun Jan  7 00:57:13 2024
@@ -0,0 +1,11 @@
+#	$NetBSD: Makefile,v 1.1 2024/01/07 00:57:13 thorpej Exp $
+
+.include 
+
+SUBDIR=
+SUBDIR+=	ramdisks
+SUBDIR+=	.WAIT
+
+TARGETS+=	release
+
+.include 

Index: src/distrib/virt68k/ramdisks/Makefile
diff -u /dev/null src/distrib/virt68k/ramdisks/Makefile:1.1
--- /dev/null	Sun Jan  7 00:57:13 2024
+++ src/distrib/virt68k/ramdisks/Makefile	Sun Jan  7 00:57:13 2024
@@ -0,0 +1,8 @@
+#	$NetBSD: Makefile,v 1.1 2024/01/07 00:57:13 thorpej Exp $
+
+SUBDIR=
+SUBDIR+=	inst-ramdisk
+
+TARGETS+=	release
+
+.include 

Index: src/distrib/virt68k/ramdisks/common/Makefile.ramdisk
diff -u /dev/null src/distrib/virt68k/ramdisks/common/Makefile.ramdisk:1.1
--- /dev/null	Sun Jan  7 00:57:13 2024
+++ src/distrib/virt68k/ramdisks/common/Makefile.ramdisk	Sun Jan  7 00:57:13 2024
@@ -0,0 +1,46 @@
+#	$NetBSD: Makefile.ramdisk,v 1.1 2024/01/07 00:57:13 thorpej Exp $
+
+NOSANITIZER=	# defined
+
+.include 
+.include "${NETBSDSRCDIR}/distrib/common/Makefile.distrib"
+
+VIRT68KCOMMON=	${.CURDIR}/../common
+
+.PATH:		${VIRT68KCOMMON}
+
+WARNS=		1
+DBG=		-Os
+
+CRUNCHBIN=	ramdiskbin
+
+# Use ${.CURDIR}/list only if LISTS was not already defined by the caller.
+LISTS?=		${.CURDIR}/list
+LISTS+=		${VIRT68KCOMMON}/list.ramdisk
+MTREECONF=	${DISTRIBDIR}/common/mtree.common
+IMAGEENDIAN=	be
+IMAGEDEPENDS+= 	${CRUNCHBIN} \
+		dot.profile \
+		${NETBSDSRCDIR}/etc/group ${NETBSDSRCDIR}/etc/master.passwd \
+		${NETBSDSRCDIR}/etc/netconfig ${DISTRIBDIR}/common/protocols \
+		${DISTRIBDIR}/common/services
+
+.if defined(USE_SYSINST)
+LISTS+=		${DISTRIBDIR}/common/list.sysinst
+MAKEFS_FLAGS+=	-f 14
+.endif
+
+# Use stubs to eliminate some large stuff from libc
+HACKSRC=	${DISTRIBDIR}/utils/libhack
+.include	"${HACKSRC}/Makefile.inc"
+${CRUNCHBIN}:	libhack.o
+
+.include "${DISTRIBDIR}/common/Makefile.crunch"
+.include "${DISTRIBDIR}/common/Makefile.dhcpcd"
+.include "${DISTRIBDIR}/common/Makefile.makedev"
+.include "${DISTRIBDIR}/common/Makefile.image"
+
+release: check_RELEASEDIR
+	${RELEASE_INSTALL} ${IMAGE} ${RELEASEDIR}/${RELEASEMACHINEDIR}/installation/ramdisks
+
+.include 
Index: src/distrib/virt68k/ramdisks/common/dot.profile
diff -u /dev/null src/distrib/virt68k/ramdisks/common/dot.profile:1.1
--- /dev/null	Sun Jan  7 00:57:13 2024
+++ src/distrib/virt68k/ramdisks/common/dot.profile	Sun Jan  7 00:57:13 2024
@@ -0,0 +1,76 @@
+#	$NetBSD: dot.profile,v 1.1 2024/01/07 00:57:13 thorpej Exp $
+#
+# Copyright (c) 1997 Perry E. Metzger
+# Copyright (c) 1994 Christopher G. Demetriou
+# All rights reserved.
+# 
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions
+# are met:
+# 1. Redistributions of source code must retain the above copyright
+#notice, this list of conditions and the following disclaimer.
+# 2. Redistributions in binary form must reproduce the above copyright
+#notice, this list of conditions and the following disclaimer in the
+#documentation and/or other materials provided with the distribution.
+# 3. All advertising materials mentioning features or use of this software
+#must display the following acknowledgement:
+#  This product includes software developed for the
+#  NetBSD Project.  See http://www.NetBSD.org/ for
+#  information about NetBSD.
+# 4. The name of the author may not be used to endorse or promote products
+#derived from this software without specific prior written permission.
+# 
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+# OF MERCHANTABILITY AND 

CVS commit: src

2024-01-06 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jan  7 00:38:18 UTC 2024

Modified Files:
src/distrib/sets/lists/comp: mi
src/share/man/man9: Makefile

Log Message:
Install securelevel.9 as an alias of secmodel_securelevel.9

According to submitter, this should be sufficient to address misc/57824.


To generate a diff of this commit:
cvs rdiff -u -r1.2451 -r1.2452 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.468 -r1.469 src/share/man/man9/Makefile

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

Modified files:

Index: src/distrib/sets/lists/comp/mi
diff -u src/distrib/sets/lists/comp/mi:1.2451 src/distrib/sets/lists/comp/mi:1.2452
--- src/distrib/sets/lists/comp/mi:1.2451	Sat Dec  2 21:02:12 2023
+++ src/distrib/sets/lists/comp/mi	Sun Jan  7 00:38:18 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: mi,v 1.2451 2023/12/02 21:02:12 thorpej Exp $
+#	$NetBSD: mi,v 1.2452 2024/01/07 00:38:18 pgoyette Exp $
 #
 # Note: don't delete entries from here - mark them as "obsolete" instead.
 ./etc/mtree/set.compcomp-sys-root
@@ -12729,6 +12729,7 @@
 ./usr/share/man/cat9/secmodel_register.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/secmodel_securelevel.0	comp-sys-catman		.cat
 ./usr/share/man/cat9/secmodel_suser.0		comp-sys-catman		.cat
+./usr/share/man/cat9/securelevel.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/seldestroy.0		comp-sys-catman		.cat
 ./usr/share/man/cat9/select.0			comp-sys-catman		.cat
 ./usr/share/man/cat9/selinit.0			comp-sys-catman		.cat
@@ -21093,6 +21094,7 @@
 ./usr/share/man/html9/secmodel_register.html	comp-sys-htmlman	html
 ./usr/share/man/html9/secmodel_securelevel.html comp-sys-htmlman	html
 ./usr/share/man/html9/secmodel_suser.html	comp-sys-htmlman	html
+./usr/share/man/html9/securelevel.html		comp-sys-htmlman	html
 ./usr/share/man/html9/seldestroy.html		comp-sys-htmlman	html
 ./usr/share/man/html9/select.html		comp-sys-htmlman	html
 ./usr/share/man/html9/selinit.html		comp-sys-htmlman	html
@@ -29646,6 +29648,7 @@
 ./usr/share/man/man9/secmodel_register.9	comp-sys-man		.man
 ./usr/share/man/man9/secmodel_securelevel.9	comp-sys-man		.man
 ./usr/share/man/man9/secmodel_suser.9		comp-sys-man		.man
+./usr/share/man/man9/securelevel.9		comp-sys-man		.man
 ./usr/share/man/man9/seldestroy.9		comp-sys-man		.man
 ./usr/share/man/man9/select.9			comp-sys-man		.man
 ./usr/share/man/man9/selinit.9			comp-sys-man		.man

Index: src/share/man/man9/Makefile
diff -u src/share/man/man9/Makefile:1.468 src/share/man/man9/Makefile:1.469
--- src/share/man/man9/Makefile:1.468	Sat Dec  2 21:02:12 2023
+++ src/share/man/man9/Makefile	Sun Jan  7 00:38:18 2024
@@ -1,4 +1,4 @@
-#   $NetBSD: Makefile,v 1.468 2023/12/02 21:02:12 thorpej Exp $
+#   $NetBSD: Makefile,v 1.469 2024/01/07 00:38:18 pgoyette Exp $
 
 #	Makefile for section 9 (kernel function and variable) manual pages.
 
@@ -51,7 +51,10 @@ MAN=	accept_filter.9 accf_data.9 accf_ht
 	scanc.9 \
 	sched_4bsd.9 sched_m2.9 scsipi.9 \
 	secmodel_bsd44.9 secmodel_extensions.9 \
-	secmodel_overlay.9 secmodel_securelevel.9 secmodel_suser.9 \
+	secmodel_overlay.9
+MAN+=	secmodel_securelevel.9 
+MLINKS+=secmodel_securelevel.9 securelevel.9
+MAN+=	secmodel_suser.9 \
 	SET.9 setbit.9 setjmp.9 shutdownhook_establish.9 \
 	signal.9 skpc.9 sockopt.9 softintr.9 spl.9 specificdata.9 \
 	spi.9 splraiseipl.9 \



CVS commit: src

2024-01-06 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jan  7 00:38:18 UTC 2024

Modified Files:
src/distrib/sets/lists/comp: mi
src/share/man/man9: Makefile

Log Message:
Install securelevel.9 as an alias of secmodel_securelevel.9

According to submitter, this should be sufficient to address misc/57824.


To generate a diff of this commit:
cvs rdiff -u -r1.2451 -r1.2452 src/distrib/sets/lists/comp/mi
cvs rdiff -u -r1.468 -r1.469 src/share/man/man9/Makefile

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



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

2024-01-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jan  6 21:49:59 UTC 2024

Modified Files:
src/sys/arch/virt68k/dev: virtctrl.c

Log Message:
Fix dump paste-o.  Halt works properly.  Reboot does reboot, but the
new kernel instance crashes early.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/virt68k/dev/virtctrl.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/virt68k/dev/virtctrl.c
diff -u src/sys/arch/virt68k/dev/virtctrl.c:1.1 src/sys/arch/virt68k/dev/virtctrl.c:1.2
--- src/sys/arch/virt68k/dev/virtctrl.c:1.1	Tue Jan  2 18:11:44 2024
+++ src/sys/arch/virt68k/dev/virtctrl.c	Sat Jan  6 21:49:59 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: virtctrl.c,v 1.1 2024/01/02 18:11:44 thorpej Exp $	*/
+/*	$NetBSD: virtctrl.c,v 1.2 2024/01/06 21:49:59 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2024 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: virtctrl.c,v 1.1 2024/01/02 18:11:44 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: virtctrl.c,v 1.2 2024/01/06 21:49:59 thorpej Exp $");
 
 #include 
 #include 
@@ -64,7 +64,7 @@ static const struct device_compatible_en
 #define	REG_READ(sc, r)		\
 	bus_space_read_4((sc)->sc_bst, (sc)->sc_bsh, (r))
 #define	REG_WRITE(sc, r, v)	\
-	bus_space_read_4((sc)->sc_bst, (sc)->sc_bsh, (r))
+	bus_space_write_4((sc)->sc_bst, (sc)->sc_bsh, (r), (v))
 
 static void
 virtctrl_reset_handler(void *v, int howto)



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

2024-01-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jan  6 21:49:59 UTC 2024

Modified Files:
src/sys/arch/virt68k/dev: virtctrl.c

Log Message:
Fix dump paste-o.  Halt works properly.  Reboot does reboot, but the
new kernel instance crashes early.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/virt68k/dev/virtctrl.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/virt68k/virt68k

2024-01-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jan  6 21:43:37 UTC 2024

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

Log Message:
Fix stupid typo in cpu_set_reset_func().


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/virt68k/virt68k/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/virt68k/virt68k/machdep.c
diff -u src/sys/arch/virt68k/virt68k/machdep.c:1.4 src/sys/arch/virt68k/virt68k/machdep.c:1.5
--- src/sys/arch/virt68k/virt68k/machdep.c:1.4	Sat Jan  6 17:32:41 2024
+++ src/sys/arch/virt68k/virt68k/machdep.c	Sat Jan  6 21:43:37 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.4 2024/01/06 17:32:41 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.5 2024/01/06 21:43:37 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.4 2024/01/06 17:32:41 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.5 2024/01/06 21:43:37 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_m060sp.h"
@@ -429,7 +429,7 @@ void
 cpu_set_reset_func(void (*func)(void *, int), void *arg)
 {
 	if (cpu_reset_func == NULL) {
-		cpu_reset_func = cpu_reset_func;
+		cpu_reset_func = func;
 		cpu_reset_func_arg = arg;
 	}
 }



CVS commit: src/sys/arch/virt68k/virt68k

2024-01-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jan  6 21:43:37 UTC 2024

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

Log Message:
Fix stupid typo in cpu_set_reset_func().


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/virt68k/virt68k/machdep.c

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



CVS commit: src/sys/arch/virt68k/virt68k

2024-01-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jan  6 21:40:41 UTC 2024

Modified Files:
src/sys/arch/virt68k/virt68k: bootinfo.c

Log Message:
Implement bootinfo_setup_rndseed().  Thx Riastradh@ for the suggestion.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/virt68k/virt68k/bootinfo.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/virt68k/virt68k/bootinfo.c
diff -u src/sys/arch/virt68k/virt68k/bootinfo.c:1.4 src/sys/arch/virt68k/virt68k/bootinfo.c:1.5
--- src/sys/arch/virt68k/virt68k/bootinfo.c:1.4	Sat Jan  6 17:32:41 2024
+++ src/sys/arch/virt68k/virt68k/bootinfo.c	Sat Jan  6 21:40:41 2024
@@ -1,4 +1,4 @@
-/*  $NetBSD: bootinfo.c,v 1.4 2024/01/06 17:32:41 thorpej Exp $*/  
+/*  $NetBSD: bootinfo.c,v 1.5 2024/01/06 21:40:41 thorpej Exp $*/  
 
 /*-
  * Copyright (c) 2023 The NetBSD Foundation, Inc.
@@ -30,13 +30,14 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bootinfo.c,v 1.4 2024/01/06 17:32:41 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bootinfo.c,v 1.5 2024/01/06 21:40:41 thorpej Exp $");
 
 #include "opt_md.h"
 
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -413,14 +414,15 @@ bootinfo_setup_initrd(void)
 void
 bootinfo_setup_rndseed(void)
 {
+	static struct krndsource bootinfo_rndsource;
 	struct bi_record *bi = bootinfo_find(BI_RNG_SEED);
 	if (bi != NULL) {
 		struct bi_data *rnd = bootinfo_dataptr(bi);
-#if 0 /* XXX */
-		rnd_seed(rnd->data_bytes, rnd->data_length);
-#else
-		printf("WARNING: ignored %u bytes of RND_SEED data @ %p\n",
-		rnd->data_length, rnd->data_bytes);
-#endif
+		rnd_attach_source(_rndsource, "bootinfo",
+		RND_TYPE_RNG, RND_FLAG_DEFAULT);
+		rnd_add_data(_rndsource,
+		rnd->data_bytes, rnd->data_length,
+		rnd->data_length * NBBY);
+		explicit_memset(rnd->data_bytes, 0, rnd->data_length);
 	}
 }



CVS commit: src/sys/arch/virt68k/virt68k

2024-01-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jan  6 21:40:41 UTC 2024

Modified Files:
src/sys/arch/virt68k/virt68k: bootinfo.c

Log Message:
Implement bootinfo_setup_rndseed().  Thx Riastradh@ for the suggestion.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/virt68k/virt68k/bootinfo.c

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



Re: CVS commit: src/sys/sys

2024-01-06 Thread Christos Zoulas
In article <2017973.usquhbg...@britannica.bec.de>,
Joerg Sonnenberger   wrote:
>On Tuesday, January 2, 2024 8:27:57 PM CET Christos Zoulas wrote:
>> Module Name: src
>> Committed By:christos
>> Date:Tue Jan  2 19:27:57 UTC 2024
>> 
>> Modified Files:
>>  src/sys/sys: rbtree.h
>> 
>> Log Message:
>> This uses size_t, so it always needs , remove ifdefs.
>
>sys/types.h is one of the most polluting headers we have. This is a huge
>step backwards...

You realize of course that it was working before because it was getting
sys/types.h from sys/endian.h which had an include cycle before which I was
trying to fix. Now sys/endian.h does not include sys/types.h which is a step
forward. Yes, our headers are messy but we are trying to clean them.


Happy New Year,

christos



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

2024-01-06 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Jan  6 21:26:43 UTC 2024

Modified Files:
src/sys/arch/i386/stand/efiboot: efidisk.c efidisk.h
src/sys/arch/i386/stand/lib: biosdisk.c exec.c

Log Message:
In efiboot
- create bootinfo information only once.
- add fake biosgeom entries so that the kernel can distinguish between
  hard drives (with geom) and CD-ROM (without).


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/i386/stand/efiboot/efidisk.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/i386/stand/efiboot/efidisk.h
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/i386/stand/lib/biosdisk.c
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/i386/stand/lib/exec.c

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

Modified files:

Index: src/sys/arch/i386/stand/efiboot/efidisk.c
diff -u src/sys/arch/i386/stand/efiboot/efidisk.c:1.10 src/sys/arch/i386/stand/efiboot/efidisk.c:1.11
--- src/sys/arch/i386/stand/efiboot/efidisk.c:1.10	Sun May 14 09:07:54 2023
+++ src/sys/arch/i386/stand/efiboot/efidisk.c	Sat Jan  6 21:26:43 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: efidisk.c,v 1.10 2023/05/14 09:07:54 riastradh Exp $	*/
+/*	$NetBSD: efidisk.c,v 1.11 2024/01/06 21:26:43 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka 
@@ -38,9 +38,12 @@
 #include "biosdisk_ll.h"
 #include "devopen.h"
 #include "efidisk.h"
+#include "bootinfo.h"
 
 static struct efidiskinfo_lh efi_disklist;
 static int nefidisks;
+static struct btinfo_biosgeom *bibg;
+static size_t bibg_len;
 
 #define MAXDEVNAME 39 /* "NAME=" + 34 char part_name */
 
@@ -158,6 +161,23 @@ next:
 		if (edi->bootdev)
 			boot_biosdev = edi->dev;
 	}
+
+	bibg_len = sizeof(*bibg) + nefidisks * sizeof(struct bi_biosgeom_entry);
+	bibg = alloc(bibg_len);
+	if (bibg == NULL)
+		return;
+
+	bibg->num = nefidisks;
+
+	i = 0;
+	TAILQ_FOREACH(edi, _disklist, list) {
+		if (edi->type == BIOSDISK_TYPE_HD) {
+			memset(>disk[i], 0, sizeof(bibg->disk[i]));
+			bibg->disk[i].dev = edi->dev;
+			bibg->disk[i].flags = BI_GEOM_INVALID;
+		}
+		++i;
+	}
 }
 
 static void
@@ -383,3 +403,10 @@ efidisk_get_efi_system_partition(int dev
 	*partition = i;
 	return 0;
 }
+
+void
+efidisk_getbiosgeom()
+{
+	BI_ADD(bibg, BTINFO_BIOSGEOM, bibg_len);
+}
+

Index: src/sys/arch/i386/stand/efiboot/efidisk.h
diff -u src/sys/arch/i386/stand/efiboot/efidisk.h:1.3 src/sys/arch/i386/stand/efiboot/efidisk.h:1.4
--- src/sys/arch/i386/stand/efiboot/efidisk.h:1.3	Mon Apr  2 09:44:18 2018
+++ src/sys/arch/i386/stand/efiboot/efidisk.h	Sat Jan  6 21:26:43 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: efidisk.h,v 1.3 2018/04/02 09:44:18 nonaka Exp $	*/
+/*	$NetBSD: efidisk.h,v 1.4 2024/01/06 21:26:43 mlelstv Exp $	*/
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka 
@@ -41,3 +41,4 @@ TAILQ_HEAD(efidiskinfo_lh, efidiskinfo);
 
 const struct efidiskinfo *efidisk_getinfo(int);
 int efidisk_get_efi_system_partition(int, int *);
+void efidisk_getbiosgeom(void);

Index: src/sys/arch/i386/stand/lib/biosdisk.c
diff -u src/sys/arch/i386/stand/lib/biosdisk.c:1.60 src/sys/arch/i386/stand/lib/biosdisk.c:1.61
--- src/sys/arch/i386/stand/lib/biosdisk.c:1.60	Mon Oct  2 00:02:33 2023
+++ src/sys/arch/i386/stand/lib/biosdisk.c	Sat Jan  6 21:26:43 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: biosdisk.c,v 1.60 2023/10/02 00:02:33 manu Exp $	*/
+/*	$NetBSD: biosdisk.c,v 1.61 2024/01/06 21:26:43 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1996, 1998
@@ -1198,11 +1198,13 @@ out:
 static void
 add_biosdisk_bootinfo(void)
 {
+#ifndef EFIBOOT
 	if (bootinfo == NULL) {
 		return;
 	}
 	BI_ADD(_disk, BTINFO_BOOTDISK, sizeof(bi_disk));
 	BI_ADD(_wedge, BTINFO_BOOTWEDGE, sizeof(bi_wedge));
+#endif
 	return;
 }
 #endif

Index: src/sys/arch/i386/stand/lib/exec.c
diff -u src/sys/arch/i386/stand/lib/exec.c:1.79 src/sys/arch/i386/stand/lib/exec.c:1.80
--- src/sys/arch/i386/stand/lib/exec.c:1.79	Thu Apr 20 00:42:24 2023
+++ src/sys/arch/i386/stand/lib/exec.c	Sat Jan  6 21:26:43 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: exec.c,v 1.79 2023/04/20 00:42:24 manu Exp $	 */
+/*	$NetBSD: exec.c,v 1.80 2024/01/06 21:26:43 mlelstv Exp $	 */
 
 /*
  * Copyright (c) 2008, 2009 The NetBSD Foundation, Inc.
@@ -108,6 +108,8 @@
 #endif
 #ifdef EFIBOOT
 #include "efiboot.h"
+#include "biosdisk.h"
+#include "efidisk.h"
 #undef DEBUG	/* XXX */
 #endif
 
@@ -498,6 +500,10 @@ exec_netbsd(const char *file, physaddr_t
 		goto out;
 	}
 #ifdef EFIBOOT
+	BI_ADD(_disk, BTINFO_BOOTDISK, sizeof(bi_disk));
+	BI_ADD(_wedge, BTINFO_BOOTWEDGE, sizeof(bi_wedge));
+	efidisk_getbiosgeom();
+
 	efi_load_start = marks[MARK_START];
 
 	/* adjust to the real load address */



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

2024-01-06 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Sat Jan  6 21:26:43 UTC 2024

Modified Files:
src/sys/arch/i386/stand/efiboot: efidisk.c efidisk.h
src/sys/arch/i386/stand/lib: biosdisk.c exec.c

Log Message:
In efiboot
- create bootinfo information only once.
- add fake biosgeom entries so that the kernel can distinguish between
  hard drives (with geom) and CD-ROM (without).


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/i386/stand/efiboot/efidisk.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/i386/stand/efiboot/efidisk.h
cvs rdiff -u -r1.60 -r1.61 src/sys/arch/i386/stand/lib/biosdisk.c
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/i386/stand/lib/exec.c

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



CVS commit: src/sys

2024-01-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jan  6 17:52:43 UTC 2024

Modified Files:
src/sys/arch/virt68k/dev: gftty_mainbus.c
src/sys/dev/goldfish: gftty.c gfttyvar.h

Log Message:
Put some meat on the bones of the Goldfish TTY driver.  Works well enough
for sysinst.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/virt68k/dev/gftty_mainbus.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/goldfish/gftty.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/goldfish/gfttyvar.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/virt68k/dev/gftty_mainbus.c
diff -u src/sys/arch/virt68k/dev/gftty_mainbus.c:1.1 src/sys/arch/virt68k/dev/gftty_mainbus.c:1.2
--- src/sys/arch/virt68k/dev/gftty_mainbus.c:1.1	Tue Jan  2 07:40:59 2024
+++ src/sys/arch/virt68k/dev/gftty_mainbus.c	Sat Jan  6 17:52:43 2024
@@ -1,7 +1,7 @@
-/*	$NetBSD: gftty_mainbus.c,v 1.1 2024/01/02 07:40:59 thorpej Exp $	*/
+/*	$NetBSD: gftty_mainbus.c,v 1.2 2024/01/06 17:52:43 thorpej Exp $	*/
 
 /*-
- * Copyright (c) 2023 The NetBSD Foundation, Inc.
+ * Copyright (c) 2023, 2024 The NetBSD Foundation, Inc.
  * All rights reserved.
  *
  * This code is derived from software contributed to The NetBSD Foundation
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gftty_mainbus.c,v 1.1 2024/01/02 07:40:59 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gftty_mainbus.c,v 1.2 2024/01/06 17:52:43 thorpej Exp $");
 
 #include 
 #include 
@@ -61,6 +61,7 @@ gftty_mainbus_attach(device_t parent, de
 {
 	struct gftty_softc * const sc = device_private(self);
 	struct mainbus_attach_args * const ma = aux;
+	char strbuf[INTR_STRING_BUFSIZE];
 
 	sc->sc_dev = self;
 
@@ -75,7 +76,21 @@ gftty_mainbus_attach(device_t parent, de
 		gftty_alloc_config(sc, ma->ma_st, bsh);
 	}
 
+	sc->sc_dmat = ma->ma_dmat;
+
 	gftty_attach(sc);
+	if (sc->sc_tty != NULL) {
+		/* Attach was successful. Set up interrupt. */
+		sc->sc_ih = intr_establish(gftty_intr, sc,
+		ma->ma_irq, IPL_TTY, 0);
+		if (sc->sc_ih == NULL) {
+			aprint_error_dev(self,
+			"couldn't install interrupt handler\n");
+			return;
+		}
+		aprint_normal_dev(self, "interrupting at %s\n",
+		intr_string(sc->sc_ih, strbuf, sizeof(strbuf)));
+	}
 }
 
 CFATTACH_DECL_NEW(gftty_mainbus, sizeof(struct gftty_softc),

Index: src/sys/dev/goldfish/gftty.c
diff -u src/sys/dev/goldfish/gftty.c:1.2 src/sys/dev/goldfish/gftty.c:1.3
--- src/sys/dev/goldfish/gftty.c:1.2	Tue Jan  2 07:30:29 2024
+++ src/sys/dev/goldfish/gftty.c	Sat Jan  6 17:52:43 2024
@@ -1,7 +1,7 @@
-/*	$NetBSD: gftty.c,v 1.2 2024/01/02 07:30:29 thorpej Exp $	*/
+/*	$NetBSD: gftty.c,v 1.3 2024/01/06 17:52:43 thorpej Exp $	*/
 
 /*- 
- * Copyright (c) 2023 The NetBSD Foundation, Inc.
+ * Copyright (c) 2023, 2024 The NetBSD Foundation, Inc.
  * All rights reserved.
  *  
  * This code is derived from software contributed to The NetBSD Foundation
@@ -34,13 +34,17 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: gftty.c,v 1.2 2024/01/02 07:30:29 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: gftty.c,v 1.3 2024/01/06 17:52:43 thorpej Exp $");
 
 #include 
+#include 
+#include 
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 
 #include 
 
@@ -48,6 +52,8 @@ __KERNEL_RCSID(0, "$NetBSD: gftty.c,v 1.
 
 #include 
 
+#include "ioconf.h"
+
 /*
  * Goldfish TTY registers.
  */
@@ -79,13 +85,58 @@ static void	gftty_cnpollc(dev_t, int);
 static struct gftty_config gftty_cnconfig;
 static struct cnm_state gftty_cnmagic_state;
 static struct consdev gftty_consdev = {
-	.cn_getc	=	gftty_cngetc,
-	.cn_putc	=	gftty_cnputc,
-	.cn_pollc	=	gftty_cnpollc,
-	.cn_dev		=	NODEV,
-	.cn_pri		=	CN_NORMAL,
+	.cn_getc  = gftty_cngetc,
+	.cn_putc  = gftty_cnputc,
+	.cn_pollc = gftty_cnpollc,
+	.cn_dev   = NODEV,
+	.cn_pri   = CN_NORMAL,
+};
+
+static dev_type_open(gftty_open);
+static dev_type_close(gftty_close);
+static dev_type_read(gftty_read);
+static dev_type_write(gftty_write);
+static dev_type_ioctl(gftty_ioctl);
+static dev_type_stop(gftty_stop);
+static dev_type_tty(gftty_tty);
+static dev_type_poll(gftty_poll);
+
+const struct cdevsw gftty_cdevsw = {
+	.d_open = gftty_open,
+	.d_close= gftty_close,
+	.d_read = gftty_read,
+	.d_write= gftty_write,
+	.d_ioctl= gftty_ioctl,
+	.d_stop = gftty_stop,
+	.d_tty  = gftty_tty,
+	.d_poll = gftty_poll,
+	.d_mmap = nommap,
+	.d_kqfilter = ttykqfilter,
+	.d_discard  = nodiscard,
+	.d_flag = D_TTY,
 };
 
+static void	gftty_start(struct tty *);
+static int	gftty_param_locked(struct tty *, struct termios *);
+static int	gftty_param(struct tty *, struct termios *);
+
+static void	gftty_softrx(void *);
+
+#define	GFTTY_UNIT(x)		minor(x)
+#define	GFTTY_DMASIZE		(64 * 1024)	/* XXX TTY_MAXQSIZE */
+#define	GFTTY_MAXSEGS		((GFTTY_DMASIZE / PAGE_SIZE) + 1)
+#define	GFTTY_RXBUFSIZE		128
+#define	GFTTY_RXBUFALLOC	(128 << 1)
+
+static 

CVS commit: src/sys

2024-01-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jan  6 17:52:43 UTC 2024

Modified Files:
src/sys/arch/virt68k/dev: gftty_mainbus.c
src/sys/dev/goldfish: gftty.c gfttyvar.h

Log Message:
Put some meat on the bones of the Goldfish TTY driver.  Works well enough
for sysinst.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/virt68k/dev/gftty_mainbus.c
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/goldfish/gftty.c
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/goldfish/gfttyvar.h

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



CVS commit: src/sys/arch/virt68k

2024-01-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jan  6 17:32:41 UTC 2024

Modified Files:
src/sys/arch/virt68k/include: bootinfo.h vmparam.h
src/sys/arch/virt68k/virt68k: bootinfo.c machdep.c

Log Message:
The RAM disk specified by bootinfo is not necessarily loaded along with
the static kernel image.  Map is separately and account for it in the
available memory segments.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/virt68k/include/bootinfo.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/virt68k/include/vmparam.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/virt68k/virt68k/bootinfo.c \
src/sys/arch/virt68k/virt68k/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/virt68k/include/bootinfo.h
diff -u src/sys/arch/virt68k/include/bootinfo.h:1.3 src/sys/arch/virt68k/include/bootinfo.h:1.4
--- src/sys/arch/virt68k/include/bootinfo.h:1.3	Tue Jan  2 17:13:03 2024
+++ src/sys/arch/virt68k/include/bootinfo.h	Sat Jan  6 17:32:40 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: bootinfo.h,v 1.3 2024/01/02 17:13:03 thorpej Exp $	*/
+/*	$NetBSD: bootinfo.h,v 1.4 2024/01/06 17:32:40 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2023 The NetBSD Foundation, Inc.
@@ -142,6 +142,7 @@ extern size_t	bootinfo_mem_segments_igno
 extern struct bi_mem_info bootinfo_mem_segments[];
 extern struct bi_mem_info bootinfo_mem_segments_avail[];
 extern int	bootinfo_mem_nsegments;
+extern int	bootinfo_mem_nsegments_avail;
 extern vaddr_t	bootinfo_end;
 
 #define	bootinfo_dataptr(bi)	((void *)&(bi)->bi_data[0])

Index: src/sys/arch/virt68k/include/vmparam.h
diff -u src/sys/arch/virt68k/include/vmparam.h:1.1 src/sys/arch/virt68k/include/vmparam.h:1.2
--- src/sys/arch/virt68k/include/vmparam.h:1.1	Tue Jan  2 07:41:01 2024
+++ src/sys/arch/virt68k/include/vmparam.h	Sat Jan  6 17:32:40 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: vmparam.h,v 1.1 2024/01/02 07:41:01 thorpej Exp $	*/
+/*	$NetBSD: vmparam.h,v 1.2 2024/01/06 17:32:40 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -115,10 +115,15 @@
 
 /*
  * Constants which control the way the VM system deals with memory segments.
- * The Qemu virt68k platform only has a single memory segment.
+ *
+ * We generally assume there's just a single real memory segment on this
+ * platform, but we need to be able to deal with a "hole" left by a RAM
+ * disk if the loader provided one.  We optimize for the loader either
+ * plopping the RAM disk immediately after the kernel image or at the end
+ * of RAM, which would still leave us with a single large segment.
  */
-#define	VM_PHYSSEG_MAX		1
-#define	VM_PHYSSEG_STRAT	VM_PSTRAT_BSEARCH
+#define	VM_PHYSSEG_MAX		4
+#define	VM_PHYSSEG_STRAT	VM_PSTRAT_BIGFIRST
 
 #define	VM_NFREELIST		1
 #define	VM_FREELIST_DEFAULT	0

Index: src/sys/arch/virt68k/virt68k/bootinfo.c
diff -u src/sys/arch/virt68k/virt68k/bootinfo.c:1.3 src/sys/arch/virt68k/virt68k/bootinfo.c:1.4
--- src/sys/arch/virt68k/virt68k/bootinfo.c:1.3	Tue Jan  2 17:13:03 2024
+++ src/sys/arch/virt68k/virt68k/bootinfo.c	Sat Jan  6 17:32:41 2024
@@ -1,4 +1,4 @@
-/*  $NetBSD: bootinfo.c,v 1.3 2024/01/02 17:13:03 thorpej Exp $*/  
+/*  $NetBSD: bootinfo.c,v 1.4 2024/01/06 17:32:41 thorpej Exp $*/  
 
 /*-
  * Copyright (c) 2023 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bootinfo.c,v 1.3 2024/01/02 17:13:03 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bootinfo.c,v 1.4 2024/01/06 17:32:41 thorpej Exp $");
 
 #include "opt_md.h"
 
@@ -38,6 +38,8 @@ __KERNEL_RCSID(0, "$NetBSD: bootinfo.c,v
 #include 
 #include 
 
+#include 
+
 #ifdef MEMORY_DISK_DYNAMIC
 #include 
 #endif
@@ -58,10 +60,14 @@ size_t			bootinfo_mem_segments_ignored_b
 struct bi_mem_info	bootinfo_mem_segments[VM_PHYSSEG_MAX];
 struct bi_mem_info	bootinfo_mem_segments_avail[VM_PHYSSEG_MAX];
 int			bootinfo_mem_nsegments;
+int			bootinfo_mem_nsegments_avail;
 
 static paddr_t		bootinfo_console_addr;
 static bool		bootinfo_console_addr_valid;
 
+static uint32_t		bootinfo_initrd_start;
+static uint32_t		bootinfo_initrd_size;
+
 static bool
 bootinfo_set_console(paddr_t pa)
 {
@@ -141,9 +147,79 @@ bootinfo_add_mem(struct bi_record *bi)
 	m->mem_size = m68k_trunc_page(m->mem_size);
 	physmem += m->mem_size >> PGSHIFT;
 
-	bootinfo_mem_segments[bootinfo_mem_nsegments] = *m;
-	bootinfo_mem_segments_avail[bootinfo_mem_nsegments] = *m;
-	bootinfo_mem_nsegments++;
+	bootinfo_mem_segments[bootinfo_mem_nsegments++] = *m;
+	bootinfo_mem_segments_avail[bootinfo_mem_nsegments_avail++] = *m;
+}
+
+static inline void
+bootinfo_add_initrd(struct bi_record *bi)
+{
+	struct bi_mem_info *rd = bootinfo_dataptr(bi);
+
+	if (bootinfo_initrd_size == 0) {
+		bootinfo_initrd_start = rd->mem_addr;
+		bootinfo_initrd_size  = rd->mem_size;
+	}
+}
+
+static inline void
+bootinfo_reserve_initrd(void)
+{
+	if (bootinfo_initrd_size == 0) {
+		return;
+	

CVS commit: src/sys/arch/virt68k

2024-01-06 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jan  6 17:32:41 UTC 2024

Modified Files:
src/sys/arch/virt68k/include: bootinfo.h vmparam.h
src/sys/arch/virt68k/virt68k: bootinfo.c machdep.c

Log Message:
The RAM disk specified by bootinfo is not necessarily loaded along with
the static kernel image.  Map is separately and account for it in the
available memory segments.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/virt68k/include/bootinfo.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/virt68k/include/vmparam.h
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/virt68k/virt68k/bootinfo.c \
src/sys/arch/virt68k/virt68k/machdep.c

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



CVS commit: src

2024-01-06 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  6 15:05:24 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: expr_fold.c
src/usr.bin/xlint/lint1: decl.c func.c lint1.h tree.c

Log Message:
lint: remove redundant parentheses, braces and comments

Rename the functions for folding constant expressions, to make the
comments redundant.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/expr_fold.c
cvs rdiff -u -r1.385 -r1.386 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.178 -r1.179 src/usr.bin/xlint/lint1/func.c
cvs rdiff -u -r1.205 -r1.206 src/usr.bin/xlint/lint1/lint1.h
cvs rdiff -u -r1.588 -r1.589 src/usr.bin/xlint/lint1/tree.c

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.bin/xlint/lint1/expr_fold.c
diff -u src/tests/usr.bin/xlint/lint1/expr_fold.c:1.10 src/tests/usr.bin/xlint/lint1/expr_fold.c:1.11
--- src/tests/usr.bin/xlint/lint1/expr_fold.c:1.10	Sun Jul  9 11:01:27 2023
+++ src/tests/usr.bin/xlint/lint1/expr_fold.c	Sat Jan  6 15:05:24 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: expr_fold.c,v 1.10 2023/07/09 11:01:27 rillig Exp $	*/
+/*	$NetBSD: expr_fold.c,v 1.11 2024/01/06 15:05:24 rillig Exp $	*/
 # 3 "expr_fold.c"
 
 /*
@@ -185,7 +185,6 @@ fold_shl(void)
 	/* expect+1: warning: operator '<<' produces integer overflow [141] */
 	take_uint(1U << 24 << 24);
 
-	/* FIXME: undefined behavior in 'fold' at 'uint64_t << 104'. */
 	/* expect+1: warning: shift amount 104 is greater than bit-size 32 of 'unsigned int' [122] */
 	take_uint(1U << 24 << 104);
 }
@@ -197,7 +196,6 @@ fold_shr(void)
 
 	take_int(16777216 >> 25);
 
-	/* FIXME: undefined behavior in 'fold' at 'uint64_t >> 104'. */
 	/* expect+1: warning: shift amount 104 is greater than bit-size 32 of 'int' [122] */
 	take_int(16777216 >> 104);
 }

Index: src/usr.bin/xlint/lint1/decl.c
diff -u src/usr.bin/xlint/lint1/decl.c:1.385 src/usr.bin/xlint/lint1/decl.c:1.386
--- src/usr.bin/xlint/lint1/decl.c:1.385	Sun Dec 10 15:29:38 2023
+++ src/usr.bin/xlint/lint1/decl.c	Sat Jan  6 15:05:24 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.385 2023/12/10 15:29:38 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.386 2024/01/06 15:05:24 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: decl.c,v 1.385 2023/12/10 15:29:38 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.386 2024/01/06 15:05:24 rillig Exp $");
 #endif
 
 #include 
@@ -852,7 +852,7 @@ check_type(sym_t *sym)
 		if (t == FUNC && !tp->t_proto &&
 		!(to == NO_TSPEC && sym->s_osdef)) {
 			/* TODO: Make this an error in C99 mode as well. */
-			if ((!allow_trad && !allow_c99) && hflag)
+			if (!allow_trad && !allow_c99 && hflag)
 /* function declaration is not a prototype */
 warning(287);
 		}

Index: src/usr.bin/xlint/lint1/func.c
diff -u src/usr.bin/xlint/lint1/func.c:1.178 src/usr.bin/xlint/lint1/func.c:1.179
--- src/usr.bin/xlint/lint1/func.c:1.178	Sun Dec  3 18:17:41 2023
+++ src/usr.bin/xlint/lint1/func.c	Sat Jan  6 15:05:24 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: func.c,v 1.178 2023/12/03 18:17:41 rillig Exp $	*/
+/*	$NetBSD: func.c,v 1.179 2024/01/06 15:05:24 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: func.c,v 1.178 2023/12/03 18:17:41 rillig Exp $");
+__RCSID("$NetBSD: func.c,v 1.179 2024/01/06 15:05:24 rillig Exp $");
 #endif
 
 #include 
@@ -326,7 +326,7 @@ begin_function(sym_t *fsym)
 
 	if (fsym->s_osdef && !fsym->s_type->t_proto) {
 		/* TODO: Make this an error in C99 mode as well. */
-		if ((!allow_trad && !allow_c99) && hflag &&
+		if (!allow_trad && !allow_c99 && hflag &&
 		strcmp(fsym->s_name, "main") != 0)
 			/* function definition is not a prototype */
 			warning(286);

Index: src/usr.bin/xlint/lint1/lint1.h
diff -u src/usr.bin/xlint/lint1/lint1.h:1.205 src/usr.bin/xlint/lint1/lint1.h:1.206
--- src/usr.bin/xlint/lint1/lint1.h:1.205	Sun Dec  3 18:17:41 2023
+++ src/usr.bin/xlint/lint1/lint1.h	Sat Jan  6 15:05:24 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: lint1.h,v 1.205 2023/12/03 18:17:41 rillig Exp $ */
+/* $NetBSD: lint1.h,v 1.206 2024/01/06 15:05:24 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -664,7 +664,7 @@ value_bits(unsigned bitsize)
 	 * see d_c99_complex_split.c to trigger this case.
 	 */
 	if (bitsize >= 64)
-		return ~((uint64_t)0);
+		return ~(uint64_t)0;
 
 	return ~(~(uint64_t)0 << bitsize);
 }

Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.588 src/usr.bin/xlint/lint1/tree.c:1.589
--- src/usr.bin/xlint/lint1/tree.c:1.588	Sat Jan  6 14:21:26 2024
+++ src/usr.bin/xlint/lint1/tree.c	Sat Jan  6 15:05:24 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: tree.c,v 1.588 2024/01/06 14:21:26 rillig Exp $	*/
+/*	$NetBSD: tree.c,v 1.589 

CVS commit: src

2024-01-06 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  6 15:05:24 UTC 2024

Modified Files:
src/tests/usr.bin/xlint/lint1: expr_fold.c
src/usr.bin/xlint/lint1: decl.c func.c lint1.h tree.c

Log Message:
lint: remove redundant parentheses, braces and comments

Rename the functions for folding constant expressions, to make the
comments redundant.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/tests/usr.bin/xlint/lint1/expr_fold.c
cvs rdiff -u -r1.385 -r1.386 src/usr.bin/xlint/lint1/decl.c
cvs rdiff -u -r1.178 -r1.179 src/usr.bin/xlint/lint1/func.c
cvs rdiff -u -r1.205 -r1.206 src/usr.bin/xlint/lint1/lint1.h
cvs rdiff -u -r1.588 -r1.589 src/usr.bin/xlint/lint1/tree.c

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



CVS commit: src/usr.bin/xlint/lint1

2024-01-06 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  6 14:21:26 UTC 2024

Modified Files:
src/usr.bin/xlint/lint1: tree.c

Log Message:
lint: remove redundant comments


To generate a diff of this commit:
cvs rdiff -u -r1.587 -r1.588 src/usr.bin/xlint/lint1/tree.c

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

Modified files:

Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.587 src/usr.bin/xlint/lint1/tree.c:1.588
--- src/usr.bin/xlint/lint1/tree.c:1.587	Sun Dec  3 18:17:41 2023
+++ src/usr.bin/xlint/lint1/tree.c	Sat Jan  6 14:21:26 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: tree.c,v 1.587 2023/12/03 18:17:41 rillig Exp $	*/
+/*	$NetBSD: tree.c,v 1.588 2024/01/06 14:21:26 rillig Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include 
 #if defined(__RCSID)
-__RCSID("$NetBSD: tree.c,v 1.587 2023/12/03 18:17:41 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.588 2024/01/06 14:21:26 rillig Exp $");
 #endif
 
 #include 
@@ -707,10 +707,6 @@ usual_arithmetic_conversion_c90(tspec_t 
 	if (lt == FLOAT || rt == FLOAT)
 		return FLOAT;
 
-	/*
-	 * If type A has more bits than type B, it should be able to hold all
-	 * possible values of type B.
-	 */
 	if (size_in_bits(lt) > size_in_bits(rt))
 		return lt;
 	if (size_in_bits(lt) < size_in_bits(rt))
@@ -762,9 +758,6 @@ balance(op_t op, tnode_t **lnp, tnode_t 
 		*rnp = apply_usual_arithmetic_conversions(op, *rnp, t);
 }
 
-/*
- * Create a tree node for the unary & operator
- */
 static tnode_t *
 build_address(bool sys, tnode_t *tn, bool noign)
 {
@@ -938,9 +931,6 @@ fold(tnode_t *tn)
 	return cn;
 }
 
-/*
- * Create a new node for one of the operators POINT and ARROW.
- */
 static tnode_t *
 build_struct_access(op_t op, bool sys, tnode_t *ln, tnode_t *rn)
 {
@@ -1035,9 +1025,6 @@ subt_size_in_bytes(type_t *tp)
 	(int64_t)(elem * elsz_in_bits / CHAR_SIZE));
 }
 
-/*
- * Create a node for INCAFT, INCBEF, DECAFT and DECBEF.
- */
 static tnode_t *
 build_prepost_incdec(op_t op, bool sys, tnode_t *ln)
 {
@@ -1080,11 +1067,6 @@ check_enum_array_index(const tnode_t *ln
 	if (max_enum_value == max_array_index)
 		return;
 
-	/*
-	 * If the name of the largest enum constant contains 'MAX' or 'NUM',
-	 * that constant is typically not part of the allowed enum values but a
-	 * marker for the number of actual enum values.
-	 */
 	if (max_enum_value == max_array_index + 1 &&
 	(strstr(max_ec->s_name, "MAX") != NULL ||
 	 strstr(max_ec->s_name, "max") != NULL ||
@@ -1097,14 +1079,10 @@ check_enum_array_index(const tnode_t *ln
 	print_previous_declaration(max_ec);
 }
 
-/*
- * Create a node for operators PLUS and MINUS.
- */
 static tnode_t *
 build_plus_minus(op_t op, bool sys, tnode_t *ln, tnode_t *rn)
 {
 
-	/* If pointer and integer, move the pointer to the left. */
 	if (rn->tn_type->t_tspec == PTR && is_integer(ln->tn_type->t_tspec)) {
 		tnode_t *tmp = ln;
 		ln = rn;
@@ -1150,9 +1128,6 @@ build_plus_minus(op_t op, bool sys, tnod
 	return build_op(op, sys, ln->tn_type, ln, rn);
 }
 
-/*
- * Create a node for operators SHL and SHR.
- */
 static tnode_t *
 build_bit_shift(op_t op, bool sys, tnode_t *ln, tnode_t *rn)
 {
@@ -1207,7 +1182,6 @@ merge_qualifiers(type_t *tp1, const type
 static tnode_t *
 build_colon(bool sys, tnode_t *ln, tnode_t *rn)
 {
-
 	tspec_t lt = ln->tn_type->t_tspec;
 	tspec_t rt = rn->tn_type->t_tspec;
 
@@ -1220,7 +1194,6 @@ build_colon(bool sys, tnode_t *ln, tnode
 	} else if (lt == VOID || rt == VOID) {
 		tp = gettyp(VOID);
 	} else if (is_struct_or_union(lt)) {
-		/* Both types must be identical. */
 		lint_assert(is_struct_or_union(rt));
 		lint_assert(ln->tn_type->t_sou == rn->tn_type->t_sou);
 		if (is_incomplete(ln->tn_type)) {
@@ -1316,7 +1289,6 @@ is_assignment(op_t op)
 	op == INIT;
 }
 
-/* Create a node for an assignment operator (both '=' and 'op='). */
 static tnode_t *
 build_assignment(op_t op, bool sys, tnode_t *ln, tnode_t *rn)
 {
@@ -1378,9 +1350,6 @@ build_assignment(op_t op, bool sys, tnod
 	return build_op(op, sys, ln->tn_type, ln, rn);
 }
 
-/*
- * Create a node for REAL, IMAG
- */
 static tnode_t *
 build_real_imag(op_t op, bool sys, tnode_t *ln)
 {
@@ -1683,16 +1652,8 @@ build_binary(tnode_t *ln, op_t op, bool 
 	if (ln == NULL || (mp->m_binary && rn == NULL))
 		return NULL;
 
-	/*
-	 * Apply class conversions to the left operand, but only if its value
-	 * is needed or compared with zero.
-	 */
 	if (mp->m_value_context || mp->m_compares_with_zero)
 		ln = cconv(ln);
-	/*
-	 * The right operand is almost always in a test or value context,
-	 * except if it is a struct or union member.
-	 */
 	if (mp->m_binary && op != ARROW && op != POINT)
 		rn = cconv(rn);
 
@@ -1713,11 +1674,6 @@ build_binary(tnode_t *ln, op_t op, bool 
 		rn = promote(op, false, rn);
 	}
 
-	/*
-	 * If the result of the operation is different for signed or unsigned
-	 * operands and one of the 

CVS commit: src/usr.bin/xlint/lint1

2024-01-06 Thread Roland Illig
Module Name:src
Committed By:   rillig
Date:   Sat Jan  6 14:21:26 UTC 2024

Modified Files:
src/usr.bin/xlint/lint1: tree.c

Log Message:
lint: remove redundant comments


To generate a diff of this commit:
cvs rdiff -u -r1.587 -r1.588 src/usr.bin/xlint/lint1/tree.c

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