Page MenuHomeFreeBSD

uart: Ingore pl011 historic mistakes
ClosedPublic

Authored by imp on Dec 6 2024, 6:02 PM.
Tags
None
Referenced Files
F135340890: D47946.id147612.diff
Sat, Nov 8, 10:29 PM
F135340731: D47946.id149272.diff
Sat, Nov 8, 10:27 PM
F135340231: D47946.id149269.diff
Sat, Nov 8, 10:20 PM
F135339844: D47946.id.diff
Sat, Nov 8, 10:15 PM
F135310069: D47946.diff
Sat, Nov 8, 2:49 PM
F135302921: D47946.diff
Sat, Nov 8, 12:49 PM
Unknown Object (File)
Thu, Nov 6, 12:19 PM
Unknown Object (File)
Wed, Nov 5, 11:07 AM
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.