HomeFreeBSD

pci_dw: Support multiple memory windows

Description

pci_dw: Support multiple memory windows

Currently we assume there is only one memory and one prefetch memory
window, and ignore the latter. However, the SiFive FU740 has two normal
memory windows.

As part of this, the viewports are rearranged. Previously the viewports
were memory, config then optionally I/O. Both to simplify the config
index calculation and to ensure it can always be mapped even if we have
too many memory windows for the number of viewports, config is moved to
being the first viewport.

This generalisation now also naturally supports mapping prefetch memory
windows.

Reviewed by: mmel
MFC after: 1 week
Differential Revision: https://reviews.freebsd.org/D31028

(cherry picked from commit f8c1701f23b5b99365ffab2a067e4676b905ab57)

Details

Provenance
jrtc27Authored on Jul 21 2021, 4:50 AM
Reviewer
mmel
Differential Revision
D31028: pci_dw: Support multiple memory windows
Parents
rG215db69fbcb0: pci_dw: Trim ATU windows bigger than 4GB
Branches
Unknown
Tags
Unknown