Page MenuHomeFreeBSD

D31989.id95475.diff
No OneTemporary

D31989.id95475.diff

Index: sys/amd64/amd64/minidump_machdep.c
===================================================================
--- sys/amd64/amd64/minidump_machdep.c
+++ sys/amd64/amd64/minidump_machdep.c
@@ -162,7 +162,7 @@
static pd_entry_t fakepd[NPDEPG];
int
-minidumpsys(struct dumperinfo *di)
+cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state)
{
uint32_t pmapsize;
vm_offset_t va;
Index: sys/arm/arm/minidump_machdep.c
===================================================================
--- sys/arm/arm/minidump_machdep.c
+++ sys/arm/arm/minidump_machdep.c
@@ -153,7 +153,7 @@
CTASSERT(sizeof(dumpbuf) % sizeof(pt2_entry_t) == 0);
int
-minidumpsys(struct dumperinfo *di)
+cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state)
{
struct minidumphdr mdhdr;
uint64_t dumpsize, *dump_avail_buf;
Index: sys/arm/include/md_var.h
===================================================================
--- sys/arm/include/md_var.h
+++ sys/arm/include/md_var.h
@@ -52,9 +52,10 @@
extern enum cpu_class cpu_class;
struct dumperinfo;
+struct minidumpstate;
extern int busdma_swi_pending;
void busdma_swi(void);
-int minidumpsys(struct dumperinfo *);
+int cpu_minidumpsys(struct dumperinfo *, const struct minidumpstate *);
extern uint32_t initial_fpscr;
Index: sys/arm64/arm64/minidump_machdep.c
===================================================================
--- sys/arm64/arm64/minidump_machdep.c
+++ sys/arm64/arm64/minidump_machdep.c
@@ -147,7 +147,7 @@
}
int
-minidumpsys(struct dumperinfo *di)
+cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state)
{
struct minidumphdr mdhdr;
pd_entry_t *l0, *l1, *l2;
Index: sys/arm64/include/md_var.h
===================================================================
--- sys/arm64/include/md_var.h
+++ sys/arm64/include/md_var.h
@@ -44,10 +44,11 @@
#endif
struct dumperinfo;
+struct minidumpstate;
extern int busdma_swi_pending;
void busdma_swi(void);
-int minidumpsys(struct dumperinfo *);
+int cpu_minidumpsys(struct dumperinfo *, const struct minidumpstate *);
void generic_bs_fault(void) __asm(__STRING(generic_bs_fault));
void generic_bs_peek_1(void) __asm(__STRING(generic_bs_peek_1));
void generic_bs_peek_2(void) __asm(__STRING(generic_bs_peek_2));
Index: sys/i386/i386/minidump_machdep.c
===================================================================
--- sys/i386/i386/minidump_machdep.c
+++ sys/i386/i386/minidump_machdep.c
@@ -50,8 +50,9 @@
CTASSERT(sizeof(struct kerneldumpheader) == 512);
int
-minidumpsys(struct dumperinfo *di)
+cpu_minidumpsys(struct dumperinfo *di, struct minidumpstate *state)
{
- return (pae_mode ? minidumpsys_pae(di) : minidumpsys_nopae(di));
+ return (pae_mode ? cpu_minidumpsys_pae(di, state) :
+ cpu_minidumpsys_nopae(di, state));
}
Index: sys/i386/i386/minidump_machdep_base.c
===================================================================
--- sys/i386/i386/minidump_machdep_base.c
+++ sys/i386/i386/minidump_machdep_base.c
@@ -145,15 +145,15 @@
static pt_entry_t fakept[NPTEPG];
#ifdef PMAP_PAE_COMP
-#define minidumpsys minidumpsys_pae
-#define IdlePTD IdlePTD_pae
+#define cpu_minidumpsys cpu_minidumpsys_pae
+#define IdlePTD IdlePTD_pae
#else
-#define minidumpsys minidumpsys_nopae
-#define IdlePTD IdlePTD_nopae
+#define cpu_minidumpsys cpu_minidumpsys_nopae
+#define IdlePTD IdlePTD_nopae
#endif
int
-minidumpsys(struct dumperinfo *di)
+cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state)
{
uint64_t dumpsize;
uint32_t ptesize;
Index: sys/i386/include/md_var.h
===================================================================
--- sys/i386/include/md_var.h
+++ sys/i386/include/md_var.h
@@ -68,8 +68,8 @@
void fill_based_sd(struct segment_descriptor *sdp, uint32_t base);
void i686_pagezero(void *addr);
void sse2_pagezero(void *addr);
-int minidumpsys_nopae(struct dumperinfo *);
-int minidumpsys_pae(struct dumperinfo *);
+int cpu_minidumpsys_nopae(struct dumperinfo *, const struct minidumpstate *);
+int cpu_minidumpsys_pae(struct dumperinfo *, const struct minidumpstate *);
void init_AMD_Elan_sc520(void);
vm_paddr_t kvtop(void *addr);
void panicifcpuunsupported(void);
Index: sys/kern/kern_dump.c
===================================================================
--- sys/kern/kern_dump.c
+++ sys/kern/kern_dump.c
@@ -32,15 +32,18 @@
#include <sys/conf.h>
#include <sys/cons.h>
#include <sys/kernel.h>
-#include <sys/proc.h>
#include <sys/kerneldump.h>
+#include <sys/msgbuf.h>
+#include <sys/proc.h>
#include <sys/watchdog.h>
+
#include <vm/vm.h>
#include <vm/vm_param.h>
#include <vm/vm_page.h>
#include <vm/vm_phys.h>
#include <vm/vm_dumpset.h>
#include <vm/pmap.h>
+
#include <machine/dump.h>
#include <machine/elf.h>
#include <machine/md_var.h>
@@ -386,6 +389,8 @@
return (error);
}
+#if MINIDUMP_PAGE_TRACKING == 1
+
/* Minidump progress bar */
static struct {
const int min_per;
@@ -454,3 +459,18 @@
break;
}
}
+
+int
+minidumpsys(struct dumperinfo *di)
+{
+ struct minidumpstate state;
+ int error;
+
+ state.msgbufp = msgbufp;
+ state.dump_bitset = vm_page_dump;
+
+ error = cpu_minidumpsys(di, &state);
+
+ return (error);
+}
+#endif /* MINIDUMP_PAGE_TRACKING == 1 */
Index: sys/mips/include/md_var.h
===================================================================
--- sys/mips/include/md_var.h
+++ sys/mips/include/md_var.h
@@ -82,6 +82,7 @@
void busdma_swi(void);
struct dumperinfo;
-int minidumpsys(struct dumperinfo *);
+struct minidumpstate;
+int cpu_minidumpsys(struct dumperinfo *, const struct minidumpstate *);
#endif /* !_MACHINE_MD_VAR_H_ */
Index: sys/mips/mips/minidump_machdep.c
===================================================================
--- sys/mips/mips/minidump_machdep.c
+++ sys/mips/mips/minidump_machdep.c
@@ -106,7 +106,7 @@
}
int
-minidumpsys(struct dumperinfo *di)
+cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state)
{
struct minidumphdr mdhdr;
uint64_t *dump_avail_buf;
Index: sys/powerpc/include/md_var.h
===================================================================
--- sys/powerpc/include/md_var.h
+++ sys/powerpc/include/md_var.h
@@ -43,7 +43,8 @@
extern int szsigcode64, szsigcode64_elfv2;
struct dumperinfo;
-int minidumpsys(struct dumperinfo *);
+struct minidumpstate;
+int cpu_minidumpsys(struct dumperinfo *, const struct minidumpstate *);
#endif
extern long Maxmem;
Index: sys/powerpc/powerpc/minidump_machdep.c
===================================================================
--- sys/powerpc/powerpc/minidump_machdep.c
+++ sys/powerpc/powerpc/minidump_machdep.c
@@ -189,7 +189,7 @@
}
int
-minidumpsys(struct dumperinfo *di)
+cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state)
{
vm_paddr_t pa;
int error, retry_count;
Index: sys/riscv/include/md_var.h
===================================================================
--- sys/riscv/include/md_var.h
+++ sys/riscv/include/md_var.h
@@ -42,8 +42,9 @@
extern register_t mimpid;
struct dumperinfo;
+struct minidumpstate;
void busdma_swi(void);
-int minidumpsys(struct dumperinfo *);
+int cpu_minidumpsys(struct dumperinfo *, const struct minidumpstate *);
#endif /* !_MACHINE_MD_VAR_H_ */
Index: sys/riscv/riscv/minidump_machdep.c
===================================================================
--- sys/riscv/riscv/minidump_machdep.c
+++ sys/riscv/riscv/minidump_machdep.c
@@ -153,7 +153,7 @@
}
int
-minidumpsys(struct dumperinfo *di)
+cpu_minidumpsys(struct dumperinfo *di, const struct minidumpstate *state)
{
pd_entry_t *l1, *l2;
pt_entry_t *l3;
Index: sys/sys/kerneldump.h
===================================================================
--- sys/sys/kerneldump.h
+++ sys/sys/kerneldump.h
@@ -135,6 +135,12 @@
vm_paddr_t pa_size;
};
+struct minidumpstate {
+ struct msgbuf *msgbufp;
+ struct bitset *dump_bitset;
+};
+
+int minidumpsys(struct dumperinfo *);
int dumpsys_generic(struct dumperinfo *);
void dumpsys_map_chunk(vm_paddr_t, size_t, void **);
Index: sys/x86/include/x86_var.h
===================================================================
--- sys/x86/include/x86_var.h
+++ sys/x86/include/x86_var.h
@@ -104,6 +104,7 @@
struct dbreg;
struct dumperinfo;
struct trapframe;
+struct minidumpstate;
/*
* The interface type of the interrupt handler entry point cannot be
@@ -151,7 +152,7 @@
void printcpuinfo(void);
int pti_get_default(void);
int user_dbreg_trap(register_t dr6);
-int minidumpsys(struct dumperinfo *);
+int cpu_minidumpsys(struct dumperinfo *, const struct minidumpstate *);
struct pcb *get_pcb_td(struct thread *td);
void x86_set_fork_retval(struct thread *td);
uint64_t rdtsc_ordered(void);

File Metadata

Mime Type
text/plain
Expires
Sat, Jan 18, 12:29 PM (8 h, 38 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
15857720
Default Alt Text
D31989.id95475.diff (8 KB)

Event Timeline