Subject: port-sparc64/13945: 32 bit sparc64-kernels made with 32 bit userland don't work anymore
To: None <gnats-bugs@gnats.netbsd.org>
From: None <Thilo.Manske@HEH.Uni-Oldenburg.DE>
List: netbsd-bugs
Date: 09/13/2001 16:14:14
>Number:         13945
>Category:       port-sparc64
>Synopsis:       32 bit kernels made with 32 bit userland don't work anymore
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    port-sparc64-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Sep 13 07:15:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Thilo Manske
>Release:        current since august 2001
>Organization:
Dies ist Thilos Unix Signature! Viel Spass damit.
>Environment:
System:
Sun Ultra1E/170 (creator)

Kernel
    NetBSD 1.5X (GENERIC_SUN4U) #0: Thu Sep 13 14:25:14 MEST 2001
    thilo@Ulla:/usr/src/sys/arch/sparc/compile/GENERIC_SUN4U 
or
    NetBSD 1.5X (GENERIC32) #4: Thu Sep 13 15:21:39 MEST 2001
    thilo@Ulla:/usr/src/sys/arch/sparc64/compile/GENERIC32
or
    NetBSD 1.5X (SPLODE) #1: Thu Sep 13 16:00:47 MEST 2001
    thilo@Ulla:/usr/src/sys/arch/sparc64/compile/SPLODE
or
	NetBSD 1.5X (Ulla) #43: Thu Sep 13 14:42:11 MEST 2001
    thilo@Ulla:/usr/src/sys/arch/sparc64/compile/Ulla
(my custom kernel)

Architecture: sparc64[/sparc]
Machine: sparc64
>Description:
When building one of the above mentioned kernels with current sources and
then trying to netboot it the following (or something similar) happenes:

Sun Ultra 1 UPA/SBus (UltraSPARC 167MHz), No Keyboard
OpenBoot 3.11, 96 MB memory installed, Serial #7964830.
Ethernet address 8:0:20:79:88:9e, Host ID: 8079889e.



Boot device: net  File and args:                                      
14c00 >> NetBSD/sparc64 OpenFirmware Boot, Revision 
>How-To-Repeat:
Make a 32bit sparc64-kernel with sparc (32bit) userland and try to boot it
on an Ultra1.
>Fix:
	
