Closed robotman2412 closed 7 months ago
Some of these CSRs don't seem to exist in ESP32-C6 (referring to the TRM), but we'll add those which do!
@robotman2412 Thanks for reporting this. I will be looking at the missing registers. Some of them are read only. We will need to add a flag to disable store/restore option during the algorithm run.
@robotman2412 I am adding the missing regs which are mentioned in the TRM.
mvendorid
marchid
mimpid
mhartid
mideleg
mie
mip
The others (medeleg, mtinst) are not documented so I am leaving them out.
Completed via 15867d670d2a3d02125cf1a3f0ba92bd8053e175
@robotman2412 I am adding the missing regs which are mentioned in the TRM.
mvendorid marchid mimpid mhartid mideleg mie mip
The others (medeleg, mtinst) are not documented so I am leaving them out.
Actually, according to the RISC-V privileged specification, medeleg
is necessarily present if a lower privilege mode can handle traps, and the ESP32-C6 has a CPU that can delegate interrupts and exceptions to U-mode.
If mideleg
exists, then medeleg
does too and I have verified this by writing assembly that accesses the medeleg
CSR.
@robotman2412 you are right. I have added the medeleg
Answers checklist.
General issue report
For low-level debugging purposes, I would like to be able to read RISC-V CSRs like
mie
andmip
. Unfortunately, theesp32c6-builtin.cfg
target does not expose these CSRs.I need to be able to access the following CSRs:
These CSRs exist in any RISC-V core and I need to see them but they're not available either through GDB or directly with monitor commands.