[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] NetBSD port and a couple of remarks



> > 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


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.