PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
excepman.h File Reference
#include <types.h>
#include <irx.h>
+ Include dependency graph for excepman.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  _exception_handler_struct_t
 

Macros

#define IOP_EXCEPTION_INT   0
 
#define IOP_EXCEPTION_MOD   1
 
#define IOP_EXCEPTION_TLBL   2
 
#define IOP_EXCEPTION_TLBS   3
 
#define IOP_EXCEPTION_ADEL   4
 
#define IOP_EXCEPTION_ADES   5
 
#define IOP_EXCEPTION_IBE   6
 
#define IOP_EXCEPTION_DBE   7
 
#define IOP_EXCEPTION_SYS   8
 
#define IOP_EXCEPTION_BP   9
 
#define IOP_EXCEPTION_RI   10
 
#define IOP_EXCEPTION_CPU   11
 
#define IOP_EXCEPTION_OVF   12
 
#define IOP_EXCEPTION_R13   13
 
#define IOP_EXCEPTION_R14   14
 
#define IOP_EXCEPTION_HDB   15
 
#define excepman_IMPORTS_start   DECLARE_IMPORT_TABLE(excepman, 1, 2)
 
#define excepman_IMPORTS_end   END_IMPORT_TABLE
 
#define I_GetExHandlersTable   DECLARE_IMPORT(3, GetExHandlersTable)
 
#define I_RegisterExceptionHandler   DECLARE_IMPORT(4, RegisterExceptionHandler)
 
#define I_RegisterPriorityExceptionHandler   DECLARE_IMPORT(5, RegisterPriorityExceptionHandler)
 
#define I_RegisterDefaultExceptionHandler   DECLARE_IMPORT(6, RegisterDefaultExceptionHandler)
 
#define I_ReleaseExceptionHandler   DECLARE_IMPORT(7, ReleaseExceptionHandler)
 
#define I_ReleaseDefaultExceptionHandler   DECLARE_IMPORT(8, ReleaseDefaultExceptionHandler)
 

Typedefs

typedef struct _exception_handler_struct_t exception_handler_struct_t
 
typedef exception_handler_struct_texception_handler_t
 

Functions

void * GetExHandlersTable ()
 
int RegisterExceptionHandler (int exception, exception_handler_t handler)
 
int RegisterPriorityExceptionHandler (int exception, int priority, exception_handler_t handler)
 
int RegisterDefaultExceptionHandler (exception_handler_t handler)
 
int ReleaseExceptionHandler (int exception, exception_handler_t handler)
 
int ReleaseDefaultExceptionHandler (exception_handler_t handler)
 

Detailed Description

Definitions and imports for excepman

Definition in file excepman.h.


Data Structure Documentation

◆ _exception_handler_struct_t

struct _exception_handler_struct_t

Definition at line 60 of file excepman.h.

+ Collaboration diagram for _exception_handler_struct_t:
Data Fields
struct _exception_handler_struct_t * next
int info
u32 funccode[]

Macro Definition Documentation

◆ IOP_EXCEPTION_INT

#define IOP_EXCEPTION_INT   0

External Interrupt

Definition at line 28 of file excepman.h.

◆ IOP_EXCEPTION_MOD

#define IOP_EXCEPTION_MOD   1

TLB Modification Exception

Definition at line 30 of file excepman.h.

◆ IOP_EXCEPTION_TLBL

#define IOP_EXCEPTION_TLBL   2

TLB miss Exception (Load or instruction fetch)

Definition at line 32 of file excepman.h.

◆ IOP_EXCEPTION_TLBS

#define IOP_EXCEPTION_TLBS   3

TLB miss exception (Store)

Definition at line 34 of file excepman.h.

◆ IOP_EXCEPTION_ADEL

#define IOP_EXCEPTION_ADEL   4

Address Error Exception (Load or instruction fetch)

Definition at line 36 of file excepman.h.

◆ IOP_EXCEPTION_ADES

#define IOP_EXCEPTION_ADES   5

Address Error Exception (Store)

Definition at line 38 of file excepman.h.

◆ IOP_EXCEPTION_IBE

#define IOP_EXCEPTION_IBE   6

Bus Error Exception (for Instruction Fetch)

Definition at line 40 of file excepman.h.

◆ IOP_EXCEPTION_DBE

#define IOP_EXCEPTION_DBE   7

