
Inter-Processor Interrupts. More...
Classes | |
union | InterruptCommand |
Interrupt Command. More... | |
struct | InterruptCommand.__unnamed__ |
Enumerations | |
enum | DeliveryMode { FIXED = 0, LOWEST_PRIORITY = 1, SMI = 2, NMI = 4, INIT = 5, INIT_LEVEL_DEASSERT = 5, STARTUP = 6 } |
Delivery mode specifies the type of interrupt sent to the CPU. More... | |
enum | DestinationMode { PHYSICAL = 0, LOGICAL = 1 } |
Way of interpreting the value written to the destination field. More... | |
enum | DeliveryStatus { IDLE = 0, SEND_PENDING = 1 } |
Interrupt state. More... | |
enum | Level { DEASSERT = 0, ASSERT = 1 } |
Interrupt level. More... | |
enum | TriggerMode { EDGE_TRIGGERED = 0, LEVEL_TRIGGERED = 1 } |
Trigger mode for DeliveryMode::INIT_LEVEL_DEASSERT. More... | |
enum | DestinationShorthand { NO_SHORTHAND = 0, SELF = 1, ALL_INCLUDING_SELF = 2, ALL_EXCLUDING_SELF = 3 } |
Shorthand for commonly used destinations. More... | |
enum | InterruptMask { UNMASKED = 0, MASKED = 1 } |
Interrupt mask. More... | |
Functions | |
bool | isDelivered () |
Check if the previously sent IPI has reached its destination. More... | |
void | send (uint8_t destination, uint8_t vector) |
Send an Inter-Processor Interrupt (IPI) More... | |
void | sendGroup (uint8_t logical_destination, uint8_t vector) |
Send an Inter-Processor Interrupt (IPI) to a group of processors. More... | |
void | sendAll (uint8_t vector) |
Send an Inter-Processor Interrupt (IPI) to all processors (including self) More... | |
void | sendOthers (uint8_t vector) |
Send an Inter-Processor Interrupt (IPI) to all other processors (all but self) More... | |
void | sendInit (bool assert=true) |
void | sendStartup (uint8_t vector) |
Inter-Processor Interrupts.
For multi-core systems, the LAPIC enables sending messages (Inter-Processor Interrupts, IPIs) to other CPU cores and receiving those sent from other cores.
struct LAPIC::IPI::InterruptCommand.__unnamed__ |
Class Members | ||
---|---|---|
uint64_t | vector: 8 |
Interrupt vector in the Interrupt Descriptor Table (IDT) will be activated when the corresponding external interrupt triggers. Interrupt vector in the Interrupt Descriptor Table (IDT) will be activated when the corresponding external interrupt triggers. |
enum DeliveryMode | delivery_mode: 3 |
The delivery mode denotes the way the interrupts will be delivered to the local CPU cores, respectively to their local APICs. For StuBS, we use |
enum DestinationMode | destination_mode: 1 |
The destination mode defines how the value stored in destination will be interpreted. For StuBS, we use |
enum DeliveryStatus | delivery_status: 1 |
Delivery status holds the current status of interrupt delivery.
|
uint64_t | __pad0__: 1 | reserved |
enum Level | level: 1 |
The polarity denotes when an interrupt should be issued. For StuBS, we use |
enum TriggerMode | trigger_mode: 1 |
The trigger mode states whether the interrupt signaling is level or edge triggered. StuBS uses |
uint64_t | __pad1__: 2 | reserved |
enum DestinationShorthand | destination_shorthand: 2 | |
uint64_t | __pad2__: 36 | Reserved, do not modify. |
uint64_t | destination: 8 |
Interrupt destination. The meaning of destination depends on the destination mode: For the logical destination mode, destination holds a bit mask made up of the cores that are candidates for receiving the interrupt. In the single-core case, this value is
|
Delivery mode specifies the type of interrupt sent to the CPU.
enum LAPIC::IPI::Level |
bool LAPIC::IPI::isDelivered | ( | ) |
Check if the previously sent IPI has reached its destination.
true
if the previous IPI was accepted from its target processor, otherwise false
void LAPIC::IPI::send | ( | uint8_t | destination, |
uint8_t | vector | ||
) |
Send an Inter-Processor Interrupt (IPI)
destination | ID of the target processor (use APIC::getLAPICID(core) ) |
vector | Interrupt vector number to be triggered |
void LAPIC::IPI::sendGroup | ( | uint8_t | logical_destination, |
uint8_t | vector | ||
) |
Send an Inter-Processor Interrupt (IPI) to a group of processors.
logical_destination | Mask containing the logical APIC IDs of the target processors (use APIC::getLogicalLAPICID()) |
vector | Interrupt vector number to be triggered |
void LAPIC::IPI::sendAll | ( | uint8_t | vector | ) |
Send an Inter-Processor Interrupt (IPI) to all processors (including self)
vector | Interrupt vector number to be triggered |
void LAPIC::IPI::sendOthers | ( | uint8_t | vector | ) |
Send an Inter-Processor Interrupt (IPI) to all other processors (all but self)
vector | Interrupt vector number to be triggered |