Subject: -msupersparc not cool for 1.5 kernel on SS20?
To: None <port-sparc@netbsd.org>
From: Greg Troxel <gdt@ir.bbn.com>
List: port-sparc
Date: 11/15/2002 10:12:09
summary: I built a 1.5 kernel with -msupersparc for an SS20, and it
failed to boot.  Is this a bug, or is the answer "Don't do this"
because the kernel environment is somehow special?

Is it ok to link files compiled with -msupersparc with files compiled
without?  I would think that this just allows the use of
supersparc-only instructions, so having other files that decline to
use them should not present a problem (other than performance).

I have a SS20 running 1.5.4_ALPHA (recent netbsd-1-5 branch).
Following suggestions from this list, I installed the cpuflags pkg and
put

  .sinclude "/usr/pkg/share/mk/cpuflags.mk"

in /etc/mk.conf and rebuilt libcrypto and ssh.  (ssh is the critical
one because the DH code for the ssh2 KEX is in ssh, not libcrypto.)
This sped up ssh2 by a factor of 2.

Then, I did a cvs update and rebuilt a kernel (config/make
depend/make), and did 'make build'.  On rebooting, the machine did not
come up.  I asked someone to check on it (I'm remote), and he reported
that the console said "Instruction access exception".  Booting onetbsd
brought it back, so the new userland seems fine.

The new kernel seems bigger, and I don't know why.  I am rebuilding a
kernel without cpuflags and will try that.

        Greg Troxel <gdt@ir.bbn.com>

More data if anyone finds it helpful.

sunpal7 gdt 27 ~ > cpuflags 
-mcpu=supersparc
sunpal7 gdt 28 ~ > uname -a
NetBSD sunpal7.mit.edu 1.5.4_ALPHA NetBSD 1.5.4_ALPHA (SUNPAL4) #0: Fri Nov  1 16:38:06 EST 2002     gdt@sunpal7.mit.edu:/mnt/usr/ANONCVS/src/sys/arch/sparc/compile/SUNPAL4 sparc
sunpal7 gdt 58 ~ > cc -v
Using builtin specs.
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
sunpal7 gdt 72 / > l *net*
-rwxr-xr-x  1 root  wheel  3380440 Nov 14 18:06 netbsd
-rwxr-xr-x  1 root  10     2794426 Nov 28  2000 netbsd.GENERIC
-rwxr-xr-x  1 root  wheel  2866253 Nov  1 20:44 netbsd.ok
-rwxr-xr-x  1 root  wheel  2866253 Nov  1 20:44 onetbsd


NetBSD 1.5.4_ALPHA (SUNPAL4) #0: Fri Nov  1 16:38:06 EST 2002
    gdt@sunpal7.mit.edu:/mnt/usr/ANONCVS/src/sys/arch/sparc/compile/SUNPAL4
total memory = 64992 KB
avail memory = 56616 KB
using 838 buffers containing 3352 KB of memory
bootpath: /iommu@f,e0000000/sbus@f,e0001000/espdma@f,400000/esp@f,800000/sd@0,0
mainbus0 (root): SUNW,SPARCstation-20
cpu0 at mainbus0: RT620/625 @ 100 MHz, on-chip FPU
cpu0: 256K byte write-back, 64 bytes/line, sw flush: cache enabled
obio0 at mainbus0
clock0 at obio0 slot 0 offset 0x200000: mk48t08 (eeprom)
timer0 at obio0 slot 0 offset 0x300000 delay constant 48
zs0 at obio0 slot 0 offset 0x100000 level 12 softpri 6
zstty0 at zs0 channel 0
zstty1 at zs0 channel 1
zs1 at obio0 slot 0 offset 0x0 level 12 softpri 6
kbd0 at zs1 channel 0 (console input)
ms0 at zs1 channel 1
fdc0 at obio0 slot 0 offset 0x700000 level 11: no drives attached
auxreg0 at obio0 slot 0 offset 0x800000
power0 at obio0 slot 0 offset 0xa01000 level 2
iommu0 at mainbus0 ioaddr 0xe0000000: version 0x3/0x1, page-size 4096, range 64MB
sbus0 at iommu0: clock = 25 MHz
dma0 at sbus0 slot 15 offset 0x400000: rev 2
esp0 at dma0 slot 15 offset 0x800000 level 4: ESP200, 40MHz, SCSI ID 7
scsibus0 at esp0: 8 targets, 8 luns per target
ledma0 at sbus0 slot 15 offset 0x400010: rev 2
le0 at ledma0 slot 15 offset 0xc00000 level 6: address 08:00:20:71:55:66
le0: 8 receive buffers, 2 transmit buffers
bpp0 at sbus0 slot 15 offset 0x4800000 level 2 (ipl 3): rev 2
SUNW,DBRIe at sbus0 slot 14 offset 0x10000 level 9 not configured
cgsix0 at sbus0 slot 2 offset 0x0 level 9: SUNW,501-2325, 1152 x 900, rev 11 (console)
cgsix0: attached to /dev/fb
eccmemctl0 at mainbus0: version 0x0/0x2
scsibus0: waiting 2 seconds for devices to settle...
probe(esp0:0:0): max sync rate 10.00MB/s
sd0 at scsibus0 target 0 lun 0: <QUANTUM, XP34550S, LXY4> SCSI2 0/direct fixed
sd0: 4341 MB, 5899 cyl, 10 head, 150 sec, 512 bytes/sect x 8890760 sectors
probe(esp0:2:0): max sync rate 10.00MB/s
sd1 at scsibus0 target 2 lun 0: <MICROP, 1926-15MW1002002, HW0A> SCSI2 0/direct fixed
sd1: 2058 MB, 2772 cyl, 15 head, 101 sec, 512 bytes/sect x 4216172 sectors
probe(esp0:3:0): max sync rate 10.00MB/s
sd2 at scsibus0 target 3 lun 0: <SEAGATE, ST31200W SUN1.05, 8724> SCSI2 0/direct fixed
sd2: 1006 MB, 2700 cyl, 9 head, 84 sec, 512 bytes/sect x 2061108 sectors
probe(esp0:4:0): max sync rate 10.00MB/s
st0 at scsibus0 target 4 lun 0: <HP, C1537A, L610> SCSI2 1/sequential removable
st0: density code 37, variable blocks, write-enabled
Kernelized RAIDframe activated
IPsec: Initialized Security Association Processing.
root on sd0a dumps on sd0b
root file system type: ffs
st0(esp0:4:0): esp0: timed out [ecb 0xf05398d0 (flags 0x3, dleft c, stat 0)], <state 1, nexus 0x0, phase(l 10, c 100, p 3), resid 0, msg(q 0,o 0) >