mirror of
https://github.com/genodelabs/genode.git
synced 2024-12-18 21:27:56 +00:00
base: provide core_ram_allocator via platform_add_local_services()
This is a prerequisite to rework the allocation of core data structures for VM sessions in hw. Issue #5221
This commit is contained in:
parent
d5f3cc6ec2
commit
b21c8729ea
@ -23,7 +23,8 @@
|
||||
void Core::platform_add_local_services(Rpc_entrypoint &ep,
|
||||
Sliced_heap &heap,
|
||||
Registry<Service> &services,
|
||||
Trace::Source_registry &trace_sources)
|
||||
Trace::Source_registry &trace_sources,
|
||||
Ram_allocator &)
|
||||
{
|
||||
static Vm_root vm_root(ep, heap, core_env().ram_allocator(),
|
||||
core_env().local_rm(), trace_sources);
|
||||
|
@ -35,7 +35,8 @@ extern addr_t hypervisor_exception_vector;
|
||||
void Core::platform_add_local_services(Rpc_entrypoint &ep,
|
||||
Sliced_heap &sh,
|
||||
Registry<Service> &services,
|
||||
Core::Trace::Source_registry &trace_sources)
|
||||
Core::Trace::Source_registry &trace_sources,
|
||||
Ram_allocator &)
|
||||
{
|
||||
map_local(Platform::core_phys_addr((addr_t)&hypervisor_exception_vector),
|
||||
Hw::Mm::hypervisor_exception_vector().base,
|
||||
|
@ -32,7 +32,8 @@ extern int monitor_mode_exception_vector;
|
||||
void Core::platform_add_local_services(Rpc_entrypoint &ep,
|
||||
Sliced_heap &sliced_heap,
|
||||
Registry<Service> &local_services,
|
||||
Core::Trace::Source_registry &trace_sources)
|
||||
Core::Trace::Source_registry &trace_sources,
|
||||
Ram_allocator &)
|
||||
{
|
||||
static addr_t const phys_base =
|
||||
Platform::core_phys_addr((addr_t)&monitor_mode_exception_vector);
|
||||
|
@ -29,7 +29,8 @@
|
||||
void Core::platform_add_local_services(Rpc_entrypoint &ep,
|
||||
Sliced_heap &sliced_heap,
|
||||
Registry<Service> &local_services,
|
||||
Trace::Source_registry &trace_sources)
|
||||
Trace::Source_registry &trace_sources,
|
||||
Ram_allocator &)
|
||||
{
|
||||
static Io_port_root io_port_root(*core_env().pd_session(),
|
||||
platform().io_port_alloc(), sliced_heap);
|
||||
|
@ -22,5 +22,6 @@
|
||||
void Core::platform_add_local_services(Rpc_entrypoint &,
|
||||
Sliced_heap &,
|
||||
Registry<Service> &,
|
||||
Trace::Source_registry &)
|
||||
Trace::Source_registry &,
|
||||
Ram_allocator &)
|
||||
{ }
|
||||
|
@ -28,7 +28,8 @@ using namespace Core;
|
||||
void Core::platform_add_local_services(Rpc_entrypoint &,
|
||||
Sliced_heap &md,
|
||||
Registry<Service> ®,
|
||||
Core::Trace::Source_registry &)
|
||||
Core::Trace::Source_registry &,
|
||||
Ram_allocator &)
|
||||
{
|
||||
if (!lx_iopl(3)) {
|
||||
static Io_port_root io_port_root(*core_env().pd_session(),
|
||||
|
@ -23,7 +23,8 @@
|
||||
void Core::platform_add_local_services(Rpc_entrypoint &ep,
|
||||
Sliced_heap &heap,
|
||||
Registry<Service> &services,
|
||||
Trace::Source_registry &trace_sources)
|
||||
Trace::Source_registry &trace_sources,
|
||||
Ram_allocator &)
|
||||
{
|
||||
static Vm_root vm_root(ep, heap, core_env().ram_allocator(),
|
||||
core_env().local_rm(), trace_sources);
|
||||
|
@ -23,7 +23,8 @@
|
||||
void Core::platform_add_local_services(Rpc_entrypoint &ep,
|
||||
Sliced_heap &heap,
|
||||
Registry<Service> &services,
|
||||
Core::Trace::Source_registry &trace_sources)
|
||||
Core::Trace::Source_registry &trace_sources,
|
||||
Ram_allocator &)
|
||||
{
|
||||
static Vm_root vm_root(ep, heap, core_env().ram_allocator(),
|
||||
core_env().local_rm(), trace_sources);
|
||||
|
@ -15,6 +15,7 @@
|
||||
#define _CORE__INCLUDE__PLATFORM_SERVICES_H_
|
||||
|
||||
/* core includes */
|
||||
#include "base/ram_allocator.h"
|
||||
#include <core_service.h>
|
||||
#include <trace/source_registry.h>
|
||||
|
||||
@ -38,7 +39,8 @@ namespace Core {
|
||||
void platform_add_local_services(Rpc_entrypoint &ep,
|
||||
Sliced_heap &md,
|
||||
Registry<Service> ®,
|
||||
Trace::Source_registry &trace);
|
||||
Trace::Source_registry &trace,
|
||||
Ram_allocator &core_ram_alloc);
|
||||
}
|
||||
|
||||
#endif /* _CORE__INCLUDE__PLATFORM_SERVICES_H_ */
|
||||
|
@ -289,7 +289,7 @@ void Genode::bootstrap_component(Genode::Platform &)
|
||||
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, Core::Trace::sources());
|
||||
platform_add_local_services(ep, sliced_heap, services, Core::Trace::sources(), core_ram_alloc);
|
||||
|
||||
size_t const avail_ram_quota = core_pd.avail_ram().value;
|
||||
size_t const avail_cap_quota = core_pd.avail_caps().value;
|
||||
|
@ -17,4 +17,5 @@
|
||||
|
||||
void Core::platform_add_local_services(Rpc_entrypoint &, Sliced_heap &,
|
||||
Registry<Service> &,
|
||||
Trace::Source_registry &) { }
|
||||
Trace::Source_registry &,
|
||||
Ram_allocator &) { }
|
||||
|
@ -27,7 +27,8 @@
|
||||
void Core::platform_add_local_services(Rpc_entrypoint &,
|
||||
Sliced_heap &sliced_heap,
|
||||
Registry<Service> &local_services,
|
||||
Trace::Source_registry &)
|
||||
Trace::Source_registry &,
|
||||
Ram_allocator &)
|
||||
{
|
||||
static Io_port_root io_port_root(*core_env().pd_session(),
|
||||
platform().io_port_alloc(), sliced_heap);
|
||||
|
Loading…
Reference in New Issue
Block a user