summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-13 16:44:04 +0300
committerKyösti Mälkki <kyosti.malkki@gmail.com>2019-08-15 04:59:12 +0000
commitb3267e002e798e90ca09b11e42ea8949dccde2e7 (patch)
tree853f4f80e6d993b9a29c55361782e23667ce8698 /src
parent826f35421e190d3358a56deba8b582d18c264e8b (diff)
downloadcoreboot-b3267e002e798e90ca09b11e42ea8949dccde2e7.tar.xz
cpu/intel: Replace bsp_init_and_start_aps()
Change-Id: I7176efdd1000789a093a1b4e243b4b150e6bb06f Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/34864 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src')
-rw-r--r--src/cpu/intel/haswell/haswell.h2
-rw-r--r--src/cpu/intel/haswell/haswell_init.c2
-rw-r--r--src/cpu/intel/model_1067x/mp_init.c3
-rw-r--r--src/cpu/intel/model_2065x/model_2065x_init.c2
-rw-r--r--src/cpu/intel/model_206ax/model_206ax_init.c2
-rw-r--r--src/cpu/intel/smm/gen1/smi.h2
-rw-r--r--src/include/device/device.h6
-rw-r--r--src/northbridge/intel/gm45/northbridge.c8
-rw-r--r--src/northbridge/intel/haswell/northbridge.c7
-rw-r--r--src/northbridge/intel/i945/northbridge.c7
-rw-r--r--src/northbridge/intel/nehalem/northbridge.c7
-rw-r--r--src/northbridge/intel/pineview/northbridge.c8
-rw-r--r--src/northbridge/intel/sandybridge/northbridge.c7
-rw-r--r--src/northbridge/intel/x4x/northbridge.c9
14 files changed, 18 insertions, 54 deletions
diff --git a/src/cpu/intel/haswell/haswell.h b/src/cpu/intel/haswell/haswell.h
index cfd9d45690..7b3a203415 100644
--- a/src/cpu/intel/haswell/haswell.h
+++ b/src/cpu/intel/haswell/haswell.h
@@ -161,8 +161,6 @@ void smm_info(uintptr_t *perm_smbase, size_t *perm_smsize,
void smm_initialize(void);
void smm_relocate(void);
void smm_lock(void);
-struct bus;
-void bsp_init_and_start_aps(struct bus *cpu_bus);
/* Determine if HyperThreading is disabled. The variable is not valid until
* setup_ap_init() has been called. */
#endif
diff --git a/src/cpu/intel/haswell/haswell_init.c b/src/cpu/intel/haswell/haswell_init.c
index 95d719c2f1..0449235ba5 100644
--- a/src/cpu/intel/haswell/haswell_init.c
+++ b/src/cpu/intel/haswell/haswell_init.c
@@ -778,7 +778,7 @@ static const struct mp_ops mp_ops = {
.post_mp_init = post_mp_init,
};
-void bsp_init_and_start_aps(struct bus *cpu_bus)
+void mp_init_cpus(struct bus *cpu_bus)
{
if (mp_init_with_smm(cpu_bus, &mp_ops))
printk(BIOS_ERR, "MP initialization failure.\n");
diff --git a/src/cpu/intel/model_1067x/mp_init.c b/src/cpu/intel/model_1067x/mp_init.c
index ea2d83841f..73c9a4788e 100644
--- a/src/cpu/intel/model_1067x/mp_init.c
+++ b/src/cpu/intel/model_1067x/mp_init.c
@@ -21,6 +21,7 @@
#include <cpu/intel/microcode.h>
#include <cpu/intel/smm/gen1/smi.h>
#include <cpu/intel/common/common.h>
+#include <device/device.h>
/* Parallel MP initialization support. */
static const void *microcode_patch;
@@ -110,7 +111,7 @@ static const struct mp_ops mp_ops = {
.post_mp_init = post_mp_init,
};
-void bsp_init_and_start_aps(struct bus *cpu_bus)
+void mp_init_cpus(struct bus *cpu_bus)
{
microcode_patch = intel_microcode_find();
diff --git a/src/cpu/intel/model_2065x/model_2065x_init.c b/src/cpu/intel/model_2065x/model_2065x_init.c
index 289d4471e6..2f10945c3b 100644
--- a/src/cpu/intel/model_2065x/model_2065x_init.c
+++ b/src/cpu/intel/model_2065x/model_2065x_init.c
@@ -334,7 +334,7 @@ static const struct mp_ops mp_ops = {
.post_mp_init = post_mp_init,
};
-void bsp_init_and_start_aps(struct bus *cpu_bus)
+void mp_init_cpus(struct bus *cpu_bus)
{
if (mp_init_with_smm(cpu_bus, &mp_ops))
printk(BIOS_ERR, "MP initialization failure.\n");
diff --git a/src/cpu/intel/model_206ax/model_206ax_init.c b/src/cpu/intel/model_206ax/model_206ax_init.c
index 80d85f3347..d3aa52cf5d 100644
--- a/src/cpu/intel/model_206ax/model_206ax_init.c
+++ b/src/cpu/intel/model_206ax/model_206ax_init.c
@@ -560,7 +560,7 @@ static const struct mp_ops mp_ops = {
.post_mp_init = post_mp_init,
};
-void bsp_init_and_start_aps(struct bus *cpu_bus)
+void mp_init_cpus(struct bus *cpu_bus)
{
if (mp_init_with_smm(cpu_bus, &mp_ops))
printk(BIOS_ERR, "MP initialization failure.\n");
diff --git a/src/cpu/intel/smm/gen1/smi.h b/src/cpu/intel/smm/gen1/smi.h
index 3d5149a430..6623bcc7cf 100644
--- a/src/cpu/intel/smm/gen1/smi.h
+++ b/src/cpu/intel/smm/gen1/smi.h
@@ -13,8 +13,6 @@
#include <device/device.h>
-void bsp_init_and_start_aps(struct bus *cpu_bus);
-
/* These helpers are for performing SMM relocation. */
void southbridge_smm_init(void);
u32 northbridge_get_tseg_base(void);
diff --git a/src/include/device/device.h b/src/include/device/device.h
index 8e1e62aa7c..ebf8314096 100644
--- a/src/include/device/device.h
+++ b/src/include/device/device.h
@@ -220,6 +220,12 @@ void set_cpu_topology(struct device *cpu, unsigned int node,
#define intel_cpu_topology(cpu, package, core, thread) \
set_cpu_topology(cpu, 0, package, core, thread)
+void mp_init_cpus(DEVTREE_CONST struct bus *cpu_bus);
+static inline void mp_cpu_bus_init(struct device *dev)
+{
+ mp_init_cpus(dev->link_list);
+}
+
/* Debug functions */
void print_resource_tree(const struct device *root, int debug_level,
const char *msg);
diff --git a/src/northbridge/intel/gm45/northbridge.c b/src/northbridge/intel/gm45/northbridge.c
index f011cce8d7..1c01d307b2 100644
--- a/src/northbridge/intel/gm45/northbridge.c
+++ b/src/northbridge/intel/gm45/northbridge.c
@@ -240,17 +240,11 @@ static struct device_operations pci_domain_ops = {
.acpi_name = northbridge_acpi_name,
};
-
-static void cpu_bus_init(struct device *dev)
-{
- bsp_init_and_start_aps(dev->link_list);
-}
-
static struct device_operations cpu_bus_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
.enable_resources = DEVICE_NOOP,
- .init = cpu_bus_init,
+ .init = mp_cpu_bus_init,
.scan_bus = 0,
};
diff --git a/src/northbridge/intel/haswell/northbridge.c b/src/northbridge/intel/haswell/northbridge.c
index 2fd5959ee0..c047c39ea7 100644
--- a/src/northbridge/intel/haswell/northbridge.c
+++ b/src/northbridge/intel/haswell/northbridge.c
@@ -525,16 +525,11 @@ static const struct pci_driver mc_driver_hsw __pci_driver = {
.devices = mc_pci_device_ids,
};
-static void cpu_bus_init(struct device *dev)
-{
- bsp_init_and_start_aps(dev->link_list);
-}
-
static struct device_operations cpu_bus_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
.enable_resources = DEVICE_NOOP,
- .init = cpu_bus_init,
+ .init = mp_cpu_bus_init,
.scan_bus = 0,
};
diff --git a/src/northbridge/intel/i945/northbridge.c b/src/northbridge/intel/i945/northbridge.c
index e9867d988e..cd16958670 100644
--- a/src/northbridge/intel/i945/northbridge.c
+++ b/src/northbridge/intel/i945/northbridge.c
@@ -215,16 +215,11 @@ static const struct pci_driver mc_driver __pci_driver = {
.devices = pci_device_ids,
};
-static void cpu_bus_init(struct device *dev)
-{
- bsp_init_and_start_aps(dev->link_list);
-}
-
static struct device_operations cpu_bus_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
.enable_resources = DEVICE_NOOP,
- .init = cpu_bus_init,
+ .init = mp_cpu_bus_init,
.scan_bus = 0,
};
diff --git a/src/northbridge/intel/nehalem/northbridge.c b/src/northbridge/intel/nehalem/northbridge.c
index a058d3fa26..b6741a88fa 100644
--- a/src/northbridge/intel/nehalem/northbridge.c
+++ b/src/northbridge/intel/nehalem/northbridge.c
@@ -297,16 +297,11 @@ static const struct pci_driver mc_driver_44 __pci_driver = {
.device = 0x0044, /* Nehalem */
};
-static void cpu_bus_init(struct device *dev)
-{
- bsp_init_and_start_aps(dev->link_list);
-}
-
static struct device_operations cpu_bus_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
.enable_resources = DEVICE_NOOP,
- .init = cpu_bus_init,
+ .init = mp_cpu_bus_init,
.scan_bus = 0,
};
diff --git a/src/northbridge/intel/pineview/northbridge.c b/src/northbridge/intel/pineview/northbridge.c
index 4b67cfdefd..5a4eec6989 100644
--- a/src/northbridge/intel/pineview/northbridge.c
+++ b/src/northbridge/intel/pineview/northbridge.c
@@ -195,19 +195,13 @@ static struct device_operations pci_domain_ops = {
.acpi_name = northbridge_acpi_name,
};
-static void cpu_bus_init(struct device *dev)
-{
- bsp_init_and_start_aps(dev->link_list);
-}
-
static struct device_operations cpu_bus_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
.enable_resources = DEVICE_NOOP,
- .init = cpu_bus_init,
+ .init = mp_cpu_bus_init,
};
-
static void enable_dev(struct device *dev)
{
/* Set the operations if it is a special bus type */
diff --git a/src/northbridge/intel/sandybridge/northbridge.c b/src/northbridge/intel/sandybridge/northbridge.c
index 233384cd15..32b7a4cc2b 100644
--- a/src/northbridge/intel/sandybridge/northbridge.c
+++ b/src/northbridge/intel/sandybridge/northbridge.c
@@ -493,16 +493,11 @@ static const struct pci_driver mc_driver_158 __pci_driver = {
.device = 0x0158, /* Ivy bridge */
};
-static void cpu_bus_init(struct device *dev)
-{
- bsp_init_and_start_aps(dev->link_list);
-}
-
static struct device_operations cpu_bus_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
.enable_resources = DEVICE_NOOP,
- .init = cpu_bus_init,
+ .init = mp_cpu_bus_init,
.scan_bus = 0,
};
diff --git a/src/northbridge/intel/x4x/northbridge.c b/src/northbridge/intel/x4x/northbridge.c
index b6616e1dd8..f541e3ad48 100644
--- a/src/northbridge/intel/x4x/northbridge.c
+++ b/src/northbridge/intel/x4x/northbridge.c
@@ -191,20 +191,13 @@ static struct device_operations pci_domain_ops = {
.acpi_name = northbridge_acpi_name,
};
-
-static void cpu_bus_init(struct device *dev)
-{
- bsp_init_and_start_aps(dev->link_list);
-}
-
static struct device_operations cpu_bus_ops = {
.read_resources = DEVICE_NOOP,
.set_resources = DEVICE_NOOP,
.enable_resources = DEVICE_NOOP,
- .init = cpu_bus_init,
+ .init = mp_cpu_bus_init,
};
-
static void enable_dev(struct device *dev)
{
/* Set the operations if it is a special bus type */