source:
rtems/c/src/lib/libcpu/powerpc/rtems/powerpc/cache.h
@
1c07f582
Last change on this file since 1c07f582 was 1c07f582, checked in by Joel Sherrill <joel.sherrill@…>, on 05/01/02 at 23:05:49 | |
---|---|
|
|
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.