RTEMS 5.2
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
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
19
20#if defined( RTEMS_SMP )
21#include <sys/cpuset.h>
22#endif
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
54
65
76
85size_t rtems_cache_get_data_cache_size( uint32_t level );
86
95size_t rtems_cache_get_instruction_cache_size( uint32_t level );
96
106void 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
166
173
179
183void rtems_cache_freeze_data( void );
184
188void rtems_cache_unfreeze_data( void );
189
193void rtems_cache_enable_data( void );
194
198void rtems_cache_disable_data( void );
199
204
209
214
219
224void *rtems_cache_aligned_malloc ( size_t nbytes );
225
256 size_t size,
257 uintptr_t alignment,
258 uintptr_t boundary
259);
260
269void 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 */
Basic Definitions.
size_t rtems_cache_get_maximal_line_size(void)
Returns the maximal cache line size of all cache kinds in bytes.
Definition: cacheimpl.h:435
void rtems_cache_invalidate_entire_instruction(void)
Invalidates the entire instruction cache.
Definition: cacheimpl.h:365
void rtems_cache_invalidate_entire_data(void)
Definition: cacheimpl.h:191
void rtems_cache_invalidate_multiple_instruction_lines(const void *addr, size_t size)
Invalidates multiple instruction cache lines.
Definition: cacheimpl.h:344
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_unfreeze_instruction(void)
Definition: cacheimpl.h:411
size_t rtems_cache_get_data_cache_size(uint32_t level)
Returns the data cache size in bytes.
Definition: cacheimpl.h:216
void rtems_cache_enable_data(void)
Definition: cacheimpl.h:245
void rtems_cache_disable_instruction(void)
Definition: cacheimpl.h:427
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:465
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_disable_data(void)
Definition: cacheimpl.h:254
size_t rtems_cache_get_instruction_cache_size(uint32_t level)
Returns the instruction cache size in bytes.
Definition: cacheimpl.h:390
void rtems_cache_unfreeze_data(void)
Definition: cacheimpl.h:237
void rtems_cache_freeze_instruction(void)
Definition: cacheimpl.h:404
void rtems_cache_invalidate_multiple_data_lines(const void *addr, size_t size)
Invalidates multiple data cache lines.
Definition: cacheimpl.h:143
void rtems_cache_flush_multiple_data_lines(const void *addr, size_t size)
Flushes multiple data cache lines.
Definition: cacheimpl.h:109
void * rtems_cache_aligned_malloc(size_t nbytes)
Definition: cachealignedalloc.c:16
void rtems_cache_coherent_free(void *ptr)
Frees memory allocated by rtems_cache_coherent_allocate().
Definition: cachecoherentalloc.c:63
void rtems_cache_flush_entire_data(void)
Flushes the entire data cache.
Definition: cacheimpl.h:176
size_t rtems_cache_get_instruction_line_size(void)
Returns the instruction cache line size in bytes.
Definition: cacheimpl.h:380
size_t rtems_cache_get_data_line_size(void)
Returns the data cache line size in bytes.
Definition: cacheimpl.h:206
void rtems_cache_freeze_data(void)
Definition: cacheimpl.h:230
void rtems_cache_enable_instruction(void)
Definition: cacheimpl.h:419
unsigned size
Definition: tte.h:1