summaryrefslogtreecommitdiff
path: root/src/arch/riscv/Kconfig
diff options
context:
space:
mode:
authorMaximilian Brune <maximilian.brune@9elements.com>2024-03-05 21:48:19 +0100
committerMaximilian Brune <maximilian.brune@9elements.com>2024-11-28 13:59:34 +0000
commit0b617c930082d00595a2d7427bc8ce7af6a9f9e9 (patch)
tree718f85be4464b1a4987e4d4c89428d2454e3b00a /src/arch/riscv/Kconfig
parent6c063250b55eb9d7bc96615557fa731474f287fe (diff)
arch/riscv: Refactor SMP code
Currently only a fixed number of harts/cores can be detected. This patch adds a Kconfig option which allows to detect the number of harts at runtime if a SOC or mainboard has a scheme to do so. As part of that patch SMP logic has been mostly moved to smp_resume, since it is easier to debug issues at the time smp_resume is called than it is at smp_pause, since the serial is usually not present at the time of the first smp_pause call. Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com> Change-Id: Icc53185991fed4dbed032a52e51ff71d085ad587 Reviewed-on: https://review.coreboot.org/c/coreboot/+/81082 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Alicja Michalska <ahplka19@gmail.com> Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Diffstat (limited to 'src/arch/riscv/Kconfig')
-rw-r--r--src/arch/riscv/Kconfig10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/arch/riscv/Kconfig b/src/arch/riscv/Kconfig
index 148d966059..b7fc0cab01 100644
--- a/src/arch/riscv/Kconfig
+++ b/src/arch/riscv/Kconfig
@@ -134,4 +134,14 @@ config RISCV_SOC_HAS_MENVCFG
bool
default y
+config RISCV_GET_HART_COUNT_AT_RUNTIME
+ bool
+ default n
+ help
+ Usually RISC-V SOCs have a specific amount of harts (CONFIG_MAX_CPUS).
+ It is however possible that the amount of harts can only be known at runtime.
+ This is for example the case for socketed and for emulation systems.
+ SOC/Mainboards select this option in case the number of harts is not known at
+ build time. In this case the SOC must have a scheme in place to discover all harts.
+
endif # if ARCH_RISCV