freebsd-src/sys
John Baldwin 03713f805a pci_host_generic: Tolerate range resource allocation failures
QEMU for armv7 includes a PCI memory range whose CPU address is
greater than 4GB.  This falls outside the range of armv7's global
mem_rman used by the nexus driver.  As a result, pcib0 fails to
attach blocking all PCI devices.

Instead, change the driver to be a bit more tolerant.  If allocating a
resource for a range fails, don't fail attaching the entire driver,
but do skip adding the associated PCI range to the relevant rman in
the pcib driver.  This will prevent child devices from using BARs that
allocate from this range.  In the case of QEMU on armv7 devices can
still allocate from an earlier PCI memory range that is within the
32-bit address space (and in fact none of the firmware-assigned memory
BARs use addresses from the upper range).

While here, reorder the operations on I/O ranges a bit: 1) print the
range under bootverbose first (rather than last) so that the range is
printed before any relevant errors for the range, 2) move
rman_manage_region last after the parent resource has been set and
allocated.

Reported by:	markj, Jenkins
Reviewed by:	markj
Fixes:		d79b6b8ec2 pci_host_generic: Don't rewrite resource start address for translation
Differential Revision:	https://reviews.freebsd.org/D44698
2024-04-09 14:55:40 -07:00
..
amd64 ktrace: Record syscall violations with KTR_CAPFAIL 2024-04-07 18:52:51 -05:00
arm ktrace: Record syscall violations with KTR_CAPFAIL 2024-04-07 18:52:51 -05:00
arm64 arm64 pmap: Add ATTR_CONTIGUOUS support [Part 2] 2024-04-09 11:21:08 -05:00
bsm
cam
cddl
compat LinuxKPI: Stub sysfs_remove_link in linux/sysfs.h 2024-04-08 09:47:43 +03:00
conf config.mk: Add MK_VIMAGE knob 2024-04-09 13:05:56 -04:00
contrib zfs: merge openzfs/zfs@39be46f43 2024-03-30 23:54:24 +01:00
crypto
ddb ddb: Fix format string errors in db_pprint.c 2024-04-03 14:14:13 -04:00
dev pci_host_generic: Tolerate range resource allocation failures 2024-04-09 14:55:40 -07:00
dts
fs tarfs: Implement VOP_BMAP 2024-04-05 11:14:36 -04:00
gdb
geom
gnu
i386 ktrace: Record syscall violations with KTR_CAPFAIL 2024-04-07 18:52:51 -05:00
isa
kern Revert "unix: new implementation of unix/stream & unix/seqpacket" 2024-04-09 13:15:47 -07:00
kgssapi
libkern
modules Revert "sound: Get rid of snd_clone and use DEVFS_CDEVPRIV(9)" 2024-04-05 12:33:41 +02:00
net debugnet: Fix logging of frame length 2024-04-09 00:47:10 +08:00
net80211
netgraph ng_socket: Treat EEXIST from kern_kldload() as success 2024-04-09 18:04:47 +08:00
netinet icmp: correct the assertion that checks limit + jitter 2024-04-08 16:54:19 -07:00
netinet6 icmp: correct the assertion that checks limit + jitter 2024-04-08 16:54:19 -07:00
netipsec
netlink linux: make linux_netlink_p->msg_from_linux be able to fail 2024-03-29 13:35:51 -07:00
netpfil pf: fix reply-to after rdr and dummynet 2024-03-28 17:06:01 +01:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed
opencrypto
powerpc powerpc/booke: Reserve KVA for minidump working area 2024-04-04 19:03:27 -04:00
riscv
rpc rpc: use new macros to lock socket buffers 2024-04-09 09:17:19 -07:00
security
sys Revert "unix: new implementation of unix/stream & unix/seqpacket" 2024-04-09 13:15:47 -07:00
teken
tests
tools
ufs
vm vm: add macro to mark arguments used when NUMA is defined 2024-04-09 10:23:47 -04:00
x86
xdr
xen
Makefile
README.md

FreeBSD Kernel Source:

This directory contains the source files and build glue that make up the FreeBSD kernel and its modules, including both original and contributed software.

Kernel configuration files are located in the conf/ subdirectory of each architecture. GENERIC is the configuration used in release builds. NOTES contains documentation of all possible entries. LINT is a compile-only configuration used to maximize build coverage and detect regressions.

Documentation:

Source code documentation is maintained in a set of man pages, under section 9. These pages are located in share/man/man9, from the top-level of the src tree. Consult intro(9) for an overview of existing pages.

Some additional high-level documentation of the kernel is maintained in the Architecture Handbook.

Source Roadmap:

Directory Description
amd64 AMD64 (64-bit x86) architecture support
arm 32-bit ARM architecture support
arm64 64-bit ARM (AArch64) architecture support
cam Common Access Method storage subsystem - cam(4) and ctl(4)
cddl CDDL-licensed optional sources such as DTrace
conf kernel build glue
compat Linux compatibility layer, FreeBSD 32-bit compatibility
contrib 3rd-party imported software such as OpenZFS
crypto crypto drivers
ddb interactive kernel debugger - ddb(4)
fs most filesystems, excluding UFS, NFS, and ZFS
dev device drivers and other arch independent code
gdb kernel remote GDB stub - gdb(4)
geom GEOM framework - geom(4)
i386 i386 (32-bit x86) architecture support
kern main part of the kernel
libkern libc-like and other support functions for kernel use
modules kernel module infrastructure
net core networking code
net80211 wireless networking (IEEE 802.11) - net80211(4)
netgraph graph-based networking subsystem - netgraph(4)
netinet IPv4 protocol implementation - inet(4)
netinet6 IPv6 protocol implementation - inet6(4)
netipsec IPsec protocol implementation - ipsec(4)
netpfil packet filters - ipfw(4), pf(4), and ipfilter(4)
opencrypto OpenCrypto framework - crypto(7)
powerpc PowerPC/POWER (32 and 64-bit) architecture support
riscv 64-bit RISC-V architecture support
security security facilities - audit(4) and mac(4)
sys kernel headers
tests kernel unit tests
ufs Unix File System - ffs(7)
vm virtual memory system
x86 code shared by AMD64 and i386 architectures