Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Jul 1999 08:07:53 -0600
From:      "Justin T. Gibbs" <gibbs@caspian.plutotech.com>
To:        Wilko Bulte <wilko@yedi.iaf.nl>
Cc:        gibbs@plutotech.com (Justin T. Gibbs), hackers@FreeBSD.ORG
Subject:   Re: any docs on how to use bus_dma_tag_create e.a. ? 
Message-ID:  <199907221407.IAA01489@caspian.plutotech.com>
In-Reply-To: Your message of "Wed, 21 Jul 1999 21:22:34 %2B0200." <199907211922.VAA04796@yedi.iaf.nl> 

next in thread | previous in thread | raw e-mail | index | archive | help
>> >                                   /*lowaddr*/BUS_SPACE_MAXADDR_32BIT,
>> >                                   /*highaddr*/BUS_SPACE_MAXADDR,
>> 
>> low and high address of the region that the DMA engine cannot access.
>
>Meaning e.g. the 16Mbyte barrier that ISA DMA has? 
>For PCI this would be a 4Gb range(?).

The range could be much larger than 4GB.  Remember this is a range the
device *cannot* access, not a range it can access.  So, the beginning
of the range for an ISA device would be BUS_SPACE_MAXADDR_24BIT and the
hight address would be BUS_SPACE_MAXADDR.  Depending on the platform
or configuration of the machine, the high address could be larger than
a 32bit quantity.

>> >                                   /*maxsize*/MAXBSIZE,
>> 
>> Maximum DMA transfer size.
>> 
>> >				   /*nsegments*/AHC_NSEG,
>> 
>> Maximum number of discontinuities in the mapped region.
>
>Eh.. ? 
>
>> >                                   /*maxsegsz*/AHC_MAXTRANSFER_SIZE,
>> 
>> Maximum size of a segment.  maxsize <= nsegments * maxsegsz.
>
>Eh.. ?

Many DMA engines have S/G capability and so can perform a single DMA that
spans multiple segments of "bus space contiguous" data.  By setting these
parameters, the bus_dmamap_load function can determine how best to map
your transfer into bus space and will return to you an array of segments
to program into your DMA hardware.

>> You should use the new API if possible.
>
>That is what I'm planning to do. The amount of sample code in the various
>drivers is rather limited as most drivers use the old code.

It seems that its mostly confined to the SCSI code, but hopefully that will
change over time.

>So I hope you don't mind me asking some more questions,

Not a problem.

--
Justin



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199907221407.IAA01489>