✨ Identify current CPUs instead of calling them all "Intel Core" - #30
Merged
Conversation
`codename_for` decoded the CPUID model byte and then discarded it for Intel, matching on the family alone. Family 6 has carried every Intel part from the Pentium Pro to Panther Lake, so a Core 2 Duo, a 14900K and a Core Ultra 9 all rendered the identical string "Intel Core" — and every Atom rendered it too, which is not a vaguer answer but a wrong one. The AMD side had the opposite failure: `(0x1a, _) => "Granite Ridge (Zen 5)"` gave a desktop codename to every Zen 5 part, so a Strix Point laptop and a Turin server both claimed to be a Granite Ridge desktop. `(0x17, _)` likewise called first-generation Ryzen a Zen 2 part. Both vendors now match on family and model, split into `intel_codename` and `amd_codename`. Sourcing was the constraint, because a wrong codename is worse than a blank one — it renders in the System Summary directly beside the CPUID signature a user can check it against. Nothing here is written from recall: - Intel through Tiger Lake / Comet Lake comes from this repository's own `Hardware/CPU/IntelCPU.cs`, the OpenHardwareMonitor detection these sources are a port of. - Intel from Rocket Lake onward, and the Atom and Xeon lines, come from the Linux kernel's `arch/x86/include/asm/intel-family.h`. - AMD comes from libcpuid's `recog_amd.c`. Two consequences worth calling out: Intel is leaving family 6. Nova Lake is family 12h and Diamond Rapids 13h, and matching on `family == 0x6` reported "" for both; the new table matches the family rather than assuming it. Unknown models degrade to a generation label that is still true rather than to a guess or a blank. AMD does not mix generations within a family — 17h is Zen through Zen 2, 19h is Zen 3 and Zen 4, 1Ah is Zen 5 — so a part released after this table was written still reports its generation correctly. Nine tests cover the mapping. They pass the family and model as arguments rather than executing CPUID, so they run on every CI leg including aarch64. Verified on a Ryzen 7 7700 (CPUID 00A60F12 -> family 19h, model 61h), which still reports "Raphael (Zen 4)" through `sensorview info`. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
The fallback contradicted the rule the rest of this table follows. Family 6 carries every Atom as well as every Core, so answering "Intel Core" for an unrecognised model is a wrong brand rather than a cautious one — the same error the Atom arms a few lines above exist to remove. Now "Intel (family 6h)", matching the 12h and 13h arms. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This was referenced Aug 26, 2026
Member
Author
|
The Windows and macOS checks here are red for a reason that has nothing to do with this PR: both fail at the Clippy step on Confirmed by reading the failing logs: the lint fires in Merge #32 first and these go green on a rebase. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The bug
codename_fordecoded the CPUID model byte atsysinfo.rs:47-49and then threw it away for Intel, matching on the family alone:Family 6 has carried every Intel part from the Pentium Pro to Panther Lake. So a Core 2 Duo, a 14900K and a Core Ultra 9 all rendered the identical string — and so did every Atom, which is not a vaguer answer but a wrong one.
AMD had the opposite failure:
Family 1Ah is all of Zen 5, so a Strix Point laptop and a Turin server both claimed to be a Granite Ridge desktop.
(0x17, _)likewise called a first-generation Summit Ridge Ryzen a Zen 2 part.The fix
Both vendors now match on family and model, split into
intel_codenameandamd_codename.Sourcing — the actual constraint
A wrong codename is worse than a blank one: it renders in the System Summary directly beside the CPUID signature a user can check it against. So nothing in these tables is written from recall. Every entry is citable:
Hardware/CPU/IntelCPU.cs— the OpenHardwareMonitor detection these sources are a port ofarch/x86/include/asm/intel-family.hrecog_amd.cWorth knowing: the C# tree has no AMD codenames at all — a repo-wide search turns up only six brand-string literals for Tctl offsets. The AMD entries that were already in this file were unsourced relative to this repository, which is how
(0x1a, _)came to over-claim. They are now pinned to libcpuid's family/model values.Two things this surfaced
Intel is leaving family 6. Nova Lake is family 12h and Diamond Rapids 13h. Matching on
family == 0x6returned""for both, so the new table matches on the family rather than assuming it. The family/model arithmetic itself needed no change — it already matches the kernel'sx86_family()/x86_model()exactly.Unknown models degrade to something still true. AMD does not mix generations within a family — 17h is Zen…Zen 2, 19h is Zen 3 and Zen 4, 1Ah is Zen 5 throughout — so each family arm ends in a generation-level catch-all. A part released after this table was written reports
Zen 5rather than a wrong codename or a blank. Unknown Intel family-6 models fall back toIntel (family 6h)— deliberately notIntel Core, since family 6 carries every Atom too and that would be a wrong brand rather than a cautious one. Unknown vendors return"".Verification
cargo clippy --all-targets -- -D warningsclean on--no-default-featuresand ongui.00A60F12→ family 19h, model 61h) still reportsRaphael (Zen 4)viasensorview info.Not in scope
The wider audit turned up related items left for separate PRs — chiefly the SMBIOS memory-type table, which decodes only DDR3/4/5 and renders soldered-LPDDR laptops as the literal string "DRAM SDRAM".
🤖 Generated with Claude Code