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

Go to the source code of this file.

Data Structures

struct  t_ee_sema
 
struct  t_ee_thread
 
struct  t_ee_thread_status
 

Macros

#define DI   DIntr
 
#define EI   EIntr
 
#define ExitHandler()   asm volatile("sync\nei\n")
 
#define EE_SYNC()   __asm__ volatile("sync")
 
#define EE_SYNCL()   __asm__ volatile("sync.l")
 
#define EE_SYNCP()   __asm__ volatile("sync.p")
 
#define UNCACHED_SEG(x)    ((void *)(((u32)(x)) | 0x20000000))
 
#define IS_UNCACHED_SEG(x)    (((u32)(x)) & 0x20000000)
 
#define UCAB_SEG(x)    ((void *)(((u32)(x)) | 0x30000000))
 
#define PUSHDATA(t, x, v, l)
 
#define POPDATA(t, x, v, l)
 
#define ALIGNED(x)   __attribute__((aligned((x))))
 
#define SetModuleGP()   ChangeGP(&_gp)
 
#define TH_SELF   0
 
#define MAX_THREADS   256
 
#define MAX_SEMAPHORES   256
 
#define MAX_PRIORITY   128
 
#define MAX_HANDLERS   128
 
#define MAX_ALARMS   64
 
#define WRITEBACK_DCACHE   0
 
#define INVALIDATE_DCACHE   1
 
#define INVALIDATE_ICACHE   2
 
#define INVALIDATE_CACHE   3
 
#define kINTC_GS   INTC_GS
 
#define kINTC_SBUS   INTC_SBUS
 
#define kINTC_VBLANK_START   INTC_VBLANK_S
 
#define kINTC_VBLANK_END   INTC_VBLANK_E
 
#define kINTC_VIF0   INTC_VIF0
 
#define kINTC_VIF1   INTC_VIF1
 
#define kINTC_VU0   INTC_VU0
 
#define kINTC_VU1   INTC_VU1
 
#define kINTC_IPU   INTC_IPU
 
#define kINTC_TIMER0   INTC_TIM0
 
#define kINTC_TIMER1   INTC_TIM1
 
#define INIT_DMAC   0x01
 
#define INIT_VU1   0x02
 
#define INIT_VIF1   0x04
 
#define INIT_GIF   0x08
 
#define INIT_VU0   0x10
 
#define INIT_VIF0   0x20
 
#define INIT_IPU   0x40
 
#define THS_RUN   0x01
 
#define THS_READY   0x02
 
#define THS_WAIT   0x04
 
#define THS_SUSPEND   0x08
 
#define THS_WAITSUSPEND   0x0c
 
#define THS_DORMANT   0x10
 
#define TSW_NONE   0
 
#define TSW_SLEEP   1
 
#define TSW_SEMA   2
 
#define CPU_DATA_CACHE   1
 
#define CPU_INSTRUCTION_CACHE   2
 
#define DISABLE_PATCHED_Exit()    void Exit(s32 exit_code) { KExit(exit_code); }
 
#define DISABLE_PATCHED_LoadExecPS2()    void LoadExecPS2(const char *filename, s32 num_args, char *args[]) { _LoadExecPS2(filename, num_args, args); }
 
#define NO_PATCHED_ExecOSD()    void ExecOSD(int num_args, char *args[]) { _ExecOSD(num_args, args); }
 
#define DISABLE_TimerSystemTime()
 
#define DISABLE_TimerAlarm()    void ForTimer_InitAlarm(void) {}
 
#define DISABLE_PATCHED_ALARMS()    void InitAlarm(void) {}
 
#define DISABLE_PATCHED_THREADS()
 
#define DISABLE_PATCHED_ExecPS2()
 
#define DISABLE_PATCHED_TLBFunctions()
 
#define DISABLE_PATCHED_FUNCTIONS()
 
#define DISABLE_EXTRA_TIMERS_FUNCTIONS()
 

Typedefs

typedef struct t_ee_sema ee_sema_t
 
typedef struct t_ee_thread ee_thread_t
 
typedef struct t_ee_thread_status ee_thread_status_t
 

Enumerations

enum  {
  INTC_GS , INTC_SBUS , INTC_VBLANK_S , INTC_VBLANK_E ,
  INTC_VIF0 , INTC_VIF1 , INTC_VU0 , INTC_VU1 ,
  INTC_IPU , INTC_TIM0 , INTC_TIM1 , INTC_TIM2 ,
  INTC_SFIFO = 13 , INTC_VU0WD
}
 
enum  {
  DMAC_VIF0 , DMAC_VIF1 , DMAC_GIF , DMAC_FROM_IPU ,
  DMAC_TO_IPU , DMAC_SIF0 , DMAC_SIF1 , DMAC_SIF2 ,
  DMAC_FROM_SPR , DMAC_TO_SPR , DMAC_CIS = 13 , DMAC_MEIS ,
  DMAC_BEIS
}
 
enum  CPU_CONFIG {
  CPU_CONFIG_ENABLE_DIE = 0 , CPU_CONFIG_ENABLE_ICE , CPU_CONFIG_ENABLE_DCE , CPU_CONFIG_DISBLE_DIE ,
  CPU_CONFIG_DISBLE_ICE , CPU_CONFIG_DISBLE_DCE
}
 
enum  {
  COP0_INDEX , COP0_RANDOM , COP0_ENTRYLO0 , COP0_ENTRYLO1 ,
  COP0_CONTEXT , COP0_PAGEMASK , COP0_WIRED , COP0_BADVADDR = 8 ,
  COP0_COUNT , COP0_ENTRYHI , COP0_COMPARE , COP0_STATUS ,
  COP0_CAUSE , COP0_EPC , COP0_PRID , COP0_CONFIG ,
  COP0_BADPADDR = 23 , COP0_DEBUG , COP0_PERF , COP0_TAGLO = 28 ,
  COP0_TAGHI , COP0_ERROREPC
}
 

Functions

void * ChangeGP (void *gp)
 
void SetGP (void *gp)
 
void * GetGP (void)
 
static void nopdelay (void)
 
static int ee_get_opmode (void)
 
static int ee_set_opmode (u32 opmode)
 
static int ee_kmode_enter ()
 
static int ee_kmode_exit ()
 
void _InitSys (void)
 
void TerminateLibrary (void)
 
int InitThread (void)
 
s32 iWakeupThread (s32 thread_id)
 
s32 iRotateThreadReadyQueue (s32 priority)
 
s32 iSuspendThread (s32 thread_id)
 
void InitTLBFunctions (void)
 
void InitTLB (void)
 
void Exit (s32 exit_code) __attribute__((noreturn))
 
s32 ExecPS2 (void *entry, void *gp, int num_args, char *args[])
 
void LoadExecPS2 (const char *filename, s32 num_args, char *args[]) __attribute__((noreturn))
 
void ExecOSD (int num_args, char *args[]) __attribute__((noreturn))
 
void InitAlarm (void)
 
void InitExecPS2 (void)
 
void InitOsd (void)
 
int PatchIsNeeded (void)
 
void InitDebug (void)
 
int DIntr (void)
 
int EIntr (void)
 
int EnableIntc (int intc)
 
int DisableIntc (int intc)
 
int EnableDmac (int dmac)
 
int DisableDmac (int dmac)
 
int iEnableIntc (int intc)
 
int iDisableIntc (int intc)
 
int iEnableDmac (int dmac)
 
int iDisableDmac (int dmac)
 
void SyncDCache (void *start, void *end)
 
void iSyncDCache (void *start, void *end)
 
void InvalidDCache (void *start, void *end)
 
void iInvalidDCache (void *start, void *end)
 
void ResetEE (u32 init_bitfield)
 
void SetGsCrt (s16 interlace, s16 pal_ntsc, s16 field)
 
void KExit (s32 exit_code) __attribute__((noreturn))
 
