soc/intel/alderlake: Correct ISH partition availability check

The previous implementation incorrectly assumed that the presence of a
UFS device implied the availability of the ISH partition. This is not
always true, especially on Alder Lake platforms where ISH may be
enabled by default even without UFS.

This patch fixes the issue by directly checking for the presence of the
ISH device to determine if the ISH partition is available.

BUG=b:359440547
TEST=1. Able to dump the ISH version with UFS device:

```
tirwen-rev3 ~ # cbmem -c -1 | grep ISH
[DEBUG]  ISH version: 5.4.2.7780
```

2. Able to dump the ISH version with eMMC device:

```
trulo-rev1 ~ # cbmem -c | grep ISH
[DEBUG]  ISH version: 5.4.2.7780
```

Change-Id: I411e36606c0697f91050af40e0636f7c64810e95
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83898
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
This commit is contained in:
Subrata Banik
2024-08-13 18:08:56 +00:00
parent 7de2911589
commit 0b2f9c9582

View File

@@ -167,16 +167,16 @@ const char *soc_acpi_name(const struct device *dev)
/* /*
* SoC override API to identify if ISH Firmware existed inside CSE FPT. * SoC override API to identify if ISH Firmware existed inside CSE FPT.
* *
* SoC with UFS enabled would like to keep ISH enabled as well, hence * Identifying the ISH enabled device is required to conclude that the ISH
* identifying the UFS enabled device is enough to conclude that the ISH * partition also is available (because ISH may be default enabled for non-UFS
* partition also is available. * platforms as well starting with Alder Lake).
*/ */
bool soc_is_ish_partition_enabled(void) bool soc_is_ish_partition_enabled(void)
{ {
struct device *ufs = pcidev_path_on_root(PCH_DEVFN_UFS); struct device *ish = pcidev_path_on_root(PCH_DEVFN_ISH);
uint16_t ufs_pci_id = ufs ? pci_read_config16(ufs, PCI_DEVICE_ID) : 0xFFFF; uint16_t ish_pci_id = ish ? pci_read_config16(ish, PCI_DEVICE_ID) : 0xFFFF;
if (ufs_pci_id == 0xFFFF) if (ish_pci_id == 0xFFFF)
return false; return false;
return true; return true;