HomeFreeBSD

pci: use uint32_t for eecp

Description

pci: use uint32_t for eecp

eecp holds the extended capability offset. If that offset is larger
than 0xff, storing it in uint8_t truncates it, which can make the
early EHCI/XHCI capability walk read the wrong location and loop during
boot.

Seen on AMD device 1022:151e, where HCCPARAMS1 = 0x0118ffc5 and the
first xHCI extended capability offset is 0x460. Widen eecp to uint32_t
in xhci_early_takeover(), matching xhci_pci_take_controller().

Signed-off-by: Gisle Nes <gisle@gisle.net>
Reviewed by: zlei, aokblast
MFC after: 3 days
Pull Request: https://github.com/freebsd/freebsd-src/pull/2127
Closes: https://github.com/freebsd/freebsd-src/pull/2127

Details

Provenance
Gisle Nes <gisle@gisle.net>Authored on Apr 7 2026, 4:48 PM
aokblastCommitted on May 9 2026, 9:09 AM
Parents
rG44338ccd1268: BSD.root.dist: Correct tag for /etc/sysctl.kld.d
Branches
Unknown
Tags
Unknown