Source-Changes-HG archive

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

[src/trunk]: src/sys/arch From OpenBSD...



details:   https://anonhg.NetBSD.org/src/rev/557f0abfa550
branches:  trunk
changeset: 772404:557f0abfa550
user:      skrll <skrll%NetBSD.org@localhost>
date:      Mon Jan 02 16:13:12 2012 +0000

description:
>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@

diffstat:

 sys/arch/hp700/hp700/locore.S  |  6 +++---
 sys/arch/hp700/hp700/machdep.c |  8 ++++----
 sys/arch/hppa/hppa/trap.S      |  6 +++---
 3 files changed, 10 insertions(+), 10 deletions(-)

diffs (76 lines):

diff -r e1efdf16aaaf -r 557f0abfa550 sys/arch/hp700/hp700/locore.S
--- a/sys/arch/hp700/hp700/locore.S     Mon Jan 02 15:55:29 2012 +0000
+++ b/sys/arch/hp700/hp700/locore.S     Mon Jan 02 16:13:12 2012 +0000
@@ -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))
diff -r e1efdf16aaaf -r 557f0abfa550 sys/arch/hp700/hp700/machdep.c
--- a/sys/arch/hp700/hp700/machdep.c    Mon Jan 02 15:55:29 2012 +0000
+++ b/sys/arch/hp700/hp700/machdep.c    Mon Jan 02 16:13:12 2012 +0000
@@ -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 @@
        { "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",
diff -r e1efdf16aaaf -r 557f0abfa550 sys/arch/hppa/hppa/trap.S
--- a/sys/arch/hppa/hppa/trap.S Mon Jan 02 15:55:29 2012 +0000
+++ b/sys/arch/hppa/hppa/trap.S Mon Jan 02 16:13:12 2012 +0000
@@ -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 @@
        .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 @@
        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)
 /*



Home | Main Index | Thread Index | Old Index