summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@gmail.com>2023-10-21 20:32:19 -0500
committerFelix Held <felix-coreboot@felixheld.de>2023-10-23 20:59:03 +0000
commit06fe0d7828a6529b22b88ca0f610a918f2589e39 (patch)
tree3df07bb68bf5dfd951dba1154c9439d41fd711c2 /src/soc/intel
parent80b5fe69f6d9897173d0fa7c0284be678d775821 (diff)
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 <matt.devillier@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/78518 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subratabanik@google.com> Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/common/block/acpi/pep.c4
1 files changed, 4 insertions, 0 deletions
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;