freebsd-dev/sys/x86/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
..
xen xen: introduce xen_has_percpu_evtchn() 2021-07-28 17:27:05 +02:00
_align.h
_inttypes.h
_limits.h
_stdint.h
_types.h Reduce code duplication in machine/_types.h 2021-06-14 16:30:16 +01:00
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_dma.h busdma: Add KMSAN integration 2021-08-10 21:27:54 -04:00
bus.h Simplify kernel sanitizer interceptors 2021-07-29 21:13:32 -04:00
busdma_impl.h busdma: Add KMSAN integration 2021-08-10 21:27:54 -04:00
cputypes.h
dump.h minidump: De-duplicate the progress bar 2021-09-29 16:42:21 -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-03-26 19:00:22 -03:00
fdt.h
float.h
fpu.h Revert "linux32: add a hack to avoid redefining the type of the savefpu tag" 2021-09-22 23:17:47 +03:00
frame.h
ifunc.h Remove "All Rights Reserved" from FreeBSD Foundation sys/ copyrights 2021-08-08 10:42:24 -04:00
init.h x86/xen: remove PVHv1 code 2021-05-17 11:41:21 +02:00
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-08-14 15:57:54 +03:00
legacyvar.h
mca.h
metadata.h stand/multiboot: adjust the protocol between loader and kernel 2021-01-29 15:23:26 +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-08-14 15:57:54 +03:00
reg.h Create sys/reg.h for the common code previously in machine/reg.h 2021-08-30 12:50:53 +01:00
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-08-14 15:57:54 +03:00
vmware.h
x86_ieeefp.h Merge common parts of i386 and amd64's ieeefp.h into x86/x86_ieeefp.h 2021-08-12 18:45:22 +08:00
x86_smp.h amd64: Reduce the amount of cpuset copying done for TLB shootdowns 2021-11-15 13:01:31 -05:00
x86_var.h minidump: Parameterize minidumpsys() 2021-11-19 15:05:52 -04:00