summaryrefslogtreecommitdiffstats
path: root/c/src/lib/libcpu/powerpc/shared/src
diff options
context:
space:
mode:
Diffstat (limited to 'c/src/lib/libcpu/powerpc/shared/src')
-rw-r--r--c/src/lib/libcpu/powerpc/shared/src/cache.c69
-rw-r--r--c/src/lib/libcpu/powerpc/shared/src/cache_.h43
2 files changed, 84 insertions, 28 deletions
diff --git a/c/src/lib/libcpu/powerpc/shared/src/cache.c b/c/src/lib/libcpu/powerpc/shared/src/cache.c
index ec3e175ded..9099cda251 100644
--- a/c/src/lib/libcpu/powerpc/shared/src/cache.c
+++ b/c/src/lib/libcpu/powerpc/shared/src/cache.c
@@ -1,3 +1,11 @@
+/**
+ * @file
+ *
+ * #ingroup powerpc_shared
+ *
+ * @brief Source file for the Cache Manager PowerPC support.
+ */
+
/*
* Cache Management Support Routines for the MC68040
* Modified for MPC8260 Andy Dachs <a.dachs@sstl.co.uk>
@@ -194,6 +202,67 @@ void _CPU_cache_disable_instruction ( void )
mtspr( 560, r1 );
isync;
}
+
+#else
+
+#warning Most cache functions are not implemented
+
+void _CPU_cache_flush_entire_data()
+{
+ /* Void */
+}
+
+void _CPU_cache_invalidate_entire_data()
+{
+ /* Void */
+}
+
+void _CPU_cache_freeze_data()
+{
+ /* Void */
+}
+
+void _CPU_cache_unfreeze_data()
+{
+ /* Void */
+}
+
+void _CPU_cache_enable_data()
+{
+ /* Void */
+}
+
+void _CPU_cache_disable_data()
+{
+ /* Void */
+}
+
+void _CPU_cache_invalidate_entire_instruction()
+{
+ /* Void */
+}
+
+void _CPU_cache_freeze_instruction()
+{
+ /* Void */
+}
+
+void _CPU_cache_unfreeze_instruction()
+{
+ /* Void */
+}
+
+
+void _CPU_cache_enable_instruction()
+{
+ /* Void */
+}
+
+void _CPU_cache_disable_instruction()
+{
+ /* Void */
+}
+
#endif
void _CPU_cache_invalidate_1_data_line(
diff --git a/c/src/lib/libcpu/powerpc/shared/src/cache_.h b/c/src/lib/libcpu/powerpc/shared/src/cache_.h
index 11c8ee47ef..5851f0818b 100644
--- a/c/src/lib/libcpu/powerpc/shared/src/cache_.h
+++ b/c/src/lib/libcpu/powerpc/shared/src/cache_.h
@@ -1,38 +1,25 @@
-/*
- * PowerPC Cache Manager Support
- */
-
-#ifndef __POWERPC_CACHE_h
-#define __POWERPC_CACHE_h
-/*
- * get definitions from the score/powerpc header
- * about individual cache alignments
- */
-#include <rtems/score/powerpc.h>
-
-/*
- * CACHE MANAGER: The following functions are CPU-specific.
- * They provide the basic implementation for the rtems_* cache
- * management routines. If a given function has no meaning for the CPU,
- * it does nothing by default.
+/**
+ * @file
*
- * FIXME: Some functions simply have not been implemented.
+ * #ingroup powerpc_shared
+ *
+ * @brief Header file for the Cache Manager PowerPC support.
*/
-#if defined(ppc603) || defined(ppc603e) || defined(mpc8260)
- /* And possibly others */
-
-#if defined(PPC_CACHE_ALIGNMENT)
+#ifndef LIBCPU_POWERPC_CACHE_H
+#define LIBCPU_POWERPC_CACHE_H
-#define CPU_DATA_CACHE_ALIGNMENT PPC_CACHE_ALIGNMENT
-#define CPU_INSTRUCTION_CACHE_ALIGNMENT PPC_CACHE_ALIGNMENT
+#include <rtems/score/powerpc.h>
-#endif
+/* Provide the CPU defines only if we have a cache */
+#if PPC_CACHE_ALIGNMENT != PPC_NO_CACHE_ALIGNMENT
+ #define CPU_DATA_CACHE_ALIGNMENT PPC_CACHE_ALIGNMENT
+ #define CPU_INSTRUCTION_CACHE_ALIGNMENT PPC_CACHE_ALIGNMENT
#endif
#ifdef _OLD_EXCEPTIONS
-#include <libcpu/cache.h>
+# warning OLD EXCEPTIONS
+# include <libcpu/cache.h>
#endif
-#endif
-/* end of include file */
+#endif /* LIBCPU_POWERPC_CACHE_H */