Patchwork Prop-ptr and Xilinx.

login
register
mail settings
Submitter Peter A. G. Crosthwaite
Date June 13, 2012, 6:21 a.m.
Message ID <CAEgOgz5u5kr7GD6PUY0EsmGuQLkLyQHSnafoobHvaU5Hbyr6Eg@mail.gmail.com>
Download mbox | patch
Permalink /patch/164550/
State New
Headers show

Comments

Peter A. G. Crosthwaite - June 13, 2012, 6:21 a.m.
Hi Paolo,

Im testing your revisions the the xilinx ip around getting rid of the
pointer props (your prop-ptr branch on your github).

First up theres a typo in the machine model stuff, heres the fix:


I corrected this and ran it but SIGABRT'ed on some assertion in the
qom framework:

peterc@PetaLogix-ws2:~/Petalogix/Internal/plgx_install/qemu-upstream-regression/petalinux-vx.x/software/petalinux-dist$
gdb -x ../../etc/qemu/gdb_args --args qemu-system-microblazeel -M
petalogix-ml605 -kernel images/image.elf -dtb ./hack.dtb
GNU gdb (GDB) 7.1-ubuntu
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from
/home/peterc/Petalogix/Internal/plgx_install/qemu-upstream-regression/petalinux-vx.x/tools/linux-i386/petalogix/bin/qemu-system-microblazeel...done.
(gdb) r
Starting program:
/home/peterc/Petalogix/Internal/plgx_install/qemu-upstream-regression/petalinux-vx.x/tools/linux-i386/petalogix/bin/qemu-system-microblazeel
-M petalogix-ml605 -kernel images/image.elf -dtb ./hack.dtb
[Thread debugging using libthread_db enabled]
warning: no loadable sections found in added symbol-file <in-memory>
[New Thread 0x7ffff63fc700 (LWP 18082)]
**
ERROR:/home/peterc/Petalogix/Internal/plgx_src/qemu/qom/object.c:150:type_get_parent:
assertion failed: (type->parent_type != NULL)

Program received signal SIGABRT, Aborted.
0x00000000005ac96b in raise (sig=<value optimised out>) at
../nptl/sysdeps/unix/sysv/linux/pt-raise.c:42
42	../nptl/sysdeps/unix/sysv/linux/pt-raise.c: No such file or directory.
	in ../nptl/sysdeps/unix/sysv/linux/pt-raise.c
(gdb) bt
#0  0x00000000005ac96b in raise (sig=<value optimised out>) at
../nptl/sysdeps/unix/sysv/linux/pt-raise.c:42
#1  0x00000000005c08e0 in abort ()
#2  0x0000000000565c14 in g_assertion_message ()
#3  0x000000000056615c in g_assertion_message_expr ()
#4  0x00000000004cdb83 in type_get_parent ()
#5  0x00000000004cdd82 in type_initialize ()
#6  0x00000000004ce3bd in object_new_with_type ()
#7  0x00000000004ce43d in object_new ()
#8  0x00000000004cdecf in object_interface_init ()
#9  0x00000000004cdf82 in object_init_with_type ()
#10 0x00000000004ce093 in object_initialize_with_type ()
#11 0x00000000004ce3e4 in object_new_with_type ()
#12 0x00000000004ce43d in object_new ()
#13 0x0000000000461a9b in qdev_try_create ()
#14 0x0000000000461a18 in qdev_create ()
#15 0x000000000052149b in petalogix_ml605_init ()
#16 0x000000000049cee9 in main ()
(gdb)

More info to come as I trace.

