2015-03-27 13:13:46 +00:00
|
|
|
/*
|
|
|
|
* \brief Abstract platform device interface
|
|
|
|
* \author Alexander Boettcher
|
|
|
|
* \date 2015-03-15
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
2017-02-20 12:23:52 +00:00
|
|
|
* Copyright (C) 2015-2017 Genode Labs GmbH
|
2015-03-27 13:13:46 +00:00
|
|
|
*
|
|
|
|
* This file is part of the Genode OS framework, which is distributed
|
2017-02-20 12:23:52 +00:00
|
|
|
* under the terms of the GNU Affero General Public License version 3.
|
2015-03-27 13:13:46 +00:00
|
|
|
*/
|
|
|
|
|
2015-09-03 12:55:05 +00:00
|
|
|
#ifndef _INCLUDE__PLATFORM_DEVICE__DEVICE_H_
|
|
|
|
#define _INCLUDE__PLATFORM_DEVICE__DEVICE_H_
|
2015-03-27 13:13:46 +00:00
|
|
|
|
2015-09-09 09:06:36 +00:00
|
|
|
#include <base/cache.h>
|
2015-03-27 13:13:46 +00:00
|
|
|
#include <irq_session/capability.h>
|
2015-04-12 11:01:19 +00:00
|
|
|
#include <io_mem_session/capability.h>
|
2015-03-27 13:13:46 +00:00
|
|
|
|
2015-06-08 07:05:32 +00:00
|
|
|
namespace Platform { class Abstract_device; }
|
2015-03-27 13:13:46 +00:00
|
|
|
|
2015-06-08 07:05:32 +00:00
|
|
|
struct Platform::Abstract_device
|
2015-03-27 13:13:46 +00:00
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Get IRQ session capability
|
|
|
|
*/
|
|
|
|
virtual Genode::Irq_session_capability irq(Genode::uint8_t) = 0;
|
2015-04-12 11:01:19 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Get IO mem session capability of specified resource id
|
|
|
|
*/
|
2015-09-09 09:06:36 +00:00
|
|
|
virtual Genode::Io_mem_session_capability io_mem(Genode::uint8_t,
|
|
|
|
Genode::Cache_attribute,
|
|
|
|
Genode::addr_t, Genode::size_t) = 0;
|
2015-03-27 13:13:46 +00:00
|
|
|
};
|
2015-09-03 12:55:05 +00:00
|
|
|
|
|
|
|
#endif /* _INCLUDE__PLATFORM_DEVICE__DEVICE_H_ */
|