From owner-freebsd-hackers@FreeBSD.ORG Mon Oct 5 13:48:28 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 292D9106566B for ; Mon, 5 Oct 2009 13:48:28 +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 DA9018FC18 for ; Mon, 5 Oct 2009 13:48:27 +0000 (UTC) Received: from localhost (localhost.localdomain [127.0.0.1]) by tomjudge.vm.bytemark.co.uk (Postfix) with ESMTP id 59C1948997; Mon, 5 Oct 2009 14:48:26 +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 g48Qk9v192rr; Mon, 5 Oct 2009 14:48:23 +0100 (BST) Received: from rita.nodomain (unknown [192.168.205.6]) by tomjudge.vm.bytemark.co.uk (Postfix) with ESMTP id C346E48698; Mon, 5 Oct 2009 14:48:22 +0100 (BST) Message-ID: <4AC9F906.3040306@tomjudge.com> Date: Mon, 05 Oct 2009 13:47:50 +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> <4AC16B5A.8090407@tomjudge.com> <20090929093825.GA26424@ci0.org> <4AC21F44.6060004@tomjudge.com> <20091004223433.GA73189@ci0.org> In-Reply-To: <20091004223433.GA73189@ci0.org> Content-Type: multipart/mixed; boundary="------------050000070909080403010604" 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: Mon, 05 Oct 2009 13:48:28 -0000 This is a multi-part message in MIME format. --------------050000070909080403010604 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Olivier Houchard wrote: >> Hi Olivier, >> >> I have tried the patch and here are the boot results: >> >> >> > > I fail to see how it happens. > Could you printf the value of sc->sc_mem once set in i80321_pci_attach(), > and if it appears to be 0, the value of i80321_softc->sc_owin[0].owin_xlate_lo > at the different points it can be set ? > > Thanks a lot, > > Olivier > Hi Olivier, I have been working though this with Mark Tinguely and we came up with this patch that makes it work. Not sure on its correctness but it works. Tom --------------050000070909080403010604 Content-Type: text/plain; name="pci-1.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="pci-1.patch" Index: i80321_pci.c =================================================================== --- i80321_pci.c (revision 197735) +++ i80321_pci.c (working copy) @@ -92,8 +92,7 @@ sc->sc_busno = busno; sc->sc_pciio = &i80321_softc->sc_pci_iot; sc->sc_pcimem = &i80321_softc->sc_pci_memt; - sc->sc_mem = i80321_softc->sc_owin[0].owin_xlate_lo + - VERDE_OUT_XLATE_MEM_WIN_SIZE; + sc->sc_mem = i80321_softc->sc_owin[0].owin_xlate_lo; sc->sc_io = i80321_softc->sc_iow_vaddr; /* Initialize memory and i/o rmans. */ @@ -110,7 +109,8 @@ sc->sc_mem_rman.rm_descr = "I80321 PCI Memory"; if (rman_init(&sc->sc_mem_rman) != 0 || rman_manage_region(&sc->sc_mem_rman, - 0, VERDE_OUT_XLATE_MEM_WIN_SIZE) != 0) { + VERDE_OUT_XLATE_MEM_WIN0_BASE, + VERDE_OUT_XLATE_MEM_WIN0_BASE + VERDE_OUT_XLATE_MEM_WIN_SIZE) != 0) { panic("i80321_pci_probe: failed to set up memory rman"); } sc->sc_irq_rman.rm_type = RMAN_ARRAY; @@ -297,6 +297,9 @@ sc->sc_mem; start &= (0x1000000 - 1); end &= (0x1000000 - 1); + start += 0x80000000; + end += 0x80000000; + device_printf(child, "SYS_RES_MEMORY: start: 0x%08lX end: 0x%08lX\n",start,end); break; case SYS_RES_IOPORT: rm = &sc->sc_io_rman; @@ -312,12 +315,15 @@ } rv = rman_reserve_resource(rm, start, end, count, flags, child); + device_printf(child, "RMAN_RESERVE_RESOURCE: start: 0x%08lX end: 0x%08lX\n", + rman_get_start(rv), + rman_get_end(rv)); if (rv == NULL) return (NULL); rman_set_rid(rv, *rid); if (type != SYS_RES_IRQ) { if (type == SYS_RES_MEMORY) - bh += (rman_get_start(rv)); + bh = (rman_get_start(rv)); rman_set_bustag(rv, bt); rman_set_bushandle(rv, bh); if (flags & RF_ACTIVE) { --------------050000070909080403010604--