From 6a6ac1e0b929a47aedcff41420990cd700e22d13 Mon Sep 17 00:00:00 2001 From: Felix Held Date: Mon, 6 Feb 2023 15:19:11 +0100 Subject: 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 Change-Id: I0540b514ca42591c0d3468307a82b5612585f614 Reviewed-on: https://review.coreboot.org/c/coreboot/+/72847 Reviewed-by: Fred Reitberger Reviewed-by: Martin Roth Tested-by: build bot (Jenkins) Reviewed-by: Angel Pons --- src/cpu/amd/pi/00730F01/model_16_init.c | 6 ++-- src/cpu/intel/haswell/haswell_init.c | 24 ++++++++-------- src/cpu/intel/model_1067x/model_1067x_init.c | 8 +++--- src/cpu/intel/model_106cx/model_106cx_init.c | 6 ++-- src/cpu/intel/model_2065x/model_2065x_init.c | 12 ++++---- src/cpu/intel/model_206ax/model_206ax_init.c | 22 +++++++-------- src/cpu/intel/model_65x/model_65x_init.c | 11 ++++---- src/cpu/intel/model_67x/model_67x_init.c | 8 +++--- src/cpu/intel/model_68x/model_68x_init.c | 16 +++++++---- src/cpu/intel/model_6bx/model_6bx_init.c | 7 +++-- src/cpu/intel/model_6ex/model_6ex_init.c | 8 +++--- src/cpu/intel/model_6fx/model_6fx_init.c | 19 +++++++------ src/cpu/intel/model_6xx/model_6xx_init.c | 42 +++++++++++++++------------- src/cpu/intel/model_f2x/model_f2x_init.c | 14 +++++----- src/cpu/intel/model_f3x/model_f3x_init.c | 4 +-- src/cpu/intel/model_f4x/model_f4x_init.c | 16 +++++------ src/cpu/qemu-x86/qemu.c | 4 +-- 17 files changed, 119 insertions(+), 108 deletions(-) (limited to 'src/cpu') diff --git a/src/cpu/amd/pi/00730F01/model_16_init.c b/src/cpu/amd/pi/00730F01/model_16_init.c index 5b43a07264..3806407749 100644 --- a/src/cpu/amd/pi/00730F01/model_16_init.c +++ b/src/cpu/amd/pi/00730F01/model_16_init.c @@ -58,9 +58,9 @@ static struct device_operations cpu_dev_ops = { }; static const struct cpu_device_id cpu_table[] = { - { X86_VENDOR_AMD, 0x730F00 }, - { X86_VENDOR_AMD, 0x730F01 }, - { 0, 0 }, + { X86_VENDOR_AMD, 0x730F00, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_AMD, 0x730F01, CPUID_EXACT_MATCH_MASK }, + { 0, 0, 0 }, }; static const struct cpu_driver model_16 __cpu_driver = { diff --git a/src/cpu/intel/haswell/haswell_init.c b/src/cpu/intel/haswell/haswell_init.c index 5a0b09d92e..a8193bf2b1 100644 --- a/src/cpu/intel/haswell/haswell_init.c +++ b/src/cpu/intel/haswell/haswell_init.c @@ -640,18 +640,18 @@ static struct device_operations cpu_dev_ops = { }; static const struct cpu_device_id cpu_table[] = { - { 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 }, - { X86_VENDOR_INTEL, CPUID_BROADWELL_C0 }, - { X86_VENDOR_INTEL, CPUID_BROADWELL_ULT_C0 }, - { X86_VENDOR_INTEL, CPUID_BROADWELL_ULT_D0 }, - { X86_VENDOR_INTEL, CPUID_BROADWELL_ULT_E0 }, - { 0, 0 }, + { X86_VENDOR_INTEL, CPUID_HASWELL_A0, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, CPUID_HASWELL_B0, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, CPUID_HASWELL_C0, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, CPUID_HASWELL_ULT_B0, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, CPUID_HASWELL_ULT_C0, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, CPUID_CRYSTALWELL_B0, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, CPUID_CRYSTALWELL_C0, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, CPUID_BROADWELL_C0, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, CPUID_BROADWELL_ULT_C0, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, CPUID_BROADWELL_ULT_D0, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, CPUID_BROADWELL_ULT_E0, CPUID_EXACT_MATCH_MASK }, + { 0, 0, 0 }, }; static const struct cpu_driver driver __cpu_driver = { diff --git a/src/cpu/intel/model_1067x/model_1067x_init.c b/src/cpu/intel/model_1067x/model_1067x_init.c index 825a2468f9..226495bcc5 100644 --- a/src/cpu/intel/model_1067x/model_1067x_init.c +++ b/src/cpu/intel/model_1067x/model_1067x_init.c @@ -265,10 +265,10 @@ static struct device_operations cpu_dev_ops = { }; static const struct cpu_device_id cpu_table[] = { - { X86_VENDOR_INTEL, 0x10676 }, - { X86_VENDOR_INTEL, 0x10677 }, - { X86_VENDOR_INTEL, 0x1067A }, - { 0, 0 }, + { X86_VENDOR_INTEL, 0x10676, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, 0x10677, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, 0x1067A, CPUID_EXACT_MATCH_MASK }, + { 0, 0, 0 }, }; static const struct cpu_driver driver __cpu_driver = { diff --git a/src/cpu/intel/model_106cx/model_106cx_init.c b/src/cpu/intel/model_106cx/model_106cx_init.c index 4cf16d8831..ba89f3dd7f 100644 --- a/src/cpu/intel/model_106cx/model_106cx_init.c +++ b/src/cpu/intel/model_106cx/model_106cx_init.c @@ -80,9 +80,9 @@ static struct device_operations cpu_dev_ops = { }; static const struct cpu_device_id cpu_table[] = { - { X86_VENDOR_INTEL, 0x106c0 }, /* Intel Atom 230 */ - { X86_VENDOR_INTEL, 0x106ca }, /* Intel Atom D5xx */ - { 0, 0 }, + { X86_VENDOR_INTEL, 0x106c0, CPUID_EXACT_MATCH_MASK }, /* Intel Atom 230 */ + { X86_VENDOR_INTEL, 0x106ca, CPUID_EXACT_MATCH_MASK }, /* Intel Atom D5xx */ + { 0, 0, 0 }, }; static const struct cpu_driver driver __cpu_driver = { diff --git a/src/cpu/intel/model_2065x/model_2065x_init.c b/src/cpu/intel/model_2065x/model_2065x_init.c index 389989c1ae..0556a151c7 100644 --- a/src/cpu/intel/model_2065x/model_2065x_init.c +++ b/src/cpu/intel/model_2065x/model_2065x_init.c @@ -175,12 +175,12 @@ static struct device_operations cpu_dev_ops = { /* Arrandale / Clarkdale CPU IDs */ static const struct cpu_device_id cpu_table[] = { - { X86_VENDOR_INTEL, 0x20650 }, - { X86_VENDOR_INTEL, 0x20651 }, - { X86_VENDOR_INTEL, 0x20652 }, - { X86_VENDOR_INTEL, 0x20654 }, - { X86_VENDOR_INTEL, 0x20655 }, - { 0, 0 }, + { X86_VENDOR_INTEL, 0x20650, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, 0x20651, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, 0x20652, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, 0x20654, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, 0x20655, CPUID_EXACT_MATCH_MASK }, + { 0, 0, 0 }, }; static const struct cpu_driver driver __cpu_driver = { diff --git a/src/cpu/intel/model_206ax/model_206ax_init.c b/src/cpu/intel/model_206ax/model_206ax_init.c index 6522e0febb..aecd61c86b 100644 --- a/src/cpu/intel/model_206ax/model_206ax_init.c +++ b/src/cpu/intel/model_206ax/model_206ax_init.c @@ -427,17 +427,17 @@ static struct device_operations cpu_dev_ops = { }; static const struct cpu_device_id cpu_table[] = { - { X86_VENDOR_INTEL, 0x206a0 }, /* Intel Sandybridge */ - { X86_VENDOR_INTEL, 0x206a6 }, /* Intel Sandybridge D1 */ - { X86_VENDOR_INTEL, 0x206a7 }, /* Intel Sandybridge D2/J1 */ - { X86_VENDOR_INTEL, 0x306a0 }, /* Intel IvyBridge */ - { X86_VENDOR_INTEL, 0x306a2 }, /* Intel IvyBridge */ - { X86_VENDOR_INTEL, 0x306a4 }, /* Intel IvyBridge */ - { X86_VENDOR_INTEL, 0x306a5 }, /* Intel IvyBridge */ - { X86_VENDOR_INTEL, 0x306a6 }, /* Intel IvyBridge */ - { X86_VENDOR_INTEL, 0x306a8 }, /* Intel IvyBridge */ - { X86_VENDOR_INTEL, 0x306a9 }, /* Intel IvyBridge */ - { 0, 0 }, + { X86_VENDOR_INTEL, 0x206a0, CPUID_EXACT_MATCH_MASK }, /* Intel Sandybridge */ + { X86_VENDOR_INTEL, 0x206a6, CPUID_EXACT_MATCH_MASK }, /* Intel Sandybridge D1 */ + { X86_VENDOR_INTEL, 0x206a7, CPUID_EXACT_MATCH_MASK }, /* Intel Sandybridge D2/J1 */ + { X86_VENDOR_INTEL, 0x306a0, CPUID_EXACT_MATCH_MASK }, /* Intel IvyBridge */ + { X86_VENDOR_INTEL, 0x306a2, CPUID_EXACT_MATCH_MASK }, /* Intel IvyBridge */ + { X86_VENDOR_INTEL, 0x306a4, CPUID_EXACT_MATCH_MASK }, /* Intel IvyBridge */ + { X86_VENDOR_INTEL, 0x306a5, CPUID_EXACT_MATCH_MASK }, /* Intel IvyBridge */ + { X86_VENDOR_INTEL, 0x306a6, CPUID_EXACT_MATCH_MASK }, /* Intel IvyBridge */ + { X86_VENDOR_INTEL, 0x306a8, CPUID_EXACT_MATCH_MASK }, /* Intel IvyBridge */ + { X86_VENDOR_INTEL, 0x306a9, CPUID_EXACT_MATCH_MASK }, /* Intel IvyBridge */ + { 0, 0, 0 }, }; static const struct cpu_driver driver __cpu_driver = { diff --git a/src/cpu/intel/model_65x/model_65x_init.c b/src/cpu/intel/model_65x/model_65x_init.c index 15246b6396..bc1dc2d092 100644 --- a/src/cpu/intel/model_65x/model_65x_init.c +++ b/src/cpu/intel/model_65x/model_65x_init.c @@ -35,11 +35,12 @@ static struct device_operations cpu_dev_ops = { * http://download.intel.com/support/processors/pentiumii/xeon/24377632.pdf */ static const struct cpu_device_id cpu_table[] = { - { X86_VENDOR_INTEL, 0x0650 }, /* PII/Celeron, dA0/mdA0/A0 */ - { X86_VENDOR_INTEL, 0x0651 }, /* PII/Celeron, dA1/A1 */ - { X86_VENDOR_INTEL, 0x0652 }, /* PII/Celeron/Xeon, dB0/mdB0/B0 */ - { X86_VENDOR_INTEL, 0x0653 }, /* PII/Xeon, dB1/B1 */ - { 0, 0 }, + { X86_VENDOR_INTEL, 0x0650, CPUID_EXACT_MATCH_MASK }, /* PII/Celeron, dA0/mdA0/A0 */ + { X86_VENDOR_INTEL, 0x0651, CPUID_EXACT_MATCH_MASK }, /* PII/Celeron, dA1/A1 */ + /* PII/Celeron/Xeon, dB0/mdB0/B0 */ + { X86_VENDOR_INTEL, 0x0652, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, 0x0653, CPUID_EXACT_MATCH_MASK }, /* PII/Xeon, dB1/B1 */ + { 0, 0, 0 }, }; static const struct cpu_driver driver __cpu_driver = { diff --git a/src/cpu/intel/model_67x/model_67x_init.c b/src/cpu/intel/model_67x/model_67x_init.c index d524705031..0cc33f317f 100644 --- a/src/cpu/intel/model_67x/model_67x_init.c +++ b/src/cpu/intel/model_67x/model_67x_init.c @@ -35,11 +35,11 @@ static struct device_operations cpu_dev_ops = { * http://download.intel.com/design/intarch/specupdt/24445358.pdf */ static const struct cpu_device_id cpu_table[] = { - { X86_VENDOR_INTEL, 0x0671 }, - { X86_VENDOR_INTEL, 0x0672 }, /* PIII, kB0 */ - { X86_VENDOR_INTEL, 0x0673 }, /* PIII, kC0 */ + { X86_VENDOR_INTEL, 0x0671, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, 0x0672, CPUID_EXACT_MATCH_MASK }, /* PIII, kB0 */ + { X86_VENDOR_INTEL, 0x0673, CPUID_EXACT_MATCH_MASK }, /* PIII, kC0 */ - { 0, 0 }, + { 0, 0, 0 }, }; static const struct cpu_driver driver __cpu_driver = { diff --git a/src/cpu/intel/model_68x/model_68x_init.c b/src/cpu/intel/model_68x/model_68x_init.c index 0b5d4541b9..aef66bd226 100644 --- a/src/cpu/intel/model_68x/model_68x_init.c +++ b/src/cpu/intel/model_68x/model_68x_init.c @@ -45,13 +45,17 @@ static struct device_operations cpu_dev_ops = { * http://download.intel.com/design/intarch/specupdt/24530663.pdf */ static const struct cpu_device_id cpu_table[] = { - { X86_VENDOR_INTEL, 0x0680 }, - { X86_VENDOR_INTEL, 0x0681 }, /* PIII, cA2/cA2c/A2/BA2/PA2/MA2 */ - { X86_VENDOR_INTEL, 0x0683 }, /* PIII/Celeron, cB0/cB0c/B0/BB0/PB0/MB0*/ - { X86_VENDOR_INTEL, 0x0686 }, /* PIII/Celeron, cC0/C0/BC0/PC0/MC0 */ - { X86_VENDOR_INTEL, 0x068a }, /* PIII/Celeron, cD0/D0/BD0/PD0 */ + { X86_VENDOR_INTEL, 0x0680, CPUID_EXACT_MATCH_MASK }, + /* PIII, cA2/cA2c/A2/BA2/PA2/MA2 */ + { X86_VENDOR_INTEL, 0x0681, CPUID_EXACT_MATCH_MASK }, + /* PIII/Celeron, cB0/cB0c/B0/BB0/PB0/MB0*/ + { X86_VENDOR_INTEL, 0x0683, CPUID_EXACT_MATCH_MASK }, + /* PIII/Celeron, cC0/C0/BC0/PC0/MC0 */ + { X86_VENDOR_INTEL, 0x0686, CPUID_EXACT_MATCH_MASK }, + /* PIII/Celeron, cD0/D0/BD0/PD0 */ + { X86_VENDOR_INTEL, 0x068a, CPUID_EXACT_MATCH_MASK }, - { 0, 0 }, + { 0, 0, 0 }, }; static const struct cpu_driver driver __cpu_driver = { diff --git a/src/cpu/intel/model_6bx/model_6bx_init.c b/src/cpu/intel/model_6bx/model_6bx_init.c index 0e54f934e6..485ac49224 100644 --- a/src/cpu/intel/model_6bx/model_6bx_init.c +++ b/src/cpu/intel/model_6bx/model_6bx_init.c @@ -39,9 +39,10 @@ static struct device_operations cpu_dev_ops = { * http://download.intel.com/design/intarch/specupdt/24445358.pdf */ static const struct cpu_device_id cpu_table[] = { - { X86_VENDOR_INTEL, 0x06b1 }, /* Pentium III/Celeron, tA1/A1/FPA1 */ - { X86_VENDOR_INTEL, 0x06b4 }, /* Pentium III, tB1/FPB1 */ - { 0, 0 }, + /* Pentium III/Celeron, tA1/A1/FPA1 */ + { X86_VENDOR_INTEL, 0x06b1, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, 0x06b4, CPUID_EXACT_MATCH_MASK }, /* Pentium III, tB1/FPB1 */ + { 0, 0, 0 }, }; static const struct cpu_driver driver __cpu_driver = { diff --git a/src/cpu/intel/model_6ex/model_6ex_init.c b/src/cpu/intel/model_6ex/model_6ex_init.c index bfa4a3e5f1..ebcf263372 100644 --- a/src/cpu/intel/model_6ex/model_6ex_init.c +++ b/src/cpu/intel/model_6ex/model_6ex_init.c @@ -120,10 +120,10 @@ static struct device_operations cpu_dev_ops = { }; static const struct cpu_device_id cpu_table[] = { - { X86_VENDOR_INTEL, 0x06e0 }, /* Intel Core Solo/Core Duo */ - { X86_VENDOR_INTEL, 0x06e8 }, /* Intel Core Solo/Core Duo */ - { X86_VENDOR_INTEL, 0x06ec }, /* Intel Core Solo/Core Duo */ - { 0, 0 }, + { X86_VENDOR_INTEL, 0x06e0, CPUID_EXACT_MATCH_MASK }, /* Intel Core Solo/Core Duo */ + { X86_VENDOR_INTEL, 0x06e8, CPUID_EXACT_MATCH_MASK }, /* Intel Core Solo/Core Duo */ + { X86_VENDOR_INTEL, 0x06ec, CPUID_EXACT_MATCH_MASK }, /* Intel Core Solo/Core Duo */ + { 0, 0, 0 }, }; static const struct cpu_driver driver __cpu_driver = { 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 = { diff --git a/src/cpu/intel/model_6xx/model_6xx_init.c b/src/cpu/intel/model_6xx/model_6xx_init.c index f9afc6cbad..7cc7860d5d 100644 --- a/src/cpu/intel/model_6xx/model_6xx_init.c +++ b/src/cpu/intel/model_6xx/model_6xx_init.c @@ -47,29 +47,33 @@ static struct device_operations cpu_dev_ops = { * http://download.intel.com/design/intarch/specupdt/24530663.pdf */ static const struct cpu_device_id cpu_table[] = { - { X86_VENDOR_INTEL, 0x0611 }, /* Pentium Pro, B0 */ - { X86_VENDOR_INTEL, 0x0612 }, /* Pentium Pro, C0 */ - { X86_VENDOR_INTEL, 0x0616 }, /* Pentium Pro, sA0 */ - { X86_VENDOR_INTEL, 0x0617 }, /* Pentium Pro, sA1 */ - { X86_VENDOR_INTEL, 0x0619 }, /* Pentium Pro, sB1 */ + { X86_VENDOR_INTEL, 0x0611, CPUID_EXACT_MATCH_MASK }, /* Pentium Pro, B0 */ + { X86_VENDOR_INTEL, 0x0612, CPUID_EXACT_MATCH_MASK }, /* Pentium Pro, C0 */ + { X86_VENDOR_INTEL, 0x0616, CPUID_EXACT_MATCH_MASK }, /* Pentium Pro, sA0 */ + { X86_VENDOR_INTEL, 0x0617, CPUID_EXACT_MATCH_MASK }, /* Pentium Pro, sA1 */ + { X86_VENDOR_INTEL, 0x0619, CPUID_EXACT_MATCH_MASK }, /* Pentium Pro, sB1 */ - { X86_VENDOR_INTEL, 0x0633 }, /* PII, C0 */ - { X86_VENDOR_INTEL, 0x0634 }, /* PII, C1 */ + { X86_VENDOR_INTEL, 0x0633, CPUID_EXACT_MATCH_MASK }, /* PII, C0 */ + { X86_VENDOR_INTEL, 0x0634, CPUID_EXACT_MATCH_MASK }, /* PII, C1 */ - { X86_VENDOR_INTEL, 0x0660 }, /* Celeron, A0 */ - { X86_VENDOR_INTEL, 0x0665 }, /* Celeron, B0 */ - { X86_VENDOR_INTEL, 0x066a }, /* PII, mdxA0/dmmA0 + others */ + { X86_VENDOR_INTEL, 0x0660, CPUID_EXACT_MATCH_MASK }, /* Celeron, A0 */ + { X86_VENDOR_INTEL, 0x0665, CPUID_EXACT_MATCH_MASK }, /* Celeron, B0 */ + { X86_VENDOR_INTEL, 0x066a, CPUID_EXACT_MATCH_MASK }, /* PII, mdxA0/dmmA0 + others */ - { X86_VENDOR_INTEL, 0x0680 }, - { X86_VENDOR_INTEL, 0x0681 }, /* PIII, cA2/cA2c/A2/BA2/PA2/MA2 */ - { X86_VENDOR_INTEL, 0x0683 }, /* PIII/Celeron, cB0/cB0c/B0/BB0/PB0/MB0*/ - { X86_VENDOR_INTEL, 0x0686 }, /* PIII/Celeron, cC0/C0/BC0/PC0/MC0 */ - { X86_VENDOR_INTEL, 0x068a }, /* PIII/Celeron, cD0/D0/BD0/PD0 */ + { X86_VENDOR_INTEL, 0x0680, CPUID_EXACT_MATCH_MASK }, + /* PIII, cA2/cA2c/A2/BA2/PA2/MA2 */ + { X86_VENDOR_INTEL, 0x0681, CPUID_EXACT_MATCH_MASK }, + /* PIII/Celeron, cB0/cB0c/B0/BB0/PB0/MB0*/ + { X86_VENDOR_INTEL, 0x0683, CPUID_EXACT_MATCH_MASK }, + /* PIII/Celeron, cC0/C0/BC0/PC0/MC0 */ + { X86_VENDOR_INTEL, 0x0686, CPUID_EXACT_MATCH_MASK }, + /* PIII/Celeron, cD0/D0/BD0/PD0 */ + { X86_VENDOR_INTEL, 0x068a, CPUID_EXACT_MATCH_MASK }, - { X86_VENDOR_INTEL, 0x06a0 }, /* PIII, A0 */ - { X86_VENDOR_INTEL, 0x06a1 }, /* PIII, A1 */ - { X86_VENDOR_INTEL, 0x06a4 }, /* PIII, B0 */ - { 0, 0 }, + { X86_VENDOR_INTEL, 0x06a0, CPUID_EXACT_MATCH_MASK }, /* PIII, A0 */ + { X86_VENDOR_INTEL, 0x06a1, CPUID_EXACT_MATCH_MASK }, /* PIII, A1 */ + { X86_VENDOR_INTEL, 0x06a4, CPUID_EXACT_MATCH_MASK }, /* PIII, B0 */ + { 0, 0, 0 }, }; static const struct cpu_driver driver __cpu_driver = { diff --git a/src/cpu/intel/model_f2x/model_f2x_init.c b/src/cpu/intel/model_f2x/model_f2x_init.c index 2fc7360630..5f27ea4173 100644 --- a/src/cpu/intel/model_f2x/model_f2x_init.c +++ b/src/cpu/intel/model_f2x/model_f2x_init.c @@ -16,13 +16,13 @@ static struct device_operations cpu_dev_ops = { }; static const struct cpu_device_id cpu_table[] = { - { X86_VENDOR_INTEL, 0x0f22 }, - { X86_VENDOR_INTEL, 0x0f24 }, - { X86_VENDOR_INTEL, 0x0f25 }, - { X86_VENDOR_INTEL, 0x0f26 }, - { X86_VENDOR_INTEL, 0x0f27 }, - { X86_VENDOR_INTEL, 0x0f29 }, - { 0, 0 }, + { X86_VENDOR_INTEL, 0x0f22, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, 0x0f24, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, 0x0f25, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, 0x0f26, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, 0x0f27, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, 0x0f29, CPUID_EXACT_MATCH_MASK }, + { 0, 0, 0 }, }; static const struct cpu_driver driver __cpu_driver = { diff --git a/src/cpu/intel/model_f3x/model_f3x_init.c b/src/cpu/intel/model_f3x/model_f3x_init.c index bcbfdcf658..1cf1ddb287 100644 --- a/src/cpu/intel/model_f3x/model_f3x_init.c +++ b/src/cpu/intel/model_f3x/model_f3x_init.c @@ -18,8 +18,8 @@ static struct device_operations cpu_dev_ops = { }; static const struct cpu_device_id cpu_table[] = { - { X86_VENDOR_INTEL, 0x0f34 }, /* Xeon */ - { 0, 0 }, + { X86_VENDOR_INTEL, 0x0f34, CPUID_EXACT_MATCH_MASK }, /* Xeon */ + { 0, 0, 0 }, }; static const struct cpu_driver model_f3x __cpu_driver = { diff --git a/src/cpu/intel/model_f4x/model_f4x_init.c b/src/cpu/intel/model_f4x/model_f4x_init.c index b495dee585..73bb7105bb 100644 --- a/src/cpu/intel/model_f4x/model_f4x_init.c +++ b/src/cpu/intel/model_f4x/model_f4x_init.c @@ -15,14 +15,14 @@ static struct device_operations cpu_dev_ops = { }; static const struct cpu_device_id cpu_table[] = { - { X86_VENDOR_INTEL, 0x0f41 }, /* Xeon */ - { X86_VENDOR_INTEL, 0x0f43 }, /* Not tested */ - { X86_VENDOR_INTEL, 0x0f44 }, /* Not tested */ - { X86_VENDOR_INTEL, 0x0f47 }, - { X86_VENDOR_INTEL, 0x0f48 }, /* Not tested */ - { X86_VENDOR_INTEL, 0x0f49 }, /* Not tested */ - { X86_VENDOR_INTEL, 0x0f4a }, /* Not tested */ - { 0, 0 }, + { X86_VENDOR_INTEL, 0x0f41, CPUID_EXACT_MATCH_MASK }, /* Xeon */ + { X86_VENDOR_INTEL, 0x0f43, CPUID_EXACT_MATCH_MASK }, /* Not tested */ + { X86_VENDOR_INTEL, 0x0f44, CPUID_EXACT_MATCH_MASK }, /* Not tested */ + { X86_VENDOR_INTEL, 0x0f47, CPUID_EXACT_MATCH_MASK }, + { X86_VENDOR_INTEL, 0x0f48, CPUID_EXACT_MATCH_MASK }, /* Not tested */ + { X86_VENDOR_INTEL, 0x0f49, CPUID_EXACT_MATCH_MASK }, /* Not tested */ + { X86_VENDOR_INTEL, 0x0f4a, CPUID_EXACT_MATCH_MASK }, /* Not tested */ + { 0, 0, 0 }, }; static const struct cpu_driver model_f4x __cpu_driver = { diff --git a/src/cpu/qemu-x86/qemu.c b/src/cpu/qemu-x86/qemu.c index f0cdb58604..c0a3afe11c 100644 --- a/src/cpu/qemu-x86/qemu.c +++ b/src/cpu/qemu-x86/qemu.c @@ -12,8 +12,8 @@ static struct device_operations cpu_dev_ops = { }; static const struct cpu_device_id cpu_table[] = { - { X86_VENDOR_ANY, 0 }, - { 0, 0 }, + { X86_VENDOR_ANY, 0, 0 }, + { 0, 0, 0 }, }; static const struct cpu_driver driver __cpu_driver = { -- cgit v1.2.3