mirror of
https://github.com/genodelabs/genode.git
synced 2025-02-21 10:01:57 +00:00
parent
9269d09e18
commit
711cce3f4d
@ -395,10 +395,10 @@ namespace Nova {
|
|||||||
|
|
||||||
|
|
||||||
ALWAYS_INLINE
|
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;
|
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_h;
|
||||||
time = (time << 32ULL) | time_l;
|
time = (time << 32ULL) | time_l;
|
||||||
return res;
|
return res;
|
||||||
|
@ -315,10 +315,10 @@ namespace Nova {
|
|||||||
|
|
||||||
|
|
||||||
ALWAYS_INLINE
|
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;
|
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_h;
|
||||||
time = (time << 32ULL) | (time_l & 0xFFFFFFFFULL);
|
time = (time << 32ULL) | (time_l & 0xFFFFFFFFULL);
|
||||||
return res;
|
return res;
|
||||||
|
@ -1 +1 @@
|
|||||||
d6729d1669adce07fa0e393ce3f1928e0fa425ed
|
4856db61cb48605b879dc27b5b70e5366f7e5fee
|
||||||
|
@ -4,7 +4,7 @@ DOWNLOADS := nova.git
|
|||||||
|
|
||||||
# r9 branch - use r9_debug for more verbose kernel messages
|
# r9 branch - use r9_debug for more verbose kernel messages
|
||||||
URL(nova) := https://github.com/alex-ab/NOVA.git
|
URL(nova) := https://github.com/alex-ab/NOVA.git
|
||||||
REV(nova) := ef4b2877eb34b541d76a86810520369bdbd9d258
|
REV(nova) := 1a6ff1c7007d74bd9e073689f49e46c48e8c0c2d
|
||||||
DIR(nova) := src/kernel/nova
|
DIR(nova) := src/kernel/nova
|
||||||
|
|
||||||
PATCHES := $(sort $(wildcard $(REP_DIR)/patches/*.patch))
|
PATCHES := $(sort $(wildcard $(REP_DIR)/patches/*.patch))
|
||||||
|
@ -756,12 +756,13 @@ Platform::Platform() :
|
|||||||
if (!hip->is_cpu_enabled(kernel_cpu_id))
|
if (!hip->is_cpu_enabled(kernel_cpu_id))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
struct Idle_trace_source : public Trace::Source::Info_accessor,
|
struct Trace_source : public Trace::Source::Info_accessor,
|
||||||
private Trace::Control,
|
private Trace::Control,
|
||||||
private Trace::Source
|
private Trace::Source
|
||||||
{
|
{
|
||||||
Affinity::Location const affinity;
|
Affinity::Location const affinity;
|
||||||
unsigned const sc_sel;
|
unsigned const sc_sel;
|
||||||
|
Genode::String<8> const name;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Trace::Source::Info_accessor interface
|
* Trace::Source::Info_accessor interface
|
||||||
@ -770,29 +771,42 @@ Platform::Platform() :
|
|||||||
{
|
{
|
||||||
uint64_t sc_time = 0;
|
uint64_t sc_time = 0;
|
||||||
|
|
||||||
uint8_t res = Nova::sc_ctrl(sc_sel, sc_time);
|
enum SYSCALL_OP { IDLE_SC = 0, CROSS_SC = 1 };
|
||||||
if (res != Nova::NOVA_OK)
|
uint8_t syscall_op = (name == "cross") ? CROSS_SC : IDLE_SC;
|
||||||
warning("sc_ctrl on idle SC cap, res=", res);
|
|
||||||
|
|
||||||
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 };
|
Trace::Execution_time(sc_time), affinity };
|
||||||
}
|
}
|
||||||
|
|
||||||
Idle_trace_source(Trace::Source_registry ®istry,
|
Trace_source(Trace::Source_registry ®istry,
|
||||||
Affinity::Location affinity, unsigned sc_sel)
|
Affinity::Location const affinity,
|
||||||
|
unsigned const sc_sel,
|
||||||
|
char const * type_name)
|
||||||
:
|
:
|
||||||
Trace::Control(),
|
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);
|
registry.insert(this);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
new (core_mem_alloc())
|
new (core_mem_alloc()) Trace_source(Trace::sources(),
|
||||||
Idle_trace_source(Trace::sources(),
|
Affinity::Location(genode_cpu_id, 0,
|
||||||
Affinity::Location(genode_cpu_id, 0,
|
_cpus.width(), 1),
|
||||||
_cpus.width(), 1),
|
sc_idle_base + kernel_cpu_id,
|
||||||
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 */
|
/* add echo thread and EC root thread to trace sources */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user