void _LoadExecPS2 (const char *filename, s32 num_args, char *args[]) __attribute__((noreturn))
 
s32 _ExecPS2 (void *entry, void *gp, int num_args, char *args[])
 
void RFU009 (u32 arg0, u32 arg1)
 
s32 AddSbusIntcHandler (s32 cause, void(*handler)(int call))
 
s32 RemoveSbusIntcHandler (s32 cause)
 
s32 Interrupt2Iop (s32 cause)
 
void SetVTLBRefillHandler (s32 handler_num, void *handler_func)
 
void SetVCommonHandler (s32 handler_num, void *handler_func)
 
void SetVInterruptHandler (s32 handler_num, void *handler_func)
 
s32 AddIntcHandler (s32 cause, s32(*handler_func)(s32 cause), s32 next)
 
s32 AddIntcHandler2 (s32 cause, s32(*handler_func)(s32 cause, void *arg, void *addr), s32 next, void *arg)
 
s32 RemoveIntcHandler (s32 cause, s32 handler_id)
 
s32 AddDmacHandler (s32 channel, s32(*handler)(s32 channel), s32 next)
 
s32 AddDmacHandler2 (s32 channel, s32(*handler)(s32 channel, void *arg, void *addr), s32 next, void *arg)
 
s32 RemoveDmacHandler (s32 channel, s32 handler_id)
 
s32 _EnableIntc (s32 cause)
 
s32 _DisableIntc (s32 cause)
 
s32 _EnableDmac (s32 channel)
 
s32 _DisableDmac (s32 channel)
 
s32 SetAlarm (u16 time, void(*callback)(s32 alarm_id, u16 time, void *common), void *common)
 
s32 _SetAlarm (u16 time, void(*callback)(s32 alarm_id, u16 time, void *common), void *common)
 
s32 ReleaseAlarm (s32 alarm_id)
 
s32 _ReleaseAlarm (s32 alarm_id)
 
s32 _iEnableIntc (s32 cause)
 
s32 _iDisableIntc (s32 cause)
 
s32 _iEnableDmac (s32 channel)
 
s32 _iDisableDmac (s32 channel)
 
s32 iSetAlarm (u16 time, void(*callback)(s32 alarm_id, u16 time, void *common), void *common)
 
s32 _iSetAlarm (u16 time, void(*callback)(s32 alarm_id, u16 time, void *common), void *common)
 
s32 iReleaseAlarm (s32 alarm_id)
 
s32 _iReleaseAlarm (s32 alarm_id)
 
s32 CreateThread (ee_thread_t *thread)
 
s32 DeleteThread (s32 thread_id)
 
s32 StartThread (s32 thread_id, void *args)
 
void ExitThread (void)
 
void ExitDeleteThread (void)
 
s32 TerminateThread (s32 thread_id)
 
s32 iTerminateThread (s32 thread_id)
 
s32 ChangeThreadPriority (s32 thread_id, s32 priority)
 
s32 iChangeThreadPriority (s32 thread_id, s32 priority)
 
s32 RotateThreadReadyQueue (s32 priority)
 
s32 _iRotateThreadReadyQueue (s32 priority)
 
s32 ReleaseWaitThread (s32 thread_id)
 
s32 iReleaseWaitThread (s32 thread_id)
 
s32 GetThreadId (void)
 
s32 _iGetThreadId (void)
 
s32 ReferThreadStatus (s32 thread_id, ee_thread_status_t *info)
 
s32 iReferThreadStatus (s32 thread_id, ee_thread_status_t *info)
 
s32 SleepThread (void)
 
s32 WakeupThread (s32 thread_id)
 
s32 _iWakeupThread (s32 thread_id)
 
s32 CancelWakeupThread (s32 thread_id)
 
s32 iCancelWakeupThread (s32 thread_id)
 
s32 SuspendThread (s32 thread_id)
 
s32 _iSuspendThread (s32 thread_id)
 
s32 ResumeThread (s32 thread_id)
 
s32 iResumeThread (s32 thread_id)
 
