Re: [PATCH v7 047/120] x86/cpu/amd: Refactor CPUID(0x1) level calculation
Christian Ludloff <[email protected]> Thu, 28 May 2026 15:42:17 -0700
| Newsgroups | dev.linux.lists.x86-cpuid,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <CAKSQd8WKPQoDNUp-ykJ2j0mqg2Fn7m98ipC+d2Gz7MfHKUW5WQ@mail.gmail.com> |
On Thu, May 28, 2026 at 8:42=E2=80=AFAM Ahmed S. Darwish <darwi@linutronix.= de> wrote: > > AMD K8 init code has the cryptic CPUID(0x1).EAX level check: > > (level >=3D 0x0f48 && level < 0x0f50) || level >=3D 0x0f58 > > Given that: > > EAX[0:3] is the CPU stepping > EAX[4:7] is the CPU base model > EAX[8:11] is the base family ID, with 0xf as the largest > EAX[16:19] is the CPU extended model > > [...] For K8 the 8-bit model field actually contained 3 distinct pieces of information: bits 7...4 encoded process tech and K8 revision, bits 3...2 encoded core type, core count, as well as cache size, and bits 1...0 encoded socket type. https://www.sandpile.org/x86/cpuid.htm#leaf_0000_0001h_Kn right below the K7 section. The rest of the AMD models were sane. -- C.