Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1397983

Re: [PATCH] arm64: kgdb: Match pstate size with gdbserver protocol

From Mark Rutland <mark.rutland@arm.com>
Newsgroups linux.kernel
Subject Re: [PATCH] arm64: kgdb: Match pstate size with gdbserver protocol
Date 2016-05-10 12:50 +0200
Message-ID <rxdoK-P9-15@gated-at.bofh.it> (permalink)
References <rwXjY-1J7-11@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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.

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH] arm64: kgdb: Match pstate size with gdbserver protocol Daniel Thompson <daniel.thompson@linaro.org> - 2016-05-09 19:40 +0200
  Re: [PATCH] arm64: kgdb: Match pstate size with gdbserver protocol Will Deacon <will.deacon@arm.com> - 2016-05-10 12:30 +0200
    Re: [PATCH] arm64: kgdb: Match pstate size with gdbserver protocol Daniel Thompson <daniel.thompson@linaro.org> - 2016-05-10 16:10 +0200
  Re: [PATCH] arm64: kgdb: Match pstate size with gdbserver protocol Mark Rutland <mark.rutland@arm.com> - 2016-05-10 12:50 +0200
    Re: [PATCH] arm64: kgdb: Match pstate size with gdbserver protocol Daniel Thompson <daniel.thompson@linaro.org> - 2016-05-10 15:50 +0200
      Re: [PATCH] arm64: kgdb: Match pstate size with gdbserver protocol Mark Rutland <mark.rutland@arm.com> - 2016-05-10 16:40 +0200

csiph-web