From nobody Mon Jul 15 12:38:03 2024 X-Original-To: dev-commits-src-branches@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 4WN1vH4ds9z5QrPN; Mon, 15 Jul 2024 12:38:03 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WN1vH30b6z4H0r; Mon, 15 Jul 2024 12:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721047083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vIRPQ8BfX0AijCD9mDE/fQrTXkZwG/zsXVSSxJ8ENzg=; b=v5lMN5e8w+lDx7gtstUdXKUXOdeWZ3nS1o9t+h5jjrLVdHgKqeHXmTKBGJGs+hx5vOW/jM 3MNOZ44rQo+DByjDGszY0XKQswyic+fwsoB0lYxauCLxQQA0WvQg3PJQU1MHtONWQ8h2ql kPoIaIlDIG1mJsx7ekzpfuKHZY+qVU8GQHlL0DBGYnxtJdUGzG9685cINsHdeZKXMJVAIN vNnrHT84mfcJV6VlzxhAIeccIIusALvdoV1iSu0QS/NJqmrJiOgFEgHOj4L/nVCF8HH5wv nObtgRN6vtY87NjbBRlOctzFTQHcTc5WgS+k/zJ/B2HRNF8tAZc6pgny4NwhZg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721047083; a=rsa-sha256; cv=none; b=O9qzzeW+3ZTI2eczp6F8YLCzfHCchJxAovaUVR5e3YPl2clM5jf4Dz/a+S0/kiXMGP9LGC Ph4WxUI5QclZu3TgvMKloQKDovH9ebUnjPsJlj8evSaZ/DU6pCBk3cL8JtUY4LIN4Bgfml jJHEYnCmpRO0uhKtJkMvp6WXVDiYLl/rfppegjzoCCTDzNd8UCbhq51DZwmPz+Eg7A+WTb dDKOvYtPJ10iEFU8iPTI9odgppc0Ue1bpL/KhzhxI5FThc4Eh9hvSJtBGa1395RXP991Oo 0hOzIkkGG/PqzFfOHKEtliB3Nxx6UKbInyo33O10QC6ZFDlzTCUc9GVxi/x4QQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721047083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vIRPQ8BfX0AijCD9mDE/fQrTXkZwG/zsXVSSxJ8ENzg=; b=MrZgvj6L0R4OlWN+G2KzlN0+Zn4uMhEpA2AzRWAgR+cRZjj27rIQ69O7jzOLhJZJwJR0vT lv5jQf8xtxECYqJm6W8UpeU+VZA4aFhfhHLVTZH8GqnK3AS7FikUMPiErI80JcjZ8WSrDf 9B+RppKo1+6fhjuf1Ru/HkjkHix5QqE2lfurJWl3lSZ5esOMq6ndFym+/1eQqIQecaqZme T1et7NZWK2+em9t3pSkM+16WpYD73eDh6ksk4d7IEKGo1pzgRd1o4hEEFesQbZgvqLAGOQ uOZaRX/fQAzHwK/ePgHud0eqFu2Pt8OPlhcuYlnpccxoH2sbdopeLbeykbBvnA== 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 4WN1vH2d7FzsLx; Mon, 15 Jul 2024 12:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 46FCc3L5059381; Mon, 15 Jul 2024 12:38:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FCc3MF059378; Mon, 15 Jul 2024 12:38:03 GMT (envelope-from git) Date: Mon, 15 Jul 2024 12:38:03 GMT Message-Id: <202407151238.46FCc3MF059378@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Turner Subject: git: c3d86d27c3aa - stable/14 - arm64: Always set the debug control and value regs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c3d86d27c3aa5308bc1d9d1a8a95da7efaf34773 Auto-Submitted: auto-generated The branch stable/14 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=c3d86d27c3aa5308bc1d9d1a8a95da7efaf34773 commit c3d86d27c3aa5308bc1d9d1a8a95da7efaf34773 Author: Andrew Turner AuthorDate: 2024-03-12 16:34:41 +0000 Commit: Andrew Turner CommitDate: 2024-07-15 12:23:38 +0000 arm64: Always set the debug control and value regs When listing watchpoints we read the raw registers. To ensure we print an accurate list always set the watchpoint and breakpoint registers. Sponsored by: Arm Ltd Reviewed by: jhb Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D44351 (cherry picked from commit 2e2c983d5234cb5457548fc75608d93b2309b254) --- sys/arm64/arm64/debug_monitor.c | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/sys/arm64/arm64/debug_monitor.c b/sys/arm64/arm64/debug_monitor.c index 380915d5163a..f3e4b504f15e 100644 --- a/sys/arm64/arm64/debug_monitor.c +++ b/sys/arm64/arm64/debug_monitor.c @@ -496,23 +496,24 @@ dbg_register_sync(struct debug_monitor_state *monitor) if (monitor == NULL) monitor = &kernel_monitor; + for (i = 0; i < dbg_breakpoint_num; i++) { + dbg_wb_write_reg(DBG_REG_BASE_BCR, i, + monitor->dbg_bcr[i]); + dbg_wb_write_reg(DBG_REG_BASE_BVR, i, + monitor->dbg_bvr[i]); + } + + for (i = 0; i < dbg_watchpoint_num; i++) { + dbg_wb_write_reg(DBG_REG_BASE_WCR, i, + monitor->dbg_wcr[i]); + dbg_wb_write_reg(DBG_REG_BASE_WVR, i, + monitor->dbg_wvr[i]); + } + mdscr = READ_SPECIALREG(mdscr_el1); if ((monitor->dbg_flags & DBGMON_ENABLED) == 0) { mdscr &= ~(MDSCR_MDE | MDSCR_KDE); } else { - for (i = 0; i < dbg_breakpoint_num; i++) { - dbg_wb_write_reg(DBG_REG_BASE_BCR, i, - monitor->dbg_bcr[i]); - dbg_wb_write_reg(DBG_REG_BASE_BVR, i, - monitor->dbg_bvr[i]); - } - - for (i = 0; i < dbg_watchpoint_num; i++) { - dbg_wb_write_reg(DBG_REG_BASE_WCR, i, - monitor->dbg_wcr[i]); - dbg_wb_write_reg(DBG_REG_BASE_WVR, i, - monitor->dbg_wvr[i]); - } mdscr |= MDSCR_MDE; if ((monitor->dbg_flags & DBGMON_KERNEL) == DBGMON_KERNEL) mdscr |= MDSCR_KDE;