RTEMS CPU Kit with SuperCore  4.11.3
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 #ifdef __cplusplus
19 extern "C" {
20 #endif
21 
22 #include <rtems/system.h>
23 #include <sys/types.h>
24 
50 size_t rtems_cache_get_data_line_size( void );
51 
62 
73 
82 size_t rtems_cache_get_data_cache_size( uint32_t level );
83 
92 size_t rtems_cache_get_instruction_cache_size( uint32_t level );
93 
103 void rtems_cache_flush_multiple_data_lines( const void *addr, size_t size );
104 
118  const void *addr,
119  size_t size
120 );
121 
135  const void *addr,
136  size_t size
137 );
138 
139 
153  const void * code_addr,
154  size_t n_bytes
155 );
156 
162 void rtems_cache_flush_entire_data( void );
163 
170 
176 
180 void rtems_cache_freeze_data( void );
181 
185 void rtems_cache_unfreeze_data( void );
186 
190 void rtems_cache_enable_data( void );
191 
195 void rtems_cache_disable_data( void );
196 
200 void rtems_cache_freeze_instruction( void );
201 
206 
210 void rtems_cache_enable_instruction( void );
211 
216 
221 void *rtems_cache_aligned_malloc ( size_t nbytes );
222 
253  size_t size,
254  uintptr_t alignment,
255  uintptr_t boundary
256 );
257 
266 void rtems_cache_coherent_free( void *ptr );
267 
280  void *area_begin,
281  uintptr_t area_size
282 );
283 
284 #if defined( RTEMS_SMP )
285 
299 void rtems_cache_flush_multiple_data_lines_processor_set(
300  const void *addr,
301  size_t size,
302  const size_t setsize,
303  const cpu_set_t *set
304 );
305 
322 void rtems_cache_invalidate_multiple_data_lines_processor_set(
323  const void *addr,
324  size_t size,
325  const size_t setsize,
326  const cpu_set_t *set
327 );
328 
339 void rtems_cache_flush_entire_data_processor_set(
340  const size_t setsize,
341  const cpu_set_t *set
342 );
343 
356 void rtems_cache_invalidate_entire_data_processor_set(
357  const size_t setsize,
358  const cpu_set_t *set
359 );
360 
361 #endif
362 
365 #ifdef __cplusplus
366 }
367 #endif
368 
369 #endif
370 /* end of include file */
void * rtems_cache_aligned_malloc(size_t nbytes)
This function is used to allocate storage that spans an integral number of cache blocks.
Definition: cachealignedalloc.c:17
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)
This function enables the instruction cache.
void rtems_cache_instruction_sync_after_code_change(const void *code_addr, size_t n_bytes)
Ensure necessary synchronization required after code changes.
void rtems_cache_invalidate_entire_data(void)
This function is responsible for performing a data cache invalidate.
void rtems_cache_disable_instruction(void)
This function disables the instruction cache.
void rtems_cache_freeze_data(void)
This function freezes the data cache.
void rtems_cache_enable_data(void)
This function enables the data cache.
void rtems_cache_invalidate_multiple_instruction_lines(const void *addr, size_t size)
Invalidates multiple instruction cache lines.
void rtems_cache_flush_multiple_data_lines(const void *addr, size_t size)
Flushes multiple data cache lines.
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.
void rtems_cache_disable_data(void)
This function disables the data cache.
size_t rtems_cache_get_data_cache_size(uint32_t level)
Returns the data cache size in bytes.
size_t rtems_cache_get_data_line_size(void)
Returns the data cache line size in bytes.
void rtems_cache_unfreeze_instruction(void)
This function unfreezes the instruction cache.
size_t rtems_cache_get_maximal_line_size(void)
Returns the maximal cache line size of all cache kinds in bytes.
Information Included in Every Function in the Executive.
void rtems_cache_freeze_instruction(void)
This function freezes the instruction cache.
void rtems_cache_unfreeze_data(void)
This function unfreezes the data cache.
size_t rtems_cache_get_instruction_line_size(void)
Returns the instruction cache line size in bytes.
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.
void rtems_cache_flush_entire_data(void)
Flushes the entire data cache.
size_t rtems_cache_get_instruction_cache_size(uint32_t level)
Returns the instruction cache size in bytes.