L4Re Operating System Framework
Interface and Usage Documentation
Loading...
Searching...
No Matches
L4vbus::Vbus Class Reference

The virtual bus (Vbus) interface. More...

#include <vbus>

+ Inheritance diagram for L4vbus::Vbus:
+ Collaboration diagram for L4vbus::Vbus:

Public Member Functions

int request_ioport (l4vbus_resource_t *res) const
 Request the given IO port resource from the bus.
 
int release_ioport (l4vbus_resource_t *res) const
 Release the given IO port resource from the bus.
 
Device root () const
 Get the root device of the device tree of this bus.
 
int assign_dma_domain (unsigned domain_id, unsigned flags, L4::Cap< L4Re::Dma_space > dma_space) const
 Bind or unbind an L4Re::Dma_space to a DMA domain.
 
int assign_dma_domain (unsigned domain_id, unsigned flags, L4::Cap< L4::Task > dma_space) const
 Bind or unbind a kernel DMA space to a DMA domain.
 
- Public Member Functions inherited from L4Re::Dataspace
long map (Offset offset, Flags flags, Map_addr local_addr, Map_addr min_addr, Map_addr max_addr, L4::Cap< L4::Task > dst=L4::Cap< L4::Task >::Invalid) const noexcept
 Request a flex-page mapping from the dataspace.
 
long map_region (Offset offset, Flags flags, Map_addr min_addr, Map_addr max_addr, L4::Cap< L4::Task > dst=L4::Cap< L4::Task >::Invalid) const noexcept
 Map a part of a dataspace into a local memory area.
 
long clear (Offset offset, Size size)
 Clear parts of a dataspace.
 
long allocate (Offset offset, Size size)
 Allocate a range in the dataspace.
 
long copy_in (Offset dst_offs, L4::Ipc::Cap< Dataspace > src, Offset src_offs, Size size)
 Copy contents from another dataspace.
 
Size size () const noexcept
 Get size of a dataspace.
 
Flags flags () const noexcept
 Get flags of the dataspace.
 
long info (Stats *stats)
 Get information on the dataspace.
 
long map_info (l4_addr_t *, l4_addr_t *)
 Get mapping range of dataspace.
 
- Public Member Functions inherited from L4::Kobject
l4_msgtag_t dec_refcnt (l4_mword_t diff, l4_utcb_t *utcb=l4_utcb())
 Decrement the in kernel reference counter for the object.
 
- Public Member Functions inherited from L4Re::Inhibitor
long acquire (l4_umword_t id, L4::Ipc::String<> reason)
 Acquire a specific inhibitor lock.
 
long release (l4_umword_t id)
 Release a specific inhibitor lock.
 
long next_lock_info (char *name, unsigned len, l4_mword_t current_id=-1, l4_utcb_t *utcb=l4_utcb())
 Get information for the next available inhibitor lock.
 
- Public Member Functions inherited from L4Re::Event
long get_buffer (L4::Ipc::Out< L4::Cap< Dataspace > > ds)
 Get event signal buffer.
 
long get_num_streams ()
 Get number of event streams.
 
long get_stream_info (int idx, Event_stream_info *info)
 Get event stream infos.
 
long get_stream_info_for_id (l4_umword_t stream_id, Event_stream_info *info)
 Get event stream infos.
 
long get_axis_info (l4_umword_t stream_id, unsigned naxes, unsigned const *axis, Event_absinfo *info) const noexcept
 Get event stream axis infos.
 
long get_stream_state_for_id (l4_umword_t stream_id, Event_stream_state *state)
 Get event stream state.
 
- Public Member Functions inherited from L4::Icu
l4_msgtag_t bind (unsigned irqnum, L4::Cap< Triggerable > irq, l4_utcb_t *utcb=l4_utcb()) noexcept
 Bind an interrupt line of an interrupt controller to an interrupt object.
 
l4_msgtag_t unbind (unsigned irqnum, L4::Cap< Triggerable > irq, l4_utcb_t *utcb=l4_utcb()) noexcept
 Remove binding of an interrupt line from the interrupt controller object.
 
l4_msgtag_t info (l4_icu_info_t *info, l4_utcb_t *utcb=l4_utcb()) noexcept
 Get information about the ICU features.
 
l4_msgtag_t msi_info (l4_umword_t irqnum, l4_uint64_t source, l4_icu_msi_info_t *msi_info)
 Get MSI info about IRQ.
 
l4_msgtag_t mask (unsigned irqnum, l4_umword_t *label=0, l4_timeout_t to=L4_IPC_NEVER, l4_utcb_t *utcb=l4_utcb()) noexcept
 Mask an IRQ line.
 
