[patch rfa] add mips cache flush function to libgloss/mips/cfe.c

cgd@broadcom.com cgd@broadcom.com
Thu Apr 10 06:08:00 GMT 2003


(made sure it built in the current srcs by building w/ mips-elf.)

2003-04-09  Chris Demetriou  <cgd@broadcom.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;
+}



More information about the Newlib mailing list