Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Initialize kern_end in amd64 instead of x86.
details: https://anonhg.NetBSD.org/src/rev/0cf97e625f5a
branches: trunk
changeset: 348912:0cf97e625f5a
user: maxv <maxv%NetBSD.org@localhost>
date: Tue Nov 15 15:00:55 2016 +0000
description:
Initialize kern_end in amd64 instead of x86.
diffstat:
sys/arch/amd64/amd64/machdep.c | 12 ++++++++----
sys/arch/i386/i386/machdep.c | 6 ++++--
sys/arch/x86/x86/x86_machdep.c | 8 ++------
3 files changed, 14 insertions(+), 12 deletions(-)
diffs (104 lines):
diff -r 81de1b44c8ef -r 0cf97e625f5a sys/arch/amd64/amd64/machdep.c
--- a/sys/arch/amd64/amd64/machdep.c Tue Nov 15 12:59:33 2016 +0000
+++ b/sys/arch/amd64/amd64/machdep.c Tue Nov 15 15:00:55 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.230 2016/08/27 16:17:16 maxv Exp $ */
+/* $NetBSD: machdep.c,v 1.231 2016/11/15 15:00:56 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.230 2016/08/27 16:17:16 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.231 2016/11/15 15:00:56 maxv Exp $");
/* #define XENDEBUG_LOW */
@@ -1540,7 +1540,9 @@
int x;
#ifndef XEN
int ist;
-#endif /* !XEN */
+#endif
+
+ KASSERT(first_avail % PAGE_SIZE == 0);
#ifdef XEN
KASSERT(HYPERVISOR_shared_info != NULL);
@@ -1609,11 +1611,13 @@
*/
pmap_bootstrap(VM_MIN_KERNEL_ADDRESS);
+ /* End of the virtual space we have created so far. */
+ kern_end = KERNBASE + first_avail;
+
#ifndef XEN
/* Internalize the physical pages into the VM system. */
init_x86_vm(first_avail);
#else /* XEN */
- kern_end = KERNBASE + first_avail;
physmem = xen_start_info.nr_pages;
uvm_page_physload(atop(avail_start),
diff -r 81de1b44c8ef -r 0cf97e625f5a sys/arch/i386/i386/machdep.c
--- a/sys/arch/i386/i386/machdep.c Tue Nov 15 12:59:33 2016 +0000
+++ b/sys/arch/i386/i386/machdep.c Tue Nov 15 15:00:55 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: machdep.c,v 1.763 2016/11/11 11:34:51 maxv Exp $ */
+/* $NetBSD: machdep.c,v 1.764 2016/11/15 15:00:55 maxv Exp $ */
/*-
* Copyright (c) 1996, 1997, 1998, 2000, 2004, 2006, 2008, 2009
@@ -67,7 +67,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.763 2016/11/11 11:34:51 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.764 2016/11/15 15:00:55 maxv Exp $");
#include "opt_beep.h"
#include "opt_compat_ibcs2.h"
@@ -1141,6 +1141,8 @@
extern u_char biostramp_image[];
#endif
+ KASSERT(first_avail % PAGE_SIZE == 0);
+
#ifdef XEN
XENPRINTK(("HYPERVISOR_shared_info %p (%x)\n", HYPERVISOR_shared_info,
xen_start_info.shared_info));
diff -r 81de1b44c8ef -r 0cf97e625f5a sys/arch/x86/x86/x86_machdep.c
--- a/sys/arch/x86/x86/x86_machdep.c Tue Nov 15 12:59:33 2016 +0000
+++ b/sys/arch/x86/x86/x86_machdep.c Tue Nov 15 15:00:55 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: x86_machdep.c,v 1.75 2016/08/01 16:07:39 maxv Exp $ */
+/* $NetBSD: x86_machdep.c,v 1.76 2016/11/15 15:00:56 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.75 2016/08/01 16:07:39 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: x86_machdep.c,v 1.76 2016/11/15 15:00:56 maxv Exp $");
#include "opt_modular.h"
#include "opt_physmem.h"
@@ -849,14 +849,10 @@
x86_freelists[i].freelist = VM_FREELIST_DEFAULT;
}
- /* Make sure the end of the space used by the kernel is rounded. */
- pa_kend = round_page(pa_kend);
-
#ifdef amd64
extern vaddr_t kern_end;
extern vaddr_t module_start, module_end;
- kern_end = KERNBASE + pa_kend;
module_start = kern_end;
module_end = KERNBASE + NKL2_KIMG_ENTRIES * NBPD_L2;
#endif
Home |
Main Index |
Thread Index |
Old Index