summaryrefslogtreecommitdiff
path: root/system.c
diff options
context:
space:
mode:
Diffstat (limited to 'system.c')
-rw-r--r--system.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/system.c b/system.c
index 63a64b8..e16a6be 100644
--- a/system.c
+++ b/system.c
@@ -318,6 +318,29 @@ sys_sram_alloc(struct tcb *tcp)
return 1;
}
+#include <asm/cachectl.h>
+
+static const struct xlat cacheflush_flags[] = {
+ { ICACHE, "ICACHE" },
+ { DCACHE, "DCACHE" },
+ { BCACHE, "BCACHE" },
+ { 0, NULL },
+};
+
+int
+sys_cacheflush(struct tcb *tcp)
+{
+ if (entering(tcp)) {
+ /* start addr */
+ tprintf("%#lx, ", tcp->u_arg[0]);
+ /* length */
+ tprintf("%ld, ", tcp->u_arg[1]);
+ /* flags */
+ printxval(cacheflush_flags, tcp->u_arg[1], "?CACHE");
+ }
+ return 0;
+}
+
#endif
#endif /* LINUX */