Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F112548245
D47946.id147612.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D47946.id147612.diff
View Options
diff --git a/sys/dev/uart/uart_dev_pl011.c b/sys/dev/uart/uart_dev_pl011.c
--- a/sys/dev/uart/uart_dev_pl011.c
+++ b/sys/dev/uart/uart_dev_pl011.c
@@ -172,6 +172,27 @@
uart_pl011_probe(struct uart_bas *bas)
{
+ /*
+ * Versions of QEMU before 41f7b58b634e (8.3) reproted bogus values for
+ * this tabe. The PL011 IP is always 32-bits wide and should be shifted
+ * 2 to match the 4-byte size of the data. QEMu reported these values
+ * incorrectly before that.
+ * https://github.com/qemu/qemu/commit/41f7b58b634ec3b60ae874375d2bbb61d790971e
+ *
+ * In additon, other hardware vendors also reported this value
+ * incorrectly. It's not tied to what the ACPI device node is, but was a
+ * misunderstanding coupled with a Linux driver that didn't need the
+ * right values. Quriks used to be used to ignore the bad values, now we
+ * detect the historic mistake and override (to allow for a future where
+ * we may need to override these values).
+ *
+ * PL011 Docs: https://developer.arm.com/documentation/ddi0183/latest/
+ */
+ if (bas->regshift == 0 || bas->regiowidth == 1) {
+ bas->regshift = 2;
+ bas->regiowidth = 4;
+ }
+
return (0);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Thu, Mar 20, 5:03 PM (1 h, 17 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
17232759
Default Alt Text
D47946.id147612.diff (1 KB)
Attached To
Mode
D47946: uart: Ingore pl011 historic mistakes
Attached
Detach File
Event Timeline
Log In to Comment