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 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Using mini-os ioremap()

To: Matthew Fioravante <matthew.fioravante@xxxxxxxxxx>
Subject: Re: [Xen-devel] Using mini-os ioremap()
From: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Date: Wed, 5 Jan 2011 23:55:52 +0100
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Wed, 05 Jan 2011 15:14:45 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <4D24C587.6060907@xxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Mail-followup-to: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>, Matthew Fioravante <matthew.fioravante@xxxxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
References: <4D24C587.6060907@xxxxxxxxxx>
Resent-date: Thu, 6 Jan 2011 00:14:09 +0100
Resent-from: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
Resent-message-id: <20110105231409.GA12819@xxxxxxxxxxxxxxxxxxxxxxxxx>
Resent-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.12-2006-07-14
Matthew Fioravante, le Wed 05 Jan 2011 14:24:55 -0500, a écrit :
>  I'm trying to map some mmio pages into my mini-os domain to use a 
> hardware device. The device is at address fed40000. I'm calling 
> ioremap() on this address but its failing, telling me that mfn fed40 is 
> in ram space. (Its failing the mfn_is_ram() check.)
> 
> 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 <= 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

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

<Prev in Thread] Current Thread [Next in Thread>