RTEMS | Draft: bsps/riscv: add Smrnmi extension support (!1391)
Lucian Silistru (@lsilistr)
gitlab at rtems.org
Wed Aug 26 17:15:22 UTC 2026
Lucian Silistru commented on a discussion on bsps/riscv/riscv/irq/rnmi.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1391#note_158076
> +#include <rtems/score/cpu.h>
> +#include <rtems/score/percpu.h>
> +#include <rtems/score/riscv-utility.h>
> +#include <rtems/score/smpimpl.h>
> +
> +/* Per-core deferred RNMI contexts */
> +static RISCV_RNMI_Context _RISCV_RNMI_context[CPU_MAXIMUM_PROCESSORS];
> +
> +static void _RISCV_RNMI_deferred_enable_action(void *arg)
> +{
> + (void)arg;
> + uint32_t cpu_index = _Per_CPU_Get_index(_Per_CPU_Get());
> + uintptr_t ctx_addr = (uintptr_t)&_RISCV_RNMI_context[cpu_index];
> +
> + /* Enable deferred processing on this hart */
> + write_csr(0x740, ctx_addr);
I was having issues using *_csr macros with defines - it needs a macro string concatenation intermediate.
Idea is GCC 15 doesn't need this, matched binutils has the CSRs. Earlier versions need defines.
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1391#note_158076
You're receiving this email because of your account on gitlab.rtems.org. Unsubscribe from this thread: https://gitlab.rtems.org/-/sent_notifications/5-evoa3exau88maobz0p6jjklrp-1d/unsubscribe | Manage all notifications: https://gitlab.rtems.org/-/profile/notifications | Help: https://gitlab.rtems.org/help
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260826/8fbaf8d2/attachment-0001.htm>
More information about the bugs
mailing list