summaryrefslogtreecommitdiff
path: root/src/cpu/ppc/ppc7xx/cache.S
diff options
context:
space:
mode:
authorGreg Watson <jarrah@users.sourceforge.net>2004-03-07 22:24:05 +0000
committerGreg Watson <jarrah@users.sourceforge.net>2004-03-07 22:24:05 +0000
commita3d26484cc98bc24a7d375a45637671dc6b67585 (patch)
tree4387c6a538d0dd4198013e4758a200b503dfc5b2 /src/cpu/ppc/ppc7xx/cache.S
parentefa1f324afd56dae5c6917dd1715a3efaf3886e3 (diff)
*** empty log message ***
git-svn-id: svn://svn.coreboot.org/coreboot/trunk@1384 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
Diffstat (limited to 'src/cpu/ppc/ppc7xx/cache.S')
-rw-r--r--src/cpu/ppc/ppc7xx/cache.S23
1 files changed, 23 insertions, 0 deletions
diff --git a/src/cpu/ppc/ppc7xx/cache.S b/src/cpu/ppc/ppc7xx/cache.S
new file mode 100644
index 0000000000..237b178bdf
--- /dev/null
+++ b/src/cpu/ppc/ppc7xx/cache.S
@@ -0,0 +1,23 @@
+#define ASM
+#include "ppcreg.h"
+#include <ppc_asm.tmpl>
+
+#define NUM_CACHE_LINES 128*8
+#define L1_CACHE_LINE_SIZE 32
+#define cache_flush_buffer 0x1000
+
+/*
+ * Flush data cache
+ * Do this by just reading lots of stuff into the cache.
+ */
+.globl flush_dcache
+flush_dcache:
+ lis r3,cache_flush_buffer@h
+ ori r3,r3,cache_flush_buffer@l
+ li r4,NUM_CACHE_LINES
+ mtctr r4
+0: lwz r4,0(r3)
+ addi r3,r3,L1_CACHE_LINE_SIZE
+ bdnz 0b
+ blr
+