Trap delegation to Supervisor mode

37 views
Skip to first unread message

Susmita Nayak

unread,
May 3, 2024, 6:20:57 AMMay 3
to RISC-V SW Dev
Hi All,

I am looking to learn trap delegation to S MODE. I want to refer to some assembly programs.

Can anyone help me?

Thanks,
Susmita

Jaume Gauchola

unread,
May 6, 2024, 3:24:56 AMMay 6
to RISC-V SW Dev, sus...@maven-silicon.com
Hi Susmita,

What are your doubts about trap delegation in S-mode (CSR configuration, handling functions, virtual memory,...)?
Don't hesitate to ask!

Best regards,
Jaume

Charles Papon

unread,
May 6, 2024, 4:14:59 AMMay 6
to RISC-V SW Dev, jaume.g...@semidynamics.com, sus...@maven-silicon.com
Hi,

Here are a few exemples of trap delegations (the code run in machine mode as a background, and localy elevate itself) : 
https://github.com/SpinalHDL/NaxSoftware/blob/865b8c1465cb24c78423d16fd6dd74d12f643bda/baremetal/supervisor/src/crt.S#L61

The macros are defined into https://github.com/SpinalHDL/NaxSoftware/blob/865b8c1465cb24c78423d16fd6dd74d12f643bda/baremetal/driver/privileged.h

That crt.S is used to run some regressions test on a cpu.

Regards
Charles

Susmita Nayak

unread,
May 7, 2024, 7:30:22 AMMay 7
to RISC-V SW Dev, charles....@gmail.com, jaume.g...@semidynamics.com, Susmita Nayak
Thanks. Will check the same and get back.

Regards,
Susmita

Reply all
Reply to author
Forward
0 new messages