Re: [PATCH v7 047/120] x86/cpu/amd: Refactor CPUID(0x1) level calculation

From: Ahmed S. Darwish

Date: Tue Jun 02 2026 - 10:09:29 EST


On Thu, 28 May 2026, Christian Ludloff wrote:
>
> On Thu, May 28, 2026 at 8:42 AM Ahmed S. Darwish <darwi@xxxxxxxxxxxxx> wrote:
> >
> > AMD K8 init code has the cryptic CPUID(0x1).EAX level check:
> >
> > (level >= 0x0f48 && level < 0x0f50) || level >= 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.

Good catch, thanks! I'll adapt the changelog accordingly.

BR,
Ahmed