diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2023-02-16 20:34:46 +0100 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-02-27 19:27:12 +0000 |
commit | 15024e06e89dba6f7254bd16b3cd0d1f60a82ebf (patch) | |
tree | ca55704adaca8bb1b1517d8f2619ac05e3c662ec /src/soc/amd | |
parent | b9a6223453125e89800f030dc379453a624cff9a (diff) |
soc/amd/stoneyridge/acpi: use available number of CPUs for CPU entries
It's sufficient to generate CPU devices for all available CPU cores/
threads instead of for the maximum number of possible CPU cores/threads.
TEST=google/careena with 2 cores still boots and Linux doesn't complain
about ACPI errors due to referenced but not present CPU objects.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I6850edfa305304060092cb5480f4296f4f5ddacc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/73070
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Diffstat (limited to 'src/soc/amd')
-rw-r--r-- | src/soc/amd/stoneyridge/acpi.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/soc/amd/stoneyridge/acpi.c b/src/soc/amd/stoneyridge/acpi.c index bc3e73a973..34d1571fbc 100644 --- a/src/soc/amd/stoneyridge/acpi.c +++ b/src/soc/amd/stoneyridge/acpi.c @@ -16,6 +16,7 @@ #include <gpio.h> #include <amdblocks/acpimmio.h> #include <amdblocks/acpi.h> +#include <amdblocks/cpu.h> #include <amdblocks/ioapic.h> #include <soc/acpi.h> #include <soc/pci_devs.h> @@ -94,11 +95,8 @@ void acpi_fill_fadt(acpi_fadt_t *fadt) void generate_cpu_entries(const struct device *device) { - int cores, cpu; - - /* Stoney Ridge is single node, just report # of cores */ - cores = pci_read_config32(SOC_NB_DEV, NB_CAPABILITIES2) & CMP_CAP_MASK; - cores++; /* number of cores is CmpCap+1 */ + int cpu; + const int cores = get_cpu_count(); printk(BIOS_DEBUG, "ACPI \\_SB report %d core(s)\n", cores); |