mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 10:46:25 +00:00
Remove Dataspace::phys_addr RPC function
The official way to obtain DMA addresses for RAM dataspaces is the RPC function 'Pd_session::dma_addr' now. User-level device drivers should not call this function directly but use the 'Platform_session' interface of the platform driver instead. Fixes #2243
This commit is contained in:
parent
84435662aa
commit
0d48b74bec
@ -120,13 +120,14 @@ class Genode::Dataspace_component : public Rpc_object<Linux_dataspace>
|
||||
*/
|
||||
void detach_from_rm_sessions() { }
|
||||
|
||||
addr_t phys_addr() const { return _addr; }
|
||||
|
||||
|
||||
/*************************
|
||||
** Dataspace interface **
|
||||
*************************/
|
||||
|
||||
size_t size() override { return _size; }
|
||||
addr_t phys_addr() override { return _addr; }
|
||||
bool writable() override { return _writable; }
|
||||
|
||||
|
||||
|
@ -134,8 +134,6 @@ class Genode::Region_map_mmap : public Region_map, public Dataspace
|
||||
|
||||
size_t size() override { return _size; }
|
||||
|
||||
addr_t phys_addr() override { return 0; }
|
||||
|
||||
bool writable() override { return true; }
|
||||
|
||||
/**
|
||||
|
@ -33,7 +33,6 @@ struct Genode::Linux_dataspace_client : Rpc_client<Linux_dataspace>
|
||||
*********************************/
|
||||
|
||||
size_t size() override { return call<Rpc_size>(); }
|
||||
addr_t phys_addr() override { return call<Rpc_phys_addr>(); }
|
||||
bool writable() override { return call<Rpc_writable>(); }
|
||||
|
||||
|
||||
|
@ -26,7 +26,6 @@ struct Genode::Dataspace_client : Rpc_client<Dataspace>
|
||||
: Rpc_client<Dataspace>(ds) { }
|
||||
|
||||
size_t size() override { return call<Rpc_size>(); }
|
||||
addr_t phys_addr() override { return call<Rpc_phys_addr>(); }
|
||||
bool writable() override { return call<Rpc_writable>(); }
|
||||
};
|
||||
|
||||
|
@ -29,11 +29,6 @@ struct Genode::Dataspace : Interface
|
||||
*/
|
||||
virtual size_t size() = 0;
|
||||
|
||||
/**
|
||||
* Request base address in physical address space
|
||||
*/
|
||||
virtual addr_t phys_addr() = 0;
|
||||
|
||||
/**
|
||||
* Return true if dataspace is writable
|
||||
*/
|
||||
@ -45,10 +40,9 @@ struct Genode::Dataspace : Interface
|
||||
*********************/
|
||||
|
||||
GENODE_RPC(Rpc_size, size_t, size);
|
||||
GENODE_RPC(Rpc_phys_addr, addr_t, phys_addr);
|
||||
GENODE_RPC(Rpc_writable, bool, writable);
|
||||
|
||||
GENODE_RPC_INTERFACE(Rpc_size, Rpc_phys_addr, Rpc_writable);
|
||||
GENODE_RPC_INTERFACE(Rpc_size, Rpc_writable);
|
||||
};
|
||||
|
||||
#endif /* _INCLUDE__DATASPACE__DATASPACE_H_ */
|
||||
|
@ -120,6 +120,8 @@ namespace Genode {
|
||||
addr_t core_local_addr() const { return _core_local_addr; }
|
||||
bool io_mem() const { return _io_mem; }
|
||||
Cache cacheability() const { return _cache; }
|
||||
addr_t phys_addr() const { return _phys_addr; }
|
||||
bool managed() const { return _managed; }
|
||||
|
||||
/**
|
||||
* Return dataspace base address to be used for map operations
|
||||
@ -149,15 +151,13 @@ namespace Genode {
|
||||
|
||||
List<Rm_region> ®ions() { return _regions; }
|
||||
|
||||
|
||||
/*************************
|
||||
** Dataspace interface **
|
||||
*************************/
|
||||
|
||||
size_t size() override { return _size; }
|
||||
addr_t phys_addr() override { return _phys_addr; }
|
||||
bool writable() override { return _writable; }
|
||||
|
||||
bool managed() { return _managed; }
|
||||
};
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user