mirror of
https://github.com/genodelabs/genode.git
synced 2025-04-22 01:53:00 +00:00
parent
3f14defd9d
commit
a9521853bd
base-hw
@ -48,6 +48,7 @@ namespace Kernel
|
||||
constexpr Call_arg call_id_ack_signal() { return 10; }
|
||||
constexpr Call_arg call_id_print_char() { return 11; }
|
||||
constexpr Call_arg call_id_update_data_region() { return 12; }
|
||||
constexpr Call_arg call_id_update_instr_region() { return 13; }
|
||||
|
||||
|
||||
/*****************************************************************
|
||||
@ -132,6 +133,17 @@ namespace Kernel
|
||||
call(call_id_update_data_region(), (Call_arg)base, (Call_arg)size);
|
||||
}
|
||||
|
||||
/**
|
||||
* Globally apply writes to an instruction region in the current domain
|
||||
*
|
||||
* \param base base of the region within the current domain
|
||||
* \param size size of the region
|
||||
*/
|
||||
inline void update_instr_region(addr_t const base, size_t const size)
|
||||
{
|
||||
call(call_id_update_instr_region(), (Call_arg)base, (Call_arg)size);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send request message and await receipt of corresponding reply message
|
||||
*
|
||||
|
@ -31,23 +31,23 @@ namespace Kernel
|
||||
/**
|
||||
* Kernel names of the kernel calls
|
||||
*/
|
||||
constexpr Call_arg call_id_new_thread() { return 13; }
|
||||
constexpr Call_arg call_id_bin_thread() { return 14; }
|
||||
constexpr Call_arg call_id_start_thread() { return 15; }
|
||||
constexpr Call_arg call_id_resume_thread() { return 16; }
|
||||
constexpr Call_arg call_id_access_thread_regs() { return 17; }
|
||||
constexpr Call_arg call_id_route_thread_event() { return 18; }
|
||||
constexpr Call_arg call_id_update_pd() { return 19; }
|
||||
constexpr Call_arg call_id_new_pd() { return 20; }
|
||||
constexpr Call_arg call_id_bin_pd() { return 21; }
|
||||
constexpr Call_arg call_id_new_signal_receiver() { return 22; }
|
||||
constexpr Call_arg call_id_new_signal_context() { return 23; }
|
||||
constexpr Call_arg call_id_bin_signal_context() { return 24; }
|
||||
constexpr Call_arg call_id_bin_signal_receiver() { return 25; }
|
||||
constexpr Call_arg call_id_new_vm() { return 26; }
|
||||
constexpr Call_arg call_id_run_vm() { return 27; }
|
||||
constexpr Call_arg call_id_pause_vm() { return 28; }
|
||||
constexpr Call_arg call_id_pause_thread() { return 29; }
|
||||
constexpr Call_arg call_id_new_thread() { return 14; }
|
||||
constexpr Call_arg call_id_bin_thread() { return 15; }
|
||||
constexpr Call_arg call_id_start_thread() { return 16; }
|
||||
constexpr Call_arg call_id_resume_thread() { return 17; }
|
||||
constexpr Call_arg call_id_access_thread_regs() { return 18; }
|
||||
constexpr Call_arg call_id_route_thread_event() { return 19; }
|
||||
constexpr Call_arg call_id_update_pd() { return 20; }
|
||||
constexpr Call_arg call_id_new_pd() { return 21; }
|
||||
constexpr Call_arg call_id_bin_pd() { return 22; }
|
||||
constexpr Call_arg call_id_new_signal_receiver() { return 23; }
|
||||
constexpr Call_arg call_id_new_signal_context() { return 24; }
|
||||
constexpr Call_arg call_id_bin_signal_context() { return 25; }
|
||||
constexpr Call_arg call_id_bin_signal_receiver() { return 26; }
|
||||
constexpr Call_arg call_id_new_vm() { return 27; }
|
||||
constexpr Call_arg call_id_run_vm() { return 28; }
|
||||
constexpr Call_arg call_id_pause_vm() { return 29; }
|
||||
constexpr Call_arg call_id_pause_thread() { return 30; }
|
||||
|
||||
/**
|
||||
* Create a domain
|
||||
|
@ -549,6 +549,15 @@ void Thread::_call_update_data_region()
|
||||
}
|
||||
|
||||
|
||||
void Thread::_call_update_instr_region()
|
||||
{
|
||||
auto base = (addr_t)user_arg_1();
|
||||
auto const size = (size_t)user_arg_2();
|
||||
Processor::flush_data_caches_by_virt_region(base, size);
|
||||
Processor::invalidate_instr_caches_by_virt_region(base, size);
|
||||
}
|
||||
|
||||
|
||||
void Thread::_print_activity_table()
|
||||
{
|
||||
for (unsigned id = 0; id < MAX_THREADS; id++) {
|
||||
@ -856,6 +865,7 @@ void Thread::_call()
|
||||
unsigned const call_id = user_arg_0();
|
||||
switch (call_id) {
|
||||
case call_id_update_data_region(): _call_update_data_region(); return;
|
||||
case call_id_update_instr_region(): _call_update_instr_region(); return;
|
||||
case call_id_pause_current_thread(): _call_pause_current_thread(); return;
|
||||
case call_id_resume_local_thread(): _call_resume_local_thread(); return;
|
||||
case call_id_yield_thread(): _call_yield_thread(); return;
|
||||
|
@ -242,6 +242,7 @@ class Kernel::Thread
|
||||
void _call_send_reply_msg();
|
||||
void _call_update_pd();
|
||||
void _call_update_data_region();
|
||||
void _call_update_instr_region();
|
||||
void _call_print_char();
|
||||
void _call_new_signal_receiver();
|
||||
void _call_new_signal_context();
|
||||
|
Loading…
x
Reference in New Issue
Block a user