diff --git a/ntoskrnl/ke/amd64/cpu.c b/ntoskrnl/ke/amd64/cpu.c index 659264cde30..6480a2c0c3b 100644 --- a/ntoskrnl/ke/amd64/cpu.c +++ b/ntoskrnl/ke/amd64/cpu.c @@ -52,14 +52,16 @@ KiSetProcessorType(VOID) * Model and the Step, while the Type contains the returned Type. * We ignore the family. * - * For the stepping, we convert this: zzzzzzxy into this: x0y + * For the stepping, we convert this: zzzxzzxy into this: xx0y */ Stepping = CpuInfo.Eax & 0xF0; Stepping <<= 4; - Stepping += (CpuInfo.Eax & 0xFF); - Stepping &= 0xF0F; + Stepping += ((CpuInfo.Eax & 0x000F0000) >> 4); + Stepping += (CpuInfo.Eax & 0xF); Type = CpuInfo.Eax & 0xF00; Type >>= 8; + Type += ((CpuInfo.Eax & 0x0FF00000) >> 16); + /* Save them in the PRCB */ KeGetCurrentPrcb()->CpuID = TRUE; diff --git a/ntoskrnl/ke/i386/cpu.c b/ntoskrnl/ke/i386/cpu.c index e627efe228a..40e21964b9e 100644 --- a/ntoskrnl/ke/i386/cpu.c +++ b/ntoskrnl/ke/i386/cpu.c @@ -101,14 +101,15 @@ KiSetProcessorType(VOID) * Model and the Step, while the Type contains the returned Type. * We ignore the family. * - * For the stepping, we convert this: zzzzzzxy into this: x0y + * For the stepping, we convert this: zzzxzzxy into this: xx0y */ Stepping = CpuInfo.Eax & 0xF0; Stepping <<= 4; - Stepping += (CpuInfo.Eax & 0xFF); - Stepping &= 0xF0F; + Stepping += ((CpuInfo.Eax & 0x000F0000) >> 4); + Stepping += (CpuInfo.Eax & 0xF); Type = CpuInfo.Eax & 0xF00; Type >>= 8; + Type += ((CpuInfo.Eax & 0x0FF00000) >> 16); /* Save them in the PRCB */ KeGetCurrentPrcb()->CpuID = TRUE;