u8 RFU059 (void)
 
void * SetupThread (void *gp, void *stack, s32 stack_size, void *args, void *root_func)
 
void SetupHeap (void *heap_start, s32 heap_size)
 
void * EndOfHeap (void)
 
s32 CreateSema (ee_sema_t *sema)
 
s32 DeleteSema (s32 sema_id)
 
s32 SignalSema (s32 sema_id)
 
s32 iSignalSema (s32 sema_id)
 
s32 WaitSema (s32 sema_id)
 
s32 PollSema (s32 sema_id)
 
s32 iPollSema (s32 sema_id)
 
s32 ReferSemaStatus (s32 sema_id, ee_sema_t *sema)
 
s32 iReferSemaStatus (s32 sema_id, ee_sema_t *sema)
 
s32 iDeleteSema (s32 sema_id)
 
void SetOsdConfigParam (void *addr)
 
void GetOsdConfigParam (void *addr)
 
void GetGsHParam (void *addr1, void *addr2, void *addr3)
 
s32 GetGsVParam (void)
 
void SetGsHParam (void *addr1, void *addr2, void *addr3, void *addr4)
 
void SetGsVParam (s32 arg1)
 
int PutTLBEntry (unsigned int PageMask, unsigned int EntryHi, unsigned int EntryLo0, unsigned int EntryLo1)
 
int iPutTLBEntry (unsigned int PageMask, unsigned int EntryHi, unsigned int EntryLo0, unsigned int EntryLo1)
 
int _SetTLBEntry (unsigned int index, unsigned int PageMask, unsigned int EntryHi, unsigned int EntryLo0, unsigned int EntryLo1)
 
int iSetTLBEntry (unsigned int index, unsigned int PageMask, unsigned int EntryHi, unsigned int EntryLo0, unsigned int EntryLo1)
 
int GetTLBEntry (unsigned int index, unsigned int *PageMask, unsigned int *EntryHi, unsigned int *EntryLo0, unsigned int *EntryLo1)
 
int iGetTLBEntry (unsigned int index, unsigned int *PageMask, unsigned int *EntryHi, unsigned int *EntryLo0, unsigned int *EntryLo1)
 
int ProbeTLBEntry (unsigned int EntryHi, unsigned int *PageMask, unsigned int *EntryLo0, unsigned int *EntryLo1)
 
int iProbeTLBEntry (unsigned int EntryHi, unsigned int *PageMask, unsigned int *EntryLo0, unsigned int *EntryLo1)
 
int ExpandScratchPad (unsigned int page)
 
void EnableIntcHandler (u32 cause)
 
void iEnableIntcHandler (u32 cause)
 
void DisableIntcHandler (u32 cause)
 
void iDisableIntcHandler (u32 cause)
 
void EnableDmacHandler (u32 channel)
 
void iEnableDmacHandler (u32 channel)
 
void DisableDmacHandler (u32 channel)
 
void iDisableDmacHandler (u32 channel)
 
void KSeg0 (s32 arg1)
 
s32 EnableCache (s32 cache)
 
s32 DisableCache (s32 cache)
 
u32 GetCop0 (s32 reg_id)
 
void FlushCache (s32 operation)
 
u32 CpuConfig (u32 config)
 
u32 iGetCop0 (s32 reg_id)
 
void iFlushCache (s32 operation)
 
u32 iCpuConfig (u32 config)
 
void SetCPUTimerHandler (void(*handler)(void))
 
void SetCPUTimer (s32 compval)
 
void SetOsdConfigParam2 (void *config, s32 size, s32 offset)
 
void GetOsdConfigParam2 (void *config, s32 size, s32 offset)
 
u64 GsGetIMR (void)
 
u64 iGsGetIMR (void)
 
u64 GsPutIMR (u64 imr)
 
u64 iGsPutIMR (u64 imr)
 
void SetPgifHandler (void *handler)
 
void SetVSyncFlag (u32 *, u64 *)
 