l4_msgtag_t set_mode (unsigned irqnum, l4_umword_t mode, l4_utcb_t *utcb=l4_utcb()) noexcept
 Set interrupt mode.
 
- Public Member Functions inherited from L4::Irq_eoi
l4_msgtag_t unmask (unsigned irqnum, l4_umword_t *label=0, l4_timeout_t to=L4_IPC_NEVER, l4_utcb_t *utcb=l4_utcb()) noexcept
 Unmask the given interrupt line.
 

Additional Inherited Members

- Public Types inherited from L4Re::Inhibitor
enum  { Name_max = 20 }
 
- Protected Types inherited from L4::Kobject_3t< Vbus, L4Re::Dataspace, L4Re::Inhibitor, L4Re::Event >
typedef Vbus Class
 The target interface type (inheriting from Kobject_t)
 
typedef Typeid::Iface< PROTO_ANY, Vbus > __Iface
 The interface description for the derived class.
 
typedef Typeid::Merge_list< Typeid::Iface_list< __Iface >, Typeid::Merge_list< typename Base1::__Iface_list, Typeid::Merge_list< typename Base2::__Iface_list, typename Base3::__Iface_list > > > __Iface_list
 The list of all RPC interfaces provided directly or through inheritance.
 
- Protected Types inherited from L4::Kobject_t< Dataspace, L4::Kobject, L4RE_PROTO_DATASPACE, L4::Type_info::Demand_t< 1 > >
typedef Dataspace Class
 The target interface type (inheriting from Kobject_t)
 
typedef Typeid::Iface< PROTO, Dataspace > __Iface
 The interface description for the derived class.
 
typedef Typeid::Merge_list< Typeid::Iface_list< __Iface >, typename Base::__Iface_list > __Iface_list
 The list of all RPC interfaces provided directly or through inheritance.
 
- Protected Types inherited from L4::Kobject_t< Inhibitor, L4::Kobject, L4RE_PROTO_INHIBITOR >
typedef Inhibitor Class
 The target interface type (inheriting from Kobject_t)
 
typedef Typeid::Iface< PROTO, Inhibitor > __Iface
 The interface description for the derived class.
 
typedef Typeid::Merge_list< Typeid::Iface_list< __Iface >, typename Base::__Iface_list > __Iface_list
 The list of all RPC interfaces provided directly or through inheritance.
 
- Protected Types inherited from L4::Kobject_t< Event, L4::Icu, L4RE_PROTO_EVENT >
typedef Event Class
 The target interface type (inheriting from Kobject_t)
 
typedef Typeid::Iface< PROTO, Event > __Iface
 The interface description for the derived class.
 
typedef Typeid::Merge_list< Typeid::Iface_list< __Iface >, typename Base::__Iface_list > __Iface_list
 The list of all RPC interfaces provided directly or through inheritance.
 
- Protected Types inherited from L4::Kobject_t< Icu, Irq_eoi, L4_PROTO_IRQ, Type_info::Demand_t< 1 > >
typedef Icu Class
 The target interface type (inheriting from Kobject_t)
 
typedef Typeid::Iface< PROTO, Icu__Iface
 The interface description for the derived class.
 
typedef Typeid::Merge_list< Typeid::Iface_list< __Iface >, typename Base::__Iface_list > __Iface_list
 The list of all RPC interfaces provided directly or through inheritance.
 
- Protected Member Functions inherited from L4::Kobject_3t< Vbus, L4Re::Dataspace, L4Re::Inhibitor, L4Re::Event >
L4::Cap< Classc () const noexcept
 Get the capability to ourselves.
 
- Protected Member Functions inherited from L4::Kobject_t< Dataspace, L4::Kobject, L4RE_PROTO_DATASPACE, L4::Type_info::Demand_t< 1 > >
L4::Cap< Classc () const noexcept
 Get the capability to ourselves.
 
- Protected Member Functions inherited from L4::Kobject
l4_cap_idx_t cap () const noexcept
 Return capability selector.
 
- Protected Member Functions inherited from L4::Kobject_t< Inhibitor, L4::Kobject, L4RE_PROTO_INHIBITOR >
L4::Cap< Classc () const noexcept
 Get the capability to ourselves.
 
- Protected Member Functions inherited from L4::Kobject_t< Event, L4::Icu, L4RE_PROTO_EVENT >
L4::Cap< Classc () const noexcept
 Get the capability to ourselves.
 
- Protected Member Functions inherited from L4::Kobject_t< Icu, Irq_eoi, L4_PROTO_IRQ, Type_info::Demand_t< 1 > >
L4::Cap< Classc () const noexcept
 Get the capability to ourselves.
 
