Subject: Re: ISA bounce buffer/DMA interface
To: Chris G Demetriou <Chris_G_Demetriou@BALVENIE.PDL.CS.CMU.EDU>
From: Juergen Hannken-Illjes <>
List: tech-kern
Date: 09/16/1995 16:06:16
> > > 	(1) the interface was _NOT_ meant to do sub-page-size
> > > 	    scatter-gather DMA; as far as i can tell, that's not
> > > 	    possible on any ISA implementation i've seen.  (though
> > > 	    the Alpha, for instance, _does_ allow one to do
> > > 	    scatter-gather DMA with 8k (system page size) granularity.
> > And here it comes. I did the implementation for an Adaptec 1542C (aha1542.c).
> > Like many other BUSMASTER DMA controllers this device would be able to do
> > byte-size scatter-gather DMA. The main reason for the 'sizes' is a more
> > general interface and simpler usage because there is no need to collect
> > the 'mappings' returned from 'isadma_map' into individual segments for
> > scatter-gather DMA.
> > Throughout the whole kernel scatter-gather is done on (addr,size) pairs.
> collecting the mappings is not difficult; it's just a matter of where
> you do it.
> if you want to supply address/size pairs, to allow mapping of multiple
> VAs at once, then either:

Oops, we are not talking about the same things.

I want idma_* to map ONE virtual address/size to its physical representation.
Since contigous virtual space is likely not contigous in physical address
space the RESULT is a set of PHYSICAL (address/size) segments.
I want the result of isadma_map to be an array of address/size pairs.

For example the buffer from 0x1000 to 0x3FFF in virtual space might be returned
as physical space (0x7000 to 0x8FFF) and (0xA000 to 0xAFFF). Your spec
would represent this as 'mappings= 0x7000,0x8000,0xA000' where I want to
return (0x7000,0x2000), (0xA000,0x1000).

I just want to replace the 'vm_offset_t *mappings' by:

struct isadma_seg{
  vm_offset_t addr;
  vm_size_t size;
} *
Juergen Hannken-Illjes - - TU Braunschweig (W Germany)