Bus Error Exception (for data Load or Store)

Definition at line 42 of file excepman.h.

◆ IOP_EXCEPTION_SYS

#define IOP_EXCEPTION_SYS   8

SYSCALL Exception

Definition at line 44 of file excepman.h.

◆ IOP_EXCEPTION_BP

#define IOP_EXCEPTION_BP   9

Breakpoint Exception

Definition at line 46 of file excepman.h.

◆ IOP_EXCEPTION_RI

#define IOP_EXCEPTION_RI   10

Reserved Instruction Exception

Definition at line 48 of file excepman.h.

◆ IOP_EXCEPTION_CPU

#define IOP_EXCEPTION_CPU   11

Co-Processor Unusable Exception

Definition at line 50 of file excepman.h.

◆ IOP_EXCEPTION_OVF

#define IOP_EXCEPTION_OVF   12

Arithmetic Overflow Exception

Definition at line 52 of file excepman.h.

◆ IOP_EXCEPTION_R13

#define IOP_EXCEPTION_R13   13

Reserved 13

Definition at line 54 of file excepman.h.

◆ IOP_EXCEPTION_R14

#define IOP_EXCEPTION_R14   14

Reserved 14. This is FPE though, but won't be useful on IOP.

Definition at line 56 of file excepman.h.

◆ IOP_EXCEPTION_HDB

#define IOP_EXCEPTION_HDB   15

Hardware DeBug(aka "Hardware Breakpoint")

Definition at line 58 of file excepman.h.

◆ excepman_IMPORTS_start

#define excepman_IMPORTS_start   DECLARE_IMPORT_TABLE(excepman, 1, 2)

Definition at line 78 of file excepman.h.

◆ excepman_IMPORTS_end

#define excepman_IMPORTS_end   END_IMPORT_TABLE

Definition at line 79 of file excepman.h.

◆ I_GetExHandlersTable

#define I_GetExHandlersTable   DECLARE_IMPORT(3, GetExHandlersTable)

Definition at line 81 of file excepman.h.

◆ I_RegisterExceptionHandler

#define I_RegisterExceptionHandler   DECLARE_IMPORT(4, RegisterExceptionHandler)

Definition at line 82 of file excepman.h.

◆ I_RegisterPriorityExceptionHandler

#define I_RegisterPriorityExceptionHandler   DECLARE_IMPORT(5, RegisterPriorityExceptionHandler)

Definition at line 83 of file excepman.h.

◆ I_RegisterDefaultExceptionHandler

#define I_RegisterDefaultExceptionHandler   DECLARE_IMPORT(6, RegisterDefaultExceptionHandler)

Definition at line 84 of file excepman.h.

◆ I_ReleaseExceptionHandler

#define I_ReleaseExceptionHandler   DECLARE_IMPORT(7, ReleaseExceptionHandler)

Definition at line 85 of file excepman.h.

◆ I_ReleaseDefaultExceptionHandler

#define I_ReleaseDefaultExceptionHandler   DECLARE_IMPORT(8, ReleaseDefaultExceptionHandler)

Definition at line 86 of file excepman.h.

Typedef Documentation

◆ exception_handler_t

Definition at line 67 of file excepman.h.

Function Documentation

◆ GetExHandlersTable()

void * GetExHandlersTable ( )

Definition at line 167 of file excepman.c.

◆ RegisterExceptionHandler()

int RegisterExceptionHandler ( int  exception,
exception_handler_t  handler 
)

will call RegisterPriorityExceptionHandler with prio = 2

Definition at line 70 of file excepman.c.

◆ RegisterPriorityExceptionHandler()

int RegisterPriorityExceptionHandler ( int  exception,
int  priority,
exception_handler_t  handler 
)

Definition at line 75 of file excepman.c.

◆ RegisterDefaultExceptionHandler()

int RegisterDefaultExceptionHandler ( exception_handler_t  handler)

Definition at line 109 of file excepman.c.

◆ ReleaseExceptionHandler()

int ReleaseExceptionHandler ( int  exception,
exception_handler_t  handler 
)

Definition at line 119 of file excepman.c.

◆ ReleaseDefaultExceptionHandler()

int ReleaseDefaultExceptionHandler ( exception_handler_t  handler)

Definition at line 145 of file excepman.c.