A virtual register is one that doesn’t exist directly in the hardware, but
that the debugger exposes as if it does. Debug software should implement
them, but hardware can skip this section. Virtual registers exist to give
users access to functionality that’s not part of standard debuggers without
requiring them to carefully modify debug registers while the debugger is
also accessing those same registers.
virtual |
Privilege Level (priv ) |
|
Privilege Level (priv
, at virtual)
[priv]
Users can read this register to inspect the privilege level that
the hart was running in when the hart halted.
Users can write this register to change the privilege level that
the hart will run in when it resumes.
This register contains prv
from dcsr
, but in a place that the user
is expected to access. The user should not access dcsr
directly,
because doing so might interfere with the debugger.
0 |
User/Application |
1 |
Supervisor |
3 |
Machine |
|
|
|
|
[prv]
|prv| |
Contains the privilege level the hart was operating in when Debug
Mode was entered. The encoding is described in Table
[tab:privlevel], and matches the privilege level encoding from
the Privileged Spec. A user can write this
value to change the hart’s privilege level when exiting Debug Mode. |
R/W |
0 |