freebsd-src/sys
Konstantin Belousov 87842989f8 Add ioctl to conveniently mmap a PCI device BAR into userspace.
Add the ioctl PCIOCBARMMAP on /dev/pci to conveniently create
userspace mapping of a PCI device BAR.  This is enormously superior to
read the BAR value with PCIOCREAD and then try to mmap /dev/mem, and
should allow to automatically activate the mapped BARs when needed in
future.

Current implementation creates new sg pager for each user mmap
request.  If the pointer (and reference) to a managed device pager is
stored in pci_map, we would be able to revoke all mappings on the BAR
deactivation or relocation.  This is related to the unimplemented BAR
activation on mmap, and is postponed for the future.

Discussed with:	imp, jhb
Sponsored by:	The FreeBSD Foundation, Mellanox Technologies
MFC after:	2 weeks
Differential revision:	https://reviews.freebsd.org/D15583
2018-08-01 18:58:24 +00:00
..
amd64 Add pmap_is_valid_memattr(9). 2018-08-01 18:45:51 +00:00
arm Add pmap_is_valid_memattr(9). 2018-08-01 18:45:51 +00:00
arm64 Add pmap_is_valid_memattr(9). 2018-08-01 18:45:51 +00:00
bsm
cam For the dynamic I/O scheduler, make the TRIM stuff also count against 2018-07-26 22:55:51 +00:00
cddl MFV r337029: 2018-08-01 03:21:17 +00:00
compat Add ioctl to conveniently mmap a PCI device BAR into userspace. 2018-08-01 18:58:24 +00:00
conf Remove jedec_ts(4) 2018-08-01 08:24:34 +00:00
contrib Use the new VNET_DEFINE_STATIC macro when we are defining static VNET 2018-07-24 16:35:52 +00:00
crypto libmd: Always erase context in _Final method, and when doing 2018-07-20 07:01:28 +00:00
ddb
dev Add ioctl to conveniently mmap a PCI device BAR into userspace. 2018-08-01 18:58:24 +00:00
dts Remove Atmel AT91RM9200 and AT91SAM9 support. 2018-07-27 18:28:22 +00:00
fs msdosfs: trim EOL whitespace 2018-07-31 12:44:28 +00:00
gdb
geom OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
gnu dts: Update our copy to Linux 4.17 2018-06-14 07:12:10 +00:00
i386 Add pmap_is_valid_memattr(9). 2018-08-01 18:45:51 +00:00
isa
kern Remove a redundant check. 2018-07-30 17:58:41 +00:00
kgssapi OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
libkern Sync strlcpy with userland version, again 2018-06-21 17:35:13 +00:00
mips Add pmap_is_valid_memattr(9). 2018-08-01 18:45:51 +00:00
modules Remove jedec_ts(4) 2018-08-01 08:24:34 +00:00
net As with DPCPU_DEFINE_STATIC make VNET_DEFINE_STATIC non-static on arm64 in 2018-07-30 15:05:07 +00:00
net80211 net80211: Fix ifdetach w/o ifattach, small whitespace cleanup 2018-07-10 23:30:19 +00:00
netgraph Use the new VNET_DEFINE_STATIC macro when we are defining static VNET 2018-07-24 16:35:52 +00:00
netinet Add a dtrace provider for UDP-Lite. 2018-07-31 22:56:03 +00:00
netinet6 Add a dtrace provider for UDP-Lite. 2018-07-31 22:56:03 +00:00
netipsec Use the new VNET_DEFINE_STATIC macro when we are defining static VNET 2018-07-24 16:35:52 +00:00
netpfil Use the new VNET_DEFINE_STATIC macro when we are defining static VNET 2018-07-24 16:35:52 +00:00
netsmb Make timespecadd(3) and friends public 2018-07-30 15:46:40 +00:00
nfs Switch RIB and RADIX_NODE_HEAD lock from rwlock(9) to rmlock(9). 2018-06-16 08:26:23 +00:00
nfsclient
nfsserver
nlm
ofed Only NULL check the VNET pointer when VIMAGE is enabled in ibcore. 2018-07-31 11:23:44 +00:00
opencrypto Make timespecadd(3) and friends public 2018-07-30 15:46:40 +00:00
powerpc Add pmap_is_valid_memattr(9). 2018-08-01 18:45:51 +00:00
riscv Add pmap_is_valid_memattr(9). 2018-08-01 18:45:51 +00:00
rpc Set SO_SNDTIMEO in the client side krpc when CLSET_TIMEOUT is done. 2018-07-20 12:03:16 +00:00
security Require that MAC label buffers be able to store a non-empty string. 2018-08-01 03:46:07 +00:00
sparc64 Add pmap_is_valid_memattr(9). 2018-08-01 18:45:51 +00:00
sys Add ioctl to conveniently mmap a PCI device BAR into userspace. 2018-08-01 18:58:24 +00:00
teken
tests epoch_test: fix compile 2018-07-15 00:31:17 +00:00
tools
ufs Make timespecadd(3) and friends public 2018-07-30 15:46:40 +00:00
vm Add pmap_is_valid_memattr(9). 2018-08-01 18:45:51 +00:00
x86 Make timespecadd(3) and friends public 2018-07-30 15:46:40 +00:00
xdr
xen xen: add missing file from r336474 2018-07-19 10:14:52 +00:00
Makefile