mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
Allow to request the Tukija capability selector for a PD capability.
This commit is contained in:
@@ -44,6 +44,7 @@ class Core::Native_pd_component : public Rpc_object<Pd_session::Native_pd>
|
|||||||
*/
|
*/
|
||||||
Native_capability alloc_rpc_cap(Native_capability, addr_t, addr_t) override;
|
Native_capability alloc_rpc_cap(Native_capability, addr_t, addr_t) override;
|
||||||
void imprint_rpc_cap(Native_capability, unsigned long) override;
|
void imprint_rpc_cap(Native_capability, unsigned long) override;
|
||||||
|
Genode::addr_t sel() override;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__NATIVE_PD_COMPONENT_H_ */
|
#endif /* _CORE__INCLUDE__NATIVE_PD_COMPONENT_H_ */
|
||||||
|
|||||||
@@ -39,8 +39,9 @@ class Core::Platform_pd : public Address_space
|
|||||||
Platform_pd(Platform_pd const &);
|
Platform_pd(Platform_pd const &);
|
||||||
Platform_pd &operator = (Platform_pd const &);
|
Platform_pd &operator = (Platform_pd const &);
|
||||||
|
|
||||||
public:
|
friend class Native_pd;
|
||||||
|
|
||||||
|
public:
|
||||||
bool has_any_threads = false;
|
bool has_any_threads = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -36,6 +36,10 @@ void Native_pd_component::imprint_rpc_cap(Native_capability cap, unsigned long b
|
|||||||
imprint_badge(cap.local_name(), badge);
|
imprint_badge(cap.local_name(), badge);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Genode::addr_t Native_pd_component::sel()
|
||||||
|
{
|
||||||
|
return _pd_session._pd->pd_sel();
|
||||||
|
}
|
||||||
|
|
||||||
Native_pd_component::Native_pd_component(Pd_session_component &pd, char const *)
|
Native_pd_component::Native_pd_component(Pd_session_component &pd, char const *)
|
||||||
:
|
:
|
||||||
|
|||||||
@@ -37,6 +37,8 @@ Platform_pd::Platform_pd(Allocator &, char const *label, signed, bool)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
log("Creating PD for <", label, "> with cap selector ", _pd_sel);
|
||||||
|
|
||||||
/* create task */
|
/* create task */
|
||||||
enum { KEEP_FREE_PAGES_NOT_AVAILABLE_FOR_UPGRADE = 2, UPPER_LIMIT_PAGES = 32 };
|
enum { KEEP_FREE_PAGES_NOT_AVAILABLE_FOR_UPGRADE = 2, UPPER_LIMIT_PAGES = 32 };
|
||||||
uint8_t res = Tukija::create_pd(_pd_sel, platform_specific().core_pd_sel(),
|
uint8_t res = Tukija::create_pd(_pd_sel, platform_specific().core_pd_sel(),
|
||||||
@@ -48,7 +50,6 @@ Platform_pd::Platform_pd(Allocator &, char const *label, signed, bool)
|
|||||||
error("create_pd returned ", res);
|
error("create_pd returned ", res);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
Platform_pd::~Platform_pd()
|
Platform_pd::~Platform_pd()
|
||||||
{
|
{
|
||||||
if (_pd_sel == Native_thread::INVALID_INDEX)
|
if (_pd_sel == Native_thread::INVALID_INDEX)
|
||||||
|
|||||||
Reference in New Issue
Block a user