Fix Intel TDP and PCIe scraping for mobile cTDP chips (Tiger Lake etc.)

This commit is contained in:
2026-04-13 11:36:40 +02:00
parent eedb96c53a
commit 087090c44b

View File

@@ -410,22 +410,34 @@ def _ark_map(specs: dict, data: dict) -> None:
if l2:
data["l2_cache"] = l2
tdp = s(r'^TDP$|^PBP$|base\s*power|thermal\s*design\s*power')
tdp = s(r'^TDP$|^PBP$|base\s*power|thermal\s*design\s*power|processor\s*base\s*power')
if tdp:
m = re.search(r'(\d+)', tdp)
if m:
data["tdp_w"] = int(m.group(1))
max_tdp = s(r'max\s*turbo\s*power|^MTP$|maximum\s*turbo\s*power|configurable\s*tdp.?up')
# Fallback for mobile/cTDP chips (Tiger Lake etc.) that have no bare "TDP" label —
# match "Configurable TDP-up" but NOT "Configurable TDP-up Base Frequency"
if not data.get("tdp_w"):
ctdp_up = s(r'configurable\s*tdp.?up\s*$')
if ctdp_up:
m = re.search(r'(\d+)', ctdp_up)
if m:
data["tdp_w"] = int(m.group(1))
max_tdp = s(r'max\s*turbo\s*power|^MTP$|maximum\s*turbo\s*power|configurable\s*tdp.?up(?!\s*base|\s*freq)')
if max_tdp:
m = re.search(r'(\d+)', max_tdp)
if m:
data["max_tdp_w"] = int(m.group(1))
pcie_ver = s(r'pci\s*express\s*revision|pcie\s*version|pci\s*express\s*version')
# Prefer "Microprocessor PCIe Revision" over "Chipset / PCH PCIe Revision"
pcie_ver = s(r'microprocessor\s*pci')
if not pcie_ver:
pcie_ver = s(r'pci\s*express\s*revision|pcie\s*(?:version|revision)|pci\s*express\s*version')
if pcie_ver:
m = re.search(r'(\d+(?:\.\d+)?)', pcie_ver)
# Handles "Gen 4", "4.0", "PCIe® 4.0" etc.
m = re.search(r'[Gg]en\s*(\d+(?:\.\d+)?)|(\d+(?:\.\d+)?)', pcie_ver)
if m:
data["pcie_version"] = m.group(1)
data["pcie_version"] = m.group(1) or m.group(2)
pcie_l = s(r'max.+pci.+lanes|pci.+express.+lanes')
if pcie_l:
m = re.search(r'(\d+)', pcie_l)