WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Xen

xen-devel

[Top] [All Lists]

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

To: Haw-Yuan Yang <hawyuan@xxxxxxxxx>, Keir Fraser <keir@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] Physical address mapping to user space in dom0 problem
From: Keir Fraser <keir@xxxxxxxxxxxxx>
Date: 2007年3月17日 07:57:03 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: 2007年3月17日 00:55:22 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <63c711180703161736v49c25721kb06c648f316fb292@xxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
Thread-index: AcdoadlOF8XmrNRdEduUmgAWy6hiGQ==
Thread-topic: [Xen-devel] Physical address mapping to user space in dom0 problem
User-agent: Microsoft-Entourage/11.3.3.061214
You want to mmap() the dma_handle, not the CPU pointer.

-- Keir

On 17/3/07 00:36, "Haw-Yuan Yang" <hawyuan@xxxxxxxxx> wrote:

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.

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
<Prev in Thread] Current Thread [Next in Thread>
Previous by Date: Re: [Xen-devel] upgrading Xen3.0.4-1 to Xen-unstable ... , Parissa Heidari
Next by Date: Re: [Xen-devel] upgrading Xen3.0.4-1 to Xen-unstable ... , Keir Fraser
Previous by Thread: Re: [Xen-devel] Physical address mapping to user space in dom0 problem , Haw-Yuan Yang
Next by Thread: Re: [Xen-devel] Physical address mapping to user space in dom0 problem , Haw-Yuan Yang
Indexes: [Date] [Thread] [Top] [All Lists]

Copyright ©, Citrix Systems Inc. All rights reserved. Legal and Privacy
Citrix This site is hosted by Citrix

AltStyle によって変換されたページ (->オリジナル) /