soc/intel/cmn/acpi/pep: Add PCI device number for warning msg

This patch fixes the wrong warning msg around `Unknown min d_state`
with having proper PCI Bus/Device/Function number to help to parse
the log better.

With this patch:

[WARN ]  Unknown min d_state for 20
[WARN ]  Unknown min d_state for 50
[WARN ]  Unknown min d_state for 98
[WARN ]  Unknown min d_state for 9a
[WARN ]  Unknown min d_state for f9

With this patch:

[WARN ]  Unknown min d_state for PCI: 00:04.0
[WARN ]  Unknown min d_state for PCI: 00:0a.0
[WARN ]  Unknown min d_state for PCI: 00:13.0
[WARN ]  Unknown min d_state for PCI: 00:13.2
[WARN ]  Unknown min d_state for PCI: 00:1f.1

Change-Id: Iccaf26882ce5998469b2be6cf5bc7082f193cb29
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73071
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
This commit is contained in:
Subrata Banik 2023-02-17 02:22:31 +05:30
parent eac71c0bcf
commit 8b223d43ce
1 changed files with 3 additions and 1 deletions

View File

@ -5,6 +5,7 @@
#include <assert.h> #include <assert.h>
#include <commonlib/bsd/helpers.h> #include <commonlib/bsd/helpers.h>
#include <console/console.h> #include <console/console.h>
#include <device/pci_def.h>
#include <intelblocks/acpi.h> #include <intelblocks/acpi.h>
#include <intelblocks/pmc_ipc.h> #include <intelblocks/pmc_ipc.h>
#include <stdlib.h> #include <stdlib.h>
@ -148,7 +149,8 @@ static enum acpi_device_sleep_states get_min_sleep_state(
for (size_t i = 0; i < size; i++) for (size_t i = 0; i < size; i++)
if (states_arr[i].pci_dev == dev->path.pci.devfn) if (states_arr[i].pci_dev == dev->path.pci.devfn)
return states_arr[i].min_sleep_state; return states_arr[i].min_sleep_state;
printk(BIOS_WARNING, "Unknown min d_state for %x\n", dev->path.pci.devfn); printk(BIOS_WARNING, "Unknown min d_state for PCI: 00:%02x.%01x\n",
PCI_SLOT(dev->path.pci.devfn), PCI_FUNC(dev->path.pci.devfn));
return ACPI_DEVICE_SLEEP_NONE; return ACPI_DEVICE_SLEEP_NONE;
default: default: