opnsense-src/sys/mips/include
Mitchell Horne eb2ea57ef1 minidump: Parameterize minidumpsys()
The minidump code is written assuming that certain global state will not
change, and rightly so, since it executes from a kernel debugger
context. In order to support taking minidumps of a live system, we
should allow copies of relevant global state that is likely to change to
be passed as parameters to the minidumpsys() function.

This patch does the work of parameterizing this function, by adding a
struct minidumpstate argument. For now, this struct allows for copies of
the kernel message buffer, and the bitset that tracks which pages should
be dumped (vm_page_dump). Follow-up changes will actually make use of
these arguments.

Notably, dump_avail[] does not need a snapshot, since it is not expected
to change after system initialization.

The existing minidumpsys() definitions are renamed, and a thin MI
wrapper is added to kern_dump.c, which handles the construction of
the state struct. Thus, calling minidumpsys() remains as simple as
before.

Reviewed by:	kib, markj, jhb
Sponsored by:	Juniper Networks, Inc.
Sponsored by:	Klara, Inc.
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D31989

(cherry picked from commit 1adebe3cd6)
2021-12-03 10:02:03 -04:00
..
_align.h
_bus.h Regularize my copyright notice 2019-12-04 16:56:11 +00:00
_inttypes.h
_limits.h
_stdint.h
_types.h
abi.h
asm.h
atomic.h [PowerPC] [MIPS] Implement 32-bit kernel emulation of atomic64 operations 2020-01-02 23:20:37 +00:00
bootinfo.h
bus.h Add missing assignment forgotten in r365899 2020-09-20 15:11:52 +00:00
bus_dma.h
cache.h
cache_mipsNN.h
cache_r4k.h
cca.h
cdefs.h
clock.h
counter.h
cpu.h
cpufunc.h mips: clean up empty lines in .c and .h files 2020-09-01 21:21:19 +00:00
cpuinfo.h
cpuregs.h Fix a common typo in source code comments 2021-08-19 09:28:34 +02:00
db_machdep.h mips: clean up empty lines in .c and .h files 2020-09-01 21:21:19 +00:00
dump.h minidump: De-duplicate the progress bar 2021-10-15 12:20:48 -03:00
efi.h
elf.h Check for the only 32-bit MIPS ABIs we support, rather than !n64 2020-09-26 21:47:11 +00:00
endian.h Consolidate machine/endian.h definitions 2021-06-24 20:42:56 -03:00
exec.h
fdt.h
float.h
floatingpoint.h
fls64.h
fpu.h
frame.h
gdb_machdep.h gdb: report specific stop reason for watchpoints 2021-04-21 10:20:33 -03:00
hwfunc.h
ieee.h
ieeefp.h
in_cksum.h netinet: Remove in_cksum_update() 2021-12-01 07:41:55 -05:00
intr.h
intr_machdep.h
kdb.h Introduce kdb-level watchpoint functions 2021-04-21 10:20:33 -03:00
limits.h
locore.h
md_var.h minidump: Parameterize minidumpsys() 2021-12-03 10:02:03 -04:00
memdev.h Add the MEM_EXTRACT_PADDR ioctl to /dev/mem. 2020-09-02 18:12:47 +00:00
metadata.h
minidump.h Sparsify the vm_page_dump bitmap 2020-09-21 22:21:59 +00:00
mips_opcode.h mips: clean up empty lines in .c and .h files 2020-09-01 21:21:19 +00:00
octeon_cop2.h
ofw_machdep.h
param.h
pcb.h
pcpu.h mips: fix kernel build after r357804 2020-02-14 20:25:04 +00:00
pcpu_aux.h Centralize __pcpu definitions. 2019-08-29 07:25:27 +00:00
pmap.h Add pmap_vm_page_alloc_check() 2021-08-24 02:21:13 +03:00
pmc_mdep.h
proc.h Remove 'struct trapframe' pointer from mips64's 'struct syscall_args'. 2020-11-06 19:19:51 +00:00
procctl.h
profile.h Remove two obsolete comments that reference splhigh/splx. 2019-11-21 18:49:54 +00:00
pte.h
ptrace.h
reg.h
regdef.h
regnum.h mips: clean up empty lines in .c and .h files 2020-09-01 21:21:19 +00:00
reloc.h
resource.h
runq.h
sc_machdep.h
setjmp.h
sf_buf.h
sigframe.h
signal.h
smp.h
stdarg.h
sysarch.h
tlb.h
tls.h
trap.h
ucontext.h
vdso.h
vm.h Create VM_MEMATTR_DEVICE on all architectures 2021-06-13 16:49:36 +01:00
vmparam.h Add a vmparam.h constant indicating pmap support for large pages. 2020-09-23 19:34:21 +00:00