From owner-freebsd-sparc64@FreeBSD.ORG Fri Oct 7 11:23:18 2005 Return-Path: X-Original-To: freebsd-sparc64@freebsd.org Delivered-To: freebsd-sparc64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A5AD216A41F for ; Fri, 7 Oct 2005 11:23:18 +0000 (GMT) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (newtrinity.zeist.de [217.24.217.8]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3564E43D45 for ; Fri, 7 Oct 2005 11:23:18 +0000 (GMT) (envelope-from marius@newtrinity.zeist.de) Received: from newtrinity.zeist.de (localhost [127.0.0.1]) by newtrinity.zeist.de (8.12.11/8.12.11/ZEIST.DE) with ESMTP id j97BN7il066313; Fri, 7 Oct 2005 13:23:11 +0200 (CEST) (envelope-from marius@newtrinity.zeist.de) Received: (from marius@localhost) by newtrinity.zeist.de (8.12.11/8.12.10/Submit) id j97BN21J066312; Fri, 7 Oct 2005 13:23:02 +0200 (CEST) (envelope-from marius) Date: Fri, 7 Oct 2005 13:23:02 +0200 From: Marius Strobl To: Bruce Cran Message-ID: <20051007132302.A64649@newtrinity.zeist.de> References: <20051006065505.GA44238@photon.meadownet> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20051006065505.GA44238@photon.meadownet>; from bruce@cran.org.uk on Thu, Oct 06, 2005 at 07:55:05AM +0100 X-AntiVirus-modified: yes X-AntiVirus: checked by AntiVir Milter (version: 1.1.1-9; AVE: 6.32.0.6; VDF: 6.32.0.66; host: newtrinity.zeist.de) Cc: freebsd-sparc64@freebsd.org Subject: Re: 6.0-BETA4: pci/vfs panic X-BeenThere: freebsd-sparc64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the Sparc List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Oct 2005 11:23:18 -0000 On Thu, Oct 06, 2005 at 07:55:05AM +0100, Bruce Cran wrote: > I was trying to get a U10 configured to use wireless, but got the > following panic after I inserted an 11b card into the PCI-PCMCIA > adapter; the card first fails to attach, then any filesystem > access triggers the panic: > > panic() at panic+0xf0 > trap() at trap+0x3f0 > -- fast data access mmu miss tar=0xc097e000 %o7=0xc01199f4 -- > witness_init() at witness_init+0x114 > mtx_init() at mtx_init+0xf4 > getnewvnode() at getnewvnode+0x110 > ffs_vget() at ffs_vget+0xc8 > ufs_lookup() at ufs_lookup+0xa14 > VOP_CACHEDLOOKUP_APV() at VOP_CACHEDLOOKUP_APV+0xb4 > vfs_cache_lookup() at vfs_cache_lookup+0xd8 > VOP_LOOKUP_APV() at VOP_LOOKUP_APV+0xc0 > lookup() at lookup+0x55c > namei() at namei+0x41c > kern_stat() at kern_stat+0x24 > stat() at stat+0x14 > syscall() at syscall+0x2dc > -- syscall (188, FreeBSD ELF64, stat) %o7=0x108628 -- > userland() at 0x40631ae8 > user trace: trap %o7=0x108628 > pc 0x40631ae8, sp 0x7fdffffdf01 > --More-- pc 0x106b20, sp 0x7fdffffe041 > pc 0x105fe4, sp 0x7fdffffe201 > pc 0x1107f8, sp 0x7fdffffe341 > pc 0x110a00, sp 0x7fdffffe421 > pc 0x102354, sp 0x7fdffffe541 > pc 0x40227474, sp 0x7fdffffe601 > > Before the panic, the wireless card fails to attach, with: > > > wi0: at port 0x100-0x13f irq 2000 function 0 > config 1 on pccard0 > wi0: record read mismatch, rid=fc01, got=1fc > wi0: record read mismatch, rid=fc01, got=1fc > wi0: mac read failed 5 > device_attach: wi0 attach returned 5 > > The full serial console log can be found at > http://www.cran.org.uk/bruce/crash/20051009_6beta4_wi.txt and a core > dump > at http://www.cran.org.uk/bruce/crash/20051009_6beta4_vmcore.0.gz. > > Do wireless cards work on sparc64, or are they generally only supported > on x86? > Well, you're probably the first person to give it a try so far. As for wi(4) you're hitting an endianness issue. At a first glance wi(4) is overzealous at converting from little-endian to the host byte order and vice versa when accessing the hardware as PCI and PC Card busses behind PCI-PC Card bridges should always be little- endian. E.g. the PCI bus on sparc64 is connected byte-twisted so most of the time one doesn't need to take big-endianness of sparc64 into account when accessing PCI space. The PC Card bus behind the Sun SBus-PC Card bridges actually is big-endian however and wi(4) probably would need to do the byte order conversion there. So in order to get wi(4) to work on sparc64 one probably would have to add a byte order flag to pccard(4) and revisit the byte order conversions in wi(4), changing most of them to be not done unless on a big-endian PC Card bus... Generally it should be possible to make all drivers for wireless cards work on sparc64. I'd expect e.g. ath(4) to not require such big changes in order to make it work on sparc64, the main problem here is that at least FreeBSD doesn't include a binary blob of the HAL for sparc64 however. As for the panic I have no idea (your dump also is not fetchable). wi(4) does leak some stuff when attaching fails but it's not apparent to me why that would trigger a panic. IIRC there was a recent report that wi(4) also triggers a strange panic when attaching fails on i386 and someone working on it, maybe that's related. Marius -- This mail was scanned by AntiVir Milter. This product is licensed for non-commercial use. See www.antivir.de for details.