Subject: Re: DMA beyond end of isa
To: Jeremy C. McDermond <mcdermj@xenotropic.com>
From: None <Chris_G_Demetriou@NIAGARA.NECTAR.CS.CMU.EDU>
List: port-i386
Date: 01/02/1996 11:53:10
I deleted this thread, by subject, because i thought the thing was a
waste of my time.  I just noticed:

Jeremy McDermond _DIDN'T_ say (somebody else did)::
>How likely is it that the code for bounce buffers will ever be needed
>in the alpha port?  Has DEC actually been shipping this machine with outdated
>disk controllers that can only address 16-bits of memory?

Uh, something like bounce buffers is needed for _ALL_ ISA DMA
operations, on the Alpha.

System memory maps starting at 1G in the share EISA/PCI address space,
and doesn't appear "for real" at all for ISA devices.  the only way to
access system memory via DMA from an ISA device is to set up
scatter-gather DMA (with the scatter-gather DMA hardware).

So, you may never need bounce buffers (well, except to catch some
corner cases).  However, you _always_ need an interface similar to
that needed to support bounce buffers!  Also, there's no easy-out:
	(1) _every_ device which uses ISA DMA on the alpha _HAS_ to
		use a "bounce-buffer-like" to map/remap DMA regions,
		and
	(2) _every_ "bounce buffer mapping" will result in a resource
		allocation, and _must_ be accompanied by a "unmap."

Some (most, i'd say) of the current ISA drivers that use DMA just can't
deal with this sanely.  they just aren't structured well enough to deal
with it, and don't keep around enough information about the memory they
use to unmap allocations.

There's also the problem that all of the ISA/EISA/PCI code uses
'vtophys' to get bus physical addresses from system RAM physical
addresses.  This works on the i386, but doesn't work on the Alpha
(and may not work on other systems with ISA busses -- i don't know).
This applies to EISA and PCI drivers.  To be Alpha-friendly, _ALL_
ISA/EISA/PCI drivers need to use bus-specific mapping functions to
map from system memory to bus addresses.  (The functions _need_ to be
bus-specific, since there can be multiple PRIMARY pci busses -- and
therefore possibly multiple ISA busses, etc. --  on some of the
higher-end alpha systems.)

You also need a _lot_ of other changes to the ISA code, but that's a
completely different story.


chris