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


Re: [Xen-devel] [RFC] change provided physical RAM map to add EBDA

To: Guillaume Thouvenin <guillaume.thouvenin@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] [RFC] change provided physical RAM map to add EBDA
From: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>
Date: Thu, 15 Mar 2007 09:24:54 +0000
Cc: Xen devel ML <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 15 Mar 2007 02:24:00 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <20070315084501.GA4830@xxxxxxxx>
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>
References: <20070314110238.GA27518@xxxxxxxx> <1173875107.8591.25.camel@xxxxxxxxxxxxxxxxxxxxx> <20070315084501.GA4830@xxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, 2007-03-15 at 08:45 +0000, Guillaume Thouvenin wrote:
> On Wed, Mar 14, 2007 at 12:25:07PM +0000, Ian Campbell wrote:
> > > 
> > >  Does it make sense to add support for EBDA in dom0 by changing the 
> > > physical map? 
> > > If not, what is the more appropriate solution to get information found in 
> > > EBDA area 
> > > from dom0?
> > 
> > Isn't the EBDA region at a known location? bios_ebda.h suggests that it
> > is always at 0x40e0. In which case can't you just ioremap it?
> Yes I think you're right, EBDA seems always located at 0x40E in physical
> memory.

That's segment 0x40e I think -- therefore address 0x40e0.

>  I don' think that I can use ioremap because it is used to remap
> I/O memory into kernel address space and it's not exactly what I need
> here.

I think it is precisely what you need here. You want to map a machine
physical region of memory into the kernel. Because we register I/O
resources base on machine_e820 (i.e. the real physical e820 map) in
domain 0 ioremap will map real physical regions as required.

> > If not then have a look at machine_e820 in i386 setup-xen.c (e820-xen.c
> > on x86_64 I think) -- this is the real underlying e820 which is used to
> > register the real physical memory resources in domain 0. Does this
> > already contain the region you are talking about? 
> It contains the region in linux but when it is compiled for xen (I mean
> with CONFIG_XEN defined) all ebda stuff is just removed. So, as far as I 
> understand, in domain0 the ebda is not set. 

The only stuff I see which is commented out is quirk handling for
certain Dell machines which don't correctly reserve the EBDA area in the
e820. If you have such a machine then you will need to re-enable this
and make it act on machine_e820 instead of the regular e820. For all
other machines it shouldn't matter.

> > Or do you mean to
> > create a completely artificial region that doesn't exist on real
> > hardware?
> My idea is to map the real memory region that contains EBDA to dom0. So
> dom0 will see the real machine memory region under 640Ko (0xa0000) in is
> own physical map. 

This map already exits -- it is the machine_e820 map.


Xen-devel mailing list