summaryrefslogtreecommitdiffstats
path: root/sys/powerpc/booke
diff options
context:
space:
mode:
authorraj <raj@FreeBSD.org>2008-12-17 15:54:25 +0000
committerraj <raj@FreeBSD.org>2008-12-17 15:54:25 +0000
commitf811858422699f22662c182254dbe7d6c7b6cb87 (patch)
tree6c8b60e1427513daa91ac27cc6cfa2c6513965d4 /sys/powerpc/booke
parent898a13418a66f9ea17ef90a95d7e020e859555b0 (diff)
downloadFreeBSD-src-f811858422699f22662c182254dbe7d6c7b6cb87.zip
FreeBSD-src-f811858422699f22662c182254dbe7d6c7b6cb87.tar.gz
Fix E500 cache invalidation routines.
When invalidating the i/d-cache we need to wait until the core complex is really finished with the operation. Obtained from: Semihalf
Diffstat (limited to 'sys/powerpc/booke')
-rw-r--r--sys/powerpc/booke/locore.S6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/powerpc/booke/locore.S b/sys/powerpc/booke/locore.S
index 32f129b..1f4ae66 100644
--- a/sys/powerpc/booke/locore.S
+++ b/sys/powerpc/booke/locore.S
@@ -411,6 +411,9 @@ ENTRY(dcache_inval)
isync
mtspr SPR_L1CSR0, %r3
isync
+1: mfspr %r3, SPR_L1CSR0
+ andi. %r3, %r3, L1CSR0_DCFI
+ bne 1b
blr
ENTRY(dcache_disable)
@@ -443,6 +446,9 @@ ENTRY(icache_inval)
isync
mtspr SPR_L1CSR1, %r3
isync
+1: mfspr %r3, SPR_L1CSR1
+ andi. %r3, %r3, L1CSR1_ICFI
+ bne 1b
blr
ENTRY(icache_disable)
OpenPOWER on IntegriCloud