All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Fabien Chouteau <chouteau@adacore.com>
Cc: "QEMU Developers" <qemu-devel@nongnu.org>,
	"Andreas Färber" <afaerber@suse.de>,
	"Luiz Capitulino" <lcapitulino@redhat.com>
Subject: Re: [Qemu-devel] [PATCH 4/4] Add ARM registers definitions for Monitor commands
Date: Sat, 5 Oct 2013 02:52:22 +0900	[thread overview]
Message-ID: <CAFEAcA-1GOS5z2m_WKLMJCoVBaeGiEG1ZqOPV6QS+UNON_DvaQ@mail.gmail.com> (raw)
In-Reply-To: <1380905823-3981-5-git-send-email-chouteau@adacore.com>

On 5 October 2013 01:57, Fabien Chouteau <chouteau@adacore.com> wrote:
>
> Signed-off-by: Fabien Chouteau <chouteau@adacore.com>
> ---
>  target-arm/Makefile.objs |    2 +-
>  target-arm/cpu.c         |    7 +++++++
>  target-arm/monitor.c     |   40 ++++++++++++++++++++++++++++++++++++++++
>  3 files changed, 48 insertions(+), 1 deletion(-)
>  create mode 100644 target-arm/monitor.c
>
> diff --git a/target-arm/Makefile.objs b/target-arm/Makefile.objs
> index 6453f5c..6c3ec32 100644
> --- a/target-arm/Makefile.objs
> +++ b/target-arm/Makefile.objs
> @@ -1,5 +1,5 @@
>  obj-y += arm-semi.o
> -obj-$(CONFIG_SOFTMMU) += machine.o
> +obj-$(CONFIG_SOFTMMU) += machine.o monitor.o
>  obj-$(CONFIG_KVM) += kvm.o
>  obj-$(CONFIG_NO_KVM) += kvm-stub.o
>  obj-y += translate.o op_helper.o helper.o cpu.o
> diff --git a/target-arm/cpu.c b/target-arm/cpu.c
> index d40f2a7..bb15ee8 100644
> --- a/target-arm/cpu.c
> +++ b/target-arm/cpu.c
> @@ -26,6 +26,9 @@
>  #include "hw/arm/arm.h"
>  #include "sysemu/sysemu.h"
>  #include "sysemu/kvm.h"
> +#include "monitor/monitor_def.h"
> +
> +extern const MonitorDef arm_monitor_defs[];
>
>  static void arm_cpu_set_pc(CPUState *cs, vaddr value)
>  {
> @@ -217,6 +220,10 @@ static void arm_cpu_initfn(Object *obj)
>                         ARRAY_SIZE(cpu->gt_timer_outputs));
>  #endif
>
> +#if !defined(CONFIG_USER_ONLY)
> +    cs->monitor_defs = arm_monitor_defs;
> +#endif
> +
>      if (tcg_enabled() && !inited) {
>          inited = true;
>          arm_translate_init();
> diff --git a/target-arm/monitor.c b/target-arm/monitor.c
> new file mode 100644
> index 0000000..0d68a14
> --- /dev/null
> +++ b/target-arm/monitor.c
> @@ -0,0 +1,40 @@
> +/*
> + * ARM MonitorDef
> + *
> + * Copyright (c) 2013 AdaCore
> + *
> + * This library is free software; you can redistribute it and/or
> + * modify it under the terms of the GNU Lesser General Public
> + * License as published by the Free Software Foundation; either
> + * version 2 of the License, or (at your option) any later version.
> + *
> + * This library is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
> + * Lesser General Public License for more details.
> + *
> + * You should have received a copy of the GNU Lesser General Public
> + * License along with this library; if not, see <http://www.gnu.org/licenses/>.
> + */
> +
> +#include "monitor/monitor_def.h"
> +
> +const MonitorDef arm_monitor_defs[] = {
> +    { "r0",     offsetof(CPUARMState, regs[0])  },
> +    { "r1",     offsetof(CPUARMState, regs[1])  },

These fields are all 32 bits, not target_long,
so they need to be marked as MD_I32. (If you build an
aarch64-softmmu target then it will have target_long be
64 bit but still support all the 32 bit CPUs, so it does
make a difference.)

thanks
-- PMM

  reply	other threads:[~2013-10-04 17:52 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-04 16:56 [Qemu-devel] [PATCH 0/4] Few minor improvements of monitor disas command (v4) Fabien Chouteau
2013-10-04 16:57 ` [Qemu-devel] [PATCH 1/4] Fix coding style Fabien Chouteau
2013-10-04 16:57 ` [Qemu-devel] [PATCH 2/4] Improve Monitor disas with symbol lookup Fabien Chouteau
2013-10-04 16:57 ` [Qemu-devel] [PATCH 3/4] Refactoring MonitorDef array Fabien Chouteau
2013-10-04 17:49   ` Peter Maydell
2013-10-04 17:55     ` Andreas Färber
2013-10-07 10:11     ` Fabien Chouteau
2013-10-07 11:45       ` Peter Maydell
2013-10-07 13:06         ` Fabien Chouteau
2013-10-07 13:29           ` Peter Maydell
2013-10-07 14:40             ` Fabien Chouteau
2013-10-04 16:57 ` [Qemu-devel] [PATCH 4/4] Add ARM registers definitions for Monitor commands Fabien Chouteau
2013-10-04 17:52   ` Peter Maydell [this message]
2013-10-07 10:12     ` Fabien Chouteau
  -- strict thread matches above, loose matches on Subject: below --
2013-09-30 15:57 [Qemu-devel] [PATCH 0/4] Few minor improvements of monitor disas command (v3) Fabien Chouteau
2013-09-30 15:57 ` [Qemu-devel] [PATCH 4/4] Add ARM registers definitions for Monitor commands Fabien Chouteau
2013-10-01  1:12   ` 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=CAFEAcA-1GOS5z2m_WKLMJCoVBaeGiEG1ZqOPV6QS+UNON_DvaQ@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=afaerber@suse.de \
    --cc=chouteau@adacore.com \
    --cc=lcapitulino@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 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.