[meta-xilinx] QEMU problems

Martin Townsend martin.townsend at xsilon.com
Fri Jun 12 03:21:42 PDT 2015


Hi,

I've built core-image-minimal using meta-xilinx on the fido branch, created a device tree binary using qemuzynq.dts.  Built qemu as per instructions from
http://www.wiki.xilinx.com/QEMU
Except that xilinx-master branch doesn't exist anymore so I kept to the default HEAD.

When I try to start qemu if asserts at the following line
qemu_irq qdev_get_gpio_in(DeviceState *dev, int n)
{
    assert(n >= 0 && n < dev->num_gpio_in);
    return dev->gpio_in[n];
}

Here's the stack trace:
Thread #1 [qemu-system-arm] 14452 [core: 7] (Suspended : Signal : SIGABRT:Aborted)   
    __GI_raise() at raise.c:56 0x7ffff5b0dcc9   
    __GI_abort() at abort.c:89 0x7ffff5b110d8   
    __assert_fail_base() at assert.c:92 0x7ffff5b06b86   
    __GI___assert_fail() at assert.c:101 0x7ffff5b06c32   
    qdev_get_gpio_in() at qdev.c:324 0x55555565ca3c   
    fdt_get_irq_info() at fdt_generic_util.c:275 0x5555556544b9   
    fdt_init_qdev() at fdt_generic_util.c:586 0x555555654a2e   
    fdt_init_node() at fdt_generic_util.c:131 0x555555654f98   
    coroutine_trampoline() at coroutine-ucontext.c:118 0x555555621fca   
    0x7ffff5b208b0   
    <...more frames...>   

A bit more info

in fdt_init_qdev node_path is "/amba at 0/ps7-scutimer at f8f00600"
from the zynq7-base.dtsi which is included from qemuzynq.dts
        ps7_scutimer_0: ps7-scutimer at f8f00600 {
            clocks = <&clkc 4>;
            compatible = "arm,cortex-a9-twd-timer", "xlnx,ps7-scutimer-1.00.a";
            interrupt-parent = <&ps7_scugic_0>;
            interrupts = <1 13 0x301>;
            reg = <0xf8f00600 0x20>;
        } ;


in qdev_get_gpio n is 125 whereas dev->num_gpio_in is 96 hence the assert firing.
n is calculated from the following line where cpu = 1 and idx is 13 (which is pulled from the DTS file)
*next = qdev_get_gpio_in(intc, (cpu + 2) * 32 + idx + 16);
so 3 * 32 + 13 + 16 does indeed equal 125.

No idea where num_gpio = 96 is though yet, I'll keep digging.

I restrict QEMU to 1 processor:
-M arm-generic-fdt -nographic -smp 1 -machine linux=on -serial mon:stdio


Any help as to why the assert is firing and how to fix this would be greatly appreciated?

Many Thanks,
Martin.




More information about the meta-xilinx mailing list