Steinke, Dave wrote:
> Thanks Paul,
> 
> You gave me the answer I was hoping for!
> 
> It would not have made any sense any other way.
> 
>  
> 
> Does the nexus information come from the ddi_dma_attr_t structure that I 
> pass to ddi_dma_alloc_handle()???

ddi_dma_attr_t tells the nexus driver the DMA attributes of your device,
such as alignment requirement, scatter gather length, granularity of
transfer, etc.

The system level mapping, such as the relation between the virtual
address and physical address, is determined by the nexus driver and the
architecture.

--Lucy
> 
>  
> 
> thanks
> 
>  
> 
> Dave Steinke
> 
> Senior Software Engineer
> 
> Curtiss Wright Controls Embedded Computing
> 
> 10201 Wateridge Circle, Suite 300
> 
> San Diego, CA 92121
> 
> (858) 452-0020 x4323
> 
> [EMAIL PROTECTED]
> 
>  
> 
>  
> 
>>  -----Original Message-----
> 
>>  From: Paul Durrant [mailto:[EMAIL PROTECTED]
> 
>>  Sent: Monday, October 15, 2007 12:53 AM
> 
>>  To: Steinke, Dave
> 
>>  Cc: driver-discuss@opensolaris.org
> 
>>  Subject: Re: [driver-discuss] DMA device address programming
> 
>>
> 
>>  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
> 
> 
> _______________________________________________________________________
> This e-mail and any files transmitted with it are proprietary and 
> intended solely for the use of the individual or entity to whom they are 
> addressed. If you have reason to believe that you have received this 
> e-mail in error, please notify the sender and destroy this email and any 
> attached files. Please note that any views or opinions presented in this 
> e-mail are solely those of the author and do not necessarily represent 
> those of the Curtiss-Wright Corporation or any of its subsidiaries. 
> Documents attached hereto may contain technology subject to government 
> export regulations. Recipient is solely responsible for ensuring that 
> any re-export, transfer or disclosure of this information is in 
> accordance with applicable government export regulations. The recipient 
> should check this e-mail and any attachments for the presence of 
> viruses. Curtiss-Wright Corporation and its subsidiaries accept no 
> liability for any damage caused by any virus transmitted by this e-mail.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> driver-discuss mailing list
> driver-discuss@opensolaris.org
> http://mail.opensolaris.org/mailman/listinfo/driver-discuss

_______________________________________________
driver-discuss mailing list
driver-discuss@opensolaris.org
http://mail.opensolaris.org/mailman/listinfo/driver-discuss

Reply via email to