From owner-freebsd-mips@FreeBSD.ORG Tue May 12 08:54:48 2009 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5B1121065670 for ; Tue, 12 May 2009 08:54:48 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id C68B88FC18 for ; Tue, 12 May 2009 08:54:47 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from gw ([192.168.10.10] helo=terran.mk.farlep.net) by dlink.ua with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1M3nW8-0006vs-Mu; Tue, 12 May 2009 11:39:16 +0300 Date: Tue, 12 May 2009 11:54:13 +0300 From: Alexandr Rybalko To: Oleksandr Tymoshenko Message-Id: <20090512115413.a9a94d87.ray@dlink.ua> In-Reply-To: <4A032821.1040800@freebsd.org> References: <20090506141208.9ea79d6a.ray@dlink.ua> <4A032821.1040800@freebsd.org> Organization: D-Link X-Mailer: Sylpheed 2.6.0 (GTK+ 2.14.7; i386-portbld-freebsd7.1) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: freebsd-mips@freebsd.org Subject: Re: BCM5354 D-Link DIR-320 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 12 May 2009 08:54:48 -0000 On Thu, 07 May 2009 11:27:45 -0700 Oleksandr Tymoshenko wrote: >> Alexandr Rybalko wrote: >> > Good day to all! >> > >> > bfe driver ported as client of siba bus, it`s worked, but work not done. >> > To dirty code :) >> > >> > Question to FreeBSD MIPS guru: >> > Maybe problem in me low experience in FreeBSD internals, but I thing bus_dmamem_alloc and bus_dmamem_load >> > ignore "alignment" attribute passed to bus_dma_tag_create. >> Yes, looks like it. I just skimmed the code and will confirm/test >> it a bit later. >> >> > >> > BFE need DMA descriptors page to be aligned to 4096, but I done this alignment only with set descriptors count from 128 to >> > 512 >> >> > >> > Next question, how I can start init (without "write fault at 0x2003821"), if someone know >> > start_init: trying /sbin/init >> > trap type 3 (TLB miss (store) - kernel mode) >> > badaddr = 0x7fffefff, pc = 0x80243400, ra = 0x800bdc2c, sp = 0xc0659e00, sr = 0xff03, pid = 1, ASID = 0x2 >> > trap type 3 (TLB miss (store) - kernel mode) >> > badaddr = 0xc36f4000, pc = 0x80243060, ra = 0x80243208, sp = 0xc0659d60, sr = 0xff03, pid = 1, ASID = 0x2 >> > trap type 3 (TLB miss (store) - kernel mode) >> > badaddr = 0xc36b4000, pc = 0x80243060, ra = 0x80243208, sp = 0xc0659d60, sr = 0xff03, pid = 1, ASID = 0x2 >> > trap type 3 (TLB miss (store) - kernel mode) >> > badaddr = 0x10004000, pc = 0x802435c8, ra = 0x802432cc, sp = 0xc0659b28, sr = 0xff03, pid = 1, ASID = 0x2 >> > trap type 3 (TLB miss (store) - kernel mode) >> > badaddr = 0x7fffefe0, pc = 0x802435c8, ra = 0x802432cc, sp = 0xc0659bc8, sr = 0xff03, pid = 1, ASID = 0x2 >> > trap type 3 (TLB miss (store) - kernel mode) >> > badaddr = 0x7fffdfc4, pc = 0x802435c8, ra = 0x802432cc, sp = 0xc0659bc8, sr = 0xff03, pid = 1, ASID = 0x2 >> > trap type 25 (address error (store) - user mode) >> > badaddr = 0x2003821, pc = 0x4001b4, ra = 0, sp = 0x7fffded8, sr = 0x12, pid = 1, ASID = 0x2 >> .. skipped .. >> These faults should not happen. I think pmap internal data is messed >> in some way. So there is no simple answer, this problem requires more >> debugging >> Maybe it so, because I have wrong value in "gp" register? Every function start with: lui gp,0xfc1 But ldscript.mips, ldscript.mips.cfe say "_gp = ALIGN(16) + 0x7ff0;" badvaddr: 02003821 pc: 004001b4 Dumping 4 words starting at pc address 0x4001b8: ac510000 8c840004 1080000e 00000000 4001b0: 8f828aa4 lw v0,-30044(gp) 4001b4: 1a000011 blez s0,4001fc <__start+0x84> 4001b8: ac510000 sw s1,0(v0) 4001bc: 8c840004 lw a0,4(a0) 4001c0: 1080000e beqz a0,4001fc <__start+0x84> 4001c4: 00000000 nop -- Рыбалко Александр Консультант D-Link Украина