Skip to content

Commit 71af753

Browse files
committed
Handle PMP access faults with dynamic region loading
When a task accesses memory not currently loaded in a PMP region, the hardware raises an access fault. Rather than panicking, we now attempt recovery by dynamically loading the required region, enabling tasks to access more memory than can fit simultaneously in the 16 hardware regions. The ISR captures and passes the faulting memory address from the mtval CSR to the trap handler. The handler uses this address to locate the corresponding flexpage in the task's memory space. If all regions are in use, we select a victim and evict it to make space. This required exposing internal region management functions so the handler can invoke them, and simplifying documentation at implementation sites since detailed documentation now resides in headers.
1 parent 391049c commit 71af753

File tree

7 files changed

+627
-31
lines changed

7 files changed

+627
-31
lines changed

0 commit comments

Comments
 (0)