Attention is currently required from: Patrick Rudolph. Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59693 )
Change subject: nb/intel/i440bx: Use PARALLEL_MP ......................................................................
nb/intel/i440bx: Use PARALLEL_MP
Now that PARALLEL_MP can also deal with !SMP it can be used for this northbridge, which always features one CPU.
The ramstage size by roughly 5K, but the compressed size increase by ~1K.
Change-Id: Ic8d2582b353069eecea8561cfe01b2dd8221779b Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/northbridge/intel/i440bx/Kconfig M src/northbridge/intel/i440bx/northbridge.c 2 files changed, 15 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/93/59693/1
diff --git a/src/northbridge/intel/i440bx/Kconfig b/src/northbridge/intel/i440bx/Kconfig index 4b1638c..d97c627 100644 --- a/src/northbridge/intel/i440bx/Kconfig +++ b/src/northbridge/intel/i440bx/Kconfig @@ -5,7 +5,7 @@ select NO_ECAM_MMCONF_SUPPORT select HAVE_DEBUG_RAM_SETUP select NO_CBFS_MCACHE - select LEGACY_SMP_INIT + select PARALLEL_MP
config SDRAMPWR_4DIMM bool diff --git a/src/northbridge/intel/i440bx/northbridge.c b/src/northbridge/intel/i440bx/northbridge.c index 2659288..8225e1c 100644 --- a/src/northbridge/intel/i440bx/northbridge.c +++ b/src/northbridge/intel/i440bx/northbridge.c @@ -7,6 +7,7 @@ #include <device/pci.h> #include <device/pci_ids.h> #include <cpu/cpu.h> +#include <cpu/x86/mp.h> #include "i440bx.h"
static void northbridge_init(struct device *dev) @@ -72,15 +73,25 @@ .scan_bus = pci_domain_scan_bus, };
-static void cpu_bus_init(struct device *dev) +static int get_cpu_count(void) { - initialize_cpus(dev->link_list); + return 1; +} + +static const struct mp_ops mp_ops = { + .get_cpu_count = get_cpu_count, +}; + +void mp_init_cpus(struct bus *cpu_bus) +{ + /* TODO: Handle mp_init_with_smm failure? */ + mp_init_with_smm(cpu_bus, &mp_ops); }
static struct device_operations cpu_bus_ops = { .read_resources = noop_read_resources, .set_resources = noop_set_resources, - .init = cpu_bus_init, + .init = mp_cpu_bus_init, };
static void enable_dev(struct device *dev)