base: extend cache maintainance functionality

Introduce two new cache maintainance functions:
* cache_clean_invalidate_data
* cache_invalidate_data
used to flush or invalidate data-cache lines.

Both functions are typically empty, accept for the ARM architecture.
The commit provides implementations for the base-hw kernel, and Fiasco.OC.

Fixes #4207
This commit is contained in:
Stefan Kalkowski
2021-06-24 14:27:37 +02:00
committed by Christian Helmuth
parent ed0cc5330e
commit e7067050be
26 changed files with 301 additions and 98 deletions

View File

@ -13,9 +13,22 @@
#include <linux_syscalls.h>
#include <base/log.h>
#include <cpu/cache.h>
void Genode::cache_coherent(Genode::addr_t addr, Genode::size_t size)
{
lx_syscall(__ARM_NR_cacheflush, addr, addr + size, 0);
}
void Genode::cache_clean_invalidate_data(Genode::addr_t, Genode::size_t)
{
error(__func__, " not implemented for this kernel!");
}
void Genode::cache_invalidate_data(Genode::addr_t, Genode::size_t)
{
error(__func__, " not implemented for this kernel!");
}