Module Name: src Committed By: skrll Date: Mon Jan 2 16:13:13 UTC 2012
Modified Files: src/sys/arch/hp700/hp700: locore.S machdep.c src/sys/arch/hppa/hppa: trap.S Log Message: >From OpenBSD... Fix encoding of DIAG instructions in the MFCPU_T and MTCPU_T macros. MTCPU_T was encoded as a read instruction, while MFCPU_T was encoded as a read-through-TH instruction, although the only uses of it concern registers read through CH. (You are not supposed to understand this, this is a dark corner of undocumented rotten PA-RISC bowels). Cache SID hashing will now correctly be disabled on PCXS, PCXT and PCXT' processors. Proper encoding from the old PA-RISC mklinux sources; tested on 720 (PCXS) and 715/75 (PCXT); ok kettenis@ To generate a diff of this commit: cvs rdiff -u -r1.56 -r1.57 src/sys/arch/hp700/hp700/locore.S cvs rdiff -u -r1.102 -r1.103 src/sys/arch/hp700/hp700/machdep.c cvs rdiff -u -r1.60 -r1.61 src/sys/arch/hppa/hppa/trap.S 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/hp700/hp700/locore.S diff -u src/sys/arch/hp700/hp700/locore.S:1.56 src/sys/arch/hp700/hp700/locore.S:1.57 --- src/sys/arch/hp700/hp700/locore.S:1.56 Mon Dec 19 10:56:59 2011 +++ src/sys/arch/hp700/hp700/locore.S Mon Jan 2 16:13:12 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: locore.S,v 1.56 2011/12/19 10:56:59 skrll Exp $ */ +/* $NetBSD: locore.S,v 1.57 2012/01/02 16:13:12 skrll Exp $ */ /* $OpenBSD: locore.S,v 1.158 2008/07/28 19:08:46 miod Exp $ */ /* @@ -135,8 +135,8 @@ #define DR_PAGE0 .word 0x14001200 #define DR_PAGE1 .word 0x14001240 -#define MTCPU_T(x,t) .word 0x14001400 | ((t) << 21) | ((x) << 16) -#define MFCPU_T(r,x) .word 0x14001400 | ((r) << 21) | (x) +#define MTCPU_T(x,t) .word 0x14001600 | ((t) << 21) | ((x) << 16) +#define MFCPU_T(r,x) .word 0x14001a00 | ((r) << 21) | ((x) << 16) #define MTCPU_C(x,t) .word 0x14000240 | ((t) << 21) | ((x) << 16) #define MFCPU_C(r,x) .word 0x14000600 | ((r) << 21) | ((x) << 16) #define MFCPU_U(r,x) .word 0x140008a0 | ((r) << 21) | ((x)) Index: src/sys/arch/hp700/hp700/machdep.c diff -u src/sys/arch/hp700/hp700/machdep.c:1.102 src/sys/arch/hp700/hp700/machdep.c:1.103 --- src/sys/arch/hp700/hp700/machdep.c:1.102 Mon Dec 12 19:03:09 2011 +++ src/sys/arch/hp700/hp700/machdep.c Mon Jan 2 16:13:12 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: machdep.c,v 1.102 2011/12/12 19:03:09 mrg Exp $ */ +/* $NetBSD: machdep.c,v 1.103 2012/01/02 16:13:12 skrll Exp $ */ /*- * Copyright (c) 2001, 2002 The NetBSD Foundation, Inc. @@ -58,7 +58,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.102 2011/12/12 19:03:09 mrg Exp $"); +__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.103 2012/01/02 16:13:12 skrll Exp $"); #include "opt_cputype.h" #include "opt_ddb.h" @@ -330,8 +330,8 @@ const struct hppa_cpu_info cpu_types[] = { "PA7000", NULL, "PCXS", hpcxs, 0, 0, "1.1a", - desidhash_s, itlb_x, dtlb_x, itlbna_x, dtlbna_x, tlbd_x, - ibtlb_g, NULL, pbtlb_g }, /* XXXNH check */ + desidhash_s, itlb_s, dtlb_s, itlbna_s, dtlbna_s, tlbd_s, + ibtlb_g, NULL, pbtlb_g }, #endif #ifdef HP7100_CPU { "PA7100", "T-Bird", "PCXT", Index: src/sys/arch/hppa/hppa/trap.S diff -u src/sys/arch/hppa/hppa/trap.S:1.60 src/sys/arch/hppa/hppa/trap.S:1.61 --- src/sys/arch/hppa/hppa/trap.S:1.60 Mon Feb 28 21:22:35 2011 +++ src/sys/arch/hppa/hppa/trap.S Mon Jan 2 16:13:12 2012 @@ -1,4 +1,4 @@ -/* $NetBSD: trap.S,v 1.60 2011/02/28 21:22:35 skrll Exp $ */ +/* $NetBSD: trap.S,v 1.61 2012/01/02 16:13:12 skrll Exp $ */ /*- * Copyright (c) 2002 The NetBSD Foundation, Inc. @@ -1743,7 +1743,7 @@ EXIT(TLABEL(dtlb_u)) .level 1.1 #endif /* HP8000_CPU */ -#if defined(HP7000_CPU) || defined(HP7100_CPU) +#if defined(HP7000_CPU) /* * int desidhash_s(void) * int desidhash_x(void) @@ -1767,7 +1767,7 @@ ALTENTRY(desidhash_x) bv 0(%rp) extru %t1, 4, 5, %ret0 /* return chip revision */ EXIT(desidhash_s) -#endif /* defined(HP7000_CPU) || defined(HP7100_CPU) */ +#endif /* defined(HP7000_CPU) */ #if defined(HP7100_CPU) || defined(HP7200_CPU) /*