From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from vega.surpasshosting.com (vega.surpasshosting.com [72.29.83.9]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id DE993DDD0C for ; Tue, 4 Nov 2008 09:53:53 +1100 (EST) Message-ID: <490F80E1.1060909@embedded-sol.com> Date: Tue, 04 Nov 2008 00:53:21 +0200 From: Felix Radensky MIME-Version: 1.0 To: Ayman El-Khashab Subject: Re: Accessing PCI-E resources on 460EX References: <490F6882.6050101@embedded-sol.com> <16691A8B34B5D9458EA3A1C37A11555A0137F852@tanisys-ex2.Tanisys.Local> In-Reply-To: <16691A8B34B5D9458EA3A1C37A11555A0137F852@tanisys-ex2.Tanisys.Local> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Cc: linuxppc-embedded@ozlabs.org List-Id: Linux on Embedded PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Ayman El-Khashab wrote: > > What works for me is using the mmap64 as in the following example to > map the physical address, fd is the file descriptor for /dev/mem > > off64_t offset = static_cast(your physical address); > void * const p = > mmap64(0,256,PROT_WRITE|PROT_READ,MAP_SHARED,fd,offset); > > The only thing to note is that the address you pass should be aligned > to the page boundry even though some devices are not. > Thanks, Ayman. I've tried that, but I'm still getting the same error. My physical address is 0xe80000000, length is 0x100000. Felix.