diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2007-05-19 15:49:07 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2007-05-19 15:49:07 +0000 |
commit | 55effb9ba5d36fabab2ee9010d12cba4ce97f7ab (patch) | |
tree | 9f72f6739eed57055aad3e02023fabf3ecd7de93 /sys/arch/cats | |
parent | 912729879adc44cafe45c930dcbb3a9ffb07ea0e (diff) |
Kernel crash dump support for arm-based platform, with minimal support in
libkvm, but all the necessary information for a complete _kvm_kvatop() is
available in the crash dump.
Diffstat (limited to 'sys/arch/cats')
-rw-r--r-- | sys/arch/cats/cats/autoconf.c | 4 | ||||
-rw-r--r-- | sys/arch/cats/cats/cats_machdep.c | 13 |
2 files changed, 13 insertions, 4 deletions
diff --git a/sys/arch/cats/cats/autoconf.c b/sys/arch/cats/cats/autoconf.c index 4637cc0d294..61ca4d39596 100644 --- a/sys/arch/cats/cats/autoconf.c +++ b/sys/arch/cats/cats/autoconf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: autoconf.c,v 1.10 2007/05/04 19:30:54 deraadt Exp $ */ +/* $OpenBSD: autoconf.c,v 1.11 2007/05/19 15:49:05 miod Exp $ */ /* $NetBSD: autoconf.c,v 1.2 2001/09/05 16:17:36 matt Exp $ */ /* @@ -86,9 +86,7 @@ diskconf() printf("boot_file: '%s'\n", boot_file); setroot(bootdv, 0, RB_USERREQ); -#if 0 dumpconf(); -#endif } diff --git a/sys/arch/cats/cats/cats_machdep.c b/sys/arch/cats/cats/cats_machdep.c index 78136bd965a..a1a000279b0 100644 --- a/sys/arch/cats/cats/cats_machdep.c +++ b/sys/arch/cats/cats/cats_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cats_machdep.c,v 1.15 2007/04/10 16:43:34 miod Exp $ */ +/* $OpenBSD: cats_machdep.c,v 1.16 2007/05/19 15:49:06 miod Exp $ */ /* $NetBSD: cats_machdep.c,v 1.50 2003/10/04 14:28:28 chris Exp $ */ /* @@ -67,6 +67,7 @@ #include <machine/cpu.h> #include <machine/frame.h> #include <machine/intr.h> +#include <arm/kcore.h> #include <arm/undefined.h> #include <arm/machdep.h> @@ -353,6 +354,7 @@ u_int initarm(bootargs) void *bootargs; { + extern cpu_kcore_hdr_t cpu_kcore_hdr; struct ebsaboot *bootinfo = bootargs; int loop; int loop1; @@ -586,6 +588,11 @@ initarm(bootargs) textsize = round_page(textsize); totalsize = round_page(totalsize); + /* Update dump information */ + cpu_kcore_hdr.kernelbase = KERNEL_BASE; + cpu_kcore_hdr.kerneloffs = 0; + cpu_kcore_hdr.staticsize = totalsize; + logical = pmap_map_chunk(l1pagetable, KERNEL_BASE, physical_start, textsize, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE); @@ -864,6 +871,10 @@ initarm(bootargs) pmap_bootstrap((pd_entry_t *)kernel_l1pt.pv_va, KERNEL_VM_BASE, KERNEL_VM_BASE + KERNEL_VM_SIZE); + /* Update dump information */ + cpu_kcore_hdr.pmap_kernel_l1 = (u_int32_t)pmap_kernel()->pm_l1; + cpu_kcore_hdr.pmap_kernel_l2 = (u_int32_t)&(pmap_kernel()->pm_l2); + /* Setup the IRQ system */ #ifdef VERBOSE_INIT_ARM printf("irq "); |