FreeNOS
Public Types | Public Member Functions | Private Attributes
ARM64Exception Class Reference

ARM64 exception handling functionality. More...

#include <ARM64Exception.h>

Public Types

enum  ExceptionType {
  Sync_SP_EL0 = 0 , IRQ_SP_EL0 , FIQ_SP_EL0 , SError_SP_EL0 ,
  Sync_SP_ELx , IRQ_SP_ELx , FIQ_SP_ELx , SError_SP_ELx ,
  Sync_Lower_EL , IRQ_Lower_EL , FIQ_Lower_EL , SError_Lower_EL ,
  Sync_Lower_EL_AA32 , IRQ_Lower_EL_AA32 , FIQ_Lower_EL_AA32 , SError_Lower_EL_AA32
}
 ARM64 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.
 

Public Member Functions

 ARM64Exception ()
 Constructor.
 
Result install (ExceptionType vector, Handler handler)
 Install an exception handler.
 

Private Attributes

Address m_vecTable
 ARM64 exception vector jump table.
 

Detailed Description

ARM64 exception handling functionality.

Definition at line 45 of file ARM64Exception.h.

Member Typedef Documentation

◆ Handler

typedef void ARM64Exception::Handler(struct CPUState state)

Function which is called when the CPU is interrupted.

Parameters
stateState of the CPU on the moment the interrupt occurred.

Definition at line 87 of file ARM64Exception.h.

Member Enumeration Documentation

◆ ExceptionType

ARM64 exception types.

Enumerator
Sync_SP_EL0 
IRQ_SP_EL0 
FIQ_SP_EL0 
SError_SP_EL0 
Sync_SP_ELx 
IRQ_SP_ELx 
FIQ_SP_ELx 
SError_SP_ELx 
Sync_Lower_EL 
IRQ_Lower_EL 
FIQ_Lower_EL 
SError_Lower_EL 
Sync_Lower_EL_AA32 
IRQ_Lower_EL_AA32 
FIQ_Lower_EL_AA32 
SError_Lower_EL_AA32 

Definition at line 52 of file ARM64Exception.h.

◆ Result

Result codes.

Enumerator
Success 
NotFound 
IOError 

Definition at line 75 of file ARM64Exception.h.

Constructor & Destructor Documentation

◆ ARM64Exception()

ARM64Exception::ARM64Exception ( )

Constructor.

Definition at line 27 of file ARM64Exception.cpp.

References m_vecTable, ARM64Control::VectorBaseAddress, and ARM64Control::write().

Member Function Documentation

◆ install()

ARM64Exception::Result ARM64Exception::install ( ARM64Exception::ExceptionType  vector,
ARM64Exception::Handler  handler 
)

Install an exception handler.

Parameters
vectorException vector to install
handlerException handler function to install.
Returns
Result code

Definition at line 33 of file ARM64Exception.cpp.

References handlerTable, and Success.

Referenced by ARM64Kernel::ARM64Kernel().

Field Documentation

◆ m_vecTable

Address ARM64Exception::m_vecTable
private

ARM64 exception vector jump table.

The ARM64 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.

See also
m_handlerTable;
ARM64ExceptionTable.S

Definition at line 120 of file ARM64Exception.h.

Referenced by ARM64Exception().


The documentation for this class was generated from the following files: