RTEMS | RISC-V: add support for using the MMU in S-Mode (!1182)

Gedare Bloom (@gedare) gitlab at rtems.org
Tue Apr 28 22:23:10 UTC 2026




Gedare Bloom commented on a discussion on bsps/riscv/shared/mmu/mmu-setup.c: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1182#note_149205

 > +
 > +  return ppn2 | ppn1 | ppn0 | flags;
 > +}
 > +
 > +BSP_START_TEXT_SECTION static inline uint32_t riscv_mmu_get_index(
 > +  uintptr_t address,
 > +  int level
 > +)
 > +{
 > +  uint32_t shift_bits;
 > +  uint32_t mask;
 > +
 > +  switch (level) {
 > +    case 2:
 > +#if __riscv_xlen == 32
 > +      shift_bits = 20;

I've made many changes throughout to handle rv32 correctly. It was not working before.

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/1182#note_149205
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/20260428/eb8a2a0d/attachment.htm>


More information about the bugs mailing list