CVS commit: src/sys/arch/news68k

2024-01-17 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Jan 18 04:07:38 UTC 2024

Modified Files:
src/sys/arch/news68k/conf: files.news68k
src/sys/arch/news68k/include: cpu.h
src/sys/arch/news68k/news68k: machdep.c machid.h pmap_bootstrap.c

Log Message:
Don't put the news1[27]00 model defines into INDENT, make them
defflag options and put them in opt_newsconf.h.  Make these
options depend on the appropriate M680x0 option (M68030 for each)
so that the CPU option appears correctly in opt_m68k_arch.h.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/news68k/conf/files.news68k
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/news68k/include/cpu.h
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/news68k/news68k/machdep.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/news68k/news68k/machid.h
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/news68k/news68k/pmap_bootstrap.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/news68k/conf/files.news68k
diff -u src/sys/arch/news68k/conf/files.news68k:1.39 src/sys/arch/news68k/conf/files.news68k:1.40
--- src/sys/arch/news68k/conf/files.news68k:1.39	Mon Jan 15 00:35:23 2024
+++ src/sys/arch/news68k/conf/files.news68k	Thu Jan 18 04:07:37 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: files.news68k,v 1.39 2024/01/15 00:35:23 thorpej Exp $
+#	$NetBSD: files.news68k,v 1.40 2024/01/18 04:07:37 thorpej Exp $
 
 #	NEWS68K-specific configuration info
 
@@ -7,6 +7,10 @@ maxpartitions 8
 
 maxusers 2 8 64
 
+# System configuration options.
+defflag	opt_newsconf.h	news1200: M68030
+defflag	opt_newsconf.h	news1700: M68030
+
 device mainbus { [systype = -1] }
 attach mainbus at root
 

Index: src/sys/arch/news68k/include/cpu.h
diff -u src/sys/arch/news68k/include/cpu.h:1.51 src/sys/arch/news68k/include/cpu.h:1.52
--- src/sys/arch/news68k/include/cpu.h:1.51	Mon Jan 15 20:21:50 2024
+++ src/sys/arch/news68k/include/cpu.h	Thu Jan 18 04:07:37 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.51 2024/01/15 20:21:50 thorpej Exp $	*/
+/*	$NetBSD: cpu.h,v 1.52 2024/01/18 04:07:37 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -44,6 +44,7 @@
 #if defined(_KERNEL_OPT)
 #include "opt_lockdebug.h"
 #include "opt_m68k_arch.h"
+#include "opt_newsconf.h"
 #endif
 
 /*
@@ -130,9 +131,6 @@ extern volatile u_char *ctrl_ast;
 	do { astpending++; *ctrl_ast = 0xff; } while (/* CONSTCOND */0)
 
 #if defined(news1700) || defined(news1200)
-#ifndef M68030
-#define M68030
-#endif
 #define M68K_MMU_MOTOROLA
 #endif
 

Index: src/sys/arch/news68k/news68k/machdep.c
diff -u src/sys/arch/news68k/news68k/machdep.c:1.113 src/sys/arch/news68k/news68k/machdep.c:1.114
--- src/sys/arch/news68k/news68k/machdep.c:1.113	Mon Jan 15 20:21:51 2024
+++ src/sys/arch/news68k/news68k/machdep.c	Thu Jan 18 04:07:38 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.113 2024/01/15 20:21:51 thorpej Exp $	*/
+/*	$NetBSD: machdep.c,v 1.114 2024/01/18 04:07:38 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,11 +39,12 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.113 2024/01/15 20:21:51 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.114 2024/01/18 04:07:38 thorpej Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
 #include "opt_modular.h"
+#include "opt_newsconf.h"
 
 #include 
 #include 

Index: src/sys/arch/news68k/news68k/machid.h
diff -u src/sys/arch/news68k/news68k/machid.h:1.4 src/sys/arch/news68k/news68k/machid.h:1.5
--- src/sys/arch/news68k/news68k/machid.h:1.4	Sun Dec 11 12:18:23 2005
+++ src/sys/arch/news68k/news68k/machid.h	Thu Jan 18 04:07:38 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: machid.h,v 1.4 2005/12/11 12:18:23 christos Exp $	*/
+/*	$NetBSD: machid.h,v 1.5 2024/01/18 04:07:38 thorpej Exp $	*/
 /*
  * Copyright (c) 1992, 1993
  *	The Regents of the University of California.  All rights reserved.
@@ -86,6 +86,8 @@
 #define	NWB235A	236
 #define	NWXRES	255
 
+#include "opt_newsconf.h"
+
 #if defined(news700) || defined(news800) || defined(news1700) || defined(news1800)
 struct oidrom {
 /*00*/	unsigned char	id_model;

Index: src/sys/arch/news68k/news68k/pmap_bootstrap.c
diff -u src/sys/arch/news68k/news68k/pmap_bootstrap.c:1.42 src/sys/arch/news68k/news68k/pmap_bootstrap.c:1.43
--- src/sys/arch/news68k/news68k/pmap_bootstrap.c:1.42	Sun Oct  8 03:57:47 2023
+++ src/sys/arch/news68k/news68k/pmap_bootstrap.c	Thu Jan 18 04:07:38 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_bootstrap.c,v 1.42 2023/10/08 03:57:47 tsutsui Exp $	*/
+/*	$NetBSD: pmap_bootstrap.c,v 1.43 2024/01/18 04:07:38 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1991, 1993
@@ -39,9 +39,10 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.42 2023/10/08 03:57:47 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.43 2024/01/18 04:07:38 thorpej Exp $");
 
 #include "opt_m68k_arch.h"
+#include "opt_newsconf.h"
 
 #include 
 #include 



CVS commit: src/sys/arch/news68k

2024-01-17 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Thu Jan 18 04:07:38 UTC 2024

Modified Files:
src/sys/arch/news68k/conf: files.news68k
src/sys/arch/news68k/include: cpu.h
src/sys/arch/news68k/news68k: machdep.c machid.h pmap_bootstrap.c

Log Message:
Don't put the news1[27]00 model defines into INDENT, make them
defflag options and put them in opt_newsconf.h.  Make these
options depend on the appropriate M680x0 option (M68030 for each)
so that the CPU option appears correctly in opt_m68k_arch.h.


To generate a diff of this commit:
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/news68k/conf/files.news68k
cvs rdiff -u -r1.51 -r1.52 src/sys/arch/news68k/include/cpu.h
cvs rdiff -u -r1.113 -r1.114 src/sys/arch/news68k/news68k/machdep.c
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/news68k/news68k/machid.h
cvs rdiff -u -r1.42 -r1.43 src/sys/arch/news68k/news68k/pmap_bootstrap.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/news68k/news68k

2024-01-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Jan 16 01:17:59 UTC 2024

Modified Files:
src/sys/arch/news68k/news68k: isr.h

Log Message:
Use m68k_intrvec_intrhand() to implement isrunlink_vectored().


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/news68k/news68k/isr.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/news68k/news68k/isr.h
diff -u src/sys/arch/news68k/news68k/isr.h:1.10 src/sys/arch/news68k/news68k/isr.h:1.11
--- src/sys/arch/news68k/news68k/isr.h:1.10	Mon Jan 15 00:35:24 2024
+++ src/sys/arch/news68k/news68k/isr.h	Tue Jan 16 01:17:59 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: isr.h,v 1.10 2024/01/15 00:35:24 thorpej Exp $	*/
+/*	$NetBSD: isr.h,v 1.11 2024/01/16 01:17:59 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -61,8 +61,11 @@ isrlink_vectored(int (*func)(void *), vo
 static inline void
 isrunlink_vectored(int vec)
 {
-	/* XXX isrlink_*() functions should return handle. */
-	panic("isrunlink_vectored");
+	/* XXX isrlink_vectored() should return a handle. */
+	void *ih = m68k_intrvec_intrhand(vec);
+	if (ih != NULL) {
+		m68k_intr_disestablish(ih);
+	}
 }
 
 #endif /* _NEWS68k_ISR_H_ */



CVS commit: src/sys/arch/news68k/news68k

2024-01-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Tue Jan 16 01:17:59 UTC 2024

Modified Files:
src/sys/arch/news68k/news68k: isr.h

Log Message:
Use m68k_intrvec_intrhand() to implement isrunlink_vectored().


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/news68k/news68k/isr.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/news68k

2024-01-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Jan 15 20:21:51 UTC 2024

Modified Files:
src/sys/arch/news68k/dev: timer_hb.c
src/sys/arch/news68k/include: cpu.h intr.h types.h
src/sys/arch/news68k/news68k: genassym.cf locore.s machdep.c

Log Message:
G/C __HAVE_LEGACY_INTRCNT from news68k.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/news68k/dev/timer_hb.c
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/news68k/include/cpu.h
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/news68k/include/intr.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/news68k/include/types.h
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/news68k/news68k/genassym.cf
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/news68k/news68k/locore.s
cvs rdiff -u -r1.112 -r1.113 src/sys/arch/news68k/news68k/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/news68k/dev/timer_hb.c
diff -u src/sys/arch/news68k/dev/timer_hb.c:1.20 src/sys/arch/news68k/dev/timer_hb.c:1.21
--- src/sys/arch/news68k/dev/timer_hb.c:1.20	Mon Jan 15 00:35:23 2024
+++ src/sys/arch/news68k/dev/timer_hb.c	Mon Jan 15 20:21:50 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: timer_hb.c,v 1.20 2024/01/15 00:35:23 thorpej Exp $	*/
+/*	$NetBSD: timer_hb.c,v 1.21 2024/01/15 20:21:50 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: timer_hb.c,v 1.20 2024/01/15 00:35:23 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: timer_hb.c,v 1.21 2024/01/15 20:21:50 thorpej Exp $");
 
 #include 
 #include 
@@ -154,7 +154,8 @@ clock_intr(struct clockframe cf)
 	/* Pulse the clock intr. enable low. */
 	*ctrl_timer = 0;
 	*ctrl_timer = 1;
-	intrcnt[TIMER_LEVEL]++;
+
+	m68k_count_intr(TIMER_LEVEL);
 
 	/* Entertainment! */
 #ifdef	LED_IDLE_CHECK
@@ -164,7 +165,6 @@ clock_intr(struct clockframe cf)
 
 	/* Call common clock interrupt handler. */
 	hardclock();
-	curcpu()->ci_data.cpu_nintr++;
 }
 
 /* heartbeat LED */

Index: src/sys/arch/news68k/include/cpu.h
diff -u src/sys/arch/news68k/include/cpu.h:1.50 src/sys/arch/news68k/include/cpu.h:1.51
--- src/sys/arch/news68k/include/cpu.h:1.50	Mon Jan 15 00:35:23 2024
+++ src/sys/arch/news68k/include/cpu.h	Mon Jan 15 20:21:50 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.50 2024/01/15 00:35:23 thorpej Exp $	*/
+/*	$NetBSD: cpu.h,v 1.51 2024/01/15 20:21:50 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -148,7 +148,6 @@ extern int cpuspeed;
 extern char *intiobase, *intiolimit, *extiobase;
 extern u_int intiobase_phys, intiotop_phys;
 extern u_int extiobase_phys, extiotop_phys;
-extern u_int intrcnt[];
 
 extern void *romcallvec;
 

Index: src/sys/arch/news68k/include/intr.h
diff -u src/sys/arch/news68k/include/intr.h:1.29 src/sys/arch/news68k/include/intr.h:1.30
--- src/sys/arch/news68k/include/intr.h:1.29	Mon Jan 15 00:35:23 2024
+++ src/sys/arch/news68k/include/intr.h	Mon Jan 15 20:21:50 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.29 2024/01/15 00:35:23 thorpej Exp $	*/
+/*	$NetBSD: intr.h,v 1.30 2024/01/15 20:21:50 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2024 The NetBSD Foundation, Inc.
@@ -41,6 +41,9 @@
 #define	MACHINE_PSL_IPL_VM		PSL_IPL5
 #define	MACHINE_PSL_IPL_SCHED		PSL_IPL7
 
+#define	MACHINE_INTREVCNT_NAMES		\
+	{ "spur", "AST", "softint", "lev3", "lev4", "lev5", "clock", "nmi" }
+
 #include 
 
 #endif	/* _NEWS68K_INTR_H_ */

Index: src/sys/arch/news68k/include/types.h
diff -u src/sys/arch/news68k/include/types.h:1.14 src/sys/arch/news68k/include/types.h:1.15
--- src/sys/arch/news68k/include/types.h:1.14	Mon Jan 15 00:35:23 2024
+++ src/sys/arch/news68k/include/types.h	Mon Jan 15 20:21:50 2024
@@ -1,7 +1,6 @@
-/*	$NetBSD: types.h,v 1.14 2024/01/15 00:35:23 thorpej Exp $	*/
+/*	$NetBSD: types.h,v 1.15 2024/01/15 20:21:50 thorpej Exp $	*/
 
 #include 
 
-#define	__HAVE_LEGACY_INTRCNT
 #define	__HAVE_MM_MD_KERNACC
 #define	__HAVE_M68K_INTR_VECTORED

Index: src/sys/arch/news68k/news68k/genassym.cf
diff -u src/sys/arch/news68k/news68k/genassym.cf:1.35 src/sys/arch/news68k/news68k/genassym.cf:1.36
--- src/sys/arch/news68k/news68k/genassym.cf:1.35	Mon Jan 15 00:35:24 2024
+++ src/sys/arch/news68k/news68k/genassym.cf	Mon Jan 15 20:21:50 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: genassym.cf,v 1.35 2024/01/15 00:35:24 thorpej Exp $
+#	$NetBSD: genassym.cf,v 1.36 2024/01/15 20:21:50 thorpej Exp $
 
 #
 # Copyright (c) 1982, 1990, 1993
@@ -115,6 +115,8 @@ define	P_VMSPACE		offsetof(struct proc, 
 
 # interrupt/fault metering
 define	CI_NINTR		offsetof(struct cpu_info, ci_data.cpu_nintr)
+define	AST_INTRCNT		((sizeof(struct evcnt)*1) + offsetof(struct evcnt, ev_count32))
+define	NMI_INTRCNT		((sizeof(struct evcnt)*7) + offsetof(struct evcnt, ev_count32))
 
 # PSL values (should just include psl.h?)
 define	PSL_S			PSL_S

Index: src/sys/arch/news68k/news68k/locore.s
diff -u src/sys/arch/news68k/news68k/locore.s:1.81 

CVS commit: src/sys/arch/news68k

2024-01-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Jan 15 20:21:51 UTC 2024

Modified Files:
src/sys/arch/news68k/dev: timer_hb.c
src/sys/arch/news68k/include: cpu.h intr.h types.h
src/sys/arch/news68k/news68k: genassym.cf locore.s machdep.c

Log Message:
G/C __HAVE_LEGACY_INTRCNT from news68k.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/news68k/dev/timer_hb.c
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/news68k/include/cpu.h
cvs rdiff -u -r1.29 -r1.30 src/sys/arch/news68k/include/intr.h
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/news68k/include/types.h
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/news68k/news68k/genassym.cf
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/news68k/news68k/locore.s
cvs rdiff -u -r1.112 -r1.113 src/sys/arch/news68k/news68k/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/news68k

2024-01-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Jan 15 19:54:53 UTC 2024

Modified Files:
src/sys/arch/news68k/include: vectors.h
src/sys/arch/news68k/news68k: locore.s

Log Message:
No need for our own spurious interrupt handler now that m68k_intr.c
handles them for us.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/news68k/include/vectors.h
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/news68k/news68k/locore.s

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

Modified files:

Index: src/sys/arch/news68k/include/vectors.h
diff -u src/sys/arch/news68k/include/vectors.h:1.2 src/sys/arch/news68k/include/vectors.h:1.3
--- src/sys/arch/news68k/include/vectors.h:1.2	Mon Jan 15 00:35:23 2024
+++ src/sys/arch/news68k/include/vectors.h	Mon Jan 15 19:54:53 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: vectors.h,v 1.2 2024/01/15 00:35:23 thorpej Exp $	*/
+/*	$NetBSD: vectors.h,v 1.3 2024/01/15 19:54:53 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 2024 The NetBSD Foundation, Inc.
@@ -36,7 +36,7 @@
 
 #include 
 
-#define	MACHINE_AV0_HANDLER	spurintr
+#define	MACHINE_AV0_HANDLER	intrstub_autovec
 #define	MACHINE_AV1_HANDLER	lev1intr
 #define	MACHINE_AV2_HANDLER	intrstub_autovec
 #define	MACHINE_AV3_HANDLER	lev3intr

Index: src/sys/arch/news68k/news68k/locore.s
diff -u src/sys/arch/news68k/news68k/locore.s:1.80 src/sys/arch/news68k/news68k/locore.s:1.81
--- src/sys/arch/news68k/news68k/locore.s:1.80	Mon Jan 15 00:35:24 2024
+++ src/sys/arch/news68k/news68k/locore.s	Mon Jan 15 19:54:53 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.80 2024/01/15 00:35:24 thorpej Exp $	*/
+/*	$NetBSD: locore.s,v 1.81 2024/01/15 19:54:53 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -651,13 +651,6 @@ Lbrkpt3:
  * Interrupt handlers.
  */
 
-ENTRY_NOPROFILE(spurintr)	/* Level 0 */
-	addql	#1,_C_LABEL(intrcnt)+0
-	INTERRUPT_SAVEREG
-	CPUINFO_INCREMENT(CI_NINTR)
-	INTERRUPT_RESTOREREG
-	rte
-
 ENTRY_NOPROFILE(lev1intr)		/* Level 1: AST interrupt */
 	addql	#1,_C_LABEL(idepth)
 	INTERRUPT_SAVEREG



CVS commit: src/sys/arch/news68k

2024-01-15 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Mon Jan 15 19:54:53 UTC 2024

Modified Files:
src/sys/arch/news68k/include: vectors.h
src/sys/arch/news68k/news68k: locore.s

Log Message:
No need for our own spurious interrupt handler now that m68k_intr.c
handles them for us.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/sys/arch/news68k/include/vectors.h
cvs rdiff -u -r1.80 -r1.81 src/sys/arch/news68k/news68k/locore.s

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



CVS commit: src/sys/arch/news68k

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

Modified Files:
src/sys/arch/news68k/conf: files.news68k
src/sys/arch/news68k/dev: timer_hb.c
src/sys/arch/news68k/include: cpu.h intr.h types.h vectors.h
src/sys/arch/news68k/news68k: genassym.cf isr.h locore.s
Removed Files:
src/sys/arch/news68k/news68k: isr.c

Log Message:
Switch news68k over to the common interrupt dispatch code.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/news68k/conf/files.news68k
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/news68k/dev/timer_hb.c
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/news68k/include/cpu.h
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/news68k/include/intr.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/news68k/include/types.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/news68k/include/vectors.h
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/news68k/news68k/genassym.cf
cvs rdiff -u -r1.25 -r0 src/sys/arch/news68k/news68k/isr.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/news68k/news68k/isr.h
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/news68k/news68k/locore.s

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



CVS commit: src/sys/arch/news68k

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

Modified Files:
src/sys/arch/news68k/conf: files.news68k
src/sys/arch/news68k/dev: timer_hb.c
src/sys/arch/news68k/include: cpu.h intr.h types.h vectors.h
src/sys/arch/news68k/news68k: genassym.cf isr.h locore.s
Removed Files:
src/sys/arch/news68k/news68k: isr.c

Log Message:
Switch news68k over to the common interrupt dispatch code.


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/arch/news68k/conf/files.news68k
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/news68k/dev/timer_hb.c
cvs rdiff -u -r1.49 -r1.50 src/sys/arch/news68k/include/cpu.h
cvs rdiff -u -r1.28 -r1.29 src/sys/arch/news68k/include/intr.h
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/news68k/include/types.h
cvs rdiff -u -r1.1 -r1.2 src/sys/arch/news68k/include/vectors.h
cvs rdiff -u -r1.34 -r1.35 src/sys/arch/news68k/news68k/genassym.cf
cvs rdiff -u -r1.25 -r0 src/sys/arch/news68k/news68k/isr.c
cvs rdiff -u -r1.9 -r1.10 src/sys/arch/news68k/news68k/isr.h
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/news68k/news68k/locore.s

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

Modified files:

Index: src/sys/arch/news68k/conf/files.news68k
diff -u src/sys/arch/news68k/conf/files.news68k:1.38 src/sys/arch/news68k/conf/files.news68k:1.39
--- src/sys/arch/news68k/conf/files.news68k:1.38	Sat Jan 13 23:59:47 2024
+++ src/sys/arch/news68k/conf/files.news68k	Mon Jan 15 00:35:23 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: files.news68k,v 1.38 2024/01/13 23:59:47 thorpej Exp $
+#	$NetBSD: files.news68k,v 1.39 2024/01/15 00:35:23 thorpej Exp $
 
 #	NEWS68K-specific configuration info
 
@@ -15,7 +15,6 @@ file	arch/news68k/news68k/bus_space.c
 #file	arch/news68k/news68k/cons_machdep.c
 file	arch/news68k/news68k/clock.c
 file	arch/news68k/news68k/disksubr.c		disk
-file	arch/news68k/news68k/isr.c
 file	arch/news68k/news68k/machdep.c
 file	arch/news68k/news68k/mainbus.c
 file	arch/news68k/news68k/pmap_bootstrap.c	compile-with "${NOPROF_C}"
@@ -24,6 +23,8 @@ file	arch/news68k/news68k/trap.c
 file	arch/m68k/m68k/cacheops.c
 file	arch/m68k/m68k/db_memrw.c		ddb | kgdb
 file	arch/m68k/m68k/kgdb_machdep.c		kgdb
+file	arch/m68k/m68k/m68k_intr.c
+file	arch/m68k/m68k/m68k_intr_stubs.s
 file	arch/m68k/m68k/m68k_trap.c
 file	arch/m68k/m68k/mmu_subr.s
 file	arch/m68k/m68k/pmap_motorola.c

Index: src/sys/arch/news68k/dev/timer_hb.c
diff -u src/sys/arch/news68k/dev/timer_hb.c:1.19 src/sys/arch/news68k/dev/timer_hb.c:1.20
--- src/sys/arch/news68k/dev/timer_hb.c:1.19	Tue Nov 22 14:31:02 2011
+++ src/sys/arch/news68k/dev/timer_hb.c	Mon Jan 15 00:35:23 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: timer_hb.c,v 1.19 2011/11/22 14:31:02 tsutsui Exp $	*/
+/*	$NetBSD: timer_hb.c,v 1.20 2024/01/15 00:35:23 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: timer_hb.c,v 1.19 2011/11/22 14:31:02 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: timer_hb.c,v 1.20 2024/01/15 00:35:23 thorpej Exp $");
 
 #include 
 #include 
@@ -42,6 +42,7 @@ __KERNEL_RCSID(0, "$NetBSD: timer_hb.c,v
 
 #include 
 #include 
+#include 
 
 #include 
 
@@ -62,7 +63,7 @@ __KERNEL_RCSID(0, "$NetBSD: timer_hb.c,v
 static int timer_hb_match(device_t, cfdata_t, void *);
 static void timer_hb_attach(device_t, device_t, void *);
 static void timer_hb_initclocks(int, int);
-void clock_intr(struct clockframe *);
+void clock_intr(struct clockframe);
 
 static inline void leds_intr(void);
 
@@ -113,7 +114,7 @@ timer_hb_attach(device_t parent, device_
 	timer_config(timer_hb_initclocks);
 
 #if 0 /* XXX this will be done in timer_hb_initclocks() */
-	isrlink_custom(ha->ha_ipl, (void *)_isr_clock);
+	vec_set_entry(VECI_INTRAV0 + ha->ha_ipl, _isr_clock);
 #endif
 }
 
