coreboot/src
Jeremy Soller cf2ac543a0 pciexp: Add support for allocating PCI express hotplug resources
This change adds support for allocating resources for PCI express hotplug
bridges when PCIEXP_HOTPLUG is selected. By default, this will add 32 PCI
subordinate numbers (buses), 256 MiB of prefetchable memory, 8 MiB of
non-prefetchable memory, and 8 KiB of I/O space to any device with the
PCI_EXP_SLTCAP_HPC bit set in the PCI_EXP_SLTCAP register, which
indicates hot-plugging capability. The resource allocation is configurable,
please see the PCIEXP_HOTPLUG_* variables in src/device/Kconfig.

In order to support the allocation of hotplugged PCI buses, a new field
is added to struct device called hotplug_buses. This is defaulted to
zero, but when set, it adds the hotplug_buses value to the subordinate
value of the PCI bridge. This allows devices to be plugged in and
unplugged after boot.

This code was tested on the System76 Darter Pro (darp6). Before this
change, there are not enough resources allocated to the Thunderbolt
PCI bridge to allow plugging in new devices after boot. This can be
worked around in the Linux kernel by passing a boot param such as:
pci=assign-busses,hpbussize=32,realloc

This change makes it possible to use Thunderbolt hotplugging without
kernel parameters, and attempts to match closely what our motherboard
manufacturer's firmware does by default.

Signed-off-by: Jeremy Soller <jeremy@system76.com>
Change-Id: I500191626584b83e6a8ae38417fd324b5e803afc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/35946
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-02-05 09:32:30 +00:00
..
acpi src/acpi: Update license headers to SPDX 2020-01-02 14:49:00 +00:00
arch arch/x86/include/arch: Add SMM_TASK_STATE_SEG 2020-02-04 18:54:37 +00:00
commonlib commonlib/cbfs.h: Correct spelling error in comment 2020-02-04 16:12:22 +00:00
console console/post: NOPOST means NOPOST 2020-01-18 10:53:08 +00:00
cpu cpu/x86: Make MP init timeout configurable 2020-02-04 16:13:57 +00:00
device pciexp: Add support for allocating PCI express hotplug resources 2020-02-05 09:32:30 +00:00
drivers drivers/generic/gfx: Add null pointer error check 2020-02-03 16:44:57 +00:00
ec ec/google/wilco: Set cpu id and cores to EC 2020-02-01 19:53:11 +00:00
include pciexp: Add support for allocating PCI express hotplug resources 2020-02-05 09:32:30 +00:00
lib commonlib: Add commonlib/bsd 2020-01-28 06:36:13 +00:00
mainboard mb/google/hatch: Enable Audio DSP oscillator qualification for S0ix 2020-02-04 16:15:04 +00:00
northbridge nb/intel/sandybridge: improve indexed register helper macros 2020-02-01 18:31:08 +00:00
security vendorcode/eltan/security: Switch to vb2 vboot library 2020-02-05 09:31:42 +00:00
soc soc/intel: Add get_pmbase 2020-02-04 18:54:01 +00:00
southbridge sb/intel/common/acpi: Add more Windows versions 2020-02-01 19:52:35 +00:00
superio src/superio/*: Fix typos 2020-01-30 13:46:09 +00:00
vendorcode vendorcode/eltan/security: Switch to vb2 vboot library 2020-02-05 09:31:42 +00:00
Kconfig src/Kconfig: Remove unused symbol 2020-01-27 07:41:39 +00:00