Re: CVS commit: src/share/mk
On Wed, Jan 03, 2024 at 02:48:06 +, Jason R Thorpe wrote: > Add virt68k to MACHINES.m68k. "virt" is too generic a name, if this is specifically a qemu version, may be it should have been called qemu68k... Guess it's too late now. -uwe
CVS commit: src/sys/arch/virt68k/conf
Module Name:src Committed By: thorpej Date: Wed Jan 3 03:56:57 UTC 2024 Modified Files: src/sys/arch/virt68k/conf: majors.virt68k Log Message: Add gftty at char 12. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/virt68k/conf/majors.virt68k 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/conf/majors.virt68k diff -u src/sys/arch/virt68k/conf/majors.virt68k:1.1 src/sys/arch/virt68k/conf/majors.virt68k:1.2 --- src/sys/arch/virt68k/conf/majors.virt68k:1.1 Tue Jan 2 07:40:59 2024 +++ src/sys/arch/virt68k/conf/majors.virt68k Wed Jan 3 03:56:57 2024 @@ -1,4 +1,4 @@ -# $NetBSD: majors.virt68k,v 1.1 2024/01/02 07:40:59 thorpej Exp $ +# $NetBSD: majors.virt68k,v 1.2 2024/01/03 03:56:57 thorpej Exp $ # # Device majors for virt68k # Aligns with historical values on mvme68k (and some slots also used @@ -16,6 +16,8 @@ device-major ipl char 7 ipfilter device-major sd char 8 block 4 sd device-major ld char 9 block 2 ld +device-major gftty char 12 + device-major ccd char 17 block 5 ccd device-major cd char 18 block 8 cd device-major vnd char 19 block 6 vnd
CVS commit: src/sys/arch/virt68k/conf
Module Name:src Committed By: thorpej Date: Wed Jan 3 03:56:57 UTC 2024 Modified Files: src/sys/arch/virt68k/conf: majors.virt68k Log Message: Add gftty at char 12. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/virt68k/conf/majors.virt68k Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch
Module Name:src Committed By: thorpej Date: Wed Jan 3 03:56:36 UTC 2024 Modified Files: src/sys/arch: Makefile Log Message: Add virt68k to a list of machines in a comment. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/arch/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
Module Name:src Committed By: thorpej Date: Wed Jan 3 03:56:36 UTC 2024 Modified Files: src/sys/arch: Makefile Log Message: Add virt68k to a list of machines in a comment. To generate a diff of this commit: cvs rdiff -u -r1.47 -r1.48 src/sys/arch/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/Makefile diff -u src/sys/arch/Makefile:1.47 src/sys/arch/Makefile:1.48 --- src/sys/arch/Makefile:1.47 Sun Apr 1 04:35:03 2018 +++ src/sys/arch/Makefile Wed Jan 3 03:56:36 2024 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.47 2018/04/01 04:35:03 ryo Exp $ +# $NetBSD: Makefile,v 1.48 2024/01/03 03:56:36 thorpej Exp $ # For now, we install the machine and arch includes, and symlink 'machine' # to the location of the machine includes (usually). @@ -57,7 +57,7 @@ SUBDIR+= xen # playstation2 pmax powerpc prep \ # sandpoint sbmips sgimips sh3 shark sparc sparc64 sun2 sun3 sun68k \ # rs6000 \ -# vax \ +# vax virt68k \ # x68k x86_64 xen \ # zaurus
Re: CVS commit: src/sys/sys
Date:Tue, 2 Jan 2024 21:20:42 -0500 From:Jason Thorpe Message-ID: | seems safe Safe probably, but also wrong. It looks to be there puerly for the __BEGIN_DECLS / __END_DECLS definitions - which are needed just beause has prototypes for lseek() truncate() and ftruncate() which make no sense in at all (beyond ancient history). kre
CVS commit: src/tools
Module Name:src Committed By: thorpej Date: Wed Jan 3 03:18:31 UTC 2024 Modified Files: src/tools: headerlist Log Message: Add virt68k headers. (Why on earth is this a manual step!@#??) To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/tools/headerlist Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tools
Module Name:src Committed By: thorpej Date: Wed Jan 3 03:18:31 UTC 2024 Modified Files: src/tools: headerlist Log Message: Add virt68k headers. (Why on earth is this a manual step!@#??) To generate a diff of this commit: cvs rdiff -u -r1.16 -r1.17 src/tools/headerlist Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/headerlist diff -u src/tools/headerlist:1.16 src/tools/headerlist:1.17 --- src/tools/headerlist:1.16 Sun Apr 1 04:35:06 2018 +++ src/tools/headerlist Wed Jan 3 03:18:31 2024 @@ -1,4 +1,4 @@ -# $NetBSD: headerlist,v 1.16 2018/04/01 04:35:06 ryo Exp $ +# $NetBSD: headerlist,v 1.17 2024/01/03 03:18:31 thorpej Exp $ # # do not edit; this file was automatically generated by: # NetBSD: mkheaderlist.sh,v 1.3 2016/02/23 11:43:04 skrll Exp @@ -139,6 +139,8 @@ ./usermode/include/elf_machdep.h ./vax/include/disklabel.h ./vax/include/elf_machdep.h +./virt68k/include/disklabel.h +./virt68k/include/elf_machdep.h ./x68k/include/disklabel.h ./x68k/include/elf_machdep.h ./zaurus/include/disklabel.h
CVS commit: src/share/mk
Module Name:src Committed By: thorpej Date: Wed Jan 3 02:59:00 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: Add mvme68k to MACHINES.m68k. To generate a diff of this commit: cvs rdiff -u -r1.1361 -r1.1362 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: thorpej Date: Wed Jan 3 02:59:00 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: Add mvme68k to MACHINES.m68k. To generate a diff of this commit: cvs rdiff -u -r1.1361 -r1.1362 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1361 src/share/mk/bsd.own.mk:1.1362 --- src/share/mk/bsd.own.mk:1.1361 Wed Jan 3 02:48:05 2024 +++ src/share/mk/bsd.own.mk Wed Jan 3 02:59:00 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1361 2024/01/03 02:48:05 thorpej Exp $ +# $NetBSD: bsd.own.mk,v 1.1362 2024/01/03 02:59:00 thorpej Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -710,7 +710,7 @@ MACHINES.ia64= ia64 MACHINES.hppa= hppa MACHINES.m68000= sun2 MACHINES.m68k= amiga atari cesfic hp300 luna68k mac68k \ - news68k next68k sun3 virt68k x68k + mvme68k news68k next68k sun3 virt68k x68k MACHINES.mips= algor arc cobalt emips evbmips ews4800mips \ hpcmips mipsco newsmips pmax sbmips sgimips MACHINES.or1k= or1k
CVS commit: src
Module Name:src Committed By: thorpej Date: Wed Jan 3 02:48:46 UTC 2024 Modified Files: src: build.sh Log Message: Add virt68k to valid_MACHINE_ARCH. To generate a diff of this commit: cvs rdiff -u -r1.374 -r1.375 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/build.sh diff -u src/build.sh:1.374 src/build.sh:1.375 --- src/build.sh:1.374 Mon Sep 4 02:21:17 2023 +++ src/build.sh Wed Jan 3 02:48:45 2024 @@ -1,5 +1,5 @@ #! /usr/bin/env sh -# $NetBSD: build.sh,v 1.374 2023/09/04 02:21:17 khorben Exp $ +# $NetBSD: build.sh,v 1.375 2024/01/03 02:48:45 thorpej Exp $ # # Copyright (c) 2001-2023 The NetBSD Foundation, Inc. # All rights reserved. @@ -717,6 +717,7 @@ MACHINE=sparc64 MACHINE_ARCH=sparc64 MACHINE=sun2 MACHINE_ARCH=m68000 MACHINE=sun3 MACHINE_ARCH=m68k MACHINE=vax MACHINE_ARCH=vax +MACHINE=virt68k MACHINE_ARCH=m68k MACHINE=x68k MACHINE_ARCH=m68k MACHINE=zaurus MACHINE_ARCH=earm ALIAS=ezaurus DEFAULT ' @@ -2030,7 +2031,7 @@ createmakewrapper() eval cat <
CVS commit: src
Module Name:src Committed By: thorpej Date: Wed Jan 3 02:48:46 UTC 2024 Modified Files: src: build.sh Log Message: Add virt68k to valid_MACHINE_ARCH. To generate a diff of this commit: cvs rdiff -u -r1.374 -r1.375 src/build.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/mk
Module Name:src Committed By: thorpej Date: Wed Jan 3 02:48:06 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: Add virt68k to MACHINES.m68k. To generate a diff of this commit: cvs rdiff -u -r1.1360 -r1.1361 src/share/mk/bsd.own.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/mk/bsd.own.mk diff -u src/share/mk/bsd.own.mk:1.1360 src/share/mk/bsd.own.mk:1.1361 --- src/share/mk/bsd.own.mk:1.1360 Sat Sep 2 12:09:10 2023 +++ src/share/mk/bsd.own.mk Wed Jan 3 02:48:05 2024 @@ -1,4 +1,4 @@ -# $NetBSD: bsd.own.mk,v 1.1360 2023/09/02 12:09:10 lukem Exp $ +# $NetBSD: bsd.own.mk,v 1.1361 2024/01/03 02:48:05 thorpej Exp $ # This needs to be before bsd.init.mk .if defined(BSD_MK_COMPAT_FILE) @@ -710,7 +710,7 @@ MACHINES.ia64= ia64 MACHINES.hppa= hppa MACHINES.m68000= sun2 MACHINES.m68k= amiga atari cesfic hp300 luna68k mac68k \ - news68k next68k sun3 x68k + news68k next68k sun3 virt68k x68k MACHINES.mips= algor arc cobalt emips evbmips ews4800mips \ hpcmips mipsco newsmips pmax sbmips sgimips MACHINES.or1k= or1k
CVS commit: src/share/mk
Module Name:src Committed By: thorpej Date: Wed Jan 3 02:48:06 UTC 2024 Modified Files: src/share/mk: bsd.own.mk Log Message: Add virt68k to MACHINES.m68k. To generate a diff of this commit: cvs rdiff -u -r1.1360 -r1.1361 src/share/mk/bsd.own.mk 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
> On Jan 2, 2024, at 8:41 PM, Robert Elz wrote: > > I doubt that should really be including > and almost certainly not , and shouldn't have prototypes > for any functions at all. seems safe — all of that stuff is in the implementation namespace. -- thorpej
Re: CVS commit: src/sys/sys
Date:Wed, 3 Jan 2024 03:15:39 +0300 From:Valery Ushakov Message-ID: | for userland uses should include stddef.h where size_t is supposed | to come from Unfortunately, while is defined to specify size_t it isn't specified to include ssize_t - and many things that need size_t also need ssize_t (which includes src/usr.bin/tprof one of the users of ) All of this is horribly ugly - perhaps we'd do better to remove stuff from that shouldn't be there (which is probably any definition which doesn't end in _t except probably the old u_char u_short ... and their uchar/ushort/... variants). In particular I doubt that should really be including and almost certainly not , and shouldn't have prototypes for any functions at all. kre
Re: CVS commit: src/sys/sys
On Wed, Jan 03, 2024 at 01:06:57 +0100, Joerg Sonnenberger wrote: > Date: Wed, 03 Jan 2024 01:06:57 +0100 > From: Joerg Sonnenberger > Subject: Re: CVS commit: src/sys/sys > To: source-changes-d@netbsd.org > > 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... Yes, I think we should keep the ifdef and for userland uses should include stddef.h where size_t is supposed to come from (is inttypes.h really needed there, or is it it just b/c it happens to include most of the same stuff that stddef.h does and hence define size_t?) -uwe
Re: CVS commit: src/sys/sys
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... Joerg
CVS commit: src/share/man/man8
Module Name:src Committed By: uwe Date: Tue Jan 2 23:21:22 UTC 2024 Modified Files: src/share/man/man8: creds_msdos.8 Log Message: creds_msdos(8): move descriptions into the list itself To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man8/creds_msdos.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man8/creds_msdos.8 diff -u src/share/man/man8/creds_msdos.8:1.3 src/share/man/man8/creds_msdos.8:1.4 --- src/share/man/man8/creds_msdos.8:1.3 Tue Jan 2 19:15:59 2024 +++ src/share/man/man8/creds_msdos.8 Tue Jan 2 23:21:22 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: creds_msdos.8,v 1.3 2024/01/02 19:15:59 uwe Exp $ +.\" $NetBSD: creds_msdos.8,v 1.4 2024/01/02 23:21:22 uwe Exp $ .\" .\" Copyright (c) 2019 Matthew R. Green .\" All rights reserved. @@ -54,61 +54,47 @@ it will inspect the file .Pa creds.txt for any credentials to be added to the system. .Pp -These are the supported options in the credentials files: -.Pp -.Bl -tag -compact -width Ic -offset indent -.It Ic sshkeyfile Ar user Ar keyfile -.It Ic sshkey Ar user Ar keystring -.It Ic useraddpwhash Ar user Ar pwhash -.It Ic useradd Ar user Ar password -.El -.Pp +The following list gives the supported options in the credentials files. In all cases .Ar user -is the username to be added, and the user will be -added to the +is the username to be created, and the user will be added to the .Ql wheel group. -.Pp -The -.Ic sshkeyfile -method looks in the MSDOS boot partition for -the specified file and merges ssh keys from this file into -.Ar user Ap s +.Bl -tag -width Ic +.\" +.It Ic sshkeyfile Ar user Ar keyfile +Look for the +.Ar keyfile +in the MSDOS boot partition and merge ssh keys from this file into user's .Pa ~/.ssh/authorized_keys file. -.Pp -The -.Ic sshkey -method adds the +.\" +.It Ic sshkey Ar user Ar keystring +Add the .Ar keystring -to the -.Ar user Ap s +to the user's .Pa ~/.ssh/authorized_keys file. -.Pp -The -.Ic useraddpwhash -method uses +.\" +.It Ic useraddpwhash Ar user Ar pwhash +Use .Ar pwhash -as the -.Ar users Ap s -password hash. -.Pp -The above three methods are the preferred methods. -.Pp -For the -.Ic useradd -method +as the users's password hash. +.\" +.It Ic useradd Ar user Ar password +Use .Ar password -is an unencrypted raw password that will be hashed and added to the system. -This method is not recommended as it leaves unencrypted passwords -around until such time that the script runs. +as the users's unencrypted raw password that will be hashed. +.Pp +This method is +.Em not recommended +as it leaves unencrypted passwords around until such time that the script runs. If this method is used then the .Pa creds.txt file will be shredded and deleted using .Ql rm -P after the credentials are updated. +.El .Sh FILES .Pa /boot/creds.txt .Sh SEE ALSO
CVS commit: src/share/man/man8
Module Name:src Committed By: uwe Date: Tue Jan 2 23:21:22 UTC 2024 Modified Files: src/share/man/man8: creds_msdos.8 Log Message: creds_msdos(8): move descriptions into the list itself To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/share/man/man8/creds_msdos.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: kre Date: Tue Jan 2 22:39:00 UTC 2024 Modified Files: src/sys/sys: rbtree.h Log Message: Fix previous so isn't included with _KERNEL (etc). Like it used to be. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/sys/rbtree.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/sys/rbtree.h diff -u src/sys/sys/rbtree.h:1.10 src/sys/sys/rbtree.h:1.11 --- src/sys/sys/rbtree.h:1.10 Tue Jan 2 22:35:22 2024 +++ src/sys/sys/rbtree.h Tue Jan 2 22:39:00 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: rbtree.h,v 1.10 2024/01/02 22:35:22 kre Exp $ */ +/* $NetBSD: rbtree.h,v 1.11 2024/01/02 22:39:00 kre Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -36,7 +36,7 @@ #include #include -#ifdef RBDEBUG +#if !defined(_KERNEL) && !defined(_STANDALONE) && defined(RBDEBUG) #include #endif
CVS commit: src/sys/sys
Module Name:src Committed By: kre Date: Tue Jan 2 22:39:00 UTC 2024 Modified Files: src/sys/sys: rbtree.h Log Message: Fix previous so isn't included with _KERNEL (etc). Like it used to be. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 src/sys/sys/rbtree.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.sbin/tprof
Module Name:src Committed By: kre Date: Tue Jan 2 22:35:26 UTC 2024 Modified Files: src/usr.sbin/tprof: tprof_top.c Log Message: This needs - it used to come from (inappropriately) but no longer (normally).This should unbreak the builds. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/tprof/tprof_top.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.sbin/tprof/tprof_top.c diff -u src/usr.sbin/tprof/tprof_top.c:1.9 src/usr.sbin/tprof/tprof_top.c:1.10 --- src/usr.sbin/tprof/tprof_top.c:1.9 Mon Apr 17 08:37:24 2023 +++ src/usr.sbin/tprof/tprof_top.c Tue Jan 2 22:35:26 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: tprof_top.c,v 1.9 2023/04/17 08:37:24 msaitoh Exp $ */ +/* $NetBSD: tprof_top.c,v 1.10 2024/01/02 22:35:26 kre Exp $ */ /*- * Copyright (c) 2022 Ryo Shimizu @@ -28,7 +28,7 @@ #include #ifndef lint -__RCSID("$NetBSD: tprof_top.c,v 1.9 2023/04/17 08:37:24 msaitoh Exp $"); +__RCSID("$NetBSD: tprof_top.c,v 1.10 2024/01/02 22:35:26 kre Exp $"); #endif /* not lint */ #include @@ -46,6 +46,7 @@ __RCSID("$NetBSD: tprof_top.c,v 1.9 2023 #include #include #include +#include #include #include #include
CVS commit: src/usr.sbin/tprof
Module Name:src Committed By: kre Date: Tue Jan 2 22:35:26 UTC 2024 Modified Files: src/usr.sbin/tprof: tprof_top.c Log Message: This needs - it used to come from (inappropriately) but no longer (normally).This should unbreak the builds. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/usr.sbin/tprof/tprof_top.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: kre Date: Tue Jan 2 22:35:22 UTC 2024 Modified Files: src/sys/sys: rbtree.h Log Message: Put back - but only when RBDEBUG is defined (the similarly conditional rb_tree_check() prototype needs "bool"). To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/sys/rbtree.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
Module Name:src Committed By: kre Date: Tue Jan 2 22:35:22 UTC 2024 Modified Files: src/sys/sys: rbtree.h Log Message: Put back - but only when RBDEBUG is defined (the similarly conditional rb_tree_check() prototype needs "bool"). To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/sys/sys/rbtree.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/sys/rbtree.h diff -u src/sys/sys/rbtree.h:1.9 src/sys/sys/rbtree.h:1.10 --- src/sys/sys/rbtree.h:1.9 Tue Jan 2 19:27:57 2024 +++ src/sys/sys/rbtree.h Tue Jan 2 22:35:22 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: rbtree.h,v 1.9 2024/01/02 19:27:57 christos Exp $ */ +/* $NetBSD: rbtree.h,v 1.10 2024/01/02 22:35:22 kre Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -36,6 +36,10 @@ #include #include +#ifdef RBDEBUG +#include +#endif + __BEGIN_DECLS typedef struct rb_node {
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: christos Date: Tue Jan 2 19:28:25 UTC 2024 Modified Files: src/sys/arch/x86/include: ieee.h Log Message: use sized types To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/x86/include/ieee.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/x86/include/ieee.h diff -u src/sys/arch/x86/include/ieee.h:1.12 src/sys/arch/x86/include/ieee.h:1.13 --- src/sys/arch/x86/include/ieee.h:1.12 Sat Sep 16 09:37:10 2023 +++ src/sys/arch/x86/include/ieee.h Tue Jan 2 14:28:25 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: ieee.h,v 1.12 2023/09/16 13:37:10 christos Exp $ */ +/* $NetBSD: ieee.h,v 1.13 2024/01/02 19:28:25 christos Exp $ */ /* * Copyright (c) 1992, 1993 @@ -69,13 +69,13 @@ * i386: 16 bits. */ struct ieee_ext { - u_int ext_fracl:EXT_FRACLBITS; - u_int ext_frach:EXT_FRACHBITS; + uint32_t ext_fracl:EXT_FRACLBITS; + uint32_t ext_frach:EXT_FRACHBITS; #if 0 - u_int ext_int:1; + uint32_t ext_int:1; #endif - u_int ext_exp:EXT_EXPBITS; - u_int ext_sign:1; + uint32_t ext_exp:EXT_EXPBITS; + uint32_t ext_sign:1; }; /*
CVS commit: src/sys/arch/x86/include
Module Name:src Committed By: christos Date: Tue Jan 2 19:28:25 UTC 2024 Modified Files: src/sys/arch/x86/include: ieee.h Log Message: use sized types To generate a diff of this commit: cvs rdiff -u -r1.12 -r1.13 src/sys/arch/x86/include/ieee.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/sys
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. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/sys/rbtree.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/sys/rbtree.h diff -u src/sys/sys/rbtree.h:1.8 src/sys/sys/rbtree.h:1.9 --- src/sys/sys/rbtree.h:1.8 Fri Jul 21 07:26:23 2023 +++ src/sys/sys/rbtree.h Tue Jan 2 14:27:57 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: rbtree.h,v 1.8 2023/07/21 11:26:23 riastradh Exp $ */ +/* $NetBSD: rbtree.h,v 1.9 2024/01/02 19:27:57 christos Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -32,12 +32,7 @@ #ifndef _SYS_RBTREE_H_ #define _SYS_RBTREE_H_ -#if defined(_KERNEL) || defined(_STANDALONE) #include -#else -#include -#include -#endif #include #include
CVS commit: src/sys/sys
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. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/sys/rbtree.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc
Module Name:src Committed By: christos Date: Tue Jan 2 19:27:27 UTC 2024 Modified Files: src/lib/libc/gdtoa: gdtoa.c src/lib/libc/gen: signal.c src/lib/libc/stdlib: _env.c Log Message: pass lint. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libc/gdtoa/gdtoa.c cvs rdiff -u -r1.14 -r1.15 src/lib/libc/gen/signal.c cvs rdiff -u -r1.14 -r1.15 src/lib/libc/stdlib/_env.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gdtoa/gdtoa.c diff -u src/lib/libc/gdtoa/gdtoa.c:1.9 src/lib/libc/gdtoa/gdtoa.c:1.10 --- src/lib/libc/gdtoa/gdtoa.c:1.9 Sat Apr 1 19:44:11 2023 +++ src/lib/libc/gdtoa/gdtoa.c Tue Jan 2 14:27:26 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: gdtoa.c,v 1.9 2023/04/01 23:44:11 dholland Exp $ */ +/* $NetBSD: gdtoa.c,v 1.10 2024/01/02 19:27:26 christos Exp $ */ / @@ -372,7 +372,7 @@ gdtoa ds = 1.; if ( (jj1 = -k) !=0) { dval() *= tens[jj1 & 0xf]; -for(j = jj1 >> 4; j; j >>= 1, i++) +for(j = (unsigned int)jj1 >> 4; j; j >>= 1, i++) if (j & 1) { ieps++; dval() *= bigtens[i]; Index: src/lib/libc/gen/signal.c diff -u src/lib/libc/gen/signal.c:1.14 src/lib/libc/gen/signal.c:1.15 --- src/lib/libc/gen/signal.c:1.14 Fri Jun 3 19:57:37 2016 +++ src/lib/libc/gen/signal.c Tue Jan 2 14:27:26 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: signal.c,v 1.14 2016/06/03 23:57:37 christos Exp $ */ +/* $NetBSD: signal.c,v 1.15 2024/01/02 19:27:26 christos Exp $ */ /* * Copyright (c) 1985, 1989, 1993 @@ -34,7 +34,7 @@ #if 0 static char sccsid[] = "@(#)signal.c 8.1 (Berkeley) 6/4/93"; #else -__RCSID("$NetBSD: signal.c,v 1.14 2016/06/03 23:57:37 christos Exp $"); +__RCSID("$NetBSD: signal.c,v 1.15 2024/01/02 19:27:26 christos Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -48,6 +48,7 @@ __RCSID("$NetBSD: signal.c,v 1.14 2016/0 __weak_alias(signal,_signal) #endif +extern sigset_t __sigintr; sigset_t __sigintr; /* shared with siginterrupt */ sig_t Index: src/lib/libc/stdlib/_env.c diff -u src/lib/libc/stdlib/_env.c:1.14 src/lib/libc/stdlib/_env.c:1.15 --- src/lib/libc/stdlib/_env.c:1.14 Tue Jul 18 07:44:32 2023 +++ src/lib/libc/stdlib/_env.c Tue Jan 2 14:27:26 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: _env.c,v 1.14 2023/07/18 11:44:32 riastradh Exp $ */ +/* $NetBSD: _env.c,v 1.15 2024/01/02 19:27:26 christos Exp $ */ /*- * Copyright (c) 2010 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: _env.c,v 1.14 2023/07/18 11:44:32 riastradh Exp $"); +__RCSID("$NetBSD: _env.c,v 1.15 2024/01/02 19:27:26 christos Exp $"); #endif /* LIBC_SCCS and not lint */ #include "namespace.h" @@ -88,7 +88,7 @@ static rwlock_t env_lock = RWLOCK_INITIA #endif /* Compatibility function. */ -char *__findenv(const char *name, int *offsetp); +extern char *__findenv(const char *name, int *offsetp); __warn_references(__findenv, "warning: __findenv is an internal obsolete function.")
CVS commit: src/lib/libc
Module Name:src Committed By: christos Date: Tue Jan 2 19:27:27 UTC 2024 Modified Files: src/lib/libc/gdtoa: gdtoa.c src/lib/libc/gen: signal.c src/lib/libc/stdlib: _env.c Log Message: pass lint. To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/lib/libc/gdtoa/gdtoa.c cvs rdiff -u -r1.14 -r1.15 src/lib/libc/gen/signal.c cvs rdiff -u -r1.14 -r1.15 src/lib/libc/stdlib/_env.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man8
Module Name:src Committed By: uwe Date: Tue Jan 2 19:15:59 UTC 2024 Modified Files: src/share/man/man8: creds_msdos.8 Log Message: creds_msdos(8): touch up mark up a bit To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man8/creds_msdos.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man8
Module Name:src Committed By: uwe Date: Tue Jan 2 19:15:59 UTC 2024 Modified Files: src/share/man/man8: creds_msdos.8 Log Message: creds_msdos(8): touch up mark up a bit To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/share/man/man8/creds_msdos.8 Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/man/man8/creds_msdos.8 diff -u src/share/man/man8/creds_msdos.8:1.2 src/share/man/man8/creds_msdos.8:1.3 --- src/share/man/man8/creds_msdos.8:1.2 Sat Dec 11 19:24:19 2021 +++ src/share/man/man8/creds_msdos.8 Tue Jan 2 19:15:59 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: creds_msdos.8,v 1.2 2021/12/11 19:24:19 mrg Exp $ +.\" $NetBSD: creds_msdos.8,v 1.3 2024/01/02 19:15:59 uwe Exp $ .\" .\" Copyright (c) 2019 Matthew R. Green .\" All rights reserved. @@ -55,34 +55,41 @@ it will inspect the file for any credentials to be added to the system. .Pp These are the supported options in the credentials files: -.Bl -tag -compact -width "sshkeyfilepl" -offset indent -.It Sy sshkeyfile Ar user Ar keyfile -.It Sy sshkey Ar user Ar keystring -.It Sy useraddpwhash Ar user Ar pwhash -.It Sy useradd Ar user Ar password +.Pp +.Bl -tag -compact -width Ic -offset indent +.It Ic sshkeyfile Ar user Ar keyfile +.It Ic sshkey Ar user Ar keystring +.It Ic useraddpwhash Ar user Ar pwhash +.It Ic useradd Ar user Ar password .El .Pp In all cases .Ar user is the username to be added, and the user will be added to the -.Dq wheel +.Ql wheel group. .Pp -The sshkeyfile method looks in the MSDOS boot partition for +The +.Ic sshkeyfile +method looks in the MSDOS boot partition for the specified file and merges ssh keys from this file into .Ar user Ap s .Pa ~/.ssh/authorized_keys file. .Pp -The sshkey method adds the +The +.Ic sshkey +method adds the .Ar keystring to the .Ar user Ap s .Pa ~/.ssh/authorized_keys file. .Pp -The useraddpwhash method uses +The +.Ic useraddpwhash +method uses .Ar pwhash as the .Ar users Ap s @@ -90,7 +97,9 @@ password hash. .Pp The above three methods are the preferred methods. .Pp -For the useradd method +For the +.Ic useradd +method .Ar password is an unencrypted raw password that will be hashed and added to the system. This method is not recommended as it leaves unencrypted passwords @@ -98,7 +107,7 @@ around until such time that the script r If this method is used then the .Pa creds.txt file will be shredded and deleted using -.Dq rm -P +.Ql rm -P after the credentials are updated. .Sh FILES .Pa /boot/creds.txt
CVS commit: src/sys/arch
Module Name:src Committed By: thorpej Date: Tue Jan 2 18:18:47 UTC 2024 Modified Files: src/sys/arch: README Log Message: Add virt68k. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/arch/README 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/README diff -u src/sys/arch/README:1.65 src/sys/arch/README:1.66 --- src/sys/arch/README:1.65 Sat Jul 9 19:31:34 2022 +++ src/sys/arch/README Tue Jan 2 18:18:47 2024 @@ -1,4 +1,4 @@ -$NetBSD: README,v 1.65 2022/07/09 19:31:34 andvar Exp $ +$NetBSD: README,v 1.66 2024/01/02 18:18:47 thorpej Exp $ acorn32 arm 2008 Acorn computers Ltd. ARM 6/7/SA based machines algor mipsel,mips64el 20010528 Algorithmics, Ltd. MIPS evaluation boards @@ -55,6 +55,7 @@ sparc64 sparc64/sparc 19980620 Sun Micro sun2 m68000 20010328 Sun m68010 based machines sun3 m68k 19930625 Sun m680[23]0 based machines vax vax 19940802 Digital Equipment Corp. VAX machines +virt68k m68k 20240101 Qemu m68k virtual machine x68k m68k 19960505 Sharp X68000, X68030 xen xen 20040311 Xen virtual machine monitor zaurus arm 20061217 Sharp Zaurus C7x0/860/1000/3x00 PDAs
CVS commit: src/sys/arch
Module Name:src Committed By: thorpej Date: Tue Jan 2 18:18:47 UTC 2024 Modified Files: src/sys/arch: README Log Message: Add virt68k. To generate a diff of this commit: cvs rdiff -u -r1.65 -r1.66 src/sys/arch/README 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
Module Name:src Committed By: thorpej Date: Tue Jan 2 18:11:44 UTC 2024 Modified Files: src/sys/arch/virt68k/conf: GENERIC files.virt68k Added Files: src/sys/arch/virt68k/dev: virtctrl.c Log Message: Add a driver for the Qemu Virtual System Controller that can be used to halt or reset the system. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/virt68k/conf/GENERIC cvs rdiff -u -r1.1 -r1.2 src/sys/arch/virt68k/conf/files.virt68k cvs rdiff -u -r0 -r1.1 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/conf/GENERIC diff -u src/sys/arch/virt68k/conf/GENERIC:1.2 src/sys/arch/virt68k/conf/GENERIC:1.3 --- src/sys/arch/virt68k/conf/GENERIC:1.2 Tue Jan 2 07:47:36 2024 +++ src/sys/arch/virt68k/conf/GENERIC Tue Jan 2 18:11:44 2024 @@ -1,4 +1,4 @@ -# $NetBSD: GENERIC,v 1.2 2024/01/02 07:47:36 thorpej Exp $ +# $NetBSD: GENERIC,v 1.3 2024/01/02 18:11:44 thorpej Exp $ # # GENERIC machine description file # @@ -22,7 +22,7 @@ include "arch/virt68k/conf/std.virt68k" options INCLUDE_CONFIG_FILE # embed config file in kernel binary -#ident "GENERIC-$Revision: 1.2 $" +#ident "GENERIC-$Revision: 1.3 $" makeoptions COPTS="-O2 -fno-reorder-blocks" # see share/mk/sys.mk @@ -155,6 +155,9 @@ gfpic* at mainbus? addr ? # interrupt c gftty* at mainbus? addr ? # console terminal gfrtc* at mainbus? addr ? # real-time clock / timer +# Qemu Virtual System Controller +virtctrl* at mainbus? addr ? + # VirtIO devices virtio* at mainbus? addr ? # VirtIO nexus ld* at virtio? # VirtIO disk device Index: src/sys/arch/virt68k/conf/files.virt68k diff -u src/sys/arch/virt68k/conf/files.virt68k:1.1 src/sys/arch/virt68k/conf/files.virt68k:1.2 --- src/sys/arch/virt68k/conf/files.virt68k:1.1 Tue Jan 2 07:40:59 2024 +++ src/sys/arch/virt68k/conf/files.virt68k Tue Jan 2 18:11:44 2024 @@ -1,4 +1,4 @@ -# $NetBSD: files.virt68k,v 1.1 2024/01/02 07:40:59 thorpej Exp $ +# $NetBSD: files.virt68k,v 1.2 2024/01/02 18:11:44 thorpej Exp $ # config file for virt68k @@ -26,6 +26,10 @@ file arch/virt68k/dev/gfrtc_mainbus.c g attach virtio at mainbus with virtio_mainbus: virtio_mmio file arch/virt68k/dev/virtio_mainbus.c virtio_mainbus +device virtctrl +attach virtctrl at mainbus +file arch/virt68k/dev/virtctrl.c virtctrl + # Memory disk for installer file dev/md_root.cmemory_disk_hooks Added files: Index: src/sys/arch/virt68k/dev/virtctrl.c diff -u /dev/null src/sys/arch/virt68k/dev/virtctrl.c:1.1 --- /dev/null Tue Jan 2 18:11:44 2024 +++ src/sys/arch/virt68k/dev/virtctrl.c Tue Jan 2 18:11:44 2024 @@ -0,0 +1,120 @@ +/* $NetBSD: virtctrl.c,v 1.1 2024/01/02 18:11:44 thorpej Exp $ */ + +/*- + * Copyright (c) 2024 The NetBSD Foundation, Inc. + * All rights reserved. + * + * This code is derived from software contributed to The NetBSD Foundation + * by Jason R. Thorpe. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + *notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + *notice, this list of conditions and the following disclaimer in the + *documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__KERNEL_RCSID(0, "$NetBSD: virtctrl.c,v 1.1 2024/01/02 18:11:44 thorpej Exp $"); + +#include +#include +#include +#include +#include + +#include + +#include + +struct virtctrl_softc { + device_t sc_dev; + bus_space_tag_t sc_bst; + bus_space_handle_t sc_bsh; +}; + +static const struct device_compatible_entry compat_data[] = { + { .compat = "netbsd,qemu-virt-ctrl" }, + DEVICE_COMPAT_EOL +}; + +#define VIRTCTRL_REG_FEATURES 0x00 +#define VIRTCTRL_REG_CMD 0x04 + +#define CMD_NOP 0 +#define CMD_RESET 1 +#define CMD_HALT 2 +#define CMD_PANIC 3 + +#define REG_READ(sc, r) \ + bus_space_read_4((sc)->sc_bst,
CVS commit: src/sys/arch/virt68k
Module Name:src Committed By: thorpej Date: Tue Jan 2 18:11:44 UTC 2024 Modified Files: src/sys/arch/virt68k/conf: GENERIC files.virt68k Added Files: src/sys/arch/virt68k/dev: virtctrl.c Log Message: Add a driver for the Qemu Virtual System Controller that can be used to halt or reset the system. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/virt68k/conf/GENERIC cvs rdiff -u -r1.1 -r1.2 src/sys/arch/virt68k/conf/files.virt68k cvs rdiff -u -r0 -r1.1 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
Module Name:src Committed By: thorpej Date: Tue Jan 2 18:10:36 UTC 2024 Modified Files: src/sys/arch/virt68k/include: cpu.h src/sys/arch/virt68k/virt68k: locore.s machdep.c Log Message: Provide a mechanism for a system reset controller to register to be used to reset/halt the system. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/virt68k/include/cpu.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/virt68k/virt68k/locore.s cvs rdiff -u -r1.2 -r1.3 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/cpu.h diff -u src/sys/arch/virt68k/include/cpu.h:1.2 src/sys/arch/virt68k/include/cpu.h:1.3 --- src/sys/arch/virt68k/include/cpu.h:1.2 Tue Jan 2 17:16:27 2024 +++ src/sys/arch/virt68k/include/cpu.h Tue Jan 2 18:10:36 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.2 2024/01/02 17:16:27 thorpej Exp $ */ +/* $NetBSD: cpu.h,v 1.3 2024/01/02 18:10:36 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -110,8 +110,7 @@ extern int astpending; /* need to trap #endif /* _KERNEL */ #ifdef _KERNEL -void doboot(int) - __attribute__((__noreturn__)); +void cpu_set_reset_func(void (*)(void *, int), void *); int nmihand(void *); void loadustp(paddr_t); Index: src/sys/arch/virt68k/virt68k/locore.s diff -u src/sys/arch/virt68k/virt68k/locore.s:1.1 src/sys/arch/virt68k/virt68k/locore.s:1.2 --- src/sys/arch/virt68k/virt68k/locore.s:1.1 Tue Jan 2 07:41:02 2024 +++ src/sys/arch/virt68k/virt68k/locore.s Tue Jan 2 18:10:36 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.s,v 1.1 2024/01/02 07:41:02 thorpej Exp $ */ +/* $NetBSD: locore.s,v 1.2 2024/01/02 18:10:36 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -694,13 +694,6 @@ ENTRY(getsr) rts /* - * Handle the nitty-gritty of rebooting the machine. - */ -ENTRY_NOPROFILE(doboot) - movw #PSL_HIGHIPL,%sr -1: jra 1b | XXX - -/* * Misc. global variables. */ .data Index: src/sys/arch/virt68k/virt68k/machdep.c diff -u src/sys/arch/virt68k/virt68k/machdep.c:1.2 src/sys/arch/virt68k/virt68k/machdep.c:1.3 --- src/sys/arch/virt68k/virt68k/machdep.c:1.2 Tue Jan 2 17:13:03 2024 +++ src/sys/arch/virt68k/virt68k/machdep.c Tue Jan 2 18:10:36 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.2 2024/01/02 17:13:03 thorpej Exp $ */ +/* $NetBSD: machdep.c,v 1.3 2024/01/02 18:10:36 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.2 2024/01/02 17:13:03 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.3 2024/01/02 18:10:36 thorpej Exp $"); #include "opt_ddb.h" #include "opt_m060sp.h" @@ -422,6 +422,18 @@ SYSCTL_SETUP(sysctl_machdep_setup, "sysc int waittime = -1; +static void (*cpu_reset_func)(void *, int); +static void *cpu_reset_func_arg; + +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_arg = arg; + } +} + void cpu_reboot(int howto, char *bootstr) { @@ -471,17 +483,29 @@ cpu_reboot(int howto, char *bootstr) } #endif + if (cpu_reset_func == NULL) { + printf("WARNING: No reset handler, holding here.\n\n"); + for (;;) { + /* spin forever. */ + } + } + /* Finally, halt/reboot the system. */ if (howto & RB_HALT) { printf("halted\n\n"); - doboot(RB_HALT); + (*cpu_reset_func)(cpu_reset_func_arg, RB_HALT); + /* NOTREACHED */ + } else { + printf("rebooting...\n"); + delay(100); + (*cpu_reset_func)(cpu_reset_func_arg, RB_AUTOBOOT); /* NOTREACHED */ } - - printf("rebooting...\n"); - delay(100); - doboot(RB_AUTOBOOT); - /*NOTREACHED*/ + /* ...but just in case it is... */ + printf("WARNING: System reset handler failed, holding here.\n\n"); + for (;;) { + /* spin forever. */ + } } /*
CVS commit: src/sys/arch/virt68k
Module Name:src Committed By: thorpej Date: Tue Jan 2 18:10:36 UTC 2024 Modified Files: src/sys/arch/virt68k/include: cpu.h src/sys/arch/virt68k/virt68k: locore.s machdep.c Log Message: Provide a mechanism for a system reset controller to register to be used to reset/halt the system. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/virt68k/include/cpu.h cvs rdiff -u -r1.1 -r1.2 src/sys/arch/virt68k/virt68k/locore.s cvs rdiff -u -r1.2 -r1.3 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/share/misc
Module Name:src Committed By: jschauma Date: Tue Jan 2 17:44:00 UTC 2024 Modified Files: src/share/misc: acronyms.comp Log Message: +EPSS Exploit Prediction Scoring System +PEDPIN Entry Device To generate a diff of this commit: cvs rdiff -u -r1.384 -r1.385 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.384 src/share/misc/acronyms.comp:1.385 --- src/share/misc/acronyms.comp:1.384 Tue Dec 19 15:01:23 2023 +++ src/share/misc/acronyms.comp Tue Jan 2 17:44:00 2024 @@ -1,4 +1,4 @@ -$NetBSD: acronyms.comp,v 1.384 2023/12/19 15:01:23 jschauma Exp $ +$NetBSD: acronyms.comp,v 1.385 2024/01/02 17:44:00 jschauma Exp $ 3WHS three-way handshake 8VSB 8-state vestigial side band modulation AA anti-aliasing @@ -577,6 +577,7 @@ EPP enhanced parallel port EPP extensible provisioning protocol (RFC5730) EPRML extended partial response, maximum likelihood EPROM erasable programmable read only memory +EPSS Exploit Prediction Scoring System EPT extended page tables ERC error recovery control ERD emergency recovery disk @@ -1254,6 +1255,7 @@ PE protection enable PE provider edge PEAP Protected EAP PECI platform environment control interface +PED PIN Entry Device PEP protocol extension protocol PER packed encoding rules PFS perfect forward secrecy
CVS commit: src/share/misc
Module Name:src Committed By: jschauma Date: Tue Jan 2 17:44:00 UTC 2024 Modified Files: src/share/misc: acronyms.comp Log Message: +EPSS Exploit Prediction Scoring System +PEDPIN Entry Device To generate a diff of this commit: cvs rdiff -u -r1.384 -r1.385 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/sys/arch/virt68k/include
Module Name:src Committed By: thorpej Date: Tue Jan 2 17:16:27 UTC 2024 Modified Files: src/sys/arch/virt68k/include: cpu.h Log Message: Collect some garbage. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/virt68k/include/cpu.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/include
Module Name:src Committed By: thorpej Date: Tue Jan 2 17:16:27 UTC 2024 Modified Files: src/sys/arch/virt68k/include: cpu.h Log Message: Collect some garbage. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/virt68k/include/cpu.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/include/cpu.h diff -u src/sys/arch/virt68k/include/cpu.h:1.1 src/sys/arch/virt68k/include/cpu.h:1.2 --- src/sys/arch/virt68k/include/cpu.h:1.1 Tue Jan 2 07:41:00 2024 +++ src/sys/arch/virt68k/include/cpu.h Tue Jan 2 17:16:27 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: cpu.h,v 1.1 2024/01/02 07:41:00 thorpej Exp $ */ +/* $NetBSD: cpu.h,v 1.2 2024/01/02 17:16:27 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -110,14 +110,9 @@ extern int astpending; /* need to trap #endif /* _KERNEL */ #ifdef _KERNEL -extern int cpuspeed; -extern char *intiobase, *intiolimit; - void doboot(int) __attribute__((__noreturn__)); int nmihand(void *); -void *iomap(u_long, size_t); -void iounmap(void *, size_t); void loadustp(paddr_t); #endif /* _KERNEL */
CVS commit: src/sys/arch/virt68k
Module Name:src Committed By: thorpej Date: Tue Jan 2 17:13:03 UTC 2024 Modified Files: src/sys/arch/virt68k/include: bootinfo.h src/sys/arch/virt68k/virt68k: bootinfo.c machdep.c Log Message: Detect a RND seed passed in by the loader. XXX We don't actually *do* anything with it yet. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/virt68k/include/bootinfo.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/virt68k/virt68k/bootinfo.c cvs rdiff -u -r1.1 -r1.2 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.2 src/sys/arch/virt68k/include/bootinfo.h:1.3 --- src/sys/arch/virt68k/include/bootinfo.h:1.2 Tue Jan 2 16:59:14 2024 +++ src/sys/arch/virt68k/include/bootinfo.h Tue Jan 2 17:13:03 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: bootinfo.h,v 1.2 2024/01/02 16:59:14 thorpej Exp $ */ +/* $NetBSD: bootinfo.h,v 1.3 2024/01/02 17:13:03 thorpej Exp $ */ /*- * Copyright (c) 2023 The NetBSD Foundation, Inc. @@ -154,6 +154,7 @@ void bootinfo_enumerate(bool (*)(struc bool bootinfo_addr_is_console(paddr_t); void bootinfo_setup_initrd(void); +void bootinfo_setup_rndseed(void); void bootinfo_md_cnattach(void (*)(bus_space_tag_t, bus_space_handle_t), Index: src/sys/arch/virt68k/virt68k/bootinfo.c diff -u src/sys/arch/virt68k/virt68k/bootinfo.c:1.2 src/sys/arch/virt68k/virt68k/bootinfo.c:1.3 --- src/sys/arch/virt68k/virt68k/bootinfo.c:1.2 Tue Jan 2 16:59:14 2024 +++ src/sys/arch/virt68k/virt68k/bootinfo.c Tue Jan 2 17:13:03 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: bootinfo.c,v 1.2 2024/01/02 16:59:14 thorpej Exp $*/ +/* $NetBSD: bootinfo.c,v 1.3 2024/01/02 17:13:03 thorpej Exp $*/ /*- * Copyright (c) 2023 The NetBSD Foundation, Inc. @@ -30,12 +30,13 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bootinfo.c,v 1.2 2024/01/02 16:59:14 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bootinfo.c,v 1.3 2024/01/02 17:13:03 thorpej Exp $"); #include "opt_md.h" #include #include +#include #ifdef MEMORY_DISK_DYNAMIC #include @@ -293,3 +294,23 @@ bootinfo_setup_initrd(void) } #endif /* MEMORY_DISK_DYNAMIC */ } + +/* + * bootinfo_setup_rndseed -- + * Check for a BI_RNG_SEED record and, if found, use it to + * seed the kenrnel entropy pool. + */ +void +bootinfo_setup_rndseed(void) +{ + 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 + } +} Index: src/sys/arch/virt68k/virt68k/machdep.c diff -u src/sys/arch/virt68k/virt68k/machdep.c:1.1 src/sys/arch/virt68k/virt68k/machdep.c:1.2 --- src/sys/arch/virt68k/virt68k/machdep.c:1.1 Tue Jan 2 07:41:02 2024 +++ src/sys/arch/virt68k/virt68k/machdep.c Tue Jan 2 17:13:03 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.1 2024/01/02 07:41:02 thorpej Exp $ */ +/* $NetBSD: machdep.c,v 1.2 2024/01/02 17:13:03 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -39,7 +39,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.1 2024/01/02 07:41:02 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.2 2024/01/02 17:13:03 thorpej Exp $"); #include "opt_ddb.h" #include "opt_m060sp.h" @@ -204,6 +204,9 @@ virt68k_init(void) } initmsgbuf(msgbufaddr, round_page(MSGBUFSIZE)); pmap_update(pmap_kernel()); + + /* Check for RND seed from the loader. */ + bootinfo_setup_rndseed(); } /*
CVS commit: src/sys/arch/virt68k
Module Name:src Committed By: thorpej Date: Tue Jan 2 17:13:03 UTC 2024 Modified Files: src/sys/arch/virt68k/include: bootinfo.h src/sys/arch/virt68k/virt68k: bootinfo.c machdep.c Log Message: Detect a RND seed passed in by the loader. XXX We don't actually *do* anything with it yet. To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/sys/arch/virt68k/include/bootinfo.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/virt68k/virt68k/bootinfo.c cvs rdiff -u -r1.1 -r1.2 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
Module Name:src Committed By: thorpej Date: Tue Jan 2 16:59:14 UTC 2024 Modified Files: src/sys/arch/virt68k/include: bootinfo.h src/sys/arch/virt68k/virt68k: autoconf.c bootinfo.c Log Message: Move the initrd setup into bootinfo.c To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/virt68k/include/bootinfo.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/virt68k/virt68k/autoconf.c cvs rdiff -u -r1.1 -r1.2 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.
CVS commit: src/sys/arch/virt68k
Module Name:src Committed By: thorpej Date: Tue Jan 2 16:59:14 UTC 2024 Modified Files: src/sys/arch/virt68k/include: bootinfo.h src/sys/arch/virt68k/virt68k: autoconf.c bootinfo.c Log Message: Move the initrd setup into bootinfo.c To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/virt68k/include/bootinfo.h cvs rdiff -u -r1.2 -r1.3 src/sys/arch/virt68k/virt68k/autoconf.c cvs rdiff -u -r1.1 -r1.2 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/include/bootinfo.h diff -u src/sys/arch/virt68k/include/bootinfo.h:1.1 src/sys/arch/virt68k/include/bootinfo.h:1.2 --- src/sys/arch/virt68k/include/bootinfo.h:1.1 Tue Jan 2 07:41:00 2024 +++ src/sys/arch/virt68k/include/bootinfo.h Tue Jan 2 16:59:14 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: bootinfo.h,v 1.1 2024/01/02 07:41:00 thorpej Exp $ */ +/* $NetBSD: bootinfo.h,v 1.2 2024/01/02 16:59:14 thorpej Exp $ */ /*- * Copyright (c) 2023 The NetBSD Foundation, Inc. @@ -153,6 +153,8 @@ void bootinfo_enumerate(bool (*)(struc void *); bool bootinfo_addr_is_console(paddr_t); +void bootinfo_setup_initrd(void); + void bootinfo_md_cnattach(void (*)(bus_space_tag_t, bus_space_handle_t), paddr_t, psize_t); Index: src/sys/arch/virt68k/virt68k/autoconf.c diff -u src/sys/arch/virt68k/virt68k/autoconf.c:1.2 src/sys/arch/virt68k/virt68k/autoconf.c:1.3 --- src/sys/arch/virt68k/virt68k/autoconf.c:1.2 Tue Jan 2 16:48:01 2024 +++ src/sys/arch/virt68k/virt68k/autoconf.c Tue Jan 2 16:59:14 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.2 2024/01/02 16:48:01 thorpej Exp $ */ +/* $NetBSD: autoconf.c,v 1.3 2024/01/02 16:59:14 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -45,9 +45,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.2 2024/01/02 16:48:01 thorpej Exp $"); - -#include "opt_md.h" +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.3 2024/01/02 16:59:14 thorpej Exp $"); #include #include @@ -56,10 +54,6 @@ __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v #include #include -#ifdef MEMORY_DISK_DYNAMIC -#include -#endif - #include #include @@ -84,21 +78,7 @@ cpu_configure(void) void cpu_rootconf(void) { -#ifdef MEMORY_DISK_DYNAMIC - struct bi_record *bi; - - /* - * Look for a RAMDISK bootinfo record. If we have one, - * hook is up to the memory disk and set it as the root - * file system. - */ - bi = bootinfo_find(BI_RAMDISK); - if (bi != NULL) { - struct bi_mem_info *rd = bootinfo_dataptr(bi); - md_root_setconf((void *)rd->mem_addr, rd->mem_size); - } -#endif /* MEMORY_DISK_DYNAMIC */ - + bootinfo_setup_initrd(); rootconf(); } Index: src/sys/arch/virt68k/virt68k/bootinfo.c diff -u src/sys/arch/virt68k/virt68k/bootinfo.c:1.1 src/sys/arch/virt68k/virt68k/bootinfo.c:1.2 --- src/sys/arch/virt68k/virt68k/bootinfo.c:1.1 Tue Jan 2 07:41:02 2024 +++ src/sys/arch/virt68k/virt68k/bootinfo.c Tue Jan 2 16:59:14 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: bootinfo.c,v 1.1 2024/01/02 07:41:02 thorpej Exp $*/ +/* $NetBSD: bootinfo.c,v 1.2 2024/01/02 16:59:14 thorpej Exp $*/ /*- * Copyright (c) 2023 The NetBSD Foundation, Inc. @@ -30,11 +30,17 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: bootinfo.c,v 1.1 2024/01/02 07:41:02 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bootinfo.c,v 1.2 2024/01/02 16:59:14 thorpej Exp $"); + +#include "opt_md.h" #include #include +#ifdef MEMORY_DISK_DYNAMIC +#include +#endif + #include #include @@ -270,3 +276,20 @@ bootinfo_addr_is_console(paddr_t pa) { return bootinfo_console_addr_valid && bootinfo_console_addr == pa; } + +/* + * bootinfo_setup_initrd -- + * Check for a BI_RAMDISK record and, if found, set it as + * the root file system. + */ +void +bootinfo_setup_initrd(void) +{ +#ifdef MEMORY_DISK_DYNAMIC + struct bi_record *bi = bootinfo_find(BI_RAMDISK); + if (bi != NULL) { + struct bi_mem_info *rd = bootinfo_dataptr(bi); + md_root_setconf((void *)rd->mem_addr, rd->mem_size); + } +#endif /* MEMORY_DISK_DYNAMIC */ +}
CVS commit: src/sys/arch/virt68k
Module Name:src Committed By: thorpej Date: Tue Jan 2 16:48:02 UTC 2024 Modified Files: src/sys/arch/virt68k/conf: std.virt68k src/sys/arch/virt68k/virt68k: autoconf.c Log Message: If the loader passed us a RAM disk, use it as the root file system. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/virt68k/conf/std.virt68k cvs rdiff -u -r1.1 -r1.2 src/sys/arch/virt68k/virt68k/autoconf.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
Module Name:src Committed By: thorpej Date: Tue Jan 2 16:48:02 UTC 2024 Modified Files: src/sys/arch/virt68k/conf: std.virt68k src/sys/arch/virt68k/virt68k: autoconf.c Log Message: If the loader passed us a RAM disk, use it as the root file system. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/sys/arch/virt68k/conf/std.virt68k cvs rdiff -u -r1.1 -r1.2 src/sys/arch/virt68k/virt68k/autoconf.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/conf/std.virt68k diff -u src/sys/arch/virt68k/conf/std.virt68k:1.1 src/sys/arch/virt68k/conf/std.virt68k:1.2 --- src/sys/arch/virt68k/conf/std.virt68k:1.1 Tue Jan 2 07:40:59 2024 +++ src/sys/arch/virt68k/conf/std.virt68k Tue Jan 2 16:48:01 2024 @@ -1,4 +1,4 @@ -# $NetBSD: std.virt68k,v 1.1 2024/01/02 07:40:59 thorpej Exp $ +# $NetBSD: std.virt68k,v 1.2 2024/01/02 16:48:01 thorpej Exp $ # # Options/devices that all virt68ks should have # @@ -8,3 +8,8 @@ include "conf/std" # MI standard opti include "arch/m68k/conf/std.m68k" # m68k standard options options EXEC_AOUT # support for exec'ing a.out + +# initrd support +options MEMORY_DISK_HOOKS +options MEMORY_DISK_DYNAMIC +pseudo-device md Index: src/sys/arch/virt68k/virt68k/autoconf.c diff -u src/sys/arch/virt68k/virt68k/autoconf.c:1.1 src/sys/arch/virt68k/virt68k/autoconf.c:1.2 --- src/sys/arch/virt68k/virt68k/autoconf.c:1.1 Tue Jan 2 07:41:02 2024 +++ src/sys/arch/virt68k/virt68k/autoconf.c Tue Jan 2 16:48:01 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: autoconf.c,v 1.1 2024/01/02 07:41:02 thorpej Exp $ */ +/* $NetBSD: autoconf.c,v 1.2 2024/01/02 16:48:01 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -45,7 +45,9 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.1 2024/01/02 07:41:02 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.2 2024/01/02 16:48:01 thorpej Exp $"); + +#include "opt_md.h" #include #include @@ -54,6 +56,11 @@ __KERNEL_RCSID(0, "$NetBSD: autoconf.c,v #include #include +#ifdef MEMORY_DISK_DYNAMIC +#include +#endif + +#include #include #include @@ -77,7 +84,21 @@ cpu_configure(void) void cpu_rootconf(void) { - /* XXX handle RAM disk on kernel command line. */ +#ifdef MEMORY_DISK_DYNAMIC + struct bi_record *bi; + + /* + * Look for a RAMDISK bootinfo record. If we have one, + * hook is up to the memory disk and set it as the root + * file system. + */ + bi = bootinfo_find(BI_RAMDISK); + if (bi != NULL) { + struct bi_mem_info *rd = bootinfo_dataptr(bi); + md_root_setconf((void *)rd->mem_addr, rd->mem_size); + } +#endif /* MEMORY_DISK_DYNAMIC */ + rootconf(); }