Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Initialize the module map limits in amd64, not x86.
details: https://anonhg.NetBSD.org/src/rev/1f3181e3d6fc
branches: trunk
changeset: 349137:1f3181e3d6fc
user: maxv <maxv%NetBSD.org@localhost>
date: Fri Nov 25 11:57:36 2016 +0000
description:
Initialize the module map limits in amd64, not x86.
For the record: normally we could enable this code on Xen, since the
bootstrap layout is globally the same. But there appears to be an issue
in xen_locore, since any kenter in the area after kern_end triggers a
KASSERT because the va is already busy.
diffstat:
sys/arch/amd64/amd64/machdep.c | 10 ++++++++--
sys/arch/x86/x86/x86_machdep.c | 12 ++----------
2 files changed, 10 insertions(+), 12 deletions(-)
diffs (64 lines):
diff -r a75aa097ad42 -r 1f3181e3d6fc sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c Fri Nov 25 08:51:16 2016 +0000
+++ b/sys/arch/amd64/amd64/machdep.c Fri Nov 25 11:57:36 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.233 2016/11/17 16:26:08 maxv Exp $ */
+/* $NetBSD: machdep.c,v 1.234 2016/11/25 11:57:36 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.233 2016/11/17 16:26:08 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.234 2016/11/25 11:57:36 maxv Exp $");
/* #define XENDEBUG_LOW */
@@ -1610,6 +1610,12 @@
/* End of the virtual space we have created so far. */
kern_end = KERNBASE + first_avail;
+#ifndef XEN
+ /* The area for the module map. */
+ module_start = kern_end;
+ module_end = KERNBASE + NKL2_KIMG_ENTRIES * NBPD_L2;
+#endif
+
/*
* Call pmap initialization to make new kernel address space.
* We must do this before loading pages into the VM system.
diff -r a75aa097ad42 -r 1f3181e3d6fc sys/arch/x86/x86/x86_machdep.c
--- a/sys/arch/x86/x86/x86_machdep.c Fri Nov 25 08:51:16 2016 +0000
+++ b/sys/arch/x86/x86/x86_machdep.c Fri Nov 25 11:57:36 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: x86_machdep.c,v 1.76 2016/11/15 15:00:56 maxv Exp $ */
+/* $NetBSD: x86_machdep.c,v 1.77 2016/11/25 11:57:36 maxv Exp $ */
/*-
* Copyright (c) 2002, 2006, 2007 YAMAMOTO Takashi,
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.76 2016/11/15 15:00:56 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.77 2016/11/25 11:57:36 maxv Exp $");
#include "opt_modular.h"
#include "opt_physmem.h"
@@ -849,14 +849,6 @@
x86_freelists[i].freelist = VM_FREELIST_DEFAULT;
}
-#ifdef amd64
- extern vaddr_t kern_end;
- extern vaddr_t module_start, module_end;
-
- module_start = kern_end;
- module_end = KERNBASE + NKL2_KIMG_ENTRIES * NBPD_L2;
-#endif
-
/*
* Now, load the memory clusters (which have already been rounded and
* truncated) into the VM system.
Home |
Main Index |
Thread Index |
Old Index