1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0 2*4882a593Smuzhiyun# 3*4882a593Smuzhiyun# PCI configuration 4*4882a593Smuzhiyun# 5*4882a593Smuzhiyun 6*4882a593Smuzhiyun# select this to offer the PCI prompt 7*4882a593Smuzhiyunconfig HAVE_PCI 8*4882a593Smuzhiyun bool 9*4882a593Smuzhiyun 10*4882a593Smuzhiyun# select this to unconditionally force on PCI support 11*4882a593Smuzhiyunconfig FORCE_PCI 12*4882a593Smuzhiyun bool 13*4882a593Smuzhiyun select HAVE_PCI 14*4882a593Smuzhiyun select PCI 15*4882a593Smuzhiyun 16*4882a593Smuzhiyunmenuconfig PCI 17*4882a593Smuzhiyun bool "PCI support" 18*4882a593Smuzhiyun depends on HAVE_PCI 19*4882a593Smuzhiyun help 20*4882a593Smuzhiyun This option enables support for the PCI local bus, including 21*4882a593Smuzhiyun support for PCI-X and the foundations for PCI Express support. 22*4882a593Smuzhiyun Say 'Y' here unless you know what you are doing. 23*4882a593Smuzhiyun 24*4882a593Smuzhiyunif PCI 25*4882a593Smuzhiyun 26*4882a593Smuzhiyunconfig PCI_DOMAINS 27*4882a593Smuzhiyun bool 28*4882a593Smuzhiyun depends on PCI 29*4882a593Smuzhiyun 30*4882a593Smuzhiyunconfig PCI_DOMAINS_GENERIC 31*4882a593Smuzhiyun bool 32*4882a593Smuzhiyun select PCI_DOMAINS 33*4882a593Smuzhiyun 34*4882a593Smuzhiyunconfig PCI_SYSCALL 35*4882a593Smuzhiyun bool 36*4882a593Smuzhiyun 37*4882a593Smuzhiyunsource "drivers/pci/pcie/Kconfig" 38*4882a593Smuzhiyun 39*4882a593Smuzhiyunconfig PCI_MSI 40*4882a593Smuzhiyun bool "Message Signaled Interrupts (MSI and MSI-X)" 41*4882a593Smuzhiyun select GENERIC_MSI_IRQ 42*4882a593Smuzhiyun help 43*4882a593Smuzhiyun This allows device drivers to enable MSI (Message Signaled 44*4882a593Smuzhiyun Interrupts). Message Signaled Interrupts enable a device to 45*4882a593Smuzhiyun generate an interrupt using an inbound Memory Write on its 46*4882a593Smuzhiyun PCI bus instead of asserting a device IRQ pin. 47*4882a593Smuzhiyun 48*4882a593Smuzhiyun Use of PCI MSI interrupts can be disabled at kernel boot time 49*4882a593Smuzhiyun by using the 'pci=nomsi' option. This disables MSI for the 50*4882a593Smuzhiyun entire system. 51*4882a593Smuzhiyun 52*4882a593Smuzhiyun If you don't know what to do here, say Y. 53*4882a593Smuzhiyun 54*4882a593Smuzhiyunconfig PCI_MSI_IRQ_DOMAIN 55*4882a593Smuzhiyun def_bool y 56*4882a593Smuzhiyun depends on PCI_MSI 57*4882a593Smuzhiyun select GENERIC_MSI_IRQ_DOMAIN 58*4882a593Smuzhiyun 59*4882a593Smuzhiyunconfig PCI_MSI_ARCH_FALLBACKS 60*4882a593Smuzhiyun bool 61*4882a593Smuzhiyun 62*4882a593Smuzhiyunconfig PCI_QUIRKS 63*4882a593Smuzhiyun default y 64*4882a593Smuzhiyun bool "Enable PCI quirk workarounds" if EXPERT 65*4882a593Smuzhiyun help 66*4882a593Smuzhiyun This enables workarounds for various PCI chipset bugs/quirks. 67*4882a593Smuzhiyun Disable this only if your target machine is unaffected by PCI 68*4882a593Smuzhiyun quirks. 69*4882a593Smuzhiyun 70*4882a593Smuzhiyunconfig PCI_DEBUG 71*4882a593Smuzhiyun bool "PCI Debugging" 72*4882a593Smuzhiyun depends on DEBUG_KERNEL 73*4882a593Smuzhiyun help 74*4882a593Smuzhiyun Say Y here if you want the PCI core to produce a bunch of debug 75*4882a593Smuzhiyun messages to the system log. Select this if you are having a 76*4882a593Smuzhiyun problem with PCI support and want to see more of what is going on. 77*4882a593Smuzhiyun 78*4882a593Smuzhiyun When in doubt, say N. 79*4882a593Smuzhiyun 80*4882a593Smuzhiyunconfig PCI_REALLOC_ENABLE_AUTO 81*4882a593Smuzhiyun bool "Enable PCI resource re-allocation detection" 82*4882a593Smuzhiyun depends on PCI_IOV 83*4882a593Smuzhiyun help 84*4882a593Smuzhiyun Say Y here if you want the PCI core to detect if PCI resource 85*4882a593Smuzhiyun re-allocation needs to be enabled. You can always use pci=realloc=on 86*4882a593Smuzhiyun or pci=realloc=off to override it. It will automatically 87*4882a593Smuzhiyun re-allocate PCI resources if SR-IOV BARs have not been allocated by 88*4882a593Smuzhiyun the BIOS. 89*4882a593Smuzhiyun 90*4882a593Smuzhiyun When in doubt, say N. 91*4882a593Smuzhiyun 92*4882a593Smuzhiyunconfig PCI_STUB 93*4882a593Smuzhiyun tristate "PCI Stub driver" 94*4882a593Smuzhiyun help 95*4882a593Smuzhiyun Say Y or M here if you want be able to reserve a PCI device 96*4882a593Smuzhiyun when it is going to be assigned to a guest operating system. 97*4882a593Smuzhiyun 98*4882a593Smuzhiyun When in doubt, say N. 99*4882a593Smuzhiyun 100*4882a593Smuzhiyunconfig PCI_PF_STUB 101*4882a593Smuzhiyun tristate "PCI PF Stub driver" 102*4882a593Smuzhiyun depends on PCI_IOV 103*4882a593Smuzhiyun help 104*4882a593Smuzhiyun Say Y or M here if you want to enable support for devices that 105*4882a593Smuzhiyun require SR-IOV support, while at the same time the PF (Physical 106*4882a593Smuzhiyun Function) itself is not providing any actual services on the 107*4882a593Smuzhiyun host itself such as storage or networking. 108*4882a593Smuzhiyun 109*4882a593Smuzhiyun When in doubt, say N. 110*4882a593Smuzhiyun 111*4882a593Smuzhiyunconfig XEN_PCIDEV_FRONTEND 112*4882a593Smuzhiyun tristate "Xen PCI Frontend" 113*4882a593Smuzhiyun depends on X86 && XEN 114*4882a593Smuzhiyun select PCI_XEN 115*4882a593Smuzhiyun select XEN_XENBUS_FRONTEND 116*4882a593Smuzhiyun default y 117*4882a593Smuzhiyun help 118*4882a593Smuzhiyun The PCI device frontend driver allows the kernel to import arbitrary 119*4882a593Smuzhiyun PCI devices from a PCI backend to support PCI driver domains. 120*4882a593Smuzhiyun 121*4882a593Smuzhiyunconfig PCI_ATS 122*4882a593Smuzhiyun bool 123*4882a593Smuzhiyun 124*4882a593Smuzhiyunconfig PCI_ECAM 125*4882a593Smuzhiyun bool 126*4882a593Smuzhiyun 127*4882a593Smuzhiyunconfig PCI_LOCKLESS_CONFIG 128*4882a593Smuzhiyun bool 129*4882a593Smuzhiyun 130*4882a593Smuzhiyunconfig PCI_BRIDGE_EMUL 131*4882a593Smuzhiyun bool 132*4882a593Smuzhiyun 133*4882a593Smuzhiyunconfig PCI_IOV 134*4882a593Smuzhiyun bool "PCI IOV support" 135*4882a593Smuzhiyun select PCI_ATS 136*4882a593Smuzhiyun help 137*4882a593Smuzhiyun I/O Virtualization is a PCI feature supported by some devices 138*4882a593Smuzhiyun which allows them to create virtual devices which share their 139*4882a593Smuzhiyun physical resources. 140*4882a593Smuzhiyun 141*4882a593Smuzhiyun If unsure, say N. 142*4882a593Smuzhiyun 143*4882a593Smuzhiyunconfig PCI_PRI 144*4882a593Smuzhiyun bool "PCI PRI support" 145*4882a593Smuzhiyun select PCI_ATS 146*4882a593Smuzhiyun help 147*4882a593Smuzhiyun PRI is the PCI Page Request Interface. It allows PCI devices that are 148*4882a593Smuzhiyun behind an IOMMU to recover from page faults. 149*4882a593Smuzhiyun 150*4882a593Smuzhiyun If unsure, say N. 151*4882a593Smuzhiyun 152*4882a593Smuzhiyunconfig PCI_PASID 153*4882a593Smuzhiyun bool "PCI PASID support" 154*4882a593Smuzhiyun select PCI_ATS 155*4882a593Smuzhiyun help 156*4882a593Smuzhiyun Process Address Space Identifiers (PASIDs) can be used by PCI devices 157*4882a593Smuzhiyun to access more than one IO address space at the same time. To make 158*4882a593Smuzhiyun use of this feature an IOMMU is required which also supports PASIDs. 159*4882a593Smuzhiyun Select this option if you have such an IOMMU and want to compile the 160*4882a593Smuzhiyun driver for it into your kernel. 161*4882a593Smuzhiyun 162*4882a593Smuzhiyun If unsure, say N. 163*4882a593Smuzhiyun 164*4882a593Smuzhiyunconfig PCI_P2PDMA 165*4882a593Smuzhiyun bool "PCI peer-to-peer transfer support" 166*4882a593Smuzhiyun depends on ZONE_DEVICE 167*4882a593Smuzhiyun select GENERIC_ALLOCATOR 168*4882a593Smuzhiyun help 169*4882a593Smuzhiyun Enableѕ drivers to do PCI peer-to-peer transactions to and from 170*4882a593Smuzhiyun BARs that are exposed in other devices that are the part of 171*4882a593Smuzhiyun the hierarchy where peer-to-peer DMA is guaranteed by the PCI 172*4882a593Smuzhiyun specification to work (ie. anything below a single PCI bridge). 173*4882a593Smuzhiyun 174*4882a593Smuzhiyun Many PCIe root complexes do not support P2P transactions and 175*4882a593Smuzhiyun it's hard to tell which support it at all, so at this time, 176*4882a593Smuzhiyun P2P DMA transactions must be between devices behind the same root 177*4882a593Smuzhiyun port. 178*4882a593Smuzhiyun 179*4882a593Smuzhiyun If unsure, say N. 180*4882a593Smuzhiyun 181*4882a593Smuzhiyunconfig PCI_LABEL 182*4882a593Smuzhiyun def_bool y if (DMI || ACPI) 183*4882a593Smuzhiyun select NLS 184*4882a593Smuzhiyun 185*4882a593Smuzhiyunconfig PCI_HYPERV 186*4882a593Smuzhiyun tristate "Hyper-V PCI Frontend" 187*4882a593Smuzhiyun depends on X86_64 && HYPERV && PCI_MSI && PCI_MSI_IRQ_DOMAIN && SYSFS 188*4882a593Smuzhiyun select PCI_HYPERV_INTERFACE 189*4882a593Smuzhiyun help 190*4882a593Smuzhiyun The PCI device frontend driver allows the kernel to import arbitrary 191*4882a593Smuzhiyun PCI devices from a PCI backend to support PCI driver domains. 192*4882a593Smuzhiyun 193*4882a593Smuzhiyunchoice 194*4882a593Smuzhiyun prompt "PCI Express hierarchy optimization setting" 195*4882a593Smuzhiyun default PCIE_BUS_DEFAULT 196*4882a593Smuzhiyun depends on PCI && EXPERT 197*4882a593Smuzhiyun help 198*4882a593Smuzhiyun MPS (Max Payload Size) and MRRS (Max Read Request Size) are PCIe 199*4882a593Smuzhiyun device parameters that affect performance and the ability to 200*4882a593Smuzhiyun support hotplug and peer-to-peer DMA. 201*4882a593Smuzhiyun 202*4882a593Smuzhiyun The following choices set the MPS and MRRS optimization strategy 203*4882a593Smuzhiyun at compile-time. The choices are the same as those offered for 204*4882a593Smuzhiyun the kernel command-line parameter 'pci', i.e., 205*4882a593Smuzhiyun 'pci=pcie_bus_tune_off', 'pci=pcie_bus_safe', 206*4882a593Smuzhiyun 'pci=pcie_bus_perf', and 'pci=pcie_bus_peer2peer'. 207*4882a593Smuzhiyun 208*4882a593Smuzhiyun This is a compile-time setting and can be overridden by the above 209*4882a593Smuzhiyun command-line parameters. If unsure, choose PCIE_BUS_DEFAULT. 210*4882a593Smuzhiyun 211*4882a593Smuzhiyunconfig PCIE_BUS_TUNE_OFF 212*4882a593Smuzhiyun bool "Tune Off" 213*4882a593Smuzhiyun depends on PCI 214*4882a593Smuzhiyun help 215*4882a593Smuzhiyun Use the BIOS defaults; don't touch MPS at all. This is the same 216*4882a593Smuzhiyun as booting with 'pci=pcie_bus_tune_off'. 217*4882a593Smuzhiyun 218*4882a593Smuzhiyunconfig PCIE_BUS_DEFAULT 219*4882a593Smuzhiyun bool "Default" 220*4882a593Smuzhiyun depends on PCI 221*4882a593Smuzhiyun help 222*4882a593Smuzhiyun Default choice; ensure that the MPS matches upstream bridge. 223*4882a593Smuzhiyun 224*4882a593Smuzhiyunconfig PCIE_BUS_SAFE 225*4882a593Smuzhiyun bool "Safe" 226*4882a593Smuzhiyun depends on PCI 227*4882a593Smuzhiyun help 228*4882a593Smuzhiyun Use largest MPS that boot-time devices support. If you have a 229*4882a593Smuzhiyun closed system with no possibility of adding new devices, this 230*4882a593Smuzhiyun will use the largest MPS that's supported by all devices. This 231*4882a593Smuzhiyun is the same as booting with 'pci=pcie_bus_safe'. 232*4882a593Smuzhiyun 233*4882a593Smuzhiyunconfig PCIE_BUS_PERFORMANCE 234*4882a593Smuzhiyun bool "Performance" 235*4882a593Smuzhiyun depends on PCI 236*4882a593Smuzhiyun help 237*4882a593Smuzhiyun Use MPS and MRRS for best performance. Ensure that a given 238*4882a593Smuzhiyun device's MPS is no larger than its parent MPS, which allows us to 239*4882a593Smuzhiyun keep all switches/bridges to the max MPS supported by their 240*4882a593Smuzhiyun parent. This is the same as booting with 'pci=pcie_bus_perf'. 241*4882a593Smuzhiyun 242*4882a593Smuzhiyunconfig PCIE_BUS_PEER2PEER 243*4882a593Smuzhiyun bool "Peer2peer" 244*4882a593Smuzhiyun depends on PCI 245*4882a593Smuzhiyun help 246*4882a593Smuzhiyun Set MPS = 128 for all devices. MPS configuration effected by the 247*4882a593Smuzhiyun other options could cause the MPS on one root port to be 248*4882a593Smuzhiyun different than that of the MPS on another, which may cause 249*4882a593Smuzhiyun hot-added devices or peer-to-peer DMA to fail. Set MPS to the 250*4882a593Smuzhiyun smallest possible value (128B) system-wide to avoid these issues. 251*4882a593Smuzhiyun This is the same as booting with 'pci=pcie_bus_peer2peer'. 252*4882a593Smuzhiyun 253*4882a593Smuzhiyunendchoice 254*4882a593Smuzhiyun 255*4882a593Smuzhiyunsource "drivers/pci/hotplug/Kconfig" 256*4882a593Smuzhiyunsource "drivers/pci/controller/Kconfig" 257*4882a593Smuzhiyunsource "drivers/pci/endpoint/Kconfig" 258*4882a593Smuzhiyunsource "drivers/pci/switch/Kconfig" 259*4882a593Smuzhiyun 260*4882a593Smuzhiyunendif 261