diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2021-04-22 17:08:50 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2021-04-23 17:48:47 +0000 |
commit | 79f705fa34f2b5cecf19d183a42eaf4d57f87941 (patch) | |
tree | 68c333e9ee3c77bdeb86c6758ff185839678bd89 /src/soc/amd | |
parent | 6b36c836266d7864f39e18381e58c8961a3fe491 (diff) |
soc/amd/cezanne/cpu: make sure that MAX_CPUS isn't overridden
Trying to limit the number of available cores by setting the MAX_CPUS
Kconfig option to a lower value than the SoC's default might result in
cores being enabled in the FSP-S, but not fully initialized in coreboot
which will cause some malfunction. Add a static assert to make sure
that this option isn't changed from the default. To limit the maximum
number of cores, use the downcore_mode and disable_smt devicetree
settings instead.
BUG=b:184162768
TEST=Build fails if MAX_CPUS isn't the expected default.
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Idd6aa1d99128b17218a8e910c33415218a58578f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52606
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd')
-rw-r--r-- | src/soc/amd/cezanne/cpu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/soc/amd/cezanne/cpu.c b/src/soc/amd/cezanne/cpu.c index 148dcd8b31..f00266552d 100644 --- a/src/soc/amd/cezanne/cpu.c +++ b/src/soc/amd/cezanne/cpu.c @@ -3,6 +3,7 @@ #include <amdblocks/cpu.h> #include <amdblocks/reset.h> #include <amdblocks/smm.h> +#include <assert.h> #include <console/console.h> #include <cpu/amd/microcode.h> #include <cpu/cpu.h> @@ -14,6 +15,9 @@ #include <soc/cpu.h> #include <soc/iomap.h> +_Static_assert(CONFIG_MAX_CPUS == 16, "Do not override MAX_CPUS. To reduce the number of " + "available cores, use the downcore_mode and disable_smt devicetree settings instead."); + /* MP and SMM loading initialization */ /* |