Commit 5210d69
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 444c949 commit 5210d69
0 commit comments