diff --git a/repos/base/include/topo_session/client.h b/repos/base/include/topo_session/client.h index a092597310..a7ec0a0bb9 100644 --- a/repos/base/include/topo_session/client.h +++ b/repos/base/include/topo_session/client.h @@ -46,4 +46,14 @@ struct Genode::Topo_session_client : Rpc_client { call(affinity); } + + unsigned phys_id(const Affinity::Location &loc) override + { + return call(loc); + } + + Affinity::Space const global_affinity_space() override + { + return call(); + } }; \ No newline at end of file diff --git a/repos/base/include/topo_session/topo_session.h b/repos/base/include/topo_session/topo_session.h index 8030df45c1..1d3b0c8d0e 100644 --- a/repos/base/include/topo_session/topo_session.h +++ b/repos/base/include/topo_session/topo_session.h @@ -50,11 +50,15 @@ struct Genode::Topo_session : Session virtual Topology::Numa_region node_at_id(unsigned node_id) = 0; virtual unsigned node_count() = 0; virtual void reconstruct(const Affinity) = 0; + virtual unsigned phys_id(Affinity::Location const &) = 0; + virtual Affinity::Space const global_affinity_space() = 0; GENODE_RPC(Rpc_node_affinity, Topology::Numa_region, node_affinity_of, Affinity::Location const &); GENODE_RPC(Rpc_node_id, Topology::Numa_region, node_at_id, unsigned); GENODE_RPC(Rpc_node_count, unsigned, node_count); GENODE_RPC(Rpc_reconstruct, void, reconstruct, Affinity); + GENODE_RPC(Rpc_phys_id, unsigned, phys_id, Affinity::Location const &); + GENODE_RPC(Rpc_total_core_count, Affinity::Space const, global_affinity_space); - GENODE_RPC_INTERFACE(Rpc_node_affinity, Rpc_node_id, Rpc_node_count, Rpc_reconstruct); + GENODE_RPC_INTERFACE(Rpc_node_affinity, Rpc_node_id, Rpc_node_count, Rpc_reconstruct, Rpc_phys_id, Rpc_total_core_count); }; \ No newline at end of file diff --git a/repos/base/src/core/include/topo_session_component.h b/repos/base/src/core/include/topo_session_component.h index 20699f7193..2632bbdedc 100644 --- a/repos/base/src/core/include/topo_session_component.h +++ b/repos/base/src/core/include/topo_session_component.h @@ -73,4 +73,14 @@ class Genode::Topo_session_component : public Session_object _affinity = affinity; construct(); } + + unsigned phys_id(const Affinity::Location &loc) override + { + return platform_specific().kernel_cpu_id(loc); + } + + Affinity::Space const global_affinity_space() override + { + return platform_specific().affinity_space(); + } };