From nobody Thu Mar 21 10:13:48 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 4V0hBV0hhJz5Fkdb; Thu, 21 Mar 2024 10:13:54 +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 4V0hBP6xBFz4503; Thu, 21 Mar 2024 10:13:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1711016030; 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=xZbsVbqHpFwo7UBEA16hxe49GH1bf5DYg0fjkB2zCuI=; b=LbGcKjC8GFq4tXF7wUVTW7fhG8Vn49r/0UU7jkWai2wxACQdGz1IjLNfECxKkfJioOdcBv AZydRrKk6xpERG8ZabxZDE98RkLGSh/or/JZsRG6OpowqqKj74yDTIdSsS5XxfCXlYU4Et WB7uOAJixk/vjgUl2YmzuEeMYJ3IbuxDAysSNoaPRWN0tHsBvqZBUBZwdKFCmLyPsGzDih hWeGlOm4+yNvb7LJU+rxxr2Sro2NU2ur+yUiEr47harq6bYAoHaxD1OCgJeQC4eMFui/Oy rj7IHPyxiayggf226ywQYv9uG+BQnEZM2tXjzMME6mqOCavEl8hMQfUNTwa6gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1711016030; a=rsa-sha256; cv=none; b=BeZqzWSWU9LAykpdgQ0ZwTPrnavXt0jl9Pe0CaZ1a7QJoAl3joS2Q79hzkq7f94SUaFivE e0PdBdI1N/OMXGid6QDDAvVLrwKpkw2BrzQ6WJaw2BXGo1chM5FPYWv8wn8VEyKwwZr6id BwSdgq4NVcF73+N5XlXmdHurfBHHpVHepwNc9gx3R4LqYUU80i0LzHX8SAOdLrBeGczo7v 0aH/MXLZG/tCna56nhzJgGBlvr2iiiQ+scCpgLTZyg5881uAgfIKJdxudgJLUKeHAqn6qI FHPMgE5w40L2sNP5drIPdylPXsyMDLpvutlf+6TN52/PZDN+HVzYdo+16nDkvg== 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=1711016030; 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=xZbsVbqHpFwo7UBEA16hxe49GH1bf5DYg0fjkB2zCuI=; b=aGOyAtV5G9X3FRh8r3a8d70kXcyVTI/+Mf/7IqyV6Uh1vpI2d5zs0ENpTBS9bNMS6kZVm+ E8sM/IjLeqRu8bLK8dTnnQ5WqZTjsAaNTeVgUcK5iBvc5nW8OD4Oxn5fCtqqGTWfILHjPo DUobBRBUaKequux21QGRJIFZ+X9nR9SzJKZGzSriWPCSUGZeRm+KWhYFofC175HuqSQdyo 45zylvTaDo+NWqoFcfx8RcNv++l7U8gA5I/amhiGJeuxIrysCNugUBUe6r/CttIAHesFZM XfngAG9beGeRaVvv4zriarQCKcy1wgDRdMdvf/q8xO9GDE/X8RIa9yTrYr4HDA== 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 4V0hBN6vqQzXR7; Thu, 21 Mar 2024 10:13:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 42LADm2B032458; Thu, 21 Mar 2024 10:13:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 42LADmeQ032455; Thu, 21 Mar 2024 10:13:48 GMT (envelope-from git) Date: Thu, 21 Mar 2024 10:13:48 GMT Message-Id: <202403211013.42LADmeQ032455@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 2e2c983d5234 - main - 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: 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/main X-Git-Reftype: branch X-Git-Commit: 2e2c983d5234cb5457548fc75608d93b2309b254 Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=2e2c983d5234cb5457548fc75608d93b2309b254 commit 2e2c983d5234cb5457548fc75608d93b2309b254 Author: Andrew Turner AuthorDate: 2024-03-12 16:34:41 +0000 Commit: Andrew Turner CommitDate: 2024-03-21 10:13:24 +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 --- 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 480a6da817a2..3d8e753e1c45 100644 --- a/sys/arm64/arm64/debug_monitor.c +++ b/sys/arm64/arm64/debug_monitor.c @@ -495,23 +495,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;