From: Samuel Thibault Subject: Re: Using mini-os ioremap() Date: Wed, 5 Jan 2011 23:55:52 +0100 Message-ID: <20110105225552.GI4618@const.famille.thibault.fr> References: <4D24C587.6060907@jhuapl.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Return-path: Resent-Message-ID: <20110105231409.GA12819@const.famille.thibault.fr> Resent-To: xen-devel@lists.xensource.com Content-Disposition: inline In-Reply-To: <4D24C587.6060907@jhuapl.edu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Matthew Fioravante Cc: "xen-devel@lists.xensource.com" List-Id: xen-devel@lists.xenproject.org Matthew Fioravante, le Wed 05 Jan 2011 14:24:55 -0500, a =E9crit : > I'm trying to map some mmio pages into my mini-os domain to use a=20 > hardware device. The device is at address fed40000. I'm calling=20 > ioremap() on this address but its failing, telling me that mfn fed40 is= =20 > in ram space. (Its failing the mfn_is_ram() check.) >=20 > What am I doing wrong here? Mmm, I don't think anything you're doing is wrong. Notice the comment: static long system_ram_end_mfn; int mfn_is_ram(unsigned long mfn) { /* very crude check if a given MFN is memory or not. Probably should * make this a little more sophisticated ;) */ return (mfn <=3D system_ram_end_mfn) ? 1 : 0; } Do you have more than 4GiB memory, i.e. 0xfed40000 is actually between two RAM areas? In such case mfn_is_ram has to really get more sophisticated. (In the interim you could just comment the mfn_is_ram() test from do_ioremap to make things work) Samuel