Subject: Compile of 970930 kernel sources...
To: None <port-sparc@NetBSD.ORG>
From: The Grey Wolf <greywolf@starwolf.com>
List: port-sparc
Date: 10/01/1997 09:39:08
While compiling a kernel:

# config STARWOLF
Don't forget to run "make depend".
# cd ../compile/STARWOLF
# make depend
...[lots of output deleted; ran OK]
# make
...[line continuations mine]...
cc -O2 -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -mno-fpu \
-I. -I../../../../arch -I../../../.. -nostdinc -DEXEC_AOUT -DEXEC_SCRIPT \
-DSUN4C -DKTRACE -DSYSVMSG -DSYSVSEM -DSYSVSHM -DLKM -DCOMPAT_43 \
-DCOMPAT_11 -DCOMPAT_12 -DCOMPAT_SUNOS -DCOMPAT_SVR4 -DEXEC_ELF32 -DFFS \
-DNFS -DKERNFS -DNULLFS -DMFS -DFDESC -DUMAPFS -DPROCFS -DCD9660 -DUNION \
-DMSDOSFS -DNFSSERVER -DQUOTA -DFIFO -DINET -DTCP_COMPAT_42 \
-DMAXUSERS=64 -D_KERNEL -c ../../../../arch/sparc/sparc/pmap.c
cc1: warnings being treated as errors
../../../../arch/sparc/sparc/pmap.c: In function `pmap_release':
../../../../arch/sparc/sparc/pmap.c:3775: warning: implicit declaration \
of function `pgtfree'
*** Error code 1

Stop.
# 

If I disable -Werror, the kernel panic'd with "memory alignment fault"
or some such (dumps don't work because physmem is larger than my
primary swap partition -- we _really_ need to have the dumpdev able to
span multiple partitions (I have 64MB physmem with 96MB swap distributed
as 3 32MB partitions across 3 disks to improve latency) -- anyway,
I don't have the error message handy, but it had something to do with
alignment and I can almost guarantee it has to do with the pgtfree() error
in pmap.c.)

The thing is this is a SUN4M thing and I'm running a SUN4C!  My config file
is as follows:

#
# STARWOLF:  Customized for SPARCstation IPX:
#		onboard cg6	(no RASTERCONSOLE)
#		onboard SCSI + 7 devices
#		2 spare sbus slots
#
# Everything which will never be needed/wanted has been deleted.
# Anything which may be needed has been commented out.
#		

include "arch/sparc/conf/std.sparc"

maxusers	64

# Options for variants of the Sun SPARC architecure.
# At least one is required.
options 	SUN4C		# sun4c - SS1, 1+, 2, ELC, SLC, IPC, IPX, etc.

# Standard system options
options 	KTRACE		# system call tracing
options 	SYSVMSG		# System V message queues
options 	SYSVSEM		# System V semaphores
options 	SYSVSHM		# System V shared memory
#options 	SHMMAXPGS=1024	# 1024 pages is the default
options 	LKM		# loadable kernel modules
#options 	INSECURE	# disable kernel security level
#options 	UCONSOLE	# allow anyone to steal the virtual console

# Debugging options
#options 	DDB		# kernel dynamic debugger
#options 	DEBUG		# kernel debugging code
#options 	DIAGNOSTIC	# extra kernel sanity checking
#options 	KGDB		# support for kernel gdb
#options 	KGDBDEV=0xc01	# kgdb device number (dev_t)
#options 	KGDBRATE=38400	# baud rate

# Compatibility options
options 	COMPAT_43	# 4.3BSD system interfaces
#options 	COMPAT_10	# NetBSD 1.0 binary compatibility
options 	COMPAT_11	# NetBSD 1.1 binary compatibility
options 	COMPAT_12	# NetBSD 1.2 binary compatibility
options 	COMPAT_SUNOS	# SunOS 4.x binary compatibility
options 	COMPAT_SVR4	# SunOS 5.x binary compatibility
options 	EXEC_ELF32	# Exec module for SunOS 5.x binaries.

# Filesystem options
file-system	FFS		# Berkeley Fast Filesystem
file-system	NFS		# Sun NFS-compatible filesystem client
file-system	KERNFS		# kernel data-structure filesystem
file-system	NULLFS		# NULL layered filesystem
file-system	MFS		# memory-based filesystem
file-system	FDESC		# user file descriptor filesystem
file-system	UMAPFS		# uid/gid remapping filesystem
#file-system	LFS		# Log-based filesystem (still experimental)
#file-system	PORTAL		# portal filesystem (still experimental)
file-system	PROCFS		# /proc
file-system	CD9660		# ISO 9660 + Rock Ridge file system
file-system	UNION		# union file system
file-system	MSDOSFS		# MS-DOS FAT filesystem(s).

