diff --git a/repos/base-nova/include/spec/32bit/nova/syscalls.h b/repos/base-nova/include/spec/32bit/nova/syscalls.h index 465192c719..3361bb7ba3 100644 --- a/repos/base-nova/include/spec/32bit/nova/syscalls.h +++ b/repos/base-nova/include/spec/32bit/nova/syscalls.h @@ -395,10 +395,10 @@ namespace Nova { ALWAYS_INLINE - inline uint8_t sc_ctrl(unsigned sc, unsigned long long &time) + inline uint8_t sc_ctrl(unsigned sc, unsigned long long &time, uint8_t op = 0) { mword_t time_h = 0, time_l = 0; - uint8_t res = syscall_5(NOVA_SC_CTRL, 0, sc, time_h, time_l); + uint8_t res = syscall_5(NOVA_SC_CTRL, op, sc, time_h, time_l); time = time_h; time = (time << 32ULL) | time_l; return res; diff --git a/repos/base-nova/include/spec/64bit/nova/syscalls.h b/repos/base-nova/include/spec/64bit/nova/syscalls.h index 1715271020..464c21181c 100644 --- a/repos/base-nova/include/spec/64bit/nova/syscalls.h +++ b/repos/base-nova/include/spec/64bit/nova/syscalls.h @@ -315,10 +315,10 @@ namespace Nova { ALWAYS_INLINE - inline uint8_t sc_ctrl(mword_t sm, unsigned long long &time) + inline uint8_t sc_ctrl(mword_t sm, unsigned long long &time, uint8_t op = 0) { mword_t time_h = 0, time_l = 0; - uint8_t res = syscall_5(NOVA_SC_CTRL, 0, sm, time_h, time_l); + uint8_t res = syscall_5(NOVA_SC_CTRL, op, sm, time_h, time_l); time = time_h; time = (time << 32ULL) | (time_l & 0xFFFFFFFFULL); return res; diff --git a/repos/base-nova/ports/nova.hash b/repos/base-nova/ports/nova.hash index d31f8bf76b..c63cc0525a 100644 --- a/repos/base-nova/ports/nova.hash +++ b/repos/base-nova/ports/nova.hash @@ -1 +1 @@ -d6729d1669adce07fa0e393ce3f1928e0fa425ed +4856db61cb48605b879dc27b5b70e5366f7e5fee diff --git a/repos/base-nova/ports/nova.port b/repos/base-nova/ports/nova.port index e976ff53a0..57a6b0d1fd 100644 --- a/repos/base-nova/ports/nova.port +++ b/repos/base-nova/ports/nova.port @@ -4,7 +4,7 @@ DOWNLOADS := nova.git # r9 branch - use r9_debug for more verbose kernel messages URL(nova) := https://github.com/alex-ab/NOVA.git -REV(nova) := ef4b2877eb34b541d76a86810520369bdbd9d258 +REV(nova) := 1a6ff1c7007d74bd9e073689f49e46c48e8c0c2d DIR(nova) := src/kernel/nova PATCHES := $(sort $(wildcard $(REP_DIR)/patches/*.patch)) diff --git a/repos/base-nova/src/core/platform.cc b/repos/base-nova/src/core/platform.cc index bdf4e1d16d..97697d0d30 100644 --- a/repos/base-nova/src/core/platform.cc +++ b/repos/base-nova/src/core/platform.cc @@ -756,12 +756,13 @@ Platform::Platform() : if (!hip->is_cpu_enabled(kernel_cpu_id)) continue; - struct Idle_trace_source : public Trace::Source::Info_accessor, - private Trace::Control, - private Trace::Source + struct Trace_source : public Trace::Source::Info_accessor, + private Trace::Control, + private Trace::Source { Affinity::Location const affinity; unsigned const sc_sel; + Genode::String<8> const name; /** * Trace::Source::Info_accessor interface @@ -770,29 +771,42 @@ Platform::Platform() : { uint64_t sc_time = 0; - uint8_t res = Nova::sc_ctrl(sc_sel, sc_time); - if (res != Nova::NOVA_OK) - warning("sc_ctrl on idle SC cap, res=", res); + enum SYSCALL_OP { IDLE_SC = 0, CROSS_SC = 1 }; + uint8_t syscall_op = (name == "cross") ? CROSS_SC : IDLE_SC; - return { Session_label("kernel"), Trace::Thread_name("idle"), + uint8_t res = Nova::sc_ctrl(sc_sel, sc_time, syscall_op); + if (res != Nova::NOVA_OK) + warning("sc_ctrl on idle SC cap, op=", syscall_op, + ", res=", res); + + return { Session_label("kernel"), Trace::Thread_name(name), Trace::Execution_time(sc_time), affinity }; } - Idle_trace_source(Trace::Source_registry ®istry, - Affinity::Location affinity, unsigned sc_sel) + Trace_source(Trace::Source_registry ®istry, + Affinity::Location const affinity, + unsigned const sc_sel, + char const * type_name) : Trace::Control(), - Trace::Source(*this, *this), affinity(affinity), sc_sel(sc_sel) + Trace::Source(*this, *this), affinity(affinity), + sc_sel(sc_sel), name(type_name) { registry.insert(this); } }; - new (core_mem_alloc()) - Idle_trace_source(Trace::sources(), - Affinity::Location(genode_cpu_id, 0, - _cpus.width(), 1), - sc_idle_base + kernel_cpu_id); + new (core_mem_alloc()) Trace_source(Trace::sources(), + Affinity::Location(genode_cpu_id, 0, + _cpus.width(), 1), + sc_idle_base + kernel_cpu_id, + "idle"); + + new (core_mem_alloc()) Trace_source(Trace::sources(), + Affinity::Location(genode_cpu_id, 0, + _cpus.width(), 1), + sc_idle_base + kernel_cpu_id, + "cross"); } /* add echo thread and EC root thread to trace sources */