|
From: | rajan pathak |
Subject: | Re: [Qemu-devel] Emulating Ethernet controller based on Cortex-A15 platforms |
Date: | Fri, 24 Jan 2014 23:18:01 -0800 |
+static void aw_a10_init(Object *obj) +{ + AwA10State *s = AW_A10(obj); + DeviceState *dev; + + object_initialize(&s->cpu, sizeof(s->cpu), "cortex-a8-" TYPE_ARM_CPU); + object_property_add_child(obj, "cpu", OBJECT(&s->cpu), NULL); + + object_initialize(&s->intc, sizeof(s->timer), TYPE_AW_A10_PIC); + dev = DEVICE(&s->intc); + qdev_set_parent_bus(dev, sysbus_get_default()); + + object_initialize(&s->timer, sizeof(s->timer), TYPE_AW_A10_PIT); + dev = DEVICE(&s->timer); + qdev_set_parent_bus(dev, sysbus_get_default()); +} +
Also,I didn't understand below lines from Andreas answer.
>to use it you need a standard machine definition,
> such as the EVMK2Hx in your case (some evaluation/reference board rather
> than custom industry boards). Then test that code using a Linux (or
> firmware or other OS) that runs on the real board
On Fri, Jan 24, 2014 at 7:52 AM, Andreas Färber <address@hidden> wrote:Device tree driven Linux should minimise the pain of swapping ethernet
> Am 23.01.2014 21:02, schrieb rajan pathak:
>>> I'm not clear what you're trying to do here; could
>>> you try rephrasing your question? Are you just trying
>>> to use the existing working QEMU emulation of a
>>> Cortex-A15 board and ethernet controller, or to do
>>> something else?
>>
>> To be very specific I am trying to emulate Ethernet controller of
>> KeyStone 2 device from TI
>>
drivers out to give you a guest that tests such a strange (and
non-existant board). TBH, its not a bad starting point to:
1: Write your device model in hw/net
2: Take an ARM Linux port you know works on QEMU
3: Switch on your enet driver in Kconfig
4: Hack device tree to have your ethernet rather than the actual one
5: Hack qemu to have your ethernet instead of real one
6: Boot.
But Andreas is right. To do it properly you really need to get the
machine model for your actual system going.
Why is the ARM variant really relevant to ethernet controller bringup
>> http://processors.wiki.ti.com/index.php/MCSDK_User_Guide_for_KeyStone_II
>>
>> It is based on CortexA-15 Processor series. So I thought I can use
>> vexpress_defconfig and can call
>> my Emulated Ethernet controller instead of LAN9118 from vexpress.c.
>>
anyway? I'm not sure what A15 specific features are going to warrant
bending over backwards to make a hybrid that has A15 + substituted
ethernet.
Allwinner is a particularly relevant example. They upstreamed their
>> After that I will place my Emulated Ethernet controller code(which
>> haven't started) inside hw/net .
>>
>> Is the right way to go forward?
>
> No, it isn't. If you want to emulate the KeyStone II SoC, then please do
> just that. You will find recent examples on the list of new SoCs that
> have been added, including sunxi/A10 and DIGIC.
baseport (CPU, RAM, UART, Timer and Intc only) recently as a minimal
series, but are just now adding their ethernet as follow up.
This is a good approach, upstream the absolute bare minimum machine
model as first series to get a boot. Then go after the optional
peripheral device models.
Yes, just a new ethernet controller in hw/net is going to be a hard
So, the Ethernet
> controller would be a new device in hw/net/, it is initialized by a SoC
> device in hw/arm/ and to use it you need a standard machine definition,
> such as the EVMK2Hx in your case (some evaluation/reference board rather
> than custom industry boards). Then test that code using a Linux (or
> firmware or other OS) that runs on the real board.
>
sell without going the extra effort of adding a relevant machine model
that uses it.
Regards,
Peter
> Regards,
> Andreas
>
> --
> SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
>
[Prev in Thread] | Current Thread | [Next in Thread] |