L4Re Operating System Framework
Interface and Usage Documentation
|
Region of driver memory, that shall be managed locally. More...
#include <l4virtio>
Public Member Functions | |
Driver_mem_region_t () | |
Make default empty memory region. | |
Driver_mem_region_t (l4_uint64_t drv_base, l4_umword_t size, l4_addr_t offset, Ds_cap &&ds) | |
Make a local memory region for the given driver values. | |
bool | is_writable () const |
Flags | flags () const |
bool | empty () const |
l4_uint64_t | drv_base () const |
l4_addr_t | local_base () const |
l4_umword_t | size () const |
l4_addr_t | ds_offset () const |
L4::Cap< L4Re::Dataspace > | ds () const |
bool | contains (l4_uint64_t base, l4_umword_t size) const |
Test if the given driver address range is within this region. | |
template<typename T > | |
T * | local (Ptr< T > p) const |
Get the local address for driver address p. | |
Region of driver memory, that shall be managed locally.
DATA | Class defining additional information |
|
inline |
Make a local memory region for the given driver values.
drv_base | Base address of the memory region used by the driver. |
size | Size of the memory region. |
offset | Offset within the data space that is mapped to drv_base within the driver. |
ds | Data space capability backing the memory. |
This constructor attaches the region of given data space to the local address space and stores the corresponding data for later reference.
Definition at line 498 of file l4virtio.
References L4Re::chksys(), L4virtio::Svr::Driver_mem_region_t< DATA >::ds(), L4Re::Dataspace::Stats::flags, L4Re::Rm::Unique_region< T >::get(), L4Re::Dataspace::info(), L4_CAP_FPAGE_RO, L4_CAP_FPAGE_RW, L4_EINVAL, L4_ENOSYS, L4_ERANGE, L4_PAGESIZE, l4_round_page(), L4_SUPERPAGESHIFT, L4::Ipc::make_cap(), L4Re::Rm::F::R, L4Re::Rm::F::Search_addr, L4virtio::Svr::Driver_mem_region_t< DATA >::size(), L4Re::Dataspace::Stats::size, L4Re::Dataspace::F::W, and L4Re::Rm::F::W.
|
inline |
Test if the given driver address range is within this region.
base | The driver base address. |
size | The size of the region to lookup. |
Definition at line 592 of file l4virtio.
References L4virtio::Svr::Driver_mem_region_t< DATA >::size().
|
inline |
|
inline |
Definition at line 583 of file l4virtio.
Referenced by L4virtio::Svr::Driver_mem_region_t< DATA >::Driver_mem_region_t().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get the local address for driver address p.
p | Driver address to translate. |
Definition at line 616 of file l4virtio.
References L4virtio::Ptr< T >::get().
|
inline |
Definition at line 574 of file l4virtio.
References L4Re::Rm::Unique_region< T >::get().
|
inline |
Definition at line 577 of file l4virtio.
Referenced by L4virtio::Svr::Driver_mem_region_t< DATA >::contains(), and L4virtio::Svr::Driver_mem_region_t< DATA >::Driver_mem_region_t().