]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add necessary bits for Linux KPI to work correctly on powerpc
authorjhibbits <jhibbits@FreeBSD.org>
Sun, 4 Aug 2019 19:28:10 +0000 (19:28 +0000)
committerjhibbits <jhibbits@FreeBSD.org>
Sun, 4 Aug 2019 19:28:10 +0000 (19:28 +0000)
commit1153a377f7638ed43b848fba7d5c25fe45aab378
tree26ef59b7f1915afab357ad092a3605618b441b8a
parent8300ee499cea27621b3e04a22e2186c0caa256c2
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
sys/compat/linuxkpi/common/include/linux/gfp.h
sys/compat/linuxkpi/common/include/linux/io.h
sys/compat/linuxkpi/common/include/linux/pci.h
sys/compat/linuxkpi/common/src/linux_pci.c
sys/dev/ofw/ofwpci.c
sys/dev/pci/vga_pci.c
sys/kern/bus_if.m
sys/kern/subr_bus.c
sys/sys/bus.h