linux/hardware/cpu: add some missing Intel CPUs

Information taken from 1bf385f102/llvm/lib/TargetParser/Host.cpp
This commit is contained in:
Carlo Cabrera 2024-11-09 11:45:23 +08:00 committed by Carlo Cabrera
parent 3b40ab6680
commit 017c8d05dc
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

@ -18,7 +18,7 @@ module Hardware
return :dunno unless intel? return :dunno unless intel?
# See https://software.intel.com/en-us/articles/intel-architecture-and-processor-identification-with-cpuid-model-and-family-numbers # See https://software.intel.com/en-us/articles/intel-architecture-and-processor-identification-with-cpuid-model-and-family-numbers
# and https://github.com/llvm-mirror/llvm/blob/HEAD/lib/Support/Host.cpp # and https://github.com/llvm/llvm-project/blob/main/llvm/lib/TargetParser/Host.cpp
# and https://en.wikipedia.org/wiki/List_of_Intel_CPU_microarchitectures#Roadmap # and https://en.wikipedia.org/wiki/List_of_Intel_CPU_microarchitectures#Roadmap
vendor_id = cpuinfo[/^vendor_id\s*: (.*)/, 1] vendor_id = cpuinfo[/^vendor_id\s*: (.*)/, 1]
cpu_family = cpuinfo[/^cpu family\s*: ([0-9]+)/, 1].to_i cpu_family = cpuinfo[/^cpu family\s*: ([0-9]+)/, 1].to_i
@ -42,7 +42,7 @@ module Hardware
:sandybridge :sandybridge
when 0x25, 0x2c, 0x2f when 0x25, 0x2c, 0x2f
:westmere :westmere
when 0x1e, 0x1a, 0x2e when 0x1a, 0x1e, 0x1f, 0x2e
:nehalem :nehalem
when 0x17, 0x1d when 0x17, 0x1d
:penryn :penryn
@ -56,12 +56,26 @@ module Hardware
:haswell :haswell
when 0x3d, 0x47, 0x4f, 0x56 when 0x3d, 0x47, 0x4f, 0x56
:broadwell :broadwell
when 0x4e, 0x55, 0x5e, 0x8e, 0x9e when 0x4e, 0x5e, 0x8e, 0x9e, 0xa5, 0xa6
:skylake :skylake
when 0x66 when 0x66
:cannonlake :cannonlake
when 0x6a, 0x6c, 0x7d, 0x7e when 0x6a, 0x6c, 0x7d, 0x7e
:icelake :icelake
when 0xa7
:rocketlake
when 0x8c, 0x8d
:tigerlake
when 0x97, 0x9a, 0xbe, 0xb7, 0xba, 0xbf, 0xaa, 0xac
:alderlake
when 0xc5, 0xb5, 0xc6, 0xbd
:arrowlake
when 0xcc
:pantherlake
when 0xad, 0xae
:graniterapids
when 0xcf, 0x8f
:sapphirerapids
end end
when 0x0f when 0x0f
case cpu_model case cpu_model