summaryrefslogtreecommitdiff
path: root/src/cpu
diff options
context:
space:
mode:
authorAngel Pons <th3fanbus@gmail.com>2020-10-28 21:48:29 +0100
committerPatrick Georgi <pgeorgi@google.com>2021-01-21 11:27:27 +0000
commit8b0636e06f0e5e20022baaa57625c7c8d9c1457c (patch)
treeafc0da8b34258cbb478ef8df432de958cadba51f /src/cpu
parent8e6f162cc0e8758d2d8853ece1b2d8a31e9bf313 (diff)
cpu/intel/haswell: Clean up CPUID definitions
The `mobile` suffix is misleading, since desktop CPUs share the same CPUIDs. Remove unused stepping IDs and add the full CPUIDs instead. Finally, add Broadwell CPUIDs in preparation for merging CPU code. Note that steppings for Haswell in various comments are incorrect. Tested with BUILD_TIMELESS=1, Asrock B85M Pro4 remains identical. Change-Id: I19e56b8826b1514550ae95e6363b0df2d08e3cb7 Signed-off-by: Angel Pons <th3fanbus@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/46915 Reviewed-by: Arthur Heymans <arthur@aheymans.xyz> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/cpu')
-rw-r--r--src/cpu/intel/haswell/haswell.h39
-rw-r--r--src/cpu/intel/haswell/haswell_init.c14
2 files changed, 33 insertions, 20 deletions
diff --git a/src/cpu/intel/haswell/haswell.h b/src/cpu/intel/haswell/haswell.h
index 5084cd3bef..87c4e0a5b9 100644
--- a/src/cpu/intel/haswell/haswell.h
+++ b/src/cpu/intel/haswell/haswell.h
@@ -5,19 +5,32 @@
#include <stdint.h>
-/* Haswell CPU types */
-#define HASWELL_FAMILY_MOBILE 0x306c0
-#define HASWELL_FAMILY_ULT 0x40650
-
-/* Haswell CPU steppings */
-#define HASWELL_STEPPING_MOBILE_A0 1
-#define HASWELL_STEPPING_MOBILE_B0 2
-#define HASWELL_STEPPING_MOBILE_C0 3
-#define HASWELL_STEPPING_MOBILE_D0 4
-#define HASWELL_STEPPING_ULT_B0 0
-#define HASWELL_STEPPING_ULT_C0 1
-
-/* Haswell bus clock is fixed at 100MHz */
+/* CPU types without stepping */
+#define HASWELL_FAMILY_TRAD 0x306c0
+#define HASWELL_FAMILY_ULT 0x40650
+#define CRYSTALWELL_FAMILY 0x306c0
+#define BROADWELL_FAMILY_ULT 0x306d0
+
+/* Haswell CPUIDs */
+#define CPUID_HASWELL_A0 0x306c1
+#define CPUID_HASWELL_B0 0x306c2
+#define CPUID_HASWELL_C0 0x306c3
+
+#define CPUID_HASWELL_ULT_B0 0x40650
+#define CPUID_HASWELL_ULT_C0 0x40651
+
+/* Crystalwell CPUIDs */
+#define CPUID_CRYSTALWELL_B0 0x40660
+#define CPUID_CRYSTALWELL_C0 0x40661
+
+/* Broadwell CPUIDs */
+#define CPUID_BROADWELL_C0 0x40671
+
+#define CPUID_BROADWELL_ULT_C0 0x306d2
+#define CPUID_BROADWELL_ULT_D0 0x306d3
+#define CPUID_BROADWELL_ULT_E0 0x306d4
+
+/* Haswell and Broadwell bus clock is fixed at 100MHz */
#define CPU_BCLK 100
#define MSR_CORE_THREAD_COUNT 0x35
diff --git a/src/cpu/intel/haswell/haswell_init.c b/src/cpu/intel/haswell/haswell_init.c
index fa2f3f631c..0e48876d10 100644
--- a/src/cpu/intel/haswell/haswell_init.c
+++ b/src/cpu/intel/haswell/haswell_init.c
@@ -689,13 +689,13 @@ static struct device_operations cpu_dev_ops = {
};
static const struct cpu_device_id cpu_table[] = {
- { X86_VENDOR_INTEL, 0x306c1 }, /* Intel Haswell 4+2 A0 */
- { X86_VENDOR_INTEL, 0x306c2 }, /* Intel Haswell 4+2 B0 */
- { X86_VENDOR_INTEL, 0x306c3 }, /* Intel Haswell C0 */
- { X86_VENDOR_INTEL, 0x40650 }, /* Intel Haswell ULT B0 */
- { X86_VENDOR_INTEL, 0x40651 }, /* Intel Haswell ULT B1 */
- { X86_VENDOR_INTEL, 0x40660 }, /* Intel Crystal Well C0 */
- { X86_VENDOR_INTEL, 0x40661 }, /* Intel Crystal Well C1 */
+ { X86_VENDOR_INTEL, CPUID_HASWELL_A0 },
+ { X86_VENDOR_INTEL, CPUID_HASWELL_B0 },
+ { X86_VENDOR_INTEL, CPUID_HASWELL_C0 },
+ { X86_VENDOR_INTEL, CPUID_HASWELL_ULT_B0 },
+ { X86_VENDOR_INTEL, CPUID_HASWELL_ULT_C0 },
+ { X86_VENDOR_INTEL, CPUID_CRYSTALWELL_B0 },
+ { X86_VENDOR_INTEL, CPUID_CRYSTALWELL_C0 },
{ 0, 0 },
};