Subject: Re: Kernel asm compile errors
To: None <briggs@wasabisystems.com>
From: Takeshi Shibagaki <ie9t-sbgk@asahi-net.or.jp>
List: port-mac68k
Date: 01/28/2001 21:35:42
Hi,

From: Takeshi Shibagaki <ie9t-sbgk@asahi-net.or.jp>
Subject: Re: Kernel asm compile errors
Date: Thu, 18 Jan 2001 01:51:27 +0900 (JST)
Message-ID: <20010118.015127.01449199.shiba@asahi-net.or.jp>

ie9t-sbgk> I tried this patch, but the result doesn't have been changed,
ie9t-sbgk> and my LC630 works well at all.
ie9t-sbgk> 
ie9t-sbgk>               -------Sequential Output-------- ---Sequential Input-- --Random--
ie9t-sbgk>               -Per Char- --Block--- -Rewrite-- -Per Char- --Block--- --Seeks---
ie9t-sbgk> Machine    MB K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU K/sec %CPU  /sec %CPU
ie9t-sbgk>           100   655 96.1  1065 71.1   623 53.1   779 96.7  1534 70.6  63.1 21.7
ie9t-sbgk> 
ie9t-sbgk> I also tried the translation over network with ncftp2, but there
ie9t-sbgk> is no change in the result.
ie9t-sbgk> I don't understand in this time. What is a problem?

When I changed a partition table of same disk, sd0 didn't work well.
I didn't record data before a partition table, but maybe,

sd0a	about 900M?(NetBSD)
sd0b	128M(swap)
sd0c	about 3100M
sd0d	about 600M(HFS)
ad0e	about 700M?(not use)
ad0g	about 600M?(NetBSD)

At this time, 

# /dev/rsd0c:
type: SCSI
disk: FIREBALL ST3.2S
label: fictitious
flags:
bytes/sector: 512
sectors/track: 223
tracks/cylinder: 4
sectors/cylinder: 892
cylinders: 7068
total sectors: 6328861
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0           # microseconds
track-to-track seek: 0  # microseconds
drivedata: 0 

5 partitions:
#        size   offset     fstype   [fsize bsize cpg/sgs]
  a:  4915200      576     4.2BSD        0     0     0   # (Cyl.    0*- 5510*)
  b:   524288  4915776       swap                        # (Cyl. 5510*- 6098*)
  c:  6328861        0     unused        0     0         # (Cyl.    0 - 7095*)
  d:   886784  5440064        HFS                        # (Cyl. 6098*- 7092*)
  e:     2012  6326848    unknown                        # (Cyl. 7092*- 7095*)
disklabel: boot block size 0
disklabel: super block size 0

sd0a is 2400MB, sd0b is 256MB, sd0d 430MB. When I write 100MB data from ftp server
to sd0(through sn0), my machine hungs up and becomes kernel debug mode in folloing,

first time:
---------------------------------------------------------------------------------
sd0(esp0:2:0): esp0: timed out [ecb 0x582068 (flags 0x1, dleft 10000, stat 0)], <state 5, nexus 0x582068, phase(l 3, c 0, p 0), resid 10000, msg(q 0,o 0) DMA active>
sd0(esp0:2:0): esp0: timed out [ecb 0x582068 (flags 0x41, dleft 10000, stat 0)], <state 5, nexus 0x582068, phase(l 3, c 0, p 0), resid 10000, msg(q 20,o 0) DMA active> AGAIN
panic: esp0 invalid status: 6
Stopped at      _cpu_Debugger+0x6:      unlk    a6
db> t
_cpu_Debugger(8,8,0,542000,517f83c) + 6
_panic(1338c,542014,6,8,8) + 60
_ncr53c9x_intr(542000,517f870,1b28d6,542000,7) + f3e
_esp_intr(542000) + 18
_via2_intr(0,0,517f8d4,3524,68) + 4c
_intr_dispatch(68) + 48
_intrhand(?)
_mi_switch(8a7e00) + a
_ltsleep(2cc3c8,204,16663e,0,5179ee8) + 19c
_uvn_findpage(5179ee8,0,2000,517fa68,0) + 5c
_uvn_findpages(5179ee8,0,2000,517fa5c,517fa68,0,517fa68,0,40) + 34
_genfs_getpages(517fab4,63290,5179ee8,0,2000) +376
_VOP_GETPAGES(5179ee8,0,2000,517fb08,517fb50,0,3,0,2) + 54
_ubc_fault(517fc50,4994000,517fbd0,1,0,0,3,42) + 19e
_uvm_fault(1d7544,4994000,0,3) + 4bc
_trap(8,4a5,4994fcb) + 508
_copyin(?)
_uiomove(4994fcb,c5,517fef4,5179ee8,0,2fcb,517fe00) + 74
_ffs_write(517fe10,62244,5179ee8,517fef4,3) + 1ec
_VOP_WRITE(5179ee8,517fef4,3,546e80,5179ee8,20002,5179ee8,8a7e00,546e80,2) + 36
_vn_write(8c51b0,8c51cc,517fef4,546e80,1) + a4
_dofilewritev(8a7e00,7,8c51b0,ffffc2fc,6) + 110
_sys_writev(8a7e00,517ff88,517ff80) + 6e
_syscall(79) + 14a
_trap0() + e
---------------------------------------------------------------------------------
next time:
---------------------------------------------------------------------------------
panic: esp0: invalid state: 6
Stopping in pid 217 (xconsole) at       _cpu_Debugger+0x6       unlk    a6
db> trace
_cpu_Debugger(8,8,0,5eb000,7bf8f98) + 6
_panic(133a0,5eb014,6,8,8) + 60
_ncr53c9x_intr(5eb000,7bf8fcc,1b3ac2,5eb000,7) + f3e
_esp_intr(5eb000) + 18
_via2_intr(0,0,ffffbd14,3524,68) + 4c
_intr_dispatch(68) + 48
_intrhand() + a
---------------------------------------------------------------------------------

