HomeFreeBSD

Add necessary bits for Linux KPI to work correctly on powerpc

Description

Add necessary bits for Linux KPI to work correctly on powerpc

PowerPC, and possibly other architectures, use different address ranges for
PCI space vs physical address space, which is only mapped at resource
activation time, when the BAR gets written. The DRM kernel modules do not
activate the rman resources, soas not to waste KVA, instead only mapping
parts of the PCI memory at a time. This introduces a
BUS_TRANSLATE_RESOURCE() method, implemented in the Open Firmware/FDT PCI
driver, to perform this necessary translation without activating the
resource.

In addition to system KPI changes, LinuxKPI is updated to handle a
big-endian host, by adding proper endian swaps to the I/O functions.

Submitted by: mmacy
Reported by: hselasky
Differential Revision: https://reviews.freebsd.org/D21096

Details