CVS commit: src/tests/sbin/fsck_ffs

2022-11-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Nov 21 19:07:36 UTC 2022

Modified Files:
src/tests/sbin/fsck_ffs: t_extattr.sh

Log Message:
vnconfig is used in this tests, so require user root.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/sbin/fsck_ffs/t_extattr.sh

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

Modified files:

Index: src/tests/sbin/fsck_ffs/t_extattr.sh
diff -u src/tests/sbin/fsck_ffs/t_extattr.sh:1.1 src/tests/sbin/fsck_ffs/t_extattr.sh:1.2
--- src/tests/sbin/fsck_ffs/t_extattr.sh:1.1	Thu Nov 17 06:40:40 2022
+++ src/tests/sbin/fsck_ffs/t_extattr.sh	Mon Nov 21 19:07:36 2022
@@ -1,4 +1,4 @@
-# $NetBSD: t_extattr.sh,v 1.1 2022/11/17 06:40:40 chs Exp $
+# $NetBSD: t_extattr.sh,v 1.2 2022/11/21 19:07:36 martin Exp $
 #
 #  Copyright (c) 2021 The NetBSD Foundation, Inc.
 #  All rights reserved.
@@ -45,6 +45,7 @@ cleanup()
 fsck_extattr_enable_head()
 {
 	atf_set "descr" "Checks fsck_ffs enabling extattrs"
+	atf_set "require.user" "root";
 }
 
 fsck_extattr_enable_body()
@@ -85,6 +86,7 @@ fsck_extattr_enable_cleanup()
 fsck_extattr_enable_corrupted_head()
 {
 	atf_set "descr" "Checks fsck_ffs enabling extattrs with corruption"
+	atf_set "require.user" "root";
 }
 
 fsck_extattr_enable_corrupted_body()
@@ -142,6 +144,7 @@ fsck_extattr_enable_corrupted_cleanup()
 fsck_extattr_disable_head()
 {
 	atf_set "descr" "Checks fsck_ffs disabling extattrs"
+	atf_set "require.user" "root";
 }
 
 fsck_extattr_disable_body()



CVS commit: src/tests/sbin/fsck_ffs

2022-11-21 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Nov 21 19:07:36 UTC 2022

Modified Files:
src/tests/sbin/fsck_ffs: t_extattr.sh

Log Message:
vnconfig is used in this tests, so require user root.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/sbin/fsck_ffs/t_extattr.sh

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



CVS commit: src/sbin/fsck_ffs

2022-11-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 18 07:41:31 UTC 2022

Modified Files:
src/sbin/fsck_ffs: pass1.c

Log Message:
Fix clearing of permissions when finding unexpected extended attributs
for swapped endian file systems. Ok: chs


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sbin/fsck_ffs/pass1.c

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

Modified files:

Index: src/sbin/fsck_ffs/pass1.c
diff -u src/sbin/fsck_ffs/pass1.c:1.61 src/sbin/fsck_ffs/pass1.c:1.62
--- src/sbin/fsck_ffs/pass1.c:1.61	Thu Nov 17 18:57:16 2022
+++ src/sbin/fsck_ffs/pass1.c	Fri Nov 18 07:41:31 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pass1.c,v 1.61 2022/11/17 18:57:16 martin Exp $	*/
+/*	$NetBSD: pass1.c,v 1.62 2022/11/18 07:41:31 martin Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)pass1.c	8.6 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: pass1.c,v 1.61 2022/11/17 18:57:16 martin Exp $");
+__RCSID("$NetBSD: pass1.c,v 1.62 2022/11/18 07:41:31 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -437,7 +437,7 @@ checkinode(ino_t inumber, struct inodesc
 		dp->dp2.di_extsize = iswap32(0);
 		dp->dp2.di_extb[0] = iswap64(0);
 		dp->dp2.di_extb[1] = iswap64(0);
-		dp->dp2.di_mode &= ~0;
+		dp->dp2.di_mode &= iswap16(IFMT);
 		inodirty();
 	}
 	if (is_ufs2ea && iswap32(dp->dp2.di_extsize) > 0) {



CVS commit: src/sbin/fsck_ffs

2022-11-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 18 07:41:31 UTC 2022

Modified Files:
src/sbin/fsck_ffs: pass1.c

Log Message:
Fix clearing of permissions when finding unexpected extended attributs
for swapped endian file systems. Ok: chs


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sbin/fsck_ffs/pass1.c

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



CVS commit: src/sbin/fsck_ffs

2022-11-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Nov 17 18:57:16 UTC 2022

Modified Files:
src/sbin/fsck_ffs: pass1.c

Log Message:
Make the "non-zero exattr fields" message show the inode number.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sbin/fsck_ffs/pass1.c

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

Modified files:

Index: src/sbin/fsck_ffs/pass1.c
diff -u src/sbin/fsck_ffs/pass1.c:1.60 src/sbin/fsck_ffs/pass1.c:1.61
--- src/sbin/fsck_ffs/pass1.c:1.60	Thu Nov 17 06:40:38 2022
+++ src/sbin/fsck_ffs/pass1.c	Thu Nov 17 18:57:16 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pass1.c,v 1.60 2022/11/17 06:40:38 chs Exp $	*/
+/*	$NetBSD: pass1.c,v 1.61 2022/11/17 18:57:16 martin Exp $	*/
 
 /*
  * Copyright (c) 1980, 1986, 1993
@@ -34,7 +34,7 @@
 #if 0
 static char sccsid[] = "@(#)pass1.c	8.6 (Berkeley) 4/28/95";
 #else
-__RCSID("$NetBSD: pass1.c,v 1.60 2022/11/17 06:40:38 chs Exp $");
+__RCSID("$NetBSD: pass1.c,v 1.61 2022/11/17 18:57:16 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -427,7 +427,8 @@ checkinode(ino_t inumber, struct inodesc
 	(iswap32(dp->dp2.di_extsize) != 0 ||
 	 iswap64(dp->dp2.di_extb[0]) != 0 ||
 	 iswap64(dp->dp2.di_extb[1]) != 0)) {
-		pfatal("NON-ZERO EXTATTR FIELDS");
+		pfatal("NON-ZERO EXTATTR FIELDS I=%llu",
+		(unsigned long long)inumber);
 		if (!reply("CLEAR EXTATTR FIELDS AND SET PERMS TO 0")) {
 			markclean = 0;
 			return;



CVS commit: src/sbin/fsck_ffs

2022-11-17 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Nov 17 18:57:16 UTC 2022

Modified Files:
src/sbin/fsck_ffs: pass1.c

Log Message:
Make the "non-zero exattr fields" message show the inode number.


To generate a diff of this commit:
cvs rdiff -u -r1.60 -r1.61 src/sbin/fsck_ffs/pass1.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

2022-11-14 Thread Martin Husemann
On Mon, Nov 14, 2022 at 12:04:20PM +0100, Martin Husemann wrote:
> On Mon, Nov 14, 2022 at 10:15:33AM +, Roy Marples wrote:
> > On 14/11/2022 09:49, Kengo NAKAHARA wrote:
> > > Hi,
> > > 
> > > Please update the size in comment, when struct pkthdr is changed.
> > >      https://github.com/NetBSD/src/blob/trunk/sys/sys/mbuf.h#L181
> > > 
> > > 
> > > Thanks,
> > 
> > Done, thanks.
> 
> This clearly is a layering/abstraction violation and would have been
> good to discuss upfront.
> 
> Where do you make use of that information? What about other packet injection
> paths?

And doesn't this require a kernel version bump?

Martin


Re: CVS commit: src/sys

2022-11-14 Thread Martin Husemann
On Mon, Nov 14, 2022 at 10:15:33AM +, Roy Marples wrote:
> On 14/11/2022 09:49, Kengo NAKAHARA wrote:
> > Hi,
> > 
> > Please update the size in comment, when struct pkthdr is changed.
> >      https://github.com/NetBSD/src/blob/trunk/sys/sys/mbuf.h#L181
> > 
> > 
> > Thanks,
> 
> Done, thanks.

This clearly is a layering/abstraction violation and would have been
good to discuss upfront.

Where do you make use of that information? What about other packet injection
paths?

Martin


CVS commit: [netbsd-9] src/doc

2022-11-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Nov  5 11:21:06 UTC 2022

Modified Files:
src/doc [netbsd-9]: CHANGES-9.4

Log Message:
Ticket #1550


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.28 -r1.1.2.29 src/doc/CHANGES-9.4

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

Modified files:

Index: src/doc/CHANGES-9.4
diff -u src/doc/CHANGES-9.4:1.1.2.28 src/doc/CHANGES-9.4:1.1.2.29
--- src/doc/CHANGES-9.4:1.1.2.28	Thu Oct 27 16:15:57 2022
+++ src/doc/CHANGES-9.4	Sat Nov  5 11:21:06 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.28 2022/10/27 16:15:57 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.29 2022/11/05 11:21:06 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -433,3 +433,9 @@ bin/sh/miscbltin.c1.51,1.52
 	and cosmetic improvements to error reporting.
 	[kre, ticket #1549]
 
+sys/dev/usb/uhidev.c1.94
+
+	PR 57031: back out rev 1.82 "Do not explicitly set the HID Report
+	Protocol upon attach", pulled up for 9.3 in ticket #1428.
+	[jmcneill, ticket #1550]
+



CVS commit: [netbsd-9] src/doc

2022-11-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Nov  5 11:21:06 UTC 2022

Modified Files:
src/doc [netbsd-9]: CHANGES-9.4

Log Message:
Ticket #1550


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.28 -r1.1.2.29 src/doc/CHANGES-9.4

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



CVS commit: [netbsd-9] src/sys/dev/usb

2022-11-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Nov  5 11:19:50 UTC 2022

Modified Files:
src/sys/dev/usb [netbsd-9]: uhidev.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #1550):

sys/dev/usb/uhidev.c: revision 1.94

Back out r1.82 ("Do not explicitly set the HID Report Protocol upon attach")
due to the regression reported in PR 57031


To generate a diff of this commit:
cvs rdiff -u -r1.75.2.2 -r1.75.2.3 src/sys/dev/usb/uhidev.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/usb/uhidev.c
diff -u src/sys/dev/usb/uhidev.c:1.75.2.2 src/sys/dev/usb/uhidev.c:1.75.2.3
--- src/sys/dev/usb/uhidev.c:1.75.2.2	Wed Feb 16 14:36:12 2022
+++ src/sys/dev/usb/uhidev.c	Sat Nov  5 11:19:49 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: uhidev.c,v 1.75.2.2 2022/02/16 14:36:12 martin Exp $	*/
+/*	$NetBSD: uhidev.c,v 1.75.2.3 2022/11/05 11:19:49 martin Exp $	*/
 
 /*
  * Copyright (c) 2001, 2012 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: uhidev.c,v 1.75.2.2 2022/02/16 14:36:12 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uhidev.c,v 1.75.2.3 2022/11/05 11:19:49 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -169,16 +169,8 @@ uhidev_attach(device_t parent, device_t 
 	}
 	(void)usbd_set_idle(iface, 0, 0);
 
-#if 0
-	/*
-	 * HID 1.11 says we should do this, but the device firmware is
-	 * supposed to come up in Report Protocol after reset anyway, and
-	 * apparently explicitly requesting it confuses some devices.
-	 */
-	if ((usbd_get_quirks(sc->sc_udev)->uq_flags & UQ_NO_SET_PROTO) == 0 &&
-	id->bInterfaceSubClass == UISUBCLASS_BOOT)
+	if ((usbd_get_quirks(sc->sc_udev)->uq_flags & UQ_NO_SET_PROTO) == 0)
 		(void)usbd_set_protocol(iface, 1);
-#endif
 
 	maxinpktsize = 0;
 	sc->sc_iep_addr = sc->sc_oep_addr = -1;



CVS commit: [netbsd-9] src/sys/dev/usb

2022-11-05 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Nov  5 11:19:50 UTC 2022

Modified Files:
src/sys/dev/usb [netbsd-9]: uhidev.c

Log Message:
Pull up following revision(s) (requested by jmcneill in ticket #1550):

sys/dev/usb/uhidev.c: revision 1.94

Back out r1.82 ("Do not explicitly set the HID Report Protocol upon attach")
due to the regression reported in PR 57031


To generate a diff of this commit:
cvs rdiff -u -r1.75.2.2 -r1.75.2.3 src/sys/dev/usb/uhidev.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/landisk/include

2022-10-31 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 31 15:57:52 UTC 2022

Modified Files:
src/sys/arch/landisk/include: pci_machdep.h

Log Message:
Remove declaration of landisk_pci_intr_setattr - macro magic later
creates one from the MI declaration instead.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/landisk/include/pci_machdep.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/landisk/include

2022-10-31 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 31 15:57:52 UTC 2022

Modified Files:
src/sys/arch/landisk/include: pci_machdep.h

Log Message:
Remove declaration of landisk_pci_intr_setattr - macro magic later
creates one from the MI declaration instead.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/landisk/include/pci_machdep.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/landisk/include/pci_machdep.h
diff -u src/sys/arch/landisk/include/pci_machdep.h:1.6 src/sys/arch/landisk/include/pci_machdep.h:1.7
--- src/sys/arch/landisk/include/pci_machdep.h:1.6	Sat Oct 29 11:04:23 2022
+++ src/sys/arch/landisk/include/pci_machdep.h	Mon Oct 31 15:57:52 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_machdep.h,v 1.6 2022/10/29 11:04:23 riastradh Exp $	*/
+/*	$NetBSD: pci_machdep.h,v 1.7 2022/10/31 15:57:52 martin Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -58,8 +58,6 @@ struct pci_attach_args;
 void landisk_pci_attach_hook(device_t, device_t,
 struct pcibus_attach_args *);
 int landisk_pci_intr_map(const struct pci_attach_args *, pci_intr_handle_t *);
-int landisk_pci_intr_setattr(const struct pci_attach_args *,
-pci_intr_handle_t *, int, uint64_t);
 const char *landisk_pci_intr_string(pci_chipset_tag_t, pci_intr_handle_t,
 char *, size_t);
 const struct evcnt *landisk_pci_intr_evcnt(pci_chipset_tag_t,pci_intr_handle_t);



CVS commit: src/sys/arch/landisk/landisk

2022-10-31 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 31 15:56:40 UTC 2022

Modified Files:
src/sys/arch/landisk/landisk: shpcic_machdep.c

Log Message:
Fix signature of landisk_pci_intr_setattr


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/landisk/landisk/shpcic_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/landisk/landisk/shpcic_machdep.c
diff -u src/sys/arch/landisk/landisk/shpcic_machdep.c:1.8 src/sys/arch/landisk/landisk/shpcic_machdep.c:1.9
--- src/sys/arch/landisk/landisk/shpcic_machdep.c:1.8	Sat Oct 29 11:04:23 2022
+++ src/sys/arch/landisk/landisk/shpcic_machdep.c	Mon Oct 31 15:56:40 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: shpcic_machdep.c,v 1.8 2022/10/29 11:04:23 riastradh Exp $	*/
+/*	$NetBSD: shpcic_machdep.c,v 1.9 2022/10/31 15:56:40 martin Exp $	*/
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All rights reserved.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: shpcic_machdep.c,v 1.8 2022/10/29 11:04:23 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: shpcic_machdep.c,v 1.9 2022/10/31 15:56:40 martin Exp $");
 
 #include 
 #include 
@@ -118,7 +118,7 @@ bad:
 }
 
 int
