Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 16 May 1998 09:23:52 +1000
From:      David Dawes <dawes@rf900.physics.usyd.edu.au>
To:        dyson@FreeBSD.ORG
Cc:        sos@FreeBSD.ORG, current@FreeBSD.ORG
Subject:   Re: People having problems with X windows?
Message-ID:  <19980516092352.17035@rf900.physics.usyd.edu.au>
In-Reply-To: <199805152027.PAA03022@dyson.iquest.net>; from John S. Dyson on Fri, May 15, 1998 at 03:27:52PM -0500
References:  <19980515224353.26233@rf900.physics.usyd.edu.au> <199805152027.PAA03022@dyson.iquest.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, May 15, 1998 at 03:27:52PM -0500, John S. Dyson wrote:
>David Dawes said:
>> 
>> What were you using to determine when to enable WC?
>> 
>I was using the MEMORY (and MEMORYP) map flag in the pci config.
>I mistakenly added a heuristic that on a video adaptor that didn't
>have any prefechable regions that the one memory region that wasn't
>really was.  (I have an S3 adaptor that didn't sense the memory properly
>and it specified that none of the memory was prefetchable, so I
>added the heuristic.)

The S3 chips have a single memory window allocated in the PCI config.
For the older chips (pre-[89]68 and pre-TrioV*) that is used solely for
framebuffer access (and MMIO is done through the standard VGA 0xA0000
area).  With the 964 card I have it doesn't appear to be marked
prefetchable, but it would be safe to turn on WC for that.  With the
newer cards there is a single 64MB window.  The low 32MB is for
little-endian access and the high 32MB is for big-endian access.  Of
those areas, the low 16MB is for the framebuffer and the high 16MB is
for MMIO.  The whole lot would be marked as non-prefetchable, but the
lower 16MB can have WC enabled and the higher 16MB can't.

Mach64 cards have a single window too, with the framebuffer located at
the start and the registers at the top of the 16MB window.  I'm not sure
if the newer ones offer an alternative to that or not, but the XFree86
Mach64 server uses that approach.  Older versions mapped a single 16MB
chunk, but current versions map it in two pieces.

I'm sure that there are other quirky approaches taken with other video
chips too.

>Of course, what I did was wrong.  A simple check for prefechable
>regions only would have likely worked, but I wanted something better :-(.
>
>Do you have any "neat tricks" to work around errant info given by
>display adaptors (like the Motion 771???)  (It specifies no prefechable
>regions.)

The 771 uses the 968, and falls into the second category.  To be safe,
memory not marked as prefetchable can only have WC enabled with both
knowledge of the hardware and knowledge of how the application is using
the memory.  Having a way of letting the X server indicate this is
probably the best solution.

David

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message



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