Commit 8ce0a7df authored by Becky Bruce's avatar Becky Bruce Committed by Kumar Gala

[POWERPC] 85xx: Don't write reserved values to MAS1[TSIZE]

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 uninitialized (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: default avatarBecky Bruce <becky.bruce@freescale.com>
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent edacf6bb
...@@ -206,7 +206,8 @@ skpinv: addi r6,r6,1 /* Increment */ ...@@ -206,7 +206,8 @@ skpinv: addi r6,r6,1 /* Increment */
rlwimi r7,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */ rlwimi r7,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */
mtspr SPRN_MAS0,r7 mtspr SPRN_MAS0,r7
tlbre tlbre
li r6,0 mfspr r6,SPRN_MAS1
rlwinm r6,r6,0,2,0 /* clear IPROT */
mtspr SPRN_MAS1,r6 mtspr SPRN_MAS1,r6
tlbwe tlbwe
/* Invalidate TLB1 */ /* Invalidate TLB1 */
...@@ -248,6 +249,8 @@ skpinv: addi r6,r6,1 /* Increment */ ...@@ -248,6 +249,8 @@ skpinv: addi r6,r6,1 /* Increment */
rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */ rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */
mtspr SPRN_MAS0,r7 mtspr SPRN_MAS0,r7
tlbre tlbre
mfspr r8,SPRN_MAS1
rlwinm r8,r8,0,2,0 /* clear IPROT */
mtspr SPRN_MAS1,r8 mtspr SPRN_MAS1,r8
tlbwe tlbwe
/* Invalidate TLB1 */ /* Invalidate TLB1 */
......
...@@ -206,7 +206,8 @@ skpinv: addi r6,r6,1 /* Increment */ ...@@ -206,7 +206,8 @@ skpinv: addi r6,r6,1 /* Increment */
rlwimi r7,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */ rlwimi r7,r3,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r3) */
mtspr SPRN_MAS0,r7 mtspr SPRN_MAS0,r7
tlbre tlbre
li r6,0 mfspr r6,SPRN_MAS1
rlwinm r6,r6,0,2,0 /* clear IPROT */
mtspr SPRN_MAS1,r6 mtspr SPRN_MAS1,r6
tlbwe tlbwe
/* Invalidate TLB1 */ /* Invalidate TLB1 */
...@@ -248,6 +249,8 @@ skpinv: addi r6,r6,1 /* Increment */ ...@@ -248,6 +249,8 @@ skpinv: addi r6,r6,1 /* Increment */
rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */ rlwimi r7,r5,16,4,15 /* Setup MAS0 = TLBSEL | ESEL(r5) */
mtspr SPRN_MAS0,r7 mtspr SPRN_MAS0,r7
tlbre tlbre
mfspr r8,SPRN_MAS1
rlwinm r8,r8,0,2,0 /* clear IPROT */
mtspr SPRN_MAS1,r8 mtspr SPRN_MAS1,r8
tlbwe tlbwe
/* Invalidate TLB1 */ /* Invalidate TLB1 */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment