|
|
|
@ -543,6 +543,19 @@ void Thread::_call_update_pd()
|
|
|
|
|
|
|
|
|
|
void Thread::_call_update_data_region()
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
* FIXME: If the caller is not a core thread, the kernel operates in a
|
|
|
|
|
* different address space than the caller. Combined with the fact
|
|
|
|
|
* that at least ARMv7 doesn't provide cache operations by physical
|
|
|
|
|
* address, this prevents us from selectively maintaining caches.
|
|
|
|
|
* The future solution will be a kernel that is mapped to every
|
|
|
|
|
* address space so we can use virtual addresses of the caller. Up
|
|
|
|
|
* until then we apply operations to caches as a whole instead.
|
|
|
|
|
*/
|
|
|
|
|
if (!_core()) {
|
|
|
|
|
Processor::flush_data_caches();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
auto base = (addr_t)user_arg_1();
|
|
|
|
|
auto const size = (size_t)user_arg_2();
|
|
|
|
|
Processor::flush_data_caches_by_virt_region(base, size);
|
|
|
|
@ -551,6 +564,20 @@ void Thread::_call_update_data_region()
|
|
|
|
|
|
|
|
|
|
void Thread::_call_update_instr_region()
|
|
|
|
|
{
|
|
|
|
|
/*
|
|
|
|
|
* FIXME: If the caller is not a core thread, the kernel operates in a
|
|
|
|
|
* different address space than the caller. Combined with the fact
|
|
|
|
|
* that at least ARMv7 doesn't provide cache operations by physical
|
|
|
|
|
* address, this prevents us from selectively maintaining caches.
|
|
|
|
|
* The future solution will be a kernel that is mapped to every
|
|
|
|
|
* address space so we can use virtual addresses of the caller. Up
|
|
|
|
|
* until then we apply operations to caches as a whole instead.
|
|
|
|
|
*/
|
|
|
|
|
if (!_core()) {
|
|
|
|
|
Processor::flush_data_caches();
|
|
|
|
|
Processor::invalidate_instr_caches();
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
auto base = (addr_t)user_arg_1();
|
|
|
|
|
auto const size = (size_t)user_arg_2();
|
|
|
|
|
Processor::flush_data_caches_by_virt_region(base, size);
|
|
|
|
|