summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/amd64/amd64/db_interface.c21
-rw-r--r--sys/i386/i386/db_interface.c21
2 files changed, 40 insertions, 2 deletions
diff --git a/sys/amd64/amd64/db_interface.c b/sys/amd64/amd64/db_interface.c
index 5f028b0..2b31d8e 100644
--- a/sys/amd64/amd64/db_interface.c
+++ b/sys/amd64/amd64/db_interface.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_interface.c,v 1.28 1997/04/26 11:45:03 peter Exp $
+ * $Id: db_interface.c,v 1.1 1997/06/26 18:40:55 smp Exp smp $
*/
/*
@@ -38,6 +38,10 @@
#include <machine/cons.h>
#include <machine/md_var.h>
#include <machine/segments.h>
+#ifdef SMP
+#include <machine/smp.h>
+#include <machine/smptests.h> /** TEST_CPUSTOP */
+#endif
#include <vm/vm.h>
#include <vm/vm_param.h>
@@ -134,6 +138,11 @@ kdb_trap(type, code, regs)
cnpollc(TRUE);
+#if defined(SMP) && defined(TEST_CPUSTOP)
+ /* we stopp all CPUs except ourselves (obviously) */
+ stop_cpus(other_cpus);
+#endif /* SMP && TEST_CPUSTOP */
+
(void) setjmp(db_global_jmpbuf);
db_global_jmpbuf_valid = TRUE;
if (ddb_mode)
@@ -142,6 +151,16 @@ kdb_trap(type, code, regs)
gdb_handle_exception(&ddb_regs, type, code);
db_global_jmpbuf_valid = FALSE;
+#if defined(SMP) && defined(TEST_CPUSTOP)
+ /* restart all the CPUs we previously stopped */
+ if (stopped_cpus != other_cpus) {
+ db_printf("whoa, other_cpus: 0x%08x, stopped_cpus: 0x%08x\n",
+ other_cpus, stopped_cpus);
+ cngetc();
+ }
+ restart_cpus(stopped_cpus);
+#endif /* SMP && TEST_CPUSTOP */
+
cnpollc(FALSE);
regs->tf_eip = ddb_regs.tf_eip;
diff --git a/sys/i386/i386/db_interface.c b/sys/i386/i386/db_interface.c
index 5f028b0..2b31d8e 100644
--- a/sys/i386/i386/db_interface.c
+++ b/sys/i386/i386/db_interface.c
@@ -23,7 +23,7 @@
* any improvements or extensions that they make and grant Carnegie the
* rights to redistribute these changes.
*
- * $Id: db_interface.c,v 1.28 1997/04/26 11:45:03 peter Exp $
+ * $Id: db_interface.c,v 1.1 1997/06/26 18:40:55 smp Exp smp $
*/
/*
@@ -38,6 +38,10 @@
#include <machine/cons.h>
#include <machine/md_var.h>
#include <machine/segments.h>
+#ifdef SMP
+#include <machine/smp.h>
+#include <machine/smptests.h> /** TEST_CPUSTOP */
+#endif
#include <vm/vm.h>
#include <vm/vm_param.h>
@@ -134,6 +138,11 @@ kdb_trap(type, code, regs)
cnpollc(TRUE);
+#if defined(SMP) && defined(TEST_CPUSTOP)
+ /* we stopp all CPUs except ourselves (obviously) */
+ stop_cpus(other_cpus);
+#endif /* SMP && TEST_CPUSTOP */
+
(void) setjmp(db_global_jmpbuf);
db_global_jmpbuf_valid = TRUE;
if (ddb_mode)
@@ -142,6 +151,16 @@ kdb_trap(type, code, regs)
gdb_handle_exception(&ddb_regs, type, code);
db_global_jmpbuf_valid = FALSE;
+#if defined(SMP) && defined(TEST_CPUSTOP)
+ /* restart all the CPUs we previously stopped */
+ if (stopped_cpus != other_cpus) {
+ db_printf("whoa, other_cpus: 0x%08x, stopped_cpus: 0x%08x\n",
+ other_cpus, stopped_cpus);
+ cngetc();
+ }
+ restart_cpus(stopped_cpus);
+#endif /* SMP && TEST_CPUSTOP */
+
cnpollc(FALSE);
regs->tf_eip = ddb_regs.tf_eip;
OpenPOWER on IntegriCloud