riscv-openocd icon indicating copy to clipboard operation
riscv-openocd copied to clipboard

Clean up set_enable_virtual vs set_enable_virt2phys

Open timsifive opened this issue 3 years ago • 0 comments

The code supports two different ways of performing virtual address translation:

  1. set_enable_virtual uses the optional dcsr.mprven bit to have the hardware perform the translation.
  2. 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

timsifive avatar Sep 01 '20 19:09 timsifive