Module Name: src Committed By: thorpej Date: Wed Jan 3 12:43:43 UTC 2024
Modified Files: src/sys/arch/mac68k/mac68k: machdep.c Log Message: get_physical(): Use bit defs from <m68k/mmu_40.h> To generate a diff of this commit: cvs rdiff -u -r1.365 -r1.366 src/sys/arch/mac68k/mac68k/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/mac68k/mac68k/machdep.c diff -u src/sys/arch/mac68k/mac68k/machdep.c:1.365 src/sys/arch/mac68k/mac68k/machdep.c:1.366 --- src/sys/arch/mac68k/mac68k/machdep.c:1.365 Sat Sep 23 13:45:50 2023 +++ src/sys/arch/mac68k/mac68k/machdep.c Wed Jan 3 12:43:42 2024 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.365 2023/09/23 13:45:50 andvar Exp $ */ +/* $NetBSD: machdep.c,v 1.366 2024/01/03 12:43:42 thorpej Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -74,7 +74,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.365 2023/09/23 13:45:50 andvar Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.366 2024/01/03 12:43:42 thorpej Exp $"); #include "opt_adb.h" #include "opt_compat_netbsd.h" @@ -122,6 +122,7 @@ __KERNEL_RCSID(0, "$NetBSD: machdep.c,v #include <sys/cpu.h> #include <m68k/cacheops.h> +#include <m68k/mmu_40.h> #include <machine/db_machdep.h> #include <ddb/db_sym.h> @@ -2257,15 +2258,15 @@ get_physical(u_int addr, u_long * phys) if (mmutype == MMU_68040) { ph = ptest040((void *)addr, FC_SUPERD); - if ((ph & MMU40_RES) == 0) { + if ((ph & MMUSR40_R) == 0) { ph = ptest040((void *)addr, FC_USERD); - if ((ph & MMU40_RES) == 0) + if ((ph & MMUSR40_R) == 0) return 0; } - if ((ph & MMU40_TTR) != 0) + if ((ph & MMUSR40_T) != 0) ph = addr; - mask = (macos_tc & 0x4000) ? 0x00001fff : 0x00000fff; + mask = (macos_tc & TCR40_P) ? 0x00001fff : 0x00000fff; ph &= (~mask); } else { switch (get_pte(addr, pte, &psr)) {