|
PS2SDK
PS2 Homebrew Libraries
|
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 | SifStopDma(...) sceSifStopDma(__VA_ARGS__) |
| #define | iSifDmaStat(...) isceSifDmaStat(__VA_ARGS__) |
| #define | iSifSetDma(...) isceSifSetDma(__VA_ARGS__) |
| #define | SifSetDChain(...) sceSifSetDChain(__VA_ARGS__) |
| #define | iSifSetDChain(...) isceSifSetDChain(__VA_ARGS__) |
| #define | SifSetReg(...) sceSifSetReg(__VA_ARGS__) |
| #define | SifGetReg(...) sceSifGetReg(__VA_ARGS__) |
| #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 | sceSifStopDma (void) |
| int | sceSifDmaStat (int trid) |
| int | sceiSifDmaStat (int trid) |
| int | sceSifSetDma (SifDmaTransfer_t *dmat, int count) |
| int | isceSifSetDma (SifDmaTransfer_t *dmat, int count) |
| void | sceSifSetDChain (void) |
| void | isceSifSetDChain (void) |
| int | sceSifSetReg (u32 register_num, int register_value) |
| int | sceSifGetReg (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) |
| int | GetMemoryMode (void) |
| 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 |
EE Kernel prototypes
Definition in file kernel.h.
| struct t_ee_sema |
| struct t_ee_thread |
| struct t_ee_thread_status |
| #define PUSHDATA | ( | t, | |
| x, | |||
| v, | |||
| l | |||
| ) |
| #define POPDATA | ( | t, | |
| x, | |||
| v, | |||
| l | |||
| ) |
| #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().
| #define CPU_DATA_CACHE 1 |
| #define DISABLE_TimerSystemTime | ( | ) |
| #define DISABLE_PATCHED_THREADS | ( | ) |
| #define DISABLE_PATCHED_ExecPS2 | ( | ) |
| #define DISABLE_PATCHED_TLBFunctions | ( | ) |
| #define DISABLE_PATCHED_FUNCTIONS | ( | ) |
| #define DISABLE_EXTRA_TIMERS_FUNCTIONS | ( | ) |
| anonymous enum |
| anonymous enum |
| enum CPU_CONFIG |