From: miod Date: Sun, 29 Dec 2013 21:06:37 +0000 (+0000) Subject: In tlbdsmiss, do not trash the tlb pointer by mistake. From NetBSD (PR #39257) X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=bff43a8d13b9bfd90ba0e6c77a8fe0eb28a7a23c;p=openbsd In tlbdsmiss, do not trash the tlb pointer by mistake. From NetBSD (PR #39257) --- diff --git a/sys/arch/macppc/macppc/locore.S b/sys/arch/macppc/macppc/locore.S index 1004b5629d4..b315f42a0c0 100644 --- a/sys/arch/macppc/macppc/locore.S +++ b/sys/arch/macppc/macppc/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.41 2008/07/28 19:08:46 miod Exp $ */ +/* $OpenBSD: locore.S,v 1.42 2013/12/29 21:06:37 miod Exp $ */ /* $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $ */ /* @@ -676,7 +676,7 @@ _C_LABEL(tlbdsmiss): mfsrin %r1,%r3 /* get the segment register */ mfsrr1 %r3 rlwinm %r3,%r3,18,31,31 /* get PR-bit */ - rlwnm. %r2,%r2,3,1,1 /* get the key */ + rlwnm. %r1,%r1,%r3,1,1 /* get the key */ bne- 9b /* protection violation */ 8: /* found, set reference/change bits */ lwz %r1,4(%r2) /* reload tlb entry */ diff --git a/sys/arch/socppc/socppc/locore.S b/sys/arch/socppc/socppc/locore.S index 90957824621..d73fd2f5eda 100644 --- a/sys/arch/socppc/socppc/locore.S +++ b/sys/arch/socppc/socppc/locore.S @@ -1,4 +1,4 @@ -/* $OpenBSD: locore.S,v 1.8 2009/08/25 21:01:35 kettenis Exp $ */ +/* $OpenBSD: locore.S,v 1.9 2013/12/29 21:06:37 miod Exp $ */ /* $NetBSD: locore.S,v 1.2 1996/10/16 19:33:09 ws Exp $ */ /* @@ -695,7 +695,7 @@ _C_LABEL(tlbdsmiss): mfsrin %r1,%r3 /* get the segment register */ mfsrr1 %r3 rlwinm %r3,%r3,18,31,31 /* get PR-bit */ - rlwnm. %r2,%r2,3,1,1 /* get the key */ + rlwnm. %r1,%r1,%r3,1,1 /* get the key */ bne- 9b /* protection violation */ 8: /* found, set reference/change bits */ lwz %r1,4(%r2) /* reload tlb entry */