arm: allow the debug stuff in CP14 to be disabled at compile time
The upcoming QCA ipq401x support detects the CP14 debug features, but any attempt to use it causes an undefined instruction error. It apparently needs a specific TZ image loaded by the early bootloader (SBL) in order to enable these kinds of features. So add a new kernel option that explicitly disables this in the arm code - the debugger works fine without it.
This commit is contained in:
@@ -960,6 +960,10 @@ dbg_reset_state(void)
|
||||
void
|
||||
dbg_monitor_init(void)
|
||||
{
|
||||
#ifdef ARM_FORCE_DBG_MONITOR_DISABLE
|
||||
db_printf("ARM Debug Architecture disabled in kernel compilation.\n");
|
||||
return;
|
||||
#else
|
||||
int err;
|
||||
|
||||
/* Fetch ARM Debug Architecture model */
|
||||
@@ -1001,6 +1005,7 @@ dbg_monitor_init(void)
|
||||
|
||||
db_printf("HW Breakpoints/Watchpoints not enabled on CPU%d\n",
|
||||
PCPU_GET(cpuid));
|
||||
#endif /* ARM_FORCE_DBG_MONITOR_DISABLE */
|
||||
}
|
||||
|
||||
CTASSERT(sizeof(struct dbreg) == sizeof(((struct pcpu *)NULL)->pc_dbreg));
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#$FreeBSD$
|
||||
ARMV6 opt_global.h
|
||||
ARMV7 opt_global.h
|
||||
ARM_FORCE_DBG_MONITOR_DISABLE opt_ddb.h
|
||||
CPSW_ETHERSWITCH opt_cpsw.h
|
||||
CPU_ARM1176 opt_global.h
|
||||
CPU_CORTEXA opt_global.h
|
||||
|
||||
Reference in New Issue
Block a user