Subject: NetBSD/i386-current - kernel reboots after loading init
To: None <netbsd-help@NetBSD.ORG, netbsd-bugs@NetBSD.ORG>
From: Brian de Alwis <bdealwis@Newbridge.COM>
List: netbsd-bugs
Date: 01/24/1995 09:34:34
I hope these lists are correct.

I've written about this before, around the second week of December.
I tried tracking it, but exams came up, and I've only just recently
got an Internet connection.

To summarize: I have last weekend's tar_files, and I am trying to
get the kernel up and running. It compiles, though I had to comment
eisa0 and pci0 out, since make complains that eisa_machdep.c doesn't
exist; this shouldn't matter.  The kernel will load and autoconfig
successfully.

This is where the fun begins.

Now if I boot in multi-user mode, the machine will reboot immediately.

If I boot in single-user mode, init will prompt me for a shell to be
run, and will just sit there: no reboot.

If I have it boot /bin/sh the machine will reboot. These reboots do
_not_ put me into ddb.

If I use /bin/csh, load bash, or use 1.0's /bin/sh, the shell will
be loaded. I'll get a prompt, and can enter one or two commands
before the kernel crashes with a vm_fault:
----------------------
vm_fault(f81797cc,0,1,0) -> 5
kernel: page fault trap, code=0
stopped at 0xa08: vm_fault(f81797cc,0,1,0) -> 5
kernel: page fault trap, code=0
 Stopped at _db_read_bytes+0x1c0: movb   0(%edx)
 , %bl
