2015-11-05 22:15:50 +01:00
|
|
|
/*
|
|
|
|
* \brief Device PD handling for the platform driver
|
|
|
|
* \author Alexander Boettcher
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 13:23:52 +01:00
|
|
|
* Copyright (C) 2014-2017 Genode Labs GmbH
|
2015-11-05 22:15:50 +01:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 13:23:52 +01:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2015-11-05 22:15:50 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2017-02-01 14:04:53 +01:00
|
|
|
#include <os/static_parent_services.h>
|
2015-11-05 22:15:50 +01:00
|
|
|
#include <os/slave.h>
|
|
|
|
|
2016-11-06 14:27:26 +01:00
|
|
|
enum { STACK_SIZE = 4 * sizeof(void *) * 1024 };
|
2015-11-05 22:15:50 +01:00
|
|
|
|
|
|
|
namespace Platform { class Device_pd_policy; }
|
|
|
|
|
2017-02-01 14:04:53 +01:00
|
|
|
class Platform::Device_pd_policy
|
|
|
|
:
|
|
|
|
private Genode::Static_parent_services<Genode::Ram_session,
|
|
|
|
Genode::Pd_session,
|
|
|
|
Genode::Cpu_session,
|
|
|
|
Genode::Log_session,
|
|
|
|
Genode::Rom_session>,
|
|
|
|
public Genode::Slave::Policy
|
2015-11-05 22:15:50 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
|
2016-11-06 14:27:26 +01:00
|
|
|
Device_pd_policy(Genode::Rpc_entrypoint &slave_ep,
|
|
|
|
Genode::Region_map &local_rm,
|
2015-11-16 14:04:04 +01:00
|
|
|
Genode::Ram_session_capability ram_ref_cap,
|
2017-05-08 01:33:40 +02:00
|
|
|
Genode::Ram_quota ram_quota,
|
2016-11-06 14:27:26 +01:00
|
|
|
Genode::Session_label const &label)
|
2015-11-05 22:15:50 +01:00
|
|
|
:
|
2017-02-01 14:04:53 +01:00
|
|
|
Genode::Slave::Policy(label, "device_pd", *this, slave_ep, local_rm,
|
2016-11-06 14:27:26 +01:00
|
|
|
ram_ref_cap, ram_quota)
|
2015-11-05 22:15:50 +01:00
|
|
|
{ }
|
|
|
|
};
|
|
|
|
|