I mentioned in the toolchain standup call that I'd done a quick estimate of the work required to support vexpress, so I thought I might as well clean it up a little and post it.
This is a quick summary and time estimate for adding Versatile Express support to qemu. The general idea is that most of the components on this board already have QEMU implementations (since they're standard ARM primecells used in versatile/realview), and we can live without the few major components that aren't implemented (maybe we'd need dummy implementations if the kernel prods them on startup.)
Components already supported by QEMU: ------------------------------------- A9MPx4 PL050 keyboard, mouse SMCS LAN9118 ethernet PL011 UARTs SP804 timers
Components with a near match in QEMU: ------------------------------------- PL111 CLCD -- qemu has a PL110 PL180 MMC card -- qemu has a PL181 -- both cases should either just work or be fairly trivial tweaks
Components not supported by QEMU: --------------------------------- PL041 audio compact flash two-wire serial bus (for PCI-express switch config and DVI-I displays) ISP1761 Philips USB controller User switches and LEDs -- vexpress specific, but trivial to do
Components where a dummy implementation should be sufficient: -------------------------------------------------------------
PL310 L2 cache controller PL341 dynamic memory controller PL354 static memory bus controller trustzone controllers
Other required work: -------------------- The usual knitting for interrupts, clocks, reset etc etc.
Summary -------
Assuming we're happy not to worry about support for audio, USB, two-wire serial bus or compact flash, this is about two weeks work to put together, test and get a more-or-less upstreamable patchset from. This would produce a platform hopefully at least as usable as versatile, but with an A9 and 1GB RAM.
-- PMM
I mentioned in the toolchain standup call that I'd done a quick estimate of the work required to support vexpress, so I thought I might as well clean it up a little and post it.
This is a quick summary and time estimate for adding Versatile Express support to qemu. The general idea is that most of the components on this board already have QEMU implementations (since they're standard ARM primecells used in versatile/realview), and we can live without the few major components that aren't implemented (maybe we'd need dummy implementations if the kernel prods them on startup.)
-- PMM
Hello,
We have added support for versatile express for some time. Here is our public repo in case you may want to use it as a starting point:
https://github.com/bbalban/qemu.git
We added support for memory layout, CTxA9 timer, interrupts, few other fixes. Please see commits for details.
Thanks,
On Tue, Feb 15, 2011, Bahadir Balban wrote:
We have added support for versatile express for some time. Here is our public repo in case you may want to use it as a starting point: https://github.com/bbalban/qemu.git We added support for memory layout, CTxA9 timer, interrupts, few other fixes. Please see commits for details.
Ah I wasn't aware of this tree!
There seem to be two branches; I tried master and got it to build after commenting out realview_i2c_init() and realview_i2c_info.
I didn't manage to start linux though; I could start ARM's u-boot for vexpress [1] with: arm-softmmu/qemu-system-arm -M realview-vx-a9 -kernel u-boot_realview.axf
but I did not get any output with -kernel vmlinuz-2.6.37-1003-linaro-vexpress taken from linux-image-2.6.37-1003-linaro-vexpress_2.6.37-1003.6_armel.deb [2]. I tried with -append console=ttyAMA0,115200 and console=ttyAMA0,38400n8 to no luck.
u-boot-linaro doesn't start in QEMU either.
Would you have some test kernel and instructions?
It seems PCI is working for you, which is really nice! Any issue with the tree?
BTW are these patches being sent upstream?
Thanks!
On 16 February 2011 10:13, Loïc Minier loic.minier@linaro.org wrote:
On Tue, Feb 15, 2011, Bahadir Balban wrote:
We have added support for versatile express for some time. Here is our public repo in case you may want to use it as a starting point: https://github.com/bbalban/qemu.git We added support for memory layout, CTxA9 timer, interrupts, few other fixes. Please see commits for details.
Ah I wasn't aware of this tree!
Me neither; anybody else hiding interesting ARM board models up their sleeves? :-)
BTW are these patches being sent upstream?
I think for upstreaming it would be cleaner to have a hw/vexpress.c rather than trying to wedge it into hw/realview.c -- the two boards are sufficiently different that I think we should just think of them as distinct (and call it 'vexpress' to match the Linux kernel naming.)
-- PMM
On Wed, 2011-02-16 at 10:18 +0000, Peter Maydell wrote:
On 16 February 2011 10:13, Loïc Minier loic.minier@linaro.org wrote:
BTW are these patches being sent upstream?
I think for upstreaming it would be cleaner to have a hw/vexpress.c rather than trying to wedge it into hw/realview.c -- the two boards are sufficiently different that I think we should just think of them as distinct (and call it 'vexpress' to match the Linux kernel naming.)
-- PMM
I agree. If you initiate work on this we will send you our updates.
On Wed, 2011-02-16 at 13:17 +0200, Bahadir Balban wrote:
On Wed, 2011-02-16 at 10:18 +0000, Peter Maydell wrote:
On 16 February 2011 10:13, Loïc Minier loic.minier@linaro.org wrote:
BTW are these patches being sent upstream?
I think for upstreaming it would be cleaner to have a hw/vexpress.c rather than trying to wedge it into hw/realview.c -- the two boards are sufficiently different that I think we should just think of them as distinct (and call it 'vexpress' to match the Linux kernel naming.)
-- PMM
I agree. If you initiate work on this we will send you our updates.
We just pushed the latest on universal-branch branch, there are a few hacks but isolated in each file I think.
This I am told works with realview, vexpress and versatile platforms, though I have personally tested vexpress for vanilla linux.
The pushed patches add support for core-tile timer, pl111 and video RAM region.
Clone: git@github.com:bbalban/qemu.git Website: https://github.com/bbalban/qemu
Thanks, Bahadir
On Wed, 2011-02-16 at 11:13 +0100, Loïc Minier wrote:
On Tue, Feb 15, 2011, Bahadir Balban wrote:
We have added support for versatile express for some time. Here is our public repo in case you may want to use it as a starting point: https://github.com/bbalban/qemu.git We added support for memory layout, CTxA9 timer, interrupts, few other fixes. Please see commits for details.
Ah I wasn't aware of this tree!
There seem to be two branches; I tried master and got it to build after commenting out realview_i2c_init() and realview_i2c_info.
I didn't manage to start linux though; I could start ARM's u-boot for vexpress [1] with: arm-softmmu/qemu-system-arm -M realview-vx-a9 -kernel u-boot_realview.axf
but I did not get any output with -kernel vmlinuz-2.6.37-1003-linaro-vexpress taken from linux-image-2.6.37-1003-linaro-vexpress_2.6.37-1003.6_armel.deb [2]. I tried with -append console=ttyAMA0,115200 and console=ttyAMA0,38400n8 to no luck.
Here is a command that works for me for vanilla 2.6.35.8
qemu-system-arm -kernel arch/arm/boot/zImage -M realview-vx-a9 -cpu cortex-a9 -serial stdio -m 256
u-boot-linaro doesn't start in QEMU either.
Would you have some test kernel and instructions?
It seems PCI is working for you, which is really nice! Any issue with the tree?
BTW are these patches being sent upstream?
Thanks!
We tried sending them a while ago but did not get much feedback. Please feel free to fork it on github.
linaro-toolchain@lists.linaro.org