FreeNOS
|
Interrupt controller interface. More...
#include <IntController.h>
Public Types | |
enum | Result { Success, InvalidIRQ, InvalidFrequency, IOError, NotFound } |
Result codes. More... | |
Public Member Functions | |
IntController () | |
Constructor. More... | |
uint | getBase () const |
Get interrupt number base offset. More... | |
virtual Result | enable (uint irq)=0 |
Enable hardware interrupt (IRQ). More... | |
virtual Result | disable (uint irq)=0 |
Disable hardware interrupt (IRQ). More... | |
virtual Result | clear (uint irq)=0 |
Clear hardware interrupt (IRQ). More... | |
virtual Result | nextPending (uint &irq) |
Retrieve the next pending interrupt (IRQ). More... | |
virtual bool | isTriggered (uint irq) |
Check if an IRQ vector is set. More... | |
virtual Result | send (const uint targetCoreId, const uint irq) |
Send an inter-processor-interrupt (IPI). More... | |
Protected Attributes | |
uint | m_base |
Interrupt number base offset. More... | |
Interrupt controller interface.
Definition at line 35 of file IntController.h.
Result codes.
Enumerator | |
---|---|
Success | |
InvalidIRQ | |
InvalidFrequency | |
IOError | |
NotFound |
Definition at line 42 of file IntController.h.
IntController::IntController | ( | ) |
Constructor.
Definition at line 20 of file IntController.cpp.
Clear hardware interrupt (IRQ).
Clearing marks the end of an interrupt service routine and causes the controller to trigger the interrupt again on the next trigger moment.
irq | Interrupt Request number to clear. |
Implemented in BroadcomInterrupt, IntelAPIC, ARMGenericInterrupt, and IntelPIC.
Referenced by SunxiKernel::interrupt(), and IntelKernel::interrupt().
Disable hardware interrupt (IRQ).
irq | Interrupt Request number. |
Implemented in BroadcomInterrupt, IntelAPIC, ARMGenericInterrupt, and IntelPIC.
Referenced by Kernel::enableIRQ().
Enable hardware interrupt (IRQ).
irq | Interrupt Request number. |
Implemented in BroadcomInterrupt, IntelAPIC, ARMGenericInterrupt, and IntelPIC.
Referenced by Kernel::enableIRQ(), RaspberryKernel::RaspberryKernel(), and SunxiKernel::SunxiKernel().
uint IntController::getBase | ( | ) | const |
Get interrupt number base offset.
Some interrupt controllers remap the interrupt numbers to a certain base offset.
Definition at line 25 of file IntController.cpp.
References m_base.
Referenced by Kernel::executeIntVector(), IntelKernel::IntelKernel(), and IntelKernel::interrupt().
|
virtual |
Check if an IRQ vector is set.
irq | Interrupt number |
Reimplemented in BroadcomInterrupt, and ARMGenericInterrupt.
Definition at line 35 of file IntController.cpp.
Referenced by RaspberryKernel::interrupt().
|
virtual |
Retrieve the next pending interrupt (IRQ).
irq | Outputs the next pending interrupt on Success |
Reimplemented in ARMGenericInterrupt, and BroadcomInterrupt.
Definition at line 30 of file IntController.cpp.
References NotFound.
Referenced by SunxiKernel::interrupt().
|
virtual |
Send an inter-processor-interrupt (IPI).
targetCoreId | Target processor that will receive the interrupt |
irq | Interrupt number to send |
Reimplemented in ARMGenericInterrupt.
Definition at line 40 of file IntController.cpp.
References IOError.
Referenced by Kernel::sendIRQ().
|
protected |
Interrupt number base offset.
Definition at line 128 of file IntController.h.
Referenced by getBase(), and IntelPIC::IntelPIC().