@@ -130,7 +131,7 @@ timer_hb_initclocks(int prof, int stat)
 	s = splhigh();
 
 	/* Install isr (in locore.s) that calls clock_intr(). */
-	isrlink_custom(TIMER_LEVEL, (void *)_isr_clock);
+	vec_set_entry(VECI_INTRAV0 + TIMER_LEVEL, _isr_clock);
 
 	/* enable the clock */
 	*ctrl_timer = 1;
@@ -144,7 +145,7 @@ timer_hb_initclocks(int prof, int stat)
  * from sun3/sun3x/clock.c -tsutsui
  */
 void
-clock_intr(struct clockframe *cf)
+clock_intr(struct clockframe cf)
 {
 #ifdef	LED_IDLE_CHECK
 	extern char _Idle[];	/* locore.s */
@@ -162,7 +163,7 @@ clock_intr(struct clockframe *cf)
 		leds_intr();
 
 	/* Call common clock interrupt handler. */
-	hardclock(cf);
+	hardclock();
 	curcpu()->ci_data.cpu_nintr++;
 }
 

Index: src/sys/arch/news68k/include/cpu.h
diff -u src/sys/arch/news68k/include/cpu.h:1.49 src/sys/arch/news68k/include/cpu.h:1.50
--- src/sys/arch/news68k/include/cpu.h:1.49	Sat Jan 13 23:59:47 2024
+++ src/sys/arch/news68k/include/cpu.h	Mon Jan 15 00:35:23 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.49 2024/01/13 23:59:47 thorpej Exp $	*/
+/*	$NetBSD: cpu.h,v 1.50 2024/01/15 00:35:23 thorpej Exp 

CVS commit: src/sys/arch/news68k/news68k

2024-01-14 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Jan 14 23:01:43 UTC 2024

Modified Files:
src/sys/arch/news68k/news68k: isr.c isr.h

Log Message:
G/C isrlink_custom(); just use vec_set_entry() directly.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/news68k/news68k/isr.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/news68k/news68k/isr.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/news68k/news68k/isr.c
diff -u src/sys/arch/news68k/news68k/isr.c:1.24 src/sys/arch/news68k/news68k/isr.c:1.25
--- src/sys/arch/news68k/news68k/isr.c:1.24	Sat Jan 13 23:59:47 2024
+++ src/sys/arch/news68k/news68k/isr.c	Sun Jan 14 23:01:43 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: isr.c,v 1.24 2024/01/13 23:59:47 thorpej Exp $	*/
+/*	$NetBSD: isr.c,v 1.25 2024/01/14 23:01:43 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.24 2024/01/13 23:59:47 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.25 2024/01/14 23:01:43 thorpej Exp $");
 
 #include 
 #include 
@@ -255,12 +255,6 @@ isrdispatch_vectored(int pc, int evec, v
 		printf("isrdispatch_vectored: vec 0x%x not claimed\n", vec);
 }
 
-void
-isrlink_custom(int level, void *handler)
-{
-	vec_set_entry(VECI_INTRAV0 + level, handler);
-}
-
 const uint16_t ipl2psl_table[NIPL] = {
 	[IPL_NONE]   = PSL_S | PSL_IPL0,
 	[IPL_SOFTCLOCK]  = PSL_S | PSL_IPL2,

Index: src/sys/arch/news68k/news68k/isr.h
diff -u src/sys/arch/news68k/news68k/isr.h:1.8 src/sys/arch/news68k/news68k/isr.h:1.9
--- src/sys/arch/news68k/news68k/isr.h:1.8	Sat Jan 13 23:59:47 2024
+++ src/sys/arch/news68k/news68k/isr.h	Sun Jan 14 23:01:43 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: isr.h,v 1.8 2024/01/13 23:59:47 thorpej Exp $	*/
+/*	$NetBSD: isr.h,v 1.9 2024/01/14 23:01:43 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -61,4 +61,3 @@ void isrlink_vectored(int (*)(void *), v
 void isrunlink_vectored(int);
 void isrdispatch_autovec(int);
 void isrdispatch_vectored(int, int, void *);
-void isrlink_custom(int, void *);



CVS commit: src/sys/arch/news68k/news68k

2024-01-14 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sun Jan 14 23:01:43 UTC 2024

Modified Files:
src/sys/arch/news68k/news68k: isr.c isr.h

Log Message:
G/C isrlink_custom(); just use vec_set_entry() directly.


To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/news68k/news68k/isr.c
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/news68k/news68k/isr.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/news68k

2024-01-13 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jan 13 23:59:47 UTC 2024

Modified Files:
src/sys/arch/news68k/conf: files.news68k
src/sys/arch/news68k/include: cpu.h
src/sys/arch/news68k/news68k: isr.c isr.h locore.s
Added Files:
src/sys/arch/news68k/include: vectors.h
Removed Files:
src/sys/arch/news68k/news68k: vectors.s

Log Message:
Switch news68k over to the common m68k vector table.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/news68k/conf/files.news68k
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/news68k/include/cpu.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/news68k/include/vectors.h
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/news68k/news68k/isr.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/news68k/news68k/isr.h
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/news68k/news68k/locore.s
cvs rdiff -u -r1.9 -r0 src/sys/arch/news68k/news68k/vectors.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/news68k/conf/files.news68k
diff -u src/sys/arch/news68k/conf/files.news68k:1.37 src/sys/arch/news68k/conf/files.news68k:1.38
--- src/sys/arch/news68k/conf/files.news68k:1.37	Tue Jan  9 04:16:26 2024
+++ src/sys/arch/news68k/conf/files.news68k	Sat Jan 13 23:59:47 2024
@@ -1,4 +1,4 @@
-#	$NetBSD: files.news68k,v 1.37 2024/01/09 04:16:26 thorpej Exp $
+#	$NetBSD: files.news68k,v 1.38 2024/01/13 23:59:47 thorpej Exp $
 
 #	NEWS68K-specific configuration info
 
@@ -29,6 +29,7 @@ file	arch/m68k/m68k/mmu_subr.s
 file	arch/m68k/m68k/pmap_motorola.c
 file	arch/m68k/m68k/procfs_machdep.c		procfs
 file	arch/m68k/m68k/sys_machdep.c
+file	arch/m68k/m68k/vectors.c
 file	arch/m68k/m68k/vm_machdep.c
 file	dev/cons.c
 

Index: src/sys/arch/news68k/include/cpu.h
diff -u src/sys/arch/news68k/include/cpu.h:1.48 src/sys/arch/news68k/include/cpu.h:1.49
--- src/sys/arch/news68k/include/cpu.h:1.48	Fri Jan 12 23:36:29 2024
+++ src/sys/arch/news68k/include/cpu.h	Sat Jan 13 23:59:47 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: cpu.h,v 1.48 2024/01/12 23:36:29 thorpej Exp $	*/
+/*	$NetBSD: cpu.h,v 1.49 2024/01/13 23:59:47 thorpej Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -149,15 +149,10 @@ extern u_int intiobase_phys, intiotop_ph
 extern u_int extiobase_phys, extiotop_phys;
 extern u_int intrcnt[];
 
-extern void (*vectab[])(void);
 extern void *romcallvec;
 
 struct frame;
 
-/* locore.s functions */
-void badtrap(void);
-void intrhand_vectored(void);
-
 void doboot(int)
 	__attribute__((__noreturn__));
 void nmihand(struct frame *);

Index: src/sys/arch/news68k/news68k/isr.c
diff -u src/sys/arch/news68k/news68k/isr.c:1.23 src/sys/arch/news68k/news68k/isr.c:1.24
--- src/sys/arch/news68k/news68k/isr.c:1.23	Sat Nov 21 17:55:38 2020
+++ src/sys/arch/news68k/news68k/isr.c	Sat Jan 13 23:59:47 2024
@@ -1,4 +1,4 @@
-/*	$NetBSD: isr.c,v 1.23 2020/11/21 17:55:38 thorpej Exp $	*/
+/*	$NetBSD: isr.c,v 1.24 2024/01/13 23:59:47 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.23 2020/11/21 17:55:38 thorpej Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.24 2024/01/13 23:59:47 thorpej Exp $");
 
 #include 
 #include 
@@ -49,14 +49,16 @@ __KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.23
 
 #include 
 
+#include 
+
 #include 
 
-isr_autovec_list_t isr_autovec[NISRAUTOVEC];
-struct	isr_vectored isr_vectored[NISRVECTORED];
+isr_autovec_list_t isr_autovec[NAUTOVECTORS];
+struct	isr_vectored isr_vectored[NUSERVECTORS];
 int idepth;
 
-void set_vector_entry(int, void *);
-void *get_vector_entry(int);
+extern char badtrap[];
+extern char intrhand_vectored[];
 
 void
 isrinit(void)
@@ -64,7 +66,7 @@ isrinit(void)
 	int i;
 
 	/* Initialize the autovector lists. */
-	for (i = 0; i < NISRAUTOVEC; ++i) {
+	for (i = 0; i < NAUTOVECTORS; ++i) {
 		LIST_INIT(_autovec[i]);
 	}
 }
