2016-01-11 11:02:52 +01:00
|
|
|
/*
|
|
|
|
* \brief ARM non-SMP specific kernel thread implementations
|
|
|
|
* \author Stefan Kalkowski
|
|
|
|
* \date 2015-12-20
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 13:23:52 +01:00
|
|
|
* Copyright (C) 2015-2017 Genode Labs GmbH
|
2016-01-11 11:02:52 +01:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 13:23:52 +01:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2016-01-11 11:02:52 +01:00
|
|
|
*/
|
|
|
|
/* core includes */
|
|
|
|
#include <kernel/pd.h>
|
2017-10-05 16:11:24 +02:00
|
|
|
#include <kernel/cpu.h>
|
2016-01-11 11:02:52 +01:00
|
|
|
#include <kernel/thread.h>
|
|
|
|
|
|
|
|
void Kernel::Thread::_call_update_pd()
|
|
|
|
{
|
|
|
|
Pd * const pd = (Pd *) user_arg_1();
|
|
|
|
Cpu * const cpu = cpu_pool()->cpu(Cpu::executing_id());
|
|
|
|
cpu->invalidate_instr_cache();
|
|
|
|
cpu->clean_invalidate_data_cache();
|
2017-10-06 12:02:36 +02:00
|
|
|
if (pd->mmu_regs.id())
|
|
|
|
Cpu::Tlbiasid::write(pd->mmu_regs.id()); /* flush TLB by ASID */
|
2017-08-30 11:59:35 +02:00
|
|
|
else
|
|
|
|
Cpu::Tlbiall::write(0);
|
2016-01-11 11:02:52 +01:00
|
|
|
}
|