dump - Unbreak VKERNELs
authorAlex Hornung <ahornung@gmail.com>
Mon, 7 Dec 2009 10:48:29 +0000 (10:48 +0000)
committerAlex Hornung <ahornung@gmail.com>
Mon, 7 Dec 2009 10:48:29 +0000 (10:48 +0000)
* VKERNELs don't support dumping, so add a dummy dumpsys() to indicate this
  on VKERNELs.

* hence also don't allocate vm_page_dump.

Reported-by: Simon "corecode" Schubert
sys/kern/kern_shutdown.c
sys/vm/vm_page.c

index b4d4f94..1ab1e48 100644 (file)
@@ -812,3 +812,12 @@ set_dumper(struct dumperinfo *di)
        dumper = *di;
        return 0;
 }
+
+#if defined (_KERNEL_VIRTUAL)
+/* VKERNELs don't support dumps */
+void
+dumpsys(struct dumperinfo *di __unused)
+{
+       kprintf("VKERNEL doesn't support dumps\n");
+}
+#endif
index f54b105..1543c11 100644 (file)
@@ -242,6 +242,8 @@ vm_page_startup(vm_offset_t vaddr)
 
        vm_page_queue_init();
 
+       /* VKERNELs don't support minidumps and as such don't need vm_page_dump */
+#if !defined(_KERNEL_VIRTUAL)
        /*
         * Allocate a bitmap to indicate that a random physical page
         * needs to be included in a minidump.
@@ -259,6 +261,7 @@ vm_page_startup(vm_offset_t vaddr)
        vm_page_dump = (void *)pmap_map(&vaddr, end, end + vm_page_dump_size,
            VM_PROT_READ | VM_PROT_WRITE);
        bzero((void *)vm_page_dump, vm_page_dump_size);
+#endif
 
        /*
         * Compute the number of pages of memory that will be available for