Date: Thu, 16 Mar 2023 16:53:17 +0000 From: Andrew Turner <andrew@fubar.geek.nz> To: freebsd-arm <freebsd-arm@freebsd.org> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--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.<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: >=20 > 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 >=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 <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 >=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 <html><head><meta http-equiv=3D"content-type" content=3D"text/html; = charset=3Dutf-8"></head><body style=3D"overflow-wrap: break-word; = -webkit-nbsp-mode: space; line-break: = after-white-space;">Hello,<div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>If = you do find this fixes an issue please report it so we can fix the = driver.</div><div><br></div><div>Andrew<br><div><br><blockquote = type=3D"cite"><div>Begin forwarded message:</div><br = class=3D"Apple-interchange-newline"><div style=3D"margin-top: 0px; = margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span = style=3D"font-family: -webkit-system-font, Helvetica Neue, Helvetica, = sans-serif; color:rgba(0, 0, 0, 1.0);"><b>From: </b></span><span = style=3D"font-family: -webkit-system-font, Helvetica Neue, Helvetica, = sans-serif;">Andrew Turner = <andrew@FreeBSD.org><br></span></div><div style=3D"margin-top: = 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span = style=3D"font-family: -webkit-system-font, Helvetica Neue, Helvetica, = sans-serif; color:rgba(0, 0, 0, 1.0);"><b>Subject: </b></span><span = style=3D"font-family: -webkit-system-font, Helvetica Neue, Helvetica, = sans-serif;"><b>git: 3473f2832284 - main - Switch the arm64 = VM_MEMATTR_DEVICE to nGnRE</b><br></span></div><div style=3D"margin-top: = 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px;"><span = style=3D"font-family: -webkit-system-font, Helvetica Neue, Helvetica, = sans-serif; color:rgba(0, 0, 0, 1.0);"><b>Date: </b></span><span = style=3D"font-family: -webkit-system-font, Helvetica Neue, Helvetica, = sans-serif;">16 March 2023 at 16:46:11 GMT<br></span></div><div = style=3D"margin-top: 0px; margin-right: 0px; margin-bottom: 0px; = margin-left: 0px;"><span style=3D"font-family: -webkit-system-font, = Helvetica Neue, Helvetica, sans-serif; color:rgba(0, 0, 0, 1.0);"><b>To: = </b></span><span style=3D"font-family: -webkit-system-font, Helvetica = Neue, Helvetica, sans-serif;">src-committers@FreeBSD.org, = dev-commits-src-all@FreeBSD.org, = dev-commits-src-main@FreeBSD.org<br></span></div><br><div><div>The = branch main has been updated by andrew:<br><br>URL: = https://cgit.FreeBSD.org/src/commit/?id=3D3473f283228401ba585044ac6dea8c8e= b27237a5<br><br>commit = 3473f283228401ba585044ac6dea8c8eb27237a5<br>Author: = Andrew Turner = <andrew@FreeBSD.org><br>AuthorDate: 2023-03-16 15:36:06 = +0000<br>Commit: Andrew Turner = <andrew@FreeBSD.org><br>CommitDate: 2023-03-16 16:45:42 = +0000<br><br> Switch the arm64 VM_MEMATTR_DEVICE to = nGnRE<br><br> Move device memory to a weaker type. The = new device memory type allows<br> the system to = acknowledge a write to a device before the write has<br> = completed. This is inline with VM_MEMATTR_DEVICE on = armv6/armv7.<br><br> Sponsored by: Arm = Ltd<br> Differential Revision: = https://reviews.freebsd.org/D38945<br>---<br> = sys/arm64/include/vm.h | 6 +-----<br> 1 file changed, 1 insertion(+), 5 = deletions(-)<br><br>diff --git a/sys/arm64/include/vm.h = b/sys/arm64/include/vm.h<br>index e479aab52e26..a8c1ea97b513 = 100644<br>--- a/sys/arm64/include/vm.h<br>+++ = b/sys/arm64/include/vm.h<br>@@ -36,11 +36,7 @@<br> #define<span = class=3D"Apple-tab-span" style=3D"white-space:pre"> = </span>VM_MEMATTR_WRITE_THROUGH<span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span>3<br> #define<span = class=3D"Apple-tab-span" style=3D"white-space:pre"> = </span>VM_MEMATTR_DEVICE_nGnRE<span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span><span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span>4<br><br>-/*<br>- * = VM_MEMATTR_DEVICE can be changed to VM_MEMATTR_DEVICE_nGnRE when<br>- * = the PCI drivers use VM_MEMATTR_DEVICE_NP for their config space.<br>- = */<br>-#define<span class=3D"Apple-tab-span" style=3D"white-space:pre"> = </span>VM_MEMATTR_DEVICE<span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span><span class=3D"Apple-tab-span" = style=3D"white-space:pre"> = </span>VM_MEMATTR_DEVICE_nGnRnE<br>+#define<span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span>VM_MEMATTR_DEVICE<span = class=3D"Apple-tab-span" style=3D"white-space:pre"> </span><span = class=3D"Apple-tab-span" style=3D"white-space:pre"> = </span>VM_MEMATTR_DEVICE_nGnRE<br> #define<span class=3D"Apple-tab-span" = style=3D"white-space:pre"> </span>VM_MEMATTR_DEVICE_NP<span = class=3D"Apple-tab-span" style=3D"white-space:pre"> </span><span = class=3D"Apple-tab-span" style=3D"white-space:pre"> = </span>VM_MEMATTR_DEVICE_nGnRnE<br><br> #ifdef = _KERNEL<br><br></div></div></blockquote></div><br></div></body></html>= --Apple-Mail=_38A4CBFE-E78D-409C-BC45-C11AB2F9610F--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?402C0A31-BAE8-4A2C-87DB-C52813D62F5F>