mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH master] ARM: semihosting: use svc instead of incorrect bkpt in DEBUG_LL
@ 2024-08-22 11:56 Ahmad Fatoum
  2024-08-23  8:05 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Ahmad Fatoum @ 2024-08-22 11:56 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

The semihosting DEBUG_LL support was tested on ARM64. Trying it out on
ARM32 leads to a hanging system, because the DEBUG_LL handler used the
wrong instruction (breakpoint) instead of what the normal semihosting
implementation uses (supervisor call).

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 arch/arm/include/asm/semihosting.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/include/asm/semihosting.h b/arch/arm/include/asm/semihosting.h
index 2219e858d040..bdfe472eedc0 100644
--- a/arch/arm/include/asm/semihosting.h
+++ b/arch/arm/include/asm/semihosting.h
@@ -27,8 +27,8 @@ static inline void semihosting_putc(void *unused, int c)
 		"push {%0}\n"
 		"mov r1, sp\n"
 		"mov r0, #0x03\n"
-	 ARM(	"bkpt #0x123456\n")
-	 THUMB(	"bkpt #0xAB\n")
+	 ARM(	"svc #0x123456\n")
+	 THUMB(	"svc #0xAB\n")
 		"pop {%0}\n"
 		: /* No outputs */
 		: "r" (c)
-- 
2.39.2




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH master] ARM: semihosting: use svc instead of incorrect bkpt in DEBUG_LL
  2024-08-22 11:56 [PATCH master] ARM: semihosting: use svc instead of incorrect bkpt in DEBUG_LL Ahmad Fatoum
@ 2024-08-23  8:05 ` Sascha Hauer
  0 siblings, 0 replies; 2+ messages in thread
From: Sascha Hauer @ 2024-08-23  8:05 UTC (permalink / raw)
  To: barebox, Ahmad Fatoum


On Thu, 22 Aug 2024 13:56:30 +0200, Ahmad Fatoum wrote:
> The semihosting DEBUG_LL support was tested on ARM64. Trying it out on
> ARM32 leads to a hanging system, because the DEBUG_LL handler used the
> wrong instruction (breakpoint) instead of what the normal semihosting
> implementation uses (supervisor call).
> 
> 

Applied, thanks!

[1/1] ARM: semihosting: use svc instead of incorrect bkpt in DEBUG_LL
      https://git.pengutronix.de/cgit/barebox/commit/?id=e6c42b7f6571 (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-08-23  8:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-08-22 11:56 [PATCH master] ARM: semihosting: use svc instead of incorrect bkpt in DEBUG_LL Ahmad Fatoum
2024-08-23  8:05 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox