From owner-freebsd-hackers Tue Oct 24 0:54:32 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp05.primenet.com (smtp05.primenet.com [206.165.6.135]) by hub.freebsd.org (Postfix) with ESMTP id EB3A037B479 for ; Tue, 24 Oct 2000 00:54:29 -0700 (PDT) Received: (from daemon@localhost) by smtp05.primenet.com (8.9.3/8.9.3) id AAA23504; Tue, 24 Oct 2000 00:54:52 -0700 (MST) Received: from usr01.primenet.com(206.165.6.201) via SMTP by smtp05.primenet.com, id smtpdAAAOIaG4T; Tue Oct 24 00:54:47 2000 Received: (from tlambert@localhost) by usr01.primenet.com (8.8.5/8.8.5) id AAA11489; Tue, 24 Oct 2000 00:54:18 -0700 (MST) From: Terry Lambert Message-Id: <200010240754.AAA11489@usr01.primenet.com> Subject: Re: Cache Questions To: charrer@alacritech.com (Christopher Harrer) Date: Tue, 24 Oct 2000 07:54:18 +0000 (GMT) Cc: freebsd-hackers@FreeBSD.ORG (Freebsd-Hackers) In-Reply-To: from "Christopher Harrer" at Oct 23, 2000 08:33:04 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > 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