@@ -79,7 +81,7 @@ isrlink_autovec(int (*func)(void *), voi
 	struct isr_autovec *newisr, *curisr;
 	isr_autovec_list_t *list;
 
-	if ((ipl < 0) || (ipl >= NISRAUTOVEC))
+	if ((ipl < 0) || (ipl >= NAUTOVECTORS))
 		panic("isrlink_autovec: bad ipl %d", ipl);
 
 	newisr = kmem_alloc(sizeof(*newisr), KM_SLEEP);
@@ -144,14 +146,14 @@ isrlink_vectored(int (*func)(void *), vo
 {
 	struct isr_vectored *isr;
 
-	if ((ipl < 0) || (ipl >= NISRAUTOVEC))
+	if (ipl < 0 || ipl >= NAUTOVECTORS)
 		panic("isrlink_vectored: bad ipl %d", ipl);
-	if ((vec < ISRVECTORED) || (vec >= ISRVECTORED + NISRVECTORED))
+	if (vec < VECI_USRVEC_START || vec >= NVECTORS)
 		panic("isrlink_vectored: bad vec 0x%x", vec);
 
-	isr = _vectored[vec - ISRVECTORED];
+	isr = _vectored[vec - VECI_USRVEC_START];
 
-	if ((vectab[vec] != badtrap) || (isr->isr_func != NULL))
+	if (vec_get_entry(vec) != badtrap || isr->isr_func != NULL)
 		panic("isrlink_vectored: vec 0x%x not available", vec);
 
 	/* Fill in the new entry. */
@@ -160,7 +162,7 @@ isrlink_vectored(int (*func)(void 

CVS commit: src/sys/arch/news68k

2024-01-13 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Jan 13 23:59:47 UTC 2024

Modified Files:
src/sys/arch/news68k/conf: files.news68k
src/sys/arch/news68k/include: cpu.h
src/sys/arch/news68k/news68k: isr.c isr.h locore.s
Added Files:
src/sys/arch/news68k/include: vectors.h
Removed Files:
src/sys/arch/news68k/news68k: vectors.s

Log Message:
Switch news68k over to the common m68k vector table.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/arch/news68k/conf/files.news68k
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/news68k/include/cpu.h
cvs rdiff -u -r0 -r1.1 src/sys/arch/news68k/include/vectors.h
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/news68k/news68k/isr.c
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/news68k/news68k/isr.h
cvs rdiff -u -r1.78 -r1.79 src/sys/arch/news68k/news68k/locore.s
cvs rdiff -u -r1.9 -r0 src/sys/arch/news68k/news68k/vectors.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/news68k/news68k

2023-10-15 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Oct 15 10:46:51 UTC 2023

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

Log Message:
Remove obsolete #if blocks.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/news68k/news68k/locore.s

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

Modified files:

Index: src/sys/arch/news68k/news68k/locore.s
diff -u src/sys/arch/news68k/news68k/locore.s:1.70 src/sys/arch/news68k/news68k/locore.s:1.71
--- src/sys/arch/news68k/news68k/locore.s:1.70	Sun Oct  8 17:42:58 2023
+++ src/sys/arch/news68k/news68k/locore.s	Sun Oct 15 10:46:51 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.70 2023/10/08 17:42:58 andvar Exp $	*/
+/*	$NetBSD: locore.s,v 1.71 2023/10/15 10:46:51 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -89,7 +89,6 @@ ASLOCAL(monitor)
 /*
  * LED control for DEBUG.
  */
-#ifdef __STDC__
 #define	IMMEDIATE	#
 #define	SETLED(func)	\
 	movl	IMMEDIATE func,%d0; \
@@ -98,15 +97,6 @@ ASLOCAL(monitor)
 #define	SETLED2(func)	\
 	movl	IMMEDIATE func,%d0; \
 	jmp	debug_led2
-#else
-#define	SETLED(func)	\
-	movl	#func,%d0; \
-	jmp	debug_led
-
-#define	SETLED2(func)	\
-	movl	#func,%d0; \
-	jmp	debug_led2
-#endif /* __STDC__ */
 
 #define	TOMONITOR	\
 	moveal	_ASM_LABEL(monitor), %a0; \
@@ -342,11 +332,7 @@ Lstart2:
 	andl	#PG_FRAME,%d2		| round to a page
 	movl	%d2,%a4
 	addl	%a5,%a4			| convert to PA
-#if 0
-	movl	#0x0, %sp@-		| firstpa
-#else
-	pea	%a5@
-#endif
+	pea	%a5@			| firstpa
 	pea	%a4@			| nextpa
 	RELOC(pmap_bootstrap,%a0)
 	jbsr	%a0@			| pmap_bootstrap(firstpa, nextpa)



CVS commit: src/sys/arch/news68k/news68k

2023-10-15 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Oct 15 10:46:51 UTC 2023

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

Log Message:
Remove obsolete #if blocks.


To generate a diff of this commit:
cvs rdiff -u -r1.70 -r1.71 src/sys/arch/news68k/news68k/locore.s

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



CVS commit: src/sys/arch/news68k/news68k

2023-10-08 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Oct  8 17:42:58 UTC 2023

Modified Files:
src/sys/arch/news68k/news68k: locore.s vectors.s

Log Message:
Revert my changes regarding removal of FPSP related blocks.

After additional discussion it is preferred to keep code consistency,
to make it easier refactor common code between m68k ports.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/news68k/news68k/locore.s
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/news68k/news68k/vectors.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/news68k/news68k/locore.s
diff -u src/sys/arch/news68k/news68k/locore.s:1.69 src/sys/arch/news68k/news68k/locore.s:1.70
--- src/sys/arch/news68k/news68k/locore.s:1.69	Fri Oct  6 21:10:12 2023
+++ src/sys/arch/news68k/news68k/locore.s	Sun Oct  8 17:42:58 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.69 2023/10/06 21:10:12 andvar Exp $	*/
+/*	$NetBSD: locore.s,v 1.70 2023/10/08 17:42:58 andvar Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -44,6 +44,7 @@
 
 #include "opt_compat_netbsd.h"
 #include "opt_compat_sunos.h"
+#include "opt_fpsp.h"
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
 #include "opt_lockdebug.h"

Index: src/sys/arch/news68k/news68k/vectors.s
diff -u src/sys/arch/news68k/news68k/vectors.s:1.8 src/sys/arch/news68k/news68k/vectors.s:1.9
--- src/sys/arch/news68k/news68k/vectors.s:1.8	Fri Oct  6 21:10:12 2023
+++ src/sys/arch/news68k/news68k/vectors.s	Sun Oct  8 17:42:58 2023
@@ -1,4 +1,4 @@
-|	$NetBSD: vectors.s,v 1.8 2023/10/06 21:10:12 andvar Exp $
+|	$NetBSD: vectors.s,v 1.9 2023/10/08 17:42:58 andvar Exp $
 
 | Copyright (c) 1997 Jason R. Thorpe.  All rights reserved.
 | Copyright (c) 1988 University of Utah
@@ -109,6 +109,15 @@ GLOBAL(vectab)
 	VECTOR(illinst)		/* 45: TRAP instruction vector */
 	VECTOR(illinst)		/* 46: TRAP instruction vector */
 	VECTOR(trap15)		/* 47: TRAP instruction vector */
+#ifdef FPSP
+	ASVECTOR(bsun)		/* 48: FPCP branch/set on unordered cond */
+	ASVECTOR(inex)		/* 49: FPCP inexact result */
+	ASVECTOR(dz)		/* 50: FPCP divide by zero */
+	ASVECTOR(unfl)		/* 51: FPCP underflow */
+	ASVECTOR(operr)		/* 52: FPCP operand error */
+	ASVECTOR(ovfl)		/* 53: FPCP overflow */
+	ASVECTOR(snan)		/* 54: FPCP signalling NAN */
+#else
 	VECTOR(fpfault)		/* 48: FPCP branch/set on unordered cond */
 	VECTOR(fpfault)		/* 49: FPCP inexact result */
 	VECTOR(fpfault)		/* 50: FPCP divide by zero */
@@ -116,6 +125,8 @@ GLOBAL(vectab)
 	VECTOR(fpfault)		/* 52: FPCP operand error */
 	VECTOR(fpfault)		/* 53: FPCP overflow */
 	VECTOR(fpfault)		/* 54: FPCP signalling NAN */
+#endif
+
 	VECTOR(fpunsupp)	/* 55: FPCP unimplemented data type */
 	VECTOR(badtrap)		/* 56: unassigned, reserved */
 	VECTOR(badtrap)		/* 57: unassigned, reserved */



CVS commit: src/sys/arch/news68k/news68k

2023-10-08 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Oct  8 17:42:58 UTC 2023

Modified Files:
src/sys/arch/news68k/news68k: locore.s vectors.s

Log Message:
Revert my changes regarding removal of FPSP related blocks.

After additional discussion it is preferred to keep code consistency,
to make it easier refactor common code between m68k ports.


To generate a diff of this commit:
cvs rdiff -u -r1.69 -r1.70 src/sys/arch/news68k/news68k/locore.s
cvs rdiff -u -r1.8 -r1.9 src/sys/arch/news68k/news68k/vectors.s

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/news68k/conf

2023-10-08 Thread Andrius V
OK,  it makes sense. I will revert the changes. Thanks for your explanations.

On Sun, Oct 8, 2023 at 12:49 PM matthew green  wrote:
>
> > I was changing news68k specific code, thus wasn't treating them as
> > common.  But I understand the point.
>
> there's a *LOT* of m68k code that is copied into all the ports
> that is almost identical, and should really be shared, but it
> not, and changes like can make this harder to share.
>
> ie, while it might appear news68k specific, ideally most of it
> would end up in arch/m68k instead.
>
> it would really be far better for that merge, than to worry
> about obscure compile options -- there's a real cost when we
> have platform changes to make, and 10 m68k copies are needed
> instead of 1.  we've done some of this over time (for not
> just m68k) but there's quite a lot of left here..
>
> thanks.
>
>
> .mrg.


re: CVS commit: src/sys/arch/news68k/conf

2023-10-08 Thread matthew green
> I was changing news68k specific code, thus wasn't treating them as
> common.  But I understand the point.

there's a *LOT* of m68k code that is copied into all the ports
that is almost identical, and should really be shared, but it
not, and changes like can make this harder to share.

ie, while it might appear news68k specific, ideally most of it
would end up in arch/m68k instead.

it would really be far better for that merge, than to worry
about obscure compile options -- there's a real cost when we
have platform changes to make, and 10 m68k copies are needed
instead of 1.  we've done some of this over time (for not
just m68k) but there's quite a lot of left here..

thanks.


.mrg.


Re: CVS commit: src/sys/arch/news68k/conf

2023-10-08 Thread Andrius V
On Sun, Oct 8, 2023 at 6:56 AM Izumi Tsutsui  wrote:
>
> > In this case maybe I should remove all FPSP references (vectors.S,
> > locore.S, Makefile.news68k (MD_LIBS={FPSP})?
>
> IMO we don't have to keep strict consistencies or buildabilities of
> options but rather should consider readabilities and maintainabilities.
>
> - options FPSP in a config file is not necessary for users on news68k
>   (unless some users build own 040/060 upgrade mod like x68k)

Yes, that's understandable and true. However, if someone would have a
mod, he would need to understand why FPSP build fails in the first
place.
I just wanted to avoid confusion, that code has ifdef blocks, but
there's no way to build it.

> - #ifdef FPSP (and other m68k specific options) blocks in common
>   sources might help to check diffs from other m68k ports

I was changing news68k specific code, thus wasn't treating them as
common.  But I understand the point.
I can return FPSP block in vectors.s, if that helps with readability
and maintainability.
However, those copy pasted common files usually diverge between ports
(from what I've seen),
makes it difficult to understand what is still common and what is the
"latest" code at times (likely not in this case).

>  - In the perfect world, we should have a common m68k/locore.s etc.
>and move port specific blocks into locore_machdep.s like mips,
>but m68k CPUs are too flexible and all m68k ports have too many
>historical difficulties to refactor them

I admit I went a bit impatient this time without waiting for the
proper answer. I am OK to settle with the best option in the context,
either revert everything to original state, keep partial changes or
leave current state. Sorry for this.


>
> I don't mind your changes in this case, but it's appreciated
> to ask design considerations before changes, as you did for mmeye.
>
> Thanks,
> ---
> Izumi Tsutsui


CVS commit: src/sys/arch/news68k

2023-10-07 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Oct  8 03:57:48 UTC 2023

Modified Files:
src/sys/arch/news68k/news68k: machdep.c pmap_bootstrap.c
src/sys/arch/news68k/stand/bootxx: start.S

Log Message:
Remove trailing spaces and tab.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/news68k/news68k/machdep.c
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/news68k/news68k/pmap_bootstrap.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/news68k/stand/bootxx/start.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/news68k/news68k/machdep.c
diff -u src/sys/arch/news68k/news68k/machdep.c:1.110 src/sys/arch/news68k/news68k/machdep.c:1.111
--- src/sys/arch/news68k/news68k/machdep.c:1.110	Sat Oct  9 20:00:42 2021
+++ src/sys/arch/news68k/news68k/machdep.c	Sun Oct  8 03:57:47 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.110 2021/10/09 20:00:42 tsutsui Exp $	*/
+/*	$NetBSD: machdep.c,v 1.111 2023/10/08 03:57:47 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.110 2021/10/09 20:00:42 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.111 2023/10/08 03:57:47 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -1001,7 +1001,7 @@ mm_md_physacc(paddr_t pa, vm_prot_t prot
 	 */
 	memend = lowram + ctob(physmem);
 
-	if (lowram <= pa && pa < memend) 
+	if (lowram <= pa && pa < memend)
 		return 0;
 
 	return EFAULT;

Index: src/sys/arch/news68k/news68k/pmap_bootstrap.c
diff -u src/sys/arch/news68k/news68k/pmap_bootstrap.c:1.41 src/sys/arch/news68k/news68k/pmap_bootstrap.c:1.42
--- src/sys/arch/news68k/news68k/pmap_bootstrap.c:1.41	Fri Dec 23 10:48:12 2016
+++ src/sys/arch/news68k/news68k/pmap_bootstrap.c	Sun Oct  8 03:57:47 2023
@@ -1,6 +1,6 @@
-/*	$NetBSD: pmap_bootstrap.c,v 1.41 2016/12/23 10:48:12 maya Exp $	*/
+/*	$NetBSD: pmap_bootstrap.c,v 1.42 2023/10/08 03:57:47 tsutsui Exp $	*/
 
-/* 
+/*
  * Copyright (c) 1991, 1993
  *	The Regents of the University of California.  All rights reserved.
  *
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.41 2016/12/23 10:48:12 maya Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap_bootstrap.c,v 1.42 2023/10/08 03:57:47 tsutsui Exp $");
 
 #include "opt_m68k_arch.h"
 

Index: src/sys/arch/news68k/stand/bootxx/start.S
diff -u src/sys/arch/news68k/stand/bootxx/start.S:1.3 src/sys/arch/news68k/stand/bootxx/start.S:1.4
--- src/sys/arch/news68k/stand/bootxx/start.S:1.3	Wed May 14 13:29:28 2008
+++ src/sys/arch/news68k/stand/bootxx/start.S	Sun Oct  8 03:57:47 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: start.S,v 1.3 2008/05/14 13:29:28 tsutsui Exp $	*/
+/*	$NetBSD: start.S,v 1.4 2023/10/08 03:57:47 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1999 Izumi Tsutsui.  All rights reserved.
@@ -30,7 +30,7 @@
 	.align	4
 
 ASENTRY_NOPROFILE(start)
-	jra	1f	
+	jra	1f
 	.word	0
 	.word	0
 	.word	0



CVS commit: src/sys/arch/news68k

2023-10-07 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Oct  8 03:57:48 UTC 2023

Modified Files:
src/sys/arch/news68k/news68k: machdep.c pmap_bootstrap.c
src/sys/arch/news68k/stand/bootxx: start.S

Log Message:
Remove trailing spaces and tab.


To generate a diff of this commit:
cvs rdiff -u -r1.110 -r1.111 src/sys/arch/news68k/news68k/machdep.c
cvs rdiff -u -r1.41 -r1.42 src/sys/arch/news68k/news68k/pmap_bootstrap.c
cvs rdiff -u -r1.3 -r1.4 src/sys/arch/news68k/stand/bootxx/start.S

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/news68k/conf

2023-10-07 Thread Izumi Tsutsui
> In this case maybe I should remove all FPSP references (vectors.S,
> locore.S, Makefile.news68k (MD_LIBS={FPSP})?

IMO we don't have to keep strict consistencies or buildabilities of
options but rather should consider readabilities and maintainabilities.

- options FPSP in a config file is not necessary for users on news68k
  (unless some users build own 040/060 upgrade mod like x68k)
- #ifdef FPSP (and other m68k specific options) blocks in common
  sources might help to check diffs from other m68k ports
 - In the perfect world, we should have a common m68k/locore.s etc.
   and move port specific blocks into locore_machdep.s like mips,
   but m68k CPUs are too flexible and all m68k ports have too many
   historical difficulties to refactor them

I don't mind your changes in this case, but it's appreciated
to ask design considerations before changes, as you did for mmeye.

Thanks,
---
Izumi Tsutsui


CVS commit: src/sys/arch/news68k

2023-10-06 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Oct  6 21:10:12 UTC 2023

Modified Files:
src/sys/arch/news68k/conf: Makefile.news68k
src/sys/arch/news68k/news68k: locore.s vectors.s

Log Message:
Remove fpsp include and #ifdef FPSP blocks for news68k.
FPSP is necessary for 040/060 only, and news68k doesn't have such hardware.

Noted by Izumi Tsutsui.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/news68k/conf/Makefile.news68k
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/news68k/news68k/locore.s
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/news68k/news68k/vectors.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/news68k/conf/Makefile.news68k
diff -u src/sys/arch/news68k/conf/Makefile.news68k:1.23 src/sys/arch/news68k/conf/Makefile.news68k:1.24
--- src/sys/arch/news68k/conf/Makefile.news68k:1.23	Sun Oct  1 18:50:53 2023
+++ src/sys/arch/news68k/conf/Makefile.news68k	Fri Oct  6 21:10:12 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.news68k,v 1.23 2023/10/01 18:50:53 andvar Exp $
+#	$NetBSD: Makefile.news68k,v 1.24 2023/10/06 21:10:12 andvar Exp $
 #
 # Makefile for NetBSD
 #
@@ -46,8 +46,6 @@ OPT_MODULAR=	%MODULAR%
 ##
 ## (4) local objects, compile rules, and dependencies
 ##
-# for the Motorola 68040 Floating Point Software Product
-.include "$S/arch/m68k/fpsp/Makefile.inc"
 
 MD_OBJS=	locore.o
 MD_LIBS=	${FPSP}

Index: src/sys/arch/news68k/news68k/locore.s
diff -u src/sys/arch/news68k/news68k/locore.s:1.68 src/sys/arch/news68k/news68k/locore.s:1.69
--- src/sys/arch/news68k/news68k/locore.s:1.68	Mon May 30 09:56:03 2022
+++ src/sys/arch/news68k/news68k/locore.s	Fri Oct  6 21:10:12 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.68 2022/05/30 09:56:03 andvar Exp $	*/
+/*	$NetBSD: locore.s,v 1.69 2023/10/06 21:10:12 andvar Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -44,7 +44,6 @@
 
 #include "opt_compat_netbsd.h"
 #include "opt_compat_sunos.h"
-#include "opt_fpsp.h"
 #include "opt_ddb.h"
 #include "opt_kgdb.h"
 #include "opt_lockdebug.h"

Index: src/sys/arch/news68k/news68k/vectors.s
diff -u src/sys/arch/news68k/news68k/vectors.s:1.7 src/sys/arch/news68k/news68k/vectors.s:1.8
--- src/sys/arch/news68k/news68k/vectors.s:1.7	Sun Mar  6 14:54:47 2011
+++ src/sys/arch/news68k/news68k/vectors.s	Fri Oct  6 21:10:12 2023
@@ -1,4 +1,4 @@
-|	$NetBSD: vectors.s,v 1.7 2011/03/06 14:54:47 tsutsui Exp $
+|	$NetBSD: vectors.s,v 1.8 2023/10/06 21:10:12 andvar Exp $
 
 | Copyright (c) 1997 Jason R. Thorpe.  All rights reserved.
 | Copyright (c) 1988 University of Utah
@@ -109,15 +109,6 @@ GLOBAL(vectab)
 	VECTOR(illinst)		/* 45: TRAP instruction vector */
 	VECTOR(illinst)		/* 46: TRAP instruction vector */
 	VECTOR(trap15)		/* 47: TRAP instruction vector */
-#ifdef FPSP
-	ASVECTOR(bsun)		/* 48: FPCP branch/set on unordered cond */
-	ASVECTOR(inex)		/* 49: FPCP inexact result */
-	ASVECTOR(dz)		/* 50: FPCP divide by zero */
-	ASVECTOR(unfl)		/* 51: FPCP underflow */
-	ASVECTOR(operr)		/* 52: FPCP operand error */
-	ASVECTOR(ovfl)		/* 53: FPCP overflow */
-	ASVECTOR(snan)		/* 54: FPCP signalling NAN */
-#else
 	VECTOR(fpfault)		/* 48: FPCP branch/set on unordered cond */
 	VECTOR(fpfault)		/* 49: FPCP inexact result */
 	VECTOR(fpfault)		/* 50: FPCP divide by zero */
@@ -125,8 +116,6 @@ GLOBAL(vectab)
 	VECTOR(fpfault)		/* 52: FPCP operand error */
 	VECTOR(fpfault)		/* 53: FPCP overflow */
 	VECTOR(fpfault)		/* 54: FPCP signalling NAN */
-#endif
-
 	VECTOR(fpunsupp)	/* 55: FPCP unimplemented data type */
 	VECTOR(badtrap)		/* 56: unassigned, reserved */
 	VECTOR(badtrap)		/* 57: unassigned, reserved */



CVS commit: src/sys/arch/news68k

2023-10-06 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Fri Oct  6 21:10:12 UTC 2023

Modified Files:
src/sys/arch/news68k/conf: Makefile.news68k
src/sys/arch/news68k/news68k: locore.s vectors.s

Log Message:
Remove fpsp include and #ifdef FPSP blocks for news68k.
FPSP is necessary for 040/060 only, and news68k doesn't have such hardware.

Noted by Izumi Tsutsui.


To generate a diff of this commit:
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/news68k/conf/Makefile.news68k
cvs rdiff -u -r1.68 -r1.69 src/sys/arch/news68k/news68k/locore.s
cvs rdiff -u -r1.7 -r1.8 src/sys/arch/news68k/news68k/vectors.s

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/news68k/conf

2023-10-01 Thread Andrius V
In this case maybe I should remove all FPSP references (vectors.S,
locore.S, Makefile.news68k (MD_LIBS={FPSP})?

On Sun, Oct 1, 2023 at 10:08 PM Izumi Tsutsui  wrote:
>
> > Module Name:  src
> > Committed By: andvar
> > Date: Sun Oct  1 18:50:53 UTC 2023
> >
> > Modified Files:
> >   src/sys/arch/news68k/conf: Makefile.news68k
> >
> > Log Message:
> > include fpsp Makefile.inc in Makefile.news68k, same as other m68k ports.
> >
> > needed for FPSP option to build, otherwise FPSP specific vectors are 
> > undefined.
>
> FPSP is neccesary only for 68040 (and 68060) and
> there is no 040 NEWS machines. That's the reason
> why news68k doesn't include fpsp.
>
> ---
> Izumi Tsutsui


CVS commit: src/sys/arch/news68k

2023-10-01 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Oct  1 19:28:36 UTC 2023

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

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

Same as for mvme68k, build complains about undefined reference to zs_check_kgdb
due to missing port specific zs kgdb implementation for MI zs(4) driver though.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/news68k/conf/files.news68k
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/news68k/news68k/trap.c

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

Modified files:

Index: src/sys/arch/news68k/conf/files.news68k
diff -u src/sys/arch/news68k/conf/files.news68k:1.35 src/sys/arch/news68k/conf/files.news68k:1.36
--- src/sys/arch/news68k/conf/files.news68k:1.35	Mon Feb 18 01:12:24 2019
+++ src/sys/arch/news68k/conf/files.news68k	Sun Oct  1 19:28:36 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: files.news68k,v 1.35 2019/02/18 01:12:24 thorpej Exp $
+#	$NetBSD: files.news68k,v 1.36 2023/10/01 19:28:36 andvar Exp $
 
 #	NEWS68K-specific configuration info
 
@@ -23,6 +23,7 @@ file	arch/news68k/news68k/romcalls.S
 file	arch/news68k/news68k/trap.c
 file	arch/m68k/m68k/cacheops.c
 file	arch/m68k/m68k/db_memrw.c		ddb | kgdb
+file	arch/m68k/m68k/kgdb_machdep.c		kgdb
 file	arch/m68k/m68k/m68k_trap.c
 file	arch/m68k/m68k/pmap_motorola.c
 file	arch/m68k/m68k/procfs_machdep.c		procfs

Index: src/sys/arch/news68k/news68k/trap.c
diff -u src/sys/arch/news68k/news68k/trap.c:1.74 src/sys/arch/news68k/news68k/trap.c:1.75
--- src/sys/arch/news68k/news68k/trap.c:1.74	Sat Apr 22 10:09:12 2023
+++ src/sys/arch/news68k/news68k/trap.c	Sun Oct  1 19:28:36 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.74 2023/04/22 10:09:12 tsutsui Exp $	*/
+/*	$NetBSD: trap.c,v 1.75 2023/10/01 19:28:36 andvar Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.74 2023/04/22 10:09:12 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.75 2023/10/01 19:28:36 andvar Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -54,6 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.7
 #include 
 #include 
 #include 
+#include 
 
 #include 
 #include 
@@ -281,7 +282,7 @@ trap(struct frame *fp, int type, u_int c
 		s = splhigh();
 #ifdef KGDB
 		/* If connected, step or cont returns 1 */
-		if (kgdb_trap(type, fp))
+		if (kgdb_trap(type, (db_regs_t *)fp))
 			goto kgdb_cont;
 #endif
 #ifdef DDB



CVS commit: src/sys/arch/news68k

2023-10-01 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Oct  1 19:28:36 UTC 2023

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

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

Same as for mvme68k, build complains about undefined reference to zs_check_kgdb
due to missing port specific zs kgdb implementation for MI zs(4) driver though.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/arch/news68k/conf/files.news68k
cvs rdiff -u -r1.74 -r1.75 src/sys/arch/news68k/news68k/trap.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/news68k/conf

2023-10-01 Thread Izumi Tsutsui
> Module Name:  src
> Committed By: andvar
> Date: Sun Oct  1 18:50:53 UTC 2023
> 
> Modified Files:
>   src/sys/arch/news68k/conf: Makefile.news68k
> 
> Log Message:
> include fpsp Makefile.inc in Makefile.news68k, same as other m68k ports.
> 
> needed for FPSP option to build, otherwise FPSP specific vectors are 
> undefined.

FPSP is neccesary only for 68040 (and 68060) and
there is no 040 NEWS machines. That's the reason
why news68k doesn't include fpsp.

---
Izumi Tsutsui


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

2023-10-01 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Oct  1 18:50:53 UTC 2023

Modified Files:
src/sys/arch/news68k/conf: Makefile.news68k

Log Message:
include fpsp Makefile.inc in Makefile.news68k, same as other m68k ports.

needed for FPSP option to build, otherwise FPSP specific vectors are undefined.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/news68k/conf/Makefile.news68k

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/news68k/conf/Makefile.news68k
diff -u src/sys/arch/news68k/conf/Makefile.news68k:1.22 src/sys/arch/news68k/conf/Makefile.news68k:1.23
--- src/sys/arch/news68k/conf/Makefile.news68k:1.22	Sat Sep 22 12:24:02 2018
+++ src/sys/arch/news68k/conf/Makefile.news68k	Sun Oct  1 18:50:53 2023
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile.news68k,v 1.22 2018/09/22 12:24:02 rin Exp $
+#	$NetBSD: Makefile.news68k,v 1.23 2023/10/01 18:50:53 andvar Exp $
 #
 # Makefile for NetBSD
 #
@@ -46,6 +46,9 @@ OPT_MODULAR=	%MODULAR%
 ##
 ## (4) local objects, compile rules, and dependencies
 ##
+# for the Motorola 68040 Floating Point Software Product
+.include "$S/arch/m68k/fpsp/Makefile.inc"
+
 MD_OBJS=	locore.o
 MD_LIBS=	${FPSP}
 MD_CFILES=



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

2023-10-01 Thread Andrius Varanavicius
Module Name:src
Committed By:   andvar
Date:   Sun Oct  1 18:50:53 UTC 2023

Modified Files:
src/sys/arch/news68k/conf: Makefile.news68k

Log Message:
include fpsp Makefile.inc in Makefile.news68k, same as other m68k ports.

needed for FPSP option to build, otherwise FPSP specific vectors are undefined.


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/news68k/conf/Makefile.news68k

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



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

2023-07-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Jul 11 11:09:13 UTC 2023

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

Log Message:
news68k/intr.h: Fix includes.  Put some definitions under _KERNEL.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 src/sys/arch/news68k/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/news68k/include/intr.h
diff -u src/sys/arch/news68k/include/intr.h:1.27 src/sys/arch/news68k/include/intr.h:1.28
--- src/sys/arch/news68k/include/intr.h:1.27	Thu Apr 19 21:50:07 2018
+++ src/sys/arch/news68k/include/intr.h	Tue Jul 11 11:09:13 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.27 2018/04/19 21:50:07 christos Exp $	*/
+/*	$NetBSD: intr.h,v 1.28 2023/07/11 11:09:13 riastradh Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -32,9 +32,14 @@
 #ifndef _NEWS68K_INTR_H_
 #define	_NEWS68K_INTR_H_
 
+#include 
+
 #include 
 #include 
+#include 
+
 #include 
+
 #include 
 
 #define	IPL_NONE	0
@@ -63,6 +68,8 @@ typedef struct {
 	uint16_t _psl;
 } ipl_cookie_t;
 
+#ifdef _KERNEL
+
 static __inline ipl_cookie_t
 makeiplcookie(ipl_t ipl)
 {
@@ -98,4 +105,6 @@ splx(int sr)
 #define	splhigh()	spl7()
 #define	splsched()	spl7()
 
+#endif
+
 #endif /* _NEWS68K_INTR_H_ */



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

2023-07-11 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Tue Jul 11 11:09:13 UTC 2023

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

Log Message:
news68k/intr.h: Fix includes.  Put some definitions under _KERNEL.


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

2023-04-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Apr 22 10:09:12 UTC 2023

Modified Files:
src/sys/arch/news68k/news68k: bus_space.c trap.c

Log Message:
Remove ancient /*ARGSUSED*/ comments.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/news68k/news68k/bus_space.c
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/news68k/news68k/trap.c

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

Modified files:

Index: src/sys/arch/news68k/news68k/bus_space.c
diff -u src/sys/arch/news68k/news68k/bus_space.c:1.13 src/sys/arch/news68k/news68k/bus_space.c:1.14
--- src/sys/arch/news68k/news68k/bus_space.c:1.13	Sun Sep 21 16:34:53 2014
+++ src/sys/arch/news68k/news68k/bus_space.c	Sat Apr 22 10:09:12 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_space.c,v 1.13 2014/09/21 16:34:53 christos Exp $	*/
+/*	$NetBSD: bus_space.c,v 1.14 2023/04/22 10:09:12 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.13 2014/09/21 16:34:53 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: bus_space.c,v 1.14 2023/04/22 10:09:12 tsutsui Exp $");
 
 #include 
 #include 
@@ -46,7 +46,6 @@ __KERNEL_RCSID(0, "$NetBSD: bus_space.c,
 
 extern int *nofault;
 
-/* ARGSUSED */
 int
 bus_space_map(bus_space_tag_t t, bus_addr_t bpa, bus_size_t size, int flags,
 bus_space_handle_t *bshp)
@@ -69,7 +68,6 @@ bus_space_map(bus_space_tag_t t, bus_add
 	return 1;
 }
 
-/* ARGSUSED */
 int
 bus_space_alloc(bus_space_tag_t t, bus_addr_t rstart, bus_addr_t rend,
 bus_size_t size, bus_size_t alignment, bus_size_t boundary, int flags,
@@ -82,7 +80,6 @@ bus_space_alloc(bus_space_tag_t t, bus_a
 	return EINVAL;
 }
 
-/* ARGSUSED */
 void
 bus_space_free(bus_space_tag_t t, bus_space_handle_t bsh, bus_size_t size)
 {
@@ -111,7 +108,6 @@ bus_space_unmap(bus_space_tag_t t, bus_s
 	return;
 }
 
-/* ARGSUSED */
 int
 bus_space_subregion(bus_space_tag_t t, bus_space_handle_t bsh,
 bus_size_t offset, bus_size_t size, bus_space_handle_t *nbshp)
@@ -121,7 +117,6 @@ bus_space_subregion(bus_space_tag_t t, b
 	return 0;
 }
 
-/* ARGSUSED */
 int
 news68k_bus_space_probe(bus_space_tag_t t, bus_space_handle_t bsh,
 bus_size_t offset, int sz)

Index: src/sys/arch/news68k/news68k/trap.c
diff -u src/sys/arch/news68k/news68k/trap.c:1.73 src/sys/arch/news68k/news68k/trap.c:1.74
--- src/sys/arch/news68k/news68k/trap.c:1.73	Sat Sep 25 19:16:31 2021
+++ src/sys/arch/news68k/news68k/trap.c	Sat Apr 22 10:09:12 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: trap.c,v 1.73 2021/09/25 19:16:31 tsutsui Exp $	*/
+/*	$NetBSD: trap.c,v 1.74 2023/04/22 10:09:12 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.73 2021/09/25 19:16:31 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.74 2023/04/22 10:09:12 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_execfmt.h"
@@ -240,7 +240,6 @@ machine_userret(struct lwp *l, struct fr
  * including events such as simulated software interrupts/AST's.
  * System calls are broken out for efficiency.
  */
-/*ARGSUSED*/
 void
 trap(struct frame *fp, int type, u_int code, u_int v)
 {



CVS commit: src/sys/arch/news68k/news68k

2023-04-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Apr 22 10:09:12 UTC 2023

Modified Files:
src/sys/arch/news68k/news68k: bus_space.c trap.c

Log Message:
Remove ancient /*ARGSUSED*/ comments.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/news68k/news68k/bus_space.c
cvs rdiff -u -r1.73 -r1.74 src/sys/arch/news68k/news68k/trap.c

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



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

2023-01-27 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jan 27 19:50:02 UTC 2023

Modified Files:
src/sys/arch/news68k/include: bus.h

Log Message:
news68k: Specify proper constraints for bus_space_read region and multi ops.

Synk with next68k.
Also use consistent register name constrains, i.e. no '%' prefix.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/news68k/include/bus.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/news68k/include/bus.h
diff -u src/sys/arch/news68k/include/bus.h:1.12 src/sys/arch/news68k/include/bus.h:1.13
--- src/sys/arch/news68k/include/bus.h:1.12	Sat Jan 23 19:38:08 2021
+++ src/sys/arch/news68k/include/bus.h	Fri Jan 27 19:50:02 2023
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus.h,v 1.12 2021/01/23 19:38:08 christos Exp $	*/
+/*	$NetBSD: bus.h,v 1.13 2023/01/27 19:50:02 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -193,7 +193,7 @@ int	news68k_bus_space_probe(bus_space_ta
 		jne	1b"	:	\
 :	\
 		"r" ((h) + (o)), "g" (a), "g" (c)		:	\
-		"%a0","%a1","%d0");	\
+		"a0","a1","d0","memory");\
 } while (0)
 
 #define	bus_space_read_multi_2(t, h, o, a, c) do {			\
@@ -207,7 +207,7 @@ int	news68k_bus_space_probe(bus_space_ta
 		jne	1b"	:	\
 :	\
 		"r" ((h) + (o)), "g" (a), "g" (c)		:	\
-		"%a0","%a1","%d0");	\
+		"a0","a1","d0","memory");\
 } while (0)
 
 #define	bus_space_read_multi_4(t, h, o, a, c) do {			\
@@ -221,7 +221,7 @@ int	news68k_bus_space_probe(bus_space_ta
 		jne	1b"	:	\
 :	\
 		"r" ((h) + (o)), "g" (a), "g" (c)		:	\
-		"%a0","%a1","%d0");	\
+		"a0","a1","d0","memory");\
 } while (0)
 
 /*
@@ -245,7 +245,7 @@ int	news68k_bus_space_probe(bus_space_ta
 		jne	1b"	:	\
 :	\
 		"r" ((h) + (o)), "g" (a), "g" (c)		:	\
-		"%a0","%a1","%d0");	\
+		"a0","a1","d0","memory");\
 } while (0)
 
 #define	bus_space_read_region_2(t, h, o, a, c) do {			\
@@ -259,7 +259,7 @@ int	news68k_bus_space_probe(bus_space_ta
 		jne	1b"	:	\
 :	\
 		"r" ((h) + (o)), "g" (a), "g" (c)		:	\
-		"%a0","%a1","%d0");	\
+		"a0","a1","d0","memory");\
 } while (0)
 
 #define	bus_space_read_region_4(t, h, o, a, c) do {			\
@@ -273,7 +273,7 @@ int	news68k_bus_space_probe(bus_space_ta
 		jne	1b"	:	\
 :	\
 		"r" ((h) + (o)), "g" (a), "g" (c)		:	\
-		"%a0","%a1","%d0");	\
+		"a0","a1","d0","memory");\
 } while (0)
 
 /*
@@ -314,7 +314,7 @@ int	news68k_bus_space_probe(bus_space_ta
 		jne	1b"	:	\
 :	\
 		"r" ((h) + (o)), "g" (a), "g" (c)		:	\
-		"%a0","%a1","%d0");	\
+		"a0","a1","d0");	\
 } while (0)
 
 #define	bus_space_write_multi_2(t, h, o, a, c) do {			\
@@ -328,7 +328,7 @@ int	news68k_bus_space_probe(bus_space_ta
 		jne	1b"	:	\
 :	\
 		"r" ((h) + (o)), "g" (a), "g" (c)		:	\
-		"%a0","%a1","%d0");	\
+		"a0","a1","d0");	\
 } while (0)
 
 #define	bus_space_write_multi_4(t, h, o, a, c) do {			\
@@ -342,7 +342,7 @@ int	news68k_bus_space_probe(bus_space_ta
 		jne	1b"	:	\
 :	\
 		"r" ((h) + (o)), "g" (a), "g" (c)		:	\
-		"%a0","%a1","%d0");	\
+		"a0","a1","d0");	\
 } while (0)
 
 /*
@@ -365,7 +365,7 @@ int	news68k_bus_space_probe(bus_space_ta
 		jne	1b"	:	\
 :	\
 		"r" ((h) + (o)), "g" (a), "g" (c)		:	\
-		"%a0","%a1","%d0");	\
+		"a0","a1","d0");	\
 } while (0)
 
 #define	bus_space_write_region_2(t, h, o, a, c) do {			\
@@ -379,7 +379,7 @@ int	news68k_bus_space_probe(bus_space_ta
 		jne	1b"	:	\
 :	\
 		"r" ((h) + (o)), "g" (a), "g" (c)		:	\
-		"%a0","%a1","%d0");	\
+		"a0","a1","d0");	\
 } while (0)
 
 #define	bus_space_write_region_4(t, h, o, a, c) do {			\
@@ -393,7 +393,7 @@ int	news68k_bus_space_probe(bus_space_ta
 		jne	1b"	:	\
 :	\
 		"r" ((h) + (o)), "g" (a), "g" (c)		:	\
-		"%a0","%a1","%d0");	\
+		"a0","a1","d0");	\
 } while (0)
 
 /*
@@ -416,7 +416,7 @@ int	news68k_bus_space_probe(bus_space_ta
 		jne	1b"	:	\
 :	\
 		"r" ((h) + (o)), "g" (val), "g" (c)		:	\
-		"%a0","%d0","%d1");	\
+		"a0","d0","d1");	\
 } while (0)
 
 #define	bus_space_set_multi_2(t, h, o, val, c) do {			\
@@ -430,7 +430,7 @@ int	news68k_bus_space_probe(bus_space_ta
 		jne	1b"	:	\
 :	\
 		"r" ((h) + (o)), "g" (val), "g" (c)		:	\
-		"%a0","%d0","%d1");	\
+		"a0","d0","d1");	\
 } while (0)
 
 #define	bus_space_set_multi_4(t, h, o, val, c) do {			\
@@ -444,7 +444,7 @@ int	news68k_bus_space_probe(bus_space_ta
 		jne	1b"	:	\
 :	\
 		"r" ((h) + (o)), "g" (val), "g" (c)		:	\
-		"%a0","%d0","%d1");	\
+		"a0","d0","d1");	\
 } while (0)
 
 /*
@@ -467,7 +467,7 @@ int	news68k_bus_space_probe(bus_space_ta
 		jne	

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

2023-01-27 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jan 27 19:50:02 UTC 2023

Modified Files:
src/sys/arch/news68k/include: bus.h

Log Message:
news68k: Specify proper constraints for bus_space_read region and multi ops.

Synk with next68k.
Also use consistent register name constrains, i.e. no '%' prefix.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/news68k/include/bus.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/news68k/news68k

2021-08-05 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Aug  6 05:53:50 UTC 2021

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

Log Message:
Fix mm_md_physacc() to allow only accesses to a region of RAMs.

Note on NetBSD/news68k RAMs reserved by the PROM (at the end of the RAM)
are not managed.


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

2021-08-05 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Aug  6 05:53:50 UTC 2021

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

Log Message:
Fix mm_md_physacc() to allow only accesses to a region of RAMs.

Note on NetBSD/news68k RAMs reserved by the PROM (at the end of the RAM)
are not managed.


To generate a diff of this commit:
cvs rdiff -u -r1.108 -r1.109 src/sys/arch/news68k/news68k/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/news68k/news68k/machdep.c
diff -u src/sys/arch/news68k/news68k/machdep.c:1.108 src/sys/arch/news68k/news68k/machdep.c:1.109
--- src/sys/arch/news68k/news68k/machdep.c:1.108	Thu Jun 11 19:20:44 2020
+++ src/sys/arch/news68k/news68k/machdep.c	Fri Aug  6 05:53:50 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.108 2020/06/11 19:20:44 ad Exp $	*/
+/*	$NetBSD: machdep.c,v 1.109 2021/08/06 05:53:50 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.108 2020/06/11 19:20:44 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.109 2021/08/06 05:53:50 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -992,8 +992,17 @@ consinit(void)
 int
 mm_md_physacc(paddr_t pa, vm_prot_t prot)
 {
+	paddr_t memend;
 
-	return (pa < lowram || pa >= 0xfffc) ? EFAULT : 0;
+	/*
+	 * news68k has one contiguous memory segment.
+	 */
+	memend = lowram + ctob(physmem);
+
+	if (lowram <= pa && pa < memend) 
+		return 0;
+
+	return EFAULT;
 }
 
 int



CVS commit: src/sys/arch/news68k/news68k

2021-01-23 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jan 23 15:00:33 UTC 2021

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

Log Message:
Remove leftover of #undef statements.

These should have been removed in rev 1.55 back in 2010:
 https://mail-index.netbsd.org/source-changes/2010/12/20/msg016105.html
 
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/news68k/news68k/locore.s.diff?r1=1.54=1.55


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/news68k/news68k/locore.s

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



CVS commit: src/sys/arch/news68k/news68k

2021-01-23 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jan 23 15:00:33 UTC 2021

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

Log Message:
Remove leftover of #undef statements.

These should have been removed in rev 1.55 back in 2010:
 https://mail-index.netbsd.org/source-changes/2010/12/20/msg016105.html
 
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/news68k/news68k/locore.s.diff?r1=1.54=1.55


To generate a diff of this commit:
cvs rdiff -u -r1.66 -r1.67 src/sys/arch/news68k/news68k/locore.s

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

Modified files:

Index: src/sys/arch/news68k/news68k/locore.s
diff -u src/sys/arch/news68k/news68k/locore.s:1.66 src/sys/arch/news68k/news68k/locore.s:1.67
--- src/sys/arch/news68k/news68k/locore.s:1.66	Wed Dec 19 13:57:49 2018
+++ src/sys/arch/news68k/news68k/locore.s	Sat Jan 23 15:00:33 2021
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.66 2018/12/19 13:57:49 maxv Exp $	*/
+/*	$NetBSD: locore.s,v 1.67 2021/01/23 15:00:33 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -808,9 +808,6 @@ ENTRY_NOPROFILE(intrhand_vectored)
 	subql	#1,_C_LABEL(idepth)
 	rte
 
-#undef INTERRUPT_SAVEREG
-#undef INTERRUPT_RESTOREREG
-
 /*
  * Emulation of VAX REI instruction.
  *



CVS commit: src/sys/arch/news68k/news68k

2020-11-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Nov 21 17:55:38 UTC 2020

Modified Files:
src/sys/arch/news68k/news68k: isr.c

Log Message:
malloc(9) -> kmem(9)


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/news68k/news68k/isr.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/news68k/news68k/isr.c
diff -u src/sys/arch/news68k/news68k/isr.c:1.22 src/sys/arch/news68k/news68k/isr.c:1.23
--- src/sys/arch/news68k/news68k/isr.c:1.22	Sun Nov 10 21:16:30 2019
+++ src/sys/arch/news68k/news68k/isr.c	Sat Nov 21 17:55:38 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: isr.c,v 1.22 2019/11/10 21:16:30 chs Exp $	*/
+/*	$NetBSD: isr.c,v 1.23 2020/11/21 17:55:38 thorpej Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -39,11 +39,11 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.22 2019/11/10 21:16:30 chs Exp $");
+__KERNEL_RCSID(0, "$NetBSD: isr.c,v 1.23 2020/11/21 17:55:38 thorpej Exp $");
 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 
@@ -82,7 +82,7 @@ isrlink_autovec(int (*func)(void *), voi
 	if ((ipl < 0) || (ipl >= NISRAUTOVEC))
 		panic("isrlink_autovec: bad ipl %d", ipl);
 
-	newisr = malloc(sizeof(struct isr_autovec), M_DEVBUF, M_WAITOK);
+	newisr = kmem_alloc(sizeof(*newisr), KM_SLEEP);
 	newisr->isr_func = func;
 	newisr->isr_arg = arg;
 	newisr->isr_ipl = ipl;



CVS commit: src/sys/arch/news68k/news68k

2020-11-21 Thread Jason R Thorpe
Module Name:src
Committed By:   thorpej
Date:   Sat Nov 21 17:55:38 UTC 2020

Modified Files:
src/sys/arch/news68k/news68k: isr.c

Log Message:
malloc(9) -> kmem(9)


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

2020-02-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Feb  3 23:09:04 UTC 2020

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

Log Message:
Add a missing semicolon missed in rev 1.27.

Noticed by recent pmap_update() macro change.
I wonder how I've missed this for 18 years..


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/news68k/news68k/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/news68k/news68k/machdep.c
diff -u src/sys/arch/news68k/news68k/machdep.c:1.106 src/sys/arch/news68k/news68k/machdep.c:1.107
--- src/sys/arch/news68k/news68k/machdep.c:1.106	Tue Dec 31 13:07:11 2019
+++ src/sys/arch/news68k/news68k/machdep.c	Mon Feb  3 23:09:03 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.106 2019/12/31 13:07:11 ad Exp $	*/
+/*	$NetBSD: machdep.c,v 1.107 2020/02/03 23:09:03 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.106 2019/12/31 13:07:11 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.107 2020/02/03 23:09:03 tsutsui Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -189,7 +189,7 @@ news68k_init(void)
 	 */
 	for (i = 0; i < btoc(MSGBUFSIZE); i++)
 		pmap_kenter_pa((vaddr_t)msgbufaddr + i * PAGE_SIZE,
-		avail_end + i * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, 0)
+		avail_end + i * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, 0);
 	pmap_update(pmap_kernel());
 	initmsgbuf(msgbufaddr, m68k_round_page(MSGBUFSIZE));
 }



CVS commit: src/sys/arch/news68k/news68k

2020-02-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Mon Feb  3 23:09:04 UTC 2020

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

Log Message:
Add a missing semicolon missed in rev 1.27.

Noticed by recent pmap_update() macro change.
I wonder how I've missed this for 18 years..


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/news68k/news68k/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/news68k/conf

2018-11-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 16 17:07:10 UTC 2018

Modified Files:
src/sys/arch/news68k/conf: INSTALL

Log Message:
Bump space for ramdisk image


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/news68k/conf/INSTALL

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/news68k/conf/INSTALL
diff -u src/sys/arch/news68k/conf/INSTALL:1.64 src/sys/arch/news68k/conf/INSTALL:1.65
--- src/sys/arch/news68k/conf/INSTALL:1.64	Wed Aug  1 20:04:13 2018
+++ src/sys/arch/news68k/conf/INSTALL	Fri Nov 16 17:07:10 2018
@@ -1,4 +1,4 @@
-# 	$NetBSD: INSTALL,v 1.64 2018/08/01 20:04:13 maxv Exp $
+# 	$NetBSD: INSTALL,v 1.65 2018/11/16 17:07:10 martin Exp $
 
 #	config for bootable floppy kernel
 #
@@ -18,7 +18,7 @@ options 	CPU_SINGLE		# Will IOP be suppo
 options 	MEMORY_DISK_HOOKS
 options 	MEMORY_DISK_IS_ROOT	# Force root on ram-disk
 options 	MEMORY_DISK_SERVER=0	# no userspace memory disk support
-options 	MEMORY_DISK_ROOT_SIZE=3200	# 1.60 Megabytes
+options 	MEMORY_DISK_ROOT_SIZE=3600	# 1.80 Megabytes
 options 	MEMORY_DISK_RBFLAGS=RB_SINGLE	# boot in single-user mode
 
 # Standard system options



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

2018-11-16 Thread Martin Husemann
Module Name:src
Committed By:   martin
Date:   Fri Nov 16 17:07:10 UTC 2018

Modified Files:
src/sys/arch/news68k/conf: INSTALL

Log Message:
Bump space for ramdisk image


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/news68k/conf/INSTALL

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



CVS commit: src/sys/arch/news68k/news68k

2017-09-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Sep 15 03:11:15 UTC 2017

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

Log Message:
pass the right argument


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

2017-09-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Sep 15 03:11:15 UTC 2017

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

Log Message:
pass the right argument


To generate a diff of this commit:
cvs rdiff -u -r1.102 -r1.103 src/sys/arch/news68k/news68k/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/news68k/news68k/machdep.c
diff -u src/sys/arch/news68k/news68k/machdep.c:1.102 src/sys/arch/news68k/news68k/machdep.c:1.103
--- src/sys/arch/news68k/news68k/machdep.c:1.102	Thu Sep 14 23:10:07 2017
+++ src/sys/arch/news68k/news68k/machdep.c	Thu Sep 14 23:11:15 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.102 2017/09/15 03:10:07 christos Exp $	*/
+/*	$NetBSD: machdep.c,v 1.103 2017/09/15 03:11:15 christos Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.102 2017/09/15 03:10:07 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.103 2017/09/15 03:11:15 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -693,12 +693,12 @@ cpu_exec_aout_makecmds(struct lwp *l, st
 	switch (midmag) {
 #ifdef COMPAT_NOMID
 	case (MID_ZERO << 16) | ZMAGIC:
-		error = exec_aout_prep_oldzmagic(l->l_proc, epp);
+		error = exec_aout_prep_oldzmagic(l, epp);
 		return(error);
 #endif
 #ifdef COMPAT_44
 	case (MID_HP300 << 16) | ZMAGIC:
-		error = exec_aout_prep_oldzmagic(l->l_proc, epp);
+		error = exec_aout_prep_oldzmagic(l, epp);
 		return error;
 #endif
 	}



CVS commit: src/sys/arch/news68k/news68k

2017-09-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Sep 15 03:10:08 UTC 2017

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

Log Message:
make this compile


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

2017-09-14 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Sep 15 03:10:08 UTC 2017

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

Log Message:
make this compile


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/arch/news68k/news68k/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/news68k/news68k/machdep.c
diff -u src/sys/arch/news68k/news68k/machdep.c:1.101 src/sys/arch/news68k/news68k/machdep.c:1.102
--- src/sys/arch/news68k/news68k/machdep.c:1.101	Mon Mar 24 15:54:28 2014
+++ src/sys/arch/news68k/news68k/machdep.c	Thu Sep 14 23:10:07 2017
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.101 2014/03/24 19:54:28 christos Exp $	*/
+/*	$NetBSD: machdep.c,v 1.102 2017/09/15 03:10:07 christos Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include 
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.101 2014/03/24 19:54:28 christos Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.102 2017/09/15 03:10:07 christos Exp $");
 
 #include "opt_ddb.h"
 #include "opt_compat_netbsd.h"
@@ -698,7 +698,7 @@ cpu_exec_aout_makecmds(struct lwp *l, st
 #endif
 #ifdef COMPAT_44
 	case (MID_HP300 << 16) | ZMAGIC:
-		error = exec_aout_prep_oldzmagic(p, epp);
+		error = exec_aout_prep_oldzmagic(l->l_proc, epp);
 		return error;
 #endif
 	}



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

2016-01-16 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jan 17 04:50:37 UTC 2016

Modified Files:
src/sys/arch/news68k/stand/boot: version
src/sys/arch/news68k/stand/common: Makefile

Log Message:
Enable LIBSA_CREAD_NOCRC.  PR/50638

Bump version to denote user visible change.
Tested on NWS-1750.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/news68k/stand/boot/version
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/news68k/stand/common/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/news68k/stand/boot/version
diff -u src/sys/arch/news68k/stand/boot/version:1.4 src/sys/arch/news68k/stand/boot/version:1.5
--- src/sys/arch/news68k/stand/boot/version:1.4	Wed Jul 16 13:19:20 2008
+++ src/sys/arch/news68k/stand/boot/version	Sun Jan 17 04:50:36 2016
@@ -1,4 +1,4 @@
-$NetBSD: version,v 1.4 2008/07/16 13:19:20 tsutsui Exp $
+$NetBSD: version,v 1.5 2016/01/17 04:50:36 tsutsui Exp $
 
 NOTE ANY CHANGES YOU MAKE TO THE BOOTBLOCKS HERE.  The format of this
 file is important - make sure the entries are appended on end, last item
@@ -11,3 +11,4 @@ is taken as the current.
 1.5:	loadfile() update:  ELF symbols no longer need backward seeks.
 1.6:	loadfile() update to avoid backwards seeks for ELF Program Headers.
 1.7:	Change boot messages to replace build date and maker with kernrev.
+1.8:	Disable slow gunzip CRC32 calculation.

Index: src/sys/arch/news68k/stand/common/Makefile
diff -u src/sys/arch/news68k/stand/common/Makefile:1.14 src/sys/arch/news68k/stand/common/Makefile:1.15
--- src/sys/arch/news68k/stand/common/Makefile:1.14	Thu May 27 06:58:14 2010
+++ src/sys/arch/news68k/stand/common/Makefile	Sun Jan 17 04:50:36 2016
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.14 2010/05/27 06:58:14 dholland Exp $
+#	$NetBSD: Makefile,v 1.15 2016/01/17 04:50:36 tsutsui Exp $
 
 S= ${.CURDIR}/../../../..
 
@@ -10,6 +10,7 @@ CFLAGS+= -Wmissing-prototypes -Wstrict-p
 CPPFLAGS+= -D_STANDALONE
 CPPFLAGS+= -nostdinc -I${.OBJDIR} -I${S} -I.
 CPPFLAGS+= -D__daddr_t=int32_t
+CPPFLAGS+= -DLIBSA_CREAD_NOCRC
 AFLAGS= -D_LOCORE
 
 .include 



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

2016-01-16 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jan 17 04:50:37 UTC 2016

Modified Files:
src/sys/arch/news68k/stand/boot: version
src/sys/arch/news68k/stand/common: Makefile

Log Message:
Enable LIBSA_CREAD_NOCRC.  PR/50638

Bump version to denote user visible change.
Tested on NWS-1750.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 src/sys/arch/news68k/stand/boot/version
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/news68k/stand/common/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/news68k/news68k

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 16:34:53 UTC 2014

Modified Files:
src/sys/arch/news68k/news68k: bus_space.c

Log Message:
this is not python (add missing braces)


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/news68k/news68k/bus_space.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/news68k/news68k/bus_space.c
diff -u src/sys/arch/news68k/news68k/bus_space.c:1.12 src/sys/arch/news68k/news68k/bus_space.c:1.13
--- src/sys/arch/news68k/news68k/bus_space.c:1.12	Mon Mar 24 15:54:28 2014
+++ src/sys/arch/news68k/news68k/bus_space.c	Sun Sep 21 12:34:53 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_space.c,v 1.12 2014/03/24 19:54:28 christos Exp $	*/
+/*	$NetBSD: bus_space.c,v 1.13 2014/09/21 16:34:53 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus_space.c,v 1.12 2014/03/24 19:54:28 christos Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus_space.c,v 1.13 2014/09/21 16:34:53 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -61,9 +61,10 @@ bus_space_map(bus_space_tag_t t, bus_add
 		return 0;
 	}
 
-	if (t == NEWS68K_BUS_SPACE_EIO)
+	if (t == NEWS68K_BUS_SPACE_EIO) {
 		*bshp = (bus_space_handle_t)bpa; /* XXX use tt0 mapping */
 		return 0;
+	}
 
 	return 1;
 }



CVS commit: src/sys/arch/news68k/news68k

2014-09-21 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sun Sep 21 16:34:53 UTC 2014

Modified Files:
src/sys/arch/news68k/news68k: bus_space.c

Log Message:
this is not python (add missing braces)


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/news68k/news68k/bus_space.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/news68k/conf

2014-07-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jul 18 17:19:36 UTC 2014

Modified Files:
src/sys/arch/news68k/conf: GENERIC

Log Message:
Shrink GENERIC and enable MODULAR instead.


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/sys/arch/news68k/conf/GENERIC

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/news68k/conf/GENERIC
diff -u src/sys/arch/news68k/conf/GENERIC:1.119 src/sys/arch/news68k/conf/GENERIC:1.120
--- src/sys/arch/news68k/conf/GENERIC:1.119	Sat Jul  5 09:14:02 2014
+++ src/sys/arch/news68k/conf/GENERIC	Fri Jul 18 17:19:35 2014
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.119 2014/07/05 09:14:02 tsutsui Exp $
+# $NetBSD: GENERIC,v 1.120 2014/07/18 17:19:35 tsutsui Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include		arch/news68k/conf/std.news68k
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.119 $
+#ident 		GENERIC-$Revision: 1.120 $
 
 makeoptions	COPTS=-O2 -fno-reorder-blocks	# see share/mk/sys.mk
 
@@ -40,7 +40,7 @@ options 	SYSVMSG			# System V message qu
 options 	SYSVSEM			# System V semaphores
 options 	SYSVSHM			# System V shared memory
 
-#options 	MODULAR			# new style module(7) framework
+options 	MODULAR			# new style module(7) framework
 
 options 	USERCONF		# userconf(4) support
 #options 	PIPE_SOCKETPAIR		# smaller, but slower pipe(2)
@@ -85,7 +85,7 @@ options 	COMPAT_BSDPTY		# /dev/[pt]ty?? 
 
 # Filesystem options
 file-system	FFS		# Berkeley Fast Filesystem
-file-system	LFS		# log-structured file system
+#file-system	LFS		# log-structured file system
 file-system	NFS		# Sun NFS-compatible filesystem client
 file-system	MFS		# memory-based filesystem
 file-system	CD9660		# ISO 9660 + Rock Ridge file system
@@ -94,10 +94,10 @@ file-system	KERNFS		# /kern
 file-system	PROCFS		# /proc
 file-system	FDESC		# /dev/fd/*
 file-system	NULLFS		# loopback file system
-file-system 	OVERLAY		# overlay file system
-file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g  sshfs)
-file-system	UMAPFS		# NULLFS + uid and gid remapping
-file-system	UNION		# union file system
+#file-system 	OVERLAY		# overlay file system
+#file-system	PUFFS		# Userspace file systems (e.g. ntfs-3g  sshfs)
+#file-system	UMAPFS		# NULLFS + uid and gid remapping
+#file-system	UNION		# union file system
 #file-system	CODA		# Coda File System; also needs vcode (below)
 file-system	PTYFS		# /dev/pts/N support
 file-system	TMPFS		# Efficient memory file-system
@@ -108,7 +108,7 @@ options 	QUOTA		# legacy UFS quotas
 options 	QUOTA2		# new, in-filesystem UFS quotas
 #options 	FFS_EI		# ffs endian independent support
 options 	WAPBL		# File system journaling support
-#options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
+options 	FFS_NO_SNAPSHOT	# No FFS snapshot support
 #options 	UFS_DIRHASH	# UFS Large Directory Hashing - Experimental
 
 # Networking options
@@ -120,8 +120,8 @@ options 	INET6		# IPV6
 #options 	MROUTING	# IP multicast routing
 #options 	PIM		# Protocol Independent Multicast
 #options 	NETATALK	# AppleTalk networking protocols
-options 	PPP_BSDCOMP	# BSD-Compress compression support for PPP
-options 	PPP_DEFLATE	# Deflate compression support for PPP
+#options 	PPP_BSDCOMP	# BSD-Compress compression support for PPP
+#options 	PPP_DEFLATE	# Deflate compression support for PPP
 options 	PPP_FILTER	# Active filter support for PPP (requires bpf)
 options 	IPFILTER_LOG	# ipmon(8) log support
 options 	IPFILTER_LOOKUP	# ippool(8) support
@@ -223,8 +223,8 @@ uk*	at scsibus? target ? lun ?		# unknow
 
 #
 # accept filters
-pseudo-device   accf_data		# dataready accept filter
-pseudo-device   accf_http		# httpready accept filter
+#pseudo-device   accf_data		# dataready accept filter
+#pseudo-device   accf_http		# httpready accept filter
 
 # Misc.
 pseudo-device	loop			# loopback interface; required
@@ -244,7 +244,7 @@ pseudo-device	raid			# RAIDframe disk dr
 #options 	RF_INCLUDE_INTERDECLUSTER=1
 #options 	RF_INCLUDE_PARITY_DECLUSTERING=1
 #options 	RF_INCLUDE_PARITY_DECLUSTERING_DS=1
-pseudo-device	fss			# file system snapshot device
+#pseudo-device	fss			# file system snapshot device
 pseudo-device	sl			# SLIP interfaces
 pseudo-device	ppp			# PPP interfaces
 pseudo-device	pppoe			# PPP over Ethernet (RFC 2516)



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

2014-07-18 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Jul 18 17:19:36 UTC 2014

Modified Files:
src/sys/arch/news68k/conf: GENERIC

Log Message:
Shrink GENERIC and enable MODULAR instead.


To generate a diff of this commit:
cvs rdiff -u -r1.119 -r1.120 src/sys/arch/news68k/conf/GENERIC

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



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

2014-07-05 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Jul  5 09:14:02 UTC 2014

Modified Files:
src/sys/arch/news68k/conf: GENERIC GENERIC_TINY

Log Message:
Use COPTS=-O2 -fno-reorder-blocks as defined in sys.mk for userland.

with -O2:
   textdata bss dec hex filename
3297898   65044  122584 3485526  352f56 netbsd

with -O2 -fno-reorder-blocks:
   textdata bss dec hex filename
2930782   65044  122584 3118410  2f954a netbsd


To generate a diff of this commit:
cvs rdiff -u -r1.118 -r1.119 src/sys/arch/news68k/conf/GENERIC
cvs rdiff -u -r1.79 -r1.80 src/sys/arch/news68k/conf/GENERIC_TINY

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



CVS commit: src/sys/arch/news68k/stand/boot

2014-03-28 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Fri Mar 28 11:49:40 UTC 2014

Modified Files:
src/sys/arch/news68k/stand/boot: boot.c

Log Message:
Use snprintf instead of sprintf


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/news68k/stand/boot/boot.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/news68k/stand/boot/boot.c
diff -u src/sys/arch/news68k/stand/boot/boot.c:1.18 src/sys/arch/news68k/stand/boot/boot.c:1.19
--- src/sys/arch/news68k/stand/boot/boot.c:1.18	Wed Aug 25 16:35:02 2010
+++ src/sys/arch/news68k/stand/boot/boot.c	Fri Mar 28 11:49:40 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.18 2010/08/25 16:35:02 christos Exp $	*/
+/*	$NetBSD: boot.c,v 1.19 2014/03/28 11:49:40 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1999 Izumi Tsutsui.  All rights reserved.
@@ -114,7 +114,7 @@ boot(uint32_t d4, uint32_t d5, uint32_t 
 		return;
 	}
 
-	sprintf(devname, %s(%d,%d,%d), devs[type], ctlr, unit, part);
+	snprintf(devname, sizeof(devname), %s(%d,%d,%d), devs[type], ctlr, unit, part);
 	printf(Booting %s%s\n, devname, netbsd);
 
 	/* use user specified kernel name if exists */
@@ -128,7 +128,7 @@ boot(uint32_t d4, uint32_t d5, uint32_t 
 		loadflag = ~LOAD_BACKWARDS;
 
 	for (i = 0; kernels[i]; i++) {
-		sprintf(file, %s%s, devname, kernels[i]);
+		snprintf(file, sizeof(file), %s%s, devname, kernels[i]);
 		DPRINTF(trying %s...\n, file);
 		fd = loadfile(file, marks, loadflag);
 		if (fd != -1)



CVS commit: src/sys/arch/news68k/stand/boot

2014-03-28 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Fri Mar 28 15:02:34 UTC 2014

Modified Files:
src/sys/arch/news68k/stand/boot: boot.c

Log Message:
fold line


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/news68k/stand/boot/boot.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/news68k/stand/boot/boot.c
diff -u src/sys/arch/news68k/stand/boot/boot.c:1.19 src/sys/arch/news68k/stand/boot/boot.c:1.20
--- src/sys/arch/news68k/stand/boot/boot.c:1.19	Fri Mar 28 07:49:40 2014
+++ src/sys/arch/news68k/stand/boot/boot.c	Fri Mar 28 11:02:34 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.19 2014/03/28 11:49:40 ozaki-r Exp $	*/
+/*	$NetBSD: boot.c,v 1.20 2014/03/28 15:02:34 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999 Izumi Tsutsui.  All rights reserved.
@@ -114,7 +114,8 @@ boot(uint32_t d4, uint32_t d5, uint32_t 
 		return;
 	}
 
-	snprintf(devname, sizeof(devname), %s(%d,%d,%d), devs[type], ctlr, unit, part);
+	snprintf(devname, sizeof(devname),
+	%s(%d,%d,%d), devs[type], ctlr, unit, part);
 	printf(Booting %s%s\n, devname, netbsd);
 
 	/* use user specified kernel name if exists */



CVS commit: src/sys/arch/news68k/stand/bootxx

2014-03-28 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Sat Mar 29 05:07:25 UTC 2014

Modified Files:
src/sys/arch/news68k/stand/bootxx: bootxx.c

Log Message:
Replace sprintf with snprintf


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/news68k/stand/bootxx/bootxx.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/news68k/stand/bootxx/bootxx.c
diff -u src/sys/arch/news68k/stand/bootxx/bootxx.c:1.10 src/sys/arch/news68k/stand/bootxx/bootxx.c:1.11
--- src/sys/arch/news68k/stand/bootxx/bootxx.c:1.10	Wed May 14 13:29:28 2008
+++ src/sys/arch/news68k/stand/bootxx/bootxx.c	Sat Mar 29 05:07:25 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bootxx.c,v 1.10 2008/05/14 13:29:28 tsutsui Exp $	*/
+/*	$NetBSD: bootxx.c,v 1.11 2014/03/29 05:07:25 ozaki-r Exp $	*/
 
 /*-
  * Copyright (c) 1999 Izumi Tsutsui.  All rights reserved.
@@ -113,7 +113,8 @@ bootxx(uint32_t d4, uint32_t d5, uint32_
 		return;
 	}
 
-	sprintf(devname, %s(%d,%d,%d), devs[type], ctlr, unit, part);
+	snprintf(devname, sizeof(devname), %s(%d,%d,%d),
+	devs[type], ctlr, unit, part);
 
 	fd = rom_open(devname, 0);
 	if (fd == -1) {



CVS commit: src/sys/arch/news68k/stand/boot

2014-03-28 Thread Ryota Ozaki
Module Name:src
Committed By:   ozaki-r
Date:   Fri Mar 28 11:49:40 UTC 2014

Modified Files:
src/sys/arch/news68k/stand/boot: boot.c

Log Message:
Use snprintf instead of sprintf


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/news68k/stand/boot/boot.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/news68k/news68k

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 19:54:28 UTC 2014

Modified Files:
src/sys/arch/news68k/news68k: autoconf.c bus_space.c machdep.c

Log Message:
- use cpu_{g,s}etmodel
- fix unused


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/news68k/news68k/autoconf.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/news68k/news68k/bus_space.c
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/news68k/news68k/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/news68k/news68k/autoconf.c
diff -u src/sys/arch/news68k/news68k/autoconf.c:1.22 src/sys/arch/news68k/news68k/autoconf.c:1.23
--- src/sys/arch/news68k/news68k/autoconf.c:1.22	Sat Oct 13 02:18:44 2012
+++ src/sys/arch/news68k/news68k/autoconf.c	Mon Mar 24 15:54:28 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.22 2012/10/13 06:18:44 tsutsui Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.23 2014/03/24 19:54:28 christos Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -51,7 +51,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.22 2012/10/13 06:18:44 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.23 2014/03/24 19:54:28 christos Exp $);
 
 #include scsibus.h
 
@@ -124,14 +124,13 @@ void
 findroot(void)
 {
 #if NSCSIBUS  0
-	int ctlr, unit, part, type;
+	int ctlr, part, type;
 	device_t dv;
 
 	if (BOOTDEV_MAG(bootdev) != 5)	/* NEWS-OS's B_DEVMAGIC */
 		return;
 
 	ctlr = BOOTDEV_CTLR(bootdev);	/* SCSI ID */
-	unit = BOOTDEV_UNIT(bootdev);
 	part = BOOTDEV_PART(bootdev);	/* LUN */
 	type = BOOTDEV_TYPE(bootdev);
 

Index: src/sys/arch/news68k/news68k/bus_space.c
diff -u src/sys/arch/news68k/news68k/bus_space.c:1.11 src/sys/arch/news68k/news68k/bus_space.c:1.12
--- src/sys/arch/news68k/news68k/bus_space.c:1.11	Tue Nov 22 09:31:02 2011
+++ src/sys/arch/news68k/news68k/bus_space.c	Mon Mar 24 15:54:28 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_space.c,v 1.11 2011/11/22 14:31:02 tsutsui Exp $	*/
+/*	$NetBSD: bus_space.c,v 1.12 2014/03/24 19:54:28 christos Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus_space.c,v 1.11 2011/11/22 14:31:02 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus_space.c,v 1.12 2014/03/24 19:54:28 christos Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -151,7 +151,7 @@ news68k_bus_space_probe(bus_space_tag_t 
 		panic(bus_space_probe: unupported data size %d, sz);
 		/* NOTREACHED */
 	}
-
+	__USE(i);
 	nofault = NULL;
 	return 1;
 }

Index: src/sys/arch/news68k/news68k/machdep.c
diff -u src/sys/arch/news68k/news68k/machdep.c:1.100 src/sys/arch/news68k/news68k/machdep.c:1.101
--- src/sys/arch/news68k/news68k/machdep.c:1.100	Fri Aug 10 08:17:51 2012
+++ src/sys/arch/news68k/news68k/machdep.c	Mon Mar 24 15:54:28 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.100 2012/08/10 12:17:51 tsutsui Exp $	*/
+/*	$NetBSD: machdep.c,v 1.101 2014/03/24 19:54:28 christos Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.100 2012/08/10 12:17:51 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.101 2014/03/24 19:54:28 christos Exp $);
 
 #include opt_ddb.h
 #include opt_compat_netbsd.h
@@ -64,6 +64,7 @@ __KERNEL_RCSID(0, $NetBSD: machdep.c,v 
 #include sys/kcore.h
 #include sys/ksyms.h
 #include sys/module.h
+#include sys/cpu.h
 
 #ifdef DDB
 #include machine/db_machdep.h
@@ -245,18 +246,13 @@ cpu_startup(void)
 	initcpu();
 }
 
-/*
- * Info for CTL_HW
- */
-char cpu_model[124];
-
 int news_machine_id;
 
 static void
 identifycpu(void)
 {
 
-	printf(SONY NET WORK STATION, Model %s, , cpu_model);
+	printf(SONY NET WORK STATION, Model %s, , cpu_getmodel());
 	printf(Machine ID #%d\n, news_machine_id);
 
 	delay_divisor = (20480 / cpuspeed + 5) / 10; /* XXX */
@@ -645,6 +641,7 @@ badaddr(void *addr, int nbytes)
 	default:
 		panic(badaddr: bad request);
 	}
+	__USE(i);
 	nofault = (int *) 0;
 	return 0;
 }
@@ -661,6 +658,7 @@ badbaddr(void *addr)
 		return 1;
 	}
 	i = *(volatile char *)addr;
+	__USE(i);
 	nofault = (int *) 0;
 	return 0;
 }
@@ -808,7 +806,7 @@ news1700_init(void)
 	if (t == NULL)
 		panic(unexpected system model.);
 
-	strcat(cpu_model, t);
+	cpu_setmodel(%s, t);
 	news_machine_id = (idrom.id_serial[0]  8) + idrom.id_serial[1];
 
 	ctrl_parity	= (uint8_t *)(0xe108);
@@ -890,7 +888,7 @@ news1200_init(void)
 	for (i = 0; i  sizeof(idrom); i++, p += 2)
 		*q++ = ((*p  0x0f)  4) | (*(p + 1)  0x0f);
 
-	strcat(cpu_model, idrom.id_model);
+	cpu_setmodel(%s, idrom.id_model);
 	news_machine_id = idrom.id_serial;
 
 	cpuspeed = 25;



CVS commit: src/sys/arch/news68k/news68k

2014-03-24 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Mar 24 19:54:28 UTC 2014

Modified Files:
src/sys/arch/news68k/news68k: autoconf.c bus_space.c machdep.c

Log Message:
- use cpu_{g,s}etmodel
- fix unused


To generate a diff of this commit:
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/news68k/news68k/autoconf.c
cvs rdiff -u -r1.11 -r1.12 src/sys/arch/news68k/news68k/bus_space.c
cvs rdiff -u -r1.100 -r1.101 src/sys/arch/news68k/news68k/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/news68k/news68k

2014-03-15 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Mar 15 09:24:56 UTC 2014

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

Log Message:
Use common m68k/busaddrerr.s for bus error and address error handlers.

No binary changes on GENERIC, and also tested on NWS-1750.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/news68k/news68k/locore.s

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

Modified files:

Index: src/sys/arch/news68k/news68k/locore.s
diff -u src/sys/arch/news68k/news68k/locore.s:1.64 src/sys/arch/news68k/news68k/locore.s:1.65
--- src/sys/arch/news68k/news68k/locore.s:1.64	Sun Mar  9 16:18:00 2014
+++ src/sys/arch/news68k/news68k/locore.s	Sat Mar 15 09:24:56 2014
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.64 2014/03/09 16:18:00 tsutsui Exp $	*/
+/*	$NetBSD: locore.s,v 1.65 2014/03/15 09:24:56 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -479,100 +479,10 @@ Lenab3:
  */
 #include m68k/m68k/trap_subr.s
 
-#if defined(M68020) || defined(M68030)
-ENTRY_NOPROFILE(busaddrerr2030)
-	clrl	%sp@-			| stack adjust count
-	moveml	#0x,%sp@-		| save user registers
-	movl	%usp,%a0		| save the user SP
-	movl	%a0,%sp@(FR_SP)		|   in the savearea
-	moveq	#0,%d0
-	movw	%sp@(FR_HW+10),%d0	| grab SSW for fault processing
-	btst	#12,%d0			| RB set?
-	jeq	LbeX0			| no, test RC
-	bset	#14,%d0			| yes, must set FB
-	movw	%d0,%sp@(FR_HW+10)	| for hardware too
-LbeX0:
-	btst	#13,%d0			| RC set?
-	jeq	LbeX1			| no, skip
-	bset	#15,%d0			| yes, must set FC
-	movw	%d0,%sp@(FR_HW+10)	| for hardware too
-LbeX1:
-	btst	#8,%d0			| data fault?
-	jeq	Lbe0			| no, check for hard cases
-	movl	%sp@(FR_HW+16),%d1	| fault address is as given in frame
-	jra	Lbe10			| thats it
-Lbe0:
-	btst	#4,%sp@(FR_HW+6)	| long (type B) stack frame?
-	jne	Lbe4			| yes, go handle
-	movl	%sp@(FR_HW+2),%d1	| no, can use save PC
-	btst	#14,%d0			| FB set?
-	jeq	Lbe3			| no, try FC
-	addql	#4,%d1			| yes, adjust address
-	jra	Lbe10			| done
-Lbe3:
-	btst	#15,%d0			| FC set?
-	jeq	Lbe10			| no, done
-	addql	#2,%d1			| yes, adjust address
-	jra	Lbe10			| done
-Lbe4:
-	movl	%sp@(FR_HW+36),%d1	| long format, use stage B address
-	btst	#15,%d0			| FC set?
-	jeq	Lbe10			| no, all done
-	subql	#2,%d1			| yes, adjust address
-Lbe10:
-	movl	%d1,%sp@-		| push fault VA
-	movl	%d0,%sp@-		| and padded SSW
-	movw	%sp@(FR_HW+8+6),%d0	| get frame format/vector offset
-	andw	#0x0FFF,%d0		| clear out frame format
-	cmpw	#12,%d0			| address error vector?
-	jeq	Lisaerr			| yes, go to it
-	movl	%d1,%a0			| fault address
-	movl	%sp@,%d0		| function code from ssw
-	btst	#8,%d0			| data fault?
-	jne	Lbe10a
-#if 0
-	movql	#1,%d0			| user program access FC
-#else
-	moveq	#1,%d0			| user program access FC
-#endif
-	| (we dont separate data/program)
-	btst	#5,%sp@(FR_HW+8)	| supervisor mode?
-	jeq	Lbe10a			| if no, done
-	movql	#5,%d0			| else supervisor program access
-Lbe10a:
-	ptestr	%d0,%a0@,#7		| do a table search
-	pmove	%psr,%sp@		| save result
-	movb	%sp@,%d1
-	btst	#2,%d1			| invalid (incl. limit viol. and berr)?
-	jeq	Lmightnotbemerr		| no - wp check
-	btst	#7,%d1			| is it MMU table berr?
-	jne	Lisberr1		| yes, needs not be fast.
-Lismerr:
-	movl	#T_MMUFLT,%sp@-		| show that we are an MMU fault
-	jra	_ASM_LABEL(faultstkadj)	| and deal with it
-Lmightnotbemerr:
-	btst	#3,%d1			| write protect bit set?
-	jeq	Lisberr1		| no: must be bus error
-	movl	%sp@,%d0		| ssw into low word of %d0
-	andw	#0xc0,%d0		| Write protect is set on page:
-	cmpw	#0x40,%d0		| was it read cycle?
-	jne	Lismerr			| no, was not WPE, must be MMU fault
-	jra	Lisberr1		| real bus err needs not be fast.
-Lisaerr:
-	movl	#T_ADDRERR,%sp@-	| mark address error
-	jra	_ASM_LABEL(faultstkadj)	| and deal with it
-Lisberr1:
-	clrw	%sp@			| re-clear pad word
-	tstl	_C_LABEL(nofault)	| catch bus error?
-	jeq	Lisberr			| no, handle as usual
-	movl	_C_LABEL(nofault),%sp@-	| yes,
-	jbsr	_C_LABEL(longjmp)	|  longjmp(nofault)
-	/* NOTREACHED */
-#endif /* M68020 || M68030 */
-
-Lisberr:| also used by M68040/60
-	movl	#T_BUSERR,%sp@-		| mark bus error
-	jra	_ASM_LABEL(faultstkadj)	| and deal with it
+/*
+ * Use common m68k bus error and address error handlers.
+ */
+#include m68k/m68k/busaddrerr.s
 
 /*
  * FP exceptions.



CVS commit: src/sys/arch/news68k/news68k

2014-03-15 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Mar 15 09:24:56 UTC 2014

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

Log Message:
Use common m68k/busaddrerr.s for bus error and address error handlers.

No binary changes on GENERIC, and also tested on NWS-1750.


To generate a diff of this commit:
cvs rdiff -u -r1.64 -r1.65 src/sys/arch/news68k/news68k/locore.s

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



CVS commit: src/sys/arch/news68k/news68k

2012-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 13 06:18:44 UTC 2012

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

Log Message:
use device_xname()  (from chs@)


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/arch/news68k/news68k/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/news68k/news68k/autoconf.c
diff -u src/sys/arch/news68k/news68k/autoconf.c:1.21 src/sys/arch/news68k/news68k/autoconf.c:1.22
--- src/sys/arch/news68k/news68k/autoconf.c:1.21	Sun Jul 29 18:05:45 2012
+++ src/sys/arch/news68k/news68k/autoconf.c	Sat Oct 13 06:18:44 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.21 2012/07/29 18:05:45 mlelstv Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.22 2012/10/13 06:18:44 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -51,7 +51,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.21 2012/07/29 18:05:45 mlelstv Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.22 2012/10/13 06:18:44 tsutsui Exp $);
 
 #include scsibus.h
 
@@ -110,7 +110,7 @@ cpu_rootconf(void)
 	findroot();
 
 	printf(boot device: %s\n,
-	   booted_device ? booted_device-dv_xname : unknown);
+	   booted_device ? device_xname(booted_device) : unknown);
 
 	rootconf();
 }



CVS commit: src/sys/arch/news68k/news68k

2012-10-13 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 13 06:18:44 UTC 2012

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

Log Message:
use device_xname()  (from chs@)


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

2012-08-10 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Aug 10 12:17:51 UTC 2012

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

Log Message:
Appease gcc -fno-common:
 - remove initialzation of physmem since it's properly initialized
   before pmap_bootstrap() using a value passed from bootloader and
   sanity possible maximum value is not necessary
 - remove cn_tab = NULL initialization because no worth to patch it
Tested on NWS-1750.


To generate a diff of this commit:
cvs rdiff -u -r1.99 -r1.100 src/sys/arch/news68k/news68k/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/news68k/news68k/machdep.c
diff -u src/sys/arch/news68k/news68k/machdep.c:1.99 src/sys/arch/news68k/news68k/machdep.c:1.100
--- src/sys/arch/news68k/news68k/machdep.c:1.99	Fri Jul 27 05:36:11 2012
+++ src/sys/arch/news68k/news68k/machdep.c	Fri Aug 10 12:17:51 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.99 2012/07/27 05:36:11 matt Exp $	*/
+/*	$NetBSD: machdep.c,v 1.100 2012/08/10 12:17:51 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.99 2012/07/27 05:36:11 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.100 2012/08/10 12:17:51 tsutsui Exp $);
 
 #include opt_ddb.h
 #include opt_compat_netbsd.h
@@ -111,7 +111,6 @@ struct cpu_info cpu_info_store;
 struct vm_map *phys_map = NULL;
 
 int	maxmem;			/* max memory per process */
-int	physmem = MAXMEM;	/* max supported memory, changes to actual */
 
 extern paddr_t avail_start, avail_end;
 extern int end, *esym;
@@ -968,7 +967,6 @@ intrhand_lev4(void)
 #define SW_FBPOP2	0x03
 #define SW_AUTOSEL	0x07
 
-struct consdev *cn_tab = NULL;
 extern struct consdev consdev_rom, consdev_zs;
 
 int tty00_is_console = 0;



CVS commit: src/sys/arch/news68k/news68k

2012-08-10 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Fri Aug 10 12:17:51 UTC 2012

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

Log Message:
Appease gcc -fno-common:
 - remove initialzation of physmem since it's properly initialized
   before pmap_bootstrap() using a value passed from bootloader and
   sanity possible maximum value is not necessary
 - remove cn_tab = NULL initialization because no worth to patch it
Tested on NWS-1750.


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

2011-11-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Nov 22 14:31:02 UTC 2011

Modified Files:
src/sys/arch/news68k/dev: kbc.c ms_hb.c timer_hb.c
src/sys/arch/news68k/news68k: bus_space.c machdep.c

Log Message:
Remove more now unnecessary IIOV() conversion.
XXX: we should have proper PA to VA macro for TT mappings for readability


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/news68k/dev/kbc.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/news68k/dev/ms_hb.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/news68k/dev/timer_hb.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/news68k/news68k/bus_space.c
cvs rdiff -u -r1.96 -r1.97 src/sys/arch/news68k/news68k/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/news68k/dev/kbc.c
diff -u src/sys/arch/news68k/dev/kbc.c:1.12 src/sys/arch/news68k/dev/kbc.c:1.13
--- src/sys/arch/news68k/dev/kbc.c:1.12	Wed May 14 13:29:28 2008
+++ src/sys/arch/news68k/dev/kbc.c	Tue Nov 22 14:31:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: kbc.c,v 1.12 2008/05/14 13:29:28 tsutsui Exp $	*/
+/*	$NetBSD: kbc.c,v 1.13 2011/11/22 14:31:02 tsutsui Exp $	*/
 
 /*-
  * Copyright (C) 2001 Izumi Tsutsui.  All rights reserved.
@@ -25,7 +25,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: kbc.c,v 1.12 2008/05/14 13:29:28 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: kbc.c,v 1.13 2011/11/22 14:31:02 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -65,7 +65,7 @@ static int kbc_match(device_t parent, cf
 	if (ha-ha_address == (u_int)-1)
 		return 0;
 
-	addr = IIOV(ha-ha_address); /* XXX */
+	addr = ha-ha_address; /* XXX */
 
 	if (badaddr((void *)addr, 1))
 		return 0;

Index: src/sys/arch/news68k/dev/ms_hb.c
diff -u src/sys/arch/news68k/dev/ms_hb.c:1.13 src/sys/arch/news68k/dev/ms_hb.c:1.14
--- src/sys/arch/news68k/dev/ms_hb.c:1.13	Wed May 14 13:29:28 2008
+++ src/sys/arch/news68k/dev/ms_hb.c	Tue Nov 22 14:31:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: ms_hb.c,v 1.13 2008/05/14 13:29:28 tsutsui Exp $	*/
+/*	$NetBSD: ms_hb.c,v 1.14 2011/11/22 14:31:02 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2001 Izumi Tsutsui.  All rights reserved.
@@ -51,7 +51,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: ms_hb.c,v 1.13 2008/05/14 13:29:28 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: ms_hb.c,v 1.14 2011/11/22 14:31:02 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/device.h
@@ -103,7 +103,7 @@ ms_hb_match(device_t parent, cfdata_t cf
 	if (ha-ha_address == (u_int)-1)
 		return 0;
 
-	addr = IIOV(ha-ha_address); /* XXX */
+	addr = ha-ha_address; /* XXX */
 
 	if (badaddr((void *)addr, 1))
 		return 0;

Index: src/sys/arch/news68k/dev/timer_hb.c
diff -u src/sys/arch/news68k/dev/timer_hb.c:1.18 src/sys/arch/news68k/dev/timer_hb.c:1.19
--- src/sys/arch/news68k/dev/timer_hb.c:1.18	Mon Dec 20 00:25:40 2010
+++ src/sys/arch/news68k/dev/timer_hb.c	Tue Nov 22 14:31:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: timer_hb.c,v 1.18 2010/12/20 00:25:40 matt Exp $	*/
+/*	$NetBSD: timer_hb.c,v 1.19 2011/11/22 14:31:02 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: timer_hb.c,v 1.18 2010/12/20 00:25:40 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: timer_hb.c,v 1.19 2011/11/22 14:31:02 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/kernel.h
@@ -106,7 +106,7 @@ timer_hb_attach(device_t parent, device_
 	if (ha-ha_ipl != TIMER_LEVEL)
 		panic(clock_hb_attach: wrong interrupt level);
 
-	ctrl_timer = (uint8_t *)IIOV(ha-ha_address); /* XXX needs bus_space */
+	ctrl_timer = (uint8_t *)(ha-ha_address); /* XXX needs bus_space */
 
 	printf(\n);
 

Index: src/sys/arch/news68k/news68k/bus_space.c
diff -u src/sys/arch/news68k/news68k/bus_space.c:1.10 src/sys/arch/news68k/news68k/bus_space.c:1.11
--- src/sys/arch/news68k/news68k/bus_space.c:1.10	Mon Apr 28 20:23:30 2008
+++ src/sys/arch/news68k/news68k/bus_space.c	Tue Nov 22 14:31:02 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: bus_space.c,v 1.10 2008/04/28 20:23:30 martin Exp $	*/
+/*	$NetBSD: bus_space.c,v 1.11 2011/11/22 14:31:02 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: bus_space.c,v 1.10 2008/04/28 20:23:30 martin Exp $);
+__KERNEL_RCSID(0, $NetBSD: bus_space.c,v 1.11 2011/11/22 14:31:02 tsutsui Exp $);
 
 #include sys/param.h
 #include sys/systm.h
@@ -57,7 +57,7 @@ bus_space_map(bus_space_tag_t t, bus_add
 		 * Intio space is direct-mapped in pmap_bootstrap(); just
 		 * do the translation.
 		 */
-		*bshp = (bus_space_handle_t)IIOV(bpa);
+		*bshp = (bus_space_handle_t)bpa;
 		return 0;
 	}
 

