32
|
1 #ifndef INCLUDED_CELL_DMA_MANAGER
|
|
2 #define INCLUDED_CELL_DMA_MANAGER
|
|
3
|
109
|
4 #ifndef INCLUDED_BASE_H_
|
|
5 # include "base.h"
|
|
6 #endif
|
|
7
|
32
|
8 #ifndef INCLUDED_DMA_MANAGER
|
|
9 # include "DmaManager.h"
|
|
10 #endif
|
|
11
|
88
|
12 #include <spu_mfcio.h>
|
|
13
|
242
|
14 #define SPU_PROFILE 1
|
|
15
|
32
|
16 class CellDmaManager : public DmaManager {
|
|
17 public:
|
109
|
18 BASE_NEW_DELETE(CellDmaManager);
|
|
19
|
88
|
20 typedef struct dma_list {
|
|
21 uint32 addr;
|
|
22 uint32 size;
|
|
23 } DmaList, *DmaListPtr;
|
|
24
|
|
25 /* variables */
|
242
|
26 unsigned int wait_time, busy_time;
|
|
27 unsigned long long global_busy_time, global_wait_time;
|
88
|
28
|
32
|
29 /* functions */
|
88
|
30 void dma_load(void *buf, uint32 addr, uint32 size, uint32 mask);
|
|
31 void dma_store(void *buf, uint32 addr, uint32 size, uint32 mask);
|
|
32 void dma_wait(uint32 mask) ;
|
242
|
33 void start_dmawait_profile();
|
|
34 void end_dmawait_profile();
|
88
|
35
|
|
36 void mail_write(uint32 data);
|
|
37 uint32 mail_read(void);
|
109
|
38 void dma_loadList(ListDataPtr list, void *buff, uint32 mask);
|
|
39 void dma_storeList(ListDataPtr, void *buff, uint32 mask);
|
32
|
40 };
|
|
41
|
|
42 #endif
|