aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/bus.h
diff options
context:
space:
mode:
authorJustin Hibbits <jhibbits@FreeBSD.org>2019-08-04 19:28:10 +0000
committerJustin Hibbits <jhibbits@FreeBSD.org>2019-08-04 19:28:10 +0000
commit937a05ba81c3d6fc5c9558b98b882fd61fa56e7b (patch)
tree26ef59b7f1915afab357ad092a3605618b441b8a /sys/sys/bus.h
parent69a277d98e6c67ad95cc7b32e9029cee124f3871 (diff)
downloadsrc-937a05ba81c3d6fc5c9558b98b882fd61fa56e7b.tar.gz
src-937a05ba81c3d6fc5c9558b98b882fd61fa56e7b.zip
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
Notes
Notes: svn path=/head/; revision=350570
Diffstat (limited to 'sys/sys/bus.h')
-rw-r--r--sys/sys/bus.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/sys/bus.h b/sys/sys/bus.h
index f9c38e48fa64..508267754e41 100644
--- a/sys/sys/bus.h
+++ b/sys/sys/bus.h
@@ -434,6 +434,8 @@ struct resource *
bus_generic_alloc_resource(device_t bus, device_t child, int type,
int *rid, rman_res_t start, rman_res_t end,
rman_res_t count, u_int flags);
+int bus_generic_translate_resource(device_t dev, int type, rman_res_t start,
+ rman_res_t *newstart);
int bus_generic_attach(device_t dev);
int bus_generic_bind_intr(device_t dev, device_t child,
struct resource *irq, int cpu);