RTEMS | risc-v: support running in s-mode (!1086)
Kinsey Moore (@opticron)
gitlab at rtems.org
Thu Feb 26 23:25:01 UTC 2026
Kinsey Moore started a new discussion on bsps/riscv/riscv/clock/clockdrv.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1086#note_143645
> {
> - riscv_timecounter *tc;
> - volatile RISCV_CLINT_regs *clint;
> + riscv_timecounter *tc = (riscv_timecounter *) base;
> + uint32_t timecount = 0;
> +
> + (void) tc;
> +
> +#ifndef RISCV_USE_S_MODE
> + timecount = riscv_clint->mtime.val_32[0];
> +#else
>
> - tc = (riscv_timecounter *) base;
> - clint = tc->clint;
> - return clint->mtime.val_32[0];
> +#endif
Empty `#else` clause?
--
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1086#note_143645
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20260226/c24e083e/attachment-0001.htm>
More information about the bugs
mailing list