diff options
author | Mitchell Horne <mhorne@FreeBSD.org> | 2021-01-28 17:53:00 +0000 |
---|---|---|
committer | Mitchell Horne <mhorne@FreeBSD.org> | 2021-02-17 16:09:45 +0000 |
commit | 39df2b568230e02350684e4f4d8353023daa1749 (patch) | |
tree | f7006251e0e026eddd98d2f1ab0302d633ef90d0 | |
parent | 45eabf5754ac1d291bd677fdf29f59ce4bbc2c8f (diff) | |
download | src-39df2b568230e02350684e4f4d8353023daa1749.tar.gz src-39df2b568230e02350684e4f4d8353023daa1749.zip |
arm64: use macros to access special register values
-rw-r--r-- | sys/arm64/arm64/debug_monitor.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/arm64/arm64/debug_monitor.c b/sys/arm64/arm64/debug_monitor.c index dcb3645cf5d4..eb5d19567697 100644 --- a/sys/arm64/arm64/debug_monitor.c +++ b/sys/arm64/arm64/debug_monitor.c @@ -471,11 +471,13 @@ dbg_register_sync(struct debug_monitor_state *monitor) void dbg_monitor_init(void) { + uint64_t aa64dfr0; u_int i; /* Find out many breakpoints and watchpoints we can use */ - dbg_watchpoint_num = ((READ_SPECIALREG(id_aa64dfr0_el1) >> 20) & 0xf) + 1; - dbg_breakpoint_num = ((READ_SPECIALREG(id_aa64dfr0_el1) >> 12) & 0xf) + 1; + aa64dfr0 = READ_SPECIALREG(id_aa64dfr0_el1); + dbg_watchpoint_num = ID_AA64DFR0_WRPs_VAL(aa64dfr0); + dbg_breakpoint_num = ID_AA64DFR0_BRPs_VAL(aa64dfr0); if (bootverbose && PCPU_GET(cpuid) == 0) { printf("%d watchpoints and %d breakpoints supported\n", |