sdk-core v2026.11.05
PS2 SDK - core tier (build-critical EE/IOP modules)
Loading...
Searching...
No Matches
sifman.c
1/*
2# _____ ___ ____ ___ ____
3# ____| | ____| | | |____|
4# | ___| |____ ___| ____| | \ PS2DEV Open Source Project.
5#-----------------------------------------------------------------------
6# Copyright ps2dev - http://www.ps2dev.org
7# Licenced under Academic Free License version 2.0
8# Review ps2sdk README & LICENSE files for further details.
9*/
10
11#include "irx_imports.h"
12#include "sifman.h"
13#include <mipscopaccess.h>
14
15#include "iop_mmio_hwport.h"
16#include "sif_mmio_hwport.h"
17
18extern struct irx_export_table _exp_sifman;
19
20#ifdef _IOP
21IRX_ID("IOP_SIF_manager", 2, 5);
22#endif
23// Based on the module from SCE SDK 3.1.0.
24
25typedef struct sif_info_
26{
27 int data;
28 int words;
29 int count;
30 int addr;
31} sif_info_t;
32
34{
35 void (*func)(void *userdata);
36 void *userdata;
37} sif_completion_cb_info_t;
38
40{
41 sif_completion_cb_info_t info[32];
42 int count;
43} sif_completion_cb_info_arr_t;
44
45typedef struct sifman_internals_
46{
47 u16 dma_count;
48 // cppcheck-suppress unusedStructMember
49 char unused02[2];
50 int dmatag_index;
51 sif_info_t *sif_curbuf;
52 sif_info_t sif_buf1[32];
53 sif_info_t sif_buf2[32];
54 sif_completion_cb_info_arr_t *sif_otherbufcom;
55 sif_completion_cb_info_arr_t *sif_curbufcom;
56 sif_completion_cb_info_arr_t sif_bufcom1;
57 sif_completion_cb_info_arr_t sif_bufcom2;
58 void (*dma_intr_handler)(void *userdata);
59 void *dma_intr_handler_userdata;
60 // cppcheck-suppress unusedStructMember
61 char field_624[4];
62 sif_info_t one;
63 // cppcheck-suppress unusedStructMember
64 char field_638[8];
65} sifman_internals_t;
66
67static sifman_internals_t sifman_internals;
68static u32 sif_dma2_inited = 0;
69static u32 sif_inited = 0;
70
71int _start(int ac, char **av)
72{
73 s32 prid;
74 USE_IOP_MMIO_HWPORT();
75 USE_SIF_MMIO_HWPORT();
76
77 (void)ac;
78 (void)av;
79
80 prid = get_mips_cop_reg(0, COP0_REG_PRId);
81 if ( prid >= 16 )
82 {
83 if ( (iop_mmio_hwport->iop_sbus_ctrl[0] & 8) == 0 )
84 {
85 if ( sif_mmio_hwport->unk60 == 0x1D000060 )
86 return RegisterLibraryEntries(&_exp_sifman) != 0;
87 if ( (sif_mmio_hwport->unk60 & 0xFFFFF000) == 0 )
88 return RegisterLibraryEntries(&_exp_sifman) != 0;
89 }
90 }
91 return 1;
92}
93
94static u32 get_msflag()
95{
96 u32 result;
97 USE_SIF_MMIO_HWPORT();
98
99 for ( result = sif_mmio_hwport->msflag; result != sif_mmio_hwport->msflag; result = sif_mmio_hwport->msflag )
100 ;
101 return result;
102}
103
104static u32 get_smflag()
105{
106 u32 result;
107 USE_SIF_MMIO_HWPORT();
108
109 for ( result = sif_mmio_hwport->smflag; result != sif_mmio_hwport->smflag; result = sif_mmio_hwport->smflag )
110 ;
111 return result;
112}
113
114void sceSifDma2Init()
115{
116 USE_IOP_MMIO_HWPORT();
117
118 if ( !sif_dma2_inited )
119 {
120 iop_mmio_hwport->dmac1.oldch[2].chcr = 0;
121 iop_mmio_hwport->dmac1.dpcr1 |= 0x800;
122 sif_dma2_inited = 1;
123 }
124}
125
126static int sif_dma_init(void);
127
128void sceSifInit()
129{
130 u32 msflag;
131 int state;
132 USE_IOP_MMIO_HWPORT();
133 USE_SIF_MMIO_HWPORT();
134
135 if ( !sif_inited )
136 {
137 iop_mmio_hwport->dmac2.dpcr2 |= 0x8800;
138 iop_mmio_hwport->dmac2.newch[2].chcr = 0;
139 iop_mmio_hwport->dmac2.newch[3].chcr = 0;
140 sceSifDma2Init();
141 if ( (iop_mmio_hwport->iop_sbus_ctrl[0] & 0x10) != 0 )
142 {
143 iop_mmio_hwport->iop_sbus_ctrl[0] |= 0x10;
144 }
145 iop_mmio_hwport->iop_sbus_ctrl[0] |= 1;
146 sif_dma_init();
147 do
148 {
149 CpuSuspendIntr(&state);
150 msflag = get_msflag();
151 CpuResumeIntr(state);
152 } while ( (msflag & SIF_STAT_SIFINIT) == 0 );
153 sceSifSetDChain();
154 sceSifSetSubAddr(0);
155 sif_mmio_hwport->smflag = SIF_STAT_SIFINIT;
156 sif_inited = 1;
157 }
158}
159
160int sifman_deinit()
161{
162 int old_irq;
163 USE_IOP_MMIO_HWPORT();
164
165 DisableIntr(IOP_IRQ_DMA_SIF0, &old_irq);
166 ReleaseIntrHandler(IOP_IRQ_DMA_SIF0);
167 iop_mmio_hwport->dmac2.newch[2].chcr = 0;
168 iop_mmio_hwport->dmac2.newch[3].chcr = 0;
169 if ( iop_mmio_hwport->iop_sbus_ctrl[0] & 0x10 )
170 {
171 iop_mmio_hwport->iop_sbus_ctrl[0] |= 0x10;
172 }
173 return 0;
174}
175
176int sceSifCheckInit()
177{
178 return sif_inited;
179}
180
181void sceSifSetDChain(void)
182{
183 USE_IOP_MMIO_HWPORT();
184 USE_SIF_MMIO_HWPORT();
185
186 if ( (sif_mmio_hwport->controlreg & 0x40) == 0 )
187 sif_mmio_hwport->controlreg = 64;
188 iop_mmio_hwport->dmac2.newch[3].chcr = 0;
189 iop_mmio_hwport->dmac2.newch[3].bcr = (iop_mmio_hwport->dmac2.newch[3].bcr & 0xFFFF0000) | 32;
190 iop_mmio_hwport->dmac2.newch[3].chcr = 0x41000300;
191}
192
193void sceSifSetDmaIntrHandler(void (*handler)(void *userdata), void *arg)
194{
195 sifman_internals.dma_intr_handler = handler;
196 sifman_internals.dma_intr_handler_userdata = arg;
197}
198
199void sceSifResetDmaIntrHandler()
200{
201 sifman_internals.dma_intr_handler = NULL;
202 sifman_internals.dma_intr_handler_userdata = NULL;
203}
204
205static int sifman_interrupt_handler(void *userdata)
206{
207 void (*dma_intr_handler)(void *userdata);
208 sif_completion_cb_info_arr_t *sif_otherbufcom;
209 int v4;
210 sif_completion_cb_info_arr_t *p_sif_bufcom1;
211 sifman_internals_t *smi;
212 USE_IOP_MMIO_HWPORT();
213 USE_SIF_MMIO_HWPORT();
214
215 smi = (sifman_internals_t *)userdata;
216 dma_intr_handler = smi->dma_intr_handler;
217 if ( dma_intr_handler )
218 dma_intr_handler(smi->dma_intr_handler_userdata);
219 sif_otherbufcom = smi->sif_otherbufcom;
220 v4 = 0;
221 if ( sif_otherbufcom->count > 0 )
222 {
223 int v5;
224
225 v5 = 0;
226 do
227 {
228 ++v4;
229 sif_otherbufcom->info[v5].func(sif_otherbufcom->info[v5].userdata);
230 sif_otherbufcom = smi->sif_otherbufcom;
231 v5 = v4;
232 } while ( v4 < sif_otherbufcom->count );
233 }
234 smi->sif_otherbufcom->count = 0;
235 if ( (iop_mmio_hwport->dmac2.newch[2].chcr & 0x1000000) == 0 && smi->dmatag_index > 0 )
236 {
237 iop_mmio_hwport->dmac2.newch[2].chcr = 0;
238 iop_mmio_hwport->dmac2.newch[2].tadr = (uiptr)(smi->sif_curbuf);
239 iop_mmio_hwport->dmac2.newch[2].bcr = (iop_mmio_hwport->dmac2.newch[2].bcr & 0xFFFF0000) | 32;
240 if ( (sif_mmio_hwport->controlreg & 0x20) == 0 )
241 sif_mmio_hwport->controlreg = 32;
242 ++smi->dma_count;
243 smi->dmatag_index = 0;
244 if ( smi->sif_curbuf == smi->sif_buf1 )
245 {
246 smi->sif_curbuf = smi->sif_buf2;
247 smi->sif_curbufcom = &smi->sif_bufcom2;
248 p_sif_bufcom1 = &smi->sif_bufcom1;
249 }
250 else
251 {
252 smi->sif_curbufcom = &smi->sif_bufcom1;
253 p_sif_bufcom1 = &smi->sif_bufcom2;
254 smi->sif_curbuf = smi->sif_buf1;
255 }
256 smi->sif_otherbufcom = p_sif_bufcom1;
257 iop_mmio_hwport->dmac2.newch[2].chcr = 0x1000701;
258 }
259 return 1;
260}
261
262static int sif_dma_init(void)
263{
264 int state;
265
266 sifman_internals.sif_curbuf = sifman_internals.sif_buf1;
267 sifman_internals.sif_curbufcom = &sifman_internals.sif_bufcom1;
268 sifman_internals.dmatag_index = 0;
269 sifman_internals.sif_bufcom1.count = 0;
270 sifman_internals.sif_bufcom2.count = 0;
271 sifman_internals.sif_otherbufcom = &sifman_internals.sif_bufcom2;
272 sifman_internals.dma_intr_handler = 0;
273 sifman_internals.dma_intr_handler_userdata = 0;
274 CpuSuspendIntr(&state);
275 RegisterIntrHandler(IOP_IRQ_DMA_SIF0, 1, sifman_interrupt_handler, &sifman_internals);
276 EnableIntr(IOP_IRQ_DMA_SIF0);
277 return CpuResumeIntr(state);
278}
279
280static int sif_dma_setup_tag(SifDmaTransfer_t *a1)
281{
282 sif_info_t *v1;
283 int v2;
284 unsigned int v3;
285 unsigned int v4;
286 unsigned int v5;
287
288 v1 = &sifman_internals.sif_curbuf[sifman_internals.dmatag_index];
289 v2 = (int)a1->src & 0xFFFFFF;
290 v3 = a1->size + 3;
291 v1->data = v2;
292 v4 = v3 >> 2;
293 if ( (a1->attr & 2) != 0 )
294 v1->data = v2 | 0x40000000;
295 v1->words = v4 & 0xFFFFFF;
296 v5 = v3 >> 4;
297 if ( (v4 & 3) != 0 )
298 ++v5;
299 v1->count = v5 | 0x10000000;
300 if ( (a1->attr & 4) != 0 )
301 v1->count |= 0x80000000;
302 v1->addr = (int)a1->dest & 0x1FFFFFFF;
303 return ++sifman_internals.dmatag_index;
304}
305
306static int set_dma_inner(SifDmaTransfer_t *dmat, int count, void (*func)(void *userdata), void *data)
307{
308 u8 dmatag_index;
309 int dma_count;
310 int i;
311 int v14;
312 sif_completion_cb_info_arr_t *p_sif_bufcom1;
313 USE_IOP_MMIO_HWPORT();
314 USE_SIF_MMIO_HWPORT();
315
316 if ( 32 - sifman_internals.dmatag_index < count )
317 return 0;
318 dmatag_index = sifman_internals.dmatag_index;
319 dma_count = sifman_internals.dma_count;
320 if ( sifman_internals.dmatag_index )
321 sifman_internals.sif_curbuf[sifman_internals.dmatag_index - 1].data &= ~0x80000000;
322 for ( i = 0; i < count; ++dmat )
323 {
324 sif_dma_setup_tag(dmat);
325 ++i;
326 }
327 sifman_internals.sif_curbuf[sifman_internals.dmatag_index - 1].data |= 0x80000000;
328 if ( func )
329 {
330 sifman_internals.sif_curbufcom->info[sifman_internals.sif_curbufcom->count].func = func;
331 sifman_internals.sif_curbufcom->info[sifman_internals.sif_curbufcom->count++].userdata = data;
332 }
333 v14 = dma_count << 16;
334 if ( (iop_mmio_hwport->dmac2.newch[2].chcr & 0x1000000) == 0 )
335 {
336 v14 = dma_count << 16;
337 if ( iop_mmio_hwport->dmac2.new_unusedch.madr == 0 )
338 {
339 v14 = dma_count << 16;
340 if ( (iop_mmio_hwport->dmac2.dicr2 & 0x4000000) == 0 )
341 {
342 iop_mmio_hwport->dmac2.newch[2].chcr = 0;
343 iop_mmio_hwport->dmac2.newch[2].tadr = (uiptr)(sifman_internals.sif_curbuf);
344 if ( (sif_mmio_hwport->controlreg & 0x20) == 0 )
345 sif_mmio_hwport->controlreg = 32;
346 iop_mmio_hwport->dmac2.newch[2].bcr = (iop_mmio_hwport->dmac2.newch[2].bcr & 0xFFFF0000) | 32;
347 sifman_internals.dmatag_index = 0;
348 ++sifman_internals.dma_count;
349 if ( sifman_internals.sif_curbuf == sifman_internals.sif_buf1 )
350 {
351 sifman_internals.sif_curbuf = sifman_internals.sif_buf2;
352 sifman_internals.sif_curbufcom = &sifman_internals.sif_bufcom2;
353 p_sif_bufcom1 = &sifman_internals.sif_bufcom1;
354 }
355 else
356 {
357 sifman_internals.sif_curbuf = sifman_internals.sif_buf1;
358 sifman_internals.sif_curbufcom = &sifman_internals.sif_bufcom1;
359 p_sif_bufcom1 = &sifman_internals.sif_bufcom2;
360 }
361 sifman_internals.sif_otherbufcom = p_sif_bufcom1;
362 iop_mmio_hwport->dmac2.newch[2].chcr = 0x1000701;
363 v14 = dma_count << 16;
364 }
365 }
366 }
367 return v14 | (dmatag_index << 8) | (u8)count;
368}
369
370int sceSifSetDma(SifDmaTransfer_t *dmat, int count)
371{
372 return set_dma_inner(dmat, count, 0, 0);
373}
374
375unsigned int sceSifSetDmaIntr(SifDmaTransfer_t *dmat, int count, void (*completioncb)(void *userdata), void *userdata)
376{
377 return set_dma_inner(dmat, count, completioncb, userdata);
378}
379
380static int dma_stat_inner(unsigned int a1)
381{
382 USE_IOP_MMIO_HWPORT();
383
384 if ( (iop_mmio_hwport->dmac2.newch[2].chcr & 0x1000000) == 0 && !iop_mmio_hwport->dmac2.new_unusedch.madr )
385 {
386 if ( (iop_mmio_hwport->dmac2.dicr2 & 0x4000000) == 0 )
387 return -1;
388 }
389 if ( sifman_internals.dma_count != ((a1 >> 16) & 0xFFFF) )
390 {
391 if ( sifman_internals.dma_count == (u16)(((a1 >> 16) & 0xFFFF) + 1) )
392 return 0;
393 return -1;
394 }
395 return 1;
396}
397
398int sceSifDmaStat(int trid)
399{
400 int v2;
401 int state;
402
403 if ( QueryIntrContext() )
404 return dma_stat_inner(trid);
405 CpuSuspendIntr(&state);
406 v2 = dma_stat_inner(trid);
407 CpuResumeIntr(state);
408 return v2;
409}
410
411void sceSifSetOneDma(SifDmaTransfer_t dmat)
412{
413 int v1;
414 unsigned int v2;
415 unsigned int v3;
416 USE_IOP_MMIO_HWPORT();
417 USE_SIF_MMIO_HWPORT();
418
419 v1 = ((int)dmat.src & 0xFFFFFF) | 0x80000000;
420 v2 = ((unsigned int)dmat.size >> 2) + ((dmat.size & 3) != 0);
421 sifman_internals.one.data = v1;
422 sifman_internals.one.words = v2 & 0xFFFFFF;
423 if ( (dmat.attr & 2) != 0 )
424 sifman_internals.one.data = v1 | 0x40000000;
425 v3 = v2 >> 2;
426 if ( (v2 & 3) != 0 )
427 ++v3;
428 sifman_internals.one.count = v3 | 0x10000000;
429 if ( (dmat.attr & 4) != 0 )
430 sifman_internals.one.count |= 0x80000000;
431 sifman_internals.one.addr = (int)dmat.dest & 0xFFFFFFF;
432 if ( (sif_mmio_hwport->controlreg & 0x20) == 0 )
433 sif_mmio_hwport->controlreg = 32;
434 iop_mmio_hwport->dmac2.newch[2].chcr = 0;
435 iop_mmio_hwport->dmac2.newch[2].tadr = (uiptr)&sifman_internals.one;
436 iop_mmio_hwport->dmac2.newch[2].bcr = (iop_mmio_hwport->dmac2.newch[2].bcr & 0xFFFF0000) | 32;
437 iop_mmio_hwport->dmac2.newch[2].chcr = 0x1000701;
438}
439
440void sceSifSendSync()
441{
442 USE_IOP_MMIO_HWPORT();
443
444 while ( iop_mmio_hwport->dmac2.newch[2].chcr & 0x1000000 )
445 ;
446}
447
448int sceSifIsSending()
449{
450 USE_IOP_MMIO_HWPORT();
451
452 return iop_mmio_hwport->dmac2.newch[2].chcr & 0x1000000;
453}
454
455void sceSifDma0Transfer(void *addr, int size, int mode)
456{
457 unsigned int v4;
458 int v5;
459 USE_IOP_MMIO_HWPORT();
460 USE_SIF_MMIO_HWPORT();
461
462 (void)mode;
463
464 v4 = ((unsigned int)size >> 2) + ((size & 3) != 0);
465 if ( (sif_mmio_hwport->controlreg & 0x20) == 0 )
466 sif_mmio_hwport->controlreg = 32;
467 iop_mmio_hwport->dmac2.newch[2].chcr = 0;
468 iop_mmio_hwport->dmac2.newch[2].madr = (unsigned int)addr & 0xFFFFFF;
469 if ( (v4 & 0x1F) != 0 )
470 v5 = (v4 >> 5) + 1;
471 else
472 v5 = v4 >> 5;
473 iop_mmio_hwport->dmac2.newch[2].bcr = ((v5 & 0xFFFF) << 16) | 32;
474 iop_mmio_hwport->dmac2.newch[2].chcr = 0x1000201;
475}
476
477void sceSifDma0Sync()
478{
479 USE_IOP_MMIO_HWPORT();
480
481 while ( iop_mmio_hwport->dmac2.newch[2].chcr & 0x1000000 )
482 ;
483}
484
485int sceSifDma0Sending()
486{
487 USE_IOP_MMIO_HWPORT();
488
489 return iop_mmio_hwport->dmac2.newch[2].chcr & 0x1000000;
490}
491
492void sceSifDma1Transfer(void *addr, int size, int mode)
493{
494 unsigned int v4;
495 int v5;
496 int v6;
497 USE_IOP_MMIO_HWPORT();
498 USE_SIF_MMIO_HWPORT();
499
500 v4 = ((unsigned int)size >> 2) + ((size & 3) != 0);
501 if ( (sif_mmio_hwport->controlreg & 0x40) == 0 )
502 sif_mmio_hwport->controlreg = 64;
503 iop_mmio_hwport->dmac2.newch[3].chcr = 0;
504 iop_mmio_hwport->dmac2.newch[3].madr = (unsigned int)addr & 0xFFFFFF;
505 if ( (v4 & 0x1F) != 0 )
506 v5 = (v4 >> 5) + 1;
507 else
508 v5 = v4 >> 5;
509 iop_mmio_hwport->dmac2.newch[3].bcr = ((v5 & 0xFFFF) << 16) | 32;
510 if ( (mode & 0x10) != 0 )
511 v6 = 0x41000000;
512 else
513 v6 = 0x1000000;
514 iop_mmio_hwport->dmac2.newch[3].chcr = v6 | 0x200;
515}
516
517void sceSifDma1Sync()
518{
519 USE_IOP_MMIO_HWPORT();
520
521 while ( iop_mmio_hwport->dmac2.newch[3].chcr & 0x1000000 )
522 ;
523}
524
525int sceSifDma1Sending()
526{
527 USE_IOP_MMIO_HWPORT();
528
529 return iop_mmio_hwport->dmac2.newch[3].chcr & 0x1000000;
530}
531
532void sceSifDma2Transfer(void *addr, int size, int mode)
533{
534 unsigned int v4;
535 u16 v5;
536 int v6;
537 int v7;
538 USE_IOP_MMIO_HWPORT();
539 USE_SIF_MMIO_HWPORT();
540
541 v4 = ((unsigned int)size >> 2) + ((size & 3) != 0);
542 if ( (sif_mmio_hwport->controlreg & 0x80) == 0 )
543 sif_mmio_hwport->controlreg = 128;
544 v5 = v4;
545 iop_mmio_hwport->dmac1.oldch[2].chcr = 0;
546 iop_mmio_hwport->dmac1.oldch[2].madr = (unsigned int)addr & 0xFFFFFF;
547 if ( v4 >= 0x21 )
548 v5 = 32;
549 if ( (v4 & 0x1F) != 0 )
550 v6 = (v4 >> 5) + 1;
551 else
552 v6 = v4 >> 5;
553 iop_mmio_hwport->dmac1.oldch[2].bcr = ((v6 & 0xFFFF) << 16) | (v5 & 0xFFFF);
554 if ( (mode & 1) != 0 )
555 {
556 v7 = 0x1000201;
557 }
558 else
559 {
560 int v8;
561
562 if ( (mode & 0x10) != 0 )
563 v8 = 0x41000000;
564 else
565 v8 = 0x1000000;
566 v7 = v8 | 0x200;
567 }
568 iop_mmio_hwport->dmac1.oldch[2].chcr = v7;
569}
570
571void sceSifDma2Sync()
572{
573 USE_IOP_MMIO_HWPORT();
574
575 while ( iop_mmio_hwport->dmac1.oldch[2].chcr & 0x1000000 )
576 ;
577}
578
579int sceSifDma2Sending()
580{
581 USE_IOP_MMIO_HWPORT();
582
583 return iop_mmio_hwport->dmac1.oldch[2].chcr & 0x1000000;
584}
585
586u32 sceSifGetMSFlag()
587{
588 return get_msflag();
589}
590
591u32 sceSifSetMSFlag(u32 val)
592{
593 USE_SIF_MMIO_HWPORT();
594
595 sif_mmio_hwport->msflag = val;
596 return get_msflag();
597}
598
599u32 sceSifGetSMFlag()
600{
601 return get_smflag();
602}
603
604u32 sceSifSetSMFlag(u32 val)
605{
606 USE_SIF_MMIO_HWPORT();
607
608 sif_mmio_hwport->smflag = val;
609 return get_smflag();
610}
611
612u32 sceSifGetMainAddr()
613{
614 USE_SIF_MMIO_HWPORT();
615
616 return sif_mmio_hwport->mscom;
617}
618
619u32 sceSifGetSubAddr()
620{
621 USE_SIF_MMIO_HWPORT();
622
623 return sif_mmio_hwport->smcom;
624}
625
626u32 sceSifSetSubAddr(u32 addr)
627{
628 USE_SIF_MMIO_HWPORT();
629
630 sif_mmio_hwport->smcom = addr;
631 return sif_mmio_hwport->smcom;
632}
633
634void sceSifIntrMain()
635{
636 u32 v0;
637 USE_IOP_MMIO_HWPORT();
638
639 v0 = iop_mmio_hwport->iop_sbus_ctrl[0];
640 iop_mmio_hwport->iop_sbus_ctrl[0] = v0 | 2;
641 // cppcheck-suppress redundantAssignment
642 iop_mmio_hwport->iop_sbus_ctrl[0] = v0 & 0xFFFFFFFD;
643}
int CpuResumeIntr(int state)
Definition intrman.c:217
int ReleaseIntrHandler(int irq)
Definition intrman.c:157
int QueryIntrContext(void)
int DisableIntr(int irq, int *res)
Definition intrman.c:385
int CpuSuspendIntr(int *state)
Definition intrman.c:195
int RegisterIntrHandler(int irq, int mode, int(*handler)(void *arg), void *arg)
Definition intrman.c:115
int EnableIntr(int irq)
Definition intrman.c:336
#define COP0_REG_PRId
#define SIF_STAT_SIFINIT
Definition sifdma.h:47
u32 count
start sector of fragmented bd/file