All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: Nick Hudson <hnick@vmware.com>
Cc: "open list:ARM TCG CPUs" <qemu-arm@nongnu.org>,
	Mohannad Ismail <imohannad@vmware.com>,
	"open list:All patches CC here" <qemu-devel@nongnu.org>
Subject: Re: [PATCH v2] target/arm: Correct the encoding of MDCCSR_EL0 and DBGDSCRint
Date: Thu, 8 Jul 2021 10:50:45 +0100	[thread overview]
Message-ID: <CAFEAcA9Cqzh716p6bhed5MHGcQXpki0SrQZQS3NSLOGwoF3fkg@mail.gmail.com> (raw)
In-Reply-To: <20210706134457.81059-1-hnick@vmware.com>

On Tue, 6 Jul 2021 at 14:45, <hnick@vmware.com> wrote:
>
> Signed-off-by: Nick Hudson <hnick@vmware.com>
> ---
>  target/arm/helper.c | 16 +++++++++++++---
>  1 file changed, 13 insertions(+), 3 deletions(-)
>
> diff --git a/target/arm/helper.c b/target/arm/helper.c
> index a66c1f0b9e..910ace4274 100644
> --- a/target/arm/helper.c
> +++ b/target/arm/helper.c
> @@ -6326,11 +6326,21 @@ static const ARMCPRegInfo debug_cp_reginfo[] = {
>        .access = PL1_RW, .accessfn = access_tda,
>        .fieldoffset = offsetof(CPUARMState, cp15.mdscr_el1),
>        .resetvalue = 0 },
> -    /* MDCCSR_EL0, aka DBGDSCRint. This is a read-only mirror of MDSCR_EL1.
> +    /*
> +     * MDCCSR_EL0[30:29] map to EDSCR[30:29].  Simply RAZ as the external
> +     * Debug Communication Channel is not implemented.
> +     */
> +    { .name = "MDCCSR_EL0", .state = ARM_CP_STATE_AA64,
> +      .opc0 = 2, .opc1 = 3, .crn = 0, .crm = 1, .opc2 = 0,
> +      .access = PL0_R, .accessfn = access_tda,
> +      .type = ARM_CP_CONST, .resetvalue = 0 },
> +    /*
> +     * DBGDSCRint[15,12,5:2] map to MDSCR_EL1[15,12,5:2].  Map all bits as
> +     * it is unlikely a guest will care.
>       * We don't implement the configurable EL0 access.
>       */
> -    { .name = "MDCCSR_EL0", .state = ARM_CP_STATE_BOTH,
> -      .cp = 14, .opc0 = 2, .opc1 = 0, .crn = 0, .crm = 1, .opc2 = 0,
> +    { .name = "DBGDSCRint", .state = ARM_CP_STATE_AA32,
> +      .cp = 14, .opc1 = 0, .crn = 0, .crm = 1, .opc2 = 0,
>        .type = ARM_CP_ALIAS,
>        .access = PL1_R, .accessfn = access_tda,
>        .fieldoffset = offsetof(CPUARMState, cp15.mdscr_el1), },



Applied to target-arm.next, thanks.

-- PMM


      reply	other threads:[~2021-07-08  9:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-06 13:44 [PATCH v2] target/arm: Correct the encoding of MDCCSR_EL0 and DBGDSCRint hnick
2021-07-08  9:50 ` Peter Maydell [this message]

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=CAFEAcA9Cqzh716p6bhed5MHGcQXpki0SrQZQS3NSLOGwoF3fkg@mail.gmail.com \
    --to=peter.maydell@linaro.org \
    --cc=hnick@vmware.com \
    --cc=imohannad@vmware.com \
    --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.