From nobody Mon Oct 18 19:19:18 2021 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id C6F8617F8351; Mon, 18 Oct 2021 19:19:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4HY6BG5Xy7z4cH3; Mon, 18 Oct 2021 19:19:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9830026027; Mon, 18 Oct 2021 19:19:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 19IJJIUv080207; Mon, 18 Oct 2021 19:19:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 19IJJILE080206; Mon, 18 Oct 2021 19:19:18 GMT (envelope-from git) Date: Mon, 18 Oct 2021 19:19:18 GMT Message-Id: <202110181919.19IJJILE080206@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: c29c0e68765f - main - arm: allow the debug stuff in CP14 to be disabled at compile time List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c29c0e68765f4b98c8507d0dabb976e589b74d4b Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=c29c0e68765f4b98c8507d0dabb976e589b74d4b commit c29c0e68765f4b98c8507d0dabb976e589b74d4b Author: Adrian Chadd AuthorDate: 2021-10-16 18:32:08 +0000 Commit: Adrian Chadd CommitDate: 2021-10-18 19:18:56 +0000 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. --- sys/arm/arm/debug_monitor.c | 5 +++++ sys/conf/options.arm | 1 + 2 files changed, 6 insertions(+) diff --git a/sys/arm/arm/debug_monitor.c b/sys/arm/arm/debug_monitor.c index b73249bedcf1..b9678a5040af 100644 --- a/sys/arm/arm/debug_monitor.c +++ b/sys/arm/arm/debug_monitor.c @@ -960,6 +960,10 @@ vectr_clr: 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)); diff --git a/sys/conf/options.arm b/sys/conf/options.arm index 62f1a79fe314..0e5726e9713e 100644 --- a/sys/conf/options.arm +++ b/sys/conf/options.arm @@ -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