Non-cacheable memory

Tom Roberts tjroberts at
Wed Aug 8 01:59:07 EST 2001

"Justin (Gus) Hurwitz" wrote:
> Does the current 2_4_devel tree have support for allocating regions of
> non-cachable memory? And, if so, what is the proper (or preferred) way of
> doing this?

What I did in 2.2.15 was to edit the main startup routine to call my driver
directly so it could "eat up" a region of memory before Linux started its
memory management. I then used a BAT to reference it uncached. Yes, this
is ugly, and requires care in making sure the BAT effective address is
otherwise unused by the kernel, but it works. This is on a MPC7400, and
other PowerPC CPUs might not have BATs available....

Note also that my driver uses unchached accesses only for buffer pointers.
For the buffer data I used cached references, with cache-flushes
appropriately sprinkled throughout the code -- the MAJOR bandwidth gain
was important.

Note that if your hardware does bus snooping, you might not need uncached
memory references or explicit flushes to read DMA data. But embedded and
non-SMP systems are unlikely to do it.

Tom Roberts	tjroberts at

** Sent via the linuxppc-embedded mail list. See

More information about the Linuxppc-embedded mailing list