summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include
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/include
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/include')
-rw-r--r--sys/amd64/include/md_var.h1
-rw-r--r--sys/amd64/include/pcpu.h7
2 files changed, 7 insertions, 1 deletions
diff --git a/sys/amd64/include/md_var.h b/sys/amd64/include/md_var.h
index 5d7cb74..6ffcf63 100644
--- a/sys/amd64/include/md_var.h
+++ b/sys/amd64/include/md_var.h
@@ -117,5 +117,6 @@ void minidumpsys(struct dumperinfo *);
struct savefpu *get_pcb_user_save_td(struct thread *td);
struct savefpu *get_pcb_user_save_pcb(struct pcb *pcb);
struct pcb *get_pcb_td(struct thread *td);
+void amd64_db_resume_dbreg(void);
#endif /* !_MACHINE_MD_VAR_H_ */
diff --git a/sys/amd64/include/pcpu.h b/sys/amd64/include/pcpu.h
index bb7d339..ba4c618 100644
--- a/sys/amd64/include/pcpu.h
+++ b/sys/amd64/include/pcpu.h
@@ -78,9 +78,14 @@
struct system_segment_descriptor *pc_tss; \
u_int pc_cmci_mask /* MCx banks for CMCI */ \
PCPU_XEN_FIELDS; \
- char __pad[293] /* be divisor of PAGE_SIZE \
+ uint64_t pc_dbreg[16]; /* ddb debugging regs */ \
+ int pc_dbreg_cmd; /* ddb debugging reg cmd */ \
+ char __pad[161] /* be divisor of PAGE_SIZE \
after cache alignment */
+#define PC_DBREG_CMD_NONE 0
+#define PC_DBREG_CMD_LOAD 1
+
#ifdef _KERNEL
#ifdef lint
OpenPOWER on IntegriCloud