Index: src/sys/arch/news68k/news68k/machdep.c
diff -u src/sys/arch/news68k/news68k/machdep.c:1.96 src/sys/arch/news68k/news68k/machdep.c:1.97
--- src/sys/arch/news68k/news68k/machdep.c:1.96	Sun Nov 20 15:38:00 2011
+++ 

CVS commit: src/sys/arch/news68k

2011-11-22 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue Nov 22 14:31:02 UTC 2011

Modified Files:
src/sys/arch/news68k/dev: kbc.c ms_hb.c timer_hb.c
src/sys/arch/news68k/news68k: bus_space.c machdep.c

Log Message:
Remove more now unnecessary IIOV() conversion.
XXX: we should have proper PA to VA macro for TT mappings for readability


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/news68k/dev/kbc.c
cvs rdiff -u -r1.13 -r1.14 src/sys/arch/news68k/dev/ms_hb.c
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/news68k/dev/timer_hb.c
cvs rdiff -u -r1.10 -r1.11 src/sys/arch/news68k/news68k/bus_space.c
cvs rdiff -u -r1.96 -r1.97 src/sys/arch/news68k/news68k/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/news68k

2011-11-20 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Nov 20 15:38:00 UTC 2011

Modified Files:
src/sys/arch/news68k/conf: GENERIC INSTALL files.news68k majors.news68k
src/sys/arch/news68k/dev: if_le.c kb_hb.c si.c zs.c
src/sys/arch/news68k/include: cpu.h vmparam.h
src/sys/arch/news68k/news68k: locore.s machdep.c pmap_bootstrap.c
Added Files:
src/sys/arch/news68k/news68k: romcalls.S romcons.c

