L4Re - L4 Runtime Environment
L4::Icu Class Reference

C++ Icu interface. More...

+ Inheritance diagram for L4::Icu:
+ Collaboration diagram for L4::Icu:

Data Structures

class  Info
 This class encapsulates information about an ICU. More...
 

Public Member Functions

l4_msgtag_t bind (unsigned irqnum, L4::Cap< Triggerable > irq, l4_utcb_t *utcb=l4_utcb()) throw ()
 Bind an interrupt line of an interrupt controller to an interrupt object. More...
 
l4_msgtag_t unbind (unsigned irqnum, L4::Cap< Triggerable > irq, l4_utcb_t *utcb=l4_utcb()) throw ()
 Remove binding of an interrupt line from the interrupt controller object. More...
 
l4_msgtag_t info (l4_icu_info_t *info, l4_utcb_t *utcb=l4_utcb()) throw ()
 Get information about the capabilities of the ICU. More...
 
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. More...
 
l4_msgtag_t mask (unsigned irqnum, l4_umword_t *label=0, l4_timeout_t to=L4_IPC_NEVER, l4_utcb_t *utcb=l4_utcb()) throw ()
 Mask an IRQ line. More...
 
l4_msgtag_t set_mode (unsigned irqnum, l4_umword_t mode, l4_utcb_t *utcb=l4_utcb()) throw ()
 Set interrupt mode. More...
 
- 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()) throw ()
 Acknowledge the given interrupt line. More...
 

Additional Inherited Members

- 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 Irq_eoi ::__Iface_list > __Iface_list
 The list of all RPC interfaces provided directly or through inheritance.
 
- Protected Member Functions inherited from L4::Kobject_t< Icu, Irq_eoi, L4_PROTO_IRQ, Type_info::Demand_t< 1 > >
L4::Cap< Classc () const
 Get the capability to ourselves.
 
- Static Protected Member Functions inherited from L4::Kobject_t< Icu, Irq_eoi, L4_PROTO_IRQ, Type_info::Demand_t< 1 > >
static void __check_protocols__ ()
 Helper to check for protocol conflicts.
 

Detailed Description

C++ Icu interface.

Note
"ICU" is short for "interrupt control unit".

This class defines the interface for interrupt controllers. It defines functions for binding L4::Irq objects to interrupt lines, as well as functions for masking and unmasking of interrupts.

To setup an interrupt line the following steps are required:

  1. set_mode() (optional if interrupt has a default mode)
  2. Irq::attach() to attach the interrupt capability to a thread
  3. bind()
  4. unmask() to receive the first interrupt
Include File
#include <l4/sys/icu>

Definition at line 262 of file irq.

Member Function Documentation

◆ bind()

l4_msgtag_t L4::Icu::bind ( unsigned  irqnum,
L4::Cap< Triggerable irq,
l4_utcb_t utcb = l4_utcb() 
)
throw (
)
inline

Bind an interrupt line of an interrupt controller to an interrupt object.

Parameters
irqnumIRQ line at the ICU.
irqIRQ object for the given IRQ line to bind to this ICU.
utcbUTCB to be used for this operation, usually the UTCB of the calling thread.
Returns
Syscall return tag. The caller should check the return value using l4_error() to check for errors and to identify the correct method for unmasking the interrupt. Return values < 0 indicate an error. A return value of 0 means a direct unmask via the IRQ object using L4::Irq::unmask. A return value of 1 means that the interrupt has to be unmasked via the ICU using L4::Icu::unmask.

Definition at line 310 of file irq.

◆ info()

l4_msgtag_t L4::Icu::info ( l4_icu_info_t info,
l4_utcb_t utcb = l4_utcb() 
)
throw (
)
inline

Get information about the capabilities of the ICU.

Parameters
[out]infoInfo structure to be filled with information.
utcbUTCB to be used for this operation, usually the UTCB of the calling thread.
Returns
Syscall return tag

Definition at line 341 of file irq.

◆ mask()

l4_msgtag_t L4::Icu::mask ( unsigned  irqnum,
l4_umword_t label = 0,
l4_timeout_t  to = L4_IPC_NEVER,
l4_utcb_t utcb = l4_utcb() 
)
throw (
)
inline

Mask an IRQ line.

Parameters
irqnumIRQ line at the ICU.
labelIf NULL this function is a send-only message to the ICU. If not NULL this function will enter an open wait after sending the mask message.
toThe timeout-pair (send and receive) that shall be used for this operation. The receive timeout is used with a non-NULL label only.
utcbUTCB to be used for this operation, usually the UTCB of the calling thread.
Returns
Syscall return tag

Definition at line 384 of file irq.

◆ msi_info()

l4_msgtag_t L4::Icu::msi_info ( l4_umword_t  irqnum,
l4_uint64_t  source,
l4_icu_msi_info_t msi_info 
)

Get MSI info about IRQ.

Parameters
irqnumIRQ line at the ICU.
sourcePlatform dependent requester ID for MSIs. On IA32 we use a 20bit source filter value as described in the Intel IRQ remapping specification.
[out]msi_infoA l4_icu_msi_info_t structure receiving the address and the data value to trigger this MSI.
Returns
Syscall return tag

◆ set_mode()

l4_msgtag_t L4::Icu::set_mode ( unsigned  irqnum,
l4_umword_t  mode,
l4_utcb_t utcb = l4_utcb() 
)
throw (
)
inline

Set interrupt mode.

Parameters
irqnumIRQ line at the ICU.
modeMode, see L4_irq_mode.
utcbUTCB to be used for this operation, usually the UTCB of the calling thread.
Returns
Syscall return tag

Definition at line 406 of file irq.

◆ unbind()

l4_msgtag_t L4::Icu::unbind ( unsigned  irqnum,
L4::Cap< Triggerable irq,
l4_utcb_t utcb = l4_utcb() 
)
throw (
)
inline

Remove binding of an interrupt line from the interrupt controller object.

Parameters
irqnumIRQ line at the ICU.
irqIRQ object to remove from the ICU.
utcbUTCB to be used for this operation, usually the UTCB of the calling thread.
Returns
Syscall return tag

Definition at line 326 of file irq.


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