The Pedigree Project  0.1
Public Member Functions | Public Attributes | List of all members
ARMV7InterruptState Class Reference

#include <state.h>

+ Collaboration diagram for ARMV7InterruptState:

Public Member Functions

uintptr_t getStackPointer () const
 
void setStackPointer (uintptr_t stackPointer)
 
uintptr_t getInstructionPointer () const
 
void setInstructionPointer (uintptr_t instructionPointer)
 
uintptr_t getBasePointer () const
 
void setBasePointer (uintptr_t basePointer)
 
size_t getRegisterCount () const
 
processor_register_t getRegister (size_t index) const
 
const char * getRegisterName (size_t index) const
 
size_t getRegisterSize (size_t index) const
 
bool kernelMode () const
 
size_t getInterruptNumber () const
 
size_t getSyscallService () const
 
size_t getSyscallNumber () const
 
uintptr_t getSyscallParameter (size_t n) const
 
void setSyscallReturnValue (uintptr_t val)
 
 ARMV7InterruptState ()
 
 ARMV7InterruptState (const ARMV7InterruptState &)
 
ARMV7InterruptStateoperator= (const ARMV7InterruptState &)
 
 ~ARMV7InterruptState ()
 

Public Attributes

uint32_t m_usersp
 
uint32_t m_userlr
 
uint32_t m_r0
 
uint32_t m_r1
 
uint32_t m_r2
 
uint32_t m_r3
 
uint32_t m_r4
 
uint32_t m_r5
 
uint32_t m_r6
 
uint32_t m_r7
 
uint32_t m_r8
 
uint32_t m_r9
 
uint32_t m_r10
 
uint32_t m_r11
 
uint32_t m_r12
 
uint32_t m_lr
 
uint32_t m_pc
 
uint32_t m_spsr
 

Detailed Description

ARMV7 Interrupt State

Definition at line 30 of file armv7/state.h.

Constructor & Destructor Documentation

ARMV7InterruptState::ARMV7InterruptState ( )

The default constructor

Note
NOT implemented

Definition at line 27 of file armv7/state.cc.

ARMV7InterruptState::ARMV7InterruptState ( const ARMV7InterruptState is)

The copy-constructor

Note
NOT implemented

Definition at line 34 of file armv7/state.cc.

References operator=().

ARMV7InterruptState::~ARMV7InterruptState ( )
inline

The destructor

Note
NOT implemented

Definition at line 108 of file armv7/state.h.

Member Function Documentation

uintptr_t ARMV7InterruptState::getBasePointer ( ) const
inline

Get the base-pointer

Returns
the base-pointer

Definition at line 174 of file armv7/state.h.

uintptr_t ARMV7InterruptState::getInstructionPointer ( ) const
inline

Get the instruction-pointer of the next instruction that is executed after the interrupt is processed

Returns
the instruction-pointer

Definition at line 166 of file armv7/state.h.

size_t ARMV7InterruptState::getInterruptNumber ( ) const
inline

Get the interrupt number

Returns
the interrupt number
Todo:
implement

Definition at line 199 of file armv7/state.h.

processor_register_t ARMV7InterruptState::getRegister ( size_t  index) const

Get a specific register

Parameters
[in]indexthe index of the register (from 0 to getRegisterCount() - 1)
Returns
the value of the register

Definition at line 69 of file armv7/state.cc.

References m_usersp.

size_t ARMV7InterruptState::getRegisterCount ( ) const

Get the number of registers

Returns
the number of registers

Definition at line 65 of file armv7/state.cc.

const char * ARMV7InterruptState::getRegisterName ( size_t  index) const

Get the name of a specific register

Parameters
[in]indexthe index of the register (from 0 to getRegisterCount() - 1)
Returns
the name of the register

Definition at line 113 of file armv7/state.cc.

size_t ARMV7InterruptState::getRegisterSize ( size_t  index) const
inline

Get the register's size in bytes

Parameters
[in]indexthe index of the register (from 0 to getRegisterCount() - 1)
Returns
the register size in bytes

Definition at line 182 of file armv7/state.h.

uintptr_t ARMV7InterruptState::getStackPointer ( ) const
inline

Get the stack-pointer before the interrupt occured

Returns
the stack-pointer before the interrupt

Definition at line 158 of file armv7/state.h.

References m_usersp.

size_t ARMV7InterruptState::getSyscallNumber ( ) const
inline

Get the syscall function number

Returns
the syscall function number
Todo:
implement

Definition at line 210 of file armv7/state.h.

uintptr_t ARMV7InterruptState::getSyscallParameter ( size_t  n) const
inline

Get the n'th parameter for this syscall.

Definition at line 215 of file armv7/state.h.

size_t ARMV7InterruptState::getSyscallService ( ) const
inline

Get the syscall service number

Returns
the syscall service number
Todo:
implement

Definition at line 205 of file armv7/state.h.

bool ARMV7InterruptState::kernelMode ( ) const
inline

Did the interrupt happen in kernel-mode?

Returns
true, if the interrupt happened in kernel-mode, false otherwise

Definition at line 193 of file armv7/state.h.

ARMV7InterruptState & ARMV7InterruptState::operator= ( const ARMV7InterruptState is)

The assignement operator

Note
NOT implemented

Definition at line 44 of file armv7/state.cc.

Referenced by ARMV7InterruptState().

+ Here is the caller graph for this function:

void ARMV7InterruptState::setBasePointer ( uintptr_t  basePointer)
inline

Set the base-pointer

Parameters
[in]basePointerthe new base-pointer

Definition at line 178 of file armv7/state.h.

void ARMV7InterruptState::setInstructionPointer ( uintptr_t  instructionPointer)
inline

Set the instruction-pointer

Parameters
[in]instructionPointerthe new instruction-pointer

Definition at line 170 of file armv7/state.h.

void ARMV7InterruptState::setStackPointer ( uintptr_t  stackPointer)
inline

Set the userspace stack-pointer

Parameters
[in]stackPointerthe new stack-pointer

Definition at line 162 of file armv7/state.h.

References m_usersp.

Member Data Documentation

uint32_t ARMV7InterruptState::m_usersp

ARMV7 interrupt frame

Definition at line 113 of file armv7/state.h.

Referenced by getRegister(), getStackPointer(), and setStackPointer().


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