summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArthur Heymans <arthur@aheymans.xyz>2022-05-31 21:40:30 +0200
committerFelix Held <felix-coreboot@felixheld.de>2022-06-20 12:19:06 +0000
commitc056d18fbe13fd90a141e9c713969efb9f0915d7 (patch)
tree1156889a30f0edab8c6d820d6665ef37dee6acc9 /src
parent615818f5a98d19079fd5e1725cd56786d39882c2 (diff)
soc/amd/stoneyridge: Align get_cpu_count to other targets
The CPUID function to get the number of cores on a package is common across multiple generations of AMD cpus. Change-Id: I28bff875ea2df7837e4495787cf8a4c2d522d43d Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/64869 Reviewed-by: Paul Menzel <paulepanter@mailbox.org> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/soc/amd/stoneyridge/cpu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/soc/amd/stoneyridge/cpu.c b/src/soc/amd/stoneyridge/cpu.c
index e691a51b39..94beed865a 100644
--- a/src/soc/amd/stoneyridge/cpu.c
+++ b/src/soc/amd/stoneyridge/cpu.c
@@ -43,7 +43,7 @@ static void pre_mp_init(void)
static int get_cpu_count(void)
{
- return (pci_read_config16(SOC_HT_DEV, D18F0_CPU_CNT) & CPU_CNT_MASK) + 1;
+ return 1 + (cpuid_ecx(0x80000008) & 0xff);
}
static const struct mp_ops mp_ops = {