Log Message:
Add preliminary PROM internal function based framebuffer console support,
which was demonstrated at Open Source Conference 2011 Kansai @ Kyoto
back in July:
http://www.NetBSD.org/gallery/events.html#opensourceconf2011-Kansai

- map 0xc000-0x PA region (which is mirror of PA 0x0-0x3fff)
  to the same VA via %tt0 and %tt1 registers and move KVA space accordingly
  (like luna68k does for its devices)
- save trap #0 vector for PROM function calls in early bootstrap
  and register it to trap #14 to call it from kernel for console output
- add dumb romcall based tty attachment taken from src/sys/dev/ofw/ofcons.c
- add rom function call stubs from news68k/stand/common/romcalls.S
- remove IIOV() macro for device registers where now mapped PA==VA via %tt1

XXX: romcons is not enabled yet because there is no generic interface
XXX: to attach wskbd(4) to non wsdisplay(4) devices like this romcons.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/news68k/conf/GENERIC
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/news68k/conf/INSTALL
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/news68k/conf/files.news68k
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/news68k/conf/majors.news68k
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/news68k/dev/if_le.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/news68k/dev/kb_hb.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/news68k/dev/si.c
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/news68k/dev/zs.c
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/news68k/include/cpu.h
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/news68k/include/vmparam.h
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/news68k/news68k/locore.s
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/news68k/news68k/machdep.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/news68k/news68k/pmap_bootstrap.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/news68k/news68k/romcalls.S \
src/sys/arch/news68k/news68k/romcons.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/news68k/conf/GENERIC
diff -u src/sys/arch/news68k/conf/GENERIC:1.106 src/sys/arch/news68k/conf/GENERIC:1.107
--- src/sys/arch/news68k/conf/GENERIC:1.106	Sun Mar  6 17:08:28 2011
+++ src/sys/arch/news68k/conf/GENERIC	Sun Nov 20 15:38:00 2011
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.106 2011/03/06 17:08:28 bouyer Exp $
+# $NetBSD: GENERIC,v 1.107 2011/11/20 15:38:00 tsutsui Exp $
 #
 # GENERIC machine description file
 #
