summaryrefslogtreecommitdiff
path: root/firmware/target/arm/mmu-arm.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm/mmu-arm.h')
-rw-r--r--firmware/target/arm/mmu-arm.h52
1 files changed, 41 insertions, 11 deletions
diff --git a/firmware/target/arm/mmu-arm.h b/firmware/target/arm/mmu-arm.h
index 1cf1f68d00..92a81c0c34 100644
--- a/firmware/target/arm/mmu-arm.h
+++ b/firmware/target/arm/mmu-arm.h
@@ -35,29 +35,59 @@ void ttb_init(void);
35void enable_mmu(void); 35void enable_mmu(void);
36void map_section(unsigned int pa, unsigned int va, int mb, int flags); 36void map_section(unsigned int pa, unsigned int va, int mb, int flags);
37 37
38/* Cleans entire DCache */ 38/* Note for the function names
39 *
40 * ARM refers to the cache coherency functions as (in the CPU manuals):
41 * clean (write-back)
42 * clean and invalidate (write-back and removing the line from cache)
43 * invalidate (removing from cache without write-back)
44 *
45 * The deprecated functions below don't follow the above (which is why
46 * they're deprecated).
47 *
48 * This names have been proven to cause confusion, therefore we use:
49 * commit
50 * commit and discard
51 * discard
52 */
53
54/* Commits entire DCache */
55void commit_dcache(void);
56/* deprecated alias */
39void clean_dcache(void); 57void clean_dcache(void);
40 58
41/* Invalidate entire DCache */ 59/* Commit and discard entire DCache, will do writeback */
42/* will do writeback */ 60void commit_discard_dcache(void);
61/* deprecated alias */
43void invalidate_dcache(void); 62void invalidate_dcache(void);
44 63
45/* Invalidate DCache for this range */ 64/* Write DCache back to RAM for the given range and remove cache lines
46/* will do writeback */ 65 * from DCache afterwards */
66void commit_discard_dcache_range(const void *base, unsigned int size);
67/* deprecated alias */
47void invalidate_dcache_range(const void *base, unsigned int size); 68void invalidate_dcache_range(const void *base, unsigned int size);
48 69
49/* clean DCache for this range */ 70/* Write DCache back to RAM for the given range */
50/* forces DCache writeback for the specified range */ 71void commit_dcache_range(const void *base, unsigned int size);
72/* deprecated alias */
51void clean_dcache_range(const void *base, unsigned int size); 73void clean_dcache_range(const void *base, unsigned int size);
52 74
53/* Dump DCache for this range */ 75/*
54/* Will *NOT* do write back except for buffer ends not on a line boundary */ 76 * Remove cache lines for the given range from DCache
77 * will *NOT* do write back except for buffer edges not on a line boundary
78 */
79void discard_dcache_range(const void *base, unsigned int size);
80/* deprecated alias */
55void dump_dcache_range(const void *base, unsigned int size); 81void dump_dcache_range(const void *base, unsigned int size);
56 82
57/* Invalidate entire ICache and DCache */ 83/* Discards the entire ICache, and commit+discards the entire DCache */
58/* will do writeback */ 84void commit_discard_idcache(void);
85/* deprecated alias */
59void invalidate_idcache(void); 86void invalidate_idcache(void);
60 87
88#define HAVE_CPUCACHE_COMMIT_DISCARD
89#define HAVE_CPUCACHE_COMMIT
90/* deprecated alias */
61#define HAVE_CPUCACHE_INVALIDATE 91#define HAVE_CPUCACHE_INVALIDATE
62#define HAVE_CPUCACHE_FLUSH 92#define HAVE_CPUCACHE_FLUSH
63 93