[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] Physical address mapping to user space in dom0 problem


  • To: "Keir Fraser" <keir@xxxxxxxxxxxxx>
  • From: "Haw-Yuan Yang" <hawyuan@xxxxxxxxx>
  • Date: Fri, 16 Mar 2007 17:36:42 -0700
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Fri, 16 Mar 2007 17:35:43 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=Hj7PERiq6gm87sjSdZi0UtyW46iauXK8Ni2tnhlMD9hD3NDwesHB3bEb/Qs+wm5zAsBA2XOR7Nz54DT7bxdB+aBE3lB+JAJPV0NXJ0FXyEV4VOgdDuQCnwxxyICg2CMYPg92reB+DRfPnHr3xH7py/Upze70J2J8DvSWBlNHwRw=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

It still not working. Here is what I did:
 
In driver I have an IOCTL option IO_DMA_ALLOC to allocate the DMA buffer by using pci_alloc_consistent() and return the allocated physical address to user space.
 
In user space testing program:
 
1. Call IOCTL IO_DMA_ALLOC to allocate a 64Kbyte DMA buffer. The physical address of the allocated buffer is 0x03bb0000.
2. Open /dev/mem and call mmap(0,64*1024,PROT_READ|PROT_WRITE,MAP_SHARED,fd,0x03bb0000) ;  
 
the return of mmap is -1.
 
 
On 3/16/07, Keir Fraser <keir@xxxxxxxxxxxxx> wrote:



On 16/3/07 23:27, "Haw-Yuan Yang" < hawyuan@xxxxxxxxx> wrote:

Is there any alternative way to map the DMA address to user space in XEN dom0?

Mmap via /dev/mem will work. It uses direct_remap_pfn_range().

 -- Keir

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.