CVS commit: src/sys/arch/atari/stand/tostools/libtos

2024-09-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Sep 25 08:32:44 UTC 2024

Modified Files:
src/sys/arch/atari/stand/tostools/libtos: Makefile sysinfo.c

Log Message:
atari/stand: Rework sysinfo.c v.s. GCC12 -Warray-bounds

sysinfo.c is also used for bootxxx. Convert `-Wno-error=...` into
`#pragma gcc diagnostic ...` to the source file, although this
does not narrow down scope of hack.

Fix atari build this time for sure ;)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/atari/stand/tostools/libtos/Makefile
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/atari/stand/tostools/libtos/sysinfo.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/atari/stand/tostools/libtos

2024-09-25 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Wed Sep 25 08:32:44 UTC 2024

Modified Files:
src/sys/arch/atari/stand/tostools/libtos: Makefile sysinfo.c

Log Message:
atari/stand: Rework sysinfo.c v.s. GCC12 -Warray-bounds

sysinfo.c is also used for bootxxx. Convert `-Wno-error=...` into
`#pragma gcc diagnostic ...` to the source file, although this
does not narrow down scope of hack.

Fix atari build this time for sure ;)


To generate a diff of this commit:
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/atari/stand/tostools/libtos/Makefile
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/atari/stand/tostools/libtos/sysinfo.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/atari/stand/tostools/libtos/Makefile
diff -u src/sys/arch/atari/stand/tostools/libtos/Makefile:1.6 src/sys/arch/atari/stand/tostools/libtos/Makefile:1.7
--- src/sys/arch/atari/stand/tostools/libtos/Makefile:1.6	Tue Sep 24 11:13:41 2024
+++ src/sys/arch/atari/stand/tostools/libtos/Makefile	Wed Sep 25 08:32:44 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.6 2024/09/24 11:13:41 rin Exp $
+#	$NetBSD: Makefile,v 1.7 2024/09/25 08:32:44 rin Exp $
 #
 LIB	= libtos.a
 
@@ -12,9 +12,3 @@ include ../Makefile.inc
 ${LIB}: ${OBJS}
 	@${RM} ${LIB}
 	${AR} ${LIB} ${OBJS}
-
-.if ${HAVE_GCC:U0} >= 12
-# ADDR_* defined in tosdefs.h are in the 0-th page, even if 4KB page,
-# i.e., [0, 0x1000). This causes -Warray-bounds for GCC12 and later.
-COPTS.sysinfo.c+=	-Wno-error=array-bounds
-.endif

Index: src/sys/arch/atari/stand/tostools/libtos/sysinfo.c
diff -u src/sys/arch/atari/stand/tostools/libtos/sysinfo.c:1.9 src/sys/arch/atari/stand/tostools/libtos/sysinfo.c:1.10
--- src/sys/arch/atari/stand/tostools/libtos/sysinfo.c:1.9	Sat Mar 14 15:36:04 2009
+++ src/sys/arch/atari/stand/tostools/libtos/sysinfo.c	Wed Sep 25 08:32:44 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: sysinfo.c,v 1.9 2009/03/14 15:36:04 dsl Exp $	*/
+/*	$NetBSD: sysinfo.c,v 1.10 2024/09/25 08:32:44 rin Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -43,6 +43,14 @@
 #include "libtos.h"
 #include "tosdefs.h"
 #include "kparamb.h"
+
+/*
+ * ADDR_* defined in tosdefs.h are in the 0-th page, even if 4KB page,
+ * i.e., [0, 0x1000). This causes -Warray-bounds for GCC12 and later.
+ */
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Warray-bounds"
+
 /*
  * Extract memory and CPU/FPU info from system.
  */
@@ -130,3 +138,5 @@ sys_info(osdsc_t *od)
 		} while (jar[-2]);
 	}
 }
+
+#pragma GCC diagnostic pop



CVS commit: src/sys/arch/atari/stand/tostools/libtos

2024-09-24 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Sep 24 11:13:41 UTC 2024

Modified Files:
src/sys/arch/atari/stand/tostools/libtos: Makefile

Log Message:
atari: libtos: Silence GCC12 -Warray-bounds for sysinfo.c

ADDR_* defined in tosdefs.h are in the 0-th page, even if 4KB page,
i.e., [0, 0x1000). This causes -Warray-bounds for GCC12 and later.

Fix atari build with GCC12.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/atari/stand/tostools/libtos/Makefile

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

Modified files:

Index: src/sys/arch/atari/stand/tostools/libtos/Makefile
diff -u src/sys/arch/atari/stand/tostools/libtos/Makefile:1.5 src/sys/arch/atari/stand/tostools/libtos/Makefile:1.6
--- src/sys/arch/atari/stand/tostools/libtos/Makefile:1.5	Fri Mar 22 21:27:58 2002
+++ src/sys/arch/atari/stand/tostools/libtos/Makefile	Tue Sep 24 11:13:41 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.5 2002/03/22 21:27:58 leo Exp $
+#	$NetBSD: Makefile,v 1.6 2024/09/24 11:13:41 rin Exp $
 #
 LIB	= libtos.a
 
@@ -12,3 +12,9 @@ include ../Makefile.inc
 ${LIB}: ${OBJS}
 	@${RM} ${LIB}
 	${AR} ${LIB} ${OBJS}
+
+.if ${HAVE_GCC:U0} >= 12
+# ADDR_* defined in tosdefs.h are in the 0-th page, even if 4KB page,
+# i.e., [0, 0x1000). This causes -Warray-bounds for GCC12 and later.
+COPTS.sysinfo.c+=	-Wno-error=array-bounds
+.endif



CVS commit: src/sys/arch/atari/stand/tostools/libtos

2024-09-24 Thread Rin Okuyama
Module Name:src
Committed By:   rin
Date:   Tue Sep 24 11:13:41 UTC 2024

Modified Files:
src/sys/arch/atari/stand/tostools/libtos: Makefile

Log Message:
atari: libtos: Silence GCC12 -Warray-bounds for sysinfo.c

ADDR_* defined in tosdefs.h are in the 0-th page, even if 4KB page,
i.e., [0, 0x1000). This causes -Warray-bounds for GCC12 and later.

Fix atari build with GCC12.


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/atari/stand/tostools/libtos/Makefile

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



CVS commit: src/sys/arch/atari/atari

2024-01-14 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Jan 15 03:14:31 UTC 2024

Modified Files:
src/sys/arch/atari/atari: atari_init.c

Log Message:
Guard references to protorp with M68030.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/atari/atari/atari_init.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/atari/atari

2024-01-14 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Jan 15 03:14:31 UTC 2024

Modified Files:
src/sys/arch/atari/atari: atari_init.c

Log Message:
Guard references to protorp with M68030.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/atari/atari/atari_init.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/atari/atari/atari_init.c
diff -u src/sys/arch/atari/atari/atari_init.c:1.110 src/sys/arch/atari/atari/atari_init.c:1.111
--- src/sys/arch/atari/atari/atari_init.c:1.110	Tue Jan  9 07:28:25 2024
+++ src/sys/arch/atari/atari/atari_init.c	Mon Jan 15 03:14:31 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: atari_init.c,v 1.110 2024/01/09 07:28:25 thorpej Exp $	*/
+/*	$NetBSD: atari_init.c,v 1.111 2024/01/15 03:14:31 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.110 2024/01/09 07:28:25 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.111 2024/01/15 03:14:31 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mbtype.h"
@@ -211,7 +211,7 @@ start_c(int id, u_int ttphystart, u_int 
 	psize_t		ptsize;
 	u_int		ptextra;
 	vaddr_t		kva;
-	u_int		tc, i;
+	u_int		i;
 	pt_entry_t	*pg, *epg;
 	pt_entry_t	pg_proto;
 	vaddr_t		end_loaded;
@@ -601,7 +601,6 @@ start_c(int id, u_int ttphystart, u_int 
 	 * Prepare to enable the MMU.
 	 * Setup and load SRP (see pmap.h)
 	 */
-	protorp[1] = Sysseg_pa;			/* + segtable address */
 
 	cpu_init_kcorehdr(kbase, Sysseg_pa);
 
@@ -642,15 +641,18 @@ start_c(int id, u_int ttphystart, u_int 
 	} else
 #endif
 	{
+#if defined(M68030)
+		protorp[1] = Sysseg_pa;		/* + segtable address */
 		__asm volatile ("pmove %0@,%%srp" : : "a" (&protorp[0]));
 		/*
 		 * setup and load TC register.
 		 * enable_cpr, enable_srp, pagesize=8k,
 		 * A = 8 bits, B = 11 bits
 		 */
-		tc = MMU51_TCR_BITS;
+		u_int tc = MMU51_TCR_BITS;
 		__asm volatile ("pflusha" : : );
 		__asm volatile ("pmove %0@,%%tc" : : "a" (&tc));
+#endif /* M68030 */
 	}
 
 	/*



CVS commit: src/sys/arch/atari

2023-12-07 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Dec  7 16:56:09 UTC 2023

Modified Files:
src/sys/arch/atari/atari: atari_init.c bus.c machdep.c
src/sys/arch/atari/include: bus_funcs.h

Log Message:
extent(9) -> vmem(9)


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/arch/atari/atari/atari_init.c
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/atari/atari/bus.c
cvs rdiff -u -r1.188 -r1.189 src/sys/arch/atari/atari/machdep.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/atari/include/bus_funcs.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/atari/atari/atari_init.c
diff -u src/sys/arch/atari/atari/atari_init.c:1.107 src/sys/arch/atari/atari/atari_init.c:1.108
--- src/sys/arch/atari/atari/atari_init.c:1.107	Fri Jan  6 10:28:27 2023
+++ src/sys/arch/atari/atari/atari_init.c	Thu Dec  7 16:56:09 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: atari_init.c,v 1.107 2023/01/06 10:28:27 tsutsui Exp $	*/
+/*	$NetBSD: atari_init.c,v 1.108 2023/12/07 16:56:09 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.107 2023/01/06 10:28:27 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.108 2023/12/07 16:56:09 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mbtype.h"
@@ -671,10 +671,10 @@ start_c(int id, u_int ttphystart, u_int 
 	init_stmem();
 
 	/*
-	 * Initialize the iomem extent for bus_space(9) to manage address
+	 * Initialize the iomem arena for bus_space(9) to manage address
 	 * spaces and allocate the physical RAM from the extent map.
 	 */
