summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
authorMatt DeVillier <matt.devillier@gmail.com>2024-02-15 14:31:41 -0600
committerFelix Singer <service+coreboot-gerrit@felixsinger.de>2024-02-18 02:28:41 +0000
commit76c7176e594fb1bb2ba8e6d7f8747d9e765ffca0 (patch)
tree634097c586439d4d6d6abcba624514e39bd18cef /src/soc/intel
parent8c1bcb7fcba12b2078d6e5c805a5b357b4a6be63 (diff)
soc/intel/common/block/dtt: 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> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80553 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/common/block/dtt/dtt.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/soc/intel/common/block/dtt/dtt.c b/src/soc/intel/common/block/dtt/dtt.c
index a1a03ec289..1d70335491 100644
--- a/src/soc/intel/common/block/dtt/dtt.c
+++ b/src/soc/intel/common/block/dtt/dtt.c
@@ -1,8 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
+#include <acpi/acpigen.h>
+#include <acpi/acpigen_pci.h>
#include <device/device.h>
#include <device/pci.h>
#include <device/pci_ids.h>
+#include <intelblocks/acpi.h>
static const unsigned short pci_device_ids[] = {
PCI_DID_INTEL_RPL_DTT,
@@ -14,12 +17,34 @@ static const unsigned short pci_device_ids[] = {
0
};
+static void dtt_acpi_fill_ssdt(const struct device *dev)
+{
+ /* Skip if DPTF driver in use since TCPU device will already exist */
+ if (CONFIG(DRIVERS_INTEL_DPTF))
+ return;
+
+ const char *scope = acpi_device_scope(dev);
+
+ if (!scope)
+ 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 */
+}
+
static struct device_operations dptf_dev_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.scan_bus = scan_generic_bus,
.ops_pci = &pci_dev_ops_pci,
+#if CONFIG(HAVE_ACPI_TABLES)
+ .acpi_fill_ssdt = dtt_acpi_fill_ssdt,
+#endif
};
static const struct pci_driver pch_dptf __pci_driver = {