Skip to content
  • Val Packett's avatar
    pci_host_generic: implement bus_translate_resource (for LinuxKPI) · 0eb901f7
    Val Packett authored
    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 372c142b,
    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
    0eb901f7