mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
Make Topology service part of a component's environment, just like CPU.
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
#include <cpu_session/connection.h>
|
||||
#include <log_session/connection.h>
|
||||
#include <rom_session/connection.h>
|
||||
#include <topo_session/connection.h>
|
||||
#include <parent/capability.h>
|
||||
|
||||
namespace Genode {
|
||||
@@ -609,6 +610,7 @@ class Genode::Child : protected Rpc_object<Parent>,
|
||||
Env_connection<Cpu_connection> _cpu { *this, Env::cpu(), _policy.name() };
|
||||
Env_connection<Log_connection> _log { *this, Env::log(), _policy.name() };
|
||||
Env_connection<Rom_connection> _binary { *this, Env::binary(), _policy.binary_name() };
|
||||
Env_connection<Topo_connection> _topo { *this, Env::topo(), _policy.name() };
|
||||
|
||||
Constructible<Env_connection<Rom_connection> > _linker { };
|
||||
|
||||
@@ -761,6 +763,7 @@ class Genode::Child : protected Rpc_object<Parent>,
|
||||
Ram_allocator &ram() { return _pd.session(); }
|
||||
Ram_allocator const &ram() const { return _pd.session(); }
|
||||
Cpu_session &cpu() { return _cpu.session(); }
|
||||
Topo_session &topo() { return _topo.session(); }
|
||||
Pd_session &pd() { return _pd.session(); }
|
||||
Pd_session const &pd() const { return _pd.session(); }
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <base/entrypoint.h>
|
||||
#include <cpu_session/capability.h>
|
||||
#include <pd_session/capability.h>
|
||||
#include <topo_session/capability.h>
|
||||
|
||||
namespace Genode { struct Env; }
|
||||
|
||||
@@ -48,6 +49,12 @@ struct Genode::Env : Interface
|
||||
*/
|
||||
Ram_allocator &ram() { return pd(); }
|
||||
|
||||
/**
|
||||
* @brief Topology model
|
||||
*
|
||||
*/
|
||||
virtual Topo_session &topo() = 0;
|
||||
|
||||
/**
|
||||
* Entrypoint for handling RPC requests and signals
|
||||
*/
|
||||
@@ -63,6 +70,12 @@ struct Genode::Env : Interface
|
||||
*/
|
||||
virtual Pd_session_capability pd_session_cap() = 0;
|
||||
|
||||
/**
|
||||
* @brief Return the Topo-session capability
|
||||
*
|
||||
*/
|
||||
virtual Topo_session_capability topo_session_cap() = 0;
|
||||
|
||||
/**
|
||||
* ID space of sessions obtained from the parent
|
||||
*/
|
||||
|
||||
@@ -22,6 +22,8 @@
|
||||
#include <region_map/region_map.h>
|
||||
#include <cpu_session/cpu_session.h>
|
||||
#include <cpu_session/capability.h>
|
||||
#include <topo_session/topo_session.h>
|
||||
#include <topo_session/capability.h>
|
||||
#include <pd_session/capability.h>
|
||||
#include <base/allocator.h>
|
||||
#include <base/snprintf.h>
|
||||
@@ -87,6 +89,9 @@ struct Genode::Env_deprecated : Interface
|
||||
*/
|
||||
virtual Pd_session *pd_session() = 0;
|
||||
virtual Pd_session_capability pd_session_cap() = 0;
|
||||
|
||||
virtual Topo_session *topo_session() = 0;
|
||||
virtual Topo_session_capability topo_session_cap() = 0;
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__DEPRECATED__ENV_H_ */
|
||||
|
||||
@@ -71,7 +71,8 @@ class Genode::Parent
|
||||
static Client::Id log() { return { 3 }; }
|
||||
static Client::Id binary() { return { 4 }; }
|
||||
static Client::Id linker() { return { 5 }; }
|
||||
static Client::Id last() { return { 5 }; }
|
||||
static Client::Id topo() { return { 6 }; }
|
||||
static Client::Id last() { return { 6 }; }
|
||||
|
||||
/**
|
||||
* True if session ID refers to an environment session
|
||||
|
||||
Reference in New Issue
Block a user