Add the required functions for minidump support, based on the ARM64 port.
Did some of this work before I realized the obvious blocker that we don't have kgdb for RISC-V yet. It dumps successfully but I can't inspect it yet until we have that. Regardless, I figured I'd put this up now to get some initial looks at the changes. I will look into adding the required bits to kgdb to get it working.
|227 ↗||(On Diff #51031)|
First major differences to the ARM64 version are in this loop.
This is built on my understanding that we support 3 levels of page tables (L1 through L3), and that L2 and L3 level entries can be leaf entries.
|319 ↗||(On Diff #51031)|
Second major differences are in this loop.
|707 ↗||(On Diff #51031)|
Setting up dump_avail is required so that pmap_page_dump_size will be non-zero (see vm_page.c).
|656 ↗||(On Diff #51031)|
Do we need a || defined(__riscv) here?
Yes. I tried writing out more than one page at a time and it failed quite spectacularly, so this could be a good spot to revisit and introduce pmap_kenter_temporary() as we discussed on IRC.
I'm happy for that to be handled in a separate diff/commit; just wanted to make sure I wasn't missing something. It might be worth adding an /* XXX */ comment for now noting the 4KB write limitation.