Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
|
Cache Controller Interface . More...
Functions | |
void | arch_dcache_enable (void) |
Enable the d-cache. | |
void | arch_dcache_disable (void) |
Disable the d-cache. | |
int | arch_dcache_flush_all (void) |
Flush the d-cache. | |
int | arch_dcache_invd_all (void) |
Invalidate the d-cache. | |
int | arch_dcache_flush_and_invd_all (void) |
Flush and Invalidate the d-cache. | |
int | arch_dcache_flush_range (void *addr, size_t size) |
Flush an address range in the d-cache. | |
int | arch_dcache_invd_range (void *addr, size_t size) |
Invalidate an address range in the d-cache. | |
int | arch_dcache_flush_and_invd_range (void *addr, size_t size) |
Flush and Invalidate an address range in the d-cache. | |
size_t | arch_dcache_line_size_get (void) |
Get the d-cache line size. | |
void | arch_icache_enable (void) |
Enable the i-cache. | |
void | arch_icache_disable (void) |
Disable the i-cache. | |
int | arch_icache_flush_all (void) |
Flush the i-cache. | |
int | arch_icache_invd_all (void) |
Invalidate the i-cache. | |
int | arch_icache_flush_and_invd_all (void) |
Flush and Invalidate the i-cache. | |
int | arch_icache_flush_range (void *addr, size_t size) |
Flush an address range in the i-cache. | |
int | arch_icache_invd_range (void *addr, size_t size) |
Invalidate an address range in the i-cache. | |
int | arch_icache_flush_and_invd_range (void *addr, size_t size) |
Flush and Invalidate an address range in the i-cache. | |
size_t | arch_icache_line_size_get (void) |
Get the i-cache line size. | |
bool | arch_cache_is_ptr_cached (void *ptr) |
bool | arch_cache_is_ptr_uncached (void *ptr) |
void * | arch_cache_cached_ptr_get (void *ptr) |
void * | arch_cache_uncached_ptr_get (void *ptr) |
void | arch_cache_init (void) |
Cache Controller Interface .
#define cache_cached_ptr | ( | ptr | ) |
#include <zephyr/arch/cache.h>
#define cache_data_disable arch_dcache_disable |
#include <zephyr/arch/cache.h>
#define cache_data_enable arch_dcache_enable |
#include <zephyr/arch/cache.h>
#define cache_data_flush_all arch_dcache_flush_all |
#include <zephyr/arch/cache.h>
#define cache_data_flush_and_invd_all arch_dcache_flush_and_invd_all |
#include <zephyr/arch/cache.h>
#define cache_data_flush_and_invd_range | ( | addr, | |
size ) |
#include <zephyr/arch/cache.h>
#define cache_data_flush_range | ( | addr, | |
size ) |
#include <zephyr/arch/cache.h>
#define cache_data_invd_all arch_dcache_invd_all |
#include <zephyr/arch/cache.h>
#define cache_data_invd_range | ( | addr, | |
size ) |
#include <zephyr/arch/cache.h>
#define cache_data_line_size_get arch_dcache_line_size_get |
#include <zephyr/arch/cache.h>
#define cache_instr_disable arch_icache_disable |
#include <zephyr/arch/cache.h>
#define cache_instr_enable arch_icache_enable |
#include <zephyr/arch/cache.h>
#define cache_instr_flush_all arch_icache_flush_all |
#include <zephyr/arch/cache.h>
#define cache_instr_flush_and_invd_all arch_icache_flush_and_invd_all |
#include <zephyr/arch/cache.h>
#define cache_instr_flush_and_invd_range | ( | addr, | |
size ) |
#include <zephyr/arch/cache.h>
#define cache_instr_flush_range | ( | addr, | |
size ) |
#include <zephyr/arch/cache.h>
#define cache_instr_invd_all arch_icache_invd_all |
#include <zephyr/arch/cache.h>
#define cache_instr_invd_range | ( | addr, | |
size ) |
#include <zephyr/arch/cache.h>
#define cache_instr_line_size_get arch_icache_line_size_get |
#include <zephyr/arch/cache.h>
#define cache_is_ptr_cached | ( | ptr | ) |
#include <zephyr/arch/cache.h>
#define cache_is_ptr_uncached | ( | ptr | ) |
#include <zephyr/arch/cache.h>
#define cache_uncached_ptr | ( | ptr | ) |
#include <zephyr/arch/cache.h>
void * arch_cache_cached_ptr_get | ( | void * | ptr | ) |
#include <zephyr/arch/cache.h>
void arch_cache_init | ( | void | ) |
#include <zephyr/arch/cache.h>
bool arch_cache_is_ptr_cached | ( | void * | ptr | ) |
#include <zephyr/arch/cache.h>
bool arch_cache_is_ptr_uncached | ( | void * | ptr | ) |
#include <zephyr/arch/cache.h>
void * arch_cache_uncached_ptr_get | ( | void * | ptr | ) |
#include <zephyr/arch/cache.h>
void arch_dcache_disable | ( | void | ) |
void arch_dcache_enable | ( | void | ) |
int arch_dcache_flush_all | ( | void | ) |
#include <zephyr/arch/cache.h>
Flush the d-cache.
Flush the whole data cache.
0 | If succeeded. |
-ENOTSUP | If not supported. |
-errno | Negative errno for other failures. |
int arch_dcache_flush_and_invd_all | ( | void | ) |
#include <zephyr/arch/cache.h>
Flush and Invalidate the d-cache.
Flush and Invalidate the whole data cache.
0 | If succeeded. |
-ENOTSUP | If not supported. |
-errno | Negative errno for other failures. |
int arch_dcache_flush_and_invd_range | ( | void * | addr, |
size_t | size ) |
#include <zephyr/arch/cache.h>
Flush and Invalidate an address range in the d-cache.
Flush and Invalidate the specified address range of the data cache.
addr
or a padded size
is not strictly necessary.addr | Starting address to flush and invalidate. |
size | Range size. |
0 | If succeeded. |
-ENOTSUP | If not supported. |
-errno | Negative errno for other failures. |
int arch_dcache_flush_range | ( | void * | addr, |
size_t | size ) |
#include <zephyr/arch/cache.h>
Flush an address range in the d-cache.
Flush the specified address range of the data cache.
addr
or a padded size
is not strictly necessary.addr | Starting address to flush. |
size | Range size. |
0 | If succeeded. |
-ENOTSUP | If not supported. |
-errno | Negative errno for other failures. |
int arch_dcache_invd_all | ( | void | ) |
#include <zephyr/arch/cache.h>
Invalidate the d-cache.
Invalidate the whole data cache.
0 | If succeeded. |
-ENOTSUP | If not supported. |
-errno | Negative errno for other failures. |
int arch_dcache_invd_range | ( | void * | addr, |
size_t | size ) |
#include <zephyr/arch/cache.h>
Invalidate an address range in the d-cache.
Invalidate the specified address range of the data cache.
addr
is not aligned to the cache line and/or size
is not a multiple of the cache line size the behaviour is undefined.addr | Starting address to invalidate. |
size | Range size. |
0 | If succeeded. |
-ENOTSUP | If not supported. |
-errno | Negative errno for other failures. |
size_t arch_dcache_line_size_get | ( | void | ) |
#include <zephyr/arch/cache.h>
Get the d-cache line size.
The API is provided to dynamically detect the data cache line size at run time.
The function must be implemented only when CONFIG_DCACHE_LINE_SIZE_DETECT is defined.
size | Size of the d-cache line. |
0 | If the d-cache is not enabled. |
void arch_icache_disable | ( | void | ) |
void arch_icache_enable | ( | void | ) |
int arch_icache_flush_all | ( | void | ) |
#include <zephyr/arch/cache.h>
Flush the i-cache.
Flush the whole instruction cache.
0 | If succeeded. |
-ENOTSUP | If not supported. |
-errno | Negative errno for other failures. |
int arch_icache_flush_and_invd_all | ( | void | ) |
#include <zephyr/arch/cache.h>
Flush and Invalidate the i-cache.
Flush and Invalidate the whole instruction cache.
0 | If succeeded. |
-ENOTSUP | If not supported. |
-errno | Negative errno for other failures. |
int arch_icache_flush_and_invd_range | ( | void * | addr, |
size_t | size ) |
#include <zephyr/arch/cache.h>
Flush and Invalidate an address range in the i-cache.
Flush and Invalidate the specified address range of the instruction cache.
addr
or a padded size
is not strictly necessary.addr | Starting address to flush and invalidate. |
size | Range size. |
0 | If succeeded. |
-ENOTSUP | If not supported. |
-errno | Negative errno for other failures. |
int arch_icache_flush_range | ( | void * | addr, |
size_t | size ) |
#include <zephyr/arch/cache.h>
Flush an address range in the i-cache.
Flush the specified address range of the instruction cache.
addr
or a padded size
is not strictly necessary.addr | Starting address to flush. |
size | Range size. |
0 | If succeeded. |
-ENOTSUP | If not supported. |
-errno | Negative errno for other failures. |
int arch_icache_invd_all | ( | void | ) |
#include <zephyr/arch/cache.h>
Invalidate the i-cache.
Invalidate the whole instruction cache.
0 | If succeeded. |
-ENOTSUP | If not supported. |
-errno | Negative errno for other failures. |
int arch_icache_invd_range | ( | void * | addr, |
size_t | size ) |
#include <zephyr/arch/cache.h>
Invalidate an address range in the i-cache.
Invalidate the specified address range of the instruction cache.
addr
is not aligned to the cache line and/or size
is not a multiple of the cache line size the behaviour is undefined.addr | Starting address to invalidate. |
size | Range size. |
0 | If succeeded. |
-ENOTSUP | If not supported. |
-errno | Negative errno for other failures. |
size_t arch_icache_line_size_get | ( | void | ) |
#include <zephyr/arch/cache.h>
Get the i-cache line size.
The API is provided to dynamically detect the instruction cache line size at run time.
The function must be implemented only when CONFIG_ICACHE_LINE_SIZE_DETECT is defined.
size | Size of the d-cache line. |
0 | If the d-cache is not enabled. |