diff options
author | Andrey Petrov <anpetrov@fb.com> | 2019-11-07 09:48:41 -0800 |
---|---|---|
committer | Andrey Petrov <anpetrov@fb.com> | 2019-11-13 19:11:39 +0000 |
commit | a7fb23081cb03f85de0bd80944089b82af737e3d (patch) | |
tree | 41625b0d3ed9d9e0d8c6ffbab132acea708932da /src | |
parent | a2d123ea9872ff074c32272e7020553e5647ac64 (diff) |
arch/x86: Correctly determine number of enabled cores
Instead of using MAX of (cores_enabled, MAX_CPUS), use MIN
which is correct.
TEST=tested with dmidecode
Change-Id: Id0935f48e73c037bb7c0e1cf36f94d98a40a499c
Signed-off-by: Andrey Petrov <anpetrov@fb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/36662
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Diffstat (limited to 'src')
-rw-r--r-- | src/arch/x86/smbios.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/arch/x86/smbios.c b/src/arch/x86/smbios.c index 261888fc7f..725d808d56 100644 --- a/src/arch/x86/smbios.c +++ b/src/arch/x86/smbios.c @@ -659,7 +659,7 @@ static int smbios_write_type4(unsigned long *current, int handle) t->processor_type = 3; /* System Processor */ t->core_count = (res.ebx >> 16) & 0xff; /* Assume we enable all the cores always, capped only by MAX_CPUS */ - t->core_enabled = MAX(t->core_count, CONFIG_MAX_CPUS); + t->core_enabled = MIN(t->core_count, CONFIG_MAX_CPUS); t->l1_cache_handle = 0xffff; t->l2_cache_handle = 0xffff; t->l3_cache_handle = 0xffff; |