PS2SDK
PS2 Homebrew Libraries
Loading...
Searching...
No Matches
kernel.h
Go to the documentation of this file.
1/*
2# _____ ___ ____ ___ ____
3# ____| | ____| | | |____|
4# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5#-----------------------------------------------------------------------
6# (C)2001, Gustavo Scotti (gustavo@scotti.com)
7# (c) 2003 Marcus R. Brown <mrbrown@0xd6.org>
8# Licenced under Academic Free License version 2.0
9# Review ps2sdk README & LICENSE files for further details.
10*/
11
17#ifndef __KERNEL_H__
18#define __KERNEL_H__
19
20#include <stddef.h>
21#include <stdarg.h>
22#include <sifdma.h>
23
24#define DI DIntr
25#define EI EIntr
26
27// Workaround for EE kernel bug: call this immediately before returning from any interrupt handler.
28#define ExitHandler() asm volatile("sync\nei\n")
29
30// note: 'sync' is the same as 'sync.l'
31#define EE_SYNC() __asm__ volatile("sync")
32#define EE_SYNCL() __asm__ volatile("sync.l")
33#define EE_SYNCP() __asm__ volatile("sync.p")
34
35#define UNCACHED_SEG(x) \
36 ((void *)(((u32)(x)) | 0x20000000))
37
38#define IS_UNCACHED_SEG(x) \
39 (((u32)(x)) & 0x20000000)
40
41#define UCAB_SEG(x) \
42 ((void *)(((u32)(x)) | 0x30000000))
43
44#define PUSHDATA(t, x, v, l) \
45 *(t *)(x) = (v); \
46 (l) = sizeof(t)
47
48#define POPDATA(t, x, v, l) \
49 (v) = *(t *)(x); \
50 (l) = sizeof(t)
51
52#define ALIGNED(x) __attribute__((aligned((x))))
53
54// GP functions
55extern void *ChangeGP(void *gp);
56extern void SetGP(void *gp);
57extern void *GetGP(void);
58
59extern void *_gp;
60#define SetModuleGP() ChangeGP(&_gp)
61
67#define TH_SELF 0
68
70#define MAX_THREADS 256 // A few will be used for the kernel patches. Thread 0 is always the idle thread.
71#define MAX_SEMAPHORES 256 // A few will be used for the kernel patches.
72#define MAX_PRIORITY 128
73#define MAX_HANDLERS 128
74#define MAX_ALARMS 64
75
77#define WRITEBACK_DCACHE 0
78#define INVALIDATE_DCACHE 1
79#define INVALIDATE_ICACHE 2
80#define INVALIDATE_CACHE 3 // Invalidate both data & instruction caches.
81
83enum {
84 INTC_GS,
85 INTC_SBUS,
86 INTC_VBLANK_S,
87 INTC_VBLANK_E,
88 INTC_VIF0,
89 INTC_VIF1,
90 INTC_VU0,
91 INTC_VU1,
92 INTC_IPU,
93 INTC_TIM0,
94 INTC_TIM1,
95 INTC_TIM2,
96 // INTC_TIM3, // Reserved by the EE kernel for alarms (do not use)
97 INTC_SFIFO = 13, // Error encountered during SFIFO transfer
98 INTC_VU0WD // VU0 WatchDog; ForceBreak is sent to VU0 if left in RUN state for extended periods of time.
99};
100
101// For backward-compatibility
102#define kINTC_GS INTC_GS
103#define kINTC_SBUS INTC_SBUS
104#define kINTC_VBLANK_START INTC_VBLANK_S
105#define kINTC_VBLANK_END INTC_VBLANK_E
106#define kINTC_VIF0 INTC_VIF0
107#define kINTC_VIF1 INTC_VIF1
108#define kINTC_VU0 INTC_VU0
109#define kINTC_VU1 INTC_VU1
110#define kINTC_IPU INTC_IPU
111#define kINTC_TIMER0 INTC_TIM0
112#define kINTC_TIMER1 INTC_TIM1
113
115enum {
116 DMAC_VIF0,
117 DMAC_VIF1,
118 DMAC_GIF,
119 DMAC_FROM_IPU,
120 DMAC_TO_IPU,
121 DMAC_SIF0,
122 DMAC_SIF1,
123 DMAC_SIF2,
124 DMAC_FROM_SPR,
125 DMAC_TO_SPR,
126
127 DMAC_CIS = 13, // Channel interrupt
128 DMAC_MEIS, // MemFIFO empty interrupt
129 DMAC_BEIS, // Bus error interrupt
130};
131
133#define INIT_DMAC 0x01
134#define INIT_VU1 0x02
135#define INIT_VIF1 0x04
136#define INIT_GIF 0x08
137#define INIT_VU0 0x10
138#define INIT_VIF0 0x20
139#define INIT_IPU 0x40
140
141static inline void nopdelay(void)
142{
143 int i = 0xfffff;
144
145 do {
146 __asm__("nop\nnop\nnop\nnop\nnop\n");
147 } while (i-- != -1);
148}
149
150static inline int ee_get_opmode(void)
151{
152 u32 status;
153
154 __asm__ volatile(
155 ".set\tpush\n\t"
156 ".set\tnoreorder\n\t"
157 "mfc0\t%0, $12\n\t"
158 ".set\tpop\n\t"
159 : "=r"(status));
160
161 return ((status >> 3) & 3);
162}
163
164static inline int ee_set_opmode(u32 opmode)
165{
166 u32 status, mask;
167
168 __asm__ volatile(
169 ".set\tpush\n\t"
170 ".set\tnoreorder\n\t"
171 "mfc0\t%0, $12\n\t"
172 "li\t%1, 0xffffffe7\n\t"
173 "and\t%0, %1\n\t"
174 "or\t%0, %2\n\t"
175 "mtc0\t%0, $12\n\t"
176 "sync.p\n\t"
177 ".set\tpop\n\t"
178 : "=r"(status), "=r"(mask)
179 : "r"(opmode));
180
181 return ((status >> 3) & 3);
182}
183
184static inline int ee_kmode_enter()
185{
186 u32 status, mask;
187
188 __asm__ volatile(
189 ".set\tpush\n\t"
190 ".set\tnoreorder\n\t"
191 "mfc0\t%0, $12\n\t"
192 "li\t%1, 0xffffffe7\n\t"
193 "and\t%0, %1\n\t"
194 "mtc0\t%0, $12\n\t"
195 "sync.p\n\t"
196 ".set\tpop\n\t"
197 : "=r"(status), "=r"(mask));
198
199 return status;
200}
201
202static inline int ee_kmode_exit()
203{
204 int status;
205
206 __asm__ volatile(
207 ".set\tpush\n\t"
208 ".set\tnoreorder\n\t"
209 "mfc0\t%0, $12\n\t"
210 "ori\t%0, 0x10\n\t"
211 "mtc0\t%0, $12\n\t"
212 "sync.p\n\t"
213 ".set\tpop\n\t"
214 : "=r"(status));
215
216 return status;
217}
218
219typedef struct t_ee_sema
220{
221 int count,
222 max_count,
223 init_count,
224 wait_threads;
225 u32 attr,
226 option;
227} ee_sema_t;
228
229typedef struct t_ee_thread
230{
231 int status; // 0x00
232 void *func; // 0x04
233 void *stack; // 0x08
234 int stack_size; // 0x0C
235 void *gp_reg; // 0x10
236 int initial_priority; // 0x14
237 int current_priority; // 0x18
238 u32 attr; // 0x1C
239 u32 option; // 0x20 Do not use - officially documented to not work.
240
242
244#define THS_RUN 0x01
245#define THS_READY 0x02
246#define THS_WAIT 0x04
247#define THS_SUSPEND 0x08
248#define THS_WAITSUSPEND 0x0c
249#define THS_DORMANT 0x10
250
252#define TSW_NONE 0 // Thread is not in WAIT state
253#define TSW_SLEEP 1
254#define TSW_SEMA 2
255
256// sizeof() == 0x30
257typedef struct t_ee_thread_status
258{
259 int status; // 0x00
260 void *func; // 0x04
261 void *stack; // 0x08
262 int stack_size; // 0x0C
263 void *gp_reg; // 0x10
264 int initial_priority; // 0x14
265 int current_priority; // 0x18
266 u32 attr; // 0x1C
267 u32 option; // 0x20
268 u32 waitType; // 0x24
269 u32 waitId; // 0x28
270 u32 wakeupCount; // 0x2C
272
275 CPU_CONFIG_ENABLE_DIE = 0, // Enable Dual Issue
276 CPU_CONFIG_ENABLE_ICE, // Enable Instruction Cache
277 CPU_CONFIG_ENABLE_DCE, // Enable Data Cache
278 CPU_CONFIG_DISBLE_DIE, // Disable Dual Issue
279 CPU_CONFIG_DISBLE_ICE, // Disable Instruction Cache
280 CPU_CONFIG_DISBLE_DCE // Disable Data Cache
281};
282
284#define CPU_DATA_CACHE 1
285#define CPU_INSTRUCTION_CACHE 2
286
288enum {
289 COP0_INDEX,
290 COP0_RANDOM,
291 COP0_ENTRYLO0,
292 COP0_ENTRYLO1,
293 COP0_CONTEXT,
294 COP0_PAGEMASK,
295 COP0_WIRED,
296 // 7 reserved
297 COP0_BADVADDR = 8,
298 COP0_COUNT,
299 COP0_ENTRYHI,
300 COP0_COMPARE,
301 COP0_STATUS,
302 COP0_CAUSE,
303 COP0_EPC,
304 COP0_PRID,
305 COP0_CONFIG,
306 // 17-22 reserved
307 COP0_BADPADDR = 23,
308 COP0_DEBUG,
309 COP0_PERF,
310 // 26-27 reserved
311 COP0_TAGLO = 28,
312 COP0_TAGHI,
313 COP0_ERROREPC,
314};
315
316#ifdef __cplusplus
317extern "C" {
318#endif
319
320/* Initialization/deinitialization routines. */
321extern void _InitSys(void); // Run by crt0
322
323extern void TerminateLibrary(void); // Run by crt0
324
325/* Thread update functions */
326extern int InitThread(void); // Run by _InitSys
327
328extern s32 iWakeupThread(s32 thread_id);
329extern s32 iRotateThreadReadyQueue(s32 priority);
330extern s32 iSuspendThread(s32 thread_id);
331
332/* TLB update functions */
333extern void InitTLBFunctions(void); // Run by _InitSys
334
335extern void InitTLB(void);
336extern void Exit(s32 exit_code) __attribute__((noreturn));
337extern s32 ExecPS2(void *entry, void *gp, int num_args, char *args[]);
338extern void LoadExecPS2(const char *filename, s32 num_args, char *args[]) __attribute__((noreturn));
339extern void ExecOSD(int num_args, char *args[]) __attribute__((noreturn));
340
341/* Alarm update functions */
342extern void InitAlarm(void); // Run by _InitSys
343
344/* libosd update functions */
345extern void InitExecPS2(void); // ExecPS2 patch only. Run by _InitSys, Exit, LoadExecPS2, ExecPS2 and ExecOSD
346extern void InitOsd(void); // ExecPS2 + System Configuration patches. Please refer to the comments within libosd_full.c
347
348extern int PatchIsNeeded(void); // Indicates whether the patch is required.
349
350// Debug (print) update functions:
351extern void InitDebug(void);
352
353/* Glue routines. */
354extern int DIntr(void);
355extern int EIntr(void);
356
357extern int EnableIntc(int intc);
358extern int DisableIntc(int intc);
359extern int EnableDmac(int dmac);
360extern int DisableDmac(int dmac);
361
362extern int iEnableIntc(int intc);
363extern int iDisableIntc(int intc);
364extern int iEnableDmac(int dmac);
365extern int iDisableDmac(int dmac);
366
367extern void SyncDCache(void *start, void *end);
368extern void iSyncDCache(void *start, void *end);
369extern void InvalidDCache(void *start, void *end);
370extern void iInvalidDCache(void *start, void *end);
371
372/* System call prototypes */
373extern void ResetEE(u32 init_bitfield);
374extern void SetGsCrt(s16 interlace, s16 pal_ntsc, s16 field);
375extern void KExit(s32 exit_code) __attribute__((noreturn));
376extern void _LoadExecPS2(const char *filename, s32 num_args, char *args[]) __attribute__((noreturn));
377extern s32 _ExecPS2(void *entry, void *gp, int num_args, char *args[]);
378extern void RFU009(u32 arg0, u32 arg1);
379extern s32 AddSbusIntcHandler(s32 cause, void (*handler)(int call));
380extern s32 RemoveSbusIntcHandler(s32 cause);
381extern s32 Interrupt2Iop(s32 cause);
382extern void SetVTLBRefillHandler(s32 handler_num, void *handler_func);
383extern void SetVCommonHandler(s32 handler_num, void *handler_func);
384extern void SetVInterruptHandler(s32 handler_num, void *handler_func);
385extern s32 AddIntcHandler(s32 cause, s32 (*handler_func)(s32 cause), s32 next);
386extern s32 AddIntcHandler2(s32 cause, s32 (*handler_func)(s32 cause, void *arg, void *addr), s32 next, void *arg);
387extern s32 RemoveIntcHandler(s32 cause, s32 handler_id);
388extern s32 AddDmacHandler(s32 channel, s32 (*handler)(s32 channel), s32 next);
389extern s32 AddDmacHandler2(s32 channel, s32 (*handler)(s32 channel, void *arg, void *addr), s32 next, void *arg);
390extern s32 RemoveDmacHandler(s32 channel, s32 handler_id);
391extern s32 _EnableIntc(s32 cause);
392extern s32 _DisableIntc(s32 cause);
393extern s32 _EnableDmac(s32 channel);
394extern s32 _DisableDmac(s32 channel);
395
396// Alarm value is in H-SYNC ticks.
397extern s32 SetAlarm(u16 time, void (*callback)(s32 alarm_id, u16 time, void *common), void *common);
398extern s32 _SetAlarm(u16 time, void (*callback)(s32 alarm_id, u16 time, void *common), void *common);
399extern s32 ReleaseAlarm(s32 alarm_id);
400extern s32 _ReleaseAlarm(s32 alarm_id);
401
402extern s32 _iEnableIntc(s32 cause);
403extern s32 _iDisableIntc(s32 cause);
404extern s32 _iEnableDmac(s32 channel);
405extern s32 _iDisableDmac(s32 channel);
406
407extern s32 iSetAlarm(u16 time, void (*callback)(s32 alarm_id, u16 time, void *common), void *common);
408extern s32 _iSetAlarm(u16 time, void (*callback)(s32 alarm_id, u16 time, void *common), void *common);
409extern s32 iReleaseAlarm(s32 alarm_id);
410extern s32 _iReleaseAlarm(s32 alarm_id);
411
412extern s32 CreateThread(ee_thread_t *thread);
413extern s32 DeleteThread(s32 thread_id);
414extern s32 StartThread(s32 thread_id, void *args);
415extern void ExitThread(void);
416extern void ExitDeleteThread(void);
417extern s32 TerminateThread(s32 thread_id);
418extern s32 iTerminateThread(s32 thread_id);
419// extern void DisableDispatchThread(void); // not supported
420// extern void EnableDispatchThread(void); // not supported
421extern s32 ChangeThreadPriority(s32 thread_id, s32 priority);
422extern s32 iChangeThreadPriority(s32 thread_id, s32 priority);
423extern s32 RotateThreadReadyQueue(s32 priority);
424extern s32 _iRotateThreadReadyQueue(s32 priority);
425extern s32 ReleaseWaitThread(s32 thread_id);
426extern s32 iReleaseWaitThread(s32 thread_id);
427extern s32 GetThreadId(void);
428extern s32 _iGetThreadId(void); // This is actually GetThreadId(), used for a hack by SCE to work around the iWakeupThread design flaw.
429extern s32 ReferThreadStatus(s32 thread_id, ee_thread_status_t *info);
430extern s32 iReferThreadStatus(s32 thread_id, ee_thread_status_t *info);
431extern s32 SleepThread(void);
432extern s32 WakeupThread(s32 thread_id);
433extern s32 _iWakeupThread(s32 thread_id);
434extern s32 CancelWakeupThread(s32 thread_id);
435extern s32 iCancelWakeupThread(s32 thread_id);
436extern s32 SuspendThread(s32 thread_id);
437extern s32 _iSuspendThread(s32 thread_id);
438extern s32 ResumeThread(s32 thread_id);
439extern s32 iResumeThread(s32 thread_id);
440
441extern u8 RFU059(void);
442
443extern void *SetupThread(void *gp, void *stack, s32 stack_size, void *args, void *root_func);
444extern void SetupHeap(void *heap_start, s32 heap_size);
445extern void *EndOfHeap(void);
446
447extern s32 CreateSema(ee_sema_t *sema);
448extern s32 DeleteSema(s32 sema_id);
449extern s32 SignalSema(s32 sema_id);
450extern s32 iSignalSema(s32 sema_id);
451extern s32 WaitSema(s32 sema_id);
452extern s32 PollSema(s32 sema_id);
453extern s32 iPollSema(s32 sema_id);
454extern s32 ReferSemaStatus(s32 sema_id, ee_sema_t *sema);
455extern s32 iReferSemaStatus(s32 sema_id, ee_sema_t *sema);
456extern s32 iDeleteSema(s32 sema_id);
457extern void SetOsdConfigParam(void *addr);
458extern void GetOsdConfigParam(void *addr);
459extern void GetGsHParam(void *addr1, void *addr2, void *addr3);
460extern s32 GetGsVParam(void);
461extern void SetGsHParam(void *addr1, void *addr2, void *addr3, void *addr4);
462extern void SetGsVParam(s32 arg1);
463
464// TLB functions are only available if InitTLBFunctions() is run (Normally run by crt0).
465extern int PutTLBEntry(unsigned int PageMask, unsigned int EntryHi, unsigned int EntryLo0, unsigned int EntryLo1);
466extern int iPutTLBEntry(unsigned int PageMask, unsigned int EntryHi, unsigned int EntryLo0, unsigned int EntryLo1);
467extern int _SetTLBEntry(unsigned int index, unsigned int PageMask, unsigned int EntryHi, unsigned int EntryLo0, unsigned int EntryLo1);
468extern int iSetTLBEntry(unsigned int index, unsigned int PageMask, unsigned int EntryHi, unsigned int EntryLo0, unsigned int EntryLo1);
469extern int GetTLBEntry(unsigned int index, unsigned int *PageMask, unsigned int *EntryHi, unsigned int *EntryLo0, unsigned int *EntryLo1);
470extern int iGetTLBEntry(unsigned int index, unsigned int *PageMask, unsigned int *EntryHi, unsigned int *EntryLo0, unsigned int *EntryLo1);
471extern int ProbeTLBEntry(unsigned int EntryHi, unsigned int *PageMask, unsigned int *EntryLo0, unsigned int *EntryLo1);
472extern int iProbeTLBEntry(unsigned int EntryHi, unsigned int *PageMask, unsigned int *EntryLo0, unsigned int *EntryLo1);
473extern int ExpandScratchPad(unsigned int page);
474
475extern void EnableIntcHandler(u32 cause);
476extern void iEnableIntcHandler(u32 cause);
477extern void DisableIntcHandler(u32 cause);
478extern void iDisableIntcHandler(u32 cause);
479extern void EnableDmacHandler(u32 channel);
480extern void iEnableDmacHandler(u32 channel);
481extern void DisableDmacHandler(u32 channel);
482extern void iDisableDmacHandler(u32 channel);
483extern void KSeg0(s32 arg1);
484extern s32 EnableCache(s32 cache);
485extern s32 DisableCache(s32 cache);
486extern u32 GetCop0(s32 reg_id);
487extern void FlushCache(s32 operation);
488extern u32 CpuConfig(u32 config);
489extern u32 iGetCop0(s32 reg_id);
490extern void iFlushCache(s32 operation);
491extern u32 iCpuConfig(u32 config);
492extern void SetCPUTimerHandler(void (*handler)(void));
493extern void SetCPUTimer(s32 compval);
494
495// These two are not available in the unpatched Protokernel (Unpatched SCPH-10000 and SCPH-15000 kernels).
496extern void SetOsdConfigParam2(void *config, s32 size, s32 offset);
497extern void GetOsdConfigParam2(void *config, s32 size, s32 offset);
498
499extern u64 GsGetIMR(void);
500extern u64 iGsGetIMR(void);
501extern u64 GsPutIMR(u64 imr);
502extern u64 iGsPutIMR(u64 imr);
503extern void SetPgifHandler(void *handler);
504extern void SetVSyncFlag(u32 *, u64 *);
505extern void SetSyscall(s32 syscall_num, void *handler);
506extern void _print(const char *fmt, ...); // Disabled by default, must call InitDebug() to enable
507
508extern void SifStopDma(void); // Disables SIF0 (IOP -> EE).
509
510extern s32 SifDmaStat(u32 id);
511extern s32 iSifDmaStat(u32 id);
512extern u32 SifSetDma(SifDmaTransfer_t *sdd, s32 len);
513extern u32 iSifSetDma(SifDmaTransfer_t *sdd, s32 len);
514
515// Enables SIF0 (IOP -> EE). Sets channel 5 CHCR to 0x184 (CHAIN, TIE and STR).
516extern void SifSetDChain(void);
517extern void iSifSetDChain(void);
518
519// Sets/gets SIF register values (Refer to sifdma.h for a register list).
520extern int SifSetReg(u32 register_num, int register_value);
521extern int SifGetReg(u32 register_num);
522
523extern void _ExecOSD(int num_args, char *args[]) __attribute__((noreturn));
524extern s32 Deci2Call(s32, u32 *);
525extern void PSMode(void);
526extern s32 MachineType(void);
527extern s32 GetMemorySize(void);
528
529// Internal function for getting board-specific offsets, only present in later kernels (ROMVER > 20010608).
530extern void _GetGsDxDyOffset(int mode, int *dx, int *dy, int *dw, int *dh);
531
532// Internal function for reinitializing the TLB, only present in later kernels. Please use InitTLB() instead to initialize the TLB with all kernels.
533extern int _InitTLB(void);
534/* (PSX only) Sets the memory size. 0 = 64MB mode, 1 = 32MB mode. The mode is only binding when either _InitTLB() or the PSX ExecPS2() syscall is called.
535 The stack pointer must remain in range of usable memory, or a TLB exception will occur. */
536extern int SetMemoryMode(int mode); // Arbitrarily named.
537
538extern void _SyncDCache(void *start, void *end);
539extern void _InvalidDCache(void *start, void *end);
540
541extern void *GetSyscallHandler(int syscall_no);
542extern void *GetExceptionHandler(int except_no);
543extern void *GetInterruptHandler(int intr_no);
544
545/* Helper functions for kernel patching */
546extern int kCopy(void *dest, const void *src, int size);
547extern int kCopyBytes(void *dest, const void *src, int size);
548extern int Copy(void *dest, const void *src, int size);
549extern void setup(int syscall_num, void *handler); // alias of "SetSyscall"
550extern void *GetEntryAddress(int syscall);
551
552// Helpers marcos for no-patch versions
553// Useful to build a special version of libkernel that does not contain any runtime patches (useful for loaders/resident programs).
554#define DISABLE_PATCHED_Exit() \
555 void Exit(s32 exit_code) { KExit(exit_code); }
556
557#define DISABLE_PATCHED_LoadExecPS2() \
558 void LoadExecPS2(const char *filename, s32 num_args, char *args[]) { _LoadExecPS2(filename, num_args, args); }
559
560#define NO_PATCHED_ExecOSD() \
561 void ExecOSD(int num_args, char *args[]) { _ExecOSD(num_args, args); }
562
563#define DISABLE_TimerSystemTime() \
564 s32 InitTimer(s32 in_mode) {(void)in_mode; return 0;} \
565 s32 EndTimer(void) {return 0;} \
566 s32 StartTimerSystemTime(void) {return 0;} \
567 s32 StopTimerSystemTime(void) {return 0;}
568
569#define DISABLE_TimerAlarm() \
570 void ForTimer_InitAlarm(void) {}
571
572#define DISABLE_PATCHED_ALARMS() \
573 void InitAlarm(void) {}
574
575#define DISABLE_PATCHED_THREADS() \
576 int InitThread(void) { return 0; } \
577 s32 iRotateThreadReadyQueue(s32 priority) { return _iRotateThreadReadyQueue(priority); } \
578 s32 iWakeupThread(s32 thread_id) { return _iWakeupThread(thread_id); } \
579 s32 iSuspendThread(s32 thread_id) { return _iSuspendThread(thread_id); }
580
581#define DISABLE_PATCHED_ExecPS2() \
582 void InitExecPS2(void) {} \
583 s32 ExecPS2(void *entry, void *gp, int num_args, char *args[]) { return _ExecPS2(entry, gp, num_args, args); }
584
585#define DISABLE_PATCHED_TLBFunctions() \
586 void InitTLBFunctions(void) {} \
587 void InitTLB(void) {}
588
589#define DISABLE_PATCHED_FUNCTIONS() \
590 DISABLE_PATCHED_ALARMS() \
591 DISABLE_PATCHED_THREADS() \
592 DISABLE_PATCHED_ExecPS2() \
593 DISABLE_PATCHED_TLBFunctions() \
594 DISABLE_PATCHED_Exit() \
595 DISABLE_PATCHED_LoadExecPS2()
596
597#define DISABLE_EXTRA_TIMERS_FUNCTIONS() \
598 DISABLE_TimerSystemTime() \
599 DISABLE_TimerAlarm()
600
601#ifdef __cplusplus
602}
603#endif
604
605#endif /* __KERNEL_H__ */
CPU_CONFIG
Definition kernel.h:274