This is the mail archive of the
newlib@sources.redhat.com
mailing list for the newlib project.
[patch rfa] add mips cache flush function tolibgloss/mips/cfe.c
- From: cgd at broadcom dot com
- To: newlib at sources dot redhat dot com
- Date: 09 Apr 2003 23:07:52 -0700
- Subject: [patch rfa] add mips cache flush function tolibgloss/mips/cfe.c
(made sure it built in the current srcs by building w/ mips-elf.)
2003-04-09 Chris Demetriou <cgd at broadcom dot com>
* mips/cfe.c (_flush_cache): New function.
Index: mips/cfe.c
===================================================================
RCS file: /cvs/src/src/libgloss/mips/cfe.c,v
retrieving revision 1.3
diff -u -p -r1.3 cfe.c
--- mips/cfe.c 17 Feb 2003 23:45:26 -0000 1.3
+++ mips/cfe.c 10 Apr 2003 06:05:57 -0000
@@ -127,3 +127,13 @@ get_mem_info (mem)
don't have enough stack to do that (yet). */
mem->size = 0x4000000; /* Assume 64 MB of RAM */
}
+
+/* This is the MIPS cache flush function call. No defines are provided
+ by libgloss for 'cache', and CFE doesn't let you flush ranges, so
+ we just flush all I & D for every call. */
+int
+_flush_cache (char *addr, int nbytes, int cache)
+{
+ cfe_flushcache (0);
+ return 0;
+}