From owner-freebsd-hackers Tue Oct 24 1:56:51 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from smtp.alacritech.com (smtp.alacritech.com [209.10.208.82]) by hub.freebsd.org (Postfix) with ESMTP id 1DB2E37B479 for ; Tue, 24 Oct 2000 01:56:49 -0700 (PDT) Received: from [10.1.10.18] by smtp.alacritech.com (NTMail 4.30.0012/NY3553.00.2884f51f) with ESMTP id zdnjaaaa for ; Tue, 24 Oct 2000 01:54:31 -0700 From: "Christopher Harrer" To: "Terry Lambert" Cc: "Freebsd-Hackers" Subject: RE: Cache Questions Date: Tue, 24 Oct 2000 04:54:48 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <200010240754.AAA11489@usr01.primenet.com> X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Importance: Normal Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Terry, Thanks for the information, you're right in that we are not experiencing cache problems. It's a timing issue we haven't tracked down yet, but I'm sure we will. Thanks for the DMA pointers. Chris -----Original Message----- From: owner-freebsd-hackers@FreeBSD.ORG [mailto:owner-freebsd-hackers@FreeBSD.ORG]On Behalf Of Terry Lambert Sent: Tuesday, October 24, 2000 3:54 AM To: Christopher Harrer Cc: Freebsd-Hackers Subject: Re: Cache Questions > 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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message