summaryrefslogtreecommitdiff
path: root/src/northbridge
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2022-09-13 12:43:37 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-09-14 20:28:37 +0000
commit44807acaefc71cd4985779e742e6791cb9daf65d (patch)
tree1f751da65e05f617f2fee0f822c806b4c2fdf33d /src/northbridge
parent62cd5e86031415843b8a0429ec05cca11b528902 (diff)
soc/amd/common: Add common function to get cpu count
This is the same for all supported AMD hardware. Change-Id: Ic6b954308dbb4c5a2050f1eb8f15acb41d0b81bd Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/67617 Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Diffstat (limited to 'src/northbridge')
-rw-r--r--src/northbridge/amd/pi/00730F01/northbridge.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/northbridge/amd/pi/00730F01/northbridge.c b/src/northbridge/amd/pi/00730F01/northbridge.c
index b1df81a68a..0245a74ea9 100644
--- a/src/northbridge/amd/pi/00730F01/northbridge.c
+++ b/src/northbridge/amd/pi/00730F01/northbridge.c
@@ -23,6 +23,7 @@
#include <northbridge/amd/nb_common.h>
#include <northbridge/amd/agesa/agesa_helper.h>
#include <southbridge/amd/pi/hudson/pci_devs.h>
+#include <amdblocks/cpu.h>
#define MAX_NODE_NUMS MAX_NODES
#define PCIE_CAP_AER BIT(5)
@@ -873,13 +874,6 @@ static void pre_mp_init(void)
x86_mtrr_check();
}
-static int get_cpu_count(void)
-{
- uint8_t siblings = cpuid_ecx(0x80000008) & 0xff;
-
- return siblings + 1;
-}
-
static const struct mp_ops mp_ops = {
.pre_mp_init = pre_mp_init,
.get_cpu_count = get_cpu_count,