|
Zephyr Project API
3.1.0
A Scalable Open Source RTOS
|
#include <zephyr/cache.h>Go to the source code of this file.
Functions | |
| void | cache_data_enable (void) |
| Enable d-cache. More... | |
| void | cache_data_disable (void) |
| Disable d-cache. More... | |
| void | cache_instr_enable (void) |
| Enable i-cache. More... | |
| void | cache_instr_disable (void) |
| Disable i-cache. More... | |
| int | cache_data_all (int op) |
| Write-back / Invalidate / Write-back + Invalidate all d-cache. More... | |
| int | cache_data_range (void *addr, size_t size, int op) |
| Write-back / Invalidate / Write-back + Invalidate d-cache lines. More... | |
| int | cache_instr_all (int op) |
| Write-back / Invalidate / Write-back + Invalidate all i-cache. More... | |
| int | cache_instr_range (void *addr, size_t size, int op) |
| Write-back / Invalidate / Write-back + Invalidate i-cache lines. More... | |
| int cache_data_all | ( | int | op | ) |
Write-back / Invalidate / Write-back + Invalidate all d-cache.
Write-back, Invalidate or Write-back + Invalidate the whole d-cache.
| op | Operation to perform (one of the K_CACHE_* operations) |
| 0 | On success |
| -ENOTSUP | If the operation is not supported |
| void cache_data_disable | ( | void | ) |
Disable d-cache.
Disable the d-cache.
| void cache_data_enable | ( | void | ) |
Enable d-cache.
Enable the d-cache.
| int cache_data_range | ( | void * | addr, |
| size_t | size, | ||
| int | op | ||
| ) |
Write-back / Invalidate / Write-back + Invalidate d-cache lines.
No alignment is required for either addr or size, but since arch_dcache_range() iterates on the d-cache lines, a d-cache line alignment for both is optimal.
The d-cache line size is specified either via the CONFIG_DCACHE_LINE_SIZE kconfig option or it is detected at runtime.
| addr | The pointer to start the multi-line operation |
| size | The number of bytes that are to be acted on |
| op | Operation to perform (one of the K_CACHE_* operations) |
| 0 | On success |
| -ENOTSUP | If the operation is not supported |
| int cache_instr_all | ( | int | op | ) |
Write-back / Invalidate / Write-back + Invalidate all i-cache.
Write-back, Invalidate or Write-back + Invalidate the whole i-cache.
| op | Operation to perform (one of the K_CACHE_* operations) |
| 0 | On success |
| -ENOTSUP | If the operation is not supported |
| void cache_instr_disable | ( | void | ) |
Disable i-cache.
Disable the i-cache.
| void cache_instr_enable | ( | void | ) |
Enable i-cache.
Enable the i-cache.
| int cache_instr_range | ( | void * | addr, |
| size_t | size, | ||
| int | op | ||
| ) |
Write-back / Invalidate / Write-back + Invalidate i-cache lines.
No alignment is required for either addr or size, but since arch_icache_range() iterates on the i-cache lines, an i-cache line alignment for both is optimal.
The i-cache line size is specified either via the CONFIG_ICACHE_LINE_SIZE kconfig option or it is detected at runtime.
| addr | The pointer to start the multi-line operation |
| size | The number of bytes that are to be acted on |
| op | Operation to perform (one of the K_CACHE_* operations) |
| 0 | On success |
| -ENOTSUP | If the operation is not supported |