Open LuChengTHU opened 6 years ago
Thanks for the bug report. Can you please provide a link to your test code.
The following code in cpu_helper.c
should do the following (if my reading is correct):
The second clause should trigger for your test case (U=0 and U-mode). Perhaps we can try your test and instrument this code with some log messages to see what is going on with your test case.
I print the PTE and see U=0, V=R=W=X=1. My user mode program can access the address of kernel, but it cannot access CSR (so it is indeed in user mode). The spec says "U-mode software may only accessthe page when U=1". What is the meaning of "may"???