From nobody Tue Sep 29 21:22:08 2026 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 4hvWN61pGGz6vCl2 for ; Tue, 29 Sep 2026 21:22:14 +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 "YR2" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4hvWN60rHjz51Xd for ; Tue, 29 Sep 2026 21:22:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790716934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LlF9qpjMbOQ6472ONCIfmyUnZnfz8gXfn1pREgasulI=; b=xd9GobW2LcQCsLxg7NQUuACWgCapVOJJmQ7V6aR75RTI/KVmnHK0zSY6s517S5xFHB7Yrc 6jPCGqcK4iWhKJ4Ljj42tiK5uwjUyYhnWQd0kyglb4/TFPQTKLqrJP15kK7ZN/W6/I4Zgc 4yHqIe3cSbvT6vnA598io7tvFNq2RTGHxViV4bXVCi15n9nWp9+fYv8lilqjpBpqp08IQX bh54ONz4mRowrQbQZf8T9Qu3K7kwgdcckKS/fxnnU/r+6glmafHjYC4G9td1mfpdGLrHaM nZ9LDmfHsKX85qZe2xsUV8+e9/93N39WBI6YJcj6FDHkhpyzN39RgGh29xOuPg== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1790716934; b=wP1CDaveJo2Si30JW5HXzS77y4LL9pc5j/f9IGW7vE1Ota9UC11YuXidq1mrspaMkxgWOb GhGo7rxAE6Q9imBBTapqbqAkhJiOgvBvTJDDhPQDzYFLTqd2bYlYoL/oJ6BabQLcQ8ikTj rKocnM5mP4r3CfPtOpRumIYF7J8OJx7QMEywNzN9qrg4MXXvhaxqBGiSKFHsyU6vdhDM+F ovHSWge0zgtTvoivj25Hu+40UBPBcsw9AAFMpucsD16EVzgdn9dvyvjMpA7ZIBwztB7BLX o62tjQ3QO0tVk9ivsPl9klETyCpkRMKpfbbrPgKpXXA6oZRgZ4NrDWHq4WGImA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1790716934; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LlF9qpjMbOQ6472ONCIfmyUnZnfz8gXfn1pREgasulI=; b=o495N7sy9CxzIIUr1xzOcC7vrDYq0f5KXQZcDxcguGBwnYxxW2A38iV5VjZJztejglBFcj wZ3HM6YrqQkFgJ6QXbW+OCJEyqeHrxNayA/RaodgYysU8SGp1dzYkhIbiYgvUaTSRqVNlB dFknfKABdKPRycthaaEHLAoXbOmx+SIRqvi5EorCv3jfpBDPXzP/WZHmso0esYbOcIfvpi zLafgKphui7Wxw3Rt/Qj2IB/PIEGi5ZulH3VCWvOkaMvNul5g8XKQDB/eOim/H/XNuJ3a0 JDM91LT/GYXze7EWvZHt9ByTVXPX1zhZowWXusc6GrNzIEax7WiNJvsekpRE8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4hvWN56TWWzGBK for ; Tue, 29 Sep 2026 21:22:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24c01 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 29 Sep 2026 21:22:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Cc: Kajetan Puchalski From: Jessica Clarke Subject: git: c3e55f4b5d53 - stable/15 - bhyve: rtc_pl031: Fix PeriphID and CellID values 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrtc27 X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: c3e55f4b5d535b6ec7c46736a9c95295bbf0918d Auto-Submitted: auto-generated Date: Tue, 29 Sep 2026 21:22:08 +0000 Message-Id: <6abc2c00.24c01.2191633e@gitrepo.freebsd.org> The branch stable/15 has been updated by jrtc27: URL: https://cgit.FreeBSD.org/src/commit/?id=c3e55f4b5d535b6ec7c46736a9c95295bbf0918d commit c3e55f4b5d535b6ec7c46736a9c95295bbf0918d Author: Kajetan Puchalski AuthorDate: 2026-08-07 11:57:02 +0000 Commit: Jessica Clarke CommitDate: 2026-09-29 21:20:29 +0000 bhyve: rtc_pl031: Fix PeriphID and CellID values PeriphID and CellID values are determined by macros which take an index. They currently receive a bus offset which has a stride of 4 bytes. This causes the ID1-3 registers to report incorrect values. Scale the offset before passing it to the macro to fix this. Tested with kvm-unit-tests/arm/pl031. Signed-off-by: Kajetan Puchalski Reviewed by: jrtc27 Fixes: 014d7082a239 ("bhyve: Implement a PL031 RTC on arm64") MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2358 Closes: https://github.com/freebsd/freebsd-src/pull/2358 (cherry picked from commit a554906ea44c26925730a25263e64890d48d2b36) --- usr.sbin/bhyve/rtc_pl031.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/bhyve/rtc_pl031.c b/usr.sbin/bhyve/rtc_pl031.c index e334de6f92bb..74d392e5c023 100644 --- a/usr.sbin/bhyve/rtc_pl031.c +++ b/usr.sbin/bhyve/rtc_pl031.c @@ -236,13 +236,13 @@ rtc_pl031_read(struct rtc_pl031_softc *sc, int offset) case RTCPeriphID1: case RTCPeriphID2: case RTCPeriphID3: - reg = RTCPeriphID_VAL(offset - RTCPeriphID0); + reg = RTCPeriphID_VAL((offset - RTCPeriphID0) >> 2); break; case RTCCellID0: case RTCCellID1: case RTCCellID2: case RTCCellID3: - reg = RTCCellID_VAL(offset - RTCCellID0); + reg = RTCCellID_VAL((offset - RTCCellID0) >> 2); break; default: /* Return 0 in reads from unasigned registers */