void SetSyscall (s32 syscall_num, void *handler)
 
void _print (const char *fmt,...)
 
void SifStopDma (void)
 
s32 SifDmaStat (u32 id)
 
s32 iSifDmaStat (u32 id)
 
u32 SifSetDma (SifDmaTransfer_t *sdd, s32 len)
 
u32 iSifSetDma (SifDmaTransfer_t *sdd, s32 len)
 
void SifSetDChain (void)
 
void iSifSetDChain (void)
 
int SifSetReg (u32 register_num, int register_value)
 
int SifGetReg (u32 register_num)
 
void _ExecOSD (int num_args, char *args[]) __attribute__((noreturn))
 
s32 Deci2Call (s32, u32 *)
 
void PSMode (void)
 
s32 MachineType (void)
 
s32 GetMemorySize (void)
 
void _GetGsDxDyOffset (int mode, int *dx, int *dy, int *dw, int *dh)
 
int _InitTLB (void)
 
int SetMemoryMode (int mode)
 
void _SyncDCache (void *start, void *end)
 
void _InvalidDCache (void *start, void *end)
 
void * GetSyscallHandler (int syscall_no)
 
void * GetExceptionHandler (int except_no)
 
void * GetInterruptHandler (int intr_no)
 
int kCopy (void *dest, const void *src, int size)
 
int kCopyBytes (void *dest, const void *src, int size)
 
int Copy (void *dest, const void *src, int size)
 
void setup (int syscall_num, void *handler)
 
void * GetEntryAddress (int syscall)
 

Variables

void * _gp
 

Detailed Description

EE Kernel prototypes

Definition in file kernel.h.


Data Structure Documentation

◆ t_ee_sema

struct t_ee_sema

Definition at line 219 of file kernel.h.

Data Fields
int count
int max_count
int init_count
int wait_threads
u32 attr
u32 option

◆ t_ee_thread

struct t_ee_thread

Definition at line 229 of file kernel.h.

Data Fields
int status
void * func
void * stack
int stack_size
void * gp_reg
int initial_priority
int current_priority
u32 attr
u32 option

◆ t_ee_thread_status

struct t_ee_thread_status

Definition at line 257 of file kernel.h.

Data Fields
int status
void * func
void * stack
int stack_size
void * gp_reg
int initial_priority
int current_priority
u32 attr
u32 option
u32 waitType
u32 waitId
u32 wakeupCount

Macro Definition Documentation

◆ DI

#define DI   DIntr

Definition at line 24 of file kernel.h.

◆ EI

#define EI   EIntr

Definition at line 25 of file kernel.h.

◆ ExitHandler

#define ExitHandler ( )    asm volatile("sync\nei\n")

Definition at line 28 of file kernel.h.

◆ EE_SYNC

#define EE_SYNC ( )    __asm__ volatile("sync")

Definition at line 31 of file kernel.h.

◆ EE_SYNCL

#define EE_SYNCL ( )    __asm__ volatile("sync.l")

Definition at line 32 of file kernel.h.

◆ EE_SYNCP

#define EE_SYNCP ( )    __asm__ volatile("sync.p")

Definition at line 33 of file kernel.h.

◆ UNCACHED_SEG

#define UNCACHED_SEG (   x)     ((void *)(((u32)(x)) | 0x20000000))

Definition at line 35 of file kernel.h.

◆ IS_UNCACHED_SEG

#define IS_UNCACHED_SEG (   x)     (((u32)(x)) & 0x20000000)

Definition at line 38 of file kernel.h.

◆ UCAB_SEG

#define UCAB_SEG (   x)     ((void *)(((u32)(x)) | 0x30000000))

Definition at line 41 of file kernel.h.

◆ PUSHDATA

#define PUSHDATA (   t,
  x,
  v,
 
)
Value:
*(t *)(x) = (v); \
(l) = sizeof(t)

Definition at line 44 of file kernel.h.

◆ POPDATA

#define POPDATA (   t,
  x,
  v,
 
)
Value:
(v) = *(t *)(x); \
(l) = sizeof(t)

Definition at line 48 of file kernel.h.

◆ ALIGNED

#define ALIGNED (   x)    __attribute__((aligned((x))))

Definition at line 52 of file kernel.h.

◆ SetModuleGP

#define SetModuleGP ( )    ChangeGP(&_gp)

Definition at line 60 of file kernel.h.

◆ TH_SELF

#define TH_SELF   0

Special thread ID for referring to the running thread. Unlike the IOP kernel, this is only supported by ReferThreadStatus() and ChangeThreadPriority(). It can also be used by the iWakeupThread() syscall. But because the libkernel patch may call WakeupThread() to avoid the defect within iWakeupThread() that prevents the running thread from being woken up, THS_SELF should not be used with iWakeupThread().

Definition at line 67 of file kernel.h.

◆ MAX_THREADS

#define MAX_THREADS   256

Limits

Definition at line 70 of file kernel.h.

◆ MAX_SEMAPHORES

#define MAX_SEMAPHORES   256

Definition at line 71 of file kernel.h.

◆ MAX_PRIORITY

#define MAX_PRIORITY   128

Definition at line 72 of file kernel.h.

◆ MAX_HANDLERS

#define MAX_HANDLERS   128

Definition at line 73 of file kernel.h.

◆ MAX_ALARMS

#define MAX_ALARMS   64

Definition at line 74 of file kernel.h.

◆ WRITEBACK_DCACHE

#define WRITEBACK_DCACHE   0

Modes for FlushCache

Definition at line 77 of file kernel.h.

◆ INVALIDATE_DCACHE

#define INVALIDATE_DCACHE   1

Definition at line 78 of file kernel.h.

◆ INVALIDATE_ICACHE

#define INVALIDATE_ICACHE   2

Definition at line 79 of file kernel.h.

◆ INVALIDATE_CACHE

#define INVALIDATE_CACHE   3

Definition at line 80 of file kernel.h.

◆ kINTC_GS

#define kINTC_GS   INTC_GS

Definition at line 102 of file kernel.h.

◆ kINTC_SBUS

#define kINTC_SBUS   INTC_SBUS

Definition at line 103 of file kernel.h.

◆ kINTC_VBLANK_START

#define kINTC_VBLANK_START   INTC_VBLANK_S

Definition at line 104 of file kernel.h.

◆ kINTC_VBLANK_END

#define kINTC_VBLANK_END   INTC_VBLANK_E

Definition at line 105 of file kernel.h.

◆ kINTC_VIF0

#define kINTC_VIF0   INTC_VIF0

Definition at line 106 of file kernel.h.

◆ kINTC_VIF1

#define kINTC_VIF1   INTC_VIF1

Definition at line 107 of file kernel.h.

◆ kINTC_VU0

#define kINTC_VU0   INTC_VU0

Definition at line 108 of file kernel.h.

◆ kINTC_VU1

#define kINTC_VU1   INTC_VU1

Definition at line 109 of file kernel.h.

◆ kINTC_IPU

#define kINTC_IPU   INTC_IPU

Definition at line 110 of file kernel.h.

◆ kINTC_TIMER0

#define kINTC_TIMER0   INTC_TIM0

Definition at line 111 of file kernel.h.

◆ kINTC_TIMER1

#define kINTC_TIMER1   INTC_TIM1

Definition at line 112 of file kernel.h.

◆ INIT_DMAC

#define INIT_DMAC   0x01

ResetEE argument bits

Definition at line 133 of file kernel.h.

◆ INIT_VU1

#define INIT_VU1   0x02

Definition at line 134 of file kernel.h.

◆ INIT_VIF1

#define INIT_VIF1   0x04

Definition at line 135 of file kernel.h.

◆ INIT_GIF

#define INIT_GIF   0x08

Definition at line 136 of file kernel.h.

◆ INIT_VU0

#define INIT_VU0   0x10

Definition at line 137 of file kernel.h.

◆ INIT_VIF0