-	atari_bus_space_extent_init(0x0, 0x);
+	atari_bus_space_arena_init(0x0, 0x);
 	for (i = 0; i < NMEM_SEGS && boot_segs[i].end != 0; i++) {
 		if (atari_bus_space_alloc_physmem(boot_segs[i].start,
 		boot_segs[i].end)) {

Index: src/sys/arch/atari/atari/bus.c
diff -u src/sys/arch/atari/atari/bus.c:1.68 src/sys/arch/atari/atari/bus.c:1.69
--- src/sys/arch/atari/atari/bus.c:1.68	Fri Jan  6 10:28:27 2023
+++ src/sys/arch/atari/atari/bus.c	Thu Dec  7 16:56:09 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus.c,v 1.68 2023/01/06 10:28:27 tsutsui Exp $	*/
+/*	$NetBSD: bus.c,v 1.69 2023/12/07 16:56:09 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #include "opt_m68k_arch.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.68 2023/01/06 10:28:27 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.69 2023/12/07 16:56:09 thorpej Exp $");
 
 #include 
 #include 
@@ -41,6 +41,7 @@ __KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.68
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -50,16 +51,16 @@ __KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.68
 #include 
 
 /*
- * Extent maps to manage all memory space, including I/O ranges.  Allocate
- * storage for 16 regions in each, initially.  Later, iomem_malloc_safe
- * will indicate that it's safe to use malloc() to dynamically allocate
- * region descriptors.
+ * Vmem arena to manage all memory space, including I/O ranges.  Allocate
+ * storage for 16 regions in each, initially.
+ *
  * This means that the fixed static storage is only used for registrating
  * the found memory regions and the bus-mapping of the console.
  */
-static long iomem_ex_storage[EXTENT_FIXED_STORAGE_SIZE(16) / sizeof(long)];
-static struct extent *iomem_ex;
-static int iomem_malloc_safe = 0;
+#define	IOMEM_BTAG_COUNT	VMEM_EST_BTCOUNT(1, 16)
+static struct vmem iomem_arena_store;
+static struct vmem_btag iomem_btag_store[IOMEM_BTAG_COUNT];
+static vmem_t *iomem_arena;
 
 static int  _bus_dmamap_load_buffer(bus_dma_tag_t tag, bus_dmamap_t,
 		void *, bus_size_t, struct vmspace *, int, paddr_t *,
@@ -80,9 +81,12 @@ extern paddr_t avail_end;
  * very early stage of the system configuration.
  */
 static pt_entry_t	*bootm_ptep;
-static long		bootm_ex_storage[EXTENT_FIXED_STORAGE_SIZE(32) /
-sizeof(long)];
-static struct extent	*bootm_ex;
+static vaddr_t		 bootm_start;
+static vaddr_t		 bootm_end;		/* inclusive */
+#define	BOOTM_BTAG_COUNT	VMEM_EST_BTCOUNT(1, 32)
+static struct vmem	 bootm_arena_store;
+static struct vmem_btag	 bootm_btag_store[BOOTM_BTAG_COUNT];
+static vmem_t *		 bootm_arena;
 
 static vaddr_t	bootm_alloc(paddr_t pa, u_long size, int flags);
 static int	bootm_free(vaddr_t va, u_long size);
@@ -91,10 +95,24 @@ void
 bootm_init(vaddr_t va, void *ptep, vsize_t size)
 {
 
-	bootm_ex = extent_create("bootmem", va, va + size,
-	(void *)bootm_ex_storage, sizeof(bootm_ex_storage),
-	EX_NOCOALESCE|EX_NOWAIT);
+	bootm_start = va;
+	bootm_end = va + size - 1;
 	bootm_ptep = (pt_entry_t *)ptep;
+
+	bootm_arena = vmem_init(&bootm_arena_store,
+"bootmem",		/* name */
+0,			/* addr */
+0,			/* size */
+PAGE_SIZE,		/* quantum */
+NULL,			/* importfn */
+NULL,			/* releasefn */
+NULL,			/* source */
+0,			/* qcache_max */
+VM_N

CVS commit: src/sys/arch/atari

2023-12-07 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Dec  7 16:56:09 UTC 2023

Modified Files:
src/sys/arch/atari/atari: atari_init.c bus.c machdep.c
src/sys/arch/atari/include: bus_funcs.h

Log Message:
extent(9) -> vmem(9)


To generate a diff of this commit:
cvs rdiff -u -r1.107 -r1.108 src/sys/arch/atari/atari/atari_init.c
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/atari/atari/bus.c
cvs rdiff -u -r1.188 -r1.189 src/sys/arch/atari/atari/machdep.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/atari/include/bus_funcs.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/atari/dev

2023-08-30 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Aug 30 19:07:04 UTC 2023

Modified Files:
src/sys/arch/atari/dev: ser.c

Log Message:
atari/ser(4): constify "char *str" serstatus() argument to fix SER_DEBUG build.


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 src/sys/arch/atari/dev/ser.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/atari/dev/ser.c
diff -u src/sys/arch/atari/dev/ser.c:1.58 src/sys/arch/atari/dev/ser.c:1.59
--- src/sys/arch/atari/dev/ser.c:1.58	Fri Jan  6 10:28:28 2023
+++ src/sys/arch/atari/dev/ser.c	Wed Aug 30 19:07:04 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: ser.c,v 1.58 2023/01/06 10:28:28 tsutsui Exp $	*/
+/*	$NetBSD: ser.c,v 1.59 2023/08/30 19:07:04 andvar Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -93,7 +93,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.58 2023/01/06 10:28:28 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ser.c,v 1.59 2023/08/30 19:07:04 andvar Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mbtype.h"
@@ -347,9 +347,9 @@ serattach(device_t parent, device_t self
 }
 
 #ifdef SER_DEBUG
-void serstatus(struct ser_softc *, char *);
+void serstatus(struct ser_softc *, const char *);
 void
-serstatus(struct ser_softc *sc, char *str)
+serstatus(struct ser_softc *sc, const char *str)
 {
 	struct tty *tp = sc->sc_tty;
 



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

2023-08-30 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Aug 30 19:07:04 UTC 2023

Modified Files:
src/sys/arch/atari/dev: ser.c

Log Message:
atari/ser(4): constify "char *str" serstatus() argument to fix SER_DEBUG build.


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

2023-08-30 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Aug 30 18:20:40 UTC 2023

Modified Files:
src/sys/arch/atari/dev: fd.c

Log Message:
atari/fdc(4): fix printf format specifiers for FLP_DEBUG build.


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/arch/atari/dev/fd.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/atari/dev/fd.c
diff -u src/sys/arch/atari/dev/fd.c:1.96 src/sys/arch/atari/dev/fd.c:1.97
--- src/sys/arch/atari/dev/fd.c:1.96	Sat Jun 24 05:31:04 2023
+++ src/sys/arch/atari/dev/fd.c	Wed Aug 30 18:20:40 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: fd.c,v 1.96 2023/06/24 05:31:04 msaitoh Exp $	*/
+/*	$NetBSD: fd.c,v 1.97 2023/08/30 18:20:40 andvar Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman.
@@ -44,7 +44,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.96 2023/06/24 05:31:04 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.97 2023/08/30 18:20:40 andvar Exp $");
 
 #include 
 #include 
@@ -472,7 +472,7 @@ fdopen(dev_t dev, int flags, int devtype
 	int s;
 
 #ifdef FLP_DEBUG
-	printf("fdopen dev=0x%x\n", dev);
+	printf("fdopen dev=0x%llx\n", dev);
 #endif
 
 	if (FLP_TYPE(dev) >= NR_TYPES)
@@ -590,7 +590,7 @@ fdstrategy(struct buf *bp)
 	sc = device_lookup_private(&fd_cd, DISKUNIT(bp->b_dev));
 
 #ifdef FLP_DEBUG
-	printf("fdstrategy: %p, b_bcount: %ld\n", bp, bp->b_bcount);
+	printf("fdstrategy: %p, b_bcount: %d\n", bp, bp->b_bcount);
 #endif
 
 	/*
@@ -1213,13 +1213,13 @@ fdminphys(struct buf *bp)
 	tsz  = sc->nsectors * sc->nheads * SECTOR_SIZE;
 
 #ifdef FLP_DEBUG
-	printf("fdminphys: before %ld", bp->b_bcount);
+	printf("fdminphys: before %d", bp->b_bcount);
 #endif
 
 	bp->b_bcount = uimin(bp->b_bcount, tsz - toff);
 
 #ifdef FLP_DEBUG
-	printf(" after %ld\n", bp->b_bcount);
+	printf(" after %d\n", bp->b_bcount);
 #endif
 
 	minphys(bp);



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

2023-08-30 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Wed Aug 30 18:20:40 UTC 2023

Modified Files:
src/sys/arch/atari/dev: fd.c

Log Message:
atari/fdc(4): fix printf format specifiers for FLP_DEBUG build.


To generate a diff of this commit:
cvs rdiff -u -r1.96 -r1.97 src/sys/arch/atari/dev/fd.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/atari/include

2023-07-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Jul 11 10:58:03 UTC 2023

Modified Files:
src/sys/arch/atari/include: intr.h

Log Message:
atari/intr.h: Expose ipl_cookie_t with _KMEMUSER for crash(8).


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/atari/include/intr.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/atari/include/intr.h
diff -u src/sys/arch/atari/include/intr.h:1.22 src/sys/arch/atari/include/intr.h:1.23
--- src/sys/arch/atari/include/intr.h:1.22	Fri Apr  2 12:11:41 2021
+++ src/sys/arch/atari/include/intr.h	Tue Jul 11 10:58:03 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.22 2021/04/02 12:11:41 rin Exp $	*/
+/*	$NetBSD: intr.h,v 1.23 2023/07/11 10:58:03 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 2007 The NetBSD Foundation, Inc.
@@ -48,6 +48,12 @@
 #define	IST_EDGE	2	/* edge-triggered		*/
 #define	IST_LEVEL	3	/* level-triggered		*/
 
+#if defined(_KERNEL) || defined(_KMEMUSER)
+typedef struct {
+	uint16_t _psl;
+} ipl_cookie_t;
+#endif
+
 /*
  * spl functions; all but spl0 are done in-line
  */
@@ -71,9 +77,6 @@ extern const uint16_t ipl2psl_table[NIPL
 extern int idepth;
 
 typedef int ipl_t;
-typedef struct {
-	uint16_t _psl;
-} ipl_cookie_t;
 
 static inline ipl_cookie_t
 makeiplcookie(ipl_t ipl)



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

2023-07-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Jul 11 10:58:03 UTC 2023

Modified Files:
src/sys/arch/atari/include: intr.h

Log Message:
atari/intr.h: Expose ipl_cookie_t with _KMEMUSER for crash(8).


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/atari/include/intr.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/atari/dev

2023-06-26 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Jun 26 10:57:09 UTC 2023

Modified Files:
src/sys/arch/atari/dev: kbd.c

Log Message:
s/privious/previous/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/atari/dev/kbd.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/atari/dev/kbd.c
diff -u src/sys/arch/atari/dev/kbd.c:1.57 src/sys/arch/atari/dev/kbd.c:1.58
--- src/sys/arch/atari/dev/kbd.c:1.57	Fri Jan  6 10:28:28 2023
+++ src/sys/arch/atari/dev/kbd.c	Mon Jun 26 10:57:09 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: kbd.c,v 1.57 2023/01/06 10:28:28 tsutsui Exp $	*/
+/*	$NetBSD: kbd.c,v 1.58 2023/06/26 10:57:09 andvar Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.57 2023/01/06 10:28:28 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.58 2023/06/26 10:57:09 andvar Exp $");
 
 #include "mouse.h"
 #include "ite.h"
@@ -730,7 +730,7 @@ kbd_write(const uint8_t *cmd, int len)
 	s = splhigh();
 
 	/*
-	 * Make sure any privious write has ended...
+	 * Make sure any previous write has ended...
 	 */
 	while (sc->sc_sendp != NULL)
 		tsleep((void *)&sc->sc_sendp, TTOPRI, "kbd_write1", 0);



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

2023-06-26 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Mon Jun 26 10:57:09 UTC 2023

Modified Files:
src/sys/arch/atari/dev: kbd.c

Log Message:
s/privious/previous/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/atari/dev/kbd.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/atari/include

2023-03-25 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Mar 25 21:51:12 UTC 2023

Modified Files:
src/sys/arch/atari/include: video.h

Log Message:
s/resultion/resolution/ in comment.


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

2023-03-25 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sat Mar 25 21:51:12 UTC 2023

Modified Files:
src/sys/arch/atari/include: video.h

Log Message:
s/resultion/resolution/ in comment.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/atari/include/video.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/atari/include/video.h
diff -u src/sys/arch/atari/include/video.h:1.9 src/sys/arch/atari/include/video.h:1.10
--- src/sys/arch/atari/include/video.h:1.9	Sat Mar 25 21:47:10 2023
+++ src/sys/arch/atari/include/video.h	Sat Mar 25 21:51:12 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: video.h,v 1.9 2023/03/25 21:47:10 andvar Exp $	*/
+/*	$NetBSD: video.h,v 1.10 2023/03/25 21:51:12 andvar Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman.
@@ -41,7 +41,7 @@ struct video {
 volatile	u_short	vd_st_rgb[16];	/* RGB for simultaneous colors	(ST)*/
 volatile	u_char	vd_st_res;	/* ST resolution		*/
 volatile	char	vd_fill1;	/* filler			*/
-volatile	u_short	vd_tt_res;	/* TT-resultion mode		*/
+volatile	u_short	vd_tt_res;	/* TT-resolution mode		*/
 volatile	u_char  vd_ste_hscroll;	/* MEGA STe hor bitwise scroll	*/
 volatile	u_short vd_fal_res;	/* Falcon resolution		*/
 volatile	charvd_fill2[23];



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

2023-01-27 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jan 27 20:05:04 UTC 2023

Modified Files:
src/sys/arch/atari/include: bus_defs.h

Log Message:
Remove extra tabs.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/atari/include/bus_defs.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/atari/include/bus_defs.h
diff -u src/sys/arch/atari/include/bus_defs.h:1.2 src/sys/arch/atari/include/bus_defs.h:1.3
--- src/sys/arch/atari/include/bus_defs.h:1.2	Mon Sep 23 16:17:55 2019
+++ src/sys/arch/atari/include/bus_defs.h	Fri Jan 27 20:05:03 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_defs.h,v 1.2 2019/09/23 16:17:55 skrll Exp $	*/
+/*	$NetBSD: bus_defs.h,v 1.3 2023/01/27 20:05:03 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -191,7 +191,7 @@ struct atari_bus_space {
 			bus_size_t, uint32_t);
 	void		(*abs_ws_8)(bus_space_tag_t, bus_space_handle_t,
 			bus_size_t, uint64_t);
-	
+
 	/* write multiple */
 	void		(*abs_wm_1)(bus_space_tag_t, bus_space_handle_t,
 			bus_size_t, const uint8_t *, bus_size_t);
@@ -201,7 +201,7 @@ struct atari_bus_space {
 			bus_size_t, const uint32_t *, bus_size_t);
 	void		(*abs_wm_8)(bus_space_tag_t, bus_space_handle_t,
 			bus_size_t, const uint64_t *, bus_size_t);
-	
+
 	/* write multiple stream */
 	void		(*abs_wms_1)(bus_space_tag_t, bus_space_handle_t,
 			bus_size_t, const uint8_t *, bus_size_t);
@@ -241,7 +241,7 @@ struct atari_bus_space {
 			bus_size_t, uint32_t, bus_size_t);
 	void		(*abs_sm_8)(bus_space_tag_t, bus_space_handle_t,
 			bus_size_t, uint64_t, bus_size_t);
-	
+
 	/* set region */
 	void		(*abs_sr_1)(bus_space_tag_t, bus_space_handle_t,
 			bus_size_t, uint8_t, bus_size_t);
@@ -251,7 +251,7 @@ struct atari_bus_space {
 			bus_size_t, uint32_t, bus_size_t);
 	void		(*abs_sr_8)(bus_space_tag_t, bus_space_handle_t,
 			bus_size_t, uint64_t, bus_size_t);
-	
+
 #if 0 /* See comment on __abs_copy below */
 	/* copy */
 	void		(*abs_c_1)(bus_space_tag_t, bus_space_handle_t,



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

2023-01-27 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jan 27 20:05:04 UTC 2023

Modified Files:
src/sys/arch/atari/include: bus_defs.h

Log Message:
Remove extra tabs.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/atari/include/bus_defs.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/atari/atari

2023-01-23 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Jan 24 07:57:20 UTC 2023

Modified Files:
src/sys/arch/atari/atari: stalloc.c

Log Message:
whitespace, no code change.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/atari/atari/stalloc.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/atari/atari/stalloc.c
diff -u src/sys/arch/atari/atari/stalloc.c:1.19 src/sys/arch/atari/atari/stalloc.c:1.20
--- src/sys/arch/atari/atari/stalloc.c:1.19	Fri Jan  6 10:28:27 2023
+++ src/sys/arch/atari/atari/stalloc.c	Tue Jan 24 07:57:20 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: stalloc.c,v 1.19 2023/01/06 10:28:27 tsutsui Exp $	*/
+/*	$NetBSD: stalloc.c,v 1.20 2023/01/24 07:57:20 mlelstv Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman (Atari modifications)
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: stalloc.c,v 1.19 2023/01/06 10:28:27 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: stalloc.c,v 1.20 2023/01/24 07:57:20 mlelstv Exp $");
 
 #include 
 #include 
@@ -219,7 +219,7 @@ free_stmem(void *mem)
 			} else {
 TAILQ_INSERT_HEAD(&free_list,mn,free_link);
 			}
-mn->type = MNODE_FREE;
+			mn->type = MNODE_FREE;
 		}
 		stmem_total += mn->size;/* add our helpings to the pool. */
 	}



CVS commit: src/sys/arch/atari/atari

2023-01-23 Thread Michael van Elst
Module Name:src
Committed By:   mlelstv
Date:   Tue Jan 24 07:57:20 UTC 2023

Modified Files:
src/sys/arch/atari/atari: stalloc.c

Log Message:
whitespace, no code change.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/atari/atari/stalloc.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/atari

2023-01-06 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jan  6 10:28:28 UTC 2023

Modified Files:
src/sys/arch/atari/atari: atari_init.c autoconf.c be_bus.c bus.c
device.h genassym.cf intr.c le_bus.c locore.s mainbus.c
pmap_bootstrap.c stalloc.c stalloc.h trap.c vectors.s
src/sys/arch/atari/conf: majors.atari
src/sys/arch/atari/dev: atari5380.c dma.c fd.c font_8x16.c font_8x8.c
grf.c grf_etreg.h grfabs.c grfabs_et.c grfabs_fal.c grfabs_fal.h
grfabs_reg.h grfabs_tt.c grfioctl.h grfvar.h hdfd.c hdfd_intr.s
hdfdreg.h ite.c ite_cc.c ite_et.c itevar.h kbd.c kbdmap.c lpt.c
md_root.c ncr5380.c ncr5380reg.h ncr5380var.h nvram.c ser.c view.c
viewioctl.h wdc_mb.c wskbdmap_atari.c zs.c zsvar.h
src/sys/arch/atari/include: cpu.h pmap.h vmparam.h
src/sys/arch/atari/isa: fdcisa.c isa_hades.c
src/sys/arch/atari/pci: pci_machdep.c pci_milan.c pci_tseng.c pci_vga.c
src/sys/arch/atari/vme: et4000.c if_le_vme.c leo.c vmevar.h

Log Message:
TAB/spaces/indents cleanup.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/atari/atari/atari_init.c
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/atari/atari/autoconf.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/atari/atari/be_bus.c
cvs rdiff -u -r1.67 -r1.68 src/sys/arch/atari/atari/bus.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/atari/atari/device.h
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/atari/atari/genassym.cf
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/atari/atari/intr.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/atari/atari/le_bus.c
cvs rdiff -u -r1.116 -r1.117 src/sys/arch/atari/atari/locore.s
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/atari/atari/mainbus.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/atari/atari/pmap_bootstrap.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/atari/atari/stalloc.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/atari/atari/stalloc.h
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/atari/atari/trap.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/atari/atari/vectors.s
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/atari/conf/majors.atari
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/atari/dev/atari5380.c
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/atari/dev/dma.c \
src/sys/arch/atari/dev/grfabs_fal.c
cvs rdiff -u -r1.94 -r1.95 src/sys/arch/atari/dev/fd.c
cvs rdiff -u -r1.5 -r1.6 src/sys/arch/atari/dev/font_8x16.c \
src/sys/arch/atari/dev/grfabs_fal.h \
src/sys/arch/atari/dev/wskbdmap_atari.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/atari/dev/font_8x8.c
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/atari/dev/grf.c
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/atari/dev/grf_etreg.h
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/atari/dev/grfabs.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/atari/dev/grfabs_et.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/atari/dev/grfabs_reg.h \
src/sys/arch/atari/dev/grfvar.h
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/atari/dev/grfabs_tt.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/atari/dev/grfioctl.h
cvs rdiff -u -r1.91 -r1.92 src/sys/arch/atari/dev/hdfd.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/atari/dev/hdfd_intr.s
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/atari/dev/hdfdreg.h
cvs rdiff -u -r1.84 -r1.85 src/sys/arch/atari/dev/ite.c
cvs rdiff -u -r1.46 -r1.47 src/sys/arch/atari/dev/ite_cc.c
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/atari/dev/ite_et.c \
src/sys/arch/atari/dev/view.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/atari/dev/itevar.h
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/atari/dev/kbd.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/atari/dev/kbdmap.c
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/atari/dev/lpt.c
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/atari/dev/md_root.c
cvs rdiff -u -r1.77 -r1.78 src/sys/arch/atari/dev/ncr5380.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/atari/dev/ncr5380reg.h
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/atari/dev/ncr5380var.h
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/atari/dev/nvram.c
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/atari/dev/ser.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/atari/dev/viewioctl.h
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/atari/dev/wdc_mb.c
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/atari/dev/zs.c
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/atari/dev/zsvar.h
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/atari/include/cpu.h
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/atari/include/pmap.h
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/atari/include/vmparam.h
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/atari/isa/fdcisa.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/atari/isa/isa_hades.c
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/atari/pci/pci_machdep.c
cvs rdiff -u -r1.16 -r1.17 src/sys/arch/atari/pci/pci_milan.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/atari/pci/pci_tseng.c
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/atari/pci/pci_vga.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/atari/vme/et4000.c
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/atari/vme/if_le_vme.c
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/atari/vme/leo.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/at

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

2022-08-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Aug 15 04:58:52 UTC 2022

Modified Files:
src/sys/arch/atari/conf: MILAN-ISAIDE MILAN-PCIIDE

Log Message:
Regen from MILAN.in rev 1.30.

> Specify options FONT_VT220L8x16 to get similar glyphs as past font_8x16.c.


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/arch/atari/conf/MILAN-ISAIDE
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/atari/conf/MILAN-PCIIDE

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/atari/conf/MILAN-ISAIDE
diff -u src/sys/arch/atari/conf/MILAN-ISAIDE:1.98 src/sys/arch/atari/conf/MILAN-ISAIDE:1.99
--- src/sys/arch/atari/conf/MILAN-ISAIDE:1.98	Sun Aug  7 02:55:46 2022
+++ src/sys/arch/atari/conf/MILAN-ISAIDE	Mon Aug 15 04:58:52 2022
@@ -1,11 +1,11 @@
 #
-# $NetBSD: MILAN-ISAIDE,v 1.98 2022/08/07 02:55:46 simonb Exp $
+# $NetBSD: MILAN-ISAIDE,v 1.99 2022/08/15 04:58:52 tsutsui Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
-#		NetBSD: MILAN.in,v 1.29 2019/05/04 13:12:03 tsutsui Exp $
+#		NetBSD: MILAN.in,v 1.30 2022/08/15 04:40:20 tsutsui Exp $
 #		NetBSD: GENERIC.in,v 1.124 2022/08/07 02:52:24 simonb Exp $
 include "arch/atari/conf/std.milan"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
@@ -83,6 +83,7 @@ options WS_KERNEL_BG=WSCOL_BLACK
 options WSDISPLAY_COMPAT_USL # wsconscfg VT handling
 options WSDISPLAY_DEFAULTSCREENS=4
 options PCDISPLAY_SOFTCURSOR
+options FONT_VT220L8x16
 isab0 at mainbus0 # ISA-bus
 isa0 at isab0
 pcib0 at mainbus0 # PCI-bus

Index: src/sys/arch/atari/conf/MILAN-PCIIDE
diff -u src/sys/arch/atari/conf/MILAN-PCIIDE:1.102 src/sys/arch/atari/conf/MILAN-PCIIDE:1.103
--- src/sys/arch/atari/conf/MILAN-PCIIDE:1.102	Sun Aug  7 02:55:46 2022
+++ src/sys/arch/atari/conf/MILAN-PCIIDE	Mon Aug 15 04:58:52 2022
@@ -1,11 +1,11 @@
 #
-# $NetBSD: MILAN-PCIIDE,v 1.102 2022/08/07 02:55:46 simonb Exp $
+# $NetBSD: MILAN-PCIIDE,v 1.103 2022/08/15 04:58:52 tsutsui Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
-#		NetBSD: MILAN.in,v 1.29 2019/05/04 13:12:03 tsutsui Exp $
+#		NetBSD: MILAN.in,v 1.30 2022/08/15 04:40:20 tsutsui Exp $
 #		NetBSD: GENERIC.in,v 1.124 2022/08/07 02:52:24 simonb Exp $
 include "arch/atari/conf/std.milan"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
@@ -83,6 +83,7 @@ options WS_KERNEL_BG=WSCOL_BLACK
 options WSDISPLAY_COMPAT_USL # wsconscfg VT handling
 options WSDISPLAY_DEFAULTSCREENS=4
 options PCDISPLAY_SOFTCURSOR
+options FONT_VT220L8x16
 isab0 at mainbus0 # ISA-bus
 isa0 at isab0
 pcib0 at mainbus0 # PCI-bus



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

2022-08-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Aug 15 04:58:52 UTC 2022

Modified Files:
src/sys/arch/atari/conf: MILAN-ISAIDE MILAN-PCIIDE

Log Message:
Regen from MILAN.in rev 1.30.

> Specify options FONT_VT220L8x16 to get similar glyphs as past font_8x16.c.


To generate a diff of this commit:
cvs rdiff -u -r1.98 -r1.99 src/sys/arch/atari/conf/MILAN-ISAIDE
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/atari/conf/MILAN-PCIIDE

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



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

2022-08-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Aug 15 04:40:20 UTC 2022

Modified Files:
src/sys/arch/atari/conf: MILAN.in

Log Message:
Specify options FONT_VT220L8x16 to get similar glyphs as past font_8x16.c.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/atari/conf/MILAN.in

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/atari/conf/MILAN.in
diff -u src/sys/arch/atari/conf/MILAN.in:1.29 src/sys/arch/atari/conf/MILAN.in:1.30
--- src/sys/arch/atari/conf/MILAN.in:1.29	Sat May  4 13:12:03 2019
+++ src/sys/arch/atari/conf/MILAN.in	Mon Aug 15 04:40:20 2022
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: MILAN.in,v 1.29 2019/05/04 13:12:03 tsutsui Exp $
+#	$NetBSD: MILAN.in,v 1.30 2022/08/15 04:40:20 tsutsui Exp $
 #
 # Milan
 #
@@ -34,6 +34,8 @@ options 	WSDISPLAY_DEFAULTSCREENS=4
 options 	PCDISPLAY_SOFTCURSOR
 # modify the screen type of the console; defaults to "80x25"
 #options 	VGA_CONSOLE_SCREENTYPE="\"80x25\""
+# use explicit WSDISPLAY_FONTENC_IBM font that MI vga(4) assumes
+options 	FONT_VT220L8x16
 
 #
 # The following sections describe various hardware options.



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

2022-08-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Aug 15 04:40:20 UTC 2022

Modified Files:
src/sys/arch/atari/conf: MILAN.in

Log Message:
Specify options FONT_VT220L8x16 to get similar glyphs as past font_8x16.c.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/atari/conf/MILAN.in

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



CVS commit: src/sys/arch/atari/pci

2022-08-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Aug 15 04:37:47 UTC 2022

Modified Files:
src/sys/arch/atari/pci: pci_vga.c

Log Message:
Improve VGA console settings for Milan, especially for sysinst.

- use explicit WSDISPLAY_FONTENC_IBM font that MI vga(4) assumes
  (so that box drawing characters are rendered properly)
- set ATC and DAC palette settings for proper colors
  (copied from MI vga_subr.c for now because HADES doesn't use mi vga(4))

Tested on Milan with S3 Trio64.  (XXX: needs working HADES with ET4000)


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/atari/pci/pci_vga.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/atari/pci/pci_vga.c
diff -u src/sys/arch/atari/pci/pci_vga.c:1.18 src/sys/arch/atari/pci/pci_vga.c:1.19
--- src/sys/arch/atari/pci/pci_vga.c:1.18	Sat Jul 31 20:51:32 2021
+++ src/sys/arch/atari/pci/pci_vga.c	Mon Aug 15 04:37:46 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: pci_vga.c,v 1.18 2021/07/31 20:51:32 andvar Exp $	*/
+/*	$NetBSD: pci_vga.c,v 1.19 2022/08/15 04:37:46 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1999 Leo Weppelman.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pci_vga.c,v 1.18 2021/07/31 20:51:32 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_vga.c,v 1.19 2022/08/15 04:37:46 tsutsui Exp $");
 
 #include 
 #include 
@@ -55,11 +55,51 @@ extern font_info	font_info_8x8;
 extern font_info	font_info_8x16;
 
 /* Console colors */
-static const uint8_t conscolors[3][3] = {
-	/* background, foreground, hilite */
-	{ 0x00, 0x00, 0x00 },
-	{ 0x30, 0x30, 0x30 },
-	{ 0x3f, 0x3f, 0x3f }
+/* attribute controller registers */
+static const uint8_t vga_atc[] = {
+	0x00,	/* 00: internal palette  0 */
+	0x01,	/* 01: internal palette  1 */
+	0x02,	/* 02: internal palette  2 */
+	0x03,	/* 03: internal palette  3 */
+	0x04,	/* 04: internal palette  4 */
+	0x05,	/* 05: internal palette  5 */
+	0x14,	/* 06: internal palette  6 */
+	0x07,	/* 07: internal palette  7 */
+	0x38,	/* 08: internal palette  8 */
+	0x39,	/* 09: internal palette  9 */
+	0x3a,	/* 0A: internal palette 10 */
+	0x3b,	/* 0B: internal palette 11 */
+	0x3c,	/* 0C: internal palette 12 */
+	0x3d,	/* 0D: internal palette 13 */
+	0x3e,	/* 0E: internal palette 14 */
+	0x3f,	/* 0F: internal palette 15 */
+	0x0c,	/* 10: attribute mode control */
+	0x00,	/* 11: overscan color */
+	0x0f,	/* 12: color plane enable */
+	0x08,	/* 13: horizontal PEL panning */
+	0x00	/* 14: color select */
+};
+
+/* video DAC palette registers */
+/* XXX only set up 16 colors used by internal palette in ATC regsters */
+static const uint8_t vga_dacpal[] = {
+	/* R G B */
+	0x00, 0x00, 0x00,	/* BLACK*/
+	0x00, 0x00, 0x2a,	/* BLUE	*/
+	0x00, 0x2a, 0x00,	/* GREEN*/
+	0x00, 0x2a, 0x2a,	/* CYAN */
+	0x2a, 0x00, 0x00,	/* RED  */
+	0x2a, 0x00, 0x2a,	/* MAGENTA  */
+	0x2a, 0x15, 0x00,	/* BROWN*/
+	0x2a, 0x2a, 0x2a,	/* LIGHTGREY*/
+	0x15, 0x15, 0x15,	/* DARKGREY */
+	0x15, 0x15, 0x3f,	/* LIGHTBLUE*/
+	0x15, 0x3f, 0x15,	/* LIGHTGREEN   */
+	0x15, 0x3f, 0x3f,	/* LIGHTCYAN*/
+	0x3f, 0x15, 0x15,	/* LIGHTRED */
+	0x3f, 0x15, 0x3f,	/* LIGHTMAGENTA */
+	0x3f, 0x3f, 0x15,	/* YELLOW   */
+	0x3f, 0x3f, 0x3f	/* WHITE*/
 };
 
 static bus_space_tag_t	vga_iot, vga_memt;
@@ -79,7 +119,7 @@ check_for_vga(bus_space_tag_t iot, bus_s
 	pci_chipset_tag_t	pc = NULL; /* XXX */
 	bus_space_handle_t	ioh_regs, memh_fb;
 	pcitag_t		tag;
-	int			device, found, maxndevs, i, j;
+	int			device, found, maxndevs, i;
 	int			got_ioh, got_memh, rv;
 	uint32_t		id, class;
 	volatile uint8_t	*regs;
@@ -176,16 +216,23 @@ check_for_vga(bus_space_tag_t iot, bus_s
 	 * Generic parts of the initialization...
 	 */
 	
-	/* B&W colors */
-	vgaw(regs, VDAC_ADDRESS_W, 0);
-	for (i = 0; i < 256; i++) {
-		j = (i & 1) ? ((i > 7) ? 2 : 1) : 0;
-		vgaw(regs, VDAC_DATA, conscolors[j][0]);
-		vgaw(regs, VDAC_DATA, conscolors[j][1]);
-		vgaw(regs, VDAC_DATA, conscolors[j][2]);
+	/* set ATC registers */
+	for (i = 0; i < 21; i++)
+		WAttr(regs, i, vga_atc[i]);
+
+	/* set DAC palette */
+	for (i = 0; i < 16; i++) {
+		vgaw(regs, VDAC_ADDRESS_W, vga_atc[i]);
+		vgaw(regs, VDAC_DATA, vga_dacpal[i * 3 + 0]);
+		vgaw(regs, VDAC_DATA, vga_dacpal[i * 3 + 1]);
+		vgaw(regs, VDAC_DATA, vga_dacpal[i * 3 + 2]);
 	}
 
 	loadfont(regs, fb);
+#if NVGA_PCI > 0
+	/* use explicit WSDISPLAY_FONTENC_IBM font that MI vga(4) assumes */
+	vga_no_builtinfont = 1;
+#endif
 
 	/*
 	 * Clear the screen and print a message. The latter



CVS commit: src/sys/arch/atari/pci

2022-08-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Aug 15 04:37:47 UTC 2022

Modified Files:
src/sys/arch/atari/pci: pci_vga.c

Log Message:
Improve VGA console settings for Milan, especially for sysinst.

- use explicit WSDISPLAY_FONTENC_IBM font that MI vga(4) assumes
  (so that box drawing characters are rendered properly)
- set ATC and DAC palette settings for proper colors
  (copied from MI vga_subr.c for now because HADES doesn't use mi vga(4))

Tested on Milan with S3 Trio64.  (XXX: needs working HADES with ET4000)


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/atari/pci/pci_vga.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/atari/conf

2022-08-06 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sun Aug  7 02:55:46 UTC 2022

Modified Files:
src/sys/arch/atari/conf: ATARITT FALCON HADES MILAN-ISAIDE MILAN-PCIIDE
SMALL030

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/sys/arch/atari/conf/ATARITT
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/atari/conf/FALCON
cvs rdiff -u -r1.119 -r1.120 src/sys/arch/atari/conf/HADES
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/atari/conf/MILAN-ISAIDE
cvs rdiff -u -r1.101 -r1.102 src/sys/arch/atari/conf/MILAN-PCIIDE
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/atari/conf/SMALL030

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/atari/conf/ATARITT
diff -u src/sys/arch/atari/conf/ATARITT:1.124 src/sys/arch/atari/conf/ATARITT:1.125
--- src/sys/arch/atari/conf/ATARITT:1.124	Sat Jun 25 13:20:30 2022
+++ src/sys/arch/atari/conf/ATARITT	Sun Aug  7 02:55:46 2022
@@ -1,11 +1,11 @@
 #
-# $NetBSD: ATARITT,v 1.124 2022/06/25 13:20:30 tsutsui Exp $
+# $NetBSD: ATARITT,v 1.125 2022/08/07 02:55:46 simonb Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
-#		NetBSD: GENERIC.in,v 1.123 2022/06/25 13:17:04 tsutsui Exp $
+#		NetBSD: GENERIC.in,v 1.124 2022/08/07 02:52:24 simonb Exp $
 include "arch/atari/conf/std.atari"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
 makeoptions COPTS="-O2 -fno-reorder-blocks -fno-unwind-tables -fno-omit-frame-pointer" # See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for backtraces in DDB.
@@ -30,7 +30,7 @@ file-system PTYFS # /dev/pts/N support
 file-system TMPFS # Efficient memory file-system
 options WAPBL # File system journaling support
 options FFS_NO_SNAPSHOT # No FFS snapshot support
-options NFSSERVER # Network File System server side code
+options NFSSERVER # Network File System server
 options PANICWAIT # Require keystroke to dump/reboot
 options DDB # Kernel debugger
 options DDB_HISTORY_SIZE=100 # Enable history editing in DDB

Index: src/sys/arch/atari/conf/FALCON
diff -u src/sys/arch/atari/conf/FALCON:1.121 src/sys/arch/atari/conf/FALCON:1.122
--- src/sys/arch/atari/conf/FALCON:1.121	Sat Jun 25 13:20:30 2022
+++ src/sys/arch/atari/conf/FALCON	Sun Aug  7 02:55:46 2022
@@ -1,11 +1,11 @@
 #
-# $NetBSD: FALCON,v 1.121 2022/06/25 13:20:30 tsutsui Exp $
+# $NetBSD: FALCON,v 1.122 2022/08/07 02:55:46 simonb Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
-#		NetBSD: GENERIC.in,v 1.123 2022/06/25 13:17:04 tsutsui Exp $
+#		NetBSD: GENERIC.in,v 1.124 2022/08/07 02:52:24 simonb Exp $
 include "arch/atari/conf/std.atari"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
 makeoptions COPTS="-O2 -fno-reorder-blocks -fno-unwind-tables -fno-omit-frame-pointer" # See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for backtraces in DDB.
@@ -35,7 +35,7 @@ file-system PTYFS # /dev/pts/N support
 file-system TMPFS # Efficient memory file-system
 options WAPBL # File system journaling support
 options FFS_NO_SNAPSHOT # No FFS snapshot support
-options NFSSERVER # Network File System server side code
+options NFSSERVER # Network File System server
 options PANICWAIT # Require keystroke to dump/reboot
 options DDB # Kernel debugger
 options DDB_HISTORY_SIZE=100 # Enable history editing in DDB

Index: src/sys/arch/atari/conf/HADES
diff -u src/sys/arch/atari/conf/HADES:1.119 src/sys/arch/atari/conf/HADES:1.120
--- src/sys/arch/atari/conf/HADES:1.119	Sat Jun 25 13:20:30 2022
+++ src/sys/arch/atari/conf/HADES	Sun Aug  7 02:55:46 2022
@@ -1,12 +1,12 @@
 #
-# $NetBSD: HADES,v 1.119 2022/06/25 13:20:30 tsutsui Exp $
+# $NetBSD: HADES,v 1.120 2022/08/07 02:55:46 simonb Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
 #		NetBSD: HADES.in,v 1.16 2018/03/31 04:19:41 tsutsui Exp $
-#		NetBSD: GENERIC.in,v 1.123 2022/06/25 13:17:04 tsutsui Exp $
+#		NetBSD: GENERIC.in,v 1.124 2022/08/07 02:52:24 simonb Exp $
 include "arch/atari/conf/std.hades"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
 makeoptions COPTS="-O2 -fno-reorder-blocks -fno-unwind-tables -fno-omit-frame-pointer" # See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for backtraces in DDB.
@@ -34,7 +34,7 @@ file-system PTYFS # /dev/pts/N support
 file-system TMPFS # Efficient memory file-system
 options WAPBL # File system journaling support
 options FFS_NO_SNAPSHOT # No FFS snapshot support
-options NFSSERVER # Network File System server side code
+options NFSSERVER # Network File System server
 options PANICWAIT # Require keystroke to dump/reboot
 options DDB # Kernel debugger
 options DDB_HISTORY_SIZE=100 # Enable history editing in DDB

Index: src/sys/arch/atari/conf/MILAN

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

2022-08-06 Thread Simon Burge
Module Name:src
Committed By:   simonb
Date:   Sun Aug  7 02:55:46 UTC 2022

Modified Files:
src/sys/arch/atari/conf: ATARITT FALCON HADES MILAN-ISAIDE MILAN-PCIIDE
SMALL030

Log Message:
Regen.


To generate a diff of this commit:
cvs rdiff -u -r1.124 -r1.125 src/sys/arch/atari/conf/ATARITT
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/atari/conf/FALCON
cvs rdiff -u -r1.119 -r1.120 src/sys/arch/atari/conf/HADES
cvs rdiff -u -r1.97 -r1.98 src/sys/arch/atari/conf/MILAN-ISAIDE
cvs rdiff -u -r1.101 -r1.102 src/sys/arch/atari/conf/MILAN-PCIIDE
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/atari/conf/SMALL030

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



CVS commit: src/sys/arch/atari/atari

2022-07-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jul  3 16:48:03 UTC 2022

Modified Files:
src/sys/arch/atari/atari: bus.c

Log Message:
Use __func__ to print function names.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/atari/atari/bus.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/atari/atari/bus.c
diff -u src/sys/arch/atari/atari/bus.c:1.65 src/sys/arch/atari/atari/bus.c:1.66
--- src/sys/arch/atari/atari/bus.c:1.65	Sun Jul  3 16:40:29 2022
+++ src/sys/arch/atari/atari/bus.c	Sun Jul  3 16:48:03 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus.c,v 1.65 2022/07/03 16:40:29 tsutsui Exp $	*/
+/*	$NetBSD: bus.c,v 1.66 2022/07/03 16:48:03 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #include "opt_m68k_arch.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.65 2022/07/03 16:40:29 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.66 2022/07/03 16:48:03 tsutsui Exp $");
 
 #include 
 #include 
@@ -203,9 +203,9 @@ bus_space_map(bus_space_tag_t t, bus_add
 	if (error != 0) {
 		if (extent_free(iomem_ex, bpa + t->base, size,
 		EX_NOWAIT | iomem_malloc_safe)) {
-			printf("bus_space_map: pa 0x%lx, size 0x%lx\n",
-			bpa, size);
-			printf("bus_space_map: can't free region\n");
+			printf("%s: pa 0x%lx, size 0x%lx\n",
+			__func__, bpa, size);
+			printf("%s: can't free region\n", __func__);
 		}
 	}
 	return error;
@@ -227,7 +227,7 @@ bus_space_alloc(bus_space_tag_t t, bus_a
 	 */
 	if ((rstart + t->base) < iomem_ex->ex_start ||
 	(rend + t->base) > iomem_ex->ex_end)
-		panic("bus_space_alloc: bad region start/end");
+		panic("%s: bad region start/end", __func__);
 #endif /* DIAGNOSTIC */
 
 	/*
@@ -247,9 +247,9 @@ bus_space_alloc(bus_space_tag_t t, bus_a
 	if (error != 0) {
 		if (extent_free(iomem_ex, bpa, size,
 		EX_NOWAIT | iomem_malloc_safe) != 0) {
-			printf("bus_space_alloc: pa 0x%lx, size 0x%lx\n",
-			bpa, size);
-			printf("bus_space_alloc: can't free region\n");
+			printf("%s: pa 0x%lx, size 0x%lx\n",
+			__func__, bpa, size);
+			printf("%s: can't free region\n", __func__);
 		}
 	}
 
@@ -270,7 +270,7 @@ bus_mem_add_mapping(bus_space_tag_t t, b
 
 #ifdef DIAGNOSTIC
 	if (endpa <= pa)
-		panic("bus_mem_add_mapping: overflow");
+		panic("%s: overflow", __func__);
 #endif
 
 	if (kernel_map == NULL) {
@@ -323,7 +323,7 @@ bus_space_unmap(bus_space_tag_t t, bus_s
 	endva = m68k_round_page(((char *)bsh + size) - 1);
 #ifdef DIAGNOSTIC
 	if (endva < va)
-		panic("unmap_iospace: overflow");
+		panic("%s: overflow", __func__);
 #endif
 
 	(void)pmap_extract(pmap_kernel(), va, &bpa);
@@ -343,8 +343,8 @@ bus_space_unmap(bus_space_tag_t t, bus_s
 	 */
 	if (extent_free(iomem_ex, bpa, size, EX_NOWAIT | iomem_malloc_safe)
 	!= 0) {
-		printf("bus_space_unmap: pa 0x%lx, size 0x%lx\n", bpa, size);
-		printf("bus_space_unmap: can't free region\n");
+		printf("%s: pa 0x%lx, size 0x%lx\n", __func__, bpa, size);
+		printf("%s: can't free region\n", __func__);
 	}
 }
 
@@ -494,7 +494,7 @@ _bus_dmamap_load_mbuf(bus_dma_tag_t t, b
 
 #ifdef DIAGNOSTIC
 	if ((m0->m_flags & M_PKTHDR) == 0)
-		panic("_bus_dmamap_load_mbuf: no packet header");
+		panic("%s: no packet header", __func__);
 #endif
 
 	if (m0->m_pkthdr.len > map->_dm_size)
@@ -573,7 +573,7 @@ _bus_dmamap_load_raw(bus_dma_tag_t t, bu
 bus_dma_segment_t *segs, int nsegs, bus_size_t size, int flags)
 {
 
-	panic("bus_dmamap_load_raw: not implemented");
+	panic("%s: not implemented", __func__);
 }
 
 /*
@@ -871,7 +871,7 @@ bus_dmamem_map(bus_dma_tag_t t, bus_dma_
 		addr < (segs[curseg].ds_addr + segs[curseg].ds_len);
 		addr += PAGE_SIZE, va += PAGE_SIZE, size -= PAGE_SIZE) {
 			if (size == 0)
-panic("_bus_dmamem_map: size botch");
+panic("%s: size botch", __func__);
 			pmap_enter(pmap_kernel(), va, addr - offset,
 			VM_PROT_READ | VM_PROT_WRITE,
 			VM_PROT_READ | VM_PROT_WRITE);
@@ -892,7 +892,7 @@ bus_dmamem_unmap(bus_dma_tag_t t, void *
 
 #ifdef DIAGNOSTIC
 	if ((vaddr_t)kva & PGOFSET)
-		panic("_bus_dmamem_unmap");
+		panic("%s", __func__);
 #endif
 
 	size = round_page(size);
@@ -917,12 +917,12 @@ bus_dmamem_mmap(bus_dma_tag_t t, bus_dma
 	for (i = 0; i < nsegs; i++) {
 #ifdef DIAGNOSTIC
 		if ((off & PGOFSET) != 0)
-			panic("_bus_dmamem_mmap: offset unaligned");
+			panic("%s: offset unaligned", __func__);
 		if ((segs[i].ds_addr & PGOFSET) != 0)
-			panic("_bus_dmamem_mmap: segment unaligned");
+			panic("%s: segment unaligned", __func__);
 		if ((segs[i].ds_len & PGOFSET) != 0)
-			panic("_bus_dmamem_mmap: segment size not multiple"
-			" of page size");
+			panic("%s: segment size not multiple of page size",
+			__func__);
 #endif
 		if (off >= segs[i].ds_len) {
 			off -= segs[i].ds_len;
@@ -1071,7 +1071,7 @@ bus_dmamem_alloc_range(bus_dma_tag_t t, 
 		if (curaddr < low || curaddr >

CVS commit: src/sys/arch/atari/atari

2022-07-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jul  3 16:48:03 UTC 2022

Modified Files:
src/sys/arch/atari/atari: bus.c

Log Message:
Use __func__ to print function names.


To generate a diff of this commit:
cvs rdiff -u -r1.65 -r1.66 src/sys/arch/atari/atari/bus.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/atari/atari

2022-07-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jul  3 16:40:29 UTC 2022

Modified Files:
src/sys/arch/atari/atari: bus.c

Log Message:
Use proper TAILQ(3) macro as other bus_dma(9) implementation.

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/atari/atari/bus.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/atari/atari

2022-07-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jul  3 16:40:29 UTC 2022

Modified Files:
src/sys/arch/atari/atari: bus.c

Log Message:
Use proper TAILQ(3) macro as other bus_dma(9) implementation.

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/atari/atari/bus.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/atari/atari/bus.c
diff -u src/sys/arch/atari/atari/bus.c:1.64 src/sys/arch/atari/atari/bus.c:1.65
--- src/sys/arch/atari/atari/bus.c:1.64	Sun Jul  3 16:33:31 2022
+++ src/sys/arch/atari/atari/bus.c	Sun Jul  3 16:40:29 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus.c,v 1.64 2022/07/03 16:33:31 tsutsui Exp $	*/
+/*	$NetBSD: bus.c,v 1.65 2022/07/03 16:40:29 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #include "opt_m68k_arch.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.64 2022/07/03 16:33:31 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.65 2022/07/03 16:40:29 tsutsui Exp $");
 
 #include 
 #include 
@@ -1058,14 +1058,14 @@ bus_dmamem_alloc_range(bus_dma_tag_t t, 
 	 * Compute the location, size, and number of segments actually
 	 * returned by the VM code.
 	 */
-	m = mlist.tqh_first;
+	m = TAILQ_FIRST(&mlist);
 	curseg = 0;
 	lastaddr = VM_PAGE_TO_PHYS(m);
 	segs[curseg].ds_addr = lastaddr + offset;
 	segs[curseg].ds_len = PAGE_SIZE;
-	m = m->pageq.queue.tqe_next;
+	m = TAILQ_NEXT(m, pageq.queue);
 
-	for (; m != NULL; m = m->pageq.queue.tqe_next) {
+	for (; m != NULL; m = TAILQ_NEXT(m, pageq.queue)) {
 		curaddr = VM_PAGE_TO_PHYS(m);
 #ifdef DIAGNOSTIC
 		if (curaddr < low || curaddr >= high) {



CVS commit: src/sys/arch/atari/atari

2022-07-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jul  3 16:33:31 UTC 2022

Modified Files:
src/sys/arch/atari/atari: bus.c

Log Message:
Misc KNF.  No binary change.


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

2022-07-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jul  3 16:33:31 UTC 2022

Modified Files:
src/sys/arch/atari/atari: bus.c

Log Message:
Misc KNF.  No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/atari/atari/bus.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/atari/atari/bus.c
diff -u src/sys/arch/atari/atari/bus.c:1.63 src/sys/arch/atari/atari/bus.c:1.64
--- src/sys/arch/atari/atari/bus.c:1.63	Sun Jul  3 16:03:08 2022
+++ src/sys/arch/atari/atari/bus.c	Sun Jul  3 16:33:31 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus.c,v 1.63 2022/07/03 16:03:08 tsutsui Exp $	*/
+/*	$NetBSD: bus.c,v 1.64 2022/07/03 16:33:31 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #include "opt_m68k_arch.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.63 2022/07/03 16:03:08 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.64 2022/07/03 16:33:31 tsutsui Exp $");
 
 #include 
 #include 
@@ -61,10 +61,6 @@ static long iomem_ex_storage[EXTENT_FIXE
 static struct extent *iomem_ex;
 static int iomem_malloc_safe = 0;
 
-int  bus_dmamem_alloc_range(bus_dma_tag_t tag, bus_size_t size,
-		bus_size_t alignment, bus_size_t boundary,
-		bus_dma_segment_t *segs, int nsegs, int *rsegs, int flags,
-		paddr_t low, paddr_t high);
 static int  _bus_dmamap_load_buffer(bus_dma_tag_t tag, bus_dmamap_t,
 		void *, bus_size_t, struct vmspace *, int, paddr_t *,
 		int *, int);
@@ -94,6 +90,7 @@ static int	bootm_free(vaddr_t va, u_long
 void
 bootm_init(vaddr_t va, void *ptep, vsize_t size)
 {
+
 	bootm_ex = extent_create("bootmem", va, va + size,
 	(void *)bootm_ex_storage, sizeof(bootm_ex_storage),
 	EX_NOCOALESCE|EX_NOWAIT);
@@ -107,7 +104,7 @@ bootm_alloc(paddr_t pa, u_long size, int
 	pt_entry_t	pg_proto;
 	vaddr_t		va, rva;
 
-	if (extent_alloc(bootm_ex, size, PAGE_SIZE, 0, EX_NOWAIT, &rva)) {
+	if (extent_alloc(bootm_ex, size, PAGE_SIZE, 0, EX_NOWAIT, &rva) != 0) {
 		printf("bootm_alloc fails! Not enough fixed extents?\n");
 		printf("Requested extent: pa=%lx, size=%lx\n",
 		(u_long)pa, size);
@@ -118,7 +115,7 @@ bootm_alloc(paddr_t pa, u_long size, int
 	epg = &pg[btoc(size)];
 	va  = rva;
 	pg_proto = pa | PG_RW | PG_V;
-	if (!(flags & BUS_SPACE_MAP_CACHEABLE))
+	if ((flags & BUS_SPACE_MAP_CACHEABLE) == 0)
 		pg_proto |= PG_CI;
 	while (pg < epg) {
 		*pg++ = pg_proto;
@@ -199,11 +196,11 @@ bus_space_map(bus_space_tag_t t, bus_add
 	error = extent_alloc_region(iomem_ex, bpa + t->base, size,
 			EX_NOWAIT | iomem_malloc_safe);
 
-	if (error)
+	if (error != 0)
 		return error;
 
 	error = bus_mem_add_mapping(t, bpa, size, flags, mhp);
-	if (error) {
+	if (error != 0) {
 		if (extent_free(iomem_ex, bpa + t->base, size,
 		EX_NOWAIT | iomem_malloc_safe)) {
 			printf("bus_space_map: pa 0x%lx, size 0x%lx\n",
@@ -240,16 +237,16 @@ bus_space_alloc(bus_space_tag_t t, bus_a
 	rend + t->base, size, alignment, boundary,
 	EX_FAST | EX_NOWAIT | iomem_malloc_safe, &bpa);
 
-	if (error)
+	if (error != 0)
 		return error;
 
 	/*
 	 * Map the bus physical address to a kernel virtual address.
 	 */
 	error = bus_mem_add_mapping(t, bpa, size, flags, bshp);
-	if (error) {
+	if (error != 0) {
 		if (extent_free(iomem_ex, bpa, size,
-		EX_NOWAIT | iomem_malloc_safe)) {
+		EX_NOWAIT | iomem_malloc_safe) != 0) {
 			printf("bus_space_alloc: pa 0x%lx, size 0x%lx\n",
 			bpa, size);
 			printf("bus_space_alloc: can't free region\n");
@@ -296,7 +293,7 @@ bus_mem_add_mapping(bus_space_tag_t t, b
 	*bshp = va + (bpa & PGOFSET);
 
 	for (; pa < endpa; pa += PAGE_SIZE, va += PAGE_SIZE) {
-		u_int	*ptep, npte;
+		pt_entry_t *ptep, npte;
 
 		pmap_enter(pmap_kernel(), (vaddr_t)va, pa,
 		VM_PROT_READ|VM_PROT_WRITE, VM_PROT_READ|VM_PROT_WRITE);
@@ -330,7 +327,7 @@ bus_space_unmap(bus_space_tag_t t, bus_s
 #endif
 
 	(void)pmap_extract(pmap_kernel(), va, &bpa);
-	bpa += ((u_long)bsh & PGOFSET);
+	bpa += ((paddr_t)bsh & PGOFSET);
 
 	/*
 	 * Free the kernel virtual mapping.
@@ -344,7 +341,8 @@ bus_space_unmap(bus_space_tag_t t, bus_s
 	/*
 	 * Mark as free in the extent map.
 	 */
-	if (extent_free(iomem_ex, bpa, size, EX_NOWAIT | iomem_malloc_safe)) {
+	if (extent_free(iomem_ex, bpa, size, EX_NOWAIT | iomem_malloc_safe)
+	!= 0) {
 		printf("bus_space_unmap: pa 0x%lx, size 0x%lx\n", bpa, size);
 		printf("bus_space_unmap: can't free region\n");
 	}
@@ -380,6 +378,7 @@ bus_space_mmap(bus_space_tag_t t, bus_ad
 static size_t
 _bus_dmamap_mapsize(int const nsegments)
 {
+
 	KASSERT(nsegments > 0); 
 	return sizeof(struct atari_bus_dmamap) +
 	(sizeof(bus_dma_segment_t) * (nsegments - 1));
@@ -409,7 +408,7 @@ _bus_dmamap_create(bus_dma_tag_t t, bus_
 	 * the (nsegments - 1).
 	 */
 	if ((mapstore = kmem_zalloc(_bus_dmamap_mapsize(nsegments),
-	(flags & BUS_DMA_NOWAIT) ? KM_NOSLEEP : KM_SLEEP)) == NULL)
+	   

CVS commit: src/sys/arch/atari/stand/installboot

2022-07-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jul  3 16:16:50 UTC 2022

Modified Files:
src/sys/arch/atari/stand/installboot: Makefile installboot.c

Log Message:
Fix inverted logic.  My fault back in 2015..


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/atari/stand/installboot/Makefile
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/atari/stand/installboot/installboot.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/atari/stand/installboot/Makefile
diff -u src/sys/arch/atari/stand/installboot/Makefile:1.10 src/sys/arch/atari/stand/installboot/Makefile:1.11
--- src/sys/arch/atari/stand/installboot/Makefile:1.10	Wed May 11 10:36:52 2022
+++ src/sys/arch/atari/stand/installboot/Makefile	Sun Jul  3 16:16:50 2022
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.10 2022/05/11 10:36:52 rin Exp $
+#	$NetBSD: Makefile,v 1.11 2022/07/03 16:16:50 tsutsui Exp $
 
 WARNS=	4
 PROG=	installboot
@@ -6,7 +6,7 @@ NOMAN=	# defined
 SRCS=	installboot.c disklabel.c
 BINDIR=	/usr/mdec
 .ifndef SMALLPROG
-CPPFLAGS+=	-DCHECK_OS_BOOTVERSION -DNO_USAGE -DSUPPORT_FD
+CPPFLAGS+=	-DCHECK_OS_BOOTVERSION -DUSAGE -DSUPPORT_FD
 LDADD=	-lkvm
 .endif
 

Index: src/sys/arch/atari/stand/installboot/installboot.c
diff -u src/sys/arch/atari/stand/installboot/installboot.c:1.38 src/sys/arch/atari/stand/installboot/installboot.c:1.39
--- src/sys/arch/atari/stand/installboot/installboot.c:1.38	Wed May 11 10:31:12 2022
+++ src/sys/arch/atari/stand/installboot/installboot.c	Sun Jul  3 16:16:50 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: installboot.c,v 1.38 2022/05/11 10:31:12 rin Exp $	*/
+/*	$NetBSD: installboot.c,v 1.39 2022/07/03 16:16:50 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Waldi Ravens
@@ -86,7 +86,7 @@ usage(void)
 {
 	fprintf(stderr,
 		"usage: installboot [options] device\n"
-#ifndef NO_USAGE
+#ifdef USAGE
 		"where options are:\n"
 		"\t-N  do not actually write anything on the disk\n"
 		"\t-m  use Milan boot blocks\n"



CVS commit: src/sys/arch/atari/stand/installboot

2022-07-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jul  3 16:16:50 UTC 2022

Modified Files:
src/sys/arch/atari/stand/installboot: Makefile installboot.c

Log Message:
Fix inverted logic.  My fault back in 2015..


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/atari/stand/installboot/Makefile
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/atari/stand/installboot/installboot.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/atari

2022-07-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jul  3 16:03:08 UTC 2022

Modified Files:
src/sys/arch/atari/atari: atari_init.c bus.c machdep.c
src/sys/arch/atari/include: bus_funcs.h

Log Message:
Move the iomem extent stuff managed by bus_space(9) and make them static.

Inspired by MD bus_space(9) implemantation of arc.
Briefly tested on TT030.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/arch/atari/atari/atari_init.c
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/atari/atari/bus.c
cvs rdiff -u -r1.187 -r1.188 src/sys/arch/atari/atari/machdep.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/atari/include/bus_funcs.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/atari

2022-07-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jul  3 16:03:08 UTC 2022

Modified Files:
src/sys/arch/atari/atari: atari_init.c bus.c machdep.c
src/sys/arch/atari/include: bus_funcs.h

Log Message:
Move the iomem extent stuff managed by bus_space(9) and make them static.

Inspired by MD bus_space(9) implemantation of arc.
Briefly tested on TT030.


To generate a diff of this commit:
cvs rdiff -u -r1.105 -r1.106 src/sys/arch/atari/atari/atari_init.c
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/atari/atari/bus.c
cvs rdiff -u -r1.187 -r1.188 src/sys/arch/atari/atari/machdep.c
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/atari/include/bus_funcs.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/atari/atari/atari_init.c
diff -u src/sys/arch/atari/atari/atari_init.c:1.105 src/sys/arch/atari/atari/atari_init.c:1.106
--- src/sys/arch/atari/atari/atari_init.c:1.105	Sat Jun 25 13:17:04 2022
+++ src/sys/arch/atari/atari/atari_init.c	Sun Jul  3 16:03:08 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: atari_init.c,v 1.105 2022/06/25 13:17:04 tsutsui Exp $	*/
+/*	$NetBSD: atari_init.c,v 1.106 2022/07/03 16:03:08 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -33,7 +33,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.105 2022/06/25 13:17:04 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.106 2022/07/03 16:03:08 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mbtype.h"
@@ -58,6 +58,7 @@ __KERNEL_RCSID(0, "$NetBSD: atari_init.c
 #include 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -110,21 +111,6 @@ static u_int milan_probe_bank(paddr_t pa
 #endif
 
 /*
- * Extent maps to manage all memory space, including I/O ranges.  Allocate
- * storage for 16 regions in each, initially.  Later, iomem_malloc_safe
- * will indicate that it's safe to use malloc() to dynamically allocate
- * region descriptors.
- * This means that the fixed static storage is only used for registrating
- * the found memory regions and the bus-mapping of the console.
- *
- * The extent maps are not static!  They are used for bus address space
- * allocation.
- */
-static long iomem_ex_storage[EXTENT_FIXED_STORAGE_SIZE(16) / sizeof(long)];
-struct extent *iomem_ex;
-int iomem_malloc_safe;
-
-/*
  * All info needed to generate a panic dump. All fields are setup by
  * start_c().
  * XXX: Should sheck usage of phys_segs. There is some unwanted overlap
@@ -685,25 +671,13 @@ start_c(int id, u_int ttphystart, u_int 
 	init_stmem();
 
 	/*
-	 * Initialize the I/O mem extent map.
-	 * Note: we don't have to check the return value since
-	 * creation of a fixed extent map will never fail (since
-	 * descriptor storage has already been allocated).
-	 *
-	 * N.B. The iomem extent manages _all_ physical addresses
-	 * on the machine.  When the amount of RAM is found, all
-	 * extents of RAM are allocated from the map.
-	 */
-	iomem_ex = extent_create("iomem", 0x0, 0x,
-	(void *)iomem_ex_storage, sizeof(iomem_ex_storage),
-	EX_NOCOALESCE|EX_NOWAIT);
-
-	/*
-	 * Allocate the physical RAM from the extent map
+	 * Initialize the iomem extent for bus_space(9) to manage address
+	 * spaces and allocate the physical RAM from the extent map.
 	 */
+	atari_bus_space_extent_init(0x0, 0x);
 	for (i = 0; i < NMEM_SEGS && boot_segs[i].end != 0; i++) {
-		if (extent_alloc_region(iomem_ex, boot_segs[i].start,
-		boot_segs[i].end - boot_segs[i].start, EX_NOWAIT)) {
+		if (atari_bus_space_alloc_physmem(boot_segs[i].start,
+		boot_segs[i].end)) {
 			/* XXX: Ahum, should not happen ;-) */
 			printf("Warning: Cannot allocate boot memory from"
 			" extent map!?\n");
@@ -973,7 +947,6 @@ map_io_areas(paddr_t ptpa, psize_t ptsiz
 	/* ptsize:	 Size of 'pt' in bytes		*/
 	/* ptextra:	 #of additional I/O pte's	*/
 {
-	extern void	bootm_init(vaddr_t, pt_entry_t *, u_long);
 	vaddr_t		ioaddr;
 	pt_entry_t	*pt, *pg, *epg;
 	pt_entry_t	pg_proto;

Index: src/sys/arch/atari/atari/bus.c
diff -u src/sys/arch/atari/atari/bus.c:1.62 src/sys/arch/atari/atari/bus.c:1.63
--- src/sys/arch/atari/atari/bus.c:1.62	Tue May 24 19:55:10 2022
+++ src/sys/arch/atari/atari/bus.c	Sun Jul  3 16:03:08 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus.c,v 1.62 2022/05/24 19:55:10 andvar Exp $	*/
+/*	$NetBSD: bus.c,v 1.63 2022/07/03 16:03:08 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
 #include "opt_m68k_arch.h"
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.62 2022/05/24 19:55:10 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.63 2022/07/03 16:03:08 tsutsui Exp $");
 
 #include 
 #include 
@@ -49,6 +49,18 @@ __KERNEL_RCSID(0, "$NetBSD: bus.c,v 1.62
 #define	_ATARI_BUS_DMA_PRIVATE
 #include 
 
+/*
+ * Extent maps to manage all memory space, including I/O ranges.  Allocate
+ * storage for 16 regions in each, initially.  Later, iomem_malloc_safe
+ * will indicate that 

CVS commit: src/sys/arch/atari/vme

2022-07-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jul  3 15:25:54 UTC 2022

Modified Files:
src/sys/arch/atari/vme: et4000.c leo.c

Log Message:
Make local cdevsw functions static.

XXX: there is no config file that has leo(4) (though it still compiles)


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/atari/vme/et4000.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/atari/vme/leo.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/atari/vme/et4000.c
diff -u src/sys/arch/atari/vme/et4000.c:1.26 src/sys/arch/atari/vme/et4000.c:1.27
--- src/sys/arch/atari/vme/et4000.c:1.26	Fri Jul 25 08:10:32 2014
+++ src/sys/arch/atari/vme/et4000.c	Sun Jul  3 15:25:54 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: et4000.c,v 1.26 2014/07/25 08:10:32 dholland Exp $	*/
+/*	$NetBSD: et4000.c,v 1.27 2022/07/03 15:25:54 tsutsui Exp $	*/
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
  * All rights reserved.
@@ -45,7 +45,7 @@
 */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: et4000.c,v 1.26 2014/07/25 08:10:32 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: et4000.c,v 1.27 2022/07/03 15:25:54 tsutsui Exp $");
 
 #include 
 #include 
@@ -130,12 +130,12 @@ struct et4k_softc {
 CFATTACH_DECL_NEW(et4k, sizeof(struct et4k_softc),
 et4k_vme_match, et4k_vme_attach, NULL, NULL);
 
-dev_type_open(et4kopen);
-dev_type_close(et4kclose);
-dev_type_read(et4kread);
-dev_type_write(et4kwrite);
-dev_type_ioctl(et4kioctl);
-dev_type_mmap(et4kmmap);
+static dev_type_open(et4kopen);
+static dev_type_close(et4kclose);
+static dev_type_read(et4kread);
+static dev_type_write(et4kwrite);
+static dev_type_ioctl(et4kioctl);
+static dev_type_mmap(et4kmmap);
 
 const struct cdevsw et4k_cdevsw = {
 	.d_open = et4kopen,

Index: src/sys/arch/atari/vme/leo.c
diff -u src/sys/arch/atari/vme/leo.c:1.22 src/sys/arch/atari/vme/leo.c:1.23
--- src/sys/arch/atari/vme/leo.c:1.22	Wed Feb  1 14:33:10 2017
+++ src/sys/arch/atari/vme/leo.c	Sun Jul  3 15:25:54 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: leo.c,v 1.22 2017/02/01 14:33:10 christos Exp $	*/
+/*	$NetBSD: leo.c,v 1.23 2022/07/03 15:25:54 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997 maximum entropy 
@@ -47,7 +47,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: leo.c,v 1.22 2017/02/01 14:33:10 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: leo.c,v 1.23 2022/07/03 15:25:54 tsutsui Exp $");
 
 #include 
 #include 
@@ -101,11 +101,11 @@ static int leo_scroll(struct leo_softc *
 CFATTACH_DECL_NEW(leo, sizeof(struct leo_softc),
 leo_match, leo_attach, NULL, NULL);
 
-dev_type_open(leoopen);
-dev_type_close(leoclose);
-dev_type_read(leomove);
-dev_type_ioctl(leoioctl);
-dev_type_mmap(leommap);
+static dev_type_open(leoopen);
+static dev_type_close(leoclose);
+static dev_type_read(leomove);
+static dev_type_ioctl(leoioctl);
+static dev_type_mmap(leommap);
 
 const struct cdevsw leo_cdevsw = {
 	.d_open = leoopen,



CVS commit: src/sys/arch/atari/vme

2022-07-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jul  3 15:25:54 UTC 2022

Modified Files:
src/sys/arch/atari/vme: et4000.c leo.c

Log Message:
Make local cdevsw functions static.

XXX: there is no config file that has leo(4) (though it still compiles)


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/atari/vme/et4000.c
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/atari/vme/leo.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/atari/dev

2022-07-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jul  2 14:29:04 UTC 2022

Modified Files:
src/sys/arch/atari/dev: nvram.c nvramvar.h

Log Message:
Use aprint_*(9) for attach messages and misc KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/atari/dev/nvram.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/atari/dev/nvramvar.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/atari/dev/nvram.c
diff -u src/sys/arch/atari/dev/nvram.c:1.21 src/sys/arch/atari/dev/nvram.c:1.22
--- src/sys/arch/atari/dev/nvram.c:1.21	Sat Jan 20 19:33:53 2018
+++ src/sys/arch/atari/dev/nvram.c	Sat Jul  2 14:29:04 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: nvram.c,v 1.21 2018/01/20 19:33:53 tsutsui Exp $	*/
+/*	$NetBSD: nvram.c,v 1.22 2022/07/02 14:29:04 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: nvram.c,v 1.21 2018/01/20 19:33:53 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nvram.c,v 1.22 2022/07/02 14:29:04 tsutsui Exp $");
 
 #include 
 #include 
@@ -74,20 +74,21 @@ CFATTACH_DECL_NEW(nvr, sizeof(struct nvr
 nvr_match, nvr_attach, NULL, NULL);
 
 /*ARGSUSED*/
-static	int
+static int
 nvr_match(device_t parent, cfdata_t cf, void *aux)
 {
+
 	if (!strcmp((char *)aux, "nvr"))
-		return (1);
-	return (0);
+		return 1;
+	return 0;
 }
 
 /*ARGSUSED*/
 static void
 nvr_attach(device_t parent, device_t self, void *aux)
 {
-	struct nvr_softc	*sc;
-	int			nreg;
+	struct nvr_softc *sc;
+	int nreg;
 	
 	/*
 	 * Check the validity of the NVram contents
@@ -95,7 +96,7 @@ nvr_attach(device_t parent, device_t sel
 	/* XXX: Milan's firmware seems to use different check method */
 	if ((machineid & ATARI_MILAN) == 0) {
 		if (!nvram_csum_valid(nvram_csum())) {
-			printf(": Invalid checksum - re-initialized");
+			aprint_error(": Invalid checksum - re-initialized");
 			for (nreg = MC_NVRAM_START; nreg < MC_NVRAM_CSUM;
 			nreg++)
 mc146818_write(RTC, nreg, 0);
@@ -105,7 +106,7 @@ nvr_attach(device_t parent, device_t sel
 	sc = device_private(self);
 	sc->sc_dev = self;
 	sc->sc_flags = NVR_CONFIGURED;
-	printf("\n");
+	aprint_normal("\n");
 }
 /*
  * End of auto config stuff
@@ -119,14 +120,14 @@ int
 nvr_get_byte(int byteno)
 {
 #if NNVR > 0
-	struct nvr_softc	*sc;
+	struct nvr_softc *sc;
 
 	sc = device_lookup_private(&nvr_cd, 0);
-	if (!(sc->sc_flags & NVR_CONFIGURED))
-		return(NVR_INVALID);
-	return (mc146818_read(RTC, byteno + MC_NVRAM_START) & 0xff);
+	if ((sc->sc_flags & NVR_CONFIGURED) == 0)
+		return NVR_INVALID;
+	return mc146818_read(RTC, byteno + MC_NVRAM_START) & 0xff;
 #else
-	return(NVR_INVALID);
+	return NVR_INVALID;
 #endif /* NNVR > 0 */
 }
 
@@ -135,60 +136,61 @@ nvr_get_byte(int byteno)
 int
 nvram_uio(struct uio *uio)
 {
-	int			i;
-	off_t			offset;
-	int			nleft;
-	u_char			buf[MC_NVRAM_CSUM - MC_NVRAM_START + 1];
-	u_char			*p;
-	struct nvr_softc	*sc;
+	int i;
+	off_t offset;
+	int nleft;
+	uint8_t buf[MC_NVRAM_CSUM - MC_NVRAM_START + 1];
+	uint8_t *p;
+	struct nvr_softc *sc;
 
 	sc = device_lookup_private(&nvr_cd,0);
-	if (!(sc->sc_flags & NVR_CONFIGURED))
+	if ((sc->sc_flags & NVR_CONFIGURED) == 0)
 		return ENXIO;
 
 	DPRINTF(("Request to transfer %d bytes offset: %d, %s nvram\n",
-(long)uio->uio_resid, (long)uio->uio_offset,
-(uio->uio_rw == UIO_READ) ? "from" : "to"));
+	(long)uio->uio_resid, (long)uio->uio_offset,
+	(uio->uio_rw == UIO_READ) ? "from" : "to"));
 
 	offset = uio->uio_offset + MC_NVRAM_START;
 	nleft  = uio->uio_resid;
 	if (offset + nleft >= MC_NVRAM_CSUM) {
 		if (offset == MC_NVRAM_CSUM)
-			return (0);
+			return 0;
 		nleft = MC_NVRAM_CSUM - offset;
 		if (nleft <= 0)
-			return (EINVAL);
+			return EINVAL;
 	}
 	DPRINTF(("Translated: offset = %d, bytes: %d\n", (long)offset, nleft));
 
 	if (uio->uio_rw == UIO_READ) {
 		for (i = 0, p = buf; i < nleft; i++, p++)
-			*p =  mc146818_read(RTC, offset + i);
+			*p = mc146818_read(RTC, offset + i);
 	}
 	if ((i = uiomove(buf, nleft, uio)) != 0)
-		return (i);
+		return i;
 	if (uio->uio_rw == UIO_WRITE) {
 		for (i = 0, p = buf; i < nleft; i++, p++)
 			mc146818_write(RTC, offset + i, *p);
 		nvram_set_csum(nvram_csum());
 	}
-	return(0);
+	return 0;
 }
 
 static u_char
 nvram_csum(void)
 {
-	u_char	csum;
-	int	nreg;
+	uint8_t csum;
+	int nreg;
 	
 	for (csum = 0, nreg = MC_NVRAM_START; nreg < MC_NVRAM_CSUM; nreg++)
 		csum += mc146818_read(RTC, nreg);
-	return(csum);
+	return csum;
 }
 
 static int
 nvram_csum_valid(u_char csum)
 {
+
 	if (((~csum & 0xff) != mc146818_read(RTC, MC_NVRAM_CSUM))
 		|| (csum != mc146818_read(RTC, MC_NVRAM_CSUM + 1)))
 		return 0;
@@ -198,6 +200,7 @@ nvram_csum_valid(u_char csum)
 static void
 nvram_set_csum(u_char csum)
 {
+
 	mc146818_write(RTC, MC_NVRAM_CSUM,~csum);
 	mc146818_write(RTC, MC_NVRAM_CSUM + 1, csum);
 }

Index: src/sys/arch/atari/dev/nvramvar.h
diff -u sr

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

2022-07-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jul  2 14:29:04 UTC 2022

Modified Files:
src/sys/arch/atari/dev: nvram.c nvramvar.h

Log Message:
Use aprint_*(9) for attach messages and misc KNF.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/atari/dev/nvram.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/atari/dev/nvramvar.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/atari/atari

2022-07-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jul  2 13:47:53 UTC 2022

Modified Files:
src/sys/arch/atari/atari: autoconf.c

Log Message:
Use aprint_normal(9) for attach messages.


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/atari/atari/autoconf.c

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

Modified files:

Index: src/sys/arch/atari/atari/autoconf.c
diff -u src/sys/arch/atari/atari/autoconf.c:1.72 src/sys/arch/atari/atari/autoconf.c:1.73
--- src/sys/arch/atari/atari/autoconf.c:1.72	Mon Mar 28 12:38:57 2022
+++ src/sys/arch/atari/atari/autoconf.c	Sat Jul  2 13:47:53 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.72 2022/03/28 12:38:57 riastradh Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.73 2022/07/02 13:47:53 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.72 2022/03/28 12:38:57 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: autoconf.c,v 1.73 2022/07/02 13:47:53 tsutsui Exp $");
 
 #include "opt_md.h"
 
@@ -319,7 +319,7 @@ mbattach(device_t parent, device_t self,
 
 	mb_attached = 1;
 
-	printf ("\n");
+	aprint_normal("\n");
 	config_found(self, __UNCONST("clock")   , simple_devprint, CFARGS_NONE);
 	config_found(self, __UNCONST("grfbus")  , simple_devprint, CFARGS_NONE);
 	config_found(self, __UNCONST("kbd") , simple_devprint, CFARGS_NONE);



CVS commit: src/sys/arch/atari/atari

2022-07-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jul  2 13:47:53 UTC 2022

Modified Files:
src/sys/arch/atari/atari: autoconf.c

Log Message:
Use aprint_normal(9) for attach messages.


To generate a diff of this commit:
cvs rdiff -u -r1.72 -r1.73 src/sys/arch/atari/atari/autoconf.c

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



CVS commit: src/sys/arch/atari/atari

2022-07-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jul  2 08:43:28 UTC 2022

Modified Files:
src/sys/arch/atari/atari: stalloc.c

Log Message:
Misc KNF. No binary change.


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

2022-07-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jul  2 08:43:28 UTC 2022

Modified Files:
src/sys/arch/atari/atari: stalloc.c

Log Message:
Misc KNF. No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/atari/atari/stalloc.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/atari/atari/stalloc.c
diff -u src/sys/arch/atari/atari/stalloc.c:1.17 src/sys/arch/atari/atari/stalloc.c:1.18
--- src/sys/arch/atari/atari/stalloc.c:1.17	Tue May 31 15:24:59 2022
+++ src/sys/arch/atari/atari/stalloc.c	Sat Jul  2 08:43:28 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: stalloc.c,v 1.17 2022/05/31 15:24:59 tsutsui Exp $	*/
+/*	$NetBSD: stalloc.c,v 1.18 2022/07/02 08:43:28 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman (Atari modifications)
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: stalloc.c,v 1.17 2022/05/31 15:24:59 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: stalloc.c,v 1.18 2022/07/02 08:43:28 tsutsui Exp $");
 
 #include 
 #include 
@@ -60,9 +60,10 @@ u_long   stmem_total;		/* total free.		*
 void
 init_stmem(void)
 {
-	int s = splhigh ();
+	int s;
 	struct mem_node *mem;
 
+	s = splhigh();
 	stmem_total = st_pool_size - sizeof(*mem);
 
 	mem = (struct mem_node *)st_pool_virt;
@@ -80,14 +81,14 @@ void *
 alloc_stmem(u_long size, void **phys_addr)
 {
 	struct mem_node *mn, *new, *bfit;
-	int		s;
+	int s;
 
 	if (size == 0)
 		return NULL;
 
 	s = splhigh();
 
-	if (size & ~(ST_BLOCKMASK)) 
+	if ((size & ~(ST_BLOCKMASK)) != 0) 
 		size = (size & ST_BLOCKMASK) + ST_BLOCKSIZE;
 
 	/*
@@ -111,7 +112,7 @@ alloc_stmem(u_long size, void **phys_add
 		return NULL;
 	}
 
-	if ((mn->size - size) <= sizeof (*mn)) {
+	if ((mn->size - size) <= sizeof(*mn)) {
 		/*
 		 * our allocation would not leave room 
 		 * for a new node in between.
@@ -122,14 +123,14 @@ alloc_stmem(u_long size, void **phys_add
 		stmem_total -= mn->size;
 		splx(s);
 		*phys_addr = (void*)PHYS_ADDR(&mn[1]);
-		return ((void *)&mn[1]);
+		return (void *)&mn[1];
 	}
 
 	/*
 	 * split the node's memory.
 	 */
 	new = mn;
-	new->size -= size + sizeof(struct mem_node);
+	new->size -= size + sizeof(*mn);
 	mn = (struct mem_node *)(MNODES_MEM(new) + new->size);
 	mn->size = size;
 
@@ -140,10 +141,10 @@ alloc_stmem(u_long size, void **phys_add
 	TAILQ_INSERT_AFTER(&st_list, new, mn, link);
 	mn->type = MNODE_USED;
 
-	stmem_total -= size + sizeof(struct mem_node);
+	stmem_total -= size + sizeof(*mn);
 	splx(s);
 	*phys_addr = (void*)PHYS_ADDR(&mn[1]);
-	return ((void *)&mn[1]);
+	return (void *)&mn[1];
 }
 
 void
@@ -171,23 +172,23 @@ free_stmem(void *mem)
 		mn->type = MNODE_FREE;
 		TAILQ_REMOVE(&st_list, next, link);
 		TAILQ_REMOVE(&free_list, next, free_link);
-		stmem_total += mn->size + sizeof(struct mem_node);
-		mn->size += next->size + sizeof(struct mem_node);
+		stmem_total += mn->size + sizeof(*mn);
+		mn->size += next->size + sizeof(*mn);
 	}
 	if (prev != NULL && prev->type == MNODE_FREE) {
 		/*
 		 * if prev is: a valid node and a free node. ==> merge
 		 */
 		if (mn->type != MNODE_FREE)
-			stmem_total += mn->size + sizeof(struct mem_node);
+			stmem_total += mn->size + sizeof(*mn);
 		else {
 			/* already on free list */
 			TAILQ_REMOVE(&free_list, mn, free_link);
 			mn->type = MNODE_USED;
-			stmem_total += sizeof(struct mem_node);
+			stmem_total += sizeof(*mn);
 		}
 		TAILQ_REMOVE(&st_list, mn, link);
-		prev->size += mn->size + sizeof(struct mem_node);
+		prev->size += mn->size + sizeof(*mn);
 	} else if (mn->type != MNODE_FREE) {
 		/*
 		 * we still are not on free list and we need to be.



CVS commit: src/sys/arch/atari/atari

2022-07-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jul  2 08:35:50 UTC 2022

Modified Files:
src/sys/arch/atari/atari: fpu_machdep.c machdep.c

Log Message:
Use and print consistent CPU/MMU/FPU names.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/atari/atari/fpu_machdep.c
cvs rdiff -u -r1.186 -r1.187 src/sys/arch/atari/atari/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/atari/atari/fpu_machdep.c
diff -u src/sys/arch/atari/atari/fpu_machdep.c:1.1 src/sys/arch/atari/atari/fpu_machdep.c:1.2
--- src/sys/arch/atari/atari/fpu_machdep.c:1.1	Tue Nov 15 12:23:21 2011
+++ src/sys/arch/atari/atari/fpu_machdep.c	Sat Jul  2 08:35:49 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: fpu_machdep.c,v 1.1 2011/11/15 12:23:21 tsutsui Exp $	*/
+/*	$NetBSD: fpu_machdep.c,v 1.2 2022/07/02 08:35:49 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -34,7 +34,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fpu_machdep.c,v 1.1 2011/11/15 12:23:21 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fpu_machdep.c,v 1.2 2022/07/02 08:35:49 tsutsui Exp $");
 
 #include "opt_fpu_emulate.h"
 
@@ -57,8 +57,8 @@ static const char *fpu_descr[] = {
 #else
 	[FPU_NONE] = " no ",
 #endif
-	[FPU_68881] = " mc68881 ",
-	[FPU_68882] = " mc68882 ",
+	[FPU_68881] = " MC68881 ",
+	[FPU_68882] = " MC68882 ",
 	[FPU_68040] = "/",
 	[FPU_68060] = "/",
 	[FPU_UNKNOWN] = "??? "

Index: src/sys/arch/atari/atari/machdep.c
diff -u src/sys/arch/atari/atari/machdep.c:1.186 src/sys/arch/atari/atari/machdep.c:1.187
--- src/sys/arch/atari/atari/machdep.c:1.186	Sun Mar 13 17:50:55 2022
+++ src/sys/arch/atari/atari/machdep.c	Sat Jul  2 08:35:49 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.186 2022/03/13 17:50:55 andvar Exp $	*/
+/*	$NetBSD: machdep.c,v 1.187 2022/07/02 08:35:49 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.186 2022/03/13 17:50:55 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.187 2022/07/02 08:35:49 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -256,22 +256,22 @@ identifycpu(void)
 	case CPU_68060:
 		__asm(".word 0x4e7a,0x0808;"
 		"movl %%d0,%0" : "=d"(pcr) : : "d0");
-		snprintf(cputxt, sizeof(cputxt), "68%s060 rev.%d",
+		snprintf(cputxt, sizeof(cputxt), "MC68%s060 rev.%d",
 		pcr & 0x1 ? "LC/EC" : "", (pcr >> 8) & 0xff);
 		cpu = cputxt;
 		mmu = "/MMU";
 		break;
 	case CPU_68040:
-		cpu = "m68040";
+		cpu = "MC68040";
 		mmu = "/MMU";
 		break;
 	case CPU_68030:
-		cpu = "m68030";
+		cpu = "MC68030";
 		mmu = "/MMU";
 		break;
 	default: /* XXX */
-		cpu = "m68020";
-		mmu = " m68851 MMU";
+		cpu = "MC68020";
+		mmu = " MC68851 MMU";
 	}
 	cpu_setmodel("%s (%s CPU%s%sFPU)", mach, cpu, mmu, fpu);
 	printf("%s\n", cpu_getmodel());



CVS commit: src/sys/arch/atari/atari

2022-07-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jul  2 08:35:50 UTC 2022

Modified Files:
src/sys/arch/atari/atari: fpu_machdep.c machdep.c

Log Message:
Use and print consistent CPU/MMU/FPU names.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/atari/atari/fpu_machdep.c
cvs rdiff -u -r1.186 -r1.187 src/sys/arch/atari/atari/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/atari/atari

2022-07-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jul  2 08:25:21 UTC 2022

Modified Files:
src/sys/arch/atari/atari: intr.c

Log Message:
Misc cleanup.

- make local variables static
- use __func__ to print function names
- KNF


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/atari/atari/intr.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/atari/atari/intr.c
diff -u src/sys/arch/atari/atari/intr.c:1.29 src/sys/arch/atari/atari/intr.c:1.30
--- src/sys/arch/atari/atari/intr.c:1.29	Sat Jul  2 08:11:47 2022
+++ src/sys/arch/atari/atari/intr.c	Sat Jul  2 08:25:21 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.29 2022/07/02 08:11:47 tsutsui Exp $	*/
+/*	$NetBSD: intr.c,v 1.30 2022/07/02 08:25:21 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.29 2022/07/02 08:11:47 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.30 2022/07/02 08:25:21 tsutsui Exp $");
 
 #include 
 #include 
@@ -51,8 +51,8 @@ __KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.2
 #define	UVEC_LOC	64
 
 typedef LIST_HEAD(, intrhand) ih_list_t;
-ih_list_t autovec_list[AVEC_MAX - AVEC_MIN + 1];
-ih_list_t uservec_list[UVEC_MAX - UVEC_MIN + 1];
+static ih_list_t autovec_list[AVEC_MAX - AVEC_MIN + 1];
+static ih_list_t uservec_list[UVEC_MAX - UVEC_MIN + 1];
 int idepth;
 volatile int ssir;
 
@@ -129,9 +129,9 @@ intr_establish(int vector, int type, int
 			kmem_free(ih, sizeof(*ih));
 			return NULL;
 		}
-		vec_list = &autovec_list[vector-1];
-		hard_vec = &autovects[vector-1];
-		ih->ih_intrcnt = &intrcnt_auto[vector-1];
+		vec_list = &autovec_list[vector - 1];
+		hard_vec = &autovects[vector - 1];
+		ih->ih_intrcnt = &intrcnt_auto[vector - 1];
 		break;
 	case USER_VEC:
 		if (vector < UVEC_MIN || vector > UVEC_MAX) {
@@ -156,7 +156,7 @@ intr_establish(int vector, int type, int
 
 		s = splhigh();
 		LIST_INSERT_HEAD(vec_list, ih, ih_link);
-		if (type & FAST_VEC)
+		if ((type & FAST_VEC) != 0)
 			*hard_vec = (u_long)ih->ih_fun;
 		else if (*hard_vec != (u_long)intr_glue) {
 			/*
@@ -181,7 +181,7 @@ intr_establish(int vector, int type, int
 	cur_vec = LIST_FIRST(vec_list);
 	if (cur_vec->ih_type & FAST_VEC) {
 		kmem_free(ih, sizeof(*ih));
-		printf("intr_establish: vector cannot be shared\n");
+		printf("%s: vector cannot be shared\n", __func__);
 		return NULL;
 	}
 
@@ -226,8 +226,8 @@ intr_disestablish(struct intrhand *ih)
 	case AUTO_VEC:
 		if (vector < AVEC_MIN || vector > AVEC_MAX)
 			return 0;
-		vec_list = &autovec_list[vector-1];
-		hard_vec = &autovects[vector-1];
+		vec_list = &autovec_list[vector - 1];
+		hard_vec = &autovects[vector - 1];
 		break;
 	case USER_VEC:
 		if (vector < UVEC_MIN || vector > UVEC_MAX)
@@ -236,7 +236,7 @@ intr_disestablish(struct intrhand *ih)
 		hard_vec = &uservects[vector];
 		break;
 	default:
-		printf("intr_disestablish: bogus vector type\n");
+		printf("%s: bogus vector type\n", __func__);
 		return 0;
 	}
 
@@ -250,13 +250,13 @@ intr_disestablish(struct intrhand *ih)
 			break;
 	}
 	if (ih != cur_vec) {
-		printf("intr_disestablish: 'ih' has inconsistent data\n");
+		printf("%s: 'ih' has inconsistent data\n", __func__);
 		return 0;
 	}
 
 	s = splhigh();
 	LIST_REMOVE(ih, ih_link);
-	if (LIST_EMPTY(vec_list) && (ih->ih_type & FAST_VEC))
+	if (LIST_EMPTY(vec_list) && (ih->ih_type & FAST_VEC) != 0)
 		*hard_vec = (u_long)intr_glue;
 	splx(s);
 
@@ -279,17 +279,17 @@ intr_dispatch(struct clockframe frame)
 
 	curcpu()->ci_data.cpu_nintr++;
 	vector = (frame.cf_vo & 0xfff) >> 2;
-	if (vector < (AVEC_LOC+AVEC_MAX) && vector >= AVEC_LOC)
+	if (vector < (AVEC_LOC + AVEC_MAX) && vector >= AVEC_LOC)
 		vec_list = &autovec_list[vector - AVEC_LOC];
-	else if (vector <= (UVEC_LOC+UVEC_MAX) && vector >= UVEC_LOC)
+	else if (vector <= (UVEC_LOC + UVEC_MAX) && vector >= UVEC_LOC)
 		vec_list = &uservec_list[vector - UVEC_LOC];
 	else
-		panic("intr_dispatch: Bogus vector %d", vector);
+		panic("%s: Bogus vector %d", __func__, vector);
 
 	if ((ih = LIST_FIRST(vec_list)) == NULL) {
-		printf("intr_dispatch: vector %d unexpected\n", vector);
+		printf("%s: vector %d unexpected\n", __func__, vector);
 		if (++unexpected > 10)
-			panic("intr_dispatch: too many unexpected interrupts");
+			panic("%s: too many unexpected interrupts", __func__);
 		return;
 	}
 	ih->ih_intrcnt[0]++;
@@ -302,9 +302,9 @@ intr_dispatch(struct clockframe frame)
 	if (handled)
 		straycount = 0;
 	else if (++straycount > 50)
-		panic("intr_dispatch: too many stray interrupts");
+		panic("%s: too many stray interrupts", __func__);
 	else
-		printf("intr_dispatch: stray level %d interrupt\n", vector);
+		printf("%s: stray level %d interrupt\n", __func__, vector);
 }
 
 bool



CVS commit: src/sys/arch/atari/atari

2022-07-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jul  2 08:25:21 UTC 2022

Modified Files:
src/sys/arch/atari/atari: intr.c

Log Message:
Misc cleanup.

- make local variables static
- use __func__ to print function names
- KNF


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/atari/atari/intr.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/atari/atari

2022-07-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jul  2 08:11:47 UTC 2022

Modified Files:
src/sys/arch/atari/atari: intr.c

Log Message:
Use queue(3) macro as hp300 etc.  No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/atari/atari/intr.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/atari/atari/intr.c
diff -u src/sys/arch/atari/atari/intr.c:1.28 src/sys/arch/atari/atari/intr.c:1.29
--- src/sys/arch/atari/atari/intr.c:1.28	Sun Jan  3 17:42:10 2021
+++ src/sys/arch/atari/atari/intr.c	Sat Jul  2 08:11:47 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.c,v 1.28 2021/01/03 17:42:10 thorpej Exp $	*/
+/*	$NetBSD: intr.c,v 1.29 2022/07/02 08:11:47 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.28 2021/01/03 17:42:10 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: intr.c,v 1.29 2022/07/02 08:11:47 tsutsui Exp $");
 
 #include 
 #include 
@@ -152,7 +152,7 @@ intr_establish(int vector, int type, int
 	 * If the vec_list is empty, we insert ourselves at the head of the
 	 * list and we re-route the 'hard-vector' to the appropriate handler.
 	 */
-	if (vec_list->lh_first == NULL) {
+	if (LIST_EMPTY(vec_list)) {
 
 		s = splhigh();
 		LIST_INSERT_HEAD(vec_list, ih, ih_link);
@@ -178,7 +178,7 @@ intr_establish(int vector, int type, int
 	/*
 	 * Check for FAST_VEC botches
 	 */
-	cur_vec = vec_list->lh_first;
+	cur_vec = LIST_FIRST(vec_list);
 	if (cur_vec->ih_type & FAST_VEC) {
 		kmem_free(ih, sizeof(*ih));
 		printf("intr_establish: vector cannot be shared\n");
@@ -189,8 +189,9 @@ intr_establish(int vector, int type, int
 	 * We traverse the list and place ourselves after any handlers with
 	 * our current (or higher) priority level.
 	 */
-	for (cur_vec = vec_list->lh_first; cur_vec->ih_link.le_next != NULL;
-	cur_vec = cur_vec->ih_link.le_next) {
+	for (cur_vec = LIST_FIRST(vec_list);
+	LIST_NEXT(cur_vec, ih_link) != NULL;
+	cur_vec = LIST_NEXT(cur_vec, ih_link)) {
 		if (ih->ih_pri > cur_vec->ih_pri) {
 
 			s = splhigh();
@@ -242,8 +243,9 @@ intr_disestablish(struct intrhand *ih)
 	/*
 	 * Check if the vector is really in the list we think it's in
 	 */
-	for (cur_vec = vec_list->lh_first; cur_vec->ih_link.le_next != NULL;
-	cur_vec = cur_vec->ih_link.le_next) {
+	for (cur_vec = LIST_FIRST(vec_list);
+	LIST_NEXT(cur_vec, ih_link) != NULL;
+	cur_vec = LIST_NEXT(cur_vec, ih_link)) {
 		if (ih == cur_vec)
 			break;
 	}
@@ -254,7 +256,7 @@ intr_disestablish(struct intrhand *ih)
 
 	s = splhigh();
 	LIST_REMOVE(ih, ih_link);
-	if ((vec_list->lh_first == NULL) && (ih->ih_type & FAST_VEC))
+	if (LIST_EMPTY(vec_list) && (ih->ih_type & FAST_VEC))
 		*hard_vec = (u_long)intr_glue;
 	splx(s);
 
@@ -284,7 +286,7 @@ intr_dispatch(struct clockframe frame)
 	else
 		panic("intr_dispatch: Bogus vector %d", vector);
 
-	if ((ih = vec_list->lh_first) == NULL) {
+	if ((ih = LIST_FIRST(vec_list)) == NULL) {
 		printf("intr_dispatch: vector %d unexpected\n", vector);
 		if (++unexpected > 10)
 			panic("intr_dispatch: too many unexpected interrupts");
@@ -293,7 +295,7 @@ intr_dispatch(struct clockframe frame)
 	ih->ih_intrcnt[0]++;
 
 	/* Give all the handlers a chance. */
-	for (; ih != NULL; ih = ih->ih_link.le_next)
+	for (; ih != NULL; ih = LIST_NEXT(ih, ih_link))
 		handled |= (*ih->ih_fun)((ih->ih_type & ARG_CLOCKFRAME) ?
 		&frame : ih->ih_arg, frame.cf_sr);
 



CVS commit: src/sys/arch/atari/atari

2022-07-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jul  2 08:11:47 UTC 2022

Modified Files:
src/sys/arch/atari/atari: intr.c

Log Message:
Use queue(3) macro as hp300 etc.  No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/atari/atari/intr.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/atari/dev

2022-06-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 26 18:46:14 UTC 2022

Modified Files:
src/sys/arch/atari/dev: clock.c fd.c grf.c hdfd.c ite.c ite_cc.c
ite_et.c

Log Message:
Use aprint_*(9) for device attach messages.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/atari/dev/clock.c
cvs rdiff -u -r1.93 -r1.94 src/sys/arch/atari/dev/fd.c
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/atari/dev/grf.c
cvs rdiff -u -r1.90 -r1.91 src/sys/arch/atari/dev/hdfd.c
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/atari/dev/ite.c
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/atari/dev/ite_cc.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/atari/dev/ite_et.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/atari/dev

2022-06-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 26 18:46:14 UTC 2022

Modified Files:
src/sys/arch/atari/dev: clock.c fd.c grf.c hdfd.c ite.c ite_cc.c
ite_et.c

Log Message:
Use aprint_*(9) for device attach messages.


To generate a diff of this commit:
cvs rdiff -u -r1.63 -r1.64 src/sys/arch/atari/dev/clock.c
cvs rdiff -u -r1.93 -r1.94 src/sys/arch/atari/dev/fd.c
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/atari/dev/grf.c
cvs rdiff -u -r1.90 -r1.91 src/sys/arch/atari/dev/hdfd.c
cvs rdiff -u -r1.83 -r1.84 src/sys/arch/atari/dev/ite.c
cvs rdiff -u -r1.45 -r1.46 src/sys/arch/atari/dev/ite_cc.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/atari/dev/ite_et.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/atari/dev/clock.c
diff -u src/sys/arch/atari/dev/clock.c:1.63 src/sys/arch/atari/dev/clock.c:1.64
--- src/sys/arch/atari/dev/clock.c:1.63	Sun Jun 26 06:25:09 2022
+++ src/sys/arch/atari/dev/clock.c	Sun Jun 26 18:46:14 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.c,v 1.63 2022/06/26 06:25:09 tsutsui Exp $	*/
+/*	$NetBSD: clock.c,v 1.64 2022/06/26 18:46:14 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.63 2022/06/26 06:25:09 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.64 2022/06/26 18:46:14 tsutsui Exp $");
 
 #include 
 #include 
@@ -196,11 +196,11 @@ clockattach(device_t parent, device_t se
 	clk_timecounter.tc_frequency = CLOCK_HZ;
 
 	if (hz != 48 && hz != 64 && hz != 96) { /* XXX */
-		printf (": illegal value %d for systemclock, reset to %d\n\t",
+		aprint_normal(": illegal value %d for systemclock, reset to %d\n\t",
 hz, 64);
 		hz = 64;
 	}
-	printf(": system hz %d timer-A divisor 200/%d\n", hz, divisor);
+	aprint_normal(": system hz %d timer-A divisor 200/%d\n", hz, divisor);
 	tc_init(&clk_timecounter);
 
 #ifdef STATCLOCK

Index: src/sys/arch/atari/dev/fd.c
diff -u src/sys/arch/atari/dev/fd.c:1.93 src/sys/arch/atari/dev/fd.c:1.94
--- src/sys/arch/atari/dev/fd.c:1.93	Sun Jun 26 06:25:09 2022
+++ src/sys/arch/atari/dev/fd.c	Sun Jun 26 18:46:14 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: fd.c,v 1.93 2022/06/26 06:25:09 tsutsui Exp $	*/
+/*	$NetBSD: fd.c,v 1.94 2022/06/26 18:46:14 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman.
@@ -44,7 +44,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.93 2022/06/26 06:25:09 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.94 2022/06/26 18:46:14 tsutsui Exp $");
 
 #include 
 #include 
@@ -324,7 +324,7 @@ fdcattach(device_t parent, device_t self
 	int i, nfound, first_found;
 
 	nfound = first_found = 0;
-	printf("\n");
+	aprint_normal("\n");
 	fddeselect();
 	for (i = 0; i < NR_DRIVES; i++) {
 

Index: src/sys/arch/atari/dev/grf.c
diff -u src/sys/arch/atari/dev/grf.c:1.54 src/sys/arch/atari/dev/grf.c:1.55
--- src/sys/arch/atari/dev/grf.c:1.54	Sun Jun 26 06:25:09 2022
+++ src/sys/arch/atari/dev/grf.c	Sun Jun 26 18:46:14 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: grf.c,v 1.54 2022/06/26 06:25:09 tsutsui Exp $	*/
+/*	$NetBSD: grf.c,v 1.55 2022/06/26 18:46:14 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -46,7 +46,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.54 2022/06/26 06:25:09 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: grf.c,v 1.55 2022/06/26 18:46:14 tsutsui Exp $");
 
 #include 
 #include 
@@ -151,7 +151,7 @@ grfbusattach(device_t parent, device_t s
 		atari_config_found(cfdata_gbus, NULL, &grf_auxp, grfbusprint,
 		CFARGS_NONE);
 	} else {
-		printf("\n");
+		aprint_normal("\n");
 		config_found(self, &grf_auxp, grfbusprint, CFARGS_NONE);
 	}
 }

Index: src/sys/arch/atari/dev/hdfd.c
diff -u src/sys/arch/atari/dev/hdfd.c:1.90 src/sys/arch/atari/dev/hdfd.c:1.91
--- src/sys/arch/atari/dev/hdfd.c:1.90	Sun Jun 26 06:25:09 2022
+++ src/sys/arch/atari/dev/hdfd.c	Sun Jun 26 18:46:14 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: hdfd.c,v 1.90 2022/06/26 06:25:09 tsutsui Exp $	*/
+/*	$NetBSD: hdfd.c,v 1.91 2022/06/26 18:46:14 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996 Leo Weppelman
@@ -91,7 +91,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.90 2022/06/26 06:25:09 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: hdfd.c,v 1.91 2022/06/26 18:46:14 tsutsui Exp $");
 
 #include "opt_ddb.h"
 
@@ -436,10 +436,10 @@ fdcattach(device_t parent, device_t self
 		has_fifo = 1;
 	} else {
 		(void)rd_fdc_reg(fddata);
-		printf(": no fifo");
+		aprint_normal(": no fifo");
 	}
 
-	printf("\n");
+	aprint_normal("\n");
 
 	callout_init(&fdc->sc_timo_ch, 0);
 	callout_init(&fdc->sc_intr_ch, 0);
@@ -447,7 +447,7 @@ fdcattach(device_t parent, device_t self
 	if (intr_establish(22, USER_VEC|FAST_VEC, 0,
 			   (hw_ifun_t)(has_fifo ? mfp_hdfd_fifo : mfp_hdfd_nf),
 			   NULL) == NULL) {
-		printf("fdcattach: Can't establish interrupt\n");
+		aprint_error_dev(self, "Can't establish interrupt\n");

CVS commit: src/sys/arch/atari/stand

2022-06-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 26 14:14:47 UTC 2022

Modified Files:
src/sys/arch/atari/stand/bootxxx: bootxxx.c
src/sys/arch/atari/stand/xxboot/ahdi-sdb00t: sdb00t.ahdi.S
src/sys/arch/atari/stand/xxboot/ahdi-wdb00t: wdb00t.ahdi.S
src/sys/arch/atari/stand/xxboot/ahdi-xxboot: xxboot.ahdi.S
src/sys/arch/atari/stand/xxboot/fdboot: fdboot.S
src/sys/arch/atari/stand/xxboot/sdboot: sdboot.S
src/sys/arch/atari/stand/xxboot/wdboot: wdboot.S

Log Message:
Unifdef __ELF__.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/atari/stand/bootxxx/bootxxx.c
cvs rdiff -u -r1.2 -r1.3 \
src/sys/arch/atari/stand/xxboot/ahdi-sdb00t/sdb00t.ahdi.S
cvs rdiff -u -r1.2 -r1.3 \
src/sys/arch/atari/stand/xxboot/ahdi-wdb00t/wdb00t.ahdi.S
cvs rdiff -u -r1.2 -r1.3 \
src/sys/arch/atari/stand/xxboot/ahdi-xxboot/xxboot.ahdi.S
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/atari/stand/xxboot/fdboot/fdboot.S
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/atari/stand/xxboot/sdboot/sdboot.S
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/atari/stand/xxboot/wdboot/wdboot.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/atari/stand/bootxxx/bootxxx.c
diff -u src/sys/arch/atari/stand/bootxxx/bootxxx.c:1.9 src/sys/arch/atari/stand/bootxxx/bootxxx.c:1.10
--- src/sys/arch/atari/stand/bootxxx/bootxxx.c:1.9	Sun Jun 26 14:08:15 2022
+++ src/sys/arch/atari/stand/bootxxx/bootxxx.c	Sun Jun 26 14:14:46 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: bootxxx.c,v 1.9 2022/06/26 14:08:15 tsutsui Exp $	*/
+/*	$NetBSD: bootxxx.c,v 1.10 2022/06/26 14:14:46 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 2001 Leo Weppelman.
@@ -58,7 +58,7 @@ bootxxx(void *readsector, void *disklabe
 	/* XXX: Limit should be 16MB */
 	setheap(end, (void*)0x100);
 	printf("\033v\nNetBSD/atari tertiary bootloader "
-	"($Revision: 1.9 $)\n\n");
+	"($Revision: 1.10 $)\n\n");
 
 	if (init_dskio(readsector, disklabel, od->rootfs))
 		return -1;
@@ -74,11 +74,7 @@ bootxxx(void *readsector, void *disklabe
 		return -3;
 	}
 
-#ifndef __ELF__		/* a.out */
-	if (aout_load(fd, od, &errmsg, 1) != 0)
-#else
 	if (elf_load(fd, od, &errmsg, 1) != 0)
-#endif
 		return -4;
 
 	boot_BSD(&od->kp);

Index: src/sys/arch/atari/stand/xxboot/ahdi-sdb00t/sdb00t.ahdi.S
diff -u src/sys/arch/atari/stand/xxboot/ahdi-sdb00t/sdb00t.ahdi.S:1.2 src/sys/arch/atari/stand/xxboot/ahdi-sdb00t/sdb00t.ahdi.S:1.3
--- src/sys/arch/atari/stand/xxboot/ahdi-sdb00t/sdb00t.ahdi.S:1.2	Sun Dec 11 12:17:02 2005
+++ src/sys/arch/atari/stand/xxboot/ahdi-sdb00t/sdb00t.ahdi.S	Sun Jun 26 14:14:46 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdb00t.ahdi.S,v 1.2 2005/12/11 12:17:02 christos Exp $	*/
+/*	$NetBSD: sdb00t.ahdi.S,v 1.3 2022/06/26 14:14:46 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Waldi Ravens
@@ -32,19 +32,11 @@
 
 #include "xxboot.h"
 
-#ifdef __ELF__
 	.globl	_start, main, fill
 
 	.text
 
 _start:	bras	main
-#else
-	.globl	start, main, fill
-
-	.text
-
-start:	bras	main
-#endif
 	bra	rds0
 
 main:	bclr	#2,(_drvbits+3):w

Index: src/sys/arch/atari/stand/xxboot/ahdi-wdb00t/wdb00t.ahdi.S
diff -u src/sys/arch/atari/stand/xxboot/ahdi-wdb00t/wdb00t.ahdi.S:1.2 src/sys/arch/atari/stand/xxboot/ahdi-wdb00t/wdb00t.ahdi.S:1.3
--- src/sys/arch/atari/stand/xxboot/ahdi-wdb00t/wdb00t.ahdi.S:1.2	Sun Dec 11 12:17:02 2005
+++ src/sys/arch/atari/stand/xxboot/ahdi-wdb00t/wdb00t.ahdi.S	Sun Jun 26 14:14:46 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: wdb00t.ahdi.S,v 1.2 2005/12/11 12:17:02 christos Exp $	*/
+/*	$NetBSD: wdb00t.ahdi.S,v 1.3 2022/06/26 14:14:46 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Waldi Ravens
@@ -32,19 +32,11 @@
 
 #include "xxboot.h"
 
-#ifdef __ELF__
 	.globl	_start, main, fill
 
 	.text
 
 _start:	bras	main
-#else
-	.globl	start, main, fill
-
-	.text
-
-start:	bras	main
-#endif
 	bra	rds0
 
 main:	bclr	#2,(_drvbits+3):w

Index: src/sys/arch/atari/stand/xxboot/ahdi-xxboot/xxboot.ahdi.S
diff -u src/sys/arch/atari/stand/xxboot/ahdi-xxboot/xxboot.ahdi.S:1.2 src/sys/arch/atari/stand/xxboot/ahdi-xxboot/xxboot.ahdi.S:1.3
--- src/sys/arch/atari/stand/xxboot/ahdi-xxboot/xxboot.ahdi.S:1.2	Sun Dec 11 12:17:02 2005
+++ src/sys/arch/atari/stand/xxboot/ahdi-xxboot/xxboot.ahdi.S	Sun Jun 26 14:14:46 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: xxboot.ahdi.S,v 1.2 2005/12/11 12:17:02 christos Exp $	*/
+/*	$NetBSD: xxboot.ahdi.S,v 1.3 2022/06/26 14:14:46 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Waldi Ravens.
@@ -32,19 +32,11 @@
 
 #include "xxboot.h"
 
-#ifdef __ELF__
 	.globl	_start, main, fill
 
 	.text
 
 _start:	bras	main
-#else
-	.globl	start, main, fill
-
-	.text
-
-start:	bras	main
-#endif
 /*
  * Fake gemdos-fs bootsector, to keep TOS away.
  */

Index: src/sys/arch/atari/stand/xxboot/fdboot/fdboot.S
diff -u src/sys/arch/atari/stand/xxboot/fdboot/fdboot.S:1.2 src/sys/arch/atari/stand/xxboot/fdboot/fdboot.S:1.3
--- src/sys/arch/atari/stand/xxboot/fdboot/fdboo

CVS commit: src/sys/arch/atari/stand

2022-06-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 26 14:14:47 UTC 2022

Modified Files:
src/sys/arch/atari/stand/bootxxx: bootxxx.c
src/sys/arch/atari/stand/xxboot/ahdi-sdb00t: sdb00t.ahdi.S
src/sys/arch/atari/stand/xxboot/ahdi-wdb00t: wdb00t.ahdi.S
src/sys/arch/atari/stand/xxboot/ahdi-xxboot: xxboot.ahdi.S
src/sys/arch/atari/stand/xxboot/fdboot: fdboot.S
src/sys/arch/atari/stand/xxboot/sdboot: sdboot.S
src/sys/arch/atari/stand/xxboot/wdboot: wdboot.S

Log Message:
Unifdef __ELF__.


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/atari/stand/bootxxx/bootxxx.c
cvs rdiff -u -r1.2 -r1.3 \
src/sys/arch/atari/stand/xxboot/ahdi-sdb00t/sdb00t.ahdi.S
cvs rdiff -u -r1.2 -r1.3 \
src/sys/arch/atari/stand/xxboot/ahdi-wdb00t/wdb00t.ahdi.S
cvs rdiff -u -r1.2 -r1.3 \
src/sys/arch/atari/stand/xxboot/ahdi-xxboot/xxboot.ahdi.S
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/atari/stand/xxboot/fdboot/fdboot.S
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/atari/stand/xxboot/sdboot/sdboot.S
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/atari/stand/xxboot/wdboot/wdboot.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/atari/stand/bootxxx

2022-06-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 26 14:08:15 UTC 2022

Modified Files:
src/sys/arch/atari/stand/bootxxx: bootxxx.c

Log Message:
Consistently use "NetBSD/atari", not "NetBSD/Atari" on tertiary boot.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/atari/stand/bootxxx/bootxxx.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/atari/stand/bootxxx/bootxxx.c
diff -u src/sys/arch/atari/stand/bootxxx/bootxxx.c:1.8 src/sys/arch/atari/stand/bootxxx/bootxxx.c:1.9
--- src/sys/arch/atari/stand/bootxxx/bootxxx.c:1.8	Mon Aug 24 13:04:37 2009
+++ src/sys/arch/atari/stand/bootxxx/bootxxx.c	Sun Jun 26 14:08:15 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: bootxxx.c,v 1.8 2009/08/24 13:04:37 tsutsui Exp $	*/
+/*	$NetBSD: bootxxx.c,v 1.9 2022/06/26 14:08:15 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 2001 Leo Weppelman.
@@ -57,8 +57,8 @@ bootxxx(void *readsector, void *disklabe
 
 	/* XXX: Limit should be 16MB */
 	setheap(end, (void*)0x100);
-	printf("\033v\nNetBSD/Atari tertiary bootloader "
-	"($Revision: 1.8 $)\n\n");
+	printf("\033v\nNetBSD/atari tertiary bootloader "
+	"($Revision: 1.9 $)\n\n");
 
 	if (init_dskio(readsector, disklabel, od->rootfs))
 		return -1;



CVS commit: src/sys/arch/atari/stand/bootxxx

2022-06-26 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 26 14:08:15 UTC 2022

Modified Files:
src/sys/arch/atari/stand/bootxxx: bootxxx.c

Log Message:
Consistently use "NetBSD/atari", not "NetBSD/Atari" on tertiary boot.


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

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



Re: CVS commit: src/sys/arch/atari/dev

2022-06-26 Thread Izumi Tsutsui
> Modified Files:
>   src/sys/arch/atari/dev: kbd.c
> 
> Log Message:
> gcc is not smart enough to track the equivalence of conditions used
> here and warns about an unused value - initialize "code" always.

Umm, complains only with -Os ...
Anyway thanks for fixing.

---
Izumi Tsutsui


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

2022-06-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jun 26 09:18:06 UTC 2022

Modified Files:
src/sys/arch/atari/dev: kbd.c

Log Message:
gcc is not smart enough to track the equivalence of conditions used
here and warns about an unused value - initialize "code" always.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/atari/dev/kbd.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/atari/dev

2022-06-26 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Sun Jun 26 09:18:06 UTC 2022

Modified Files:
src/sys/arch/atari/dev: kbd.c

Log Message:
gcc is not smart enough to track the equivalence of conditions used
here and warns about an unused value - initialize "code" always.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 src/sys/arch/atari/dev/kbd.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/atari/dev/kbd.c
diff -u src/sys/arch/atari/dev/kbd.c:1.55 src/sys/arch/atari/dev/kbd.c:1.56
--- src/sys/arch/atari/dev/kbd.c:1.55	Sun Jun 26 04:45:30 2022
+++ src/sys/arch/atari/dev/kbd.c	Sun Jun 26 09:18:06 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: kbd.c,v 1.55 2022/06/26 04:45:30 tsutsui Exp $	*/
+/*	$NetBSD: kbd.c,v 1.56 2022/06/26 09:18:06 martin Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.55 2022/06/26 04:45:30 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.56 2022/06/26 09:18:06 martin Exp $");
 
 #include "mouse.h"
 #include "ite.h"
@@ -424,7 +424,7 @@ kbdintr(int sr)
 	/* sr: sr at time of interrupt	*/
 {
 	struct kbd_softc *sc = &kbd_softc;
-	uint8_t stat, code;
+	uint8_t stat, code = 0 /* XXX gcc */;
 	uint32_t rndstat;
 	bool got_char = false;
 



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

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 26 06:25:09 UTC 2022

Modified Files:
src/sys/arch/atari/dev: clock.c fd.c grf.c hdfd.c ite.c lpt.c ms.c
ser.c view.c zs.c

Log Message:
Make local devsw functions static.

No visible regression on TT030.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/atari/dev/clock.c
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/atari/dev/fd.c
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/atari/dev/grf.c
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/atari/dev/hdfd.c
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/atari/dev/ite.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/atari/dev/lpt.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/atari/dev/ms.c
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/atari/dev/ser.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/atari/dev/view.c
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/atari/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/atari/dev

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 26 06:25:09 UTC 2022

Modified Files:
src/sys/arch/atari/dev: clock.c fd.c grf.c hdfd.c ite.c lpt.c ms.c
ser.c view.c zs.c

Log Message:
Make local devsw functions static.

No visible regression on TT030.


To generate a diff of this commit:
cvs rdiff -u -r1.62 -r1.63 src/sys/arch/atari/dev/clock.c
cvs rdiff -u -r1.92 -r1.93 src/sys/arch/atari/dev/fd.c
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/atari/dev/grf.c
cvs rdiff -u -r1.89 -r1.90 src/sys/arch/atari/dev/hdfd.c
cvs rdiff -u -r1.82 -r1.83 src/sys/arch/atari/dev/ite.c
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/atari/dev/lpt.c
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/atari/dev/ms.c
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/atari/dev/ser.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/atari/dev/view.c
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/atari/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/atari/dev/clock.c
diff -u src/sys/arch/atari/dev/clock.c:1.62 src/sys/arch/atari/dev/clock.c:1.63
--- src/sys/arch/atari/dev/clock.c:1.62	Fri Jul  3 16:23:03 2020
+++ src/sys/arch/atari/dev/clock.c	Sun Jun 26 06:25:09 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: clock.c,v 1.62 2020/07/03 16:23:03 maxv Exp $	*/
+/*	$NetBSD: clock.c,v 1.63 2022/06/26 06:25:09 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.62 2020/07/03 16:23:03 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: clock.c,v 1.63 2022/06/26 06:25:09 tsutsui Exp $");
 
 #include 
 #include 
@@ -107,10 +107,10 @@ struct clock_softc {
  */
 #define	RTC_OPEN	1
 
-dev_type_open(rtcopen);
-dev_type_close(rtcclose);
-dev_type_read(rtcread);
-dev_type_write(rtcwrite);
+static dev_type_open(rtcopen);
+static dev_type_close(rtcclose);
+static dev_type_read(rtcread);
+static dev_type_write(rtcwrite);
 
 static void	clockattach(device_t, device_t, void *);
 static int	clockmatch(device_t, cfdata_t, void *);
@@ -482,7 +482,7 @@ atari_rtc_set(todr_chip_handle_t todr, s
 /***
  *   RTC-device support   *
  ***/
-int
+static int
 rtcopen(dev_t dev, int flag, int mode, struct lwp *l)
 {
 	int			unit = minor(dev);
@@ -498,7 +498,7 @@ rtcopen(dev_t dev, int flag, int mode, s
 	return 0;
 }
 
-int
+static int
 rtcclose(dev_t dev, int flag, int mode, struct lwp *l)
 {
 	int			unit = minor(dev);
@@ -508,7 +508,7 @@ rtcclose(dev_t dev, int flag, int mode, 
 	return 0;
 }
 
-int
+static int
 rtcread(dev_t dev, struct uio *uio, int flags)
 {
 	mc_todregs		clkregs;
@@ -546,7 +546,7 @@ twodigits(char *buffer, int pos)
 	return result;
 }
 
-int
+static int
 rtcwrite(dev_t dev, struct uio *uio, int flags)
 {
 	mc_todregs		clkregs;

Index: src/sys/arch/atari/dev/fd.c
diff -u src/sys/arch/atari/dev/fd.c:1.92 src/sys/arch/atari/dev/fd.c:1.93
--- src/sys/arch/atari/dev/fd.c:1.92	Sun May 15 20:37:51 2022
+++ src/sys/arch/atari/dev/fd.c	Sun Jun 26 06:25:09 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: fd.c,v 1.92 2022/05/15 20:37:51 andvar Exp $	*/
+/*	$NetBSD: fd.c,v 1.93 2022/06/26 06:25:09 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman.
@@ -44,7 +44,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.92 2022/05/15 20:37:51 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fd.c,v 1.93 2022/06/26 06:25:09 tsutsui Exp $");
 
 #include 
 #include 
@@ -193,12 +193,12 @@ static short	def_type = 0;		/* Reflects 
 
 typedef void	(*FPV)(void *);
 
-dev_type_open(fdopen);
-dev_type_close(fdclose);
-dev_type_read(fdread);
-dev_type_write(fdwrite);
-dev_type_ioctl(fdioctl);
-dev_type_strategy(fdstrategy);
+static dev_type_open(fdopen);
+static dev_type_close(fdclose);
+static dev_type_read(fdread);
+static dev_type_write(fdwrite);
+static dev_type_ioctl(fdioctl);
+static dev_type_strategy(fdstrategy);
 
 /*
  * Private drive functions
@@ -424,7 +424,7 @@ fdattach(device_t parent, device_t self,
 	disk_attach(&sc->dkdev);
 }
 
-int
+static int
 fdioctl(dev_t dev, u_long cmd, void * addr, int flag, struct lwp *l)
 {
 	struct fd_softc *sc;
@@ -465,7 +465,7 @@ fdioctl(dev_t dev, u_long cmd, void * ad
  *	partition 0: 360Kb
  *	partition 1: 780Kb
  */
-int
+static int
 fdopen(dev_t dev, int flags, int devtype, struct lwp *l)
 {
 	struct fd_softc	*sc;
@@ -564,7 +564,7 @@ fdopen(dev_t dev, int flags, int devtype
 	return 0;
 }
 
-int
+static int
 fdclose(dev_t dev, int flags, int devtype, struct lwp *l)
 {
 	struct fd_softc	*sc;
@@ -580,7 +580,7 @@ fdclose(dev_t dev, int flags, int devtyp
 	return 0;
 }
 
-void
+static void
 fdstrategy(struct buf *bp)
 {
 	struct fd_softc *sc;
@@ -648,14 +648,14 @@ done:
 	biodone(bp);
 }
 
-int
+static int
 fdread(dev_t dev, struct uio *uio, int flags)
 {
 
 	return physio(fdstrategy, NULL, dev, B_

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

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 26 06:02:28 UTC 2022

Modified Files:
src/sys/arch/atari/dev: ms.c msvar.h

Log Message:
Misc KNF and cleanup for readability.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/atari/dev/ms.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/atari/dev/msvar.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/atari/dev/ms.c
diff -u src/sys/arch/atari/dev/ms.c:1.26 src/sys/arch/atari/dev/ms.c:1.27
--- src/sys/arch/atari/dev/ms.c:1.26	Fri Jul 25 08:10:32 2014
+++ src/sys/arch/atari/dev/ms.c	Sun Jun 26 06:02:28 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ms.c,v 1.26 2014/07/25 08:10:32 dholland Exp $	*/
+/*	$NetBSD: ms.c,v 1.27 2022/06/26 06:02:28 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman.
@@ -52,7 +52,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ms.c,v 1.26 2014/07/25 08:10:32 dholland Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ms.c,v 1.27 2022/06/26 06:02:28 tsutsui Exp $");
 
 #include 
 #include 
@@ -79,9 +79,9 @@ __KERNEL_RCSID(0, "$NetBSD: ms.c,v 1.26 
 #define NMOUSE 1
 #endif
 
-typedef void	(*FPV)(void *);
+typedef void (*FPV)(void *);
 
-static struct ms_softc	ms_softc[NMOUSE];
+static struct ms_softc ms_softc[NMOUSE];
 
 dev_type_open(msopen);
 dev_type_close(msclose);
@@ -105,45 +105,47 @@ const struct cdevsw ms_cdevsw = {
 	.d_flag = 0
 };
 
-static	void	ms_3b_delay(struct ms_softc *);
+static void ms_3b_delay(struct ms_softc *);
 
 int
 mouseattach(int cnt)
 {
+
 	printf("1 mouse configured\n");
 	ms_softc[0].ms_emul3b = 1;
 	callout_init(&ms_softc[0].ms_delay_ch, 0);
-	return(NMOUSE);
+
+	return NMOUSE;
 }
 
 static void
 ms_3b_delay(struct ms_softc *ms)
 {
-	REL_MOUSE	rel_ms;
+	REL_MOUSE rel_ms;
 
 	rel_ms.id = TIMEOUT_ID;
 	rel_ms.dx = rel_ms.dy = 0;
 	mouse_soft(&rel_ms, sizeof(rel_ms), KBD_TIMEO_PKG);
 }
-/* 
+/*
  * Note that we are called from the keyboard software interrupt!
  */
 void
 mouse_soft(REL_MOUSE *rel_ms, int size, int type)
 {
-	struct ms_softc		*ms = &ms_softc[0];
-	struct firm_event	*fe, *fe2;
-	REL_MOUSE		fake_mouse;
-	int			get, put;
-	int			sps;
-	u_char			mbut, bmask;
-	int			flush_buttons;
+	struct ms_softc *ms = &ms_softc[0];
+	struct firm_event *fe, *fe2;
+	REL_MOUSE fake_mouse;
+	int get, put;
+	int s;
+	uint8_t mbut, bmask;
+	int flush_buttons;
 
 	if (ms->ms_events.ev_io == NULL)
 		return;
 
 	switch (type) {
-	case KBD_JOY1_PKG:
+	case KBD_JOY1_PKG:
 		/*
 		 * Ignore if in emulation mode
 		 */
@@ -158,11 +160,12 @@ mouse_soft(REL_MOUSE *rel_ms, int size, 
 		 * Flush all button changes.
 		 */
 		flush_buttons = 1;
-		fake_mouse.id = (rel_ms->dx & 1 ? 4 : 0) | (ms->ms_buttons & 3);
+		fake_mouse.id = ((rel_ms->dx & 0x01) != 0 ? 0x04 : 0x00) |
+		(ms->ms_buttons & 0x03);
 		fake_mouse.dx = fake_mouse.dy = 0;
 		rel_ms = &fake_mouse;
 		break;
-	case KBD_TIMEO_PKG:
+	case KBD_TIMEO_PKG:
 		/*
 		 * Timeout package. No button changes and no movement.
 		 * Flush all button changes.
@@ -172,31 +175,31 @@ mouse_soft(REL_MOUSE *rel_ms, int size, 
 		fake_mouse.dx = fake_mouse.dy = 0;
 		rel_ms = &fake_mouse;
 		break;
-	case KBD_RMS_PKG:
+	case KBD_RMS_PKG:
 		/*
 		 * Normal mouse package. Always copy the middle button
 		 * status. The emulation code decides if button changes
 		 * must be flushed.
 		 */
-		rel_ms->id = (ms->ms_buttons & 4) | (rel_ms->id & 3);
-		flush_buttons = (ms->ms_emul3b) ? 0 : 1;
+		rel_ms->id = (ms->ms_buttons & 0x04) | (rel_ms->id & 0x03);
+		flush_buttons = ms->ms_emul3b ? 0 : 1;
 		break;
-	default:
+	default:
 		return;
 	}
 
-	sps = splev();
+	s = splev();
 	get = ms->ms_events.ev_get;
 	put = ms->ms_events.ev_put;
 	fe  = &ms->ms_events.ev_q[put];
 
-	if ((type != KBD_TIMEO_PKG) && ms->ms_emul3b && ms->ms_bq_idx)
+	if ((type != KBD_TIMEO_PKG) && ms->ms_emul3b && ms->ms_bq_idx != 0)
 		callout_stop(&ms->ms_delay_ch);
 
 	/*
 	 * Button states are encoded in the lower 3 bits of 'id'
 	 */
-	if (!(mbut = (rel_ms->id ^ ms->ms_buttons)) && (put != get)) {
+	if ((mbut = (rel_ms->id ^ ms->ms_buttons)) == 0 && (put != get)) {
 		/*
 		 * Compact dx/dy messages. Always generate an event when
 		 * a button is pressed or the event queue is empty.
@@ -213,7 +216,7 @@ mouse_soft(REL_MOUSE *rel_ms, int size, 
 	 * Output location events _before_ button events ie. make sure
 	 * the button is pressed at the correct location.
 	 */
-	if (rel_ms->dx) {
+	if (rel_ms->dx != 0) {
 		if ((++put) % EV_QSIZE == get) {
 			put--;
 			goto out;
@@ -224,10 +227,11 @@ mouse_soft(REL_MOUSE *rel_ms, int size, 
 		if (put >= EV_QSIZE) {
 			put = 0;
 			fe  = &ms->ms_events.ev_q[0];
+		} else {
+			fe++;
 		}
-		else fe++;
 	}
-	if (rel_ms->dy) {
+	if (rel_ms->dy != 0) {
 		if ((++put) % EV_QSIZE == get) {
 			put--;
 			goto out;
@@ -238,20 +242,23 @@ mouse_soft(REL_MOUSE *rel_ms, int size, 
 		if (put >= EV_QSIZE) {
 			put = 0;
 			fe  = &ms-

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

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 26 06:02:28 UTC 2022

Modified Files:
src/sys/arch/atari/dev: ms.c msvar.h

Log Message:
Misc KNF and cleanup for readability.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/atari/dev/ms.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/atari/dev/msvar.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/atari/vme

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 26 05:16:22 UTC 2022

Modified Files:
src/sys/arch/atari/vme: vme_machdep.c

Log Message:
Misc cleanup.

- use a local variable static
- use aprint_*(9) for attach messages
- KNF


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/atari/vme/vme_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/atari/vme/vme_machdep.c
diff -u src/sys/arch/atari/vme/vme_machdep.c:1.23 src/sys/arch/atari/vme/vme_machdep.c:1.24
--- src/sys/arch/atari/vme/vme_machdep.c:1.23	Sat Aug  7 16:18:47 2021
+++ src/sys/arch/atari/vme/vme_machdep.c	Sun Jun 26 05:16:22 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: vme_machdep.c,v 1.23 2021/08/07 16:18:47 thorpej Exp $	*/
+/*	$NetBSD: vme_machdep.c,v 1.24 2022/06/26 05:16:22 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vme_machdep.c,v 1.23 2021/08/07 16:18:47 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vme_machdep.c,v 1.24 2022/06/26 05:16:22 tsutsui Exp $");
 
 #include 
 #include 
@@ -53,9 +53,9 @@ static void	vmebusattach(device_t, devic
 CFATTACH_DECL_NEW(avmebus, 0,
 vmebusmatch, vmebusattach, NULL, NULL);
 
-int vmebus_attached;
+static int vmebus_attached;
 
-int
+static int
 vmebusmatch(device_t parent, cfdata_t cf, void *aux)
 {
 
@@ -63,13 +63,13 @@ vmebusmatch(device_t parent, cfdata_t cf
 		return 0;
 	if (strcmp((char *)aux, "avmebus") || vmebus_attached)
 		return 0;
-	return (machineid & ATARI_FALCON) ? 0 : 1;
+	return ((machineid & ATARI_FALCON) != 0) ? 0 : 1;
 }
 
-void
+static void
 vmebusattach(device_t parent, device_t self, void *aux)
 {
-	struct vmebus_attach_args	vba;
+	struct vmebus_attach_args vba;
 
 	vmebus_attached = 1;
 
@@ -77,7 +77,7 @@ vmebusattach(device_t parent, device_t s
 	vba.vba_iot = beb_alloc_bus_space_tag(NULL);
 	vba.vba_memt= beb_alloc_bus_space_tag(NULL);
 	if ((vba.vba_iot == NULL) || (vba.vba_memt == NULL)) {
-		printf("beb_alloc_bus_space_tag failed!\n");
+		aprint_error("beb_alloc_bus_space_tag failed!\n");
 		return;
 	}
 
@@ -87,11 +87,11 @@ vmebusattach(device_t parent, device_t s
 	vba.vba_iot->base  = 0;
 	vba.vba_memt->base = 0;
 
-	printf("\n");
+	aprint_normal("\n");
 	config_found(self, &vba, vmebusprint, CFARGS_NONE);
 }
 
-int
+static int
 vmebusprint(void *aux, const char *name)
 {
 



CVS commit: src/sys/arch/atari/vme

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 26 05:16:22 UTC 2022

Modified Files:
src/sys/arch/atari/vme: vme_machdep.c

Log Message:
Misc cleanup.

- use a local variable static
- use aprint_*(9) for attach messages
- KNF


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

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 26 05:11:54 UTC 2022

Modified Files:
src/sys/arch/atari/vme: vme.c

Log Message:
Misc cleanup.

- make local functions static
- use aprint_normal(9) for attach message
- KNF


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/atari/vme/vme.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/atari/vme/vme.c
diff -u src/sys/arch/atari/vme/vme.c:1.19 src/sys/arch/atari/vme/vme.c:1.20
--- src/sys/arch/atari/vme/vme.c:1.19	Sat Aug  7 16:18:47 2021
+++ src/sys/arch/atari/vme/vme.c	Sun Jun 26 05:11:54 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: vme.c,v 1.19 2021/08/07 16:18:47 thorpej Exp $	*/
+/*	$NetBSD: vme.c,v 1.20 2022/06/26 05:11:54 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1997 The NetBSD Foundation, Inc.
@@ -27,7 +27,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: vme.c,v 1.19 2021/08/07 16:18:47 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: vme.c,v 1.20 2022/06/26 05:11:54 tsutsui Exp $");
 
 #include 
 #include 
@@ -40,33 +40,33 @@ __KERNEL_RCSID(0, "$NetBSD: vme.c,v 1.19
 
 #include 
 
-int vmematch(device_t, cfdata_t, void *);
-void vmeattach(device_t, device_t, void *);
-int vmeprint(void *, const char *);
+static int vmematch(device_t, cfdata_t, void *);
+static void vmeattach(device_t, device_t, void *);
+static int vmeprint(void *, const char *);
 
 CFATTACH_DECL_NEW(vme, sizeof(struct vme_softc),
 vmematch, vmeattach, NULL, NULL);
 
-int	vmesearch(device_t, cfdata_t, const int *, void *);
+static int vmesearch(device_t, cfdata_t, const int *, void *);
 
-int
+static int
 vmematch(device_t parent, cfdata_t cf, void *aux)
 {
 	struct vmebus_attach_args *vba = aux;
 
 	if (strcmp(vba->vba_busname, cf->cf_name))
-		return (0);
+		return 0;
 
-return (1);
+return 1;
 }
 
-void
+static void
 vmeattach(device_t parent, device_t self, void *aux)
 {
 	struct vme_softc *sc = device_private(self);
 	struct vmebus_attach_args *vba = aux;
 
-	printf("\n");
+	aprint_normal("\n");
 
 	sc->sc_dev = self;
 	sc->sc_iot  = vba->vba_iot;
@@ -77,7 +77,7 @@ vmeattach(device_t parent, device_t self
 	CFARGS(.search = vmesearch));
 }
 
-int
+static int
 vmeprint(void *aux, const char *vme)
 {
 	struct vme_attach_args *va = aux;
@@ -92,10 +92,10 @@ vmeprint(void *aux, const char *vme)
 		aprint_normal("-0x%x", va->va_maddr + va->va_msize - 1);
 	if (va->va_irq != IRQUNK)
 		aprint_normal(" irq %d", va->va_irq);
-	return (UNCONF);
+	return UNCONF;
 }
 
-int
+static int
 vmesearch(device_t parent, cfdata_t cf, const int *ldesc, void *aux)
 {
 	struct vme_softc *sc = device_private(parent);
@@ -112,5 +112,5 @@ vmesearch(device_t parent, cfdata_t cf, 
 
 	if (config_probe(parent, cf, &va))
 		config_attach(parent, cf, &va, vmeprint, CFARGS_NONE);
-	return (0);
+	return 0;
 }



CVS commit: src/sys/arch/atari/vme

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 26 05:11:54 UTC 2022

Modified Files:
src/sys/arch/atari/vme: vme.c

Log Message:
Misc cleanup.

- make local functions static
- use aprint_normal(9) for attach message
- KNF


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/atari/vme/vme.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/atari/vme

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 26 04:51:17 UTC 2022

Modified Files:
src/sys/arch/atari/vme: if_le_vme.c

Log Message:
Misc cleanup.

- KNF and TAB/space
- make local function static
- make readonly values const
- remove ancient "hide" and "integrate" macro
  (just use static for modern compliers that perform inline properly)
- remove (probably) an old gcc's warning hack
- use __func__ to print function names properly
- fix attach messages in an error path
- use proper integer types


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/atari/vme/if_le_vme.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/atari/vme/if_le_vme.c
diff -u src/sys/arch/atari/vme/if_le_vme.c:1.33 src/sys/arch/atari/vme/if_le_vme.c:1.34
--- src/sys/arch/atari/vme/if_le_vme.c:1.33	Sat Jun 25 22:38:43 2022
+++ src/sys/arch/atari/vme/if_le_vme.c	Sun Jun 26 04:51:17 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_le_vme.c,v 1.33 2022/06/25 22:38:43 tsutsui Exp $	*/
+/*	$NetBSD: if_le_vme.c,v 1.34 2022/06/26 04:51:17 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 maximum entropy.  All rights reserved.
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,v 1.33 2022/06/25 22:38:43 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,v 1.34 2022/06/26 04:51:17 tsutsui Exp $");
 
 #include "opt_inet.h"
 
@@ -117,7 +117,7 @@ __KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,
  *  - On PAM and ROTHRON, mem_addr cannot be mapped if reg_addr is already
  *mapped because they are overwrapped. Just use 32KB as Linux does.
  */
-struct le_addresses {
+static struct le_addresses {
 	u_long	reg_addr;
 	u_long	mem_addr;
 	int	irq;
@@ -141,7 +141,7 @@ struct le_addresses {
  * Default mac for RIEBL cards without a (working) battery. The first 4 bytes
  * are the manufacturer id.
  */
-static u_char riebl_def_mac[] = {
+static const uint8_t riebl_def_mac[] = {
 	0x00, 0x00, 0x36, 0x04, 0x00, 0x00
 };
 
@@ -165,22 +165,14 @@ CFATTACH_DECL_NEW(le_vme, sizeof(struct 
 #include "opt_ddb.h"
 #endif
 
-#ifdef DDB
-#define	integrate
-#define hide
-#else
-#define	integrate	static inline
-#define hide		static
-#endif
-
-hide void lewrcsr(struct lance_softc *, uint16_t, uint16_t);
-hide uint16_t lerdcsr(struct lance_softc *, uint16_t);
+static void lewrcsr(struct lance_softc *, uint16_t, uint16_t);
+static uint16_t lerdcsr(struct lance_softc *, uint16_t);
 
-hide void
+static void
 lewrcsr(struct lance_softc *sc, uint16_t port, uint16_t val)
 {
-	struct le_softc		*lesc = (struct le_softc *)sc;
-	int			s;
+	struct le_softc *lesc = (struct le_softc *)sc;
+	int s;
 
 	s = splhigh();
 	bus_space_write_2(lesc->sc_iot, lesc->sc_ioh, LER_RAP, port);
@@ -188,12 +180,12 @@ lewrcsr(struct lance_softc *sc, uint16_t
 	splx(s);
 }
 
-hide uint16_t
+static uint16_t
 lerdcsr(struct lance_softc *sc, uint16_t port)
 {
-	struct le_softc		*lesc = (struct le_softc *)sc;
-	uint16_t		val;
-	int			s;
+	struct le_softc *lesc = (struct le_softc *)sc;
+	uint16_t val;
+	int s;
 
 	s = splhigh();
 	bus_space_write_2(lesc->sc_iot, lesc->sc_ioh, LER_RAP, port);
@@ -206,19 +198,17 @@ lerdcsr(struct lance_softc *sc, uint16_t
 static int
 le_vme_match(device_t parent, cfdata_t cfp, void *aux)
 {
-	struct vme_attach_args	*va = aux;
-	int			i;
-	bus_space_tag_t		iot;
-	bus_space_tag_t		memt;
-	bus_space_handle_t	ioh;
-	bus_space_handle_t	memh;
+	struct vme_attach_args *va = aux;
+	int i;
+	bus_space_tag_t iot, memt;
+	bus_space_handle_t ioh, memh;
 
 	iot  = va->va_iot;
 	memt = va->va_memt;
 
 	for (i = 0; i < NLESTD; i++) {
-		struct le_addresses	*le_ap = &lestd[i];
-		int			found  = 0;
+		struct le_addresses *le_ap = &lestd[i];
+		int found;
 
 		if ((va->va_iobase != IOBASEUNK)
 		 && (va->va_iobase != le_ap->reg_addr))
@@ -325,8 +315,8 @@ probe_addresses(bus_space_tag_t	*iot, bu
 static int
 le_intr(struct le_softc *lesc, int sr)
 {
-	struct lance_softc	*sc = &lesc->sc_am7990.lsc;
-	uint16_t		csr0;
+	struct lance_softc *sc = &lesc->sc_am7990.lsc;
+	uint16_t csr0;
 
 	if ((sr & PSL_IPL) < (ipl2psl_table[IPL_NET] & PSL_IPL))
 		am7990_intr(sc);
@@ -342,7 +332,7 @@ le_intr(struct le_softc *lesc, int sr)
 static void
 lepseudointr(struct le_softc *lesc, void *sc)
 {
-	int	s;
+	int s;
 
 	s = splx(lesc->sc_splval);
 	am7990_intr(sc);
@@ -352,25 +342,27 @@ lepseudointr(struct le_softc *lesc, void
 static void
 le_vme_attach(device_t parent, device_t self, void *aux)
 {
-	struct le_softc		*lesc = device_private(self);
-	struct lance_softc	*sc = &lesc->sc_am7990.lsc;
-	struct vme_attach_args	*va = aux;
-	bus_space_handle_t	ioh;
-	bus_space_handle_t	memh;
-	struct le_addresses	*le_ap;
-	int			i;
+	struct le_softc *lesc = device_private(self);
+	struct lance_softc *sc = &lesc->sc_am7990.lsc;
+	struct vme_attach_args *va = aux;
+	bus_space_tag_t iot, memt;
+	bus_space_handle_t ioh, memh;
+	struct le_addresses *le_ap;

CVS commit: src/sys/arch/atari/vme

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 26 04:51:17 UTC 2022

Modified Files:
src/sys/arch/atari/vme: if_le_vme.c

Log Message:
Misc cleanup.

- KNF and TAB/space
- make local function static
- make readonly values const
- remove ancient "hide" and "integrate" macro
  (just use static for modern compliers that perform inline properly)
- remove (probably) an old gcc's warning hack
- use __func__ to print function names properly
- fix attach messages in an error path
- use proper integer types


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/atari/vme/if_le_vme.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/atari/dev

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 26 04:45:31 UTC 2022

Modified Files:
src/sys/arch/atari/dev: kbd.c

Log Message:
Restore redundant register accesses as the original implementation did.

It looks my refactored one for entropy sometimes returns unexpected
values and they cause "kbd: Unknown packet 0xfd" errors and missing
keyboard release events.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/atari/dev/kbd.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/atari/dev/kbd.c
diff -u src/sys/arch/atari/dev/kbd.c:1.54 src/sys/arch/atari/dev/kbd.c:1.55
--- src/sys/arch/atari/dev/kbd.c:1.54	Sat Jun 25 16:09:28 2022
+++ src/sys/arch/atari/dev/kbd.c	Sun Jun 26 04:45:30 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: kbd.c,v 1.54 2022/06/25 16:09:28 tsutsui Exp $	*/
+/*	$NetBSD: kbd.c,v 1.55 2022/06/26 04:45:30 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.54 2022/06/25 16:09:28 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.55 2022/06/26 04:45:30 tsutsui Exp $");
 
 #include "mouse.h"
 #include "ite.h"
@@ -435,11 +435,12 @@ kbdintr(int sr)
 	rndstat = stat;
 	while ((stat & (A_RXRDY | A_OE | A_PE)) != 0) {
 		got_char = true;
-		code = KBD->ac_da;
-		if ((stat & (A_OE | A_PE)) == 0) {
+		if ((KBD->ac_cs & (A_OE | A_PE)) == 0) {
+			code = KBD->ac_da;
 			kbd_ring[kbd_rbput++ & KBD_RING_MASK] = code;
 		} else {
 			/* Silently ignore errors */
+			code = KBD->ac_da;
 		}
 		stat = KBD->ac_cs;
 	}



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

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 26 04:45:31 UTC 2022

Modified Files:
src/sys/arch/atari/dev: kbd.c

Log Message:
Restore redundant register accesses as the original implementation did.

It looks my refactored one for entropy sometimes returns unexpected
values and they cause "kbd: Unknown packet 0xfd" errors and missing
keyboard release events.


To generate a diff of this commit:
cvs rdiff -u -r1.54 -r1.55 src/sys/arch/atari/dev/kbd.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/atari/vme

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 25 22:38:43 UTC 2022

Modified Files:
src/sys/arch/atari/vme: if_le_vme.c

Log Message:
No need to print errors via aprint_error(9) in probe/match function.

Note aprint_error(9) triggers "WARNING: 1 error while detecting hardware"
message after device configuration, so it's a bit confusing for users.
Also check all possible variants even if bus_space_map(9) fails
(though now it shouldn't fail).


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/atari/vme/if_le_vme.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/atari/vme/if_le_vme.c
diff -u src/sys/arch/atari/vme/if_le_vme.c:1.32 src/sys/arch/atari/vme/if_le_vme.c:1.33
--- src/sys/arch/atari/vme/if_le_vme.c:1.32	Sat Jun 25 22:31:09 2022
+++ src/sys/arch/atari/vme/if_le_vme.c	Sat Jun 25 22:38:43 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_le_vme.c,v 1.32 2022/06/25 22:31:09 tsutsui Exp $	*/
+/*	$NetBSD: if_le_vme.c,v 1.33 2022/06/25 22:38:43 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 maximum entropy.  All rights reserved.
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,v 1.32 2022/06/25 22:31:09 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,v 1.33 2022/06/25 22:38:43 tsutsui Exp $");
 
 #include "opt_inet.h"
 
@@ -233,8 +233,7 @@ le_vme_match(device_t parent, cfdata_t c
 
 		if (bus_space_map(iot, le_ap->reg_addr, le_ap->reg_size, 0,
 		&ioh)) {
-			aprint_error("leprobe: cannot map io-area\n");
-			return 0;
+			continue;
 		}
 		if (le_ap->mem_size == VMECF_MEMSIZ_DEFAULT) {
 			if (bvme410_probe(iot, ioh)) {
@@ -252,8 +251,7 @@ le_vme_match(device_t parent, cfdata_t c
 		if (bus_space_map(memt, le_ap->mem_addr, le_ap->mem_size, 0,
 		&memh)) {
 			bus_space_unmap(iot, ioh, le_ap->reg_size);
-			aprint_error("leprobe: cannot map memory-area\n");
-			return 0;
+			continue;
 		}
 		found = probe_addresses(&iot, &memt, &ioh, &memh);
 		bus_space_unmap(iot, ioh, le_ap->reg_size);



CVS commit: src/sys/arch/atari/vme

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 25 22:38:43 UTC 2022

Modified Files:
src/sys/arch/atari/vme: if_le_vme.c

Log Message:
No need to print errors via aprint_error(9) in probe/match function.

Note aprint_error(9) triggers "WARNING: 1 error while detecting hardware"
message after device configuration, so it's a bit confusing for users.
Also check all possible variants even if bus_space_map(9) fails
(though now it shouldn't fail).


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/atari/vme/if_le_vme.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/atari/vme

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 25 22:31:09 UTC 2022

Modified Files:
src/sys/arch/atari/vme: if_le_vme.c

Log Message:
Fix a long-standing "leprobe: cannot map memory-area" error during probe.

PAM and ROTHRON VME LANCE seem to have 64KB RAM, but the register
address region are overwrapped, so we cannot map both of them via
bus_space_map(9) that checks regions using extent(9).
To work around this, just use only 32KB RAM for buffers.
XXX: not sure if anyone tried these VME LANCE variants


To generate a diff of this commit:
cvs rdiff -u -r1.31 -r1.32 src/sys/arch/atari/vme/if_le_vme.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/atari/vme/if_le_vme.c
diff -u src/sys/arch/atari/vme/if_le_vme.c:1.31 src/sys/arch/atari/vme/if_le_vme.c:1.32
--- src/sys/arch/atari/vme/if_le_vme.c:1.31	Fri Jul  1 20:34:06 2011
+++ src/sys/arch/atari/vme/if_le_vme.c	Sat Jun 25 22:31:09 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: if_le_vme.c,v 1.31 2011/07/01 20:34:06 dyoung Exp $	*/
+/*	$NetBSD: if_le_vme.c,v 1.32 2022/06/25 22:31:09 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 maximum entropy.  All rights reserved.
@@ -74,7 +74,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,v 1.31 2011/07/01 20:34:06 dyoung Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,v 1.32 2022/06/25 22:31:09 tsutsui Exp $");
 
 #include "opt_inet.h"
 
@@ -111,8 +111,11 @@ __KERNEL_RCSID(0, "$NetBSD: if_le_vme.c,
 #include 
 
 /*
- * All cards except BVME410 have 64KB RAM. However On the Riebl cards the
- * area between the offsets 0xee70-0xeec0 is used to store config data.
+ * All cards except BVME410 have 64KB RAM. However,
+ *  - On the Riebl cards the area between the offsets 0xee70-0xeec0 is used
+ *to store config data.
+ *  - On PAM and ROTHRON, mem_addr cannot be mapped if reg_addr is already
+ *mapped because they are overwrapped. Just use 32KB as Linux does.
  */
 struct le_addresses {
 	u_long	reg_addr;
@@ -124,9 +127,9 @@ struct le_addresses {
 } lestd[] = {
 	{ 0xfe00fff0, 0xfe01, IRQUNK, 16, 64*1024,
 LE_OLD_RIEBL|LE_NEW_RIEBL }, /* Riebl	*/
-	{ 0xfec0, 0xfecf,  5, 16, 64*1024,
+	{ 0xfec0, 0xfecf,  5, 16, 32*1024,
 LE_PAM },		 /* PAM	*/
-	{ 0xfec0, 0xfecf,  5, 16, 64*1024,
+	{ 0xfec0, 0xfecf,  5, 16, 32*1024,
 LE_ROTHRON },		 /* Rhotron	*/
 	{ 0xfeff4100, 0xfe00,  4,  8, VMECF_MEMSIZ_DEFAULT,
 LE_BVME410 }		 /* BVME410 */



CVS commit: src/sys/arch/atari/vme

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 25 22:31:09 UTC 2022

Modified Files:
src/sys/arch/atari/vme: if_le_vme.c

Log Message:
Fix a long-standing "leprobe: cannot map memory-area" error during probe.

PAM and ROTHRON VME LANCE seem to have 64KB RAM, but the register
address region are overwrapped, so we cannot map both of them via
bus_space_map(9) that checks regions using extent(9).
To work around this, just use only 32KB RAM for buffers.
XXX: not sure if anyone tried these VME LANCE variants


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

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 25 16:09:28 UTC 2022

Modified Files:
src/sys/arch/atari/dev: kbd.c

Log Message:
Add rnd(9) entropy source from keyboard and mouse.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/atari/dev/kbd.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/atari/dev/kbd.c
diff -u src/sys/arch/atari/dev/kbd.c:1.53 src/sys/arch/atari/dev/kbd.c:1.54
--- src/sys/arch/atari/dev/kbd.c:1.53	Sat Jun 25 15:36:33 2022
+++ src/sys/arch/atari/dev/kbd.c	Sat Jun 25 16:09:28 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: kbd.c,v 1.53 2022/06/25 15:36:33 tsutsui Exp $	*/
+/*	$NetBSD: kbd.c,v 1.54 2022/06/25 16:09:28 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.53 2022/06/25 15:36:33 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.54 2022/06/25 16:09:28 tsutsui Exp $");
 
 #include "mouse.h"
 #include "ite.h"
@@ -48,6 +48,8 @@ __KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.53
 #include 
 #include 
 #include 
+#include 
+
 #include 
 #include 
 #include 
@@ -93,6 +95,7 @@ struct kbd_softc {
 	int		sc_pollingmode;	/* polling mode on? whatever it is... */
 #endif
 	void		*sc_sicookie;	/* softint(9) cookie		*/
+	krndsource_t	sc_rndsource;	/* rnd(9) entropy 		*/
 };
 
 /* WSKBD */
@@ -252,6 +255,8 @@ kbdattach(device_t parent, device_t self
 	kbd_write_poll(kbd_icmd, sizeof(kbd_icmd));
 
 	sc->sc_sicookie = softint_establish(SOFTINT_SERIAL, kbdsoft, NULL);
+	rnd_attach_source(&sc->sc_rndsource, device_xname(self),
+	RND_TYPE_TTY, RND_FLAG_DEFAULT);
 
 #if NWSKBD > 0
 	if (self != NULL) {
@@ -419,20 +424,24 @@ kbdintr(int sr)
 	/* sr: sr at time of interrupt	*/
 {
 	struct kbd_softc *sc = &kbd_softc;
-	uint8_t code;
+	uint8_t stat, code;
+	uint32_t rndstat;
 	bool got_char = false;
 
 	/*
 	 * There may be multiple keys available. Read them all.
 	 */
-	while ((KBD->ac_cs & (A_RXRDY | A_OE | A_PE)) != 0) {
+	stat = KBD->ac_cs;
+	rndstat = stat;
+	while ((stat & (A_RXRDY | A_OE | A_PE)) != 0) {
 		got_char = true;
 		code = KBD->ac_da;
-		if ((KBD->ac_cs & (A_OE | A_PE)) != 0) {
+		if ((stat & (A_OE | A_PE)) == 0) {
+			kbd_ring[kbd_rbput++ & KBD_RING_MASK] = code;
+		} else {
 			/* Silently ignore errors */
-			continue;
 		}
-		kbd_ring[kbd_rbput++ & KBD_RING_MASK] = code;
+		stat = KBD->ac_cs;
 	}
 
 	/*
@@ -456,9 +465,12 @@ kbdintr(int sr)
 
 	/*
 	 * Activate software-level to handle possible input.
+	 * Also add status and data to the rnd(9) pool.
 	 */
-	if (got_char)
+	if (got_char) {
 		softint_schedule(sc->sc_sicookie);
+		rnd_add_uint32(&sc->sc_rndsource, (rndstat << 8) | code);
+	}
 }
 
 /*



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

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 25 16:09:28 UTC 2022

Modified Files:
src/sys/arch/atari/dev: kbd.c

Log Message:
Add rnd(9) entropy source from keyboard and mouse.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/atari/dev/kbd.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/atari/dev

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 25 15:36:33 UTC 2022

Modified Files:
src/sys/arch/atari/dev: kbd.c

Log Message:
Use aprint_*(9) for device attach messages.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/atari/dev/kbd.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/atari/dev/kbd.c
diff -u src/sys/arch/atari/dev/kbd.c:1.52 src/sys/arch/atari/dev/kbd.c:1.53
--- src/sys/arch/atari/dev/kbd.c:1.52	Sat Jun 25 15:10:26 2022
+++ src/sys/arch/atari/dev/kbd.c	Sat Jun 25 15:36:33 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: kbd.c,v 1.52 2022/06/25 15:10:26 tsutsui Exp $	*/
+/*	$NetBSD: kbd.c,v 1.53 2022/06/25 15:36:33 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.52 2022/06/25 15:10:26 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.53 2022/06/25 15:36:33 tsutsui Exp $");
 
 #include "mouse.h"
 #include "ite.h"
@@ -236,8 +236,9 @@ kbdattach(device_t parent, device_t self
 	/*
 	 * Now send the reset string, and read+ignore its response
 	 */
+	aprint_normal("\n");
 	if (kbd_write_poll(kbd_rst, 2) == 0)
-		printf("kbd: error cannot reset keyboard\n");
+		aprint_error_dev(self, "error cannot reset keyboard\n");
 	for (timeout = 1000; timeout > 0; timeout--) {
 		if ((KBD->ac_cs & (A_IRQ | A_RXRDY)) != 0) {
 			timeout = KBD->ac_da;
@@ -250,8 +251,6 @@ kbdattach(device_t parent, device_t self
 	 */
 	kbd_write_poll(kbd_icmd, sizeof(kbd_icmd));
 
-	printf("\n");
-
 	sc->sc_sicookie = softint_establish(SOFTINT_SERIAL, kbdsoft, NULL);
 
 #if NWSKBD > 0



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

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 25 15:36:33 UTC 2022

Modified Files:
src/sys/arch/atari/dev: kbd.c

Log Message:
Use aprint_*(9) for device attach messages.


To generate a diff of this commit:
cvs rdiff -u -r1.52 -r1.53 src/sys/arch/atari/dev/kbd.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/atari/dev

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 25 15:10:26 UTC 2022

Modified Files:
src/sys/arch/atari/dev: kbd.c

Log Message:
Rename and reformat softc stuff for readablity, and misc more cleanups.

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/atari/dev/kbd.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/atari/dev/kbd.c
diff -u src/sys/arch/atari/dev/kbd.c:1.51 src/sys/arch/atari/dev/kbd.c:1.52
--- src/sys/arch/atari/dev/kbd.c:1.51	Sat Jun 25 14:39:19 2022
+++ src/sys/arch/atari/dev/kbd.c	Sat Jun 25 15:10:26 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: kbd.c,v 1.51 2022/06/25 14:39:19 tsutsui Exp $	*/
+/*	$NetBSD: kbd.c,v 1.52 2022/06/25 15:10:26 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.51 2022/06/25 14:39:19 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.52 2022/06/25 15:10:26 tsutsui Exp $");
 
 #include "mouse.h"
 #include "ite.h"
@@ -78,21 +78,21 @@ __KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.51
 #define KBD_RING_MASK	255   /* Modulo mask for above			 */
 
 struct kbd_softc {
-	int		k_event_mode;	/* if 1, collect events,	*/
+	int		sc_event_mode;	/* if 1, collect events,	*/
 	/*   else pass to ite		*/
-	struct evvar	k_events;	/* event queue state		*/
-	uint8_t		k_soft_cs;	/* control-reg. copy		*/
-	uint8_t		k_package[20];	/* XXX package being build	*/
-	uint8_t		k_pkg_size;	/* Size of the package		*/
-	uint8_t		k_pkg_idx;	/* Running pkg assembly index	*/
-	uint8_t		k_pkg_type;	/* Type of package		*/
-	const uint8_t	*k_sendp;	/* Output pointer		*/
-	int		k_send_cnt;	/* Chars left for output	*/
+	struct evvar	sc_events;	/* event queue state		*/
+	uint8_t		sc_soft_cs;	/* control-reg. copy		*/
+	uint8_t		sc_package[20];	/* XXX package being build	*/
+	uint8_t		sc_pkg_size;	/* Size of the package		*/
+	uint8_t		sc_pkg_idx;	/* Running pkg assembly index	*/
+	uint8_t		sc_pkg_type;	/* Type of package		*/
+	const uint8_t	*sc_sendp;	/* Output pointer		*/
+	int		sc_send_cnt;	/* Chars left for output	*/
 #if NWSKBD > 0
-	device_t	k_wskbddev;   /* pointer to wskbd for sending strokes */
-	int		k_pollingmode;	/* polling mode on? whatever it is... */
+	device_t	sc_wskbddev;  /* pointer to wskbd for sending strokes */
+	int		sc_pollingmode;	/* polling mode on? whatever it is... */
 #endif
-	void		*k_sicookie;	/* softint(9) cookie		*/
+	void		*sc_sicookie;	/* softint(9) cookie		*/
 };
 
 /* WSKBD */
@@ -128,7 +128,7 @@ static uint8_t		kbd_ring[KBD_RING_SIZE];
 static volatile u_int	kbd_rbput = 0;	/* 'put' index			*/
 static u_int		kbd_rbget = 0;	/* 'get' index			*/
 
-static struct kbd_softc kbd_softc;
+static struct kbd_softc kbd_softc;	/* XXX */
 
 /* {b,c}devsw[] function prototypes */
 static dev_type_open(kbdopen);
@@ -209,6 +209,7 @@ kbdmatch(device_t parent, cfdata_t cf, v
 static void
 kbdattach(device_t parent, device_t self, void *aux)
 {
+	struct kbd_softc *sc = &kbd_softc;
 	int timeout;
 	const uint8_t kbd_rst[]  = { 0x80, 0x01 };
 	const uint8_t kbd_icmd[] = { 0x12, 0x15 };
@@ -224,7 +225,7 @@ kbdattach(device_t parent, device_t self
 	 */
 	KBD->ac_cs = A_RESET;
 	delay(100);	/* XXX: enough? */
-	KBD->ac_cs = kbd_softc.k_soft_cs = KBD_INIT | A_RXINT;
+	KBD->ac_cs = sc->sc_soft_cs = KBD_INIT | A_RXINT;
 
 	/*
 	 * Clear error conditions
@@ -251,7 +252,7 @@ kbdattach(device_t parent, device_t self
 
 	printf("\n");
 
-	kbd_softc.k_sicookie = softint_establish(SOFTINT_SERIAL, kbdsoft, NULL);
+	sc->sc_sicookie = softint_establish(SOFTINT_SERIAL, kbdsoft, NULL);
 
 #if NWSKBD > 0
 	if (self != NULL) {
@@ -267,10 +268,10 @@ kbdattach(device_t parent, device_t self
 		waa.keymap = &kbd_mapdata;
 		waa.accessops = &kbd_accessops;
 		waa.accesscookie = NULL;
-		kbd_softc.k_wskbddev = config_found(self, &waa, wskbddevprint,
+		sc->sc_wskbddev = config_found(self, &waa, wskbddevprint,
 		CFARGS_NONE);
 
-		kbd_softc.k_pollingmode = 0;
+		sc->sc_pollingmode = 0;
 
 		kbdenable();
 	}
@@ -280,6 +281,7 @@ kbdattach(device_t parent, device_t self
 void
 kbdenable(void)
 {
+	struct kbd_softc *sc = &kbd_softc;
 	int s;
 
 	s = spltty();
@@ -296,47 +298,50 @@ kbdenable(void)
 	MFP->mf_ierb |= IB_AINT;
 	MFP->mf_imrb |= IB_AINT;
 
-	kbd_softc.k_event_mode   = 0;
-	kbd_softc.k_events.ev_io = 0;
-	kbd_softc.k_pkg_size = 0;
+	sc->sc_event_mode   = 0;
+	sc->sc_events.ev_io = 0;
+	sc->sc_pkg_size = 0;
 	splx(s);
 }
 
 static int
 kbdopen(dev_t dev, int flags, int mode, struct lwp *l)
 {
+	struct kbd_softc *sc = &kbd_softc;
 
-	if (kbd_softc.k_events.ev_io)
+	if (sc->sc_events.ev_io)
 		return EBUSY;
 
-	kbd_softc.k_events.ev_io = l->l_proc;
-	ev_init(&kbd_softc.k_events);
+	sc->sc_events.ev_io = l->l_proc;
+	ev_init(&sc->sc_events);
 	return 0;
 }
 
 static int
 kbdclose(dev_t dev, int flags, int mode, struct lwp *l)
 {
+	struct kbd_softc *sc

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

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 25 15:10:26 UTC 2022

Modified Files:
src/sys/arch/atari/dev: kbd.c

Log Message:
Rename and reformat softc stuff for readablity, and misc more cleanups.

No binary change.


To generate a diff of this commit:
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/atari/dev/kbd.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/atari/dev

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 25 14:39:19 UTC 2022

Modified Files:
src/sys/arch/atari/dev: kbd.c kbdvar.h

Log Message:
Move declarations to proper places.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/atari/dev/kbd.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/atari/dev/kbdvar.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/atari/dev

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 25 14:39:19 UTC 2022

Modified Files:
src/sys/arch/atari/dev: kbd.c kbdvar.h

Log Message:
Move declarations to proper places.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/atari/dev/kbd.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/atari/dev/kbdvar.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/atari/dev/kbd.c
diff -u src/sys/arch/atari/dev/kbd.c:1.50 src/sys/arch/atari/dev/kbd.c:1.51
--- src/sys/arch/atari/dev/kbd.c:1.50	Sat Jun 25 14:27:43 2022
+++ src/sys/arch/atari/dev/kbd.c	Sat Jun 25 14:39:19 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: kbd.c,v 1.50 2022/06/25 14:27:43 tsutsui Exp $	*/
+/*	$NetBSD: kbd.c,v 1.51 2022/06/25 14:39:19 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.50 2022/06/25 14:27:43 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.51 2022/06/25 14:39:19 tsutsui Exp $");
 
 #include "mouse.h"
 #include "ite.h"
@@ -70,6 +70,31 @@ __KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.50
 #include 
 #endif
 
+/*
+ * The ringbuffer is the interface between the hard and soft interrupt handler.
+ * The hard interrupt runs straight from the MFP interrupt.
+ */
+#define KBD_RING_SIZE	256   /* Sz of input ring buffer, must be power of 2 */
+#define KBD_RING_MASK	255   /* Modulo mask for above			 */
+
+struct kbd_softc {
+	int		k_event_mode;	/* if 1, collect events,	*/
+	/*   else pass to ite		*/
+	struct evvar	k_events;	/* event queue state		*/
+	uint8_t		k_soft_cs;	/* control-reg. copy		*/
+	uint8_t		k_package[20];	/* XXX package being build	*/
+	uint8_t		k_pkg_size;	/* Size of the package		*/
+	uint8_t		k_pkg_idx;	/* Running pkg assembly index	*/
+	uint8_t		k_pkg_type;	/* Type of package		*/
+	const uint8_t	*k_sendp;	/* Output pointer		*/
+	int		k_send_cnt;	/* Chars left for output	*/
+#if NWSKBD > 0
+	device_t	k_wskbddev;   /* pointer to wskbd for sending strokes */
+	int		k_pollingmode;	/* polling mode on? whatever it is... */
+#endif
+	void		*k_sicookie;	/* softint(9) cookie		*/
+};
+
 /* WSKBD */
 /*
  * If NWSKBD>0 we try to attach an wskbd device to us. What follows
@@ -113,9 +138,6 @@ static dev_type_ioctl(kbdioctl);
 static dev_type_poll(kbdpoll);
 static dev_type_kqfilter(kbdkqfilter);
 
-/* Interrupt handler */
-void	kbdintr(int);
-
 static void kbdsoft(void *);
 static void kbdattach(device_t, device_t, void *);
 static int  kbdmatch(device_t, cfdata_t, void *);

Index: src/sys/arch/atari/dev/kbdvar.h
diff -u src/sys/arch/atari/dev/kbdvar.h:1.10 src/sys/arch/atari/dev/kbdvar.h:1.11
--- src/sys/arch/atari/dev/kbdvar.h:1.10	Sat Oct 27 17:17:42 2012
+++ src/sys/arch/atari/dev/kbdvar.h	Sat Jun 25 14:39:19 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: kbdvar.h,v 1.10 2012/10/27 17:17:42 chs Exp $	*/
+/*	$NetBSD: kbdvar.h,v 1.11 2022/06/25 14:39:19 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1996 Leo Weppelman.
@@ -29,31 +29,6 @@
 #define _KBDVAR_H
 
 /*
- * The ringbuffer is the interface between the hard and soft interrupt handler.
- * The hard interrupt runs straight from the MFP interrupt.
- */
-#define KBD_RING_SIZE	256   /* Sz of input ring buffer, must be power of 2 */
-#define KBD_RING_MASK	255   /* Modulo mask for above			 */
-
-struct kbd_softc {
-	int		k_event_mode;	/* if 1, collect events,	*/
-	/*   else pass to ite		*/
-	struct evvar	k_events;	/* event queue state		*/
-	uint8_t		k_soft_cs;	/* control-reg. copy		*/
-	uint8_t		k_package[20];	/* XXX package being build	*/
-	uint8_t		k_pkg_size;	/* Size of the package		*/
-	uint8_t		k_pkg_idx;	/* Running pkg assembly index	*/
-	uint8_t		k_pkg_type;	/* Type of package		*/
-	const uint8_t	*k_sendp;	/* Output pointer		*/
-	int		k_send_cnt;	/* Chars left for output	*/
-#if NWSKBD>0
-	device_t	k_wskbddev;	/* pointer to wskbd for sending strokes */
-	int		k_pollingmode;	/* polling mode on? whatever it isss... */
-#endif
-	void		*k_sicookie;	/* softint(9) cookie		*/
-};
-
-/*
  * Package types
  */
 #define	KBD_MEM_PKG	0		/* Memory read package		*/
@@ -73,6 +48,9 @@ void	kbd_write(const uint8_t *, int);
 int	kbdgetcn(void);
 void	kbdbell(void);
 void	kbdenable(void);
+
+/* Interrupt handler */
+void	kbdintr(int);	/* called from locore.s */
 #endif /* _KERNEL */
 
 #endif /* _KBDVAR_H */



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

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 25 14:27:43 UTC 2022

Modified Files:
src/sys/arch/atari/dev: kbd.c

Log Message:
Misc cleanup.  No functional changes, no regression on TT030.

- KNF and TAB/space
- make local functions static
- avoid unnesessary __USE()
- use proper integer types
- remove a register keyword


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/atari/dev/kbd.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/atari/dev/kbd.c
diff -u src/sys/arch/atari/dev/kbd.c:1.49 src/sys/arch/atari/dev/kbd.c:1.50
--- src/sys/arch/atari/dev/kbd.c:1.49	Sat Aug  7 16:18:46 2021
+++ src/sys/arch/atari/dev/kbd.c	Sat Jun 25 14:27:43 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: kbd.c,v 1.49 2021/08/07 16:18:46 thorpej Exp $	*/
+/*	$NetBSD: kbd.c,v 1.50 2022/06/25 14:27:43 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -31,7 +31,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.49 2021/08/07 16:18:46 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: kbd.c,v 1.50 2022/06/25 14:27:43 tsutsui Exp $");
 
 #include "mouse.h"
 #include "ite.h"
@@ -106,12 +106,12 @@ static u_int		kbd_rbget = 0;	/* 'get' in
 static struct kbd_softc kbd_softc;
 
 /* {b,c}devsw[] function prototypes */
-dev_type_open(kbdopen);
-dev_type_close(kbdclose);
-dev_type_read(kbdread);
-dev_type_ioctl(kbdioctl);
-dev_type_poll(kbdpoll);
-dev_type_kqfilter(kbdkqfilter);
+static dev_type_open(kbdopen);
+static dev_type_close(kbdclose);
+static dev_type_read(kbdread);
+static dev_type_ioctl(kbdioctl);
+static dev_type_poll(kbdpoll);
+static dev_type_kqfilter(kbdkqfilter);
 
 /* Interrupt handler */
 void	kbdintr(int);
@@ -119,7 +119,7 @@ void	kbdintr(int);
 static void kbdsoft(void *);
 static void kbdattach(device_t, device_t, void *);
 static int  kbdmatch(device_t, cfdata_t, void *);
-#if NITE>0
+#if NITE > 0
 static int  kbd_do_modifier(uint8_t);
 #endif
 static int  kbd_write_poll(const uint8_t *, int);
@@ -161,20 +161,20 @@ static struct wskbd_accessops kbd_access
 };
 
 static struct wskbd_consops kbd_consops = {
-kbd_getc,
+	kbd_getc,
 	kbd_pollc,
 	kbd_bell
 };
 
 /* Pointer to keymaps. */
 static struct wskbd_mapdata kbd_mapdata = {
-atarikbd_keydesctab,
+	atarikbd_keydesctab,
 	KB_US
 };
 #endif /* WSKBD */
 
 /*ARGSUSED*/
-static	int
+static int
 kbdmatch(device_t parent, cfdata_t cf, void *aux)
 {
 
@@ -207,16 +207,16 @@ kbdattach(device_t parent, device_t self
 	/*
 	 * Clear error conditions
 	 */
-	while (KBD->ac_cs & (A_IRQ|A_RXRDY))
+	while ((KBD->ac_cs & (A_IRQ | A_RXRDY)) != 0)
 		timeout = KBD->ac_da;
 
 	/*
 	 * Now send the reset string, and read+ignore its response
 	 */
-	if (!kbd_write_poll(kbd_rst, 2))
+	if (kbd_write_poll(kbd_rst, 2) == 0)
 		printf("kbd: error cannot reset keyboard\n");
 	for (timeout = 1000; timeout > 0; timeout--) {
-		if (KBD->ac_cs & (A_IRQ|A_RXRDY)) {
+		if ((KBD->ac_cs & (A_IRQ | A_RXRDY)) != 0) {
 			timeout = KBD->ac_da;
 			timeout = 100;
 		}
@@ -231,7 +231,7 @@ kbdattach(device_t parent, device_t self
 
 	kbd_softc.k_sicookie = softint_establish(SOFTINT_SERIAL, kbdsoft, NULL);
 
-#if NWSKBD>0
+#if NWSKBD > 0
 	if (self != NULL) {
 		/*
 		 * Try to attach the wskbd.
@@ -258,20 +258,19 @@ kbdattach(device_t parent, device_t self
 void
 kbdenable(void)
 {
-	int s, code;
+	int s;
 
 	s = spltty();
 
 	/*
 	 * Clear error conditions...
 	 */
-	while (KBD->ac_cs & (A_IRQ|A_RXRDY))
-		code = KBD->ac_da;
-	__USE(code);
+	while ((KBD->ac_cs & (A_IRQ | A_RXRDY)) != 0)
+		(void)KBD->ac_da;
 	/*
 	 * Enable interrupts from MFP
 	 */
-	MFP->mf_iprb  = (u_int8_t)~IB_AINT;
+	MFP->mf_iprb  = (uint8_t)~IB_AINT;
 	MFP->mf_ierb |= IB_AINT;
 	MFP->mf_imrb |= IB_AINT;
 
@@ -281,7 +280,8 @@ kbdenable(void)
 	splx(s);
 }
 
-int kbdopen(dev_t dev, int flags, int mode, struct lwp *l)
+static int
+kbdopen(dev_t dev, int flags, int mode, struct lwp *l)
 {
 
 	if (kbd_softc.k_events.ev_io)
@@ -292,7 +292,7 @@ int kbdopen(dev_t dev, int flags, int mo
 	return 0;
 }
 
-int
+static int
 kbdclose(dev_t dev, int flags, int mode, struct lwp *l)
 {
 
@@ -303,64 +303,64 @@ kbdclose(dev_t dev, int flags, int mode,
 	return 0;
 }
 
-int
+static int
 kbdread(dev_t dev, struct uio *uio, int flags)
 {
 
 	return ev_read(&kbd_softc.k_events, uio, flags);
 }
 
-int
+static int
 kbdioctl(dev_t dev, u_long cmd, register void *data, int flag, struct lwp *l)
 {
-	register struct kbd_softc *k = &kbd_softc;
+	struct kbd_softc *k = &kbd_softc;
 	struct kbdbell	*kb;
 
 	switch (cmd) {
-		case KIOCTRANS:
-			if (*(int *)data == TR_UNTRANS_EVENT)
-return 0;
-			break;
-
-		case KIOCGTRANS:
-			/*
-			 * Get translation mode
-			 */
-			*(int *)data = TR_UNTRANS_EVENT;
+	case KIOCTRANS:
+		if (*(int *)data == TR_UNTRANS_EVENT)
 			return 0;
+		break;
 
-		case KIOCSDIRECT:
-			k->k_event_mode = *(int *)data;
-			return 0;
-		
-		case KIOCRINGBELL:

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

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 25 14:27:43 UTC 2022

Modified Files:
src/sys/arch/atari/dev: kbd.c

Log Message:
Misc cleanup.  No functional changes, no regression on TT030.

- KNF and TAB/space
- make local functions static
- avoid unnesessary __USE()
- use proper integer types
- remove a register keyword


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/atari/dev/kbd.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/atari/conf

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 25 13:20:30 UTC 2022

Modified Files:
src/sys/arch/atari/conf: ATARITT FALCON HADES MILAN-ISAIDE MILAN-PCIIDE
SMALL030

Log Message:
Regen from GENERIC.in rev 1.123.

> Allocalte enough reserved ST-RAM to make the old Xserver work by default.


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/arch/atari/conf/ATARITT
cvs rdiff -u -r1.120 -r1.121 src/sys/arch/atari/conf/FALCON
cvs rdiff -u -r1.118 -r1.119 src/sys/arch/atari/conf/HADES
cvs rdiff -u -r1.96 -r1.97 src/sys/arch/atari/conf/MILAN-ISAIDE
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/atari/conf/MILAN-PCIIDE
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/atari/conf/SMALL030

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/atari/conf/ATARITT
diff -u src/sys/arch/atari/conf/ATARITT:1.123 src/sys/arch/atari/conf/ATARITT:1.124
--- src/sys/arch/atari/conf/ATARITT:1.123	Sun Jun 12 06:57:07 2022
+++ src/sys/arch/atari/conf/ATARITT	Sat Jun 25 13:20:30 2022
@@ -1,11 +1,11 @@
 #
-# $NetBSD: ATARITT,v 1.123 2022/06/12 06:57:07 tsutsui Exp $
+# $NetBSD: ATARITT,v 1.124 2022/06/25 13:20:30 tsutsui Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
-#		NetBSD: GENERIC.in,v 1.122 2022/06/12 06:54:32 tsutsui Exp $
+#		NetBSD: GENERIC.in,v 1.123 2022/06/25 13:17:04 tsutsui Exp $
 include "arch/atari/conf/std.atari"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
 makeoptions COPTS="-O2 -fno-reorder-blocks -fno-unwind-tables -fno-omit-frame-pointer" # See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for backtraces in DDB.
@@ -44,7 +44,7 @@ options KTRACE # Add kernel tracing syst
 options USERCONF # userconf(4) support
 options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel
 options MODULAR # new style module(7) framework
-options ST_POOL_SIZE=24 # smallest that allows TT-HIGH
+options ST_POOL_SIZE=56 # for SCSI, FDC, and Xserver
 options TT_SCSI # SCSI-support for TT
 options TT_VIDEO # Graphics support for TT
 options MEMORY_DISK_HOOKS # Boot RAM-disk

Index: src/sys/arch/atari/conf/FALCON
diff -u src/sys/arch/atari/conf/FALCON:1.120 src/sys/arch/atari/conf/FALCON:1.121
--- src/sys/arch/atari/conf/FALCON:1.120	Sun Jun 12 06:57:07 2022
+++ src/sys/arch/atari/conf/FALCON	Sat Jun 25 13:20:30 2022
@@ -1,11 +1,11 @@
 #
-# $NetBSD: FALCON,v 1.120 2022/06/12 06:57:07 tsutsui Exp $
+# $NetBSD: FALCON,v 1.121 2022/06/25 13:20:30 tsutsui Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
-#		NetBSD: GENERIC.in,v 1.122 2022/06/12 06:54:32 tsutsui Exp $
+#		NetBSD: GENERIC.in,v 1.123 2022/06/25 13:17:04 tsutsui Exp $
 include "arch/atari/conf/std.atari"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
 makeoptions COPTS="-O2 -fno-reorder-blocks -fno-unwind-tables -fno-omit-frame-pointer" # See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for backtraces in DDB.
@@ -49,7 +49,7 @@ options KTRACE # Add kernel tracing syst
 options USERCONF # userconf(4) support
 options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel
 options MODULAR # new style module(7) framework
-options ST_POOL_SIZE=24 # smallest that allows TT-HIGH
+options ST_POOL_SIZE=56 # for SCSI, FDC, and Xserver
 options FALCON_SCSI # SCSI-support for Falcon
 options FALCON_VIDEO # Graphics support for FALCON
 options MEMORY_DISK_HOOKS # Boot RAM-disk

Index: src/sys/arch/atari/conf/HADES
diff -u src/sys/arch/atari/conf/HADES:1.118 src/sys/arch/atari/conf/HADES:1.119
--- src/sys/arch/atari/conf/HADES:1.118	Sun Jun 12 06:57:07 2022
+++ src/sys/arch/atari/conf/HADES	Sat Jun 25 13:20:30 2022
@@ -1,12 +1,12 @@
 #
-# $NetBSD: HADES,v 1.118 2022/06/12 06:57:07 tsutsui Exp $
+# $NetBSD: HADES,v 1.119 2022/06/25 13:20:30 tsutsui Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
 #		NetBSD: HADES.in,v 1.16 2018/03/31 04:19:41 tsutsui Exp $
-#		NetBSD: GENERIC.in,v 1.122 2022/06/12 06:54:32 tsutsui Exp $
+#		NetBSD: GENERIC.in,v 1.123 2022/06/25 13:17:04 tsutsui Exp $
 include "arch/atari/conf/std.hades"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
 makeoptions COPTS="-O2 -fno-reorder-blocks -fno-unwind-tables -fno-omit-frame-pointer" # See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for backtraces in DDB.
@@ -48,7 +48,7 @@ options KTRACE # Add kernel tracing syst
 options USERCONF # userconf(4) support
 options SYSCTL_INCLUDE_DESCR # Include sysctl descriptions in kernel
 options MODULAR # new style module(7) framework
-options ST_POOL_SIZE=24 # smallest that allows TT-HIGH
+options ST_POOL_SIZE=56 # for SCSI, FDC, and Xserver
 options TT_SCSI # SCSI-support for TT
 options TT_V

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

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 25 13:20:30 UTC 2022

Modified Files:
src/sys/arch/atari/conf: ATARITT FALCON HADES MILAN-ISAIDE MILAN-PCIIDE
SMALL030

Log Message:
Regen from GENERIC.in rev 1.123.

> Allocalte enough reserved ST-RAM to make the old Xserver work by default.


To generate a diff of this commit:
cvs rdiff -u -r1.123 -r1.124 src/sys/arch/atari/conf/ATARITT
cvs rdiff -u -r1.120 -r1.121 src/sys/arch/atari/conf/FALCON
cvs rdiff -u -r1.118 -r1.119 src/sys/arch/atari/conf/HADES
cvs rdiff -u -r1.96 -r1.97 src/sys/arch/atari/conf/MILAN-ISAIDE
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/atari/conf/MILAN-PCIIDE
cvs rdiff -u -r1.26 -r1.27 src/sys/arch/atari/conf/SMALL030

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



CVS commit: src/sys/arch/atari

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 25 13:17:04 UTC 2022

Modified Files:
src/sys/arch/atari/atari: atari_init.c
src/sys/arch/atari/conf: GENERIC.in files.atari

Log Message:
Allocalte enough reserved ST-RAM to make the old Xserver work by default.

Instead, check ST-RAM size and TT-RAM size on startup and restrict
size of reserved ST memory on lower RAM machines.
Closes PR port-atari/41002 from David Ross.

While here, make options ST_POOL_SIZE defparam'ed to make sure to
reflect config(5) changes on each build.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/atari/atari/atari_init.c
cvs rdiff -u -r1.122 -r1.123 src/sys/arch/atari/conf/GENERIC.in
cvs rdiff -u -r1.123 -r1.124 src/sys/arch/atari/conf/files.atari

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/atari/atari/atari_init.c
diff -u src/sys/arch/atari/atari/atari_init.c:1.104 src/sys/arch/atari/atari/atari_init.c:1.105
--- src/sys/arch/atari/atari/atari_init.c:1.104	Tue May 24 06:28:00 2022
+++ src/sys/arch/atari/atari/atari_init.c	Sat Jun 25 13:17:04 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: atari_init.c,v 1.104 2022/05/24 06:28:00 andvar Exp $	*/
+/*	$NetBSD: atari_init.c,v 1.105 2022/06/25 13:17:04 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1995 Leo Weppelman
@@ -33,12 +33,13 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.104 2022/05/24 06:28:00 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: atari_init.c,v 1.105 2022/06/25 13:17:04 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_mbtype.h"
 #include "opt_m060sp.h"
 #include "opt_m68k_arch.h"
+#include "opt_st_pool_size.h"
 
 #include 
 #include 
@@ -145,18 +146,29 @@ extern struct pcb	*curpcb;
 vaddr_t	page_zero;
 
 /*
- * Crude support for allocation in ST-ram. Currently only used to allocate
- * video ram.
+ * Simple support for allocation in ST-ram.
+ * Currently 16 bit ST-ram is required to allocate DMA buffers for SCSI and
+ * FDC transfers, and video memory for the XFree68 based Xservers.
  * The physical address is also returned because the video init needs it to
  * setup the controller at the time the vm-system is not yet operational so
  * 'kvtop()' cannot be used.
  */
+#define	ST_POOL_SIZE_MIN	24	/* for DMA bounce buffers */
 #ifndef ST_POOL_SIZE
-#define	ST_POOL_SIZE	40			/* XXX: enough? */
+#define	ST_POOL_SIZE		56	/* Xserver requires 320KB (40 pages) */
 #endif
 
-u_long	st_pool_size = ST_POOL_SIZE * PAGE_SIZE; /* Patchable	*/
-u_long	st_pool_virt, st_pool_phys;
+psize_t	st_pool_size = ST_POOL_SIZE * PAGE_SIZE; /* Patchable	*/
+vaddr_t	st_pool_virt;
+paddr_t	st_pool_phys;
+
+/*
+ * Thresholds to restrict size of reserved ST memory to make sure
+ * the kernel at least boot even on lower memory machines.
+ * Nowadays we could assume most users have 4MB ST-RAM and 16MB TT-RAM.
+ */
+#define	STRAM_MINTHRESH		(2 * 1024 * 1024)
+#define	TTRAM_MINTHRESH		(4 * 1024 * 1024)
 
 /* I/O address space variables */
 vaddr_t	stio_addr;		/* Where the st io-area is mapped	*/
@@ -284,12 +296,20 @@ start_c(int id, u_int ttphystart, u_int 
 #endif
 
 	/*
-	 * The following is a hack. We do not know how much ST memory we
-	 * really need until after configuration has finished. At this
-	 * time I have no idea how to grab ST memory at that time.
+	 * We do not know how much ST memory we really need until after
+	 * configuration has finished, but typical users of ST memory
+	 * are bounce buffers DMA against TT-RAM for SCSI and FDC,
+	 * and video memory for the Xserver.
+	 * If we have enough RAMs reserve ST memory including for the Xserver.
+	 * Otherwise just allocate minimum one for SCSI and FDC.
+	 *
 	 * The round_page() call is ment to correct errors made by
 	 * binpatching!
 	 */
+	if (st_pool_size > ST_POOL_SIZE_MIN * PAGE_SIZE &&
+	(stphysize <= STRAM_MINTHRESH || ttphysize <= TTRAM_MINTHRESH)) {
+		st_pool_size = ST_POOL_SIZE_MIN * PAGE_SIZE;
+	}
 	st_pool_size   = m68k_round_page(st_pool_size);
 	st_pool_phys   = stphysize - st_pool_size;
 	stphysize  = st_pool_phys;

Index: src/sys/arch/atari/conf/GENERIC.in
diff -u src/sys/arch/atari/conf/GENERIC.in:1.122 src/sys/arch/atari/conf/GENERIC.in:1.123
--- src/sys/arch/atari/conf/GENERIC.in:1.122	Sun Jun 12 06:54:32 2022
+++ src/sys/arch/atari/conf/GENERIC.in	Sat Jun 25 13:17:04 2022
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC.in,v 1.122 2022/06/12 06:54:32 tsutsui Exp $
+#	$NetBSD: GENERIC.in,v 1.123 2022/06/25 13:17:04 tsutsui Exp $
 #
 # Generic atari
 #
@@ -207,7 +207,7 @@ options		PIPE_SOCKETPAIR	# smaller, but 
 # Atari specific options
 #
 #options 	KFONT_8x8		# Use 8x8 font instead of 8x16
-options 	ST_POOL_SIZE=24		# smallest that allows TT-HIGH
+options 	ST_POOL_SIZE=56		# for SCSI, FDC, and Xserver
 #if defined(TT030_KERNEL) || defined(HADES_KERNEL)
 options 	TT_SCSI			# SCSI-support for TT
 options 	TT_VIDEO		# Graphics support for TT

I

CVS commit: src/sys/arch/atari

2022-06-25 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 25 13:17:04 UTC 2022

Modified Files:
src/sys/arch/atari/atari: atari_init.c
src/sys/arch/atari/conf: GENERIC.in files.atari

Log Message:
Allocalte enough reserved ST-RAM to make the old Xserver work by default.

Instead, check ST-RAM size and TT-RAM size on startup and restrict
size of reserved ST memory on lower RAM machines.
Closes PR port-atari/41002 from David Ross.

While here, make options ST_POOL_SIZE defparam'ed to make sure to
reflect config(5) changes on each build.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/atari/atari/atari_init.c
cvs rdiff -u -r1.122 -r1.123 src/sys/arch/atari/conf/GENERIC.in
cvs rdiff -u -r1.123 -r1.124 src/sys/arch/atari/conf/files.atari

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



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

2022-06-24 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 25 03:33:29 UTC 2022

Modified Files:
src/sys/arch/atari/dev: ite.c ite_cc.c ite_et.c itevar.h

Log Message:
Add a minimum DEC special graphics character support for atari ite(4).

This closes PR port-atari/46647 (Menu borders in sysinst appear as
characters with diacritical marks instead of graphics characters).

Switching encoding support by "ESC ( " sequence for vt220 was
pulled from x68k ite(4) (that already supports ISO-2022-JP and EUC-JP).
Note atari's fonts already include DEC special graphics characters.
ET4000 on Hades is untested due to long-term lack of hardware.
Discussed on port-atari@ etc.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/atari/dev/ite.c
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/atari/dev/ite_cc.c
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/atari/dev/ite_et.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/atari/dev/itevar.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/atari/dev/ite.c
diff -u src/sys/arch/atari/dev/ite.c:1.81 src/sys/arch/atari/dev/ite.c:1.82
--- src/sys/arch/atari/dev/ite.c:1.81	Sat May 28 10:36:22 2022
+++ src/sys/arch/atari/dev/ite.c	Sat Jun 25 03:33:29 2022
@@ -1,4 +1,4 @@
-/*	$NetBSD: ite.c,v 1.81 2022/05/28 10:36:22 andvar Exp $	*/
+/*	$NetBSD: ite.c,v 1.82 2022/06/25 03:33:29 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -44,7 +44,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.81 2022/05/28 10:36:22 andvar Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ite.c,v 1.82 2022/06/25 03:33:29 tsutsui Exp $");
 
 #include "opt_ddb.h"
 
@@ -736,6 +736,12 @@ ite_reset(struct ite_softc *sc)
 	sc->keypad_appmode = 0;
 	sc->imode = 0;
 	sc->key_repeat = 1;
+	sc->G0 = CSET_ASCII;
+	sc->G1 = CSET_DECGRAPH;
+	sc->G2 = 0;
+	sc->G3 = 0;
+	sc->GL = &sc->G0;
+	sc->GR = &sc->G1;
 	memset(sc->tabs, 0, sc->cols);
 	for (i = 0; i < sc->cols; i++)
 		sc->tabs[i] = ((i & 7) == 0);
@@ -1247,6 +1253,14 @@ ite_lf (struct ite_softc *sc)
 }
   SUBR_CURSOR(sc, MOVE_CURSOR);
   clr_attr(sc, ATTR_INV);
+
+  /* reset character set */
+  sc->G0 = CSET_ASCII;
+  sc->G1 = CSET_DECGRAPH;
+  sc->G2 = 0;
+  sc->G3 = 0;
+  sc->GL = &sc->G0;
+  sc->GR = &sc->G1;
 }
 
 static inline void
@@ -1446,7 +1460,7 @@ iteputchar(register int c, struct ite_so
 		  case 'B':	/* ASCII */
 		  case 'A':	/* ISO latin 1 */
 		  case '<':	/* user preferred suplemental */
-		  case '0':	/* dec special graphics */
+		  case '0':	/* DEC special graphics */
 		  
 		  /* 96-character sets: */
 		  case '-':	/* G1 */
@@ -1471,27 +1485,32 @@ iteputchar(register int c, struct ite_so
 		  
 		  /* locking shift modes (as you might guess, not yet supported..) */
 		  case '`':
-		sc->GR = sc->G1;
+		sc->GR = &sc->G1;
 		sc->escape = 0;
 		return;
 		
 		  case 'n':
-		sc->GL = sc->G2;
+		sc->GL = &sc->G2;
 		sc->escape = 0;
 		return;
 		
 		  case '}':
-		sc->GR = sc->G2;
+		sc->GR = &sc->G2;
 		sc->escape = 0;
 		return;
 		
 		  case 'o':
-		sc->GL = sc->G3;
+		sc->GL = &sc->G3;
 		sc->escape = 0;
 		return;
 		
 		  case '|':
-		sc->GR = sc->G3;
+		sc->GR = &sc->G3;
+		sc->escape = 0;
+		return;
+
+		  case '~':
+		sc->GR = &sc->G1;
 		sc->escape = 0;
 		return;
 		
@@ -1511,16 +1530,30 @@ iteputchar(register int c, struct ite_so
 
 
 		  case '7':
+		/* save cursor */
 		sc->save_curx = sc->curx;
 		sc->save_cury = sc->cury;
 		sc->save_attribute = sc->attribute;
+		sc->sc_G0 = sc->G0;
+		sc->sc_G1 = sc->G1;
+		sc->sc_G2 = sc->G2;
+		sc->sc_G3 = sc->G3;
+		sc->sc_GL = sc->GL;
+		sc->sc_GR = sc->GR;
 		sc->escape = 0;
 		return;
 		
 		  case '8':
+		/* restore cursor */
 		sc->curx = sc->save_curx;
 		sc->cury = sc->save_cury;
 		sc->attribute = sc->save_attribute;
+		sc->G0 = sc->sc_G0;
+		sc->G1 = sc->sc_G1;
+		sc->G2 = sc->sc_G2;
+		sc->G3 = sc->sc_G3;
+		sc->GL = sc->sc_GL;
+		sc->GR = sc->sc_GR;
 		SUBR_CURSOR(sc, MOVE_CURSOR);
 		sc->escape = 0;
 		return;
@@ -1551,8 +1584,22 @@ iteputchar(register int c, struct ite_so
 		break;
 
 
-	  case '(':
-	  case ')':
+	  case '(': /* designated G0 */
+		switch (c) {
+		case 'B': /* US-ASCII */
+		  sc->G0 = CSET_ASCII;
+		  sc->escape = 0;
+		  return;
+		case '0': /* DEC special graphics */
+		  sc->G0 = CSET_DECGRAPH;
+		  sc->escape = 0;
+		  return;
+		default:
+		  /* not supported */
+		  sc->escape = 0;
+		  return;
+		}
+	  case ')': /* designated G1 */
 		sc->escape = 0;
 		return;
 
@@ -2165,11 +2212,11 @@ iteputchar(register int c, struct ite_so
 		break;
 
 	case SO:
-		sc->GL = sc->G1;
+		sc->GL = &sc->G1;
 		break;
 		
 	case SI:
-		sc->GL = sc->G0;
+		sc->GL = &sc->G0;
 		break;
 
 	case ENQ:

Index: s

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

2022-06-24 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jun 25 03:33:29 UTC 2022

Modified Files:
src/sys/arch/atari/dev: ite.c ite_cc.c ite_et.c itevar.h

Log Message:
Add a minimum DEC special graphics character support for atari ite(4).

This closes PR port-atari/46647 (Menu borders in sysinst appear as
characters with diacritical marks instead of graphics characters).

Switching encoding support by "ESC ( " sequence for vt220 was
pulled from x68k ite(4) (that already supports ISO-2022-JP and EUC-JP).
Note atari's fonts already include DEC special graphics characters.
ET4000 on Hades is untested due to long-term lack of hardware.
Discussed on port-atari@ etc.


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/atari/dev/ite.c
cvs rdiff -u -r1.44 -r1.45 src/sys/arch/atari/dev/ite_cc.c
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/atari/dev/ite_et.c
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/atari/dev/itevar.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/atari/conf

2022-06-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 12 06:57:07 UTC 2022

Modified Files:
src/sys/arch/atari/conf: ATARITT FALCON HADES MILAN-ISAIDE MILAN-PCIIDE
SMALL030

Log Message:
Regen from GENERIC.in rev 1.122.

> Specify -fno-unwind-tables to shrink binaries.


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/sys/arch/atari/conf/ATARITT
cvs rdiff -u -r1.119 -r1.120 src/sys/arch/atari/conf/FALCON
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/atari/conf/HADES
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/atari/conf/MILAN-ISAIDE
cvs rdiff -u -r1.99 -r1.100 src/sys/arch/atari/conf/MILAN-PCIIDE
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/atari/conf/SMALL030

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/atari/conf/ATARITT
diff -u src/sys/arch/atari/conf/ATARITT:1.122 src/sys/arch/atari/conf/ATARITT:1.123
--- src/sys/arch/atari/conf/ATARITT:1.122	Tue Jan 26 10:51:27 2021
+++ src/sys/arch/atari/conf/ATARITT	Sun Jun 12 06:57:07 2022
@@ -1,14 +1,14 @@
 #
-# $NetBSD: ATARITT,v 1.122 2021/01/26 10:51:27 rin Exp $
+# $NetBSD: ATARITT,v 1.123 2022/06/12 06:57:07 tsutsui Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
-#		NetBSD: GENERIC.in,v 1.121 2021/01/21 06:51:54 nia Exp $
+#		NetBSD: GENERIC.in,v 1.122 2022/06/12 06:54:32 tsutsui Exp $
 include "arch/atari/conf/std.atari"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-makeoptions COPTS="-O2 -fno-reorder-blocks -fno-omit-frame-pointer" # See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for backtraces in DDB.
+makeoptions COPTS="-O2 -fno-reorder-blocks -fno-unwind-tables -fno-omit-frame-pointer" # See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for backtraces in DDB.
 maxusers 16
 options HZ=64 # Set the clock-rate (48/64/96)
 options INSECURE # disable kernel security levels

Index: src/sys/arch/atari/conf/FALCON
diff -u src/sys/arch/atari/conf/FALCON:1.119 src/sys/arch/atari/conf/FALCON:1.120
--- src/sys/arch/atari/conf/FALCON:1.119	Tue Jan 26 10:51:27 2021
+++ src/sys/arch/atari/conf/FALCON	Sun Jun 12 06:57:07 2022
@@ -1,14 +1,14 @@
 #
-# $NetBSD: FALCON,v 1.119 2021/01/26 10:51:27 rin Exp $
+# $NetBSD: FALCON,v 1.120 2022/06/12 06:57:07 tsutsui Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
-#		NetBSD: GENERIC.in,v 1.121 2021/01/21 06:51:54 nia Exp $
+#		NetBSD: GENERIC.in,v 1.122 2022/06/12 06:54:32 tsutsui Exp $
 include "arch/atari/conf/std.atari"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-makeoptions COPTS="-O2 -fno-reorder-blocks -fno-omit-frame-pointer" # See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for backtraces in DDB.
+makeoptions COPTS="-O2 -fno-reorder-blocks -fno-unwind-tables -fno-omit-frame-pointer" # See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for backtraces in DDB.
 maxusers 16
 options HZ=64 # Set the clock-rate (48/64/96)
 options INSECURE # disable kernel security levels

Index: src/sys/arch/atari/conf/HADES
diff -u src/sys/arch/atari/conf/HADES:1.117 src/sys/arch/atari/conf/HADES:1.118
--- src/sys/arch/atari/conf/HADES:1.117	Tue Jan 26 10:51:27 2021
+++ src/sys/arch/atari/conf/HADES	Sun Jun 12 06:57:07 2022
@@ -1,15 +1,15 @@
 #
-# $NetBSD: HADES,v 1.117 2021/01/26 10:51:27 rin Exp $
+# $NetBSD: HADES,v 1.118 2022/06/12 06:57:07 tsutsui Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
 #		NetBSD: HADES.in,v 1.16 2018/03/31 04:19:41 tsutsui Exp $
-#		NetBSD: GENERIC.in,v 1.121 2021/01/21 06:51:54 nia Exp $
+#		NetBSD: GENERIC.in,v 1.122 2022/06/12 06:54:32 tsutsui Exp $
 include "arch/atari/conf/std.hades"
 options INCLUDE_CONFIG_FILE # embed config file in kernel binary
-makeoptions COPTS="-O2 -fno-reorder-blocks -fno-omit-frame-pointer" # See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for backtraces in DDB.
+makeoptions COPTS="-O2 -fno-reorder-blocks -fno-unwind-tables -fno-omit-frame-pointer" # See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for backtraces in DDB.
 maxusers 16
 options HZ=64 # Set the clock-rate (48/64/96)
 options INSECURE # disable kernel security levels

Index: src/sys/arch/atari/conf/MILAN-ISAIDE
diff -u src/sys/arch/atari/conf/MILAN-ISAIDE:1.95 src/sys/arch/atari/conf/MILAN-ISAIDE:1.96
--- src/sys/arch/atari/conf/MILAN-ISAIDE:1.95	Tue Jan 26 10:51:27 2021
+++ src/sys/arch/atari/conf/MILAN-ISAIDE	Sun Jun 12 06:57:07 2022
@@ -1,15 +1,15 @@
 #
-# $NetBSD: MILAN-ISAIDE,v 1.95 2021/01/26 10:51:27 rin Exp $
+# $NetBSD: MILAN-ISAIDE,v 1.96 2022/06/12 06:57:07 tsutsui Exp $
 #
 # This file was automatically created. Changes will be
 # lost when running makeconf in this directory.
 #
 # Created from:
 #		NetBSD: MILA

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

2022-06-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 12 06:57:07 UTC 2022

Modified Files:
src/sys/arch/atari/conf: ATARITT FALCON HADES MILAN-ISAIDE MILAN-PCIIDE
SMALL030

Log Message:
Regen from GENERIC.in rev 1.122.

> Specify -fno-unwind-tables to shrink binaries.


To generate a diff of this commit:
cvs rdiff -u -r1.122 -r1.123 src/sys/arch/atari/conf/ATARITT
cvs rdiff -u -r1.119 -r1.120 src/sys/arch/atari/conf/FALCON
cvs rdiff -u -r1.117 -r1.118 src/sys/arch/atari/conf/HADES
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/atari/conf/MILAN-ISAIDE
cvs rdiff -u -r1.99 -r1.100 src/sys/arch/atari/conf/MILAN-PCIIDE
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/atari/conf/SMALL030

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



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

2022-06-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 12 06:54:32 UTC 2022

Modified Files:
src/sys/arch/atari/conf: GENERIC.in

Log Message:
Specify -fno-unwind-tables to shrink binaries.


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/atari/conf/GENERIC.in

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/atari/conf/GENERIC.in
diff -u src/sys/arch/atari/conf/GENERIC.in:1.121 src/sys/arch/atari/conf/GENERIC.in:1.122
--- src/sys/arch/atari/conf/GENERIC.in:1.121	Thu Jan 21 06:51:54 2021
+++ src/sys/arch/atari/conf/GENERIC.in	Sun Jun 12 06:54:32 2022
@@ -1,5 +1,5 @@
 #
-#	$NetBSD: GENERIC.in,v 1.121 2021/01/21 06:51:54 nia Exp $
+#	$NetBSD: GENERIC.in,v 1.122 2022/06/12 06:54:32 tsutsui Exp $
 #
 # Generic atari
 #
@@ -20,11 +20,11 @@ options 	INCLUDE_CONFIG_FILE	# embed con
 #endif /* !SMALL030_KERNEL */
 
 #if !defined(SMALL030_KERNEL)
-makeoptions	COPTS="-O2 -fno-reorder-blocks -fno-omit-frame-pointer" \
+makeoptions	COPTS="-O2 -fno-reorder-blocks -fno-unwind-tables -fno-omit-frame-pointer" \
 # See share/mk/sys.mk. -fno-omit-frame-pointer is necessary for backtraces \
 in DDB.
 #else
-makeoptions	COPTS="-Os"			# optimize for space
+makeoptions	COPTS="-Os -fno-unwind-tables"	# optimize for space
 #endif /* !SMALL030_KERNEL */
 
 #if defined(SMALL030_KERNEL) || \



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

2022-06-11 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jun 12 06:54:32 UTC 2022

Modified Files:
src/sys/arch/atari/conf: GENERIC.in

Log Message:
Specify -fno-unwind-tables to shrink binaries.


To generate a diff of this commit:
cvs rdiff -u -r1.121 -r1.122 src/sys/arch/atari/conf/GENERIC.in

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



  1   2   >