RTEMS  5.0.0
cache.h
Go to the documentation of this file.
1 
7 /* COPYRIGHT (c) 1989-2013.
8  * On-Line Applications Research Corporation (OAR).
9  *
10  * The license and distribution terms for this file may be
11  * found in the file LICENSE in this distribution or at
12  * http://www.rtems.org/license/LICENSE.
13  */
14 
15 #ifndef _RTEMS_RTEMS_CACHE_H
16 #define _RTEMS_RTEMS_CACHE_H
17 
18 #include <rtems/score/basedefs.h>
19 
20 #if defined( RTEMS_SMP )
21 #include <sys/cpuset.h>
22 #endif
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
53 size_t rtems_cache_get_data_line_size( void );
54 
65 
76 
85 size_t rtems_cache_get_data_cache_size( uint32_t level );
86 
95 size_t rtems_cache_get_instruction_cache_size( uint32_t level );
96 
106 void rtems_cache_flush_multiple_data_lines( const void *addr, size_t size );
107 
121  const void *addr,
122  size_t size
123 );
124 
138  const void *addr,
139  size_t size
140 );
141 
142 
156  const void * code_addr,
157  size_t n_bytes
158 );
159 
165 void rtems_cache_flush_entire_data( void );
166 
173 
179 
183 void rtems_cache_freeze_data( void );
184 
188 void rtems_cache_unfreeze_data( void );
189 
193 void rtems_cache_enable_data( void );
194 
198 void rtems_cache_disable_data( void );
199 
203 void rtems_cache_freeze_instruction( void );
204 
209 
213 void rtems_cache_enable_instruction( void );
214 
219 
224 void *rtems_cache_aligned_malloc ( size_t nbytes );
225 
256  size_t size,
257  uintptr_t alignment,
258  uintptr_t boundary
259 );
260 
269 void rtems_cache_coherent_free( void *ptr );
270 
283  void *area_begin,
284  uintptr_t area_size
285 );
286 
289 #ifdef __cplusplus
290 }
291 #endif
292 
293 #endif
294 /* end of include file */
void * rtems_cache_aligned_malloc(size_t nbytes)
Definition: cachealignedalloc.c:16
void * rtems_cache_coherent_allocate(size_t size, uintptr_t alignment, uintptr_t boundary)
Allocates a memory area of size size bytes from cache coherent memory.
Definition: cachecoherentalloc.c:35
void rtems_cache_enable_instruction(void)
Definition: cacheimpl.h:398
void rtems_cache_instruction_sync_after_code_change(const void *code_addr, size_t n_bytes)
Ensure necessary synchronization required after code changes.
Definition: cacheimpl.h:444
void rtems_cache_invalidate_entire_data(void)
Definition: cacheimpl.h:190
void rtems_cache_disable_instruction(void)
Definition: cacheimpl.h:406
void rtems_cache_freeze_data(void)
Definition: cacheimpl.h:229
void rtems_cache_enable_data(void)
Definition: cacheimpl.h:244
void rtems_cache_invalidate_multiple_instruction_lines(const void *addr, size_t size)
Invalidates multiple instruction cache lines.
Definition: cacheimpl.h:323
void rtems_cache_flush_multiple_data_lines(const void *addr, size_t size)
Flushes multiple data cache lines.
Definition: cacheimpl.h:108
void rtems_cache_coherent_free(void *ptr)
Frees memory allocated by rtems_cache_coherent_allocate().
Definition: cachecoherentalloc.c:63
void rtems_cache_invalidate_multiple_data_lines(const void *addr, size_t size)
Invalidates multiple data cache lines.
Definition: cacheimpl.h:142
void rtems_cache_disable_data(void)
Definition: cacheimpl.h:253
size_t rtems_cache_get_data_cache_size(uint32_t level)
Returns the data cache size in bytes.
Definition: cacheimpl.h:215
size_t rtems_cache_get_data_line_size(void)
Returns the data cache line size in bytes.
Definition: cacheimpl.h:205
void rtems_cache_unfreeze_instruction(void)
Definition: cacheimpl.h:390
size_t rtems_cache_get_maximal_line_size(void)
Returns the maximal cache line size of all cache kinds in bytes.
Definition: cacheimpl.h:414
void rtems_cache_freeze_instruction(void)
Definition: cacheimpl.h:383
void rtems_cache_unfreeze_data(void)
Definition: cacheimpl.h:236
Basic Definitions.
size_t rtems_cache_get_instruction_line_size(void)
Returns the instruction cache line size in bytes.
Definition: cacheimpl.h:359
void rtems_cache_coherent_add_area(void *area_begin, uintptr_t area_size)
Adds a cache coherent memory area to the cache coherent allocator.
Definition: cachecoherentalloc.c:108
void rtems_cache_invalidate_entire_instruction(void)
Invalidates the entire instruction cache.
Definition: cacheimpl.h:344
void rtems_cache_flush_entire_data(void)
Flushes the entire data cache.
Definition: cacheimpl.h:175
unsigned size
Definition: tte.h:74
size_t rtems_cache_get_instruction_cache_size(uint32_t level)
Returns the instruction cache size in bytes.
Definition: cacheimpl.h:369