riscv: hmp: Add a command to show virtual memory mappings

This adds 'info mem' command for RISC-V, to show virtual memory
mappings that aids debugging.

Rather than showing every valid PTE, the command compacts the
output by merging all contiguous physical address mappings into
one block and only shows the merged block mapping details.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Acked-by: Dr. David Alan Gilbert <dgilbert@redhat.com>
Reviewed-by: Palmer Dabbelt <palmer@sifive.com>
Signed-off-by: Palmer Dabbelt <palmer@sifive.com>
This commit is contained in:
Bin Meng
2019-08-14 08:33:32 -07:00
committed by Palmer Dabbelt
parent 49dd180e4f
commit df42fdd6cc
3 changed files with 234 additions and 1 deletions

View File

@ -249,7 +249,7 @@ STEXI
Show virtual to physical memory mappings.
ETEXI
#if defined(TARGET_I386)
#if defined(TARGET_I386) || defined(TARGET_RISCV)
{
.name = "mem",
.args_type = "",