All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] powerpc: UPDATED Don't write reserved values to MAS1[TSIZE]
@ 2007-02-12 23:43 Becky Bruce
  2007-02-13 18:37 ` Kumar Gala
  0 siblings, 1 reply; 2+ messages in thread
From: Becky Bruce @ 2007-02-12 23:43 UTC (permalink / raw)
  To: galak; +Cc: linuxppc-dev

Some of the current tlbwe instructions early on in head_fsl_booke.S take
advantage of unarchitected behavior that allows the writing of reserved
values to the TSIZE field.  This patch corrects that, as well as an error
where an unitialized (by linux) value was written into a MAS register and
used for a tlbwe.

Correct this for both arch/ppc and arch/powerpc.

Signed-off-by: Becky Bruce <becky.bruce@freescale.com>

---
commit 2a5f6e78c834e1824a9d6ef3d561920cbda61a5e
tree c26c26d5eee61c1201fbf9e40a1087835d9bbef9
parent 5986a2ec35836a878350c54af4bd91b1de6abc59
author Becky Bruce <becky.bruce@freescale.com> Mon, 12 Feb 2007 17:41:09 -0600
committer Becky Bruce <becky.bruce@freescale.com> Mon, 12 Feb 2007 17:41:09 -0600

 arch/powerpc/kernel/head_fsl_booke.S |    5 ++++-
 arch/ppc/kernel/head_fsl_booke.S     |    5 ++++-
 2 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/arch/powerpc/kernel/head_fsl_booke.S b/arch/powerpc/kernel/head_fsl_booke.S
index 66877bd..54f40d9 100644
--- a/arch/powerpc/kernel/head_fsl_booke.S
+++ b/arch/powerpc/kernel/head_fsl_booke.S
@@ -206,7 +206,8 @@ skpinv:	addi	r6,r6,1				/* Increment */
 	rlwimi	r7,r3,16,4,15	/* Setup MAS0 = TLBSEL | ESEL(r3) */
 	mtspr	SPRN_MAS0,r7
 	tlbre
-	li	r6,0
+	mfspr	r6,SPRN_MAS1
+	rlwinm	r6,r6,0,2,0	/* clear IPROT */
 	mtspr	SPRN_MAS1,r6
 	tlbwe
 	/* Invalidate TLB1 */
@@ -248,6 +249,8 @@ skpinv:	addi	r6,r6,1				/* Increment */
 	rlwimi	r7,r5,16,4,15	/* Setup MAS0 = TLBSEL | ESEL(r5) */
 	mtspr	SPRN_MAS0,r7
 	tlbre
+	mfspr	r8,SPRN_MAS1
+	rlwinm	r8,r8,0,2,0	/* clear IPROT */
 	mtspr	SPRN_MAS1,r8
 	tlbwe
 	/* Invalidate TLB1 */
diff --git a/arch/ppc/kernel/head_fsl_booke.S b/arch/ppc/kernel/head_fsl_booke.S
index 66877bd..54f40d9 100644
--- a/arch/ppc/kernel/head_fsl_booke.S
+++ b/arch/ppc/kernel/head_fsl_booke.S
@@ -206,7 +206,8 @@ skpinv:	addi	r6,r6,1				/* Increment */
 	rlwimi	r7,r3,16,4,15	/* Setup MAS0 = TLBSEL | ESEL(r3) */
 	mtspr	SPRN_MAS0,r7
 	tlbre
-	li	r6,0
+	mfspr	r6,SPRN_MAS1
+	rlwinm	r6,r6,0,2,0	/* clear IPROT */
 	mtspr	SPRN_MAS1,r6
 	tlbwe
 	/* Invalidate TLB1 */
@@ -248,6 +249,8 @@ skpinv:	addi	r6,r6,1				/* Increment */
 	rlwimi	r7,r5,16,4,15	/* Setup MAS0 = TLBSEL | ESEL(r5) */
 	mtspr	SPRN_MAS0,r7
 	tlbre
+	mfspr	r8,SPRN_MAS1
+	rlwinm	r8,r8,0,2,0	/* clear IPROT */
 	mtspr	SPRN_MAS1,r8
 	tlbwe
 	/* Invalidate TLB1 */

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] powerpc: UPDATED Don't write reserved values to MAS1[TSIZE]
  2007-02-12 23:43 [PATCH] powerpc: UPDATED Don't write reserved values to MAS1[TSIZE] Becky Bruce
@ 2007-02-13 18:37 ` Kumar Gala
  0 siblings, 0 replies; 2+ messages in thread
From: Kumar Gala @ 2007-02-13 18:37 UTC (permalink / raw)
  To: Becky Bruce; +Cc: linuxppc-dev

On Mon, 12 Feb 2007, Becky Bruce wrote:

> Some of the current tlbwe instructions early on in head_fsl_booke.S take
> advantage of unarchitected behavior that allows the writing of reserved
> values to the TSIZE field.  This patch corrects that, as well as an error
> where an unitialized (by linux) value was written into a MAS register and
> used for a tlbwe.
>
> Correct this for both arch/ppc and arch/powerpc.
>
> Signed-off-by: Becky Bruce <becky.bruce@freescale.com>

applied.

- k

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-02-13 18:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-02-12 23:43 [PATCH] powerpc: UPDATED Don't write reserved values to MAS1[TSIZE] Becky Bruce
2007-02-13 18:37 ` Kumar Gala

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.