Module Name:    src
Committed By:   maxv
Date:           Wed Jul 20 13:49:18 UTC 2016

Modified Files:
        src/sys/arch/amd64/amd64: machdep.c

Log Message:
This comment is wrong. In fact, we are in low physical memory, but in high
virtual memory, and only the latter matters. I'm not exactly sure why, but
it appears that the kernel modules must be placed above the kernel image.
Just make this comment more ambiguous, in case the next passer-by gets
inspired.


To generate a diff of this commit:
cvs rdiff -u -r1.224 -r1.225 src/sys/arch/amd64/amd64/machdep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/amd64/amd64/machdep.c
diff -u src/sys/arch/amd64/amd64/machdep.c:1.224 src/sys/arch/amd64/amd64/machdep.c:1.225
--- src/sys/arch/amd64/amd64/machdep.c:1.224	Sat Jul 16 17:02:34 2016
+++ src/sys/arch/amd64/amd64/machdep.c	Wed Jul 20 13:49:17 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: machdep.c,v 1.224 2016/07/16 17:02:34 maxv Exp $	*/
+/*	$NetBSD: machdep.c,v 1.225 2016/07/20 13:49:17 maxv Exp $	*/
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2000, 2006, 2007, 2008, 2011
@@ -111,7 +111,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.224 2016/07/16 17:02:34 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.225 2016/07/20 13:49:17 maxv Exp $");
 
 /* #define XENDEBUG_LOW  */
 
@@ -377,9 +377,8 @@ cpu_startup(void)
 	 * created in locore.S, which is not big enough if we want to load many
 	 * modules dynamically. We really should be using kernel_map instead.
 	 *
-	 * But because of the R_X86_64_32 relocations that are usually present
-	 * in dynamic modules, the module map must be in low memory, and this
-	 * wouldn't been guaranteed if we were using kernel_map.
+	 * But the modules must be located above the kernel image, and that
+	 * wouldn't be guaranteed if we were using kernel_map.
 	 */
 	uvm_map_setup(&module_map_store, module_start, module_end, 0);
 	module_map_store.pmap = pmap_kernel();

Reply via email to