options 	NFSSERVER	# Sun NFS-compatible filesystem server
options 	QUOTA		# FFS quotas
options 	FIFO		# POSIX fifo support (in all filesystems)

# Networking options
options 	INET		# IP stack
options 	TCP_COMPAT_42	# compatibility with 4.2BSD TCP/IP
#options 	GATEWAY		# IP packet forwarding
#options 	ISO,TPIP	# OSI networking
#options 	EON		# OSI tunneling over IP
#options 	CCITT,LLC,HDLC	# X.25
#options 	PFIL_HOOKS	# pfil(9) packet filter hooks.

# NOT for cgsix
#options 	RASTERCONSOLE	# fast rasterop console

# Generic swap; second partition of root disk or network.
config		netbsd	root on sd3 type ffs

# Main bus and CPU .. all systems.
mainbus0 at root
cpu0	at mainbus0

# Bus types found on SPARC systems.
sbus0	at mainbus0				# sun4c
audioamd0	at mainbus0				# sun4c
auxreg0	at mainbus0				# sun4c
clock0	at mainbus0				# sun4c
memreg0	at mainbus0				# sun4c
timer0	at mainbus0				# sun4c
zs0	at mainbus0					# sun4c
zs1	at mainbus0					# sun4c
#
# Note the flags on the esp entries below, that work around
# deficiencies in the current driver:
#	bits 0-7:  disable disconnect/reselect for the corresponding target
#	bits 8-15: disable synch negotiation for target [bit-8]
#	Note: targets 4-7 have disconnect/reselect enabled on the premise
#	      that tape devices normally have one of these targets. Tape
#	      devices should be allowed to disconnect for the SCSI bus
#	      to operate acceptably.
#

# sun4c or sun4m SCSI - an NCR53c94 or equivalent behind
# specialized DMA glue
dma0	at sbus0 slot ? offset ?			# on-board SCSI
esp0	at sbus0 slot ? offset ? flags 0xf404		# sun4c

# FSBE/S SCSI - an NCR53c94 or equivalent behind
dma*	at sbus? slot ? offset ?			# SBus SCSI
esp*	at sbus? slot ? offset ? flags 0xf000		# two flavours

# Qlogic ISP SBus SCSI Card
#isp*	at sbus? slot ? offset ?

# sun4/300 and sun4c Ethernet - an AMD 7990 LANCE
le0	at sbus0 slot ? offset ?			# sun4c on-board
le*	at sbus? slot ? offset ?

# Sun "bwtwo" black and white framebuffer, found on sun4, sun4c, and sun4m
# systems.  If your sun4 system has a cgfour installed in the P4 slot,
# the P4 entries for "bwtwo" will attach to the overlay plane of the
# "cgfour".
bwtwo0	at sbus0 slot ? offset ?		# sun4c on-board
bwtwo*	at sbus? slot ? offset ?		# sun4c and sun4m

# Sun "cgthree" Sbus color framebuffer
cgthree0 at sbus? slot ? offset ?
cgthree* at sbus? slot ? offset ?

# Sun "cgsix" accelerated color framebuffer.
cgsix0	at sbus? slot ? offset ?
cgsix*	at sbus? slot ? offset ?

# Sun "tcx" accelerated color framebuffer.
tcx0	at sbus? slot ? offset ?
tcx*	at sbus? slot ? offset ?

# SCSI bus layer.  SCSI devices attach to the SCSI bus, which attaches
# to the underlying hardware controller.
scsibus0 at esp0
#scsibus* at isp?

# These entries find devices on all SCSI busses and assign
# unit numbers dynamically.
sd0	at scsibus0 target 0 lun 0
sd1	at scsibus0 target 1 lun 0
sd2	at scsibus0 target 2 lun 0
sd3	at scsibus0 target 3 lun 0
st0	at scsibus0 target 4 lun 0
st1	at scsibus0 target 5 lun 0
cd0	at scsibus0 target 6 lun 0
cd*	at scsibus? target ? lun ?
ch*	at scsibus? target ? lun ?		# SCSI changer devices

# Audio
audio0	at audioamd0

# Floppy controller and drive found on SPARCstations.
fdc0	at mainbus0				# sun4c controller
fd*	at fdc0					# the drive itself

pseudo-device	loop			# loopback interface; required
pseudo-device	pty		128	# pseudo-ttys (for network, etc.)
pseudo-device	sl		2	# SLIP interfaces
pseudo-device	kbd			# Sun keyboard
pseudo-device	ppp		2	# PPP interfaces
pseudo-device	tun		4	# Network "tunnel" device
pseudo-device	bpfilter	16	# Berkeley Packet Filter
pseudo-device	vnd		4	# disk-like interface to files
pseudo-device	ccd		8	# concatenated and striped disks
#pseudo-device	strip		1	# radio clock
pseudo-device	ipfilter		# ip filter