freebsd-dev/sys/x86
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
..
acpica x86: duplicate acpi_wakeup.c per i386 and amd64 2021-09-14 00:23:14 +03:00
bios smbios: Move smbios driver out from x86 machdep code 2021-02-23 21:17:09 +00:00
conf Retire synchronous PPP kernel driver sppp(4). 2021-10-22 11:41:36 -07:00
cpufreq Make CPU children explicitly share parent unit numbers. 2021-09-24 23:31:51 -04:00
include minidump: Parameterize minidumpsys() 2021-11-19 15:05:52 -04:00
iommu dmar: Disable protected memory regions after initialization 2021-10-29 10:08:25 +02:00
isa amd64: Add MD bits for KMSAN 2021-08-10 21:27:53 -04:00
linux Drop "All rights reserved" from my copyright statements. 2021-07-20 10:05:50 +03:00
pci x86: clean up empty lines in .c and .h files 2020-09-01 21:23:59 +00:00
x86 x86: Implement deferred TSC calibration 2021-11-15 16:13:24 -05:00
xen xen: Fix warning by adding KERNBASE to modlist_paddr before casting 2021-08-29 19:43:00 +02:00