mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-18 15:18:20 +00:00
committed by
Christian Helmuth
parent
32e792dc74
commit
1f40d9de6a
@ -1,22 +0,0 @@
|
||||
/*
|
||||
* \brief PCI session capability type
|
||||
* \author Norman Feske
|
||||
* \date 2008-08-16
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2008-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 _INCLUDE__PCI_SESSION__CAPABILITY_H_
|
||||
#define _INCLUDE__PCI_SESSION__CAPABILITY_H_
|
||||
|
||||
#include <base/capability.h>
|
||||
#include <pci_session/pci_session.h>
|
||||
|
||||
namespace Pci { typedef Genode::Capability<Session> Session_capability; }
|
||||
|
||||
#endif /* _INCLUDE__PCI_SESSION__CAPABILITY_H_ */
|
@ -1,32 +0,0 @@
|
||||
/*
|
||||
* \brief Connection to PCI service
|
||||
* \author Norman Feske
|
||||
* \date 2008-08-22
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2008-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 _INCLUDE__PCI_SESSION__CONNECTION_H_
|
||||
#define _INCLUDE__PCI_SESSION__CONNECTION_H_
|
||||
|
||||
#include <pci_session/client.h>
|
||||
#include <base/connection.h>
|
||||
|
||||
namespace Pci { struct Connection; }
|
||||
|
||||
|
||||
struct Pci::Connection : Genode::Connection<Session>, Session_client
|
||||
{
|
||||
Connection()
|
||||
:
|
||||
Genode::Connection<Session>(session("ram_quota=12K")),
|
||||
Session_client(cap())
|
||||
{ }
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__PCI_SESSION__CONNECTION_H_ */
|
@ -16,9 +16,9 @@
|
||||
#include <irq_session/capability.h>
|
||||
#include <io_mem_session/capability.h>
|
||||
|
||||
namespace Platform { class Device; }
|
||||
namespace Platform { class Abstract_device; }
|
||||
|
||||
struct Platform::Device
|
||||
struct Platform::Abstract_device
|
||||
{
|
||||
/**
|
||||
* Get IRQ session capability
|
||||
|
@ -11,12 +11,9 @@
|
||||
* under the terms of the GNU General Public License version 2.
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE__PCI_DEVICE__CAPABILITY_H_
|
||||
#define _INCLUDE__PCI_DEVICE__CAPABILITY_H_
|
||||
#pragma once
|
||||
|
||||
#include <base/capability.h>
|
||||
#include <pci_device/pci_device.h>
|
||||
#include <platform_device/platform_device.h>
|
||||
|
||||
namespace Pci { typedef Genode::Capability<Device> Device_capability; }
|
||||
|
||||
#endif /* _INCLUDE__PCI_DEVICE__CAPABILITY_H_ */
|
||||
namespace Platform { typedef Genode::Capability<Device> Device_capability; }
|
@ -11,18 +11,17 @@
|
||||
* under the terms of the GNU General Public License version 2.
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE__PCI_DEVICE__CLIENT_H_
|
||||
#define _INCLUDE__PCI_DEVICE__CLIENT_H_
|
||||
#pragma once
|
||||
|
||||
#include <pci_session/pci_session.h>
|
||||
#include <pci_device/pci_device.h>
|
||||
#include <platform_session/platform_session.h>
|
||||
#include <platform_device/platform_device.h>
|
||||
#include <base/rpc_client.h>
|
||||
#include <io_mem_session/io_mem_session.h>
|
||||
|
||||
namespace Pci { struct Device_client; }
|
||||
namespace Platform { struct Device_client; }
|
||||
|
||||
|
||||
struct Pci::Device_client : public Genode::Rpc_client<Device>
|
||||
struct Platform::Device_client : public Genode::Rpc_client<Device>
|
||||
{
|
||||
Device_client(Device_capability device)
|
||||
: Genode::Rpc_client<Device>(device) { }
|
||||
@ -57,5 +56,3 @@ struct Pci::Device_client : public Genode::Rpc_client<Device>
|
||||
Genode::Io_mem_session_capability io_mem(Genode::uint8_t id) override {
|
||||
return call<Rpc_io_mem>(id); }
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__PCI_DEVICE__CLIENT_H_ */
|
@ -11,8 +11,7 @@
|
||||
* under the terms of the GNU General Public License version 2.
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE__PCI_DEVICE__PCI_DEVICE_H_
|
||||
#define _INCLUDE__PCI_DEVICE__PCI_DEVICE_H_
|
||||
#pragma once
|
||||
|
||||
#include <base/rpc.h>
|
||||
#include <base/signal.h>
|
||||
@ -26,10 +25,10 @@
|
||||
#include <platform/device.h>
|
||||
|
||||
|
||||
namespace Pci { struct Device; }
|
||||
namespace Platform { struct Device; }
|
||||
|
||||
|
||||
struct Pci::Device : Platform::Device
|
||||
struct Platform::Device : Platform::Abstract_device
|
||||
{
|
||||
/*********************
|
||||
** Exception types **
|
||||
@ -258,5 +257,3 @@ struct Pci::Device : Platform::Device
|
||||
Genode::Meta::Empty>
|
||||
> > > > > > > > > Rpc_functions;
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__PCI_DEVICE__PCI_DEVICE_H_ */
|
@ -11,20 +11,19 @@
|
||||
* under the terms of the GNU General Public License version 2.
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE__PCI_SESSION__CLIENT_H_
|
||||
#define _INCLUDE__PCI_SESSION__CLIENT_H_
|
||||
#pragma once
|
||||
|
||||
#include <base/rpc_client.h>
|
||||
|
||||
#include <pci_device/client.h>
|
||||
#include <pci_session/capability.h>
|
||||
#include <platform_device/client.h>
|
||||
#include <platform_session/capability.h>
|
||||
|
||||
namespace Pci { struct Session_client; }
|
||||
namespace Platform { struct Client; }
|
||||
|
||||
|
||||
struct Pci::Session_client : public Genode::Rpc_client<Session>
|
||||
struct Platform::Client : public Genode::Rpc_client<Session>
|
||||
{
|
||||
Session_client(Session_capability session)
|
||||
Client(Session_capability session)
|
||||
: Genode::Rpc_client<Session>(session) { }
|
||||
|
||||
Device_capability first_device(unsigned device_class = 0,
|
||||
@ -51,5 +50,3 @@ struct Pci::Session_client : public Genode::Rpc_client<Session>
|
||||
Device_capability device(String const &device) override {
|
||||
return call<Rpc_device>(device); }
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__PCI_SESSION__CLIENT_H_ */
|
29
repos/os/include/platform/x86/platform_session/connection.h
Normal file
29
repos/os/include/platform/x86/platform_session/connection.h
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
* \brief Connection to Platform service
|
||||
* \author Norman Feske
|
||||
* \date 2008-08-22
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright (C) 2008-2015 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.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <base/connection.h>
|
||||
#include <platform_session/client.h>
|
||||
|
||||
namespace Platform { struct Connection; }
|
||||
|
||||
|
||||
struct Platform::Connection : Genode::Connection<Session>, Client
|
||||
{
|
||||
Connection()
|
||||
:
|
||||
Genode::Connection<Session>(session("ram_quota=12K")),
|
||||
Client(cap())
|
||||
{ }
|
||||
};
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* \brief PCI session interface
|
||||
* \brief Platform session interface
|
||||
* \author Norman Feske
|
||||
* \date 2008-01-28
|
||||
*/
|
||||
@ -11,27 +11,22 @@
|
||||
* under the terms of the GNU General Public License version 2.
|
||||
*/
|
||||
|
||||
#ifndef _INCLUDE__PCI_SESSION__PCI_SESSION_H_
|
||||
#define _INCLUDE__PCI_SESSION__PCI_SESSION_H_
|
||||
#pragma once
|
||||
|
||||
/* base */
|
||||
#include <session/session.h>
|
||||
#include <ram_session/ram_session.h>
|
||||
|
||||
/* os */
|
||||
#include <pci_device/pci_device.h>
|
||||
#include <platform_device/platform_device.h>
|
||||
#include <platform_device/capability.h>
|
||||
|
||||
namespace Pci {
|
||||
|
||||
typedef Genode::Capability<Pci::Device> Device_capability;
|
||||
|
||||
struct Session;
|
||||
}
|
||||
namespace Platform { struct Session; }
|
||||
|
||||
|
||||
struct Pci::Session : Genode::Session
|
||||
struct Platform::Session : Genode::Session
|
||||
{
|
||||
static const char *service_name() { return "PCI"; }
|
||||
static const char *service_name() { return "Platform"; }
|
||||
|
||||
virtual ~Session() { }
|
||||
|
||||
@ -87,24 +82,24 @@ struct Pci::Session : Genode::Session
|
||||
*********************/
|
||||
|
||||
GENODE_RPC_THROW(Rpc_first_device, Device_capability, first_device,
|
||||
GENODE_TYPE_LIST(Pci::Device::Quota_exceeded),
|
||||
GENODE_TYPE_LIST(Platform::Device::Quota_exceeded),
|
||||
unsigned, unsigned);
|
||||
GENODE_RPC_THROW(Rpc_next_device, Device_capability, next_device,
|
||||
GENODE_TYPE_LIST(Pci::Device::Quota_exceeded),
|
||||
GENODE_TYPE_LIST(Platform::Device::Quota_exceeded),
|
||||
Device_capability, unsigned, unsigned);
|
||||
GENODE_RPC(Rpc_release_device, void, release_device, Device_capability);
|
||||
GENODE_RPC_THROW(Rpc_config_extended, Genode::Io_mem_dataspace_capability,
|
||||
config_extended,
|
||||
GENODE_TYPE_LIST(Pci::Device::Quota_exceeded),
|
||||
GENODE_TYPE_LIST(Platform::Device::Quota_exceeded),
|
||||
Device_capability);
|
||||
GENODE_RPC_THROW(Rpc_alloc_dma_buffer, Genode::Ram_dataspace_capability,
|
||||
alloc_dma_buffer,
|
||||
GENODE_TYPE_LIST(Pci::Device::Quota_exceeded),
|
||||
GENODE_TYPE_LIST(Platform::Device::Quota_exceeded),
|
||||
Genode::size_t);
|
||||
GENODE_RPC(Rpc_free_dma_buffer, void, free_dma_buffer,
|
||||
Genode::Ram_dataspace_capability);
|
||||
GENODE_RPC_THROW(Rpc_device, Device_capability, device,
|
||||
GENODE_TYPE_LIST(Pci::Device::Quota_exceeded),
|
||||
GENODE_TYPE_LIST(Platform::Device::Quota_exceeded),
|
||||
String const &);
|
||||
|
||||
GENODE_RPC_INTERFACE(Rpc_first_device, Rpc_next_device,
|
||||
@ -112,5 +107,3 @@ struct Pci::Session : Genode::Session
|
||||
Rpc_alloc_dma_buffer, Rpc_free_dma_buffer,
|
||||
Rpc_device);
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__PCI_SESSION__PCI_SESSION_H_ */
|
Reference in New Issue
Block a user