On Tue, 2005-06-21 at 16:56 -0400, Vladimir Dergachev wrote: > > On Tue, 21 Jun 2005, Eric Anholt wrote: > > > On Tue, 2005-06-21 at 14:57 -0400, Vladimir Dergachev wrote: > >> /* Texture offset is dangerous and needs more checking */ > >> ADD_RANGE(R300_TX_OFFSET_0, 16); > >> > >> I don't think texture offsets are ever written to, however if they > >> point in the wrong place they can be used to read memory directly. > >> > >> ideally we would check these to be either with MC_FB_LOCATION > >> or MC_AGP_LOCATION ranges. Problem is what do we do on PCI cards ? > >> use AIC controller settings ? > > > > Just verify that the location is within expected areas of the card's > > virtual address space, like you do for color/depth offsets, right? > > Yes, the question is what these are for PCI cards. I guess AIC should have > a register similar to MC_AGP_LOCATION.
It looks like you use the same structure entries on both. The check for "is not in bad system memory" is: if (off >= dev_priv->fb_location && off < (dev_priv->gart_vm_start + dev_priv->gart_size)) return 0; This is assuming that you've got the layout the same as on old radeon DRM, with the gart immediately following the fb aperture. -- Eric Anholt [EMAIL PROTECTED] http://people.freebsd.org/~anholt/ [EMAIL PROTECTED] ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click -- _______________________________________________ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel