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:
Norman Feske
2022-02-11 14:40:13 +01:00
parent 84435662aa
commit 0d48b74bec
6 changed files with 16 additions and 25 deletions

View File

@ -120,13 +120,14 @@ class Genode::Dataspace_component : public Rpc_object<Linux_dataspace>
*/ */
void detach_from_rm_sessions() { } void detach_from_rm_sessions() { }
addr_t phys_addr() const { return _addr; }
/************************* /*************************
** Dataspace interface ** ** Dataspace interface **
*************************/ *************************/
size_t size() override { return _size; } size_t size() override { return _size; }
addr_t phys_addr() override { return _addr; }
bool writable() override { return _writable; } bool writable() override { return _writable; }

View File

@ -134,8 +134,6 @@ class Genode::Region_map_mmap : public Region_map, public Dataspace
size_t size() override { return _size; } size_t size() override { return _size; }
addr_t phys_addr() override { return 0; }
bool writable() override { return true; } bool writable() override { return true; }
/** /**

View File

@ -33,7 +33,6 @@ struct Genode::Linux_dataspace_client : Rpc_client<Linux_dataspace>
*********************************/ *********************************/
size_t size() override { return call<Rpc_size>(); } 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>(); } bool writable() override { return call<Rpc_writable>(); }

View File

@ -26,7 +26,6 @@ struct Genode::Dataspace_client : Rpc_client<Dataspace>
: Rpc_client<Dataspace>(ds) { } : Rpc_client<Dataspace>(ds) { }
size_t size() override { return call<Rpc_size>(); } 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>(); } bool writable() override { return call<Rpc_writable>(); }
}; };

View File

@ -29,11 +29,6 @@ struct Genode::Dataspace : Interface
*/ */
virtual size_t size() = 0; virtual size_t size() = 0;
/**
* Request base address in physical address space
*/
virtual addr_t phys_addr() = 0;
/** /**
* Return true if dataspace is writable * Return true if dataspace is writable
*/ */
@ -45,10 +40,9 @@ struct Genode::Dataspace : Interface
*********************/ *********************/
GENODE_RPC(Rpc_size, size_t, size); GENODE_RPC(Rpc_size, size_t, size);
GENODE_RPC(Rpc_phys_addr, addr_t, phys_addr);
GENODE_RPC(Rpc_writable, bool, writable); 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_ */ #endif /* _INCLUDE__DATASPACE__DATASPACE_H_ */

View File

@ -120,6 +120,8 @@ namespace Genode {
addr_t core_local_addr() const { return _core_local_addr; } addr_t core_local_addr() const { return _core_local_addr; }
bool io_mem() const { return _io_mem; } bool io_mem() const { return _io_mem; }
Cache cacheability() const { return _cache; } 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 * Return dataspace base address to be used for map operations
@ -149,15 +151,13 @@ namespace Genode {
List<Rm_region> &regions() { return _regions; } List<Rm_region> &regions() { return _regions; }
/************************* /*************************
** Dataspace interface ** ** Dataspace interface **
*************************/ *************************/
size_t size() override { return _size; } size_t size() override { return _size; }
addr_t phys_addr() override { return _phys_addr; }
bool writable() override { return _writable; } bool writable() override { return _writable; }
bool managed() { return _managed; }
}; };
} }