opnsense-src/sys/x86/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
..
xen
_align.h
_inttypes.h
_limits.h
_stdint.h
_types.h
acpica_machdep.h x86: clean up empty lines in .c and .h files 2020-09-01 21:23:59 +00:00
apicreg.h x86: clean up empty lines in .c and .h files 2020-09-01 21:23:59 +00:00
apicvar.h x86: clean up empty lines in .c and .h files 2020-09-01 21:23:59 +00:00
apm_bios.h x86: clean up empty lines in .c and .h files 2020-09-01 21:23:59 +00:00
bus.h Generalize bus_space(9) and atomic(9) sanitizer interceptors 2021-11-01 10:16:39 -04:00
bus_dma.h x86: clean up empty lines in .c and .h files 2020-09-01 21:23:59 +00:00
busdma_impl.h
cputypes.h
dump.h minidump: De-duplicate the progress bar 2021-10-15 12:20:48 -03:00
elf.h x86: clean up empty lines in .c and .h files 2020-09-01 21:23:59 +00:00
endian.h Consolidate machine/endian.h definitions 2021-06-24 20:42:56 -03:00
fdt.h
float.h
fpu.h Revert "linux32: add a hack to avoid redefining the type of the savefpu tag" 2021-10-10 12:21:17 +03:00
frame.h
ifunc.h
init.h
intr_machdep.h
iommu.h o Add machine/iommu.h and include MD iommu headers from it, 2020-08-05 19:11:31 +00:00
kvm.h kvm_clock: KVM paravirtual clock support 2021-10-10 12:21:16 +03:00
legacyvar.h
mca.h
metadata.h stand/multiboot: adjust the protocol between loader and kernel 2021-02-03 14:07:43 +01:00
mptable.h
ofw_machdep.h
pci_cfgreg.h
procctl.h Add amd64 procctl(2) ops to manage forced LA48/LA57 VA after exec. 2020-08-23 20:32:13 +00:00
psl.h
ptrace.h
pvclock.h pvclock: Add vDSO support 2021-10-10 12:21:17 +03:00
reg.h
segments.h
setjmp.h
sigframe.h
signal.h
specialreg.h Limit workaround for errata E400 to appropriate AMD cpus. 2020-10-14 22:57:50 +00:00
stack.h
stdarg.h
sysarch.h
trap.h
ucode.h
ucontext.h
vdso.h pvclock: Add vDSO support 2021-10-10 12:21:17 +03:00
vmware.h
x86_smp.h amd64: stop doing special allocation for the AP startup trampoline 2021-08-24 02:21:13 +03:00
x86_var.h minidump: Parameterize minidumpsys() 2021-12-03 10:02:03 -04:00