Module Name: src Committed By: bouyer Date: Sat Aug 27 16:54:14 UTC 2011
Modified Files: src/sys/arch/mips/mips: mips_machdep.c Log Message: 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(). To generate a diff of this commit: cvs rdiff -u -r1.247 -r1.248 src/sys/arch/mips/mips/mips_machdep.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/mips/mips/mips_machdep.c diff -u src/sys/arch/mips/mips/mips_machdep.c:1.247 src/sys/arch/mips/mips/mips_machdep.c:1.248 --- src/sys/arch/mips/mips/mips_machdep.c:1.247 Wed Aug 24 16:01:53 2011 +++ src/sys/arch/mips/mips/mips_machdep.c Sat Aug 27 16:54:14 2011 @@ -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();