aboutsummaryrefslogtreecommitdiff
path: root/src/soc/amd
diff options
context:
space:
mode:
authorFelix Held <felix-coreboot@felixheld.de>2023-02-08 11:39:16 +0100
committerFelix Held <felix-coreboot@felixheld.de>2023-02-09 16:54:11 +0000
commit1e78165cdcccd95306604928a145a515498e794a (patch)
tree60cf3e2f6c4a444017af9d47563b7e36b6826180 /src/soc/amd
parent24f3dc8a17240c6869e247c99c94a96af94be0ef (diff)
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>
Diffstat (limited to 'src/soc/amd')
-rw-r--r--src/soc/amd/cezanne/cpu.c2
-rw-r--r--src/soc/amd/glinda/cpu.c2
-rw-r--r--src/soc/amd/mendocino/cpu.c2
-rw-r--r--src/soc/amd/phoenix/cpu.c2
-rw-r--r--src/soc/amd/picasso/cpu.c2
-rw-r--r--src/soc/amd/stoneyridge/cpu.c2
6 files changed, 6 insertions, 6 deletions
diff --git a/src/soc/amd/cezanne/cpu.c b/src/soc/amd/cezanne/cpu.c
index 4d3fa1e864..6149a84610 100644
--- a/src/soc/amd/cezanne/cpu.c
+++ b/src/soc/amd/cezanne/cpu.c
@@ -48,7 +48,7 @@ static struct device_operations cpu_dev_ops = {
static struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_AMD, CEZANNE_A0_CPUID, CPUID_ALL_STEPPINGS_MASK },
- { 0, 0, 0 },
+ CPU_TABLE_END
};
static const struct cpu_driver zen_2_3 __cpu_driver = {
diff --git a/src/soc/amd/glinda/cpu.c b/src/soc/amd/glinda/cpu.c
index e441eadea6..c745b73030 100644
--- a/src/soc/amd/glinda/cpu.c
+++ b/src/soc/amd/glinda/cpu.c
@@ -51,7 +51,7 @@ static struct device_operations cpu_dev_ops = {
static struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_AMD, GLINDA_A0_CPUID, CPUID_ALL_STEPPINGS_MASK }, /* TODO: Update for Glinda */
- { 0, 0, 0 },
+ CPU_TABLE_END
};
static const struct cpu_driver zen_2_3 __cpu_driver = {
diff --git a/src/soc/amd/mendocino/cpu.c b/src/soc/amd/mendocino/cpu.c
index f59a910270..b9297b4323 100644
--- a/src/soc/amd/mendocino/cpu.c
+++ b/src/soc/amd/mendocino/cpu.c
@@ -49,7 +49,7 @@ static struct device_operations cpu_dev_ops = {
static struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_AMD, MENDOCINO_A0_CPUID, CPUID_ALL_STEPPINGS_MASK },
- { 0, 0, 0 },
+ CPU_TABLE_END
};
static const struct cpu_driver zen_2_3 __cpu_driver = {
diff --git a/src/soc/amd/phoenix/cpu.c b/src/soc/amd/phoenix/cpu.c
index 8e2443564f..848f667bf1 100644
--- a/src/soc/amd/phoenix/cpu.c
+++ b/src/soc/amd/phoenix/cpu.c
@@ -52,7 +52,7 @@ static struct device_operations cpu_dev_ops = {
static struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_AMD, PHOENIX_A0_CPUID, CPUID_ALL_STEPPINGS_MASK },
{ X86_VENDOR_AMD, PHOENIX2_A0_CPUID, CPUID_ALL_STEPPINGS_MASK },
- { 0, 0, 0 },
+ CPU_TABLE_END
};
static const struct cpu_driver zen_2_3 __cpu_driver = {
diff --git a/src/soc/amd/picasso/cpu.c b/src/soc/amd/picasso/cpu.c
index 5d206e4fbe..c5fc8a8bf9 100644
--- a/src/soc/amd/picasso/cpu.c
+++ b/src/soc/amd/picasso/cpu.c
@@ -51,7 +51,7 @@ static struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_AMD, RAVEN1_B0_CPUID, CPUID_ALL_STEPPINGS_MASK },
{ X86_VENDOR_AMD, PICASSO_B0_CPUID, CPUID_ALL_STEPPINGS_MASK },
{ X86_VENDOR_AMD, RAVEN2_A0_CPUID, CPUID_ALL_STEPPINGS_MASK },
- { 0, 0, 0 },
+ CPU_TABLE_END
};
static const struct cpu_driver model_17 __cpu_driver = {
diff --git a/src/soc/amd/stoneyridge/cpu.c b/src/soc/amd/stoneyridge/cpu.c
index 25549d02f3..39db1f4466 100644
--- a/src/soc/amd/stoneyridge/cpu.c
+++ b/src/soc/amd/stoneyridge/cpu.c
@@ -62,7 +62,7 @@ static struct device_operations cpu_dev_ops = {
static struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_AMD, CPUID_FROM_FMS(0x15, 0x60, 0), CPUID_ALL_STEPPINGS_MASK },
{ X86_VENDOR_AMD, CPUID_FROM_FMS(0x15, 0x70, 0), CPUID_ALL_STEPPINGS_MASK },
- { 0, 0, 0 },
+ CPU_TABLE_END
};
static const struct cpu_driver model_15 __cpu_driver = {