source: rtems/c/src/lib/libcpu/powerpc/rtems/powerpc/cache.h @ 1c07f582

4.104.114.84.95
Last change on this file since 1c07f582 was 1c07f582, checked in by Joel Sherrill <joel.sherrill@…>, on May 1, 2002 at 11:05:49 PM

2002-04-30 Ralf Corsepius <corsepiu@…>

  • rtems/powerpc/cache.h: New file (extracted from old-exceptions/cpu.h)
  • Makefile.am: Relect changes above.
  • Property mode set to 100644
File size: 990 bytes
Line 
1/*
2 * $Id$
3 */
4
5#ifndef _rtems_powerpc_cache_h
6#define _rtems_powerpc_cache_h
7
8#include <rtems/score/ppc.h>
9
10#ifdef _OLD_EXCEPTIONS
11
12#if (PPC_D_CACHE != 0)
13#define _CPU_Data_Cache_Block_Flush( _address ) \
14  do { register void *__address = (_address); \
15       register unsigned32 _zero = 0; \
16       asm volatile ( "dcbf %0,%1" : \
17                      "=r" (_zero), "=r" (__address) : \
18                      "0" (_zero), "1" (__address) \
19       ); \
20  } while (0)
21#else
22#define _CPU_Data_Cache_Block_Flush( _address ) /* nop */
23#endif
24
25/*
26 * FIXME: This is not used anywhere.
27 */
28#if (PPC_D_CACHE != 0)
29#define _CPU_Data_Cache_Block_Invalidate( _address ) \
30  do { register void *__address = (_address); \
31       register unsigned32 _zero = 0; \
32       asm volatile ( "dcbi %0,%1" : \
33                      "=r" (_zero), "=r" (__address) : \
34                      "0" (_zero), "1" (__address) \
35       ); \
36  } while (0)
37#else
38#define _CPU_Data_Cache_Block_Invalidate( _address ) /* nop */
39#endif
40#endif
41
42#endif
Note: See TracBrowser for help on using the repository browser.