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
Unknown Object (File)
Mon, Mar 18, 7:54 AM
Unknown Object (File)
Sat, Mar 9, 12:31 PM
Unknown Object (File)
Feb 16 2024, 11:13 AM
Unknown Object (File)
Feb 16 2024, 4:44 AM
Unknown Object (File)
Feb 16 2024, 4:44 AM
Unknown Object (File)
Feb 16 2024, 4:27 AM
Unknown Object (File)
Jan 18 2024, 12:37 PM
Unknown Object (File)
Jan 17 2024, 8:30 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

Lint
Lint Skipped
Unit
Tests Skipped