RTEMS: cpukit/include/rtems/rtems/cache.h Source File

| RTEMS 5.4-rc2

Loading...
Searching...
No Matches
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
25extern "C" {
26#endif
27
53size_t rtems_cache_get_data_line_size( void );
54
64size_t rtems_cache_get_instruction_line_size( void );
65
75size_t rtems_cache_get_maximal_line_size( void );
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
120void rtems_cache_invalidate_multiple_data_lines(
121 const void *addr,
122 size_t size
123);
124
137void rtems_cache_invalidate_multiple_instruction_lines(
138 const void *addr,
139 size_t size
140);
141
142
155void rtems_cache_instruction_sync_after_code_change(
156 const void * code_addr,
157 size_t n_bytes
158);
159
165void rtems_cache_flush_entire_data( void );
166
172void rtems_cache_invalidate_entire_instruction( void );
173
178void rtems_cache_invalidate_entire_data( void );
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
203void rtems_cache_freeze_instruction( void );
204
208void rtems_cache_unfreeze_instruction( void );
209
213void rtems_cache_enable_instruction( void );
214
218void rtems_cache_disable_instruction( void );
219
224void *rtems_cache_aligned_malloc ( size_t nbytes );
225
255void *rtems_cache_coherent_allocate(
256 size_t size,
257 uintptr_t alignment,
258 uintptr_t boundary
259);
260
269void rtems_cache_coherent_free( void *ptr );
270
282void rtems_cache_coherent_add_area(
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 */
basedefs.h
Basic Definitions.
rtems_cache_get_maximal_line_size
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
rtems_cache_invalidate_entire_instruction
void rtems_cache_invalidate_entire_instruction(void)
Invalidates the entire instruction cache.
Definition: cacheimpl.h:365
rtems_cache_invalidate_entire_data
void rtems_cache_invalidate_entire_data(void)
Definition: cacheimpl.h:191
rtems_cache_invalidate_multiple_instruction_lines
void rtems_cache_invalidate_multiple_instruction_lines(const void *addr, size_t size)
Invalidates multiple instruction cache lines.
Definition: cacheimpl.h:344
rtems_cache_coherent_add_area
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
rtems_cache_unfreeze_instruction
void rtems_cache_unfreeze_instruction(void)
Definition: cacheimpl.h:411
rtems_cache_get_data_cache_size
size_t rtems_cache_get_data_cache_size(uint32_t level)
Returns the data cache size in bytes.
Definition: cacheimpl.h:216
rtems_cache_enable_data
void rtems_cache_enable_data(void)
Definition: cacheimpl.h:245
rtems_cache_disable_instruction
void rtems_cache_disable_instruction(void)
Definition: cacheimpl.h:427
rtems_cache_instruction_sync_after_code_change
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
rtems_cache_coherent_allocate
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
rtems_cache_disable_data
void rtems_cache_disable_data(void)
Definition: cacheimpl.h:254
rtems_cache_get_instruction_cache_size
size_t rtems_cache_get_instruction_cache_size(uint32_t level)
Returns the instruction cache size in bytes.
Definition: cacheimpl.h:390
rtems_cache_unfreeze_data
void rtems_cache_unfreeze_data(void)
Definition: cacheimpl.h:237
rtems_cache_freeze_instruction
void rtems_cache_freeze_instruction(void)
Definition: cacheimpl.h:404
rtems_cache_invalidate_multiple_data_lines
void rtems_cache_invalidate_multiple_data_lines(const void *addr, size_t size)
Invalidates multiple data cache lines.
Definition: cacheimpl.h:143
rtems_cache_flush_multiple_data_lines
void rtems_cache_flush_multiple_data_lines(const void *addr, size_t size)
Flushes multiple data cache lines.
Definition: cacheimpl.h:109
rtems_cache_aligned_malloc
void * rtems_cache_aligned_malloc(size_t nbytes)
Definition: cachealignedalloc.c:16
rtems_cache_coherent_free
void rtems_cache_coherent_free(void *ptr)
Frees memory allocated by rtems_cache_coherent_allocate().
Definition: cachecoherentalloc.c:63
rtems_cache_flush_entire_data
void rtems_cache_flush_entire_data(void)
Flushes the entire data cache.
Definition: cacheimpl.h:176
rtems_cache_get_instruction_line_size
size_t rtems_cache_get_instruction_line_size(void)
Returns the instruction cache line size in bytes.
Definition: cacheimpl.h:380
rtems_cache_get_data_line_size
size_t rtems_cache_get_data_line_size(void)
Returns the data cache line size in bytes.
Definition: cacheimpl.h:206
rtems_cache_freeze_data
void rtems_cache_freeze_data(void)
Definition: cacheimpl.h:230
rtems_cache_enable_instruction
void rtems_cache_enable_instruction(void)
Definition: cacheimpl.h:419