aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/xmon/xmon.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/arch/powerpc/xmon/xmon.c b/arch/powerpc/xmon/xmon.c
index c6f0a71b405..bdbe96c8a7e 100644
--- a/arch/powerpc/xmon/xmon.c
+++ b/arch/powerpc/xmon/xmon.c
@@ -517,6 +517,15 @@ static int xmon_core(struct pt_regs *regs, int fromipi)
517 in_xmon = 0; 517 in_xmon = 0;
518#endif 518#endif
519 519
520#ifdef CONFIG_BOOKE
521 if (regs->msr & MSR_DE) {
522 bp = at_breakpoint(regs->nip);
523 if (bp != NULL) {
524 regs->nip = (unsigned long) &bp->instr[0];
525 atomic_inc(&bp->ref_count);
526 }
527 }
528#else
520 if ((regs->msr & (MSR_IR|MSR_PR|MSR_SF)) == (MSR_IR|MSR_SF)) { 529 if ((regs->msr & (MSR_IR|MSR_PR|MSR_SF)) == (MSR_IR|MSR_SF)) {
521 bp = at_breakpoint(regs->nip); 530 bp = at_breakpoint(regs->nip);
522 if (bp != NULL) { 531 if (bp != NULL) {
@@ -530,7 +539,7 @@ static int xmon_core(struct pt_regs *regs, int fromipi)
530 } 539 }
531 } 540 }
532 } 541 }
533 542#endif
534 insert_cpu_bpts(); 543 insert_cpu_bpts();
535 544
536 local_irq_restore(flags); 545 local_irq_restore(flags);
@@ -894,6 +903,14 @@ cmds(struct pt_regs *excp)
894 } 903 }
895} 904}
896 905
906#ifdef CONFIG_BOOKE
907static int do_step(struct pt_regs *regs)
908{
909 regs->msr |= MSR_DE;
910 mtspr(SPRN_DBCR0, mfspr(SPRN_DBCR0) | DBCR0_IC | DBCR0_IDM);
911 return 1;
912}
913#else
897/* 914/*
898 * Step a single instruction. 915 * Step a single instruction.
899 * Some instructions we emulate, others we execute with MSR_SE set. 916 * Some instructions we emulate, others we execute with MSR_SE set.
@@ -924,6 +941,7 @@ static int do_step(struct pt_regs *regs)
924 regs->msr |= MSR_SE; 941 regs->msr |= MSR_SE;
925 return 1; 942 return 1;
926} 943}
944#endif
927 945
928static void bootcmds(void) 946static void bootcmds(void)
929{ 947{