2016-04-15 15:19:22 +02:00
|
|
|
/*
|
|
|
|
* \brief Core-specific region map
|
|
|
|
* \author Norman Feske
|
|
|
|
* \date 2006-07-12
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Copyright (C) 2006-2013 Genode Labs GmbH
|
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
|
|
|
* under the terms of the GNU General Public License version 2.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _CORE__INCLUDE__CORE_REGION_MAP_H_
|
|
|
|
#define _CORE__INCLUDE__CORE_REGION_MAP_H_
|
|
|
|
|
|
|
|
/* Genode includes */
|
|
|
|
#include <region_map/region_map.h>
|
|
|
|
#include <base/rpc_server.h>
|
|
|
|
|
|
|
|
/* core includes */
|
|
|
|
#include <dataspace_component.h>
|
|
|
|
|
|
|
|
namespace Genode { class Core_region_map; }
|
|
|
|
|
|
|
|
|
|
|
|
class Genode::Core_region_map : public Region_map
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
|
2016-04-20 21:12:57 +02:00
|
|
|
Rpc_entrypoint &_ep;
|
2016-04-15 15:19:22 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
|
2016-04-20 21:12:57 +02:00
|
|
|
Core_region_map(Rpc_entrypoint &ep) : _ep(ep) { }
|
2016-04-15 15:19:22 +02:00
|
|
|
|
2016-04-20 21:12:57 +02:00
|
|
|
Local_addr attach(Dataspace_capability, size_t size = 0,
|
2016-04-15 15:19:22 +02:00
|
|
|
off_t offset=0, bool use_local_addr = false,
|
|
|
|
Local_addr local_addr = 0,
|
2016-04-20 21:12:57 +02:00
|
|
|
bool executable = false) override;
|
2016-04-15 15:19:22 +02:00
|
|
|
|
2016-04-20 21:12:57 +02:00
|
|
|
void detach(Local_addr);
|
2016-04-15 15:19:22 +02:00
|
|
|
|
2016-04-20 21:12:57 +02:00
|
|
|
void fault_handler (Signal_context_capability) override { }
|
|
|
|
State state () override { return State(); }
|
2016-04-15 15:19:22 +02:00
|
|
|
|
|
|
|
Dataspace_capability dataspace() override { return Dataspace_capability(); }
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* _CORE__INCLUDE__CORE_REGION_MAP_H_ */
|