Subject: hpcmips kernel is broken around FP emul.
To: NetBSD port-mips <port-mips@netbsd.org>
From: TAKEMURA Shin <takemura@netbsd.org>
List: port-mips
Date: 05/28/2000 17:38:10
Hpcmips kernel is broken.
It seems that fpcurproc->p_addr == 0
in sys/arch/mips/mips/fp.S

Any idea?

mem_cluster_cnt = 2
mem_clusters[0] = {0x0,0x272000}
mem_clusters[1] = {0x272000,0x1d8e000}
loading 0x272000,0x1d8e000
Copyright (c) 1996, 1997, 1998, 1999, 2000
    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.4Z (GENERIC) #4: Mon May 29 01:21:10 JST 2000

takemura@buchikou:/usr/home/takemura/cvs/tnf/src/sys/arch/hpcmips/compile/GE
NERIC
NEC MC-R530 (NEC VR4121 rev1.2 168.521MHz)
total memory = 32768 KB
avail memory = 27676 KB
using 435 buffers containing 1740 KB of memory
../../../../arch/hpcmips/vr/vr.c(294): vr_bus_reset() not implemented.
mainbus0 (root)
cpu0 at mainbus0: NEC VR4100 CPU Rev. 6.0 with software emulated floating
point
Rev. 0.0
cpu0: L1 cache: 16KB/16B instruction, 8KB/16B data, direct mapped
cpu0: No L2 cache
cpu0: install VR specific idle routine
bivideo0 at mainbus0: pseudo video controller
hpcfb0 at bivideo0: hpcrasops 640x240 pixels, 65536 colors, 80x24 chars:
tvram r
edraw
wsdisplay0 at hpcfb0
wsdisplay0: screen 0 added (std, vt100 emulation)
vrip0 at mainbus0
vrcmu0 at vrip0 addr 0xb000060-0xb00007f
vrgiu0 at vrip0 addr 0xb000100-0xb00011f intr 8
button0 at vrgiu0 port=3 id=6 active=high sense=edge
button1 at vrgiu0 port=2 id=9 active=high sense=edge
pwctl0 at vrgiu0 port=14 id=0 on=1
vrbcu0 at vrip0 addr 0xb000000-0xb00001f
vrbcu: cpu 168.521MHz, bus 28.086MHz, ram 56.173MHz
com0 at vrip0 addr 0xc000000-0xc000007 intr 9: ns16550a, working fifo
com0: console
vrrtc0 at vrip0 addr 0xb0000c0-0xb0000df intr 2
vrkiu0 at vrip0 addr 0xb000180-0xb00019f intr 7
wskbd0 at vrkiu0 mux 1
vrpmu0 at vrip0 addr 0xb0000a0-0xb0000bf intr 1
vrpmu: Deadman's switch detected
vrdsu0 at vrip0 addr 0xb0000e0-0xb0000e7
vrpiu0 at vrip0 addr 0xb000120-0xb0002bf intr 5
wsmouse0 at vrpiu0 mux 0
vrisab0 at vrgiu0:ISA port 0x14000000-0x18000000 mem 0x10000000-0x20000000
isa0 at vrisab0
pcic0 at isa0 port 0x3e0-0x3e1 iomem 0x70000-0x73fff irq 589827
pcic0: controller 0 (Intel 82365SL Revision 1) has sockets A and B
pcic0: controller 1 (Intel 82365SL Revision 1) has socket A only
pcmcia0 at pcic0 controller 0 socket 0
pcmcia1 at pcic0 controller 0 socket 1
pcmcia at pcic0 controller 1 socket 0 not configured
btnmgr0 at mainbus0
wskbd1 at btnmgr0 mux 1
../../../../arch/hpcmips/vr/vr.c(294): vr_bus_reset() not implemented.
pcic0: using irq 589827 for socket events
wdc1 at pcmcia0 function 0 port 0x14000400-0x1400040f
wd0 at wdc1 channel 0 drive 0: <IBM-DMDM-10340>
wd0: drive supports 16-sector pio transfers, lba addressing
wd0: 342 MB, 695 cyl, 16 head, 63 sec, 512 bytes/sect x 700560 sectors
wd1 at wdc1 channel 0 drive 1: <ST506>
wd1: drive supports 1-sector pio transfers, chs addressing
wd1: 69632 KB, 1024 cyl, 8 head, 17 sec, 512 bytes/sect x 139264 sectors
ne0 at pcmcia1 function 0 port 0x300-0x30f port 0x310-0x31f
ne0: Corega EtherII PCC-T Ethernet
ne0: Ethernet address 00:90:99:0a:f5:47
boot device: wd0
root on ne0
nfs_boot: trying DHCP/BOOTP
pcmcia1: card irq 3
nfs_boot: BOOTP server: 192.168.1.7
nfs_boot: my_name=toromegu
nfs_boot: my_domain=takemura.jp
nfs_boot: my_addr=192.168.1.99
nfs_boot: my_mask=255.255.255.0
nfs_boot: gateway=192.168.1.3
root on buchikou:/usr/pkg/mipsel-netbsd/root
WARNING: preposterous clock chip time
 -- CHECK AND RESET THE DATE!
