Re: CVS commit: src
Hi, Periodic snapshot build fails for (probably) all platforms with MKCOMPAT enabled: http://releng.netbsd.org/builds/HEAD/202404101150Z/ Please take a look. And more importantly, careful tests are always appreciated before commit. To be fair, there are tons of combinations of mk.conf variables, although ;) Thanks, rin On 2024/04/10 0:17, Nia Alarie wrote: Module Name:src Committed By: nia Date: Tue Apr 9 15:17:25 UTC 2024 Modified Files: src/distrib/common/bootimage: Makefile.bootimage src/distrib/sets: maketars regpkgset sets.subr src/distrib/sets/lists/base: ad.aarch64 ad.arm ad.mips ad.powerpc md.amd64 md.sparc64 mi shl.mi src/distrib/sets/lists/debug: ad.aarch64 md.amd64 md.sparc64 mi shl.mi src/distrib/sets/lists/etc: mi src/distrib/sets/lists/man: mi src/distrib/utils/embedded: mkimage src/usr.sbin/sysinst: Makefile.inc defs.h msg.mi.de msg.mi.en msg.mi.es msg.mi.fr msg.mi.pl util.c src/usr.sbin/sysinst/arch/amd64: md.h src/usr.sbin/sysinst/arch/evbarm: md.h Added Files: src/distrib/sets/lists/base32: ad.aarch64 ad.mips64eb ad.mips64el ad.mipsn64eb ad.mipsn64el ad.powerpc64 ad.riscv64 md.amd64 md.sparc64 mi src/distrib/sets/lists/debug32: ad.aarch64 ad.mips64eb ad.mips64el ad.mipsn64eb ad.mipsn64el ad.powerpc64 ad.riscv64 md.amd64 md.sparc64 mi src/distrib/sets/lists/manhtml: mi Log Message: Add new sets: base32, debug32, manhtml - base32 contains (when MKCOMPAT=yes) shared libraries for 32-bit compatibility, previously included in base - debug32 contains (when MKCOMPAT=yes) debug symbols and static libraries containing debug symbols for 32-bit compatiblity, previously included in debug - manhtml contains (when MKHTML=yes) the HTML files previously included in 'man', which are of limited utility without third-party software. The motivation for this change is to be able to easily exclude sets from CD-ROM images that go over the size limit without xz compression (which many NetBSD platforms struggle to extract at acceptable speeds). To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/distrib/common/bootimage/Makefile.bootimage cvs rdiff -u -r1.100 -r1.101 src/distrib/sets/maketars cvs rdiff -u -r1.17 -r1.18 src/distrib/sets/regpkgset cvs rdiff -u -r1.204 -r1.205 src/distrib/sets/sets.subr cvs rdiff -u -r1.45 -r1.46 src/distrib/sets/lists/base/ad.aarch64 cvs rdiff -u -r1.87 -r1.88 src/distrib/sets/lists/base/ad.arm cvs rdiff -u -r1.93 -r1.94 src/distrib/sets/lists/base/ad.mips cvs rdiff -u -r1.47 -r1.48 src/distrib/sets/lists/base/ad.powerpc cvs rdiff -u -r1.296 -r1.297 src/distrib/sets/lists/base/md.amd64 cvs rdiff -u -r1.262 -r1.263 src/distrib/sets/lists/base/md.sparc64 cvs rdiff -u -r1.1341 -r1.1342 src/distrib/sets/lists/base/mi cvs rdiff -u -r1.978 -r1.979 src/distrib/sets/lists/base/shl.mi cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/base32/ad.aarch64 \ src/distrib/sets/lists/base32/ad.mips64eb \ src/distrib/sets/lists/base32/ad.mips64el \ src/distrib/sets/lists/base32/ad.mipsn64eb \ src/distrib/sets/lists/base32/ad.mipsn64el \ src/distrib/sets/lists/base32/ad.powerpc64 \ src/distrib/sets/lists/base32/ad.riscv64 \ src/distrib/sets/lists/base32/md.amd64 \ src/distrib/sets/lists/base32/md.sparc64 src/distrib/sets/lists/base32/mi cvs rdiff -u -r1.37 -r1.38 src/distrib/sets/lists/debug/ad.aarch64 cvs rdiff -u -r1.123 -r1.124 src/distrib/sets/lists/debug/md.amd64 cvs rdiff -u -r1.89 -r1.90 src/distrib/sets/lists/debug/md.sparc64 cvs rdiff -u -r1.430 -r1.431 src/distrib/sets/lists/debug/mi cvs rdiff -u -r1.339 -r1.340 src/distrib/sets/lists/debug/shl.mi cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/debug32/ad.aarch64 \ src/distrib/sets/lists/debug32/ad.mips64eb \ src/distrib/sets/lists/debug32/ad.mips64el \ src/distrib/sets/lists/debug32/ad.mipsn64eb \ src/distrib/sets/lists/debug32/ad.mipsn64el \ src/distrib/sets/lists/debug32/ad.powerpc64 \ src/distrib/sets/lists/debug32/ad.riscv64 \ src/distrib/sets/lists/debug32/md.amd64 \ src/distrib/sets/lists/debug32/md.sparc64 \ src/distrib/sets/lists/debug32/mi cvs rdiff -u -r1.273 -r1.274 src/distrib/sets/lists/etc/mi cvs rdiff -u -r1.1771 -r1.1772 src/distrib/sets/lists/man/mi cvs rdiff -u -r0 -r1.1 src/distrib/sets/lists/manhtml/mi cvs rdiff -u -r1.81 -r1.82 src/distrib/utils/embedded/mkimage cvs rdiff -u -r1.47 -r1.48 src/usr.sbin/sysinst/Makefile.inc cvs rdiff -u -r1.90 -r1.91 src/usr.sbin/sysinst/defs.h cvs rdiff -u -r1.45 -r1.46 src/usr.sbin/sysinst/msg.mi.de \ src/usr.sbin/sysinst/msg.mi.fr cvs rdiff -u -r1.48 -r1.49 src/usr.sbin/sysinst/msg.mi.en cvs rdiff -u -r1.40 -r1.41 src/usr.sbin/sysinst/msg.mi.es cvs rdiff -u -r1.46 -r1.47 src/usr.sbin/sysinst/msg.mi.pl cvs rdiff -u -r1.74 -r1.75 src/usr.sbin/sysinst/util.c cvs rdiff -u
CVS commit: src/share/misc
Module Name:src Committed By: rin Date: Mon Jan 29 05:42:41 UTC 2024 Modified Files: src/share/misc: style Log Message: style: One more typo, NFC To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/share/misc/style Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/style diff -u src/share/misc/style:1.76 src/share/misc/style:1.77 --- src/share/misc/style:1.76 Wed Jan 24 04:00:43 2024 +++ src/share/misc/style Mon Jan 29 05:42:41 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: style,v 1.76 2024/01/24 04:00:43 rin Exp $ */ +/* $NetBSD: style,v 1.77 2024/01/29 05:42:41 rin Exp $ */ /* * The revision control tag appears first, with a blank line after it. @@ -30,7 +30,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: style,v 1.76 2024/01/24 04:00:43 rin Exp $"); +__RCSID("$NetBSD: style,v 1.77 2024/01/29 05:42:41 rin Exp $"); /* * VERY important single-line comments look like this. @@ -64,7 +64,7 @@ __RCSID("$NetBSD: style,v 1.76 2024/01/2 * Avoid relying on transitive inclusions. * * Avoid header files dependencies just for struct and union types that - * are used in pointer types, which don't require type defintions. + * are used in pointer types, which don't require type definitions. * Instead, use forward declarations of the struct or union tag. */ #include
CVS commit: src/share/misc
Module Name:src Committed By: rin Date: Mon Jan 29 05:42:41 UTC 2024 Modified Files: src/share/misc: style Log Message: style: One more typo, NFC To generate a diff of this commit: cvs rdiff -u -r1.76 -r1.77 src/share/misc/style Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/misc
Module Name:src Committed By: rin Date: Wed Jan 24 04:00:43 UTC 2024 Modified Files: src/share/misc: style Log Message: style: Fix typo, NFC "it it" --> "it is" (across a newline) To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/share/misc/style Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/share/misc/style diff -u src/share/misc/style:1.75 src/share/misc/style:1.76 --- src/share/misc/style:1.75 Mon Aug 7 18:01:42 2023 +++ src/share/misc/style Wed Jan 24 04:00:43 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: style,v 1.75 2023/08/07 18:01:42 riastradh Exp $ */ +/* $NetBSD: style,v 1.76 2024/01/24 04:00:43 rin Exp $ */ /* * The revision control tag appears first, with a blank line after it. @@ -30,7 +30,7 @@ #include __COPYRIGHT("@(#) Copyright (c) 2008\ The NetBSD Foundation, inc. All rights reserved."); -__RCSID("$NetBSD: style,v 1.75 2023/08/07 18:01:42 riastradh Exp $"); +__RCSID("$NetBSD: style,v 1.76 2024/01/24 04:00:43 rin Exp $"); /* * VERY important single-line comments look like this. @@ -469,7 +469,7 @@ function(int a1, int a2, float fl, int a * where we don't have control over the NULL definition (on NetBSD * it is defined as ((void *)0), but on other systems it can be * defined as (0) and both definitions are valid), it - * it advised to cast NULL to a pointer on variadic functions, + * is advised to cast NULL to a pointer on variadic functions, * because on machines where sizeof(pointer) != sizeof(int) and in * the absence of a prototype in scope, passing an un-casted NULL, * will result in passing an int on the stack instead of a pointer.
CVS commit: src/share/misc
Module Name:src Committed By: rin Date: Wed Jan 24 04:00:43 UTC 2024 Modified Files: src/share/misc: style Log Message: style: Fix typo, NFC "it it" --> "it is" (across a newline) To generate a diff of this commit: cvs rdiff -u -r1.75 -r1.76 src/share/misc/style Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: rin Date: Tue Jan 23 04:15:54 UTC 2024 Modified Files: src/sys/arch/powerpc/include: ieee.h Log Message: powerpc/ieee.h: Protect from multiple includes Fix build failure triggered by import of libm long-double functions. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/include/ieee.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/powerpc/include
Module Name:src Committed By: rin Date: Tue Jan 23 04:15:54 UTC 2024 Modified Files: src/sys/arch/powerpc/include: ieee.h Log Message: powerpc/ieee.h: Protect from multiple includes Fix build failure triggered by import of libm long-double functions. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/arch/powerpc/include/ieee.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/include/ieee.h diff -u src/sys/arch/powerpc/include/ieee.h:1.6 src/sys/arch/powerpc/include/ieee.h:1.7 --- src/sys/arch/powerpc/include/ieee.h:1.6 Wed Oct 22 10:32:50 2014 +++ src/sys/arch/powerpc/include/ieee.h Tue Jan 23 04:15:54 2024 @@ -1,4 +1,7 @@ -/* $NetBSD: ieee.h,v 1.6 2014/10/22 10:32:50 joerg Exp $ */ +/* $NetBSD: ieee.h,v 1.7 2024/01/23 04:15:54 rin Exp $ */ + +#ifndef _POWERPC_IEEE_H_ +#define _POWERPC_IEEE_H_ #include @@ -16,3 +19,5 @@ union ldbl_u { long double ldblu_ld; double ldblu_d[2]; }; + +#endif /* !_POWERPC_IEEE_H_ */
CVS commit: src/lib/libc/gen
Module Name:src Committed By: rin Date: Fri Jan 5 09:41:58 UTC 2024 Modified Files: src/lib/libc/gen: fixunstfdi_ieee754.c fixunstfsi_ieee754.c Log Message: fixunstf[sd]i_ieee754: Explicitly include stddef.h for size_t Fix build for mips{,n}64. Note that stddef.h has been implicitly included via eabi.h for aarch64, on the other hand. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/gen/fixunstfdi_ieee754.c cvs rdiff -u -r1.2 -r1.3 src/lib/libc/gen/fixunstfsi_ieee754.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/gen
Module Name:src Committed By: rin Date: Fri Jan 5 09:41:58 UTC 2024 Modified Files: src/lib/libc/gen: fixunstfdi_ieee754.c fixunstfsi_ieee754.c Log Message: fixunstf[sd]i_ieee754: Explicitly include stddef.h for size_t Fix build for mips{,n}64. Note that stddef.h has been implicitly included via eabi.h for aarch64, on the other hand. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/lib/libc/gen/fixunstfdi_ieee754.c cvs rdiff -u -r1.2 -r1.3 src/lib/libc/gen/fixunstfsi_ieee754.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/gen/fixunstfdi_ieee754.c diff -u src/lib/libc/gen/fixunstfdi_ieee754.c:1.1 src/lib/libc/gen/fixunstfdi_ieee754.c:1.2 --- src/lib/libc/gen/fixunstfdi_ieee754.c:1.1 Sat Jul 9 02:30:27 2011 +++ src/lib/libc/gen/fixunstfdi_ieee754.c Fri Jan 5 09:41:58 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: fixunstfdi_ieee754.c,v 1.1 2011/07/09 02:30:27 matt Exp $ */ +/* $NetBSD: fixunstfdi_ieee754.c,v 1.2 2024/01/05 09:41:58 rin Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -31,10 +31,11 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fixunstfdi_ieee754.c,v 1.1 2011/07/09 02:30:27 matt Exp $"); +__RCSID("$NetBSD: fixunstfdi_ieee754.c,v 1.2 2024/01/05 09:41:58 rin Exp $"); #endif /* LIBC_SCCS and not lint */ #include +#include #include #include #include Index: src/lib/libc/gen/fixunstfsi_ieee754.c diff -u src/lib/libc/gen/fixunstfsi_ieee754.c:1.2 src/lib/libc/gen/fixunstfsi_ieee754.c:1.3 --- src/lib/libc/gen/fixunstfsi_ieee754.c:1.2 Sun Aug 5 04:28:58 2012 +++ src/lib/libc/gen/fixunstfsi_ieee754.c Fri Jan 5 09:41:58 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: fixunstfsi_ieee754.c,v 1.2 2012/08/05 04:28:58 matt Exp $ */ +/* $NetBSD: fixunstfsi_ieee754.c,v 1.3 2024/01/05 09:41:58 rin Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. * All rights reserved. @@ -31,10 +31,11 @@ #include #if defined(LIBC_SCCS) && !defined(lint) -__RCSID("$NetBSD: fixunstfsi_ieee754.c,v 1.2 2012/08/05 04:28:58 matt Exp $"); +__RCSID("$NetBSD: fixunstfsi_ieee754.c,v 1.3 2024/01/05 09:41:58 rin Exp $"); #endif /* LIBC_SCCS and not lint */ #include +#include #include #include #include
CVS commit: src/usr.bin/mklocale
Module Name:src Committed By: rin Date: Fri Jan 5 02:38:06 UTC 2024 Modified Files: src/usr.bin/mklocale: mklocale.1 yacc.y Log Message: mklocale(1): Add range check for TODIGIT, rather than disabling it PR lib/57798 Digit value specified by TODIGIT is storaged as lowest 8 bits of _RuneType, see lib/libc/locale/runetype_file.h: https://nxr.netbsd.org/xref/src/lib/libc/locale/runetype_file.h#56 The symptom reported in the PR is due to missing range check for this value; values of 256 and above were mistakenly treated as other flag bits in _RuneType. For example, U+5146 has numerical value 1000,000,000,000 == 0xe8d4a51000 where __BITS(30, 31) == _RUNETYPE_SW3 are turned on. This is why wcwidth(3) returned 3 for this character. This apparently affected not only character width, but also other attributes storaged in _RuneType. IIUC, digit value attributes in _RuneType have never been utilized until now, but preserve these if digit fits within (0, 256). This should be safer for pulling this up into netbsd-10. Also, these attributes may be useful to implement some I18N features as suggested by uwe@ in the PR. netbsd-[98] is not affected as these use old UTF-8 ctype definitions. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/usr.bin/mklocale/mklocale.1 cvs rdiff -u -r1.35 -r1.36 src/usr.bin/mklocale/yacc.y 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/mklocale/mklocale.1 diff -u src/usr.bin/mklocale/mklocale.1:1.18 src/usr.bin/mklocale/mklocale.1:1.19 --- src/usr.bin/mklocale/mklocale.1:1.18 Thu Dec 28 03:49:35 2023 +++ src/usr.bin/mklocale/mklocale.1 Fri Jan 5 02:38:06 2024 @@ -1,4 +1,4 @@ -.\" $NetBSD: mklocale.1,v 1.18 2023/12/28 03:49:35 rin Exp $ +.\" $NetBSD: mklocale.1,v 1.19 2024/01/05 02:38:06 rin Exp $ .\" FreeBSD: src/usr.bin/mklocale/mklocale.1,v 1.6 1999/09/20 09:15:21 phantom Exp .\" .\" Copyright (c) 1993, 1994 @@ -33,7 +33,7 @@ .\" .\" @(#)mklocale.1 8.2 (Berkeley) 4/18/94 .\" -.Dd December 28, 2023 +.Dd January 5, 2024 .Dt MKLOCALE 1 .Os .Sh NAME @@ -212,7 +212,9 @@ For example, the ASCII character would map to the decimal value 0. On .Nx , -this information is ignored and not put into the binary output file. +this information has never been used until now. +Only values up to 255 are allowed, and mapping to 256 and above is +silently ignored. .El .Pp The following keywords may appear multiple times and have the following Index: src/usr.bin/mklocale/yacc.y diff -u src/usr.bin/mklocale/yacc.y:1.35 src/usr.bin/mklocale/yacc.y:1.36 --- src/usr.bin/mklocale/yacc.y:1.35 Thu Dec 28 03:49:35 2023 +++ src/usr.bin/mklocale/yacc.y Fri Jan 5 02:38:06 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: yacc.y,v 1.35 2023/12/28 03:49:35 rin Exp $ */ +/* $NetBSD: yacc.y,v 1.36 2024/01/05 02:38:06 rin Exp $ */ %{ /*- @@ -43,7 +43,7 @@ static char sccsid[] = "@(#)yacc.y 8.1 (Berkeley) 6/6/93"; static char rcsid[] = "$FreeBSD$"; #else -__RCSID("$NetBSD: yacc.y,v 1.35 2023/12/28 03:49:35 rin Exp $"); +__RCSID("$NetBSD: yacc.y,v 1.36 2024/01/05 02:38:06 rin Exp $"); #endif #endif /* not lint */ @@ -82,9 +82,7 @@ __nbrune_t charsetmask = (__nbrune_t)0x0 __nbrune_t charsetmask = (__nbrune_t)0x; void set_map(rune_map *, rune_list *, u_int32_t); -#if 0 void set_digitmap(rune_map *, rune_list *); -#endif void add_map(rune_map *, rune_list *, u_int32_t); __dead void usage(void); @@ -189,19 +187,8 @@ entry : ENCODING STRING { set_map(, $2, 0); } | MAPUPPER map { set_map(, $2, 0); } -/* - * XXX PR lib/57798 - * set_digitmap() was implemented with an assumption that - * all characters are mapped to numerical values <= 255. - * This is no longer true for Unicode, and results in, e.g., - * wrong return values of wcwidth(3) for U+5146 or U+16B60. - * - * | DIGITMAP map - * { set_digitmap(, $2); } - * - */ - | DIGITMAP mapignore - { } + | DIGITMAP map + { set_digitmap(, $2); } ; list : RUNE @@ -267,12 +254,6 @@ map : LBRK RUNE RUNE RBRK $$->next = $1; } ; - -mapignore : LBRK RUNE RUNE RBRK { } - | map LBRK RUNE RUNE RBRK { } - | LBRK RUNE THRU RUNE ':' RUNE RBRK { } - | map LBRK RUNE THRU RUNE ':' RUNE RBRK { } - ; %% int debug = 0; @@ -401,7 +382,6 @@ set_map(rune_map *map, rune_list *list, } } -#if 0 void set_digitmap(rune_map *map, rune_list *list) { @@ -410,18 +390,24 @@ set_digitmap(rune_map *map, rune_list *l while (list) { rune_list *nlist = list->next; for (i = list->min; i <= list->max; ++i) { - if (list->map + (i - list->min)) { + /* + * XXX PR lib/57798 + * Currently, we support mapping up to 255. Attempts to map + * 256 (== _RUNETYPE_A) and above are silently ignored. + */ + _RuneType digit = list->map + (i - list->min); + if (digit > 0 && digit <= 0xff) { rune_list *tmp = (rune_list *)xmalloc(sizeof(rune_list)); + memset(tmp, 0,
CVS commit: src/usr.bin/mklocale
Module Name:src Committed By: rin Date: Fri Jan 5 02:38:06 UTC 2024 Modified Files: src/usr.bin/mklocale: mklocale.1 yacc.y Log Message: mklocale(1): Add range check for TODIGIT, rather than disabling it PR lib/57798 Digit value specified by TODIGIT is storaged as lowest 8 bits of _RuneType, see lib/libc/locale/runetype_file.h: https://nxr.netbsd.org/xref/src/lib/libc/locale/runetype_file.h#56 The symptom reported in the PR is due to missing range check for this value; values of 256 and above were mistakenly treated as other flag bits in _RuneType. For example, U+5146 has numerical value 1000,000,000,000 == 0xe8d4a51000 where __BITS(30, 31) == _RUNETYPE_SW3 are turned on. This is why wcwidth(3) returned 3 for this character. This apparently affected not only character width, but also other attributes storaged in _RuneType. IIUC, digit value attributes in _RuneType have never been utilized until now, but preserve these if digit fits within (0, 256). This should be safer for pulling this up into netbsd-10. Also, these attributes may be useful to implement some I18N features as suggested by uwe@ in the PR. netbsd-[98] is not affected as these use old UTF-8 ctype definitions. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/usr.bin/mklocale/mklocale.1 cvs rdiff -u -r1.35 -r1.36 src/usr.bin/mklocale/yacc.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: rin Date: Mon Jan 1 13:38:57 UTC 2024 Modified Files: src/sys/stand/efiboot: efinet.c Log Message: MI efiboot: Revert "Stop using efi_bootdp after exclusive open for PXE" http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/stand/efiboot/efinet.c#rev1.7 Some UEFI implementations pass multiple boot options as boot device path, and NULL-clearing it results in boot failures. Thanks skrll@ for pointing it out. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/stand/efiboot/efinet.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: rin Date: Mon Jan 1 13:38:57 UTC 2024 Modified Files: src/sys/stand/efiboot: efinet.c Log Message: MI efiboot: Revert "Stop using efi_bootdp after exclusive open for PXE" http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/stand/efiboot/efinet.c#rev1.7 Some UEFI implementations pass multiple boot options as boot device path, and NULL-clearing it results in boot failures. Thanks skrll@ for pointing it out. To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 src/sys/stand/efiboot/efinet.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/stand/efiboot/efinet.c diff -u src/sys/stand/efiboot/efinet.c:1.8 src/sys/stand/efiboot/efinet.c:1.9 --- src/sys/stand/efiboot/efinet.c:1.8 Wed Dec 27 09:40:35 2023 +++ src/sys/stand/efiboot/efinet.c Mon Jan 1 13:38:57 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: efinet.c,v 1.8 2023/12/27 09:40:35 rin Exp $ */ +/* $NetBSD: efinet.c,v 1.9 2024/01/01 13:38:57 rin Exp $ */ /*- * Copyright (c) 2001 Doug Rabson @@ -333,7 +333,7 @@ efi_net_probe(void) EFI_STATUS status; UINTN i, nhandles; int nifs, depth = -1; - bool found, is_bootdp; + bool found; status = LibLocateHandle(ByProtocol, , NULL, , ); @@ -377,9 +377,6 @@ efi_net_probe(void) if (!found) continue; - is_bootdp = depth > 0 && - efi_device_path_ncmp(efi_bootdp, dp0, depth) == 0; - status = uefi_call_wrapper(BS->OpenProtocol, 6, handles[i], , (void **), IH, NULL, EFI_OPEN_PROTOCOL_EXCLUSIVE); @@ -407,21 +404,10 @@ efi_net_probe(void) return; } - if (is_bootdp) { - /* - * This is boot device... - */ + if (depth > 0 && efi_device_path_ncmp(efi_bootdp, dp0, depth) == 0) { char devname[9]; - snprintf(devname, sizeof(devname), "net%u", nifs); set_default_device(devname); - - /* - * and now opened for us excluively. Therefore, - * access via device path is illegal. - */ - efi_bootdp = NULL; - depth = -1; } nifs++;
CVS commit: src/sys/arch/macppc/macppc
Module Name:src Committed By: rin Date: Thu Dec 28 04:43:55 UTC 2023 Modified Files: src/sys/arch/macppc/macppc: rbus_machdep.c Log Message: macppc/cardbus: Belatedly catch up with battable resolution change Fix pmap_extract() failures on models with cardslot, for direct-mapped buffers allocated by PMAP_ALLOC_POOLPAGE(). This driver had corrupted battable[] over 11 years, since resolution of battable was changed from 256MB to 8MB: https://github.com/NetBSD/src/commit/413fb4c3c505a13900a9dff86f563fc58ff04005 Now, indexes for battable[] should be calculated by (va >> 23), but rather, use oea_iobat_add() instead of directly modifying battable[]. TODO: - Add some consistency checks to oea_iobat_add(). - Map reasonable VA space for cardbus(4), if OFW does not. Note that hardcoded value of 0x9000-0x9fff should be safe for now, not that elegant although. For macppc models, IIUC, RAM is *not* mapped to 0x8000-0x, and VA reserved for kernel and copy{in,out} is 0xc000-0xefff. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/macppc/macppc/rbus_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/macppc/macppc
Module Name:src Committed By: rin Date: Thu Dec 28 04:43:55 UTC 2023 Modified Files: src/sys/arch/macppc/macppc: rbus_machdep.c Log Message: macppc/cardbus: Belatedly catch up with battable resolution change Fix pmap_extract() failures on models with cardslot, for direct-mapped buffers allocated by PMAP_ALLOC_POOLPAGE(). This driver had corrupted battable[] over 11 years, since resolution of battable was changed from 256MB to 8MB: https://github.com/NetBSD/src/commit/413fb4c3c505a13900a9dff86f563fc58ff04005 Now, indexes for battable[] should be calculated by (va >> 23), but rather, use oea_iobat_add() instead of directly modifying battable[]. TODO: - Add some consistency checks to oea_iobat_add(). - Map reasonable VA space for cardbus(4), if OFW does not. Note that hardcoded value of 0x9000-0x9fff should be safe for now, not that elegant although. For macppc models, IIUC, RAM is *not* mapped to 0x8000-0x, and VA reserved for kernel and copy{in,out} is 0xc000-0xefff. To generate a diff of this commit: cvs rdiff -u -r1.18 -r1.19 src/sys/arch/macppc/macppc/rbus_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/macppc/macppc/rbus_machdep.c diff -u src/sys/arch/macppc/macppc/rbus_machdep.c:1.18 src/sys/arch/macppc/macppc/rbus_machdep.c:1.19 --- src/sys/arch/macppc/macppc/rbus_machdep.c:1.18 Fri Jul 1 18:43:05 2011 +++ src/sys/arch/macppc/macppc/rbus_machdep.c Thu Dec 28 04:43:55 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: rbus_machdep.c,v 1.18 2011/07/01 18:43:05 dyoung Exp $ */ +/* $NetBSD: rbus_machdep.c,v 1.19 2023/12/28 04:43:55 rin Exp $ */ /* * Copyright (c) 1999 @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: rbus_machdep.c,v 1.18 2011/07/01 18:43:05 dyoung Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rbus_machdep.c,v 1.19 2023/12/28 04:43:55 rin Exp $"); #include #include @@ -92,8 +92,7 @@ rbus_pccbb_parent_mem(struct pci_attach_ size = 0x1000; } - battable[start >> 28].batl = BATL(start, BAT_I, BAT_PP_RW); - battable[start >> 28].batu = BATU(start, BAT_BL_256M, BAT_Vs); + oea_iobat_add(start, size); return rbus_new_root_delegate(pa->pa_memt, start, size, 0); }
CVS commit: src/usr.bin/mklocale
Module Name:src Committed By: rin Date: Thu Dec 28 03:49:35 UTC 2023 Modified Files: src/usr.bin/mklocale: mklocale.1 yacc.y Log Message: mklocale: XXX: Neglect TODIGIT at the moment PR lib/57798 It was implemented with an assumption that all digit characters can be mapped to numerical values <= 255. This is no longer true for Unicode, and results in, e.g., wrong return values of wcwidth(3) for U+5146 or U+16B60. As a workaround, neglect TODIGIT for now, as done for OpenBSD: https://github.com/OpenBSD/src/commit/4efe9bdeb34 XXX At least netbsd-10 should be fixed, but it requires some tests. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.bin/mklocale/mklocale.1 cvs rdiff -u -r1.34 -r1.35 src/usr.bin/mklocale/yacc.y Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/usr.bin/mklocale
Module Name:src Committed By: rin Date: Thu Dec 28 03:49:35 UTC 2023 Modified Files: src/usr.bin/mklocale: mklocale.1 yacc.y Log Message: mklocale: XXX: Neglect TODIGIT at the moment PR lib/57798 It was implemented with an assumption that all digit characters can be mapped to numerical values <= 255. This is no longer true for Unicode, and results in, e.g., wrong return values of wcwidth(3) for U+5146 or U+16B60. As a workaround, neglect TODIGIT for now, as done for OpenBSD: https://github.com/OpenBSD/src/commit/4efe9bdeb34 XXX At least netbsd-10 should be fixed, but it requires some tests. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/usr.bin/mklocale/mklocale.1 cvs rdiff -u -r1.34 -r1.35 src/usr.bin/mklocale/yacc.y 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/mklocale/mklocale.1 diff -u src/usr.bin/mklocale/mklocale.1:1.17 src/usr.bin/mklocale/mklocale.1:1.18 --- src/usr.bin/mklocale/mklocale.1:1.17 Mon Jul 3 21:34:20 2017 +++ src/usr.bin/mklocale/mklocale.1 Thu Dec 28 03:49:35 2023 @@ -1,4 +1,4 @@ -.\" $NetBSD: mklocale.1,v 1.17 2017/07/03 21:34:20 wiz Exp $ +.\" $NetBSD: mklocale.1,v 1.18 2023/12/28 03:49:35 rin Exp $ .\" FreeBSD: src/usr.bin/mklocale/mklocale.1,v 1.6 1999/09/20 09:15:21 phantom Exp .\" .\" Copyright (c) 1993, 1994 @@ -33,7 +33,7 @@ .\" .\" @(#)mklocale.1 8.2 (Berkeley) 4/18/94 .\" -.Dd July 15, 2013 +.Dd December 28, 2023 .Dt MKLOCALE 1 .Os .Sh NAME @@ -210,7 +210,9 @@ is the integer value represented by For example, the ASCII character .Sq 0 would map to the decimal value 0. -Only values up to 255 are allowed. +On +.Nx , +this information is ignored and not put into the binary output file. .El .Pp The following keywords may appear multiple times and have the following Index: src/usr.bin/mklocale/yacc.y diff -u src/usr.bin/mklocale/yacc.y:1.34 src/usr.bin/mklocale/yacc.y:1.35 --- src/usr.bin/mklocale/yacc.y:1.34 Sun Oct 13 21:12:32 2019 +++ src/usr.bin/mklocale/yacc.y Thu Dec 28 03:49:35 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: yacc.y,v 1.34 2019/10/13 21:12:32 christos Exp $ */ +/* $NetBSD: yacc.y,v 1.35 2023/12/28 03:49:35 rin Exp $ */ %{ /*- @@ -43,7 +43,7 @@ static char sccsid[] = "@(#)yacc.y 8.1 (Berkeley) 6/6/93"; static char rcsid[] = "$FreeBSD$"; #else -__RCSID("$NetBSD: yacc.y,v 1.34 2019/10/13 21:12:32 christos Exp $"); +__RCSID("$NetBSD: yacc.y,v 1.35 2023/12/28 03:49:35 rin Exp $"); #endif #endif /* not lint */ @@ -82,7 +82,9 @@ __nbrune_t charsetmask = (__nbrune_t)0x0 __nbrune_t charsetmask = (__nbrune_t)0x; void set_map(rune_map *, rune_list *, u_int32_t); +#if 0 void set_digitmap(rune_map *, rune_list *); +#endif void add_map(rune_map *, rune_list *, u_int32_t); __dead void usage(void); @@ -187,8 +189,19 @@ entry : ENCODING STRING { set_map(, $2, 0); } | MAPUPPER map { set_map(, $2, 0); } - | DIGITMAP map - { set_digitmap(, $2); } +/* + * XXX PR lib/57798 + * set_digitmap() was implemented with an assumption that + * all characters are mapped to numerical values <= 255. + * This is no longer true for Unicode, and results in, e.g., + * wrong return values of wcwidth(3) for U+5146 or U+16B60. + * + * | DIGITMAP map + * { set_digitmap(, $2); } + * + */ + | DIGITMAP mapignore + { } ; list : RUNE @@ -254,6 +267,12 @@ map : LBRK RUNE RUNE RBRK $$->next = $1; } ; + +mapignore : LBRK RUNE RUNE RBRK { } + | map LBRK RUNE RUNE RBRK { } + | LBRK RUNE THRU RUNE ':' RUNE RBRK { } + | map LBRK RUNE THRU RUNE ':' RUNE RBRK { } + ; %% int debug = 0; @@ -382,6 +401,7 @@ set_map(rune_map *map, rune_list *list, } } +#if 0 void set_digitmap(rune_map *map, rune_list *list) { @@ -401,6 +421,7 @@ set_digitmap(rune_map *map, rune_list *l list = nlist; } } +#endif void add_map(rune_map *map, rune_list *list, u_int32_t flag)
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: rin Date: Wed Dec 27 09:40:35 UTC 2023 Modified Files: src/sys/stand/efiboot: efinet.c Log Message: MI efiboot: efi_net_probe: Examine Messaging Device Path also Network devices can be found as Hardware or Messaging Device Paths, see Sec 10.4.4 of UEFI Spec 2.10. In addition to Hardware Device Path, try Messaging Device Path also. This fixes PXE boot on implementations with the latter choice, e.g., Raspberry Pi 4 UEFI firmware. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/stand/efiboot/efinet.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: rin Date: Wed Dec 27 09:40:35 UTC 2023 Modified Files: src/sys/stand/efiboot: efinet.c Log Message: MI efiboot: efi_net_probe: Examine Messaging Device Path also Network devices can be found as Hardware or Messaging Device Paths, see Sec 10.4.4 of UEFI Spec 2.10. In addition to Hardware Device Path, try Messaging Device Path also. This fixes PXE boot on implementations with the latter choice, e.g., Raspberry Pi 4 UEFI firmware. To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/stand/efiboot/efinet.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/stand/efiboot/efinet.c diff -u src/sys/stand/efiboot/efinet.c:1.7 src/sys/stand/efiboot/efinet.c:1.8 --- src/sys/stand/efiboot/efinet.c:1.7 Wed Dec 27 09:28:04 2023 +++ src/sys/stand/efiboot/efinet.c Wed Dec 27 09:40:35 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: efinet.c,v 1.7 2023/12/27 09:28:04 rin Exp $ */ +/* $NetBSD: efinet.c,v 1.8 2023/12/27 09:40:35 rin Exp $ */ /*- * Copyright (c) 2001 Doug Rabson @@ -346,7 +346,15 @@ efi_net_probe(void) memset(enis, 0, nhandles * sizeof(*enis)); if (efi_bootdp) { + /* + * Either Hardware or Messaging Device Paths can be used + * here, see Sec 10.4.4 of UEFI Spec 2.10. Try both. + */ depth = efi_device_path_depth(efi_bootdp, HARDWARE_DEVICE_PATH); + if (depth == -1) { + depth = efi_device_path_depth(efi_bootdp, + MESSAGING_DEVICE_PATH); + } if (depth == 0) depth = 1; }
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: rin Date: Wed Dec 27 09:28:04 UTC 2023 Modified Files: src/sys/stand/efiboot: efinet.c Log Message: MI efiboot: Stop using efi_bootdp after exclusive open for PXE Once boot device is exclusively opened for Simple Network Protocol, further access via device path (efi_bootdp) is illegal. For some implementations, boot device path gets corrupted by exclusive open, and subsequent access by efi_device_path_depth(), e.g., causes infinite recursion. Fix PXE boot for QEMU/aarch64 with EDK2 on some Linux distributions. Thanks yamaguchi@ for comments and tests. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/stand/efiboot/efinet.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/stand/efiboot/efinet.c diff -u src/sys/stand/efiboot/efinet.c:1.6 src/sys/stand/efiboot/efinet.c:1.7 --- src/sys/stand/efiboot/efinet.c:1.6 Sun Mar 31 22:24:41 2019 +++ src/sys/stand/efiboot/efinet.c Wed Dec 27 09:28:04 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: efinet.c,v 1.6 2019/03/31 22:24:41 jmcneill Exp $ */ +/* $NetBSD: efinet.c,v 1.7 2023/12/27 09:28:04 rin Exp $ */ /*- * Copyright (c) 2001 Doug Rabson @@ -333,7 +333,7 @@ efi_net_probe(void) EFI_STATUS status; UINTN i, nhandles; int nifs, depth = -1; - bool found; + bool found, is_bootdp; status = LibLocateHandle(ByProtocol, , NULL, , ); @@ -369,6 +369,9 @@ efi_net_probe(void) if (!found) continue; + is_bootdp = depth > 0 && + efi_device_path_ncmp(efi_bootdp, dp0, depth) == 0; + status = uefi_call_wrapper(BS->OpenProtocol, 6, handles[i], , (void **), IH, NULL, EFI_OPEN_PROTOCOL_EXCLUSIVE); @@ -396,10 +399,21 @@ efi_net_probe(void) return; } - if (depth > 0 && efi_device_path_ncmp(efi_bootdp, dp0, depth) == 0) { + if (is_bootdp) { + /* + * This is boot device... + */ char devname[9]; + snprintf(devname, sizeof(devname), "net%u", nifs); set_default_device(devname); + + /* + * and now opened for us excluively. Therefore, + * access via device path is illegal. + */ + efi_bootdp = NULL; + depth = -1; } nifs++;
CVS commit: src/sys/stand/efiboot
Module Name:src Committed By: rin Date: Wed Dec 27 09:28:04 UTC 2023 Modified Files: src/sys/stand/efiboot: efinet.c Log Message: MI efiboot: Stop using efi_bootdp after exclusive open for PXE Once boot device is exclusively opened for Simple Network Protocol, further access via device path (efi_bootdp) is illegal. For some implementations, boot device path gets corrupted by exclusive open, and subsequent access by efi_device_path_depth(), e.g., causes infinite recursion. Fix PXE boot for QEMU/aarch64 with EDK2 on some Linux distributions. Thanks yamaguchi@ for comments and tests. To generate a diff of this commit: cvs rdiff -u -r1.6 -r1.7 src/sys/stand/efiboot/efinet.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/powerpc
Module Name:src Committed By: rin Date: Fri Dec 15 09:44:00 UTC 2023 Modified Files: src/sys/arch/powerpc/include: pmap.h src/sys/arch/powerpc/powerpc: bus_dma.c vm_machdep.c Log Message: powerpc: Make sure direct-mapped buffer fits within correct range For OEA and OEA64_BRIDGE, only first 3GiB memory is direct-mapped. Part of PR kern/57621 To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/powerpc/include/pmap.h cvs rdiff -u -r1.55 -r1.56 src/sys/arch/powerpc/powerpc/bus_dma.c cvs rdiff -u -r1.105 -r1.106 src/sys/arch/powerpc/powerpc/vm_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/powerpc/include/pmap.h diff -u src/sys/arch/powerpc/include/pmap.h:1.42 src/sys/arch/powerpc/include/pmap.h:1.43 --- src/sys/arch/powerpc/include/pmap.h:1.42 Sat May 7 07:10:46 2022 +++ src/sys/arch/powerpc/include/pmap.h Fri Dec 15 09:43:59 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.42 2022/05/07 07:10:46 rin Exp $ */ +/* $NetBSD: pmap.h,v 1.43 2023/12/15 09:43:59 rin Exp $ */ #ifndef _POWERPC_PMAP_H_ #define _POWERPC_PMAP_H_ @@ -20,6 +20,10 @@ #error unknown PPC variant #endif +#ifndef PMAP_DIRECT_MAPPED_LEN +#define PMAP_DIRECT_MAPPED_LEN (~0UL) +#endif + #endif /* !_MODULE */ #if !defined(_LOCORE) && (defined(MODULAR) || defined(_MODULE)) Index: src/sys/arch/powerpc/powerpc/bus_dma.c diff -u src/sys/arch/powerpc/powerpc/bus_dma.c:1.55 src/sys/arch/powerpc/powerpc/bus_dma.c:1.56 --- src/sys/arch/powerpc/powerpc/bus_dma.c:1.55 Tue Jul 26 20:08:56 2022 +++ src/sys/arch/powerpc/powerpc/bus_dma.c Fri Dec 15 09:43:59 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: bus_dma.c,v 1.55 2022/07/26 20:08:56 andvar Exp $ */ +/* $NetBSD: bus_dma.c,v 1.56 2023/12/15 09:43:59 rin Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. @@ -33,7 +33,7 @@ #define _POWERPC_BUS_DMA_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.55 2022/07/26 20:08:56 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bus_dma.c,v 1.56 2023/12/15 09:43:59 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_ppcarch.h" @@ -707,8 +707,10 @@ _bus_dmamem_map(bus_dma_tag_t t, bus_dma if (nsegs == 1 && (flags & BUS_DMA_DONTCACHE) == 0) { KASSERT(size == segs->ds_len); addr = BUS_MEM_TO_PHYS(t, segs->ds_addr); - *kvap = (void *)PMAP_MAP_POOLPAGE(addr); - return 0; + if (__predict_true(addr + size < PMAP_DIRECT_MAPPED_LEN)) { + *kvap = (void *)PMAP_MAP_POOLPAGE(addr); + return 0; + } } #endif Index: src/sys/arch/powerpc/powerpc/vm_machdep.c diff -u src/sys/arch/powerpc/powerpc/vm_machdep.c:1.105 src/sys/arch/powerpc/powerpc/vm_machdep.c:1.106 --- src/sys/arch/powerpc/powerpc/vm_machdep.c:1.105 Mon Dec 5 16:01:03 2022 +++ src/sys/arch/powerpc/powerpc/vm_machdep.c Fri Dec 15 09:43:59 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: vm_machdep.c,v 1.105 2022/12/05 16:01:03 martin Exp $ */ +/* $NetBSD: vm_machdep.c,v 1.106 2023/12/15 09:43:59 rin Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -32,7 +32,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.105 2022/12/05 16:01:03 martin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vm_machdep.c,v 1.106 2023/12/15 09:43:59 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_altivec.h" @@ -322,7 +322,8 @@ cpu_uarea_alloc(bool system) * Allocate a new physically contiguous uarea which can be * direct-mapped. */ - error = uvm_pglistalloc(USPACE, 0, ~0UL, 0, 0, , 1, 1); + error = uvm_pglistalloc(USPACE, 0, PMAP_DIRECT_MAPPED_LEN, 0, 0, + , 1, 1); if (error) { return NULL; }
CVS commit: src/sys/arch/powerpc
Module Name:src Committed By: rin Date: Fri Dec 15 09:44:00 UTC 2023 Modified Files: src/sys/arch/powerpc/include: pmap.h src/sys/arch/powerpc/powerpc: bus_dma.c vm_machdep.c Log Message: powerpc: Make sure direct-mapped buffer fits within correct range For OEA and OEA64_BRIDGE, only first 3GiB memory is direct-mapped. Part of PR kern/57621 To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/sys/arch/powerpc/include/pmap.h cvs rdiff -u -r1.55 -r1.56 src/sys/arch/powerpc/powerpc/bus_dma.c cvs rdiff -u -r1.105 -r1.106 src/sys/arch/powerpc/powerpc/vm_machdep.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/powerpc
Module Name:src Committed By: rin Date: Fri Dec 15 09:42:33 UTC 2023 Modified Files: src/sys/arch/powerpc/include: vmparam.h src/sys/arch/powerpc/include/oea: pmap.h src/sys/arch/powerpc/oea: pmap.c pmap_kernel.c Log Message: powerpc: oea: For OEA64_BRIDGE, 1:1 map up to 3GiB memory As done for OEA. Note that kva over 3GiB is reserved. Provide PMAP_MAP_POOLPAGE for OEA64_BRIDGE at the same time, by which direct-mapped memory is utilized in order to work around starvation of 512MiB kernel virtual space. PR kern/57621 To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/powerpc/include/vmparam.h cvs rdiff -u -r1.38 -r1.39 src/sys/arch/powerpc/include/oea/pmap.h cvs rdiff -u -r1.120 -r1.121 src/sys/arch/powerpc/oea/pmap.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/powerpc/oea/pmap_kernel.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/powerpc/include/vmparam.h diff -u src/sys/arch/powerpc/include/vmparam.h:1.26 src/sys/arch/powerpc/include/vmparam.h:1.27 --- src/sys/arch/powerpc/include/vmparam.h:1.26 Wed May 11 13:58:43 2022 +++ src/sys/arch/powerpc/include/vmparam.h Fri Dec 15 09:42:33 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: vmparam.h,v 1.26 2022/05/11 13:58:43 andvar Exp $ */ +/* $NetBSD: vmparam.h,v 1.27 2023/12/15 09:42:33 rin Exp $ */ #ifndef _POWERPC_VMPARAM_H_ #define _POWERPC_VMPARAM_H_ @@ -12,7 +12,7 @@ * These are common for BOOKE, IBM4XX, and OEA */ #define VM_FREELIST_DEFAULT 0 -#define VM_FREELIST_FIRST256 1 +#define VM_FREELIST_DIRECT_MAPPED 1 #define VM_FREELIST_FIRST16 2 #define VM_NFREELIST 3 Index: src/sys/arch/powerpc/include/oea/pmap.h diff -u src/sys/arch/powerpc/include/oea/pmap.h:1.38 src/sys/arch/powerpc/include/oea/pmap.h:1.39 --- src/sys/arch/powerpc/include/oea/pmap.h:1.38 Thu Sep 28 06:19:19 2023 +++ src/sys/arch/powerpc/include/oea/pmap.h Fri Dec 15 09:42:33 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.h,v 1.38 2023/09/28 06:19:19 skrll Exp $ */ +/* $NetBSD: pmap.h,v 1.39 2023/12/15 09:42:33 rin Exp $ */ /*- * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -121,6 +121,16 @@ __BEGIN_DECLS #include #include +/* + * For OEA and OEA64_BRIDGE, we guarantee that pa below USER_ADDR + * (== 3GB < VM_MIN_KERNEL_ADDRESS) is direct-mapped. + */ +#if defined(PPC_OEA) || defined(PPC_OEA64_BRIDGE) +#define PMAP_DIRECT_MAPPED_SR (USER_SR - 1) +#define PMAP_DIRECT_MAPPED_LEN \ +((vaddr_t)SEGMENT_LENGTH * (PMAP_DIRECT_MAPPED_SR + 1)) +#endif + #if defined (PPC_OEA) || defined (PPC_OEA64_BRIDGE) extern register_t iosrtable[]; #endif @@ -186,10 +196,13 @@ static __inline paddr_t vtophys (vaddr_t * VA==PA all at once. But pmap_copy_page() and pmap_zero_page() will have * this problem, too. */ -#if !defined(PPC_OEA64) && !defined (PPC_OEA64_BRIDGE) +#if !defined(PPC_OEA64) #define PMAP_MAP_POOLPAGE(pa) (pa) #define PMAP_UNMAP_POOLPAGE(pa) (pa) #define POOL_VTOPHYS(va) vtophys((vaddr_t) va) + +#define PMAP_ALLOC_POOLPAGE(flags) pmap_alloc_poolpage(flags) +struct vm_page *pmap_alloc_poolpage(int); #endif static __inline paddr_t Index: src/sys/arch/powerpc/oea/pmap.c diff -u src/sys/arch/powerpc/oea/pmap.c:1.120 src/sys/arch/powerpc/oea/pmap.c:1.121 --- src/sys/arch/powerpc/oea/pmap.c:1.120 Fri Dec 15 09:36:35 2023 +++ src/sys/arch/powerpc/oea/pmap.c Fri Dec 15 09:42:33 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.120 2023/12/15 09:36:35 rin Exp $ */ +/* $NetBSD: pmap.c,v 1.121 2023/12/15 09:42:33 rin Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.120 2023/12/15 09:36:35 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.121 2023/12/15 09:42:33 rin Exp $"); #define PMAP_NOOPNAMES @@ -342,18 +342,6 @@ struct pvo_tqhead *pmap_pvo_table; /* pv struct pool pmap_pool; /* pool for pmap structures */ struct pool pmap_pvo_pool; /* pool for pvo entries */ -/* - * We keep a cache of unmanaged pages to be used for pvo entries for - * unmanaged pages. - */ -struct pvo_page { - SIMPLEQ_ENTRY(pvo_page) pvop_link; -}; -SIMPLEQ_HEAD(pvop_head, pvo_page); -static struct pvop_head pmap_pvop_head = SIMPLEQ_HEAD_INITIALIZER(pmap_pvop_head); -static u_long pmap_pvop_free; -static u_long pmap_pvop_maxfree; - static void *pmap_pool_alloc(struct pool *, int); static void pmap_pool_free(struct pool *, void *); @@ -1137,7 +1125,7 @@ pmap_create(void) pmap_t pm; pm = pool_get(_pool, PR_WAITOK | PR_ZERO); - KASSERT((vaddr_t)pm < VM_MIN_KERNEL_ADDRESS); + KASSERT((vaddr_t)pm < PMAP_DIRECT_MAPPED_LEN); pmap_pinit(pm); DPRINTFN(CREATE, "pmap_create: pm %p:\n" @@ -1381,7 +1369,7 @@ pmap_pvo_find_va(pmap_t pm, vaddr_t va, TAILQ_FOREACH(pvo, _pvo_table[ptegidx], pvo_olink) { #if defined(DIAGNOSTIC) || defined(DEBUG) || defined(PMAPCHECK) - if ((uintptr_t) pvo >= SEGMENT_LENGTH) +
CVS commit: src/sys/arch/powerpc
Module Name:src Committed By: rin Date: Fri Dec 15 09:42:33 UTC 2023 Modified Files: src/sys/arch/powerpc/include: vmparam.h src/sys/arch/powerpc/include/oea: pmap.h src/sys/arch/powerpc/oea: pmap.c pmap_kernel.c Log Message: powerpc: oea: For OEA64_BRIDGE, 1:1 map up to 3GiB memory As done for OEA. Note that kva over 3GiB is reserved. Provide PMAP_MAP_POOLPAGE for OEA64_BRIDGE at the same time, by which direct-mapped memory is utilized in order to work around starvation of 512MiB kernel virtual space. PR kern/57621 To generate a diff of this commit: cvs rdiff -u -r1.26 -r1.27 src/sys/arch/powerpc/include/vmparam.h cvs rdiff -u -r1.38 -r1.39 src/sys/arch/powerpc/include/oea/pmap.h cvs rdiff -u -r1.120 -r1.121 src/sys/arch/powerpc/oea/pmap.c cvs rdiff -u -r1.13 -r1.14 src/sys/arch/powerpc/oea/pmap_kernel.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/powerpc/oea
Module Name:src Committed By: rin Date: Fri Dec 15 09:36:36 UTC 2023 Modified Files: src/sys/arch/powerpc/oea: pmap.c Log Message: powerpc/oea: pmap_create: Use PR_ZERO and drop memset(9), NFC Part of PR kern/57621 To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/sys/arch/powerpc/oea/pmap.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/powerpc/oea/pmap.c diff -u src/sys/arch/powerpc/oea/pmap.c:1.119 src/sys/arch/powerpc/oea/pmap.c:1.120 --- src/sys/arch/powerpc/oea/pmap.c:1.119 Fri Dec 15 09:35:29 2023 +++ src/sys/arch/powerpc/oea/pmap.c Fri Dec 15 09:36:35 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.119 2023/12/15 09:35:29 rin Exp $ */ +/* $NetBSD: pmap.c,v 1.120 2023/12/15 09:36:35 rin Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.119 2023/12/15 09:35:29 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.120 2023/12/15 09:36:35 rin Exp $"); #define PMAP_NOOPNAMES @@ -1136,9 +1136,8 @@ pmap_create(void) { pmap_t pm; - pm = pool_get(_pool, PR_WAITOK); + pm = pool_get(_pool, PR_WAITOK | PR_ZERO); KASSERT((vaddr_t)pm < VM_MIN_KERNEL_ADDRESS); - memset((void *)pm, 0, sizeof *pm); pmap_pinit(pm); DPRINTFN(CREATE, "pmap_create: pm %p:\n"
CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: rin Date: Fri Dec 15 09:36:36 UTC 2023 Modified Files: src/sys/arch/powerpc/oea: pmap.c Log Message: powerpc/oea: pmap_create: Use PR_ZERO and drop memset(9), NFC Part of PR kern/57621 To generate a diff of this commit: cvs rdiff -u -r1.119 -r1.120 src/sys/arch/powerpc/oea/pmap.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/powerpc/oea
Module Name:src Committed By: rin Date: Fri Dec 15 09:35:29 UTC 2023 Modified Files: src/sys/arch/powerpc/oea: pmap.c Log Message: powerpc/oea: pmap: Fix mostly-pointless overhead of pmap_pvo_pool (1) Drop __aligned(32) from struct pvo_entry; otherwise, sizeof(struct pvo_entry) is round-up'ed to a multiple of 32. (2) Do not set sizeof(struct pvo_entry) to `align` argument for pool_init(9); it must be power of 2. (3) Align pvo_entry to 32-byte boundary only if reasonably possible, i.e., OEA without DIAGNOSTIC (--> POOL_REDZONE) for now. Part of PR kern/57621 To generate a diff of this commit: cvs rdiff -u -r1.118 -r1.119 src/sys/arch/powerpc/oea/pmap.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/powerpc/oea/pmap.c diff -u src/sys/arch/powerpc/oea/pmap.c:1.118 src/sys/arch/powerpc/oea/pmap.c:1.119 --- src/sys/arch/powerpc/oea/pmap.c:1.118 Fri Dec 15 09:33:29 2023 +++ src/sys/arch/powerpc/oea/pmap.c Fri Dec 15 09:35:29 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.118 2023/12/15 09:33:29 rin Exp $ */ +/* $NetBSD: pmap.c,v 1.119 2023/12/15 09:35:29 rin Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.118 2023/12/15 09:33:29 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.119 2023/12/15 09:35:29 rin Exp $"); #define PMAP_NOOPNAMES @@ -292,7 +292,7 @@ const struct pmap_ops PMAPNAME(ops) = { #endif /* !PMAPNAME */ /* - * The following structure is aligned to 32 bytes + * The following structure is aligned to 32 bytes, if reasonably possible. */ struct pvo_entry { LIST_ENTRY(pvo_entry) pvo_vlink; /* Link to common virt page */ @@ -317,7 +317,14 @@ struct pvo_entry { #define PVO_REMOVE 6 /* PVO has been removed */ #define PVO_WHERE_MASK 15 #define PVO_WHERE_SHFT 8 -} __attribute__ ((aligned (32))); +}; + +#if defined(PMAP_OEA) && !defined(DIAGNOSTIC) +#define PMAP_PVO_ENTRY_ALIGN 32 +#else +#define PMAP_PVO_ENTRY_ALIGN __alignof(struct pvo_entry) +#endif + #define PVO_VADDR(pvo) ((pvo)->pvo_vaddr & ~ADDR_POFF) #define PVO_PTEGIDX_GET(pvo) ((pvo)->pvo_vaddr & PVO_PTEGIDX_MASK) #define PVO_PTEGIDX_ISSET(pvo) ((pvo)->pvo_vaddr & PVO_PTEGIDX_VALID) @@ -3440,7 +3447,7 @@ pmap_bootstrap1(paddr_t kernelstart, pad #endif pool_init(_pvo_pool, sizeof(struct pvo_entry), - sizeof(struct pvo_entry), 0, 0, "pmap_pvopl", + PMAP_PVO_ENTRY_ALIGN, 0, 0, "pmap_pvopl", _pool_allocator, IPL_VM); pool_setlowat(_pvo_pool, 1008);
CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: rin Date: Fri Dec 15 09:35:29 UTC 2023 Modified Files: src/sys/arch/powerpc/oea: pmap.c Log Message: powerpc/oea: pmap: Fix mostly-pointless overhead of pmap_pvo_pool (1) Drop __aligned(32) from struct pvo_entry; otherwise, sizeof(struct pvo_entry) is round-up'ed to a multiple of 32. (2) Do not set sizeof(struct pvo_entry) to `align` argument for pool_init(9); it must be power of 2. (3) Align pvo_entry to 32-byte boundary only if reasonably possible, i.e., OEA without DIAGNOSTIC (--> POOL_REDZONE) for now. Part of PR kern/57621 To generate a diff of this commit: cvs rdiff -u -r1.118 -r1.119 src/sys/arch/powerpc/oea/pmap.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/powerpc/oea
Module Name:src Committed By: rin Date: Fri Dec 15 09:33:30 UTC 2023 Modified Files: src/sys/arch/powerpc/oea: pmap.c Log Message: powerpc/oea: pmap: Rework pmap_pte_spill() It was broken in many ways... Now, it gets working stable both for OEA and OEA64_BRIDGE, as far as I can see. Part of PR kern/57621 To generate a diff of this commit: cvs rdiff -u -r1.117 -r1.118 src/sys/arch/powerpc/oea/pmap.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/powerpc/oea/pmap.c diff -u src/sys/arch/powerpc/oea/pmap.c:1.117 src/sys/arch/powerpc/oea/pmap.c:1.118 --- src/sys/arch/powerpc/oea/pmap.c:1.117 Fri Dec 15 09:32:05 2023 +++ src/sys/arch/powerpc/oea/pmap.c Fri Dec 15 09:33:29 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.117 2023/12/15 09:32:05 rin Exp $ */ +/* $NetBSD: pmap.c,v 1.118 2023/12/15 09:33:29 rin Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.117 2023/12/15 09:32:05 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.118 2023/12/15 09:33:29 rin Exp $"); #define PMAP_NOOPNAMES @@ -879,48 +879,35 @@ pmap_pte_insert(int ptegidx, struct pte * Tries to spill a page table entry from the overflow area. * This runs in either real mode (if dealing with a exception spill) * or virtual mode when dealing with manually spilling one of the - * kernel's pte entries. In either case, interrupts are already - * disabled. + * kernel's pte entries. */ int -pmap_pte_spill(struct pmap *pm, vaddr_t addr, bool exec) +pmap_pte_spill(struct pmap *pm, vaddr_t addr, bool isi_p) { - struct pvo_entry *source_pvo, *victim_pvo, *next_pvo; - struct pvo_entry *pvo; - /* XXX: gcc -- vpvoh is always set at either *1* or *2* */ - struct pvo_tqhead *pvoh, *vpvoh = NULL; - int ptegidx, i, j; + struct pvo_tqhead *spvoh, *vpvoh; + struct pvo_entry *pvo, *source_pvo, *victim_pvo; volatile struct pteg *pteg; volatile struct pte *pt; + register_t msr, vsid, hash; + int ptegidx, hid, i, j; + int done = 0; PMAP_LOCK(); + msr = pmap_interrupts_off(); + + /* XXXRO paranoid? */ + if (pm->pm_evictions == 0) + goto out; ptegidx = va_to_pteg(pm, addr); /* - * Have to substitute some entry. Use the primary hash for this. - * Use low bits of timebase as random generator. Make sure we are - * not picking a kernel pte for replacement. + * Find source pvo. */ - pteg = _pteg_table[ptegidx]; - i = MFTB() & 7; - for (j = 0; j < 8; j++) { - pt = >pt[i]; - if ((pt->pte_hi & PTE_VALID) == 0) - break; - if (VSID_TO_HASH((pt->pte_hi & PTE_VSID) >> PTE_VSID_SHFT) -< PHYSMAP_VSIDBITS) - break; - i = (i + 1) & 7; - } - KASSERT(j < 8); - + spvoh = _pvo_table[ptegidx]; source_pvo = NULL; - victim_pvo = NULL; - pvoh = _pvo_table[ptegidx]; - TAILQ_FOREACH(pvo, pvoh, pvo_olink) { - + TAILQ_FOREACH(pvo, spvoh, pvo_olink) { /* * We need to find pvo entry for this address... */ @@ -931,101 +918,105 @@ pmap_pte_spill(struct pmap *pm, vaddr_t * a valid PTE, then we know we can't find it because all * evicted PVOs always are first in the list. */ - if (source_pvo == NULL && (pvo->pvo_pte.pte_hi & PTE_VALID)) + if ((pvo->pvo_pte.pte_hi & PTE_VALID) != 0) break; - if (source_pvo == NULL && pm == pvo->pvo_pmap && - addr == PVO_VADDR(pvo)) { - /* - * Now we have found the entry to be spilled into the - * pteg. Attempt to insert it into the page table. - */ - j = pmap_pte_insert(ptegidx, >pvo_pte); - if (j >= 0) { -PVO_PTEGIDX_SET(pvo, j); -PMAP_PVO_CHECK(pvo); /* sanity check */ -PVO_WHERE(pvo, SPILL_INSERT); -pvo->pvo_pmap->pm_evictions--; -PMAPCOUNT(ptes_spilled); -PMAPCOUNT2(((pvo->pvo_pte.pte_hi & PTE_HID) -? pmap_evcnt_ptes_secondary -: pmap_evcnt_ptes_primary)[j]); - -/* - * Since we keep the evicted entries at the - * from of the PVO list, we need move this - * (now resident) PVO after the evicted - * entries. - */ -next_pvo = TAILQ_NEXT(pvo, pvo_olink); - -/* - * If we don't have to move (either we were the - * last entry or the next entry was valid), - * don't change our position. Otherwise - * move ourselves to the tail of the queue. - */ -if (next_pvo != NULL && -!(next_pvo->pvo_pte.pte_hi & PTE_VALID)) { - TAILQ_REMOVE(pvoh, pvo, pvo_olink); - TAILQ_INSERT_TAIL(pvoh, pvo, pvo_olink); -} -PMAP_UNLOCK(); -return 1; + if (pm == pvo->pvo_pmap && addr == PVO_VADDR(pvo)) { + if (isi_p) { +if (!PVO_EXECUTABLE_P(pvo)) + goto out; +#if defined(PMAP_OEA) || defined(PMAP_OEA64_BRIDGE) +int sr __diagused = +PVO_VADDR(pvo) >> ADDR_SR_SHFT; +KASSERT((pm->pm_sr[sr] & SR_NOEXEC) == 0); +#endif } + KASSERT(!PVO_PTEGIDX_ISSET(pvo)); + /* XXXRO where check */ source_pvo =
CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: rin Date: Fri Dec 15 09:33:30 UTC 2023 Modified Files: src/sys/arch/powerpc/oea: pmap.c Log Message: powerpc/oea: pmap: Rework pmap_pte_spill() It was broken in many ways... Now, it gets working stable both for OEA and OEA64_BRIDGE, as far as I can see. Part of PR kern/57621 To generate a diff of this commit: cvs rdiff -u -r1.117 -r1.118 src/sys/arch/powerpc/oea/pmap.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/powerpc/oea
Module Name:src Committed By: rin Date: Fri Dec 15 09:32:05 UTC 2023 Modified Files: src/sys/arch/powerpc/oea: pmap.c Log Message: powerpc/oea: pmap: Drop unused argument for pmap_pvo_reclaim(), NFC Part of PR kern/57621 To generate a diff of this commit: cvs rdiff -u -r1.116 -r1.117 src/sys/arch/powerpc/oea/pmap.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/powerpc/oea/pmap.c diff -u src/sys/arch/powerpc/oea/pmap.c:1.116 src/sys/arch/powerpc/oea/pmap.c:1.117 --- src/sys/arch/powerpc/oea/pmap.c:1.116 Fri Dec 8 21:46:02 2023 +++ src/sys/arch/powerpc/oea/pmap.c Fri Dec 15 09:32:05 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.116 2023/12/08 21:46:02 andvar Exp $ */ +/* $NetBSD: pmap.c,v 1.117 2023/12/15 09:32:05 rin Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.116 2023/12/08 21:46:02 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.117 2023/12/15 09:32:05 rin Exp $"); #define PMAP_NOOPNAMES @@ -388,7 +388,7 @@ static void pmap_pvo_free(struct pvo_ent static void pmap_pvo_free_list(struct pvo_head *); static struct pvo_entry *pmap_pvo_find_va(pmap_t, vaddr_t, int *); static volatile struct pte *pmap_pvo_to_pte(const struct pvo_entry *, int); -static struct pvo_entry *pmap_pvo_reclaim(struct pmap *); +static struct pvo_entry *pmap_pvo_reclaim(void); static void pvo_set_exec(struct pvo_entry *); static void pvo_clear_exec(struct pvo_entry *); @@ -1507,7 +1507,7 @@ pmap_pvo_check(const struct pvo_entry *p */ struct pvo_entry * -pmap_pvo_reclaim(struct pmap *pm) +pmap_pvo_reclaim(void) { struct pvo_tqhead *pvoh; struct pvo_entry *pvo; @@ -1615,7 +1615,7 @@ pmap_pvo_enter(pmap_t pm, struct pool *p ++pmap_pvo_enter_depth; #endif if (pvo == NULL) { - pvo = pmap_pvo_reclaim(pm); + pvo = pmap_pvo_reclaim(); if (pvo == NULL) { if ((flags & PMAP_CANFAIL) == 0) panic("pmap_pvo_enter: failed");
CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: rin Date: Fri Dec 15 09:32:05 UTC 2023 Modified Files: src/sys/arch/powerpc/oea: pmap.c Log Message: powerpc/oea: pmap: Drop unused argument for pmap_pvo_reclaim(), NFC Part of PR kern/57621 To generate a diff of this commit: cvs rdiff -u -r1.116 -r1.117 src/sys/arch/powerpc/oea/pmap.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/powerpc/powerpc
Module Name:src Committed By: rin Date: Fri Dec 15 09:31:03 UTC 2023 Modified Files: src/sys/arch/powerpc/powerpc: trap.c Log Message: powerpc/oea: trap: pmap_{pte,ste}_spill() even in the interrupt context Page table for oea is something like L2 TLB on memory; kernel and processes share its entries, and process entries can be spilled out. As done for MMU based on software-managed TLB, we need to restore such entries even in the interrupt context. Note that pmap_pte_spill() require no resouce to restore entries. Still-not-implemented pmap_ste_spill() for OEA64 should also. Part of PR kern/57621 To generate a diff of this commit: cvs rdiff -u -r1.164 -r1.165 src/sys/arch/powerpc/powerpc/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/powerpc/powerpc/trap.c diff -u src/sys/arch/powerpc/powerpc/trap.c:1.164 src/sys/arch/powerpc/powerpc/trap.c:1.165 --- src/sys/arch/powerpc/powerpc/trap.c:1.164 Thu Oct 5 19:41:05 2023 +++ src/sys/arch/powerpc/powerpc/trap.c Fri Dec 15 09:31:02 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.c,v 1.164 2023/10/05 19:41:05 ad Exp $ */ +/* $NetBSD: trap.c,v 1.165 2023/12/15 09:31:02 rin Exp $ */ /* * Copyright (C) 1995, 1996 Wolfgang Solfrank. @@ -35,7 +35,7 @@ #define __UCAS_PRIVATE #include -__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.164 2023/10/05 19:41:05 ad Exp $"); +__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.165 2023/12/15 09:31:02 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_altivec.h" @@ -136,42 +136,40 @@ trap(struct trapframe *tf) ci->ci_ev_kdsi.ev_count++; - /* - * Only query UVM if no interrupts are active. - */ - if (ci->ci_idepth < 0) { - if ((va >> ADDR_SR_SHFT) == pcb->pcb_kmapsr) { -va &= ADDR_PIDX | ADDR_POFF; -va |= pcb->pcb_umapsr << ADDR_SR_SHFT; -map = >p_vmspace->vm_map; -#ifdef PPC_OEA64 -if ((tf->tf_dsisr & DSISR_NOTFOUND) && -vm_map_pmap(map)->pm_ste_evictions > 0 && -pmap_ste_spill(vm_map_pmap(map), - trunc_page(va), false)) { - return; -} + if ((va >> ADDR_SR_SHFT) == pcb->pcb_kmapsr) { + va &= ADDR_PIDX | ADDR_POFF; + va |= pcb->pcb_umapsr << ADDR_SR_SHFT; + map = >p_vmspace->vm_map; + } +#if defined(DIAGNOSTIC) && !defined(PPC_OEA64) + else if (__predict_false((va >> ADDR_SR_SHFT) == USER_SR)) { + printf("trap: kernel %s DSI trap @ %#lx by %#lx" + " (DSISR %#x): USER_SR unset\n", + (tf->tf_dsisr & DSISR_STORE) +? "write" : "read", + va, tf->tf_srr0, tf->tf_dsisr); + goto brain_damage2; + } #endif + else { + map = kernel_map; + } -if ((tf->tf_dsisr & DSISR_NOTFOUND) && -vm_map_pmap(map)->pm_evictions > 0 && -pmap_pte_spill(vm_map_pmap(map), - trunc_page(va), false)) { - return; -} -#if defined(DIAGNOSTIC) && !defined(PPC_OEA64) - } else if ((va >> ADDR_SR_SHFT) == USER_SR) { -printf("trap: kernel %s DSI trap @ %#lx by %#lx" -" (DSISR %#x): USER_SR unset\n", -(tf->tf_dsisr & DSISR_STORE) - ? "write" : "read", -va, tf->tf_srr0, tf->tf_dsisr); -goto brain_damage2; +#ifdef PPC_OEA64 + if ((tf->tf_dsisr & DSISR_NOTFOUND) && + vm_map_pmap(map)->pm_ste_evictions > 0 && + pmap_ste_spill(vm_map_pmap(map), trunc_page(va), false)) + return; #endif - } else { -map = kernel_map; - } + if ((tf->tf_dsisr & DSISR_NOTFOUND) && + vm_map_pmap(map)->pm_evictions > 0 && + pmap_pte_spill(vm_map_pmap(map), trunc_page(va), false)) + return; + /* + * Only query UVM if no interrupts are active. + */ + if (ci->ci_idepth < 0) { if (tf->tf_dsisr & DSISR_STORE) ftype = VM_PROT_WRITE; else
CVS commit: src/sys/arch/powerpc/powerpc
Module Name:src Committed By: rin Date: Fri Dec 15 09:31:03 UTC 2023 Modified Files: src/sys/arch/powerpc/powerpc: trap.c Log Message: powerpc/oea: trap: pmap_{pte,ste}_spill() even in the interrupt context Page table for oea is something like L2 TLB on memory; kernel and processes share its entries, and process entries can be spilled out. As done for MMU based on software-managed TLB, we need to restore such entries even in the interrupt context. Note that pmap_pte_spill() require no resouce to restore entries. Still-not-implemented pmap_ste_spill() for OEA64 should also. Part of PR kern/57621 To generate a diff of this commit: cvs rdiff -u -r1.164 -r1.165 src/sys/arch/powerpc/powerpc/trap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/lib/libsa
Module Name:src Committed By: rin Date: Thu Dec 14 05:39:00 UTC 2023 Modified Files: src/sys/lib/libsa: nfs.c Log Message: libsa: nfs: Fix NFS_NOSYMLINK option for previous Used only by mvme68k. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/lib/libsa/nfs.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/lib/libsa/nfs.c diff -u src/sys/lib/libsa/nfs.c:1.51 src/sys/lib/libsa/nfs.c:1.52 --- src/sys/lib/libsa/nfs.c:1.51 Tue Dec 12 09:12:55 2023 +++ src/sys/lib/libsa/nfs.c Thu Dec 14 05:39:00 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: nfs.c,v 1.51 2023/12/12 09:12:55 mlelstv Exp $ */ +/* $NetBSD: nfs.c,v 1.52 2023/12/14 05:39:00 rin Exp $ */ /*- * Copyright (c) 1993 John Brezak @@ -596,9 +596,9 @@ nfs_open(const char *path, struct open_f char namebuf[NFS_MAXPATHLEN + 1]; char linkbuf[NFS_MAXPATHLEN + 1]; int nlinks = 0; + n_long fa_type; #endif int error = 0; - n_long fa_type; #ifdef NFS_DEBUG if (debug)
CVS commit: src/sys/lib/libsa
Module Name:src Committed By: rin Date: Thu Dec 14 05:39:00 UTC 2023 Modified Files: src/sys/lib/libsa: nfs.c Log Message: libsa: nfs: Fix NFS_NOSYMLINK option for previous Used only by mvme68k. To generate a diff of this commit: cvs rdiff -u -r1.51 -r1.52 src/sys/lib/libsa/nfs.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: rin Date: Wed Dec 13 06:42:41 UTC 2023 Modified Files: src/sys/arch/arm/arm32: pmap.c Log Message: arm: pmap: Fix clang build without DIAGNOSTIC To generate a diff of this commit: cvs rdiff -u -r1.440 -r1.441 src/sys/arch/arm/arm32/pmap.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/arm/arm32/pmap.c diff -u src/sys/arch/arm/arm32/pmap.c:1.440 src/sys/arch/arm/arm32/pmap.c:1.441 --- src/sys/arch/arm/arm32/pmap.c:1.440 Thu Oct 12 11:33:37 2023 +++ src/sys/arch/arm/arm32/pmap.c Wed Dec 13 06:42:40 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.440 2023/10/12 11:33:37 skrll Exp $ */ +/* $NetBSD: pmap.c,v 1.441 2023/12/13 06:42:40 rin Exp $ */ /* * Copyright 2003 Wasabi Systems, Inc. @@ -193,7 +193,7 @@ #endif #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.440 2023/10/12 11:33:37 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.441 2023/12/13 06:42:40 rin Exp $"); #include #include @@ -547,7 +547,7 @@ pmap_release_page_lock(struct vm_page_md mutex_exit(_lock); } -static inline int +static inline int __diagused pmap_page_locked_p(struct vm_page_md *md) { return mutex_owned(_lock);
CVS commit: src/sys/arch/arm/arm32
Module Name:src Committed By: rin Date: Wed Dec 13 06:42:41 UTC 2023 Modified Files: src/sys/arch/arm/arm32: pmap.c Log Message: arm: pmap: Fix clang build without DIAGNOSTIC To generate a diff of this commit: cvs rdiff -u -r1.440 -r1.441 src/sys/arch/arm/arm32/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tools
Module Name:src Committed By: rin Date: Thu Nov 30 06:29:33 UTC 2023 Modified Files: src/tools: Makefile Log Message: tools/Makefile: Correct inverted comment. NFC To generate a diff of this commit: cvs rdiff -u -r1.214 -r1.215 src/tools/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tools/Makefile diff -u src/tools/Makefile:1.214 src/tools/Makefile:1.215 --- src/tools/Makefile:1.214 Mon Apr 18 19:46:35 2022 +++ src/tools/Makefile Thu Nov 30 06:29:33 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.214 2022/04/18 19:46:35 jkoshy Exp $ +# $NetBSD: Makefile,v 1.215 2023/11/30 06:29:33 rin Exp $ .include .include @@ -239,7 +239,7 @@ SUBDIR+= makekeys SUBDIR+= cvslatest -.endif # TOOLS_BUILDRUMP != no +.endif # TOOLS_BUILDRUMP == no check_MKTOOLS: .PHONY .NOTMAIN .if ${MKTOOLS:Uyes} == "no"
CVS commit: src/tools
Module Name:src Committed By: rin Date: Thu Nov 30 06:29:33 UTC 2023 Modified Files: src/tools: Makefile Log Message: tools/Makefile: Correct inverted comment. NFC To generate a diff of this commit: cvs rdiff -u -r1.214 -r1.215 src/tools/Makefile 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
Module Name:src Committed By: rin Date: Sun Nov 26 06:38:28 UTC 2023 Modified Files: src/sys/dev/pci: ppb.c Log Message: ppb(4): Print out PCIe Gen5 link speed correctly To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/dev/pci/ppb.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
Module Name:src Committed By: rin Date: Sun Nov 26 06:38:28 UTC 2023 Modified Files: src/sys/dev/pci: ppb.c Log Message: ppb(4): Print out PCIe Gen5 link speed correctly To generate a diff of this commit: cvs rdiff -u -r1.74 -r1.75 src/sys/dev/pci/ppb.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/ppb.c diff -u src/sys/dev/pci/ppb.c:1.74 src/sys/dev/pci/ppb.c:1.75 --- src/sys/dev/pci/ppb.c:1.74 Sun Oct 10 23:28:36 2021 +++ src/sys/dev/pci/ppb.c Sun Nov 26 06:38:28 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: ppb.c,v 1.74 2021/10/10 23:28:36 msaitoh Exp $ */ +/* $NetBSD: ppb.c,v 1.75 2023/11/26 06:38:28 rin Exp $ */ /* * Copyright (c) 1996, 1998 Christopher G. Demetriou. All rights reserved. @@ -31,7 +31,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.74 2021/10/10 23:28:36 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.75 2023/11/26 06:38:28 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_ppb.h" @@ -58,8 +58,8 @@ __KERNEL_RCSID(0, "$NetBSD: ppb.c,v 1.74 (PCIE_SLCSR_ABP | PCIE_SLCSR_PFD | PCIE_SLCSR_MSC | \ PCIE_SLCSR_PDC | PCIE_SLCSR_CC | PCIE_SLCSR_LACS) -static const char pcie_linkspeed_strings[5][5] = { - "1.25", "2.5", "5.0", "8.0", "16.0" +static const char pcie_linkspeed_strings[6][5] = { + "1.25", "2.5", "5.0", "8.0", "16.0", "32.0", }; int ppb_printevent = 0; /* Print event type if the value is not 0 */
CVS commit: src/external/gpl3/binutils.old
Module Name:src Committed By: rin Date: Sat Nov 25 12:15:00 UTC 2023 Modified Files: src/external/gpl3/binutils.old/lib/libbfd/arch/vax: bfd.h bfd_stdint.h defs.mk src/external/gpl3/binutils.old/lib/libiberty/arch/vax: defs.mk src/external/gpl3/binutils.old/usr.bin/gas/arch/vax: config.h Log Message: binutils.old: Regen for vax to explicitly enable 64-bit integer support To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd.h \ src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd_stdint.h \ src/external/gpl3/binutils.old/lib/libbfd/arch/vax/defs.mk cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils.old/lib/libiberty/arch/vax/defs.mk cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils.old/usr.bin/gas/arch/vax/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/binutils.old
Module Name:src Committed By: rin Date: Sat Nov 25 12:15:00 UTC 2023 Modified Files: src/external/gpl3/binutils.old/lib/libbfd/arch/vax: bfd.h bfd_stdint.h defs.mk src/external/gpl3/binutils.old/lib/libiberty/arch/vax: defs.mk src/external/gpl3/binutils.old/usr.bin/gas/arch/vax: config.h Log Message: binutils.old: Regen for vax to explicitly enable 64-bit integer support To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd.h \ src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd_stdint.h \ src/external/gpl3/binutils.old/lib/libbfd/arch/vax/defs.mk cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils.old/lib/libiberty/arch/vax/defs.mk cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils.old/usr.bin/gas/arch/vax/config.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd.h diff -u src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd.h:1.7 src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd.h:1.8 --- src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd.h:1.7 Fri Dec 23 17:09:33 2022 +++ src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd.h Sat Nov 25 12:14:59 2023 @@ -90,7 +90,7 @@ extern "C" { /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have been selected with --enable-targets, or if --enable-64-bit-bfd. */ -#define BFD_ARCH_SIZE 32 +#define BFD_ARCH_SIZE 64 /* The word size of the default bfd target. */ #define BFD_DEFAULT_TARGET_SIZE 32 Index: src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd_stdint.h diff -u src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd_stdint.h:1.7 src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd_stdint.h:1.8 --- src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd_stdint.h:1.7 Fri Dec 23 17:09:33 2022 +++ src/external/gpl3/binutils.old/lib/libbfd/arch/vax/bfd_stdint.h Sat Nov 25 12:14:59 2023 @@ -2,7 +2,7 @@ /* Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp */ /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for vax--netbsdelf-gcc (NetBSD nb1 20210411) 10.3.0 */ +/* generated for vax--netbsdelf-gcc (NetBSD nb3 20231008) 10.5.0 */ #ifndef GCC_GENERATED_STDINT_H #define GCC_GENERATED_STDINT_H 1 Index: src/external/gpl3/binutils.old/lib/libbfd/arch/vax/defs.mk diff -u src/external/gpl3/binutils.old/lib/libbfd/arch/vax/defs.mk:1.7 src/external/gpl3/binutils.old/lib/libbfd/arch/vax/defs.mk:1.8 --- src/external/gpl3/binutils.old/lib/libbfd/arch/vax/defs.mk:1.7 Fri Dec 23 17:09:33 2022 +++ src/external/gpl3/binutils.old/lib/libbfd/arch/vax/defs.mk Sat Nov 25 12:14:59 2023 @@ -2,7 +2,7 @@ # Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp # Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-vax.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo vaxnetbsd.lo aout32.lo vax1knetbsd.lo elf32-gen.lo plugin.lo cpu-vax.lo netbsd-core.lo ofiles +G_libbfd_la_DEPENDENCIES=elf32-vax.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo vaxnetbsd.lo aout32.lo vax1knetbsd.lo elf32-gen.lo plugin.lo cpu-vax.lo netbsd-core.lo archive64.lo ofiles G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coff-bfd.lo compress.lo corefile.lo elf-properties.lo format.lo hash.lo init.lo libbfd.lo linker.lo merge.lo opncls.lo reloc.lo section.lo simple.lo stab-syms.lo stabs.lo syms.lo targets.lo binary.lo ihex.lo srec.lo tekhex.lo verilog.lo G_DEFS=-DHAVE_CONFIG_H G_INCLUDES= Index: src/external/gpl3/binutils.old/lib/libiberty/arch/vax/defs.mk diff -u src/external/gpl3/binutils.old/lib/libiberty/arch/vax/defs.mk:1.7 src/external/gpl3/binutils.old/lib/libiberty/arch/vax/defs.mk:1.8 --- src/external/gpl3/binutils.old/lib/libiberty/arch/vax/defs.mk:1.7 Fri Dec 23 17:09:37 2022 +++ src/external/gpl3/binutils.old/lib/libiberty/arch/vax/defs.mk Sat Nov 25 12:15:00 2023 @@ -4,5 +4,5 @@ # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o strverscmp.o +G_LIBOBJS=strverscmp.o G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o
CVS commit: src/tools/binutils
Module Name:src Committed By: rin Date: Sat Nov 25 12:11:27 UTC 2023 Modified Files: src/tools/binutils: Makefile Added Files: src/tools/binutils: mknative-binutils.old Log Message: tools/binutils: Add support to mknative for binutils.old To generate a diff of this commit: cvs rdiff -u -r1.37 -r1.38 src/tools/binutils/Makefile cvs rdiff -u -r0 -r1.1 src/tools/binutils/mknative-binutils.old Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/binutils.old/dist/bfd
Module Name:src Committed By: rin Date: Sat Nov 25 12:09:59 UTC 2023 Modified Files: src/external/gpl3/binutils.old/dist/bfd: config.bfd Log Message: binutils.old/bfd: Require 64-bit integer support for vax Taken from binutils/bfd: https://mail-index.netbsd.org/source-changes/2023/11/25/msg148607.html To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/binutils.old/dist/bfd/config.bfd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/binutils.old/dist/bfd
Module Name:src Committed By: rin Date: Sat Nov 25 12:09:59 UTC 2023 Modified Files: src/external/gpl3/binutils.old/dist/bfd: config.bfd Log Message: binutils.old/bfd: Require 64-bit integer support for vax Taken from binutils/bfd: https://mail-index.netbsd.org/source-changes/2023/11/25/msg148607.html To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 src/external/gpl3/binutils.old/dist/bfd/config.bfd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils.old/dist/bfd/config.bfd diff -u src/external/gpl3/binutils.old/dist/bfd/config.bfd:1.9 src/external/gpl3/binutils.old/dist/bfd/config.bfd:1.10 --- src/external/gpl3/binutils.old/dist/bfd/config.bfd:1.9 Fri Dec 23 17:09:18 2022 +++ src/external/gpl3/binutils.old/dist/bfd/config.bfd Sat Nov 25 12:09:59 2023 @@ -1454,6 +1454,13 @@ case "${targ_defvec} ${targ_selvecs}" in ;; esac +# vax natively supports 64-bit integers. +case "${targ_defvec} ${targ_selvecs}" in + *vax*) +want64=true +;; +esac + case "${host64}${want64}" in *true*) targ_selvecs="${targ_selvecs} ${targ64_selvecs}"
CVS commit: src/external/gpl3/binutils.old/dist/gas/config
Module Name:src Committed By: rin Date: Sat Nov 25 12:07:58 UTC 2023 Modified Files: src/external/gpl3/binutils.old/dist/gas/config: tc-vax.c Log Message: binutils.old/gas: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [11/21] PR toolchain/43314: pc relative relocations are "off by 1*size" on vax Address http://gnats.netbsd.org/43314 Taken from binutils/gas: https://mail-index.netbsd.org/source-changes/2023/10/07/msg147942.html To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 \ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c diff -u src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.9 src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.10 --- src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.9 Sat Nov 25 12:06:42 2023 +++ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c Sat Nov 25 12:07:58 2023 @@ -3581,12 +3581,39 @@ void vax_cons_fix_new (fragS *frag, int where, unsigned int nbytes, expressionS *exp, bfd_reloc_code_real_type r) { - if (r == NO_RELOC) + int pcrel; + // fix PC relative frags too ... + switch (r) +{ +case BFD_RELOC_8_PCREL: +case BFD_RELOC_16_PCREL: +case BFD_RELOC_32_PCREL: + pcrel = 1; + /* + * Displacement mode addressing (of which PC relative is one + * type) uses the updated contents of the register as the base + * address. VARM, Leonard 1987, pp34 + */ + switch (exp->X_op) + { + case O_constant: + case O_symbol: + exp->X_add_number += nbytes; + break; + } + break; +case NO_RELOC: r = (nbytes == 1 ? BFD_RELOC_8 : nbytes == 2 ? BFD_RELOC_16 : BFD_RELOC_32); + pcrel = 0; + break; +default: + pcrel = 0; + break; +} - fix_new_exp (frag, where, (int) nbytes, exp, 0, r); + fix_new_exp (frag, where, (int) nbytes, exp, pcrel, r); } const char *
CVS commit: src/external/gpl3/binutils.old/dist/gas/config
Module Name:src Committed By: rin Date: Sat Nov 25 12:07:58 UTC 2023 Modified Files: src/external/gpl3/binutils.old/dist/gas/config: tc-vax.c Log Message: binutils.old/gas: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [11/21] PR toolchain/43314: pc relative relocations are "off by 1*size" on vax Address http://gnats.netbsd.org/43314 Taken from binutils/gas: https://mail-index.netbsd.org/source-changes/2023/10/07/msg147942.html To generate a diff of this commit: cvs rdiff -u -r1.9 -r1.10 \ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/binutils.old/dist/gas/config
Module Name:src Committed By: rin Date: Sat Nov 25 12:06:43 UTC 2023 Modified Files: src/external/gpl3/binutils.old/dist/gas/config: tc-vax.c tc-vax.h Log Message: binutils.old/gas: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [10/21] Try not to emit relocations in the .eh_frame section Taken from binutils/gas: https://mail-index.netbsd.org/source-changes/2023/10/07/msg147941.html To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c diff -u src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.8 src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.9 --- src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.8 Sat Nov 25 12:05:22 2023 +++ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c Sat Nov 25 12:06:42 2023 @@ -282,6 +282,29 @@ md_apply_fix (fixS *fixP, valueT *valueP if (fixP->fx_subsy != (symbolS *) NULL) as_bad_where (fixP->fx_file, fixP->fx_line, _("expression too complex")); + if (fixP->fx_pcrel) +{ + switch (fixP->fx_r_type) + { + case BFD_RELOC_32: + /* change the relocation type to 32 bit PC-relative */ + fixP->fx_r_type = BFD_RELOC_32_PCREL; + if (fixP->fx_addsy != NULL) + { + /* Hack around bfd_install_relocation brain damage. */ + value += fixP->fx_frag->fr_address + fixP->fx_where; + } + if (fixP->fx_addsy == abs_section_sym) + fixP->fx_done = 1; + break; + default: + break; + } +} + + /* + * Common code for pc-relative and non-pc-relative cases + */ if (fixP->fx_addsy == NULL) fixP->fx_done = 1; @@ -3601,6 +3624,11 @@ tc_vax_regname_to_dw2regnum (char *regna void vax_cfi_emit_pcrel_expr (expressionS *expP, unsigned int nbytes) { + expressionS tmp = *expP; + + tmp.X_op = O_subtract; + tmp.X_op_symbol = symbol_temp_new_now (); + expP = expP->X_add_number += nbytes; emit_expr (expP, nbytes); } Index: src/external/gpl3/binutils.old/dist/gas/config/tc-vax.h diff -u src/external/gpl3/binutils.old/dist/gas/config/tc-vax.h:1.7 src/external/gpl3/binutils.old/dist/gas/config/tc-vax.h:1.8 --- src/external/gpl3/binutils.old/dist/gas/config/tc-vax.h:1.7 Fri Dec 23 17:09:22 2022 +++ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.h Sat Nov 25 12:06:42 2023 @@ -37,6 +37,8 @@ #ifdef OBJ_ELF #define TARGET_FORMAT "elf32-vax" +#define DIFF_EXPR_OK 1 +#define CFI_DIFF_EXPR_OK 0 #endif #define TARGET_ARCH bfd_arch_vax
CVS commit: src/external/gpl3/binutils.old/dist/gas/config
Module Name:src Committed By: rin Date: Sat Nov 25 12:06:43 UTC 2023 Modified Files: src/external/gpl3/binutils.old/dist/gas/config: tc-vax.c tc-vax.h Log Message: binutils.old/gas: vax: PR port-vax/57646 patch provided by Kalvis Duckmanton [10/21] Try not to emit relocations in the .eh_frame section Taken from binutils/gas: https://mail-index.netbsd.org/source-changes/2023/10/07/msg147941.html To generate a diff of this commit: cvs rdiff -u -r1.8 -r1.9 \ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/binutils.old/dist/gas/config
Module Name:src Committed By: rin Date: Sat Nov 25 12:05:22 UTC 2023 Modified Files: src/external/gpl3/binutils.old/dist/gas/config: tc-vax.c Log Message: binutils.old/gas: vax: Cherry-pick upstream commits for binutils-gdb:30715 PR port-vax/57646: Import major vax toolchain fix by Kalvis Duckmanton Taken from binutils/gas: https://mail-index.netbsd.org/source-changes/2023/10/07/msg147931.html To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/binutils.old/dist/gas/config
Module Name:src Committed By: rin Date: Sat Nov 25 12:05:22 UTC 2023 Modified Files: src/external/gpl3/binutils.old/dist/gas/config: tc-vax.c Log Message: binutils.old/gas: vax: Cherry-pick upstream commits for binutils-gdb:30715 PR port-vax/57646: Import major vax toolchain fix by Kalvis Duckmanton Taken from binutils/gas: https://mail-index.netbsd.org/source-changes/2023/10/07/msg147931.html To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 \ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c diff -u src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.7 src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.8 --- src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c:1.7 Fri Dec 23 17:09:22 2022 +++ src/external/gpl3/binutils.old/dist/gas/config/tc-vax.c Sat Nov 25 12:05:22 2023 @@ -2332,18 +2332,19 @@ md_create_short_jump (char *ptr, void md_create_long_jump (char *ptr, - addressT from_addr ATTRIBUTE_UNUSED, + addressT from_addr, addressT to_addr, - fragS *frag, - symbolS *to_symbol) + fragS *frag ATTRIBUTE_UNUSED, + symbolS *to_symbol ATTRIBUTE_UNUSED) { valueT offset; - offset = to_addr - S_GET_VALUE (to_symbol); - *ptr++ = VAX_JMP; /* Arbitrary jump. */ - *ptr++ = VAX_ABSOLUTE_MODE; + /* Account for 1 byte instruction, 1 byte of address specifier and + 4 bytes of offset from PC. */ + offset = to_addr - (from_addr + 1 + 1 + 4); + *ptr++ = VAX_JMP; + *ptr++ = VAX_PC_RELATIVE_MODE; md_number_to_chars (ptr, offset, 4); - fix_new (frag, ptr - frag->fr_literal, 4, to_symbol, (long) 0, 0, NO_RELOC); } #ifdef OBJ_VMS
CVS commit: src/external/gpl3/binutils/lib/libbfd/arch/vax
Module Name:src Committed By: rin Date: Sat Nov 25 11:58:34 UTC 2023 Modified Files: src/external/gpl3/binutils/lib/libbfd/arch/vax: bfd.h defs.mk Log Message: binutils: Regen for vax to explicitly enable 64-bit integer support To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ src/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/binutils/lib/libbfd/arch/vax
Module Name:src Committed By: rin Date: Sat Nov 25 11:58:34 UTC 2023 Modified Files: src/external/gpl3/binutils/lib/libbfd/arch/vax: bfd.h defs.mk Log Message: binutils: Regen for vax to explicitly enable 64-bit integer support To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ src/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h cvs rdiff -u -r1.5 -r1.6 \ src/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h diff -u src/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h:1.10 src/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h:1.11 --- src/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h:1.10 Mon Jan 16 15:10:34 2023 +++ src/external/gpl3/binutils/lib/libbfd/arch/vax/bfd.h Sat Nov 25 11:58:34 2023 @@ -1,5 +1,5 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-binutils,v 1.14 2022/12/24 20:17:46 christos Exp */ +/* Generated from: NetBSD: mknative-binutils,v 1.15 2023/02/07 20:37:30 christos Exp */ /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* DO NOT EDIT! -*- buffer-read-only: t -*- This file is automatically @@ -75,7 +75,7 @@ extern "C" { /* The word size used by BFD on the host. This may be 64 with a 32 bit target if the host is 64 bit, or if other 64 bit targets have been selected with --enable-targets, or if --enable-64-bit-bfd. */ -#define BFD_ARCH_SIZE 32 +#define BFD_ARCH_SIZE 64 /* The word size of the default bfd target. */ #define BFD_DEFAULT_TARGET_SIZE 32 Index: src/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk diff -u src/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk:1.5 src/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk:1.6 --- src/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk:1.5 Sat Apr 4 20:45:46 2020 +++ src/external/gpl3/binutils/lib/libbfd/arch/vax/defs.mk Sat Nov 25 11:58:34 2023 @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-binutils,v 1.13 2020/04/04 01:34:53 christos Exp +# Generated from: NetBSD: mknative-binutils,v 1.15 2023/02/07 20:37:30 christos Exp # Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # -G_libbfd_la_DEPENDENCIES=elf32-vax.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo vaxnetbsd.lo aout32.lo vax1knetbsd.lo elf32-gen.lo plugin.lo cpu-vax.lo netbsd-core.lo ofiles +G_libbfd_la_DEPENDENCIES=elf32-vax.lo elf32.lo elf.lo elflink.lo elf-attrs.lo elf-strtab.lo elf-eh-frame.lo dwarf1.lo dwarf2.lo vaxnetbsd.lo aout32.lo vax1knetbsd.lo elf32-gen.lo plugin.lo cpu-vax.lo netbsd-core.lo archive64.lo ofiles G_libbfd_la_OBJECTS=archive.lo archures.lo bfd.lo bfdio.lo bfdwin.lo cache.lo coff-bfd.lo compress.lo corefile.lo elf-properties.lo format.lo hash.lo init.lo libbfd.lo linker.lo merge.lo opncls.lo reloc.lo section.lo simple.lo stab-syms.lo stabs.lo syms.lo targets.lo binary.lo ihex.lo srec.lo tekhex.lo verilog.lo G_DEFS=-DHAVE_CONFIG_H G_INCLUDES=
CVS commit: src/external/gpl3/binutils/dist/bfd
Module Name:src Committed By: rin Date: Sat Nov 25 11:57:55 UTC 2023 Modified Files: src/external/gpl3/binutils/dist/bfd: config.bfd Log Message: binutils/bfd: Require 64-bit integer support for vax Otherwise, e.g., gas cannot assemble 64-bit immediates correctly on ILP32 hosts. Thanks hans@ for analysis: https://mail-index.netbsd.org/port-vax/2023/11/23/msg004546.html To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/external/gpl3/binutils/dist/bfd/config.bfd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/binutils/dist/bfd/config.bfd diff -u src/external/gpl3/binutils/dist/bfd/config.bfd:1.42 src/external/gpl3/binutils/dist/bfd/config.bfd:1.43 --- src/external/gpl3/binutils/dist/bfd/config.bfd:1.42 Mon Aug 28 00:35:52 2023 +++ src/external/gpl3/binutils/dist/bfd/config.bfd Sat Nov 25 11:57:55 2023 @@ -1511,6 +1511,13 @@ case "${targ_defvec} ${targ_selvecs}" in ;; esac +# vax natively supports 64-bit integers. +case "${targ_defvec} ${targ_selvecs}" in + *vax*) +want64=true +;; +esac + case "${host64}${want64}" in *true*) targ_selvecs="${targ_selvecs} ${targ64_selvecs}"
CVS commit: src/external/gpl3/binutils/dist/bfd
Module Name:src Committed By: rin Date: Sat Nov 25 11:57:55 UTC 2023 Modified Files: src/external/gpl3/binutils/dist/bfd: config.bfd Log Message: binutils/bfd: Require 64-bit integer support for vax Otherwise, e.g., gas cannot assemble 64-bit immediates correctly on ILP32 hosts. Thanks hans@ for analysis: https://mail-index.netbsd.org/port-vax/2023/11/23/msg004546.html To generate a diff of this commit: cvs rdiff -u -r1.42 -r1.43 src/external/gpl3/binutils/dist/bfd/config.bfd Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/share/man/man7
Module Name:src Committed By: rin Date: Thu Nov 23 23:29:42 UTC 2023 Modified Files: src/share/man/man7: Makefile Log Message: share/man/man7/Makefile: Hook stack.7 To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/share/man/man7/Makefile 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/man7/Makefile diff -u src/share/man/man7/Makefile:1.38 src/share/man/man7/Makefile:1.39 --- src/share/man/man7/Makefile:1.38 Thu Nov 23 21:16:13 2023 +++ src/share/man/man7/Makefile Thu Nov 23 23:29:42 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.38 2023/11/23 21:16:13 riastradh Exp $ +# $NetBSD: Makefile,v 1.39 2023/11/23 23:29:42 rin Exp $ # @(#)Makefile 8.1 (Berkeley) 6/5/93 .include @@ -28,6 +28,7 @@ MAN+= security.7 MAN+= setuid.7 MAN+= signal.7 MAN+= src.7 +MAN+= stack.7 MAN+= sticky.7 MAN+= symlink.7 MAN+= sysctl.7
CVS commit: src/share/man/man7
Module Name:src Committed By: rin Date: Thu Nov 23 23:29:42 UTC 2023 Modified Files: src/share/man/man7: Makefile Log Message: share/man/man7/Makefile: Hook stack.7 To generate a diff of this commit: cvs rdiff -u -r1.38 -r1.39 src/share/man/man7/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/lib/libc/compiler_rt
Module Name:src Committed By: rin Date: Thu Nov 9 07:29:26 UTC 2023 Modified Files: src/lib/libc/compiler_rt: Makefile.inc Log Message: libc/compiler_rt: Consistently use LIBC_MACHINE_{ARCH,CPU} Instead of MACHINE_{ARCH,CPU}, respectively. With this change, unnecessary comparetf2.c is no longer compiled in for 32-bit compat libc on aarch64. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/lib/libc/compiler_rt/Makefile.inc Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/lib/libc/compiler_rt/Makefile.inc diff -u src/lib/libc/compiler_rt/Makefile.inc:1.41 src/lib/libc/compiler_rt/Makefile.inc:1.42 --- src/lib/libc/compiler_rt/Makefile.inc:1.41 Wed Oct 5 10:28:19 2022 +++ src/lib/libc/compiler_rt/Makefile.inc Thu Nov 9 07:29:26 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile.inc,v 1.41 2022/10/05 10:28:19 nia Exp $ +# $NetBSD: Makefile.inc,v 1.42 2023/11/09 07:29:26 rin Exp $ COMPILER_RT_DIR= ${NETBSDSRCDIR}/sys/external/bsd/compiler_rt COMPILER_RT_SRCDIR= ${COMPILER_RT_DIR}/dist @@ -76,7 +76,7 @@ GENERIC_SRCS+= \ umodti3.c # only used for machines using IEEE 754 floating point formats -.if ${MACHINE_ARCH} != "vax" +.if ${LIBC_MACHINE_ARCH} != "vax" .if 0 # Conflicts with soft-float @@ -127,13 +127,13 @@ GENERIC_SRCS+= \ .endif # IEEE 754 only machines -.if ${MACHINE_ARCH} != "m68k" +.if ${LIBC_MACHINE_ARCH} != "m68k" GENERIC_SRCS+= \ fixxfdi.c .endif -.if ${MACHINE_CPU} == "aarch64" +.if ${LIBC_MACHINE_CPU} == "aarch64" GENERIC_SRCS+= \ comparetf2.c .endif
CVS commit: src/lib/libc/compiler_rt
Module Name:src Committed By: rin Date: Thu Nov 9 07:29:26 UTC 2023 Modified Files: src/lib/libc/compiler_rt: Makefile.inc Log Message: libc/compiler_rt: Consistently use LIBC_MACHINE_{ARCH,CPU} Instead of MACHINE_{ARCH,CPU}, respectively. With this change, unnecessary comparetf2.c is no longer compiled in for 32-bit compat libc on aarch64. To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/lib/libc/compiler_rt/Makefile.inc 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
Module Name:src Committed By: rin Date: Tue Nov 7 13:38:01 UTC 2023 Modified Files: src/sys/dev/pci: virtio.c Log Message: virtio_read_device_config_le_[24]: Fix for {aarch64,arm}eb Stop byte-swapping for big-endian aarch64 and arm to fix corrupted read for, e.g., sc_taglen for vio9p(4). As described as comments in virtio_pci.c, big-endian aarch64 and armv7 (armeb) are somewhat special. At the moment, all supported virtual/real machines are configured as little-endian, and only CPU cores are switched to big-endian mode during early boot stage. Most peripheral buses for armeb are LSB as a result, and their default bus_space(9) functions swap byte-order. Therefore, PIOed data from memory-mapped devices, as well as pci(4) ones, are actually LSB, but observed as MSB for armeb. Therefore, we should not swap byte-order further in virtio_read_device_config_le_[24] on armeb. Thanks ozaki-r@ for comments. XXX Centralize? See virtio_pci.c and sys/dev/fdt/virtio_mmio_fdt.c also. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/sys/dev/pci/virtio.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/virtio.c diff -u src/sys/dev/pci/virtio.c:1.78 src/sys/dev/pci/virtio.c:1.79 --- src/sys/dev/pci/virtio.c:1.78 Fri Apr 21 02:17:32 2023 +++ src/sys/dev/pci/virtio.c Tue Nov 7 13:38:01 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: virtio.c,v 1.78 2023/04/21 02:17:32 yamaguchi Exp $ */ +/* $NetBSD: virtio.c,v 1.79 2023/11/07 13:38:01 rin Exp $ */ /* * Copyright (c) 2020 The NetBSD Foundation, Inc. @@ -28,7 +28,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.78 2023/04/21 02:17:32 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: virtio.c,v 1.79 2023/11/07 13:38:01 rin Exp $"); #include #include @@ -276,8 +276,15 @@ virtio_read_device_config_le_2(struct vi uint16_t val; val = bus_space_read_2(iot, ioh, index); +#if !defined(__aarch64__) && !defined(__arm__) + /* + * For big-endian aarch64/armv7, bus endian is always LSB, but + * byte-order is automatically swapped by bus_space(9) (see also + * comments in virtio_pci.c). Therefore, no need to swap here. + */ if (sc->sc_bus_endian != LITTLE_ENDIAN) val = bswap16(val); +#endif DPRINTFR("read_le_2", "%04x", val, index, 2); DPRINTFR2("read_le_2", "%04x", @@ -294,8 +301,11 @@ virtio_read_device_config_le_4(struct vi uint32_t val; val = bus_space_read_4(iot, ioh, index); +#if !defined(__aarch64__) && !defined(__arm__) + /* See virtio_read_device_config_le_2() above. */ if (sc->sc_bus_endian != LITTLE_ENDIAN) val = bswap32(val); +#endif DPRINTFR("read_le_4", "%08x", val, index, 4); DPRINTFR2("read_le_4", "%08x",
CVS commit: src/sys/dev/pci
Module Name:src Committed By: rin Date: Tue Nov 7 13:38:01 UTC 2023 Modified Files: src/sys/dev/pci: virtio.c Log Message: virtio_read_device_config_le_[24]: Fix for {aarch64,arm}eb Stop byte-swapping for big-endian aarch64 and arm to fix corrupted read for, e.g., sc_taglen for vio9p(4). As described as comments in virtio_pci.c, big-endian aarch64 and armv7 (armeb) are somewhat special. At the moment, all supported virtual/real machines are configured as little-endian, and only CPU cores are switched to big-endian mode during early boot stage. Most peripheral buses for armeb are LSB as a result, and their default bus_space(9) functions swap byte-order. Therefore, PIOed data from memory-mapped devices, as well as pci(4) ones, are actually LSB, but observed as MSB for armeb. Therefore, we should not swap byte-order further in virtio_read_device_config_le_[24] on armeb. Thanks ozaki-r@ for comments. XXX Centralize? See virtio_pci.c and sys/dev/fdt/virtio_mmio_fdt.c also. To generate a diff of this commit: cvs rdiff -u -r1.78 -r1.79 src/sys/dev/pci/virtio.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: rin Date: Tue Nov 7 13:31:26 UTC 2023 Modified Files: src/sys/arch/arm/arm: smccc.c Log Message: smccc: Adjust SMCCC_ARCH_ATTRIBUTE for clang/arm Conditionally use (1) __attribute__ ((target("arch=armv7ve"))) (2) __attribute__ ((target("armv7ve"))) for gcc and clang, respectively. While gcc does not accept (2), clang accepts (1) but silently ignores it :( To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/arm/smccc.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/arm/arm/smccc.c diff -u src/sys/arch/arm/arm/smccc.c:1.3 src/sys/arch/arm/arm/smccc.c:1.4 --- src/sys/arch/arm/arm/smccc.c:1.3 Sun Aug 8 13:43:09 2021 +++ src/sys/arch/arm/arm/smccc.c Tue Nov 7 13:31:26 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: smccc.c,v 1.3 2021/08/08 13:43:09 jmcneill Exp $ */ +/* $NetBSD: smccc.c,v 1.4 2023/11/07 13:31:26 rin Exp $ */ /*- * Copyright (c) 2021 Jared McNeill @@ -27,7 +27,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: smccc.c,v 1.3 2021/08/08 13:43:09 jmcneill Exp $"); +__KERNEL_RCSID(0, "$NetBSD: smccc.c,v 1.4 2023/11/07 13:31:26 rin Exp $"); #include #include @@ -36,7 +36,11 @@ __KERNEL_RCSID(0, "$NetBSD: smccc.c,v 1. #include #if defined(__arm__) +# if defined(__clang__) +#define SMCCC_ARCH_ATTRIBUTE __attribute__ ((target("armv7ve"))) +# else /* gcc */ #define SMCCC_ARCH_ATTRIBUTE __attribute__ ((target("arch=armv7ve"))) +# endif #else #define SMCCC_ARCH_ATTRIBUTE #endif
CVS commit: src/sys/arch/arm/arm
Module Name:src Committed By: rin Date: Tue Nov 7 13:31:26 UTC 2023 Modified Files: src/sys/arch/arm/arm: smccc.c Log Message: smccc: Adjust SMCCC_ARCH_ATTRIBUTE for clang/arm Conditionally use (1) __attribute__ ((target("arch=armv7ve"))) (2) __attribute__ ((target("armv7ve"))) for gcc and clang, respectively. While gcc does not accept (2), clang accepts (1) but silently ignores it :( To generate a diff of this commit: cvs rdiff -u -r1.3 -r1.4 src/sys/arch/arm/arm/smccc.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/nvmm/x86
Module Name:src Committed By: rin Date: Mon Nov 6 17:02:17 UTC 2023 Modified Files: src/sys/dev/nvmm/x86: nvmm_x86_vmx.c Log Message: nvmm_x86_vmx: vmx_vmptrst: Sprinkle __diagused to fix clang !DIAGNOSTIC build To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/dev/nvmm/x86/nvmm_x86_vmx.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/nvmm/x86/nvmm_x86_vmx.c diff -u src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.85 src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.86 --- src/sys/dev/nvmm/x86/nvmm_x86_vmx.c:1.85 Tue Sep 13 20:10:04 2022 +++ src/sys/dev/nvmm/x86/nvmm_x86_vmx.c Mon Nov 6 17:02:17 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: nvmm_x86_vmx.c,v 1.85 2022/09/13 20:10:04 riastradh Exp $ */ +/* $NetBSD: nvmm_x86_vmx.c,v 1.86 2023/11/06 17:02:17 rin Exp $ */ /* * Copyright (c) 2018-2020 Maxime Villard, m00nbsd.net @@ -29,7 +29,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.85 2022/09/13 20:10:04 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: nvmm_x86_vmx.c,v 1.86 2023/11/06 17:02:17 rin Exp $"); #include #include @@ -135,7 +135,7 @@ vmx_vmwrite(uint64_t field, uint64_t val ); } -static inline paddr_t +static inline paddr_t __diagused vmx_vmptrst(void) { paddr_t pa;
CVS commit: src/sys/dev/nvmm/x86
Module Name:src Committed By: rin Date: Mon Nov 6 17:02:17 UTC 2023 Modified Files: src/sys/dev/nvmm/x86: nvmm_x86_vmx.c Log Message: nvmm_x86_vmx: vmx_vmptrst: Sprinkle __diagused to fix clang !DIAGNOSTIC build To generate a diff of this commit: cvs rdiff -u -r1.85 -r1.86 src/sys/dev/nvmm/x86/nvmm_x86_vmx.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/xen/x86
Module Name:src Committed By: rin Date: Mon Nov 6 17:01:07 UTC 2023 Modified Files: src/sys/arch/xen/x86: xen_ipi.c Log Message: xen_ipi: valid_ipimask: Sprinkle __diagused to fix clang !DIAGNOSTIC build To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/xen/x86/xen_ipi.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/xen/x86
Module Name:src Committed By: rin Date: Mon Nov 6 17:01:07 UTC 2023 Modified Files: src/sys/arch/xen/x86: xen_ipi.c Log Message: xen_ipi: valid_ipimask: Sprinkle __diagused to fix clang !DIAGNOSTIC build To generate a diff of this commit: cvs rdiff -u -r1.41 -r1.42 src/sys/arch/xen/x86/xen_ipi.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/xen/x86/xen_ipi.c diff -u src/sys/arch/xen/x86/xen_ipi.c:1.41 src/sys/arch/xen/x86/xen_ipi.c:1.42 --- src/sys/arch/xen/x86/xen_ipi.c:1.41 Sun Aug 6 16:07:53 2023 +++ src/sys/arch/xen/x86/xen_ipi.c Mon Nov 6 17:01:07 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: xen_ipi.c,v 1.41 2023/08/06 16:07:53 riastradh Exp $ */ +/* $NetBSD: xen_ipi.c,v 1.42 2023/11/06 17:01:07 rin Exp $ */ /*- * Copyright (c) 2011, 2019 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ * Based on: x86/ipi.c */ -__KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.41 2023/08/06 16:07:53 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: xen_ipi.c,v 1.42 2023/11/06 17:01:07 rin Exp $"); #include "opt_ddb.h" @@ -149,7 +149,7 @@ xen_ipi_init(void) hypervisor_unmask_event(evtchn); } -static inline bool /* helper */ +static inline bool __diagused valid_ipimask(uint32_t ipimask) { uint32_t masks = XEN_IPI_GENERIC | XEN_IPI_HVCB | XEN_IPI_XCALL |
CVS commit: src/distrib/sets/lists/debug
Module Name:src Committed By: rin Date: Mon Nov 6 08:56:12 UTC 2023 Modified Files: src/distrib/sets/lists/debug: mi Log Message: lists/debug/mi: Sprinkle gcc to lib[al]san_g.a to fix clang build To generate a diff of this commit: cvs rdiff -u -r1.421 -r1.422 src/distrib/sets/lists/debug/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/distrib/sets/lists/debug/mi diff -u src/distrib/sets/lists/debug/mi:1.421 src/distrib/sets/lists/debug/mi:1.422 --- src/distrib/sets/lists/debug/mi:1.421 Tue Oct 17 13:51:52 2023 +++ src/distrib/sets/lists/debug/mi Mon Nov 6 08:56:12 2023 @@ -1,4 +1,4 @@ -# $NetBSD: mi,v 1.421 2023/10/17 13:51:52 rjs Exp $ +# $NetBSD: mi,v 1.422 2023/11/06 08:56:12 rin Exp $ ./etc/mtree/set.debug comp-sys-root ./usr/lib comp-sys-usr compatdir ./usr/lib/i18n/libBIG5_g.a comp-c-debuglib debuglib,compatfile @@ -26,7 +26,7 @@ ./usr/lib/i18n/libmapper_zone_g.a comp-c-debuglib debuglib,compatfile ./usr/lib/libamu_g.acomp-c-debuglib debuglib,compatfile ./usr/lib/libarchive_g.a comp-c-debuglib debuglib,compatfile -./usr/lib/libasan_g.acomp-c-debuglib debuglib,compatfile,cxx +./usr/lib/libasan_g.acomp-c-debuglib debuglib,compatfile,cxx,gcc ./usr/lib/libasn1_g.acomp-c-debuglib debuglib,compatfile,kerberos ./usr/lib/libatf-c++_g.a comp-c-debuglib debuglib,compatfile,atf ./usr/lib/libatf-c_g.acomp-c-debuglib debuglib,compatfile,atf @@ -100,7 +100,7 @@ ./usr/lib/liblber_g.acomp-c-debuglib debuglib,ldap,compatfile ./usr/lib/libldap_g.acomp-c-debuglib debuglib,ldap,compatfile ./usr/lib/libldap_r_g.acomp-c-debuglib debuglib,ldap,compatfile -./usr/lib/liblsan_g.acomp-c-debuglib debuglib,compatfile,cxx +./usr/lib/liblsan_g.acomp-c-debuglib debuglib,compatfile,cxx,gcc ./usr/lib/liblua_g.acomp-c-debuglib debuglib,compatfile ./usr/lib/liblwres_g.acomp-obsolete obsolete ./usr/lib/liblzf_g.acomp-c-debuglib debuglib,compatfile
CVS commit: src/distrib/sets/lists/debug
Module Name:src Committed By: rin Date: Mon Nov 6 08:56:12 UTC 2023 Modified Files: src/distrib/sets/lists/debug: mi Log Message: lists/debug/mi: Sprinkle gcc to lib[al]san_g.a to fix clang build To generate a diff of this commit: cvs rdiff -u -r1.421 -r1.422 src/distrib/sets/lists/debug/mi Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/i386/stand/dosboot
Module Name:src Committed By: rin Date: Mon Nov 6 07:09:08 UTC 2023 Modified Files: src/sys/arch/i386/stand/dosboot: Makefile Log Message: x86/dosboot: Drop no-longer-available -DSLOW for libz It should be lost during merge from upstream. We may introduce a similar hack again, if it is *really* required; inflate_fast() may be dropped by using slow path unconditionally. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/i386/stand/dosboot/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/stand/dosboot/Makefile diff -u src/sys/arch/i386/stand/dosboot/Makefile:1.35 src/sys/arch/i386/stand/dosboot/Makefile:1.36 --- src/sys/arch/i386/stand/dosboot/Makefile:1.35 Mon Nov 6 07:02:17 2023 +++ src/sys/arch/i386/stand/dosboot/Makefile Mon Nov 6 07:09:08 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.35 2023/11/06 07:02:17 rin Exp $ +# $NetBSD: Makefile,v 1.36 2023/11/06 07:09:08 rin Exp $ S= ${.CURDIR}/../../../.. @@ -10,7 +10,7 @@ RELOC= 0x100 SRCS= main.c devopen.c exec.c exec_multiboot1.c exec_multiboot2.c -CPPFLAGS+= -DSLOW # for libz +#CPPFLAGS+= -DSLOW # for libz; no longer available CPPFLAGS+= -DCOMPAT_386BSD_MBRPART CPPFLAGS+= -DXMS CPPFLAGS+= -DLIBSA_ENABLE_LS_OP
CVS commit: src/sys/arch/i386/stand/dosboot
Module Name:src Committed By: rin Date: Mon Nov 6 07:09:08 UTC 2023 Modified Files: src/sys/arch/i386/stand/dosboot: Makefile Log Message: x86/dosboot: Drop no-longer-available -DSLOW for libz It should be lost during merge from upstream. We may introduce a similar hack again, if it is *really* required; inflate_fast() may be dropped by using slow path unconditionally. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/sys/arch/i386/stand/dosboot/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/i386/stand/dosboot
Module Name:src Committed By: rin Date: Mon Nov 6 07:02:17 UTC 2023 Modified Files: src/sys/arch/i386/stand/dosboot: Makefile Log Message: x86/dosboot: Do not page-align data segment 4K alignment is too heavy burden for COM executable with 64K limit :) Fix binary size overflow for clang/amd64. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/i386/stand/dosboot/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/stand/dosboot/Makefile diff -u src/sys/arch/i386/stand/dosboot/Makefile:1.34 src/sys/arch/i386/stand/dosboot/Makefile:1.35 --- src/sys/arch/i386/stand/dosboot/Makefile:1.34 Mon Nov 6 06:53:52 2023 +++ src/sys/arch/i386/stand/dosboot/Makefile Mon Nov 6 07:02:17 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.34 2023/11/06 06:53:52 rin Exp $ +# $NetBSD: Makefile,v 1.35 2023/11/06 07:02:17 rin Exp $ S= ${.CURDIR}/../../../.. @@ -34,6 +34,9 @@ I386MISCMAKEFLAGS= I386_INCLUDE_DOS=yes # DOS command line arguments are located at 0x. COPTS.doscommain.c+= -fno-delete-null-pointer-checks +# Do not page-align data segment. +LDFLAGS+= -Wl,-N + VERSIONFILE= ${.CURDIR}/version .include
CVS commit: src/sys/arch/i386/stand/dosboot
Module Name:src Committed By: rin Date: Mon Nov 6 07:02:17 UTC 2023 Modified Files: src/sys/arch/i386/stand/dosboot: Makefile Log Message: x86/dosboot: Do not page-align data segment 4K alignment is too heavy burden for COM executable with 64K limit :) Fix binary size overflow for clang/amd64. To generate a diff of this commit: cvs rdiff -u -r1.34 -r1.35 src/sys/arch/i386/stand/dosboot/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/i386/stand/dosboot
Module Name:src Committed By: rin Date: Mon Nov 6 06:53:52 UTC 2023 Modified Files: src/sys/arch/i386/stand/dosboot: Makefile Log Message: x86/dosboot: Allow NULL dereference to fetch command line arguments DOS command line arguments are provided as struct psp at 0x; see doscommain.c. Recent versions of gcc and clang are clever enough to optimize code block involving NULL dereference into ud2 insn. Sprinkle -fno-delete-null-pointer-checks to doscommain.c to prevent this behavior. Note that dosboot.com for netbsd-9 and later was broken due to this ``over optimization''. gcc 5.5.0 and clang 4.0.0 in netbsd-8 generate correct codes without this workaround. XXX Are there still use cases for dosboot.com? Does anyone want to boot NetBSD from real-mode DOS in 2023? To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/i386/stand/dosboot/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/sys/arch/i386/stand/dosboot
Module Name:src Committed By: rin Date: Mon Nov 6 06:53:52 UTC 2023 Modified Files: src/sys/arch/i386/stand/dosboot: Makefile Log Message: x86/dosboot: Allow NULL dereference to fetch command line arguments DOS command line arguments are provided as struct psp at 0x; see doscommain.c. Recent versions of gcc and clang are clever enough to optimize code block involving NULL dereference into ud2 insn. Sprinkle -fno-delete-null-pointer-checks to doscommain.c to prevent this behavior. Note that dosboot.com for netbsd-9 and later was broken due to this ``over optimization''. gcc 5.5.0 and clang 4.0.0 in netbsd-8 generate correct codes without this workaround. XXX Are there still use cases for dosboot.com? Does anyone want to boot NetBSD from real-mode DOS in 2023? To generate a diff of this commit: cvs rdiff -u -r1.33 -r1.34 src/sys/arch/i386/stand/dosboot/Makefile Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/sys/arch/i386/stand/dosboot/Makefile diff -u src/sys/arch/i386/stand/dosboot/Makefile:1.33 src/sys/arch/i386/stand/dosboot/Makefile:1.34 --- src/sys/arch/i386/stand/dosboot/Makefile:1.33 Mon Sep 23 13:42:36 2019 +++ src/sys/arch/i386/stand/dosboot/Makefile Mon Nov 6 06:53:52 2023 @@ -1,4 +1,4 @@ -# $NetBSD: Makefile,v 1.33 2019/09/23 13:42:36 christos Exp $ +# $NetBSD: Makefile,v 1.34 2023/11/06 06:53:52 rin Exp $ S= ${.CURDIR}/../../../.. @@ -31,6 +31,9 @@ SAMISCCPPFLAGS+= -DHEAP_START=0x2 -D SAMISCMAKEFLAGS= SA_USE_CREAD=yes SA_INCLUDE_NET=no SA_ENABLE_LS_OP=yes I386MISCMAKEFLAGS= I386_INCLUDE_DOS=yes +# DOS command line arguments are located at 0x. +COPTS.doscommain.c+= -fno-delete-null-pointer-checks + VERSIONFILE= ${.CURDIR}/version .include
CVS commit: src/sys/dev/pci/igc
Module Name:src Committed By: rin Date: Thu Nov 2 09:29:30 UTC 2023 Modified Files: src/sys/dev/pci/igc: if_igc.c Log Message: igc(4): Notify which of 64- or 32-bit DMA is used To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/igc/if_igc.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/igc/if_igc.c diff -u src/sys/dev/pci/igc/if_igc.c:1.7 src/sys/dev/pci/igc/if_igc.c:1.8 --- src/sys/dev/pci/igc/if_igc.c:1.7 Sun Oct 15 22:36:52 2023 +++ src/sys/dev/pci/igc/if_igc.c Thu Nov 2 09:29:30 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: if_igc.c,v 1.7 2023/10/15 22:36:52 oster Exp $ */ +/* $NetBSD: if_igc.c,v 1.8 2023/11/02 09:29:30 rin Exp $ */ /* $OpenBSD: if_igc.c,v 1.13 2023/04/28 10:18:57 bluhm Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_igc.c,v 1.7 2023/10/15 22:36:52 oster Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_igc.c,v 1.8 2023/11/02 09:29:30 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -354,7 +354,6 @@ igc_attach(device_t parent, device_t sel const struct igc_product *igcp = igc_lookup(pa); KASSERT(igcp != NULL); - pci_aprint_devinfo_fancy(pa, "Ethernet controller", igcp->igcp_name, 1); sc->sc_dev = self; callout_init(>sc_tick_ch, CALLOUT_MPSAFE); @@ -363,17 +362,23 @@ igc_attach(device_t parent, device_t sel sc->osdep.os_sc = sc; sc->osdep.os_pa = *pa; -#ifdef __aarch64__ +#ifndef __aarch64__ /* * XXX PR port-arm/57643 * 64-bit DMA does not work at least for LX2K with 32/64GB memory. * smmu(4) support may be required. */ - sc->osdep.os_dmat = pa->pa_dmat; -#else - sc->osdep.os_dmat = pci_dma64_available(pa) ? - pa->pa_dmat64 : pa->pa_dmat; + if (pci_dma64_available(pa)) { + aprint_verbose(", 64-bit DMA"); + sc->osdep.os_dmat = pa->pa_dmat64; + } else #endif + { + aprint_verbose(", 32-bit DMA"); + sc->osdep.os_dmat = pa->pa_dmat; + } + + pci_aprint_devinfo_fancy(pa, "Ethernet controller", igcp->igcp_name, 1); /* Determine hardware and mac info */ igc_identify_hardware(sc);
CVS commit: src/sys/dev/pci/igc
Module Name:src Committed By: rin Date: Thu Nov 2 09:29:30 UTC 2023 Modified Files: src/sys/dev/pci/igc: if_igc.c Log Message: igc(4): Notify which of 64- or 32-bit DMA is used To generate a diff of this commit: cvs rdiff -u -r1.7 -r1.8 src/sys/dev/pci/igc/if_igc.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/sbin/ifconfig
Module Name:src Committed By: rin Date: Wed Oct 18 08:52:46 UTC 2023 Modified Files: src/tests/sbin/ifconfig: t_capabilities.sh Log Message: ifconfig/t_capabilities: s/if_capabilities/if_capenable/ in message To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/sbin/ifconfig/t_capabilities.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/ifconfig/t_capabilities.sh diff -u src/tests/sbin/ifconfig/t_capabilities.sh:1.2 src/tests/sbin/ifconfig/t_capabilities.sh:1.3 --- src/tests/sbin/ifconfig/t_capabilities.sh:1.2 Wed Oct 18 08:25:14 2023 +++ src/tests/sbin/ifconfig/t_capabilities.sh Wed Oct 18 08:52:46 2023 @@ -1,4 +1,4 @@ -# $NetBSD: t_capabilities.sh,v 1.2 2023/10/18 08:25:14 rin Exp $ +# $NetBSD: t_capabilities.sh,v 1.3 2023/10/18 08:52:46 rin Exp $ # # Copyright (c) 2020 The NetBSD Foundation, Inc. # All rights reserved. @@ -112,7 +112,7 @@ basic_head() { basic_body() { if ! [ $(atf_config_get "run_unsafe" "no") = "yes" ]; then - atf_skip "modify if_capabilities for real interfaces" + atf_skip "modify if_capenable for real interfaces" fi for i in $(ifconfig -l); do
CVS commit: src/tests/sbin/ifconfig
Module Name:src Committed By: rin Date: Wed Oct 18 08:52:46 UTC 2023 Modified Files: src/tests/sbin/ifconfig: t_capabilities.sh Log Message: ifconfig/t_capabilities: s/if_capabilities/if_capenable/ in message To generate a diff of this commit: cvs rdiff -u -r1.2 -r1.3 src/tests/sbin/ifconfig/t_capabilities.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/tests/sbin/ifconfig
On 2023/10/18 17:25, Rin Okuyama wrote: Module Name:src Committed By: rin Date: Wed Oct 18 08:25:14 UTC 2023 Modified Files: src/tests/sbin/ifconfig: t_capabilities.sh Log Message: ifconfig/t_capabilities: Skip unless run_unsafe is configured to yes The test modifies if_capabilities for all available interfaces. This is not a behavior we expect for normal ATF runs. s/if_capabilities/if_capenable/ here. Thanks, rin
CVS commit: src/tests/sbin/ifconfig
Module Name:src Committed By: rin Date: Wed Oct 18 08:25:14 UTC 2023 Modified Files: src/tests/sbin/ifconfig: t_capabilities.sh Log Message: ifconfig/t_capabilities: Skip unless run_unsafe is configured to yes The test modifies if_capabilities for all available interfaces. This is not a behavior we expect for normal ATF runs. Similar tests modifying living network configurations are already skipped by default. This is the last one remained for ifconfig(8). Also, I'm not sure whether this is a test for ifconfig(8). XXX Pullup to netbsd-10 ASAP. No other branches are affected. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/sbin/ifconfig/t_capabilities.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/ifconfig/t_capabilities.sh diff -u src/tests/sbin/ifconfig/t_capabilities.sh:1.1 src/tests/sbin/ifconfig/t_capabilities.sh:1.2 --- src/tests/sbin/ifconfig/t_capabilities.sh:1.1 Sat Jun 27 06:57:44 2020 +++ src/tests/sbin/ifconfig/t_capabilities.sh Wed Oct 18 08:25:14 2023 @@ -1,4 +1,4 @@ -# $NetBSD: t_capabilities.sh,v 1.1 2020/06/27 06:57:44 jruoho Exp $ +# $NetBSD: t_capabilities.sh,v 1.2 2023/10/18 08:25:14 rin Exp $ # # Copyright (c) 2020 The NetBSD Foundation, Inc. # All rights reserved. @@ -111,6 +111,10 @@ basic_head() { basic_body() { + if ! [ $(atf_config_get "run_unsafe" "no") = "yes" ]; then + atf_skip "modify if_capabilities for real interfaces" + fi + for i in $(ifconfig -l); do c=$(ifconfig $i | grep "capabilities")
CVS commit: src/tests/sbin/ifconfig
Module Name:src Committed By: rin Date: Wed Oct 18 08:25:14 UTC 2023 Modified Files: src/tests/sbin/ifconfig: t_capabilities.sh Log Message: ifconfig/t_capabilities: Skip unless run_unsafe is configured to yes The test modifies if_capabilities for all available interfaces. This is not a behavior we expect for normal ATF runs. Similar tests modifying living network configurations are already skipped by default. This is the last one remained for ifconfig(8). Also, I'm not sure whether this is a test for ifconfig(8). XXX Pullup to netbsd-10 ASAP. No other branches are affected. To generate a diff of this commit: cvs rdiff -u -r1.1 -r1.2 src/tests/sbin/ifconfig/t_capabilities.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Re: CVS commit: src/sys/kern
On Thu, Oct 12, 2023 at 8:23 PM Taylor R Campbell wrote: > > > Date: Thu, 12 Oct 2023 17:06:02 +0900 > > From: Rin Okuyama > > > > On Thu, Oct 5, 2023 at 5:39 AM Andrew Doran wrote: > > > > > > Module Name:src > > > Committed By: ad > > > Date: Wed Oct 4 20:39:35 UTC 2023 > > > > > > Modified Files: > > > src/sys/kern: kern_rwlock.c kern_turnstile.c > > > > > > Log Message: > > > Turnstiles: use the syncobj name for ps/top wmesg when sleeping since it's > > > more informative than "tstile". > > > > Cool! Can I send a pull up request to netbsd-10? > > Not sure -- it would depend on this commit to introduce struct > syncobj::sobj_name: > > https://mail-index.netbsd.org/source-changes/2023/07/17/msg146058.html > > This is a potential kernel ABI change. I didn't investigate to > determine whether it would be safe to pull up. Thanks, I didn't notice that. It should be too risky to pull these up just before RC1. I withdraw this proposal. PS It would be really nice if we can find some systematical/reliable methods to figure out files that really depends on struct syncobj, e.g.. I tried ctfdump(1) to *.o for kernel modules, but I cannot extract information better than ``grep syncobj.h .depend''... Thanks, rin
Re: CVS commit: src/sys/kern
Cool! Can I send a pull up request to netbsd-10? I've not yet observed deadlocks since this was committed, fortunately or unfortunately, although ;) Thanks, rin On Thu, Oct 5, 2023 at 5:39 AM Andrew Doran wrote: > > Module Name:src > Committed By: ad > Date: Wed Oct 4 20:39:35 UTC 2023 > > Modified Files: > src/sys/kern: kern_rwlock.c kern_turnstile.c > > Log Message: > Turnstiles: use the syncobj name for ps/top wmesg when sleeping since it's > more informative than "tstile". > > > To generate a diff of this commit: > cvs rdiff -u -r1.73 -r1.74 src/sys/kern/kern_rwlock.c > cvs rdiff -u -r1.51 -r1.52 src/sys/kern/kern_turnstile.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/igc
Module Name:src Committed By: rin Date: Thu Oct 12 04:08:44 UTC 2023 Modified Files: src/sys/dev/pci/igc: if_igc.c Log Message: igc(4): igc_init: Enable interrupt after everything is set up Inspired by "ixgbe: Enable interrupt after setting IFF_RUNNING.": http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/pci/ixgbe/ixgbe.c#rev1.337 Just for sure, callout_schedule(9) for igc_tick() is also postponed. This is NFC for now, although. XXX Check other drivers. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/igc/if_igc.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/igc/if_igc.c diff -u src/sys/dev/pci/igc/if_igc.c:1.5 src/sys/dev/pci/igc/if_igc.c:1.6 --- src/sys/dev/pci/igc/if_igc.c:1.5 Wed Oct 11 18:19:43 2023 +++ src/sys/dev/pci/igc/if_igc.c Thu Oct 12 04:08:44 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: if_igc.c,v 1.5 2023/10/11 18:19:43 riastradh Exp $ */ +/* $NetBSD: if_igc.c,v 1.6 2023/10/12 04:08:44 rin Exp $ */ /* $OpenBSD: if_igc.c,v 1.13 2023/04/28 10:18:57 bluhm Exp $ */ /*- * SPDX-License-Identifier: BSD-2-Clause @@ -30,7 +30,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_igc.c,v 1.5 2023/10/11 18:19:43 riastradh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_igc.c,v 1.6 2023/10/12 04:08:44 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -1541,17 +1541,17 @@ igc_init_locked(struct igc_softc *sc) mutex_exit(>rxr_lock); } - igc_enable_intr(sc); - sc->sc_core_stopping = false; - callout_schedule(>sc_tick_ch, hz); - ifp->if_flags |= IFF_RUNNING; /* Save last flags for the callback */ sc->sc_if_flags = ifp->if_flags; + callout_schedule(>sc_tick_ch, hz); + + igc_enable_intr(sc); + return 0; }
CVS commit: src/sys/dev/pci/igc
Module Name:src Committed By: rin Date: Thu Oct 12 04:08:44 UTC 2023 Modified Files: src/sys/dev/pci/igc: if_igc.c Log Message: igc(4): igc_init: Enable interrupt after everything is set up Inspired by "ixgbe: Enable interrupt after setting IFF_RUNNING.": http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/dev/pci/ixgbe/ixgbe.c#rev1.337 Just for sure, callout_schedule(9) for igc_tick() is also postponed. This is NFC for now, although. XXX Check other drivers. To generate a diff of this commit: cvs rdiff -u -r1.5 -r1.6 src/sys/dev/pci/igc/if_igc.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/evbarm/conf
Module Name:src Committed By: rin Date: Wed Oct 11 07:49:29 UTC 2023 Modified Files: src/sys/arch/evbarm/conf: GENERIC64 Log Message: aarch64/GENERIC64: Add ixl(4) Works just fine for little-endian on LX2K with UEFI firmware. Not tested for big-endian yet; attach fails on ROCKPro64 due to host controller problem. OK yamaguchi@ To generate a diff of this commit: cvs rdiff -u -r1.213 -r1.214 src/sys/arch/evbarm/conf/GENERIC64 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/evbarm/conf/GENERIC64 diff -u src/sys/arch/evbarm/conf/GENERIC64:1.213 src/sys/arch/evbarm/conf/GENERIC64:1.214 --- src/sys/arch/evbarm/conf/GENERIC64:1.213 Wed Oct 4 07:48:55 2023 +++ src/sys/arch/evbarm/conf/GENERIC64 Wed Oct 11 07:49:29 2023 @@ -1,5 +1,5 @@ # -# $NetBSD: GENERIC64,v 1.213 2023/10/04 07:48:55 rin Exp $ +# $NetBSD: GENERIC64,v 1.214 2023/10/11 07:49:29 rin Exp $ # # GENERIC ARM (aarch64) kernel # @@ -286,6 +286,7 @@ bge* at pci? dev ? function ? # Broadco ena* at pci? dev ? function ? # Amazon.com Elastic Network Adapter igc* at pci? dev ? function ? # Intel 22x 2.5 gigabit ixg* at pci? dev ? function ? # Intel 8259x 10 gigabit +ixl* at pci? dev ? function ? # Intel Ethernet 700 series ixv* at pci? dev ? function ? # Intel 8259x 10G virtual function mcx* at pci? dev ? function ? # Mellanox 5th generation Ethernet mskc* at pci? dev ? function ? # Marvell Yukon 2 Gigabit Ethernet
CVS commit: src/sys/arch/evbarm/conf
Module Name:src Committed By: rin Date: Wed Oct 11 07:49:29 UTC 2023 Modified Files: src/sys/arch/evbarm/conf: GENERIC64 Log Message: aarch64/GENERIC64: Add ixl(4) Works just fine for little-endian on LX2K with UEFI firmware. Not tested for big-endian yet; attach fails on ROCKPro64 due to host controller problem. OK yamaguchi@ To generate a diff of this commit: cvs rdiff -u -r1.213 -r1.214 src/sys/arch/evbarm/conf/GENERIC64 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
Module Name:src Committed By: rin Date: Wed Oct 11 07:44:54 UTC 2023 Modified Files: src/sys/dev/pci: if_ixl.c Log Message: ixl(4): Print device info on attach Without PCIVERBOSE option: ixl0 at pci1 dev 0 function 0: vendor 8086 product 1572 (rev. 0x01) With PCIVERBOSE option: ixl0 at pci1 dev 0 function 0: Intel XL710 SFP+ Ethernet (SFI) (rev. 0x01) OK yamaguchi@ To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/sys/dev/pci/if_ixl.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/if_ixl.c diff -u src/sys/dev/pci/if_ixl.c:1.92 src/sys/dev/pci/if_ixl.c:1.93 --- src/sys/dev/pci/if_ixl.c:1.92 Wed Oct 11 04:44:20 2023 +++ src/sys/dev/pci/if_ixl.c Wed Oct 11 07:44:53 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: if_ixl.c,v 1.92 2023/10/11 04:44:20 yamaguchi Exp $ */ +/* $NetBSD: if_ixl.c,v 1.93 2023/10/11 07:44:53 rin Exp $ */ /* * Copyright (c) 2013-2015, Intel Corporation @@ -74,7 +74,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.92 2023/10/11 04:44:20 yamaguchi Exp $"); +__KERNEL_RCSID(0, "$NetBSD: if_ixl.c,v 1.93 2023/10/11 07:44:53 rin Exp $"); #ifdef _KERNEL_OPT #include "opt_net_mpsafe.h" @@ -1039,6 +1039,8 @@ ixl_attach(device_t parent, device_t sel ixl_pci_csr_setup(pa->pa_pc, pa->pa_tag); + pci_aprint_devinfo(pa, "Ethernet controller"); + memtype = pci_mapreg_type(pa->pa_pc, pa->pa_tag, IXL_PCIREG); if (pci_mapreg_map(pa, IXL_PCIREG, memtype, 0, >sc_memt, >sc_memh, NULL, >sc_mems)) { @@ -1063,7 +1065,7 @@ ixl_attach(device_t parent, device_t sel port &= I40E_PFGEN_PORTNUM_PORT_NUM_MASK; port >>= I40E_PFGEN_PORTNUM_PORT_NUM_SHIFT; sc->sc_port = port; - aprint_normal(": port %u", sc->sc_port); + aprint_normal_dev(self, "port %u", sc->sc_port); ari = ixl_rd(sc, I40E_GLPCI_CAPSUP); ari &= I40E_GLPCI_CAPSUP_ARI_EN_MASK;
CVS commit: src/sys/dev/pci
Module Name:src Committed By: rin Date: Wed Oct 11 07:44:54 UTC 2023 Modified Files: src/sys/dev/pci: if_ixl.c Log Message: ixl(4): Print device info on attach Without PCIVERBOSE option: ixl0 at pci1 dev 0 function 0: vendor 8086 product 1572 (rev. 0x01) With PCIVERBOSE option: ixl0 at pci1 dev 0 function 0: Intel XL710 SFP+ Ethernet (SFI) (rev. 0x01) OK yamaguchi@ To generate a diff of this commit: cvs rdiff -u -r1.92 -r1.93 src/sys/dev/pci/if_ixl.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/powerpc/oea
Module Name:src Committed By: rin Date: Mon Oct 9 13:01:58 UTC 2023 Modified Files: src/sys/arch/powerpc/oea: pmap.c Log Message: powerpc/oea: pmap: Use pool_allocator_nointr() for pmap_pool As done for (majority of) other pmap implementations. pmap_pool_allocator() allocates memory below 256MB, but it is not necessary for struct pmap. Fix part of PR kern/57621, i.e., stall in pmap_create(9). There should be another bugs that cause (MP?) kernel hangs reported in the PR, in pmap or other MD components for powerpc (PR port-powerpc/56922 should be one of the candidates). XXX pmap for powerpc/oea apparently needs some clean ups. But leave it as is, and pull up this minimum fix to netbsd-10 at the moment. To generate a diff of this commit: cvs rdiff -u -r1.114 -r1.115 src/sys/arch/powerpc/oea/pmap.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/powerpc/oea/pmap.c diff -u src/sys/arch/powerpc/oea/pmap.c:1.114 src/sys/arch/powerpc/oea/pmap.c:1.115 --- src/sys/arch/powerpc/oea/pmap.c:1.114 Mon May 9 11:39:44 2022 +++ src/sys/arch/powerpc/oea/pmap.c Mon Oct 9 13:01:58 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.114 2022/05/09 11:39:44 rin Exp $ */ +/* $NetBSD: pmap.c,v 1.115 2023/10/09 13:01:58 rin Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. * All rights reserved. @@ -63,7 +63,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.114 2022/05/09 11:39:44 rin Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.115 2023/10/09 13:01:58 rin Exp $"); #define PMAP_NOOPNAMES @@ -3448,7 +3448,7 @@ pmap_bootstrap1(paddr_t kernelstart, pad pool_setlowat(_pvo_pool, 1008); pool_init(_pool, sizeof(struct pmap), - sizeof(void *), 0, 0, "pmap_pl", _pool_allocator, + sizeof(void *), 0, 0, "pmap_pl", _allocator_nointr, IPL_NONE); #if defined(PMAP_NEED_MAPKERNEL)
CVS commit: src/sys/arch/powerpc/oea
Module Name:src Committed By: rin Date: Mon Oct 9 13:01:58 UTC 2023 Modified Files: src/sys/arch/powerpc/oea: pmap.c Log Message: powerpc/oea: pmap: Use pool_allocator_nointr() for pmap_pool As done for (majority of) other pmap implementations. pmap_pool_allocator() allocates memory below 256MB, but it is not necessary for struct pmap. Fix part of PR kern/57621, i.e., stall in pmap_create(9). There should be another bugs that cause (MP?) kernel hangs reported in the PR, in pmap or other MD components for powerpc (PR port-powerpc/56922 should be one of the candidates). XXX pmap for powerpc/oea apparently needs some clean ups. But leave it as is, and pull up this minimum fix to netbsd-10 at the moment. To generate a diff of this commit: cvs rdiff -u -r1.114 -r1.115 src/sys/arch/powerpc/oea/pmap.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc.old
Module Name:src Committed By: rin Date: Mon Oct 9 12:26:59 UTC 2023 Modified Files: src/external/gpl3/gcc.old/lib/libgcc/arch/vax: auto-target.h src/external/gpl3/gcc.old/lib/libiberty: defs.mk src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/vax: gstdint.h src/external/gpl3/gcc.old/usr.bin/gcc/arch/vax: configargs.h Log Message: gcc.old: vax: mknative for PR port-vax/57646 Summary of changes: (1) HAVE_AS_CFI_SECTIONS becomes defined. (2) mempcpy.o is dropped as mempcpy(3) was added to -current (but not to netbsd-10). (3) working directories in usr.bin/gcc/arch/vax/configargs.h. (1) will be pulled up into netbsd-10. I've confirmed that pkgsrc/lang/perl5 builds and works as before with this change. For now, (3) is reverted by hand. It would be better to improve mknative not to leak working directories. But it should be NFC anyway. For vax, mknative for binutils and gdb does not brings about significant changes. For other platforms, mknative for gcc.old makes no significant changes (actually confirmed only for evbarm64, but it should be enough). Thanks mrg@ for suggestion. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ src/external/gpl3/gcc.old/lib/libgcc/arch/vax/auto-target.h cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc.old/lib/libiberty/defs.mk cvs rdiff -u -r1.14 -r1.15 \ src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/vax/gstdint.h cvs rdiff -u -r1.16 -r1.17 \ src/external/gpl3/gcc.old/usr.bin/gcc/arch/vax/configargs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc.old/lib/libgcc/arch/vax/auto-target.h diff -u src/external/gpl3/gcc.old/lib/libgcc/arch/vax/auto-target.h:1.10 src/external/gpl3/gcc.old/lib/libgcc/arch/vax/auto-target.h:1.11 --- src/external/gpl3/gcc.old/lib/libgcc/arch/vax/auto-target.h:1.10 Mon Feb 20 02:12:06 2023 +++ src/external/gpl3/gcc.old/lib/libgcc/arch/vax/auto-target.h Mon Oct 9 12:26:59 2023 @@ -1,5 +1,5 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-gcc,v 1.113 2021/04/11 01:44:14 mrg Exp */ +/* Generated from: NetBSD: mknative-gcc.old,v 1.11 2023/07/28 08:05:29 mrg Exp */ /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ /* auto-target.h. Generated from config.in by configure. */ @@ -13,7 +13,7 @@ /* Define to 1 if the assembler supports .cfi_sections .debug_frame directive. */ -/* #undef HAVE_AS_CFI_SECTIONS */ +#define HAVE_AS_CFI_SECTIONS 1 /* Define to 1 if the assembler supports LSE. */ /* #undef HAVE_AS_LSE */ Index: src/external/gpl3/gcc.old/lib/libiberty/defs.mk diff -u src/external/gpl3/gcc.old/lib/libiberty/defs.mk:1.14 src/external/gpl3/gcc.old/lib/libiberty/defs.mk:1.15 --- src/external/gpl3/gcc.old/lib/libiberty/defs.mk:1.14 Mon Feb 20 02:12:15 2023 +++ src/external/gpl3/gcc.old/lib/libiberty/defs.mk Mon Oct 9 12:26:59 2023 @@ -1,8 +1,8 @@ # This file is automatically generated. DO NOT EDIT! -# Generated from: NetBSD: mknative-gcc,v 1.116 2022/07/22 06:50:26 mrg Exp +# Generated from: NetBSD: mknative-gcc.old,v 1.11 2023/07/28 08:05:29 mrg Exp # Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp # G_ALLOCA= G_EXTRA_OFILES= -G_LIBOBJS=mempcpy.o strverscmp.o +G_LIBOBJS=strverscmp.o G_REQUIRED_OFILES=regex.o cplus-dem.o cp-demangle.o md5.o sha1.o alloca.o argv.o choose-temp.o concat.o cp-demint.o crc32.o d-demangle.o dwarfnames.o dyn-string.o fdmatch.o fibheap.o filedescriptor.o filename_cmp.o floatformat.o fnmatch.o fopen_unlocked.o getopt.o getopt1.o getpwd.o getruntime.o hashtab.o hex.o lbasename.o lrealpath.o make-relative-prefix.o make-temp-file.o objalloc.o obstack.o partition.o pexecute.o physmem.o pex-common.o pex-one.o pex-unix.o vprintf-support.o rust-demangle.o safe-ctype.o simple-object.o simple-object-coff.o simple-object-elf.o simple-object-mach-o.o simple-object-xcoff.o sort.o spaces.o splay-tree.o stack-limit.o strerror.o strsignal.o timeval-utils.o unlink-if-ordinary.o xasprintf.o xatexit.o xexit.o xmalloc.o xmemdup.o xstrdup.o xstrerror.o xstrndup.o xvasprintf.o Index: src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/vax/gstdint.h diff -u src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/vax/gstdint.h:1.14 src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/vax/gstdint.h:1.15 --- src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/vax/gstdint.h:1.14 Fri Jul 14 19:46:40 2023 +++ src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/vax/gstdint.h Mon Oct 9 12:26:59 2023 @@ -1,8 +1,8 @@ /* This file is automatically generated. DO NOT EDIT! */ -/* Generated from: NetBSD: mknative-gcc,v 1.116 2022/07/22 06:50:26 mrg Exp */ +/* Generated from: NetBSD: mknative-gcc.old,v 1.11 2023/07/28 08:05:29 mrg Exp */ /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ -/* generated for
CVS commit: src/external/gpl3/gcc.old
Module Name:src Committed By: rin Date: Mon Oct 9 12:26:59 UTC 2023 Modified Files: src/external/gpl3/gcc.old/lib/libgcc/arch/vax: auto-target.h src/external/gpl3/gcc.old/lib/libiberty: defs.mk src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/vax: gstdint.h src/external/gpl3/gcc.old/usr.bin/gcc/arch/vax: configargs.h Log Message: gcc.old: vax: mknative for PR port-vax/57646 Summary of changes: (1) HAVE_AS_CFI_SECTIONS becomes defined. (2) mempcpy.o is dropped as mempcpy(3) was added to -current (but not to netbsd-10). (3) working directories in usr.bin/gcc/arch/vax/configargs.h. (1) will be pulled up into netbsd-10. I've confirmed that pkgsrc/lang/perl5 builds and works as before with this change. For now, (3) is reverted by hand. It would be better to improve mknative not to leak working directories. But it should be NFC anyway. For vax, mknative for binutils and gdb does not brings about significant changes. For other platforms, mknative for gcc.old makes no significant changes (actually confirmed only for evbarm64, but it should be enough). Thanks mrg@ for suggestion. To generate a diff of this commit: cvs rdiff -u -r1.10 -r1.11 \ src/external/gpl3/gcc.old/lib/libgcc/arch/vax/auto-target.h cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc.old/lib/libiberty/defs.mk cvs rdiff -u -r1.14 -r1.15 \ src/external/gpl3/gcc.old/lib/libstdc++-v3/arch/vax/gstdint.h cvs rdiff -u -r1.16 -r1.17 \ src/external/gpl3/gcc.old/usr.bin/gcc/arch/vax/configargs.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc.old/dist/gcc
Module Name:src Committed By: rin Date: Sun Oct 8 05:03:12 UTC 2023 Modified Files: src/external/gpl3/gcc.old/dist/gcc: dse.c Log Message: gcc.old: Clarify PR port-vax/57646 patch [5/21]. NFC Restore ``else'' in the original patch. NFC but better to fit into upstream code here. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gcc.old/dist/gcc/dse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/external/gpl3/gcc.old/dist/gcc
Module Name:src Committed By: rin Date: Sun Oct 8 05:03:12 UTC 2023 Modified Files: src/external/gpl3/gcc.old/dist/gcc: dse.c Log Message: gcc.old: Clarify PR port-vax/57646 patch [5/21]. NFC Restore ``else'' in the original patch. NFC but better to fit into upstream code here. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/external/gpl3/gcc.old/dist/gcc/dse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc.old/dist/gcc/dse.c diff -u src/external/gpl3/gcc.old/dist/gcc/dse.c:1.15 src/external/gpl3/gcc.old/dist/gcc/dse.c:1.16 --- src/external/gpl3/gcc.old/dist/gcc/dse.c:1.15 Sun Oct 8 04:59:33 2023 +++ src/external/gpl3/gcc.old/dist/gcc/dse.c Sun Oct 8 05:03:12 2023 @@ -1350,7 +1350,7 @@ all_positions_needed_p (store_info *s_in return true; } #ifdef NB_FIX_VAX_BACKEND - if (const_start >= HOST_BITS_PER_WIDE_INT || const_start < 0) + else if (const_start >= HOST_BITS_PER_WIDE_INT || const_start < 0) return true; #endif else
CVS commit: src/external/gpl3/gcc.old/dist/gcc
Module Name:src Committed By: rin Date: Sun Oct 8 04:59:33 UTC 2023 Modified Files: src/external/gpl3/gcc.old/dist/gcc: dse.c Log Message: gcc.old: Fix my regression for PR port-vax/57646 patch [5/21] Add a part of the original diff provided by Kalvis Duckmanton, which I carelessly dropped during NB_FIX_VAX_BACKEND addition. Fix ICE in DSE phase for native GCC. Now, pkgsrc/lang/perl5 successfully builds again. To generate a diff of this commit: cvs rdiff -u -r1.14 -r1.15 src/external/gpl3/gcc.old/dist/gcc/dse.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/external/gpl3/gcc.old/dist/gcc/dse.c diff -u src/external/gpl3/gcc.old/dist/gcc/dse.c:1.14 src/external/gpl3/gcc.old/dist/gcc/dse.c:1.15 --- src/external/gpl3/gcc.old/dist/gcc/dse.c:1.14 Sat Oct 7 11:58:54 2023 +++ src/external/gpl3/gcc.old/dist/gcc/dse.c Sun Oct 8 04:59:33 2023 @@ -298,7 +298,11 @@ public: /* Return a bitmask with the first N low bits set. */ static unsigned HOST_WIDE_INT +#ifdef NB_FIX_VAX_BACKEND +lowpart_bitmask (unsigned int n) +#else lowpart_bitmask (int n) +#endif { unsigned HOST_WIDE_INT mask = HOST_WIDE_INT_M1U; #ifdef NB_FIX_VAX_BACKEND