Matt DeVillier has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/80553?usp=email )
Change subject: soc/intel/common/block/systemagent: Add ACPI stub for TCPU device ......................................................................
soc/intel/common/block/systemagent: Add ACPI stub for TCPU device
Add an ACPI stub containing the TCPU device in proper scope, along with the device status, on boards not using the DPTF driver, so that there exists an ACPI device to be referenced from the PEPD LPI constraint list.
Adding the stub fixes an AE_NOT_FOUND ACPI error under Linux for _SB.PCI0.TCPU on boards with the SA thermal device enabled but which do not use the Intel DPTF driver.
TEST=build/boot Linux,Win11 on purism/librem_cnl (Librem Mini v2).
Change-Id: I926d0461e5e0dfaf606102575c2be555a6bfb695 Signed-off-by: Matt DeVillier matt.devillier@gmail.com --- M src/soc/intel/common/block/systemagent/systemagent.c 1 file changed, 20 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/53/80553/1
diff --git a/src/soc/intel/common/block/systemagent/systemagent.c b/src/soc/intel/common/block/systemagent/systemagent.c index bcae6a6..0e1d8fe 100644 --- a/src/soc/intel/common/block/systemagent/systemagent.c +++ b/src/soc/intel/common/block/systemagent/systemagent.c @@ -402,6 +402,25 @@ return (uint64_t)size_field * MiB; }
+static void sa_acpi_fill_ssdt(const struct device *dev) +{ + const char *scope = acpi_device_path(dev); + + if (!scope) + return; + + /* Skip if DPTF driver in use */ + if (CONFIG(DRIVERS_INTEL_DPTF)) + return; + + acpigen_write_scope(scope); + acpigen_write_device(soc_acpi_name(dev)); + acpigen_write_ADR_pci_device(dev); + acpigen_write_STA(acpi_device_status(dev)); + acpigen_pop_len(); /* Device */ + acpigen_pop_len(); /* Scope */ +} + struct device_operations systemagent_ops = { .read_resources = systemagent_read_resources, .set_resources = pci_dev_set_resources, @@ -410,6 +429,7 @@ .ops_pci = &pci_dev_ops_pci, #if CONFIG(HAVE_ACPI_TABLES) .write_acpi_tables = sa_write_acpi_tables, + .acpi_fill_ssdt = sa_acpi_fill_ssdt, #endif };