Mailing List Archive

Yet Another Xen ARM Port
Greetings,

MontaVista is pleased to collaborate with the Xen ARM community on the
ongoing Xen ARM porting efforts and presents the following very early
work-in-progress Xen ARM port with preliminary support for the ARM, Ltd.
RealView® Versatile Platform Baseboard for ARM926EJ-S as emulated under
QEMU:

ftp://source.mvista.com/pub/xen/xen-unstable-15521-xen_arm_port-20071029.patch.gz


The above patch is based on xen-unstable HG changeset 15521 and provides
very early work-in-progress support for the ARM Versatile/PB926EJ-S as
emulated under QEMU. Thus far, the following features are tentatively
integrated and working in some fashion:

Low-level serial console debug
Initial MMU setup hardwired for Xen Start-of-day
ARM exception handlers
ARM Interrupts
ARM Timer Interrupts
Xen scheduler
Xen Idle Domain (using Wait-For-Interrupt low-power idle state)
Mini-OS builds for ARM
Common Hypercalls
Memory Allocation
Pseudo-Physical Memory


To apply the patch, build and run Xen on the ARM Versatile/PB926EJ-S
under QEMU, do the following:

- Checkout xen-unstable HG repository:

hg clone http://xenbits.xensource.com/xen-unstable.hg

Please refer to [1] for help with obtaining and using Mercurial (HG).

- Apply Xen ARM patch:

cd xen-unstable-arm.hg
hg checkout 15521
wget ftp://source.mvista.com/pub/xen/xen-unstable-15521-xen_arm_port-20071029.patch.gz
zcat xen-unstable-15521-xen_arm_port-20071029.patch.gz | patch -p1

- Build Xen:

make XEN_TARGET_ARCH=arm CROSS_COMPILE=${CROSS_COMPILE} xen

- Build Mini-Os:

cd extras/mini-os
make XEN_TARGET_ARCH=arm CROSS_COMPILE=${CROSS_COMPILE}

- Boot Xen on the ARM Versatile/PB926EJ-S using QEMU:

qemu-system-arm -M versatilepb -m 64 \
-kernel xen_minios.bin -serial stdio

Please refer to [2] for help with obtaining and using QEMU.


The following is a wish list of Xen ARM features and/or other tasks
to be completed in no particular order:

Cleanup build FIXME and other warnings
Convert ARM bootloader initialisation parameters [3] to XEN MBI
Implement proper Xen ARM dynamic MMU setup at Start-of-day
Add `make *config` support similar to Linux
Add Xen ARM AMBA serial driver
Add Xen ARM AMBA framebuffer driver
Port to other ARM processors and machines
Implement Page Table Updates
Implement guest Exception handling
Implement guest Interrupts and events
Determine how to share cycle counter for guest time keeping
Privileged operations
Segment Descriptor Tables
Domain0 (Mini-OS) bring up
Implement Xen/guest page sharing support
Implement Event Channels
Implement Grant Tables support
Port ARM Linux kernel to Xen
- Preferably using para virt ops
- Xenstore
- Front End/Back End drivers
Setup Xen ARM HG or GIT community repository
Merge with HEIG-VD and other Xen ARM community ports


List of contributors:

Jean Pihet <jpihet@mvista.com>
George G. Davis <gdavis@mvista.com>


This code is made available with "no warranty whatsoever". Use it
at your own risk.

Comments, feedback and/or contributions are welcome but please keep
discussions on the xen-arm mailing list.

References:

[1] http://www.cl.cam.ac.uk/research/srg/netos/xen/readmes/hg-cheatsheet.txt
[2] http://fabrice.bellard.free.fr/qemu/
[3] http://www.arm.linux.org.uk/developer/booting.php

--
Regards,
George

_______________________________________________
Xen-arm mailing list
Xen-arm@lists.xensource.com
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-arm
RE: Yet Another Xen ARM Port [ In reply to ]
Hi George,

Great! Many thanks for your patch. I hope it will stimulate activities
in this area.
On our side, Damien is working now on setting up the IRQ layer in the
mixed colibri(PXA)-specific
xen-linux tree. I guess he will submit a new version on the sourceforge
repository in the coming days.

He will try to use your material in order to make something unified.
The immediate next step will be to enable the xen memory manager
functionalities in his tree.

Cheers,
Daniel