- Static Protected Member Functions inherited from L4::Kobject_3t< Vbus, L4Re::Dataspace, L4Re::Inhibitor, L4Re::Event >
static void __check_protocols__ () noexcept
 Helper to check for protocol conflicts.
 
- Static Protected Member Functions inherited from L4::Kobject_t< Dataspace, L4::Kobject, L4RE_PROTO_DATASPACE, L4::Type_info::Demand_t< 1 > >
static void __check_protocols__ () noexcept
 Helper to check for protocol conflicts.
 
- Static Protected Member Functions inherited from L4::Kobject_t< Inhibitor, L4::Kobject, L4RE_PROTO_INHIBITOR >
static void __check_protocols__ () noexcept
 Helper to check for protocol conflicts.
 
- Static Protected Member Functions inherited from L4::Kobject_t< Event, L4::Icu, L4RE_PROTO_EVENT >
static void __check_protocols__ () noexcept
 Helper to check for protocol conflicts.
 
- Static Protected Member Functions inherited from L4::Kobject_t< Icu, Irq_eoi, L4_PROTO_IRQ, Type_info::Demand_t< 1 > >
static void __check_protocols__ () noexcept
 Helper to check for protocol conflicts.
 

Detailed Description

The virtual bus (Vbus) interface.

See also
L4Re Vbus API

Definition at line 300 of file vbus.

Member Function Documentation

◆ assign_dma_domain() [1/2]

int L4vbus::Vbus::assign_dma_domain ( unsigned  domain_id,
unsigned  flags,
L4::Cap< L4::Task dma_space 
) const
inline

Bind or unbind a kernel DMA space to a DMA domain.

Parameters
domain_idDMA domain ID (resource address of DMA domain found on the vBUS). If the value is ~0U the DMA space of the whole vBUS is used.
flagsA combination of L4vbus_dma_domain_assign_flags.
dma_spaceThe DMA space capability to bind or unbind, this must be a kernel DMA space (L4::Task created with L4_PROTO_DMA_SPACE)
Return values
0Operation completed successfully.
-L4_ENOENTThe vbus does not support a global DMA domain or no DMA domain could be found.
-L4_EINVALInvalid argument used.
-L4_EBUSYDMA domain is already active, this means another DMA space is already assigned.

Definition at line 384 of file vbus.

References L4::Cap_base::cap(), L4Re::Dataspace::flags(), l4vbus_assign_dma_domain(), and L4VBUS_DMAD_KERNEL_DMA_SPACE.

+ Here is the call graph for this function:

◆ assign_dma_domain() [2/2]

int L4vbus::Vbus::assign_dma_domain ( unsigned  domain_id,
unsigned  flags,
L4::Cap< L4Re::Dma_space dma_space 
) const
inline

Bind or unbind an L4Re::Dma_space to a DMA domain.

Parameters
domain_idDMA domain ID (resource address of DMA domain found on the vBUS). If the value is ~0U the DMA space of the whole vBUS is used.
flagsA combination of L4vbus_dma_domain_assign_flags.
dma_spaceThe DMA space capability to bind or unbind, this must be an L4Re::Dma_space
Return values
0Operation completed successfully.
-L4_ENOENTThe vbus does not support a global DMA domain or no DMA domain could be found.
-L4_EINVALInvalid argument used.
-L4_EBUSYDMA domain is already active, this means another DMA space is already assigned.

Definition at line 359 of file vbus.

References L4::Cap_base::cap(), L4Re::Dataspace::flags(), l4vbus_assign_dma_domain(), and L4VBUS_DMAD_L4RE_DMA_SPACE.

+ Here is the call graph for this function:

◆ release_ioport()

int L4vbus::Vbus::release_ioport ( l4vbus_resource_t res) const
inline

Release the given IO port resource from the bus.

Parameters
[in]resThe IO port resource to be released from the bus.
Returns
>=0 on success, <0 on error.

Definition at line 325 of file vbus.

References l4vbus_release_ioport().

+ Here is the call graph for this function:

◆ request_ioport()

int L4vbus::Vbus::request_ioport ( l4vbus_resource_t res) const
inline

Request the given IO port resource from the bus.

Parameters
[in]resThe IO port resource to be requested from the bus.
Return values
0Success.
-L4_EINVALResource is not an IO port resource.
-L4_ENOENTNo matching IO port resource found.

Definition at line 313 of file vbus.

References l4vbus_request_ioport().

+ Here is the call graph for this function:

◆ root()

Device L4vbus::Vbus::root ( ) const
inline

Get the root device of the device tree of this bus.

The root device is usually the starting point for iterating the bus, see Device::next_device.

Returns
A Vbus device representing the root of the device tree.

Definition at line 338 of file vbus.

References L4VBUS_ROOT_BUS.


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