Page MenuHomeFreeBSD

uart: Ingore pl011 historic mistakes
ClosedPublic

Authored by imp on Dec 6 2024, 6:02 PM.
Tags
None
Referenced Files
F112548245: D47946.id147612.diff
Wed, Mar 19, 5:03 PM
Unknown Object (File)
Thu, Mar 6, 2:23 PM
Unknown Object (File)
Sat, Feb 22, 5:09 AM
Unknown Object (File)
Feb 8 2025, 1:17 AM
Unknown Object (File)
Feb 5 2025, 12:26 AM
Unknown Object (File)
Feb 1 2025, 6:30 PM
Unknown Object (File)
Jan 19 2025, 11:19 PM
Unknown Object (File)
Jan 19 2025, 9:12 PM
Subscribers

Details

Summary

Some veresions of EDK-II and QEMU reported the wrong values for the
register shift and the region I/O size. Detect those and set it to the
correct values. In general, anything other than a shift of 2 and a
regio width of 4 (bytes, or 32 bits) is a mistake. However, allow
for overrides in the future by only overriding the buggy values.
Otherwise, we will fail to boot.

PR: 282936
Sponsored by: Netflix

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

imp requested review of this revision.Dec 6 2024, 6:02 PM
imp created this revision.
This revision is now accepted and ready to land.Dec 6 2024, 6:06 PM

Verified via:

  1. Installed 15-current on UTM 4.6.3 (qemu 9.2) and rebooted fine.
  2. Rebooted under UTM 4.5.4 and it failed per the bug (this was expected).
  3. Rebooted with 4.6.3, rebuilt/installed kernel with patches (needed tweaks).
  4. Patched kernel boots fine using both UTM 4.5.4 and 4.6.3.
sys/dev/uart/uart_dev_pl011.c
176

s/reproted/reported/

177

s/tabe/tabel/

178

s/QEMu/QEMU/

185

s/Quriks/Quirks/

191

s/regshift/regshft/ on this and the next line.

This revision now requires review to proceed.Jan 14 2025, 9:47 PM
imp marked 5 inline comments as done.Jan 14 2025, 9:51 PM

OK. This should be good to go.

sys/dev/uart/uart_dev_pl011.c
191

Yea, the version I had on my arm box had this, but I forgot to back-patch it for the first round.

This revision is now accepted and ready to land.Jan 14 2025, 9:53 PM
This revision was automatically updated to reflect the committed changes.
imp marked an inline comment as done.