>-----Original Message-----
>From: xen-arm-bounces@lists.xensource.com [mailto:xen-arm-
>bounces@lists.xensource.com] On Behalf Of George G. Davis
>Sent: mardi 30 octobre 2007 02:48
>To: xen-arm@lists.xensource.com
>Subject: [XenARM] Yet Another Xen ARM Port
>
>Greetings,
>
>MontaVista is pleased to collaborate with the Xen ARM community on the
>ongoing Xen ARM porting efforts and presents the following very early
>work-in-progress Xen ARM port with preliminary support for the ARM,
Ltd.
>RealView(r) Versatile Platform Baseboard for ARM926EJ-S as emulated
under
>QEMU:
>
> ftp://source.mvista.com/pub/xen/xen-unstable-15521-xen_arm_port-
>20071029.patch.gz
>
>
>The above patch is based on xen-unstable HG changeset 15521 and
provides
>very early work-in-progress support for the ARM Versatile/PB926EJ-S as
>emulated under QEMU. Thus far, the following features are tentatively
>integrated and working in some fashion:
>
> Low-level serial console debug
> Initial MMU setup hardwired for Xen Start-of-day
> ARM exception handlers
> ARM Interrupts
> ARM Timer Interrupts
> Xen scheduler
> Xen Idle Domain (using Wait-For-Interrupt low-power idle state)
> Mini-OS builds for ARM
> Common Hypercalls
> Memory Allocation
> Pseudo-Physical Memory
>
>
>To apply the patch, build and run Xen on the ARM Versatile/PB926EJ-S
>under QEMU, do the following:
>
>- Checkout xen-unstable HG repository:
>
> hg clone http://xenbits.xensource.com/xen-unstable.hg
>
> Please refer to [1] for help with obtaining and using Mercurial (HG).
>
>- Apply Xen ARM patch:
>
> cd xen-unstable-arm.hg
> hg checkout 15521
> wget ftp://source.mvista.com/pub/xen/xen-unstable-15521-
>xen_arm_port-20071029.patch.gz
> zcat xen-unstable-15521-xen_arm_port-20071029.patch.gz | patch
-p1
>
>- Build Xen:
>
> make XEN_TARGET_ARCH=arm CROSS_COMPILE=${CROSS_COMPILE} xen
>
>- Build Mini-Os:
>
> cd extras/mini-os
> make XEN_TARGET_ARCH=arm CROSS_COMPILE=${CROSS_COMPILE}
>
>- Boot Xen on the ARM Versatile/PB926EJ-S using QEMU:
>
> qemu-system-arm -M versatilepb -m 64 \
> -kernel xen_minios.bin -serial stdio
>
> Please refer to [2] for help with obtaining and using QEMU.
>
>
>The following is a wish list of Xen ARM features and/or other tasks
>to be completed in no particular order:
>
> Cleanup build FIXME and other warnings
> Convert ARM bootloader initialisation parameters [3] to XEN MBI
> Implement proper Xen ARM dynamic MMU setup at Start-of-day
> Add `make *config` support similar to Linux
> Add Xen ARM AMBA serial driver
> Add Xen ARM AMBA framebuffer driver
> Port to other ARM processors and machines
> Implement Page Table Updates
> Implement guest Exception handling
> Implement guest Interrupts and events
> Determine how to share cycle counter for guest time keeping
> Privileged operations
> Segment Descriptor Tables
> Domain0 (Mini-OS) bring up
> Implement Xen/guest page sharing support
> Implement Event Channels
> Implement Grant Tables support
> Port ARM Linux kernel to Xen
> - Preferably using para virt ops
> - Xenstore
> - Front End/Back End drivers
> Setup Xen ARM HG or GIT community repository
> Merge with HEIG-VD and other Xen ARM community ports
>
>
>List of contributors:
>
> Jean Pihet <jpihet@mvista.com>
> George G. Davis <gdavis@mvista.com>
>
>
>This code is made available with "no warranty whatsoever". Use it
>at your own risk.
>
>Comments, feedback and/or contributions are welcome but please keep
>discussions on the xen-arm mailing list.
>
>References:
>
>[1] http://www.cl.cam.ac.uk/research/srg/netos/xen/readmes/hg-
>cheatsheet.txt
>[2] http://fabrice.bellard.free.fr/qemu/
>[3] http://www.arm.linux.org.uk/developer/booting.php
>
>--
>Regards,
>George
>
>_______________________________________________
>Xen-arm mailing list
>Xen-arm@lists.xensource.com
>http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-arm

_______________________________________________
Xen-arm mailing list
Xen-arm@lists.xensource.com
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-arm
Re: Yet Another Xen ARM Port [ In reply to ]
On Wed, Oct 31, 2007 at 01:47:11PM +0100, ROSSIER Daniel wrote:
> Hi George,
>
> Great! Many thanks for your patch. I hope it will stimulate activities
> in this area.
> On our side, Damien is working now on setting up the IRQ layer in the
> mixed colibri(PXA)-specific
> xen-linux tree. I guess he will submit a new version on the sourceforge
> repository in the coming days.
>
> He will try to use your material in order to make something unified.

We'll also consider merging with your xen-linux based tree. I do like
the approach for the potential to have working `make *config`. That
will be quite useful to facilitate porting and configuring Xen for
different ARM targets. Hrm, adding Linux Kbuild to Xen would probably
be useful enhancement for all archs. : )

