Loading...
Searching...
No Matches
L4virtio::Svr::Driver_mem_region_t< DATA > Class Template Reference

Region of driver memory, that shall be managed locally. More...

`#include <l4virtio>`

Inheritance diagram for L4virtio::Svr::Driver_mem_region_t< DATA >:
Collaboration diagram for L4virtio::Svr::Driver_mem_region_t< DATA >:

## 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.

## Detailed Description

template<typename DATA>
class L4virtio::Svr::Driver_mem_region_t< DATA >

Region of driver memory, that shall be managed locally.

Template Parameters

  DATA | Class defining additional information

Definition at line 450 of file l4virtio.

## Constructor & Destructor Documentation

## Driver_mem_region_t()

template<typename DATA>

L4virtio::Svr::Driver_mem_region_t< DATA >::Driver_mem_region_t | ( | l4_uint64_t | drv_base,
|  | l4_umword_t | size,
|  | l4_addr_t | offset,
|  | Ds_cap && | ds )

inline

Make a local memory region for the given driver values.

Parameters

  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.

## Member Function Documentation

## contains()

template<typename DATA>

bool L4virtio::Svr::Driver_mem_region_t< DATA >::contains | ( | l4_uint64_t | base,
|  | l4_umword_t | size ) const

inline

Test if the given driver address range is within this region.

Parameters

  base | The driver base address.
  size | The size of the region to lookup.

Returns
  true if the given driver address region is contained in this region, false else.

Definition at line 592 of file l4virtio.

## drv_base()

template<typename DATA>

l4_uint64_t L4virtio::Svr::Driver_mem_region_t< DATA >::drv_base | ( |  | ) | const

inline

Returns
  The base address used by the driver.

Definition at line 571 of file l4virtio.

## ds()

template<typename DATA>

L4::Cap< L4Re::Dataspace > L4virtio::Svr::Driver_mem_region_t< DATA >::ds | ( |  | ) | const

inline

Returns
  The data space capability for this region.

Definition at line 583 of file l4virtio.

## ds_offset()

template<typename DATA>

l4_addr_t L4virtio::Svr::Driver_mem_region_t< DATA >::ds_offset | ( |  | ) | const

inline

Returns
  The offset within the data space.

Definition at line 580 of file l4virtio.

## empty()

template<typename DATA>

bool L4virtio::Svr::Driver_mem_region_t< DATA >::empty | ( |  | ) | const

inline

Returns
  True if the region is empty (size == 0), false otherwise.

Definition at line 567 of file l4virtio.

## flags()

template<typename DATA>

Flags L4virtio::Svr::Driver_mem_region_t< DATA >::flags | ( |  | ) | const

inline

Returns
  The flags for this region.

Definition at line 564 of file l4virtio.

## is_writable()

template<typename DATA>

bool L4virtio::Svr::Driver_mem_region_t< DATA >::is_writable | ( |  | ) | const

inline

Returns
  True if the region is writable, false otherwise.

Definition at line 561 of file l4virtio.

## local()

template<typename DATA>
template<typename T>

T * L4virtio::Svr::Driver_mem_region_t< DATA >::local | ( | Ptr< T > | p | ) | const

inline

Get the local address for driver address p.

Parameters

  p | Driver address to translate.

Precondition
  p must be contained in this region.

Returns
  Local address for the given driver address p.

Definition at line 616 of file l4virtio.

Referenced by L4virtio::Svr::Driver_mem_list_t< No_custom_data >::load_desc().

Here is the caller graph for this function:

## local_base()

template<typename DATA>

l4_addr_t L4virtio::Svr::Driver_mem_region_t< DATA >::local_base | ( |  | ) | const

inline

Returns
  The local base address.

Definition at line 574 of file l4virtio.

## size()

template<typename DATA>

l4_umword_t L4virtio::Svr::Driver_mem_region_t< DATA >::size | ( |  | ) | const

inline

Returns
  The size of the region in bytes.

Definition at line 577 of file l4virtio.

The documentation for this class was generated from the following file:

- l4/l4virtio/server/l4virtio