mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
committed by
Christian Helmuth
parent
dca144f2ee
commit
05fa063068
@@ -15,6 +15,7 @@
|
||||
#define _CORE__INCLUDE__PLATFORM_SERVICES_H_
|
||||
|
||||
#include <core_service.h>
|
||||
#include <trace/source_registry.h>
|
||||
|
||||
namespace Genode {
|
||||
|
||||
@@ -26,13 +27,15 @@ namespace Genode {
|
||||
* Register platform-specific services at entrypoint, and service
|
||||
* registry
|
||||
*
|
||||
* \param ep entrypoint used for session components of platform-services
|
||||
* \param md metadata allocator for session components
|
||||
* \param reg registry where to add platform-specific services
|
||||
* \param ep entrypoint used for session components of platform-services
|
||||
* \param md metadata allocator for session components
|
||||
* \param reg registry where to add platform-specific services
|
||||
* \param trace registry where to add trace subjects
|
||||
*/
|
||||
void platform_add_local_services(Rpc_entrypoint &ep,
|
||||
Sliced_heap &md,
|
||||
Registry<Service> ®);
|
||||
void platform_add_local_services(Rpc_entrypoint &ep,
|
||||
Sliced_heap &md,
|
||||
Registry<Service> ®,
|
||||
Trace::Source_registry &trace);
|
||||
}
|
||||
|
||||
#endif /* _CORE__INCLUDE__PLATFORM_SERVICES_H_ */
|
||||
|
||||
@@ -27,8 +27,9 @@ class Genode::Vm_root : public Root_component<Vm_session_component>
|
||||
{
|
||||
private:
|
||||
|
||||
Ram_allocator &_ram_allocator;
|
||||
Region_map &_local_rm;
|
||||
Ram_allocator &_ram_allocator;
|
||||
Region_map &_local_rm;
|
||||
Trace::Source_registry &_trace_sources;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -48,7 +49,8 @@ class Genode::Vm_root : public Root_component<Vm_session_component>
|
||||
session_resources_from_args(args),
|
||||
session_label_from_args(args),
|
||||
session_diag_from_args(args),
|
||||
_ram_allocator, _local_rm, priority);
|
||||
_ram_allocator, _local_rm, priority,
|
||||
_trace_sources);
|
||||
}
|
||||
|
||||
void _upgrade_session(Vm_session_component *vm, const char *args) override
|
||||
@@ -65,13 +67,15 @@ class Genode::Vm_root : public Root_component<Vm_session_component>
|
||||
* \param session_ep entrypoint managing vm_session components
|
||||
* \param md_alloc meta-data allocator to be used by root component
|
||||
*/
|
||||
Vm_root(Rpc_entrypoint &session_ep,
|
||||
Allocator &md_alloc,
|
||||
Ram_allocator &ram_alloc,
|
||||
Region_map &local_rm)
|
||||
Vm_root(Rpc_entrypoint &session_ep,
|
||||
Allocator &md_alloc,
|
||||
Ram_allocator &ram_alloc,
|
||||
Region_map &local_rm,
|
||||
Trace::Source_registry &trace_sources)
|
||||
: Root_component<Vm_session_component>(&session_ep, &md_alloc),
|
||||
_ram_allocator(ram_alloc),
|
||||
_local_rm(local_rm)
|
||||
_local_rm(local_rm),
|
||||
_trace_sources(trace_sources)
|
||||
{ }
|
||||
};
|
||||
|
||||
|
||||
@@ -277,7 +277,7 @@ int main()
|
||||
static Core_service<Trace::Session_component> trace_service (services, trace_root);
|
||||
|
||||
/* make platform-specific services known to service pool */
|
||||
platform_add_local_services(ep, sliced_heap, services);
|
||||
platform_add_local_services(ep, sliced_heap, services, Trace::sources());
|
||||
|
||||
size_t const avail_ram_quota = core_pd.avail_ram().value;
|
||||
size_t const avail_cap_quota = core_pd.avail_caps().value;
|
||||
|
||||
@@ -16,4 +16,5 @@
|
||||
|
||||
|
||||
void Genode::platform_add_local_services(Rpc_entrypoint &, Sliced_heap &,
|
||||
Registry<Service> &) { }
|
||||
Registry<Service> &,
|
||||
Trace::Source_registry &) { }
|
||||
|
||||
@@ -24,9 +24,10 @@
|
||||
/*
|
||||
* Add x86 specific ioport service
|
||||
*/
|
||||
void Genode::platform_add_local_services(Rpc_entrypoint &,
|
||||
Sliced_heap &sliced_heap,
|
||||
Registry<Service> &local_services)
|
||||
void Genode::platform_add_local_services(Rpc_entrypoint &,
|
||||
Sliced_heap &sliced_heap,
|
||||
Registry<Service> &local_services,
|
||||
Trace::Source_registry &)
|
||||
{
|
||||
static Io_port_root io_port_root(*core_env().pd_session(),
|
||||
platform().io_port_alloc(), sliced_heap);
|
||||
|
||||
Reference in New Issue
Block a user