acacia.irq

Module Contents

Classes

IRQ

A base type representing all interrupts in Microkit systems. This type should not be used directly, all “real” interrupts are subclasses of it.

ConventionalIRQ

IRQs on ARM and RISC-V machines. These have a trigger mode and an ID which may be specified. If the ID is not explicitly specified, it will be automatically allocated from the pool of available IDs in the PD upon calling add_irq().

IrqIoapic

An x86 I/O APIC IRQ. Like conventional IRQs, these have a unique identifier, which here is the CPU vector the interrupt is delivered to. They also carry the interrupt’s source: which I/O APIC chip and pin it comes from.

IrqMsi

An x86 Message Signaled Interrupt (MSI). Like conventional IRQs, these have a unique identifier, which here is the CPU vector the interrupt is delivered to. They also carry the interrupt’s source: which PCI device it comes from.

API

class acacia.irq.IRQ(irq: int, id: Optional[int] = None)

A base type representing all interrupts in Microkit systems. This type should not be used directly, all “real” interrupts are subclasses of it.

IRQs must be added to a ProtectionDomain in order to have any effect.

Similarly to channel end IDs, an explicit ID may be optionally given when constructing this class. If it is not given, it will be automatically assigned when adding it to a ProtectionDomain.

If using this class in a subsystem build hook, you should NEVER manually assign IDs.

Note: it is possible for explicitly assigned IDs to clash (possibly with automatically -generated ones!). In almost all cases, you should use automatic allocation.

Initialization

class Trigger

Bases: enum.Enum

EDGE

1

LEVEL

2

__str__()
abstract property number
abstract property trigger
abstractmethod render(parent: xml.etree.ElementTree.Element)
class acacia.irq.ConventionalIRQ(irq_num: int, trigger: acacia.irq.IRQ, id: Optional[int] = None)

Bases: acacia.irq.IRQ

IRQs on ARM and RISC-V machines. These have a trigger mode and an ID which may be specified. If the ID is not explicitly specified, it will be automatically allocated from the pool of available IDs in the PD upon calling add_irq().

Similarly to Channel IDs, manually assigned IDs may conflict with automatically assigned ones. In the future we may change automatic assignment to only happen after all manual assignment is complete.

If using this class in a subsystem build hook, you should NEVER manually assign IDs.

Initialization

render(parent: xml.etree.ElementTree.Element)
property number
property trigger
__repr__() → str
class acacia.irq.IrqIoapic(ioapic_id: int, pin: int, vector: int, trigger: Optional[acacia.irq.IRQ] = None, polarity: Optional[Polarity] = None, id: Optional[int] = None)

Bases: acacia.irq.IRQ

An x86 I/O APIC IRQ. Like conventional IRQs, these have a unique identifier, which here is the CPU vector the interrupt is delivered to. They also carry the interrupt’s source: which I/O APIC chip and pin it comes from.

Similarly to Channel IDs, manually assigned IDs may conflict with automatically assigned ones. In the future we may change automatic assignment to only happen after all manual assignment is complete.

If using this class in a subsystem build hook, you should NEVER manually assign IDs.

Initialization

class Polarity

Bases: enum.Enum

ACTIVEHIGH

‘high’

ACTIVELOW

‘low’

__str__()
render(parent: xml.etree.ElementTree.Element)
property number
property trigger
__repr__() → str
class acacia.irq.IrqMsi(pci_bus: int, pci_device: int, pci_func: int, vector: int, handle: int, id: Optional[int] = None)

Bases: acacia.irq.IRQ

An x86 Message Signaled Interrupt (MSI). Like conventional IRQs, these have a unique identifier, which here is the CPU vector the interrupt is delivered to. They also carry the interrupt’s source: which PCI device it comes from.

Similarly to Channel IDs, manually assigned IDs may conflict with automatically assigned ones. In the future we may change automatic assignment to only happen after all manual assignment is complete.

If using this class in a subsystem build hook, you should NEVER manually assign IDs.

Initialization

property pci_dev_str: str
render(parent: xml.etree.ElementTree.Element)
property number
property trigger
__repr__() → str