@@ -22,7 +22,7 @@ include		arch/news68k/conf/std.news68k
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.106 $
+#ident 		GENERIC-$Revision: 1.107 $
 
 maxusers	8
 
@@ -221,6 +221,9 @@ ch*	at scsibus? target ? lun ?		# SCSI c
 ss*	at scsibus? target ? lun ?		# SCSI scanners
 uk*	at scsibus? target ? lun ?		# unknown SCSI devices
 
+# PROM console support
+#romcons0 at mainbus0
+
 #
 # accept filters
 pseudo-device   accf_data		# dataready accept filter

Index: src/sys/arch/news68k/conf/INSTALL
diff -u src/sys/arch/news68k/conf/INSTALL:1.53 src/sys/arch/news68k/conf/INSTALL:1.54
--- src/sys/arch/news68k/conf/INSTALL:1.53	Sun Mar 13 12:58:02 2011
+++ src/sys/arch/news68k/conf/INSTALL	Sun Nov 20 15:38:00 2011
@@ -1,4 +1,4 @@
-# 	$NetBSD: INSTALL,v 1.53 2011/03/13 12:58:02 he Exp $
+# 	$NetBSD: INSTALL,v 1.54 2011/11/20 15:38:00 tsutsui Exp $
 
 #	config for bootable floppy kernel
 #
