From ad7323bd61b2c2ccd3a5c4ad1478f55fceb17576 Mon Sep 17 00:00:00 2001 From: Shaun Jackman Date: Mon, 1 Oct 2018 09:44:59 -0700 Subject: [PATCH] Hardware::CPU: Add Skylake [Linux] --- Library/Homebrew/extend/os/linux/hardware/cpu.rb | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Library/Homebrew/extend/os/linux/hardware/cpu.rb b/Library/Homebrew/extend/os/linux/hardware/cpu.rb index 54127a4ff3..75d983ff00 100644 --- a/Library/Homebrew/extend/os/linux/hardware/cpu.rb +++ b/Library/Homebrew/extend/os/linux/hardware/cpu.rb @@ -11,8 +11,11 @@ module Hardware 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/master/lib/Support/Host.cpp + # and https://en.wikipedia.org/wiki/List_of_Intel_CPU_microarchitectures#Roadmap cpu_family = cpuinfo[/^cpu family\s*: ([0-9]+)/, 1].to_i cpu_model = cpuinfo[/^model\s*: ([0-9]+)/, 1].to_i + unknown = :"unknown_0x#{cpu_family.to_s(16)}_0x#{cpu_model.to_s(16)}" case cpu_family when 0x06 case cpu_model @@ -36,12 +39,10 @@ module Hardware :haswell when 0x3d, 0x47, 0x4f, 0x56 :broadwell - when 0x5e + when 0x4e, 0x55, 0x5e, 0x8e, 0x9e :skylake - when 0x8e - :kabylake else - :dunno + unknown end when 0x0f case cpu_model @@ -50,10 +51,10 @@ module Hardware when 0x03, 0x04 :prescott else - :dunno + unknown end else - :dunno + unknown end end