PR 193873 / https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=193873
x86, ARM, and MIPS are all relatively similar and straightforward. Some
MD-specific methods are left in dump_machdep.c in each arch to provide
mach-dependent implementations. (Map a region temporarily for dumping,
unmap a region, iterate physical memory segments, flush WB caches.)
Sparc and PowerPC are weirder. PowerPC had a merged dump/minidump path
that used a different md_pa structure, pmap_md, plumbed through its MMU
interface. So, that was ripped out and replaced with the standard path.
Sparc uses its own non-ELF dumping header and that makes its dumpsys
different enough that unification wasn't an improvement. However, some
logic shared with other archs (blk_dump == cb_dumpdata) was refactored
away.
Patch build-tested against:
- ARMv6 / CHROMEBOOK
- AMD64 / GENERIC
- i386 / GENERIC
- MIPS / WZR-300HP
- MIPS64 / SWARM64_SMP
- PPC / MPC85XX (cpu=booke)
- PPC / GENERIC (cpu=aim)
- PPC64 / GENERIC64 (cpu=aim64)
- Sparc64 / GENERIC
Sponsored by: EMC / Isilon storage division
Notes:
- This patch is the first step towards some other dump/minidump improvements. I didn't want to apply them independently to 7-8 different architectures' forks of dumpsys.
- Patch applies cleanly against a git tree; some hunks include SVN $FreeBSD$ macros which may require some coddling to apply to an SVN tree.
- powerpc/dump_machdep.c is entirely deleted (something patch(1) doesn't really do well)
- Net 875 lines removed: 21 files changed, 820 insertions(+), 1697 deletions(-)