From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 29 02:05:59 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4EB0B106566C for ; Tue, 29 Sep 2009 02:05:59 +0000 (UTC) (envelope-from tom@tomjudge.com) Received: from tomjudge.vm.bytemark.co.uk (tomjudge.vm.bytemark.co.uk [80.68.91.100]) by mx1.freebsd.org (Postfix) with ESMTP id 1285B8FC0A for ; Tue, 29 Sep 2009 02:05:58 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by tomjudge.vm.bytemark.co.uk (Postfix) with ESMTP id 1636FDCF89; Tue, 29 Sep 2009 03:05:58 +0100 (BST) X-Virus-Scanned: Debian amavisd-new at tomjudge.vm.bytemark.co.uk Received: from tomjudge.vm.bytemark.co.uk ([127.0.0.1]) by localhost (tomjudge.vm.bytemark.co.uk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id kmcU1gI1XhTC; Tue, 29 Sep 2009 03:05:48 +0100 (BST) Received: from rita.nodomain (unknown [192.168.205.6]) by tomjudge.vm.bytemark.co.uk (Postfix) with ESMTP id 4258548992; Tue, 29 Sep 2009 03:05:39 +0100 (BST) Message-ID: <4AC16B5A.8090407@tomjudge.com> Date: Tue, 29 Sep 2009 02:05:14 +0000 From: Tom Judge User-Agent: Thunderbird 2.0.0.23 (X11/20090822) MIME-Version: 1.0 To: Olivier Houchard References: <4AC106AA.9000305@tomjudge.com> <20090928202132.GA15236@ci0.org> In-Reply-To: <20090928202132.GA15236@ci0.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org Subject: Re: Help debugging: Fatal kernel mode data abort: 'External Linefetch Abort (P)' X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Sep 2009 02:05:59 -0000 Olivier Houchard wrote: > On Mon, Sep 28, 2009 at 06:55:38PM +0000, Tom Judge wrote: > >> Hi, >> >> I am working on getting FreeBSD to boot on a new ARM based board, and am >> hitting this issue any time I load a driver for the PCI based devices on >> the board. >> >> My current code can be found here: >> >> http://www.tomjudge.com/tmp/em7210.patch >> >> > > Hi Tom, > > My guess is, you should include std.i80219 instead of std.i80321 in std.em7210. > If you do not, CPU_XSCALE_80219 won't be defined, and the 80321 code to > check if the board is host or not will be used, and will wrongly assume > it is not, and thus won't map the PCI mem correctly. > > Hi Olivier, I have switched out the std file and am now using std.i80219 but am still having issues. I think the problems are the pci memory mappings in the controller devices. On linux em0 gets mapped as follows: cd 0000\:00\:01.0/ # ls class device local_cpus subsystem_device config driver resource subsystem_vendor detach_state irq rom vendor # cat resource 0x0000000080000000 0x000000008001ffff 0x0000000000000200 0x0000000080020000 0x000000008003ffff 0x0000000000000200 0x00000000fe000000 0x00000000fe00003f 0x0000000000000101 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000080040000 0x000000008005ffff 0x0000000000007200 # Where as on FreeBSD I am seeing this: em0: port 0xfe400000-0xfe40003f mem 0-0x1ffff,0x20000-0x3ffff irq 29 at device 1.0 on pci0 Seems that I am missing the 0x800 off the front of the PCI memory mappings. I have confirmed this with the ata driver also and see the same issues. Where should I be looking to fix this? Thanks Tom