CVS commit: src/sys/arch/evbsh3/evbsh3

2023-09-29 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Sep 29 06:09:20 UTC 2023

Modified Files:
src/sys/arch/evbsh3/evbsh3: locore.S

Log Message:
reorder includes alphabetically to match mmeye counterpart, NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbsh3/evbsh3/locore.S

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



CVS commit: src/sys/arch/evbsh3/evbsh3

2023-09-29 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Sep 29 06:09:20 UTC 2023

Modified Files:
src/sys/arch/evbsh3/evbsh3: locore.S

Log Message:
reorder includes alphabetically to match mmeye counterpart, NFCI.


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/evbsh3/evbsh3/locore.S

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

Modified files:

Index: src/sys/arch/evbsh3/evbsh3/locore.S
diff -u src/sys/arch/evbsh3/evbsh3/locore.S:1.15 src/sys/arch/evbsh3/evbsh3/locore.S:1.16
--- src/sys/arch/evbsh3/evbsh3/locore.S:1.15	Tue Jul 28 21:25:48 2020
+++ src/sys/arch/evbsh3/evbsh3/locore.S	Fri Sep 29 06:09:20 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.15 2020/07/28 21:25:48 uwe Exp $	*/
+/*	$NetBSD: locore.S,v 1.16 2023/09/29 06:09:20 andvar Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -81,13 +81,13 @@
 #endif
 
 #include 
-#include 
+#include 
+#include 
 #include 
 #include 
 #include 
 #include 
-#include 
-#include 
+#include 
 
 #define	INIT_STACK			\
 	((IOM_RAM_BEGIN + IOM_RAM_SIZE - 0x1000) | 0x8000)



CVS commit: src/sys/arch/mmeye/mmeye

2023-09-28 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Sep 29 05:25:15 UTC 2023

Modified Files:
src/sys/arch/mmeye/mmeye: locore.S

Log Message:
reorder includes alphabetically.
remove sh4 specific includes, since mmeye version doesn't have sh4 code.
missed in previous commit, despite mentioning that in commit message.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/mmeye/mmeye/locore.S

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

Modified files:

Index: src/sys/arch/mmeye/mmeye/locore.S
diff -u src/sys/arch/mmeye/mmeye/locore.S:1.14 src/sys/arch/mmeye/mmeye/locore.S:1.15
--- src/sys/arch/mmeye/mmeye/locore.S:1.14	Thu Sep 28 21:45:43 2023
+++ src/sys/arch/mmeye/mmeye/locore.S	Fri Sep 29 05:25:15 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.14 2023/09/28 21:45:43 andvar Exp $	*/
+/*	$NetBSD: locore.S,v 1.15 2023/09/29 05:25:15 andvar Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -81,13 +81,11 @@
 #endif
 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
-#include 
-#include 
-#include 
+#include 
 
 #define	INIT_STACK			\
 	((IOM_RAM_BEGIN + IOM_RAM_SIZE - 0x1000) | 0x8000)



CVS commit: src/sys/arch/mmeye/mmeye

2023-09-28 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Sep 29 05:25:15 UTC 2023

Modified Files:
src/sys/arch/mmeye/mmeye: locore.S

Log Message:
reorder includes alphabetically.
remove sh4 specific includes, since mmeye version doesn't have sh4 code.
missed in previous commit, despite mentioning that in commit message.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/mmeye/mmeye/locore.S

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



CVS commit: src/sys/arch/mmeye/mmeye

2023-09-28 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Thu Sep 28 21:45:43 UTC 2023

Modified Files:
src/sys/arch/mmeye/mmeye: locore.S

Log Message:
apply few commits from uwe in evbsh3/locore.S to mmeye counterpart:
1) Wrap _ROM_START in #ifdef ROMIMAGE to match its use.
2) Use symbolic constants for SR init values.
3) Don't write SR twice.
reduces diff between two mainly to SH4 specific code and few other lines.
NFCI
(confirmed with uwe by email)

Additionally:
rearrange includes alphabetically and remove sh3/mmu_sh4.h, since SH4 specific
code is missing.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/mmeye/mmeye/locore.S

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



CVS commit: src/sys/arch/mmeye/mmeye

2023-09-28 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Thu Sep 28 21:45:43 UTC 2023

Modified Files:
src/sys/arch/mmeye/mmeye: locore.S

Log Message:
apply few commits from uwe in evbsh3/locore.S to mmeye counterpart:
1) Wrap _ROM_START in #ifdef ROMIMAGE to match its use.
2) Use symbolic constants for SR init values.
3) Don't write SR twice.
reduces diff between two mainly to SH4 specific code and few other lines.
NFCI
(confirmed with uwe by email)

Additionally:
rearrange includes alphabetically and remove sh3/mmu_sh4.h, since SH4 specific
code is missing.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/mmeye/mmeye/locore.S

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

Modified files:

Index: src/sys/arch/mmeye/mmeye/locore.S
diff -u src/sys/arch/mmeye/mmeye/locore.S:1.13 src/sys/arch/mmeye/mmeye/locore.S:1.14
--- src/sys/arch/mmeye/mmeye/locore.S:1.13	Sun Sep 24 20:17:26 2023
+++ src/sys/arch/mmeye/mmeye/locore.S	Thu Sep 28 21:45:43 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.13 2023/09/24 20:17:26 andvar Exp $	*/
+/*	$NetBSD: locore.S,v 1.14 2023/09/28 21:45:43 andvar Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -81,12 +81,13 @@
 #endif
 
 #include 
-#include 
+#include 
 #include 
-#include 
-#include 
+#include 
 #include 
 #include 
+#include 
+#include 
 
 #define	INIT_STACK			\
 	((IOM_RAM_BEGIN + IOM_RAM_SIZE - 0x1000) | 0x8000)
@@ -99,20 +100,19 @@ ALTENTRY(kernel_text)
 	/* Set SP to initial position */
 	mov.l	XLtmpstk, r15
 
-	__INTR_MASK(r0, r1)
-
-	/* Set Register Bank to Bank 0 */
+	/* Set Status Register */
 	mov.l	SR_init, r0
 	ldc	r0, sr
 
+	/* MMU off */
 	xor	r0, r0
 	MOV	(MMUCR, r2)
-	mov.l	r0, @r2		/* MMU OFF */
+	mov.l	r0, @r2
 
 	bra	start1
 	nop
 	.align	2
-SR_init:	.long	0x50F0
+SR_init:	.long	PSL_MD | PSL_BL | PSL_IMASK
 REG_SYMBOL(MMUCR)
 start1:
 
@@ -190,7 +190,9 @@ ___etext:	.long	_etext
 ___end:		.long	_end
 XLtmpstk:	.long	INIT_STACK
 _KERNBASE:	.long	0x8c00
+#ifdef ROMIMAGE
 _ROM_START:	.long	IOM_ROM_BEGIN
+#endif
 XLinitSH3:	.long	_C_LABEL(initSH3)
 XLmain:		.long	_C_LABEL(main)
 



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

2023-09-28 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Sep 28 15:46:55 UTC 2023

Modified Files:
src/sys/arch/i386/stand/lib: biosdisk.c

Log Message:
Align the behavior of different boot methods in RAIDframe

We enforce the documented and paritally implemented behavior when
looking for the kernel in RAID 1 sets without a partition name given.
We search for:
- A GPT partition with bootme attribute set
- A FFS or LFS patititon
- The first partition


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/i386/stand/lib/biosdisk.c

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

Modified files:

Index: src/sys/arch/i386/stand/lib/biosdisk.c
diff -u src/sys/arch/i386/stand/lib/biosdisk.c:1.58 src/sys/arch/i386/stand/lib/biosdisk.c:1.59
--- src/sys/arch/i386/stand/lib/biosdisk.c:1.58	Tue May  3 10:09:40 2022
+++ src/sys/arch/i386/stand/lib/biosdisk.c	Thu Sep 28 15:46:55 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: biosdisk.c,v 1.58 2022/05/03 10:09:40 jmcneill Exp $	*/
+/*	$NetBSD: biosdisk.c,v 1.59 2023/09/28 15:46:55 manu Exp $	*/
 
 /*
  * Copyright (c) 1996, 1998
@@ -105,6 +105,7 @@
 struct biosdisk {
 	struct biosdisk_ll ll;
 	daddr_t boff;
+	daddr_t size;
 	charbuf[BIOSDISK_BUFSIZE];
 #if !defined(NO_DISKLABEL) || !defined(NO_GPT)
 	struct biosdisk_partition part[BIOSDISKNPART];
@@ -666,6 +667,7 @@ read_label(struct biosdisk *d, daddr_t o
 	dflt_lbl.d_npartitions = 8;
 
 	d->boff = 0;
+	d->size = 0;
 
 	if (d->ll.type != BIOSDISK_TYPE_HD)
 		/* No label on floppy and CD */
@@ -1208,7 +1210,7 @@ add_biosdisk_bootinfo(void)
 #endif
 
 #ifndef NO_GPT
