Page MenuHomeFreeBSD

pci_host_generic: allocate PCI, not CPU addresses.
AbandonedPublic

Authored by crowston_protonmail.com on Jun 22 2020, 12:05 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 7, 9:55 PM
Unknown Object (File)
Sat, May 4, 12:59 AM
Unknown Object (File)
Fri, Apr 26, 4:16 AM
Unknown Object (File)
Jan 28 2024, 9:48 PM
Unknown Object (File)
Dec 20 2023, 5:47 AM
Unknown Object (File)
Dec 12 2023, 4:41 AM
Unknown Object (File)
Nov 10 2023, 6:42 AM
Unknown Object (File)
Sep 6 2023, 2:39 AM
Subscribers
None

Details

Reviewers
andrew
Summary

Resolve a bug on systems where the PCI controller's view of the address space of the system memory is not consistent with the CPU's. We now assume all addresses passed to pci_host_generic_core_alloc_resource() are PCI addresses, and
store them as such. Only in generic_pcie_activate_resource() is the PCI address is translated to a CPU address.

Test Plan

Tested on my Rpi4 with PCI-E controller driver.

Diff Detail

Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 31865
Build 29424: arc lint + arc unit

Event Timeline

Sorry, I missed this. I fixed it in a different way in rS362493 by extracting the translation code into a new function.

I've tested it on qemu-system-arm -machine virt as this also has PCI address != phys address.