From 06fe0d7828a6529b22b88ca0f610a918f2589e39 Mon Sep 17 00:00:00 2001 From: Matt DeVillier Date: Sat, 21 Oct 2023 20:32:19 -0500 Subject: soc/intel/common/acpi: Don't generate LPI constraints for disabled/hidden devices When walking the devicetree to generate the list of devices and minimum sleep states, skip any devices which have the disable or hidden flags set. This prevents adding entries for devices which are not present, which are hidden (and likely to not have a min sleep state entry), or generating duplicate entries in the case of PCIe remapping. Any of these conditions are considered invalid by Windows and will result in a BSOD with an INTERNAL_POWER_ERROR. TEST=tested with rest of patch train Change-Id: I06f64a72c82b9e03dc8af18700d24b3d10b7d3a7 Signed-off-by: Matt DeVillier Reviewed-on: https://review.coreboot.org/c/coreboot/+/78518 Tested-by: build bot (Jenkins) Reviewed-by: Subrata Banik Reviewed-by: Paul Menzel Reviewed-by: Felix Singer --- src/soc/intel/common/block/acpi/pep.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/soc/intel/common/block/acpi/pep.c b/src/soc/intel/common/block/acpi/pep.c index 5e0334530c..39f95425db 100644 --- a/src/soc/intel/common/block/acpi/pep.c +++ b/src/soc/intel/common/block/acpi/pep.c @@ -169,6 +169,8 @@ static void acpi_lpi_get_constraints(void *unused) if (size && states_arr) { for (dev = all_devices; dev; dev = dev->next) { + if (!dev->enabled || dev->hidden) + continue; if (get_min_sleep_state(dev, states_arr, size) != ACPI_DEVICE_SLEEP_NONE) num_entries++; @@ -182,6 +184,8 @@ static void acpi_lpi_get_constraints(void *unused) size_t cpu_index = 0; for (dev = all_devices; dev; dev = dev->next) { + if (!dev->enabled || dev->hidden) + continue; min_sleep_state = get_min_sleep_state(dev, states_arr, size); if (min_sleep_state == ACPI_DEVICE_SLEEP_NONE) continue; -- cgit v1.2.3