From: "Russell King (Oracle)" <linux@armlinux.org.uk>
To: Johannes Stezenbach <js@sig21.net>
Cc: linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH] arm kgdb: fix breakpoint for thumb2
Date: Mon, 14 Feb 2022 10:13:43 +0000 [thread overview]
Message-ID: <YgorVxeMYL6f8DMe@shell.armlinux.org.uk> (raw)
In-Reply-To: <YgooFX2/nMFi6xhB@sig21.net>
On Mon, Feb 14, 2022 at 10:59:49AM +0100, Johannes Stezenbach wrote:
> Entering kdb via SysRq-G with CONFIG_THUMB2_KERNEL=y
> on Cortex-A7 in Qemu results in an Ooops, and it is
> not possible to continue because of "Catastrophic error detected".
> The root cause is using an arm breakpoint instruction in
> thumb code.
This sounds like a bug in qemu.
0xe7ffdeXX is two 16-bit instructions:
0: e7ff b.n 2 <.text+0x2>
2: def1 udf #241 ; 0xf1
0xe7ff is a branch to the UDF instruction.
0xdeXX is a UDF (Permanently undefined) instruction which should raise a
undefined instruction trap. As per the Arm ARM on UDF: "Permanently
Undefined generates an Undefined Instruction exception."
The encoding is also a 32-bit UDF instruction:
0: e7ffdef1 udf #64993 ; 0xfde1
which is exactly why these opcodes were chosen - so we can instrument
both ARM and Thumb code without caring which it is.
Qemu needs fixing if it complains about this.
--
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 40Mbps down 10Mbps up. Decent connectivity at last!
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2022-02-14 11:35 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-14 9:59 [PATCH] arm kgdb: fix breakpoint for thumb2 Johannes Stezenbach
2022-02-14 10:13 ` Russell King (Oracle) [this message]
2022-02-14 11:05 ` Johannes Stezenbach
2022-02-14 12:56 ` Russell King (Oracle)
2022-02-14 18:33 ` Johannes Stezenbach
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=YgorVxeMYL6f8DMe@shell.armlinux.org.uk \
--to=linux@armlinux.org.uk \
--cc=js@sig21.net \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).