Page MenuHomeFreeBSD

pci_user.c: Call bus_translate_resource before mmaping bars
ClosedPublic

Authored by kd on Apr 6 2021, 2:11 PM.
Tags
None
Referenced Files
F102949863: D29604.id86910.diff
Tue, Nov 19, 2:46 AM
Unknown Object (File)
Oct 7 2024, 6:39 AM
Unknown Object (File)
Oct 7 2024, 4:33 AM
Unknown Object (File)
Oct 6 2024, 9:40 AM
Unknown Object (File)
Oct 3 2024, 3:37 PM
Unknown Object (File)
Oct 1 2024, 8:27 PM
Unknown Object (File)
Oct 1 2024, 12:23 PM
Unknown Object (File)
Sep 28 2024, 12:11 AM
Subscribers

Details

Summary

On some armv8 machines there is no 1:1 mapping between cpu and pci bus BAR base addresses.
When a BAR is allocated in kernel using bus_alloc_resource_any this translation is handled in ofw_pci_activate_resource.
Do the same in pci_user.c by calling bus_translate_resource devmethod. This fixes mmaping BARs to userspace on armada7k and possibly many other platforms.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable