mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-01 21:08:11 +02:00
gallium/u_cpu_detect: fix parsing the CPU family
According to: https://support.amd.com/TechDocs/54945_PPR_Family_17h_Models_00h-0Fh.pdf Also Intel: https://www.microbe.cz/docs/CPUID.pdf Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
a84fd58f48
commit
ce432e259d
1 changed files with 2 additions and 1 deletions
|
|
@ -420,8 +420,9 @@ util_cpu_detect_once(void)
|
|||
cpuid (0x00000001, regs2);
|
||||
|
||||
util_cpu_caps.x86_cpu_type = (regs2[0] >> 8) & 0xf;
|
||||
/* Add "extended family". */
|
||||
if (util_cpu_caps.x86_cpu_type == 0xf)
|
||||
util_cpu_caps.x86_cpu_type = 8 + ((regs2[0] >> 20) & 255); /* use extended family (P4, IA64) */
|
||||
util_cpu_caps.x86_cpu_type += ((regs2[0] >> 20) & 0xff);
|
||||
|
||||
/* general feature flags */
|
||||
util_cpu_caps.has_tsc = (regs2[3] >> 4) & 1; /* 0x0000010 */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue