diff --git a/src/soc/intel/common/block/include/intelblocks/p2sb.h b/src/soc/intel/common/block/include/intelblocks/p2sb.h index e587a4d25e..a431f617c7 100644 --- a/src/soc/intel/common/block/include/intelblocks/p2sb.h +++ b/src/soc/intel/common/block/include/intelblocks/p2sb.h @@ -3,6 +3,7 @@ #ifndef SOC_INTEL_COMMON_BLOCK_P2SB_H #define SOC_INTEL_COMMON_BLOCK_P2SB_H +#include #include #include @@ -68,4 +69,11 @@ void p2sb_set_ioapic_bdf(union p2sb_bdf bdf); */ void p2sb_soc_get_sb_mask(uint32_t *ep_mask, size_t count); +/* + * SoC might define this function to fill additional P2SB-related ACPI objects. + * For instance, the SoC might include the IOST ACPI interface to use P2SB and + * enable it via SSDT for debug purposes at the OS level. + */ +void soc_fill_p2sb_ssdt(const struct device *dev); + #endif /* SOC_INTEL_COMMON_BLOCK_P2SB_H */ diff --git a/src/soc/intel/common/block/p2sb/p2sb.c b/src/soc/intel/common/block/p2sb/p2sb.c index fea3103026..194c18f86a 100644 --- a/src/soc/intel/common/block/p2sb/p2sb.c +++ b/src/soc/intel/common/block/p2sb/p2sb.c @@ -130,10 +130,18 @@ static void read_resources(struct device *dev) mmio_range(dev, PCI_BASE_ADDRESS_0, P2SB_BAR, P2SB_SIZE); } +__weak void soc_fill_p2sb_ssdt(const struct device *dev) +{ + /* no-op */ +} + const struct device_operations p2sb_ops = { .read_resources = read_resources, .set_resources = noop_set_resources, .ops_pci = &pci_dev_ops_pci, +#if CONFIG(HAVE_ACPI_TABLES) + .acpi_fill_ssdt = soc_fill_p2sb_ssdt, +#endif }; static const unsigned short pci_device_ids[] = {