pussuw opened a new pull request #5782:
URL: https://github.com/apache/incubator-nuttx/pull/5782


   - Add config "ARCH_USE_S_MODE" which controls whether the kernel
     runs in M-mode or S-mode
   - Add more MSTATUS and most of the SSTATUS register definitions
   - Add more MIP flags for interrupt delegation
   - Add handling of interrupts from S-mode
   - Add handling of FPU from S-mode
   - Add new context handling functions that are not dependent on the trap
     handlers / ecall
   
   Exceptions / faults are delegated to S-mode.
   External interrupts are delegated to S-mode.
   
   Only the machine timer interrupt is handled in M-mode.
   Machine mode timer is used as follows:
   - The timer reload happens in M-mode ISR
   - The event is dispatched to S-mode ISR, which will notify the kernel
     to advance time
   - For some reason clearing the interrupt does not work from S-mode, so
     created a call gate to clear the interrupt in M-mode
   
   The only supported (tested) target for now is MPFS / icicle:knsh (not yet 
published).
   
   ## Summary
   Add option to run NuttX with RISC-V in supervisor mode.
   
   ## Impact
   Enabler for CONFIG_BUILD_KERNEL=y, MMU mappings require S-mode.
   
   ## Testing
   Tested with icicle:knsh (not yet published)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to