HardenedBSD/sys/dev/pci
Greg V 0eb901f760 pci_host_generic: implement bus_translate_resource (for LinuxKPI)
In D21096 BUS_TRANSLATE_RESOURCE was introduced to allow LinuxKPI to get
physical addresses in pci_resource_start for PowerPC and implemented
in ofw_pci.
When the translation was implemented in pci_host_generic in 372c142b4f,
this method was not implemented; instead a local static function was
added for a similar purpose.
Rename the static function to "_common" and implement the bus function
as a wrapper around that.  With this a LinuxKPI driver using
physical addresses correctly finds the configuration registers of
the GPU.
This unbreaks amdgpu on NXP Layerscape LX2160A SoC (SolidRun HoneyComb
LX2K workstation) which has a Translation Offset in ACPI for
below-4G PCI addresses.

More info:	https://github.com/freebsd/drm-kmod/issues/84
Tested by:	dan.kotowski_a9development.com
Reviewed by:	hselasky
Differential Revision: https://reviews.freebsd.org/D30986
2021-09-27 17:19:05 +00:00
..
controller
fixup_pci.c
hostb_pci.c
ignore_pci.c
isa_pci.c
pci_dw_if.m
pci_dw_mv.c
pci_dw.c
pci_dw.h
pci_host_generic_acpi.c
pci_host_generic_acpi.h
pci_host_generic_fdt.c
pci_host_generic_fdt.h
pci_host_generic.c pci_host_generic: implement bus_translate_resource (for LinuxKPI) 2021-09-27 17:19:05 +00:00
pci_host_generic.h
pci_if.m
pci_iov_if.m
pci_iov_private.h
pci_iov_schema.c
pci_iov.c
pci_iov.h
pci_pci.c
pci_private.h
pci_subr.c
pci_user.c
pci.c
pcib_if.m
pcib_private.h
pcib_support.c
pcireg.h
pcivar.h
schema_private.h
vga_pci.c