mirror of
https://github.com/genodelabs/genode.git
synced 2025-06-24 01:28:48 +00:00
pci: add support to provide PCI ECMA config
This commit is contained in:
committed by
Norman Feske
parent
822b4f2d96
commit
c374f294c8
@ -17,6 +17,7 @@
|
||||
#include <pci_session/pci_session.h>
|
||||
#include <pci_device/pci_device.h>
|
||||
#include <base/rpc_client.h>
|
||||
#include <io_mem_session/io_mem_session.h>
|
||||
|
||||
namespace Pci {
|
||||
|
||||
|
@ -15,6 +15,7 @@
|
||||
#define _INCLUDE__PCI_DEVICE__PCI_DEVICE_H_
|
||||
|
||||
#include <base/rpc.h>
|
||||
#include <io_mem_session/io_mem_session.h>
|
||||
|
||||
namespace Pci {
|
||||
|
||||
|
@ -32,6 +32,9 @@ namespace Pci {
|
||||
|
||||
void release_device(Device_capability device) {
|
||||
call<Rpc_release_device>(device); }
|
||||
|
||||
Genode::Io_mem_dataspace_capability config_extended(Device_capability device_cap) {
|
||||
return call<Rpc_config_extended>(device_cap); }
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -49,16 +49,25 @@ namespace Pci {
|
||||
*/
|
||||
virtual void release_device(Device_capability device) = 0;
|
||||
|
||||
/**
|
||||
* Provide mapping to device configuration space of 4k, known as
|
||||
* "Enhanced Configuration Access Mechanism (ECAM) for PCI Express
|
||||
*/
|
||||
virtual Genode::Io_mem_dataspace_capability config_extended(Device_capability) = 0;
|
||||
|
||||
/*********************
|
||||
** RPC declaration **
|
||||
*********************/
|
||||
|
||||
GENODE_RPC(Rpc_first_device, Device_capability, first_device);
|
||||
GENODE_RPC(Rpc_next_device, Device_capability, next_device, Device_capability);
|
||||
GENODE_RPC(Rpc_next_device, Device_capability, next_device,
|
||||
Device_capability);
|
||||
GENODE_RPC(Rpc_release_device, void, release_device, Device_capability);
|
||||
GENODE_RPC(Rpc_config_extended, Genode::Io_mem_dataspace_capability,
|
||||
config_extended, Device_capability);
|
||||
|
||||
GENODE_RPC_INTERFACE(Rpc_first_device, Rpc_next_device, Rpc_release_device);
|
||||
GENODE_RPC_INTERFACE(Rpc_first_device, Rpc_next_device,
|
||||
Rpc_release_device, Rpc_config_extended);
|
||||
};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user