-static daddr_t
+static void
 raidframe_part_offset(struct biosdisk *d, int part)
 {
 	struct biosdisk raidframe;
@@ -1221,8 +1223,10 @@ raidframe_part_offset(struct biosdisk *d
 
 	rf_offset = d->part[part].offset + RF_PROTECTED_SECTORS;
 	rf_size = d->part[part].size;
-	if (read_gpt(, rf_offset, rf_size) != 0)
-		return RF_PROTECTED_SECTORS;
+	if (read_gpt(, rf_offset, rf_size) != 0) {
+		d->boff += RF_PROTECTED_SECTORS;
+		return;
+	}
 
 	candidate = 0;
 	for (i = 0; i < BIOSDISKNPART; i++) {
@@ -1231,12 +1235,20 @@ raidframe_part_offset(struct biosdisk *d
 		if (raidframe.part[i].fstype == FS_UNUSED)
 			continue;
 #ifndef NO_GPT
-		if (raidframe.part[i].attr & GPT_ENT_ATTR_BOOTME)
+		if (raidframe.part[i].attr & GPT_ENT_ATTR_BOOTME) {
 			candidate = i;
+			break;
+		}
 #endif
+		if (raidframe.part[i].fstype == FS_BSDFFS ||
+		raidframe.part[i].fstype == FS_BSDLFS) {
+			if (candidate == 0)
+candidate = i;
+		}
 	}
 
-	return RF_PROTECTED_SECTORS + raidframe.part[candidate].offset;
+	d->boff += RF_PROTECTED_SECTORS + raidframe.part[candidate].offset;
+	d->size = raidframe.part[candidate].size;
 }
 #endif
 
@@ -1285,17 +1297,18 @@ biosdisk_open(struct open_file *f, ...)
 	}
 
 	d->boff = d->part[partition].offset;
+	d->size = d->part[partition].size;
 
 	if (d->part[partition].fstype == FS_RAID)
 #ifndef NO_GPT
-		d->boff += raidframe_part_offset(d, partition);
+		raidframe_part_offset(d, partition);
 #else
 		d->boff += RF_PROTECTED_SECTORS;
 #endif
 
 #ifdef _STANDALONE
-	bi_wedge.startblk = d->part[partition].offset;
-	bi_wedge.nblks = d->part[partition].size;
+	bi_wedge.startblk = d->boff;
+	bi_wedge.nblks = d->size;
 #endif
 
 nolabel:
@@ -1389,6 +1402,8 @@ next_disk:
 
 #ifndef NO_RAIDFRAME
 	for (i = 0; i < raidframe_count; i++) {
+		int first_bootme = -1;
+		int first_ffs = -1;
 		int candidate = -1;
 
 		if ((d = alloc_biosdisk(raidframe[i].biosdev)) == NULL) {
@@ -1402,12 +1417,20 @@ next_disk:
 			goto next_raidframe;
 
 		for (part = 0; part < BIOSDISKNPART; part++) {
-			bool bootme = d->part[part].attr & GPT_ENT_ATTR_BOOTME;
 			if (d->part[part].size == 0)
 continue;
 			if (d->part[part].fstype == FS_UNUSED)
 continue;
 
+			if (first_bootme == -1 && 
+			d->part[part].attr & GPT_ENT_ATTR_BOOTME)
+first_bootme = part;
+
+			if (first_ffs == -1 && 
+			(d->part[part].fstype == FS_BSDFFS ||
+			 d->part[part].fstype == FS_BSDLFS))
+first_ffs = part;
+
 			if (d->part[part].part_name != NULL &&
 			strcmp(d->part[part].part_name, name) == 0) {
 *biosdev = raidframe[i].biosdev;
@@ -1418,11 +1441,13 @@ next_disk:
 ret = 0;
 goto out;
 			}
-			if (strcmp(raidframe[i].parent_name, name) == 0) {
-if (candidate == -1 || bootme)
-	candidate = part;
-continue;
-			}
+		}
+
+		if (strcmp(raidframe[i].parent_name, name) == 0) {
+			if (first_bootme != -1)
+candidate = first_bootme;
+			else if (first_ffs != -1)
+candidate = first_ffs;
 		}
 
 		if (candidate != -1) {
@@ -1514,6 +1539,10 @@ next_disk:
 	}
 
 	for (i = 0; i < raidframe_count; i++) {
+		int first_bootme = -1;
+		int first_ffs = -1;
+		int candidate = -1;
+
 		if (raidframe[i].last_unit != target_unit)
 			continue;
 
@@ -1532,6 +1561,15 @@ next_disk:
 continue;
 			if (d->part[part].fstype == 

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

2023-09-28 Thread Emmanuel Dreyfus
Module Name:src
Committed By:   manu
Date:   Thu Sep 28 15:46:55 UTC 2023

Modified Files:
src/sys/arch/i386/stand/lib: biosdisk.c

Log Message:
Align the behavior of different boot methods in RAIDframe

We enforce the documented and paritally implemented behavior when
looking for the kernel in RAID 1 sets without a partition name given.
We search for:
- A GPT partition with bootme attribute set
- A FFS or LFS patititon
- The first partition


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/i386/stand/lib/biosdisk.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/m68k/include

2023-09-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 28 06:34:22 UTC 2023

Modified Files:
src/sys/arch/m68k/include: pmap_coldfire.h

Log Message:
whitespace nit


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/m68k/include/pmap_coldfire.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/m68k/include/pmap_coldfire.h
diff -u src/sys/arch/m68k/include/pmap_coldfire.h:1.5 src/sys/arch/m68k/include/pmap_coldfire.h:1.6
--- src/sys/arch/m68k/include/pmap_coldfire.h:1.5	Thu Sep 28 06:23:43 2023
+++ src/sys/arch/m68k/include/pmap_coldfire.h	Thu Sep 28 06:34:22 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_coldfire.h,v 1.5 2023/09/28 06:23:43 skrll Exp $	*/
+/*	$NetBSD: pmap_coldfire.h,v 1.6 2023/09/28 06:34:22 skrll Exp $	*/
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -65,7 +65,7 @@
 
 #define	KERNEL_PID	0
 
-#define	PMAP_TLB_MAX			  1
+#define	PMAP_TLB_MAX			1
 #define	PMAP_TLB_NUM_PIDS		256
 #define	PMAP_INVALID_SEGTAB_ADDRESS	((pmap_segtab_t *)0xfeeddead)
 



CVS commit: src/sys/arch/m68k/include

2023-09-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 28 06:34:22 UTC 2023

Modified Files:
src/sys/arch/m68k/include: pmap_coldfire.h

Log Message:
whitespace nit


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

2023-09-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 28 06:24:37 UTC 2023

Modified Files:
src/sys/arch/powerpc/include/booke: pmap.h

Log Message:
#define -> #define for consistency


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/powerpc/include/booke/pmap.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/booke/pmap.h
diff -u src/sys/arch/powerpc/include/booke/pmap.h:1.24 src/sys/arch/powerpc/include/booke/pmap.h:1.25
--- src/sys/arch/powerpc/include/booke/pmap.h:1.24	Sun Dec 20 16:38:25 2020
+++ src/sys/arch/powerpc/include/booke/pmap.h	Thu Sep 28 06:24:37 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.24 2020/12/20 16:38:25 skrll Exp $	*/
+/*	$NetBSD: pmap.h,v 1.25 2023/09/28 06:24:37 skrll Exp $	*/
 /*-
  * Copyright (c) 2010, 2011 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -66,8 +66,8 @@
 
 #define	NBSEG		(NBPG*NPTEPG)
 #define	SEGSHIFT	(PGSHIFT + PGSHIFT - 2)
-#define SEGOFSET	((1 << SEGSHIFT) - 1)
-#define PMAP_SEGTABSIZE	(1 << (32 - SEGSHIFT))
+#define	SEGOFSET	((1 << SEGSHIFT) - 1)
+#define	PMAP_SEGTABSIZE	(1 << (32 - SEGSHIFT))
 #define	NPTEPG		(NBPG >> 2)
 
 #define	KERNEL_PID	0



CVS commit: src/sys/arch/powerpc/include/booke

2023-09-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 28 06:24:37 UTC 2023

Modified Files:
src/sys/arch/powerpc/include/booke: pmap.h

Log Message:
#define -> #define for consistency


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/powerpc/include/booke/pmap.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/m68k/include

2023-09-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 28 06:23:43 UTC 2023

Modified Files:
src/sys/arch/m68k/include: pmap_coldfire.h

Log Message:
#define -> #define for consistency


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/m68k/include/pmap_coldfire.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/m68k/include/pmap_coldfire.h
diff -u src/sys/arch/m68k/include/pmap_coldfire.h:1.4 src/sys/arch/m68k/include/pmap_coldfire.h:1.5
--- src/sys/arch/m68k/include/pmap_coldfire.h:1.4	Sun Dec 20 16:38:25 2020
+++ src/sys/arch/m68k/include/pmap_coldfire.h	Thu Sep 28 06:23:43 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_coldfire.h,v 1.4 2020/12/20 16:38:25 skrll Exp $	*/
+/*	$NetBSD: pmap_coldfire.h,v 1.5 2023/09/28 06:23:43 skrll Exp $	*/
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -59,13 +59,13 @@
 
 #define	NBSEG		(NBPG*NPTEPG)
 #define	SEGSHIFT	(PGSHIFT + PGSHIFT - 2)
-#define SEGOFSET	((1 << SEGSHIFT) - 1)
-#define PMAP_SEGTABSIZE	(1 << (32 - SEGSHIFT))
+#define	SEGOFSET	((1 << SEGSHIFT) - 1)
+#define	PMAP_SEGTABSIZE	(1 << (32 - SEGSHIFT))
 #define	NPTEPG		(NBPG >> 2)
 
 #define	KERNEL_PID	0
 
-#define PMAP_TLB_MAX			  1
+#define	PMAP_TLB_MAX			  1
 #define	PMAP_TLB_NUM_PIDS		256
 #define	PMAP_INVALID_SEGTAB_ADDRESS	((pmap_segtab_t *)0xfeeddead)
 



CVS commit: src/sys/arch/m68k/include

2023-09-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 28 06:23:43 UTC 2023

Modified Files:
src/sys/arch/m68k/include: pmap_coldfire.h

Log Message:
#define -> #define for consistency


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/m68k/include/pmap_coldfire.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

2023-09-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 28 06:19:19 UTC 2023

Modified Files:
src/sys/arch/powerpc/include/ibm4xx: pmap.h
src/sys/arch/powerpc/include/oea: pmap.h

Log Message:
Trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/powerpc/include/ibm4xx/pmap.h
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/powerpc/include/oea/pmap.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/ibm4xx/pmap.h
diff -u src/sys/arch/powerpc/include/ibm4xx/pmap.h:1.21 src/sys/arch/powerpc/include/ibm4xx/pmap.h:1.22
--- src/sys/arch/powerpc/include/ibm4xx/pmap.h:1.21	Sat Mar 14 14:05:43 2020
+++ src/sys/arch/powerpc/include/ibm4xx/pmap.h	Thu Sep 28 06:19:19 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.21 2020/03/14 14:05:43 ad Exp $	*/
+/*	$NetBSD: pmap.h,v 1.22 2023/09/28 06:19:19 skrll Exp $	*/
 
 /*
  * Copyright 2001 Wasabi Systems, Inc.
@@ -69,7 +69,7 @@
 #ifndef	_IBM4XX_PMAP_H_
 #define	_IBM4XX_PMAP_H_
 
-#ifdef _LOCORE  
+#ifdef _LOCORE
 #error use assym.h instead
 #endif
 
@@ -132,7 +132,7 @@
 #define	STIDX(v)	((v) >> (PGSHIFT + 12))
 
 
-/* 
+/*
  * Extra flags to pass to pmap_enter() -- make sure they don't conflict
  * w/PMAP_CANFAIL or PMAP_WIRED
  */

Index: src/sys/arch/powerpc/include/oea/pmap.h
diff -u src/sys/arch/powerpc/include/oea/pmap.h:1.37 src/sys/arch/powerpc/include/oea/pmap.h:1.38
--- src/sys/arch/powerpc/include/oea/pmap.h:1.37	Sat May  7 07:10:46 2022
+++ src/sys/arch/powerpc/include/oea/pmap.h	Thu Sep 28 06:19:19 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap.h,v 1.37 2022/05/07 07:10:46 rin Exp $	*/
+/*	$NetBSD: pmap.h,v 1.38 2023/09/28 06:19:19 skrll Exp $	*/
 
 /*-
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -34,7 +34,7 @@
 #ifndef	_POWERPC_OEA_PMAP_H_
 #define	_POWERPC_OEA_PMAP_H_
 
-#ifdef _LOCORE  
+#ifdef _LOCORE
 #error use assym.h instead
 #endif
 



CVS commit: src/sys/arch/powerpc/include

2023-09-28 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Thu Sep 28 06:19:19 UTC 2023

Modified Files:
src/sys/arch/powerpc/include/ibm4xx: pmap.h
src/sys/arch/powerpc/include/oea: pmap.h

Log Message:
Trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/powerpc/include/ibm4xx/pmap.h
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/powerpc/include/oea/pmap.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/m68k

2023-09-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Sep 26 14:33:55 UTC 2023

Modified Files:
src/sys/arch/m68k/include: cacheops_60.h cpuframe.h db_machdep.h
frame.h m68k.h pcb.h
src/sys/arch/m68k/m68k: copy.s db_disasm.c db_trace.c oc_cksum.s
pmap_motorola.c sunos_machdep.c sunos_sigcode.s switch_subr.s
vm_machdep.c

Log Message:
TAB/space cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/m68k/include/cacheops_60.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/m68k/include/cpuframe.h
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/m68k/include/db_machdep.h
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/m68k/include/frame.h
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/m68k/include/m68k.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/m68k/include/pcb.h
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/m68k/m68k/copy.s
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/m68k/m68k/db_disasm.c
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/m68k/m68k/db_trace.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/m68k/m68k/oc_cksum.s
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/m68k/m68k/pmap_motorola.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/m68k/m68k/sunos_machdep.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/m68k/m68k/sunos_sigcode.s
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/m68k/m68k/switch_subr.s
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/m68k/m68k/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/m68k/include/cacheops_60.h
diff -u src/sys/arch/m68k/include/cacheops_60.h:1.13 src/sys/arch/m68k/include/cacheops_60.h:1.14
--- src/sys/arch/m68k/include/cacheops_60.h:1.13	Mon Apr 28 20:23:26 2008
+++ src/sys/arch/m68k/include/cacheops_60.h	Tue Sep 26 14:33:55 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: cacheops_60.h,v 1.13 2008/04/28 20:23:26 martin Exp $	*/
+/*	$NetBSD: cacheops_60.h,v 1.14 2023/09/26 14:33:55 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -74,7 +74,7 @@ TBIAS_60(void)
 			  " movc  %%cacr,%0;"
 			  " orl   %1,%0;"
 			  " movc  %0,%%cacr" /* clear all branch cache
-			 		entries */
+	entries */
 			  : "=d" (tmp) : "i" (IC60_CABC) );
 }
 
@@ -93,7 +93,7 @@ TBIAU_60(void)
 			  " movc  %%cacr,%0;"
 			  " orl   %1,%0;"
 			  " movc  %0,%%cacr" /* clear all branch cache
-			 		entries */
+	entries */
 			  : "=d" (tmp) : "i" (IC60_CUBC) );
 }
 

Index: src/sys/arch/m68k/include/cpuframe.h
diff -u src/sys/arch/m68k/include/cpuframe.h:1.9 src/sys/arch/m68k/include/cpuframe.h:1.10
--- src/sys/arch/m68k/include/cpuframe.h:1.9	Tue Sep 26 12:46:30 2023
+++ src/sys/arch/m68k/include/cpuframe.h	Tue Sep 26 14:33:55 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuframe.h,v 1.9 2023/09/26 12:46:30 tsutsui Exp $	*/
+/*	$NetBSD: cpuframe.h,v 1.10 2023/09/26 14:33:55 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -64,8 +64,8 @@ struct frame {
 			u_int	f_fa;
 			u_int	f_fslw;
 			/* for 060FP type 4 FP disabled frames: */
-#define 		f_fea	f_fa
-#define 		f_pcfi	f_fslw
+#define			f_fea	f_fa
+#define			f_pcfi	f_fslw
 		} F_fmt4;
 
 		struct fmt7 {

Index: src/sys/arch/m68k/include/db_machdep.h
diff -u src/sys/arch/m68k/include/db_machdep.h:1.34 src/sys/arch/m68k/include/db_machdep.h:1.35
--- src/sys/arch/m68k/include/db_machdep.h:1.34	Tue Sep 26 12:46:30 2023
+++ src/sys/arch/m68k/include/db_machdep.h	Tue Sep 26 14:33:55 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: db_machdep.h,v 1.34 2023/09/26 12:46:30 tsutsui Exp $	*/
+/*	$NetBSD: db_machdep.h,v 1.35 2023/09/26 14:33:55 tsutsui Exp $	*/
 
 /*
  * Mach Operating System
@@ -102,7 +102,7 @@ typedef long kgdb_reg_t;
 
 void	Debugger(void);		/* XXX */
 void	kdb_kintr(db_regs_t *);
-int 	kdb_trap(int, db_regs_t *);
+int	kdb_trap(int, db_regs_t *);
 
 #endif /* _KERNEL */
 

Index: src/sys/arch/m68k/include/frame.h
diff -u src/sys/arch/m68k/include/frame.h:1.32 src/sys/arch/m68k/include/frame.h:1.33
--- src/sys/arch/m68k/include/frame.h:1.32	Tue Sep 26 12:46:30 2023
+++ src/sys/arch/m68k/include/frame.h	Tue Sep 26 14:33:55 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: frame.h,v 1.32 2023/09/26 12:46:30 tsutsui Exp $	*/
+/*	$NetBSD: frame.h,v 1.33 2023/09/26 14:33:55 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -147,17 +147,17 @@
 #define FSLW_PBE	0x4000
 #define FSLW_SBE	0x2000
 #define FSLW_PTA	0x1000
-#define FSLW_PTB 	0x0800
-#define FSLW_IL 	0x0400
-#define FSLW_PF 	0x0200
-#define FSLW_SP 	0x0100
-#define FSLW_WP 	0x0080
-#define FSLW_TWE 	0x0040
-#define FSLW_RE 	0x0020
-#define FSLW_WE 	0x0010
-#define FSLW_TTR 	0x0008
-#define FSLW_BPE 	0x0004
-#define FSLW_SEE 	0x0001
+#define FSLW_PTB	0x0800
+#define FSLW_IL		0x0400
+#define FSLW_PF		0x0200
+#define FSLW_SP		0x0100
+#define FSLW_WP		0x0080
+#define FSLW_TWE	0x0040
+#define FSLW_RE		0x0020
+#define FSLW_WE		0x0010
+#define 

CVS commit: src/sys/arch/m68k

2023-09-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Sep 26 14:33:55 UTC 2023

Modified Files:
src/sys/arch/m68k/include: cacheops_60.h cpuframe.h db_machdep.h
frame.h m68k.h pcb.h
src/sys/arch/m68k/m68k: copy.s db_disasm.c db_trace.c oc_cksum.s
pmap_motorola.c sunos_machdep.c sunos_sigcode.s switch_subr.s
vm_machdep.c

Log Message:
TAB/space cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/m68k/include/cacheops_60.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/m68k/include/cpuframe.h
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/m68k/include/db_machdep.h
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/m68k/include/frame.h
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/m68k/include/m68k.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/m68k/include/pcb.h
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/m68k/m68k/copy.s
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/m68k/m68k/db_disasm.c
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/m68k/m68k/db_trace.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/m68k/m68k/oc_cksum.s
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/m68k/m68k/pmap_motorola.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/m68k/m68k/sunos_machdep.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/m68k/m68k/sunos_sigcode.s
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/m68k/m68k/switch_subr.s
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/m68k/m68k/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/m68k

2023-09-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Sep 26 12:46:30 UTC 2023

Modified Files:
src/sys/arch/m68k/include: asm.h bus_dma.h cacheops_30.h cpuframe.h
db_machdep.h fenv.h frame.h ieeefp.h int_limits.h m68k.h
pmap_motorola.h
src/sys/arch/m68k/m68k: bus_dma.c copypage.s db_disasm.h db_memrw.c
db_trace.c m68k_machdep.c oc_cksum.s pmap_motorola.c switch_subr.s
trap_subr.s w16copy.s

Log Message:
Remove trailing spaces and TABs.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/m68k/include/asm.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/m68k/include/bus_dma.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/m68k/include/cacheops_30.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/m68k/include/cpuframe.h \
src/sys/arch/m68k/include/fenv.h src/sys/arch/m68k/include/int_limits.h
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/m68k/include/db_machdep.h
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/m68k/include/frame.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/m68k/include/ieeefp.h
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/m68k/include/m68k.h
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/m68k/include/pmap_motorola.h
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/m68k/m68k/bus_dma.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/m68k/m68k/copypage.s
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/m68k/m68k/db_disasm.h \
src/sys/arch/m68k/m68k/m68k_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/m68k/m68k/db_memrw.c
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/m68k/m68k/db_trace.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/m68k/m68k/oc_cksum.s
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/m68k/m68k/pmap_motorola.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/m68k/m68k/switch_subr.s
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/m68k/m68k/trap_subr.s
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/m68k/m68k/w16copy.s

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

Modified files:

Index: src/sys/arch/m68k/include/asm.h
diff -u src/sys/arch/m68k/include/asm.h:1.34 src/sys/arch/m68k/include/asm.h:1.35
--- src/sys/arch/m68k/include/asm.h:1.34	Fri Apr 17 14:19:43 2020
+++ src/sys/arch/m68k/include/asm.h	Tue Sep 26 12:46:30 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.34 2020/04/17 14:19:43 joerg Exp $	*/
+/*	$NetBSD: asm.h,v 1.35 2023/09/26 12:46:30 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -122,7 +122,7 @@
 
 /*
  * The m68k ALTENTRY macro is very different than the traditional
- * implementation used by other NetBSD ports.  Usually ALTENTRY 
+ * implementation used by other NetBSD ports.  Usually ALTENTRY
  * simply provides an alternate function entry point.  The m68k
  * definition takes a second argument and jumps inside the second
  * function when profiling is enabled.

Index: src/sys/arch/m68k/include/bus_dma.h
diff -u src/sys/arch/m68k/include/bus_dma.h:1.13 src/sys/arch/m68k/include/bus_dma.h:1.14
--- src/sys/arch/m68k/include/bus_dma.h:1.13	Sun Dec  5 04:54:20 2021
+++ src/sys/arch/m68k/include/bus_dma.h	Tue Sep 26 12:46:30 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: bus_dma.h,v 1.13 2021/12/05 04:54:20 msaitoh Exp $ */
+/* $NetBSD: bus_dma.h,v 1.14 2023/09/26 12:46:30 tsutsui Exp $ */
 
 /*
  * This file was extracted from alpha/include/bus.h
@@ -193,7 +193,7 @@ struct m68k_bus_dma_tag {
 #define	bus_dmamem_mmap(t, sg, n, o, p, f)			\
 	(*(t)->_dmamem_mmap)((t), (sg), (n), (o), (p), (f))
 
-#define bus_dmatag_subregion(t, mna, mxa, nt, f) EOPNOTSUPP   
+#define bus_dmatag_subregion(t, mna, mxa, nt, f) EOPNOTSUPP
 #define bus_dmatag_destroy(t)
 
 /*

Index: src/sys/arch/m68k/include/cacheops_30.h
diff -u src/sys/arch/m68k/include/cacheops_30.h:1.9 src/sys/arch/m68k/include/cacheops_30.h:1.10
--- src/sys/arch/m68k/include/cacheops_30.h:1.9	Mon Apr 28 20:23:26 2008
+++ src/sys/arch/m68k/include/cacheops_30.h	Tue Sep 26 12:46:30 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: cacheops_30.h,v 1.9 2008/04/28 20:23:26 martin Exp $	*/
+/*	$NetBSD: cacheops_30.h,v 1.10 2023/09/26 12:46:30 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -40,7 +40,7 @@ TBIA_30(void)
 	__asm volatile (" pflusha;"
 			  " movc %0,%%cacr" : : "d" (tmp));
 }
-	
+
 /*
  * Invalidate any TLB entry for given VA (TB Invalidate Single)
  */

Index: src/sys/arch/m68k/include/cpuframe.h
diff -u src/sys/arch/m68k/include/cpuframe.h:1.8 src/sys/arch/m68k/include/cpuframe.h:1.9
--- src/sys/arch/m68k/include/cpuframe.h:1.8	Sun Dec  5 02:53:51 2021
+++ src/sys/arch/m68k/include/cpuframe.h	Tue Sep 26 12:46:30 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpuframe.h,v 1.8 2021/12/05 02:53:51 msaitoh Exp $	*/
+/*	$NetBSD: cpuframe.h,v 1.9 2023/09/26 12:46:30 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -64,7 +64,7 @@ struct frame {
 			u_int	f_fa;
 			u_int	f_fslw;
 			/* for 060FP type 4 FP disabled frames: */
-#define 		f_fea	f_fa	
+#define 		f_fea	f_fa
 #define 		f_pcfi	f_fslw
 		} F_fmt4;
 
@@ -187,8 +187,8 @@ 

CVS commit: src/sys/arch/m68k

2023-09-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Sep 26 12:46:30 UTC 2023

Modified Files:
src/sys/arch/m68k/include: asm.h bus_dma.h cacheops_30.h cpuframe.h
db_machdep.h fenv.h frame.h ieeefp.h int_limits.h m68k.h
pmap_motorola.h
src/sys/arch/m68k/m68k: bus_dma.c copypage.s db_disasm.h db_memrw.c
db_trace.c m68k_machdep.c oc_cksum.s pmap_motorola.c switch_subr.s
trap_subr.s w16copy.s

Log Message:
Remove trailing spaces and TABs.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/m68k/include/asm.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/m68k/include/bus_dma.h
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/m68k/include/cacheops_30.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/m68k/include/cpuframe.h \
src/sys/arch/m68k/include/fenv.h src/sys/arch/m68k/include/int_limits.h
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/m68k/include/db_machdep.h
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/m68k/include/frame.h
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/m68k/include/ieeefp.h
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/m68k/include/m68k.h
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/m68k/include/pmap_motorola.h
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/m68k/m68k/bus_dma.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/m68k/m68k/copypage.s
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/m68k/m68k/db_disasm.h \
src/sys/arch/m68k/m68k/m68k_machdep.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/m68k/m68k/db_memrw.c
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/m68k/m68k/db_trace.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/m68k/m68k/oc_cksum.s
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/m68k/m68k/pmap_motorola.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/m68k/m68k/switch_subr.s
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/m68k/m68k/trap_subr.s
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/m68k/m68k/w16copy.s

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



CVS commit: src/sys/arch/sbmips/include

2023-09-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Sep 25 14:56:56 UTC 2023

Modified Files:
src/sys/arch/sbmips/include: systemsw.h

Log Message:
sbmips/systemsw.h: sys/stdbool.h for bool.

XXX sys/types.h should bring this in too, but that doesn't happen in
the crash(8) build, perhaps because sys/types.h only includes
sys/stdbool.h under _KERNEL or _STANDALONE but not _KMEMUSER -- maybe
we should fix that but this is a lower-risk change for now to fix a
build problem.

Found by Jan-Benedict Glaw.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sbmips/include/systemsw.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/sbmips/include

2023-09-25 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Mon Sep 25 14:56:56 UTC 2023

Modified Files:
src/sys/arch/sbmips/include: systemsw.h

Log Message:
sbmips/systemsw.h: sys/stdbool.h for bool.

XXX sys/types.h should bring this in too, but that doesn't happen in
the crash(8) build, perhaps because sys/types.h only includes
sys/stdbool.h under _KERNEL or _STANDALONE but not _KMEMUSER -- maybe
we should fix that but this is a lower-risk change for now to fix a
build problem.

Found by Jan-Benedict Glaw.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/sbmips/include/systemsw.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/sbmips/include/systemsw.h
diff -u src/sys/arch/sbmips/include/systemsw.h:1.9 src/sys/arch/sbmips/include/systemsw.h:1.10
--- src/sys/arch/sbmips/include/systemsw.h:1.9	Sun Feb 20 07:47:38 2011
+++ src/sys/arch/sbmips/include/systemsw.h	Mon Sep 25 14:56:56 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: systemsw.h,v 1.9 2011/02/20 07:47:38 matt Exp $ */
+/* $NetBSD: systemsw.h,v 1.10 2023/09/25 14:56:56 riastradh Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -37,6 +37,8 @@
 
 #include 
 
+#include 
+
 struct systemsw {
 	/* ordered to match likely locality. */
 	void	(*s_cpu_intr)(int, vaddr_t, uint32_t);



CVS commit: src/sys/arch/mmeye/mmeye

2023-09-24 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 24 20:17:26 UTC 2023

Modified Files:
src/sys/arch/mmeye/mmeye: locore.S

Log Message:
Nix trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/mmeye/mmeye/locore.S

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



CVS commit: src/sys/arch/mmeye/mmeye

2023-09-24 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 24 20:17:26 UTC 2023

Modified Files:
src/sys/arch/mmeye/mmeye: locore.S

Log Message:
Nix trailing whitespace.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/mmeye/mmeye/locore.S

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

Modified files:

