aboutsummaryrefslogtreecommitdiff
path: root/sys/sys/kerneldump.h
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2015-01-07 01:01:39 +0000
committerMark Johnston <markj@FreeBSD.org>2015-01-07 01:01:39 +0000
commitbdb9ab0dd925b804280af9ecbdb01ceea66a6088 (patch)
tree6d50f1ee65f4ceaf3fa5c14faf47e9ecd3aae3e5 /sys/sys/kerneldump.h
parentff7c6d42f33a0ccfa690c48b62e7381721317cc3 (diff)
downloadsrc-bdb9ab0dd925b804280af9ecbdb01ceea66a6088.tar.gz
src-bdb9ab0dd925b804280af9ecbdb01ceea66a6088.zip
Factor out duplicated code from dumpsys() on each architecture into generic
code in sys/kern/kern_dump.c. Most dumpsys() implementations are nearly identical and simply redefine a number of constants and helper subroutines; a generic implementation will make it easier to implement features around kernel core dumps. This change does not alter any minidump code and should have no functional impact. PR: 193873 Differential Revision: https://reviews.freebsd.org/D904 Submitted by: Conrad Meyer <conrad.meyer@isilon.com> Reviewed by: jhibbits (earlier version) Sponsored by: EMC / Isilon Storage Division
Notes
Notes: svn path=/head/; revision=276772
Diffstat (limited to 'sys/sys/kerneldump.h')
-rw-r--r--sys/sys/kerneldump.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/sys/sys/kerneldump.h b/sys/sys/kerneldump.h
index a148736c1217..c2b0d5686854 100644
--- a/sys/sys/kerneldump.h
+++ b/sys/sys/kerneldump.h
@@ -100,8 +100,31 @@ kerneldump_parity(struct kerneldumpheader *kdhp)
}
#ifdef _KERNEL
+struct dump_pa {
+ vm_paddr_t pa_start;
+ vm_paddr_t pa_size;
+};
+
void mkdumpheader(struct kerneldumpheader *kdh, char *magic, uint32_t archver,
uint64_t dumplen, uint32_t blksz);
+
+int dumpsys_generic(struct dumperinfo *);
+
+void dumpsys_map_chunk(vm_paddr_t, size_t, void **);
+typedef int dumpsys_callback_t(struct dump_pa *, int, void *);
+int dumpsys_foreach_chunk(dumpsys_callback_t, void *);
+int dumpsys_cb_dumpdata(struct dump_pa *, int, void *);
+int dumpsys_buf_write(struct dumperinfo *, char *, size_t);
+int dumpsys_buf_flush(struct dumperinfo *);
+
+void dumpsys_gen_pa_init(void);
+struct dump_pa *dumpsys_gen_pa_next(struct dump_pa *);
+void dumpsys_gen_wbinv_all(void);
+void dumpsys_gen_unmap_chunk(vm_paddr_t, size_t, void *);
+int dumpsys_gen_write_aux_headers(struct dumperinfo *);
+
+extern int do_minidump;
+
#endif
#endif /* _SYS_KERNELDUMP_H */