finally, I show my machine's dmesg.
dmesg:
---------------------------------------------------------------------------------
[ using 426424 bytes of netbsd a.out symbol table ]
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.5Q (GENERIC) #0: Tue Jan 16 04:07:59 JST 2001
    shiba@centris:/usr/home/shiba/NetBSD/010105/src/sys/arch/mac68k/compile/GENE
RIC
Apple Macintosh Quadra 630  (68040)
cpu: delay factor 1282
total memory = 69632 KB
avail memory = 60500 KB
using 896 buffers containing 3584 KB of memory
mrg: 'Quadra630 ROMs' ROM glue, tracing off, debug off, silent traps
mrg: I/O map kludge for ROMs that use hardware addresses directly.
mainbus0 (root)
obio0 at mainbus0
esp0 at obio0 (quick): address 0x900000: NCR53C96, 16MHz, SCSI ID 7
scsibus0 at esp0: 8 targets, 8 luns per target
wdc0 at obio0 (Quadra/Performa series IDE interface)
wd0 at wdc0 channel 0 drive 0: <ST34321A>
wd0: drive supports 32-sector PIO transfers, LBA addressing
wd0: 4103 MB, 8894 cyl, 15 head, 63 sec, 512 bytes/sect x 8404830 sectors
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 2 (Ultra/33)
adb0 at obio0
asc0 at obio0: Apple Sound Chip
intvid0 at obio0 @ f9001000: Valkyrie video subsystem
intvid0: 832 x 624, monochrome
macfb0 at intvid0
wsdisplay0 at macfb0: console (std, vt100 emulation)
iwm0 at obio0: Apple GCR floppy disk controller
iwm: Chip revision not supported (-77)
zsc0 at obio0 chip type 0 
zsc0 channel 0: d_speed   9600 DCD clk 0 CTS clk 0
zstty0 at zsc0 channel 0
zsc0 channel 1: d_speed   9600 DCD clk 0 CTS clk 0
zstty1 at zsc0 channel 1
nubus0 at mainbus0
sn0 at nubus0 slot e: Apple Ethernet LC Twisted-Pair Card
sn0: Ethernet address 00:a0:40:2a:c1:0f
fpu0 at mainbus0 (mc68040)
scsibus0: waiting 2 seconds for devices to settle...
esp0: target 1: sync negotiation
cd0 at scsibus0 target 1 lun 0: <MATSHITA, CD-ROM CR-8005A, 4.0i> SCSI2 5/cdrom 
removable
probe(esp0:1:1): max sync rate 4.03MB/s
esp0: target 2: sync negotiation
sd0 at scsibus0 target 2 lun 0: <QUANTUM, FIREBALL ST3.2S, 0F0C> SCSI2 0/direct 
fixed
sd0(esp0:2:0): async mode
sd0: 3090 MB, 7068 cyl, 4 head, 223 sec, 512 bytes/sect x 6328861 sectors
adb0 (direct, Cuda): 2 targets
aed0 at adb0 addr 0: ADB Event device
akbd0 at adb0 addr 2: keyboard II
wskbd0 at akbd0: console keyboard, using wsdisplay0
ams0 at adb0 addr 3: 1-button, 100 dpi mouse
wsmouse0 at ams0
boot device: <unknown>
root device: wd0a
dump device (default wd0b): 
file system (default generic): ffs
root on wd0a dumps on wd0b
PRAM: 0x3a74078d, macos_boottime: 0x3a74077c.
---------------------------------------------------------------------------------

Do you know why?

Takeshi Shibagaki
ie9t-sbgk@asahi-net.or.jp