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.

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

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

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

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

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