summaryrefslogtreecommitdiff
path: root/src/cpu/intel/model_6fx
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2023-02-06 15:19:11 +0100
committerFelix Held <felix-coreboot@felixheld.de>2023-02-08 15:07:45 +0000
commit6a6ac1e0b929a47aedcff41420990cd700e22d13 (patch)
tree669b654a6876be7ae88045783bda9254b55e457e /src/cpu/intel/model_6fx
parent2fe5d3e5a5982169aeac86188949a301ab9ed0aa (diff)
arch/x86/cpu: introduce and use device_match_mask
Instead of always doing exact matches between the CPUID read in identify_cpu and the device entries of the CPU device ID table, offer the possibility to use a bit mask in the CPUID matching. This allows covering all steppings of a CPU family/model with one entry and avoids that case of a missing new stepping causing the CPUs not being properly initialized. Some of the CPU device ID tables can now be deduplicated using the CPUID_ALL_STEPPINGS_MASK define, but that's outside of the scope of this patch. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I0540b514ca42591c0d3468307a82b5612585f614 Reviewed-on: https://review.coreboot.org/c/coreboot/+/72847 Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com> Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/cpu/intel/model_6fx')
-rw-r--r--src/cpu/intel/model_6fx/model_6fx_init.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/cpu/intel/model_6fx/model_6fx_init.c b/src/cpu/intel/model_6fx/model_6fx_init.c
index ff64ab18e4..321c5d39b0 100644
--- a/src/cpu/intel/model_6fx/model_6fx_init.c
+++ b/src/cpu/intel/model_6fx/model_6fx_init.c
@@ -133,15 +133,16 @@ static struct device_operations cpu_dev_ops = {
};
static const struct cpu_device_id cpu_table[] = {
- { X86_VENDOR_INTEL, 0x06f0 }, /* Intel Core 2 Solo/Core Duo */
- { X86_VENDOR_INTEL, 0x06f2 }, /* Intel Core 2 Solo/Core Duo */
- { X86_VENDOR_INTEL, 0x06f6 }, /* Intel Core 2 Solo/Core Duo */
- { X86_VENDOR_INTEL, 0x06f7 }, /* Intel Core 2 Solo/Core Duo */
- { X86_VENDOR_INTEL, 0x06fa }, /* Intel Core 2 Solo/Core Duo */
- { X86_VENDOR_INTEL, 0x06fb }, /* Intel Core 2 Solo/Core Duo */
- { X86_VENDOR_INTEL, 0x06fd }, /* Intel Core 2 Solo/Core Duo */
- { X86_VENDOR_INTEL, 0x10661 }, /* Intel Core 2 Celeron Conroe-L */
- { 0, 0 },
+ { X86_VENDOR_INTEL, 0x06f0, CPUID_EXACT_MATCH_MASK }, /* Intel Core 2 Solo/Core Duo */
+ { X86_VENDOR_INTEL, 0x06f2, CPUID_EXACT_MATCH_MASK }, /* Intel Core 2 Solo/Core Duo */
+ { X86_VENDOR_INTEL, 0x06f6, CPUID_EXACT_MATCH_MASK }, /* Intel Core 2 Solo/Core Duo */
+ { X86_VENDOR_INTEL, 0x06f7, CPUID_EXACT_MATCH_MASK }, /* Intel Core 2 Solo/Core Duo */
+ { X86_VENDOR_INTEL, 0x06fa, CPUID_EXACT_MATCH_MASK }, /* Intel Core 2 Solo/Core Duo */
+ { X86_VENDOR_INTEL, 0x06fb, CPUID_EXACT_MATCH_MASK }, /* Intel Core 2 Solo/Core Duo */
+ { X86_VENDOR_INTEL, 0x06fd, CPUID_EXACT_MATCH_MASK }, /* Intel Core 2 Solo/Core Duo */
+ /* Intel Core 2 Celeron Conroe-L */
+ { X86_VENDOR_INTEL, 0x10661, CPUID_EXACT_MATCH_MASK },
+ { 0, 0, 0 },
};
static const struct cpu_driver driver __cpu_driver = {