Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 1 Mar 2009 21:49:19 -0500
From:      Justin Hibbits <jrh29@alumni.cwru.edu>
To:        freebsd-ppc@freebsd.org
Subject:   Re: graphics on G4
Message-ID:  <20090302024918.GA1060@narn.knownspace>
In-Reply-To: <20081025024544.GA22527@narn.knownspace>
References:  <20081023040422.EKQ11018@dommail.onthenet.com.au> <20081025024544.GA22527@narn.knownspace>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090302024918.GA1060>