From: "Andreas Färber" <afaerber@suse.de>
To: Peter Crosthwaite <peter.crosthwaite@petalogix.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
Anthony Liguori <aliguori@us.ibm.com>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>,
Michal Simek <monstr@monstr.eu>,
"Edgar E. Iglesias" <edgar.iglesias@gmail.com>,
Paolo Bonzini <pbonzini@redhat.com>,
John Williams <john.williams@petalogix.com>
Subject: Re: [Qemu-devel] [RFC] ARMCPU: Halting a CPU from Device Land
Date: Mon, 18 Jun 2012 12:07:17 +0200 [thread overview]
Message-ID: <4FDEFDD5.4050004@suse.de> (raw)
In-Reply-To: <CAEgOgz62=10X_7ufX8CbzE_kvzh6YGZ4bSkubGMrsjb9gaLY9g@mail.gmail.com>
Hi Peter,
Am 18.06.2012 09:22, schrieb Peter Crosthwaite:
> Hi Andreas,
>
> For the Xilinx Zynq platform, we need to be able to halt a CPU from a
> device (the zynq_slcr). E.G, if I write a 1 to a register bit in my
> device, then that device effects a halt of a CPU. Looking at the QOM
> stuff the API for a CPU is (include/qemu/cpu.h):
>
> typedef struct CPUClass {
> /*< private >*/
> ObjectClass parent_class;
> /*< public >*/
>
> void (*reset)(CPUState *cpu);
> } CPUClass;
>
> The only API function is to reset a CPU. Thats means that if I link up
> my CPU to my device the only thing it can do is reset the CPU? Are
> there plans to extend this API to include some common functions such
> as halting and resuming etc? How hard is this to do in a generic (non
> ARM) way?
>
> Peter,
>
> Can it be done is an ARM specific way? Is there a one line killer to
> halt an ARM cpu that we could add the to ARMCPU API?
I'll answer both:
There's the QOM CPUState part 4 series on the list that sequentially
moves more and more fields into CPUState. So far the good news. The bad
news is that merging the halted field movement - despite on the list -
depends on refactorings of the TLB that I haven't gotten around to yet.
(Still caught up in packaging v1.1.)
The ARM-specific way is to cast your CPUState with ARM_CPU(), assuming
your Zynq device is compiled per target like most ARM devices currently
are, then you can access ->env (CPUARMState), which still has the halted
field.
Cheers,
Andreas
--
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer; HRB 16746 AG Nürnberg
next prev parent reply other threads:[~2012-06-18 10:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-06-18 7:22 [Qemu-devel] [RFC] ARMCPU: Halting a CPU from Device Land Peter Crosthwaite
2012-06-18 10:07 ` Andreas Färber [this message]
2012-06-18 11:36 ` Peter Crosthwaite
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=4FDEFDD5.4050004@suse.de \
--to=afaerber@suse.de \
--cc=aliguori@us.ibm.com \
--cc=edgar.iglesias@gmail.com \
--cc=john.williams@petalogix.com \
--cc=monstr@monstr.eu \
--cc=pbonzini@redhat.com \
--cc=peter.crosthwaite@petalogix.com \
--cc=peter.maydell@linaro.org \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.