summaryrefslogtreecommitdiffstats
path: root/sys/amd64/amd64/mp_machdep.c
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2013-05-21 11:24:32 +0000
committerkib <kib@FreeBSD.org>2013-05-21 11:24:32 +0000
commitb2b2f0b7824de13c4ff93c389bf00cfa0a78cb38 (patch)
treed5ea9e63d608b4413df87835f72df81b024daad1 /sys/amd64/amd64/mp_machdep.c
parent5ee265a48b9d84470be16cf6a33fb09cd280a92a (diff)
downloadFreeBSD-src-b2b2f0b7824de13c4ff93c389bf00cfa0a78cb38.zip
FreeBSD-src-b2b2f0b7824de13c4ff93c389bf00cfa0a78cb38.tar.gz
Fix the hardware watchpoints on SMP amd64. Load the updated %dr
registers also on other CPUs, besides the CPU which happens to execute the ddb. The debugging registers are stored in the pcpu area, together with the command which is executed by the IPI stop handler upon resume. Reviewed by: jhb Sponsored by: The FreeBSD Foundation MFC after: 1 week
Diffstat (limited to 'sys/amd64/amd64/mp_machdep.c')
-rw-r--r--sys/amd64/amd64/mp_machdep.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c
index 31dbb3f..5f4aacf 100644
--- a/sys/amd64/amd64/mp_machdep.c
+++ b/sys/amd64/amd64/mp_machdep.c
@@ -28,6 +28,7 @@
__FBSDID("$FreeBSD$");
#include "opt_cpu.h"
+#include "opt_ddb.h"
#include "opt_kstack_pages.h"
#include "opt_sched.h"
#include "opt_smp.h"
@@ -1396,6 +1397,10 @@ cpustop_handler(void)
CPU_CLR_ATOMIC(cpu, &started_cpus);
CPU_CLR_ATOMIC(cpu, &stopped_cpus);
+#ifdef DDB
+ amd64_db_resume_dbreg();
+#endif
+
if (cpu == 0 && cpustop_restartfunc != NULL) {
cpustop_restartfunc();
cpustop_restartfunc = NULL;
OpenPOWER on IntegriCloud