From nobody Thu Mar 16 16:53:17 2023 X-Original-To: freebsd-arm@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 4Pctd15Zd1z3yL6b for ; Thu, 16 Mar 2023 16:53:41 +0000 (UTC) (envelope-from bT.ikbyccjd30=jytotodh9gr4=perretul5o@em790814.fubar.geek.nz) Received: from e2i580.smtp2go.com (e2i580.smtp2go.com [103.2.142.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Pctd0243sz3qfm for ; Thu, 16 Mar 2023 16:53:39 +0000 (UTC) (envelope-from bT.ikbyccjd30=jytotodh9gr4=perretul5o@em790814.fubar.geek.nz) Authentication-Results: mx1.freebsd.org; dkim=none ("invalid DKIM record") header.d=smtpservice.net header.s=mgy720.a1-4.dyn header.b=FEDnQf8s; dkim=pass header.d=fubar.geek.nz header.s=s790814 header.b=gAuf66th; spf=pass (mx1.freebsd.org: domain of "bT.ikbyccjd30=jytotodh9gr4=perretul5o@em790814.fubar.geek.nz" designates 103.2.142.68 as permitted sender) smtp.mailfrom="bT.ikbyccjd30=jytotodh9gr4=perretul5o@em790814.fubar.geek.nz"; dmarc=pass (policy=none) header.from=fubar.geek.nz DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=smtpservice.net; s=mgy720.a1-4.dyn; x=1678986519; h=Feedback-ID: X-Smtpcorp-Track:Date:To:Message-Id:Subject:From:Reply-To:Sender: List-Unsubscribe; bh=A1AGl4VCPn2ldv4CE1AwGBSDAm2UgZu9zAQ33/3bwwg=; b=FEDnQf8s l5i8QAR/iJIn3u6eJWKDBpNTP6COobcWIER/GF9uvBB8x89R+wtwIYiaT1EH3zMHE7XyGO99JJx+F ic8H4b41n/Pntygx0OoQtwypqmwMkrTGQTOTMXSPXgxGMqvMHHpa1TgtwF6fAfkwmSloi3JrAuFy8 8kDtykQpZHFMUpUAGKvVs81/5kUXZlNPfvGSIMSh7TwejXALSKi5+5BNjRlP0uV0mKAi2eshNaFXE MdIdXtv+bvIB/751b6gflkZyX0SSTJoutaTHjEkafGt5M/EC0JfIgHGFRwhdxNhbks6lT6cXrL/e6 Tv/z7/+GYWA4ItRqYlm7iuePEA==; DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fubar.geek.nz; i=@fubar.geek.nz; q=dns/txt; s=s790814; t=1678985619; h=from : subject : to : message-id : date; bh=A1AGl4VCPn2ldv4CE1AwGBSDAm2UgZu9zAQ33/3bwwg=; b=gAuf66thUlHOocDM+1GIDlJ5A+bKazXDw0/4css21G3oeeE5rw+zNplyYcFOwcSs1Mb6U SF0PrBpIzRmHUAIVeL0BJTEtTC974gAAcalBGlvpuYga4hLZQB1/+p91GoTlyu6J2YXzedX jmyzD9lCLD+xW86Cp8AS8/LnuPrbKyhrGn1gG5xcTfVtUWAUxVf2W7WDt79P/esNyPLuSXW xhGhc6lyl9ypaZMEppax/WsFa0t5fYHPK2ydlAMmm7DZxtDlKWf2obqKiQitKTSTgeNpdoT P33dxoDJRsO8H2mFnhcHo3fmdMcfVdQMWK5t/ieymavj4T+fldklQe9zy3Bw== Received: from [10.139.162.187] (helo=SmtpCorp) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_SECP256R1__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.94.2-S2G) (envelope-from ) id 1pcqrA-qt4Hw7-AT for freebsd-arm@freebsd.org; Thu, 16 Mar 2023 16:53:36 +0000 Received: from [10.162.55.164] (helo=morbo.fubar.geek.nz) by smtpcorp.com with esmtpsa (TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim 4.96-S2G) (envelope-from ) id 1pcqr9-4XcvcR-35 for freebsd-arm@freebsd.org; Thu, 16 Mar 2023 16:53:36 +0000 Received: from smtpclient.apple (cpc91210-cmbg18-2-0-cust37.5-4.cable.virginm.net [81.102.44.38]) by morbo.fubar.geek.nz (Postfix) with ESMTPSA id 400DC27BC4 for ; Thu, 16 Mar 2023 16:53:28 +0000 (UTC) From: Andrew Turner Content-Type: multipart/alternative; boundary="Apple-Mail=_38A4CBFE-E78D-409C-BC45-C11AB2F9610F" List-Id: Porting FreeBSD to ARM processors List-Archive: https://lists.freebsd.org/archives/freebsd-arm List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-arm@freebsd.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.400.51.1.1\)) Subject: Fwd: git: 3473f2832284 - main - Switch the arm64 VM_MEMATTR_DEVICE to nGnRE Message-Id: <402C0A31-BAE8-4A2C-87DB-C52813D62F5F@fubar.geek.nz> References: <202303161646.32GGkB3A022273@gitrepo.freebsd.org> To: freebsd-arm Date: Thu, 16 Mar 2023 16:53:17 +0000 X-Mailer: Apple Mail (2.3731.400.51.1.1) X-Smtpcorp-Track: 1pcqr94bcvcR35.E5XOH1iRe3oTT Feedback-ID: 790814m:790814amQcrys:790814sgAUKGS36d X-Report-Abuse: Please forward a copy of this message, including all headers, to X-Spamd-Result: default: False [-3.90 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-1.000]; DMARC_POLICY_ALLOW(-0.50)[fubar.geek.nz,none]; MV_CASE(0.50)[]; RCVD_DKIM_ARC_DNSWL_MED(-0.50)[]; FORGED_SENDER(0.30)[andrew@fubar.geek.nz,bT.ikbyccjd30=jytotodh9gr4=perretul5o@em790814.fubar.geek.nz]; R_SPF_ALLOW(-0.20)[+ip4:103.2.140.0/22]; R_DKIM_ALLOW(-0.20)[fubar.geek.nz:s=s790814]; RCVD_IN_DNSWL_MED(-0.20)[103.2.142.68:from]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; TO_MATCH_ENVRCPT_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[freebsd-arm@freebsd.org]; R_DKIM_PERMFAIL(0.00)[smtpservice.net:s=mgy720.a1-4.dyn]; RCPT_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[freebsd-arm@freebsd.org]; RCVD_VIA_SMTP_AUTH(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[andrew@fubar.geek.nz,bT.ikbyccjd30=jytotodh9gr4=perretul5o@em790814.fubar.geek.nz]; TO_DN_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; DKIM_MIXED(0.00)[]; ARC_NA(0.00)[]; DKIM_TRACE(0.00)[smtpservice.net:~,fubar.geek.nz:+]; ASN(0.00)[asn:23352, ipnet:103.2.140.0/22, country:US]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RWL_MAILSPIKE_POSSIBLE(0.00)[103.2.142.68:from]; RCVD_TLS_ALL(0.00)[] X-Rspamd-Queue-Id: 4Pctd0243sz3qfm X-Spamd-Bar: --- X-ThisMailContainsUnwantedMimeParts: N --Apple-Mail=_38A4CBFE-E78D-409C-BC45-C11AB2F9610F Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 Hello, I=E2=80=99ve pushed a change to relax the default device memory type on = arm64. This is now equivalent to the device memory type used on arm. Because of this I expect most devices to just work, however if you are = seeing strange issues you can set kern.force_nonposted=3D1 in = loader.conf to revert to the previous memory type globally, or = hint...force_nonposted=3D1 to disable it for a specific = device. For example to disable it for xhci0 you would use = hint.xhci.0.force_nonposted=3D1. If you do find this fixes an issue please report it so we can fix the = driver. Andrew > Begin forwarded message: >=20 > From: Andrew Turner > Subject: git: 3473f2832284 - main - Switch the arm64 VM_MEMATTR_DEVICE = to nGnRE > Date: 16 March 2023 at 16:46:11 GMT > To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, = dev-commits-src-main@FreeBSD.org >=20 > The branch main has been updated by andrew: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D3473f283228401ba585044ac6dea8c8e= b27237a5 >=20 > commit 3473f283228401ba585044ac6dea8c8eb27237a5 > Author: Andrew Turner > AuthorDate: 2023-03-16 15:36:06 +0000 > Commit: Andrew Turner > CommitDate: 2023-03-16 16:45:42 +0000 >=20 > Switch the arm64 VM_MEMATTR_DEVICE to nGnRE >=20 > Move device memory to a weaker type. The new device memory type = allows > the system to acknowledge a write to a device before the write has > completed. This is inline with VM_MEMATTR_DEVICE on armv6/armv7. >=20 > Sponsored by: Arm Ltd > Differential Revision: https://reviews.freebsd.org/D38945 > --- > sys/arm64/include/vm.h | 6 +----- > 1 file changed, 1 insertion(+), 5 deletions(-) >=20 > diff --git a/sys/arm64/include/vm.h b/sys/arm64/include/vm.h > index e479aab52e26..a8c1ea97b513 100644 > --- a/sys/arm64/include/vm.h > +++ b/sys/arm64/include/vm.h > @@ -36,11 +36,7 @@ > #define VM_MEMATTR_WRITE_THROUGH 3 > #define VM_MEMATTR_DEVICE_nGnRE 4 >=20 > -/* > - * VM_MEMATTR_DEVICE can be changed to VM_MEMATTR_DEVICE_nGnRE when > - * the PCI drivers use VM_MEMATTR_DEVICE_NP for their config space. > - */ > -#define VM_MEMATTR_DEVICE VM_MEMATTR_DEVICE_nGnRnE > +#define VM_MEMATTR_DEVICE VM_MEMATTR_DEVICE_nGnRE > #define VM_MEMATTR_DEVICE_NP VM_MEMATTR_DEVICE_nGnRnE >=20 > #ifdef _KERNEL >=20 --Apple-Mail=_38A4CBFE-E78D-409C-BC45-C11AB2F9610F Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8 Hello,

I=E2=80=99ve pushed a = change to relax the default device memory type on arm64. This is now = equivalent to the device memory type used on = arm.

Because of this I expect most devices to = just work, however if you are seeing strange issues you can = set kern.force_nonposted=3D1 in loader.conf to revert to the = previous memory type globally, or = hint.<device>.<unit>.force_nonposted=3D1 to disable it for a = specific device. For example to disable it for xhci0 you would = use hint.xhci.0.force_nonposted=3D1.

If = you do find this fixes an issue please report it so we can fix the = driver.

Andrew

Begin forwarded message:

From: Andrew Turner = <andrew@FreeBSD.org>
Subject: git: 3473f2832284 - main - Switch the arm64 = VM_MEMATTR_DEVICE to nGnRE
Date: 16 March 2023 at 16:46:11 GMT
To: = src-committers@FreeBSD.org, = dev-commits-src-all@FreeBSD.org, = dev-commits-src-main@FreeBSD.org

The = branch main has been updated by andrew:

URL: = https://cgit.FreeBSD.org/src/commit/?id=3D3473f283228401ba585044ac6dea8c8e= b27237a5

commit = 3473f283228401ba585044ac6dea8c8eb27237a5
Author: =     Andrew Turner = <andrew@FreeBSD.org>
AuthorDate: 2023-03-16 15:36:06 = +0000
Commit:     Andrew Turner = <andrew@FreeBSD.org>
CommitDate: 2023-03-16 16:45:42 = +0000

   Switch the arm64 VM_MEMATTR_DEVICE to = nGnRE

   Move device memory to a weaker type. The = new device memory type allows
   the system to = acknowledge a write to a device before the write has
=    completed. This is inline with VM_MEMATTR_DEVICE on = armv6/armv7.

   Sponsored by:   Arm = Ltd
   Differential Revision: =  https://reviews.freebsd.org/D38945
---
= sys/arm64/include/vm.h | 6 +-----
1 file changed, 1 insertion(+), 5 = deletions(-)

diff --git a/sys/arm64/include/vm.h = b/sys/arm64/include/vm.h
index e479aab52e26..a8c1ea97b513 = 100644
--- a/sys/arm64/include/vm.h
+++ = b/sys/arm64/include/vm.h
@@ -36,11 +36,7 @@
#define = VM_MEMATTR_WRITE_THROUGH 3
#define = VM_MEMATTR_DEVICE_nGnRE 4

-/*
- * = VM_MEMATTR_DEVICE can be changed to VM_MEMATTR_DEVICE_nGnRE when
- * = the PCI drivers use VM_MEMATTR_DEVICE_NP for their config space.
- = */
-#define = VM_MEMATTR_DEVICE = VM_MEMATTR_DEVICE_nGnRnE
+#define VM_MEMATTR_DEVICE = VM_MEMATTR_DEVICE_nGnRE
#define VM_MEMATTR_DEVICE_NP = VM_MEMATTR_DEVICE_nGnRnE

#ifdef = _KERNEL


= --Apple-Mail=_38A4CBFE-E78D-409C-BC45-C11AB2F9610F--