From: Antony Pavlov <antonynpavlov@gmail.com>
To: Peter Crosthwaite <peter.crosthwaite@xilinx.com>
Cc: Peter Maydell <peter.maydell@linaro.org>,
"qemu-devel@nongnu.org Developers" <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] [RFC 1/2] ARM: cpu: add "hivecs" property (high vectors on reset)
Date: Sun, 8 Dec 2013 00:44:27 +0400 [thread overview]
Message-ID: <20131208004427.737a11497cfe45874a93a517@gmail.com> (raw)
In-Reply-To: <CAEgOgz5tUWvcSoskE_3Lz7bj0h06yUD+p2-G7jTOfemWY+3oMQ@mail.gmail.com>
On Sat, 7 Dec 2013 11:00:05 +1000
Peter Crosthwaite <peter.crosthwaite@xilinx.com> wrote:
> On Sat, Dec 7, 2013 at 10:55 AM, Antony Pavlov <antonynpavlov@gmail.com> wrote:
> > Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
> > ---
> > target-arm/cpu-qom.h | 1 +
> > target-arm/cpu.c | 13 +++++++++++++
> > 2 files changed, 14 insertions(+)
> >
> > diff --git a/target-arm/cpu-qom.h b/target-arm/cpu-qom.h
> > index b55306a..116320c 100644
> > --- a/target-arm/cpu-qom.h
> > +++ b/target-arm/cpu-qom.h
> > @@ -128,6 +128,7 @@ typedef struct ARMCPU {
> > uint32_t ccsidr[16];
> > uint32_t reset_cbar;
> > uint32_t reset_auxcr;
> > + bool reset_hivecs;
> > } ARMCPU;
> >
> > #define TYPE_AARCH64_CPU "aarch64-cpu"
> > diff --git a/target-arm/cpu.c b/target-arm/cpu.c
> > index d40f2a7..f838499 100644
> > --- a/target-arm/cpu.c
> > +++ b/target-arm/cpu.c
> > @@ -20,6 +20,7 @@
> >
> > #include "cpu.h"
> > #include "qemu-common.h"
> > +#include "hw/qdev-properties.h"
> > #if !defined(CONFIG_USER_ONLY)
> > #include "hw/loader.h"
> > #endif
> > @@ -119,6 +120,12 @@ static void arm_cpu_reset(CPUState *s)
> > env->regs[15] = pc & ~1;
> > }
> > }
> > +
> > + if (cpu->reset_hivecs) {
> > + uint32_t c1_sys = env->cp15.c1_sys;
> > + env->cp15.c1_sys = c1_sys | (1 << 13);
>
> Why the read modify write? Cant you do it as a one-liner |= ?
>
> env->cp15.c1_sys |= (1 << 13);
>
> > + }
> > +
> > env->vfp.xregs[ARM_VFP_FPEXC] = 0;
> > #endif
> > set_flush_to_zero(1, &env->vfp.standard_fp_status);
> > @@ -854,6 +861,11 @@ typedef struct ARMCPUInfo {
> > void (*class_init)(ObjectClass *oc, void *data);
> > } ARMCPUInfo;
> >
> > +static Property arm_cpu_properties[] = {
> > + DEFINE_PROP_BOOL("hivecs", ARMCPU, reset_hivecs, false),
>
> As this is indicating a reset value, "reset" should feature in the
> property name.
>
> > + DEFINE_PROP_END_OF_LIST(),
> > +};
> > +
> > static const ARMCPUInfo arm_cpus[] = {
> > #if !defined(CONFIG_USER_ONLY) || !defined(TARGET_AARCH64)
> > { .name = "arm926", .initfn = arm926_initfn },
> > @@ -902,6 +914,7 @@ static void arm_cpu_class_init(ObjectClass *oc, void *data)
> >
> > acc->parent_realize = dc->realize;
> > dc->realize = arm_cpu_realizefn;
> > + dc->props = arm_cpu_properties;
>
> This unconditionally adds the property to all ARM CPUs, wheras its
> only valid for a subset of ARM CPUs (!M). Check the earlier patches in
> the CBAR/highbank/zynq series on list for the change pattern for
> adding it as a conditional dynamic property instead. I'll take it into
Is there any public repo with this changes?
> that series if you want to rebase onto my patch set (will save you
> having to conflict by adding post-init fn which is still absent from
> mainline).
>
> Regards,
> Peter
>
> >
> > acc->parent_reset = cc->reset;
> > cc->reset = arm_cpu_reset;
> > --
> > 1.8.5
> >
> >
--
--
Best regards,
Antony Pavlov
next prev parent reply other threads:[~2013-12-07 20:37 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-09-07 7:04 [Qemu-devel] [RFC v5 0/5] hw/arm: add initial support for Canon DIGIC SoC Antony Pavlov
2013-09-07 7:04 ` [Qemu-devel] [RFC v5 1/5] hw/arm: add very " Antony Pavlov
2013-09-13 14:48 ` Andreas Färber
2013-09-07 7:04 ` [Qemu-devel] [RFC v5 2/5] hw/arm/digic: prepare DIGIC-based boards support Antony Pavlov
2013-10-17 18:01 ` Peter Maydell
2013-10-17 18:51 ` Georg Hofstetter
2013-10-17 19:17 ` Peter Maydell
2013-10-20 0:13 ` Georg Hofstetter
2013-10-22 11:26 ` Antony Pavlov
2013-12-04 20:22 ` Antony Pavlov
2013-12-04 20:29 ` Peter Maydell
2013-12-04 21:20 ` Antony Pavlov
2013-12-04 21:34 ` Peter Maydell
2013-12-05 0:20 ` Peter Crosthwaite
2013-12-05 8:02 ` Peter Maydell
2013-12-05 0:25 ` Peter Crosthwaite
2013-12-05 7:59 ` Peter Maydell
2013-12-07 0:55 ` [Qemu-devel] [RFC 0/2] ARM: make possible to use high vectors for reset exception Antony Pavlov
2013-12-07 0:55 ` [Qemu-devel] [RFC 1/2] ARM: cpu: add "hivecs" property (high vectors on reset) Antony Pavlov
2013-12-07 1:00 ` Peter Crosthwaite
2013-12-07 20:44 ` Antony Pavlov [this message]
2013-12-07 22:14 ` Peter Crosthwaite
2013-12-07 1:14 ` Peter Maydell
2013-12-07 0:55 ` [Qemu-devel] [RFC 2/2] ARM: arm_cpu_reset: make possible to use high vectors for reset_exc Antony Pavlov
2013-12-07 1:08 ` Peter Crosthwaite
2013-12-07 20:49 ` Antony Pavlov
2013-12-07 21:03 ` Peter Maydell
2013-09-07 7:04 ` [Qemu-devel] [RFC v5 3/5] hw/arm/digic: add timer support Antony Pavlov
2013-10-17 17:51 ` Peter Maydell
2013-09-07 7:04 ` [Qemu-devel] [RFC v5 4/5] hw/arm/digic: add UART support Antony Pavlov
2013-10-17 17:54 ` Peter Maydell
2013-10-22 10:48 ` Antony Pavlov
2013-09-07 7:04 ` [Qemu-devel] [RFC v5 5/5] hw/arm/digic: add NOR ROM support Antony Pavlov
2013-10-17 18:00 ` Peter Maydell
2013-09-13 14:37 ` [Qemu-devel] [RFC v5 0/5] hw/arm: add initial support for Canon DIGIC SoC Antony Pavlov
2013-09-20 9:01 ` [Qemu-devel] [RFC v5 0/5] hw/arm: add initial support for Canon DIGIC SoC: ping-ping Antony Pavlov
2013-09-28 10:41 ` [Qemu-devel] [RFC v5 0/5] hw/arm: add initial support for Canon DIGIC SoC: ping-ping-ping Antony Pavlov
2013-09-28 10:50 ` Peter Maydell
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=20131208004427.737a11497cfe45874a93a517@gmail.com \
--to=antonynpavlov@gmail.com \
--cc=peter.crosthwaite@xilinx.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 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).