Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/x86/x86 The first va should depend on the text offs...
details: https://anonhg.NetBSD.org/src/rev/8ea436d662fb
branches: trunk
changeset: 351106:8ea436d662fb
user: maxv <maxv%NetBSD.org@localhost>
date: Thu Feb 02 17:37:49 2017 +0000
description:
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.
diffstat:
sys/arch/x86/x86/pmap.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 51e448732524 -r 8ea436d662fb sys/arch/x86/x86/pmap.c
--- a/sys/arch/x86/x86/pmap.c Thu Feb 02 15:37:42 2017 +0000
+++ b/sys/arch/x86/x86/pmap.c Thu Feb 02 17:37:49 2017 +0000
@@ -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 @@
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) {
Home |
Main Index |
Thread Index |
Old Index