![]() |
RTEMS 6.1-rc7
|
This header file defines the Cache Manager API. More...
Go to the source code of this file.
Functions | |
rtems_status_code | rtems_cache_coherent_add_area (void *begin, uintptr_t size) |
Adds a cache coherent memory area to the cache coherent allocator. | |
void * | rtems_cache_coherent_allocate (size_t size, uintptr_t alignment, uintptr_t boundary) |
Allocates a memory area from cache coherent memory. | |
void | rtems_cache_coherent_free (void *ptr) |
Frees memory allocated by rtems_cache_coherent_allocate(). | |
void | rtems_cache_freeze_data (void) |
Freezes the data caches. | |
void | rtems_cache_freeze_instruction (void) |
Freezes the instruction caches. | |
void | rtems_cache_unfreeze_data (void) |
Unfreezes the data cache. | |
void | rtems_cache_unfreeze_instruction (void) |
Unfreezes the instruction cache. | |
void | rtems_cache_flush_multiple_data_lines (const void *begin, size_t size) |
Flushes the data cache lines covering the memory area. | |
void | rtems_cache_invalidate_multiple_data_lines (const void *begin, size_t size) |
Invalidates the data cache lines covering the memory area. | |
void | rtems_cache_invalidate_multiple_instruction_lines (const void *begin, size_t size) |
Invalidates the instruction cache lines covering the memory area. | |
void | rtems_cache_instruction_sync_after_code_change (const void *begin, size_t size) |
Ensures necessary synchronization required after code changes. | |
size_t | rtems_cache_get_maximal_line_size (void) |
Gets the maximal cache line size in bytes of all caches (data, instruction, or unified). | |
size_t | rtems_cache_get_data_line_size (void) |
Gets the data cache line size in bytes. | |
size_t | rtems_cache_get_instruction_line_size (void) |
Gets the instruction cache line size in bytes. | |
size_t | rtems_cache_get_data_cache_size (uint32_t level) |
Gets the data cache size in bytes for the cache level. | |
size_t | rtems_cache_get_instruction_cache_size (uint32_t level) |
Gets the instruction cache size in bytes for the cache level. | |
void | rtems_cache_flush_entire_data (void) |
Flushes the entire data cache. | |
void | rtems_cache_invalidate_entire_data (void) |
Invalidates the entire data cache. | |
void | rtems_cache_invalidate_entire_instruction (void) |
Invalidates the entire instruction cache. | |
void | rtems_cache_enable_data (void) |
Enables the data cache. | |
void | rtems_cache_disable_data (void) |
Disables the data cache. | |
void | rtems_cache_enable_instruction (void) |
Enables the instruction cache. | |
void | rtems_cache_disable_instruction (void) |
Disables the instruction cache. | |
void * | rtems_cache_aligned_malloc (size_t size) |
Allocates memory from the C Program Heap which begins at a cache line boundary. | |
This header file defines the Cache Manager API.
rtems_status_code rtems_cache_coherent_add_area | ( | void * | begin, |
uintptr_t | size | ||
) |
Adds a cache coherent memory area to the cache coherent allocator.
begin | is the begin address of the cache coherent memory area to add. |
size | is the size in bytes of the cache coherent memory area to add. |
RTEMS_SUCCESSFUL | The requested operation was successful. |
RTEMS_UNSATISFIED | The requested operation was not successful. |
The following constraints apply to this directive:
void * rtems_cache_coherent_allocate | ( | size_t | size, |
uintptr_t | alignment, | ||
uintptr_t | boundary | ||
) |
Allocates a memory area from cache coherent memory.
size | is the requested size in bytes of the memory area to allocate. |
alignment | is the requested alignment in bytes of the memory area to allocate. If the alignment parameter is not equal to zero, the allocated memory area will begin at an address aligned by this value. |
boundary | is the requested boundary in bytes of the memory area to allocate. If the boundary parameter is not equal to zero, the allocated memory area will comply with a boundary constraint. The boundary value specifies the set of addresses which are aligned by the boundary value. The interior of the allocated memory area will not contain an element of this set. The begin or end address of the area may be a member of the set. |
NULL | There is not enough memory available to satisfy the allocation request. |
A size value of zero will return a unique address which may be freed with rtems_cache_coherent_free().
The memory allocated by the directive may be released with a call to rtems_cache_coherent_free().
By default the C Program Heap allocator is used. In case special memory areas must be used, then the BSP or the application should add cache coherent memory areas for the allocator via rtems_cache_coherent_add_area().
The following constraints apply to this directive:
void rtems_cache_coherent_free | ( | void * | ptr | ) |
Frees memory allocated by rtems_cache_coherent_allocate().
ptr | is a pointer returned by rtems_cache_coherent_allocate(). |
The following constraints apply to this directive:
void rtems_cache_freeze_data | ( | void | ) |
Freezes the data caches.
The following constraints apply to this directive:
void rtems_cache_freeze_instruction | ( | void | ) |
Freezes the instruction caches.
The following constraints apply to this directive:
void rtems_cache_unfreeze_data | ( | void | ) |
Unfreezes the data cache.
The following constraints apply to this directive:
void rtems_cache_unfreeze_instruction | ( | void | ) |
Unfreezes the instruction cache.
The following constraints apply to this directive: