Subject: Re: hardware caches and DMA
To: Bakul Shah <>
From: Tobias Weingartner <weingart@austin.BrandonU.CA>
List: current-users
Date: 04/17/1995 09:35:06
In message <>, Bakul Shah writes:
> I haven't looked at NetBSD DMA code but one simple thing to
> do is to use, for example, CACHE_FLUSH(addr,len) and
> CACHE_INVALIDATE(addr,len) macros at appropriate points
> around where DMA is set up or done.  These macros then get
> expanded (possibly into just white space) in a
> processor/cache arch. specific way.

I believe that most (if not all) ix86 motherboards do not have a write-back
second level cache, but a write-through one.  However, I also seem to have
trouble with the external cache getting corrupted.  I have to disable it
from the BIOS menu for NetBSD to work.  Does anyone have code to flush and
invalidate lines in the external cache?  If so, could you send me a copy.

There has got to be a better way than to turn of the darn cache... ;-)

| Tobias Weingartner | Email: weingart@BrandonU.Ca | Need a Unix sys-admin?  |
| Box 27, Beulah, MB |-----------------------------| Send E-Mail for resume, |
| R0M 0B0, Canada    | Unix Guru, Admin, Sys-Prgmr | and other details...    |
|      %SYSTEM-F-ANARCHISM, The operating system has been overthrown         |