Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

linux/hardware/cpu: add some missing Intel CPUs #18743

Merged
merged 1 commit into from
Nov 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 17 additions & 3 deletions Library/Homebrew/extend/os/linux/hardware/cpu.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
return :dunno unless intel?

# 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
vendor_id = cpuinfo[/^vendor_id\s*: (.*)/, 1]
cpu_family = cpuinfo[/^cpu family\s*: ([0-9]+)/, 1].to_i
Expand All @@ -42,7 +42,7 @@
:sandybridge
when 0x25, 0x2c, 0x2f
:westmere
when 0x1e, 0x1a, 0x2e
when 0x1a, 0x1e, 0x1f, 0x2e

Check warning on line 45 in Library/Homebrew/extend/os/linux/hardware/cpu.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/extend/os/linux/hardware/cpu.rb#L45

Added line #L45 was not covered by tests
:nehalem
when 0x17, 0x1d
:penryn
Expand All @@ -56,12 +56,26 @@
:haswell
when 0x3d, 0x47, 0x4f, 0x56
:broadwell
when 0x4e, 0x55, 0x5e, 0x8e, 0x9e
when 0x4e, 0x5e, 0x8e, 0x9e, 0xa5, 0xa6

Check warning on line 59 in Library/Homebrew/extend/os/linux/hardware/cpu.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/extend/os/linux/hardware/cpu.rb#L59

Added line #L59 was not covered by tests
:skylake
when 0x66
:cannonlake
when 0x6a, 0x6c, 0x7d, 0x7e
: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

Check warning on line 78 in Library/Homebrew/extend/os/linux/hardware/cpu.rb

View check run for this annotation

Codecov / codecov/patch

Library/Homebrew/extend/os/linux/hardware/cpu.rb#L65-L78

Added lines #L65 - L78 were not covered by tests
end
when 0x0f
case cpu_model
Expand Down
Loading