Skip to content
Snippets Groups Projects
Commit c1e1cf69 authored by Becky Bruce's avatar Becky Bruce Committed by Jon Loeliger
Browse files

mpc86xx: Use SRR0/1/rfi to enable address translation, not blr


Using a mtmsr/blr means that you have to be executing at the
same virtual address once you enable translation.  This is
unnecessarily restrictive, and is not really how this is
usually done.  Change it to use the more common mtspr SRR0/SRR1
and rfi method.

Signed-off-by: default avatarBecky Bruce <becky.bruce@freescale.com>
parent 6bf98b13
No related branches found
No related tags found
No related merge requests found
...@@ -244,9 +244,15 @@ in_flash: ...@@ -244,9 +244,15 @@ in_flash:
*/ */
/* enable address translation */ /* enable address translation */
bl enable_addr_trans mfmsr r5
sync ori r5, r5, (MSR_IR | MSR_DR)
lis r3,addr_trans_enabled@h
ori r3, r3, addr_trans_enabled@l
mtspr SPRN_SRR0,r3
mtspr SPRN_SRR1,r5
rfi
addr_trans_enabled:
/* enable and invalidate the data cache */ /* enable and invalidate the data cache */
/* bl l1dcache_enable */ /* bl l1dcache_enable */
bl dcache_enable bl dcache_enable
...@@ -423,15 +429,6 @@ tlblp: ...@@ -423,15 +429,6 @@ tlblp:
blt tlblp blt tlblp
blr blr
.globl enable_addr_trans
enable_addr_trans:
/* enable address translation */
mfmsr r5
ori r5, r5, (MSR_IR | MSR_DR)
mtmsr r5
isync
blr
.globl disable_addr_trans .globl disable_addr_trans
disable_addr_trans: disable_addr_trans:
/* disable address translation */ /* disable address translation */
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment