All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] mips: set CP0 Debug DExcCode for SDBBP instruction
@ 2017-05-02 12:03 Pavel Dovgalyuk
  2017-05-03 12:54 ` Philippe Mathieu-Daudé
  2017-05-06 11:42 ` Aurelien Jarno
  0 siblings, 2 replies; 3+ messages in thread
From: Pavel Dovgalyuk @ 2017-05-02 12:03 UTC (permalink / raw)
  To: qemu-devel; +Cc: yongbok.kim, dovgaluk, aurelien

From: Pavel Dovgalyuk <Pavel.Dovgaluk@ispras.ru>

This patch fixes setting DExcCode field of CP0 Debug register
when SDBBP instruction is executed. According to EJTAG specification,
this field must be set to the value 9 (Bp).

Signed-off-by: Pavel Dovgalyuk <pavel.dovgaluk@ispras.ru>
---
 target/mips/helper.c |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/mips/helper.c b/target/mips/helper.c
index e359ca3b44..166f0d1243 100644
--- a/target/mips/helper.c
+++ b/target/mips/helper.c
@@ -627,6 +627,8 @@ void mips_cpu_do_interrupt(CPUState *cs)
         goto set_DEPC;
     case EXCP_DBp:
         env->CP0_Debug |= 1 << CP0DB_DBp;
+        /* Setup DExcCode - SDBBP instruction */
+        env->CP0_Debug = (env->CP0_Debug & ~(0x1fULL << CP0DB_DEC)) | 9 << CP0DB_DEC;
         goto set_DEPC;
     case EXCP_DDBS:
         env->CP0_Debug |= 1 << CP0DB_DDBS;

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

end of thread, other threads:[~2017-05-06 11:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-02 12:03 [Qemu-devel] [PATCH] mips: set CP0 Debug DExcCode for SDBBP instruction Pavel Dovgalyuk
2017-05-03 12:54 ` Philippe Mathieu-Daudé
2017-05-06 11:42 ` Aurelien Jarno

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.