Subject: Re: -current kernel reboots? (i386)
To: Andreas Persson <pap.is@home.se>
From: Andrew Gillham <gillham@vaultron.com>
List: current-users
Date: 09/29/2001 10:47:57
On Sat, Sep 29, 2001 at 03:51:12PM +0200, Andreas Persson wrote:
> I actually ran into this problem using -current in april sometime this year.
> I had compiled egcs with -march=... which in turn ended up miscompiling the
> kernel (but nothing else!) causing it to crash right at boot. Took a while
> to track it down ;).
It seems to me it is more of an alignment issue or something. If I build
with '-Os' it is ok. If I build with 'options I386_CPU' in addition to
'options I686_CPU' it is ok. GENERIC, which has both options is not ok.
If it is of any use, my kernel config is below.
-Andrew
#
#
#
include "arch/i386/conf/std.i386"
maxusers 64 # estimated number of users
# CPU support. At least one is REQUIRED.
options I386_CPU
#options I486_CPU
#options I586_CPU
options I686_CPU
# CPU-related options.
# eliminate delay no-ops in I/O; recommended on all but very old machines
options DUMMY_NOPS
options MTRR # memory-type range register syscall support
# Standard system options
options UCONSOLE # users can use TIOCCONS (for xconsole)
options INSECURE # disable kernel security levels
options RTC_OFFSET=0 # hardware clock is this many mins. west of GMT
options NTP # NTP phase/frequency locked loop
options KTRACE # system call tracing via ktrace(1)
options SYSVMSG # System V-like message queues
options SYSVSEM # System V-like semaphores
#options SEMMNI=10 # number of semaphore identifiers
#options SEMMNS=60 # number of semaphores in system
#options SEMUME=10 # max number of undo entries per process
#options SEMMNU=30 # number of undo structures in system
options SYSVSHM # System V-like memory sharing
#options SHMMAXPGS=1024 # 1024 pages is the default
options LKM # loadable kernel modules
# Diagnostic/debugging support options
#options DIAGNOSTIC # expensive kernel consistency checks
#options DEBUG # expensive debugging checks/support
#options KMEMSTATS # kernel memory statistics (vmstat -m)
options DDB # in-kernel debugger
options DDB_HISTORY_SIZE=512 # enable history editing in DDB
#options KGDB # remote debugger
#options "KGDB_DEVNAME=\"com\"",KGDBADDR=0x3f8,KGDBRATE=9600
#makeoptions DEBUG="-g" # compile full symbol table
# Compatibility options
options COMPAT_NOMID # compatibility with 386BSD, BSDI, NetBSD 0.8,
options COMPAT_09 # NetBSD 0.9,
options COMPAT_10 # NetBSD 1.0,
options COMPAT_11 # NetBSD 1.1,
options COMPAT_12 # NetBSD 1.2,
options COMPAT_13 # NetBSD 1.3,
options COMPAT_14 # NetBSD 1.4,
options COMPAT_15 # NetBSD 1.5,
options COMPAT_43 # and 4.3BSD
#options COMPAT_386BSD_MBRPART # recognize old partition ID
#options TCP_COMPAT_42 # 4.2BSD TCP/IP bug compat. Not recommended.
#options COMPAT_LINUX # binary compatibility with Linux
#options COMPAT_FREEBSD # binary compatibility with FreeBSD
# File systems
file-system FFS # UFS
file-system MFS # memory file system
file-system NFS # Network File System client
file-system CD9660 # ISO 9660 + Rock Ridge file system
file-system MSDOSFS # MS-DOS file system
file-system KERNFS # /kern
file-system NULLFS # loopback file system
file-system PROCFS # /proc
file-system UNION # union file system
# File system options
options SOFTDEP # FFS soft updates support.
# Networking options
options INET # IP + ICMP + TCP + UDP
options NMBCLUSTERS=8192
#options INET6 # IPV6
#options IPSEC # IP security
#options IPSEC_ESP # IP security (encryption part; define w/IPSEC)
#options IPSEC_DEBUG # debug for IP security
# These options enable verbose messages for several subsystems.
# Warning, these may compile large string tables into the kernel!
options MIIVERBOSE # verbose PHY autoconfig messages
options PCIVERBOSE # verbose PCI device autoconfig messages
options NFS_BOOT_DHCP,NFS_BOOT_BOOTPARAM
#
# wscons options
#
# builtin terminal emulations
#options WSEMUL_SUN # sun terminal emulation
options WSEMUL_VT100 # VT100 / VT220 emulation
# different kernel output - see dev/wscons/wsdisplayvar.h
options WS_KERNEL_FG=WSCOL_GREEN
#options WS_KERNEL_BG=WSCOL_BLACK
# compatibility to other console drivers
options WSDISPLAY_COMPAT_PCVT # emulate some ioctls
options WSDISPLAY_COMPAT_SYSCONS # emulate some ioctls
options WSDISPLAY_COMPAT_USL # VT handling
options WSDISPLAY_COMPAT_RAWKBD # can get raw scancodes
# see dev/pckbc/wskbdmap_mfii.c for implemented layouts
#options PCKBD_LAYOUT="(KB_DE | KB_NODEAD)"
# allocate a number of virtual screens at autoconfiguration time
#options WSDISPLAY_DEFAULTSCREENS=4
# use a large software cursor that doesn't blink
options PCDISPLAY_SOFTCURSOR
# modify the screen type of the console; defaults to "80x25"
#options VGA_CONSOLE_SCREENTYPE="\"80x24\""
# Kernel root file system and dump configuration.
#config netbsd root on ? type ?
#config netbsd root on sd0a type ffs
config netbsd root on ? type nfs
#
# Device configuration
#
mainbus0 at root
apm0 at mainbus0 # Advanced power management
# Tuning for power management, see apm(4) for more details.
#options APM_NO_IDLE # Don't call BIOS CPU idle function
#options APM_V10_ONLY # Use only the APM 1.0 calls
#options APM_NO_POWEROFF # Don't power off on halt(8)
#options APM_POWER_PRINT # Print stats on the console
#options APM_DISABLE_INTERRUPTS=0 # Don't disable interrupts
# Basic Bus Support
# PCI bus support
pci* at mainbus? bus ?
pci* at pchb? bus ?
pci* at ppb? bus ?
# PCI bridges
pchb* at pci? dev ? function ? # PCI-Host bridges
pcib* at pci? dev ? function ? # PCI-ISA bridges
ppb* at pci? dev ? function ? # PCI-PCI bridges
agp* at pchb?
# ISA bus support
isa0 at mainbus?
isa0 at pcib?
# ISA Plug-and-Play bus support
isapnp0 at isa?
# Coprocessor Support
# Math Coprocessor support
npx0 at isa? port 0xf0 irq 13 # x86 math coprocessor
# Console Devices
# wscons
pckbc0 at isa? # pc keyboard controller
pckbd* at pckbc? # PC keyboard
# "opms" should not be enabled together with "pms" or "pmsi"
pms* at pckbc? # PS/2 mouse for wsmouse
pmsi* at pckbc? # PS/2 "Intelli"mouse for wsmouse
vga* at pci? dev ? function ?
wsdisplay* at vga? console ?
wskbd* at pckbd? console ?
wsmouse* at pms? mux 0
wsmouse* at pmsi? mux 0
pcppi0 at isa?
sysbeep0 at pcppi?
# Serial Devices
# ISA serial interfaces
#options COM_HAYESP # adds Hayes ESP serial board support
com0 at isa? port 0x3f8 irq 4 # Standard PC serial ports
com1 at isa? port 0x2f8 irq 3
# Parallel Printer Interfaces
# ISA parallel printer interfaces
lpt0 at isa? port 0x378 irq 7 # standard PC parallel ports
# Hardware monitors
# LM7[89] and compatible hardware monitors
lm0 at isa? port 0x290 # other common ports: 0x280, 0x310
# IDE and related devices
# PCI IDE controllers - see pciide(4) for supported hardware.
# The 0x0001 flag force the driver to use DMA, even if the driver doesn't know
# how to set up DMA modes for this chip. This may work, or may cause
# a machine hang with some controllers.
pciide* at pci? dev ? function ? flags 0x0000
# IDE drives
# Flags are used only with controllers that support DMA operations
# and mode settings (e.g. some pciide controllers)
# The lowest order four bits (rightmost digit) of the flags define the PIO
# mode to use, the next set of four bits the DMA mode and the third set the
# UltraDMA mode. For each set of four bits, the 3 lower bits define the mode
# to use, and the last bit must be 1 for this setting to be used.
# For DMA and UDMA, 0xf (1111) means 'disable'.
# 0x0fac means 'use PIO mode 4, DMA mode 2, disable UltraDMA'.
# (0xc=1100, 0xa=1010, 0xf=1111)
# 0x0000 means "use whatever the drive claims to support".
wd* at pciide? channel ? drive ? flags 0x0000
# ATAPI bus support
atapibus* at pciide? channel ?
# ATAPI devices
# flags have the same meaning as for IDE drives.
cd* at atapibus? drive ? flags 0x0000 # ATAPI CD-ROM drives
sd* at atapibus? drive ? flags 0x0000 # ATAPI disk drives
uk* at atapibus? drive ? flags 0x0000 # ATAPI unknown
# Miscellaneous mass storage devices
# ISA floppy
fdc0 at isa? port 0x3f0 irq 6 drq 2 # standard PC floppy controllers
fd0 at fdc0 drive 0
# Network Interfaces
# PCI network interfaces
fxp* at pci? dev ? function ? # Intel EtherExpress PRO 10+/100B
# MII/PHY support
#inphy* at mii? phy ? # Intel 82555 PHYs
# USB Controller and Devices
# PCI USB controllers
uhci* at pci? dev ? function ? # Universal Host Controller (Intel)
# USB bus support
usb* at uhci?
# USB Hubs
uhub* at usb?
uhub* at uhub? port ? configuration ? interface ?
# USB Generic driver
ugen* at uhub? port ?
# Pseudo-Devices
# disk/mass storage pseudo-devices
pseudo-device md 1 # memory disk device (ramdisk)
pseudo-device vnd 4 # disk-like interface to files
# network pseudo-devices
pseudo-device bpfilter 8 # Berkeley packet filter
pseudo-device loop # network loopback
#pseudo-device vlan # IEEE 802.1q encapsulation
# miscellaneous pseudo-devices
pseudo-device pty # pseudo-terminals
pseudo-device rnd # /dev/random and in-kernel generator
# mouse & keyboard multiplexor pseudo-devices
#pseudo-device wsmux 2