From d62764df8779abd2a7158659849a27b4e22bcd4a Mon Sep 17 00:00:00 2001 From: Cliff Huang Date: Wed, 7 Jan 2026 09:54:21 -0800 Subject: [PATCH] soc/intel/common/block/p2sb: Add SSDT function for SoC-specific features MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add weak function to fill SSDT for SoC-specific P2SB extensions. SoCs can implement this function to fill additional P2SB-related ACPI objects. For instance, a SoC might include the IOST ACPI interface that uses P2SB and enable it via SSDT for debug purposes at the OS level. BUG=none TEST=This change cannot be tested in isolation as it only adds an empty weak function. Testing requires SoCs to implement the function. Add the necessary code with the same function name in the SoC to generate ACPI objects and examine the SSDT for changes after boot. Signed-off-by: Cliff Huang Change-Id: I352f13b9b05dc4b61608a33c76946883bf0d3de3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/90691 Tested-by: build bot (Jenkins) Reviewed-by: Jérémy Compostella Reviewed-by: Alicja Michalska --- src/soc/intel/common/block/include/intelblocks/p2sb.h | 8 ++++++++ src/soc/intel/common/block/p2sb/p2sb.c | 8 ++++++++ 2 files changed, 16 insertions(+) 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[] = {