Regards,
Peter
Paolo Bonzini - June 13, 2012, 6:38 a.m.
Il 13/06/2012 08:21, Peter Crosthwaite ha scritto:
> 
> Im testing your revisions the the xilinx ip around getting rid of the
> pointer props (your prop-ptr branch on your github).
> 
> First up theres a typo in the machine model stuff, heres the fix:
> 
> diff --git a/hw/petalogix_ml605_mmu.c b/hw/petalogix_ml605_mmu.c
> index 37866f4..e718183 100644
> --- a/hw/petalogix_ml605_mmu.c
> +++ b/hw/petalogix_ml605_mmu.c
> @@ -126,7 +126,7 @@ petalogix_ml605_init(ram_addr_t ram_size,
>      xilinx_timer_create(TIMER_BASEADDR, irq[2], 2, 100 * 1000000);
> 
>      /* axi ethernet and dma initialization. */
> -    DeviceState *dma = qdev_create(NULL, "xilinx-axidma");
> +    DeviceState *dma = qdev_create(NULL, "xilinx,axidma");
>      DeviceState *eth0;
> 
>      eth0 = xilinx_axiethernet_create(&nd_table[0], XILINX_AXIDMA_PEER(dma),
> 
> I corrected this and ran it but SIGABRT'ed on some assertion in the
> qom framework:

It's quite possible that interfaces are borked, since we have no unit
tests and no user. :/

Paolo
Peter A. G. Crosthwaite - June 13, 2012, 8:43 a.m.
Up and running Paolo,

Interfaces now tested as working in a machine :)

I had to hack-up QOM a little bit for it all to work, creating a
series (hacks and all) so it can be discussed.

Regards,
Peter

On Wed, Jun 13, 2012 at 4:38 PM, Paolo Bonzini <pbonzini@redhat.com> wrote:
> Il 13/06/2012 08:21, Peter Crosthwaite ha scritto:
>>
>> Im testing your revisions the the xilinx ip around getting rid of the
>> pointer props (your prop-ptr branch on your github).
>>
>> First up theres a typo in the machine model stuff, heres the fix:
>>
>> diff --git a/hw/petalogix_ml605_mmu.c b/hw/petalogix_ml605_mmu.c
>> index 37866f4..e718183 100644
>> --- a/hw/petalogix_ml605_mmu.c
>> +++ b/hw/petalogix_ml605_mmu.c
>> @@ -126,7 +126,7 @@ petalogix_ml605_init(ram_addr_t ram_size,
>>      xilinx_timer_create(TIMER_BASEADDR, irq[2], 2, 100 * 1000000);
>>
>>      /* axi ethernet and dma initialization. */
>> -    DeviceState *dma = qdev_create(NULL, "xilinx-axidma");
>> +    DeviceState *dma = qdev_create(NULL, "xilinx,axidma");
>>      DeviceState *eth0;
>>
>>      eth0 = xilinx_axiethernet_create(&nd_table[0], XILINX_AXIDMA_PEER(dma),
>>
>> I corrected this and ran it but SIGABRT'ed on some assertion in the
>> qom framework:
>
> It's quite possible that interfaces are borked, since we have no unit
> tests and no user. :/

Alrighty,

So if this is the first user, then maybe its the smoke-test case?
Preparing a test package now.

Regards,
Peter

>
> Paolo
>
Paolo Bonzini - June 13, 2012, 9 a.m.
Il 13/06/2012 10:43, Peter Crosthwaite ha scritto:
>> > It's quite possible that interfaces are borked, since we have no unit
>> > tests and no user. :/
> Alrighty,
> 
> So if this is the first user, then maybe its the smoke-test case?
> Preparing a test package now.

Yes, having a user was in fact the reason why I chose to model AXI with
interfaces.  :)  Thanks very much for your work!

Paolo

Patch

diff --git a/hw/petalogix_ml605_mmu.c b/hw/petalogix_ml605_mmu.c
index 37866f4..e718183 100644
--- a/hw/petalogix_ml605_mmu.c
+++ b/hw/petalogix_ml605_mmu.c
@@ -126,7 +126,7 @@  petalogix_ml605_init(ram_addr_t ram_size,
     xilinx_timer_create(TIMER_BASEADDR, irq[2], 2, 100 * 1000000);

     /* axi ethernet and dma initialization. */
-    DeviceState *dma = qdev_create(NULL, "xilinx-axidma");
+    DeviceState *dma = qdev_create(NULL, "xilinx,axidma");
     DeviceState *eth0;

     eth0 = xilinx_axiethernet_create(&nd_table[0], XILINX_AXIDMA_PEER(dma),