Index: src/sys/arch/mmeye/mmeye/locore.S
diff -u src/sys/arch/mmeye/mmeye/locore.S:1.12 src/sys/arch/mmeye/mmeye/locore.S:1.13
--- src/sys/arch/mmeye/mmeye/locore.S:1.12	Sun Sep 24 19:57:10 2023
+++ src/sys/arch/mmeye/mmeye/locore.S	Sun Sep 24 20:17:26 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.12 2023/09/24 19:57:10 andvar Exp $	*/
+/*	$NetBSD: locore.S,v 1.13 2023/09/24 20:17:26 andvar Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -73,18 +73,18 @@
  */
 
 #include "opt_cputype.h"
-#include "opt_memsize.h"	
+#include "opt_memsize.h"
 #include "assym.h"
 
-#if defined(SH3) && defined(SH4)	
-#error "mmeye port don't support SH3,SH4 common kernel."	
+#if defined(SH3) && defined(SH4)
+#error "mmeye port don't support SH3,SH4 common kernel."
 #endif
 
 #include 
 #include 
 #include 
 #include 
-#include 	
+#include 
 #include 
 #include 
 
@@ -106,14 +106,14 @@ ALTENTRY(kernel_text)
 	ldc	r0, sr
 
 	xor	r0, r0
-	MOV	(MMUCR, r2)	
+	MOV	(MMUCR, r2)
 	mov.l	r0, @r2		/* MMU OFF */
 
 	bra	start1
 	nop
 	.align	2
 SR_init:	.long	0x50F0
-REG_SYMBOL(MMUCR)	
+REG_SYMBOL(MMUCR)
 start1:
 
 #ifdef ROMIMAGE



CVS commit: src/sys/arch/mmeye/mmeye

2023-09-24 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 24 19:57:10 UTC 2023

Modified Files:
src/sys/arch/mmeye/mmeye: locore.S

Log Message:
unify ROMIMAGE specific assembler code between evbsh3 and mmeye.

fixes mmeye ROMIMAGE enabled build and in turn MMTAROMNEW kernel config.
patch checked by martin. PR port-mmeye/57627.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/mmeye/mmeye/locore.S

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

Modified files:

Index: src/sys/arch/mmeye/mmeye/locore.S
diff -u src/sys/arch/mmeye/mmeye/locore.S:1.11 src/sys/arch/mmeye/mmeye/locore.S:1.12
--- src/sys/arch/mmeye/mmeye/locore.S:1.11	Sat Feb 19 10:46:29 2011
+++ src/sys/arch/mmeye/mmeye/locore.S	Sun Sep 24 19:57:10 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.S,v 1.11 2011/02/19 10:46:29 kiyohara Exp $	*/
+/*	$NetBSD: locore.S,v 1.12 2023/09/24 19:57:10 andvar Exp $	*/
 
 /*-
  * Copyright (c) 1990 The Regents of the University of California.
@@ -119,7 +119,8 @@ start1:
 #ifdef ROMIMAGE
 	/* Initialize BUS State Control Regs. */
 	mov.l	_ROM_START, r3
-	mov.l	_C_LABEL(ram_start), r4
+	mov.l	XL_ram_start, r4
+	mov.l	@r4, r4
 	sub	r3, r4
 	/* Set Bus State Controller */
 	mov.l	XLInitializeBsc, r0
@@ -140,7 +141,8 @@ start1:
 	add	r3, r1		/* src address */
 	mov.l	___start, r3
 	sub	r2, r3
-	mov.l	_C_LABEL(ram_start), r4
+	mov.l	XL_ram_start, r4
+	mov.l	@r4, r4
 	add	r4, r3		/* dest address */
 1:
 	mov.l	@r1+, r4
@@ -157,6 +159,8 @@ start1:
 	.align	2
 LXstart_in_RAM:
 	.long	start_in_RAM
+XL_ram_start:
+	.long	_C_LABEL(ram_start)
 #else /* ROMIMAGE */
 	/* Set Bus State Controller */
 	mov.l	XLInitializeBsc, r0



CVS commit: src/sys/arch/mmeye/mmeye

2023-09-24 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 24 19:57:10 UTC 2023

Modified Files:
src/sys/arch/mmeye/mmeye: locore.S

Log Message:
unify ROMIMAGE specific assembler code between evbsh3 and mmeye.

fixes mmeye ROMIMAGE enabled build and in turn MMTAROMNEW kernel config.
patch checked by martin. PR port-mmeye/57627.


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/mmeye/mmeye/locore.S

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



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

2023-09-24 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 24 13:59:38 UTC 2023

Modified Files:
src/sys/arch/mmeye/conf: MMTAROMNEW

Log Message:
disable all phy devices in config, since network is disabled in general.
add SH7708R option from MMTA config, one CPU option is required.
enable pseudo-terminal device, also needed for config to build.

changes fix the kernel config itself, but build fails on locore.S asm code,
will file a PR for that.

P.S. would be good to update descriptions of kernel configs, since all copied
from GENERIC and it is difficult to decipher their purpose and relevance.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/mmeye/conf/MMTAROMNEW

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/mmeye/conf/MMTAROMNEW
diff -u src/sys/arch/mmeye/conf/MMTAROMNEW:1.56 src/sys/arch/mmeye/conf/MMTAROMNEW:1.57
--- src/sys/arch/mmeye/conf/MMTAROMNEW:1.56	Thu Feb  9 14:09:49 2023
+++ src/sys/arch/mmeye/conf/MMTAROMNEW	Sun Sep 24 13:59:38 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: MMTAROMNEW,v 1.56 2023/02/09 14:09:49 abs Exp $
+#	$NetBSD: MMTAROMNEW,v 1.57 2023/09/24 13:59:38 andvar Exp $
 #
 #	GENERIC -- everything that's currently supported
 #
@@ -18,6 +18,7 @@ options 	ROMIMAGE
 maxusers	32		# estimated number of users
 
 options		SH3
+options 	SH7708R			# 100MHz
 options 	PCLOCK=		# 33.33MHz
 options 	MMEYE_NEW_INT=0xb00e
 #options 	MMEYE_NO_CACHE
@@ -182,15 +183,15 @@ wd*	at atabus? drive ?
 #sm*	at pcmcia? function ?		# Megahertz Ethernet
 
 # MII/PHY support
-exphy*	at mii? phy ?			# 3Com internal PHYs
-icsphy*	at mii? phy ?			# Integrated Circuit Systems ICS189x
-inphy*	at mii? phy ?			# Intel 82555 PHYs
-lxtphy*	at mii? phy ?			# Level One LXT-970 PHYs
-nsphy*	at mii? phy ?			# NS83840 PHYs
-qsphy*	at mii? phy ?			# Quality Semiconductor QS6612 PHYs
-sqphy*	at mii? phy ?			# Seeq 80220/80221/80223 PHYs
+#exphy*	at mii? phy ?			# 3Com internal PHYs
+#icsphy*	at mii? phy ?			# Integrated Circuit Systems ICS189x
+#inphy*	at mii? phy ?			# Intel 82555 PHYs
+#lxtphy*	at mii? phy ?			# Level One LXT-970 PHYs
+#nsphy*	at mii? phy ?			# NS83840 PHYs
+#qsphy*	at mii? phy ?			# Quality Semiconductor QS6612 PHYs
+#sqphy*	at mii? phy ?			# Seeq 80220/80221/80223 PHYs
 #tlphy*	at mii? phy ?			# ThunderLAN PHYs
-ukphy*	at mii? phy ?			# generic unknown PHYs
+#ukphy*	at mii? phy ?			# generic unknown PHYs
 
 # Pseudo-Devices
 
@@ -209,7 +210,7 @@ ukphy*	at mii? phy ?			# generic unknown
 #pseudo-device	tun			# network tunneling over tty
 
 # miscellaneous pseudo-devices
-#pseudo-device	pty			# pseudo-terminals
+pseudo-device	pty			# pseudo-terminals
 pseudo-device	clockctl		# user control of clock subsystem
 
 # rnd is EXPERIMENTAL at this point.



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

2023-09-24 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 24 13:59:38 UTC 2023

Modified Files:
src/sys/arch/mmeye/conf: MMTAROMNEW

Log Message:
disable all phy devices in config, since network is disabled in general.
add SH7708R option from MMTA config, one CPU option is required.
enable pseudo-terminal device, also needed for config to build.

changes fix the kernel config itself, but build fails on locore.S asm code,
will file a PR for that.

P.S. would be good to update descriptions of kernel configs, since all copied
from GENERIC and it is difficult to decipher their purpose and relevance.


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/mmeye/conf/MMTAROMNEW

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/dev

2023-09-24 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 24 10:59:24 UTC 2023

Modified Files:
src/sys/arch/macppc/dev: zs.c

Log Message:
pass NULL to the second dbdma_alloc() expected argement.
it was not adjusted after it acquired one 7 years ago.

fixes ZS_TXDMA enabled build for macppc.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/macppc/dev/zs.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/dev

2023-09-24 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 24 10:59:24 UTC 2023

Modified Files:
src/sys/arch/macppc/dev: zs.c

Log Message:
pass NULL to the second dbdma_alloc() expected argement.
it was not adjusted after it acquired one 7 years ago.

fixes ZS_TXDMA enabled build for macppc.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/macppc/dev/zs.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/dev/zs.c
diff -u src/sys/arch/macppc/dev/zs.c:1.58 src/sys/arch/macppc/dev/zs.c:1.59
--- src/sys/arch/macppc/dev/zs.c:1.58	Sat Sep 23 12:48:23 2023
+++ src/sys/arch/macppc/dev/zs.c	Sun Sep 24 10:59:24 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: zs.c,v 1.58 2023/09/23 12:48:23 andvar Exp $	*/
+/*	$NetBSD: zs.c,v 1.59 2023/09/24 10:59:24 andvar Exp $	*/
 
 /*
  * Copyright (c) 1996, 1998 Bill Studenmund
@@ -49,7 +49,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.58 2023/09/23 12:48:23 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.59 2023/09/24 10:59:24 andvar Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -259,7 +259,7 @@ zsc_attach(device_t parent, device_t sel
 #ifdef ZS_TXDMA
 		zsc->zsc_txdmareg[channel] = mapiodev(regs[2], regs[3], false);
 		zsc->zsc_txdmacmd[channel] =
-			dbdma_alloc(sizeof(dbdma_command_t) * 3);
+			dbdma_alloc(sizeof(dbdma_command_t) * 3, NULL);
 		memset(zsc->zsc_txdmacmd[channel], 0,
 			sizeof(dbdma_command_t) * 3);
 		dbdma_reset(zsc->zsc_txdmareg[channel]);



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

2023-09-24 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 24 10:51:28 UTC 2023

Modified Files:
src/sys/arch/macppc/dev: valkyriefb.c

Log Message:
define i variable in for loop.
valkyriefb_attach() doesn't have one defined in the function scope.

fixes VALKYRIEFB_DEBUG enabled build for macppc.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/macppc/dev/valkyriefb.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/dev/valkyriefb.c
diff -u src/sys/arch/macppc/dev/valkyriefb.c:1.8 src/sys/arch/macppc/dev/valkyriefb.c:1.9
--- src/sys/arch/macppc/dev/valkyriefb.c:1.8	Wed Feb 16 23:49:26 2022
+++ src/sys/arch/macppc/dev/valkyriefb.c	Sun Sep 24 10:51:28 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: valkyriefb.c,v 1.8 2022/02/16 23:49:26 riastradh Exp $	*/
+/*	$NetBSD: valkyriefb.c,v 1.9 2023/09/24 10:51:28 andvar Exp $	*/
 
 /*
  * Copyright (c) 2012 Michael Lorenz
@@ -32,7 +32,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: valkyriefb.c,v 1.8 2022/02/16 23:49:26 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: valkyriefb.c,v 1.9 2023/09/24 10:51:28 andvar Exp $");
 
 #include 
 #include 
@@ -209,7 +209,7 @@ valkyriefb_attach(device_t parent, devic
 	aprint_verbose_dev(sc->sc_dev, "waiting for videopll...\n");
 	sc->sc_base = (uint8_t *)ca->ca_reg[0];
 #ifdef VALKYRIEFB_DEBUG
-	for (i = 0; i < 0x40; i += 8) {
+	for (int i = 0; i < 0x40; i += 8) {
 		aprint_error_dev(sc->sc_dev, "%02x: %02x\n", i,
 		valkyriefb_read_reg(sc, i));
 	}



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

2023-09-24 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 24 10:51:28 UTC 2023

Modified Files:
src/sys/arch/macppc/dev: valkyriefb.c

Log Message:
define i variable in for loop.
valkyriefb_attach() doesn't have one defined in the function scope.

fixes VALKYRIEFB_DEBUG enabled build for macppc.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/macppc/dev/valkyriefb.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/aarch64/include

2023-09-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Sep 24 10:13:44 UTC 2023

Modified Files:
src/sys/arch/aarch64/include: armreg.h

Log Message:
Add a bunch of system registers and their bit / bit field definitions.
Taken from ryo's nvmm branch with updates from me.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/aarch64/include/armreg.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/aarch64/include/armreg.h
diff -u src/sys/arch/aarch64/include/armreg.h:1.64 src/sys/arch/aarch64/include/armreg.h:1.65
--- src/sys/arch/aarch64/include/armreg.h:1.64	Sat May  6 21:53:26 2023
+++ src/sys/arch/aarch64/include/armreg.h	Sun Sep 24 10:13:44 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: armreg.h,v 1.64 2023/05/06 21:53:26 andvar Exp $ */
+/* $NetBSD: armreg.h,v 1.65 2023/09/24 10:13:44 skrll Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -229,7 +229,13 @@ AARCH64REG_READ_INLINE(clidr_el1)
 #define	 CLIDR_TYPE_IDCACHE	 3		//  Separate inst and data caches
 #define	 CLIDR_TYPE_UNIFIEDCACHE 4		//  Unified cache
 
+AARCH64REG_READ_INLINE(contextidr_el1)
+AARCH64REG_WRITE_INLINE(contextidr_el1)
+
 AARCH64REG_READ_INLINE(currentel)
+
+#define	CURRENTEL_EL		__BITS(3,2)	// Current exception Level
+
 AARCH64REG_READ_INLINE(id_aa64afr0_el1)
 AARCH64REG_READ_INLINE(id_aa64afr1_el1)
 AARCH64REG_READ_INLINE(id_aa64dfr0_el1)
@@ -661,6 +667,8 @@ AARCH64REG_WRITE_INLINE(esr_el1)
 #define	 ESR_EC_CP14_DT		 0x06	// A32: LDC/STC access to CP14
 #define	 ESR_EC_FP_ACCESS	 0x07	// AXX: Access to SIMD/FP Registers
 #define	 ESR_EC_FPID		 0x08	// A32: MCR/MRC access to CP10 !EC=7
+#define	 ESR_EC_PAUTH		 0x09	// A64: Pointer auth trap (FEAT_PAUTH)
+#define	 ESR_EC_LS64		 0x0a	// AXX: LD64B/ST64B instruction (FEAT_LS64)		// XXXNH
 #define	 ESR_EC_CP14_RRT	 0x0c	// A32: MRRC access to CP14
 #define	 ESR_EC_BTE_A64		 0x0d	// A64: Branch Target Exception (V8.5)
 #define	 ESR_EC_ILL_STATE	 0x0e	// AXX: Illegal Execution State
@@ -671,29 +679,54 @@ AARCH64REG_WRITE_INLINE(esr_el1)
 #define	 ESR_EC_HVC_A64		 0x16	// A64: HVC Instruction Execution
 #define	 ESR_EC_SMC_A64		 0x17	// A64: SMC Instruction Execution
 #define	 ESR_EC_SYS_REG		 0x18	// A64: MSR/MRS/SYS instruction (!EC0/1/7)
-#define	 ESR_EC_INSN_ABT_EL0	 0x20	// AXX: Instruction Abort (EL0)
-#define	 ESR_EC_INSN_ABT_EL1	 0x21	// AXX: Instruction Abort (EL1)
+#define	 ESR_EC_SVE		 0x19	// AXX: SVE Instruction Execution (FEAT_SVE)
+#define	 ESR_EC_PAUTH_ERET	 0x1a	// A64: ERET/ERETAA/ERETAB (FEAT_PAUTH and FEAT_NV)
+#define	 ESR_EC_TME		 0x1b	// A64: TSTART instruction (FEAT_TME)
+#define	 ESR_EC_FRAC		 0x1c	// A64: Pointer auth trap (FEAT_FPAC)
+#define	 ESR_EC_SME		 0x1d	// AXX: Access to SME (FEAT_SME)
+#define	 ESR_EC_RME		 0x1e	// A64: Granule Protection  Check (FEAT_RME)
+#define	 ESR_EC_INSN_ABT_EL_LOW	 0x20	// AXX: Instruction Abort from lower level
+#define	 ESR_EC_INSN_ABT_EL_CUR	 0x21	// AXX: Instruction Abort from current level
 #define	 ESR_EC_PC_ALIGNMENT	 0x22	// AXX: Misaligned PC
-#define	 ESR_EC_DATA_ABT_EL0	 0x24	// AXX: Data Abort (EL0)
-#define	 ESR_EC_DATA_ABT_EL1	 0x25	// AXX: Data Abort (EL1)
-#define	 ESR_EC_SP_ALIGNMENT 	 0x26	// AXX: Misaligned SP
+#define	 ESR_EC_DATA_ABT_EL_LOW	 0x24	// AXX: Data Abort from lower level
+#define	 ESR_EC_DATA_ABT_EL_CUR	 0x25	// AXX: Data Abort from current level
+#define	 ESR_EC_SP_ALIGNMENT	 0x26	// AXX: Misaligned SP
+#define	 ESR_EC_MOPS		 0x27	// A64: Memory Operation Exception (FEAT_MOPS)
 #define	 ESR_EC_FP_TRAP_A32	 0x28	// A32: FP Exception
 #define	 ESR_EC_FP_TRAP_A64	 0x2c	// A64: FP Exception
-#define	 ESR_EC_SERROR	 	 0x2f	// AXX: SError Interrupt
-#define	 ESR_EC_BRKPNT_EL0	 0x30	// AXX: Breakpoint Exception (EL0)
-#define	 ESR_EC_BRKPNT_EL1	 0x31	// AXX: Breakpoint Exception (EL1)
-#define	 ESR_EC_SW_STEP_EL0	 0x32	// AXX: Software Step (EL0)
-#define	 ESR_EC_SW_STEP_EL1	 0x33	// AXX: Software Step (EL1)
-#define	 ESR_EC_WTCHPNT_EL0	 0x34	// AXX: Watchpoint (EL0)
-#define	 ESR_EC_WTCHPNT_EL1	 0x35	// AXX: Watchpoint (EL1)
+#define	 ESR_EC_SERROR		 0x2f	// AXX: SError Interrupt
+#define	 ESR_EC_BRKPNT_EL_LOW	 0x30	// AXX: Breakpoint Exception from lower level
+#define	 ESR_EC_BRKPNT_EL_CUR	 0x31	// AXX: Breakpoint Exception from current level
+#define	 ESR_EC_SW_STEP_EL_LOW	 0x32	// AXX: Software Step from lower level
+#define	 ESR_EC_SW_STEP_EL_CUR	 0x33	// AXX: Software Step from current level
+#define	 ESR_EC_WTCHPNT_EL_LOW	 0x34	// AXX: Watchpoint from lower level
+#define	 ESR_EC_WTCHPNT_EL_CUR	 0x35	// AXX: Watchpoint from current level
 #define	 ESR_EC_BKPT_INSN_A32	 0x38	// A32: BKPT Instruction Execution
 #define	 ESR_EC_VECTOR_CATCH	 0x3a	// A32: Vector Catch Exception
 #define	 ESR_EC_BKPT_INSN_A64	 0x3c	// A64: BKPT Instruction Execution
+/* alias for EL1 kernel */
+#define	 ESR_EC_INSN_ABT_EL0	 ESR_EC_INSN_ABT_EL_LOW
+#define	 

