vkernel64: Add a warning when KERNBASE is used.
authorJordan Gordeev <jgordeev@dir.bg>
Fri, 12 Feb 2010 11:59:18 +0000 (13:59 +0200)
committerSascha Wildner <saw@online.de>
Sun, 21 Mar 2010 08:16:45 +0000 (09:16 +0100)
Uses of KERNBASE in the vkernel should be reviewed.

sys/kern/link_elf.c

index 9029368..e2716f1 100644 (file)
 #include <vm/pmap.h>
 #include <vm/vm_map.h>
 
+#if defined(__amd64__) && defined(_KERNEL_VIRTUAL)
+#include <stdio.h>
+#endif
+
 static int     link_elf_preload_file(const char *, linker_file_t *);
 static int     link_elf_preload_finish(linker_file_t);
 static int     link_elf_load_file(const char*, linker_file_t*);
@@ -161,6 +165,9 @@ link_elf_init(void* arg)
        if (linker_kernel_file == NULL)
            panic("link_elf_init: Can't create linker structures for kernel");
        parse_dynamic(linker_kernel_file);
+#if defined(__amd64__) && defined(_KERNEL_VIRTUAL)
+       fprintf(stderr, "WARNING: KERNBASE being used\n");
+#endif
        linker_kernel_file->address = (caddr_t) KERNBASE;
        linker_kernel_file->size = -(intptr_t)linker_kernel_file->address;