@@ -146,6 +146,9 @@ sd*	at scsibus? target ? lun ?		# SCSI d
 st*	at scsibus? target ? lun ?		# SCSI tapes
 cd*	at scsibus? target ? lun ?		# SCSI CD-ROMs
 
+# PROM console support
+#romcons0 at mainbus0
+
 # Misc.
 pseudo-device	loop			# loopback interface; required
 pseudo-device	pty		2	# pseudo-terminals (Sysinst needs two)

Index: src/sys/arch/news68k/conf/files.news68k
diff -u src/sys/arch/news68k/conf/files.news68k:1.32 src/sys/arch/news68k/conf/files.news68k:1.33
--- src/sys/arch/news68k/conf/files.news68k:1.32	Sun Jun 12 03:35:44 2011
+++ src/sys/arch/news68k/conf/files.news68k	Sun Nov 20 15:38:00 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: files.news68k,v 1.32 2011/06/12 03:35:44 rmind Exp $
+#	$NetBSD: files.news68k,v 1.33 2011/11/20 15:38:00 tsutsui Exp $
 
 #	NEWS68K-specific configuration info
 
@@ -19,6 +19,7 @@ file	arch/news68k/news68k/isr.c
 file	arch/news68k/news68k/machdep.c
 file	arch/news68k/news68k/mainbus.c
 file	arch/news68k/news68k/pmap_bootstrap.c	compile-with ${NOPROF_C}
+file	arch/news68k/news68k/romcalls.S
 file	arch/news68k/news68k/trap.c
 file	arch/m68k/m68k/cacheops.c
 file	

CVS commit: src/sys/arch/news68k

2011-11-20 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Nov 20 15:38:00 UTC 2011

Modified Files:
src/sys/arch/news68k/conf: GENERIC INSTALL files.news68k majors.news68k
src/sys/arch/news68k/dev: if_le.c kb_hb.c si.c zs.c
src/sys/arch/news68k/include: cpu.h vmparam.h
src/sys/arch/news68k/news68k: locore.s machdep.c pmap_bootstrap.c
Added Files:
src/sys/arch/news68k/news68k: romcalls.S romcons.c

Log Message:
Add preliminary PROM internal function based framebuffer console support,
which was demonstrated at Open Source Conference 2011 Kansai @ Kyoto
back in July:
http://www.NetBSD.org/gallery/events.html#opensourceconf2011-Kansai

- map 0xc000-0x PA region (which is mirror of PA 0x0-0x3fff)
  to the same VA via %tt0 and %tt1 registers and move KVA space accordingly
  (like luna68k does for its devices)
- save trap #0 vector for PROM function calls in early bootstrap
  and register it to trap #14 to call it from kernel for console output
- add dumb romcall based tty attachment taken from src/sys/dev/ofw/ofcons.c
- add rom function call stubs from news68k/stand/common/romcalls.S
- remove IIOV() macro for device registers where now mapped PA==VA via %tt1

XXX: romcons is not enabled yet because there is no generic interface
XXX: to attach wskbd(4) to non wsdisplay(4) devices like this romcons.


To generate a diff of this commit:
cvs rdiff -u -r1.106 -r1.107 src/sys/arch/news68k/conf/GENERIC
cvs rdiff -u -r1.53 -r1.54 src/sys/arch/news68k/conf/INSTALL
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/news68k/conf/files.news68k
cvs rdiff -u -r1.22 -r1.23 src/sys/arch/news68k/conf/majors.news68k
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/news68k/dev/if_le.c
cvs rdiff -u -r1.12 -r1.13 src/sys/arch/news68k/dev/kb_hb.c
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/news68k/dev/si.c
cvs rdiff -u -r1.30 -r1.31 src/sys/arch/news68k/dev/zs.c
cvs rdiff -u -r1.39 -r1.40 src/sys/arch/news68k/include/cpu.h
cvs rdiff -u -r1.18 -r1.19 src/sys/arch/news68k/include/vmparam.h
cvs rdiff -u -r1.59 -r1.60 src/sys/arch/news68k/news68k/locore.s
cvs rdiff -u -r1.95 -r1.96 src/sys/arch/news68k/news68k/machdep.c
cvs rdiff -u -r1.36 -r1.37 src/sys/arch/news68k/news68k/pmap_bootstrap.c
cvs rdiff -u -r0 -r1.1 src/sys/arch/news68k/news68k/romcalls.S \
src/sys/arch/news68k/news68k/romcons.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/news68k/news68k

2011-11-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Nov  3 14:56:39 UTC 2011

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

Log Message:
unifdef __ELF__


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/news68k/news68k/locore.s

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

Modified files:

Index: src/sys/arch/news68k/news68k/locore.s
diff -u src/sys/arch/news68k/news68k/locore.s:1.56 src/sys/arch/news68k/news68k/locore.s:1.57
--- src/sys/arch/news68k/news68k/locore.s:1.56	Tue Feb  8 20:20:21 2011
+++ src/sys/arch/news68k/news68k/locore.s	Thu Nov  3 14:56:39 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.56 2011/02/08 20:20:21 rmind Exp $	*/
+/*	$NetBSD: locore.s,v 1.57 2011/11/03 14:56:39 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -1056,11 +1056,7 @@ ENTRY_NOPROFILE(_delay)
 	 * operations and that the loop will run from a single cache
 	 * half-line.
 	 */
-#ifdef __ELF__
 	.align  8
-#else
-	.align	3
-#endif
 L_delay:
 	subl	%d1,%d0
 	jgt	L_delay



CVS commit: src/sys/arch/news68k/news68k

2011-11-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Nov  3 14:56:39 UTC 2011

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

Log Message:
unifdef __ELF__


To generate a diff of this commit:
cvs rdiff -u -r1.56 -r1.57 src/sys/arch/news68k/news68k/locore.s

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



CVS commit: src/sys/arch/news68k/news68k

2011-11-03 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Nov  3 14:57:43 UTC 2011

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

Log Message:
Replace (???) comments to avoid false trigraph warnings by new as(1).


To generate a diff of this commit:
cvs rdiff -u -r1.57 -r1.58 src/sys/arch/news68k/news68k/locore.s

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



CVS commit: src/sys/arch/news68k/news68k

2011-05-15 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun May 15 16:51:09 UTC 2011

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

Log Message:
Some KNF.


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

2011-05-10 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue May 10 14:41:55 UTC 2011

Modified Files:
src/sys/arch/news68k/news68k: autoconf.c machdep.c

Log Message:
Move isrinit() call from early news68k_init() to cpu_configure(9)
since interrupt service routines would want evcnt(9).


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/news68k/news68k/autoconf.c
cvs rdiff -u -r1.91 -r1.92 src/sys/arch/news68k/news68k/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/news68k/news68k/autoconf.c
diff -u src/sys/arch/news68k/news68k/autoconf.c:1.19 src/sys/arch/news68k/news68k/autoconf.c:1.20
--- src/sys/arch/news68k/news68k/autoconf.c:1.19	Tue Feb  8 20:20:20 2011
+++ src/sys/arch/news68k/news68k/autoconf.c	Tue May 10 14:41:55 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: autoconf.c,v 1.19 2011/02/08 20:20:20 rmind Exp $	*/
+/*	$NetBSD: autoconf.c,v 1.20 2011/05/10 14:41:55 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -51,7 +51,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.19 2011/02/08 20:20:20 rmind Exp $);
+__KERNEL_RCSID(0, $NetBSD: autoconf.c,v 1.20 2011/05/10 14:41:55 tsutsui Exp $);
 
 #include scsibus.h
 
@@ -68,6 +68,8 @@
 #include machine/romcall.h
 #include machine/autoconf.h
 
+#include news68k/news68k/isr.h
+
 /*
  * The following several variables are related to
  * the configuration process, and are used in initializing
@@ -91,6 +93,9 @@
 	 */
 	(void) splhigh();
 
+	/* Initialize the interrupt handlers. */
+	isrinit();
+
 	if (config_rootfound(mainbus, NULL) == NULL)
 		panic(autoconfig failed, no root);
 

Index: src/sys/arch/news68k/news68k/machdep.c
diff -u src/sys/arch/news68k/news68k/machdep.c:1.91 src/sys/arch/news68k/news68k/machdep.c:1.92
--- src/sys/arch/news68k/news68k/machdep.c:1.91	Sun Mar  6 14:54:47 2011
+++ src/sys/arch/news68k/news68k/machdep.c	Tue May 10 14:41:55 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.91 2011/03/06 14:54:47 tsutsui Exp $	*/
+/*	$NetBSD: machdep.c,v 1.92 2011/05/10 14:41:55 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.91 2011/03/06 14:54:47 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.92 2011/05/10 14:41:55 tsutsui Exp $);
 
 #include opt_ddb.h
 #include opt_compat_netbsd.h
@@ -186,8 +186,6 @@
 		panic(impossible system type);
 	}
 
-	isrinit();
-
 	/*
 	 * Initialize error message buffer (at end of core).
 	 * avail_end was pre-decremented in pmap_bootstrap to compensate.



CVS commit: src/sys/arch/news68k/news68k

2011-05-10 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue May 10 14:41:55 UTC 2011

Modified Files:
src/sys/arch/news68k/news68k: autoconf.c machdep.c

Log Message:
Move isrinit() call from early news68k_init() to cpu_configure(9)
since interrupt service routines would want evcnt(9).


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 src/sys/arch/news68k/news68k/autoconf.c
cvs rdiff -u -r1.91 -r1.92 src/sys/arch/news68k/news68k/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/news68k

2011-03-06 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Mar  6 14:54:47 UTC 2011

Modified Files:
src/sys/arch/news68k/conf: GENERIC majors.news68k
src/sys/arch/news68k/include: intr.h
src/sys/arch/news68k/news68k: machdep.c mainbus.c vectors.s

Log Message:
Remove trailing spaces and TABs.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/news68k/conf/GENERIC
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/news68k/conf/majors.news68k
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/news68k/include/intr.h
cvs rdiff -u -r1.90 -r1.91 src/sys/arch/news68k/news68k/machdep.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/news68k/news68k/mainbus.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/news68k/news68k/vectors.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/news68k/conf/GENERIC
diff -u src/sys/arch/news68k/conf/GENERIC:1.104 src/sys/arch/news68k/conf/GENERIC:1.105
--- src/sys/arch/news68k/conf/GENERIC:1.104	Mon Jan  3 06:07:44 2011
+++ src/sys/arch/news68k/conf/GENERIC	Sun Mar  6 14:54:46 2011
@@ -1,7 +1,7 @@
-# $NetBSD: GENERIC,v 1.104 2011/01/03 06:07:44 tsutsui Exp $
+# $NetBSD: GENERIC,v 1.105 2011/03/06 14:54:46 tsutsui Exp $
 #
 # GENERIC machine description file
-# 
+#
 # This machine description file is used to generate the default NetBSD
 # kernel.  The generic kernel does not include all options, subsystems
 # and device drivers, but should be useful for most applications.
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.104 $
+#ident 		GENERIC-$Revision: 1.105 $
 
 maxusers	8
 

Index: src/sys/arch/news68k/conf/majors.news68k
diff -u src/sys/arch/news68k/conf/majors.news68k:1.20 src/sys/arch/news68k/conf/majors.news68k:1.21
--- src/sys/arch/news68k/conf/majors.news68k:1.20	Wed Nov 12 12:36:04 2008
+++ src/sys/arch/news68k/conf/majors.news68k	Sun Mar  6 14:54:47 2011
@@ -1,4 +1,4 @@
-#	$NetBSD: majors.news68k,v 1.20 2008/11/12 12:36:04 ad Exp $
+#	$NetBSD: majors.news68k,v 1.21 2011/03/06 14:54:47 tsutsui Exp $
 #
 # Device majors for news68k
 #
@@ -48,5 +48,5 @@
 device-major	nsmb		char 98			nsmb
 
 # Majors up to 143 are reserved for machine-dependant drivers.
-# New machine-independent driver majors are assigned in 
+# New machine-independent driver majors are assigned in
 # sys/conf/majors.

Index: src/sys/arch/news68k/include/intr.h
diff -u src/sys/arch/news68k/include/intr.h:1.25 src/sys/arch/news68k/include/intr.h:1.26
--- src/sys/arch/news68k/include/intr.h:1.25	Thu Apr  9 10:48:22 2009
+++ src/sys/arch/news68k/include/intr.h	Sun Mar  6 14:54:47 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: intr.h,v 1.25 2009/04/09 10:48:22 tsutsui Exp $	*/
+/*	$NetBSD: intr.h,v 1.26 2011/03/06 14:54:47 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 1998 The NetBSD Foundation, Inc.
@@ -49,13 +49,13 @@
 
 extern int idepth;
 
-static inline bool
+static inline bool
 cpu_intr_p(void)
 {
 
 	return idepth != 0;
-}   
-
+}
+
 extern const uint16_t ipl2psl_table[NIPL];
 
 typedef int ipl_t;

Index: src/sys/arch/news68k/news68k/machdep.c
diff -u src/sys/arch/news68k/news68k/machdep.c:1.90 src/sys/arch/news68k/news68k/machdep.c:1.91
--- src/sys/arch/news68k/news68k/machdep.c:1.90	Fri Mar  4 22:25:28 2011
+++ src/sys/arch/news68k/news68k/machdep.c	Sun Mar  6 14:54:47 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.90 2011/03/04 22:25:28 joerg Exp $	*/
+/*	$NetBSD: machdep.c,v 1.91 2011/03/06 14:54:47 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1988 University of Utah.
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.90 2011/03/04 22:25:28 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.91 2011/03/06 14:54:47 tsutsui Exp $);
 
 #include opt_ddb.h
 #include opt_compat_netbsd.h
@@ -716,7 +716,7 @@
 /*
  * cpu_exec_aout_makecmds():
  *	CPU-dependent a.out format hook for execve().
- * 
+ *
  * Determine of the given exec package refers to something which we
  * understand and, if so, set up the vmcmds for it.
  *

Index: src/sys/arch/news68k/news68k/mainbus.c
diff -u src/sys/arch/news68k/news68k/mainbus.c:1.15 src/sys/arch/news68k/news68k/mainbus.c:1.16
--- src/sys/arch/news68k/news68k/mainbus.c:1.15	Fri Mar 28 17:51:51 2008
+++ src/sys/arch/news68k/news68k/mainbus.c	Sun Mar  6 14:54:47 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: mainbus.c,v 1.15 2008/03/28 17:51:51 tsutsui Exp $	*/
+/*	$NetBSD: mainbus.c,v 1.16 2011/03/06 14:54:47 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1994, 1995 Carnegie-Mellon University.
@@ -6,17 +6,17 @@
  *
  * Author: Chris G. Demetriou
  * DECstation port: Jonathan Stone
- * 
+ *
  * Permission to use, copy, modify and distribute this software and
  * its documentation is hereby granted, provided that both the copyright
  * notice and this permission notice appear in all copies of the
  * software, derivative works or modified versions, and any portions
  

CVS commit: src/sys/arch/news68k

2011-03-06 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Mar  6 14:54:47 UTC 2011

Modified Files:
src/sys/arch/news68k/conf: GENERIC majors.news68k
src/sys/arch/news68k/include: intr.h
src/sys/arch/news68k/news68k: machdep.c mainbus.c vectors.s

Log Message:
Remove trailing spaces and TABs.


To generate a diff of this commit:
cvs rdiff -u -r1.104 -r1.105 src/sys/arch/news68k/conf/GENERIC
cvs rdiff -u -r1.20 -r1.21 src/sys/arch/news68k/conf/majors.news68k
cvs rdiff -u -r1.25 -r1.26 src/sys/arch/news68k/include/intr.h
cvs rdiff -u -r1.90 -r1.91 src/sys/arch/news68k/news68k/machdep.c
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/news68k/news68k/mainbus.c
cvs rdiff -u -r1.6 -r1.7 src/sys/arch/news68k/news68k/vectors.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/news68k/news68k

2011-01-01 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jan  2 05:01:57 UTC 2011

Modified Files:
src/sys/arch/news68k/news68k: pmap_bootstrap.c

Log Message:
Pull code that maps the kernel segment table cache invalidated for 040/060,
to reduce diffs from other m68k ports.
(though news68k doesn't have 040/060 models)


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/sys/arch/news68k/news68k/pmap_bootstrap.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/news68k/news68k/pmap_bootstrap.c
diff -u src/sys/arch/news68k/news68k/pmap_bootstrap.c:1.32 src/sys/arch/news68k/news68k/pmap_bootstrap.c:1.33
--- src/sys/arch/news68k/news68k/pmap_bootstrap.c:1.32	Sun Jun  6 04:50:07 2010
+++ src/sys/arch/news68k/news68k/pmap_bootstrap.c	Sun Jan  2 05:01:57 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_bootstrap.c,v 1.32 2010/06/06 04:50:07 mrg Exp $	*/
+/*	$NetBSD: pmap_bootstrap.c,v 1.33 2011/01/02 05:01:57 tsutsui Exp $	*/
 
 /* 
  * Copyright (c) 1991, 1993
@@ -41,7 +41,7 @@
 #include opt_m68k_arch.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.32 2010/06/06 04:50:07 mrg Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.33 2011/01/02 05:01:57 tsutsui Exp $);
 
 #include sys/param.h
 
@@ -343,11 +343,11 @@
 	}
 	/*
 	 * Validate PTEs for kernel data/bss, dynamic data allocated
-	 * by us so far (nextpa - firstpa bytes), and pages for lwp0
+	 * by us so far (kstpa - firstpa bytes), and pages for lwp0
 	 * u-area and page table allocated below (RW).
 	 */
 	epte = (pt_entry_t *)kptpa;