trap: TLB miss (load or instr. fetch) in kernel mode
status=0x7c03, cause=0x80000008, epc=0x8016868c, vaddr=0x80
pid=11 cmd=sh usp=0x7fffec00 ksp=0xc2b93e60
Stopped in sh at        MachEmulateFP+0x2c:     jr      a3
                bdslot: MachEmulateFP+0x30:     lw      a2,128(t0)
db> show reg
at                0x11
v0                 0x8
v1          0x10000000
a0          0x4442f800
a1          0xc2b93f68
a2          0x1000002c
a3          0x80168768  MachEmulateFP+0x108
t0                   0
t1                   0
t2          0x1000002c
t3                   0
t4                   0
t5                   0
t6                   0
t7                   0
s0          0x7fffee38
s1          0x7fffede0
s2          0x81fe61b8  end+0x1d9b820
s3          0x7fffec20
s4                   0
s5                0x2c
s6                0x2b
s7                   0
t8                   0
t9            0x442840
k0                   0
k1                   0
gp          0x801d0940  _gp
sp          0xc2b93ed8
fp            0x442884
ra          0x800309d8  MachFPTrap+0x98
sr              0x7c03
mdlo                 0
mdhi                 0
bad                  0
cs                   0
pc          0x8016868c  MachEmulateFP+0x2c
MachEmulateFP+0x2c:     jr      a3
                bdslot: MachEmulateFP+0x30:     lw      a2,128(t0)

Breakpoint in sh at     MachEmulateFP:  addiu   sp,sp,-24
db> s
Stopped in sh at        MachEmulateFP+0x4:      sw      ra,20(sp)
db>
Stopped in sh at        MachEmulateFP+0x8:      sw      a2,32(sp)
db>
Stopped in sh at        MachEmulateFP+0xc:      srl     v0,a0,19
db>
Stopped in sh at        MachEmulateFP+0x10:     andi    v0,v0,0x7c
db>
Stopped in sh at        MachEmulateFP+0x14:     lui     t0,0x801d
db>
Stopped in sh at        MachEmulateFP+0x18:     lw      t0,12908(t0)
db>
Stopped in sh at        MachEmulateFP+0x1c:     lw      t0,372(t0)
db> show reg
t0          0x81fe61b8  end+0x1d9b820
db> p fpcurproc
801d326c
db> x fpcurproc
fpcurproc:      81fe61b8
db> s
Stopped in sh at        MachEmulateFP+0x20:     lui     a3,0x801b
db> show reg
t0                   0
db> x 81fe61b8+188
0x81fe6340:     c2b92000
db> x 81fe61b8+174
0x81fe632c:     0

Takemura