#define INIT_VIF0   0x20

Definition at line 138 of file kernel.h.

◆ INIT_IPU

#define INIT_IPU   0x40

Definition at line 139 of file kernel.h.

◆ THS_RUN

#define THS_RUN   0x01

Thread status

Definition at line 244 of file kernel.h.

◆ THS_READY

#define THS_READY   0x02

Definition at line 245 of file kernel.h.

◆ THS_WAIT

#define THS_WAIT   0x04

Definition at line 246 of file kernel.h.

◆ THS_SUSPEND

#define THS_SUSPEND   0x08

Definition at line 247 of file kernel.h.

◆ THS_WAITSUSPEND

#define THS_WAITSUSPEND   0x0c

Definition at line 248 of file kernel.h.

◆ THS_DORMANT

#define THS_DORMANT   0x10

Definition at line 249 of file kernel.h.

◆ TSW_NONE

#define TSW_NONE   0

Thread WAIT Status

Definition at line 252 of file kernel.h.

◆ TSW_SLEEP

#define TSW_SLEEP   1

Definition at line 253 of file kernel.h.

◆ TSW_SEMA

#define TSW_SEMA   2

Definition at line 254 of file kernel.h.

◆ CPU_DATA_CACHE

#define CPU_DATA_CACHE   1

EnableCache & DisableCache options (multiple options may be specified)

Definition at line 284 of file kernel.h.

◆ CPU_INSTRUCTION_CACHE

#define CPU_INSTRUCTION_CACHE   2

Definition at line 285 of file kernel.h.

◆ DISABLE_PATCHED_Exit

#define DISABLE_PATCHED_Exit ( )     void Exit(s32 exit_code) { KExit(exit_code); }

Definition at line 554 of file kernel.h.

◆ DISABLE_PATCHED_LoadExecPS2

#define DISABLE_PATCHED_LoadExecPS2 ( )     void LoadExecPS2(const char *filename, s32 num_args, char *args[]) { _LoadExecPS2(filename, num_args, args); }

Definition at line 557 of file kernel.h.

◆ NO_PATCHED_ExecOSD

#define NO_PATCHED_ExecOSD ( )     void ExecOSD(int num_args, char *args[]) { _ExecOSD(num_args, args); }

Definition at line 560 of file kernel.h.

◆ DISABLE_TimerSystemTime

#define DISABLE_TimerSystemTime ( )
Value:
s32 InitTimer(s32 in_mode) {(void)in_mode; return 0;} \
s32 EndTimer(void) {return 0;} \
s32 StartTimerSystemTime(void) {return 0;} \
s32 StopTimerSystemTime(void) {return 0;}

Definition at line 563 of file kernel.h.

◆ DISABLE_TimerAlarm

#define DISABLE_TimerAlarm ( )     void ForTimer_InitAlarm(void) {}

Definition at line 569 of file kernel.h.

◆ DISABLE_PATCHED_ALARMS

#define DISABLE_PATCHED_ALARMS ( )     void InitAlarm(void) {}

Definition at line 572 of file kernel.h.

◆ DISABLE_PATCHED_THREADS

#define DISABLE_PATCHED_THREADS ( )
Value:
int InitThread(void) { return 0; } \
s32 iRotateThreadReadyQueue(s32 priority) { return _iRotateThreadReadyQueue(priority); } \
s32 iWakeupThread(s32 thread_id) { return _iWakeupThread(thread_id); } \
s32 iSuspendThread(s32 thread_id) { return _iSuspendThread(thread_id); }

Definition at line 575 of file kernel.h.

◆ DISABLE_PATCHED_ExecPS2

#define DISABLE_PATCHED_ExecPS2 ( )
Value:
void InitExecPS2(void) {} \
s32 ExecPS2(void *entry, void *gp, int num_args, char *args[]) { return _ExecPS2(entry, gp, num_args, args); }

Definition at line 581 of file kernel.h.

◆ DISABLE_PATCHED_TLBFunctions

