qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] reset strategy?


From: Peter Crosthwaite
Subject: Re: [Qemu-devel] reset strategy?
Date: Sat, 27 Jun 2015 11:03:49 -0700

On Sat, Jun 27, 2015 at 1:19 AM, Liviu Ionescu <address@hidden> wrote:
> I migrated most of the qdev_* calls to object_* and device_* calls.
>
> however, after I switched from qdev_create() to object_new(), I noticed that 
> without the sysbus, there is no automated mechanism to reset the peripherals 
> attached to the mcu.
>

Try this after object creation (see xlnx-zynqmp init fn):

    qdev_set_parent_bus(DEVICE(&s->gic), sysbus_get_default());

Note we are trying to phase out object_new in favor of embedding the
device structs in the SoC container, which would mean use of
object_initialise instead of object_new.

> my solution was to manually propagate the reset to all children devices (via 
> device_reset()).
>
> is this the planned reset strategy in a non-qdev environment? I read 
> something about using interfaces for implementing buses, but I think that for 
> propagating resets inside the cortex-m mcu's the additional complexity 
> introduced by buses is not required.
>

Ultimately that's a bug, the system wide reset should not depend on
qdev. I think I actually have a patch for it in Xilinx tree, let me
look around on Monday. But I would do the above change, as that also
solves other problems (mainly be able to use QOM links with the
objects pre-realize).

Regards,
Peter

>
> regards,
>
> Liviu
>
>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]