----------------------
which sends me to ddb.  When I do a trace:
----------------------
_db_read_bytes(a08,1,f7bffc40,a08,0) at _db_read_bytes+0x10
_db_get_value(a08,1,0,a08,a08) at _db_get_value+0x17
[... bunch of db traces ... <- sorry, I didn't write these down]
_trap() at _trap+0x174
--- trap (number 6) ---
vm_fault(f81797cc,0,1,0) -> 5
kernel: page fault trap, code=0
Faulted in DDB; continuing...
----------------------
When I do a ps, f81797cc falls in `swapper's address space. Unfortunately,
I didn't write down the ps output either.


I have updated gcc2, ld, as, ar, strip, ranlib, nm, lorder, tsort.
It makes no difference. I haven't update /sbin/init. I'll try that
next.

I do have COMPAT_10 set (my config.new file follows at the end of this
message).  I've tried compiling with -g (which brings up some problems
with pio.h and npx.c about `inconsistent operand constraints in an
`asm'' with __inbc, __outbc, __inwc, __outwc, and fnstcw) and -DDEBUG,
but there are no messages displayed.

Note that NetBSD-current from around August works fine, as does
NetBSD-1.0. I had this problem with early December's -current as well.
I've also tried a recent -current kernel from Mark Weaver that
does work on his machine, but reboots as described above on mine.

My machine configuration:
    486-SLC2-66 w/co-processor, 16 on-chip cache, 128k external cache
    8MB RAM (running at 0-wait state)
    ATI Mach32 Graphics Ultra Plus
    2 IDE drives, 1.44MB floppy
The motherboard is made by IBM.


Looking through CHANGES, I've come upon these possibilities:
    Added a path through the VM system to allow influence of the
	machine MMU architecture on virtual address mappings. (pk)
    Implement and use a common access checking routine: vaccess. (ws)
Any comments?


I want to get this working, as it's unlikely future versions will work
either. What can I do to localize the problems?

Thanks for _any_ help.


-------------------------------------------------------------


Here is my config.new: DUMMY_NOPS doesn't make a difference.
----------------------
machine		i386		# architecture, used by config; REQUIRED

options		I386_CPU	# CPU classes; at least one is REQUIRED
options		I486_CPU
options		I586_CPU
#options		MATH_EMULATE	# floating point emulation

options	DUMMY_NOPS	# speed hack; recommanded
options		XSERVER,UCONSOLE
options		MACHINE_NONCONTIG

maxusers	6		# estimated number of users
options		TIMEZONE=5	# time zone to adjust RTC time by
options		DST=0		# daylight savings time used by RTC

options		SWAPPAGER	# paging; REQUIRED
options		VNODEPAGER	# mmap() of files
options		DEVPAGER	# mmap() of devices

options		DDB		# in-kernel debugger
options		DIAGNOSTIC	# internally consistency checks
options		KTRACE		# system call tracing, a la ktrace(1)

options		SYSVMSG		# System V-like message queues
options		SYSVSEM		# System V-like semaphores
options		SYSVSHM		# System V-like memory sharing
#options	SHMMAXPGS=1024	# 1024 pages is the default

options		COMPAT_NOMID	# compatibility with 386BSD, BSDI, NetBSD 0.8,
options		COMPAT_09	# NetBSD 0.9,
options		COMPAT_10	# NetBSD 1.0,
options		COMPAT_43	# and 4.3BSD
options		TCP_COMPAT_42	# TCP bug compatibility with 4.2BSD

#options	COMPAT_SVR4	# binary compatibility with SVR4
#options	COMPAT_IBCS2	# binary compatibility with SCO and ISC

options		USER_LDT	# user-settable LDT; used by WINE
options		LKM		# loadable kernel modules

options		FFS		# UFS
#options		FFS,QUOTA	# UFS and quotas
#options		LFS		# log-structured file system
#options		MFS		# memory file system

#options		NFSCLIENT	# Network File System client
#options		NFSSERVER	# Network File System server

#options		CD9660		# ISO 9660 + Rock Ridge file system
#options		MSDOSFS		# MS-DOS file system
#options		FDESC		# /dev/fd
#options		FIFO		# FIFOs; RECOMMENDED
#options		KERNFS		# /kern
#options		PROCFS		# /proc
#options		NULLFS		# loopback file system
#options		PORTAL		# ?
#options		UMAPFS		# NULLFS + uid and gid remapping
#options		UNION		# union file system

#options	GATEWAY		# packet forwarding
options		INET		# IP + ICMP + TCP + UDP
#options		NS		# XNS
#options		ISO,TPIP	# OSI
#options		EON		# OSI tunneling over IP
#options		CCITT,LLC,HDLC	# X.25

config		netbsd	swap generic
options		GENERIC

isa0	at root
#eisa0	at root
#pci0	at root

npx0	at isa? port 0xf0 irq 13	# math coprocessor

#pc0	at isa? port 0x60 irq 1		# generic PC console device
vt0	at isa? port 0x60 irq 1

com0	at isa? port 0x3f8 irq 4	# standard PC serial ports
com1	at isa? port 0x2f8 irq 3
#com2	at isa? port 0x3e8 irq 5
#com3	at isa? port 0x2e8 irq 9

lpt0	at isa? port 0x378 irq 7	# standard PC parallel ports
#lpt1	at isa? port 0x278
#lpt2	at isa? port 0x3bc

fdc0	at isa? port 0x3f0 irq 6 drq 2	# standard PC floppy controllers
#fdc1	at isa? port 0x370 irq ? drq ?
fd*	at fdc? drive ?

wdc0	at isa? port 0x1f0 irq 14	# ST506, ESDI, and IDE controllers
#wdc1	at isa? port 0x170 irq ?
wd*	at wdc? drive ?

#mcd0	at isa? port 0x300 irq 10	# Mitsumi CD-ROM drives
#sb0	at isa? port 0x220 irq 7 drq 1	# SoundBlaster
#spkr0	at isa? ...

pseudo-device	loop	1		# network loopback
pseudo-device	bpfilter 8		# packet filter
#pseudo-device	sl	2		# CSLIP
#pseudo-device	ppp	2		# PPP
#pseudo-device	tun	2		# network tunneling over tty

pseudo-device	pty	32		# pseudo-terminals
pseudo-device	vn	4		# paging to files
----------------------