Mercurial > hg > Members > kono > Cerium
comparison TaskManager/Cell/spe/CellDmaManager.cc @ 604:7a41d2cb0a84
fix mail box size
author | Shinji KONO <kono@ie.u-ryukyu.ac.jp> |
---|---|
date | Sat, 07 Nov 2009 14:23:40 +0900 |
parents | 87462f8d3761 |
children | ab866bc8a624 |
comparison
equal
deleted
inserted
replaced
603:42c94f85c779 | 604:7a41d2cb0a84 |
---|---|
76 end_dmawait_profile(); | 76 end_dmawait_profile(); |
77 #endif | 77 #endif |
78 } | 78 } |
79 | 79 |
80 void | 80 void |
81 CellDmaManager::mail_write(uint32 data) | 81 CellDmaManager::mail_write(memaddr data) |
82 { | 82 { |
83 spu_write_out_mbox(data); | 83 spu_write_out_mbox((uint32)data); |
84 if (sizeof(memaddr)>4) | |
85 spu_write_out_mbox(data>>4); | |
84 } | 86 } |
85 | 87 |
86 unsigned int | 88 memaddr |
87 CellDmaManager::mail_read(void) | 89 CellDmaManager::mail_read() |
88 { | 90 { |
89 unsigned int mail = spu_read_in_mbox(); | 91 memaddr mail = spu_read_in_mbox(); |
92 if (sizeof(memaddr)>4) | |
93 mail += (spu_read_in_mbox()<<4); | |
90 return mail; | 94 return mail; |
91 } | 95 } |
92 | 96 |
93 void | 97 void |
94 CellDmaManager::dma_loadList(ListDataPtr list, void *buff, uint32 mask) | 98 CellDmaManager::dma_loadList(ListDataPtr list, void *buff, uint32 mask) |
101 CellDmaManager::dma_storeList(ListDataPtr list, void *buff, uint32 mask) | 105 CellDmaManager::dma_storeList(ListDataPtr list, void *buff, uint32 mask) |
102 { | 106 { |
103 mfc_putl(buff, 0, list->element, sizeof(mfc_list_element_t)*list->length, | 107 mfc_putl(buff, 0, list->element, sizeof(mfc_list_element_t)*list->length, |
104 mask, 0, 0); | 108 mask, 0, 0); |
105 } | 109 } |
110 | |
111 /* end */ |