> The immediate next step will be to enable the xen memory manager
> functionalities in his tree.

I'm not sure what you mean exactly by enabling "the memory manager" but
our patch already has the ARM MMU enabled for (static) direct mapped Xen
memory and the Xen memory allocator is also working. We're now working on
adding support for ARM MMU page table support for guest domains.

--
Regards,
George

_______________________________________________
Xen-arm mailing list
Xen-arm@lists.xensource.com
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-arm
RE: Yet Another Xen ARM Port [ In reply to ]
>-----Original Message-----
>From: George G. Davis [mailto:gdavis@mvista.com]
>Sent: jeudi 1 novembre 2007 04:55
>To: ROSSIER Daniel
>Cc: xen-arm@lists.xensource.com
>Subject: Re: [XenARM] Yet Another Xen ARM Port
>
>On Wed, Oct 31, 2007 at 01:47:11PM +0100, ROSSIER Daniel wrote:
>> Hi George,
>>
>> Great! Many thanks for your patch. I hope it will stimulate
activities
>> in this area.
>> On our side, Damien is working now on setting up the IRQ layer in the
>> mixed colibri(PXA)-specific
>> xen-linux tree. I guess he will submit a new version on the
>sourceforge
>> repository in the coming days.
>>
>> He will try to use your material in order to make something unified.
>
>We'll also consider merging with your xen-linux based tree. I do like
>the approach for the potential to have working `make *config`. That
>will be quite useful to facilitate porting and configuring Xen for
>different ARM targets. Hrm, adding Linux Kbuild to Xen would probably
>be useful enhancement for all archs. : )
>
>> The immediate next step will be to enable the xen memory manager
>> functionalities in his tree.
>
>I'm not sure what you mean exactly by enabling "the memory manager" but
>our patch already has the ARM MMU enabled for (static) direct mapped
Xen
>memory and the Xen memory allocator is also working. We're now working
>on
>adding support for ARM MMU page table support for guest domains.
>

I meant to adapt the head.S to map XEN on a convenient memory space
(considering
our specific board) and to enable the static mapping for XEN. Basically,
what you did will
probably be sufficient provided some adjustments with the addresses.
Damien will be then able to
work out the ARM-specific allocation of pages for the guest domains. I
will check with him to try coordinating the efforts.

>--
>Regards,
>George

Daniel


_______________________________________________
Xen-arm mailing list
Xen-arm@lists.xensource.com
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-arm
Re: Yet Another Xen ARM Port [ In reply to ]
Hello, everyone,

I am interested in porting Xen to ARM and I think it will be convenient to
debug using qemu. Thanks a lot for your effort! Wish I could offer some
contribute.

According to [XenARM] Yet Another Xen ARM
Port<http://lists.xensource.com/archives/html/xen-arm/2007-10/msg00007.html>,
I checked out the xen-unstable-15521, patched, and compiled using gcc-4.0.2(
glibc-2.3.5) for ARM. During compiling, I met following problems:

1. When compiling Xen, it showed that my gcc doesn't support
"-mabi:aapcs-linux".
I have to modify "xen/arch/arm/defconfig" and remove "CONFIG_AEABI=y" to get
through.
2. When compiling mini-os, there is an error: "Error: bad instruction `ldm
r4,{r2,r3}'". The bad instruction is in "extras/mini-os/arch/arm/uldivmod.c:
_aeabi_uldivmod()", I guess it maybe have some relationship with
CONFIG_AEABI.

May I ask that which version of toolchain should I use? I just want to boot
xen-arm on qemu.

--
Regards,
Brady, Xia
Re: Yet Another Xen ARM Port [ In reply to ]
Hi,

On Friday 04 January 2008 04:24:31 XiaYubin wrote:
> Hello, everyone,
>
> I am interested in porting Xen to ARM and I think it will be convenient to
> debug using qemu. Thanks a lot for your effort! Wish I could offer some
> contribute.
>
> According to [XenARM] Yet Another Xen ARM
> Port<http://lists.xensource.com/archives/html/xen-arm/2007-10/msg00007.html
>>, I checked out the xen-unstable-15521, patched, and compiled using
> gcc-4.0.2( glibc-2.3.5) for ARM. During compiling, I met following
> problems:
>
> 1. When compiling Xen, it showed that my gcc doesn't support
> "-mabi:aapcs-linux".
You need to use a linux-gnueabi compiler.
We are currently using gcc version 4.2.0, from the MV Mobilinux release. the
target is 'armv5tl-montavista-linux-gnueabi'.

> I have to modify "xen/arch/arm/defconfig" and remove "CONFIG_AEABI=y" to
> get through.
You should not change that setting since low level library functions (libgcc)
rely on it.

> 2. When compiling mini-os, there is an error: "Error: bad instruction `ldm
> r4,{r2,r3}'". The bad instruction is in
> "extras/mini-os/arch/arm/uldivmod.c: _aeabi_uldivmod()", I guess it maybe
> have some relationship with
> CONFIG_AEABI.
>
> May I ask that which version of toolchain should I use? I just want to boot
> xen-arm on qemu.
>
> --
> Regards,
> Brady, Xia
Jean.



_______________________________________________
Xen-arm mailing list
Xen-arm@lists.xensource.com
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-arm
Re: Yet Another Xen ARM Port [ In reply to ]
On Fri, Jan 04, 2008 at 09:57:42AM +0100, Jean Pihet wrote:
> Hi,
>
> On Friday 04 January 2008 04:24:31 XiaYubin wrote:
> > Hello, everyone,
> >
> > I am interested in porting Xen to ARM and I think it will be convenient to
> > debug using qemu. Thanks a lot for your effort! Wish I could offer some
> > contribute.
> >
> > According to [XenARM] Yet Another Xen ARM
> > Port<http://lists.xensource.com/archives/html/xen-arm/2007-10/msg00007.html
> >>, I checked out the xen-unstable-15521, patched, and compiled using
> > gcc-4.0.2( glibc-2.3.5) for ARM. During compiling, I met following
> > problems:
> >
> > 1. When compiling Xen, it showed that my gcc doesn't support
> > "-mabi:aapcs-linux".
> You need to use a linux-gnueabi compiler.
> We are currently using gcc version 4.2.0, from the MV Mobilinux release. the
> target is 'armv5tl-montavista-linux-gnueabi'.

You can also obtain a suitable compiler for ARM eABI from CodeSourcery
at the following URL:

http://www.codesourcery.com/gnu_toolchains/arm

--
Regards,
George

_______________________________________________
Xen-arm mailing list
Xen-arm@lists.xensource.com
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-arm
Re: Yet Another Xen ARM Port [ In reply to ]
Thanks! I have downloaded the toolchain and compiled Xen-arm without error.
When I lunch mini-os using qemu, it finally halt after about 3 sec.
(XEN) Machine halted.
Is this what supposed to happen?

--
Brady, Xia

On 1/4/08, Jean Pihet <jpihet@mvista.com> wrote:
>
> Hi,
>
> On Friday 04 January 2008 04:24:31 XiaYubin wrote:
> > Hello, everyone,
> >
> > I am interested in porting Xen to ARM and I think it will be convenient
> to
> > debug using qemu. Thanks a lot for your effort! Wish I could offer some
> > contribute.
> >
> > According to [XenARM] Yet Another Xen ARM
> > Port<
> http://lists.xensource.com/archives/html/xen-arm/2007-10/msg00007.html
> >>, I checked out the xen-unstable-15521, patched, and compiled using
> > gcc-4.0.2( glibc-2.3.5) for ARM. During compiling, I met following
> > problems:
> >
> > 1. When compiling Xen, it showed that my gcc doesn't support
> > "-mabi:aapcs-linux".
> You need to use a linux-gnueabi compiler.
> We are currently using gcc version 4.2.0, from the MV Mobilinux release.
> the
> target is 'armv5tl-montavista-linux-gnueabi'.
>
> > I have to modify "xen/arch/arm/defconfig" and remove "CONFIG_AEABI=y" to
> > get through.
> You should not change that setting since low level library functions
> (libgcc)
> rely on it.
>
> > 2. When compiling mini-os, there is an error: "Error: bad instruction
> `ldm
> > r4,{r2,r3}'". The bad instruction is in
> > "extras/mini-os/arch/arm/uldivmod.c: _aeabi_uldivmod()", I guess it
> maybe
> > have some relationship with
> > CONFIG_AEABI.
> >
> > May I ask that which version of toolchain should I use? I just want to
> boot
> > xen-arm on qemu.
> >
> > --
> > Regards,
> > Brady, Xia
> Jean.
>
>
>
Re: Yet Another Xen ARM Port [ In reply to ]
On Fri, Jan 04, 2008 at 10:06:35PM +0800, XiaYubin wrote:
> Thanks! I have downloaded the toolchain and compiled Xen-arm without error.
> When I lunch mini-os using qemu, it finally halt after about 3 sec.
> (XEN) Machine halted.
> Is this what supposed to happen?

Yes, as per the release announcement, that's as far as it goes. We'll
post an updated patch (early next week) which includes Mini-OS startup.
It's still very much a work-in-progress though. You may also want to
look into the Embedded Xen project too:

http://sourceforge.net/projects/embeddedxen/

They're also working on a Xen ARM port.

--
Regards,
George

_______________________________________________
Xen-arm mailing list
Xen-arm@lists.xensource.com
http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-arm