Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/usermode Revert to working state



details:   https://anonhg.NetBSD.org/src/rev/582d7b30d4a5
branches:  trunk
changeset: 365112:582d7b30d4a5
user:      reinoud <reinoud%NetBSD.org@localhost>
date:      Wed Aug 01 12:09:01 2018 +0000

description:
Revert to working state

diffstat:

 sys/arch/usermode/include/vmparam.h |   4 ++--
 sys/arch/usermode/usermode/pmap.c   |  11 ++++++-----
 2 files changed, 8 insertions(+), 7 deletions(-)

diffs (64 lines):

diff -r c8b3caaedb3a -r 582d7b30d4a5 sys/arch/usermode/include/vmparam.h
--- a/sys/arch/usermode/include/vmparam.h       Wed Aug 01 11:39:53 2018 +0000
+++ b/sys/arch/usermode/include/vmparam.h       Wed Aug 01 12:09:01 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: vmparam.h,v 1.18 2018/08/01 09:46:16 reinoud Exp $ */
+/* $NetBSD: vmparam.h,v 1.19 2018/08/01 12:09:02 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -43,7 +43,7 @@
 #define VM_MAX_ADDRESS         kmem_user_end
 #define VM_MAXUSER_ADDRESS     kmem_user_end
 #define VM_MIN_KERNEL_ADDRESS  kmem_kvm_start
-#define VM_MAX_KERNEL_ADDRESS  kmem_k_end
+#define VM_MAX_KERNEL_ADDRESS  kmem_kvm_end
 
 #define VM_PHYSSEG_STRAT       VM_PSTRAT_BIGFIRST
 #define VM_PHYSSEG_MAX         1
diff -r c8b3caaedb3a -r 582d7b30d4a5 sys/arch/usermode/usermode/pmap.c
--- a/sys/arch/usermode/usermode/pmap.c Wed Aug 01 11:39:53 2018 +0000
+++ b/sys/arch/usermode/usermode/pmap.c Wed Aug 01 12:09:01 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pmap.c,v 1.109 2018/08/01 09:44:31 reinoud Exp $ */
+/* $NetBSD: pmap.c,v 1.110 2018/08/01 12:09:01 reinoud Exp $ */
 
 /*-
  * Copyright (c) 2011 Reinoud Zandijk <reinoud%NetBSD.org@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.109 2018/08/01 09:44:31 reinoud Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pmap.c,v 1.110 2018/08/01 12:09:01 reinoud Exp $");
 
 #include "opt_memsize.h"
 #include "opt_kmempages.h"
@@ -285,7 +285,7 @@
                (uint64_t) pv_table_size/1024, (uintptr_t) phys_npages);
 
        /* calculate number of pmap entries needed for a complete map */
-       pm_nentries = (kmem_k_end - VM_MIN_ADDRESS) / PAGE_SIZE;
+       pm_nentries = (kmem_k_start - VM_MIN_ADDRESS) / PAGE_SIZE;
        pm_entries_size = round_page(pm_nentries * sizeof(struct pv_entry *));
        thunk_printf_debug("tlb va->pa lookup table is %"PRIu64" KB for "
                "%d logical pages\n", pm_entries_size/1024, pm_nentries);
@@ -660,7 +660,8 @@
 
        /* not known! then it must be UVM's work */
        if (pv == NULL) {
-               thunk_printf_debug("%s: no mapping yet\n", __func__);
+               //thunk_printf("%s: no mapping yet for %p\n",
+               //      __func__, (void *) va);
                *atype = VM_PROT_READ;          /* assume it was a read */
                return false;
        }
@@ -1090,7 +1091,7 @@
        thunk_printf_debug("pmap_extract: extracting va %p\n", (void *) va);
 #ifdef DIAGNOSTIC
        if ((va < VM_MIN_ADDRESS) || (va > VM_MAX_KERNEL_ADDRESS)) {
-               thunk_printf_debug("pmap_extract: invalid va issued\n");
+               thunk_printf_debug("pmap_extract: invalid va isued\n");
                thunk_printf("%p not in [%p, %p]\n", (void *) va,
                    (void *) VM_MIN_ADDRESS, (void *) VM_MAX_KERNEL_ADDRESS);
                return false;



Home | Main Index | Thread Index | Old Index