Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/amd64/amd64 This comment is wrong. In fact, we are ...



details:   https://anonhg.NetBSD.org/src/rev/d29a1138f43d
branches:  trunk
changeset: 816726:d29a1138f43d
user:      maxv <maxv%NetBSD.org@localhost>
date:      Wed Jul 20 13:49:17 2016 +0000

description:
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.

diffstat:

 sys/arch/amd64/amd64/machdep.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (30 lines):

diff -r 8db055260cef -r d29a1138f43d sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c    Wed Jul 20 13:36:19 2016 +0000
+++ b/sys/arch/amd64/amd64/machdep.c    Wed Jul 20 13:49:17 2016 +0000
@@ -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 @@
         * 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();



Home | Main Index | Thread Index | Old Index