freebsd-dev/sys/dev/pci
Marcin Wojtas f2f1ab39c0 pci_user: call bus_translate_resource before BAR mmap
On some armv8 machines it is possible that the mapping between CPU
and PCI bus BAR base addresses is not 1:1. In case 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 Marvell SoCs (Armada 7k8k/CN913x)
and possibly many other platforms.

Submitted by: Kornel Duleba <mindal@semihalf.com>
Reviewed by: kib
Obtained from: Semihalf
Sponsored by: Marvell
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D29604
2021-04-06 17:15:04 +02:00
..
controller Use pmap_qenter in the N1SDP PCIe driver 2021-02-25 12:38:05 +00:00
fixup_pci.c
hostb_pci.c pci: clean up empty lines in .c and .h files 2020-09-01 22:00:07 +00:00
ignore_pci.c
isa_pci.c pci: clean up empty lines in .c and .h files 2020-09-01 22:00:07 +00:00
pci_dw_if.m Add driver for DesignWare PCIE core, and its Armada 8K specific attachement. 2019-10-20 11:11:32 +00:00
pci_dw_mv.c pci_dw_mv: Don't enable unhandled interrupts. 2021-03-01 14:03:34 +01:00
pci_dw.c pci_dw: fix outbound I/O window configuration 2021-04-06 14:31:39 +02:00
pci_dw.h pci: clean up empty lines in .c and .h files 2020-09-01 22:00:07 +00:00
pci_host_generic_acpi.c Only set the PCI bus end when we are reducing it 2020-11-29 16:22:33 +00:00
pci_host_generic_acpi.h Add PCI Express driver for the ARM Neoverse N1 System Development 2020-02-11 15:12:09 +00:00
pci_host_generic_fdt.c pci: clean up empty lines in .c and .h files 2020-09-01 22:00:07 +00:00
pci_host_generic_fdt.h Add a driver for bcm2838 PCI express controller 2020-07-06 08:51:55 +00:00
pci_host_generic.c pci: clean up empty lines in .c and .h files 2020-09-01 22:00:07 +00:00
pci_host_generic.h Clean up the pci host generic driver 2020-06-17 19:56:17 +00:00
pci_if.m
pci_iov_if.m
pci_iov_private.h pci: clean up empty lines in .c and .h files 2020-09-01 22:00:07 +00:00
pci_iov_schema.c
pci_iov.c pci_iov: When pci_iov_detach(9) is called, destroy VF children 2020-12-18 03:46:50 +00:00
pci_iov.h
pci_pci.c pci: clean up empty lines in .c and .h files 2020-09-01 22:00:07 +00:00
pci_private.h Export pci_attach() and pci_detach(). 2019-10-15 18:58:01 +00:00
pci_subr.c
pci_user.c pci_user: call bus_translate_resource before BAR mmap 2021-04-06 17:15:04 +02:00
pci.c Set PCIe device's Max_Payload_Size to match PCIe root's. 2021-04-05 10:34:40 -04:00
pcib_if.m
pcib_private.h Abstract the locking for PCIe hotplug. It still uses Giant so there's 2019-12-26 21:00:06 +00:00
pcib_support.c pci: clean up empty lines in .c and .h files 2020-09-01 22:00:07 +00:00
pcireg.h Add more values for PCI capabilities, PCIe extended capabilities, and subclasses. 2020-02-20 17:08:52 +00:00
pcivar.h Implement pci_get_relaxed_ordering_enabled() helper function. 2021-03-17 13:48:04 +01:00
schema_private.h
vga_pci.c pci: clean up empty lines in .c and .h files 2020-09-01 22:00:07 +00:00