Changeset View
Changeset View
Standalone View
Standalone View
head/sys/arm64/arm64/debug_monitor.c
Show First 20 Lines • Show All 447 Lines • ▼ Show 20 Lines | dbg_remove_watchpoint(db_expr_t addr, db_expr_t size, enum dbg_el_t el) | ||||
return (0); | return (0); | ||||
} | } | ||||
void | void | ||||
dbg_monitor_init(void) | dbg_monitor_init(void) | ||||
{ | { | ||||
u_int i; | u_int i; | ||||
/* Clear OS lock */ | |||||
WRITE_SPECIALREG(OSLAR_EL1, 0); | |||||
/* Find out many breakpoints and watchpoints we can use */ | /* Find out many breakpoints and watchpoints we can use */ | ||||
dbg_watchpoint_num = ((READ_SPECIALREG(ID_AA64DFR0_EL1) >> 20) & 0xf) + 1; | dbg_watchpoint_num = ((READ_SPECIALREG(ID_AA64DFR0_EL1) >> 20) & 0xf) + 1; | ||||
dbg_breakpoint_num = ((READ_SPECIALREG(ID_AA64DFR0_EL1) >> 12) & 0xf) + 1; | dbg_breakpoint_num = ((READ_SPECIALREG(ID_AA64DFR0_EL1) >> 12) & 0xf) + 1; | ||||
if (bootverbose && PCPU_GET(cpuid) == 0) { | if (bootverbose && PCPU_GET(cpuid) == 0) { | ||||
db_printf("%d watchpoints and %d breakpoints supported\n", | printf("%d watchpoints and %d breakpoints supported\n", | ||||
dbg_watchpoint_num, dbg_breakpoint_num); | dbg_watchpoint_num, dbg_breakpoint_num); | ||||
} | } | ||||
/* | /* | ||||
* We have limited number of {watch,break}points, each consists of | * We have limited number of {watch,break}points, each consists of | ||||
* two registers: | * two registers: | ||||
* - wcr/bcr regsiter configurates corresponding {watch,break}point | * - wcr/bcr regsiter configurates corresponding {watch,break}point | ||||
* behaviour | * behaviour | ||||
Show All 16 Lines |