Module Name:    src
Committed By:   mrg
Date:           Thu Dec 22 07:56:38 UTC 2016

Modified Files:
        src/sys/arch/mips/mips: mips_machdep.c

Log Message:
fix lp64 kvm access for many kernel addresses.
in mm_md_kernacc() allow an address if it matches MIPS_KSEG0_P().

now a static n64 kvm-using binary runs sanely on an n64 kernel.
(dynamic n64 has problems with non-trivial programs.)

ok matt@.


To generate a diff of this commit:
cvs rdiff -u -r1.274 -r1.275 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.274 src/sys/arch/mips/mips/mips_machdep.c:1.275
--- src/sys/arch/mips/mips/mips_machdep.c:1.274	Sat Jul 30 05:55:34 2016
+++ src/sys/arch/mips/mips/mips_machdep.c	Thu Dec 22 07:56:38 2016
@@ -1,4 +1,4 @@
-/*	$NetBSD: mips_machdep.c,v 1.274 2016/07/30 05:55:34 matt Exp $	*/
+/*	$NetBSD: mips_machdep.c,v 1.275 2016/12/22 07:56:38 mrg Exp $	*/
 
 /*
  * Copyright 2002 Wasabi Systems, Inc.
@@ -111,7 +111,7 @@
  */
 
 #include <sys/cdefs.h>			/* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.274 2016/07/30 05:55:34 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mips_machdep.c,v 1.275 2016/12/22 07:56:38 mrg Exp $");
 
 #define __INTR_PRIVATE
 #include "opt_cputype.h"
@@ -2427,7 +2427,8 @@ mm_md_kernacc(void *ptr, vm_prot_t prot,
 	    mips_round_page(MSGBUFSIZE))) {
 		return EFAULT;
 	}
-	if (MIPS_XKSEG_P(v) && v < MIPS_KSEG0_START) {
+	if (MIPS_KSEG0_P(v) ||
+	    (MIPS_XKSEG_P(v) && v < MIPS_KSEG0_START)) {
 		*handled = true;
 		return 0;
 	}

Reply via email to