mirror of
https://github.com/genodelabs/genode.git
synced 2025-03-12 15:34:23 +00:00
core: pass ram, rm, io-ports to local services
This patch replaces the use of 'core_env()' in 'platform_services.cc' by the function arguments 'core_ram', 'core_rm', and 'io_port_ranges'. It also removes the 'Pd_session' argument from 'Io_port_root' and 'Irq_root' to avoid the reliance on the 'Pd_session' interface within core, Issue #5408
This commit is contained in:
parent
43d7c3bd11
commit
fc11e26511
@ -12,7 +12,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* core includes */
|
/* core includes */
|
||||||
#include <core_env.h>
|
|
||||||
#include <platform_services.h>
|
#include <platform_services.h>
|
||||||
#include <vm_root.h>
|
#include <vm_root.h>
|
||||||
#include <io_port_root.h>
|
#include <io_port_root.h>
|
||||||
@ -24,15 +23,15 @@ void Core::platform_add_local_services(Rpc_entrypoint &ep,
|
|||||||
Sliced_heap &heap,
|
Sliced_heap &heap,
|
||||||
Registry<Service> &services,
|
Registry<Service> &services,
|
||||||
Trace::Source_registry &trace_sources,
|
Trace::Source_registry &trace_sources,
|
||||||
Ram_allocator &)
|
Ram_allocator &core_ram,
|
||||||
|
Region_map &core_rm,
|
||||||
|
Range_allocator &io_port_ranges)
|
||||||
{
|
{
|
||||||
static Vm_root vm_root(ep, heap, core_env().ram_allocator(),
|
static Vm_root vm_root(ep, heap, core_ram, core_rm, trace_sources);
|
||||||
core_env().local_rm(), trace_sources);
|
|
||||||
|
|
||||||
static Core_service<Vm_session_component> vm(services, vm_root);
|
static Core_service<Vm_session_component> vm(services, vm_root);
|
||||||
|
|
||||||
static Io_port_root io_root(*core_env().pd_session(),
|
static Io_port_root io_root(io_port_ranges, heap);
|
||||||
platform().io_port_alloc(), heap);
|
|
||||||
|
|
||||||
static Core_service<Io_port_session_component> io_port(services, io_root);
|
static Core_service<Io_port_session_component> io_port(services, io_root);
|
||||||
}
|
}
|
||||||
|
@ -16,12 +16,11 @@
|
|||||||
|
|
||||||
/* core includes */
|
/* core includes */
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
|
#include <platform_pd.h>
|
||||||
#include <platform_services.h>
|
#include <platform_services.h>
|
||||||
#include <core_env.h>
|
|
||||||
#include <core_service.h>
|
#include <core_service.h>
|
||||||
#include <map_local.h>
|
#include <map_local.h>
|
||||||
#include <vm_root.h>
|
#include <vm_root.h>
|
||||||
#include <platform.h>
|
|
||||||
|
|
||||||
using namespace Core;
|
using namespace Core;
|
||||||
|
|
||||||
@ -35,8 +34,10 @@ extern addr_t hypervisor_exception_vector;
|
|||||||
void Core::platform_add_local_services(Rpc_entrypoint &ep,
|
void Core::platform_add_local_services(Rpc_entrypoint &ep,
|
||||||
Sliced_heap &sh,
|
Sliced_heap &sh,
|
||||||
Registry<Service> &services,
|
Registry<Service> &services,
|
||||||
Core::Trace::Source_registry &trace_sources,
|
Trace::Source_registry &trace_sources,
|
||||||
Ram_allocator &)
|
Ram_allocator &core_ram,
|
||||||
|
Region_map &core_rm,
|
||||||
|
Range_allocator &)
|
||||||
{
|
{
|
||||||
map_local(Platform::core_phys_addr((addr_t)&hypervisor_exception_vector),
|
map_local(Platform::core_phys_addr((addr_t)&hypervisor_exception_vector),
|
||||||
Hw::Mm::hypervisor_exception_vector().base,
|
Hw::Mm::hypervisor_exception_vector().base,
|
||||||
@ -51,8 +52,7 @@ void Core::platform_add_local_services(Rpc_entrypoint &ep,
|
|||||||
Hw::Mm::hypervisor_stack().size / get_page_size(),
|
Hw::Mm::hypervisor_stack().size / get_page_size(),
|
||||||
Hw::PAGE_FLAGS_KERN_DATA);
|
Hw::PAGE_FLAGS_KERN_DATA);
|
||||||
|
|
||||||
static Vm_root vm_root(ep, sh, core_env().ram_allocator(),
|
static Vm_root vm_root(ep, sh, core_ram, core_rm, trace_sources);
|
||||||
core_env().local_rm(), trace_sources);
|
|
||||||
static Core_service<Vm_session_component> vm_service(services, vm_root);
|
static Core_service<Vm_session_component> vm_service(services, vm_root);
|
||||||
},
|
},
|
||||||
[&] (Range_allocator::Alloc_error) {
|
[&] (Range_allocator::Alloc_error) {
|
||||||
|
@ -17,7 +17,6 @@
|
|||||||
/* core includes */
|
/* core includes */
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#include <platform_services.h>
|
#include <platform_services.h>
|
||||||
#include <core_env.h>
|
|
||||||
#include <core_service.h>
|
#include <core_service.h>
|
||||||
#include <vm_root.h>
|
#include <vm_root.h>
|
||||||
#include <map_local.h>
|
#include <map_local.h>
|
||||||
@ -31,9 +30,11 @@ extern int monitor_mode_exception_vector;
|
|||||||
*/
|
*/
|
||||||
void Core::platform_add_local_services(Rpc_entrypoint &ep,
|
void Core::platform_add_local_services(Rpc_entrypoint &ep,
|
||||||
Sliced_heap &sliced_heap,
|
Sliced_heap &sliced_heap,
|
||||||
Registry<Service> &local_services,
|
Registry<Service> &services,
|
||||||
Core::Trace::Source_registry &trace_sources,
|
Trace::Source_registry &trace_sources,
|
||||||
Ram_allocator &)
|
Ram_allocator &core_ram,
|
||||||
|
Region_map &core_rm,
|
||||||
|
Range_allocator &)
|
||||||
{
|
{
|
||||||
static addr_t const phys_base =
|
static addr_t const phys_base =
|
||||||
Platform::core_phys_addr((addr_t)&monitor_mode_exception_vector);
|
Platform::core_phys_addr((addr_t)&monitor_mode_exception_vector);
|
||||||
@ -41,8 +42,7 @@ void Core::platform_add_local_services(Rpc_entrypoint &ep,
|
|||||||
map_local(phys_base, Hw::Mm::system_exception_vector().base, 1,
|
map_local(phys_base, Hw::Mm::system_exception_vector().base, 1,
|
||||||
Hw::PAGE_FLAGS_KERN_TEXT);
|
Hw::PAGE_FLAGS_KERN_TEXT);
|
||||||
|
|
||||||
static Vm_root vm_root(ep, sliced_heap, core_env().ram_allocator(),
|
static Vm_root vm_root(ep, sliced_heap, core_ram, core_rm, trace_sources);
|
||||||
core_env().local_rm(), trace_sources);
|
|
||||||
|
|
||||||
static Core_service<Vm_session_component> vm_service(local_services, vm_root);
|
static Core_service<Vm_session_component> vm_service(services, vm_root);
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
#include <base/service.h>
|
#include <base/service.h>
|
||||||
|
|
||||||
/* core includes */
|
/* core includes */
|
||||||
#include <core_env.h>
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#include <platform_services.h>
|
#include <platform_services.h>
|
||||||
#include <vm_root.h>
|
#include <vm_root.h>
|
||||||
@ -30,16 +29,15 @@ void Core::platform_add_local_services(Rpc_entrypoint &ep,
|
|||||||
Sliced_heap &sliced_heap,
|
Sliced_heap &sliced_heap,
|
||||||
Registry<Service> &local_services,
|
Registry<Service> &local_services,
|
||||||
Trace::Source_registry &trace_sources,
|
Trace::Source_registry &trace_sources,
|
||||||
Ram_allocator &)
|
Ram_allocator &core_ram,
|
||||||
|
Region_map &core_rm,
|
||||||
|
Range_allocator &io_port_ranges)
|
||||||
{
|
{
|
||||||
static Io_port_root io_port_root(*core_env().pd_session(),
|
static Io_port_root io_port_root(io_port_ranges, sliced_heap);
|
||||||
platform().io_port_alloc(), sliced_heap);
|
|
||||||
|
|
||||||
static Vm_root vm_root(ep, sliced_heap, core_env().ram_allocator(),
|
static Vm_root vm_root(ep, sliced_heap, core_ram, core_rm, trace_sources);
|
||||||
core_env().local_rm(), trace_sources);
|
|
||||||
|
|
||||||
static Core_service<Vm_session_component> vm_service(local_services, vm_root);
|
static Core_service<Vm_session_component> vm_service(local_services, vm_root);
|
||||||
|
|
||||||
static Core_service<Io_port_session_component>
|
static Core_service<Io_port_session_component> io_port_ls(local_services, io_port_root);
|
||||||
io_port_ls(local_services, io_port_root);
|
|
||||||
}
|
}
|
||||||
|
@ -23,5 +23,7 @@ void Core::platform_add_local_services(Rpc_entrypoint &,
|
|||||||
Sliced_heap &,
|
Sliced_heap &,
|
||||||
Registry<Service> &,
|
Registry<Service> &,
|
||||||
Trace::Source_registry &,
|
Trace::Source_registry &,
|
||||||
Ram_allocator &)
|
Ram_allocator &,
|
||||||
|
Region_map &,
|
||||||
|
Range_allocator &)
|
||||||
{ }
|
{ }
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
|
|
||||||
/* Genode includes */
|
/* Genode includes */
|
||||||
#include <base/service.h>
|
#include <base/service.h>
|
||||||
|
#include <base/heap.h>
|
||||||
|
|
||||||
/* core includes */
|
/* core includes */
|
||||||
#include <core_env.h>
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#include <platform_services.h>
|
#include <platform_services.h>
|
||||||
#include <io_port_root.h>
|
#include <io_port_root.h>
|
||||||
@ -27,16 +27,15 @@ using namespace Core;
|
|||||||
|
|
||||||
void Core::platform_add_local_services(Rpc_entrypoint &,
|
void Core::platform_add_local_services(Rpc_entrypoint &,
|
||||||
Sliced_heap &md,
|
Sliced_heap &md,
|
||||||
Registry<Service> ®,
|
Registry<Service> &services,
|
||||||
Core::Trace::Source_registry &,
|
Trace::Source_registry &,
|
||||||
Ram_allocator &)
|
Ram_allocator &,
|
||||||
|
Region_map &,
|
||||||
|
Range_allocator &io_port_ranges)
|
||||||
{
|
{
|
||||||
if (!lx_iopl(3)) {
|
if (!lx_iopl(3)) {
|
||||||
static Io_port_root io_port_root(*core_env().pd_session(),
|
static Io_port_root io_port_root(io_port_ranges, md);
|
||||||
platform().io_port_alloc(), md);
|
|
||||||
|
|
||||||
static Core_service<Io_port_session_component>
|
static Core_service<Io_port_session_component> io_port_ls(services, io_port_root);
|
||||||
|
|
||||||
io_port_ls(reg, io_port_root);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,6 +24,7 @@
|
|||||||
|
|
||||||
/* core includes */
|
/* core includes */
|
||||||
#include <types.h>
|
#include <types.h>
|
||||||
|
#include <pd_session_component.h>
|
||||||
|
|
||||||
namespace Core { class Vm_session_component; }
|
namespace Core { class Vm_session_component; }
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* core includes */
|
/* core includes */
|
||||||
#include <core_env.h>
|
|
||||||
#include <platform_services.h>
|
#include <platform_services.h>
|
||||||
#include <vm_root.h>
|
#include <vm_root.h>
|
||||||
#include <io_port_root.h>
|
#include <io_port_root.h>
|
||||||
@ -24,14 +23,14 @@ void Core::platform_add_local_services(Rpc_entrypoint &ep,
|
|||||||
Sliced_heap &heap,
|
Sliced_heap &heap,
|
||||||
Registry<Service> &services,
|
Registry<Service> &services,
|
||||||
Trace::Source_registry &trace_sources,
|
Trace::Source_registry &trace_sources,
|
||||||
Ram_allocator &)
|
Ram_allocator &core_ram,
|
||||||
|
Region_map &core_rm,
|
||||||
|
Range_allocator &io_port_ranges)
|
||||||
{
|
{
|
||||||
static Vm_root vm_root(ep, heap, core_env().ram_allocator(),
|
static Vm_root vm_root(ep, heap, core_ram, core_rm, trace_sources);
|
||||||
core_env().local_rm(), trace_sources);
|
|
||||||
static Core_service<Vm_session_component> vm(services, vm_root);
|
static Core_service<Vm_session_component> vm(services, vm_root);
|
||||||
|
|
||||||
static Io_port_root io_root(*core_env().pd_session(),
|
static Io_port_root io_root(io_port_ranges, heap);
|
||||||
platform().io_port_alloc(), heap);
|
|
||||||
|
|
||||||
static Core_service<Io_port_session_component> io_port(services, io_root);
|
static Core_service<Io_port_session_component> io_port(services, io_root);
|
||||||
}
|
}
|
||||||
|
@ -12,7 +12,6 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* core includes */
|
/* core includes */
|
||||||
#include <core_env.h>
|
|
||||||
#include <platform_services.h>
|
#include <platform_services.h>
|
||||||
#include <vm_root.h>
|
#include <vm_root.h>
|
||||||
#include <io_port_root.h>
|
#include <io_port_root.h>
|
||||||
@ -23,15 +22,16 @@
|
|||||||
void Core::platform_add_local_services(Rpc_entrypoint &ep,
|
void Core::platform_add_local_services(Rpc_entrypoint &ep,
|
||||||
Sliced_heap &heap,
|
Sliced_heap &heap,
|
||||||
Registry<Service> &services,
|
Registry<Service> &services,
|
||||||
Core::Trace::Source_registry &trace_sources,
|
Trace::Source_registry &trace_sources,
|
||||||
Ram_allocator &)
|
Ram_allocator &core_ram,
|
||||||
|
Region_map &core_rm,
|
||||||
|
Range_allocator &io_port_ranges)
|
||||||
{
|
{
|
||||||
static Vm_root vm_root(ep, heap, core_env().ram_allocator(),
|
static Vm_root vm_root(ep, heap, core_ram, core_rm, trace_sources);
|
||||||
core_env().local_rm(), trace_sources);
|
|
||||||
static Core_service<Vm_session_component> vm(services, vm_root);
|
static Core_service<Vm_session_component> vm(services, vm_root);
|
||||||
|
|
||||||
static Io_port_root io_root(*core_env().pd_session(),
|
static Io_port_root io_root(io_port_ranges, heap);
|
||||||
platform().io_port_alloc(), heap);
|
|
||||||
|
|
||||||
static Core_service<Io_port_session_component> io_port(services, io_root);
|
static Core_service<Io_port_session_component> io_port(services, io_root);
|
||||||
}
|
}
|
||||||
|
@ -25,27 +25,17 @@ namespace Core {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class Core::Io_port_handler
|
struct Core::Io_port_handler
|
||||||
{
|
{
|
||||||
private:
|
static constexpr size_t STACK_SIZE = 4096;
|
||||||
|
|
||||||
enum { STACK_SIZE = 4096 };
|
Rpc_entrypoint handler_ep { nullptr, STACK_SIZE, "ioport", Affinity::Location() };
|
||||||
Rpc_entrypoint _ep;
|
|
||||||
|
|
||||||
public:
|
|
||||||
|
|
||||||
Io_port_handler(Pd_session &pd_session) :
|
|
||||||
_ep(&pd_session, STACK_SIZE, "ioport", Affinity::Location())
|
|
||||||
{ }
|
|
||||||
|
|
||||||
Rpc_entrypoint &entrypoint() { return _ep; }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
class Core::Io_port_root : private Io_port_handler,
|
class Core::Io_port_root : private Io_port_handler,
|
||||||
public Root_component<Io_port_session_component>
|
public Root_component<Io_port_session_component>
|
||||||
{
|
{
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
Range_allocator &_io_port_alloc; /* I/O port allocator */
|
Range_allocator &_io_port_alloc; /* I/O port allocator */
|
||||||
@ -60,17 +50,14 @@ class Core::Io_port_root : private Io_port_handler,
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* \param cap_session capability allocator
|
|
||||||
* \param io_port_alloc platform IO_PORT allocator
|
* \param io_port_alloc platform IO_PORT allocator
|
||||||
* \param md_alloc meta-data allocator to be used by root component
|
* \param md_alloc meta-data allocator to be used by root component
|
||||||
*/
|
*/
|
||||||
Io_port_root(Pd_session &pd_session,
|
Io_port_root(Range_allocator &io_port_alloc, Allocator &md_alloc)
|
||||||
Range_allocator &io_port_alloc,
|
|
||||||
Allocator &md_alloc)
|
|
||||||
:
|
:
|
||||||
Io_port_handler(pd_session),
|
Root_component<Io_port_session_component>(&handler_ep, &md_alloc),
|
||||||
Root_component<Io_port_session_component>(&entrypoint(), &md_alloc),
|
_io_port_alloc(io_port_alloc)
|
||||||
_io_port_alloc(io_port_alloc) { }
|
{ }
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__IO_PORT_ROOT_H_ */
|
#endif /* _CORE__INCLUDE__IO_PORT_ROOT_H_ */
|
||||||
|
@ -50,15 +50,13 @@ class Core::Irq_root : public Root_component<Irq_session_component>
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*
|
*
|
||||||
* \param pd_session capability allocator
|
|
||||||
* \param irq_alloc IRQ range that can be assigned to clients
|
* \param irq_alloc IRQ range that can be assigned to clients
|
||||||
* \param md_alloc meta-data allocator to be used by root component
|
* \param md_alloc meta-data allocator to be used by root component
|
||||||
*/
|
*/
|
||||||
Irq_root(Pd_session &pd_session,
|
Irq_root(Range_allocator &irq_alloc, Allocator &md_alloc)
|
||||||
Range_allocator &irq_alloc, Allocator &md_alloc)
|
|
||||||
:
|
:
|
||||||
Root_component<Irq_session_component>(&_session_ep, &md_alloc),
|
Root_component<Irq_session_component>(&_session_ep, &md_alloc),
|
||||||
_session_ep(&pd_session, STACK_SIZE, "irq", Affinity::Location()),
|
_session_ep(nullptr, STACK_SIZE, "irq", Affinity::Location()),
|
||||||
_irq_alloc(irq_alloc)
|
_irq_alloc(irq_alloc)
|
||||||
{ }
|
{ }
|
||||||
};
|
};
|
||||||
|
@ -14,8 +14,10 @@
|
|||||||
#ifndef _CORE__INCLUDE__PLATFORM_SERVICES_H_
|
#ifndef _CORE__INCLUDE__PLATFORM_SERVICES_H_
|
||||||
#define _CORE__INCLUDE__PLATFORM_SERVICES_H_
|
#define _CORE__INCLUDE__PLATFORM_SERVICES_H_
|
||||||
|
|
||||||
|
/* Genode includes */
|
||||||
|
#include <base/ram_allocator.h>
|
||||||
|
|
||||||
/* core includes */
|
/* core includes */
|
||||||
#include "base/ram_allocator.h"
|
|
||||||
#include <core_service.h>
|
#include <core_service.h>
|
||||||
#include <trace/source_registry.h>
|
#include <trace/source_registry.h>
|
||||||
|
|
||||||
@ -28,8 +30,7 @@ namespace Genode {
|
|||||||
namespace Core {
|
namespace Core {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register platform-specific services at entrypoint, and service
|
* Register platform-specific services at entrypoint, and service registry
|
||||||
* registry
|
|
||||||
*
|
*
|
||||||
* \param ep entrypoint used for session components of platform-services
|
* \param ep entrypoint used for session components of platform-services
|
||||||
* \param md metadata allocator for session components
|
* \param md metadata allocator for session components
|
||||||
@ -40,7 +41,9 @@ namespace Core {
|
|||||||
Sliced_heap &md,
|
Sliced_heap &md,
|
||||||
Registry<Service> ®,
|
Registry<Service> ®,
|
||||||
Trace::Source_registry &trace,
|
Trace::Source_registry &trace,
|
||||||
Ram_allocator &core_ram_alloc);
|
Ram_allocator &core_ram,
|
||||||
|
Region_map &core_rm,
|
||||||
|
Range_allocator &io_port_ranges);
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* _CORE__INCLUDE__PLATFORM_SERVICES_H_ */
|
#endif /* _CORE__INCLUDE__PLATFORM_SERVICES_H_ */
|
||||||
|
@ -276,8 +276,7 @@ void Genode::bootstrap_component(Genode::Platform &)
|
|||||||
static Log_root log_root (ep, sliced_heap);
|
static Log_root log_root (ep, sliced_heap);
|
||||||
static Io_mem_root io_mem_root (ep, ep, platform().io_mem_alloc(),
|
static Io_mem_root io_mem_root (ep, ep, platform().io_mem_alloc(),
|
||||||
platform().ram_alloc(), sliced_heap);
|
platform().ram_alloc(), sliced_heap);
|
||||||
static Irq_root irq_root (*core_env().pd_session(),
|
static Irq_root irq_root (platform().irq_alloc(), sliced_heap);
|
||||||
platform().irq_alloc(), sliced_heap);
|
|
||||||
static Trace_root trace_root (core_ram_alloc, local_rm, ep, sliced_heap,
|
static Trace_root trace_root (core_ram_alloc, local_rm, ep, sliced_heap,
|
||||||
Core::Trace::sources(), trace_policies);
|
Core::Trace::sources(), trace_policies);
|
||||||
|
|
||||||
@ -291,7 +290,8 @@ void Genode::bootstrap_component(Genode::Platform &)
|
|||||||
static Core_service<Trace_session_component> trace_service (services, trace_root);
|
static Core_service<Trace_session_component> trace_service (services, trace_root);
|
||||||
|
|
||||||
/* make platform-specific services known to service pool */
|
/* make platform-specific services known to service pool */
|
||||||
platform_add_local_services(ep, sliced_heap, services, Core::Trace::sources(), core_ram_alloc);
|
platform_add_local_services(ep, sliced_heap, services, Core::Trace::sources(),
|
||||||
|
core_ram_alloc, local_rm, platform().io_port_alloc());
|
||||||
|
|
||||||
size_t const avail_ram_quota = core_pd.avail_ram().value;
|
size_t const avail_ram_quota = core_pd.avail_ram().value;
|
||||||
size_t const avail_cap_quota = core_pd.avail_caps().value;
|
size_t const avail_cap_quota = core_pd.avail_caps().value;
|
||||||
|
@ -18,4 +18,7 @@
|
|||||||
void Core::platform_add_local_services(Rpc_entrypoint &, Sliced_heap &,
|
void Core::platform_add_local_services(Rpc_entrypoint &, Sliced_heap &,
|
||||||
Registry<Service> &,
|
Registry<Service> &,
|
||||||
Trace::Source_registry &,
|
Trace::Source_registry &,
|
||||||
Ram_allocator &) { }
|
Ram_allocator &,
|
||||||
|
Region_map &,
|
||||||
|
Range_allocator &)
|
||||||
|
{ }
|
||||||
|
@ -13,9 +13,9 @@
|
|||||||
|
|
||||||
/* Genode includes */
|
/* Genode includes */
|
||||||
#include <base/service.h>
|
#include <base/service.h>
|
||||||
|
#include <base/heap.h>
|
||||||
|
|
||||||
/* core includes */
|
/* core includes */
|
||||||
#include <core_env.h>
|
|
||||||
#include <platform.h>
|
#include <platform.h>
|
||||||
#include <platform_services.h>
|
#include <platform_services.h>
|
||||||
#include <io_port_root.h>
|
#include <io_port_root.h>
|
||||||
@ -28,11 +28,12 @@ void Core::platform_add_local_services(Rpc_entrypoint &,
|
|||||||
Sliced_heap &sliced_heap,
|
Sliced_heap &sliced_heap,
|
||||||
Registry<Service> &local_services,
|
Registry<Service> &local_services,
|
||||||
Trace::Source_registry &,
|
Trace::Source_registry &,
|
||||||
Ram_allocator &)
|
Ram_allocator &,
|
||||||
|
Region_map &,
|
||||||
|
Range_allocator &io_port_ranges)
|
||||||
{
|
{
|
||||||
static Io_port_root io_port_root(*core_env().pd_session(),
|
static Io_port_root io_port_root(io_port_ranges, sliced_heap);
|
||||||
platform().io_port_alloc(), sliced_heap);
|
|
||||||
|
|
||||||
static Core_service<Io_port_session_component>
|
static Core_service<Io_port_session_component> io_port_ls(local_services,
|
||||||
io_port_ls(local_services, io_port_root);
|
io_port_root);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user