diff options
author | Maximilian Brune <maximilian.brune@9elements.com> | 2024-03-05 21:48:19 +0100 |
---|---|---|
committer | Maximilian Brune <maximilian.brune@9elements.com> | 2024-11-28 13:59:34 +0000 |
commit | 0b617c930082d00595a2d7427bc8ce7af6a9f9e9 (patch) | |
tree | 718f85be4464b1a4987e4d4c89428d2454e3b00a /src/arch/riscv/include/mcall.h | |
parent | 6c063250b55eb9d7bc96615557fa731474f287fe (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/include/mcall.h')
-rw-r--r-- | src/arch/riscv/include/mcall.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/arch/riscv/include/mcall.h b/src/arch/riscv/include/mcall.h index c6ed7d804e..69eb5741ef 100644 --- a/src/arch/riscv/include/mcall.h +++ b/src/arch/riscv/include/mcall.h @@ -6,11 +6,11 @@ // NOTE: this is the size of struct hls below. A static_assert would be // nice to have. #if __riscv_xlen == 64 -#define HLS_SIZE 88 +#define HLS_SIZE 96 #endif #if __riscv_xlen == 32 -#define HLS_SIZE 52 +#define HLS_SIZE 56 #endif /* We save 37 registers, currently. */ @@ -42,6 +42,7 @@ struct hls { struct sbi_device_message *device_response_queue_head; struct sbi_device_message *device_response_queue_tail; + int enabled; int hart_id; int ipi_pending; uint64_t *timecmp; |