qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Damien Hedde <damien.hedde@greensocs.com>
To: "Edgar E. Iglesias" <edgar.iglesias@xilinx.com>,
	Peter Maydell <peter.maydell@linaro.org>
Cc: "Philippe Mathieu-Daudé" <philmd@redhat.com>,
	"Mark Burton" <mark.burton@greensocs.com>,
	"QEMU Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [RFC] multi phase reset
Date: Wed, 6 Mar 2019 10:05:50 +0100	[thread overview]
Message-ID: <4c1c9c2c-73e9-bacf-b4c4-3fa425480e3f@greensocs.com> (raw)
In-Reply-To: <20190304102912.GC6010@toto>

Hi Edgar,

On 3/4/19 11:29 AM, Edgar E. Iglesias wrote:
> Hi Damien and others,
> 
> A few questions from my side.
> 
> We sometimes see that wires from generic GPIO blocks get connected to reset inputs.
> This happens both to off-chip perihperals but we also see it on-chip.
> 
> To avoid having GPIO modules know that some of their outputs are being used as
> reset signals it would be nice to have a reset proxy that allows any qemu_irq to
> drive resets for a given device. Perhaps even with built-in options for both interpreting
> "active-low" and "active-high". I think it would even be useful to have this
> in qdev but that may be pushing it too far. Any thoughts on that?
Do you mean for Device or other objects as well ? I planned to add a
function so that a Device could declare one of its gpio/irq input as
reset. It is straightforward since we just need to set the proper
handler to the irq. The device controlling the irq (output) would have
no knowledge of that.

> 
> Have you thought about what happens if someone does an MMIO access to a device while
> its reset is active? Were you planning to have some "default" SysBus level handling to
> block MMIO while in reset or anything like that? Or would that be handled individually
> by each device model?Right know it would be handled individually by each model. With
In my first power/clock gating implementation (last year), I tried to do
a kind of default deactivation of mmio memory region in SysbusDevice
object and it appears to me it is complicated for 2 reasons:
+ A device has to handle its memory region flag/properties during
migration (if we automatically disable things, should we automatically
migrate this ?)
+ Some memory regions may already be disabled, so we cannot simply
disabled the mmio array and re-enabled it later.

Right know for the cadence_uart, I check this in the Device itself.

I'm no expert of memory regions, so there is maybe a simple solution I
don't see.
> 
> Another question is regarding reset of CPUs. It would be nice to be able to expose
> similar interfaces and have some defined behaviour for CPUs that are in reset. E.g,
> if reset is active the CPU does not execute etc.
> 
> Cheers,
> Edgar
> 

  reply	other threads:[~2019-03-06  9:06 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-25 10:49 [Qemu-devel] [RFC] multi phase reset Damien Hedde
2019-02-25 10:54 ` Peter Maydell
2019-03-01 11:43 ` Peter Maydell
2019-03-01 15:34   ` Damien Hedde
2019-03-01 16:52     ` Peter Maydell
2019-03-02 19:41       ` Philippe Mathieu-Daudé
2019-03-03 10:59         ` Peter Maydell
2019-03-04 10:18           ` Edgar E. Iglesias
2019-03-04 10:29           ` Edgar E. Iglesias
2019-03-06  9:05             ` Damien Hedde [this message]
2019-03-04 14:04       ` Damien Hedde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4c1c9c2c-73e9-bacf-b4c4-3fa425480e3f@greensocs.com \
    --to=damien.hedde@greensocs.com \
    --cc=edgar.iglesias@xilinx.com \
    --cc=mark.burton@greensocs.com \
    --cc=peter.maydell@linaro.org \
    --cc=philmd@redhat.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).