Attention is currently required from: Marshall Dawson, Felix Held. Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/64869 )
Change subject: soc/amd/stoneyridge: Align get_cpu_count to other targets ......................................................................
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 --- M src/soc/amd/stoneyridge/cpu.c 1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/69/64869/1
diff --git a/src/soc/amd/stoneyridge/cpu.c b/src/soc/amd/stoneyridge/cpu.c index b14b375..b5373bc 100644 --- a/src/soc/amd/stoneyridge/cpu.c +++ b/src/soc/amd/stoneyridge/cpu.c @@ -43,7 +43,7 @@
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 = {