-landisk_pci_intr_setattr(const struct pci_attach_args *pa,
+landisk_pci_intr_setattr(pci_chipset_tag_t pc,
 pci_intr_handle_t *ihp, int attr, uint64_t data)
 {
 



CVS commit: src/sys/arch/landisk/landisk

2022-10-31 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 31 15:56:40 UTC 2022

Modified Files:
src/sys/arch/landisk/landisk: shpcic_machdep.c

Log Message:
Fix signature of landisk_pci_intr_setattr


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/landisk/landisk/shpcic_machdep.c

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



CVS commit: [netbsd-8] src/doc

2022-10-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 27 16:19:25 UTC 2022

Modified Files:
src/doc [netbsd-8]: CHANGES-8.3

Log Message:
Tickets #1778 and #1779


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.157 -r1.1.2.158 src/doc/CHANGES-8.3

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

Modified files:

Index: src/doc/CHANGES-8.3
diff -u src/doc/CHANGES-8.3:1.1.2.157 src/doc/CHANGES-8.3:1.1.2.158
--- src/doc/CHANGES-8.3:1.1.2.157	Wed Oct 26 18:19:42 2022
+++ src/doc/CHANGES-8.3	Thu Oct 27 16:19:25 2022
@@ -1,4 +1,4 @@
- $NetBSD: CHANGES-8.3,v 1.1.2.157 2022/10/26 18:19:42 martin Exp $
+ $NetBSD: CHANGES-8.3,v 1.1.2.158 2022/10/27 16:19:25 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -2973,3 +2973,14 @@ doc/3RDPARTY	(apply patch)
 	Updata tzdata to 2022e.
 	[kre, ticket #1777]
 
+sys/netinet6/frag6.c1.76
+
+	frag6: do not use a spin mutex for frag6_lock.
+	[ozaki-r, ticket #1778]
+
+bin/sh/miscbltin.c1.51,1.52
+
+	PR 56972: fix escape ('\') handling in sh read builtin
+	and cosmetic improvements to error reporting.
+	[kre, ticket #1779]
+



CVS commit: [netbsd-8] src/doc

2022-10-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 27 16:19:25 UTC 2022

Modified Files:
src/doc [netbsd-8]: CHANGES-8.3

Log Message:
Tickets #1778 and #1779


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.157 -r1.1.2.158 src/doc/CHANGES-8.3

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



CVS commit: [netbsd-8] src/bin/sh

2022-10-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 27 16:16:50 UTC 2022

Modified Files:
src/bin/sh [netbsd-8]: miscbltin.c

Log Message:
Pull up following revision(s) (requested by kre in ticket #1779):

bin/sh/miscbltin.c: revision 1.51
bin/sh/miscbltin.c: revision 1.52

PR bin/56972  Fix escape ('\') handling in sh read builtin.

In 1.35 (March 2005) (the big read fixup), most escape handling and IFS
processing in the read builtin was corrected.  However 2 cases were missed,
one is a word (something to be assigned to any variable but the last) in
which every character is escaped (the code was relying on a non-escaped char
to set the "in a word" status), and second trailing IFS whitespace at
the end of the line was being deleted, even if the chars had been escaped
(the escape chars are no longer present).

See the PR for more details (including the case that detected the problem).

After fixing this, I looked at the FreeBSD code (normally might do it
before, but these fixes were trivial) to check their implementation.

Their code does similar things to ours now does, but in a completely
different way, their read builtin is more complex than ours needs to
be (they handle more options).   For anyone tempted to simply incorporate
their code, note that it relies upon infrastructure changes elsewhere
in the shell, so would not be a simple cut and drop in exercise.

This needs pullups to -3 -4 -5 -6 -7 -8 and -9 (fortunately this is
happening before -10 is branched, so will never be broken this way there).

 -

Don't output the error for bad usage (no var name given)
after already writing the prompt (set with the -p option).

That results in nonsense like:
$ read -p foo
fooread: arg count

While here, improve the error message so it means something.

Now we will get:
$ read -p foo
read: variable name required
Usage: read [-r] [-p prompt] var...

[Detected by code reading while doing the work for the previous fix]


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.44.2.1 src/bin/sh/miscbltin.c

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/miscbltin.c
diff -u src/bin/sh/miscbltin.c:1.44 src/bin/sh/miscbltin.c:1.44.2.1
--- src/bin/sh/miscbltin.c:1.44	Sat May 13 15:03:34 2017
+++ src/bin/sh/miscbltin.c	Thu Oct 27 16:16:50 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: miscbltin.c,v 1.44 2017/05/13 15:03:34 gson Exp $	*/
+/*	$NetBSD: miscbltin.c,v 1.44.2.1 2022/10/27 16:16:50 martin Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)miscbltin.c	8.4 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: miscbltin.c,v 1.44 2017/05/13 15:03:34 gson Exp $");
+__RCSID("$NetBSD: miscbltin.c,v 1.44.2.1 2022/10/27 16:16:50 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -99,6 +99,7 @@ readcmd(int argc, char **argv)
 	int i;
 	int is_ifs;
 	int saveall = 0;
+	ptrdiff_t wordlen = 0;
 
 	rflag = 0;
 	prompt = NULL;
@@ -109,14 +110,15 @@ readcmd(int argc, char **argv)
 			rflag = 1;
 	}
 
+	if (*(ap = argptr) == NULL)
+		error("variable name required\n"
+			"Usage: read [-r] [-p prompt] var...");
+
 	if (prompt && isatty(0)) {
 		out2str(prompt);
 		flushall();
 	}
 
-	if (*(ap = argptr) == NULL)
-		error("arg count");
-
 	if ((ifs = bltinlookup("IFS", 1)) == NULL)
 		ifs = " \t\n";
 
@@ -136,7 +138,7 @@ readcmd(int argc, char **argv)
 break;
 			}
 			if (c != '\n')
-STPUTC(c, p);
+goto wdch;
 			continue;
 		}
 		if (c == '\n')
@@ -163,12 +165,14 @@ readcmd(int argc, char **argv)
 		}
 
 		if (is_ifs == 0) {
+  wdch:;
 			/* append this character to the current variable */
 			startword = 0;
 			if (saveall)
 /* Not just a spare terminator */
 saveall++;
 			STPUTC(c, p);
+			wordlen = p - stackblock();
 			continue;
 		}
 
@@ -186,11 +190,12 @@ readcmd(int argc, char **argv)
 		setvar(*ap, stackblock(), 0);
 		ap++;
 		STARTSTACKSTR(p);
+		wordlen = 0;
 	}
 	STACKSTRNUL(p);
 
 	/* Remove trailing IFS chars */
-	for (; stackblock() <= --p; *p = 0) {
+	for (; stackblock() + wordlen <= --p; *p = 0) {
 		if (!strchr(ifs, *p))
 			break;
 		if (strchr(" \t\n", *p))



CVS commit: [netbsd-8] src/bin/sh

2022-10-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 27 16:16:50 UTC 2022

Modified Files:
src/bin/sh [netbsd-8]: miscbltin.c

Log Message:
Pull up following revision(s) (requested by kre in ticket #1779):

bin/sh/miscbltin.c: revision 1.51
bin/sh/miscbltin.c: revision 1.52

PR bin/56972  Fix escape ('\') handling in sh read builtin.

In 1.35 (March 2005) (the big read fixup), most escape handling and IFS
processing in the read builtin was corrected.  However 2 cases were missed,
one is a word (something to be assigned to any variable but the last) in
which every character is escaped (the code was relying on a non-escaped char
to set the "in a word" status), and second trailing IFS whitespace at
the end of the line was being deleted, even if the chars had been escaped
(the escape chars are no longer present).

See the PR for more details (including the case that detected the problem).

After fixing this, I looked at the FreeBSD code (normally might do it
before, but these fixes were trivial) to check their implementation.

Their code does similar things to ours now does, but in a completely
different way, their read builtin is more complex than ours needs to
be (they handle more options).   For anyone tempted to simply incorporate
their code, note that it relies upon infrastructure changes elsewhere
in the shell, so would not be a simple cut and drop in exercise.

This needs pullups to -3 -4 -5 -6 -7 -8 and -9 (fortunately this is
happening before -10 is branched, so will never be broken this way there).

 -

Don't output the error for bad usage (no var name given)
after already writing the prompt (set with the -p option).

That results in nonsense like:
$ read -p foo
fooread: arg count

While here, improve the error message so it means something.

Now we will get:
$ read -p foo
read: variable name required
Usage: read [-r] [-p prompt] var...

[Detected by code reading while doing the work for the previous fix]


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.44.2.1 src/bin/sh/miscbltin.c

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



CVS commit: [netbsd-9] src/doc

2022-10-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 27 16:15:58 UTC 2022

Modified Files:
src/doc [netbsd-9]: CHANGES-9.4

Log Message:
Tickets #1548 and #1549


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.27 -r1.1.2.28 src/doc/CHANGES-9.4

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

Modified files:

Index: src/doc/CHANGES-9.4
diff -u src/doc/CHANGES-9.4:1.1.2.27 src/doc/CHANGES-9.4:1.1.2.28
--- src/doc/CHANGES-9.4:1.1.2.27	Tue Oct 25 17:54:59 2022
+++ src/doc/CHANGES-9.4	Thu Oct 27 16:15:57 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.27 2022/10/25 17:54:59 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.28 2022/10/27 16:15:57 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -422,3 +422,14 @@ usr.bin/progress/progress.c			1.24,1.25
 	PR 56303: progress(1): fix error handling.
 	[riastradh, ticket #1547]
 
+sys/netinet6/frag6.c1.76
+
+	frag6: do not use a spin mutex for frag6_lock.
+	[ozaki-r, ticket #1548]
+
+bin/sh/miscbltin.c1.51,1.52
+
+	PR 56972: fix escape ('\') handling in sh read builtin
+	and cosmetic improvements to error reporting.
+	[kre, ticket #1549]
+



CVS commit: [netbsd-9] src/doc

2022-10-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 27 16:15:58 UTC 2022

Modified Files:
src/doc [netbsd-9]: CHANGES-9.4

Log Message:
Tickets #1548 and #1549


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.27 -r1.1.2.28 src/doc/CHANGES-9.4

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



CVS commit: [netbsd-9] src/bin/sh

2022-10-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 27 16:14:42 UTC 2022

Modified Files:
src/bin/sh [netbsd-9]: miscbltin.c

Log Message:
Pull up following revision(s) (requested by kre in ticket #1549):

bin/sh/miscbltin.c: revision 1.51
bin/sh/miscbltin.c: revision 1.52

PR bin/56972  Fix escape ('\') handling in sh read builtin.

In 1.35 (March 2005) (the big read fixup), most escape handling and IFS
processing in the read builtin was corrected.  However 2 cases were missed,
one is a word (something to be assigned to any variable but the last) in
which every character is escaped (the code was relying on a non-escaped char
to set the "in a word" status), and second trailing IFS whitespace at
the end of the line was being deleted, even if the chars had been escaped
(the escape chars are no longer present).

See the PR for more details (including the case that detected the problem).

After fixing this, I looked at the FreeBSD code (normally might do it
before, but these fixes were trivial) to check their implementation.

Their code does similar things to ours now does, but in a completely
different way, their read builtin is more complex than ours needs to
be (they handle more options).   For anyone tempted to simply incorporate
their code, note that it relies upon infrastructure changes elsewhere
in the shell, so would not be a simple cut and drop in exercise.

This needs pullups to -3 -4 -5 -6 -7 -8 and -9 (fortunately this is
happening before -10 is branched, so will never be broken this way there).

 -

Don't output the error for bad usage (no var name given)
after already writing the prompt (set with the -p option).

That results in nonsense like:
$ read -p foo
fooread: arg count

While here, improve the error message so it means something.

Now we will get:
$ read -p foo
read: variable name required
Usage: read [-r] [-p prompt] var...

[Detected by code reading while doing the work for the previous fix]


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.44.12.1 src/bin/sh/miscbltin.c

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/miscbltin.c
diff -u src/bin/sh/miscbltin.c:1.44 src/bin/sh/miscbltin.c:1.44.12.1
--- src/bin/sh/miscbltin.c:1.44	Sat May 13 15:03:34 2017
+++ src/bin/sh/miscbltin.c	Thu Oct 27 16:14:42 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: miscbltin.c,v 1.44 2017/05/13 15:03:34 gson Exp $	*/
+/*	$NetBSD: miscbltin.c,v 1.44.12.1 2022/10/27 16:14:42 martin Exp $	*/
 
 /*-
  * Copyright (c) 1991, 1993
@@ -37,7 +37,7 @@
 #if 0
 static char sccsid[] = "@(#)miscbltin.c	8.4 (Berkeley) 5/4/95";
 #else
-__RCSID("$NetBSD: miscbltin.c,v 1.44 2017/05/13 15:03:34 gson Exp $");
+__RCSID("$NetBSD: miscbltin.c,v 1.44.12.1 2022/10/27 16:14:42 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -99,6 +99,7 @@ readcmd(int argc, char **argv)
 	int i;
 	int is_ifs;
 	int saveall = 0;
+	ptrdiff_t wordlen = 0;
 
 	rflag = 0;
 	prompt = NULL;
@@ -109,14 +110,15 @@ readcmd(int argc, char **argv)
 			rflag = 1;
 	}
 
+	if (*(ap = argptr) == NULL)
+		error("variable name required\n"
+			"Usage: read [-r] [-p prompt] var...");
+
 	if (prompt && isatty(0)) {
 		out2str(prompt);
 		flushall();
 	}
 
-	if (*(ap = argptr) == NULL)
-		error("arg count");
-
 	if ((ifs = bltinlookup("IFS", 1)) == NULL)
 		ifs = " \t\n";
 
@@ -136,7 +138,7 @@ readcmd(int argc, char **argv)
 break;
 			}
 			if (c != '\n')
-STPUTC(c, p);
+goto wdch;
 			continue;
 		}
 		if (c == '\n')
@@ -163,12 +165,14 @@ readcmd(int argc, char **argv)
 		}
 
 		if (is_ifs == 0) {
+  wdch:;
 			/* append this character to the current variable */
 			startword = 0;
 			if (saveall)
 /* Not just a spare terminator */
 saveall++;
 			STPUTC(c, p);
+			wordlen = p - stackblock();
 			continue;
 		}
 
@@ -186,11 +190,12 @@ readcmd(int argc, char **argv)
 		setvar(*ap, stackblock(), 0);
 		ap++;
 		STARTSTACKSTR(p);
+		wordlen = 0;
 	}
 	STACKSTRNUL(p);
 
 	/* Remove trailing IFS chars */
-	for (; stackblock() <= --p; *p = 0) {
+	for (; stackblock() + wordlen <= --p; *p = 0) {
 		if (!strchr(ifs, *p))
 			break;
 		if (strchr(" \t\n", *p))



CVS commit: [netbsd-9] src/bin/sh

2022-10-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 27 16:14:42 UTC 2022

Modified Files:
src/bin/sh [netbsd-9]: miscbltin.c

Log Message:
Pull up following revision(s) (requested by kre in ticket #1549):

bin/sh/miscbltin.c: revision 1.51
bin/sh/miscbltin.c: revision 1.52

PR bin/56972  Fix escape ('\') handling in sh read builtin.

In 1.35 (March 2005) (the big read fixup), most escape handling and IFS
processing in the read builtin was corrected.  However 2 cases were missed,
one is a word (something to be assigned to any variable but the last) in
which every character is escaped (the code was relying on a non-escaped char
to set the "in a word" status), and second trailing IFS whitespace at
the end of the line was being deleted, even if the chars had been escaped
(the escape chars are no longer present).

See the PR for more details (including the case that detected the problem).

After fixing this, I looked at the FreeBSD code (normally might do it
before, but these fixes were trivial) to check their implementation.

Their code does similar things to ours now does, but in a completely
different way, their read builtin is more complex than ours needs to
be (they handle more options).   For anyone tempted to simply incorporate
their code, note that it relies upon infrastructure changes elsewhere
in the shell, so would not be a simple cut and drop in exercise.

This needs pullups to -3 -4 -5 -6 -7 -8 and -9 (fortunately this is
happening before -10 is branched, so will never be broken this way there).

 -

Don't output the error for bad usage (no var name given)
after already writing the prompt (set with the -p option).

That results in nonsense like:
$ read -p foo
fooread: arg count

While here, improve the error message so it means something.

Now we will get:
$ read -p foo
read: variable name required
Usage: read [-r] [-p prompt] var...

[Detected by code reading while doing the work for the previous fix]


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.44.12.1 src/bin/sh/miscbltin.c

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



CVS commit: [netbsd-8] src/sys/netinet6

2022-10-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 27 16:08:50 UTC 2022

Modified Files:
src/sys/netinet6 [netbsd-8]: frag6.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #1778):

sys/netinet6/frag6.c: revision 1.76

frag6: don't use spin mutex for frag6_lock

frag6_lock is held during sending a packet (icmp6_error), so we must
not use a spin mutex because we can acquire sleep locks on sending
a packet.

Also we don't need to use spin mutex for frag6_lock anymore because
frag6_lock is now not used from hardware interrupt context.


To generate a diff of this commit:
cvs rdiff -u -r1.60.6.5 -r1.60.6.6 src/sys/netinet6/frag6.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/netinet6/frag6.c
diff -u src/sys/netinet6/frag6.c:1.60.6.5 src/sys/netinet6/frag6.c:1.60.6.6
--- src/sys/netinet6/frag6.c:1.60.6.5	Thu Sep 27 15:07:35 2018
+++ src/sys/netinet6/frag6.c	Thu Oct 27 16:08:50 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: frag6.c,v 1.60.6.5 2018/09/27 15:07:35 martin Exp $	*/
+/*	$NetBSD: frag6.c,v 1.60.6.6 2022/10/27 16:08:50 martin Exp $	*/
 /*	$KAME: frag6.c,v 1.40 2002/05/27 21:40:31 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: frag6.c,v 1.60.6.5 2018/09/27 15:07:35 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: frag6.c,v 1.60.6.6 2022/10/27 16:08:50 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -80,7 +80,7 @@ frag6_init(void)
 {
 
 	ip6q.ip6q_next = ip6q.ip6q_prev = 
-	mutex_init(_lock, MUTEX_DEFAULT, IPL_NET);
+	mutex_init(_lock, MUTEX_DEFAULT, IPL_NONE);
 }
 
 /*



CVS commit: [netbsd-8] src/sys/netinet6

2022-10-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 27 16:08:50 UTC 2022

Modified Files:
src/sys/netinet6 [netbsd-8]: frag6.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #1778):

sys/netinet6/frag6.c: revision 1.76

frag6: don't use spin mutex for frag6_lock

frag6_lock is held during sending a packet (icmp6_error), so we must
not use a spin mutex because we can acquire sleep locks on sending
a packet.

Also we don't need to use spin mutex for frag6_lock anymore because
frag6_lock is now not used from hardware interrupt context.


To generate a diff of this commit:
cvs rdiff -u -r1.60.6.5 -r1.60.6.6 src/sys/netinet6/frag6.c

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



CVS commit: [netbsd-9] src/sys/netinet6

2022-10-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 27 16:06:24 UTC 2022

Modified Files:
src/sys/netinet6 [netbsd-9]: frag6.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #1548):

sys/netinet6/frag6.c: revision 1.76

frag6: don't use spin mutex for frag6_lock

frag6_lock is held during sending a packet (icmp6_error), so we must
not use a spin mutex because we can acquire sleep locks on sending
a packet.

Also we don't need to use spin mutex for frag6_lock anymore because
frag6_lock is now not used from hardware interrupt context.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.74.6.1 src/sys/netinet6/frag6.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/netinet6/frag6.c
diff -u src/sys/netinet6/frag6.c:1.74 src/sys/netinet6/frag6.c:1.74.6.1
--- src/sys/netinet6/frag6.c:1.74	Tue May 15 19:16:38 2018
+++ src/sys/netinet6/frag6.c	Thu Oct 27 16:06:24 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: frag6.c,v 1.74 2018/05/15 19:16:38 maxv Exp $	*/
+/*	$NetBSD: frag6.c,v 1.74.6.1 2022/10/27 16:06:24 martin Exp $	*/
 /*	$KAME: frag6.c,v 1.40 2002/05/27 21:40:31 itojun Exp $	*/
 
 /*
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: frag6.c,v 1.74 2018/05/15 19:16:38 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: frag6.c,v 1.74.6.1 2022/10/27 16:06:24 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_net_mpsafe.h"
@@ -117,7 +117,7 @@ frag6_init(void)
 {
 
 	ip6q.ip6q_next = ip6q.ip6q_prev = 
-	mutex_init(_lock, MUTEX_DEFAULT, IPL_NET);
+	mutex_init(_lock, MUTEX_DEFAULT, IPL_NONE);
 }
 
 /*



CVS commit: [netbsd-9] src/sys/netinet6

2022-10-27 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 27 16:06:24 UTC 2022

Modified Files:
src/sys/netinet6 [netbsd-9]: frag6.c

Log Message:
Pull up following revision(s) (requested by ozaki-r in ticket #1548):

sys/netinet6/frag6.c: revision 1.76

frag6: don't use spin mutex for frag6_lock

frag6_lock is held during sending a packet (icmp6_error), so we must
not use a spin mutex because we can acquire sleep locks on sending
a packet.

Also we don't need to use spin mutex for frag6_lock anymore because
frag6_lock is now not used from hardware interrupt context.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.74.6.1 src/sys/netinet6/frag6.c

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



CVS commit: [netbsd-8] src/doc

2022-10-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Oct 26 18:19:42 UTC 2022

Modified Files:
src/doc [netbsd-8]: CHANGES-8.3

Log Message:
Ticket #1777


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.156 -r1.1.2.157 src/doc/CHANGES-8.3

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



CVS commit: [netbsd-8] src/doc

2022-10-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Oct 26 18:19:42 UTC 2022

Modified Files:
src/doc [netbsd-8]: CHANGES-8.3

Log Message:
Ticket #1777


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.156 -r1.1.2.157 src/doc/CHANGES-8.3

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

Modified files:

Index: src/doc/CHANGES-8.3
diff -u src/doc/CHANGES-8.3:1.1.2.156 src/doc/CHANGES-8.3:1.1.2.157
--- src/doc/CHANGES-8.3:1.1.2.156	Sat Oct 15 10:35:16 2022
+++ src/doc/CHANGES-8.3	Wed Oct 26 18:19:42 2022
@@ -1,4 +1,4 @@
- $NetBSD: CHANGES-8.3,v 1.1.2.156 2022/10/15 10:35:16 martin Exp $
+ $NetBSD: CHANGES-8.3,v 1.1.2.157 2022/10/26 18:19:42 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -2940,3 +2940,36 @@ sys/dev/pci/ichsmb.c1.76-1.77 (via p
 
 	Add Intel 600 Series PCH support.
 	[msaitoh, ticket #1776]
+
+external/public-domain/tz/dist/SECURITY up to 1.1.1.1
+external/public-domain/tz/dist/CONTRIBUTING up to 1.1.1.7
+external/public-domain/tz/dist/Makefile up to 1.1.1.33
+external/public-domain/tz/dist/NEWS up to 1.1.1.38
+external/public-domain/tz/dist/README   up to 1.1.1.10
+external/public-domain/tz/dist/TZDATA_VERSION   up to 1.30
+external/public-domain/tz/dist/africa   up to 1.1.1.28
+external/public-domain/tz/dist/antarctica   up to 1.1.1.15
+external/public-domain/tz/dist/asia up to 1.5
+external/public-domain/tz/dist/australasia  up to 1.5
+external/public-domain/tz/dist/backward up to 1.5
+external/public-domain/tz/dist/backzone up to 1.1.1.23
+external/public-domain/tz/dist/calendarsup to 1.1.1.2
+external/public-domain/tz/dist/checktab.awk up to 1.1.1.11
+external/public-domain/tz/dist/etcetera up to 1.1.1.6
+external/public-domain/tz/dist/europe   up to 1.1.1.34
+external/public-domain/tz/dist/leap-seconds.list up to 1.4
+external/public-domain/tz/dist/leapseconds  up to 1.4
+external/public-domain/tz/dist/northamerica up to 1.1.1.30
+external/public-domain/tz/dist/southamerica up to 1.1.1.20
+external/public-domain/tz/dist/theory.html  up to 1.1.1.15
+external/public-domain/tz/dist/version  up to 1.5
+external/public-domain/tz/dist/ziguard.awk  up to 1.1.1.9
+external/public-domain/tz/dist/zishrink.awk up to 1.1.1.8
+external/public-domain/tz/dist/zone.tab up to 1.1.1.22
+external/public-domain/tz/dist/zone1970.tab up to 1.1.1.23
+distrib/sets/lists/base/mi			(apply patch)
+doc/3RDPARTY	(apply patch)
+
+	Updata tzdata to 2022e.
+	[kre, ticket #1777]
+



CVS commit: [netbsd-8] src

2022-10-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Wed Oct 26 18:16:43 UTC 2022

Modified Files:
src/distrib/sets/lists/base [netbsd-8]: mi
src/doc [netbsd-8]: 3RDPARTY
src/external/public-domain/tz/dist [netbsd-8]: CONTRIBUTING Makefile
NEWS README TZDATA_VERSION africa antarctica asia australasia
backward backzone calendars checktab.awk etcetera europe
leap-seconds.list leapseconds northamerica southamerica theory.html
version ziguard.awk zishrink.awk zone.tab zone1970.tab
Added Files:
src/external/public-domain/tz/dist [netbsd-8]: SECURITY

Log Message:
Pull up the following revisions (catch up to -current), requested by kre
in ticket #1777:

external/public-domain/tz/dist/SECURITY up to 1.1.1.1
external/public-domain/tz/dist/CONTRIBUTING up to 1.1.1.7
external/public-domain/tz/dist/Makefile up to 1.1.1.33
external/public-domain/tz/dist/NEWS up to 1.1.1.38
external/public-domain/tz/dist/README   up to 1.1.1.10
external/public-domain/tz/dist/TZDATA_VERSION   up to 1.30
external/public-domain/tz/dist/africa   up to 1.1.1.28
external/public-domain/tz/dist/antarctica   up to 1.1.1.15
external/public-domain/tz/dist/asia up to 1.5
external/public-domain/tz/dist/australasia  up to 1.5
external/public-domain/tz/dist/backward up to 1.5
external/public-domain/tz/dist/backzone up to 1.1.1.23
external/public-domain/tz/dist/calendarsup to 1.1.1.2
external/public-domain/tz/dist/checktab.awk up to 1.1.1.11
external/public-domain/tz/dist/etcetera up to 1.1.1.6
external/public-domain/tz/dist/europe   up to 1.1.1.34
external/public-domain/tz/dist/leap-seconds.list up to 1.4
external/public-domain/tz/dist/leapseconds  up to 1.4
external/public-domain/tz/dist/northamerica up to 1.1.1.30
external/public-domain/tz/dist/southamerica up to 1.1.1.20
external/public-domain/tz/dist/theory.html  up to 1.1.1.15
external/public-domain/tz/dist/version  up to 1.5
external/public-domain/tz/dist/ziguard.awk  up to 1.1.1.9
external/public-domain/tz/dist/zishrink.awk up to 1.1.1.8
external/public-domain/tz/dist/zone.tab up to 1.1.1.22
external/public-domain/tz/dist/zone1970.tab up to 1.1.1.23
distrib/sets/lists/base/mi  (apply patch)
doc/3RDPARTY(apply patch)

Updata tzdata to 2022e.


To generate a diff of this commit:
cvs rdiff -u -r1.1158.2.7 -r1.1158.2.8 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.1444.2.26 -r1.1444.2.27 src/doc/3RDPARTY
cvs rdiff -u -r1.1.1.3.6.3 -r1.1.1.3.6.4 \
src/external/public-domain/tz/dist/CONTRIBUTING
cvs rdiff -u -r1.1.1.17.4.8 -r1.1.1.17.4.9 \
src/external/public-domain/tz/dist/Makefile \
src/external/public-domain/tz/dist/europe
cvs rdiff -u -r1.1.1.18.4.9 -r1.1.1.18.4.10 \
src/external/public-domain/tz/dist/NEWS
cvs rdiff -u -r1.1.1.5.6.3 -r1.1.1.5.6.4 \
src/external/public-domain/tz/dist/README
cvs rdiff -u -r0 -r1.1.1.1.4.2 src/external/public-domain/tz/dist/SECURITY
cvs rdiff -u -r1.8.4.9 -r1.8.4.10 \
src/external/public-domain/tz/dist/TZDATA_VERSION
cvs rdiff -u -r1.1.1.11.4.9 -r1.1.1.11.4.10 \
src/external/public-domain/tz/dist/africa
cvs rdiff -u -r1.1.1.8.4.4 -r1.1.1.8.4.5 \
src/external/public-domain/tz/dist/antarctica
cvs rdiff -u -r1.1.1.16.4.8 -r1.1.1.16.4.9 \
src/external/public-domain/tz/dist/asia \
src/external/public-domain/tz/dist/northamerica
cvs rdiff -u -r1.1.1.11.4.8 -r1.1.1.11.4.9 \
src/external/public-domain/tz/dist/australasia
cvs rdiff -u -r1.1.1.7.4.4 -r1.1.1.7.4.5 \
src/external/public-domain/tz/dist/backward
cvs rdiff -u -r1.1.1.11.4.6 -r1.1.1.11.4.7 \
src/external/public-domain/tz/dist/backzone
cvs rdiff -u -r1.1.1.1.2.2 -r1.1.1.1.2.3 \
src/external/public-domain/tz/dist/calendars
cvs rdiff -u -r1.1.1.8.8.2 -r1.1.1.8.8.3 \
src/external/public-domain/tz/dist/checktab.awk
cvs rdiff -u -r1.1.1.2.6.3 -r1.1.1.2.6.4 \
src/external/public-domain/tz/dist/etcetera
cvs rdiff -u -r1.1.1.7.4.5 -r1.1.1.7.4.6 \
src/external/public-domain/tz/dist/leap-seconds.list
cvs rdiff -u -r1.1.1.8.4.6 -r1.1.1.8.4.7 \
src/external/public-domain/tz/dist/leapseconds
cvs rdiff -u -r1.1.1.11.4.5 -r1.1.1.11.4.6 \
src/external/public-domain/tz/dist/southamerica
cvs rdiff -u -r1.1.1.1.2.10 -r1.1.1.1.2.11 \
src/external/public-domain/tz/dist/theory.html
cvs rdiff -u -r1.1.1.5.4.9 -r1.1.1.5.4.10 \
src/external/public-domain/tz/dist/version
cvs rdiff -u -r1.1.1.1.2.7 -r1.1.1.1.2.8 \
src/external/public-domain/tz/dist/ziguard.awk \
src/external/public-domain/tz/dist/zishrink.awk
cvs rdiff -u -r1.1.1.11.4.7 

CVS commit: [netbsd-9] src/doc

2022-10-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 25 17:54:59 UTC 2022

Modified Files:
src/doc [netbsd-9]: CHANGES-9.4

Log Message:
Ticket #1547


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/doc/CHANGES-9.4

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

Modified files:

Index: src/doc/CHANGES-9.4
diff -u src/doc/CHANGES-9.4:1.1.2.26 src/doc/CHANGES-9.4:1.1.2.27
--- src/doc/CHANGES-9.4:1.1.2.26	Thu Oct 20 13:20:35 2022
+++ src/doc/CHANGES-9.4	Tue Oct 25 17:54:59 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.26 2022/10/20 13:20:35 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.27 2022/10/25 17:54:59 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -416,3 +416,9 @@ doc/3RDPARTY	(apply patch)
 
 	Update timezone data to 2022e.
 	[kre, ticket #1546]
+
+usr.bin/progress/progress.c			1.24,1.25
+
+	PR 56303: progress(1): fix error handling.
+	[riastradh, ticket #1547]
+



CVS commit: [netbsd-9] src/doc

2022-10-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 25 17:54:59 UTC 2022

Modified Files:
src/doc [netbsd-9]: CHANGES-9.4

Log Message:
Ticket #1547


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.26 -r1.1.2.27 src/doc/CHANGES-9.4

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



CVS commit: [netbsd-9] src/usr.bin/progress

2022-10-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 25 17:52:46 UTC 2022

Modified Files:
src/usr.bin/progress [netbsd-9]: progress.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1547):

usr.bin/progress/progress.c: revision 1.24
usr.bin/progress/progress.c: revision 1.25

Test errno when the return value from wait() indicates an error, not
when it indicates success.  PR install/56303.

Add missing check for error returns from read().  Found by inspection
while reviewing the changes suggested by RVP in PR install/56303, but
not believed to be the cause of the failure reported in that PR.


To generate a diff of this commit:
cvs rdiff -u -r1.21.18.1 -r1.21.18.2 src/usr.bin/progress/progress.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/progress/progress.c
diff -u src/usr.bin/progress/progress.c:1.21.18.1 src/usr.bin/progress/progress.c:1.21.18.2
--- src/usr.bin/progress/progress.c:1.21.18.1	Fri Jan 29 18:27:05 2021
+++ src/usr.bin/progress/progress.c	Tue Oct 25 17:52:46 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: progress.c,v 1.21.18.1 2021/01/29 18:27:05 martin Exp $ */
+/*	$NetBSD: progress.c,v 1.21.18.2 2022/10/25 17:52:46 martin Exp $ */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 
 #ifndef lint
-__RCSID("$NetBSD: progress.c,v 1.21.18.1 2021/01/29 18:27:05 martin Exp $");
+__RCSID("$NetBSD: progress.c,v 1.21.18.2 2022/10/25 17:52:46 martin Exp $");
 #endif/* not lint */
 
 #include 
@@ -232,7 +232,11 @@ main(int argc, char *argv[])
 		do {
 			nr = read(fd, fb_buf, buffersize);
 		} while (nr < 0 && errno == EINTR);
-		if (nr <= 0)
+		if (nr < 0) {
+			progressmeter(1);
+			err(1, "reading input");
+		}
+		if (nr == 0)
 			break;
 		for (off = 0; nr; nr -= nw, off += nw, bytes += nw)
 			if ((nw = write(outpipe[1], fb_buf + off,
@@ -260,7 +264,7 @@ main(int argc, char *argv[])
 		 */
 		ws = WIFSIGNALED(ws) ? WTERMSIG(ws) : WEXITSTATUS(ws);
 
-		if (deadpid != -1 && errno == EINTR)
+		if (deadpid == -1 && errno == EINTR)
 			continue;
 		if (deadpid == pid) {
 			pid = 0;



CVS commit: [netbsd-9] src/usr.bin/progress

2022-10-25 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 25 17:52:46 UTC 2022

Modified Files:
src/usr.bin/progress [netbsd-9]: progress.c

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #1547):

usr.bin/progress/progress.c: revision 1.24
usr.bin/progress/progress.c: revision 1.25

Test errno when the return value from wait() indicates an error, not
when it indicates success.  PR install/56303.

Add missing check for error returns from read().  Found by inspection
while reviewing the changes suggested by RVP in PR install/56303, but
not believed to be the cause of the failure reported in that PR.


To generate a diff of this commit:
cvs rdiff -u -r1.21.18.1 -r1.21.18.2 src/usr.bin/progress/progress.c

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



CVS commit: [netbsd-9] src/doc

2022-10-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 20 13:20:36 UTC 2022

Modified Files:
src/doc [netbsd-9]: CHANGES-9.4

Log Message:
Ticket #1546


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.25 -r1.1.2.26 src/doc/CHANGES-9.4

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



CVS commit: [netbsd-9] src/doc

2022-10-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 20 13:20:36 UTC 2022

Modified Files:
src/doc [netbsd-9]: CHANGES-9.4

Log Message:
Ticket #1546


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.25 -r1.1.2.26 src/doc/CHANGES-9.4

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

Modified files:

Index: src/doc/CHANGES-9.4
diff -u src/doc/CHANGES-9.4:1.1.2.25 src/doc/CHANGES-9.4:1.1.2.26
--- src/doc/CHANGES-9.4:1.1.2.25	Sat Oct 15 10:31:45 2022
+++ src/doc/CHANGES-9.4	Thu Oct 20 13:20:35 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.25 2022/10/15 10:31:45 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.26 2022/10/20 13:20:35 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -385,3 +385,34 @@ sys/dev/pci/ichsmb.c1.76-1.77 (via p
 	Add Intel 600 Series PCH support.
 	[msaitoh, ticket #1544]
 
+external/public-domain/tz/dist/SECURITY up to 1.1.1.1
+external/public-domain/tz/dist/CONTRIBUTING up to 1.1.1.7
+external/public-domain/tz/dist/Makefile up to 1.1.1.33
+external/public-domain/tz/dist/NEWS up to 1.1.1.38
+external/public-domain/tz/dist/README   up to 1.1.1.10
+external/public-domain/tz/dist/TZDATA_VERSION   up to 1.30
+external/public-domain/tz/dist/africa   up to 1.1.1.28
+external/public-domain/tz/dist/antarctica   up to 1.1.1.15
+external/public-domain/tz/dist/asia up to 1.5
+external/public-domain/tz/dist/australasia  up to 1.5
+external/public-domain/tz/dist/backward up to 1.5
+external/public-domain/tz/dist/backzone up to 1.1.1.23
+external/public-domain/tz/dist/calendarsup to 1.1.1.2
+external/public-domain/tz/dist/checktab.awk up to 1.1.1.11
+external/public-domain/tz/dist/etcetera up to 1.1.1.6
+external/public-domain/tz/dist/europe   up to 1.1.1.34
+external/public-domain/tz/dist/leap-seconds.list up to 1.4
+external/public-domain/tz/dist/leapseconds  up to 1.4
+external/public-domain/tz/dist/northamerica up to 1.1.1.30
+external/public-domain/tz/dist/southamerica up to 1.1.1.20
+external/public-domain/tz/dist/theory.html  up to 1.1.1.15
+external/public-domain/tz/dist/version  up to 1.5
+external/public-domain/tz/dist/ziguard.awk  up to 1.1.1.9
+external/public-domain/tz/dist/zishrink.awk up to 1.1.1.8
+external/public-domain/tz/dist/zone.tab up to 1.1.1.22
+external/public-domain/tz/dist/zone1970.tab up to 1.1.1.23
+distrib/sets/lists/base/mi			(apply patch)
+doc/3RDPARTY	(apply patch)
+
+	Update timezone data to 2022e.
+	[kre, ticket #1546]



CVS commit: [netbsd-9] src

2022-10-20 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Oct 20 13:18:54 UTC 2022

Modified Files:
src/distrib/sets/lists/base [netbsd-9]: mi
src/doc [netbsd-9]: 3RDPARTY
src/external/public-domain/tz/dist [netbsd-9]: CONTRIBUTING Makefile
NEWS README TZDATA_VERSION africa antarctica asia australasia
backward backzone calendars checktab.awk etcetera europe
leap-seconds.list leapseconds northamerica southamerica theory.html
version ziguard.awk zishrink.awk zone.tab zone1970.tab
Added Files:
src/external/public-domain/tz/dist [netbsd-9]: SECURITY

Log Message:
Pull up the following, requested by kre in ticket #1546:
Catch up to -current of external/public-domain/tz/dist and apply corresponding
patches to distrib/sets/lists/base/mi and doc/3RDPARTY:

external/public-domain/tz/dist/SECURITY up to 1.1.1.1
external/public-domain/tz/dist/CONTRIBUTING up to 1.1.1.7
external/public-domain/tz/dist/Makefile up to 1.1.1.33
external/public-domain/tz/dist/NEWS up to 1.1.1.38
external/public-domain/tz/dist/README   up to 1.1.1.10
external/public-domain/tz/dist/TZDATA_VERSION   up to 1.30
external/public-domain/tz/dist/africa   up to 1.1.1.28
external/public-domain/tz/dist/antarctica   up to 1.1.1.15
external/public-domain/tz/dist/asia up to 1.5
external/public-domain/tz/dist/australasia  up to 1.5
external/public-domain/tz/dist/backward up to 1.5
external/public-domain/tz/dist/backzone up to 1.1.1.23
external/public-domain/tz/dist/calendarsup to 1.1.1.2
external/public-domain/tz/dist/checktab.awk up to 1.1.1.11
external/public-domain/tz/dist/etcetera up to 1.1.1.6
external/public-domain/tz/dist/europe   up to 1.1.1.34
external/public-domain/tz/dist/leap-seconds.list up to 1.4
external/public-domain/tz/dist/leapseconds  up to 1.4
external/public-domain/tz/dist/northamerica up to 1.1.1.30
external/public-domain/tz/dist/southamerica up to 1.1.1.20
external/public-domain/tz/dist/theory.html  up to 1.1.1.15
external/public-domain/tz/dist/version  up to 1.5
external/public-domain/tz/dist/ziguard.awk  up to 1.1.1.9
external/public-domain/tz/dist/zishrink.awk up to 1.1.1.8
external/public-domain/tz/dist/zone.tab up to 1.1.1.22
external/public-domain/tz/dist/zone1970.tab up to 1.1.1.23
distrib/sets/lists/base/mi  (apply patch)
doc/3RDPARTY(apply patch)

Update timezone data to 2022e.


To generate a diff of this commit:
cvs rdiff -u -r1.1209.2.7 -r1.1209.2.8 src/distrib/sets/lists/base/mi
cvs rdiff -u -r1.1640.2.24 -r1.1640.2.25 src/doc/3RDPARTY
cvs rdiff -u -r1.1.1.6 -r1.1.1.6.2.1 \
src/external/public-domain/tz/dist/CONTRIBUTING
cvs rdiff -u -r1.1.1.24.2.6 -r1.1.1.24.2.7 \
src/external/public-domain/tz/dist/Makefile \
src/external/public-domain/tz/dist/europe
cvs rdiff -u -r1.1.1.27.2.6 -r1.1.1.27.2.7 \
src/external/public-domain/tz/dist/NEWS
cvs rdiff -u -r1.1.1.8.2.1 -r1.1.1.8.2.2 \
src/external/public-domain/tz/dist/README
cvs rdiff -u -r0 -r1.1.1.1.2.2 src/external/public-domain/tz/dist/SECURITY
cvs rdiff -u -r1.17.2.6 -r1.17.2.7 \
src/external/public-domain/tz/dist/TZDATA_VERSION
cvs rdiff -u -r1.1.1.20.2.4 -r1.1.1.20.2.5 \
src/external/public-domain/tz/dist/africa
cvs rdiff -u -r1.1.1.11.2.2 -r1.1.1.11.2.3 \
src/external/public-domain/tz/dist/antarctica
cvs rdiff -u -r1.1.1.23.2.5 -r1.1.1.23.2.6 \
src/external/public-domain/tz/dist/asia
cvs rdiff -u -r1.1.1.17.2.4 -r1.1.1.17.2.5 \
src/external/public-domain/tz/dist/australasia
cvs rdiff -u -r1.1.1.10.2.2 -r1.1.1.10.2.3 \
src/external/public-domain/tz/dist/backward
cvs rdiff -u -r1.1.1.16.2.4 -r1.1.1.16.2.5 \
src/external/public-domain/tz/dist/backzone
cvs rdiff -u -r1.1.1.1 -r1.1.1.1.14.1 \
src/external/public-domain/tz/dist/calendars
cvs rdiff -u -r1.1.1.9.4.1 -r1.1.1.9.4.2 \
src/external/public-domain/tz/dist/checktab.awk
cvs rdiff -u -r1.1.1.4.2.1 -r1.1.1.4.2.2 \
src/external/public-domain/tz/dist/etcetera
cvs rdiff -u -r1.1.1.11.2.4 -r1.1.1.11.2.5 \
src/external/public-domain/tz/dist/leap-seconds.list
cvs rdiff -u -r1.1.1.13.2.4 -r1.1.1.13.2.5 \
src/external/public-domain/tz/dist/leapseconds
cvs rdiff -u -r1.1.1.23.2.4 -r1.1.1.23.2.5 \
src/external/public-domain/tz/dist/northamerica
cvs rdiff -u -r1.1.1.15.2.2 -r1.1.1.15.2.3 \
src/external/public-domain/tz/dist/southamerica
cvs rdiff -u -r1.1.1.8.2.4 -r1.1.1.8.2.5 \
src/external/public-domain/tz/dist/theory.html
cvs rdiff -u -r1.1.1.14.2.6 -r1.1.1.14.2.7 \
src/external/public-domain/tz/dist/version
cvs rdiff -u 

CVS commit: [netbsd-8] src

2022-10-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Oct 15 10:52:16 UTC 2022

Modified Files:
src/share/man/man4 [netbsd-8]: lm.4
src/sys/dev/ic [netbsd-8]: nslm7x.c
src/sys/dev/isa [netbsd-8]: wbsio.c wbsioreg.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1774):

share/man/man4/lm.4: revision 1.37
sys/dev/isa/wbsio.c: revision 1.28
sys/dev/ic/nslm7x.c: revision 1.78
sys/dev/isa/wbsioreg.h: revision 1.10

Add Nuvoton NCT6799D support.


To generate a diff of this commit:
cvs rdiff -u -r1.32.40.2 -r1.32.40.3 src/share/man/man4/lm.4
cvs rdiff -u -r1.64.10.3 -r1.64.10.4 src/sys/dev/ic/nslm7x.c
cvs rdiff -u -r1.10.10.6 -r1.10.10.7 src/sys/dev/isa/wbsio.c
cvs rdiff -u -r1.5.2.5 -r1.5.2.6 src/sys/dev/isa/wbsioreg.h

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



CVS commit: [netbsd-8] src

2022-10-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Oct 15 10:52:16 UTC 2022

Modified Files:
src/share/man/man4 [netbsd-8]: lm.4
src/sys/dev/ic [netbsd-8]: nslm7x.c
src/sys/dev/isa [netbsd-8]: wbsio.c wbsioreg.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1774):

share/man/man4/lm.4: revision 1.37
sys/dev/isa/wbsio.c: revision 1.28
sys/dev/ic/nslm7x.c: revision 1.78
sys/dev/isa/wbsioreg.h: revision 1.10

Add Nuvoton NCT6799D support.


To generate a diff of this commit:
cvs rdiff -u -r1.32.40.2 -r1.32.40.3 src/share/man/man4/lm.4
cvs rdiff -u -r1.64.10.3 -r1.64.10.4 src/sys/dev/ic/nslm7x.c
cvs rdiff -u -r1.10.10.6 -r1.10.10.7 src/sys/dev/isa/wbsio.c
cvs rdiff -u -r1.5.2.5 -r1.5.2.6 src/sys/dev/isa/wbsioreg.h

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/man4/lm.4
diff -u src/share/man/man4/lm.4:1.32.40.2 src/share/man/man4/lm.4:1.32.40.3
--- src/share/man/man4/lm.4:1.32.40.2	Thu Jul 26 20:37:42 2018
+++ src/share/man/man4/lm.4	Sat Oct 15 10:52:16 2022
@@ -1,4 +1,4 @@
-.\"	$NetBSD: lm.4,v 1.32.40.2 2018/07/26 20:37:42 snj Exp $
+.\"	$NetBSD: lm.4,v 1.32.40.3 2022/10/15 10:52:16 martin Exp $
 .\"
 .\" Copyright (c) 2000 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd March 8, 2018
+.Dd October 11, 2022
 .Dt LM 4
 .Os
 .Sh NAME
@@ -89,13 +89,9 @@ Nuvoton
 .Em NCT6102D ,
 .Em NCT6104D ,
 .Em NCT6106D ,
-.Em NCT6779D ,
-.Em NCT6791D ,
-.Em NCT6792D ,
-.Em NCT6793D ,
-.Em NCT6795D ,
+.Em NCT6779D
 and
-.Em NCT6796D .
+.Em NCT679[1235689]D .
 .It
 Winbond
 .Em W83627HF* ,

Index: src/sys/dev/ic/nslm7x.c
diff -u src/sys/dev/ic/nslm7x.c:1.64.10.3 src/sys/dev/ic/nslm7x.c:1.64.10.4
--- src/sys/dev/ic/nslm7x.c:1.64.10.3	Wed Jul 17 15:43:18 2019
+++ src/sys/dev/ic/nslm7x.c	Sat Oct 15 10:52:16 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: nslm7x.c,v 1.64.10.3 2019/07/17 15:43:18 martin Exp $ */
+/*	$NetBSD: nslm7x.c,v 1.64.10.4 2022/10/15 10:52:16 martin Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.64.10.3 2019/07/17 15:43:18 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.64.10.4 2022/10/15 10:52:16 martin Exp $");
 
 #include 
 #include 
@@ -2157,6 +2157,7 @@ static const struct wb_product wbsio_pro
 { WBSIO_ID_NCT6795D,"NCT6795D", nct6779d_sensors, NULL },
 { WBSIO_ID_NCT6796D,"NCT6796D", nct6779d_sensors, NULL },
 { WBSIO_ID_NCT6798D,"NCT6798D", nct6779d_sensors, NULL },
+{ WBSIO_ID_NCT6799D,"NCT6799D", nct6779d_sensors, NULL },
 { 0, NULL, NULL, NULL }
 };
 

Index: src/sys/dev/isa/wbsio.c
diff -u src/sys/dev/isa/wbsio.c:1.10.10.6 src/sys/dev/isa/wbsio.c:1.10.10.7
--- src/sys/dev/isa/wbsio.c:1.10.10.6	Wed Jul 17 15:43:18 2019
+++ src/sys/dev/isa/wbsio.c	Sat Oct 15 10:52:16 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: wbsio.c,v 1.10.10.6 2019/07/17 15:43:18 martin Exp $	*/
+/*	$NetBSD: wbsio.c,v 1.10.10.7 2022/10/15 10:52:16 martin Exp $	*/
 /*	$OpenBSD: wbsio.c,v 1.10 2015/03/14 03:38:47 jsg Exp $	*/
 /*
  * Copyright (c) 2008 Mark Kettenis 
@@ -99,6 +99,7 @@ static const struct wbsio_product {
 	{ WBSIO_ID_NCT6795D,	12,	"NCT6795D" },
 	{ WBSIO_ID_NCT6796D,	13,	"NCT6796D" },
 	{ WBSIO_ID_NCT6798D,	13,	"NCT6798D" },
+	{ WBSIO_ID_NCT6799D,	13,	"NCT6799D" },
 };
 
 static const struct wbsio_product *wbsio_lookup(uint8_t id, uint8_t rev);

Index: src/sys/dev/isa/wbsioreg.h
diff -u src/sys/dev/isa/wbsioreg.h:1.5.2.5 src/sys/dev/isa/wbsioreg.h:1.5.2.6
--- src/sys/dev/isa/wbsioreg.h:1.5.2.5	Wed Jul 17 15:43:18 2019
+++ src/sys/dev/isa/wbsioreg.h	Sat Oct 15 10:52:16 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: wbsioreg.h,v 1.5.2.5 2019/07/17 15:43:18 martin Exp $ */
+/* $NetBSD: wbsioreg.h,v 1.5.2.6 2022/10/15 10:52:16 martin Exp $ */
 
 /* $OpenBSD: wbsioreg.h,v 1.4 2015/01/02 23:02:54 chris Exp $ */
 /*
@@ -72,6 +72,7 @@
 #define WBSIO_ID_NCT6795D	0xd35
 #define WBSIO_ID_NCT6796D	0xd420	/* 13bits */
 #define WBSIO_ID_NCT6798D	0xd428
+#define WBSIO_ID_NCT6799D	0xd800
 
 /* Make the above WBSIO_ID_* vaue from WBSIO_ID, WBSIO_REV and IDbits */
 #define WBSIO_MAKEID(id, rev, bits)	\



CVS commit: [netbsd-8] src/doc

2022-10-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Oct 15 10:35:16 UTC 2022

Modified Files:
src/doc [netbsd-8]: CHANGES-8.3

Log Message:
Tickets #1774 - #1776


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.155 -r1.1.2.156 src/doc/CHANGES-8.3

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



CVS commit: [netbsd-8] src/doc

2022-10-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Oct 15 10:35:16 UTC 2022

Modified Files:
src/doc [netbsd-8]: CHANGES-8.3

Log Message:
Tickets #1774 - #1776


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.155 -r1.1.2.156 src/doc/CHANGES-8.3

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

Modified files:

Index: src/doc/CHANGES-8.3
diff -u src/doc/CHANGES-8.3:1.1.2.155 src/doc/CHANGES-8.3:1.1.2.156
--- src/doc/CHANGES-8.3:1.1.2.155	Tue Oct 11 18:24:18 2022
+++ src/doc/CHANGES-8.3	Sat Oct 15 10:35:16 2022
@@ -1,4 +1,4 @@
- $NetBSD: CHANGES-8.3,v 1.1.2.155 2022/10/11 18:24:18 martin Exp $
+ $NetBSD: CHANGES-8.3,v 1.1.2.156 2022/10/15 10:35:16 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -2917,3 +2917,26 @@ sys/arch/x86/pci/amdzentemp.c			1.8-1.10
 	- Add support for per CCD temperature sensor.
 	[msaitoh, ticket #1773]
 
+share/man/man4/lm.41.37
+sys/dev/ic/nslm7x.c1.78
+sys/dev/isa/wbsio.c1.28
+sys/dev/isa/wbsioreg.h1.10
+
+	Add Nuvoton NCT6799D support.
+	[msaitoh, ticket #1774]
+
+sys/arch/x86/include/specialreg.h		1.189-1.192
+usr.sbin/cpuctl/arch/i386.c			1.128
+
+	- Add top-down slots event bit of architectural performance monitoring
+	  leaf.
+	- Modify CPUID Fn000a %ebx's string. Add new string for %ecx.
+	- Modify output of CPUID Fn000a.
+	- Update some AMD CPUID bits.
+	- Fix typo. 
+	[msaitoh, ticket #1775]
+
+sys/dev/pci/ichsmb.c1.76-1.77 (via patch)
+
+	Add Intel 600 Series PCH support.
+	[msaitoh, ticket #1776]



CVS commit: [netbsd-8] src/sys/dev/pci

2022-10-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Oct 15 10:33:42 UTC 2022

Modified Files:
src/sys/dev/pci [netbsd-8]: ichsmb.c

Log Message:
Pull up the following (via patch), requested by msaitoh in ticket #1776:

sys/dev/pci/ichsmb.c1.76-1.77

Add Intel 600 Series PCH support.


To generate a diff of this commit:
cvs rdiff -u -r1.50.6.5 -r1.50.6.6 src/sys/dev/pci/ichsmb.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/pci/ichsmb.c
diff -u src/sys/dev/pci/ichsmb.c:1.50.6.5 src/sys/dev/pci/ichsmb.c:1.50.6.6
--- src/sys/dev/pci/ichsmb.c:1.50.6.5	Fri Dec  3 17:54:30 2021
+++ src/sys/dev/pci/ichsmb.c	Sat Oct 15 10:33:42 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ichsmb.c,v 1.50.6.5 2021/12/03 17:54:30 martin Exp $	*/
+/*	$NetBSD: ichsmb.c,v 1.50.6.6 2022/10/15 10:33:42 martin Exp $	*/
 /*	$OpenBSD: ichiic.c,v 1.44 2020/10/07 11:23:05 jsg Exp $	*/
 
 /*
@@ -22,7 +22,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.50.6.5 2021/12/03 17:54:30 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.50.6.6 2022/10/15 10:33:42 martin Exp $");
 
 #include 
 #include 
@@ -145,6 +145,8 @@ ichsmb_match(device_t parent, cfdata_t m
 		case PCI_PRODUCT_INTEL_495_YU_SMB:
 		case PCI_PRODUCT_INTEL_5HS_H_SMB:
 		case PCI_PRODUCT_INTEL_5HS_LP_SMB:
+		case PCI_PRODUCT_INTEL_6HS_H_SMB:
+		case PCI_PRODUCT_INTEL_6HS_LP_SMB:
 			return 1;
 		}
 	}



CVS commit: [netbsd-8] src/sys/dev/pci

2022-10-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Oct 15 10:33:42 UTC 2022

Modified Files:
src/sys/dev/pci [netbsd-8]: ichsmb.c

Log Message:
Pull up the following (via patch), requested by msaitoh in ticket #1776:

sys/dev/pci/ichsmb.c1.76-1.77

Add Intel 600 Series PCH support.


To generate a diff of this commit:
cvs rdiff -u -r1.50.6.5 -r1.50.6.6 src/sys/dev/pci/ichsmb.c

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



CVS commit: [netbsd-9] src/doc

2022-10-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Oct 15 10:31:45 UTC 2022

Modified Files:
src/doc [netbsd-9]: CHANGES-9.4

Log Message:
Tickets #1541 - #1544


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.24 -r1.1.2.25 src/doc/CHANGES-9.4

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



CVS commit: [netbsd-9] src/doc

2022-10-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Oct 15 10:31:45 UTC 2022

Modified Files:
src/doc [netbsd-9]: CHANGES-9.4

Log Message:
Tickets #1541 - #1544


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.24 -r1.1.2.25 src/doc/CHANGES-9.4

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

Modified files:

Index: src/doc/CHANGES-9.4
diff -u src/doc/CHANGES-9.4:1.1.2.24 src/doc/CHANGES-9.4:1.1.2.25
--- src/doc/CHANGES-9.4:1.1.2.24	Tue Oct 11 18:26:37 2022
+++ src/doc/CHANGES-9.4	Sat Oct 15 10:31:45 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.24 2022/10/11 18:26:37 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.25 2022/10/15 10:31:45 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -351,3 +351,37 @@ usr.bin/skey/skeyaudit.sh			1.5
 	Adapt to removal of "Mail".
 	[is, ticket #1540]
 
+share/man/man4/lm.41.37
+sys/dev/ic/nslm7x.c1.78
+sys/dev/isa/wbsio.c1.28
+sys/dev/isa/wbsioreg.h1.10
+
+	Add Nuvoton NCT6799D support.
+	[msaitoh, ticket #1541]
+
+sys/arch/x86/include/specialreg.h		1.189-1.192
+sys/dev/nvmm/x86/nvmm_x86.c			1.23
+usr.sbin/cpuctl/arch/i386.c			1.128
+
+	- Add top-down slots event bit of architectural performance monitoring
+	  leaf.
+	- Modify CPUID Fn000a %ebx's string. Add new string for %ecx.
+	- Modify output of CPUID Fn000a.
+	- Update some AMD CPUID bits.
+	- Fix typo.
+	[msaitoh, ticket #1542]
+
+sys/dev/tprof/tprof_x86_intel.c 		1.4
+usr.sbin/tprof/arch/tprof_x86.c 		1.10-1.12
+
+	- Add topdown-slots to Intel architectural performance monitoring
+	  version 1.
+	- Disable the unsupported events based on CPUID Fn000a %eax.
+	- Fix typo in comment. Remove duplicated macros.
+	[msaitoh, ticket #1543]
+
+sys/dev/pci/ichsmb.c1.76-1.77 (via patch)
+
+	Add Intel 600 Series PCH support.
+	[msaitoh, ticket #1544]
+



CVS commit: [netbsd-9] src/sys/dev/pci

2022-10-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Oct 15 10:29:40 UTC 2022

Modified Files:
src/sys/dev/pci [netbsd-9]: ichsmb.c

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1544:

sys/dev/pci/ichsmb.c1.76-1.77

Add Intel 600 Series PCH support.


To generate a diff of this commit:
cvs rdiff -u -r1.60.4.3 -r1.60.4.4 src/sys/dev/pci/ichsmb.c

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



CVS commit: [netbsd-9] src/sys/dev/pci

2022-10-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Oct 15 10:29:40 UTC 2022

Modified Files:
src/sys/dev/pci [netbsd-9]: ichsmb.c

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1544:

sys/dev/pci/ichsmb.c1.76-1.77

Add Intel 600 Series PCH support.


To generate a diff of this commit:
cvs rdiff -u -r1.60.4.3 -r1.60.4.4 src/sys/dev/pci/ichsmb.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/pci/ichsmb.c
diff -u src/sys/dev/pci/ichsmb.c:1.60.4.3 src/sys/dev/pci/ichsmb.c:1.60.4.4
--- src/sys/dev/pci/ichsmb.c:1.60.4.3	Fri Dec  3 17:49:41 2021
+++ src/sys/dev/pci/ichsmb.c	Sat Oct 15 10:29:40 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ichsmb.c,v 1.60.4.3 2021/12/03 17:49:41 martin Exp $	*/
+/*	$NetBSD: ichsmb.c,v 1.60.4.4 2022/10/15 10:29:40 martin Exp $	*/
 /*	$OpenBSD: ichiic.c,v 1.44 2020/10/07 11:23:05 jsg Exp $	*/
 
 /*
@@ -22,7 +22,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.60.4.3 2021/12/03 17:49:41 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ichsmb.c,v 1.60.4.4 2022/10/15 10:29:40 martin Exp $");
 
 #include 
 #include 
@@ -152,6 +152,8 @@ ichsmb_match(device_t parent, cfdata_t m
 		case PCI_PRODUCT_INTEL_495_YU_SMB:
 		case PCI_PRODUCT_INTEL_5HS_H_SMB:
 		case PCI_PRODUCT_INTEL_5HS_LP_SMB:
+		case PCI_PRODUCT_INTEL_6HS_H_SMB:
+		case PCI_PRODUCT_INTEL_6HS_LP_SMB:
 			return 1;
 		}
 	}



CVS commit: [netbsd-9] src

2022-10-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Oct 15 10:20:32 UTC 2022

Modified Files:
src/sys/dev/tprof [netbsd-9]: tprof_x86_intel.c
src/usr.sbin/tprof/arch [netbsd-9]: tprof_x86.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1543):

sys/dev/tprof/tprof_x86_intel.c: revision 1.4
usr.sbin/tprof/arch/tprof_x86.c: revision 1.10
usr.sbin/tprof/arch/tprof_x86.c: revision 1.11
usr.sbin/tprof/arch/tprof_x86.c: revision 1.12

Fix typo in a comment.

Use CPUID_PERF_* macros defined in specialreg.h. No functional change.

Add topdown-slots to Intel architectural performance monitoring version 1.

Disable the unsupported events from the bit vector length in EAX.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.2.1 src/sys/dev/tprof/tprof_x86_intel.c
cvs rdiff -u -r1.8.4.1 -r1.8.4.2 src/usr.sbin/tprof/arch/tprof_x86.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/tprof/tprof_x86_intel.c
diff -u src/sys/dev/tprof/tprof_x86_intel.c:1.3 src/sys/dev/tprof/tprof_x86_intel.c:1.3.2.1
--- src/sys/dev/tprof/tprof_x86_intel.c:1.3	Fri Jun 14 11:50:35 2019
+++ src/sys/dev/tprof/tprof_x86_intel.c	Sat Oct 15 10:20:32 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: tprof_x86_intel.c,v 1.3 2019/06/14 11:50:35 msaitoh Exp $	*/
+/*	$NetBSD: tprof_x86_intel.c,v 1.3.2.1 2022/10/15 10:20:32 martin Exp $	*/
 
 /*
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -56,7 +56,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tprof_x86_intel.c,v 1.3 2019/06/14 11:50:35 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tprof_x86_intel.c,v 1.3.2.1 2022/10/15 10:20:32 martin Exp $");
 
 #include 
 #include 
@@ -90,10 +90,6 @@ __KERNEL_RCSID(0, "$NetBSD: tprof_x86_in
 #define	PERFEVTSEL_INV		__BIT(23)
 #define	PERFEVTSEL_COUNTER_MASK	__BITS(24, 31)
 
-#define CPUID_0A_VERSION	__BITS(0, 7)
-#define CPUID_0A_NCOUNTERS	__BITS(8, 15)
-#define CPUID_0A_BITWIDTH	__BITS(16, 23)
-
 static uint64_t counter_bitwidth;
 static uint64_t counter_val = 500;
 static uint64_t counter_reset_val;
@@ -195,14 +191,14 @@ tprof_intel_ident(void)
 		return TPROF_IDENT_NONE;
 	}
 	x86_cpuid(0x0A, descs);
-	if ((descs[0] & CPUID_0A_VERSION) == 0) {
+	if ((descs[0] & CPUID_PERF_VERSION) == 0) {
 		return TPROF_IDENT_NONE;
 	}
-	if ((descs[0] & CPUID_0A_NCOUNTERS) == 0) {
+	if ((descs[0] & CPUID_PERF_NGPPC) == 0) {
 		return TPROF_IDENT_NONE;
 	}
 
-	counter_bitwidth = __SHIFTOUT(descs[0], CPUID_0A_BITWIDTH);
+	counter_bitwidth = __SHIFTOUT(descs[0], CPUID_PERF_NBWGPPC);
 
 	return TPROF_IDENT_INTEL_GENERIC;
 }

Index: src/usr.sbin/tprof/arch/tprof_x86.c
diff -u src/usr.sbin/tprof/arch/tprof_x86.c:1.8.4.1 src/usr.sbin/tprof/arch/tprof_x86.c:1.8.4.2
--- src/usr.sbin/tprof/arch/tprof_x86.c:1.8.4.1	Sat Oct 12 14:34:45 2019
+++ src/usr.sbin/tprof/arch/tprof_x86.c	Sat Oct 15 10:20:32 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: tprof_x86.c,v 1.8.4.1 2019/10/12 14:34:45 martin Exp $	*/
+/*	$NetBSD: tprof_x86.c,v 1.8.4.2 2022/10/15 10:20:32 martin Exp $	*/
 
 /*
  * Copyright (c) 2018-2019 The NetBSD Foundation, Inc.
@@ -85,6 +85,7 @@ static struct name_to_event intel_arch1_
 	{ "llc-misses",			0x2E, 0x41, true },
 	{ "branch-instruction-retired",	0xC4, 0x00, true },
 	{ "branch-misses-retired",	0xC5, 0x00, true },
+	{ "topdown-slots",		0xA4, 0x01, true },
 };
 
 static struct event_table intel_arch1 = {
@@ -98,7 +99,7 @@ static struct event_table intel_arch1 = 
 static struct event_table *
 init_intel_arch1(void)
 {
-	unsigned int eax, ebx, ecx, edx;
+	unsigned int eax, ebx, ecx, edx, vectorlen;
 	struct event_table *table;
 	size_t i;
 
@@ -108,9 +109,17 @@ init_intel_arch1(void)
 	edx = 0;
 	x86_cpuid(, , , );
 
+	vectorlen = __SHIFTOUT(eax, CPUID_PERF_BVECLEN);
+
 	table = _arch1;
 	for (i = 0; i < table->nevents; i++) {
-		/* Disable the unsupported events. */
+		/*
+		 * Disable the unsupported events from:
+		 * a) the bit vector length in EAX.
+		 * b) the disable bit in EBX.
+		 */
+		if (i >= vectorlen)
+			table->names[i].enabled = false;
 		if ((ebx & (i << 1)) != 0)
 			table->names[i].enabled = false;
 	}
@@ -550,7 +559,7 @@ init_intel_generic(void)
 			table->next = init_intel_silvermont_airmont();
 			break;
 		case 0x5C: /* Goldmont (Apollo Lake) */
-		case 0x5F: /* Goldmont (Denvertion) */
+		case 0x5F: /* Goldmont (Denverton) */
 			table->next = init_intel_goldmont();
 			break;
 		case 0x7A: /* Goldmont Plus (Gemini Lake) */



CVS commit: [netbsd-9] src

2022-10-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Oct 15 10:20:32 UTC 2022

Modified Files:
src/sys/dev/tprof [netbsd-9]: tprof_x86_intel.c
src/usr.sbin/tprof/arch [netbsd-9]: tprof_x86.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1543):

sys/dev/tprof/tprof_x86_intel.c: revision 1.4
usr.sbin/tprof/arch/tprof_x86.c: revision 1.10
usr.sbin/tprof/arch/tprof_x86.c: revision 1.11
usr.sbin/tprof/arch/tprof_x86.c: revision 1.12

Fix typo in a comment.

Use CPUID_PERF_* macros defined in specialreg.h. No functional change.

Add topdown-slots to Intel architectural performance monitoring version 1.

Disable the unsupported events from the bit vector length in EAX.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.2.1 src/sys/dev/tprof/tprof_x86_intel.c
cvs rdiff -u -r1.8.4.1 -r1.8.4.2 src/usr.sbin/tprof/arch/tprof_x86.c

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



CVS commit: [netbsd-8] src

2022-10-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Oct 15 10:16:08 UTC 2022

Modified Files:
src/sys/arch/x86/include [netbsd-8]: specialreg.h
src/usr.sbin/cpuctl/arch [netbsd-8]: i386.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1775):

sys/arch/x86/include/specialreg.h: revision 1.189
usr.sbin/cpuctl/arch/i386.c: revision 1.128
sys/arch/x86/include/specialreg.h: revision 1.190
sys/arch/x86/include/specialreg.h: revision 1.191
sys/arch/x86/include/specialreg.h: revision 1.192

s/shareing/sharing/. No functional change.

Add top-down slots event bit of architectural performance monitoring leaf.

Modify CPUID Fn000a %ebx's string. Add new string for %ecx.

Modify output of CPUID Fn000a.
old:
cpu0: Perfmon-eax 0x8300805
cpu0: Perfmon-eax 0x8300805
cpu0: Perfmon-edx 0x8604
new:
cpu0: Perfmon: Ver. 5
cpu0: Perfmon: General: bitwidth 48, 8 counters
cpu0: Perfmon: General: avail 0xff
cpu0: Perfmon: General: avail 0xff
cpu0: Perfmon: Fixed: bitwidth 48, 4 counters
cpu0: Perfmon: Fixed: avail 0xf

Update some AMD CPUID bits:
- Rename FSREP_MOV to FSRM.
- Add Memory Bandwidth Enforcement (MBE)
- Add AMD's PPIN. Rename CPUID_SEF_PPIN to CPUID_SEF_INTEL_PPIN.
- Add Collaborative Processor Performance Control (CPPC).
- Add HOST_MCE_OVERRIDE.
- Add some unknown bits as Bxx.
- Add comments.
- Use __BIT().


To generate a diff of this commit:
cvs rdiff -u -r1.98.2.23 -r1.98.2.24 src/sys/arch/x86/include/specialreg.h
cvs rdiff -u -r1.74.6.14 -r1.74.6.15 src/usr.sbin/cpuctl/arch/i386.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/x86/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.98.2.23 src/sys/arch/x86/include/specialreg.h:1.98.2.24
--- src/sys/arch/x86/include/specialreg.h:1.98.2.23	Mon Jan 31 17:46:36 2022
+++ src/sys/arch/x86/include/specialreg.h	Sat Oct 15 10:16:07 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.98.2.23 2022/01/31 17:46:36 martin Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.98.2.24 2022/10/15 10:16:07 martin Exp $	*/
 
 /*
  * Copyright (c) 2014-2019 The NetBSD Foundation, Inc.
@@ -287,7 +287,7 @@
 #define CPUID_DCP_CACHELEVEL	__BITS(7, 5)	/* Cache level (start at 1) */
 #define CPUID_DCP_SELFINITCL	__BIT(8)	/* Self initializing cachelvl*/
 #define CPUID_DCP_FULLASSOC	__BIT(9)	/* Full associative */
-#define CPUID_DCP_SHAREING	__BITS(25, 14)	/* shareing */
+#define CPUID_DCP_SHARING	__BITS(25, 14)	/* sharing */
 #define CPUID_DCP_CORE_P_PKG	__BITS(31, 26)	/* Cores/package */
 
 /* %ebx */
@@ -459,7 +459,7 @@
 /* %ecx = 0, %edx */
 #define CPUID_SEF_AVX512_4VNNIW	__BIT(2)  /* AVX512 4-reg Neural Network ins */
 #define CPUID_SEF_AVX512_4FMAPS	__BIT(3)  /* AVX512 4-reg Mult Accum Single precision */
-#define CPUID_SEF_FSREP_MOV	__BIT(4)  /* Fast Short REP MOVE */
+#define CPUID_SEF_FSRM		__BIT(4)  /* Fast Short Rep Move */
 #define CPUID_SEF_AVX512_VP2INTERSECT __BIT(8) /* AVX512 VP2INTERSECT */
 #define CPUID_SEF_SRBDS_CTRL	__BIT(9)  /* IA32_MCU_OPT_CTRL */
 #define CPUID_SEF_MD_CLEAR	__BIT(10) /* VERW clears CPU buffers */
@@ -479,7 +479,7 @@
 
 #define CPUID_SEF_FLAGS2	"\20"	  \
 "\3" "AVX512_4VNNIW" "\4" "AVX512_4FMAPS" \
-	"\5" "FSREP_MOV"		  \
+	"\5" "FSRM"			  \
 	"\11VP2INTERSECT" "\12SRBDS_CTRL" "\13MD_CLEAR"			  \
 			"\16TSX_FORCE_ABORT" "\17SERIALIZE" "\20HYBRID"	  \
 	"\21" "TSXLDTRK"		"\23" "PCONFIG"	"\24" "ARCH_LBR"  \
@@ -503,7 +503,7 @@
 	"\31" "LAM"
 
 /* %ecx = 1, %ebx */
-#define CPUID_SEF_PPIN		__BIT(0)  /* IA32_PPIN & IA32_PPIN_CTL MSRs */
+#define CPUID_SEF_INTEL_PPIN	__BIT(0)  /* IA32_PPIN & IA32_PPIN_CTL MSRs */
 
 #define CPUID_SEF1_FLAGS_B	"\20"\
 "\1" "PPIN"
@@ -533,10 +533,16 @@
 #define CPUID_PERF_LLCMISS	__BIT(4)   /* No LLCache miss */
 #define CPUID_PERF_BRINSRETR	__BIT(5)   /* No branch inst. retried */
 #define CPUID_PERF_BRMISPRRETR	__BIT(6)   /* No branch mispredict retry */
+#define CPUID_PERF_TOPDOWNSLOT	__BIT(7)   /* No top-down slots */
 
-#define CPUID_PERF_FLAGS1	"\177\20"			  \
-	"b\0CORECYCL\0" "b\1INSTRETRY\0" "b\2REFCYCL\0" "b\3LLCREF\0" \
-	"b\4LLCMISS\0" "b\5BRINSRETR\0" "b\6BRMISPRRETR\0"
+#define CPUID_PERF_FLAGS1	"\177\20"  \
+	"b\0CORECYCL\0"	"b\1INST\0"	"b\2REFCYCL\0"	"b\3LLCREF\0"	  \
+	"b\4LLCMISS\0"	"b\5BRINST\0"	"b\6BRMISPR\0"	"b\7TOPDOWNSLOT\0"
+
+/* %ecx */
+
+#define CPUID_PERF_FLAGS2	"\177\20"  \
+	"b\0INST\0" "b\1CLK_CORETHREAD\0" "b\2CLK_REF_TSC\0" "b\3TOPDOWNSLOT\0"
 
 /* %edx */
 #define CPUID_PERF_NFFPC	__BITS(4, 0)   /* Num of fixed-funct perfcnt */
@@ -588,10 +594,10 @@
  */
 
 /* %ecx = 1, %eax */
-#define CPUID_PES1_XSAVEOPT	0x0001	/* xsaveopt instruction */
-#define CPUID_PES1_XSAVEC	0x0002	/* xsavec & compacted XRSTOR */
-#define CPUID_PES1_XGETBV	0x0004	/* xgetbv with ECX = 1 */
-#define CPUID_PES1_XSAVES	0x0008	/* 

CVS commit: [netbsd-8] src

2022-10-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Oct 15 10:16:08 UTC 2022

Modified Files:
src/sys/arch/x86/include [netbsd-8]: specialreg.h
src/usr.sbin/cpuctl/arch [netbsd-8]: i386.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1775):

sys/arch/x86/include/specialreg.h: revision 1.189
usr.sbin/cpuctl/arch/i386.c: revision 1.128
sys/arch/x86/include/specialreg.h: revision 1.190
sys/arch/x86/include/specialreg.h: revision 1.191
sys/arch/x86/include/specialreg.h: revision 1.192

s/shareing/sharing/. No functional change.

Add top-down slots event bit of architectural performance monitoring leaf.

Modify CPUID Fn000a %ebx's string. Add new string for %ecx.

Modify output of CPUID Fn000a.
old:
cpu0: Perfmon-eax 0x8300805
cpu0: Perfmon-eax 0x8300805
cpu0: Perfmon-edx 0x8604
new:
cpu0: Perfmon: Ver. 5
cpu0: Perfmon: General: bitwidth 48, 8 counters
cpu0: Perfmon: General: avail 0xff
cpu0: Perfmon: General: avail 0xff
cpu0: Perfmon: Fixed: bitwidth 48, 4 counters
cpu0: Perfmon: Fixed: avail 0xf

Update some AMD CPUID bits:
- Rename FSREP_MOV to FSRM.
- Add Memory Bandwidth Enforcement (MBE)
- Add AMD's PPIN. Rename CPUID_SEF_PPIN to CPUID_SEF_INTEL_PPIN.
- Add Collaborative Processor Performance Control (CPPC).
- Add HOST_MCE_OVERRIDE.
- Add some unknown bits as Bxx.
- Add comments.
- Use __BIT().


To generate a diff of this commit:
cvs rdiff -u -r1.98.2.23 -r1.98.2.24 src/sys/arch/x86/include/specialreg.h
cvs rdiff -u -r1.74.6.14 -r1.74.6.15 src/usr.sbin/cpuctl/arch/i386.c

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



CVS commit: [netbsd-9] src

2022-10-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Oct 15 10:08:41 UTC 2022

Modified Files:
src/sys/arch/x86/include [netbsd-9]: specialreg.h
src/sys/dev/nvmm/x86 [netbsd-9]: nvmm_x86.c
src/usr.sbin/cpuctl/arch [netbsd-9]: i386.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1542):

sys/arch/x86/include/specialreg.h: revision 1.189
sys/dev/nvmm/x86/nvmm_x86.c: revision 1.23
usr.sbin/cpuctl/arch/i386.c: revision 1.128
sys/arch/x86/include/specialreg.h: revision 1.190
sys/arch/x86/include/specialreg.h: revision 1.191
sys/arch/x86/include/specialreg.h: revision 1.192

s/shareing/sharing/. No functional change.

Add top-down slots event bit of architectural performance monitoring leaf.

Modify CPUID Fn000a %ebx's string. Add new string for %ecx.

Modify output of CPUID Fn000a.
old:
cpu0: Perfmon-eax 0x8300805
cpu0: Perfmon-eax 0x8300805
cpu0: Perfmon-edx 0x8604
new:
cpu0: Perfmon: Ver. 5
cpu0: Perfmon: General: bitwidth 48, 8 counters
cpu0: Perfmon: General: avail 0xff
cpu0: Perfmon: General: avail 0xff
cpu0: Perfmon: Fixed: bitwidth 48, 4 counters
cpu0: Perfmon: Fixed: avail 0xf

Update some AMD CPUID bits:
- Rename FSREP_MOV to FSRM.
- Add Memory Bandwidth Enforcement (MBE)
- Add AMD's PPIN. Rename CPUID_SEF_PPIN to CPUID_SEF_INTEL_PPIN.
- Add Collaborative Processor Performance Control (CPPC).
- Add HOST_MCE_OVERRIDE.
- Add some unknown bits as Bxx.
- Add comments.
- Use __BIT().


To generate a diff of this commit:
cvs rdiff -u -r1.150.2.10 -r1.150.2.11 src/sys/arch/x86/include/specialreg.h
cvs rdiff -u -r1.7.4.7 -r1.7.4.8 src/sys/dev/nvmm/x86/nvmm_x86.c
cvs rdiff -u -r1.104.2.10 -r1.104.2.11 src/usr.sbin/cpuctl/arch/i386.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/x86/include/specialreg.h
diff -u src/sys/arch/x86/include/specialreg.h:1.150.2.10 src/sys/arch/x86/include/specialreg.h:1.150.2.11
--- src/sys/arch/x86/include/specialreg.h:1.150.2.10	Mon Jan 31 17:42:17 2022
+++ src/sys/arch/x86/include/specialreg.h	Sat Oct 15 10:08:40 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: specialreg.h,v 1.150.2.10 2022/01/31 17:42:17 martin Exp $	*/
+/*	$NetBSD: specialreg.h,v 1.150.2.11 2022/10/15 10:08:40 martin Exp $	*/
 
 /*
  * Copyright (c) 2014-2020 The NetBSD Foundation, Inc.
@@ -311,7 +311,7 @@
 #define CPUID_DCP_CACHELEVEL	__BITS(7, 5)	/* Cache level (start at 1) */
 #define CPUID_DCP_SELFINITCL	__BIT(8)	/* Self initializing cachelvl*/
 #define CPUID_DCP_FULLASSOC	__BIT(9)	/* Full associative */
-#define CPUID_DCP_SHAREING	__BITS(25, 14)	/* shareing */
+#define CPUID_DCP_SHARING	__BITS(25, 14)	/* sharing */
 #define CPUID_DCP_CORE_P_PKG	__BITS(31, 26)	/* Cores/package */
 
 /* %ebx */
@@ -483,7 +483,7 @@
 /* %ecx = 0, %edx */
 #define CPUID_SEF_AVX512_4VNNIW	__BIT(2)  /* AVX512 4-reg Neural Network ins */
 #define CPUID_SEF_AVX512_4FMAPS	__BIT(3)  /* AVX512 4-reg Mult Accum Single precision */
-#define CPUID_SEF_FSREP_MOV	__BIT(4)  /* Fast Short REP MOVE */
+#define CPUID_SEF_FSRM		__BIT(4)  /* Fast Short Rep Move */
 #define CPUID_SEF_AVX512_VP2INTERSECT __BIT(8) /* AVX512 VP2INTERSECT */
 #define CPUID_SEF_SRBDS_CTRL	__BIT(9)  /* IA32_MCU_OPT_CTRL */
 #define CPUID_SEF_MD_CLEAR	__BIT(10) /* VERW clears CPU buffers */
@@ -503,7 +503,7 @@
 
 #define CPUID_SEF_FLAGS2	"\20"	  \
 "\3" "AVX512_4VNNIW" "\4" "AVX512_4FMAPS" \
-	"\5" "FSREP_MOV"		  \
+	"\5" "FSRM"			  \
 	"\11VP2INTERSECT" "\12SRBDS_CTRL" "\13MD_CLEAR"			  \
 			"\16TSX_FORCE_ABORT" "\17SERIALIZE" "\20HYBRID"	  \
 	"\21" "TSXLDTRK"		"\23" "PCONFIG"	"\24" "ARCH_LBR"  \
@@ -527,7 +527,7 @@
 	"\31" "LAM"
 
 /* %ecx = 1, %ebx */
-#define CPUID_SEF_PPIN		__BIT(0)  /* IA32_PPIN & IA32_PPIN_CTL MSRs */
+#define CPUID_SEF_INTEL_PPIN	__BIT(0)  /* IA32_PPIN & IA32_PPIN_CTL MSRs */
 
 #define CPUID_SEF1_FLAGS_B	"\20"\
 "\1" "PPIN"
@@ -557,10 +557,16 @@
 #define CPUID_PERF_LLCMISS	__BIT(4)   /* No LLCache miss */
 #define CPUID_PERF_BRINSRETR	__BIT(5)   /* No branch inst. retried */
 #define CPUID_PERF_BRMISPRRETR	__BIT(6)   /* No branch mispredict retry */
+#define CPUID_PERF_TOPDOWNSLOT	__BIT(7)   /* No top-down slots */
 
-#define CPUID_PERF_FLAGS1	"\177\20"			  \
-	"b\0CORECYCL\0" "b\1INSTRETRY\0" "b\2REFCYCL\0" "b\3LLCREF\0" \
-	"b\4LLCMISS\0" "b\5BRINSRETR\0" "b\6BRMISPRRETR\0"
+#define CPUID_PERF_FLAGS1	"\177\20"  \
+	"b\0CORECYCL\0"	"b\1INST\0"	"b\2REFCYCL\0"	"b\3LLCREF\0"	  \
+	"b\4LLCMISS\0"	"b\5BRINST\0"	"b\6BRMISPR\0"	"b\7TOPDOWNSLOT\0"
+
+/* %ecx */
+
+#define CPUID_PERF_FLAGS2	"\177\20"  \
+	"b\0INST\0" "b\1CLK_CORETHREAD\0" "b\2CLK_REF_TSC\0" "b\3TOPDOWNSLOT\0"
 
 /* %edx */
 #define CPUID_PERF_NFFPC	__BITS(4, 0)   /* Num of fixed-funct perfcnt */
@@ -612,10 +618,10 @@
  */
 
 /* %ecx = 1, %eax */
-#define CPUID_PES1_XSAVEOPT	0x0001	/* xsaveopt instruction */

CVS commit: [netbsd-9] src

2022-10-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Oct 15 10:08:41 UTC 2022

Modified Files:
src/sys/arch/x86/include [netbsd-9]: specialreg.h
src/sys/dev/nvmm/x86 [netbsd-9]: nvmm_x86.c
src/usr.sbin/cpuctl/arch [netbsd-9]: i386.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1542):

sys/arch/x86/include/specialreg.h: revision 1.189
sys/dev/nvmm/x86/nvmm_x86.c: revision 1.23
usr.sbin/cpuctl/arch/i386.c: revision 1.128
sys/arch/x86/include/specialreg.h: revision 1.190
sys/arch/x86/include/specialreg.h: revision 1.191
sys/arch/x86/include/specialreg.h: revision 1.192

s/shareing/sharing/. No functional change.

Add top-down slots event bit of architectural performance monitoring leaf.

Modify CPUID Fn000a %ebx's string. Add new string for %ecx.

Modify output of CPUID Fn000a.
old:
cpu0: Perfmon-eax 0x8300805
cpu0: Perfmon-eax 0x8300805
cpu0: Perfmon-edx 0x8604
new:
cpu0: Perfmon: Ver. 5
cpu0: Perfmon: General: bitwidth 48, 8 counters
cpu0: Perfmon: General: avail 0xff
cpu0: Perfmon: General: avail 0xff
cpu0: Perfmon: Fixed: bitwidth 48, 4 counters
cpu0: Perfmon: Fixed: avail 0xf

Update some AMD CPUID bits:
- Rename FSREP_MOV to FSRM.
- Add Memory Bandwidth Enforcement (MBE)
- Add AMD's PPIN. Rename CPUID_SEF_PPIN to CPUID_SEF_INTEL_PPIN.
- Add Collaborative Processor Performance Control (CPPC).
- Add HOST_MCE_OVERRIDE.
- Add some unknown bits as Bxx.
- Add comments.
- Use __BIT().


To generate a diff of this commit:
cvs rdiff -u -r1.150.2.10 -r1.150.2.11 src/sys/arch/x86/include/specialreg.h
cvs rdiff -u -r1.7.4.7 -r1.7.4.8 src/sys/dev/nvmm/x86/nvmm_x86.c
cvs rdiff -u -r1.104.2.10 -r1.104.2.11 src/usr.sbin/cpuctl/arch/i386.c

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



CVS commit: [netbsd-9] src

2022-10-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Oct 15 09:45:54 UTC 2022

Modified Files:
src/share/man/man4 [netbsd-9]: lm.4
src/sys/dev/ic [netbsd-9]: nslm7x.c
src/sys/dev/isa [netbsd-9]: wbsio.c wbsioreg.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1541):

share/man/man4/lm.4: revision 1.37
sys/dev/isa/wbsio.c: revision 1.28
sys/dev/ic/nslm7x.c: revision 1.78
sys/dev/isa/wbsioreg.h: revision 1.10

Add Nuvoton NCT6799D support.

Add NCT679[89] to the supported list.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.36.4.1 src/share/man/man4/lm.4
cvs rdiff -u -r1.73 -r1.73.2.1 src/sys/dev/ic/nslm7x.c
cvs rdiff -u -r1.25 -r1.25.2.1 src/sys/dev/isa/wbsio.c
cvs rdiff -u -r1.9 -r1.9.2.1 src/sys/dev/isa/wbsioreg.h

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/man4/lm.4
diff -u src/share/man/man4/lm.4:1.36 src/share/man/man4/lm.4:1.36.4.1
--- src/share/man/man4/lm.4:1.36	Thu Mar  8 07:39:28 2018
+++ src/share/man/man4/lm.4	Sat Oct 15 09:45:54 2022
@@ -1,4 +1,4 @@
-.\"	$NetBSD: lm.4,v 1.36 2018/03/08 07:39:28 wiz Exp $
+.\"	$NetBSD: lm.4,v 1.36.4.1 2022/10/15 09:45:54 martin Exp $
 .\"
 .\" Copyright (c) 2000 The NetBSD Foundation, Inc.
 .\" All rights reserved.
@@ -27,7 +27,7 @@
 .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 .\" POSSIBILITY OF SUCH DAMAGE.
 .\"
-.Dd March 8, 2018
+.Dd October 11, 2022
 .Dt LM 4
 .Os
 .Sh NAME
@@ -89,13 +89,9 @@ Nuvoton
 .Em NCT6102D ,
 .Em NCT6104D ,
 .Em NCT6106D ,
-.Em NCT6779D ,
-.Em NCT6791D ,
-.Em NCT6792D ,
-.Em NCT6793D ,
-.Em NCT6795D ,
+.Em NCT6779D
 and
-.Em NCT6796D .
+.Em NCT679[1235689]D .
 .It
 Winbond
 .Em W83627HF* ,

Index: src/sys/dev/ic/nslm7x.c
diff -u src/sys/dev/ic/nslm7x.c:1.73 src/sys/dev/ic/nslm7x.c:1.73.2.1
--- src/sys/dev/ic/nslm7x.c:1.73	Wed Jul 10 16:23:55 2019
+++ src/sys/dev/ic/nslm7x.c	Sat Oct 15 09:45:54 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: nslm7x.c,v 1.73 2019/07/10 16:23:55 msaitoh Exp $ */
+/*	$NetBSD: nslm7x.c,v 1.73.2.1 2022/10/15 09:45:54 martin Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.73 2019/07/10 16:23:55 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nslm7x.c,v 1.73.2.1 2022/10/15 09:45:54 martin Exp $");
 
 #include 
 #include 
@@ -2157,6 +2157,7 @@ static const struct wb_product wbsio_pro
 { WBSIO_ID_NCT6795D,"NCT6795D", nct6779d_sensors, NULL },
 { WBSIO_ID_NCT6796D,"NCT6796D", nct6779d_sensors, NULL },
 { WBSIO_ID_NCT6798D,"NCT6798D", nct6779d_sensors, NULL },
+{ WBSIO_ID_NCT6799D,"NCT6799D", nct6779d_sensors, NULL },
 { 0, NULL, NULL, NULL }
 };
 

Index: src/sys/dev/isa/wbsio.c
diff -u src/sys/dev/isa/wbsio.c:1.25 src/sys/dev/isa/wbsio.c:1.25.2.1
--- src/sys/dev/isa/wbsio.c:1.25	Wed Jul 10 16:23:55 2019
+++ src/sys/dev/isa/wbsio.c	Sat Oct 15 09:45:54 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: wbsio.c,v 1.25 2019/07/10 16:23:55 msaitoh Exp $	*/
+/*	$NetBSD: wbsio.c,v 1.25.2.1 2022/10/15 09:45:54 martin Exp $	*/
 /*	$OpenBSD: wbsio.c,v 1.10 2015/03/14 03:38:47 jsg Exp $	*/
 /*
  * Copyright (c) 2008 Mark Kettenis 
@@ -99,6 +99,7 @@ static const struct wbsio_product {
 	{ WBSIO_ID_NCT6795D,	12,	"NCT6795D" },
 	{ WBSIO_ID_NCT6796D,	13,	"NCT6796D" },
 	{ WBSIO_ID_NCT6798D,	13,	"NCT6798D" },
+	{ WBSIO_ID_NCT6799D,	13,	"NCT6799D" },
 };
 
 static const struct wbsio_product *wbsio_lookup(uint8_t id, uint8_t rev);

Index: src/sys/dev/isa/wbsioreg.h
diff -u src/sys/dev/isa/wbsioreg.h:1.9 src/sys/dev/isa/wbsioreg.h:1.9.2.1
--- src/sys/dev/isa/wbsioreg.h:1.9	Wed Jul 10 16:23:55 2019
+++ src/sys/dev/isa/wbsioreg.h	Sat Oct 15 09:45:54 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: wbsioreg.h,v 1.9 2019/07/10 16:23:55 msaitoh Exp $ */
+/* $NetBSD: wbsioreg.h,v 1.9.2.1 2022/10/15 09:45:54 martin Exp $ */
 
 /* $OpenBSD: wbsioreg.h,v 1.4 2015/01/02 23:02:54 chris Exp $ */
 /*
@@ -72,6 +72,7 @@
 #define WBSIO_ID_NCT6795D	0xd35
 #define WBSIO_ID_NCT6796D	0xd420	/* 13bits */
 #define WBSIO_ID_NCT6798D	0xd428
+#define WBSIO_ID_NCT6799D	0xd800
 
 /* Make the above WBSIO_ID_* vaue from WBSIO_ID, WBSIO_REV and IDbits */
 #define WBSIO_MAKEID(id, rev, bits)	\



CVS commit: [netbsd-9] src

2022-10-15 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sat Oct 15 09:45:54 UTC 2022

Modified Files:
src/share/man/man4 [netbsd-9]: lm.4
src/sys/dev/ic [netbsd-9]: nslm7x.c
src/sys/dev/isa [netbsd-9]: wbsio.c wbsioreg.h

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1541):

share/man/man4/lm.4: revision 1.37
sys/dev/isa/wbsio.c: revision 1.28
sys/dev/ic/nslm7x.c: revision 1.78
sys/dev/isa/wbsioreg.h: revision 1.10

Add Nuvoton NCT6799D support.

Add NCT679[89] to the supported list.


To generate a diff of this commit:
cvs rdiff -u -r1.36 -r1.36.4.1 src/share/man/man4/lm.4
cvs rdiff -u -r1.73 -r1.73.2.1 src/sys/dev/ic/nslm7x.c
cvs rdiff -u -r1.25 -r1.25.2.1 src/sys/dev/isa/wbsio.c
cvs rdiff -u -r1.9 -r1.9.2.1 src/sys/dev/isa/wbsioreg.h

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



CVS commit: [netbsd-9] src/doc

2022-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 11 18:26:37 UTC 2022

Modified Files:
src/doc [netbsd-9]: CHANGES-9.4

Log Message:
Tickets #1537 - #1540


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.23 -r1.1.2.24 src/doc/CHANGES-9.4

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

Modified files:

Index: src/doc/CHANGES-9.4
diff -u src/doc/CHANGES-9.4:1.1.2.23 src/doc/CHANGES-9.4:1.1.2.24
--- src/doc/CHANGES-9.4:1.1.2.23	Mon Oct 10 15:03:40 2022
+++ src/doc/CHANGES-9.4	Tue Oct 11 18:26:37 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.23 2022/10/10 15:03:40 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.24 2022/10/11 18:26:37 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -316,3 +316,38 @@ sys/arch/x86/x86/ioapic.c			1.66
 	- Print detail about misconfigured APIC ID.
 	[msaitoh, ticket #1536]
 
+sys/arch/x86/pci/imcsmb/imc.c			1.5
+sys/dev/pci/pcidevs1.1461-1.1468
+sys/dev/pci/pcidevs.h(regen)
+sys/dev/pci/pcidevs_data.h			(regen)
+
+	- Add several samsung nvme entries.
+	- Add more Alder Lake devices.
+	- Jasper Lake Intel Trace Hub on Compute Die is not 0x4da6 but 0x4e29.
+	- Add Intel Core 8G (8core, H, Halo) Host Bridge, DRAM.
+	- Add AMD 19h/6xh Root Complex. 
+	- Add AMD FCH SATA Controller D.
+	- Add NVIDIA GeForce GTX 770.
+	- Sort by number.
+	[msaitoh, ticket #1537]
+
+sys/arch/x86/include/cpu_ucode.h		1.5
+sys/arch/x86/x86/cpu_ucode_intel.c		1.19,1.20
+
+	- Verify checksum of the extended signature table.
+	- KNF.
+	[msaitoh, ticket #1538]
+
+share/man/man4/man4.x86/amdsmn.4		1.5
+sys/arch/x86/pci/amdsmn.c			1.14
+sys/arch/x86/pci/amdzentemp.c			1.12-1.15
+
+	amdsmn(4), amdzentemp(4): Add zen3 and zen4 support.
+	Add support for per CCD temperature sensor.
+	[msaitoh, ticket #1539]
+
+usr.bin/skey/skeyaudit.sh			1.5
+
+	Adapt to removal of "Mail".
+	[is, ticket #1540]
+



CVS commit: [netbsd-9] src/doc

2022-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 11 18:26:37 UTC 2022

Modified Files:
src/doc [netbsd-9]: CHANGES-9.4

Log Message:
Tickets #1537 - #1540


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.23 -r1.1.2.24 src/doc/CHANGES-9.4

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



CVS commit: [netbsd-9] src/usr.bin/skey

2022-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 11 18:25:26 UTC 2022

Modified Files:
src/usr.bin/skey [netbsd-9]: skeyaudit.sh

Log Message:
Pull up following revision(s) (requested by is in ticket #1540):

usr.bin/skey/skeyaudit.sh: revision 1.5

We removed Mail before branching netbsd-9


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.102.1 src/usr.bin/skey/skeyaudit.sh

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/skey/skeyaudit.sh
diff -u src/usr.bin/skey/skeyaudit.sh:1.4 src/usr.bin/skey/skeyaudit.sh:1.4.102.1
--- src/usr.bin/skey/skeyaudit.sh:1.4	Thu Jul 27 14:40:58 2000
+++ src/usr.bin/skey/skeyaudit.sh	Tue Oct 11 18:25:26 2022
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-#	$NetBSD: skeyaudit.sh,v 1.4 2000/07/27 14:40:58 mjl Exp $
+#	$NetBSD: skeyaudit.sh,v 1.4.102.1 2022/10/11 18:25:26 martin Exp $
 #
 # This script will look thru the skeykeys file for
 # people with sequence numbers less than LOWLIMIT=12
@@ -56,6 +56,6 @@ while [ "X$1" != "X" ]; do
 $ECHO " "
 $ECHO "Use \"skeyinit -s\" to reinitialize your sequence number."
 $ECHO ""
-) | /usr/bin/Mail -s "$SUBJECT"  $USER $ADMIN
+) | /usr/bin/mailx -s "$SUBJECT"  $USER $ADMIN
   fi
 done



CVS commit: [netbsd-9] src/usr.bin/skey

2022-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 11 18:25:26 UTC 2022

Modified Files:
src/usr.bin/skey [netbsd-9]: skeyaudit.sh

Log Message:
Pull up following revision(s) (requested by is in ticket #1540):

usr.bin/skey/skeyaudit.sh: revision 1.5

We removed Mail before branching netbsd-9


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.102.1 src/usr.bin/skey/skeyaudit.sh

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



CVS commit: [netbsd-8] src/doc

2022-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 11 18:24:18 UTC 2022

Modified Files:
src/doc [netbsd-8]: CHANGES-8.3

Log Message:
Tickets #1771 - #1773


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.154 -r1.1.2.155 src/doc/CHANGES-8.3

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

Modified files:

Index: src/doc/CHANGES-8.3
diff -u src/doc/CHANGES-8.3:1.1.2.154 src/doc/CHANGES-8.3:1.1.2.155
--- src/doc/CHANGES-8.3:1.1.2.154	Mon Oct 10 15:11:45 2022
+++ src/doc/CHANGES-8.3	Tue Oct 11 18:24:18 2022
@@ -1,4 +1,4 @@
- $NetBSD: CHANGES-8.3,v 1.1.2.154 2022/10/10 15:11:45 martin Exp $
+ $NetBSD: CHANGES-8.3,v 1.1.2.155 2022/10/11 18:24:18 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -2886,3 +2886,34 @@ sys/net/if_ethersubr.c1.254
 	Fix inverted logic dropping wrong sized packets in the VLAN path.
 	[msaitoh, ticket #1770]
 
+sys/dev/pci/pcidevs1.1461-1.1468 via patch
+sys/dev/pci/pcidevs.hregen
+sys/dev/pci/pcidevs_data.h			regen
+
+	- Add several samsung nvme entries.
+	- Add more Alder Lake devices.
+	- Jasper Lake Intel Trace Hub on Compute Die is not 0x4da6 but 0x4e29.
+	- Add Intel Core 8G (8core, H, Halo) Host Bridge, DRAM.
+	- Add AMD 19h/6xh Root Complex.
+	- Add AMD FCH SATA Controller D.
+	- Add NVIDIA GeForce GTX 770.
+	- Sort by number.
+	[msaitoh, ticket #1771]
+
+sys/arch/x86/include/cpu_ucode.h		1.5
+sys/arch/x86/x86/cpu_ucode_intel.c		1.19,1.20
+
+	- Verify checksum of the extended signature table.
+	- KNF.
+	[msaitoh, ticket #1772]
+
+share/man/man4/man4.x86/amdsmn.4		1.4,1.5
+share/man/man4/man4.x86/amdzentemp.4		1.7
+sys/arch/x86/pci/amdsmn.c			1.7-1.9,1.13,1.14
+sys/arch/x86/pci/amdzentemp.c			1.8-1.10,1.12-1.15
+
+	- Add some newer zen2, zen3 and zen4 support.
+	- Fix temperature bias values.
+	- Add support for per CCD temperature sensor.
+	[msaitoh, ticket #1773]
+



CVS commit: [netbsd-8] src/doc

2022-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 11 18:24:18 UTC 2022

Modified Files:
src/doc [netbsd-8]: CHANGES-8.3

Log Message:
Tickets #1771 - #1773


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.154 -r1.1.2.155 src/doc/CHANGES-8.3

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



CVS commit: [netbsd-8] src

2022-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 11 18:22:44 UTC 2022

Modified Files:
src/share/man/man4/man4.x86 [netbsd-8]: amdsmn.4 amdzentemp.4
src/sys/arch/x86/pci [netbsd-8]: amdsmn.c amdzentemp.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1773):

share/man/man4/man4.x86/amdsmn.41.4,1.5
share/man/man4/man4.x86/amdzentemp.41.7
sys/arch/x86/pci/amdsmn.c   1.7-1.9,1.13,1.14
sys/arch/x86/pci/amdzentemp.c   1.8-1.10,1.12-1.15

adjust for possible 49K offset

presence of this offset is indicated by a set 19th bit which is shifted away
this brings the temperature to "normal" levels on my ryzen 2700
(I assumed the same 49K offset as the k10temp project)

correct for known temperature bias values.

Update to support Family 15h Model 60 temperature sensors.

Changes based on FreeBSD amdtemp driver changes by Conrad Meyer.

XXX: Some code duplication between this driver and amdtemp as
 parts of the 15h refresh code share more in common with
 older CPUs while accessing the device more like 17h.

Don't mix sign and unsigned operands. Just use size_t for the loop.

Apply previous change ("Don't mix sign and unsigned operands. Just use
size_t for the loop.") to another loop variable.

amdzentemp(4): Add Zen 3 support.

amdzentemp(4): Add support for per CCD temperature sensor from FreeBSD.

Fix build failure on i386.

Rename for AMD F15/6X device. No functional change.
amdsmn(4),amdzentemp(4): Add support for 17h/6xh and 19h/6xh.

Note that these drivers are present on some newer AMD Family 15h
processors.

amdsmn.4: Now support AMD Family 19h processors.


To generate a diff of this commit:
cvs rdiff -u -r1.3.2.2 -r1.3.2.3 src/share/man/man4/man4.x86/amdsmn.4
cvs rdiff -u -r1.6.2.2 -r1.6.2.3 src/share/man/man4/man4.x86/amdzentemp.4
cvs rdiff -u -r1.3.2.4 -r1.3.2.5 src/sys/arch/x86/pci/amdsmn.c
cvs rdiff -u -r1.7.2.2 -r1.7.2.3 src/sys/arch/x86/pci/amdzentemp.c

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/man4/man4.x86/amdsmn.4
diff -u src/share/man/man4/man4.x86/amdsmn.4:1.3.2.2 src/share/man/man4/man4.x86/amdsmn.4:1.3.2.3
--- src/share/man/man4/man4.x86/amdsmn.4:1.3.2.2	Mon Feb  5 13:06:55 2018
+++ src/share/man/man4/man4.x86/amdsmn.4	Tue Oct 11 18:22:44 2022
@@ -1,4 +1,4 @@
-.\"	$NetBSD: amdsmn.4,v 1.3.2.2 2018/02/05 13:06:55 martin Exp $
+.\"	$NetBSD: amdsmn.4,v 1.3.2.3 2022/10/11 18:22:44 martin Exp $
 .\"
 .\" Copyright (c) 2018 Ian Clark 
 .\" All rights reserved.
@@ -54,7 +54,7 @@
 .\"
 .\" $FreeBSD: head/share/man/man4/amdsmn.4 323184 2017-09-05 15:13:41Z cem $
 .\"
-.Dd January 22, 2018
+.Dd October 2, 2022
 .Dt AMDSMN 4 x86
 .Os
 .Sh NAME
@@ -66,7 +66,8 @@
 The
 .Nm
 driver provides support for resources on the System Management Network bus
-in AMD Family 17h processors.
+in AMD Family 19h processors, 17h processors and some later
+AMD Family 15h processors.
 .Sh SEE ALSO
 .Xr amdzentemp 4
 .Sh HISTORY

Index: src/share/man/man4/man4.x86/amdzentemp.4
diff -u src/share/man/man4/man4.x86/amdzentemp.4:1.6.2.2 src/share/man/man4/man4.x86/amdzentemp.4:1.6.2.3
--- src/share/man/man4/man4.x86/amdzentemp.4:1.6.2.2	Mon Feb  5 13:06:55 2018
+++ src/share/man/man4/man4.x86/amdzentemp.4	Tue Oct 11 18:22:44 2022
@@ -1,4 +1,4 @@
-.\" $NetBSD: amdzentemp.4,v 1.6.2.2 2018/02/05 13:06:55 martin Exp $
+.\" $NetBSD: amdzentemp.4,v 1.6.2.3 2022/10/11 18:22:44 martin Exp $
 .\"-
 .\" Copyright (c) 2008 Christoph Egger
 .\" All rights reserved.
@@ -26,7 +26,7 @@
 .\"
 .\" $FreeBSD: src/share/man/man4/coretemp.4,v 1.4 2007/10/15 20:00:19 netchild Exp $
 .\"
-.Dd January 28, 2018
+.Dd April 20, 2020
 .Dt AMDZENTEMP 4 x86
 .Os
 .Sh NAME
@@ -38,7 +38,7 @@
 The
 .Nm
 driver provides support for the on-die digital thermal sensor present
-on AMD Ryzen CPUs
+on AMD Ryzen CPUs and some later AMD Opteron CPUs.
 .Pp
 These sensors provide 0.125\(deC accuracy.
 There is one sensor for each CPU socket.

Index: src/sys/arch/x86/pci/amdsmn.c
diff -u src/sys/arch/x86/pci/amdsmn.c:1.3.2.4 src/sys/arch/x86/pci/amdsmn.c:1.3.2.5
--- src/sys/arch/x86/pci/amdsmn.c:1.3.2.4	Tue Aug  6 16:05:11 2019
+++ src/sys/arch/x86/pci/amdsmn.c	Tue Oct 11 18:22:44 2022
@@ -1,7 +1,7 @@
-/*	$NetBSD: amdsmn.c,v 1.3.2.4 2019/08/06 16:05:11 martin Exp $	*/
+/*	$NetBSD: amdsmn.c,v 1.3.2.5 2022/10/11 18:22:44 martin Exp $	*/
 
 /*-
- * Copyright (c) 2017 Conrad Meyer 
+ * Copyright (c) 2017, 2019 Conrad Meyer 
  * All rights reserved.
  *
  * NetBSD port by Ian Clark 
@@ -29,10 +29,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.3.2.4 2019/08/06 16:05:11 martin Exp $ ");
+__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.3.2.5 2022/10/11 18:22:44 martin Exp $ ");
 
 /*
- * Driver for the AMD Family 17h CPU System Management Network.
+ * Driver for the AMD Family 15h (model 60+) and 17h 

CVS commit: [netbsd-8] src

2022-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 11 18:22:44 UTC 2022

Modified Files:
src/share/man/man4/man4.x86 [netbsd-8]: amdsmn.4 amdzentemp.4
src/sys/arch/x86/pci [netbsd-8]: amdsmn.c amdzentemp.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1773):

share/man/man4/man4.x86/amdsmn.41.4,1.5
share/man/man4/man4.x86/amdzentemp.41.7
sys/arch/x86/pci/amdsmn.c   1.7-1.9,1.13,1.14
sys/arch/x86/pci/amdzentemp.c   1.8-1.10,1.12-1.15

adjust for possible 49K offset

presence of this offset is indicated by a set 19th bit which is shifted away
this brings the temperature to "normal" levels on my ryzen 2700
(I assumed the same 49K offset as the k10temp project)

correct for known temperature bias values.

Update to support Family 15h Model 60 temperature sensors.

Changes based on FreeBSD amdtemp driver changes by Conrad Meyer.

XXX: Some code duplication between this driver and amdtemp as
 parts of the 15h refresh code share more in common with
 older CPUs while accessing the device more like 17h.

Don't mix sign and unsigned operands. Just use size_t for the loop.

Apply previous change ("Don't mix sign and unsigned operands. Just use
size_t for the loop.") to another loop variable.

amdzentemp(4): Add Zen 3 support.

amdzentemp(4): Add support for per CCD temperature sensor from FreeBSD.

Fix build failure on i386.

Rename for AMD F15/6X device. No functional change.
amdsmn(4),amdzentemp(4): Add support for 17h/6xh and 19h/6xh.

Note that these drivers are present on some newer AMD Family 15h
processors.

amdsmn.4: Now support AMD Family 19h processors.


To generate a diff of this commit:
cvs rdiff -u -r1.3.2.2 -r1.3.2.3 src/share/man/man4/man4.x86/amdsmn.4
cvs rdiff -u -r1.6.2.2 -r1.6.2.3 src/share/man/man4/man4.x86/amdzentemp.4
cvs rdiff -u -r1.3.2.4 -r1.3.2.5 src/sys/arch/x86/pci/amdsmn.c
cvs rdiff -u -r1.7.2.2 -r1.7.2.3 src/sys/arch/x86/pci/amdzentemp.c

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



CVS commit: [netbsd-9] src

2022-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 11 18:16:21 UTC 2022

Modified Files:
src/share/man/man4/man4.x86 [netbsd-9]: amdsmn.4
src/sys/arch/x86/pci [netbsd-9]: amdsmn.c amdzentemp.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1539):

share/man/man4/man4.x86/amdsmn.4: revision 1.5
sys/arch/x86/pci/amdsmn.c: revision 1.14
sys/arch/x86/pci/amdzentemp.c: revision 1.12-1.15

amdzentemp(4): Add Zen 3 support.

amdzentemp(4): Add support for per CCD temperature sensor from FreeBSD.

Fix build failure on i386.

amdsmn(4),amdzentemp(4): Add support for 17h/6xh and 19h/6xh.

amdsmn.4: Now support AMD Family 19h processors.


To generate a diff of this commit:
cvs rdiff -u -r1.3.8.1 -r1.3.8.2 src/share/man/man4/man4.x86/amdsmn.4
cvs rdiff -u -r1.5.2.2 -r1.5.2.3 src/sys/arch/x86/pci/amdsmn.c
cvs rdiff -u -r1.9.2.1 -r1.9.2.2 src/sys/arch/x86/pci/amdzentemp.c

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



CVS commit: [netbsd-9] src

2022-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 11 18:16:21 UTC 2022

Modified Files:
src/share/man/man4/man4.x86 [netbsd-9]: amdsmn.4
src/sys/arch/x86/pci [netbsd-9]: amdsmn.c amdzentemp.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1539):

share/man/man4/man4.x86/amdsmn.4: revision 1.5
sys/arch/x86/pci/amdsmn.c: revision 1.14
sys/arch/x86/pci/amdzentemp.c: revision 1.12-1.15

amdzentemp(4): Add Zen 3 support.

amdzentemp(4): Add support for per CCD temperature sensor from FreeBSD.

Fix build failure on i386.

amdsmn(4),amdzentemp(4): Add support for 17h/6xh and 19h/6xh.

amdsmn.4: Now support AMD Family 19h processors.


To generate a diff of this commit:
cvs rdiff -u -r1.3.8.1 -r1.3.8.2 src/share/man/man4/man4.x86/amdsmn.4
cvs rdiff -u -r1.5.2.2 -r1.5.2.3 src/sys/arch/x86/pci/amdsmn.c
cvs rdiff -u -r1.9.2.1 -r1.9.2.2 src/sys/arch/x86/pci/amdzentemp.c

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/man4/man4.x86/amdsmn.4
diff -u src/share/man/man4/man4.x86/amdsmn.4:1.3.8.1 src/share/man/man4/man4.x86/amdsmn.4:1.3.8.2
--- src/share/man/man4/man4.x86/amdsmn.4:1.3.8.1	Fri Apr 24 17:46:44 2020
+++ src/share/man/man4/man4.x86/amdsmn.4	Tue Oct 11 18:16:20 2022
@@ -1,4 +1,4 @@
-.\"	$NetBSD: amdsmn.4,v 1.3.8.1 2020/04/24 17:46:44 martin Exp $
+.\"	$NetBSD: amdsmn.4,v 1.3.8.2 2022/10/11 18:16:20 martin Exp $
 .\"
 .\" Copyright (c) 2018 Ian Clark 
 .\" All rights reserved.
@@ -54,7 +54,7 @@
 .\"
 .\" $FreeBSD: head/share/man/man4/amdsmn.4 323184 2017-09-05 15:13:41Z cem $
 .\"
-.Dd April 20, 2020
+.Dd October 2, 2022
 .Dt AMDSMN 4 x86
 .Os
 .Sh NAME
@@ -66,7 +66,8 @@
 The
 .Nm
 driver provides support for resources on the System Management Network bus
-in AMD Family 17h processors and some later AMD Family 15h processors.
+in AMD Family 19h processors, 17h processors and some later
+AMD Family 15h processors.
 .Sh SEE ALSO
 .Xr amdzentemp 4
 .Sh HISTORY

Index: src/sys/arch/x86/pci/amdsmn.c
diff -u src/sys/arch/x86/pci/amdsmn.c:1.5.2.2 src/sys/arch/x86/pci/amdsmn.c:1.5.2.3
--- src/sys/arch/x86/pci/amdsmn.c:1.5.2.2	Wed Jul 27 14:40:08 2022
+++ src/sys/arch/x86/pci/amdsmn.c	Tue Oct 11 18:16:20 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: amdsmn.c,v 1.5.2.2 2022/07/27 14:40:08 martin Exp $	*/
+/*	$NetBSD: amdsmn.c,v 1.5.2.3 2022/10/11 18:16:20 martin Exp $	*/
 
 /*-
  * Copyright (c) 2017, 2019 Conrad Meyer 
@@ -29,7 +29,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.5.2.2 2022/07/27 14:40:08 martin Exp $ ");
+__KERNEL_RCSID(0, "$NetBSD: amdsmn.c,v 1.5.2.3 2022/10/11 18:16:20 martin Exp $ ");
 
 /*
  * Driver for the AMD Family 15h (model 60+) and 17h CPU
@@ -88,10 +88,20 @@ static const struct pciid {
 		.amdsmn_data_reg = F17H_SMN_DATA_REG,
 	},
 	{
+		.amdsmn_deviceid = PCI_PRODUCT_AMD_F17_6X_RC,
+		.amdsmn_addr_reg = F17H_SMN_ADDR_REG,
+		.amdsmn_data_reg = F17H_SMN_DATA_REG,
+	},
+	{
 		.amdsmn_deviceid = PCI_PRODUCT_AMD_F17_7X_RC,
 		.amdsmn_addr_reg = F17H_SMN_ADDR_REG,
 		.amdsmn_data_reg = F17H_SMN_DATA_REG,
 	},
+	{
+		.amdsmn_deviceid = PCI_PRODUCT_AMD_F19_6X_RC,
+		.amdsmn_addr_reg = F17H_SMN_ADDR_REG,
+		.amdsmn_data_reg = F17H_SMN_DATA_REG,
+	},
 };
 
 static int amdsmn_match(device_t, cfdata_t, void *);

Index: src/sys/arch/x86/pci/amdzentemp.c
diff -u src/sys/arch/x86/pci/amdzentemp.c:1.9.2.1 src/sys/arch/x86/pci/amdzentemp.c:1.9.2.2
--- src/sys/arch/x86/pci/amdzentemp.c:1.9.2.1	Fri Apr 24 17:46:44 2020
+++ src/sys/arch/x86/pci/amdzentemp.c	Tue Oct 11 18:16:20 2022
@@ -1,4 +1,4 @@
-/*  $NetBSD: amdzentemp.c,v 1.9.2.1 2020/04/24 17:46:44 martin Exp $ */
+/*  $NetBSD: amdzentemp.c,v 1.9.2.2 2022/10/11 18:16:20 martin Exp $ */
 /*  $OpenBSD: kate.c,v 1.2 2008/03/27 04:52:03 cnst Exp $   */
 
 /*
@@ -53,7 +53,7 @@
 
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: amdzentemp.c,v 1.9.2.1 2020/04/24 17:46:44 martin Exp $ ");
+__KERNEL_RCSID(0, "$NetBSD: amdzentemp.c,v 1.9.2.2 2022/10/11 18:16:20 martin Exp $ ");
 
 #include 
 #include 
@@ -76,6 +76,7 @@ __KERNEL_RCSID(0, "$NetBSD: amdzentemp.c
 #define	AMD_CURTMP_RANGE_ADJUST	4900	/* in microKelvins (ie, 49C) */
 #define	AMD_CURTMP_RANGE_CHECK	__BIT(19)
 #define	F10_TEMP_CURTMP		__BITS(31,21)	/* XXX same as amdtemp.c */
+#define	F10_TEMP_CURTMP_MASK	0x7ff
 #define	F15M60_CURTMP_TJSEL	__BITS(17,16)
 
 /*
@@ -96,13 +97,40 @@ __KERNEL_RCSID(0, "$NetBSD: amdzentemp.c
  */
 #define	AMD_17H_CUR_TMP			0x59800
 
+/*
+ * The following register set was discovered experimentally by Ondrej Čerman
+ * and collaborators, but is not (yet) documented in a PPR/OSRR (other than
+ * the M70H PPR SMN memory map showing [0x59800, +0x314] as allocated to
+ * SMU::THM).  It seems plausible and the Linux sensor folks have adopted it.
+ */
+#define	AMD_17H_CCD_TMP_BASE		0x59954
+#define	AMD_17H_CCD_TMP_VALID		__BIT(11)
+
 struct amdzentemp_softc {
+	device_t sc_dev;
 	

CVS commit: [netbsd-8] src/sys/arch/x86

2022-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 11 18:07:11 UTC 2022

Modified Files:
src/sys/arch/x86/include [netbsd-8]: cpu_ucode.h
src/sys/arch/x86/x86 [netbsd-8]: cpu_ucode_intel.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1772):

sys/arch/x86/include/cpu_ucode.h: revision 1.5
sys/arch/x86/x86/cpu_ucode_intel.c: revision 1.19
sys/arch/x86/x86/cpu_ucode_intel.c: revision 1.20

Add missing newline in a message. KNF.
Verify checksum of the extended signature table.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.30.1 src/sys/arch/x86/include/cpu_ucode.h
cvs rdiff -u -r1.12.2.2 -r1.12.2.3 src/sys/arch/x86/x86/cpu_ucode_intel.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/x86/include/cpu_ucode.h
diff -u src/sys/arch/x86/include/cpu_ucode.h:1.3 src/sys/arch/x86/include/cpu_ucode.h:1.3.30.1
--- src/sys/arch/x86/include/cpu_ucode.h:1.3	Wed Oct 17 20:19:55 2012
+++ src/sys/arch/x86/include/cpu_ucode.h	Tue Oct 11 18:07:11 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_ucode.h,v 1.3 2012/10/17 20:19:55 drochner Exp $ */
+/* $NetBSD: cpu_ucode.h,v 1.3.30.1 2022/10/11 18:07:11 martin Exp $ */
 /*
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -72,17 +72,16 @@ struct intel1_ucode_header {
 	uint32_t	uh_reserved[3];
 };
 
-struct intel1_ucode_proc_signature {
-	uint32_t	ups_signature;
-	uint32_t	ups_proc_flags;
-	uint32_t	ups_checksum;
-};
-
 struct intel1_ucode_ext_table {
 	uint32_t	uet_count;
 	uint32_t	uet_checksum;
 	uint32_t	uet_reserved[3];
-	struct intel1_ucode_proc_signature uet_proc_sig[1];
+};
+
+struct intel1_ucode_proc_signature {
+	uint32_t	ups_signature;
+	uint32_t	ups_proc_flags;
+	uint32_t	ups_checksum;
 };
 
 #endif

Index: src/sys/arch/x86/x86/cpu_ucode_intel.c
diff -u src/sys/arch/x86/x86/cpu_ucode_intel.c:1.12.2.2 src/sys/arch/x86/x86/cpu_ucode_intel.c:1.12.2.3
--- src/sys/arch/x86/x86/cpu_ucode_intel.c:1.12.2.2	Sun May 12 09:22:52 2019
+++ src/sys/arch/x86/x86/cpu_ucode_intel.c	Tue Oct 11 18:07:11 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_ucode_intel.c,v 1.12.2.2 2019/05/12 09:22:52 martin Exp $ */
+/* $NetBSD: cpu_ucode_intel.c,v 1.12.2.3 2022/10/11 18:07:11 martin Exp $ */
 
 /*
  * Copyright (c) 2012, 2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu_ucode_intel.c,v 1.12.2.2 2019/05/12 09:22:52 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_ucode_intel.c,v 1.12.2.3 2022/10/11 18:07:11 martin Exp $");
 
 #include "opt_xen.h"
 #include "opt_cpu_ucode.h"
@@ -109,63 +109,65 @@ static int
 cpu_ucode_intel_verify(struct cpu_ucode_softc *sc,
 struct intel1_ucode_header *buf)
 {
+	struct intel1_ucode_ext_table *ehdr;
 	uint32_t data_size, total_size, payload_size, ext_size;
 	uint32_t sum;
+	uint32_t *p;
 	int i;
 
 	if ((buf->uh_header_ver != 1) || (buf->uh_loader_rev != 1))
 		return EINVAL;
 
-	/*
-	 * Data size.
-	 */
-	if (buf->uh_data_size == 0) {
+	/* Data size. */
+	if (buf->uh_data_size == 0)
 		data_size = 2000;
-	} else {
+	else
 		data_size = buf->uh_data_size;
-	}
 	if ((data_size % 4) != 0)
 		return EINVAL;
 	if (data_size > sc->sc_blobsize)
 		return EINVAL;
 
-	/*
-	 * Total size.
-	 */
-	if (buf->uh_total_size == 0) {
+	/* Total size. */
+	if (buf->uh_total_size == 0)
 		total_size = data_size + 48;
-	} else {
+	else
 		total_size = buf->uh_total_size;
-	}
 	if ((total_size % 1024) != 0)
 		return EINVAL;
 	if (total_size > sc->sc_blobsize)
 		return EINVAL;
 
-	/*
-	 * Payload size.
-	 */
+	/* Payload size. */
 	payload_size = data_size + 48;
 	if (payload_size > sc->sc_blobsize)
 		return EINVAL;
 
-	/*
-	 * Verify checksum of update data and header. Exclude extended
-	 * signature.
-	 */
+	/* Verify checksum of update data and header(s). */
 	sum = 0;
-	for (i = 0; i < (payload_size / sizeof(uint32_t)); i++) {
-		sum += *((uint32_t *)buf + i);
-	}
+	p = (uint32_t *)buf;
+	for (i = 0; i < (payload_size / sizeof(uint32_t)); i++)
+		sum += p[i];
 	if (sum != 0)
 		return EINVAL;
 
-	/*
-	 * Extended table size. Ignored for now.
-	 */
 	ext_size = total_size - payload_size;
 	if (ext_size > 0) {
-		printf("This image has extended signature table.");
+		/* This image has extended signature table. */
+		ehdr = (struct intel1_ucode_ext_table *)
+		((uint8_t *)buf + sizeof(struct intel1_ucode_header) +
+			data_size);
+		payload_size =
+		sizeof(struct intel1_ucode_ext_table) +
+		sizeof(struct intel1_ucode_proc_signature) *
+		ehdr->uet_count;
+		
+		sum = 0;
+		p = (uint32_t *)ehdr;
+		for (i = 0; i < (payload_size / sizeof(uint32_t)); i++)
+			sum += p[i];
+		if (sum != 0)
+			return EINVAL;
 	}
 
 	return 0;
@@ -196,7 +198,8 @@ cpu_ucode_intel_apply(struct cpu_ucode_s
 		/* Make the buffer 16 byte aligned. */
 		newbufsize = sc->sc_blobsize + 15;
 		uha = kmem_alloc(newbufsize, 

CVS commit: [netbsd-8] src/sys/arch/x86

2022-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 11 18:07:11 UTC 2022

Modified Files:
src/sys/arch/x86/include [netbsd-8]: cpu_ucode.h
src/sys/arch/x86/x86 [netbsd-8]: cpu_ucode_intel.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1772):

sys/arch/x86/include/cpu_ucode.h: revision 1.5
sys/arch/x86/x86/cpu_ucode_intel.c: revision 1.19
sys/arch/x86/x86/cpu_ucode_intel.c: revision 1.20

Add missing newline in a message. KNF.
Verify checksum of the extended signature table.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r1.3.30.1 src/sys/arch/x86/include/cpu_ucode.h
cvs rdiff -u -r1.12.2.2 -r1.12.2.3 src/sys/arch/x86/x86/cpu_ucode_intel.c

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



CVS commit: [netbsd-9] src/sys/arch/x86

2022-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 11 18:05:44 UTC 2022

Modified Files:
src/sys/arch/x86/include [netbsd-9]: cpu_ucode.h
src/sys/arch/x86/x86 [netbsd-9]: cpu_ucode_intel.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1538):
sys/arch/x86/include/cpu_ucode.h: revision 1.5
sys/arch/x86/x86/cpu_ucode_intel.c: revision 1.19
sys/arch/x86/x86/cpu_ucode_intel.c: revision 1.20
Add missing newline in a message. KNF.
Verify checksum of the extended signature table.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.6.1 src/sys/arch/x86/include/cpu_ucode.h
cvs rdiff -u -r1.17 -r1.17.2.1 src/sys/arch/x86/x86/cpu_ucode_intel.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/x86/include/cpu_ucode.h
diff -u src/sys/arch/x86/include/cpu_ucode.h:1.4 src/sys/arch/x86/include/cpu_ucode.h:1.4.6.1
--- src/sys/arch/x86/include/cpu_ucode.h:1.4	Sat Mar 17 15:56:32 2018
+++ src/sys/arch/x86/include/cpu_ucode.h	Tue Oct 11 18:05:44 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_ucode.h,v 1.4 2018/03/17 15:56:32 christos Exp $ */
+/* $NetBSD: cpu_ucode.h,v 1.4.6.1 2022/10/11 18:05:44 martin Exp $ */
 /*
  * Copyright (c) 2012 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -69,17 +69,16 @@ struct intel1_ucode_header {
 	uint32_t	uh_reserved[3];
 };
 
-struct intel1_ucode_proc_signature {
-	uint32_t	ups_signature;
-	uint32_t	ups_proc_flags;
-	uint32_t	ups_checksum;
-};
-
 struct intel1_ucode_ext_table {
 	uint32_t	uet_count;
 	uint32_t	uet_checksum;
 	uint32_t	uet_reserved[3];
-	struct intel1_ucode_proc_signature uet_proc_sig[1];
+};
+
+struct intel1_ucode_proc_signature {
+	uint32_t	ups_signature;
+	uint32_t	ups_proc_flags;
+	uint32_t	ups_checksum;
 };
 
 #endif

Index: src/sys/arch/x86/x86/cpu_ucode_intel.c
diff -u src/sys/arch/x86/x86/cpu_ucode_intel.c:1.17 src/sys/arch/x86/x86/cpu_ucode_intel.c:1.17.2.1
--- src/sys/arch/x86/x86/cpu_ucode_intel.c:1.17	Fri May 10 18:21:01 2019
+++ src/sys/arch/x86/x86/cpu_ucode_intel.c	Tue Oct 11 18:05:44 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: cpu_ucode_intel.c,v 1.17 2019/05/10 18:21:01 maxv Exp $ */
+/* $NetBSD: cpu_ucode_intel.c,v 1.17.2.1 2022/10/11 18:05:44 martin Exp $ */
 
 /*
  * Copyright (c) 2012, 2019 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: cpu_ucode_intel.c,v 1.17 2019/05/10 18:21:01 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cpu_ucode_intel.c,v 1.17.2.1 2022/10/11 18:05:44 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_xen.h"
@@ -111,63 +111,65 @@ static int
 cpu_ucode_intel_verify(struct cpu_ucode_softc *sc,
 struct intel1_ucode_header *buf)
 {
+	struct intel1_ucode_ext_table *ehdr;
 	uint32_t data_size, total_size, payload_size, ext_size;
 	uint32_t sum;
+	uint32_t *p;
 	int i;
 
 	if ((buf->uh_header_ver != 1) || (buf->uh_loader_rev != 1))
 		return EINVAL;
 
-	/*
-	 * Data size.
-	 */
-	if (buf->uh_data_size == 0) {
+	/* Data size. */
+	if (buf->uh_data_size == 0)
 		data_size = 2000;
-	} else {
+	else
 		data_size = buf->uh_data_size;
-	}
 	if ((data_size % 4) != 0)
 		return EINVAL;
 	if (data_size > sc->sc_blobsize)
 		return EINVAL;
 
-	/*
-	 * Total size.
-	 */
-	if (buf->uh_total_size == 0) {
+	/* Total size. */
+	if (buf->uh_total_size == 0)
 		total_size = data_size + 48;
-	} else {
+	else
 		total_size = buf->uh_total_size;
-	}
 	if ((total_size % 1024) != 0)
 		return EINVAL;
 	if (total_size > sc->sc_blobsize)
 		return EINVAL;
 
-	/*
-	 * Payload size.
-	 */
+	/* Payload size. */
 	payload_size = data_size + 48;
 	if (payload_size > sc->sc_blobsize)
 		return EINVAL;
 
-	/*
-	 * Verify checksum of update data and header. Exclude extended
-	 * signature.
-	 */
+	/* Verify checksum of update data and header(s). */
 	sum = 0;
-	for (i = 0; i < (payload_size / sizeof(uint32_t)); i++) {
-		sum += *((uint32_t *)buf + i);
-	}
+	p = (uint32_t *)buf;
+	for (i = 0; i < (payload_size / sizeof(uint32_t)); i++)
+		sum += p[i];
 	if (sum != 0)
 		return EINVAL;
 
-	/*
-	 * Extended table size. Ignored for now.
-	 */
 	ext_size = total_size - payload_size;
 	if (ext_size > 0) {
-		printf("This image has extended signature table.");
+		/* This image has extended signature table. */
+		ehdr = (struct intel1_ucode_ext_table *)
+		((uint8_t *)buf + sizeof(struct intel1_ucode_header) +
+			data_size);
+		payload_size =
+		sizeof(struct intel1_ucode_ext_table) +
+		sizeof(struct intel1_ucode_proc_signature) *
+		ehdr->uet_count;
+		
+		sum = 0;
+		p = (uint32_t *)ehdr;
+		for (i = 0; i < (payload_size / sizeof(uint32_t)); i++)
+			sum += p[i];
+		if (sum != 0)
+			return EINVAL;
 	}
 
 	return 0;
@@ -198,7 +200,8 @@ cpu_ucode_intel_apply(struct cpu_ucode_s
 		/* Make the buffer 16 byte aligned. */
 		newbufsize = sc->sc_blobsize + 15;
 		uha = kmem_alloc(newbufsize, KM_SLEEP);
-		uh = (struct 

CVS commit: [netbsd-9] src/sys/arch/x86

2022-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 11 18:05:44 UTC 2022

Modified Files:
src/sys/arch/x86/include [netbsd-9]: cpu_ucode.h
src/sys/arch/x86/x86 [netbsd-9]: cpu_ucode_intel.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1538):
sys/arch/x86/include/cpu_ucode.h: revision 1.5
sys/arch/x86/x86/cpu_ucode_intel.c: revision 1.19
sys/arch/x86/x86/cpu_ucode_intel.c: revision 1.20
Add missing newline in a message. KNF.
Verify checksum of the extended signature table.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.4.6.1 src/sys/arch/x86/include/cpu_ucode.h
cvs rdiff -u -r1.17 -r1.17.2.1 src/sys/arch/x86/x86/cpu_ucode_intel.c

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



CVS commit: [netbsd-8] src/sys/dev/pci

2022-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 11 17:59:12 UTC 2022

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs.h pcidevs_data.h

Log Message:
regen (Ticket #1771)


To generate a diff of this commit:
cvs rdiff -u -r1.1281.2.22 -r1.1281.2.23 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1280.2.22 -r1.1280.2.23 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: [netbsd-8] src/sys/dev/pci

2022-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 11 17:59:12 UTC 2022

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs.h pcidevs_data.h

Log Message:
regen (Ticket #1771)


To generate a diff of this commit:
cvs rdiff -u -r1.1281.2.22 -r1.1281.2.23 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1280.2.22 -r1.1280.2.23 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: [netbsd-8] src/sys/dev/pci

2022-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 11 17:57:17 UTC 2022

Modified Files:
src/sys/dev/pci [netbsd-8]: pcidevs

Log Message:
Pull up the following revisions, requested by msaitoh in ticket #1771:

sys/dev/pci/pcidevs 1.1461-1.1468 via patch

- Add several samsung nvme entries.
- Add more Alder Lake devices.
- Jasper Lake Intel Trace Hub on Compute Die is not 0x4da6 but 0x4e29.
- Add Intel Core 8G (8core, H, Halo) Host Bridge, DRAM.
- Add AMD 19h/6xh Root Complex.
- Add AMD FCH SATA Controller D.
- Add NVIDIA GeForce GTX 770.
- Sort by number.


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

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



CVS commit: [netbsd-9] src/sys/dev/pci

2022-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 11 17:51:46 UTC 2022

Modified Files:
src/sys/dev/pci [netbsd-9]: pcidevs.h pcidevs_data.h

Log Message:
regen (Ticket #1537)


To generate a diff of this commit:
cvs rdiff -u -r1.1371.2.12 -r1.1371.2.13 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1370.2.12 -r1.1370.2.13 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: [netbsd-9] src/sys/dev/pci

2022-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 11 17:51:46 UTC 2022

Modified Files:
src/sys/dev/pci [netbsd-9]: pcidevs.h pcidevs_data.h

Log Message:
regen (Ticket #1537)


To generate a diff of this commit:
cvs rdiff -u -r1.1371.2.12 -r1.1371.2.13 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1370.2.12 -r1.1370.2.13 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: [netbsd-9] src/sys

2022-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 11 17:49:35 UTC 2022

Modified Files:
src/sys/arch/x86/pci/imcsmb [netbsd-9]: imc.c
src/sys/dev/pci [netbsd-9]: pcidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1537):

sys/arch/x86/pci/imcsmb/imc.c: revision 1.5
sys/dev/pci/pcidevs: revision 1.1461-1.1468

add several samsung nvme entries

Add more Alder Lake devices.

Jasper Lake Intel Trace Hub on Compute Die is not 0x4da6 but 0x4e29.

Add Intel Core 8G (8core, H, Halo) Host Bridge, DRAM.

Sort by number. No functional change.

Add AMD 19h/6xh Root Complex.

Add AMD FCH SATA Controller D

add NVIDIA GeForce GTX 770

Fix compile error.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.6.1 src/sys/arch/x86/pci/imcsmb/imc.c
cvs rdiff -u -r1.1383.2.12 -r1.1383.2.13 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/arch/x86/pci/imcsmb/imc.c
diff -u src/sys/arch/x86/pci/imcsmb/imc.c:1.2 src/sys/arch/x86/pci/imcsmb/imc.c:1.2.6.1
--- src/sys/arch/x86/pci/imcsmb/imc.c:1.2	Thu Mar 15 23:57:17 2018
+++ src/sys/arch/x86/pci/imcsmb/imc.c	Tue Oct 11 17:49:35 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: imc.c,v 1.2 2018/03/15 23:57:17 maya Exp $ */
+/* $NetBSD: imc.c,v 1.2.6.1 2022/10/11 17:49:35 martin Exp $ */
 
 /*-
  * Copyright (c) 2018 The NetBSD Foundation, Inc.
@@ -65,7 +65,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: imc.c,v 1.2 2018/03/15 23:57:17 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: imc.c,v 1.2.6.1 2022/10/11 17:49:35 martin Exp $");
 
 #include 
 #include 
@@ -137,12 +137,12 @@ __KERNEL_RCSID(0, "$NetBSD: imc.c,v 1.2 
 
 #define IMCSMB_PCI_DEV_ID_IMC0_SBX	0x3ca8
 #define IMCSMB_PCI_DEV_ID_IMC0_IBX	0x0ea8
-#define IMCSMB_PCI_DEV_ID_IMC0_HSX	PCI_PRODUCT_INTEL_XE5_V3_IMC0_MAIN
+#define IMCSMB_PCI_DEV_ID_IMC0_HSX	PCI_PRODUCT_INTEL_XE5_V3_IMC0_TATRR
 #define IMCSMB_PCI_DEV_ID_IMC0_BDX	PCI_PRODUCT_INTEL_XEOND_MEM_0_TTR_1
 
 /* (Sandy,Ivy)bridge-Xeon only have a single memory controller per socket */
 
-#define IMCSMB_PCI_DEV_ID_IMC1_HSX	PCI_PRODUCT_INTEL_XE5_V3_IMC1_MAIN
+#define IMCSMB_PCI_DEV_ID_IMC1_HSX	PCI_PRODUCT_INTEL_XE5_V3_IMC1_TATRR
 #define IMCSMB_PCI_DEV_ID_IMC1_BDX	PCI_PRODUCT_INTEL_COREI76K_IMC_0
 
 /* There are two SMBus controllers in each device. These define the registers
@@ -299,8 +299,8 @@ imc_probe(device_t dev, cfdata_t cf, voi
 		switch(PCI_PRODUCT(pa->pa_id)) {
 		case  PCI_PRODUCT_INTEL_COREI76K_IMC_0:
 		case  PCI_PRODUCT_INTEL_XEOND_MEM_0_TTR_1:
-		case  PCI_PRODUCT_INTEL_XE5_V3_IMC0_MAIN:
-		case  PCI_PRODUCT_INTEL_XE5_V3_IMC1_MAIN:
+		case  PCI_PRODUCT_INTEL_XE5_V3_IMC0_TATRR:
+		case  PCI_PRODUCT_INTEL_XE5_V3_IMC1_TATRR:
 		case  PCI_PRODUCT_INTEL_E5_IMC_TA:
 		case  PCI_PRODUCT_INTEL_E5V2_IMC_TA:
 			return 1;

Index: src/sys/dev/pci/pcidevs
diff -u src/sys/dev/pci/pcidevs:1.1383.2.12 src/sys/dev/pci/pcidevs:1.1383.2.13
--- src/sys/dev/pci/pcidevs:1.1383.2.12	Wed Jul 27 14:40:07 2022
+++ src/sys/dev/pci/pcidevs	Tue Oct 11 17:49:35 2022
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1383.2.12 2022/07/27 14:40:07 martin Exp $
+$NetBSD: pcidevs,v 1.1383.2.13 2022/10/11 17:49:35 martin Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -961,8 +961,8 @@ product ALTIMA AC9100	0x03ea	AC9100 Giga
 product ALTIMA AC1003	0x03eb	AC1003 Gigabit Ethernet
 
 /* Amazon.com, Inc. products */
-product AMAZON UART	0x8250	16650-compatible UART
 product AMAZON NVME	0x8061	NVMe SSD
+product AMAZON UART	0x8250	16650-compatible UART
 product AMAZON ENA	0xec20	Elastic Network Adapter
 
 /* AMD products */
@@ -1053,6 +1053,7 @@ product AMD F17_7X_RESV_SPP	0x1485	Famil
 product AMD F17_7X_CCP		0x1486	Family17h/7xh Crypto
 product AMD F17_3X_HDA		0x1487	17h/7xh HD Audio
 product AMD F17_7X_USB3		0x149c	Family17h/7xh USB 3.0 Host Controller
+product AMD F19_6X_RC		0x14d8	19h/6xh Root Complex
 product AMD F14_RC		0x1510	Family14h Root Complex
 product AMD F14_PCIE_1		0x1512	Family14h PCIe
 product AMD F14_PCIE_2		0x1513	Family14h PCIe
@@ -1182,6 +1183,7 @@ product AMD HUDSON_PCIE_2	0x43a2	Hudson 
 product AMD HUDSON_PCIE_3	0x43a3	Hudson PCIe Root Port 3
 product AMD 300SERIES_PCIE	0x43b4	300 Series PCIe
 product AMD 300SERIES_SATA	0x43b7	300 Series SATA
+product AMD FCH_SATA_D		0x43b8	FCH SATA Controller D
 product AMD 300SERIES_XHCI	0x43bb	300 Series xHCI
 product AMD 400SERIES_PCIE_1	0x43c6	400 Series PCIe
 product AMD 400SERIES_PCIE_2	0x43c7	400 Series PCIe
@@ -2455,8 +2457,8 @@ product BROADCOM BCM5714	0x1668	BCM5714 
 product BROADCOM BCM5714S	0x1669	BCM5714S 1000baseSX Ethernet
 product BROADCOM BCM5780	0x166a	BCM5780 NetXtreme 1000baseT Ethernet
 product BROADCOM BCM5780S	0x166b	BCM5780S NetXtreme 1000baseSX Ethernet
-product BROADCOM BCM57712_VF	0x166f	BCM57712 NetXtreme II 10Gb Ethernet VF
 product BROADCOM BCM5705F	0x166e	BCM5705F 10/100 Ethernet
+product BROADCOM BCM57712_VF	

CVS commit: [netbsd-9] src/sys

2022-10-11 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Tue Oct 11 17:49:35 UTC 2022

Modified Files:
src/sys/arch/x86/pci/imcsmb [netbsd-9]: imc.c
src/sys/dev/pci [netbsd-9]: pcidevs

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1537):

sys/arch/x86/pci/imcsmb/imc.c: revision 1.5
sys/dev/pci/pcidevs: revision 1.1461-1.1468

add several samsung nvme entries

Add more Alder Lake devices.

Jasper Lake Intel Trace Hub on Compute Die is not 0x4da6 but 0x4e29.

Add Intel Core 8G (8core, H, Halo) Host Bridge, DRAM.

Sort by number. No functional change.

Add AMD 19h/6xh Root Complex.

Add AMD FCH SATA Controller D

add NVIDIA GeForce GTX 770

Fix compile error.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.2.6.1 src/sys/arch/x86/pci/imcsmb/imc.c
cvs rdiff -u -r1.1383.2.12 -r1.1383.2.13 src/sys/dev/pci/pcidevs

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



CVS commit: src/sys/dev/usb

2022-10-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 10 18:30:28 UTC 2022

Modified Files:
src/sys/dev/usb: if_mos.c

Log Message:
ETHERCAP_VLAN_MTU does not go into ifp->if_capabilities but ethercom
ec_capabilities instead.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/usb/if_mos.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/usb/if_mos.c
diff -u src/sys/dev/usb/if_mos.c:1.23 src/sys/dev/usb/if_mos.c:1.24
--- src/sys/dev/usb/if_mos.c:1.23	Sat Aug 20 14:08:59 2022
+++ src/sys/dev/usb/if_mos.c	Mon Oct 10 18:30:28 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_mos.c,v 1.23 2022/08/20 14:08:59 riastradh Exp $	*/
+/*	$NetBSD: if_mos.c,v 1.24 2022/10/10 18:30:28 martin Exp $	*/
 /*	$OpenBSD: if_mos.c,v 1.40 2019/07/07 06:40:10 kevlo Exp $	*/
 
 /*
@@ -72,7 +72,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_mos.c,v 1.23 2022/08/20 14:08:59 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_mos.c,v 1.24 2022/10/10 18:30:28 martin Exp $");
 
 #include 
 
@@ -652,8 +652,8 @@ mos_attach(device_t parent, device_t sel
 		return;
 	}
 
-	struct ifnet *ifp = usbnet_ifp(un);
-	ifp->if_capabilities = ETHERCAP_VLAN_MTU;
+	struct ethercom *ec = usbnet_ec(un);
+	ec->ec_capabilities = ETHERCAP_VLAN_MTU;
 
 	usbnet_attach_ifp(un, IFF_SIMPLEX | IFF_BROADCAST | IFF_MULTICAST,
 	0, );



CVS commit: src/sys/dev/usb

2022-10-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 10 18:30:28 UTC 2022

Modified Files:
src/sys/dev/usb: if_mos.c

Log Message:
ETHERCAP_VLAN_MTU does not go into ifp->if_capabilities but ethercom
ec_capabilities instead.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/dev/usb/if_mos.c

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



CVS commit: [netbsd-8] src/sys/net

2022-10-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 10 16:09:13 UTC 2022

Modified Files:
src/sys/net [netbsd-8]: if_ethersubr.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1770):

sys/net/if_ethersubr.c: revision 1.254

Fix a bug in the VLAN path: there's an inverted logic, the mbuf needs to
be bigger than struct ether_vlan_header, not smaller.

Meanwhile add a KASSERT in the LLC path.


To generate a diff of this commit:
cvs rdiff -u -r1.242.6.9 -r1.242.6.10 src/sys/net/if_ethersubr.c

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



CVS commit: [netbsd-8] src/sys/net

2022-10-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 10 16:09:13 UTC 2022

Modified Files:
src/sys/net [netbsd-8]: if_ethersubr.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1770):

sys/net/if_ethersubr.c: revision 1.254

Fix a bug in the VLAN path: there's an inverted logic, the mbuf needs to
be bigger than struct ether_vlan_header, not smaller.

Meanwhile add a KASSERT in the LLC path.


To generate a diff of this commit:
cvs rdiff -u -r1.242.6.9 -r1.242.6.10 src/sys/net/if_ethersubr.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/net/if_ethersubr.c
diff -u src/sys/net/if_ethersubr.c:1.242.6.9 src/sys/net/if_ethersubr.c:1.242.6.10
--- src/sys/net/if_ethersubr.c:1.242.6.9	Wed Oct 27 18:52:51 2021
+++ src/sys/net/if_ethersubr.c	Mon Oct 10 16:09:12 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_ethersubr.c,v 1.242.6.9 2021/10/27 18:52:51 martin Exp $	*/
+/*	$NetBSD: if_ethersubr.c,v 1.242.6.10 2022/10/10 16:09:12 martin Exp $	*/
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -61,7 +61,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.242.6.9 2021/10/27 18:52:51 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_ethersubr.c,v 1.242.6.10 2022/10/10 16:09:12 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -706,7 +706,7 @@ ether_input(struct ifnet *ifp, struct mb
 		 * just being used to store the priority.  Extract the ether
 		 * type, and if IP or IPV6, let them deal with it.
 		 */
-		if (m->m_len <= sizeof(*evl)
+		if (m->m_len >= sizeof(*evl)
 		&& EVL_VLANOFTAG((ntohs(evl->evl_tag))) == 0) {
 			etype = ntohs(evl->evl_proto);
 			ehlen = sizeof(*evl);
@@ -841,11 +841,13 @@ ether_input(struct ifnet *ifp, struct mb
 			return;
 		}
 	} else {
+		KASSERT(ehlen == sizeof(*eh));
 #if defined (LLC) || defined (NETATALK)
-		if (m->m_len < ehlen + sizeof(struct llc)) {
+		if (m->m_len < sizeof(*eh) + sizeof(struct llc)) {
 			goto dropanyway;
 		}
 		l = (struct llc *)(eh+1);
+
 		switch (l->llc_dsap) {
 #ifdef NETATALK
 		case LLC_SNAP_LSAP:
@@ -871,10 +873,10 @@ ether_input(struct ifnet *ifp, struct mb
 sizeof(aarp_org_code)) == 0 &&
 ntohs(l->llc_snap_ether_type) ==
 ETHERTYPE_AARP) {
-	m_adj( m, sizeof(struct ether_header)
+	m_adj(m, sizeof(struct ether_header)
 	+ sizeof(struct llc));
 	aarpinput(ifp, m); /* XXX */
-return;
+	return;
 }
 
 			default:



CVS commit: [netbsd-8] src/doc

2022-10-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 10 15:11:45 UTC 2022

Modified Files:
src/doc [netbsd-8]: CHANGES-8.3

Log Message:
Tickets #1769 and #1770


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.153 -r1.1.2.154 src/doc/CHANGES-8.3

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

Modified files:

Index: src/doc/CHANGES-8.3
diff -u src/doc/CHANGES-8.3:1.1.2.153 src/doc/CHANGES-8.3:1.1.2.154
--- src/doc/CHANGES-8.3:1.1.2.153	Thu Sep 29 14:43:06 2022
+++ src/doc/CHANGES-8.3	Mon Oct 10 15:11:45 2022
@@ -1,4 +1,4 @@
- $NetBSD: CHANGES-8.3,v 1.1.2.153 2022/09/29 14:43:06 snj Exp $
+ $NetBSD: CHANGES-8.3,v 1.1.2.154 2022/10/10 15:11:45 martin Exp $
 
 A complete list of changes from the NetBSD 8.2 release to the NetBSD 8.3
 release:
@@ -2873,3 +2873,16 @@ sys/dev/pci/mfii.c1.28
 	the driver use MSI/MSI-x when available.
 	[bouyer, ticket #1768]
 
+sys/arch/x86/include/i82093reg.h		1.7
+sys/arch/x86/x86/ioapic.c			1.66
+
+	- Fix a bug that an IOAPIC ID is tried to remap with a wrong ID.
+	  The bit width is 8 bits these days. Fixes PR kern/54276.
+	- Print detail about misconfigured APIC ID.
+	[msaitoh, ticket #1769]
+
+sys/net/if_ethersubr.c1.254
+
+	Fix inverted logic dropping wrong sized packets in the VLAN path.
+	[msaitoh, ticket #1770]
+



CVS commit: [netbsd-8] src/doc

2022-10-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 10 15:11:45 UTC 2022

Modified Files:
src/doc [netbsd-8]: CHANGES-8.3

Log Message:
Tickets #1769 and #1770


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.153 -r1.1.2.154 src/doc/CHANGES-8.3

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



CVS commit: [netbsd-8] src/sys/arch/x86

2022-10-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 10 15:04:31 UTC 2022

Modified Files:
src/sys/arch/x86/include [netbsd-8]: i82093reg.h
src/sys/arch/x86/x86 [netbsd-8]: ioapic.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1769):

sys/arch/x86/x86/ioapic.c: revision 1.66
sys/arch/x86/include/i82093reg.h: revision 1.7

Print detail about misconfigured APIC ID.

IOAPIC_ID_MASK is 8 bits these days. Fixes PR kern/54276.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.4.1 src/sys/arch/x86/include/i82093reg.h
cvs rdiff -u -r1.52.10.1 -r1.52.10.2 src/sys/arch/x86/x86/ioapic.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/x86/include/i82093reg.h
diff -u src/sys/arch/x86/include/i82093reg.h:1.5 src/sys/arch/x86/include/i82093reg.h:1.5.4.1
--- src/sys/arch/x86/include/i82093reg.h:1.5	Sat Apr 22 04:25:09 2017
+++ src/sys/arch/x86/include/i82093reg.h	Mon Oct 10 15:04:31 2022
@@ -1,4 +1,4 @@
-/* 	$NetBSD: i82093reg.h,v 1.5 2017/04/22 04:25:09 nonaka Exp $ */
+/* 	$NetBSD: i82093reg.h,v 1.5.4.1 2022/10/10 15:04:31 martin Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
 #define IOAPIC_ID		0x00
 
 #define 	IOAPIC_ID_SHIFT		24
-#define		IOAPIC_ID_MASK		0x0f00
+#define		IOAPIC_ID_MASK		0xff00
 
 /* Version, and maximum interrupt pin number. */
   

Index: src/sys/arch/x86/x86/ioapic.c
diff -u src/sys/arch/x86/x86/ioapic.c:1.52.10.1 src/sys/arch/x86/x86/ioapic.c:1.52.10.2
--- src/sys/arch/x86/x86/ioapic.c:1.52.10.1	Tue Nov 21 11:01:02 2017
+++ src/sys/arch/x86/x86/ioapic.c	Mon Oct 10 15:04:31 2022
@@ -1,4 +1,4 @@
-/* 	$NetBSD: ioapic.c,v 1.52.10.1 2017/11/21 11:01:02 martin Exp $	*/
+/* 	$NetBSD: ioapic.c,v 1.52.10.2 2022/10/10 15:04:31 martin Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2009 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.52.10.1 2017/11/21 11:01:02 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.52.10.2 2022/10/10 15:04:31 martin Exp $");
 
 #include "opt_ddb.h"
 
@@ -373,8 +373,9 @@ ioapic_attach(device_t parent, device_t 
 	 * mapping later ...
 	 */
 	if (apic_id != sc->sc_pic.pic_apicid) {
-		aprint_debug_dev(sc->sc_dev, "misconfigured as apic %d\n",
- apic_id);
+		aprint_debug_dev(sc->sc_dev,
+		"apid is misconfigured (%d != %d)\n",
+		apic_id, sc->sc_pic.pic_apicid);
 
 		ioapic_write(sc, IOAPIC_ID,
 		(ioapic_read(sc, IOAPIC_ID) & ~IOAPIC_ID_MASK)
@@ -385,7 +386,8 @@ ioapic_attach(device_t parent, device_t 
 		
 		if (apic_id != sc->sc_pic.pic_apicid)
 			aprint_error_dev(sc->sc_dev,
-			"can't remap to apid %d\n", sc->sc_pic.pic_apicid);
+			"can't remap apid from %d to %d\n",
+			apic_id, sc->sc_pic.pic_apicid);
 		else
 			aprint_debug_dev(sc->sc_dev, "remapped to apic %d\n",
 			sc->sc_pic.pic_apicid);



CVS commit: [netbsd-8] src/sys/arch/x86

2022-10-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 10 15:04:31 UTC 2022

Modified Files:
src/sys/arch/x86/include [netbsd-8]: i82093reg.h
src/sys/arch/x86/x86 [netbsd-8]: ioapic.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1769):

sys/arch/x86/x86/ioapic.c: revision 1.66
sys/arch/x86/include/i82093reg.h: revision 1.7

Print detail about misconfigured APIC ID.

IOAPIC_ID_MASK is 8 bits these days. Fixes PR kern/54276.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.5.4.1 src/sys/arch/x86/include/i82093reg.h
cvs rdiff -u -r1.52.10.1 -r1.52.10.2 src/sys/arch/x86/x86/ioapic.c

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



CVS commit: [netbsd-9] src/doc

2022-10-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 10 15:03:40 UTC 2022

Modified Files:
src/doc [netbsd-9]: CHANGES-9.4

Log Message:
Ticket #1536


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.22 -r1.1.2.23 src/doc/CHANGES-9.4

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

Modified files:

Index: src/doc/CHANGES-9.4
diff -u src/doc/CHANGES-9.4:1.1.2.22 src/doc/CHANGES-9.4:1.1.2.23
--- src/doc/CHANGES-9.4:1.1.2.22	Tue Oct  4 17:26:46 2022
+++ src/doc/CHANGES-9.4	Mon Oct 10 15:03:40 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.22 2022/10/04 17:26:46 snj Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.23 2022/10/10 15:03:40 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -308,3 +308,11 @@ usr.sbin/sysinst/arch/landisk/md.c		1.16
 	   partition).
 	[martin, ticket #1535]
 
+sys/arch/x86/include/i82093reg.h		1.7
+sys/arch/x86/x86/ioapic.c			1.66
+
+	- Fix a bug that an IOAPIC ID is tried to remap with a wrong ID.
+	  The bit width is 8 bits these days. Fixes PR kern/54276.
+	- Print detail about misconfigured APIC ID.
+	[msaitoh, ticket #1536]
+



CVS commit: [netbsd-9] src/doc

2022-10-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 10 15:03:40 UTC 2022

Modified Files:
src/doc [netbsd-9]: CHANGES-9.4

Log Message:
Ticket #1536


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.22 -r1.1.2.23 src/doc/CHANGES-9.4

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



CVS commit: [netbsd-9] src/sys/arch/x86

2022-10-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 10 15:02:51 UTC 2022

Modified Files:
src/sys/arch/x86/include [netbsd-9]: i82093reg.h
src/sys/arch/x86/x86 [netbsd-9]: ioapic.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1536):

sys/arch/x86/x86/ioapic.c: revision 1.66
sys/arch/x86/include/i82093reg.h: revision 1.7

Print detail about misconfigured APIC ID.

IOAPIC_ID_MASK is 8 bits these days. Fixes PR kern/54276.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.2.1 src/sys/arch/x86/include/i82093reg.h
cvs rdiff -u -r1.63 -r1.63.2.1 src/sys/arch/x86/x86/ioapic.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/x86/include/i82093reg.h
diff -u src/sys/arch/x86/include/i82093reg.h:1.6 src/sys/arch/x86/include/i82093reg.h:1.6.2.1
--- src/sys/arch/x86/include/i82093reg.h:1.6	Wed Jun 19 06:32:46 2019
+++ src/sys/arch/x86/include/i82093reg.h	Mon Oct 10 15:02:50 2022
@@ -1,4 +1,4 @@
-/* 	$NetBSD: i82093reg.h,v 1.6 2019/06/19 06:32:46 msaitoh Exp $ */
+/* 	$NetBSD: i82093reg.h,v 1.6.2.1 2022/10/10 15:02:50 martin Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -60,7 +60,7 @@
 #define IOAPIC_ID		0x00
 
 #define 	IOAPIC_ID_SHIFT		24
-#define		IOAPIC_ID_MASK		0x0f00
+#define		IOAPIC_ID_MASK		0xff00
 
 /* Version, and maximum interrupt pin number. */
   

Index: src/sys/arch/x86/x86/ioapic.c
diff -u src/sys/arch/x86/x86/ioapic.c:1.63 src/sys/arch/x86/x86/ioapic.c:1.63.2.1
--- src/sys/arch/x86/x86/ioapic.c:1.63	Wed Jun 19 06:32:46 2019
+++ src/sys/arch/x86/x86/ioapic.c	Mon Oct 10 15:02:50 2022
@@ -1,4 +1,4 @@
-/* 	$NetBSD: ioapic.c,v 1.63 2019/06/19 06:32:46 msaitoh Exp $	*/
+/* 	$NetBSD: ioapic.c,v 1.63.2.1 2022/10/10 15:02:50 martin Exp $	*/
 
 /*-
  * Copyright (c) 2000, 2009 The NetBSD Foundation, Inc.
@@ -64,7 +64,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.63 2019/06/19 06:32:46 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ioapic.c,v 1.63.2.1 2022/10/10 15:02:50 martin Exp $");
 
 #include "opt_ddb.h"
 
@@ -371,8 +371,9 @@ ioapic_attach(device_t parent, device_t 
 	 * mapping later ...
 	 */
 	if (apic_id != sc->sc_pic.pic_apicid) {
-		aprint_debug_dev(sc->sc_dev, "misconfigured as apic %d\n",
- apic_id);
+		aprint_debug_dev(sc->sc_dev,
+		"apid is misconfigured (%d != %d)\n",
+		apic_id, sc->sc_pic.pic_apicid);
 
 		ioapic_write(sc, IOAPIC_ID,
 		(ioapic_read(sc, IOAPIC_ID) & ~IOAPIC_ID_MASK)
@@ -383,7 +384,8 @@ ioapic_attach(device_t parent, device_t 
 
 		if (apic_id != sc->sc_pic.pic_apicid)
 			aprint_error_dev(sc->sc_dev,
-			"can't remap to apid %d\n", sc->sc_pic.pic_apicid);
+			"can't remap apid from %d to %d\n",
+			apic_id, sc->sc_pic.pic_apicid);
 		else
 			aprint_debug_dev(sc->sc_dev, "remapped to apic %d\n",
 			sc->sc_pic.pic_apicid);



CVS commit: [netbsd-9] src/sys/arch/x86

2022-10-10 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Mon Oct 10 15:02:51 UTC 2022

Modified Files:
src/sys/arch/x86/include [netbsd-9]: i82093reg.h
src/sys/arch/x86/x86 [netbsd-9]: ioapic.c

Log Message:
Pull up following revision(s) (requested by msaitoh in ticket #1536):

sys/arch/x86/x86/ioapic.c: revision 1.66
sys/arch/x86/include/i82093reg.h: revision 1.7

Print detail about misconfigured APIC ID.

IOAPIC_ID_MASK is 8 bits these days. Fixes PR kern/54276.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.6.2.1 src/sys/arch/x86/include/i82093reg.h
cvs rdiff -u -r1.63 -r1.63.2.1 src/sys/arch/x86/x86/ioapic.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

2022-10-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Oct  2 10:40:29 UTC 2022

Modified Files:
src/sys/dev/pci: ahcisata_pci.c

Log Message:
Add extra delay quirk for AMD FCH SATA Controller D.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/dev/pci/ahcisata_pci.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/pci/ahcisata_pci.c
diff -u src/sys/dev/pci/ahcisata_pci.c:1.66 src/sys/dev/pci/ahcisata_pci.c:1.67
--- src/sys/dev/pci/ahcisata_pci.c:1.66	Sun Oct  2 10:33:59 2022
+++ src/sys/dev/pci/ahcisata_pci.c	Sun Oct  2 10:40:29 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ahcisata_pci.c,v 1.66 2022/10/02 10:33:59 martin Exp $	*/
+/*	$NetBSD: ahcisata_pci.c,v 1.67 2022/10/02 10:40:29 martin Exp $	*/
 
 /*
  * Copyright (c) 2006 Manuel Bouyer.
@@ -26,7 +26,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.66 2022/10/02 10:33:59 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ahcisata_pci.c,v 1.67 2022/10/02 10:40:29 martin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_ahcisata_pci.h"
@@ -216,7 +216,7 @@ static const struct ahci_pci_quirk ahci_
 	AHCI_QUIRK_EXTRA_DELAY },
 	{ PCI_VENDOR_INTEL, PCI_PRODUCT_INTEL_9SERIES_SATA_AHCI,
 	AHCI_QUIRK_EXTRA_DELAY },
-	{ PCI_VENDOR_AMD, 0x43b8, AHCI_QUIRK_EXTRA_DELAY },
+	{ PCI_VENDOR_AMD, PCI_PRODUCT_AMD_FCH_SATA_D, AHCI_QUIRK_EXTRA_DELAY },
 
 #if 0
 	/*



CVS commit: src/sys/dev/pci

2022-10-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Oct  2 10:40:29 UTC 2022

Modified Files:
src/sys/dev/pci: ahcisata_pci.c

Log Message:
Add extra delay quirk for AMD FCH SATA Controller D.


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/dev/pci/ahcisata_pci.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

2022-10-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Oct  2 10:34:00 UTC 2022

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

Log Message:
regen (AMD FCH SATA D added)


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/dev/pci/ahcisata_pci.c
cvs rdiff -u -r1.1447 -r1.1448 src/sys/dev/pci/pcidevs.h
cvs rdiff -u -r1.1446 -r1.1447 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

2022-10-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Oct  2 10:33:01 UTC 2022

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

Log Message:
Add AMD FCH SATA Controller D


To generate a diff of this commit:
cvs rdiff -u -r1.1466 -r1.1467 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.1466 src/sys/dev/pci/pcidevs:1.1467
--- src/sys/dev/pci/pcidevs:1.1466	Sat Oct  1 15:44:58 2022
+++ src/sys/dev/pci/pcidevs	Sun Oct  2 10:33:00 2022
@@ -1,4 +1,4 @@
-$NetBSD: pcidevs,v 1.1466 2022/10/01 15:44:58 msaitoh Exp $
+$NetBSD: pcidevs,v 1.1467 2022/10/02 10:33:00 martin Exp $
 
 /*
  * Copyright (c) 1995, 1996 Christopher G. Demetriou
@@ -1183,6 +1183,7 @@ product AMD HUDSON_PCIE_2	0x43a2	Hudson 
 product AMD HUDSON_PCIE_3	0x43a3	Hudson PCIe Root Port 3
 product AMD 300SERIES_PCIE	0x43b4	300 Series PCIe
 product AMD 300SERIES_SATA	0x43b7	300 Series SATA
+product AMD FCH_SATA_D		0x43b8	FCH SATA Controller D
 product AMD 300SERIES_XHCI	0x43bb	300 Series xHCI
 product AMD 400SERIES_PCIE_1	0x43c6	400 Series PCIe
 product AMD 400SERIES_PCIE_2	0x43c7	400 Series PCIe



CVS commit: src/sys/dev/pci

2022-10-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Oct  2 10:33:01 UTC 2022

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

Log Message:
Add AMD FCH SATA Controller D


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

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



CVS commit: src/usr.sbin/sysinst/arch/landisk

2022-10-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Oct  2 10:21:36 UTC 2022

Modified Files:
src/usr.sbin/sysinst/arch/landisk: md.c

Log Message:
PR install/57025: revert bogus rev 1.9 which was only papering over
a bug in the adoption of the MBR handling code and fix the original
conversion bug instead:
 - run fdisk to install the MBR bootcode on the raw disk partition
 - run installboot against the NetBSD root partition (not the raw partition).


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/sysinst/arch/landisk/md.c

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



CVS commit: src/usr.sbin/sysinst/arch/landisk

2022-10-02 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Oct  2 10:21:36 UTC 2022

Modified Files:
src/usr.sbin/sysinst/arch/landisk: md.c

Log Message:
PR install/57025: revert bogus rev 1.9 which was only papering over
a bug in the adoption of the MBR handling code and fix the original
conversion bug instead:
 - run fdisk to install the MBR bootcode on the raw disk partition
 - run installboot against the NetBSD root partition (not the raw partition).


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/usr.sbin/sysinst/arch/landisk/md.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/sysinst/arch/landisk/md.c
diff -u src/usr.sbin/sysinst/arch/landisk/md.c:1.15 src/usr.sbin/sysinst/arch/landisk/md.c:1.16
--- src/usr.sbin/sysinst/arch/landisk/md.c:1.15	Sat Jan 29 16:01:19 2022
+++ src/usr.sbin/sysinst/arch/landisk/md.c	Sun Oct  2 10:21:36 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: md.c,v 1.15 2022/01/29 16:01:19 martin Exp $	*/
+/*	$NetBSD: md.c,v 1.16 2022/10/02 10:21:36 martin Exp $	*/
 
 /*
  * Copyright 1997,2002 Piermont Information Systems Inc.
@@ -130,7 +130,9 @@ md_pre_disklabel(struct install_partitio
 	msg_string(parts->pscheme->short_name));
 
 	/* write edited "MBR" onto disk. */
-	if (!parts->pscheme->write_to_disk(parts)) {
+	if (!parts->pscheme->write_to_disk(parts) ||
+	run_program(RUN_SILENT | RUN_ERROR_OK,
+	"/sbin/fdisk -f -i -c /usr/mdec/mbr %s", parts->disk)) {
 		msg_display(MSG_wmbrfail);
 		process_menu(MENU_ok, NULL);
 		return false;
@@ -166,7 +168,7 @@ md_post_newfs(struct install_partition_d
 	bootxx = bootxx_name(install);
 	if (bootxx != NULL) {
 		error = run_program(RUN_DISPLAY,
-		"/usr/sbin/installboot -v /dev/r%sd %s", pm->diskdev, bootxx);
+		"/usr/sbin/installboot -v /dev/r%sa %s", pm->diskdev, bootxx);
 		free(bootxx);
 	} else
 		error = -1;



CVS commit: [netbsd-9] src/doc

2022-09-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 29 18:27:42 UTC 2022

Modified Files:
src/doc [netbsd-9]: CHANGES-9.4

Log Message:
Ticket #1534


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.20 -r1.1.2.21 src/doc/CHANGES-9.4

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

Modified files:

Index: src/doc/CHANGES-9.4
diff -u src/doc/CHANGES-9.4:1.1.2.20 src/doc/CHANGES-9.4:1.1.2.21
--- src/doc/CHANGES-9.4:1.1.2.20	Sat Sep 24 08:11:46 2022
+++ src/doc/CHANGES-9.4	Thu Sep 29 18:27:41 2022
@@ -1,4 +1,4 @@
-# $NetBSD: CHANGES-9.4,v 1.1.2.20 2022/09/24 08:11:46 martin Exp $
+# $NetBSD: CHANGES-9.4,v 1.1.2.21 2022/09/29 18:27:41 martin Exp $
 
 A complete list of changes from the NetBSD 9.3 release to the NetBSD 9.4
 release:
@@ -292,3 +292,9 @@ sys/arch/arm/sunxi/sunxi_can.c			1.10,1.
 	receive overrun, and improve receive overrun recovery.
 	[bouyer, ticket #1533]
 
+sys/dev/pci/mfii.c1.28
+
+	mfii(4): Convert from pci_intr_map() to pci_intr_alloc(); makes
+	the driver use MSI/MSI-x when available.
+	[bouyer, ticket #1534]
+



CVS commit: [netbsd-9] src/doc

2022-09-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 29 18:27:42 UTC 2022

Modified Files:
src/doc [netbsd-9]: CHANGES-9.4

Log Message:
Ticket #1534


To generate a diff of this commit:
cvs rdiff -u -r1.1.2.20 -r1.1.2.21 src/doc/CHANGES-9.4

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



CVS commit: [netbsd-9] src/sys/dev/pci

2022-09-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 29 18:26:42 UTC 2022

Modified Files:
src/sys/dev/pci [netbsd-9]: mfii.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1534):

sys/dev/pci/mfii.c: revision 1.28

Convert from pci_intr_map() to pci_intr_alloc(); makes the driver use
MSI/MSI-x when available. Tested by Edgar Fu?.


To generate a diff of this commit:
cvs rdiff -u -r1.4.4.2 -r1.4.4.3 src/sys/dev/pci/mfii.c

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

Modified files:

Index: src/sys/dev/pci/mfii.c
diff -u src/sys/dev/pci/mfii.c:1.4.4.2 src/sys/dev/pci/mfii.c:1.4.4.3
--- src/sys/dev/pci/mfii.c:1.4.4.2	Fri Sep 16 18:27:38 2022
+++ src/sys/dev/pci/mfii.c	Thu Sep 29 18:26:42 2022
@@ -1,4 +1,4 @@
-/* $NetBSD: mfii.c,v 1.4.4.2 2022/09/16 18:27:38 martin Exp $ */
+/* $NetBSD: mfii.c,v 1.4.4.3 2022/09/29 18:26:42 martin Exp $ */
 /* $OpenBSD: mfii.c,v 1.58 2018/08/14 05:22:21 jmatthew Exp $ */
 
 /*
@@ -19,7 +19,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.4.4.2 2022/09/16 18:27:38 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mfii.c,v 1.4.4.3 2022/09/29 18:26:42 martin Exp $");
 
 #include "bio.h"
 
@@ -655,7 +655,7 @@ mfii_attach(device_t parent, device_t se
 	struct mfii_softc *sc = device_private(self);
 	struct pci_attach_args *pa = aux;
 	pcireg_t memtype;
-	pci_intr_handle_t ih;
+	pci_intr_handle_t *ihp;
 	char intrbuf[PCI_INTRSTR_LEN];
 	const char *intrstr;
 	u_int32_t status, scpad2, scpad3;
@@ -705,12 +705,12 @@ mfii_attach(device_t parent, device_t se
 	/* disable interrupts */
 	mfii_write(sc, MFI_OMSK, 0x);
 
-	if (pci_intr_map(pa, ) != 0) {
+	if (pci_intr_alloc(pa, , NULL, 0)) {
 		aprint_error(": unable to map interrupt\n");
 		goto pci_unmap;
 	}
-	intrstr = pci_intr_string(pa->pa_pc, ih, intrbuf, sizeof(intrbuf));
-	pci_intr_setattr(pa->pa_pc, , PCI_INTR_MPSAFE, true);
+	intrstr = pci_intr_string(pa->pa_pc, ihp[0], intrbuf, sizeof(intrbuf));
+	pci_intr_setattr(pa->pa_pc, [0], PCI_INTR_MPSAFE, true);
 
 	/* lets get started */
 	if (mfii_transition_firmware(sc))
@@ -819,7 +819,7 @@ mfii_attach(device_t parent, device_t se
 	aprint_normal("\n");
 	aprint_naive("\n");
 
-	sc->sc_ih = pci_intr_establish_xname(sc->sc_pc, ih, IPL_BIO,
+	sc->sc_ih = pci_intr_establish_xname(sc->sc_pc, ihp[0], IPL_BIO,
 	mfii_intr, sc, DEVNAME(sc));
 	if (sc->sc_ih == NULL) {
 		aprint_error_dev(self, "can't establish interrupt");



CVS commit: [netbsd-9] src/sys/dev/pci

2022-09-29 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Thu Sep 29 18:26:42 UTC 2022

Modified Files:
src/sys/dev/pci [netbsd-9]: mfii.c

Log Message:
Pull up following revision(s) (requested by bouyer in ticket #1534):

sys/dev/pci/mfii.c: revision 1.28

Convert from pci_intr_map() to pci_intr_alloc(); makes the driver use
MSI/MSI-x when available. Tested by Edgar Fu?.


To generate a diff of this commit:
cvs rdiff -u -r1.4.4.2 -r1.4.4.3 src/sys/dev/pci/mfii.c

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



  1   2   3   4   5   6   7   8   9   10   >