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] NetBSD port and a couple of remarks

To: Ian Pratt <Ian.Pratt@xxxxxxxxxxxx>
Subject: Re: [Xen-devel] NetBSD port and a couple of remarks
From: Christian Limpach <chris@xxxxxx>
Date: Wed, 28 Jan 2004 18:07:19 +0100
Cc: xen-devel@xxxxxxxxxxxxxxxxxxxxx
Delivery-date: Wed, 28 Jan 2004 17:22:19 +0000
Envelope-to: steven.hand@xxxxxxxxxxxx
List-archive: <http://sourceforge.net/mailarchive/forum.php?forum=xen-devel>
List-help: <mailto:xen-devel-request@lists.sourceforge.net?subject=help>
List-id: List for Xen developers <xen-devel.lists.sourceforge.net>
List-post: <mailto:xen-devel@lists.sourceforge.net>
List-subscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=subscribe>
List-unsubscribe: <https://lists.sourceforge.net/lists/listinfo/xen-devel>, <mailto:xen-devel-request@lists.sourceforge.net?subject=unsubscribe>
References: <E1Alnnt-0004rT-00@xxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-admin@xxxxxxxxxxxxxxxxxxxxx
> > I have made a NetBSD-current kernel which boots on Xen.  It still has
some
> > problems but it's good enough to boot multi-user and allows logins.
>
> I presume it's running a single domain 0?

I'm running Linux in domain 0 and I'm using:
ID=`xi_create $MEM test`
echo $ID
xi_build $ID /boot/nbsd-os 1 initrd=/boot/nbsd-os.sym
ip=$IP:172.20.4.13:172.20.1.1:255.255.128.0::eth0:off bootdev=xennet0
nfsroot=marble:/netboot/qube
xi_vifinit $ID 0 $IP
xi_start $ID

I'm abusing the initrd to pass in the kernel's symbol table.  I couldn't
figure out how to make objcopy append the symbol table to the raw image.
I'm using a small tool to extract the symbol table from the kernel and use
this file as initrd.  The kernel will then copy the symbol table to the end
of the bss before clearing the bss.  It would probably be easy enough to
remap the pages used by the symbol table.

I didn't want to modify xi_build, but it would probably be neat if it could
read elf images (and thus load the symbol table to the right address).
That's what the regular NetBSD bootloader does.

> It would be very nice to get the user-space domain builder
> written to support it, so we can have multiple NetBSD, Linux and
> XP images all running together on one box...
>
> Our view is that domain building is quite OS specific, hence its
> nice to be able to do most of the intricate work of setting up a
> domain (installing the image and ramdisks, initial page tables
> etc) in the nice environment of a user-space application running
> in another domain [*]. It's a pain pulling yourself up by your
> bootstraps in assembler within a domain...

I kind of do because I don't rely on much setup done by the domain build.  I
only rely on the pagetables to be setup to map VA0xc0100000 to PA0x00000000,
all memory to be mapped and a pointer to the initial pagetables.  Then I do
the following:
- build a phys to machine mapping table
- build a new pagetable with only the kernel (+some fixed pages) mapped
- switch pagetables and unpin the initial pagetable
- hand the unmapped PA range to our memory management system (uvm).

I was considering making uvm manage the MA pages directly but the initial
load only works with a finite number of memory segments and the collection
of MA pages is too fragmented.

> Hence, we've developed OS-specific domain building tools for
> Linux and Win XP.  It probably makes the sense to do the same for
> NetBSD, unless the initial memory map is very similar to
> Linux.

I think it's similar enough.

    christian



-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/xen-devel