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>
This commit is contained in:
parent
826f35421e
commit
b3267e002e
|
@ -161,8 +161,6 @@ void smm_info(uintptr_t *perm_smbase, size_t *perm_smsize,
|
||||||
void smm_initialize(void);
|
void smm_initialize(void);
|
||||||
void smm_relocate(void);
|
void smm_relocate(void);
|
||||||
void smm_lock(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
|
/* Determine if HyperThreading is disabled. The variable is not valid until
|
||||||
* setup_ap_init() has been called. */
|
* setup_ap_init() has been called. */
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -778,7 +778,7 @@ static const struct mp_ops mp_ops = {
|
||||||
.post_mp_init = post_mp_init,
|
.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))
|
if (mp_init_with_smm(cpu_bus, &mp_ops))
|
||||||
printk(BIOS_ERR, "MP initialization failure.\n");
|
printk(BIOS_ERR, "MP initialization failure.\n");
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
#include <cpu/intel/microcode.h>
|
#include <cpu/intel/microcode.h>
|
||||||
#include <cpu/intel/smm/gen1/smi.h>
|
#include <cpu/intel/smm/gen1/smi.h>
|
||||||
#include <cpu/intel/common/common.h>
|
#include <cpu/intel/common/common.h>
|
||||||
|
#include <device/device.h>
|
||||||
|
|
||||||
/* Parallel MP initialization support. */
|
/* Parallel MP initialization support. */
|
||||||
static const void *microcode_patch;
|
static const void *microcode_patch;
|
||||||
|
@ -110,7 +111,7 @@ static const struct mp_ops mp_ops = {
|
||||||
.post_mp_init = post_mp_init,
|
.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();
|
microcode_patch = intel_microcode_find();
|
||||||
|
|
||||||
|
|
|
@ -334,7 +334,7 @@ static const struct mp_ops mp_ops = {
|
||||||
.post_mp_init = post_mp_init,
|
.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))
|
if (mp_init_with_smm(cpu_bus, &mp_ops))
|
||||||
printk(BIOS_ERR, "MP initialization failure.\n");
|
printk(BIOS_ERR, "MP initialization failure.\n");
|
||||||
|
|
|
@ -560,7 +560,7 @@ static const struct mp_ops mp_ops = {
|
||||||
.post_mp_init = post_mp_init,
|
.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))
|
if (mp_init_with_smm(cpu_bus, &mp_ops))
|
||||||
printk(BIOS_ERR, "MP initialization failure.\n");
|
printk(BIOS_ERR, "MP initialization failure.\n");
|
||||||
|
|
|
@ -13,8 +13,6 @@
|
||||||
|
|
||||||
#include <device/device.h>
|
#include <device/device.h>
|
||||||
|
|
||||||
void bsp_init_and_start_aps(struct bus *cpu_bus);
|
|
||||||
|
|
||||||
/* These helpers are for performing SMM relocation. */
|
/* These helpers are for performing SMM relocation. */
|
||||||
void southbridge_smm_init(void);
|
void southbridge_smm_init(void);
|
||||||
u32 northbridge_get_tseg_base(void);
|
u32 northbridge_get_tseg_base(void);
|
||||||
|
|
|
@ -220,6 +220,12 @@ void set_cpu_topology(struct device *cpu, unsigned int node,
|
||||||
#define intel_cpu_topology(cpu, package, core, thread) \
|
#define intel_cpu_topology(cpu, package, core, thread) \
|
||||||
set_cpu_topology(cpu, 0, 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 */
|
/* Debug functions */
|
||||||
void print_resource_tree(const struct device *root, int debug_level,
|
void print_resource_tree(const struct device *root, int debug_level,
|
||||||
const char *msg);
|
const char *msg);
|
||||||
|
|
|
@ -240,17 +240,11 @@ static struct device_operations pci_domain_ops = {
|
||||||
.acpi_name = northbridge_acpi_name,
|
.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 = {
|
static struct device_operations cpu_bus_ops = {
|
||||||
.read_resources = DEVICE_NOOP,
|
.read_resources = DEVICE_NOOP,
|
||||||
.set_resources = DEVICE_NOOP,
|
.set_resources = DEVICE_NOOP,
|
||||||
.enable_resources = DEVICE_NOOP,
|
.enable_resources = DEVICE_NOOP,
|
||||||
.init = cpu_bus_init,
|
.init = mp_cpu_bus_init,
|
||||||
.scan_bus = 0,
|
.scan_bus = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -525,16 +525,11 @@ static const struct pci_driver mc_driver_hsw __pci_driver = {
|
||||||
.devices = mc_pci_device_ids,
|
.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 = {
|
static struct device_operations cpu_bus_ops = {
|
||||||
.read_resources = DEVICE_NOOP,
|
.read_resources = DEVICE_NOOP,
|
||||||
.set_resources = DEVICE_NOOP,
|
.set_resources = DEVICE_NOOP,
|
||||||
.enable_resources = DEVICE_NOOP,
|
.enable_resources = DEVICE_NOOP,
|
||||||
.init = cpu_bus_init,
|
.init = mp_cpu_bus_init,
|
||||||
.scan_bus = 0,
|
.scan_bus = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -215,16 +215,11 @@ static const struct pci_driver mc_driver __pci_driver = {
|
||||||
.devices = pci_device_ids,
|
.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 = {
|
static struct device_operations cpu_bus_ops = {
|
||||||
.read_resources = DEVICE_NOOP,
|
.read_resources = DEVICE_NOOP,
|
||||||
.set_resources = DEVICE_NOOP,
|
.set_resources = DEVICE_NOOP,
|
||||||
.enable_resources = DEVICE_NOOP,
|
.enable_resources = DEVICE_NOOP,
|
||||||
.init = cpu_bus_init,
|
.init = mp_cpu_bus_init,
|
||||||
.scan_bus = 0,
|
.scan_bus = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -297,16 +297,11 @@ static const struct pci_driver mc_driver_44 __pci_driver = {
|
||||||
.device = 0x0044, /* Nehalem */
|
.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 = {
|
static struct device_operations cpu_bus_ops = {
|
||||||
.read_resources = DEVICE_NOOP,
|
.read_resources = DEVICE_NOOP,
|
||||||
.set_resources = DEVICE_NOOP,
|
.set_resources = DEVICE_NOOP,
|
||||||
.enable_resources = DEVICE_NOOP,
|
.enable_resources = DEVICE_NOOP,
|
||||||
.init = cpu_bus_init,
|
.init = mp_cpu_bus_init,
|
||||||
.scan_bus = 0,
|
.scan_bus = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -195,19 +195,13 @@ static struct device_operations pci_domain_ops = {
|
||||||
.acpi_name = northbridge_acpi_name,
|
.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 = {
|
static struct device_operations cpu_bus_ops = {
|
||||||
.read_resources = DEVICE_NOOP,
|
.read_resources = DEVICE_NOOP,
|
||||||
.set_resources = DEVICE_NOOP,
|
.set_resources = DEVICE_NOOP,
|
||||||
.enable_resources = DEVICE_NOOP,
|
.enable_resources = DEVICE_NOOP,
|
||||||
.init = cpu_bus_init,
|
.init = mp_cpu_bus_init,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static void enable_dev(struct device *dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
/* Set the operations if it is a special bus type */
|
/* Set the operations if it is a special bus type */
|
||||||
|
|
|
@ -493,16 +493,11 @@ static const struct pci_driver mc_driver_158 __pci_driver = {
|
||||||
.device = 0x0158, /* Ivy bridge */
|
.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 = {
|
static struct device_operations cpu_bus_ops = {
|
||||||
.read_resources = DEVICE_NOOP,
|
.read_resources = DEVICE_NOOP,
|
||||||
.set_resources = DEVICE_NOOP,
|
.set_resources = DEVICE_NOOP,
|
||||||
.enable_resources = DEVICE_NOOP,
|
.enable_resources = DEVICE_NOOP,
|
||||||
.init = cpu_bus_init,
|
.init = mp_cpu_bus_init,
|
||||||
.scan_bus = 0,
|
.scan_bus = 0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -191,20 +191,13 @@ static struct device_operations pci_domain_ops = {
|
||||||
.acpi_name = northbridge_acpi_name,
|
.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 = {
|
static struct device_operations cpu_bus_ops = {
|
||||||
.read_resources = DEVICE_NOOP,
|
.read_resources = DEVICE_NOOP,
|
||||||
.set_resources = DEVICE_NOOP,
|
.set_resources = DEVICE_NOOP,
|
||||||
.enable_resources = DEVICE_NOOP,
|
.enable_resources = DEVICE_NOOP,
|
||||||
.init = cpu_bus_init,
|
.init = mp_cpu_bus_init,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static void enable_dev(struct device *dev)
|
static void enable_dev(struct device *dev)
|
||||||
{
|
{
|
||||||
/* Set the operations if it is a special bus type */
|
/* Set the operations if it is a special bus type */
|
||||||
|
|
Loading…
Reference in New Issue