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/rtems | |
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/rtems')
-rw-r--r-- | c/src/lib/libcpu/powerpc/rtems/powerpc/cache.h | 42 |
1 files changed, 42 insertions, 0 deletions
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 |