base: assign allocator and quota to platform pd

Enable platform specific allocations and ram quota accounting for
protection domains. Needed to allocate object identity references
in the base-hw kernel when delegating capabilities via IPC.
Moreover, it can be used to account translation table entries in the
future.

Ref #1443
This commit is contained in:
Stefan Kalkowski
2015-04-09 15:33:20 +02:00
committed by Christian Helmuth
parent d9d65aa86b
commit 358380046c
19 changed files with 92 additions and 49 deletions

View File

@ -14,6 +14,9 @@
#ifndef _CORE__INCLUDE__PLATFORM_PD_H_
#define _CORE__INCLUDE__PLATFORM_PD_H_
/* Genode includes */
#include <base/allocator.h>
/* core includes */
#include <platform_thread.h>
#include <address_space.h>
@ -42,7 +45,8 @@ namespace Genode {
* Constructors
*/
Platform_pd(bool core);
Platform_pd(char const *, signed pd_id = -1, bool create = true);
Platform_pd(Allocator * md_alloc, size_t ram_quota,
char const *, signed pd_id = -1, bool create = true);
/**
* Destructor

View File

@ -98,7 +98,8 @@ Platform_pd::Platform_pd(bool core)
}
Platform_pd::Platform_pd(char const *, signed pd_id, bool create)
Platform_pd::Platform_pd(Allocator * md_alloc, size_t ram_quota,
char const *, signed pd_id, bool create)
: _space_id(TASK_ID_INVALID)
{
_space_id = TASK_ID_INVALID;