summaryrefslogtreecommitdiff
path: root/src/soc/intel
diff options
context:
space:
mode:
authorFelix Held <felix.held@amd.corp-partner.google.com>2021-10-20 23:31:43 +0200
committerFelix Held <felix-coreboot@felixheld.de>2021-10-22 01:27:07 +0000
commit4dd7d1196545f1dff71b8e70b7a9b80b8bcd4041 (patch)
tree6a0c12d1d086f89d7ba7369247298a1ccde2faab /src/soc/intel
parent82faefb339a0853dd49f10bafd2c4f5ca1723fb3 (diff)
cpu/x86/mp_init: move printing of failure message into mp_init_with_smm
Each CPU/SoC checks the return value of the mp_init_with_smm and prints the same error message if it wasn't successful, so move this check and printk to mp_init_with_smm. For this the original mp_init_with_smm function gets renamed to do_mp_init_with_smm and a new mp_init_with_smm function is created which then calls do_mp_init_with_smm, prints the error if it didn't return CB_SUCCESS and passes the return value of do_mp_init_with_smm to its caller. Since no CPU/SoC code handles a mp_init_with_smm failure apart from printing a message, also add a comment at the mp_init_with_smm call sites that the code might want to handle a failure. Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Change-Id: I181602723c204f3e43eb43302921adf7a88c81ed Reviewed-on: https://review.coreboot.org/c/coreboot/+/58498 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'src/soc/intel')
-rw-r--r--src/soc/intel/alderlake/cpu.c4
-rw-r--r--src/soc/intel/apollolake/cpu.c4
-rw-r--r--src/soc/intel/baytrail/cpu.c4
-rw-r--r--src/soc/intel/braswell/cpu.c4
-rw-r--r--src/soc/intel/cannonlake/cpu.c4
-rw-r--r--src/soc/intel/denverton_ns/cpu.c4
-rw-r--r--src/soc/intel/elkhartlake/cpu.c4
-rw-r--r--src/soc/intel/icelake/cpu.c4
-rw-r--r--src/soc/intel/jasperlake/cpu.c4
-rw-r--r--src/soc/intel/skylake/cpu.c4
-rw-r--r--src/soc/intel/tigerlake/cpu.c4
-rw-r--r--src/soc/intel/xeon_sp/cpx/cpu.c4
-rw-r--r--src/soc/intel/xeon_sp/skx/cpu.c4
13 files changed, 26 insertions, 26 deletions
diff --git a/src/soc/intel/alderlake/cpu.c b/src/soc/intel/alderlake/cpu.c
index a437559107..94658c7acb 100644
--- a/src/soc/intel/alderlake/cpu.c
+++ b/src/soc/intel/alderlake/cpu.c
@@ -127,8 +127,8 @@ static const struct mp_ops mp_ops = {
void soc_init_cpus(struct bus *cpu_bus)
{
- if (mp_init_with_smm(cpu_bus, &mp_ops) != CB_SUCCESS)
- printk(BIOS_ERR, "MP initialization failure.\n");
+ /* TODO: Handle mp_init_with_smm failure? */
+ mp_init_with_smm(cpu_bus, &mp_ops);
/* Thermal throttle activation offset */
configure_tcc_thermal_target();
diff --git a/src/soc/intel/apollolake/cpu.c b/src/soc/intel/apollolake/cpu.c
index 645582b132..af0a6dcd18 100644
--- a/src/soc/intel/apollolake/cpu.c
+++ b/src/soc/intel/apollolake/cpu.c
@@ -251,8 +251,8 @@ static const struct mp_ops mp_ops = {
void soc_init_cpus(struct bus *cpu_bus)
{
/* Clear for take-off */
- if (mp_init_with_smm(cpu_bus, &mp_ops) != CB_SUCCESS)
- printk(BIOS_ERR, "MP initialization failure.\n");
+ /* TODO: Handle mp_init_with_smm failure? */
+ mp_init_with_smm(cpu_bus, &mp_ops);
}
void apollolake_init_cpus(struct device *dev)
diff --git a/src/soc/intel/baytrail/cpu.c b/src/soc/intel/baytrail/cpu.c
index 8e402651ce..98400d1a1a 100644
--- a/src/soc/intel/baytrail/cpu.c
+++ b/src/soc/intel/baytrail/cpu.c
@@ -197,6 +197,6 @@ void baytrail_init_cpus(struct device *dev)
{
struct bus *cpu_bus = dev->link_list;
- if (mp_init_with_smm(cpu_bus, &mp_ops) != CB_SUCCESS)
- printk(BIOS_ERR, "MP initialization failure.\n");
+ /* TODO: Handle mp_init_with_smm failure? */
+ mp_init_with_smm(cpu_bus, &mp_ops);
}
diff --git a/src/soc/intel/braswell/cpu.c b/src/soc/intel/braswell/cpu.c
index ead42b92f8..ed5244270c 100644
--- a/src/soc/intel/braswell/cpu.c
+++ b/src/soc/intel/braswell/cpu.c
@@ -206,6 +206,6 @@ void soc_init_cpus(struct device *dev)
{
struct bus *cpu_bus = dev->link_list;
- if (mp_init_with_smm(cpu_bus, &mp_ops) != CB_SUCCESS)
- printk(BIOS_ERR, "MP initialization failure.\n");
+ /* TODO: Handle mp_init_with_smm failure? */
+ mp_init_with_smm(cpu_bus, &mp_ops);
}
diff --git a/src/soc/intel/cannonlake/cpu.c b/src/soc/intel/cannonlake/cpu.c
index 23b944df2d..4f6720850e 100644
--- a/src/soc/intel/cannonlake/cpu.c
+++ b/src/soc/intel/cannonlake/cpu.c
@@ -190,8 +190,8 @@ static const struct mp_ops mp_ops = {
void soc_init_cpus(struct bus *cpu_bus)
{
- if (mp_init_with_smm(cpu_bus, &mp_ops) != CB_SUCCESS)
- printk(BIOS_ERR, "MP initialization failure.\n");
+ /* TODO: Handle mp_init_with_smm failure? */
+ mp_init_with_smm(cpu_bus, &mp_ops);
/* Thermal throttle activation offset */
configure_tcc_thermal_target();
diff --git a/src/soc/intel/denverton_ns/cpu.c b/src/soc/intel/denverton_ns/cpu.c
index ab4043bf09..d856692721 100644
--- a/src/soc/intel/denverton_ns/cpu.c
+++ b/src/soc/intel/denverton_ns/cpu.c
@@ -297,6 +297,6 @@ void denverton_init_cpus(struct device *dev)
add_more_links(dev, 1);
/* Clear for take-off */
- if (mp_init_with_smm(dev->link_list, &mp_ops) != CB_SUCCESS)
- printk(BIOS_ERR, "MP initialization failure.\n");
+ /* TODO: Handle mp_init_with_smm failure? */
+ mp_init_with_smm(dev->link_list, &mp_ops);
}
diff --git a/src/soc/intel/elkhartlake/cpu.c b/src/soc/intel/elkhartlake/cpu.c
index bfbb87f804..0fcc61d936 100644
--- a/src/soc/intel/elkhartlake/cpu.c
+++ b/src/soc/intel/elkhartlake/cpu.c
@@ -118,8 +118,8 @@ static const struct mp_ops mp_ops = {
void soc_init_cpus(struct bus *cpu_bus)
{
- if (mp_init_with_smm(cpu_bus, &mp_ops) != CB_SUCCESS)
- printk(BIOS_ERR, "MP initialization failure.\n");
+ /* TODO: Handle mp_init_with_smm failure? */
+ mp_init_with_smm(cpu_bus, &mp_ops);
/* Thermal throttle activation offset */
configure_tcc_thermal_target();
diff --git a/src/soc/intel/icelake/cpu.c b/src/soc/intel/icelake/cpu.c
index dea75b6ed4..203cddd69f 100644
--- a/src/soc/intel/icelake/cpu.c
+++ b/src/soc/intel/icelake/cpu.c
@@ -154,6 +154,6 @@ static const struct mp_ops mp_ops = {
void soc_init_cpus(struct bus *cpu_bus)
{
- if (mp_init_with_smm(cpu_bus, &mp_ops) != CB_SUCCESS)
- printk(BIOS_ERR, "MP initialization failure.\n");
+ /* TODO: Handle mp_init_with_smm failure? */
+ mp_init_with_smm(cpu_bus, &mp_ops);
}
diff --git a/src/soc/intel/jasperlake/cpu.c b/src/soc/intel/jasperlake/cpu.c
index 18194c99a2..9959bd5c63 100644
--- a/src/soc/intel/jasperlake/cpu.c
+++ b/src/soc/intel/jasperlake/cpu.c
@@ -120,8 +120,8 @@ static const struct mp_ops mp_ops = {
void soc_init_cpus(struct bus *cpu_bus)
{
- if (mp_init_with_smm(cpu_bus, &mp_ops) != CB_SUCCESS)
- printk(BIOS_ERR, "MP initialization failure.\n");
+ /* TODO: Handle mp_init_with_smm failure? */
+ mp_init_with_smm(cpu_bus, &mp_ops);
/* Thermal throttle activation offset */
configure_tcc_thermal_target();
diff --git a/src/soc/intel/skylake/cpu.c b/src/soc/intel/skylake/cpu.c
index 86e8e52797..91db06b3a6 100644
--- a/src/soc/intel/skylake/cpu.c
+++ b/src/soc/intel/skylake/cpu.c
@@ -215,8 +215,8 @@ static const struct mp_ops mp_ops = {
void soc_init_cpus(struct bus *cpu_bus)
{
- if (mp_init_with_smm(cpu_bus, &mp_ops) != CB_SUCCESS)
- printk(BIOS_ERR, "MP initialization failure.\n");
+ /* TODO: Handle mp_init_with_smm failure? */
+ mp_init_with_smm(cpu_bus, &mp_ops);
/* Thermal throttle activation offset */
configure_tcc_thermal_target();
diff --git a/src/soc/intel/tigerlake/cpu.c b/src/soc/intel/tigerlake/cpu.c
index f10f0cf85d..ce020ee151 100644
--- a/src/soc/intel/tigerlake/cpu.c
+++ b/src/soc/intel/tigerlake/cpu.c
@@ -126,8 +126,8 @@ static const struct mp_ops mp_ops = {
void soc_init_cpus(struct bus *cpu_bus)
{
- if (mp_init_with_smm(cpu_bus, &mp_ops) != CB_SUCCESS)
- printk(BIOS_ERR, "MP initialization failure.\n");
+ /* TODO: Handle mp_init_with_smm failure? */
+ mp_init_with_smm(cpu_bus, &mp_ops);
/* Thermal throttle activation offset */
configure_tcc_thermal_target();
diff --git a/src/soc/intel/xeon_sp/cpx/cpu.c b/src/soc/intel/xeon_sp/cpx/cpu.c
index 9746972a38..ba417a7060 100644
--- a/src/soc/intel/xeon_sp/cpx/cpu.c
+++ b/src/soc/intel/xeon_sp/cpx/cpu.c
@@ -212,8 +212,8 @@ void cpx_init_cpus(struct device *dev)
intel_microcode_load_unlocked(microcode_patch);
- if (mp_init_with_smm(dev->link_list, &mp_ops) != CB_SUCCESS)
- printk(BIOS_ERR, "MP initialization failure.\n");
+ /* TODO: Handle mp_init_with_smm failure? */
+ mp_init_with_smm(dev->link_list, &mp_ops);
/*
* chip_config is used in cpu device callback. Other than cpu 0,
diff --git a/src/soc/intel/xeon_sp/skx/cpu.c b/src/soc/intel/xeon_sp/skx/cpu.c
index 4d01740656..fcdb2d7ea0 100644
--- a/src/soc/intel/xeon_sp/skx/cpu.c
+++ b/src/soc/intel/xeon_sp/skx/cpu.c
@@ -231,8 +231,8 @@ void xeon_sp_init_cpus(struct device *dev)
config_reset_cpl3_csrs();
/* calls src/cpu/x86/mp_init.c */
- if (mp_init_with_smm(dev->link_list, &mp_ops) != CB_SUCCESS)
- printk(BIOS_ERR, "MP initialization failure.\n");
+ /* TODO: Handle mp_init_with_smm failure? */
+ mp_init_with_smm(dev->link_list, &mp_ops);
/* update numa domain for all cpu devices */
xeonsp_init_cpu_config();