CVS commit: src/bin/sh

2024-04-06 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Apr  6 14:20:27 UTC 2024

Modified Files:
src/bin/sh: mkoptions.sh

Log Message:
Redo the mktemp(1) part - some mktemp's (including ours) require the
's to be at the end of the name (like mk*temp(3)) so however well
it will work with mktemp implementations which allow the X's to be
anywhere in the final component of the name, it will work just as
well on them with the X's at the end.

But we don't normally need all of that mess - knowing which temp
file is which is useful only when debugging the script, and that's
(mostly) long done.   So, in normal uses now just use $(mktemp) and
allow mktemp to pick its own name - we don't need to know what it is.
Every mktemp(1) supports that mode of operation.

Bug when debugging the script (which for current purposes will be
taken to be when the -x flag is passed to the shell running it, to
trace what it does) then we will make the temp files have names we
can recognise (and in that case, also don't delete them when done).

While here, check for mktemp(1) failing, and abort if that
happens (we assume that if it fails it will write an error
message to stderr, so the script does not need to.)

As for the purpose of the script ... of course the header file
generated (or an equivalent elsewhere) could be generated and
maintained by hand, but why would anyone want to do all that
work when software can do it for us, and do it correctly without
human thought?

This also allows the options in the master list (option.list) to be
arranged in a way that is meaningful for them, unrelated to the order
the shell needs to have them in (or rearrange them to be at run time)
and have that order shuffled however is convenient.   Currently all
the posix standard options are first, then the "hybrid" options, and
finally the local ones for this shell.   Currently "pipefail" is in the
final set, but once the next posix version is published, that will
become a standard option, and get moved in the list - the shell won't
even notice as this script puts the options into shell desired order.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/bin/sh/mkoptions.sh

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

Modified files:

Index: src/bin/sh/mkoptions.sh
diff -u src/bin/sh/mkoptions.sh:1.6 src/bin/sh/mkoptions.sh:1.7
--- src/bin/sh/mkoptions.sh:1.6	Fri Apr  5 22:22:17 2024
+++ src/bin/sh/mkoptions.sh	Sat Apr  6 14:20:27 2024
@@ -1,6 +1,6 @@
 #! /bin/sh
 
-# $NetBSD: mkoptions.sh,v 1.6 2024/04/05 22:22:17 christos Exp $
+# $NetBSD: mkoptions.sh,v 1.7 2024/04/06 14:20:27 kre Exp $
 
 #
 # It would be more sensible to generate 2 .h files, one which
@@ -18,9 +18,20 @@ export LC_ALL=C	# for sort consistency
 IF="$1"
 OF="${3+$3/}$2"
 
-E_FILE=$(${MKTEMP:-mktemp} -t MKO.E.$$)
-O_FILE=$(${MKTEMP:-mktemp} -t MKO.O.$$)
-trap 'rm -f "${E_FILE}" "${O_FILE}"' EXIT
+case $- in
+*x*)
+	E_FILE=$(${MKTEMP:-mktemp} "${TMPDIR:-/tmp}/MKO.E.$$.XX") || exit 1
+	O_FILE=$(${MKTEMP:-mktemp} "${TMPDIR:-/tmp}/MKO.O.$$.XX") || {
+		rm -f "${E_FILE}"
+		exit 1
+	}
+	;;
+*)
+	E_FILE=$(${MKTEMP:-mktemp}) || exit 1
+	O_FILE=$(${MKTEMP:-mktemp}) || { rm -f "${E_FILE}"; exit 1; }
+	trap 'rm -f "${E_FILE}" "${O_FILE}"' EXIT
+	;;
+esac
 
 exec 5> "${E_FILE}"
 exec 6> "${O_FILE}"
@@ -41,8 +52,8 @@ ${SED:-sed} <"${IF}"			\
 	-e '/^#/d'			\
 	-e '/^[ 	]*\//d'		\
 	-e '/^[ 	]*\*/d'		\
-	-e '/^[ 	]*;/d'		|
-sort -b -k2,2f -k2,2			|
+	-e '/^[ 	]*;/d'			|
+sort -b -k2,2f -k2,2|
 while read line
 do
 	# Look for comments in various styles, and ignore them



CVS commit: src/bin/sh

2024-04-06 Thread Robert Elz
Module Name:src
Committed By:   kre
Date:   Sat Apr  6 14:20:27 UTC 2024

Modified Files:
src/bin/sh: mkoptions.sh

Log Message:
Redo the mktemp(1) part - some mktemp's (including ours) require the
's to be at the end of the name (like mk*temp(3)) so however well
it will work with mktemp implementations which allow the X's to be
anywhere in the final component of the name, it will work just as
well on them with the X's at the end.

But we don't normally need all of that mess - knowing which temp
file is which is useful only when debugging the script, and that's
(mostly) long done.   So, in normal uses now just use $(mktemp) and
allow mktemp to pick its own name - we don't need to know what it is.
Every mktemp(1) supports that mode of operation.

