RTEMS: bsps/powerpc/include/rtems/powerpc/cache.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
cache.h
1#ifndef _RTEMS_POWERPC_CACHE_H
2#define _RTEMS_POWERPC_CACHE_H
3
4#include <rtems/powerpc/powerpc.h> /* for PPC_D_CACHE */
5
6#ifdef _OLD_EXCEPTIONS
7
8#if (PPC_D_CACHE != 0)
9#define _CPU_Data_Cache_Block_Flush( _address ) \
10 do { register void *__address = (_address); \
11 register uint32_t _zero = 0; \
12 __asm__ volatile ( "dcbf %0,%1" : \
13 "=r" (_zero), "=r" (__address) : \
14 "0" (_zero), "1" (__address) \
15 ); \
16 } while (0)
17#else
18#define _CPU_Data_Cache_Block_Flush( _address ) /* nop */
19#endif
20
21/*
22 * FIXME: This is not used anywhere.
23 */
24#if (PPC_D_CACHE != 0)
25#define _CPU_Data_Cache_Block_Invalidate( _address ) \
26 do { register void *__address = (_address); \
27 register uint32_t _zero = 0; \
28 __asm__ volatile ( "dcbi %0,%1" : \
29 "=r" (_zero), "=r" (__address) : \
30 "0" (_zero), "1" (__address) \
31 ); \
32 } while (0)
33#else
34#define _CPU_Data_Cache_Block_Invalidate( _address ) /* nop */
35#endif
36#endif
37
38#endif
powerpc.h