opnsense-src/sys/mips/include
Mitchell Horne 1adebe3cd6 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
2021-11-19 15:05:52 -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 Reduce code duplication in machine/_types.h 2021-06-14 16:30:16 +01:00
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-14 14:08:46 +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-09-29 16:42:21 -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-03-26 19:00:22 -03:00
exec.h
fdt.h Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
float.h
floatingpoint.h
fls64.h
fpu.h
frame.h
gdb_machdep.h gdb: report specific stop reason for watchpoints 2021-03-30 11:36:41 -03:00
hwfunc.h
ieee.h
ieeefp.h
in_cksum.h
intr.h
intr_machdep.h
kdb.h Introduce kdb-level watchpoint functions 2021-03-29 12:05:43 -03:00
limits.h
locore.h
md_var.h minidump: Parameterize minidumpsys() 2021-11-19 15:05:52 -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 Remove PCPU_INC 2021-03-20 19:23:59 -07:00
pcpu_aux.h Centralize __pcpu definitions. 2019-08-29 07:25:27 +00:00
pmap.h Add pmap_vm_page_alloc_check() 2021-07-31 16:53:42 +03:00
pmc_mdep.h
proc.h Pass the syscall number to capsicum permission-denied signals 2021-07-16 18:06:44 +01: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 Create sys/reg.h for the common code previously in machine/reg.h 2021-08-30 12:50:53 +01:00
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-04-12 06:15:31 +00:00
vmparam.h Add a vmparam.h constant indicating pmap support for large pages. 2020-09-23 19:34:21 +00:00