mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-19 13:47:56 +00:00
parent
dd505edd19
commit
ee38504d81
@ -86,6 +86,15 @@ void Genode::Cpu::clean_data_cache_by_virt_region(addr_t base, size_t sz)
|
||||
}
|
||||
|
||||
|
||||
void Genode::Cpu::clean_invalidate_data_cache_by_virt_region(addr_t base, size_t sz)
|
||||
{
|
||||
addr_t const top = base + sz;
|
||||
base &= line_align_mask;
|
||||
for (; base < top; base += line_size) {
|
||||
asm volatile("dc civac, %0" :: "r" (base)); }
|
||||
}
|
||||
|
||||
|
||||
void Genode::Cpu::invalidate_instr_cache_by_virt_region(addr_t base,
|
||||
size_t size)
|
||||
{
|
||||
|
@ -87,6 +87,7 @@ struct Genode::Cpu : Hw::Arm_64_cpu
|
||||
|
||||
|
||||
static void clean_data_cache_by_virt_region(addr_t, size_t);
|
||||
static void clean_invalidate_data_cache_by_virt_region(addr_t, size_t);
|
||||
static void invalidate_instr_cache_by_virt_region(addr_t, size_t);
|
||||
};
|
||||
|
||||
|
@ -106,7 +106,10 @@ bool Kernel::Pd::invalidate_tlb(Cpu &, addr_t addr, size_t size)
|
||||
|
||||
void Kernel::Thread::_call_update_data_region()
|
||||
{
|
||||
Genode::raw(__func__, " not implemented yet!");
|
||||
addr_t const base = (addr_t)user_arg_1();
|
||||
size_t const size = (size_t)user_arg_2();
|
||||
Cpu::clean_invalidate_data_cache_by_virt_region(base, size);
|
||||
Cpu::invalidate_instr_cache_by_virt_region(base, size);
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user