arch/x86/include/cpu: introduce CPU_TABLE_END CPU table terminator

Instead of having a magic entry in the CPU device ID table list to tell
find_cpu_driver that it has reached the end of the list, introduce and
use CPU_TABLE_END. Since the vendor entry in the CPU device ID struct is
compared against X86_VENDOR_INVALID which is 0, use X86_VENDOR_INVALID
instead of the 0 in the CPU_TABLE_END definition.

TEST=Timeless build for Mandolin results in identical image.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Suggested-by: Angel Pons <th3fanbus@gmail.com>
Change-Id: I0cae6d65b2265cf5ebf90fe1a9d885d0c489eb92
Reviewed-on: https://review.coreboot.org/c/coreboot/+/72888
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
This commit is contained in:
Felix Held
2023-02-08 11:39:16 +01:00
parent 24f3dc8a17
commit 1e78165cdc
31 changed files with 32 additions and 32 deletions

View File

@@ -60,7 +60,7 @@ static struct device_operations cpu_dev_ops = {
static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_AMD, 0x730F00, CPUID_EXACT_MATCH_MASK },
{ X86_VENDOR_AMD, 0x730F01, CPUID_EXACT_MATCH_MASK },
{ 0, 0, 0 },
CPU_TABLE_END
};
static const struct cpu_driver model_16 __cpu_driver = {

View File

@@ -651,7 +651,7 @@ static const struct cpu_device_id cpu_table[] = {
{ 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 },
CPU_TABLE_END
};
static const struct cpu_driver driver __cpu_driver = {

View File

@@ -268,7 +268,7 @@ static const struct cpu_device_id cpu_table[] = {
{ 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 },
CPU_TABLE_END
};
static const struct cpu_driver driver __cpu_driver = {

View File

@@ -82,7 +82,7 @@ static struct device_operations cpu_dev_ops = {
static const struct cpu_device_id cpu_table[] = {
{ 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 },
CPU_TABLE_END
};
static const struct cpu_driver driver __cpu_driver = {

View File

@@ -180,7 +180,7 @@ static const struct cpu_device_id cpu_table[] = {
{ 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 },
CPU_TABLE_END
};
static const struct cpu_driver driver __cpu_driver = {

View File

@@ -429,7 +429,7 @@ static struct device_operations cpu_dev_ops = {
static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x206a0, CPUID_ALL_STEPPINGS_MASK }, /* Intel Sandybridge */
{ X86_VENDOR_INTEL, 0x306a0, CPUID_ALL_STEPPINGS_MASK }, /* Intel IvyBridge */
{ 0, 0, 0 },
CPU_TABLE_END
};
static const struct cpu_driver driver __cpu_driver = {

View File

@@ -40,7 +40,7 @@ static const struct cpu_device_id cpu_table[] = {
/* 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 },
CPU_TABLE_END
};
static const struct cpu_driver driver __cpu_driver = {

View File

@@ -38,8 +38,7 @@ static const struct cpu_device_id cpu_table[] = {
{ 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 },
CPU_TABLE_END
};
static const struct cpu_driver driver __cpu_driver = {

View File

@@ -54,8 +54,7 @@ static const struct cpu_device_id cpu_table[] = {
{ 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 },
CPU_TABLE_END
};
static const struct cpu_driver driver __cpu_driver = {

View File

@@ -42,7 +42,7 @@ static const struct cpu_device_id cpu_table[] = {
/* 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 },
CPU_TABLE_END
};
static const struct cpu_driver driver __cpu_driver = {

View File

@@ -123,7 +123,7 @@ static const struct cpu_device_id cpu_table[] = {
{ 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 },
CPU_TABLE_END
};
static const struct cpu_driver driver __cpu_driver = {

View File

@@ -142,7 +142,7 @@ static const struct cpu_device_id cpu_table[] = {
{ 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 },
CPU_TABLE_END
};
static const struct cpu_driver driver __cpu_driver = {

View File

@@ -73,7 +73,7 @@ static const struct cpu_device_id cpu_table[] = {
{ 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 },
CPU_TABLE_END
};
static const struct cpu_driver driver __cpu_driver = {

View File

@@ -22,7 +22,7 @@ static const struct cpu_device_id cpu_table[] = {
{ 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 },
CPU_TABLE_END
};
static const struct cpu_driver driver __cpu_driver = {

View File

@@ -19,7 +19,7 @@ static struct device_operations cpu_dev_ops = {
static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_INTEL, 0x0f34, CPUID_EXACT_MATCH_MASK }, /* Xeon */
{ 0, 0, 0 },
CPU_TABLE_END
};
static const struct cpu_driver model_f3x __cpu_driver = {

View File

@@ -22,7 +22,7 @@ static const struct cpu_device_id cpu_table[] = {
{ 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 },
CPU_TABLE_END
};
static const struct cpu_driver model_f4x __cpu_driver = {

View File

@@ -13,7 +13,7 @@ static struct device_operations cpu_dev_ops = {
static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_ANY, 0, 0 },
{ 0, 0, 0 },
CPU_TABLE_END
};
static const struct cpu_driver driver __cpu_driver = {