Michał Kopeć has uploaded this change for review.

View Change

src/northbridge/amd/pi/00730F01: enable PARALLEL_MP

Disable LEGACY_SMP_INIT to enable PARALLEL_MP.

TEST=TEST=Boot on PC Engines apu1

Inspired by CB:59693

Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Change-Id: Ib49e7d3f5956ac7831664d50db5f233b70aa54db
---
M src/northbridge/amd/pi/00730F01/Kconfig
M src/northbridge/amd/pi/00730F01/northbridge.c
2 files changed, 16 insertions(+), 5 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/08/59808/1
diff --git a/src/northbridge/amd/pi/00730F01/Kconfig b/src/northbridge/amd/pi/00730F01/Kconfig
index 27ae673..94abb93 100644
--- a/src/northbridge/amd/pi/00730F01/Kconfig
+++ b/src/northbridge/amd/pi/00730F01/Kconfig
@@ -2,7 +2,6 @@

config NORTHBRIDGE_AMD_PI_00730F01
bool
- select LEGACY_SMP_INIT

if NORTHBRIDGE_AMD_PI_00730F01

diff --git a/src/northbridge/amd/pi/00730F01/northbridge.c b/src/northbridge/amd/pi/00730F01/northbridge.c
index 332bf1ac..6e83038 100644
--- a/src/northbridge/amd/pi/00730F01/northbridge.c
+++ b/src/northbridge/amd/pi/00730F01/northbridge.c
@@ -13,7 +13,7 @@
#include <string.h>
#include <stdlib.h>
#include <lib.h>
-#include <cpu/cpu.h>
+#include <cpu/x86/mp.h>
#include <Porting.h>
#include <AGESA.h>
#include <Topology.h>
@@ -981,15 +981,27 @@
}
}

-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);
}

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,
};


To view, visit change 59808. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ib49e7d3f5956ac7831664d50db5f233b70aa54db
Gerrit-Change-Number: 59808
Gerrit-PatchSet: 1
Gerrit-Owner: Michał Kopeć <michal.kopec@3mdeb.com>
Gerrit-MessageType: newchange