![]() |
Max OS 0.3
|
Base class for handing CPU expection interrupts. More...
#include <interrupts.h>
Public Member Functions | |
| ExceptionHandler (uint8_t interrupt_number) | |
| Create a new base exception handler for an interrupt. | |
| ~ExceptionHandler () | |
| virtual string | get_message (system::cpu_status_t *status) |
| Get an human readable error message explaining this exception. | |
| virtual system::cpu_status_t * | handle_interrupt (system::cpu_status_t *status) |
| Handle the interrupt relating to this exception. | |
Public Member Functions inherited from MaxOS::hardwarecommunication::InterruptHandler | |
| virtual void | handle_interrupt () |
| Handles an interrupt. | |
Additional Inherited Members | |
Protected Member Functions inherited from MaxOS::hardwarecommunication::InterruptHandler | |
| InterruptHandler (uint8_t interrupt_number, int64_t redirect=-1, uint64_t redirect_index=0) | |
| Creates a new interrupt handler and registers it with the interrupt manager. | |
| virtual | ~InterruptHandler () |
| Destroys the interrupt handler and unregisters it from the interrupt manager. | |
Protected Attributes inherited from MaxOS::hardwarecommunication::InterruptHandler | |
| uint8_t | m_interrupt_number |
| The interrupt number this handler handles. | |
Base class for handing CPU expection interrupts.
Definition at line 61 of file interrupts.h.
| ExceptionHandler::ExceptionHandler | ( | uint8_t | interrupt_number | ) |
Create a new base exception handler for an interrupt.
| interrupt_number | The interrupt this exception handles |
Definition at line 92 of file interrupts.cpp.
|
default |
Default destructor for a ExceptionHandler
|
virtual |
Get an human readable error message explaining this exception.
| status | The CPU state at time of exception |
Reimplemented in MaxOS::hardwarecommunication::DivideByZeroHandler, MaxOS::hardwarecommunication::InvaildOpCodeHandler, MaxOS::hardwarecommunication::GeneralProtectionHandler, and MaxOS::hardwarecommunication::PageFaultHandler.
Definition at line 108 of file interrupts.cpp.
Referenced by handle_interrupt().
|
virtual |
Handle the interrupt relating to this exception.
| status | The CPU state at time of exception |
Reimplemented from MaxOS::hardwarecommunication::InterruptHandler.
Reimplemented in MaxOS::runtime::TrapFlagExcpetion, and MaxOS::runtime::BreakPointException.
Definition at line 120 of file interrupts.cpp.
References get_message(), MaxOS::system::CPU::PANIC(), and MaxOS::system::CPU::prepare_for_panic().