FreeNOS
|
ARM exception handling functionality. More...
#include <ARMException.h>
Public Types | |
enum | ExceptionType { Reset = 0, UndefinedInstruction, SoftwareInterrupt, PrefetchAbort, DataAbort, Reserved, IRQ, FIQ } |
ARM exception types. More... | |
enum | Result { Success, NotFound, IOError } |
Result codes. More... | |
typedef void | Handler(struct CPUState state) |
Function which is called when the CPU is interrupted. More... | |
Public Member Functions | |
ARMException (Address base) | |
Constructor. More... | |
Result | install (ExceptionType vector, Handler handler) |
Install an exception handler. More... | |
Private Attributes | |
Address | m_vecTable |
ARM exception vector jump table. More... | |
ARM exception handling functionality.
Definition at line 44 of file ARMException.h.
typedef void ARMException::Handler(struct CPUState state) |
Function which is called when the CPU is interrupted.
state | State of the CPU on the moment the interrupt occurred. |
Definition at line 78 of file ARMException.h.
ARM exception types.
Enumerator | |
---|---|
Reset | |
UndefinedInstruction | |
SoftwareInterrupt | |
PrefetchAbort | |
DataAbort | |
Reserved | |
IRQ | |
FIQ |
Definition at line 51 of file ARMException.h.
enum ARMException::Result |
ARMException::ARMException | ( | Address | base | ) |
Constructor.
base | Base address of the interrupt jump table. By default this is physical address 0x0 in RAM. |
Definition at line 25 of file ARMException.cpp.
References ARM_EX_VECTAB_SIZE, MemoryBlock::copy(), m_vecTable, sysctrl_read, sysctrl_write, vbar_set, and vecTable.
ARMException::Result ARMException::install | ( | ARMException::ExceptionType | vector, |
ARMException::Handler | handler | ||
) |
Install an exception handler.
vector | Exception vector to install |
handler | Exception handler function to install. |
Definition at line 39 of file ARMException.cpp.
References handlerTable, and Success.
Referenced by ARMKernel::ARMKernel(), RaspberryKernel::RaspberryKernel(), and SunxiKernel::SunxiKernel().
|
private |
ARM exception vector jump table.
The ARM processor will start executing at the appropriate vector offset in the jump table and perform a jump to the exception handler address, which it retrieves from the exception handlers table.
Definition at line 113 of file ARMException.h.
Referenced by ARMException().