mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-04 03:43:19 +09:00
mpc83xx: use r4 instead of r2 in lock_ram_in_cache and unlock_ram_in_cache
This is needed in unlock_ram_in_cache() because it is called from C and will corrupt the small data area anchor that is kept in R2. lock_ram_in_cache() is modified similarly as good coding practice, but is not called from C. Signed-off-by: Nick Spence <nick.spence@freescale.com> Signed-off-by: Kim Phillips <kim.phillips@freescale.com>
This commit is contained in:
parent
d9fe88173c
commit
ade50c7fa1
@ -1060,9 +1060,9 @@ lock_ram_in_cache:
|
|||||||
*/
|
*/
|
||||||
lis r3, (CFG_INIT_RAM_ADDR & ~31)@h
|
lis r3, (CFG_INIT_RAM_ADDR & ~31)@h
|
||||||
ori r3, r3, (CFG_INIT_RAM_ADDR & ~31)@l
|
ori r3, r3, (CFG_INIT_RAM_ADDR & ~31)@l
|
||||||
li r2, ((CFG_INIT_RAM_END & ~31) + \
|
li r4, ((CFG_INIT_RAM_END & ~31) + \
|
||||||
(CFG_INIT_RAM_ADDR & 31) + 31) / 32
|
(CFG_INIT_RAM_ADDR & 31) + 31) / 32
|
||||||
mtctr r2
|
mtctr r4
|
||||||
1:
|
1:
|
||||||
dcbz r0, r3
|
dcbz r0, r3
|
||||||
addi r3, r3, 32
|
addi r3, r3, 32
|
||||||
@ -1082,8 +1082,9 @@ unlock_ram_in_cache:
|
|||||||
/* invalidate the INIT_RAM section */
|
/* invalidate the INIT_RAM section */
|
||||||
lis r3, (CFG_INIT_RAM_ADDR & ~31)@h
|
lis r3, (CFG_INIT_RAM_ADDR & ~31)@h
|
||||||
ori r3, r3, (CFG_INIT_RAM_ADDR & ~31)@l
|
ori r3, r3, (CFG_INIT_RAM_ADDR & ~31)@l
|
||||||
li r2,512
|
li r4, ((CFG_INIT_RAM_END & ~31) + \
|
||||||
mtctr r2
|
(CFG_INIT_RAM_ADDR & 31) + 31) / 32
|
||||||
|
mtctr r4
|
||||||
1: icbi r0, r3
|
1: icbi r0, r3
|
||||||
dcbi r0, r3
|
dcbi r0, r3
|
||||||
addi r3, r3, 32
|
addi r3, r3, 32
|
||||||
|
Loading…
Reference in New Issue
Block a user