On 13/10/2007, Steinke, Dave <[EMAIL PROTECTED]> wrote:
>
> I need to program the source / destination address registers in the
> bridge's DMA controller so the DMAC can access my kernel buffer.
>
> I do the following:
> - ddi_dma_alloc_handle()
> - ddi_dma_mem_alloc() to allocate my kernel buffer
> - ddi_dma_addr_bind_handle() to bind my buffer to my dma handle and get
> a dma_cookie
>
> I understand the ddi_dma_cookie_t contains an address, accessible via
> the macros dmac_laddress() (for 64 bit DMACs) and dmac_address() (for 32
> bit DMACs)
> According to the man pages for ddi_dma_cookie_t(9S):
> "dmac_laddress specifies a 64-bit I/O address appropriate for
> programming the device's DMA engine"
>
> My Question is:
> If my DMAC is on the PCIx bus, do I need to perform any sort of mapping
> upon the cookie's address to make my kernel memory accessible to this
> PCI device?
>

No. That's the point of the ddi_dma_addr_bind_handle() call. It uses
information provided by the nexus driver hierarchy (PCIx and any other
bridges in the way) to provide a translated address for your DMAC.

  Paul

-- 
Paul Durrant
http://www.linkedin.com/in/pdurrant
_______________________________________________
driver-discuss mailing list
driver-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to