HomeFreeBSD

bhndb_pci(4): fix incorrect BHND_PCI_SRSH_PI workaround

Description

bhndb_pci(4): fix incorrect BHND_PCI_SRSH_PI workaround

On a SPROM-less device, the PCI(e) bridge core will be initialized with its
power-on-reset defaults; this can leave the SPROM-derived BHND_PCI_SRSH_PI
value pointing to the wrong backplane address. This value is used by the
PCI core when performing address translation between the static register
windows in BAR0 that map the PCI core's register block, and backplane
address space.

Previously, bhndb_pci(4) incorrectly used the potentially invalid static
BAR0 PCI register windows when attempting to correct the BHND_PCI_SRSH_PI
value in the PCI core's SPROM shadow.

Instead, we now read/update BHND_PCI_SRSH_PI by fetching the PCI core's
backplane address from the core enumeration table, and then using a dynamic
register window to explicitly map the PCI core's register block into BAR0.

Sponsored by: The FreeBSD Foundation

Details

Provenance
landonfAuthored on
Parents
rS328070: SPDX: finish tagging sys/cam.
Branches
Unknown
Tags
Unknown