CVS commit: src/sys/arch/aarch64/include

2023-09-24 Thread Nick Hudson
Module Name:src
Committed By:   skrll
Date:   Sun Sep 24 10:13:44 UTC 2023

Modified Files:
src/sys/arch/aarch64/include: armreg.h

Log Message:
Add a bunch of system registers and their bit / bit field definitions.
Taken from ryo's nvmm branch with updates from me.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/aarch64/include/armreg.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/macppc/dev

2023-09-24 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 24 08:20:06 UTC 2023

Modified Files:
src/sys/arch/macppc/dev: mesh.c

Log Message:
define i variable in for loop.
mesh_msgin() doesn't have one defined in the function scope.

fixes MESH_DEBUG enabled build for macppc.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/macppc/dev/mesh.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/dev

2023-09-24 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 24 08:20:06 UTC 2023

Modified Files:
src/sys/arch/macppc/dev: mesh.c

Log Message:
define i variable in for loop.
mesh_msgin() doesn't have one defined in the function scope.

fixes MESH_DEBUG enabled build for macppc.


To generate a diff of this commit:
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/macppc/dev/mesh.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/dev/mesh.c
diff -u src/sys/arch/macppc/dev/mesh.c:1.42 src/sys/arch/macppc/dev/mesh.c:1.43
--- src/sys/arch/macppc/dev/mesh.c:1.42	Sat Aug  7 16:18:57 2021
+++ src/sys/arch/macppc/dev/mesh.c	Sun Sep 24 08:20:06 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: mesh.c,v 1.42 2021/08/07 16:18:57 thorpej Exp $	*/
+/*	$NetBSD: mesh.c,v 1.43 2023/09/24 08:20:06 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2000	Tsubai Masanari.
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: mesh.c,v 1.42 2021/08/07 16:18:57 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mesh.c,v 1.43 2023/09/24 08:20:06 andvar Exp $");
 
 #include 
 #include 
@@ -694,7 +694,7 @@ mesh_msgin(struct mesh_softc *sc, struct
 gotit:
 #ifdef MESH_DEBUG
 	printf("msgin:");
-	for (i = 0; i < sc->sc_imsglen; i++)
+	for (int i = 0; i < sc->sc_imsglen; i++)
 		printf(" 0x%02x", sc->sc_imsg[i]);
 	printf("\n");
 #endif



CVS commit: src/sys/arch/powerpc/oea

2023-09-23 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Sep 23 21:26:16 UTC 2023

Modified Files:
src/sys/arch/powerpc/oea: ofw_autoconf.c ofwoea_machdep.c

Log Message:
add ifdef NWSDISPLAY > 0 around rascons_* functions usage,
otherwise implementation is not available, which breaks macppc MAMBO config.

potentially better solution to provide empty implementation, comments welcome.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/powerpc/oea/ofw_autoconf.c
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/powerpc/oea/ofwoea_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/oea

2023-09-23 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Sep 23 21:26:16 UTC 2023

Modified Files:
src/sys/arch/powerpc/oea: ofw_autoconf.c ofwoea_machdep.c

Log Message:
add ifdef NWSDISPLAY > 0 around rascons_* functions usage,
otherwise implementation is not available, which breaks macppc MAMBO config.

potentially better solution to provide empty implementation, comments welcome.


To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/powerpc/oea/ofw_autoconf.c
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/powerpc/oea/ofwoea_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/oea/ofw_autoconf.c
diff -u src/sys/arch/powerpc/oea/ofw_autoconf.c:1.25 src/sys/arch/powerpc/oea/ofw_autoconf.c:1.26
--- src/sys/arch/powerpc/oea/ofw_autoconf.c:1.25	Wed Dec 14 13:19:04 2022
+++ src/sys/arch/powerpc/oea/ofw_autoconf.c	Sat Sep 23 21:26:16 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ofw_autoconf.c,v 1.25 2022/12/14 13:19:04 macallan Exp $ */
+/* $NetBSD: ofw_autoconf.c,v 1.26 2023/09/23 21:26:16 andvar Exp $ */
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
  * Copyright (C) 1995, 1996 TooLs GmbH.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ofw_autoconf.c,v 1.25 2022/12/14 13:19:04 macallan Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofw_autoconf.c,v 1.26 2023/09/23 21:26:16 andvar Exp $");
 
 #ifdef ofppc
 #include "gtpci.h"
