From owner-freebsd-ppc@FreeBSD.ORG Mon Mar 2 02:48:51 2009 Return-Path: Delivered-To: freebsd-ppc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1133610656C7 for ; Mon, 2 Mar 2009 02:48:51 +0000 (UTC) (envelope-from jrh29@alumni.cwru.edu) Received: from beta.eecs.cwru.edu (beta.EECS.CWRU.Edu [129.22.150.110]) by mx1.freebsd.org (Postfix) with ESMTP id DC86F8FC0C for ; Mon, 2 Mar 2009 02:48:50 +0000 (UTC) (envelope-from jrh29@alumni.cwru.edu) Received: from narn.knownspace ([::ffff:69.250.50.210]) (AUTH: PLAIN jrh29, TLS: TLSv1/SSLv3,168bits,DES-CBC3-SHA) by beta.eecs.cwru.edu with esmtp; Sun, 01 Mar 2009 21:48:46 -0500 id 0000B30C.49AB490E.00003109 Date: Sun, 1 Mar 2009 21:49:19 -0500 From: Justin Hibbits To: freebsd-ppc@freebsd.org Message-ID: <20090302024918.GA1060@narn.knownspace> References: <20081023040422.EKQ11018@dommail.onthenet.com.au> <20081025024544.GA22527@narn.knownspace> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Disposition: inline In-Reply-To: <20081025024544.GA22527@narn.knownspace> User-Agent: Mutt/1.5.19 (2009-01-05) Subject: Re: graphics on G4 X-BeenThere: freebsd-ppc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the PowerPC List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Mar 2009 02:48:58 -0000 On Fri, Oct 24, 2008 at 10:45:44PM -0400, Justin Hibbits wrote: > On Thu, Oct 23, 2008 at 04:04:22AM +1000, Peter Grehan wrote: > > Hi Nathan, > > > > >One thing that worries me about our PMAP layer could cause > > >this. This machine has a lot of RAM. What happens if we have > > >physical or device memory in the same range as kmem VAs? > > >It seems like trying to modify it through the BAT map (as > > >zero/copy page, /dev/mem and friends do) will overwrite > > >random bits of KVA instead... > > > > Apple h/w seems to use 0-2G for RAM, and 2G and up for MMIO. > > G5's can then use > 4G for additional RAM. I've not seen a > > system that has a conflict with the 2 seg's used for KVA, but > > I wouldn't say it's not possible. > > > > Justin - can you drop into OFW, do a 'dev screen' and > > '.properties', and list the 'address' property ? > > > > later, > > > > Peter. > > The address property is a0008000, from ofw. This seems like a rather odd > address, being 8 pages inside the 2.5GB memory space. > > - Justin In an effort to diagnose this problem, is there a way to display the current memory map (BAT and segment registers)? According to ofw_syscons.c the video memory is BAT-mapped. This is a 256MB card, and the starting address for video memory is at 0xa0008000, so it concerns me that it might be sharing implicitly a block of memory with the kernel, specifically data related to process management, since it only crashes when: (a) I'm in X, or (b) I write graphics to the end of the display (maybe it's the last 32k in 32-bit mode, since it's an offset of 32k into the region before it starts) *and* (c) when I spawn a process some random time afterwards. I did try Peter's suggestion to write 0xdeadbeef or 0xdeadc0de, but it still just hanged, and did not panic. So now, I want to print out the memory map, as maybe that could shed some light on things. - Justin