All of lore.kernel.org
 help / color / mirror / Atom feed
From: Abdallah Bouassida <abdallah.bouassida@lauterbach.com>
To: qemu-devel@nongnu.org, peter.maydell@linaro.org, alex.bennee@linaro.org
Cc: qemu-arm@nongnu.org, khaled.jmal@lauterbach.com,
	Abdallah Bouassida <abdallah.bouassida@lauterbach.com>
Subject: [Qemu-devel] [PATCH v6 1/3] target/arm: Add "ARM_CP_NO_GDB" as a new bit field for ARMCPRegInfo type
Date: Thu, 19 Apr 2018 16:56:24 +0100	[thread overview]
Message-ID: <1524153386-3550-2-git-send-email-abdallah.bouassida@lauterbach.com> (raw)
In-Reply-To: <1524153386-3550-1-git-send-email-abdallah.bouassida@lauterbach.com>

This is a preparation for the coming feature of creating dynamically an XML
description for the ARM sysregs.
A register has ARM_CP_NO_GDB enabled will not be shown in the dynamic XML.
This bit is enabled automatically when creating CP_ANY wildcard aliases.
This bit could be enabled manually for any register we want to remove from the
dynamic XML description.

Signed-off-by: Abdallah Bouassida <abdallah.bouassida@lauterbach.com>
Reviewed-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
---
 target/arm/cpu.h    | 3 ++-
 target/arm/helper.c | 2 +-
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/target/arm/cpu.h b/target/arm/cpu.h
index 19a0c03..436f675 100644
--- a/target/arm/cpu.h
+++ b/target/arm/cpu.h
@@ -1815,10 +1815,11 @@ static inline uint64_t cpreg_to_kvm_id(uint32_t cpregid)
 #define ARM_LAST_SPECIAL         ARM_CP_DC_ZVA
 #define ARM_CP_FPU               0x1000
 #define ARM_CP_SVE               0x2000
+#define ARM_CP_NO_GDB            0x4000
 /* Used only as a terminator for ARMCPRegInfo lists */
 #define ARM_CP_SENTINEL          0xffff
 /* Mask of only the flag bits in a type field */
-#define ARM_CP_FLAG_MASK         0x30ff
+#define ARM_CP_FLAG_MASK         0x70ff
 
 /* Valid values for ARMCPRegInfo state field, indicating which of
  * the AArch32 and AArch64 execution states this register is visible in.
diff --git a/target/arm/helper.c b/target/arm/helper.c
index dcb8476..799e322 100644
--- a/target/arm/helper.c
+++ b/target/arm/helper.c
@@ -5664,7 +5664,7 @@ static void add_cpreg_to_hashtable(ARMCPU *cpu, const ARMCPRegInfo *r,
     if (((r->crm == CP_ANY) && crm != 0) ||
         ((r->opc1 == CP_ANY) && opc1 != 0) ||
         ((r->opc2 == CP_ANY) && opc2 != 0)) {
-        r2->type |= ARM_CP_ALIAS;
+        r2->type |= ARM_CP_ALIAS | ARM_CP_NO_GDB;
     }
 
     /* Check that raw accesses are either forbidden or handled. Note that
-- 
2.7.4

  reply	other threads:[~2018-04-19 15:56 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-19 15:56 [Qemu-devel] [PATCH v6 0/3] target/arm: Add a dynamic XML-description of the cp-registers to GDB Abdallah Bouassida
2018-04-19 15:56 ` Abdallah Bouassida [this message]
2018-04-19 15:56 ` [Qemu-devel] [PATCH v6 2/3] target/arm: Add "_S" suffix to the secure version of a sysreg Abdallah Bouassida
2018-04-19 15:56 ` [Qemu-devel] [PATCH v6 3/3] target/arm: Add the XML dynamic generation Abdallah Bouassida
2018-05-03 10:19   ` Alex Bennée
2018-05-03 10:26     ` Peter Maydell
2018-05-03 11:54       ` Alex Bennée
2018-05-02 13:31 ` [Qemu-devel] ping Re: [PATCH v6 0/3] target/arm: Add a dynamic XML-description of the cp-registers to GDB Abdallah Bouassida
2018-05-03 19:48 ` [Qemu-devel] " Alex Bennée
2018-05-04  8:12   ` Abdallah Bouassida
2018-05-04  8:22   ` Peter Maydell
2018-05-10 13:12 ` Alex Bennée
2018-05-15 12:03   ` Peter Maydell
2018-05-16  9:03     ` Alex Bennée
2018-05-17 15:23       ` Peter Maydell
2018-05-18 10:35         ` Abdallah Bouassida

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=1524153386-3550-2-git-send-email-abdallah.bouassida@lauterbach.com \
    --to=abdallah.bouassida@lauterbach.com \
    --cc=alex.bennee@linaro.org \
    --cc=khaled.jmal@lauterbach.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-arm@nongnu.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.