aboutsummaryrefslogtreecommitdiff
path: root/sys/arm64/arm64/mp_machdep.c
diff options
context:
space:
mode:
authorJohn Baldwin <jhb@FreeBSD.org>2017-08-12 18:42:54 +0000
committerJohn Baldwin <jhb@FreeBSD.org>2017-08-12 18:42:54 +0000
commit992029ba105f46bd43949987d402d406866c58b0 (patch)
treeb46baf486faefeb61b6861463dc76364b1b471ec /sys/arm64/arm64/mp_machdep.c
parentc9ee3caf19f0e058f0b14d7afe421fddd7fe8fc7 (diff)
downloadsrc-992029ba105f46bd43949987d402d406866c58b0.tar.gz
src-992029ba105f46bd43949987d402d406866c58b0.zip
Reliably enable debug exceptions on all CPUs.
Previously, debug exceptions were only enabled on the boot CPU if DDB was enabled in the dbg_monitor_init() function. APs also called this function, but since mp_machdep.c doesn't include opt_ddb.h, the APs ended up calling an empty stub defined in <machine/debug_monitor.h> instead of the real function. Also, if DDB was not enabled in the kernel, the boot CPU would not enable debug exceptions. Fix this by adding a new dbg_init() function that always clears the OS lock to enable debug exceptions which the boot CPU and the APs call. This function also calls dbg_monitor_init() to enable hardware breakpoints from DDB on all CPUs if DDB is enabled. Eventually base support for hardware breakpoints/watchpoints will need to move out of the DDB-only debug_monitor.c for use by userland debuggers. Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D12001
Notes
Notes: svn path=/head/; revision=322437
Diffstat (limited to 'sys/arm64/arm64/mp_machdep.c')
-rw-r--r--sys/arm64/arm64/mp_machdep.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c
index c7e8a8df1e9d..ab1171c777d3 100644
--- a/sys/arm64/arm64/mp_machdep.c
+++ b/sys/arm64/arm64/mp_machdep.c
@@ -52,7 +52,6 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_extern.h>
#include <vm/vm_kern.h>
-#include <machine/debug_monitor.h>
#include <machine/machdep.h>
#include <machine/intr.h>
#include <machine/smp.h>
@@ -272,7 +271,7 @@ init_secondary(uint64_t cpu)
vfp_init();
#endif
- dbg_monitor_init();
+ dbg_init();
pan_enable();
/* Enable interrupts */