Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Oct 2000 07:54:18 +0000 (GMT)
From:      Terry Lambert <tlambert@primenet.com>
To:        charrer@alacritech.com (Christopher Harrer)
Cc:        freebsd-hackers@FreeBSD.ORG (Freebsd-Hackers)
Subject:   Re: Cache Questions
Message-ID:  <200010240754.AAA11489@usr01.primenet.com>
In-Reply-To: <POELKPJGDHAPIPMEMHGAGEHOCIAA.charrer@alacritech.com> from "Christopher Harrer" at Oct 23, 2000 08:33:04 AM

next in thread | previous in thread | raw e-mail | index | archive | help
> We're working on a driver for a PCI card, we're currently running into a
> problem that's symptomatic of a cache coherency problem.  We have a area of
> memory that we manipulate and pass a physical address to our card.  In other
> OS's (Linux, NT), before we manipulate this memory area, we mark the area as
> non-cachable.  Are there similar operations/system calls we can use in
> FreeBSD?  Are there any FAQ's, Docs or man-pages that explain memory
> usage/attributes?

FreeBSD has a unified VM and buffer cache, so you should not
really be having cache coherency issues.

This sounds like the DMA from the card is getting bad data
transferred into the card memory from the host memory, since
the data is in the chip cache, and hasn't been written to main
memory yet?  I think this is the only possible failure mode.

This indicates to me that your cache is not properly configured
for write-through, or that you are using an older chipset, with
more than two PCI devices.

You could always mark it non-cacheable, of course: there are
primitives to support this (see other postings in this thread),
but I would really be surprised about you needing to do this.

Another alternative might be that your card is eating the
high bits (i.e. it can only see a region of low memory), or
that you are doing unaligned transfers (many cards hate them),
so there might be other avenues you should explore (I know
that there are a number of video boards, for example, which can
only access low memory correctly).


					Terry Lambert
					terry@lambert.org
---
Any opinions in this posting are my own and not those of my present
or previous employers.


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




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