From: mark.rutland@arm.com (Mark Rutland)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] arm64: kgdb: Match pstate size with gdbserver protocol
Date: Tue, 10 May 2016 11:45:11 +0100 [thread overview]
Message-ID: <20160510104511.GH687@leverpostej> (raw)
In-Reply-To: <1462815566-15086-1-git-send-email-daniel.thompson@linaro.org>
On Mon, May 09, 2016 at 06:39:26PM +0100, Daniel Thompson wrote:
> Current versions of gdb do not interoperate cleanly with kgdb on arm64
> systems because gdb and kgdb do not use the same register description.
> This patch modifies kgdb to work with recent releases of gdb (>= 7.8.1).
>
> Compatibility with gdb (after the patch is applied) is as follows:
>
> gdb-7.6 and earlier Ok
> gdb-7.7 series Works if user provides custom target description
> gdb-7.8(.0) Works if user provides custom target description
> gdb-7.8.1 and later Ok
>
> When commit 44679a4f142b ("arm64: KGDB: Add step debugging support") was
> introduced it was paired with a gdb patch that made an incompatible
> change to the gdbserver protocol. This patch was eventually merged into
> the gdb sources:
> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=a4d9ba85ec5597a6a556afe26b712e878374b9dd
>
> The change to the protocol was mostly made to simplify big-endian support
> inside the kernel gdb stub.
While that was how we discovered the inconsistency, a major concern is
that SPSR_EL* (i.e. PSTATE), as accessed by MRS/MSR is a 64-bit
quantity, even if the upper 32 bits are RES0 today.
It is conceivable that the upper 32 bits could be used in future (as
happened with CLIDR_EL1), and for this reason we expose those upper 32
bits from the kernel, and treat system registers as 64-bit quantities
generally.
So this was also about ensuring the interface was consistent and to some
extent future-proof.
Thanks,
Mark.
WARNING: multiple messages have this Message-ID (diff)
From: Mark Rutland <mark.rutland@arm.com>
To: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
Will Deacon <will.deacon@arm.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, patches@linaro.org,
linaro-kernel@lists.linaro.org,
Jason Wessel <jason.wessel@windriver.com>,
Dave P Martin <Dave.Martin@arm.com>,
Vijaya Kumar K <Vijaya.Kumar@caviumnetworks.com>
Subject: Re: [PATCH] arm64: kgdb: Match pstate size with gdbserver protocol
Date: Tue, 10 May 2016 11:45:11 +0100 [thread overview]
Message-ID: <20160510104511.GH687@leverpostej> (raw)
In-Reply-To: <1462815566-15086-1-git-send-email-daniel.thompson@linaro.org>
On Mon, May 09, 2016 at 06:39:26PM +0100, Daniel Thompson wrote:
> Current versions of gdb do not interoperate cleanly with kgdb on arm64
> systems because gdb and kgdb do not use the same register description.
> This patch modifies kgdb to work with recent releases of gdb (>= 7.8.1).
>
> Compatibility with gdb (after the patch is applied) is as follows:
>
> gdb-7.6 and earlier Ok
> gdb-7.7 series Works if user provides custom target description
> gdb-7.8(.0) Works if user provides custom target description
> gdb-7.8.1 and later Ok
>
> When commit 44679a4f142b ("arm64: KGDB: Add step debugging support") was
> introduced it was paired with a gdb patch that made an incompatible
> change to the gdbserver protocol. This patch was eventually merged into
> the gdb sources:
> https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=a4d9ba85ec5597a6a556afe26b712e878374b9dd
>
> The change to the protocol was mostly made to simplify big-endian support
> inside the kernel gdb stub.
While that was how we discovered the inconsistency, a major concern is
that SPSR_EL* (i.e. PSTATE), as accessed by MRS/MSR is a 64-bit
quantity, even if the upper 32 bits are RES0 today.
It is conceivable that the upper 32 bits could be used in future (as
happened with CLIDR_EL1), and for this reason we expose those upper 32
bits from the kernel, and treat system registers as 64-bit quantities
generally.
So this was also about ensuring the interface was consistent and to some
extent future-proof.
Thanks,
Mark.
next prev parent reply other threads:[~2016-05-10 10:45 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-09 17:39 [PATCH] arm64: kgdb: Match pstate size with gdbserver protocol Daniel Thompson
2016-05-09 17:39 ` Daniel Thompson
2016-05-10 10:28 ` Will Deacon
2016-05-10 10:28 ` Will Deacon
2016-05-10 14:05 ` Daniel Thompson
2016-05-10 14:05 ` Daniel Thompson
2016-05-10 10:45 ` Mark Rutland [this message]
2016-05-10 10:45 ` Mark Rutland
2016-05-10 13:41 ` Daniel Thompson
2016-05-10 13:41 ` Daniel Thompson
2016-05-10 14:31 ` Mark Rutland
2016-05-10 14:31 ` Mark Rutland
2016-05-12 13:08 ` Daniel Thompson
2016-05-12 13:08 ` Daniel Thompson
2016-06-16 15:51 ` [PATCH 4.7-rc3 v2] " Daniel Thompson
2016-06-16 15:51 ` Daniel Thompson
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=20160510104511.GH687@leverpostej \
--to=mark.rutland@arm.com \
--cc=linux-arm-kernel@lists.infradead.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.