-	epte = epte[m68k_btop(nextpa - firstpa)];
+	epte = epte[m68k_btop(kstpa - firstpa)];
 	protopte = (protopte  ~PG_PROT) | PG_RW;
 	/*
 	 * Enable copy-back caching of data pages
@@ -361,6 +361,25 @@
 		protopte += PAGE_SIZE;
 	}
 	/*
+	 * map the kernel segment table cache invalidated for
+	 * these machines (for the 68040 not strictly necessary, but
+	 * recommended by Motorola; for the 68060 mandatory)
+	 */
+	epte = (pt_entry_t *)kptpa;
+	epte = epte[m68k_btop(nextpa - firstpa)];
+	protopte = (protopte  ~PG_PROT) | PG_RW;
+#ifdef M68040
+	if (RELOC(mmutype, int) == MMU_68040) {
+		protopte = ~PG_CCB;
+		protopte |= PG_CIN;
+	}
+#endif
+	while (pte  epte) {
+		*pte++ = protopte;
+		protopte += PAGE_SIZE;
+	}
+
+	/*
 	 * Finally, validate the internal IO space PTEs (RW+CI).
 	 */
 



CVS commit: src/sys/arch/news68k/news68k

2011-01-01 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jan  2 05:09:28 UTC 2011

Modified Files:
src/sys/arch/news68k/news68k: pmap_bootstrap.c

Log Message:
Remove disabled code for VAC.  No such news68k models.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/news68k/news68k/pmap_bootstrap.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/news68k/news68k/pmap_bootstrap.c
diff -u src/sys/arch/news68k/news68k/pmap_bootstrap.c:1.33 src/sys/arch/news68k/news68k/pmap_bootstrap.c:1.34
--- src/sys/arch/news68k/news68k/pmap_bootstrap.c:1.33	Sun Jan  2 05:01:57 2011
+++ src/sys/arch/news68k/news68k/pmap_bootstrap.c	Sun Jan  2 05:09:27 2011
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_bootstrap.c,v 1.33 2011/01/02 05:01:57 tsutsui Exp $	*/
+/*	$NetBSD: pmap_bootstrap.c,v 1.34 2011/01/02 05:09:27 tsutsui Exp $	*/
 
 /* 
  * Copyright (c) 1991, 1993
@@ -41,7 +41,7 @@
 #include opt_m68k_arch.h
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.33 2011/01/02 05:01:57 tsutsui Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.34 2011/01/02 05:09:27 tsutsui Exp $);
 
 #include sys/param.h
 
@@ -58,9 +58,6 @@
 
 extern int maxmem, physmem;
 extern paddr_t avail_start, avail_end;
-#if 0
-extern int pmap_aliasmask;
-#endif
 
 void pmap_bootstrap(paddr_t, paddr_t);
 
@@ -439,16 +436,6 @@
 
 	RELOC(virtual_end, vaddr_t) = VM_MAX_KERNEL_ADDRESS;
 
-#if 0
-	/*
-	 * Determine VA aliasing distance if any
-	 *
-	 * XXX Are there any models which have VAC?
-	 */
-	if (RELOC(ectype, int) == EC_VIRT) {
-		RELOC(pmap_aliasmask, int) = 0x3fff;	/* 16k */
-	}
-#endif
 #ifdef news1700
 	if (RELOC(systype, int) == NEWS1700) {
 		RELOC(cache_ctl, uint8_t *) = 0xe130 - INTIOBASE1700 +



CVS commit: src/sys/arch/news68k/news68k

2011-01-01 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sun Jan  2 05:09:28 UTC 2011

Modified Files:
src/sys/arch/news68k/news68k: pmap_bootstrap.c

Log Message:
Remove disabled code for VAC.  No such news68k models.


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/arch/news68k/news68k/pmap_bootstrap.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/news68k/conf

2010-10-16 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 16 13:55:11 UTC 2010

Modified Files:
src/sys/arch/news68k/conf: GENERIC

Log Message:
Add commented out options MODULAR.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/arch/news68k/conf/GENERIC

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/news68k/conf/GENERIC
diff -u src/sys/arch/news68k/conf/GENERIC:1.101 src/sys/arch/news68k/conf/GENERIC:1.102
--- src/sys/arch/news68k/conf/GENERIC:1.101	Sat May  8 22:16:28 2010
+++ src/sys/arch/news68k/conf/GENERIC	Sat Oct 16 13:55:11 2010
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.101 2010/05/08 22:16:28 mrg Exp $
+# $NetBSD: GENERIC,v 1.102 2010/10/16 13:55:11 tsutsui Exp $
 #
 # GENERIC machine description file
 # 
@@ -22,7 +22,7 @@
 
 options 	INCLUDE_CONFIG_FILE	# embed config file in kernel binary
 
-#ident 		GENERIC-$Revision: 1.101 $
+#ident 		GENERIC-$Revision: 1.102 $
 
 maxusers	8
 
@@ -38,6 +38,9 @@
 options 	SYSVSEM			# System V semaphores
 options 	SYSVSHM			# System V shared memory
 options 	P1003_1B_SEMAPHORE # p1003.1b semaphore support
+
+#options 	MODULAR			# new style module framework
+
 options 	USERCONF		# userconf(4) support
 #options 	PIPE_SOCKETPAIR		# smaller, but slower pipe(2)
 options 	SYSCTL_INCLUDE_DESCR	# Include sysctl descriptions in kernel



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

2010-10-16 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Oct 16 13:55:11 UTC 2010

Modified Files:
src/sys/arch/news68k/conf: GENERIC

Log Message:
Add commented out options MODULAR.


To generate a diff of this commit:
cvs rdiff -u -r1.101 -r1.102 src/sys/arch/news68k/conf/GENERIC

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



CVS commit: src/sys/arch/news68k/news68k

2010-10-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Oct 14 16:31:16 UTC 2010

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

Log Message:
Prepare empty module_init_md() for options MODULAR.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/arch/news68k/news68k/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/news68k/news68k/machdep.c
diff -u src/sys/arch/news68k/news68k/machdep.c:1.85 src/sys/arch/news68k/news68k/machdep.c:1.86
--- src/sys/arch/news68k/news68k/machdep.c:1.85	Mon Feb  8 19:02:30 2010
+++ src/sys/arch/news68k/news68k/machdep.c	Thu Oct 14 16:31:16 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.85 2010/02/08 19:02:30 joerg Exp $	*/
+/*	$NetBSD: machdep.c,v 1.86 2010/10/14 16:31:16 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -77,7 +77,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.85 2010/02/08 19:02:30 joerg Exp $);
+__KERNEL_RCSID(0, $NetBSD: machdep.c,v 1.86 2010/10/14 16:31:16 tsutsui Exp $);
 
 #include opt_ddb.h
 #include opt_compat_netbsd.h
@@ -101,6 +101,7 @@
 #include sys/core.h
 #include sys/kcore.h
 #include sys/ksyms.h
+#include sys/module.h
 
 #ifdef DDB
 #include machine/db_machdep.h
@@ -1081,3 +1082,13 @@
 		Debugger();
 #endif
 }
+
+#ifdef MODULAR
+/*
+ * Push any modules loaded by the bootloader etc.
+ */
+void
+module_init_md(void)
+{
+}
+#endif



CVS commit: src/sys/arch/news68k/news68k

2010-10-14 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Thu Oct 14 16:31:16 UTC 2010

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

Log Message:
Prepare empty module_init_md() for options MODULAR.


To generate a diff of this commit:
cvs rdiff -u -r1.85 -r1.86 src/sys/arch/news68k/news68k/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/news68k/stand/boot

2010-08-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Aug 25 16:35:02 UTC 2010

Modified Files:
src/sys/arch/news68k/stand/boot: boot.c

Log Message:
s/LOAD_NOTE/LOAD_BACKWARDS


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/arch/news68k/stand/boot/boot.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/news68k/stand/boot/boot.c
diff -u src/sys/arch/news68k/stand/boot/boot.c:1.17 src/sys/arch/news68k/stand/boot/boot.c:1.18
--- src/sys/arch/news68k/stand/boot/boot.c:1.17	Tue Jan 20 08:35:28 2009
+++ src/sys/arch/news68k/stand/boot/boot.c	Wed Aug 25 12:35:02 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: boot.c,v 1.17 2009/01/20 13:35:28 tsutsui Exp $	*/
+/*	$NetBSD: boot.c,v 1.18 2010/08/25 16:35:02 christos Exp $	*/
 
 /*-
  * Copyright (c) 1999 Izumi Tsutsui.  All rights reserved.
@@ -123,10 +123,9 @@
 		kernels[1] = NULL;
 	}
 
-	/* disable LOAD_NOTE on floppy to avoid backward seek across volumes */
 	loadflag = LOAD_KERNEL;
 	if (devname[0] == 'f')	/* XXX */
-		loadflag = ~LOAD_NOTE;
+		loadflag = ~LOAD_BACKWARDS;
 
 	for (i = 0; kernels[i]; i++) {
 		sprintf(file, %s%s, devname, kernels[i]);



CVS commit: src/sys/arch/news68k/stand/boot

2010-08-25 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Wed Aug 25 16:35:02 UTC 2010

Modified Files:
src/sys/arch/news68k/stand/boot: boot.c

Log Message:
s/LOAD_NOTE/LOAD_BACKWARDS


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

2010-05-04 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue May  4 16:47:13 UTC 2010

Modified Files:
src/sys/arch/news68k/include: param.h

Log Message:
Switch NetBSD/news68k to using 8KB/page in kernel.
It slightly improves performance on NWS-1750D (MC68030 25MHz):
http://mail-index.NetBSD.org/port-m68k/2009/12/08/msg000204.html

MI m68k/pmap_motorola.c and other sources can handle both 4KB/8KB pages
(amiga and atari have used 8KB pages for many years) and there is
no binary compatibility issue on it.
(kernel modules might be affected but 5.99.29 was just two days ago)


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/news68k/include/param.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/news68k/include/param.h
diff -u src/sys/arch/news68k/include/param.h:1.14 src/sys/arch/news68k/include/param.h:1.15
--- src/sys/arch/news68k/include/param.h:1.14	Fri Dec 11 17:53:22 2009
+++ src/sys/arch/news68k/include/param.h	Tue May  4 16:47:13 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: param.h,v 1.14 2009/12/11 17:53:22 tsutsui Exp $	*/
+/*	$NetBSD: param.h,v 1.15 2010/05/04 16:47:13 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1982, 1986, 1990, 1993
@@ -86,7 +86,7 @@
 #define	MACHINE		news68k
 
 
-#define	PGSHIFT		12		/* LOG2(NBPG) */
+#define	PGSHIFT		13		/* LOG2(NBPG) */
 #define	KERNBASE	0x	/* start of kernel virtual */
 
 #define	UPAGES		2		/* pages of u-area */



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

2010-05-04 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Tue May  4 16:47:13 UTC 2010

Modified Files:
src/sys/arch/news68k/include: param.h

Log Message:
Switch NetBSD/news68k to using 8KB/page in kernel.
It slightly improves performance on NWS-1750D (MC68030 25MHz):
http://mail-index.NetBSD.org/port-m68k/2009/12/08/msg000204.html

MI m68k/pmap_motorola.c and other sources can handle both 4KB/8KB pages
(amiga and atari have used 8KB pages for many years) and there is
no binary compatibility issue on it.
(kernel modules might be affected but 5.99.29 was just two days ago)


To generate a diff of this commit:
cvs rdiff -u -r1.14 -r1.15 src/sys/arch/news68k/include/param.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/news68k/news68k

2009-12-12 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Sat Dec 12 09:54:42 UTC 2009

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

Log Message:
Allow NetBSD/news68k kernel work with PGSHIFT==13, i.e. 8KB/page.
Tested on NWS-1750 with 68030.


To generate a diff of this commit:
cvs rdiff -u -r1.50 -r1.51 src/sys/arch/news68k/news68k/locore.s

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

Modified files:

Index: src/sys/arch/news68k/news68k/locore.s
diff -u src/sys/arch/news68k/news68k/locore.s:1.50 src/sys/arch/news68k/news68k/locore.s:1.51
--- src/sys/arch/news68k/news68k/locore.s:1.50	Fri Dec 11 18:28:35 2009
+++ src/sys/arch/news68k/news68k/locore.s	Sat Dec 12 09:54:42 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.50 2009/12/11 18:28:35 tsutsui Exp $	*/
+/*	$NetBSD: locore.s,v 1.51 2009/12/12 09:54:42 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -423,7 +423,11 @@
 	.long	0x4e7b0007		| movc %d0,%dtt1
 	.word	0xf4d8			| cinva bc
 	.word	0xf518			| pflusha
+#if PGSHIFT == 13
+	movl	#0xc000,%d0
+#else
 	movl	#0x8000,%d0
+#endif
 	.long	0x4e7b0003		| movc %d0,%tc
 	movl	#CACHE40_ON,%d0
 	movc	%d0,%cacr		| turn on both caches
@@ -435,7 +439,11 @@
 	.long	0xf0100800		| pmove %a0@,%tt0
 #endif
 	RELOC(prototc, %a2)
+#if PGSHIFT == 13
+	movl	#0x82d08b00,%a2@	| value to load TC with
+#else
 	movl	#0x82c0aa00,%a2@	| value to load TC with
+#endif
 	pmove	%a2@,%tc		| load it
 
 /*



CVS commit: src/sys/arch/news68k/news68k

2009-12-02 Thread Izumi Tsutsui
Module Name:src
Committed By:   tsutsui
Date:   Wed Dec  2 15:54:19 UTC 2009

Modified Files:
src/sys/arch/news68k/news68k: locore.s pmap_bootstrap.c

Log Message:
Use common pmap_bootstrap_finalize() to initialize lwp0 uarea etc.
Tested on NWS-1750.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/arch/news68k/news68k/locore.s
cvs rdiff -u -r1.23 -r1.24 src/sys/arch/news68k/news68k/pmap_bootstrap.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/news68k/news68k/locore.s
diff -u src/sys/arch/news68k/news68k/locore.s:1.48 src/sys/arch/news68k/news68k/locore.s:1.49
--- src/sys/arch/news68k/news68k/locore.s:1.48	Thu Nov 26 00:19:19 2009
+++ src/sys/arch/news68k/news68k/locore.s	Wed Dec  2 15:54:19 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: locore.s,v 1.48 2009/11/26 00:19:19 matt Exp $	*/
+/*	$NetBSD: locore.s,v 1.49 2009/12/02 15:54:19 tsutsui Exp $	*/
 
 /*
  * Copyright (c) 1980, 1990, 1993
@@ -445,13 +445,13 @@
 /* select the software page size now */
 	lea	_ASM_LABEL(tmpstk),%sp	| temporary stack
 	jbsr	_C_LABEL(uvm_setpagesize)  | select software page size
-/* set kernel stack, user SP, and initial pcb */
-	lea	_C_LABEL(lwp0),%a2	| get lwp0.l_addr
-	movl	%a2@(L_ADDR),%a1	|   set kernel stack to end of area 
-	lea	%a1@(USPACE-4),%sp	|   and curlwp so that we don't
-	movl	%a2,_C_LABEL(curlwp)	|   deref NULL in trap()
+/* call final pmap setup which initialize lwp0, curlwp, and curpcb */
+	jbsr	_C_LABEL(pmap_bootstrap_finalize)
+/* set kernel stack, user SP */
+	movl	_C_LABEL(lwp0uarea),%a1	| get lwp0 uarea
+	lea	%a1@(USPACE-4),%sp	|   set kernel stack to end of area
+	movl	#USRSTACK-4,%a2
 	movl	%a2,%usp		| init user SP
-	movl	%a1,_C_LABEL(curpcb)	| lwp0 is running
 
 	tstl	_C_LABEL(fputype)	| Have an FPU?
 	jeq	Lenab2			| No, skip.

Index: src/sys/arch/news68k/news68k/pmap_bootstrap.c
diff -u src/sys/arch/news68k/news68k/pmap_bootstrap.c:1.23 src/sys/arch/news68k/news68k/pmap_bootstrap.c:1.24
--- src/sys/arch/news68k/news68k/pmap_bootstrap.c:1.23	Thu Nov 26 00:19:19 2009
+++ src/sys/arch/news68k/news68k/pmap_bootstrap.c	Wed Dec  2 15:54:19 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: pmap_bootstrap.c,v 1.23 2009/11/26 00:19:19 matt Exp $	*/
+/*	$NetBSD: pmap_bootstrap.c,v 1.24 2009/12/02 15:54:19 tsutsui Exp $	*/
 
 /* 
  * Copyright (c) 1991, 1993
@@ -39,7 +39,7 @@
  */
 
 #include sys/cdefs.h
-__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.23 2009/11/26 00:19:19 matt Exp $);
+__KERNEL_RCSID(0, $NetBSD: pmap_bootstrap.c,v 1.24 2009/12/02 15:54:19 tsutsui Exp $);
 
 #include sys/param.h
 
@@ -89,7 +89,7 @@
 void
 pmap_bootstrap(paddr_t nextpa, paddr_t firstpa)
 {
-	paddr_t kstpa, kptpa, kptmpa, l0upa;
+	paddr_t kstpa, kptpa, kptmpa, lwp0upa;
 	u_int nptpages, kstsize;
 	st_entry_t protoste, *ste;
 	pt_entry_t protopte, *pte, *epte;
@@ -110,7 +110,7 @@
 	 *
 	 *	kptmpa		kernel PT map		1 page
 	 *
-	 *	l0upa		lwp 0 u-area		UPAGES pages
+	 *	lwp0upa		lwp 0 u-area		UPAGES pages
 	 *
 	 * The KVA corresponding to any of these PAs is:
 	 *	(PA - firstpa + KERNBASE).
@@ -136,7 +136,7 @@
 	nextpa += kstsize * PAGE_SIZE;
 	kptmpa = nextpa;
 	nextpa += PAGE_SIZE;
-	l0upa = nextpa;
+	lwp0upa = nextpa;
 	nextpa += USPACE;
 	kptpa = nextpa;
 	nptpages = RELOC(Sysptsize, int) +
@@ -306,7 +306,7 @@
 	}
 	/*
 	 * Validate PTEs for kernel data/bss, dynamic data allocated
-	 * by us so far (nextpa - firstpa bytes), and pages for proc0
+	 * by us so far (nextpa - firstpa bytes), and pages for lwp0
 	 * u-area and page table allocated below (RW).
 	 */
 	epte = ((u_int *)kptpa)[m68k_btop(nextpa - firstpa)];
@@ -361,21 +361,21 @@
 	(pt_entry_t *)m68k_ptob((NPTEPG - 1) * NPTEPG);
 
 	/*
-	 * Setup u-area for process 0.
+	 * Setup u-area for lwp 0.
 	 */
 	/*
 	 * Zero the u-area.
 	 * NOTE: `pte' and `epte' aren't PTEs here.
 	 */
-	pte = (u_int *)l0upa;
-	epte = (u_int *)(l0upa + USPACE);
+	pte = (u_int *)lwp0upa;
+	epte = (u_int *)(lwp0upa + USPACE);
 	while (pte  epte)
 		*pte++ = 0;
 	/*
-	 * Remember the u-area address so it can be loaded in the
-	 * proc struct p_addr field later.
+	 * Remember the u-area address so it can be loaded in the lwp0
+	 * via uvm_lwp_setuarea() later in pmap_bootstrap_finalize().
 	 */
-	RELOC(lwp0.l_addr, struct user *) = (struct user *)(l0upa - firstpa);
+	RELOC(lwp0uarea, vaddr_t) = lwp0upa - firstpa;
 
 	/*
 	 * VM data structures are now initialized, set up data for