/* * \brief Client-side interface for PCI device * \author Norman Feske * \date 2008-01-28 */ /* * 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_DEVICE__CLIENT_H_ #define _INCLUDE__PCI_DEVICE__CLIENT_H_ #include #include #include #include namespace Pci { struct Device_client; } struct Pci::Device_client : public Genode::Rpc_client { Device_client(Device_capability device) : Genode::Rpc_client(device) { } void bus_address(unsigned char *bus, unsigned char *dev, unsigned char *fn) override { call(bus, dev, fn); } unsigned short vendor_id() override { return call(); } unsigned short device_id() override { return call(); } unsigned class_code() override { return call(); } Resource resource(int resource_id) override { return call(resource_id); } unsigned config_read(unsigned char address, Access_size size) override { return call(address, size); } void config_write(unsigned char address, unsigned value, Access_size size) override { call(address, value, size); } Genode::Irq_session_capability irq(Genode::uint8_t id) override { return call(id); } Genode::Io_port_session_capability io_port(Genode::uint8_t id) override { return call(id); } }; #endif /* _INCLUDE__PCI_DEVICE__CLIENT_H_ */