提交 718ca226 编写于 作者: P phh

7142113: Add Ivy Bridge to the known Intel x86 cpu families

Summary: In vm_version_x86.hpp, add and use CPU_MODEL_IVYBRIDGE_EP, and restrict is_intel_tsc_synced_at_init() to EP models.
Reviewed-by: kvn, acorn
上级 cb8511d0
...@@ -249,13 +249,18 @@ protected: ...@@ -249,13 +249,18 @@ protected:
enum { enum {
// AMD // AMD
CPU_FAMILY_AMD_11H = 17, CPU_FAMILY_AMD_11H = 0x11,
// Intel // Intel
CPU_FAMILY_INTEL_CORE = 6, CPU_FAMILY_INTEL_CORE = 6,
CPU_MODEL_NEHALEM_EP = 26, CPU_MODEL_NEHALEM = 0x1e,
CPU_MODEL_WESTMERE_EP = 44, CPU_MODEL_NEHALEM_EP = 0x1a,
// CPU_MODEL_IVYBRIDGE_EP = ??, TODO - get real value CPU_MODEL_NEHALEM_EX = 0x2e,
CPU_MODEL_SANDYBRIDGE_EP = 45 CPU_MODEL_WESTMERE = 0x25,
CPU_MODEL_WESTMERE_EP = 0x2c,
CPU_MODEL_WESTMERE_EX = 0x2f,
CPU_MODEL_SANDYBRIDGE = 0x2a,
CPU_MODEL_SANDYBRIDGE_EP = 0x2d,
CPU_MODEL_IVYBRIDGE_EP = 0x3a
} cpuExtendedFamily; } cpuExtendedFamily;
// cpuid information block. All info derived from executing cpuid with // cpuid information block. All info derived from executing cpuid with
...@@ -325,7 +330,7 @@ protected: ...@@ -325,7 +330,7 @@ protected:
uint32_t proc_name_4, proc_name_5, proc_name_6, proc_name_7; uint32_t proc_name_4, proc_name_5, proc_name_6, proc_name_7;
uint32_t proc_name_8, proc_name_9, proc_name_10,proc_name_11; uint32_t proc_name_8, proc_name_9, proc_name_10,proc_name_11;
// cpuid function 0x80000005 //AMD L1, Intel reserved // cpuid function 0x80000005 // AMD L1, Intel reserved
uint32_t ext_cpuid5_eax; // unused currently uint32_t ext_cpuid5_eax; // unused currently
uint32_t ext_cpuid5_ebx; // reserved uint32_t ext_cpuid5_ebx; // reserved
ExtCpuid5Ex ext_cpuid5_ecx; // L1 data cache info (AMD) ExtCpuid5Ex ext_cpuid5_ecx; // L1 data cache info (AMD)
...@@ -547,15 +552,15 @@ public: ...@@ -547,15 +552,15 @@ public:
static bool is_intel_tsc_synched_at_init() { static bool is_intel_tsc_synched_at_init() {
if (is_intel_family_core()) { if (is_intel_family_core()) {
uint32_t ext_model = extended_cpu_model(); uint32_t ext_model = extended_cpu_model();
if (ext_model == CPU_MODEL_NEHALEM_EP || if (ext_model == CPU_MODEL_NEHALEM_EP ||
ext_model == CPU_MODEL_WESTMERE_EP || ext_model == CPU_MODEL_WESTMERE_EP ||
// TODO ext_model == CPU_MODEL_IVYBRIDGE_EP || ext_model == CPU_MODEL_SANDYBRIDGE_EP ||
ext_model == CPU_MODEL_SANDYBRIDGE_EP) { ext_model == CPU_MODEL_IVYBRIDGE_EP) {
// 2-socket invtsc support. EX versions with 4 sockets are not // <= 2-socket invariant tsc support. EX versions are usually used
// guaranteed to synchronize tscs at initialization via a double // in > 2-socket systems and likely don't synchronize tscs at
// handshake. The tscs can be explicitly set in software. Code // initialization.
// that uses tsc values must be prepared for them to arbitrarily // Code that uses tsc values must be prepared for them to arbitrarily
// jump backward or forward. // jump forward or backward.
return true; return true;
} }
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册