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>
This commit is contained in:
parent
80b5fe69f6
commit
06fe0d7828
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue