From cae47dfd44d845aa1ebe840a5655a6318f7f8bce Mon Sep 17 00:00:00 2001 From: Cliff Huang Date: Tue, 17 Jun 2025 16:04:45 -0700 Subject: [PATCH] soc/intel/pantherlake: Correct DRHC and SATC in DMAR table MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit addresses an issue within the DMAR (DMA Remapping) table configuration for Intel Panther Lake (PTL) SoC. Specifically, it introduces telemetry support to the DRHC structure. In addition, the unnecessary Dynamic Platform and Thermal Framework (DPTF) entry is removed from the SATC structure, aligning with the BIOS Requirements. For detailed specifications, refer to the 812562 PTL Firmware Architecture Specification (FAS). BUG=b:423943431 TEST=Boot Fatcat board to ALOS. Disassemble the DMAR table using 2023+ version of iasl and check the DMAR for the telemetry entry in the DRHC structure. There should not be a DPTF entry in the SATC structure. Signed-off-by: Cliff Huang Change-Id: I289f2520e4449a6aa33f53040b6c8f66faa4f2d7 Reviewed-on: https://review.coreboot.org/c/coreboot/+/88136 Reviewed-by: Wonkyu Kim Reviewed-by: Subrata Banik Reviewed-by: Jérémy Compostella Tested-by: build bot (Jenkins) --- src/soc/intel/pantherlake/acpi.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/soc/intel/pantherlake/acpi.c b/src/soc/intel/pantherlake/acpi.c index 0252e1c503..bf769d952a 100644 --- a/src/soc/intel/pantherlake/acpi.c +++ b/src/soc/intel/pantherlake/acpi.c @@ -253,6 +253,7 @@ static unsigned long soc_fill_dmar(unsigned long current) bool is_dptf_enabled = is_devfn_enabled(PCI_DEVFN_DPTF); bool is_npu_enabled = is_devfn_enabled(PCI_DEVFN_NPU); bool is_iaa_enabled = is_devfn_enabled(PCI_DEVFN_IAA); + bool is_telemetry_enabled = is_devfn_enabled(PCI_DEVFN_TELEMETRY); printk(BIOS_DEBUG, "%s - gfxvtbar:0x%llx 0x%x\n", __func__, gfxvtbar, MCHBAR32(GFXVTBAR)); if (vtd_engine_enabled & GFXVT_ENABLED) { @@ -263,8 +264,8 @@ static unsigned long soc_fill_dmar(unsigned long current) acpi_dmar_drhd_fixup(tmp, current); } - if ((is_ipu_enabled || is_dptf_enabled || is_npu_enabled || is_iaa_enabled) && - (vtd_engine_enabled & NONGFXVT_ENABLED)) { + if ((is_ipu_enabled || is_dptf_enabled || is_telemetry_enabled || is_npu_enabled || + is_iaa_enabled) && (vtd_engine_enabled & NONGFXVT_ENABLED)) { const unsigned long tmp = current; current += acpi_create_dmar_drhd(current, 0, 0, (uint64_t)VTVC0_BASE_ADDRESS, VTVC0_BASE_SIZE); @@ -272,6 +273,8 @@ static unsigned long soc_fill_dmar(unsigned long current) current += acpi_create_dmar_ds_pci(current, 0, PCI_DEV_SLOT_IPU, 0); if (is_dptf_enabled) current += acpi_create_dmar_ds_pci(current, 0, PCI_DEV_SLOT_DPTF, 0); + if (is_telemetry_enabled) + current += acpi_create_dmar_ds_pci(current, 0, PCI_DEV_SLOT_TELEMETRY, 0); if (is_npu_enabled) current += acpi_create_dmar_ds_pci(current, 0, PCI_DEV_SLOT_NPU, 0); if (is_iaa_enabled) @@ -302,12 +305,10 @@ static unsigned long soc_fill_dmar(unsigned long current) acpi_dmar_rmrr_fixup(tmp, current); } - if (is_ipu_enabled || is_dptf_enabled || is_npu_enabled || is_iaa_enabled) { + if (is_ipu_enabled || is_npu_enabled || is_iaa_enabled) { const unsigned long tmp = current; current += acpi_create_dmar_satc(current, ATC_REQUIRED, 0); current += acpi_create_dmar_ds_pci(current, 0, PCI_DEV_SLOT_IGD, 0); - if (is_dptf_enabled) - current += acpi_create_dmar_ds_pci(current, 0, PCI_DEV_SLOT_DPTF, 0); if (is_ipu_enabled) current += acpi_create_dmar_ds_pci(current, 0, PCI_DEV_SLOT_IPU, 0); if (is_npu_enabled)