You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I write assembly code and C code for the same functionality that are simulated by spike, it turns out that assembly code can access MMIO device address but C code cannot. The source code is at riscv-software-src/riscv-isa-sim#1238.
I wonder if it is pk, that runs the RISCV program in a user mode, that prevents accesses of PMP and paticular address like external device's memory and registers. If it is, can I modify source code of pk to enable the access?
The text was updated successfully, but these errors were encountered:
Correct, PK has a demand-paged virtual memory system, and so the addresses in the program don’t directly correspond to physical addresses. And only main memory can be accessed from the user program; there is no means to access MMIO.
If this restriction is a problem for your use case, you shouldn’t use PK.
When I write assembly code and C code for the same functionality that are simulated by spike, it turns out that assembly code can access MMIO device address but C code cannot. The source code is at riscv-software-src/riscv-isa-sim#1238.
I wonder if it is pk, that runs the RISCV program in a user mode, that prevents accesses of PMP and paticular address like external device's memory and registers. If it is, can I modify source code of pk to enable the access?
The text was updated successfully, but these errors were encountered: