Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/mips/mips There are non-writable bits in MIPS_COP_0...



details:   https://anonhg.NetBSD.org/src/rev/a071d2b43630
branches:  trunk
changeset: 768794:a071d2b43630
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sat Aug 27 16:54:14 2011 +0000

description:
There are non-writable bits in MIPS_COP_0_TLB_HI between ASID and VPN, so
mips3_cp0_tlb_entry_hi_probe() returns a value with some 0 in the low 12 bits.
Thus the computed mips_vm_maxuser_address is wrong. Fix by oring PAGE_MASK to
return value of mips3_cp0_tlb_entry_hi_probe().

diffstat:

 sys/arch/mips/mips/mips_machdep.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r d6a9a5d5e7e6 -r a071d2b43630 sys/arch/mips/mips/mips_machdep.c
--- a/sys/arch/mips/mips/mips_machdep.c Sat Aug 27 16:43:07 2011 +0000
+++ b/sys/arch/mips/mips/mips_machdep.c Sat Aug 27 16:54:14 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mips_machdep.c,v 1.247 2011/08/24 16:01:53 matt Exp $  */
+/*     $NetBSD: mips_machdep.c,v 1.248 2011/08/27 16:54:14 bouyer Exp $        */
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -112,7 +112,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.247 2011/08/24 16:01:53 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.248 2011/08/27 16:54:14 bouyer Exp $");
 
 #define __INTR_PRIVATE
 #include "opt_cputype.h"
@@ -1358,6 +1358,7 @@
        opts->mips3_tlb_pg_mask = mips3_cp0_tlb_page_mask_probe();
        if (CPUIS64BITS) {
                opts->mips3_tlb_vpn_mask = mips3_cp0_tlb_entry_hi_probe();
+               opts->mips3_tlb_vpn_mask |= PAGE_MASK;
                opts->mips3_tlb_vpn_mask <<= 2;
                opts->mips3_tlb_vpn_mask >>= 2;
                opts->mips3_tlb_pfn_mask = mips3_cp0_tlb_entry_lo_probe();



Home | Main Index | Thread Index | Old Index