@@ -82,7 +82,9 @@ static void canonicalize_bootpath(void);
 void
 cpu_configure(void)
 {
+#if NWSDISPLAY > 0
 	rascons_add_rom_font();
+#endif
 	init_interrupt();
 	canonicalize_bootpath();
 

Index: src/sys/arch/powerpc/oea/ofwoea_machdep.c
diff -u src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.62 src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.63
--- src/sys/arch/powerpc/oea/ofwoea_machdep.c:1.62	Sun Dec  5 07:13:48 2021
+++ src/sys/arch/powerpc/oea/ofwoea_machdep.c	Sat Sep 23 21:26:16 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ofwoea_machdep.c,v 1.62 2021/12/05 07:13:48 msaitoh Exp $ */
+/* $NetBSD: ofwoea_machdep.c,v 1.63 2023/09/23 21:26:16 andvar Exp $ */
 
 /*-
  * Copyright (c) 2007 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.62 2021/12/05 07:13:48 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ofwoea_machdep.c,v 1.63 2023/09/23 21:26:16 andvar Exp $");
 
 #include "ksyms.h"
 #include "wsdisplay.h"
@@ -270,7 +270,9 @@ ofwoea_initppc(u_int startkernel, u_int 
 
 	restore_ofmap();
 
+#if NWSDISPLAY > 0
 	rascons_finalize();
+#endif
 
 #if NKSYMS || defined(DDB) || defined(MODULAR)
 	ksyms_addsyms_elf((int)((uintptr_t)endsym - (uintptr_t)startsym), startsym, endsym);



CVS commit: src/sys/arch

2023-09-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Sep 23 14:41:16 UTC 2023

Modified Files:
src/sys/arch/amd64/amd64: genassym.cf
src/sys/arch/i386/i386: genassym.cf

Log Message:
Remove unused L_KPRIORITY.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/amd64/amd64/genassym.cf
cvs rdiff -u -r1.133 -r1.134 src/sys/arch/i386/i386/genassym.cf

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

Modified files:

Index: src/sys/arch/amd64/amd64/genassym.cf
diff -u src/sys/arch/amd64/amd64/genassym.cf:1.95 src/sys/arch/amd64/amd64/genassym.cf:1.96
--- src/sys/arch/amd64/amd64/genassym.cf:1.95	Fri Mar  3 14:32:48 2023
+++ src/sys/arch/amd64/amd64/genassym.cf	Sat Sep 23 14:41:15 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.95 2023/03/03 14:32:48 riastradh Exp $
+#	$NetBSD: genassym.cf,v 1.96 2023/09/23 14:41:15 ad Exp $
 
 #
 # Copyright (c) 1998, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -160,7 +160,6 @@ define	L_PROC			offsetof(struct lwp, l_p
 define	L_NCSW			offsetof(struct lwp, l_ncsw)
 define	L_NOPREEMPT		offsetof(struct lwp, l_nopreempt)
 define	L_DOPREEMPT		offsetof(struct lwp, l_dopreempt)
-define	L_KPRIORITY		offsetof(struct lwp, l_kpriority)
 define	L_MD_REGS		offsetof(struct lwp, l_md.md_regs)
 define	L_MD_FLAGS		offsetof(struct lwp, l_md.md_flags)
 define	L_MD_ASTPENDING		offsetof(struct lwp, l_md.md_astpending)

Index: src/sys/arch/i386/i386/genassym.cf
diff -u src/sys/arch/i386/i386/genassym.cf:1.133 src/sys/arch/i386/i386/genassym.cf:1.134
--- src/sys/arch/i386/i386/genassym.cf:1.133	Fri Mar  3 14:32:27 2023
+++ src/sys/arch/i386/i386/genassym.cf	Sat Sep 23 14:41:15 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.133 2023/03/03 14:32:27 riastradh Exp $
+#	$NetBSD: genassym.cf,v 1.134 2023/09/23 14:41:15 ad Exp $
 
 #
 # Copyright (c) 1998, 2006, 2007, 2008 The NetBSD Foundation, Inc.
@@ -169,7 +169,6 @@ define	L_PROC			offsetof(struct lwp, l_p
 define	L_NCSW			offsetof(struct lwp, l_ncsw)
 define	L_NOPREEMPT		offsetof(struct lwp, l_nopreempt)
 define	L_DOPREEMPT		offsetof(struct lwp, l_dopreempt)
-define	L_KPRIORITY		offsetof(struct lwp, l_kpriority)
 define	L_MD_REGS		offsetof(struct lwp, l_md.md_regs)
 define	L_MD_FLAGS		offsetof(struct lwp, l_md.md_flags)
 define	L_MD_ASTPENDING		offsetof(struct lwp, l_md.md_astpending)



CVS commit: src/sys/arch

2023-09-23 Thread Andrew Doran
Module Name:src
Committed By:   ad
Date:   Sat Sep 23 14:41:16 UTC 2023

Modified Files:
src/sys/arch/amd64/amd64: genassym.cf
src/sys/arch/i386/i386: genassym.cf

Log Message:
Remove unused L_KPRIORITY.


To generate a diff of this commit:
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/amd64/amd64/genassym.cf
cvs rdiff -u -r1.133 -r1.134 src/sys/arch/i386/i386/genassym.cf

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



CVS commit: src/sys/arch/mac68k/mac68k

2023-09-23 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Sep 23 13:45:50 UTC 2023

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

Log Message:
pass just l param to exec_aout_prep_oldzmagic instead of l->l_proc.

In a huge "merge ktrace-lwp." commit struct proc was changed by struct lwp.
seemingly all 68k ports just replaced p with l, however mac68k changed to
refer to l->l_proc. I assume it was accidental leftover during refactoring.

fixes COMPAT_NOMID enabled build for mac68k.


To generate a diff of this commit:
cvs rdiff -u -r1.364 -r1.365 src/sys/arch/mac68k/mac68k/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/mac68k/mac68k/machdep.c
diff -u src/sys/arch/mac68k/mac68k/machdep.c:1.364 src/sys/arch/mac68k/mac68k/machdep.c:1.365
--- src/sys/arch/mac68k/mac68k/machdep.c:1.364	Mon Dec 26 01:05:35 2022
+++ src/sys/arch/mac68k/mac68k/machdep.c	Sat Sep 23 13:45:50 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.364 2022/12/26 01:05:35 nat Exp $	*/
+/*	$NetBSD: machdep.c,v 1.365 2023/09/23 13:45:50 andvar Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.364 2022/12/26 01:05:35 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.365 2023/09/23 13:45:50 andvar Exp $");
 
 #include "opt_adb.h"
 #include "opt_compat_netbsd.h"
@@ -846,7 +846,7 @@ cpu_exec_aout_makecmds(struct lwp *l, st
 #ifdef COMPAT_NOMID
 	/* Check to see if MID == 0. */
 	if (((struct exec *)epp->ep_hdr)->a_midmag == ZMAGIC)
-		return exec_aout_prep_oldzmagic(l->l_proc, epp);
+		return exec_aout_prep_oldzmagic(l, epp);
 #endif
 
 	return error;



CVS commit: src/sys/arch/mac68k/mac68k

2023-09-23 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Sep 23 13:45:50 UTC 2023

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

Log Message:
pass just l param to exec_aout_prep_oldzmagic instead of l->l_proc.

In a huge "merge ktrace-lwp." commit struct proc was changed by struct lwp.
seemingly all 68k ports just replaced p with l, however mac68k changed to
refer to l->l_proc. I assume it was accidental leftover during refactoring.

fixes COMPAT_NOMID enabled build for mac68k.


To generate a diff of this commit:
cvs rdiff -u -r1.364 -r1.365 src/sys/arch/mac68k/mac68k/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

2023-09-23 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Sep 23 12:48:23 UTC 2023

Modified Files:
src/sys/arch/mac68k/dev: zs.c
src/sys/arch/macppc/dev: zs.c

Log Message:
some whitespace cleanup for debug printf calls.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/mac68k/dev/zs.c
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/macppc/dev/zs.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/mac68k/dev/zs.c
diff -u src/sys/arch/mac68k/dev/zs.c:1.62 src/sys/arch/mac68k/dev/zs.c:1.63
--- src/sys/arch/mac68k/dev/zs.c:1.62	Sat Sep 23 12:29:25 2023
+++ src/sys/arch/mac68k/dev/zs.c	Sat Sep 23 12:48:23 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: zs.c,v 1.62 2023/09/23 12:29:25 andvar Exp $	*/
+/*	$NetBSD: zs.c,v 1.63 2023/09/23 12:48:23 andvar Exp $	*/
 
 /*
  * Copyright (c) 1996-1998 Bill Studenmund
@@ -49,7 +49,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.62 2023/09/23 12:29:25 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.63 2023/09/23 12:48:23 andvar Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mac68k.h"
@@ -575,7 +575,7 @@ zs_set_speed(struct zs_chanstate *cs, in
 		}
 	}
 #ifdef ZSMACDEBUG
-	printf("Checking for rate %d. Found source #%d.\n",bps, src);
+	printf("Checking for rate %d. Found source #%d.\n", bps, src);
 #endif
 	if (src == -1)
 		return (EINVAL); /* no can do */
@@ -624,10 +624,10 @@ zs_set_speed(struct zs_chanstate *cs, in
 	splx(s);
 	
 #ifdef ZSMACDEBUG
-	printf("Rate is %7d, tc is %7d, source no. %2d, flags %4x\n", \
+	printf("Rate is %7d, tc is %7d, source no. %2d, flags %4x\n",
 	bps, tc, src, sf);
 	printf("Registers are: 4 %x, 11 %x, 14 %x\n\n",
-		cs->cs_preg[4], cs->cs_preg[11], cs->cs_preg[14]);
+	cs->cs_preg[4], cs->cs_preg[11], cs->cs_preg[14]);
 #endif
 
 	cs->cs_preg[5] |= ZSWR5_RTS;	/* Make sure the drivers are on! */

Index: src/sys/arch/macppc/dev/zs.c
diff -u src/sys/arch/macppc/dev/zs.c:1.57 src/sys/arch/macppc/dev/zs.c:1.58
--- src/sys/arch/macppc/dev/zs.c:1.57	Sat Sep 23 12:29:24 2023
+++ src/sys/arch/macppc/dev/zs.c	Sat Sep 23 12:48:23 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: zs.c,v 1.57 2023/09/23 12:29:24 andvar Exp $	*/
+/*	$NetBSD: zs.c,v 1.58 2023/09/23 12:48:23 andvar Exp $	*/
 
 /*
  * Copyright (c) 1996, 1998 Bill Studenmund
@@ -49,7 +49,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.57 2023/09/23 12:29:24 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.58 2023/09/23 12:48:23 andvar Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -639,7 +639,7 @@ zs_set_speed(struct zs_chanstate *cs, in
 		}
 	}
 #ifdef ZSMACDEBUG
-	printf("Checking for rate %d. Found source #%d.\n",bps, src);
+	printf("Checking for rate %d. Found source #%d.\n", bps, src);
 #endif
 	if (src == -1)
 		return (EINVAL); /* no can do */
@@ -688,10 +688,10 @@ zs_set_speed(struct zs_chanstate *cs, in
 	splx(s);
 	
 #ifdef ZSMACDEBUG
-	printf("Rate is %7d, tc is %7d, source no. %2d, flags %4x\n", \
+	printf("Rate is %7d, tc is %7d, source no. %2d, flags %4x\n",
 	bps, tc, src, sf);
 	printf("Registers are: 4 %x, 11 %x, 14 %x\n\n",
-		cs->cs_preg[4], cs->cs_preg[11], cs->cs_preg[14]);
+	cs->cs_preg[4], cs->cs_preg[11], cs->cs_preg[14]);
 #endif
 
 	cs->cs_preg[5] |= ZSWR5_RTS;	/* Make sure the drivers are on! */



CVS commit: src/sys/arch

2023-09-23 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Sep 23 12:48:23 UTC 2023

Modified Files:
src/sys/arch/mac68k/dev: zs.c
src/sys/arch/macppc/dev: zs.c

Log Message:
some whitespace cleanup for debug printf calls.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/mac68k/dev/zs.c
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/macppc/dev/zs.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

2023-09-23 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Sep 23 12:29:25 UTC 2023

Modified Files:
src/sys/arch/mac68k/dev: zs.c
src/sys/arch/macppc/dev: zs.c

Log Message:
change zsprintf to printf. It was defined as printf in include/z8530var.h
up to rev 1.4, then removed with conversion to MI 8530 SCC driver back in 1997.

Fixes build with ZSMACDEBUG option enabled for mac68k and macppc.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/mac68k/dev/zs.c
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/macppc/dev/zs.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/mac68k/dev/zs.c
diff -u src/sys/arch/mac68k/dev/zs.c:1.61 src/sys/arch/mac68k/dev/zs.c:1.62
--- src/sys/arch/mac68k/dev/zs.c:1.61	Sat Sep 11 20:28:04 2021
+++ src/sys/arch/mac68k/dev/zs.c	Sat Sep 23 12:29:25 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: zs.c,v 1.61 2021/09/11 20:28:04 andvar Exp $	*/
+/*	$NetBSD: zs.c,v 1.62 2023/09/23 12:29:25 andvar Exp $	*/
 
 /*
  * Copyright (c) 1996-1998 Bill Studenmund
@@ -49,7 +49,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.61 2021/09/11 20:28:04 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.62 2023/09/23 12:29:25 andvar Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mac68k.h"
@@ -575,7 +575,7 @@ zs_set_speed(struct zs_chanstate *cs, in
 		}
 	}
 #ifdef ZSMACDEBUG
-	zsprintf("Checking for rate %d. Found source #%d.\n",bps, src);
+	printf("Checking for rate %d. Found source #%d.\n",bps, src);
 #endif
 	if (src == -1)
 		return (EINVAL); /* no can do */
@@ -624,9 +624,9 @@ zs_set_speed(struct zs_chanstate *cs, in
 	splx(s);
 	
 #ifdef ZSMACDEBUG
-	zsprintf("Rate is %7d, tc is %7d, source no. %2d, flags %4x\n", \
+	printf("Rate is %7d, tc is %7d, source no. %2d, flags %4x\n", \
 	bps, tc, src, sf);
-	zsprintf("Registers are: 4 %x, 11 %x, 14 %x\n\n",
+	printf("Registers are: 4 %x, 11 %x, 14 %x\n\n",
 		cs->cs_preg[4], cs->cs_preg[11], cs->cs_preg[14]);
 #endif
 

Index: src/sys/arch/macppc/dev/zs.c
diff -u src/sys/arch/macppc/dev/zs.c:1.56 src/sys/arch/macppc/dev/zs.c:1.57
--- src/sys/arch/macppc/dev/zs.c:1.56	Wed Feb 16 23:49:26 2022
+++ src/sys/arch/macppc/dev/zs.c	Sat Sep 23 12:29:24 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: zs.c,v 1.56 2022/02/16 23:49:26 riastradh Exp $	*/
+/*	$NetBSD: zs.c,v 1.57 2023/09/23 12:29:24 andvar Exp $	*/
 
 /*
  * Copyright (c) 1996, 1998 Bill Studenmund
@@ -49,7 +49,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.56 2022/02/16 23:49:26 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: zs.c,v 1.57 2023/09/23 12:29:24 andvar Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -639,7 +639,7 @@ zs_set_speed(struct zs_chanstate *cs, in
 		}
 	}
 #ifdef ZSMACDEBUG
-	zsprintf("Checking for rate %d. Found source #%d.\n",bps, src);
+	printf("Checking for rate %d. Found source #%d.\n",bps, src);
 #endif
 	if (src == -1)
 		return (EINVAL); /* no can do */
@@ -688,9 +688,9 @@ zs_set_speed(struct zs_chanstate *cs, in
 	splx(s);
 	
 #ifdef ZSMACDEBUG
-	zsprintf("Rate is %7d, tc is %7d, source no. %2d, flags %4x\n", \
+	printf("Rate is %7d, tc is %7d, source no. %2d, flags %4x\n", \
 	bps, tc, src, sf);
-	zsprintf("Registers are: 4 %x, 11 %x, 14 %x\n\n",
+	printf("Registers are: 4 %x, 11 %x, 14 %x\n\n",
 		cs->cs_preg[4], cs->cs_preg[11], cs->cs_preg[14]);
 #endif
 



CVS commit: src/sys/arch

2023-09-23 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Sep 23 12:29:25 UTC 2023

Modified Files:
src/sys/arch/mac68k/dev: zs.c
src/sys/arch/macppc/dev: zs.c

Log Message:
change zsprintf to printf. It was defined as printf in include/z8530var.h
up to rev 1.4, then removed with conversion to MI 8530 SCC driver back in 1997.

Fixes build with ZSMACDEBUG option enabled for mac68k and macppc.


To generate a diff of this commit:
cvs rdiff -u -r1.61 -r1.62 src/sys/arch/mac68k/dev/zs.c
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/macppc/dev/zs.c

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



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

2023-09-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Sep 21 09:24:09 UTC 2023

Modified Files:
src/sys/arch/landisk/dev: rs5c313_landisk.c

Log Message:
Fix typo in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/landisk/dev/rs5c313_landisk.c

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

Modified files:

Index: src/sys/arch/landisk/dev/rs5c313_landisk.c
diff -u src/sys/arch/landisk/dev/rs5c313_landisk.c:1.5 src/sys/arch/landisk/dev/rs5c313_landisk.c:1.6
--- src/sys/arch/landisk/dev/rs5c313_landisk.c:1.5	Tue Apr  6 15:29:19 2010
+++ src/sys/arch/landisk/dev/rs5c313_landisk.c	Thu Sep 21 09:24:09 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: rs5c313_landisk.c,v 1.5 2010/04/06 15:29:19 nonaka Exp $	*/
+/*	$NetBSD: rs5c313_landisk.c,v 1.6 2023/09/21 09:24:09 msaitoh Exp $	*/
 
 /*-
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: rs5c313_landisk.c,v 1.5 2010/04/06 15:29:19 nonaka Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rs5c313_landisk.c,v 1.6 2023/09/21 09:24:09 msaitoh Exp $");
 
 #include 
 #include 
@@ -123,7 +123,7 @@ rtc_ce(struct rs5c313_softc *sc, int ono
 
 
 /*
- * SCLK pin is connnected to SPB0DT.
+ * SCLK pin is connected to SPB0DT.
  * SPB0DT is always in output mode, we set SPB0IO in rtc_begin.
  */
 static void



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

2023-09-21 Thread SAITOH Masanobu
Module Name:src
Committed By:   msaitoh
Date:   Thu Sep 21 09:24:09 UTC 2023

Modified Files:
src/sys/arch/landisk/dev: rs5c313_landisk.c

Log Message:
Fix typo in comment.


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

2023-09-17 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 17 14:22:28 UTC 2023

Modified Files:
src/sys/arch/sh3/dev: sci.c

Log Message:
remove unneeded whitespace in empty line from my previous commit.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/sh3/dev/sci.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/sh3/dev/sci.c
diff -u src/sys/arch/sh3/dev/sci.c:1.64 src/sys/arch/sh3/dev/sci.c:1.65
--- src/sys/arch/sh3/dev/sci.c:1.64	Sat Sep 16 18:56:39 2023
+++ src/sys/arch/sh3/dev/sci.c	Sun Sep 17 14:22:28 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: sci.c,v 1.64 2023/09/16 18:56:39 andvar Exp $ */
+/* $NetBSD: sci.c,v 1.65 2023/09/17 14:22:28 andvar Exp $ */
 
 /*-
  * Copyright (C) 1999 T.Horiuchi and SAITOH Masanobu.  All rights reserved.
@@ -93,7 +93,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sci.c,v 1.64 2023/09/16 18:56:39 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sci.c,v 1.65 2023/09/17 14:22:28 andvar Exp $");
 
 #include "opt_kgdb.h"
 #include "opt_sci.h"
@@ -1215,7 +1215,7 @@ sciintr(void *arg)
 		if (ISSET(~msr, sc->sc_msr_mask)) {
 			sc->sc_tbc = 0;
 			sc->sc_heldtbc = 0;
-			
+
 			DPRINTF(("%s: sciintr\n", device_xname(sc->sc_dev)));
 		}
 



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

2023-09-17 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 17 14:22:28 UTC 2023

Modified Files:
src/sys/arch/sh3/dev: sci.c

Log Message:
remove unneeded whitespace in empty line from my previous commit.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/sh3/dev/sci.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/m68k/fpe

2023-09-17 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 17 13:14:08 UTC 2023

Modified Files:
src/sys/arch/m68k/fpe: fpu_emulate.c

Log Message:
word was changed to sval at rev 1.39, but DPRINTF values were not updated.

Fixes DEBUG_FPE enabled build for 68k FPE code.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/m68k/fpe/fpu_emulate.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/m68k/fpe/fpu_emulate.c
diff -u src/sys/arch/m68k/fpe/fpu_emulate.c:1.40 src/sys/arch/m68k/fpe/fpu_emulate.c:1.41
--- src/sys/arch/m68k/fpe/fpu_emulate.c:1.40	Fri Dec 27 07:41:23 2019
+++ src/sys/arch/m68k/fpe/fpu_emulate.c	Sun Sep 17 13:14:08 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpu_emulate.c,v 1.40 2019/12/27 07:41:23 msaitoh Exp $	*/
+/*	$NetBSD: fpu_emulate.c,v 1.41 2023/09/17 13:14:08 andvar Exp $	*/
 
 /*
  * Copyright (c) 1995 Gordon W. Ross
@@ -37,7 +37,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fpu_emulate.c,v 1.40 2019/12/27 07:41:23 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_emulate.c,v 1.41 2023/09/17 13:14:08 andvar Exp $");
 
 #include 
 #include 
@@ -132,12 +132,12 @@ fpu_emulate(struct frame *frame, struct 
 
 	if ((sval & 0xf000) != 0xf000) {
 		DPRINTF(("%s: not coproc. insn.: opcode=0x%x\n",
-		__func__, word));
+		__func__, sval));
 		fpe_abort(frame, ksi, SIGILL, ILL_ILLOPC);
 	}
 
 	if ((sval & 0x0E00) != 0x0200) {
-		DPRINTF(("%s: bad coproc. id: opcode=0x%x\n", __func__, word));
+		DPRINTF(("%s: bad coproc. id: opcode=0x%x\n", __func__, sval));
 		fpe_abort(frame, ksi, SIGILL, ILL_ILLOPC);
 	}
 



CVS commit: src/sys/arch/m68k/fpe

2023-09-17 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 17 13:14:08 UTC 2023

Modified Files:
src/sys/arch/m68k/fpe: fpu_emulate.c

Log Message:
word was changed to sval at rev 1.39, but DPRINTF values were not updated.

Fixes DEBUG_FPE enabled build for 68k FPE code.


To generate a diff of this commit:
cvs rdiff -u -r1.40 -r1.41 src/sys/arch/m68k/fpe/fpu_emulate.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/luna68k

2023-09-17 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 17 12:30:00 UTC 2023

Modified Files:
src/sys/arch/luna68k/conf: files.luna68k
src/sys/arch/luna68k/luna68k: trap.c

Log Message:
fix KGDB enabled build for luna68k:
* include sys/kgdb.h in luna68k/trap.c for missing definitions.
* cast second kgdb_trap argument to (db_regs_t *).
* build m68k/kgdb_machdep.c in kgdb enable build for kgdb_trap() implementation.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/luna68k/conf/files.luna68k
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/luna68k/luna68k/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/luna68k/conf/files.luna68k
diff -u src/sys/arch/luna68k/conf/files.luna68k:1.30 src/sys/arch/luna68k/conf/files.luna68k:1.31
--- src/sys/arch/luna68k/conf/files.luna68k:1.30	Fri Jun 10 21:42:23 2022
+++ src/sys/arch/luna68k/conf/files.luna68k	Sun Sep 17 12:30:00 2023
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: files.luna68k,v 1.30 2022/06/10 21:42:23 tsutsui Exp $
+#	$NetBSD: files.luna68k,v 1.31 2023/09/17 12:30:00 andvar Exp $
 #
 maxpartitions 8
 maxusers 2 8 64
@@ -16,6 +16,7 @@ file arch/luna68k/luna68k/pmap_bootstrap
 file arch/luna68k/luna68k/trap.c
 file arch/m68k/m68k/cacheops.c
 file arch/m68k/m68k/db_memrw.c		ddb | kgdb
+file arch/m68k/m68k/kgdb_machdep.c	kgdb
 file arch/m68k/m68k/fpu.c		compile-with "${M68K_KERN_FPU}"
 file arch/m68k/m68k/m68k_trap.c
 file arch/m68k/m68k/pmap_motorola.c

Index: src/sys/arch/luna68k/luna68k/trap.c
diff -u src/sys/arch/luna68k/luna68k/trap.c:1.76 src/sys/arch/luna68k/luna68k/trap.c:1.77
--- src/sys/arch/luna68k/luna68k/trap.c:1.76	Sat Sep 16 20:53:18 2023
+++ src/sys/arch/luna68k/luna68k/trap.c	Sun Sep 17 12:30:00 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.76 2023/09/16 20:53:18 andvar Exp $ */
+/* $NetBSD: trap.c,v 1.77 2023/09/17 12:30:00 andvar Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.76 2023/09/16 20:53:18 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.77 2023/09/17 12:30:00 andvar Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -57,6 +57,7 @@ __KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.7
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -258,7 +259,7 @@ trap(struct frame *fp, int type, unsigne
 		s = splhigh();
 #ifdef KGDB
 		/* If connected, step or cont returns 1 */
-		if (kgdb_trap(type, fp))
+		if (kgdb_trap(type, (db_regs_t *)fp))
 			goto kgdb_cont;
 #endif
 #ifdef DDB



CVS commit: src/sys/arch/luna68k

2023-09-17 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 17 12:30:00 UTC 2023

Modified Files:
src/sys/arch/luna68k/conf: files.luna68k
src/sys/arch/luna68k/luna68k: trap.c

Log Message:
fix KGDB enabled build for luna68k:
* include sys/kgdb.h in luna68k/trap.c for missing definitions.
* cast second kgdb_trap argument to (db_regs_t *).
* build m68k/kgdb_machdep.c in kgdb enable build for kgdb_trap() implementation.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/luna68k/conf/files.luna68k
cvs rdiff -u -r1.76 -r1.77 src/sys/arch/luna68k/luna68k/trap.c

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



CVS commit: src/sys/arch/luna68k/luna68k

2023-09-17 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 17 10:14:49 UTC 2023

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

Log Message:
all sunos_exec_aout_makecmds references were removed from machedep back in 1997,
as the code was standardized and moved to sunos_exec_aout.c.

removing this code from luna68k as well, for whatever reason it was missed.

Fixes build with COMPAT_SUNOS enabled for luna68k.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/arch/luna68k/luna68k/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/luna68k/luna68k/machdep.c
diff -u src/sys/arch/luna68k/luna68k/machdep.c:1.108 src/sys/arch/luna68k/luna68k/machdep.c:1.109
--- src/sys/arch/luna68k/luna68k/machdep.c:1.108	Sat Oct  9 20:00:41 2021
+++ src/sys/arch/luna68k/luna68k/machdep.c	Sun Sep 17 10:14:49 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.108 2021/10/09 20:00:41 tsutsui Exp $ */
+/* $NetBSD: machdep.c,v 1.109 2023/09/17 10:14:49 andvar Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -31,7 +31,7 @@
 
 #include 			/* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.108 2021/10/09 20:00:41 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.109 2023/09/17 10:14:49 andvar Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -822,14 +822,7 @@ luna68k_abort(const char *cp)
 int
 cpu_exec_aout_makecmds(struct lwp *l, struct exec_package *epp)
 {
-	int error = ENOEXEC;
-#ifdef COMPAT_SUNOS
-	extern sunos_exec_aout_makecmds(struct proc *, struct exec_package *);
-
-	if ((error = sunos_exec_aout_makecmds(l->l_proc, epp)) == 0)
-		return 0;
-#endif
-	return error;
+	return ENOEXEC;
 }
 
 #ifdef MODULAR



CVS commit: src/sys/arch/luna68k/luna68k

2023-09-17 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 17 10:14:49 UTC 2023

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

Log Message:
all sunos_exec_aout_makecmds references were removed from machedep back in 1997,
as the code was standardized and moved to sunos_exec_aout.c.

removing this code from luna68k as well, for whatever reason it was missed.

Fixes build with COMPAT_SUNOS enabled for luna68k.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/arch/luna68k/luna68k/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/x68k/x68k

2023-09-17 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 17 07:22:17 UTC 2023

Modified Files:
src/sys/arch/x68k/x68k: locore.s

Log Message:
add "#if defined(M68030)" around 68030 specific busaddrerr2030 calls.

Makes M68030 build without 040/060 counterparts enabled for x68k.


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/x68k/x68k/locore.s

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



CVS commit: src/sys/arch/x68k/x68k

2023-09-17 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 17 07:22:17 UTC 2023

Modified Files:
src/sys/arch/x68k/x68k: locore.s

Log Message:
add "#if defined(M68030)" around 68030 specific busaddrerr2030 calls.

Makes M68030 build without 040/060 counterparts enabled for x68k.


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/x68k/x68k/locore.s

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

Modified files:

Index: src/sys/arch/x68k/x68k/locore.s
diff -u src/sys/arch/x68k/x68k/locore.s:1.121 src/sys/arch/x68k/x68k/locore.s:1.122
--- src/sys/arch/x68k/x68k/locore.s:1.121	Mon May 30 09:56:03 2022
+++ src/sys/arch/x68k/x68k/locore.s	Sun Sep 17 07:22:17 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.121 2022/05/30 09:56:03 andvar Exp $	*/
+/*	$NetBSD: locore.s,v 1.122 2023/09/17 07:22:17 andvar Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -209,8 +209,10 @@ Lstart1:
 	jra	Lstart2
 1:
 #endif
+#if defined(M68030)
 	movl	#_C_LABEL(busaddrerr2030),%a2@(8)
 	movl	#_C_LABEL(busaddrerr2030),%a2@(12)
+#endif
 
 Lstart2:
 /* initialize source/destination control registers for movs */



CVS commit: src/sys/arch

2023-09-16 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Sep 16 20:53:18 UTC 2023

Modified Files:
src/sys/arch/luna68k/luna68k: trap.c
src/sys/arch/x68k/x68k: trap.c

Log Message:
remove static from dumpssw() and dumpwb() declarations.

Fixes DEBUG enabled builds for luna68k and x68k.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/luna68k/luna68k/trap.c
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/x68k/x68k/trap.c

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



CVS commit: src/sys/arch

2023-09-16 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Sep 16 20:53:18 UTC 2023

Modified Files:
src/sys/arch/luna68k/luna68k: trap.c
src/sys/arch/x68k/x68k: trap.c

Log Message:
remove static from dumpssw() and dumpwb() declarations.

Fixes DEBUG enabled builds for luna68k and x68k.


To generate a diff of this commit:
cvs rdiff -u -r1.75 -r1.76 src/sys/arch/luna68k/luna68k/trap.c
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/x68k/x68k/trap.c

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

Modified files:

Index: src/sys/arch/luna68k/luna68k/trap.c
diff -u src/sys/arch/luna68k/luna68k/trap.c:1.75 src/sys/arch/luna68k/luna68k/trap.c:1.76
--- src/sys/arch/luna68k/luna68k/trap.c:1.75	Sat Apr 22 10:00:24 2023
+++ src/sys/arch/luna68k/luna68k/trap.c	Sat Sep 16 20:53:18 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.75 2023/04/22 10:00:24 tsutsui Exp $ */
+/* $NetBSD: trap.c,v 1.76 2023/09/16 20:53:18 andvar Exp $ */
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.75 2023/04/22 10:00:24 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.76 2023/09/16 20:53:18 andvar Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -73,8 +73,8 @@ void  trap(struct frame *fp, int type, u
 
 #if defined(M68040)
 #ifdef DEBUG
-static void dumpssw(u_short);
-static void dumpwb(int, u_short, u_int, u_int);
+void dumpssw(u_short);
+void dumpwb(int, u_short, u_int, u_int);
 #endif
 #endif
 

Index: src/sys/arch/x68k/x68k/trap.c
diff -u src/sys/arch/x68k/x68k/trap.c:1.110 src/sys/arch/x68k/x68k/trap.c:1.111
--- src/sys/arch/x68k/x68k/trap.c:1.110	Sat Sep 25 19:16:31 2021
+++ src/sys/arch/x68k/x68k/trap.c	Sat Sep 16 20:53:18 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.110 2021/09/25 19:16:31 tsutsui Exp $	*/
+/*	$NetBSD: trap.c,v 1.111 2023/09/16 20:53:18 andvar Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.110 2021/09/25 19:16:31 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.111 2023/09/16 20:53:18 andvar Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -85,8 +85,8 @@ void	trap(struct frame *, int, u_int, u_
 
 #if defined(M68040) || defined(M68060)
 #ifdef DEBUG
-static void dumpssw(u_short);
-static void dumpwb(int, u_short, u_int, u_int);
+void dumpssw(u_short);
+void dumpwb(int, u_short, u_int, u_int);
 #endif
 #endif
 



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

2023-09-16 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Sep 16 18:56:40 UTC 2023

Modified Files:
src/sys/arch/sh3/dev: sci.c

Log Message:
sh3/sci(4): replace undefined scistatus with DPRINTF.

Fixes the build with SCI_DEBUG enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/sh3/dev/sci.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/sh3/dev/sci.c
diff -u src/sys/arch/sh3/dev/sci.c:1.63 src/sys/arch/sh3/dev/sci.c:1.64
--- src/sys/arch/sh3/dev/sci.c:1.63	Sat Nov 21 17:25:52 2020
+++ src/sys/arch/sh3/dev/sci.c	Sat Sep 16 18:56:39 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: sci.c,v 1.63 2020/11/21 17:25:52 thorpej Exp $ */
+/* $NetBSD: sci.c,v 1.64 2023/09/16 18:56:39 andvar Exp $ */
 
 /*-
  * Copyright (C) 1999 T.Horiuchi and SAITOH Masanobu.  All rights reserved.
@@ -93,7 +93,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: sci.c,v 1.63 2020/11/21 17:25:52 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sci.c,v 1.64 2023/09/16 18:56:39 andvar Exp $");
 
 #include "opt_kgdb.h"
 #include "opt_sci.h"
@@ -119,6 +119,13 @@ __KERNEL_RCSID(0, "$NetBSD: sci.c,v 1.63
 #include 
 #include 
 
+#ifdef SCI_DEBUG
+int sci_debug = 1;
+#define DPRINTF(x)	if (sci_debug) printf x
+#else
+#define DPRINTF(x)
+#endif
+
 static void	scistart(struct tty *);
 static int	sciparam(struct tty *, struct termios *);
 
@@ -573,10 +580,7 @@ sciparam(struct tty *tp, struct termios 
 
 	splx(s);
 
-#ifdef SCI_DEBUG
-	if (sci_debug)
-		scistatus(sc, "sciparam ");
-#endif
+	DPRINTF(("%s: sciparam\n", device_xname(sc->sc_dev)));
 
 	if (!ISSET(t->c_cflag, CHWFLOW)) {
 		if (sc->sc_tx_stopped) {
@@ -692,10 +696,7 @@ sciopen(dev_t dev, int flag, int mode, s
 		sci_hwiflow(sc);
 #endif
 
-#ifdef SCI_DEBUG
-		if (sci_debug)
-			scistatus(sc, "sciopen  ");
-#endif
+		DPRINTF(("%s: sciopen\n", device_xname(sc->sc_dev)));
 
 		splx(s2);
 	}
@@ -1025,10 +1026,7 @@ sci_stsoft(struct sci_softc *sc, struct 
 		}
 	}
 
-#ifdef SCI_DEBUG
-	if (sci_debug)
-		scistatus(sc, "sci_stsoft");
-#endif
+	DPRINTF(("%s: sci_stsoft\n", device_xname(sc->sc_dev)));
 #endif
 }
 
@@ -1217,10 +1215,8 @@ sciintr(void *arg)
 		if (ISSET(~msr, sc->sc_msr_mask)) {
 			sc->sc_tbc = 0;
 			sc->sc_heldtbc = 0;
-#ifdef SCI_DEBUG
-			if (sci_debug)
-scistatus(sc, "sciintr  ");
-#endif
+			
+			DPRINTF(("%s: sciintr\n", device_xname(sc->sc_dev)));
 		}
 
 		sc->sc_st_check = 1;



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

2023-09-16 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Sep 16 18:56:40 UTC 2023

Modified Files:
src/sys/arch/sh3/dev: sci.c

Log Message:
sh3/sci(4): replace undefined scistatus with DPRINTF.

Fixes the build with SCI_DEBUG enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/sh3/dev/sci.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/sh3/dev

2023-09-16 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Sep 16 15:42:01 UTC 2023

Modified Files:
src/sys/arch/sh3/dev: scif.c

Log Message:
sh3/scif(4): redefine DPRINTF again, not all SH ports has machine/debug.h.
Those are defined for hpc only.

unbreaks build for evbsh some kernel configs and SFIC_DEBUG still builds.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/sh3/dev/scif.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/sh3/dev/scif.c
diff -u src/sys/arch/sh3/dev/scif.c:1.69 src/sys/arch/sh3/dev/scif.c:1.70
--- src/sys/arch/sh3/dev/scif.c:1.69	Fri Sep 15 20:59:56 2023
+++ src/sys/arch/sh3/dev/scif.c	Sat Sep 16 15:42:01 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: scif.c,v 1.69 2023/09/15 20:59:56 andvar Exp $ */
+/*	$NetBSD: scif.c,v 1.70 2023/09/16 15:42:01 andvar Exp $ */
 
 /*-
  * Copyright (C) 1999 T.Horiuchi and SAITOH Masanobu.  All rights reserved.
@@ -93,7 +93,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: scif.c,v 1.69 2023/09/15 20:59:56 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scif.c,v 1.70 2023/09/16 15:42:01 andvar Exp $");
 
 #include "opt_kgdb.h"
 #include "opt_scif.h"
@@ -177,10 +177,11 @@ struct scif_softc {
 };
 
 #ifdef SCIF_DEBUG
-#define DPRINTF_ENABLE
-#define DPRINTF_DEBUG	scif_debug
+int scif_debug = 1;
+#define DPRINTF(x)	if (scif_debug) printf x
+#else
+#define DPRINTF(x)
 #endif
-#include 
 
 static int scif_match(device_t, cfdata_t, void *);
 static void scif_attach(device_t, device_t, void *);
@@ -688,7 +689,7 @@ scifparam(struct tty *tp, struct termios
 
 	splx(s);
 
-	DPRINTF("%s: scifparam\n", device_xname(sc->sc_dev));
+	DPRINTF(("%s: scifparam\n", device_xname(sc->sc_dev)));
 
 	if (!ISSET(t->c_cflag, CHWFLOW)) {
 		if (sc->sc_tx_stopped) {
@@ -799,7 +800,7 @@ scifopen(dev_t dev, int flag, int mode, 
 		scif_hwiflow(sc);
 #endif
 
-		DPRINTF("%s: scifopen\n", device_xname(sc->sc_dev));
+		DPRINTF(("%s: scifopen\n", device_xname(sc->sc_dev)));
 
 		splx(s2);
 	}
@@ -1147,7 +1148,7 @@ scif_stsoft(struct scif_softc *sc, struc
 		}
 	}
 
-	DPRINTF("%s: scif_stsoft\n", device_xname(sc->sc_dev));
+	DPRINTF(("%s: scif_stsoft\n", device_xname(sc->sc_dev)));
 }
 #endif /* 0 */
 
@@ -1343,7 +1344,7 @@ scifintr(void *arg)
 		if (ISSET(~msr, sc->sc_msr_mask)) {
 			sc->sc_tbc = 0;
 			sc->sc_heldtbc = 0;
-			DPRINTF("%s: scifintr\n", device_xname(sc->sc_dev));
+			DPRINTF(("%s: scifintr\n", device_xname(sc->sc_dev)));
 		}
 
 		sc->sc_st_check = 1;



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

2023-09-16 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Sep 16 15:42:01 UTC 2023

Modified Files:
src/sys/arch/sh3/dev: scif.c

Log Message:
sh3/scif(4): redefine DPRINTF again, not all SH ports has machine/debug.h.
Those are defined for hpc only.

unbreaks build for evbsh some kernel configs and SFIC_DEBUG still builds.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/sh3/dev/scif.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/x86/include

2023-09-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep 16 13:37:10 UTC 2023

Modified Files:
src/sys/arch/x86/include: ieee.h

Log Message:
protect against multiple inclusion


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/x86/include/ieee.h

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



CVS commit: src/sys/arch/x86/include

2023-09-16 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Sep 16 13:37:10 UTC 2023

Modified Files:
src/sys/arch/x86/include: ieee.h

Log Message:
protect against multiple inclusion


To generate a diff of this commit:
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/x86/include/ieee.h

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

Modified files:

Index: src/sys/arch/x86/include/ieee.h
diff -u src/sys/arch/x86/include/ieee.h:1.11 src/sys/arch/x86/include/ieee.h:1.12
--- src/sys/arch/x86/include/ieee.h:1.11	Wed Sep 15 12:11:28 2010
+++ src/sys/arch/x86/include/ieee.h	Sat Sep 16 09:37:10 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ieee.h,v 1.11 2010/09/15 16:11:28 christos Exp $ */
+/*	$NetBSD: ieee.h,v 1.12 2023/09/16 13:37:10 christos Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -39,6 +39,8 @@
  *
  *	@(#)ieee.h	8.1 (Berkeley) 6/11/93
  */
+#ifndef _X86_IEEE_H_
+#define _X86_IEEE_H_
 
 /*
  * ieee.h defines the machine-dependent layout of the machine's IEEE
@@ -115,3 +117,5 @@ union ieee_ext_u {
 
 #define LDBL_NBIT	0x8000
 #define mask_nbit_l(u)	((u).extu_frach &= ~LDBL_NBIT)
+
+#endif /* _X86_IEEE_H_ */



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

2023-09-15 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Sep 15 20:59:56 UTC 2023

Modified Files:
src/sys/arch/sh3/dev: scif.c

Log Message:
sh3/scif(4): replace undefined scifstatus with DPRINTF.

fixes the build with SCIF_DEBUG enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/sh3/dev/scif.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/sh3/dev/scif.c
diff -u src/sys/arch/sh3/dev/scif.c:1.68 src/sys/arch/sh3/dev/scif.c:1.69
--- src/sys/arch/sh3/dev/scif.c:1.68	Sat Nov 21 17:25:52 2020
+++ src/sys/arch/sh3/dev/scif.c	Fri Sep 15 20:59:56 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: scif.c,v 1.68 2020/11/21 17:25:52 thorpej Exp $ */
+/*	$NetBSD: scif.c,v 1.69 2023/09/15 20:59:56 andvar Exp $ */
 
 /*-
  * Copyright (C) 1999 T.Horiuchi and SAITOH Masanobu.  All rights reserved.
@@ -93,7 +93,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: scif.c,v 1.68 2020/11/21 17:25:52 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: scif.c,v 1.69 2023/09/15 20:59:56 andvar Exp $");
 
 #include "opt_kgdb.h"
 #include "opt_scif.h"
@@ -176,6 +176,11 @@ struct scif_softc {
 	volatile u_char sc_heldchange;
 };
 
+#ifdef SCIF_DEBUG
+#define DPRINTF_ENABLE
+#define DPRINTF_DEBUG	scif_debug
+#endif
+#include 
 
 static int scif_match(device_t, cfdata_t, void *);
 static void scif_attach(device_t, device_t, void *);
@@ -683,10 +688,7 @@ scifparam(struct tty *tp, struct termios
 
 	splx(s);
 
-#ifdef SCIF_DEBUG
-	if (scif_debug)
-		scifstatus(sc, "scifparam ");
-#endif
+	DPRINTF("%s: scifparam\n", device_xname(sc->sc_dev));
 
 	if (!ISSET(t->c_cflag, CHWFLOW)) {
 		if (sc->sc_tx_stopped) {
@@ -797,10 +799,7 @@ scifopen(dev_t dev, int flag, int mode, 
 		scif_hwiflow(sc);
 #endif
 
-#ifdef SCIF_DEBUG
-		if (scif_debug)
-			scifstatus(sc, "scifopen  ");
-#endif
+		DPRINTF("%s: scifopen\n", device_xname(sc->sc_dev));
 
 		splx(s2);
 	}
@@ -1148,10 +1147,7 @@ scif_stsoft(struct scif_softc *sc, struc
 		}
 	}
 
-#ifdef SCIF_DEBUG
-	if (scif_debug)
-		scifstatus(sc, "scif_stsoft");
-#endif
+	DPRINTF("%s: scif_stsoft\n", device_xname(sc->sc_dev));
 }
 #endif /* 0 */
 
@@ -1347,10 +1343,7 @@ scifintr(void *arg)
 		if (ISSET(~msr, sc->sc_msr_mask)) {
 			sc->sc_tbc = 0;
 			sc->sc_heldtbc = 0;
-#ifdef SCIF_DEBUG
-			if (scif_debug)
-scifstatus(sc, "scifintr  ");
-#endif
+			DPRINTF("%s: scifintr\n", device_xname(sc->sc_dev));
 		}
 
 		sc->sc_st_check = 1;



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

2023-09-15 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Sep 15 20:59:56 UTC 2023

Modified Files:
src/sys/arch/sh3/dev: scif.c

Log Message:
sh3/scif(4): replace undefined scifstatus with DPRINTF.

fixes the build with SCIF_DEBUG enabled.


To generate a diff of this commit:
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/sh3/dev/scif.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/dts

2023-09-14 Thread Robert Swindells
Module Name:src
Committed By:   rjs
Date:   Thu Sep 14 12:27:55 UTC 2023

Added Files:
src/sys/arch/arm/dts: rk3399-pinebook-pro.dts

Log Message:
Enable crypto engine on Pinebook Pro.

Only used for rng at present.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.7 src/sys/arch/arm/dts/rk3399-pinebook-pro.dts

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

Added files:

Index: src/sys/arch/arm/dts/rk3399-pinebook-pro.dts
diff -u /dev/null src/sys/arch/arm/dts/rk3399-pinebook-pro.dts:1.7
--- /dev/null	Thu Sep 14 12:27:56 2023
+++ src/sys/arch/arm/dts/rk3399-pinebook-pro.dts	Thu Sep 14 12:27:55 2023
@@ -0,0 +1,30 @@
+/* $NetBSD: rk3399-pinebook-pro.dts,v 1.7 2023/09/14 12:27:55 rjs Exp $ */
+
+/*-
+ * Copyright (c) 2023 Robert Swindells 
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *notice, this list of conditions and the following disclaimer in the
+ *documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
+ * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
+ * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
+ * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+ * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+ * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+ * SUCH DAMAGE.
+ */
+
+#include "../../../external/gpl2/dts/dist/arch/arm64/boot/dts/rockchip/rk3399-pinebook-pro.dts"
+#include "rk3399-crypto.dtsi"



CVS commit: src/sys/arch/arm/dts

2023-09-14 Thread Robert Swindells
Module Name:src
Committed By:   rjs
Date:   Thu Sep 14 12:27:55 UTC 2023

Added Files:
src/sys/arch/arm/dts: rk3399-pinebook-pro.dts

Log Message:
Enable crypto engine on Pinebook Pro.

Only used for rng at present.


To generate a diff of this commit:
cvs rdiff -u -r0 -r1.7 src/sys/arch/arm/dts/rk3399-pinebook-pro.dts

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



CVS commit: src/sys/arch/mips/include

2023-09-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Sep 14 03:37:01 UTC 2023

Modified Files:
src/sys/arch/mips/include: asm.h

Log Message:
mips: Add initial support to gprof(1) for n64 userland

Use gp relative call for _mcount().

Stop using macro name MCOUNT as well for clarity. It has nothing to
do with one provided by .

Now, gprof(1) works just fine for C programs. On the other hand, some
C++ profiling tests of ATF fail as partially observed for n32.

More C++ profile tests become broken for GCC12 in comparison to GCC10.
Something needs to be adjusted for us, or GCC, or both.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/mips/include/asm.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/mips/include

2023-09-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Sep 14 03:37:01 UTC 2023

Modified Files:
src/sys/arch/mips/include: asm.h

Log Message:
mips: Add initial support to gprof(1) for n64 userland

Use gp relative call for _mcount().

Stop using macro name MCOUNT as well for clarity. It has nothing to
do with one provided by .

Now, gprof(1) works just fine for C programs. On the other hand, some
C++ profiling tests of ATF fail as partially observed for n32.

More C++ profile tests become broken for GCC12 in comparison to GCC10.
Something needs to be adjusted for us, or GCC, or both.


To generate a diff of this commit:
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/mips/include/asm.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/mips/include/asm.h
diff -u src/sys/arch/mips/include/asm.h:1.74 src/sys/arch/mips/include/asm.h:1.75
--- src/sys/arch/mips/include/asm.h:1.74	Thu Feb 23 14:56:00 2023
+++ src/sys/arch/mips/include/asm.h	Thu Sep 14 03:37:01 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: asm.h,v 1.74 2023/02/23 14:56:00 riastradh Exp $	*/
+/*	$NetBSD: asm.h,v 1.75 2023/09/14 03:37:01 rin Exp $	*/
 
 /*
  * Copyright (c) 1992, 1993
@@ -71,6 +71,9 @@
 #define	__SHIFTIN(__x, __mask) ((__x) * __LOWEST_SET_BIT(__mask))
 #endif	/* __ASSEMBLER__ */
 
+#ifndef GPROF
+#define	_MIPS_ASM_MCOUNT(x)
+#else
 /*
  * Define -pg profile entry code.
  * Must always be noreorder, must never use a macro instruction.
@@ -81,7 +84,7 @@
  * stack and the final addiu to t9 must always equal the size of this
  * _MIPS_ASM_MCOUNT.
  */
-#define	_MIPS_ASM_MCOUNT	\
+#define	_MIPS_ASM_MCOUNT(x)	\
 	.set	push;		\
 	.set	noreorder;	\
 	.set	noat;		\
@@ -104,7 +107,8 @@
  * call _mcount().  For the no abicalls case, skip the reloc dance.
  */
 #ifdef __mips_abicalls
-#define	_MIPS_ASM_MCOUNT	\
+#if defined(__mips_n32)		/* n32 */
+#define	_MIPS_ASM_MCOUNT(x)	\
 	.set	push;		\
 	.set	noreorder;	\
 	.set	noat;		\
@@ -118,8 +122,28 @@
 	lw	t9,8(sp);	\
 	addiu	sp,16;		\
 	.set	pop;
+#else/* n64 */
+#define	_MIPS_ASM_MCOUNT(x)	\
+	.set	push;		\
+	.set	noreorder;	\
+	.set	noat;		\
+	dsubu	sp,16;		\
+	sd	gp,0(sp);	\
+	sd	t9,8(sp);	\
+	move	AT,ra;		\
+	lui	gp,%hi(%neg(%gp_rel(x)));			\
+	daddiu	gp,%lo(%neg(%gp_rel(x)));			\
+	daddu	gp,gp,t9;	\
+	ld	t9,%call16(_mcount)(gp);			\
+	jalr	t9;		\
+	 nop;			\
+	ld	gp,0(sp);	\
+	ld	t9,8(sp);	\
+	daddiu	sp,16;		\
+	.set	pop;
+#endif
 #else /* !__mips_abicalls */
-#define	_MIPS_ASM_MCOUNT	\
+#define	_MIPS_ASM_MCOUNT(x)	\
 	.set	push;		\
 	.set	noreorder;	\
 	.set	noat;		\
@@ -129,12 +153,7 @@
 	.set	pop;
 #endif /* !__mips_abicalls */
 #endif /* n32/n64 */
-
-#ifdef GPROF
-#define	MCOUNT _MIPS_ASM_MCOUNT
-#else
-#define	MCOUNT
-#endif
+#endif /* GPROF */
 
 #ifdef USE_AENT
 #define	AENT(x)\
@@ -187,7 +206,7 @@ _C_LABEL(x): ;\
  */
 #define	STATIC_LEAF(x)			\
 	STATIC_LEAF_NOPROFILE(x);	\
-	MCOUNT
+	_MIPS_ASM_MCOUNT(x)
 
 /*
  * LEAF
@@ -198,7 +217,7 @@ _C_LABEL(x): ;\
  */
 #define	LEAF(x)\
 	LEAF_NOPROFILE(x);		\
-	MCOUNT
+	_MIPS_ASM_MCOUNT(x)
 
 /*
  * STATIC_XLEAF
@@ -241,7 +260,7 @@ _C_LABEL(x): ;		\
  */
 #define	NESTED(x, fsize, retpc)			\
 	NESTED_NOPROFILE(x, fsize, retpc);	\
-	MCOUNT
+	_MIPS_ASM_MCOUNT(x)
 
 /*
  * STATIC_NESTED
@@ -249,7 +268,7 @@ _C_LABEL(x): ;		\
  */
 #define	STATIC_NESTED(x, fsize, retpc)			\
 	STATIC_NESTED_NOPROFILE(x, fsize, retpc);	\
-	MCOUNT
+	_MIPS_ASM_MCOUNT(x)
 
 /*
  * XNESTED



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

2023-09-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Sep 14 03:25:31 UTC 2023

Modified Files:
src/sys/arch/riscv/include: ptrace.h

Log Message:
riscv: ptrace: Add PTRACE_ILLEGAL_ASM for ATF

All related tests successfully pass.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/riscv/include/ptrace.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/riscv/include/ptrace.h
diff -u src/sys/arch/riscv/include/ptrace.h:1.4 src/sys/arch/riscv/include/ptrace.h:1.5
--- src/sys/arch/riscv/include/ptrace.h:1.4	Thu Aug 24 05:40:08 2023
+++ src/sys/arch/riscv/include/ptrace.h	Thu Sep 14 03:25:31 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: ptrace.h,v 1.4 2023/08/24 05:40:08 rin Exp $ */
+/* $NetBSD: ptrace.h,v 1.5 2023/09/14 03:25:31 rin Exp $ */
 
 /*-
  * Copyright (c) 2014 The NetBSD Foundation, Inc.
@@ -54,6 +54,8 @@
 #define PTRACE_REG_SP(r)	(r)->r_reg[1]
 #define PTRACE_REG_INTRV(r)	(r)->r_reg[9]
 
+#define PTRACE_ILLEGAL_ASM	__asm __volatile("c.unimp" ::: "memory")
+
 #define PTRACE_BREAKPOINT	((const uint8_t[]) { 0x02, 0x90 })
 #define PTRACE_BREAKPOINT_ASM	__asm __volatile("c.ebreak" ::: "memory")
 #define PTRACE_BREAKPOINT_SIZE	2



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

2023-09-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Sep 14 03:25:31 UTC 2023

Modified Files:
src/sys/arch/riscv/include: ptrace.h

Log Message:
riscv: ptrace: Add PTRACE_ILLEGAL_ASM for ATF

All related tests successfully pass.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/riscv/include/ptrace.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/mips/mips

2023-09-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Sep 14 03:24:07 UTC 2023

Modified Files:
src/sys/arch/mips/mips: trap.c

Log Message:
mips/trap: Fix reversed ksi_code for SIGTRAP cases

It should be TRAP_TRACE and TRAP_BRKPT for software single stepping
and ``real'' break insn, respectively.


To generate a diff of this commit:
cvs rdiff -u -r1.262 -r1.263 src/sys/arch/mips/mips/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/mips/mips/trap.c
diff -u src/sys/arch/mips/mips/trap.c:1.262 src/sys/arch/mips/mips/trap.c:1.263
--- src/sys/arch/mips/mips/trap.c:1.262	Sun Mar 13 17:50:55 2022
+++ src/sys/arch/mips/mips/trap.c	Thu Sep 14 03:24:07 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.262 2022/03/13 17:50:55 andvar Exp $	*/
+/*	$NetBSD: trap.c,v 1.263 2023/09/14 03:24:07 rin Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.262 2022/03/13 17:50:55 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.263 2023/09/14 03:24:07 rin Exp $");
 
 #include "opt_cputype.h"	/* which mips CPU levels do we support? */
 #include "opt_ddb.h"
@@ -604,7 +604,7 @@ trap(uint32_t status, uint32_t cause, va
 			ksi.ksi_trap = type & ~T_USER;
 			ksi.ksi_signo = SIGTRAP;
 			ksi.ksi_addr = (void *)va;
-			ksi.ksi_code = TRAP_TRACE;
+			ksi.ksi_code = TRAP_BRKPT;
 
 			if ((insn.JType.op == OP_SPECIAL) &&
 			(insn.RType.func == OP_BREAK)) {
@@ -662,7 +662,7 @@ trap(uint32_t status, uint32_t cause, va
 		ksi.ksi_trap = type & ~T_USER;
 		ksi.ksi_signo = SIGTRAP;
 		ksi.ksi_addr = (void *)va;
-		ksi.ksi_code = TRAP_BRKPT;
+		ksi.ksi_code = TRAP_TRACE;
 		break; /* SIGNAL */
 	}
 	case T_DSP+T_USER:



CVS commit: src/sys/arch/mips/mips

2023-09-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Sep 14 03:24:07 UTC 2023

Modified Files:
src/sys/arch/mips/mips: trap.c

Log Message:
mips/trap: Fix reversed ksi_code for SIGTRAP cases

It should be TRAP_TRACE and TRAP_BRKPT for software single stepping
and ``real'' break insn, respectively.


To generate a diff of this commit:
cvs rdiff -u -r1.262 -r1.263 src/sys/arch/mips/mips/trap.c

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



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

2023-09-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Sep 14 03:05:15 UTC 2023

Modified Files:
src/sys/arch/i386/stand/efiboot: eficons.c

Log Message:
efiboot/x86: eficons.c: Explicitly include params.h for howmany()

NFC for -current and netbsd-10, but necessary for netbsd-[89] to
pull up raw IO serial port support (PR port-amd64/57523).


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/i386/stand/efiboot/eficons.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/i386/stand/efiboot

2023-09-13 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Thu Sep 14 03:05:15 UTC 2023

Modified Files:
src/sys/arch/i386/stand/efiboot: eficons.c

Log Message:
efiboot/x86: eficons.c: Explicitly include params.h for howmany()

NFC for -current and netbsd-10, but necessary for netbsd-[89] to
pull up raw IO serial port support (PR port-amd64/57523).


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/i386/stand/efiboot/eficons.c

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

Modified files:

Index: src/sys/arch/i386/stand/efiboot/eficons.c
diff -u src/sys/arch/i386/stand/efiboot/eficons.c:1.13 src/sys/arch/i386/stand/efiboot/eficons.c:1.14
--- src/sys/arch/i386/stand/efiboot/eficons.c:1.13	Mon Jul 24 01:56:59 2023
+++ src/sys/arch/i386/stand/efiboot/eficons.c	Thu Sep 14 03:05:15 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: eficons.c,v 1.13 2023/07/24 01:56:59 rin Exp $	*/
+/*	$NetBSD: eficons.c,v 1.14 2023/09/14 03:05:15 rin Exp $	*/
 
 /*-
  * Copyright (c) 2016 Kimihiro Nonaka 
@@ -26,6 +26,7 @@
  * SUCH DAMAGE.
  */
 
+#include 
 #include 
 #include 
 



CVS commit: src/sys/arch/iyonix/iyonix

2023-09-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Sep 13 19:45:37 UTC 2023

Modified Files:
src/sys/arch/iyonix/iyonix: iyonix_machdep.c

Log Message:
fix printf format specifier for physmem.

fixes VERBOSE_INIT_ARM enabled build for iyonix.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/iyonix/iyonix/iyonix_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/iyonix/iyonix/iyonix_machdep.c
diff -u src/sys/arch/iyonix/iyonix/iyonix_machdep.c:1.32 src/sys/arch/iyonix/iyonix/iyonix_machdep.c:1.33
--- src/sys/arch/iyonix/iyonix/iyonix_machdep.c:1.32	Thu Apr 20 08:28:06 2023
+++ src/sys/arch/iyonix/iyonix/iyonix_machdep.c	Wed Sep 13 19:45:37 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: iyonix_machdep.c,v 1.32 2023/04/20 08:28:06 skrll Exp $	*/
+/*	$NetBSD: iyonix_machdep.c,v 1.33 2023/09/13 19:45:37 andvar Exp $	*/
 
 /*
  * Copyright (c) 2001, 2002, 2003 Wasabi Systems, Inc.
@@ -73,7 +73,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: iyonix_machdep.c,v 1.32 2023/04/20 08:28:06 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: iyonix_machdep.c,v 1.33 2023/09/13 19:45:37 andvar Exp $");
 
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
@@ -492,7 +492,7 @@ initarm(void *arg)
 
 #ifdef VERBOSE_INIT_ARM
 	/* Tell the user about the memory */
-	printf("physmemory: %d pages at 0x%08lx -> 0x%08lx\n", physmem,
+	printf("physmemory: %ld pages at 0x%08lx -> 0x%08lx\n", physmem,
 	physical_start, physical_end - 1);
 #endif
 



CVS commit: src/sys/arch/iyonix/iyonix

2023-09-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Sep 13 19:45:37 UTC 2023

Modified Files:
src/sys/arch/iyonix/iyonix: iyonix_machdep.c

Log Message:
fix printf format specifier for physmem.

fixes VERBOSE_INIT_ARM enabled build for iyonix.


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/iyonix/iyonix/iyonix_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/hpcsh/dev/hd64461

2023-09-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Sep 13 17:08:15 UTC 2023

Modified Files:
src/sys/arch/hpcsh/dev/hd64461: hd64461uart.c

Log Message:
change hd64461uart_init_regs third argument from NULL to 0x0,
since compiler complains about making integer from pointer without cast.

fully fixes KGDB enabled build for hpcsh.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/hpcsh/dev/hd64461/hd64461uart.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/hpcsh/dev/hd64461/hd64461uart.c
diff -u src/sys/arch/hpcsh/dev/hd64461/hd64461uart.c:1.30 src/sys/arch/hpcsh/dev/hd64461/hd64461uart.c:1.31
--- src/sys/arch/hpcsh/dev/hd64461/hd64461uart.c:1.30	Tue Dec 11 06:34:00 2018
+++ src/sys/arch/hpcsh/dev/hd64461/hd64461uart.c	Wed Sep 13 17:08:14 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: hd64461uart.c,v 1.30 2018/12/11 06:34:00 thorpej Exp $	*/
+/*	$NetBSD: hd64461uart.c,v 1.31 2023/09/13 17:08:14 andvar Exp $	*/
 
 /*-
  * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hd64461uart.c,v 1.30 2018/12/11 06:34:00 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hd64461uart.c,v 1.31 2023/09/13 17:08:14 andvar Exp $");
 
 #include "opt_kgdb.h"
 
@@ -141,7 +141,7 @@ hd64461uart_kgdb_init(void)
 
 	hd64461uart_init();
 
-	hd64461uart_init_regs(, hd64461uart_chip.io_tag, NULL, 0x0);
+	hd64461uart_init_regs(, hd64461uart_chip.io_tag, 0x0, 0x0);
 	if (com_kgdb_attach1(,
 	kgdb_rate, COM_FREQ, COM_TYPE_NORMAL, CONMODE) != 0) {
 		printf("%s: KGDB console open failed.\n", __func__);



CVS commit: src/sys/arch/hpcsh/dev/hd64461

2023-09-13 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Sep 13 17:08:15 UTC 2023

Modified Files:
src/sys/arch/hpcsh/dev/hd64461: hd64461uart.c

Log Message:
change hd64461uart_init_regs third argument from NULL to 0x0,
since compiler complains about making integer from pointer without cast.

fully fixes KGDB enabled build for hpcsh.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/hpcsh/dev/hd64461/hd64461uart.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

2023-09-12 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue Sep 12 22:07:33 UTC 2023

Modified Files:
src/sys/arch/dreamcast/conf: G1IDE GENERIC
src/sys/arch/hpcsh/conf: DEBUG HPW650PA

Log Message:
double quotes should be in front of value, not property name.
fix KGDB enabled builds for dreamcast/hpcsh.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/dreamcast/conf/G1IDE
cvs rdiff -u -r1.137 -r1.138 src/sys/arch/dreamcast/conf/GENERIC
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hpcsh/conf/DEBUG
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/hpcsh/conf/HPW650PA

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/dreamcast/conf/G1IDE
diff -u src/sys/arch/dreamcast/conf/G1IDE:1.10 src/sys/arch/dreamcast/conf/G1IDE:1.11
--- src/sys/arch/dreamcast/conf/G1IDE:1.10	Sun Aug  7 02:52:24 2022
+++ src/sys/arch/dreamcast/conf/G1IDE	Tue Sep 12 22:07:33 2023
@@ -1,4 +1,4 @@
-# $NetBSD: G1IDE,v 1.10 2022/08/07 02:52:24 simonb Exp $
+# $NetBSD: G1IDE,v 1.11 2023/09/12 22:07:33 andvar Exp $
 
 include 	"arch/dreamcast/conf/std.dreamcast"
 
@@ -36,7 +36,7 @@ options 	DIAGNOSTIC	# cheap kernel consi
 #options 	DEBUG		# expensive debugging checks/support
 options 	DDB		# in-kernel debugger
 #options 	KGDB			# remote debugger
-#options 	"KGDB_DEVNAME=\"scif\"",KGDB_DEVRATE=57600
+#options 	KGDB_DEVNAME="\"scif\"",KGDB_DEVRATE=57600
 #makeoptions	DEBUG="-g"	# compile full symbol table
 makeoptions	COPY_SYMTAB=1
 #options 	SYSCALL_DEBUG

Index: src/sys/arch/dreamcast/conf/GENERIC
diff -u src/sys/arch/dreamcast/conf/GENERIC:1.137 src/sys/arch/dreamcast/conf/GENERIC:1.138
--- src/sys/arch/dreamcast/conf/GENERIC:1.137	Sun Feb 12 14:50:38 2023
+++ src/sys/arch/dreamcast/conf/GENERIC	Tue Sep 12 22:07:33 2023
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.137 2023/02/12 14:50:38 abs Exp $
+# $NetBSD: GENERIC,v 1.138 2023/09/12 22:07:33 andvar Exp $
 #
 # GENERIC machine description file
 # 
@@ -49,7 +49,7 @@ options 	SYSVSHM		# System V-like memory
 #options 	DEBUG		# expensive debugging checks/support
 options 	DDB		# in-kernel debugger
 #options 	KGDB			# remote debugger
-#options 	"KGDB_DEVNAME=\"scif\"",KGDB_DEVRATE=57600
+#options 	KGDB_DEVNAME="\"scif\"",KGDB_DEVRATE=57600
 #makeoptions	DEBUG="-g"	# compile full symbol table
 makeoptions	COPY_SYMTAB=1
 #options 	SYSCALL_DEBUG

Index: src/sys/arch/hpcsh/conf/DEBUG
diff -u src/sys/arch/hpcsh/conf/DEBUG:1.7 src/sys/arch/hpcsh/conf/DEBUG:1.8
--- src/sys/arch/hpcsh/conf/DEBUG:1.7	Tue Sep 12 21:50:11 2023
+++ src/sys/arch/hpcsh/conf/DEBUG	Tue Sep 12 22:07:33 2023
@@ -1,7 +1,7 @@
 #
 # kernel config file for debugging.
 #
-# 	$NetBSD: DEBUG,v 1.7 2023/09/12 21:50:11 andvar Exp $
+# 	$NetBSD: DEBUG,v 1.8 2023/09/12 22:07:33 andvar Exp $
 #
 
 include 	"arch/hpcsh/conf/GENERIC"
@@ -11,11 +11,11 @@ options 	DDB			# in-kernel debugger
 #makeoptions	DEBUG="-g"	# compile full symbol table
 #options 	KGDB_DEVRATE=19200
 # HP Jornada
-#options 	"KGDB_DEVNAME=\"scif\""
+#options 	KGDB_DEVNAME="\"scif\""
 # HITACHI PERSONA (SH3)
-#options 	"KGDB_DEVNAME=\"hd64461uart\""
+#options 	KGDB_DEVNAME="\"hd64461uart\""
 # HITACHI PERSONA (SH4)
-#options 	"KGDB_DEVNAME=\"hd64465uart\""
+#options 	KGDB_DEVNAME="\"hd64465uart\""
 
 #options 	HPC_DEBUG_INTERRUPT_MONITOR
 #options 	KSTACK_DEBUG

Index: src/sys/arch/hpcsh/conf/HPW650PA
diff -u src/sys/arch/hpcsh/conf/HPW650PA:1.32 src/sys/arch/hpcsh/conf/HPW650PA:1.33
--- src/sys/arch/hpcsh/conf/HPW650PA:1.32	Fri Aug 21 01:52:08 2015
+++ src/sys/arch/hpcsh/conf/HPW650PA	Tue Sep 12 22:07:33 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: HPW650PA,v 1.32 2015/08/21 01:52:08 uebayasi Exp $
+#	$NetBSD: HPW650PA,v 1.33 2023/09/12 22:07:33 andvar Exp $
 #
 #	HITACHI PERSONA HPW650PA
 #
@@ -25,7 +25,7 @@ options 	HPC_DEBUG_LCD
 options 	DDB			# in-kernel debugger
 pseudo-device	ksyms
 #options 	KGDB			# in-kernel debugger
-#options 	"KGDB_DEVNAME=\"hd64465uart\"",KGDB_DEVRATE=19200
+#options 	KGDB_DEVNAME="\"hd64465uart\"",KGDB_DEVRATE=19200
 #makeoptions	DEBUG="-g"	# compile full symbol table
 options 	DIAGNOSTIC		# extra kernel debugging checks
 options 	DEBUG			# extra kernel debugging support



CVS commit: src/sys/arch

2023-09-12 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue Sep 12 22:07:33 UTC 2023

Modified Files:
src/sys/arch/dreamcast/conf: G1IDE GENERIC
src/sys/arch/hpcsh/conf: DEBUG HPW650PA

Log Message:
double quotes should be in front of value, not property name.
fix KGDB enabled builds for dreamcast/hpcsh.


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/dreamcast/conf/G1IDE
cvs rdiff -u -r1.137 -r1.138 src/sys/arch/dreamcast/conf/GENERIC
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/hpcsh/conf/DEBUG
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/hpcsh/conf/HPW650PA

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



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

2023-09-12 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue Sep 12 21:50:12 UTC 2023

Modified Files:
src/sys/arch/hpcsh/conf: DEBUG

Log Message:
remove ksyms from hpcsh DEBUG kernel config. It is already defined in GENERAL.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hpcsh/conf/DEBUG

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



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

2023-09-12 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue Sep 12 21:50:12 UTC 2023

Modified Files:
src/sys/arch/hpcsh/conf: DEBUG

Log Message:
remove ksyms from hpcsh DEBUG kernel config. It is already defined in GENERAL.


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/hpcsh/conf/DEBUG

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/hpcsh/conf/DEBUG
diff -u src/sys/arch/hpcsh/conf/DEBUG:1.6 src/sys/arch/hpcsh/conf/DEBUG:1.7
--- src/sys/arch/hpcsh/conf/DEBUG:1.6	Fri Aug 21 01:52:08 2015
+++ src/sys/arch/hpcsh/conf/DEBUG	Tue Sep 12 21:50:11 2023
@@ -1,13 +1,12 @@
 #
 # kernel config file for debugging.
 #
-# 	$NetBSD: DEBUG,v 1.6 2015/08/21 01:52:08 uebayasi Exp $
+# 	$NetBSD: DEBUG,v 1.7 2023/09/12 21:50:11 andvar Exp $
 #
 
 include 	"arch/hpcsh/conf/GENERIC"
 
 options 	DDB			# in-kernel debugger
-pseudo-device	ksyms
 #options 	KGDB			# remote debugger
 #makeoptions	DEBUG="-g"	# compile full symbol table
 #options 	KGDB_DEVRATE=19200



CVS commit: src/sys/arch/hpcmips/vr

2023-09-12 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue Sep 12 19:32:00 UTC 2023

Modified Files:
src/sys/arch/hpcmips/vr: flash_vrip.c

Log Message:
rename flash_cd to vrflash_cd, since device was renamed to vrflash.

Fixes hpcmips LCARD config linking issue that flash_cd is undefined.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/hpcmips/vr/flash_vrip.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/hpcmips/vr/flash_vrip.c
diff -u src/sys/arch/hpcmips/vr/flash_vrip.c:1.14 src/sys/arch/hpcmips/vr/flash_vrip.c:1.15
--- src/sys/arch/hpcmips/vr/flash_vrip.c:1.14	Mon Sep 11 22:09:28 2023
+++ src/sys/arch/hpcmips/vr/flash_vrip.c	Tue Sep 12 19:32:00 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: flash_vrip.c,v 1.14 2023/09/11 22:09:28 andvar Exp $ */
+/* $NetBSD: flash_vrip.c,v 1.15 2023/09/12 19:32:00 andvar Exp $ */
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: flash_vrip.c,v 1.14 2023/09/11 22:09:28 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: flash_vrip.c,v 1.15 2023/09/12 19:32:00 andvar Exp $");
 
 #include 
 #include 
@@ -73,7 +73,7 @@ static int intel_write(struct flash_soft
 static int amd_erase(struct flash_softc *, bus_size_t);
 static int amd_write(struct flash_softc *, bus_size_t);
 
-extern struct cfdriver flash_cd;
+extern struct cfdriver vrflash_cd;
 
 CFATTACH_DECL_NEW(flash_vrip, sizeof(struct flash_softc),
 	  flash_probe, flash_attach, NULL, NULL);
@@ -83,7 +83,7 @@ dev_type_close(flashclose);
 dev_type_read(flashread);
 dev_type_write(flashwrite);
 
-const struct cdevsw flash_cdevsw = {
+const struct cdevsw vrflash_cdevsw = {
 	.d_open = flashopen,
 	.d_close = flashclose,
 	.d_read = flashread,
@@ -318,7 +318,7 @@ flashopen(dev_t dev, int flag, int mode,
 {
 	struct flash_softc	*sc;
 
-	sc = device_lookup_private(_cd, minor(dev));
+	sc = device_lookup_private(_cd, minor(dev));
 	if (sc == NULL)
 		return ENXIO;
 	if (sc->sc_status & FLASH_ST_BUSY)
@@ -332,7 +332,7 @@ flashclose(dev_t dev, int flag, int mode
 {
 	struct flash_softc	*sc;
 
-	sc = device_lookup_private(_cd, minor(dev));
+	sc = device_lookup_private(_cd, minor(dev));
 	sc->sc_status &= ~FLASH_ST_BUSY;
 	return 0;
 }
@@ -348,7 +348,7 @@ flashread(dev_t dev, struct uio *uio, in
 	int			count;
 	int			error;
 
-	sc = device_lookup_private(_cd, minor(dev));
+	sc = device_lookup_private(_cd, minor(dev));
 	iot = sc->sc_iot;
 	ioh = sc->sc_ioh;
 
@@ -375,7 +375,7 @@ flashwrite(dev_t dev, struct uio *uio, i
 	int			stat;
 	int			error;
 
-	sc = device_lookup_private(_cd, minor(dev));
+	sc = device_lookup_private(_cd, minor(dev));
 
 	if (sc->sc_size < uio->uio_offset + uio->uio_resid)
 		return ENOSPC;



CVS commit: src/sys/arch/hpcmips/vr

2023-09-12 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Tue Sep 12 19:32:00 UTC 2023

Modified Files:
src/sys/arch/hpcmips/vr: flash_vrip.c

Log Message:
rename flash_cd to vrflash_cd, since device was renamed to vrflash.

Fixes hpcmips LCARD config linking issue that flash_cd is undefined.


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/hpcmips/vr/flash_vrip.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/dts

2023-09-12 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Sep 12 12:56:21 UTC 2023

Modified Files:
src/sys/arch/arm/dts: sun8i-h3-orangepi-plus2e.dts
Removed Files:
src/sys/arch/arm/dts: sun8i-h3-orangepi-one.dts

Log Message:
Remove now-unneeded and brocken (probably since dts-5.15 import)
sun8i-h3-orangepi-one.dts, and let the build use the one from sys/external.
Problem reported and fix tested by Dave Tyson as reported on port-arm@
While there remove #include "sun8i-h3.dtsi" from sun8i-h3-orangepi-plus2e.dts,
this file has been removed with the dts-5.15 import.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r0 src/sys/arch/arm/dts/sun8i-h3-orangepi-one.dts
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts

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/dts/sun8i-h3-orangepi-plus2e.dts
diff -u src/sys/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts:1.4 src/sys/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts:1.5
--- src/sys/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts:1.4	Tue May 21 22:31:39 2019
+++ src/sys/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts	Tue Sep 12 12:56:21 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: sun8i-h3-orangepi-plus2e.dts,v 1.4 2019/05/21 22:31:39 jmcneill Exp $ */
+/* $NetBSD: sun8i-h3-orangepi-plus2e.dts,v 1.5 2023/09/12 12:56:21 bouyer Exp $ */
 
 /*-
  * Copyright (c) 2017 Jared McNeill 
@@ -27,7 +27,6 @@
  */
 
 #include "../../../external/gpl2/dts/dist/arch/arm/boot/dts/sun8i-h3-orangepi-plus2e.dts"
-#include "sun8i-h3.dtsi"
 
 / {
 	cpus {



CVS commit: src/sys/arch/arm/dts

2023-09-12 Thread Manuel Bouyer
Module Name:src
Committed By:   bouyer
Date:   Tue Sep 12 12:56:21 UTC 2023

Modified Files:
src/sys/arch/arm/dts: sun8i-h3-orangepi-plus2e.dts
Removed Files:
src/sys/arch/arm/dts: sun8i-h3-orangepi-one.dts

Log Message:
Remove now-unneeded and brocken (probably since dts-5.15 import)
sun8i-h3-orangepi-one.dts, and let the build use the one from sys/external.
Problem reported and fix tested by Dave Tyson as reported on port-arm@
While there remove #include "sun8i-h3.dtsi" from sun8i-h3-orangepi-plus2e.dts,
this file has been removed with the dts-5.15 import.


To generate a diff of this commit:
cvs rdiff -u -r1.3 -r0 src/sys/arch/arm/dts/sun8i-h3-orangepi-one.dts
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/arm/dts/sun8i-h3-orangepi-plus2e.dts

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



CVS commit: src/sys/arch/hpcmips/vr

2023-09-11 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Sep 11 22:09:29 UTC 2023

Modified Files:
src/sys/arch/hpcmips/vr: flash_vrip.c

Log Message:
hpcmips/vrflash(4): custom DPRINTF definition requires additional brackets
around the arguments.

Fixes FLUSH_DEBUG build.

However the driver fails to link due to missing reference to flash_cd,
my guess because of obsoleted flash device-major.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hpcmips/vr/flash_vrip.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/hpcmips/vr

2023-09-11 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Sep 11 22:09:29 UTC 2023

Modified Files:
src/sys/arch/hpcmips/vr: flash_vrip.c

Log Message:
hpcmips/vrflash(4): custom DPRINTF definition requires additional brackets
around the arguments.

Fixes FLUSH_DEBUG build.

However the driver fails to link due to missing reference to flash_cd,
my guess because of obsoleted flash device-major.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/hpcmips/vr/flash_vrip.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/hpcmips/vr/flash_vrip.c
diff -u src/sys/arch/hpcmips/vr/flash_vrip.c:1.13 src/sys/arch/hpcmips/vr/flash_vrip.c:1.14
--- src/sys/arch/hpcmips/vr/flash_vrip.c:1.13	Sat Nov 21 21:23:48 2020
+++ src/sys/arch/hpcmips/vr/flash_vrip.c	Mon Sep 11 22:09:28 2023
@@ -1,4 +1,4 @@
-/* $NetBSD: flash_vrip.c,v 1.13 2020/11/21 21:23:48 thorpej Exp $ */
+/* $NetBSD: flash_vrip.c,v 1.14 2023/09/11 22:09:28 andvar Exp $ */
 
 /*
  * Copyright (c) 2002 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: flash_vrip.c,v 1.13 2020/11/21 21:23:48 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: flash_vrip.c,v 1.14 2023/09/11 22:09:28 andvar Exp $");
 
 #include 
 #include 
@@ -188,15 +188,15 @@ flash_probe(device_t parent, cfdata_t ma
 	if (bus_space_map(va->va_iot, va->va_addr, va->va_size, 0, ))
 		return 0;
 	if (!probe_cfi(va->va_iot, ioh)) {
-		DPRINTF("CFI ID str and command set recognized\n");
+		DPRINTF(("CFI ID str and command set recognized\n"));
 		goto detect;
 	}
 	if (!i28f128_probe(va->va_iot, ioh)) {
-		DPRINTF("28F128 detected\n");
+		DPRINTF(("28F128 detected\n"));
 		goto detect;
 	}
 	if (!mbm29160_probe(va->va_iot, ioh)) {
-		DPRINTF("29LV160 detected\n");
+		DPRINTF(("29LV160 detected\n"));
 		goto detect;
 	}
 	return 0;



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

2023-09-10 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 10 21:13:20 UTC 2023

Modified Files:
src/sys/arch/hpcmips/dev: plumpcmcia.c

Log Message:
return %#x specifier for pcihp->ioh and add (unsigned) cast instead,
as it is done everywhere in this code.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/hpcmips/dev/plumpcmcia.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/hpcmips/dev/plumpcmcia.c
diff -u src/sys/arch/hpcmips/dev/plumpcmcia.c:1.31 src/sys/arch/hpcmips/dev/plumpcmcia.c:1.32
--- src/sys/arch/hpcmips/dev/plumpcmcia.c:1.31	Sun Sep 10 14:28:57 2023
+++ src/sys/arch/hpcmips/dev/plumpcmcia.c	Sun Sep 10 21:13:20 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: plumpcmcia.c,v 1.31 2023/09/10 14:28:57 andvar Exp $ */
+/*	$NetBSD: plumpcmcia.c,v 1.32 2023/09/10 21:13:20 andvar Exp $ */
 
 /*
  * Copyright (c) 1999, 2000 UCHIYAMA Yasushi. All rights reserved.
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: plumpcmcia.c,v 1.31 2023/09/10 14:28:57 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: plumpcmcia.c,v 1.32 2023/09/10 21:13:20 andvar Exp $");
 
 #include 
 #include 
@@ -646,7 +646,7 @@ plumpcmcia_chip_io_free(pcmcia_chipset_h
 		bus_space_unmap(pcihp->iot, pcihp->ioh, pcihp->size);
 	}
 
-	DPRINTF("plumpcmcia_chip_io_free %#lx+%#x\n", pcihp->ioh, 
+	DPRINTF("plumpcmcia_chip_io_free %#x+%#x\n", (unsigned)pcihp->ioh, 
 	(unsigned)pcihp->size);
 }
 



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

2023-09-10 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 10 21:13:20 UTC 2023

Modified Files:
src/sys/arch/hpcmips/dev: plumpcmcia.c

Log Message:
return %#x specifier for pcihp->ioh and add (unsigned) cast instead,
as it is done everywhere in this code.


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/hpcmips/dev/plumpcmcia.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/hpcmips/tx

2023-09-10 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 10 20:55:30 UTC 2023

Modified Files:
src/sys/arch/hpcmips/tx: tx39sib.c

Log Message:
rewrite tx39sib debug code to use debug.h DPRINTF definition.
also debug code uses dbg_bitmask_print(), thus build fails without the header.

fixes TX39SIBDEBUG enabled build.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/hpcmips/tx/tx39sib.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/hpcmips/tx/tx39sib.c
diff -u src/sys/arch/hpcmips/tx/tx39sib.c:1.23 src/sys/arch/hpcmips/tx/tx39sib.c:1.24
--- src/sys/arch/hpcmips/tx/tx39sib.c:1.23	Sat Aug  7 16:18:54 2021
+++ src/sys/arch/hpcmips/tx/tx39sib.c	Sun Sep 10 20:55:30 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: tx39sib.c,v 1.23 2021/08/07 16:18:54 thorpej Exp $ */
+/*	$NetBSD: tx39sib.c,v 1.24 2023/09/10 20:55:30 andvar Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -34,9 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tx39sib.c,v 1.23 2021/08/07 16:18:54 thorpej Exp $");
-
-#undef TX39SIBDEBUG
+__KERNEL_RCSID(0, "$NetBSD: tx39sib.c,v 1.24 2023/09/10 20:55:30 andvar Exp $");
 
 #include 
 #include 
@@ -53,11 +51,10 @@ __KERNEL_RCSID(0, "$NetBSD: tx39sib.c,v 
 #include "locators.h"
 
 #ifdef TX39SIBDEBUG
-int	tx39sibdebug = 0;
-#define	DPRINTF(arg) if (tx39sibdebug) printf arg;
-#else
-#define	DPRINTF(arg)
+#define DPRINTF_ENABLE
+#define DPRINTF_DEBUG	tx39sibdebug
 #endif
+#include 
 
 int	tx39sib_match(device_t, cfdata_t, void *);
 void	tx39sib_attach(device_t, device_t, void *);



CVS commit: src/sys/arch/hpcmips/tx

2023-09-10 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 10 20:55:30 UTC 2023

Modified Files:
src/sys/arch/hpcmips/tx: tx39sib.c

Log Message:
rewrite tx39sib debug code to use debug.h DPRINTF definition.
also debug code uses dbg_bitmask_print(), thus build fails without the header.

fixes TX39SIBDEBUG enabled build.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/hpcmips/tx/tx39sib.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/hpcmips/tx

2023-09-10 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 10 20:41:57 UTC 2023

Modified Files:
src/sys/arch/hpcmips/tx: tx39biu.c

Log Message:
rewrite old style tx39biu_dump function declaration
and constify char *rowsel[], char *colsel[].

fixes TX39BIU_DEBUG enabled build.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hpcmips/tx/tx39biu.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/hpcmips/tx/tx39biu.c
diff -u src/sys/arch/hpcmips/tx/tx39biu.c:1.17 src/sys/arch/hpcmips/tx/tx39biu.c:1.18
--- src/sys/arch/hpcmips/tx/tx39biu.c:1.17	Sat Aug  7 16:18:54 2021
+++ src/sys/arch/hpcmips/tx/tx39biu.c	Sun Sep 10 20:41:57 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: tx39biu.c,v 1.17 2021/08/07 16:18:54 thorpej Exp $ */
+/*	$NetBSD: tx39biu.c,v 1.18 2023/09/10 20:41:57 andvar Exp $ */
 
 /*-
  * Copyright (c) 1999-2002 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tx39biu.c,v 1.17 2021/08/07 16:18:54 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tx39biu.c,v 1.18 2023/09/10 20:41:57 andvar Exp $");
 
 #include "opt_tx39_watchdogtimer.h"
 #include "opt_tx39biu_debug.h"
@@ -163,12 +163,11 @@ tx39biu_intr(void *arg)
 
 #ifdef TX39BIU_DEBUG
 void
-tx39biu_dump(tc)
-	tx_chipset_tag_t tc;	
+tx39biu_dump(tx_chipset_tag_t tc)	
 {
-	char *rowsel[] = {"18,17:9", "22,18,20,19,17:9", "20,22,21,19,17:9",
+	const char *rowsel[] = {"18,17:9", "22,18,20,19,17:9", "20,22,21,19,17:9",
 			  "22,23,21,19,17:9"};
-	char *colsel[] = {"22,20,18,8:1", "19,18,8:2", "21,20,18,8:2",
+	const char *colsel[] = {"22,20,18,8:1", "19,18,8:2", "21,20,18,8:2",
 			  "23,22,20,18,8:2", "24,22,20,18,8:2",
 			  "18,p,X,8:0","22,p,X,21,8:0", "18,p,X,21,8:1",
 			  "22,p,X,23,21,8:1", "24,23,21,8:2"};



CVS commit: src/sys/arch/hpcmips/tx

2023-09-10 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 10 20:41:57 UTC 2023

Modified Files:
src/sys/arch/hpcmips/tx: tx39biu.c

Log Message:
rewrite old style tx39biu_dump function declaration
and constify char *rowsel[], char *colsel[].

fixes TX39BIU_DEBUG enabled build.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/hpcmips/tx/tx39biu.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/hpcmips/tx

2023-09-10 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 10 20:28:25 UTC 2023

Modified Files:
src/sys/arch/hpcmips/tx: tx39ir.c

Log Message:
tx39ir(4): rewrite code to use DPRINTF definition from debug.h.
custom one had wrong vrpiu_debug variable in if block (likely copy pasta)
debug code also calls dbg_bitmask_print(), thus was failing to build.
remove unneeded #undef TX39IRDEBUG.

Fixes TX39IRDEBUG build (tested with hpcmips TX3912 kernel config).


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hpcmips/tx/tx39ir.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/hpcmips/tx/tx39ir.c
diff -u src/sys/arch/hpcmips/tx/tx39ir.c:1.10 src/sys/arch/hpcmips/tx/tx39ir.c:1.11
--- src/sys/arch/hpcmips/tx/tx39ir.c:1.10	Sat Oct 27 17:17:54 2012
+++ src/sys/arch/hpcmips/tx/tx39ir.c	Sun Sep 10 20:28:25 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: tx39ir.c,v 1.10 2012/10/27 17:17:54 chs Exp $ */
+/*	$NetBSD: tx39ir.c,v 1.11 2023/09/10 20:28:25 andvar Exp $ */
 
 /*-
  * Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -34,9 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: tx39ir.c,v 1.10 2012/10/27 17:17:54 chs Exp $");
-
-#undef TX39IRDEBUG
+__KERNEL_RCSID(0, "$NetBSD: tx39ir.c,v 1.11 2023/09/10 20:28:25 andvar Exp $");
 
 #include 
 #include 
@@ -53,11 +51,10 @@ __KERNEL_RCSID(0, "$NetBSD: tx39ir.c,v 1
 #include  /* XXX */
 
 #ifdef TX39IRDEBUG
-int	tx39ir_debug = 1;
-#define	DPRINTF(arg) if (vrpiu_debug) printf arg;
-#else
-#define	DPRINTF(arg)
+#define DPRINTF_ENABLE
+#define DPRINTF_DEBUG	tx39ir_debug
 #endif
+#include 
 
 int	tx39ir_match(device_t, cfdata_t, void *);
 void	tx39ir_attach(device_t, device_t, void *);



CVS commit: src/sys/arch/hpcmips/tx

2023-09-10 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Sep 10 20:28:25 UTC 2023

Modified Files:
src/sys/arch/hpcmips/tx: tx39ir.c

Log Message:
tx39ir(4): rewrite code to use DPRINTF definition from debug.h.
custom one had wrong vrpiu_debug variable in if block (likely copy pasta)
debug code also calls dbg_bitmask_print(), thus was failing to build.
remove unneeded #undef TX39IRDEBUG.

Fixes TX39IRDEBUG build (tested with hpcmips TX3912 kernel config).


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/hpcmips/tx/tx39ir.c

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



  1   2   3   4   5   6   7   8   9   10   >