L4Re Operating System Framework
Interface and Usage Documentation
|
C++ Icu interface, see Interrupt controller for the C interface. More...
#include <irq>
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()) 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 | |
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_t< Icu, Irq_eoi, L4_PROTO_IRQ, Type_info::Demand_t< 1 > > | |
L4::Cap< Class > | c () const noexcept |
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__ () noexcept |
Helper to check for protocol conflicts. | |
C++ Icu interface, see Interrupt controller for the C interface.
This class defines the interface for interrupt controllers. It defines functions for binding L4::Irq objects to interrupt lines and other interrupt sources, as well as functions for masking and unmasking of interrupts.
To setup an interrupt line the following steps are required:
For certain interrupt sources only some of these steps are necessary and supported, see L4::Scheduler and L4::Vcon.
At most one L4::Irq object can be bound to a certain interrupt source and a certain L4::Irq object can be bound to at most one interrupt source.
|
inlinenoexcept |
Bind an interrupt line of an interrupt controller to an interrupt object.
irqnum | IRQ line at the ICU. |
irq | IRQ object for the given IRQ line to bind to this ICU. |
utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb. |
< 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.-L4_EINVAL | irq is bound to an interrupt source. |
-L4_EPERM | The ICU instance requires L4_CAP_FPAGE_W on irq and L4_CAP_FPAGE_W was not present. |
In case the irq
is already bound to an interrupt source, it is unbound first. In case the irq
is bound and the interrupt source is bound to a different L4::Irq object, only the unbinding happens. An L4::Irq object that is bound to an interrupt source will get unbound if the L4::Irq object is deleted.
Definition at line 316 of file irq.
References L4::Cap_base::cap(), and l4_icu_bind_u().
Referenced by L4virtio::Driver::Device::bind_notification_irq(), and L4virtio::Driver::Device::driver_connect().
|
inlinenoexcept |
Get information about the ICU features.
[out] | info | Info structure to be filled with information. |
utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb. |
Definition at line 351 of file irq.
References info(), and l4_icu_info_u().
Referenced by info().
|
inlinenoexcept |
Mask an IRQ line.
irqnum | IRQ line at the ICU. |
label | If 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 and the received label is returned here. |
to | The timeout-pair (send and receive) that shall be used for this operation. The receive timeout is used with a non-NULL label only. |
utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb. |
label
is NULL, this function performs an IPC send-only operation and there is no return value except L4_MSGTAG_ERROR indicating success or failure of the send operation. In this case use l4_ipc_error() to check for errors and do not use l4_error(). Definition at line 399 of file irq.
References l4_icu_mask_u().
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.
irqnum | IRQ line at the ICU. | |
source | Platform dependent requester ID for MSIs. On IA32 we use a 20bit source filter value as described in the Intel IRQ remapping specification. | |
[out] | msi_info | A l4_icu_msi_info_t structure receiving the address and the data value to trigger this MSI. |
|
inlinenoexcept |
Set interrupt mode.
irqnum | IRQ line at the ICU. |
mode | Mode, see L4_irq_mode. |
utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb. |
Definition at line 427 of file irq.
References l4_icu_set_mode_u().
|
inlinenoexcept |
Remove binding of an interrupt line from the interrupt controller object.
irqnum | IRQ line at the ICU. |
irq | IRQ object to remove from the ICU. |
utcb | UTCB to be used for this operation, shall be the UTCB of the calling thread. See l4_utcb. |
Definition at line 334 of file irq.
References L4::Cap_base::cap(), and l4_icu_unbind_u().