Michał Kopeć has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/59807 )
Change subject: src/northbridge/amd/agesa/family14: Enable PARALLEL_MP ......................................................................
src/northbridge/amd/agesa/family14: Enable PARALLEL_MP
Enable PARALLEL_MP by disabling LEGACY_SMP_INIT.
Signed-off-by: Michał Kopeć michal.kopec@3mdeb.com Change-Id: I39a0779bdf115eebe31290591152b920acde773e --- M src/northbridge/amd/agesa/family14/Kconfig M src/northbridge/amd/agesa/family14/northbridge.c 2 files changed, 16 insertions(+), 5 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/07/59807/1
diff --git a/src/northbridge/amd/agesa/family14/Kconfig b/src/northbridge/amd/agesa/family14/Kconfig index f9bfbfd..a007954 100644 --- a/src/northbridge/amd/agesa/family14/Kconfig +++ b/src/northbridge/amd/agesa/family14/Kconfig @@ -2,7 +2,6 @@
config NORTHBRIDGE_AMD_AGESA_FAMILY14 bool - select LEGACY_SMP_INIT
if NORTHBRIDGE_AMD_AGESA_FAMILY14
diff --git a/src/northbridge/amd/agesa/family14/northbridge.c b/src/northbridge/amd/agesa/family14/northbridge.c index 389a2a6..07846a0 100644 --- a/src/northbridge/amd/agesa/family14/northbridge.c +++ b/src/northbridge/amd/agesa/family14/northbridge.c @@ -10,7 +10,7 @@ #include <device/pci_ids.h> #include <string.h> #include <lib.h> -#include <cpu/cpu.h> +#include <cpu/x86/mp.h> #include <cpu/amd/msr.h> #include <cpu/amd/mtrr.h> #include <northbridge/amd/nb_common.h> @@ -352,9 +352,21 @@ } }
-static void cpu_bus_init(struct device *dev) +static int get_cpu_count(void) { - initialize_cpus(dev->link_list); + uint8_t siblings = cpuid_ecx(0x80000008) & 0xff; + + return siblings + 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); }
/* North Bridge Structures */ @@ -526,7 +538,7 @@ 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, .scan_bus = cpu_bus_scan, };