soc/intel/common/pcie: Disable removed RPs when updating devicetree

If a root port is not present but was enabled in the devicetree, mark
it disabled so that no ACPI references will be generated by any
function which walks the devicetree (eg, LPI constraints).

TEST=tested with rest of patch train

Change-Id: I52e23fb1c0148a599ed736fc294e593ebbd27860
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78517
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Matt DeVillier 2023-10-21 20:24:22 -05:00 committed by Felix Held
parent f5f1ff355e
commit 80b5fe69f6
1 changed files with 2 additions and 1 deletions

View File

@ -115,8 +115,9 @@ static bool pcie_rp_update_dev(
if (new_fn < 0) {
if (dev->enabled) {
printk(BIOS_NOTICE, "%s: Couldn't find PCIe Root Port #%u "
"(originally %s) which was enabled in devicetree, removing.\n",
"(originally %s) which was enabled in devicetree, removing and disabling.\n",
__func__, rp_idx + 1, dev_path(dev));
dev->enabled = 0;
}
return true;
} else if (PCI_FUNC(dev->path.pci.devfn) != new_fn) {