diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2002-05-01 23:05:49 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2002-05-01 23:05:49 +0000 |
commit | 1c07f5821e36bf65ac0d18f48b82873ce0b4211c (patch) | |
tree | b86620e3547556300825905c1eeb95dd680fd544 /c/src/lib/libcpu/powerpc | |
parent | 2002-04-30 Ralf Corsepius <corsepiu@faw.uni-ulm.de> (diff) | |
download | rtems-1c07f5821e36bf65ac0d18f48b82873ce0b4211c.tar.bz2 |
2002-04-30 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* rtems/powerpc/cache.h: New file (extracted from
old-exceptions/cpu.h)
* Makefile.am: Relect changes above.
Diffstat (limited to 'c/src/lib/libcpu/powerpc')
-rw-r--r-- | c/src/lib/libcpu/powerpc/ChangeLog | 6 | ||||
-rw-r--r-- | c/src/lib/libcpu/powerpc/Makefile.am | 21 | ||||
-rw-r--r-- | c/src/lib/libcpu/powerpc/rtems/powerpc/cache.h | 42 |
3 files changed, 69 insertions, 0 deletions
diff --git a/c/src/lib/libcpu/powerpc/ChangeLog b/c/src/lib/libcpu/powerpc/ChangeLog index 8930dd7281..d67f245378 100644 --- a/c/src/lib/libcpu/powerpc/ChangeLog +++ b/c/src/lib/libcpu/powerpc/ChangeLog @@ -1,3 +1,9 @@ +2002-04-30 Ralf Corsepius <corsepiu@faw.uni-ulm.de> + + * rtems/powerpc/cache.h: New file (extracted from + old-exceptions/cpu.h) + * Makefile.am: Relect changes above. + 2002-04-18 Ralf Corsepius <corsepiu@faw.uni-ulm.de> * shared/include/cpu.h: Removed. diff --git a/c/src/lib/libcpu/powerpc/Makefile.am b/c/src/lib/libcpu/powerpc/Makefile.am index 0d49358b6a..e0c0c74187 100644 --- a/c/src/lib/libcpu/powerpc/Makefile.am +++ b/c/src/lib/libcpu/powerpc/Makefile.am @@ -4,6 +4,25 @@ ACLOCAL_AMFLAGS = -I ../../../../../aclocal +nobase_include_HEADERS = rtems/powerpc/cache.h + +$(PROJECT_INCLUDE): + $(mkinstalldirs) $@ + +$(PROJECT_INCLUDE)/rtems: + $(mkinstalldirs) $@ + +$(PROJECT_INCLUDE)/rtems/powerpc: + $(mkinstalldirs) $@ + +$(PROJECT_INCLUDE)/%: % + $(INSTALL_DATA) $< $@ + +TMPINSTALL_FILES = $(PROJECT_INCLUDE) \ + $(PROJECT_INCLUDE)/rtems \ + $(PROJECT_INCLUDE)/rtems/powerpc \ + $(nobase_include_HEADERS:%=$(PROJECT_INCLUDE)/%) + ## Check configure.in for conditions to set the conditionals below if shared SHARED_LIB = shared @@ -31,5 +50,7 @@ endif SUBDIRS = $(SHARED_LIB) $(CPU_SUBDIR) wrapup +all-local: $(TMPINSTALL_FILES) + include $(top_srcdir)/../../../../../automake/subdirs.am include $(top_srcdir)/../../../../../automake/local.am diff --git a/c/src/lib/libcpu/powerpc/rtems/powerpc/cache.h b/c/src/lib/libcpu/powerpc/rtems/powerpc/cache.h new file mode 100644 index 0000000000..a728bfd0e5 --- /dev/null +++ b/c/src/lib/libcpu/powerpc/rtems/powerpc/cache.h @@ -0,0 +1,42 @@ +/* + * $Id$ + */ + +#ifndef _rtems_powerpc_cache_h +#define _rtems_powerpc_cache_h + +#include <rtems/score/ppc.h> + +#ifdef _OLD_EXCEPTIONS + +#if (PPC_D_CACHE != 0) +#define _CPU_Data_Cache_Block_Flush( _address ) \ + do { register void *__address = (_address); \ + register unsigned32 _zero = 0; \ + asm volatile ( "dcbf %0,%1" : \ + "=r" (_zero), "=r" (__address) : \ + "0" (_zero), "1" (__address) \ + ); \ + } while (0) +#else +#define _CPU_Data_Cache_Block_Flush( _address ) /* nop */ +#endif + +/* + * FIXME: This is not used anywhere. + */ +#if (PPC_D_CACHE != 0) +#define _CPU_Data_Cache_Block_Invalidate( _address ) \ + do { register void *__address = (_address); \ + register unsigned32 _zero = 0; \ + asm volatile ( "dcbi %0,%1" : \ + "=r" (_zero), "=r" (__address) : \ + "0" (_zero), "1" (__address) \ + ); \ + } while (0) +#else +#define _CPU_Data_Cache_Block_Invalidate( _address ) /* nop */ +#endif +#endif + +#endif |