Bug when debugging the script (which for current purposes will be
taken to be when the -x flag is passed to the shell running it, to
trace what it does) then we will make the temp files have names we
can recognise (and in that case, also don't delete them when done).

While here, check for mktemp(1) failing, and abort if that
happens (we assume that if it fails it will write an error
message to stderr, so the script does not need to.)

As for the purpose of the script ... of course the header file
generated (or an equivalent elsewhere) could be generated and
maintained by hand, but why would anyone want to do all that
work when software can do it for us, and do it correctly without
human thought?

This also allows the options in the master list (option.list) to be
arranged in a way that is meaningful for them, unrelated to the order
the shell needs to have them in (or rearrange them to be at run time)
and have that order shuffled however is convenient.   Currently all
the posix standard options are first, then the "hybrid" options, and
finally the local ones for this shell.   Currently "pipefail" is in the
final set, but once the next posix version is published, that will
become a standard option, and get moved in the list - the shell won't
even notice as this script puts the options into shell desired order.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/bin/sh/mkoptions.sh

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



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

2024-04-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr  6 13:42:46 UTC 2024

Modified Files:
src/sys/arch/riscv/conf: GENERIC.common

Log Message:
Attach qemufwcfg


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/riscv/conf/GENERIC.common

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/riscv/conf/GENERIC.common
diff -u src/sys/arch/riscv/conf/GENERIC.common:1.12 src/sys/arch/riscv/conf/GENERIC.common:1.13
--- src/sys/arch/riscv/conf/GENERIC.common:1.12	Tue Apr  2 22:56:51 2024
+++ src/sys/arch/riscv/conf/GENERIC.common	Sat Apr  6 13:42:46 2024
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC.common,v 1.12 2024/04/02 22:56:51 charlotte Exp $
+#	$NetBSD: GENERIC.common,v 1.13 2024/04/06 13:42:46 skrll Exp $
 #
 #	GENERIC common RISC-V kernel config items shared between 32 and 64
 #	kernels
@@ -144,7 +144,7 @@ plic* 		at fdt? pass 2
 com* 		at fdt?			# UART
 
 # Firmware devices
-#qemufwcfg* 	at fdt?			# QEMU Firmware Configuration device
+qemufwcfg* 	at fdt?			# QEMU Firmware Configuration device
 
 # RTC devices
 gfrtc* 		at fdt?			# Google Goldfish RTC



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

2024-04-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr  6 13:42:46 UTC 2024

Modified Files:
src/sys/arch/riscv/conf: GENERIC.common

Log Message:
Attach qemufwcfg


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/riscv/conf/GENERIC.common

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



CVS commit: src/sys/dev/ic

2024-04-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr  6 13:42:18 UTC 2024

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

Log Message:
Add RISC-V support


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/qemufwcfg.c

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

Modified files:

Index: src/sys/dev/ic/qemufwcfg.c
diff -u src/sys/dev/ic/qemufwcfg.c:1.2 src/sys/dev/ic/qemufwcfg.c:1.3
--- src/sys/dev/ic/qemufwcfg.c:1.2	Mon Sep  3 16:29:31 2018
+++ src/sys/dev/ic/qemufwcfg.c	Sat Apr  6 13:42:18 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: qemufwcfg.c,v 1.2 2018/09/03 16:29:31 riastradh Exp $ */
+/* $NetBSD: qemufwcfg.c,v 1.3 2024/04/06 13:42:18 skrll Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill 
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: qemufwcfg.c,v 1.2 2018/09/03 16:29:31 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: qemufwcfg.c,v 1.3 2024/04/06 13:42:18 skrll Exp $");
 
 #include 
 #include 
@@ -52,6 +52,11 @@ __KERNEL_RCSID(0, "$NetBSD: qemufwcfg.c,
 #define	FWCFG_SEL_SWAP		htobe16
 #define	FWCFG_DATA_REG		0x00
 #define	FWCFG_DMA_ADDR		0x10
+#elif defined(__riscv)
+#define	FWCFG_SEL_REG		0x08
+#define	FWCFG_SEL_SWAP		htobe16
+#define	FWCFG_DATA_REG		0x00
+#define	FWCFG_DMA_ADDR		0x10
 #else
 #error driver does not support this architecture
 #endif



CVS commit: src/sys/dev/ic

2024-04-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr  6 13:42:18 UTC 2024

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

Log Message:
Add RISC-V support


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/dev/ic/qemufwcfg.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/riscv/riscv

2024-04-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr  6 13:41:03 UTC 2024

Modified Files:
src/sys/arch/riscv/riscv: copy.S

Log Message:
Fix riscv32 build


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/riscv/riscv/copy.S

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

Modified files:

Index: src/sys/arch/riscv/riscv/copy.S
diff -u src/sys/arch/riscv/riscv/copy.S:1.1 src/sys/arch/riscv/riscv/copy.S:1.2
--- src/sys/arch/riscv/riscv/copy.S:1.1	Sat Apr  6 10:08:54 2024
+++ src/sys/arch/riscv/riscv/copy.S	Sat Apr  6 13:41:03 2024
@@ -118,6 +118,7 @@ ENTRY(_ucas_32)
 END(_ucas_32)
 
 
+#ifdef _LP64
 /*
  * int _ucas_64(volatile uint64_t *ptr, uint64_t old,
  *	uint64_t new, uint64_t *ret)
@@ -156,3 +157,4 @@ ENTRY(_ucas_64)
 	li	a0, EFAULT
 	ret
 END(_ucas_64)
+#endif



CVS commit: src/sys/arch/riscv/riscv

2024-04-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr  6 13:41:03 UTC 2024

Modified Files:
src/sys/arch/riscv/riscv: copy.S

Log Message:
Fix riscv32 build


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/riscv/riscv/copy.S

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



CVS commit: src/lib/libedit

2024-04-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr  6 13:36:11 UTC 2024

Modified Files:
src/lib/libedit: editline.7

Log Message:
update em-toggle-overwrite binding (Xose Vazquez Perez)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libedit/editline.7

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

Modified files:

Index: src/lib/libedit/editline.7
diff -u src/lib/libedit/editline.7:1.5 src/lib/libedit/editline.7:1.6
--- src/lib/libedit/editline.7:1.5	Mon May  9 17:27:55 2016
+++ src/lib/libedit/editline.7	Sat Apr  6 09:36:11 2024
@@ -1,4 +1,4 @@
-.\"	$NetBSD: editline.7,v 1.5 2016/05/09 21:27:55 christos Exp $
+.\"	$NetBSD: editline.7,v 1.6 2024/04/06 13:36:11 christos Exp $
 .\"	$OpenBSD: editline.7,v 1.1 2016/04/20 01:11:45 schwarze Exp $
 .\"
 .\" Copyright (c) 2016 Ingo Schwarze 
@@ -15,7 +15,7 @@
 .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
 .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
 .\"
-.Dd May 7, 2016
+.Dd April 6, 2024
 .Dt EDITLINE 7
 .Os
 .Sh NAME
@@ -546,7 +546,7 @@ It is an error if the cursor is already 
 buffer.
 .It Ic em-set-mark Pq emacs: Ctrl-Q, NUL
 Set the mark at the current cursor position.
-.It Ic em-toggle-overwrite Pq not bound by default
+.It Ic em-toggle-overwrite Pq insert
 Switch from insert to overwrite mode or vice versa.
 .It Ic em-universal-argument Pq not bound by default
 If in argument input mode, multiply the argument by 4.



CVS commit: src/lib/libedit

2024-04-06 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Apr  6 13:36:11 UTC 2024

Modified Files:
src/lib/libedit: editline.7

Log Message:
update em-toggle-overwrite binding (Xose Vazquez Perez)


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/lib/libedit/editline.7

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



CVS commit: src/sys/dev/hdaudio

2024-04-06 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Apr  6 13:35:59 UTC 2024

Modified Files:
src/sys/dev/hdaudio: hdaudiodevs.h hdaudiodevs_data.h

Log Message:
regen.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/hdaudio/hdaudiodevs.h \
src/sys/dev/hdaudio/hdaudiodevs_data.h

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

Modified files:

Index: src/sys/dev/hdaudio/hdaudiodevs.h
diff -u src/sys/dev/hdaudio/hdaudiodevs.h:1.8 src/sys/dev/hdaudio/hdaudiodevs.h:1.9
--- src/sys/dev/hdaudio/hdaudiodevs.h:1.8	Sat Jul  1 13:37:48 2023
+++ src/sys/dev/hdaudio/hdaudiodevs.h	Sat Apr  6 13:35:59 2024
@@ -1,10 +1,10 @@
-/*	$NetBSD: hdaudiodevs.h,v 1.8 2023/07/01 13:37:48 nia Exp $	*/
+/*	$NetBSD: hdaudiodevs.h,v 1.9 2024/04/06 13:35:59 andvar Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: hdaudiodevs,v 1.6 2022/04/16 12:24:06 nia Exp
+ *	NetBSD: hdaudiodevs,v 1.8 2024/04/06 13:35:36 andvar Exp
  */
 
 /*
@@ -49,6 +49,7 @@
 #define	HDAUDIO_VENDOR_ANALOG	0x11d4		/* Analog Devices */
 #define	HDAUDIO_VENDOR_CONEXANT	0x14f1		/* Conexant */
 #define	HDAUDIO_VENDOR_VMWARE	0x15ad		/* VMware */
+#define	HDAUDIO_VENDOR_ZHAOXIN	0x1d17		/* Zhaoxin */
 #define	HDAUDIO_VENDOR_CMEDIA	0x434d		/* C-Media */
 #define	HDAUDIO_VENDOR_INTEL	0x8086		/* Intel */
 #define	HDAUDIO_VENDOR_SIGMATEL	0x8384		/* Sigmatel */
@@ -269,6 +270,10 @@
 /* VMware */
 #define	HDAUDIO_PRODUCT_VMWARE_VIRTUAL_HDA	0x1975		/* Virtual HDA */
 
+/* Zhaoxin */
+#define	HDAUDIO_PRODUCT_ZHAOXIN_KX6000_HDMI_1	0x9f8a		/* ZX-E HDMI/DP */
+#define	HDAUDIO_PRODUCT_ZHAOXIN_KX6000_HDMI_2	0x9f8b		/* ZX-E HDMI/DP */
+
 /* Define format strings for non-existent values */
 #define hdaudio_id1_format	"vendor %4.4x"
 #define hdaudio_id2_format	"product %4.4x"
Index: src/sys/dev/hdaudio/hdaudiodevs_data.h
diff -u src/sys/dev/hdaudio/hdaudiodevs_data.h:1.8 src/sys/dev/hdaudio/hdaudiodevs_data.h:1.9
--- src/sys/dev/hdaudio/hdaudiodevs_data.h:1.8	Sat Jul  1 13:37:48 2023
+++ src/sys/dev/hdaudio/hdaudiodevs_data.h	Sat Apr  6 13:35:59 2024
@@ -1,10 +1,10 @@
-/*	$NetBSD: hdaudiodevs_data.h,v 1.8 2023/07/01 13:37:48 nia Exp $	*/
+/*	$NetBSD: hdaudiodevs_data.h,v 1.9 2024/04/06 13:35:59 andvar Exp $	*/
 
 /*
  * THIS FILE IS AUTOMATICALLY GENERATED.  DO NOT EDIT.
  *
  * generated from:
- *	NetBSD: hdaudiodevs,v 1.6 2022/04/16 12:24:06 nia Exp
+ *	NetBSD: hdaudiodevs,v 1.8 2024/04/06 13:35:36 andvar Exp
  */
 
 /*
@@ -44,400 +44,405 @@ static const uint32_t hdaudio_vendors[] 
 	HDAUDIO_VENDOR_ANALOG, 33, 40, 0,
 	HDAUDIO_VENDOR_CONEXANT, 48, 0,
 	HDAUDIO_VENDOR_VMWARE, 57, 0,
-	HDAUDIO_VENDOR_CMEDIA, 64, 0,
-	HDAUDIO_VENDOR_INTEL, 72, 0,
+	HDAUDIO_VENDOR_ZHAOXIN, 64, 0,
+	HDAUDIO_VENDOR_CMEDIA, 72, 0,
+	HDAUDIO_VENDOR_INTEL, 80, 0,
 	HDAUDIO_VENDOR_SIGMATEL, 24, 0,
 };
 
 static const uint32_t hdaudio_products[] = {
 	HDAUDIO_VENDOR_ATI, HDAUDIO_PRODUCT_ATI_RS600_HDMI_1, 
-	78, 84, 0,
+	86, 92, 0,
 	HDAUDIO_VENDOR_ATI, HDAUDIO_PRODUCT_ATI_RS600_HDMI_2, 
-	78, 84, 0,
+	86, 92, 0,
 	HDAUDIO_VENDOR_ATI, HDAUDIO_PRODUCT_ATI_RS690_780_HDMI, 
-	89, 84, 0,
+	97, 92, 0,
 	HDAUDIO_VENDOR_ATI, HDAUDIO_PRODUCT_ATI_R6xx_HDMI, 
-	99, 84, 0,
+	107, 92, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_MCP77_78_HDMI_2, 
-	104, 84, 0,
+	112, 92, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_MCP77_78_HDMI_3, 
-	104, 84, 0,
+	112, 92, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_MCP77_78_HDMI_5, 
-	104, 84, 0,
+	112, 92, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_MCP77_78_HDMI_6, 
-	104, 84, 0,
+	112, 92, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_MCP79_7A_HDMI_7, 
-	113, 84, 0,
+	121, 92, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_GT220_HDMI, 
-	122, 84, 0,
+	130, 92, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_GT21x_HDMI, 
-	128, 84, 0,
+	136, 92, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_MCP89_HDMI, 
-	134, 84, 0,
+	142, 92, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_GT240_HDMI, 
-	140, 84, 0,
+	148, 92, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_GT5xx_HDMI_DP, 
-	146, 152, 0,
+	154, 160, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_TEGRA124_HDMI, 
-	160, 84, 0,
+	168, 92, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_MCP67_HDMI, 
-	169, 84, 0,
+	177, 92, 0,
 	HDAUDIO_VENDOR_NVIDIA, HDAUDIO_PRODUCT_NVIDIA_MCP73_HDMI, 
-	175, 84, 0,
+	183, 92, 0,
 	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC260, 
-	181, 0,
+	189, 0,
 	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC262, 
-	188, 0,
+	196, 0,
 	HDAUDIO_VENDOR_REALTEK, HDAUDIO_PRODUCT_REALTEK_ALC267, 
-	195, 0,
+	203, 0,
 

CVS commit: src/sys/dev/hdaudio

2024-04-06 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Apr  6 13:35:59 UTC 2024

Modified Files:
src/sys/dev/hdaudio: hdaudiodevs.h hdaudiodevs_data.h

Log Message:
regen.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/dev/hdaudio/hdaudiodevs.h \
src/sys/dev/hdaudio/hdaudiodevs_data.h

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



CVS commit: src/sys/dev/hdaudio

2024-04-06 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Apr  6 13:35:36 UTC 2024

Modified Files:
src/sys/dev/hdaudio: hdaudiodevs

Log Message:
Add KX-6000 (ZX-E) HDA codecs.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/hdaudio/hdaudiodevs

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



CVS commit: src/sys/dev/hdaudio

2024-04-06 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Apr  6 13:35:36 UTC 2024

Modified Files:
src/sys/dev/hdaudio: hdaudiodevs

Log Message:
Add KX-6000 (ZX-E) HDA codecs.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 src/sys/dev/hdaudio/hdaudiodevs

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

Modified files:

Index: src/sys/dev/hdaudio/hdaudiodevs
diff -u src/sys/dev/hdaudio/hdaudiodevs:1.7 src/sys/dev/hdaudio/hdaudiodevs:1.8
--- src/sys/dev/hdaudio/hdaudiodevs:1.7	Sat Jul  1 13:37:36 2023
+++ src/sys/dev/hdaudio/hdaudiodevs	Sat Apr  6 13:35:36 2024
@@ -1,4 +1,4 @@
-$NetBSD: hdaudiodevs,v 1.7 2023/07/01 13:37:36 nia Exp $
+$NetBSD: hdaudiodevs,v 1.8 2024/04/06 13:35:36 andvar Exp $
 
 /*
  * Copyright (c) 2010 Jared D. McNeill 
@@ -42,6 +42,7 @@ vendor	SIGMATEL2	0x111d	Sigmatel
 vendor	ANALOG		0x11d4	Analog Devices
 vendor	CONEXANT	0x14f1	Conexant
 vendor	VMWARE		0x15ad	VMware
+vendor	ZHAOXIN		0x1d17	Zhaoxin
 vendor	CMEDIA		0x434d	C-Media
 vendor	INTEL		0x8086	Intel
 vendor	SIGMATEL	0x8384	Sigmatel
@@ -261,3 +262,7 @@ product	SIGMATEL2	92HD81B1C5_1	0x76d5	92
 
 /* VMware */
 product	VMWARE		VIRTUAL_HDA	0x1975	Virtual HDA
+
+/* Zhaoxin */
+product	ZHAOXIN		KX6000_HDMI_1	0x9f8a	ZX-E HDMI/DP
+product	ZHAOXIN		KX6000_HDMI_2	0x9f8b	ZX-E HDMI/DP



CVS commit: src/sys/arch/riscv

2024-04-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr  6 10:08:54 UTC 2024

Modified Files:
src/sys/arch/riscv/conf: files.riscv
src/sys/arch/riscv/include: types.h
src/sys/arch/riscv/riscv: genassym.cf
Added Files:
src/sys/arch/riscv/riscv: copy.S

Log Message:
Provide and use _ucas_{32,64} implementations


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/riscv/conf/files.riscv
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/riscv/include/types.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/riscv/riscv/copy.S
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/riscv/riscv/genassym.cf

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/riscv/conf/files.riscv
diff -u src/sys/arch/riscv/conf/files.riscv:1.14 src/sys/arch/riscv/conf/files.riscv:1.15
--- src/sys/arch/riscv/conf/files.riscv:1.14	Sun Sep  3 08:48:19 2023
+++ src/sys/arch/riscv/conf/files.riscv	Sat Apr  6 10:08:54 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: files.riscv,v 1.14 2023/09/03 08:48:19 skrll Exp $
+#	$NetBSD: files.riscv,v 1.15 2024/04/06 10:08:54 skrll Exp $
 #
 
 maxpartitions	16
@@ -25,6 +25,7 @@ file	arch/riscv/riscv/bus_space_generic.
 file	arch/riscv/riscv/bus_space_notimpl.S
 file	arch/riscv/riscv/bus_stubs.c
 file	arch/riscv/riscv/clock_machdep.c
+file	arch/riscv/riscv/copy.S
 file	arch/riscv/riscv/core_machdep.c		coredump
 file	arch/riscv/riscv/cpu.c			cpu
 file	arch/riscv/riscv/cpu_subr.c

Index: src/sys/arch/riscv/include/types.h
diff -u src/sys/arch/riscv/include/types.h:1.16 src/sys/arch/riscv/include/types.h:1.17
--- src/sys/arch/riscv/include/types.h:1.16	Sun May  7 12:41:48 2023
+++ src/sys/arch/riscv/include/types.h	Sat Apr  6 10:08:54 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: types.h,v 1.16 2023/05/07 12:41:48 skrll Exp $ */
+/* $NetBSD: types.h,v 1.17 2024/04/06 10:08:54 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -98,6 +98,7 @@ typedef __int32_t	__register_t;
 #define	__HAVE_NEW_STYLE_BUS_H
 #define	__HAVE_SYSCALL_INTERN
 #define	__HAVE_TLS_VARIANT_I
+#define	__HAVE_UCAS_FULL
 /* XXX temporary */
 #define	__HAVE_UNLOCKED_PMAP
 #define	__HAVE___LWP_GETPRIVATE_FAST

Index: src/sys/arch/riscv/riscv/genassym.cf
diff -u src/sys/arch/riscv/riscv/genassym.cf:1.15 src/sys/arch/riscv/riscv/genassym.cf:1.16
--- src/sys/arch/riscv/riscv/genassym.cf:1.15	Mon Jun 12 19:04:14 2023
+++ src/sys/arch/riscv/riscv/genassym.cf	Sat Apr  6 10:08:54 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.15 2023/06/12 19:04:14 skrll Exp $
+#	$NetBSD: genassym.cf,v 1.16 2024/04/06 10:08:54 skrll Exp $
 
 #-
 # Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -148,6 +148,7 @@ define	CI_MTX_COUNT	offsetof(struct cpu_
 define	CI_MTX_OLDSPL	offsetof(struct cpu_info, ci_mtx_oldspl)
 define	CI_SOFTINTS	offsetof(struct cpu_info, ci_softints)
 
+define	FB_LEN		sizeof(struct faultbuf)
 define	FB_A0		offsetof(struct faultbuf, fb_reg[FB_A0])
 define	FB_RA		offsetof(struct faultbuf, fb_reg[FB_RA])
 define	FB_S0		offsetof(struct faultbuf, fb_reg[FB_S0])
@@ -165,6 +166,8 @@ define	FB_S11		offsetof(struct faultbuf,
 define	FB_SP		offsetof(struct faultbuf, fb_reg[FB_SP])
 define	FB_SR		offsetof(struct faultbuf, fb_sr)
 
+define	EFAULT		EFAULT
+
 define	PAGE_SIZE	PAGE_SIZE
 define	PAGE_MASK	PAGE_MASK
 define	PAGE_SHIFT	PAGE_SHIFT
@@ -192,6 +195,7 @@ define	RW_WRITE_LOCKED	RW_WRITE_LOCKED
 define	RW_READ_INCR	RW_READ_INCR
 define	RW_READER	RW_READER
 
+define	VM_MAXUSER_ADDRESS	VM_MAXUSER_ADDRESS
 define	VM_MIN_KERNEL_ADDRESS	VM_MIN_KERNEL_ADDRESS
 define	VM_MAX_KERNEL_ADDRESS	VM_MAX_KERNEL_ADDRESS
 define	VM_KERNEL_BASE		VM_KERNEL_BASE

Added files:

Index: src/sys/arch/riscv/riscv/copy.S
diff -u /dev/null src/sys/arch/riscv/riscv/copy.S:1.1
--- /dev/null	Sat Apr  6 10:08:54 2024
+++ src/sys/arch/riscv/riscv/copy.S	Sat Apr  6 10:08:54 2024
@@ -0,0 +1,158 @@
+/*-
+ * Copyright (c) 2024 The NetBSD Foundation, Inc.
+ * All rights reserved.
+ *
+ * This code is derived from software contributed to The NetBSD Foundation
+ * by Nick Hudson
+ *
+ * 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, 

CVS commit: src/sys/arch/riscv

2024-04-06 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sat Apr  6 10:08:54 UTC 2024

Modified Files:
src/sys/arch/riscv/conf: files.riscv
src/sys/arch/riscv/include: types.h
src/sys/arch/riscv/riscv: genassym.cf
Added Files:
src/sys/arch/riscv/riscv: copy.S

Log Message:
Provide and use _ucas_{32,64} implementations


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/riscv/conf/files.riscv
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/riscv/include/types.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/riscv/riscv/copy.S
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/riscv/riscv/genassym.cf

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



CVS commit: src/sys/dev/dkwedge

2024-04-06 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Sat Apr  6 09:51:34 UTC 2024

Modified Files:
src/sys/dev/dkwedge: dkwedge_tos.c

Log Message:
Use "%zu" for type "size_t".  Kernel ALL/i386 compiles again.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/dkwedge/dkwedge_tos.c

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

Modified files:

Index: src/sys/dev/dkwedge/dkwedge_tos.c
diff -u src/sys/dev/dkwedge/dkwedge_tos.c:1.1 src/sys/dev/dkwedge/dkwedge_tos.c:1.2
--- src/sys/dev/dkwedge/dkwedge_tos.c:1.1	Tue Apr  2 22:30:03 2024
+++ src/sys/dev/dkwedge/dkwedge_tos.c	Sat Apr  6 09:51:34 2024
@@ -1,4 +1,4 @@
-/* $NetBSD: dkwedge_tos.c,v 1.1 2024/04/02 22:30:03 charlotte Exp $ */
+/* $NetBSD: dkwedge_tos.c,v 1.2 2024/04/06 09:51:34 hannken Exp $ */
 
 /*
  * Copyright (c) 2024 The NetBSD Foundation, Inc.
@@ -150,7 +150,7 @@ dkwedge_discover_tos(struct disk *pdk, s
 		safe_type[TOS_PART_TYPE_LEN] = '\0';
 
 		/* Finally, make the wedge. */
-		snprintf(dkw.dkw_wname, sizeof(dkw.dkw_wname), "ATARI_%s_%02lu",
+		snprintf(dkw.dkw_wname, sizeof(dkw.dkw_wname), "ATARI_%s_%02zu",
 		safe_type, i);
 		dkw.dkw_offset = be32toh(trs->parts[i].offset);
 		dkw.dkw_size = be32toh(trs->parts[i].size);



CVS commit: src/sys/dev/dkwedge

2024-04-06 Thread Juergen Hannken-Illjes
Module Name:src
Committed By:   hannken
Date:   Sat Apr  6 09:51:34 UTC 2024

Modified Files:
src/sys/dev/dkwedge: dkwedge_tos.c

Log Message:
Use "%zu" for type "size_t".  Kernel ALL/i386 compiles again.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/dev/dkwedge/dkwedge_tos.c

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



CVS commit: src/sys/dev/pci

2024-04-06 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Apr  6 09:11:50 UTC 2024

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
regen.


To generate a diff of this commit:
cvs rdiff -u -r1.1483 -r1.1484 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1482 -r1.1483 src/sys/dev/pci/pcidevs_data.h

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

diffs are larger than 1MB and have been omitted


CVS commit: src/sys/dev/pci

2024-04-06 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Apr  6 09:11:50 UTC 2024

Modified Files:
src/sys/dev/pci: pcidevs.h pcidevs_data.h

Log Message:
regen.


To generate a diff of this commit:
cvs rdiff -u -r1.1483 -r1.1484 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1482 -r1.1483 src/sys/dev/pci/pcidevs_data.h

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



CVS commit: src/sys/dev/pci

2024-04-06 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Apr  6 09:10:11 UTC 2024

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add Zhaoxin devices, mainly from my TVS-675 NAS device, and some additional
to fill the gaps from pci-ids database.


To generate a diff of this commit:
cvs rdiff -u -r1.1503 -r1.1504 src/sys/dev/pci/pcidevs

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

Modified files:

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1503 src/sys/dev/pci/pcidevs:1.1504
--- src/sys/dev/pci/pcidevs:1.1503	Wed Feb 28 18:51:34 2024
+++ src/sys/dev/pci/pcidevs	Sat Apr  6 09:10:11 2024
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1503 2024/02/28 18:51:34 jakllsch Exp $
+$NetBSD: pcidevs,v 1.1504 2024/04/06 09:10:11 andvar Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -651,6 +651,7 @@ vendor SYMPHONY2	0x1c1c	Symphony Labs (2
 vendor HGST		0x1c58	HGST, Inc.
 vendor BEIJING_MEMBLAZE	0x1c5f	Beijing Memblaze Technology Co. Ltd.
 vendor AMAZON		0x1d0f	Amazon.com, Inc.
+vendor ZHAOXIN		0x1d17	Zhaoxin
 vendor AQUANTIA		0x1d6a	Aquantia
 vendor ROCKCHIP		0x1d87	Rockchip
 vendor TEKRAM2		0x1de1	Tekram Technology (2nd PCI Vendor ID)
@@ -10173,6 +10174,47 @@ product ZEINET 1221	0x0001	1221
 /* Ziatech products */
 product ZIATECH ZT8905	0x8905 PCI-ST32 Bridge
 
+/* Zhaoxin products */
+product ZHAOXIN ZX100_PCIE		0x0708	ZX-100 PCI Express Root Port
+product ZHAOXIN ZX200_PCIE_0		0x0710	ZX-100/ZX-200 PCI Express Root Port
+product ZHAOXIN ZX200_PCIE_1		0x0711	ZX-100/ZX-200 PCI Express Root Port
+product ZHAOXIN ZX200_PCIE_2		0x0712	ZX-100/ZX-200 PCI Express Root Port
+product ZHAOXIN ZX200_PCIE_3		0x0713	ZX-100/ZX-200 PCI Express Root Port
+product ZHAOXIN ZX200_PCIE_4		0x0714	ZX-100/ZX-200 PCI Express Root Port
+product ZHAOXIN ZX200_PCIE_5		0x0715	ZX-100/ZX-200 PCI Express Root Port
+product ZHAOXIN ZXD_PCIE		0x0716	ZX-D PCI Express Root Port
+product ZHAOXIN KX_PCIE_0		0x0717	KX-5000|6000(G)|7000 / KH-4 PCI Express Root Port
+product ZHAOXIN KX_PCIE_1		0x0718	KX-5000|6000(G)|7000 / KH-4 PCI Express Root Port
+product ZHAOXIN KX_PCIE_2		0x0719	KX-5000|6000(G)|7000 / KH-4 PCI Express Root Port
+product ZHAOXIN KX_PCIE_3		0x071a	KX-5000|6000(G) / KH-4 PCI Express Root Port
+product ZHAOXIN KX_PCIE_4		0x071b	KX-5000|6000(G)|7000 / KH-4 PCI Express Root Port
+product ZHAOXIN KX_PCIE_5		0x071c	KX-5000|6000(G)|7000 / KH-4 PCI Express Root Port
+product ZHAOXIN KX_PCIE_6		0x071d	KX-5000|6000(G) / KH-4 PCI Express Root Port
+product ZHAOXIN KX_PCIE_7		0x071e	KX-5000|6000(G)|7000 / KH-4 PCI Express Root Port
+product ZHAOXIN ZX200_UP_PCIE_SWITCH	0x071f	ZX-200 Upstream Port of PCI Express Switch
+product ZHAOXIN ZX200_DP_PCIE_SWITCH	0x0721	ZX-200 Downstream Port of PCI Express Switch
+product ZHAOXIN ZX200_PCIE_PC2_BRIDGE	0x0722	ZX-200 PCIE P2C bridge
+product ZHAOXIN ZX_MISC_BUS		0x1001	ZX-D/ZX-E/KH-4/KX-7000 Miscellaneous Bus
+product ZHAOXIN ZX_PCHB_0		0x1003	ZX-E Standard Host Bridge
+product ZHAOXIN ZX_UHCI			0x3038	USB UHCI Controller
+product ZHAOXIN ZX_EHCI			0x3104	USB EHCI Controller
+product ZHAOXIN ZX_PCHB_1		0x31b0	ZX-100 / KX-5000|6000(G)|7000 / KH-4 Standard Host Bridge
+product ZHAOXIN ZX_PCHB_2		0x31b1	ZX-100 / KX-5000|6000(G)|7000 / KH-4 Standard Host Bridge
+product ZHAOXIN ZX_DRAM			0x31b2	ZX-100 / KX-5000|6000(G)|7000 / KH-4 DRAM Controller
+product ZHAOXIN ZX_PMC			0x31b3	ZX-100 / KX-5000|6000(G)|7000 / KH-4 Power Management Controller
+product ZHAOXIN ZX_IOAPIC		0x31b4	ZX-100 / KX-5000|6000(G)|7000 / KH-4 I/O APIC
+product ZHAOXIN ZX_SCRATCH		0x31b5	ZX-100 / KX-5000|6000(G)|7000 / KH-4 Scratch Device
+product ZHAOXIN ZX_PCHB_3		0x31b7	ZX-100 / KX-5000|6000(G)|7000 / KH-4 Standard Host Bridge
+product ZHAOXIN C320_GPU		0x3a02	ZX-100 C-320 GPU
+product ZHAOXIN C860_GPU		0x3a03	ZX-D C-860 Integrated Graphics
+product ZHAOXIN C960_GPU		0x3a04	KX-6000 C-960 Integrated Graphics
+product ZHAOXIN C1190_GPU		0x3a05	KX-7000 C-1190 Integrated Graphics
+product ZHAOXIN ZX200_AHCI		0x9083	StorX AHCI Controller
+product ZHAOXIN ZXE_HDAUDIO 		0x9144	ZX-E High Definition Audio Controller
+product ZHAOXIN ZX100_XHCI		0x9202	ZX-100 USB xHCI Controller
+product ZHAOXIN ZX200_XHCI		0x9203	ZX-200 USB xHCI Controller
+product ZHAOXIN KX_XHCI			0x9204	KX-6000(G)|7000 USB xHCI Controller
+
 /* Zoran products */
 product ZORAN ZR36057	0x6057 ZR36057 Multimedia Controller
 product ZORAN ZR36120	0x6120 ZR36120 Video Controller



CVS commit: src/sys/dev/pci

2024-04-06 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Apr  6 09:10:11 UTC 2024

Modified Files:
src/sys/dev/pci: pcidevs

Log Message:
Add Zhaoxin devices, mainly from my TVS-675 NAS device, and some additional
to fill the gaps from pci-ids database.


To generate a diff of this commit:
cvs rdiff -u -r1.1503 -r1.1504 src/sys/dev/pci/pcidevs

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