From nobody Mon Jul 15 12:38:09 2024 X-Original-To: dev-commits-src-all@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 4WN1vP6rnGz5Qrfm; Mon, 15 Jul 2024 12:38:09 +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 4WN1vP3NtWz4GsR; Mon, 15 Jul 2024 12:38:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1721047089; 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=U6e5YMU7NbAsCCgt6E04HoohoEVsX+J9l4BLgrywRH0=; b=n335euI0hq0kI/mAAivb5XK4X2PztDGu16nzJ5aVr+jN5MSvgUQR3dF8wdChJ6aTpNLi7C +feUt8L9533j6N80LVeoNCoomzhU8cEly9VfPbebwmVNXtDvPocVtKHF4JyQChsBl1HLYE IzQCaUwqLUMoSYKYSDvZvPVq9kWdfDYoEbfjSIEw+qwsQcaZ/+S1nQJoSMqOGKtb0Vwto3 yp9nVU2qnB7opOlXWka7RLQvhRmTuEwQluVrcTPu32YFxIUaH+zdpdq6XvQgfFNNUiAX6n vaNKtbZYpTNLE3AWmBTYdSnTOFIsUx38098sU9QBzbGqSEVY7vNfnm5KUqAYqQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1721047089; a=rsa-sha256; cv=none; b=V6Qe4Un67OrK7NcOvWMQ4uCpXiGHsA9Wx37QDCZ0rQUZDGu13sYFhev0azizfAC66S9GlX L7gEBP7c6pAU+RM4yrDZ/zNhPdrEU7zqJrrNmFrEWI1Lo/6lMco/usOWkSWQippGeRQ+jJ /xMNZdE6/C0/rwCTVwaqUFACDUoE6ASpulDGf7nPmLtclik4oFx38jDyBnm1PvO+kFw806 4fxDoixc+rxW1cnUyhB1JHB8gwwVZlGcNpFjSsxjo6WGD3fYcw/94xKB3R64r6LlXiD0gA qL89+y1k8PBBx9/LkqtE227xmRADlGd4kFQGb2tVb1WNH++YX8f2T/XtxsFSYQ== 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=1721047089; 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=U6e5YMU7NbAsCCgt6E04HoohoEVsX+J9l4BLgrywRH0=; b=DgZVR1YPZJgEFQRXYHjAVWMKACUgCJx3HlI78JzLVbxD2OW80pI0MkU/e2Qw4F+1RvtdkI asIZoMgxkSBWaEt9Ua9u0kXjye8mzhEWA4Ud/2pbxfS0szQObUcikWbLjm9GJAPrYnQryS 14xhvMr5naWm3E8q3zkzX6eQIwu6APN9kh2i3EQhyMCZOGWNjmmHc29HceeTIUFf/IbvHY NNcPO135dQYrfwrZMZHUffb6AjFH2kaGboJawdsjbMa2sJqqAYMMf6IF449Qw6VOlMvT9X M0XyiNHLcpI1oA64a2kFZXHhPBo4eakI16cn4k/P8YV4fvBpOzVi1aOXnXBtBg== 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 4WN1vP3147zsch; Mon, 15 Jul 2024 12:38:09 +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 46FCc9LX059931; Mon, 15 Jul 2024 12:38:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46FCc9xv059928; Mon, 15 Jul 2024 12:38:09 GMT (envelope-from git) Date: Mon, 15 Jul 2024 12:38:09 GMT Message-Id: <202407151238.46FCc9xv059928@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: 531534bef90d - stable/13 - arm64: Always set the debug control and value regs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/13 X-Git-Reftype: branch X-Git-Commit: 531534bef90d6df15d9a1efbd05d2255d9f11ed8 Auto-Submitted: auto-generated The branch stable/13 has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=531534bef90d6df15d9a1efbd05d2255d9f11ed8 commit 531534bef90d6df15d9a1efbd05d2255d9f11ed8 Author: Andrew Turner AuthorDate: 2024-03-12 16:34:41 +0000 Commit: Andrew Turner CommitDate: 2024-07-15 12:34:28 +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 6de148161a7f..7d3ca9db9134 100644 --- a/sys/arm64/arm64/debug_monitor.c +++ b/sys/arm64/arm64/debug_monitor.c @@ -490,23 +490,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;