riscv-openocd
riscv-openocd copied to clipboard
Clean up set_enable_virtual vs set_enable_virt2phys
The code supports two different ways of performing virtual address translation:
- set_enable_virtual uses the optional dcsr.mprven bit to have the hardware perform the translation.
- set_enable_virt2phys reads the page table structure from memory, and has OpenOCD do the translation itself.
There ought to be a single option that controls how address translation happens, and address translation should be on by default, with an option to disable it just in case that's necessary. Something like:
riscv set_address_translation auto|software|hardware|off