>Release-Note:
>Audit-Trail:
>Unformatted:
 >> (thilo@Ulla, Sat Sep  1 18:56:38 MEST 2001)
 Using BOOTPARAMS protocol: ip address: 10.2.0.29, hostname: Ulla.T
 root addr=10.2.0.1 path=/diskless/nfs/ulla
 loadfile: reading header
 elf32_exec: Booting /sbus@1f,0/SUNW,hme@e,8c00000/netbsd
 4372430@0x1000000+84364@0x1800000+4109940@0x181498c 
 symbols @ 0xfff301ec 74+202368+157960 start=0x1000000
 chain: calling OF_chain(800000, e9b0, 1000000, fffb5b58, c)
 [ using 360896 bytes of netbsd ELF symbol table ]
 console is /sbus@1f,0/zs@f,1100000:a             
 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001
     The NetBSD Foundation, Inc.  All rights reserved.
 Copyright (c) 1982, 1986, 1989, 1991, 1993           
     The Regents of the University of California.  All rights reserved.
                                                                       
 NetBSD 1.5X (GENERIC32) #4: Thu Sep 13 15:21:39 MEST 2001
     thilo@Ulla:/usr/src/sys/arch/sparc64/compile/GENERIC32
 total memory = 98304 KB                                   
 avail memory = 82136 KB
 using 627 buffers containing 5016 KB of memory
 bootpath: /sbus@1f,0/SUNW,hme@e,8c00000       
 mainbus0 (root): SUNW,Ultra-1          
 cpu0 at mainbus0: SUNW,UltraSPARC @ 167.016 MHz, version 0 FPU
 cpu0: physical 4K instruction (32 b/l), 4K data (32 b/l), 2048K external (64 b/l) 
 timer0 at mainbus0 addr 0xfffc7c00 irq vectors 7f0 and 7f1                        
 sbus0 at mainbus0 addr 0xfffcc000: clock = 25 MHz         
 DVMA map: ff800000 to 0                          
 audiocs0 at sbus0 slot 13 offset 0xc000000 vector 24 ipl 13: CS4231A
 audio0 at audiocs0: full duplex                                     
 auxio0 at sbus0 slot 15 offset 0x1900000
 flashprom at sbus0 slot 15 offset 0x0 not configured
 SUNW,fdtwo at sbus0 slot 15 offset 0x1400000 vector 29 ipl 11 not configured
 clock0 at sbus0 slot 15 offset 0x1200000: mk48t59: hostid 8079889e          
 zs0 at sbus0 slot 15 offset 0x1100000 vector 28 ipl 12 softpri 6  
 zstty0 at zs0 channel 0 (console i/o)                           
 zstty1 at zs0 channel 1              
 zs1 at sbus0 slot 15 offset 0x1000000 vector 28 ipl 12 softpri 6
 zstty2 at zs1 channel 0                                         
 kbd0 at zstty2         
 zstty3 at zs1 channel 1
 ms0 at zstty3          
 intr_establish: intr reused 7e8
 sc at sbus0 slot 15 offset 0x1300000 not configured
 SUNW,pll at sbus0 slot 15 offset 0x1304000 not configured
 esp0 at sbus0 slot 14 offset 0x8800000 vector 20 ipl 3: dma rev fas
 : FAS366/HME, 40MHz, SCSI ID 7                                     
 scsibus0 at esp0: 8 targets, 8 luns per target
 hme0 at sbus0 slot 14 offset 0x8c00000 vector 21 ipl 6: address 08:00:20:79:88:9e
 nsphy0 at hme0 phy 1: DP83840 10/100 media interface, rev. 0                     
 nsphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto
 bpp0 at sbus0 slot 14 offset 0xc800000 vector 22 ipl 2: dma rev unknown (0x20000000)
 pcons at mainbus0 not configured
 scsibus0: waiting 2 seconds for devices to settle...
 Kernelized RAIDframe activated                      
 root on hme0                  
 nfs_boot: trying RARP (and RPC/bootparam)
 nfs_boot: client_addr=10.2.0.29 (RARP from 10.2.0.1)
 data fault: pc=13072a0 addr=0                       
 kernel trap 30: data access exception
 Stopped in pid 0 (swapper) at   Lint_aligned+0x30:      ld              [%o5 + 0
 x0], %o4                                                                        
 db> trace /t
 udp_output(1cfc700, 1d52000, ff, 2, 0, a) at udp_output+0x2d0
 udp_usrreq(0, 9, 1cfc400, 1cfc000, 0, 184eca8) at udp_usrreq+0x2cc
 sosend(28, 1, 1851400, 1cfc400, 0, 0) at sosend+0x6fc             
 nfs_boot_sendrecv(3c, 1cfc000, 0, 1cfc300, 12003ac, 1c09bd0) at nfs_boot_sendrec
 v+0xa0                                                                          
 krpc_call(0, 186a0, 2, 5, 1c09c44, 1c09c40) at krpc_call+0x1c4
 bp_whoami(1c09cb0, 1c09cd0, 1c09cc0, ffff, 0, f) at bp_whoami+0x84
 nfs_bootparam(0, 184eca8, 0, 0, 1c09d78, f) at nfs_bootparam+0x144
 nfs_boot_init(31, 184eca8, fffffffc, 1, 1d04400, 1000000) at nfs_boot_init+0x64
 nfs_mountroot(1227c14, 1d2f800, 1d2f800, 1851c00, 5, 1) at nfs_mountroot+0x68  
 vfs_mountroot(180d57c, 1851000, 14, 181ec00, 181ec00, 134b718) at vfs_mountroot+
 0xe0                                                                            
 main(0, 110b1e4, 12000074, 1, 50, 1009a78) at main+0x540
 cpu_initialize(800000, 9b0, 1000000, fffb5b58, c, c) at cpu_initialize+0x324
 
 Sometimes it doesn't get to the debugger and this happens:
 
 RED State Exception
 
 TL=0000.0000.0000.0005 TT=0000.0000.0000.0030
    TPC=0000.0000.0100.8958 TnPC=0000.0000.0100.895c TSTATE=0000.0044.5800.0d00
 TL=0000.0000.0000.0004 TT=0000.0000.0000.0030
    TPC=0000.0000.0100.8958 TnPC=0000.0000.0100.895c TSTATE=0000.0044.5800.0d00
 TL=0000.0000.0000.0003 TT=0000.0000.0000.0030
    TPC=0000.0000.0100.8958 TnPC=0000.0000.0100.895c TSTATE=0000.0044.5800.0d00
 TL=0000.0000.0000.0002 TT=0000.0000.0000.0030
    TPC=0000.0000.0100.8958 TnPC=0000.0000.0100.895c TSTATE=0000.0044.5800.0d00
 TL=0000.0000.0000.0001 TT=0000.0000.0000.0030
    TPC=0000.0000.0111.4084 TnPC=0000.0000.0111.4088 TSTATE=0000.0044.8200.0e00
 
 BTW: Please note in the bootmessage that the reported cache sizes are completely
 wrong. I send in a PR on this (with fix) on 5th March (PR #12844).
 
 The last working kernel I have is dated June 20.