Module Name: src Committed By: maxv Date: Thu Feb 2 17:37:49 UTC 2017
Modified Files: src/sys/arch/x86/x86: pmap.c Log Message: The first va should depend on the text offset, not the kernel base. Use rounddown. Note: this value is still wrong, it should be roundup. But that's another issue that will be fixed in amd64 soon. To generate a diff of this commit: cvs rdiff -u -r1.238 -r1.239 src/sys/arch/x86/x86/pmap.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/x86/x86/pmap.c diff -u src/sys/arch/x86/x86/pmap.c:1.238 src/sys/arch/x86/x86/pmap.c:1.239 --- src/sys/arch/x86/x86/pmap.c:1.238 Thu Feb 2 08:57:04 2017 +++ src/sys/arch/x86/x86/pmap.c Thu Feb 2 17:37:49 2017 @@ -1,4 +1,4 @@ -/* $NetBSD: pmap.c,v 1.238 2017/02/02 08:57:04 maxv Exp $ */ +/* $NetBSD: pmap.c,v 1.239 2017/02/02 17:37:49 maxv Exp $ */ /*- * Copyright (c) 2008, 2010, 2016, 2017 The NetBSD Foundation, Inc. @@ -171,7 +171,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.238 2017/02/02 08:57:04 maxv Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.239 2017/02/02 17:37:49 maxv Exp $"); #include "opt_user_ldt.h" #include "opt_lockdebug.h" @@ -1595,7 +1595,7 @@ pmap_remap_largepages(void) paddr_t pa; /* Remap the kernel text using large pages. */ - kva = KERNBASE; + kva = rounddown((vaddr_t)KERNTEXTOFF, NBPD_L2); kva_end = rounddown((vaddr_t)&__rodata_start, NBPD_L1); pa = kva - KERNBASE; for (/* */; kva + NBPD_L2 <= kva_end; kva += NBPD_L2, pa += NBPD_L2) {