#define DISABLE_PATCHED_TLBFunctions ( )
Value:
void InitTLBFunctions(void) {} \
void InitTLB(void) {}

Definition at line 585 of file kernel.h.

◆ DISABLE_PATCHED_FUNCTIONS

#define DISABLE_PATCHED_FUNCTIONS ( )
Value:
DISABLE_PATCHED_ALARMS() \
DISABLE_PATCHED_THREADS() \
DISABLE_PATCHED_ExecPS2() \
DISABLE_PATCHED_TLBFunctions() \
DISABLE_PATCHED_Exit() \
DISABLE_PATCHED_LoadExecPS2()

Definition at line 589 of file kernel.h.

◆ DISABLE_EXTRA_TIMERS_FUNCTIONS

#define DISABLE_EXTRA_TIMERS_FUNCTIONS ( )
Value:
DISABLE_TimerSystemTime() \
DISABLE_TimerAlarm()

Definition at line 597 of file kernel.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

EE Interrupt Controller (INTC) interrupt numbers

Definition at line 83 of file kernel.h.

◆ anonymous enum

anonymous enum

EE Direct Memory Access Controller (DMAC) interrupt numbers

Definition at line 115 of file kernel.h.

◆ CPU_CONFIG

enum CPU_CONFIG

CpuConfig options

Definition at line 274 of file kernel.h.

◆ anonymous enum

anonymous enum

Cop0 Register for (i)GetCop0 and (i)SetCop0

Definition at line 288 of file kernel.h.

Function Documentation

◆ nopdelay()

static void nopdelay ( void  )
inlinestatic

Definition at line 141 of file kernel.h.

◆ ee_get_opmode()

static int ee_get_opmode ( void  )
inlinestatic

Definition at line 150 of file kernel.h.

◆ ee_set_opmode()

static int ee_set_opmode ( u32  opmode)
inlinestatic

Definition at line 164 of file kernel.h.

◆ ee_kmode_enter()

static int ee_kmode_enter ( )
inlinestatic

Definition at line 184 of file kernel.h.

◆ ee_kmode_exit()

static int ee_kmode_exit ( )
inlinestatic

Definition at line 202 of file kernel.h.

◆ InitOsd()

void InitOsd ( void  )

Definition at line 56 of file libosd_full.c.

◆ PatchIsNeeded()

int PatchIsNeeded ( void  )

Definition at line 20 of file libosd_common.c.

◆ InitDebug()

void InitDebug ( void  )

Definition at line 13 of file debug.c.

◆ ReleaseAlarm()

s32 ReleaseAlarm ( s32  alarm_id)

Definition at line 107 of file alarm.c.

◆ ExitThread()

void ExitThread ( void  )

Definition at line 217 of file thbase.c.

◆ ExitDeleteThread()

void ExitDeleteThread ( void  )

Definition at line 237 of file thbase.c.

◆ GetThreadId()

s32 GetThreadId ( void  )

Definition at line 636 of file thbase.c.

◆ SleepThread()

s32 SleepThread ( void  )

Definition at line 697 of file thbase.c.

◆ PutTLBEntry()

int PutTLBEntry ( unsigned int  PageMask,
unsigned int  EntryHi,
unsigned int  EntryLo0,
unsigned int  EntryLo1 
)

Definition at line 63 of file tlbsrc.c.

◆ GetTLBEntry()

int GetTLBEntry ( unsigned int  index,
unsigned int *  PageMask,
unsigned int *  EntryHi,
unsigned int *  EntryLo0,
unsigned int *  EntryLo1 
)

Definition at line 118 of file tlbsrc.c.

◆ ProbeTLBEntry()

int ProbeTLBEntry ( unsigned int  EntryHi,
unsigned int *  PageMask,
unsigned int *  EntryLo0,
unsigned int *  EntryLo1 
)

Definition at line 145 of file tlbsrc.c.

◆ ExpandScratchPad()

int ExpandScratchPad ( unsigned int  page)

Definition at line 176 of file tlbsrc.c.